Vidalia 0.3.1
UpdateProgressDialog.h
Go to the documentation of this file.
1/*
2** This file is part of Vidalia, and is subject to the license terms in the
3** LICENSE file, found in the top level directory of this distribution. If you
4** did not receive the LICENSE file with this file, you may obtain it from the
5** Vidalia source package distributed by the Vidalia Project at
6** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
7** including this file, may be copied, modified, propagated, or distributed
8** except according to the terms described in the LICENSE file.
9*/
10
11#ifndef _UPDATEPROGRESSDIALOG_H
12#define _UPDATEPROGRESSDIALOG_H
13
14#include "ui_UpdateProgressDialog.h"
15
16#include <QDialog>
17
18
19class UpdateProgressDialog : public QDialog
20{
21 Q_OBJECT
22
23public:
24 enum Status {
29 };
30
31 /** Default constructor.
32 */
33 UpdateProgressDialog(QWidget *parent = 0);
34
35 /** Updates the dialog's display to reflect the current action indicated
36 * by <b>status</b>.
37 */
39
40signals:
41 /** Emitted when the user clicks the "Cancel" button indicating they
42 * want to terminate the current check for available updates.
43 */
45
46public slots:
47 /** Called when more bytes of <b>url</b> have been received.
48 * <b>bytesReceived</b> indicates how many bytes have been downloaded so
49 * far and <b>bytesTotal</b> indicates the total size of the update to be
50 * downloaded.
51 */
52 void setDownloadProgress(const QString &url,
53 int bytesReceived, int bytesTotal);
54
55private slots:
56 /** Called when the user clicks the "Cancel" button. Emits the
57 * cancelUpdate() signal.
58 */
59 void onHide();
60
61 /** Called when the user clicks the "Hide" button. Hides the dialog
62 * box.
63 */
64 void onCancel();
65
66private:
67 Ui::UpdateProgressDialog ui; /**< Qt Designer generated object. */
68};
69
70#endif
UpdateProgressDialog(QWidget *parent=0)
void setDownloadProgress(const QString &url, int bytesReceived, int bytesTotal)
Ui::UpdateProgressDialog ui
void setStatus(UpdateProgressDialog::Status status)