[PC-BSD Commits] r4680 - in pcbsd/trunk/lifePreserver: . scripts

svn at pcbsd.org svn at pcbsd.org
Mon Oct 19 09:26:26 PDT 2009


Author: kris
Date: 2009-10-19 09:26:26 -0700 (Mon, 19 Oct 2009)
New Revision: 4680

Added:
   pcbsd/trunk/lifePreserver/scripts/
   pcbsd/trunk/lifePreserver/scripts/setup-ssh-keys.sh
Modified:
   pcbsd/trunk/lifePreserver/lPreserve.pro
   pcbsd/trunk/lifePreserver/lifePreserverWizard.cpp
   pcbsd/trunk/lifePreserver/lifePreserverWizard.h
   pcbsd/trunk/lifePreserver/lifePreserverWizard.ui
Log:

Updated the life-perserver, started adding scripts for SSH keygen / auth setup, ready to begin
GUI backup stuff



Modified: pcbsd/trunk/lifePreserver/lPreserve.pro
===================================================================
--- pcbsd/trunk/lifePreserver/lPreserve.pro	2009-10-19 16:00:13 UTC (rev 4679)
+++ pcbsd/trunk/lifePreserver/lPreserve.pro	2009-10-19 16:26:26 UTC (rev 4680)
@@ -13,8 +13,6 @@
 
 FORMS	= lifePreserverMain.ui lifePreserverWizard.ui
 
-TARGET  = life-preserver
-
 #DESTDIR = /usr/local/kde4/bin
 
 TRANSLATIONS = LifePreserver_en_US.ts 
@@ -23,4 +21,11 @@
 
 INCLUDEPATH     += /usr/PCBSD/includes /usr/local/kde4/include
 
+TARGET=/usr/PCBSD/lifePreserver/bin/life-preserver
+
+scripts.path=/usr/PCBSD/lifePreserver/scripts
+scripts.files=scripts/setup-ssh-keys.sh
+
+INSTALLS += scripts
+
 QMAKE_LIBDIR = /usr/local/kde4/lib /usr/local/lib/qt4 /usr/local/lib

Modified: pcbsd/trunk/lifePreserver/lifePreserverWizard.cpp
===================================================================
--- pcbsd/trunk/lifePreserver/lifePreserverWizard.cpp	2009-10-19 16:00:13 UTC (rev 4679)
+++ pcbsd/trunk/lifePreserver/lifePreserverWizard.cpp	2009-10-19 16:26:26 UTC (rev 4680)
@@ -34,9 +34,6 @@
 #include "lifePreserverWizard.h"
 
 /* KDE */
-#include <solid/devicenotifier.h>
-#include <solid/device.h>
-#include <solid/storagedrive.h>
 
 
 void lifePreserverWizard::widgetInit()
@@ -44,28 +41,13 @@
    qDebug("Starting wizard...");
    setWindowModality ( Qt::WindowModal );
 
-   // Read our list of solid devices
-   foreach (Solid::Device device, Solid::Device::listFromType(Solid::DeviceInterface::StorageDrive, QString()))
-   {
-     Solid::StorageDrive *devint = device.as<Solid::StorageDrive>();
-     if ( devint->driveType() == Solid::StorageDrive::HardDisk || devint->driveType() == Solid::StorageDrive::MemoryStick)
-     comboDeviceSelect->addItem(device.product() + device.vendor() );
-   }
-
    // Connect our slots for complete status checking
    connect(this,SIGNAL(currentIdChanged(int)),this,SLOT(slotCheckComplete()));
-   connect(radioSpecifyMount,SIGNAL(clicked()),this,SLOT(slotCheckComplete()));
-   connect(radioSelectDevice,SIGNAL(clicked()),this,SLOT(slotCheckComplete()));
    connect(radioDisable,SIGNAL(clicked()),this,SLOT(slotCheckComplete()));
    connect(radioDaily,SIGNAL(clicked()),this,SLOT(slotCheckComplete()));
    connect(radioWeekly,SIGNAL(clicked()),this,SLOT(slotCheckComplete()));
-   connect(lineMountPoint,SIGNAL(textChanged(const QString)),this,SLOT(slotCheckComplete()));
    connect(lineHostName,SIGNAL(textChanged(const QString)),this,SLOT(slotCheckComplete()));
    connect(lineUserName,SIGNAL(textChanged(const QString)),this,SLOT(slotCheckComplete()));
