source: src-qt4/life-preserver/mainUI.h @ bfe4e62

9.2-releasereleng/10.0releng/10.0.1releng/10.0.2releng/10.0.3releng/10.1
Last change on this file since bfe4e62 was bfe4e62, checked in by Ken Moore <ken@…>, 16 months ago

Disable the main GUI display buttons whenever a background process is running, with a status message at the bottom of the screen

  • Property mode set to 100644
File size: 1.5 KB
Line 
1#ifndef _LP_MAINUI_H
2#define _LP_MAINUI_H
3
4#include <QMainWindow>
5#include <QHash>
6#include <QStringList>
7#include <QString>
8#include <QTreeWidgetItem>
9#include <QDebug>
10#include <QMessageBox>
11#include <QCloseEvent>
12#include <QFileDialog>
13#include <QInputDialog>
14#include <QTime>
15#include <QTimer>
16
17#include "LPBackend.h"
18#include "LPWizard.h"
19#include "LPContainers.h"
20#include "LPConfig.h"
21
22//TERMINOLOGY NOTE: DS=DataSet, SNAP=Snapshot
23
24namespace Ui {
25    class mainUI;
26}
27
28class mainUI : public QMainWindow{
29        Q_OBJECT
30       
31public:
32        explicit mainUI(QWidget* parent = 0);
33        ~mainUI();
34
35
36public slots:
37        void setupUI(); //for the tray to call it as necessary
38
39private:
40        Ui::mainUI *ui;
41        QHash<QString,LPDataset> HLIST;
42        QStringList RLIST; //datasets that have replication enabled
43        QStringList SLIST; //available datasets on the system
44        QStringList CLIST; //current status for all datasets
45        QMenu *revMenu, *brMenu, *addMenu, *keyMenu; //button menu's
46        QTime lastUpdate;
47        QTimer *freqTimer;
48
49        void updateHash(QString ds="");
50        void updateUI();
51        void updateMenus();
52        QString getSelectedDS();
53        LPDataset newDataset(QString);
54
55        void enableButtons(bool);
56
57private slots:
58        void on_treeWidget_itemSelectionChanged();
59        void on_tool_config_clicked();
60        void on_tool_remove_clicked();
61        void on_tool_newsnapshot_clicked();
62
63        void slotRevertToSnapshot(QAction*);
64        void slotBrowseSnapshot(QAction*);
65        void slotAddDataset(QAction*);
66
67        void on_actionClose_triggered();
68        void on_actionKeyNew_triggered();
69        void on_actionKeyCopy_triggered();
70
71protected:
72        void closeEvent(QCloseEvent*);
73
74};
75#endif
Note: See TracBrowser for help on using the repository browser.