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 ** \version $Id$ 00014 ** \brief Displays the progress of uploading a crash report to the server 00015 */ 00016 00017 #ifndef _UPLOADPROGRESSDIALOG_H 00018 #define _UPLOADPROGRESSDIALOG_H 00019 00020 #include "ui_UploadProgressDialog.h" 00021 00022 00023 class UploadProgressDialog : public QDialog 00024 { 00025 Q_OBJECT 00026 00027 public: 00028 /** Default constructor. 00029 */ 00030 UploadProgressDialog(QWidget *parent = 0); 00031 00032 public slots: 00033 /** Sets the status message text in the dialog to <b>status</b>. 00034 */ 00035 void setStatus(const QString &status); 00036 00037 /** Updates the minidump upload progress bar to <b>value</b> out of 00038 * <b>maximum</b> steps. If <b>value</b> and <b>maximum</b> are both 0, 00039 * then a "busy" progress bar is displayed. 00040 */ 00041 void setUploadProgress(int value, int maximum); 00042 00043 /** Called when the minidump upload fails. The string <b>error</b> 00044 * provides a human-readable description of the reason the upload 00045 * failed, which is displayed for the user. 00046 */ 00047 void uploadFailed(const QString &error); 00048 00049 protected: 00050 /** Overloaded method called when the progress dialog is first shown in 00051 * order to initialize the progress bar, status text and dialog button 00052 * box. 00053 */ 00054 virtual void setVisible(bool visible); 00055 00056 private: 00057 /** Qt Designer generated object. 00058 */ 00059 Ui::UploadProgressDialog ui; 00060 }; 00061 00062 #endif 00063