-   connect(lineKeyFile,SIGNAL(textChanged(const QString)),this,SLOT(slotCheckComplete()));
-
-   // Slot to bring up the file dialog for the SSH key
-   connect(pushSelectNetKey,SIGNAL(clicked()),this,SLOT(slotSelectKeyFile()));
 }
 
 // Logic checks to see if we are ready to move onto next page
@@ -76,23 +58,6 @@
      case Page_Intro:
          button(QWizard::NextButton)->setEnabled(true);
          return true;
-     case Page_SelType:
-         button(QWizard::NextButton)->setEnabled(true);
-         return true;
-     case Page_LocalDev:
-          // check if we have a mount point specified or a device
-          if (radioSpecifyMount->isChecked()) {
-             if ( lineMountPoint->text().isEmpty() ) {
-               button(QWizard::NextButton)->setEnabled(false);
-               return false;
-             } else {
-               button(QWizard::NextButton)->setEnabled(true);
-               return true;
-             }
-          } else {
-            button(QWizard::NextButton)->setEnabled(true);
-            return true;
-          }
      case Page_RemoteDev:
          if ( lineHostName->text().isEmpty() ) {
            button(QWizard::NextButton)->setEnabled(false);
@@ -102,10 +67,6 @@
            button(QWizard::NextButton)->setEnabled(false);
            return true;
          }
-         if ( lineKeyFile->text().isEmpty() ) {
-           button(QWizard::NextButton)->setEnabled(false);
-           return true;
-         }
          // if we get this far, all the fields are filled in
          button(QWizard::NextButton)->setEnabled(true);
          return true;
@@ -148,30 +109,14 @@
    }
 }
 
