BALL
1.4.1
|
00001 // 00002 // -*- Mode: C++; tab-width: 2; -*- 00003 // vi: set ts=2: 00004 // 00005 00006 #ifndef BALL_VIEW_DIALOGS_DOCKPROGRESSDIALOG_H 00007 #define BALL_VIEW_DIALOGS_DOCKPROGRESSDIALOG_H 00008 00009 #ifndef BALL_COMMON_GLOBAL_H 00010 # include <BALL/COMMON/global.h> 00011 #endif 00012 00013 #ifndef BALL_DATATYPE_OPTIONS_H 00014 # include <BALL/DATATYPE/options.h> 00015 #endif 00016 00017 #ifndef BALL_STRUCTURE_DOCKING_DOCKINGALGORITHM_H 00018 # include <BALL/STRUCTURE/DOCKING/dockingAlgorithm.h> 00019 #endif 00020 00021 #include <QtCore/QTimer> 00022 #include <QtCore/QDateTime> 00023 00024 #include <BALL/VIEW/UIC/ui_dockProgressDialog.h> 00025 00026 namespace BALL 00027 { 00028 namespace VIEW 00029 { 00033 class BALL_VIEW_EXPORT DockProgressDialog : 00034 public QDialog, 00035 public Ui_DockProgressDialogData 00036 { 00037 Q_OBJECT 00038 00039 public: 00040 00044 00051 DockProgressDialog(QWidget* parent = 0, const char* name = "DockProgressDialog"); 00052 00055 virtual ~DockProgressDialog(); 00057 00061 00065 void setDockingAlgorithm(DockingAlgorithm* alg); 00066 00069 const DockingAlgorithm* getDockingAlgorithm() const; 00070 00080 void fillDialog(const QString& p1, const QString& p2, const QString& alg, const QString& sf, const Options& alg_opt, const Options& sf_opt); 00082 00083 public slots: 00084 00087 void show(); 00088 00089 // TODO: pause algorithm!!! 00093 void pauseClicked(); 00094 00099 void abortClicked(); 00100 00101 00102 protected slots: 00103 00109 void updateProgress_(); 00110 00111 00112 private: 00113 00118 DockProgressDialog(const DockProgressDialog& dock_prog_dialog); 00119 00125 00128 const DockProgressDialog& operator =(const DockProgressDialog& dock_prog_dialog); 00130 00133 DockingAlgorithm* alg_; 00134 00137 QTimer timer_; 00138 00141 QDateTime start_time_; 00142 }; 00143 00144 } } // Namespaces 00145 #endif