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

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

Add a new button to the life-preserver for creating a snapshot right then

  • 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
55private slots:
56        void on_treeWidget_itemSelectionChanged();
57        void on_tool_config_clicked();
58        void on_tool_remove_clicked();
59        void on_tool_newsnapshot_clicked();
60
61        void slotRevertToSnapshot(QAction*);
62        void slotBrowseSnapshot(QAction*);
63        void slotAddDataset(QAction*);
64
65        void on_actionClose_triggered();
66        void on_actionKeyNew_triggered();
67        void on_actionKeyCopy_triggered();
68
69protected:
70        void closeEvent(QCloseEvent*);
71
72};
73#endif
Note: See TracBrowser for help on using the repository browser.