Skip to content
Browse files

Add the beginnings of a new Life Preserver main GUI (LPMain)

  • Loading branch information...
1 parent 04144d6 commit e9760d0ec00b6c2449dde529e204eab7b0ede12b @beanpole135 beanpole135 committed
View
27 src-qt4/life-preserver/LPMain.h
@@ -0,0 +1,27 @@
+#ifndef _LP_MAIN_H
+#define _LP_MAIN_H
+
+#include <QMainWindow>
+#include <QComboBox>
+#include <QToolButton>
+#include <QLabel>
+#include <QString>
+#include <QStringList>
+
+namespace UI{
+ class LPMain;
+};
+
+class LPMain : public QMainWindow{
+ Q_OBJECT
+public:
+
+private:
+
+private slots:
+
+protected:
+
+};
+
+#endif
View
423 src-qt4/life-preserver/LPMain.ui
@@ -0,0 +1,423 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>LPMain</class>
+ <widget class="QMainWindow" name="LPMain">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>380</width>
+ <height>231</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>Life Preserver</string>
+ </property>
+ <widget class="QWidget" name="centralwidget">
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <item>
+ <widget class="QComboBox" name="combo_pools">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="horizontalSpacer">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Minimum</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QToolButton" name="tool_configure">
+ <property name="text">
+ <string>Configure</string>
+ </property>
+ <property name="icon">
+ <iconset resource="lPreserve.qrc">
+ <normaloff>:/images/configure.png</normaloff>:/images/configure.png</iconset>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QToolButton" name="tool_configBackups">
+ <property name="text">
+ <string>...</string>
+ </property>
+ <property name="icon">
+ <iconset resource="lPreserve.qrc">
+ <normaloff>:/images/drive-removable-media.png</normaloff>:/images/drive-removable-media.png</iconset>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <widget class="QTabWidget" name="tabWidget">
+ <property name="currentIndex">
+ <number>0</number>
+ </property>
+ <widget class="QWidget" name="tab_status">
+ <attribute name="title">
+ <string>Status</string>
+ </attribute>
+ <layout class="QFormLayout" name="formLayout">
+ <item row="0" column="0">
+ <widget class="QLabel" name="label">
+ <property name="font">
+ <font>
+ <weight>75</weight>
+ <bold>true</bold>
+ </font>
+ </property>
+ <property name="text">
+ <string>System State:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QLabel" name="label_status">
+ <property name="text">
+ <string notr="true">GOOD</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="QLabel" name="label_2">
+ <property name="font">
+ <font>
+ <weight>75</weight>
+ <bold>true</bold>
+ </font>
+ </property>
+ <property name="text">
+ <string>Number of Disks:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="QLabel" name="label_numdisks">
+ <property name="text">
+ <string notr="true">1</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0">
+ <widget class="QLabel" name="label_3">
+ <property name="font">
+ <font>
+ <weight>75</weight>
+ <bold>true</bold>
+ </font>
+ </property>
+ <property name="text">
+ <string>Safety Level:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1">
+ <widget class="QLabel" name="label_safety">
+ <property name="text">
+ <string notr="true">None / Mirror / Remote</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <widget class="QWidget" name="tab_restore">
+ <attribute name="title">
+ <string>Restore Data</string>
+ </attribute>
+ <layout class="QVBoxLayout" name="verticalLayout_2">
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_4">
+ <item>
+ <widget class="QComboBox" name="combo_datasets"/>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_2">
+ <item>
+ <widget class="QToolButton" name="tool_prevsnap">
+ <property name="text">
+ <string>Prev</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QSlider" name="slider_snapshots">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="tickPosition">
+ <enum>QSlider::TicksAbove</enum>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QToolButton" name="tool_nextsnap">
+ <property name="text">
+ <string>Next</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <widget class="QLabel" name="label_snapshot">
+ <property name="text">
+ <string notr="true">Selected Snapshot</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_3">
+ <item>
+ <spacer name="horizontalSpacer_2">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QToolButton" name="tool_restoreDir">
+ <property name="text">
+ <string>Restore Dir</string>
+ </property>
+ <property name="icon">
+ <iconset resource="lPreserve.qrc">
+ <normaloff>:/images/folder.png</normaloff>:/images/folder.png</iconset>
+ </property>
+ <property name="toolButtonStyle">
+ <enum>Qt::ToolButtonTextBesideIcon</enum>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QToolButton" name="tool_restoreFile">
+ <property name="text">
+ <string>Restore File</string>
+ </property>
+ <property name="icon">
+ <iconset resource="lPreserve.qrc">
+ <normaloff>:/images/copy.png</normaloff>:/images/copy.png</iconset>
+ </property>
+ <property name="toolButtonStyle">
+ <enum>Qt::ToolButtonTextBesideIcon</enum>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ <zorder></zorder>
+ <zorder></zorder>
+ <zorder>label_snapshot</zorder>
+ </widget>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <widget class="QMenuBar" name="menubar">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>380</width>
+ <height>20</height>
+ </rect>
+ </property>
+ <widget class="QMenu" name="menuFile">
+ <property name="title">
+ <string>File</string>
+ </property>
+ <addaction name="actionManage_Pool"/>
+ <addaction name="actionUnmanage_Pool"/>
+ <addaction name="separator"/>
+ <addaction name="actionSave_Key_to_USB_2"/>
+ <addaction name="separator"/>
+ <addaction name="actionClose_WIndow"/>
+ </widget>
+ <widget class="QMenu" name="menuView">
+ <property name="title">
+ <string>View</string>
+ </property>
+ </widget>
+ <widget class="QMenu" name="menuDisks">
+ <property name="title">
+ <string>Disks</string>
+ </property>
+ <addaction name="actionAdd_Disk"/>
+ <addaction name="actionRemove_Disk"/>
+ <addaction name="separator"/>
+ <addaction name="actionSet_Disk_Offline"/>
+ <addaction name="separator"/>
+ <addaction name="action_startScrub"/>
+ </widget>
+ <widget class="QMenu" name="menuSnapshots">
+ <property name="title">
+ <string>Snapshots</string>
+ </property>
+ <addaction name="actionNew_Snapshot_2"/>
+ <addaction name="actionDelete_Snapshot"/>
+ </widget>
+ <addaction name="menuFile"/>
+ <addaction name="menuView"/>
+ <addaction name="menuDisks"/>
+ <addaction name="menuSnapshots"/>
+ </widget>
+ <widget class="QStatusBar" name="statusbar"/>
+ <action name="actionClose_WIndow">
+ <property name="icon">
+ <iconset resource="lPreserve.qrc">
+ <normaloff>:/images/application-exit.png</normaloff>:/images/application-exit.png</iconset>
+ </property>
+ <property name="text">
+ <string>Close Window</string>
+ </property>
+ </action>
+ <action name="actionAdvanced">
+ <property name="text">
+ <string>Advanced</string>
+ </property>
+ </action>
+ <action name="actionBasic">
+ <property name="text">
+ <string>Basic</string>
+ </property>
+ </action>
+ <action name="actionManage_Pool">
+ <property name="icon">
+ <iconset resource="lPreserve.qrc">
+ <normaloff>:/images/list-add.png</normaloff>:/images/list-add.png</iconset>
+ </property>
+ <property name="text">
+ <string>Manage Pool</string>
+ </property>
+ </action>
+ <action name="actionUnmanage_Pool">
+ <property name="icon">
+ <iconset resource="lPreserve.qrc">
+ <normaloff>:/images/list-remove.png</normaloff>:/images/list-remove.png</iconset>
+ </property>
+ <property name="text">
+ <string>Unmanage Pool</string>
+ </property>
+ </action>
+ <action name="actionRecover_File">
+ <property name="text">
+ <string>Recover File</string>
+ </property>
+ </action>
+ <action name="actionRestore_Dataset">
+ <property name="text">
+ <string>Restore Dataset</string>
+ </property>
+ </action>
+ <action name="actionSave_Key_to_USB">
+ <property name="text">
+ <string>Save Key to USB</string>
+ </property>
+ </action>
+ <action name="actionAdd_Disk">
+ <property name="icon">
+ <iconset resource="lPreserve.qrc">
+ <normaloff>:/images/list-add.png</normaloff>:/images/list-add.png</iconset>
+ </property>
+ <property name="text">
+ <string>Add Disk</string>
+ </property>
+ </action>
+ <action name="actionRemove_Disk">
+ <property name="icon">
+ <iconset resource="lPreserve.qrc">
+ <normaloff>:/images/list-remove.png</normaloff>:/images/list-remove.png</iconset>
+ </property>
+ <property name="text">
+ <string>Remove Disk</string>
+ </property>
+ </action>
+ <action name="actionSet_Disk_Offline">
+ <property name="icon">
+ <iconset resource="lPreserve.qrc">
+ <normaloff>:/images/network-wired.png</normaloff>:/images/network-wired.png</iconset>
+ </property>
+ <property name="text">
+ <string>Set Disk Offline</string>
+ </property>
+ </action>
+ <action name="actionNew_Snapshot">
+ <property name="text">
+ <string>New Snapshot</string>
+ </property>
+ </action>
+ <action name="actionNew_Snapshot_2">
+ <property name="icon">
+ <iconset resource="lPreserve.qrc">
+ <normaloff>:/images/camera_add.png</normaloff>:/images/camera_add.png</iconset>
+ </property>
+ <property name="text">
+ <string>New Snapshot</string>
+ </property>
+ </action>
+ <action name="actionDelete_Snapshot">
+ <property name="icon">
+ <iconset resource="lPreserve.qrc">
+ <normaloff>:/images/list-remove.png</normaloff>:/images/list-remove.png</iconset>
+ </property>
+ <property name="text">
+ <string>Delete Snapshot</string>
+ </property>
+ </action>
+ <action name="actionSave_Key_to_USB_2">
+ <property name="icon">
+ <iconset resource="lPreserve.qrc">
+ <normaloff>:/images/key.png</normaloff>:/images/key.png</iconset>
+ </property>
+ <property name="text">
+ <string>Save Key to USB</string>
+ </property>
+ </action>
+ <action name="action_startScrub">
+ <property name="icon">
+ <iconset resource="lPreserve.qrc">
+ <normaloff>:/images/system-run.png</normaloff>:/images/system-run.png</iconset>
+ </property>
+ <property name="text">
+ <string>Start Scrub</string>
+ </property>
+ <property name="statusTip">
+ <string>Check system data integrity</string>
+ </property>
+ </action>
+ </widget>
+ <resources>
+ <include location="lPreserve.qrc"/>
+ </resources>
+ <connections/>
+</ui>
View
1 src-qt4/life-preserver/LPTray.cpp
@@ -2,7 +2,6 @@
//PUBLIC
LPTray::LPTray() : QSystemTrayIcon(){
- //initPhase = true; //flag that we are in the startup process
//Start up the log file watcher and connect the signals/slots
watcher = new LPWatcher();
connect(watcher,SIGNAL(MessageAvailable(QString)),this,SLOT(watcherMessage(QString)) );
View
6 src-qt4/life-preserver/LPTray.h
@@ -3,12 +3,7 @@
#include <QSystemTrayIcon>
#include <QMenu>
-//#include <QFileSystemWatcher>
#include <QString>
-//#include <QTimer>
-//#include <QProcess>
-//#include <QFile>
-//#include <QTextStream>
#include <QMessageBox>
#include "mainUI.h"
@@ -24,7 +19,6 @@ class LPTray : public QSystemTrayIcon{
LPWatcher *watcher;
QMenu *menu;
mainUI *GUI;
- //bool initPhase;
void updateTrayIcon();

0 comments on commit e9760d0

Please sign in to comment.
Something went wrong with that request. Please try again.