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

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

Replace old life-preserver utility with our new one which uses ZFS snapshots / replication

  • Property mode set to 100644
File size: 1.3 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
14#include "LPBackend.h"
15#include "LPWizard.h"
16#include "LPContainers.h"
17#include "LPConfig.h"
18
19//TERMINOLOGY NOTE: DS=DataSet, SNAP=Snapshot
20
21namespace Ui {
22    class mainUI;
23}
24
25class mainUI : public QMainWindow{
26        Q_OBJECT
27       
28public:
29        explicit mainUI(QWidget* parent = 0);
30        ~mainUI();
31        void setupUI();
32
33        void updateDisplay(); //for the tray to call it as necessary
34
35private:
36        Ui::mainUI *ui;
37        QHash<QString,LPDataset> HLIST;
38        QStringList RLIST; //datasets that have replication enabled
39        QStringList SLIST; //available datasets on the system
40        QStringList CLIST; //current status for all datasets
41        QMenu *revMenu, *brMenu, *addMenu; //revert/browse menu's
42
43        void updateHash(QString ds="");
44        void updateUI();
45        void updateMenus();
46        QString getSelectedDS();
47        LPDataset newDataset(QString);
48
49private slots:
50        void on_treeWidget_itemSelectionChanged();
51        void on_tool_config_clicked();
52        void on_tool_remove_clicked();
53
54        void slotRevertToSnapshot(QAction*);
55        void slotBrowseSnapshot(QAction*);
56        void slotAddDataset(QAction*);
57
58        void on_actionClose_triggered();
59
60protected:
61        void closeEvent(QCloseEvent*);
62
63};
64#endif
Note: See TracBrowser for help on using the repository browser.