Vidalia 0.2.12
|
00001 /* 00002 ** This file is part of Vidalia, and is subject to the license terms in the 00003 ** LICENSE file, found in the top level directory of this distribution. If you 00004 ** did not receive the LICENSE file with this file, you may obtain it from the 00005 ** Vidalia source package distributed by the Vidalia Project at 00006 ** http://www.vidalia-project.net/. No part of Vidalia, including this file, 00007 ** may be copied, modified, propagated, or distributed except according to the 00008 ** terms described in the LICENSE file. 00009 */ 00010 00011 /* 00012 ** \file UploadProgressDialog.cpp 00013 ** \brief Displays the progress of uploading a crash report to the server 00014 */ 00015 00016 #ifndef _UPLOADPROGRESSDIALOG_H 00017 #define _UPLOADPROGRESSDIALOG_H 00018 00019 #include "ui_UploadProgressDialog.h" 00020 00021 00022 class UploadProgressDialog : public QDialog 00023 { 00024 Q_OBJECT 00025 00026 public: 00027 /** Default constructor. 00028 */ 00029 UploadProgressDialog(QWidget *parent = 0); 00030 00031 public slots: 00032 /** Sets the status message text in the dialog to <b>status</b>. 00033 */ 00034 void setStatus(const QString &status); 00035 00036 /** Updates the minidump upload progress bar to <b>value</b> out of 00037 * <b>maximum</b> steps. If <b>value</b> and <b>maximum</b> are both 0, 00038 * then a "busy" progress bar is displayed. 00039 */ 00040 void setUploadProgress(int value, int maximum); 00041 00042 /** Called when the minidump upload fails. The string <b>error</b> 00043 * provides a human-readable description of the reason the upload 00044 * failed, which is displayed for the user. 00045 */ 00046 void uploadFailed(const QString &error); 00047 00048 protected: 00049 /** Overloaded method called when the progress dialog is first shown in 00050 * order to initialize the progress bar, status text and dialog button 00051 * box. 00052 */ 00053 virtual void setVisible(bool visible); 00054 00055 private: 00056 /** Qt Designer generated object. 00057 */ 00058 Ui::UploadProgressDialog ui; 00059 }; 00060 00061 #endif 00062