-void lifePreserverWizard::slotSelectKeyFile()
-{
-  QString fileName = QFileDialog::getOpenFileName(this,
-     tr("Open Key File"), "/home", tr("Key Files (*.key *.ssh *.lpk)"));
-  if ( ! fileName.isEmpty() )
-  {
-    lineKeyFile->setText(fileName); 
-  }
-}
-
 int lifePreserverWizard::nextId() const
 {
    switch (currentId()) {
      case Page_Intro:
-         return Page_SelType;
-     case Page_SelType:
-         if (radioLocalDevice->isChecked()) {
-            return Page_LocalDev;
-         } else {
-            return Page_RemoteDev;
-         }
-     case Page_LocalDev:
-         return Page_Finished;
+         return Page_RemoteDev;
      case Page_RemoteDev:
+         return Page_Schedule;
+     case Page_Schedule:
          return Page_Finished;
      case Page_Finished:
          return -1;

Modified: pcbsd/trunk/lifePreserver/lifePreserverWizard.h
===================================================================
--- pcbsd/trunk/lifePreserver/lifePreserverWizard.h	2009-10-19 16:00:13 UTC (rev 4679)
+++ pcbsd/trunk/lifePreserver/lifePreserverWizard.h	2009-10-19 16:26:26 UTC (rev 4680)
@@ -29,11 +29,9 @@
 private slots:
    virtual int nextId() const;
    virtual void slotCheckComplete();
-   virtual void slotSelectKeyFile();
 
 private:
-    enum { Page_Intro, Page_SelType, Page_LocalDev, Page_RemoteDev,
-            Page_Finished };
+    enum { Page_Intro, Page_RemoteDev, Page_Schedule, Page_Finished };
     bool validatePage();
 
 signals:

Modified: pcbsd/trunk/lifePreserver/lifePreserverWizard.ui
===================================================================
--- pcbsd/trunk/lifePreserver/lifePreserverWizard.ui	2009-10-19 16:00:13 UTC (rev 4679)
+++ pcbsd/trunk/lifePreserver/lifePreserverWizard.ui	2009-10-19 16:26:26 UTC (rev 4680)
@@ -13,12 +13,16 @@
   <property name="windowTitle">
    <string>Add new Life Preserver</string>
   </property>
+  <property name="windowIcon">
+   <iconset resource="lPreserve.qrc">
+    <normaloff>:/images/images/lifepreserver.png</normaloff>:/images/images/lifepreserver.png</iconset>
+  </property>
   <widget class="QWizardPage" name="wizardPage1">
    <layout class="QGridLayout" name="gridLayout">
     <item row="0" column="0">
      <widget class="QLabel" name="label">
       <property name="text">
-       <string>This wizard will walk you through the process of setting up a new Life Preserver for a local or remote storage device. If you will be connecting to a local device, make sure it is plugged in now.</string>
+       <string>This wizard will walk you through the process of setting up a new Life Preserver backup on a remote storage device.</string>
       </property>
       <property name="wordWrap">
        <bool>true</bool>
@@ -50,235 +54,6 @@
     </item>
    </layout>
   </widget>
-  <widget class="QWizardPage" name="wizardPage2">
-   <layout class="QVBoxLayout" name="verticalLayout">
-    <item>
-     <widget class="QLabel" name="label_3">
-      <property name="text">
-       <string>Is this life preserver local or remote?</string>
-      </property>
-     </widget>
-    </item>
-    <item>
-     <widget class="QGroupBox" name="groupBox">
-      <property name="sizePolicy">
-       <sizepolicy hsizetype="Preferred" vsizetype="Expanding">
-        <horstretch>0</horstretch>
-        <verstretch>0</verstretch>
-       </sizepolicy>
-      </property>
-      <property name="title">
-       <string>Storage Type</string>
-      </property>
-      <layout class="QVBoxLayout" name="verticalLayout_2">
-       <item>
-        <widget class="QRadioButton" name="radioLocalDevice">
-         <property name="text">
-          <string>Local Device</string>
-         </property>
-         <property name="icon">
-          <iconset resource="lPreserve.qrc">
-           <normaloff>:/images/images/drive-removable-media.png</normaloff>:/images/images/drive-removable-media.png</iconset>
-         </property>
-         <property name="iconSize">
-          <size>
-           <width>32</width>
-           <height>32</height>
-          </size>
-         </property>
-         <property name="checked">
-          <bool>true</bool>
-         </property>
-        </widget>
-       </item>
-       <item>
-        <spacer name="verticalSpacer_2">
-         <property name="orientation">
-          <enum>Qt::Vertical</enum>
-         </property>
-         <property name="sizeType">
-          <enum>QSizePolicy::Fixed</enum>
-         </property>
-         <property name="sizeHint" stdset="0">
-          <size>
-           <width>38</width>
-           <height>25</height>
-          </size>
-         </property>
-        </spacer>
-       </item>
-       <item>
-        <widget class="QRadioButton" name="radioRemoteServer">
-         <property name="text">
-          <string>Remote Server</string>
-         </property>
-         <property name="icon">
-          <iconset resource="lPreserve.qrc">
-           <normaloff>:/images/images/network-wired.png</normaloff>:/images/images/network-wired.png</iconset>
-         </property>
-         <property name="iconSize">
-          <size>
-           <width>32</width>
-           <height>32</height>
-          </size>
-         </property>
-        </widget>
-       </item>
-      </layout>
-     </widget>
-    </item>
-   </layout>
-  </widget>
-  <widget class="QWizardPage" name="wizardPage">
-   <layout class="QGridLayout" name="gridLayout_3">
-    <item row="0" column="0">
-     <layout class="QHBoxLayout" name="horizontalLayout_2">
-      <item>
-       <spacer name="horizontalSpacer">
-        <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>
-       <layout class="QHBoxLayout" name="horizontalLayout">
-        <item>
-         <widget class="QLabel" name="label_5">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-          <property name="maximumSize">
-           <size>
-            <width>64</width>
-            <height>64</height>
-           </size>
-          </property>
-          <property name="text">
-           <string/>
-          </property>
-          <property name="pixmap">
-           <pixmap resource="lPreserve.qrc">:/images/images/drive-removable-media.png</pixmap>
-          </property>
-         </widget>
-        </item>
-        <item>
-         <widget class="QLabel" name="label_4">
-          <property name="text">
-           <string>Local Device</string>
-          </property>
-          <property name="alignment">
-           <set>Qt::AlignCenter</set>
-          </property>
-         </widget>
-        </item>
-       </layout>
-      </item>
-      <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>
-     </layout>
-    </item>
-    <item row="1" column="0">
-     <widget class="QGroupBox" name="groupBox_2">
-      <property name="title">
-       <string>Select Device</string>
-      </property>
-      <layout class="QGridLayout" name="gridLayout_2">
-       <item row="0" column="0">
-        <layout class="QHBoxLayout" name="horizontalLayout_3">
-         <item>
-          <widget class="QRadioButton" name="radioSelectDevice">
-           <property name="text">
-            <string/>
-           </property>
-           <property name="checked">
-            <bool>true</bool>
-           </property>
-          </widget>
-         </item>
-         <item>
-          <widget class="QComboBox" name="comboDeviceSelect">
-           <property name="sizePolicy">
-            <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
-             <horstretch>0</horstretch>
-             <verstretch>0</verstretch>
-            </sizepolicy>
-           </property>
-          </widget>
-         </item>
-        </layout>
-       </item>
-       <item row="1" column="0">
-        <widget class="QLabel" name="label_6">
-         <property name="text">
-          <string>Specify mount point</string>
-         </property>
-         <property name="alignment">
-          <set>Qt::AlignCenter</set>
-         </property>
-        </widget>
-       </item>
-       <item row="2" column="0">
-        <layout class="QHBoxLayout" name="horizontalLayout_4">
-         <item>
-          <widget class="QRadioButton" name="radioSpecifyMount">
-           <property name="text">
-            <string/>
-           </property>
-          </widget>
-         </item>
-         <item>
-          <widget class="QLineEdit" name="lineMountPoint"/>
-         </item>
-         <item>
-          <widget class="QPushButton" name="pushSelectMount">
-           <property name="sizePolicy">
-            <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
-             <horstretch>0</horstretch>
-             <verstretch>0</verstretch>
-            </sizepolicy>
-           </property>
-           <property name="maximumSize">
-            <size>
-             <width>32</width>
-             <height>32</height>
-            </size>
-           </property>
-           <property name="text">
-            <string/>
-           </property>
-           <property name="icon">
-            <iconset resource="lPreserve.qrc">
-             <normaloff>:/images/images/folder.png</normaloff>:/images/images/folder.png</iconset>
-           </property>
-          </widget>
-         </item>
-        </layout>
-       </item>
-      </layout>
-     </widget>
-    </item>
-   </layout>
-  </widget>
   <widget class="QWizardPage" name="wizardPage_3">
    <layout class="QGridLayout" name="gridLayout_5">
     <item row="0" column="0">
@@ -381,47 +156,6 @@
          </item>
         </layout>
        </item>
-       <item row="2" column="0">
-        <layout class="QHBoxLayout" name="horizontalLayout_9">
-         <item>
-          <widget class="QLabel" name="label_11">
-           <property name="text">
-            <string>Key File</string>
-           </property>
-          </widget>
-         </item>
-         <item>
-          <widget class="QLineEdit" name="lineKeyFile">
-           <property name="readOnly">
-            <bool>true</bool>
-           </property>
-          </widget>
-         </item>
-         <item>
-          <widget class="QPushButton" name="pushSelectNetKey">
-           <property name="sizePolicy">
-            <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
-             <horstretch>0</horstretch>
-             <verstretch>0</verstretch>
-            </sizepolicy>
-           </property>
-           <property name="maximumSize">
-            <size>
-             <width>32</width>
-             <height>32</height>
-            </size>
-           </property>
-           <property name="text">
-            <string/>
-           </property>
-           <property name="icon">
-            <iconset resource="lPreserve.qrc">
-             <normaloff>:/images/images/folder.png</normaloff>:/images/images/folder.png</iconset>
-           </property>
-          </widget>
-         </item>
-        </layout>
-       </item>
       </layout>
      </widget>
     </item>
@@ -432,7 +166,7 @@
     <item row="0" column="0">
      <widget class="QGroupBox" name="groupBox_4">
       <property name="title">
-       <string>Preserver Settings</string>
+       <string>Scheduled Backups</string>
       </property>
       <layout class="QGridLayout" name="gridLayout_8">
        <item row="0" column="0">
@@ -659,6 +393,33 @@
     </item>
    </layout>
   </widget>
+  <widget class="QWizardPage" name="wizardPage_4">
+   <layout class="QGridLayout" name="gridLayout_2">
+    <item row="0" column="0">
+     <widget class="QLabel" name="label_3">
+      <property name="text">
+       <string>You are now ready to setup the connection to your remote backup server. When you click finish, a window will popup to setup your secure backup connection. You will need to enter the password for the server.</string>
+      </property>
+      <property name="wordWrap">
+       <bool>true</bool>
+      </property>
+     </widget>
+    </item>
+    <item row="1" column="0">
+     <spacer name="verticalSpacer_2">
+      <property name="orientation">
+       <enum>Qt::Vertical</enum>
+      </property>
+      <property name="sizeHint" stdset="0">
+       <size>
+        <width>20</width>
+        <height>141</height>
+       </size>
+      </property>
+     </spacer>
+    </item>
+   </layout>
+  </widget>
  </widget>
  <resources>
   <include location="lPreserve.qrc"/>


Property changes on: pcbsd/trunk/lifePreserver/scripts/setup-ssh-keys.sh
___________________________________________________________________
Added: svn:executable
   + *



More information about the Commits mailing list