Go to the documentation of this file.00001
00002
00003
00004
00005
00008
00009 #ifndef lgrMainWindow_H_
00010 #define lgrMainWindow_H_
00011
00012 #include "lgrGui.h"
00013
00014 #include <QtGui/QMainWindow>
00015
00016 #include <commonWidgets/dynamicMenuBar.h>
00017 #include <list>
00018
00019 class QProgressDialog;
00020 class DtString;
00021 class DtFilename;
00022
00023 namespace MAKLogger
00024 {
00025
00026 class DtLgrMenu;
00027 class DtLgrGuiModel;
00028
00030 class DT_DLL_LGRGUI DtLgrMainWindow : public QMainWindow
00031 {
00032 Q_OBJECT
00033 public:
00034
00036 DtLgrMainWindow(DtLgrGuiModel* model);
00037
00039 virtual ~DtLgrMainWindow();
00040
00043 virtual void saveGuiConfiguration(bool forceSave=false);
00044
00046 virtual void loadGuiConfiguration();
00047
00051 virtual bool getConfigurationDirectory(DtFilename& configPath, bool makeDirEnabled);
00052
00054 virtual void updateTitleBar(const DtString loggerName);
00055
00059 bool yesNoQuestion(QString question);
00060
00065 int yesNoCancelQuestion(QString question);
00066
00069 void errorMessage(QString message);
00070
00072 void showProgress(QString name,bool canBeCanceled);
00073
00075 void updateProgress(QString msg,int progress);
00076
00078 void finishProgress();
00079
00081 const DtLgrGuiModel* guiModel() const;
00082
00084 MAKCommonWidgets::DtDynamicMenuBar& dynamicMenuBar();
00085
00086 void addMenu( QString previousMenuName, DtLgrMenu* menu );
00087
00088 static QString theTitleBarText;
00089 static QString theShortTitleBarText;
00090 static QString theGuiConfigFileName;
00091
00093 virtual void setVisible(bool on);
00094
00095 public slots:
00096 virtual void show();
00097
00098 protected:
00099
00100 void closeEvent(QCloseEvent* ce);
00101 void printMessage(const DtString& message);
00102 void closeMainWindow(const bool& closeFlag);
00103 bool savedState();
00104
00105 DtLgrGuiModel* myGuiModel;
00106 MAKCommonWidgets::DtDynamicMenuBar* myMenuBar;
00107 QProgressDialog* myProgressDialog;
00108 bool myAlreadySaved;
00109
00110 bool myRegisteredFileDropFlag;
00111
00112 };
00113
00114 }
00115
00116 #endif