]> git.sur5r.net Git - bacula/bacula/commitdiff
Moved dialogs to be pages on the stack. label, run and runcmd.
authorDirk H Bartley <dbartley@schupan.com>
Sun, 6 May 2007 13:27:14 +0000 (13:27 +0000)
committerDirk H Bartley <dbartley@schupan.com>
Sun, 6 May 2007 13:27:14 +0000 (13:27 +0000)
All still have buttons and show up in the page selector as a direct descendent
of the director widget.

git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@4711 91ce42f0-d328-0410-95d8-f526ca767f89

19 files changed:
bacula/src/qt-console/TODO
bacula/src/qt-console/console/console.cpp
bacula/src/qt-console/label/label.cpp
bacula/src/qt-console/label/label.h
bacula/src/qt-console/label/label.ui
bacula/src/qt-console/mainwin.cpp
bacula/src/qt-console/mainwin.h
bacula/src/qt-console/pages.cpp
bacula/src/qt-console/restore/prerestore.cpp
bacula/src/qt-console/restore/prerestore.ui
bacula/src/qt-console/restore/restore.cpp
bacula/src/qt-console/restore/restore.h
bacula/src/qt-console/restore/restore.ui
bacula/src/qt-console/run/run.cpp
bacula/src/qt-console/run/run.h
bacula/src/qt-console/run/run.ui
bacula/src/qt-console/run/runcmd.cpp
bacula/src/qt-console/run/runcmd.ui
bacula/src/qt-console/storage/storage.cpp

index 09334799d012b125ebb3c343fe1b1c661f408b70..07027166ef7b5cd9f8e13f2c8ea546b3df6be6f5 100644 (file)
@@ -1,5 +1,7 @@
 dhb
 ====================================================
+Test left pane of restore with 2 windows drives in one backup job.
+
 Color code Media Red->Error Append->green Full/Used->Yellow
 
 Resolve issue of connection during restore selection.  Could go with preempt of
index a1d7b27afffff8dde77df95707fd2a45391d75c9..94d4cffc960ea1562b5edc351866ae2a9eba4a44 100644 (file)
@@ -575,7 +575,7 @@ int Console::read()
          new selectDialog(this);    
          break;
       case BNET_RUN_CMD:
-         new runCmdDialog(this);
+         new runCmdPage();
          break;
       case BNET_ERROR_MSG:
          m_sock->recv();              /* get the message */
index 9f5556c8c742fcd20864d8b89e67f4f9b1a8fa9f..6185c5ba6216984368371c62d6382a7ab1ab4dc9 100644 (file)
@@ -27,7 +27,7 @@
 */
  
 /*
- *  Label Dialog class
+ *  Label Page class
  *
  *   Kern Sibbald, February MMVII
  *
 #include "label.h"
 #include <QMessageBox>
 
-labelDialog::labelDialog(Console *console)
+labelPage::labelPage()
 {
    QString deflt("");
-   showDialog(console, deflt);
+   m_closeable = false;
+   showPage(deflt);
 }
 
 /*
  * An overload of the constructor to have a default storage show in the
  * combobox on start.  Used from context sensitive in storage class.
  */
-labelDialog::labelDialog(Console *console, QString &defString)
+labelPage::labelPage(QString &defString)
 {
-   showDialog(console, defString);
+   m_closeable = true;
+   showPage(defString);
 }
 
 /*
  * moved the constructor code here for the overload.
  */
-void labelDialog::showDialog(Console *console, QString &defString)
+void labelPage::showPage(QString &defString)
 {
-   m_console = console;
-   m_console->notify(false);
+   m_name = "Label";
+   pgInitialize();
    setupUi(this);
-   storageCombo->addItems(console->storage_list);
+   m_console->notify(false);
+
+   storageCombo->addItems(m_console->storage_list);
    int index = storageCombo->findText(defString, Qt::MatchExactly);
    if (index != -1) {
       storageCombo->setCurrentIndex(index);
    }
-   poolCombo->addItems(console->pool_list);
+   poolCombo->addItems(m_console->pool_list);
+   connect(okButton, SIGNAL(pressed()), this, SLOT(okButtonPushed()));
+   connect(cancelButton, SIGNAL(pressed()), this, SLOT(cancelButtonPushed()));
+   dockPage();
+   setCurrent();
    this->show();
 }
 
 
-void labelDialog::accept()
+void labelPage::okButtonPushed()
 {
    QString scmd;
    if (volumeName->text().toUtf8().data()[0] == 0) {
@@ -89,14 +97,14 @@ void labelDialog::accept()
    m_console->write_dir(scmd.toUtf8().data());
    m_console->displayToPrompt();
    m_console->notify(true);
-   delete this;
+   closeStackPage();
    mainWin->resetFocus();
 }
 
-void labelDialog::reject()
+void labelPage::cancelButtonPushed()
 {
    this->hide();
    m_console->notify(true);
-   delete this;
+   closeStackPage();
    mainWin->resetFocus();
 }
index 533d109a6952576a04840bbea8ac2245385621c6..ac97c8f7fd3ea4a7134d103237f35032b2e5f481 100644 (file)
 #include <QtGui>
 #include "ui_label.h"
 #include "console.h"
+#include "pages.h"
 
-class labelDialog : public QDialog, public Ui::labelForm
+class labelPage : public Pages, public Ui::labelForm
 {
    Q_OBJECT 
 
 public:
-   labelDialog(Console *console);
-   labelDialog(Console *console, QString &defString);
-   void showDialog(Console *console, QString &defString);
+   labelPage();
+   labelPage(QString &defString);
+   void showPage(QString &defString);
 
 private slots:
-   void accept();
-   void reject();
+   void okButtonPushed();
+   void cancelButtonPushed();
 
 private:
-   Console *m_console;
 };
 
 #endif /* _LABEL_H_ */
index a627f5c3760c395b327211e1447b52c78f2104c4..cc245bd9573754b81e7e0abbfeb916f22c82797b 100644 (file)
@@ -1,80 +1,25 @@
 <ui version="4.0" >
  <class>labelForm</class>
- <widget class="QDialog" name="labelForm" >
-  <property name="windowModality" >
-   <enum>Qt::WindowModal</enum>
-  </property>
+ <widget class="QWidget" name="labelForm" >
   <property name="geometry" >
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>400</width>
-    <height>300</height>
+    <width>498</width>
+    <height>308</height>
    </rect>
   </property>
   <property name="windowTitle" >
-   <string>Label</string>
+   <string>Form</string>
   </property>
-  <layout class="QVBoxLayout" >
+  <layout class="QGridLayout" >
    <property name="margin" >
     <number>9</number>
    </property>
    <property name="spacing" >
     <number>6</number>
    </property>
-   <item>
-    <layout class="QHBoxLayout" >
-     <property name="margin" >
-      <number>0</number>
-     </property>
-     <property name="spacing" >
-      <number>6</number>
-     </property>
-     <item>
-      <spacer>
-       <property name="orientation" >
-        <enum>Qt::Horizontal</enum>
-       </property>
-       <property name="sizeHint" >
-        <size>
-         <width>71</width>
-         <height>21</height>
-        </size>
-       </property>
-      </spacer>
-     </item>
-     <item>
-      <widget class="QLabel" name="label" >
-       <property name="maximumSize" >
-        <size>
-         <width>16777215</width>
-         <height>30</height>
-        </size>
-       </property>
-       <property name="text" >
-        <string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
-p, li { white-space: pre-wrap; }
-&lt;/style>&lt;/head>&lt;body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;">
-&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;span style=" font-size:12pt; font-weight:600;">Label a Volume&lt;/span>&lt;/p>&lt;/body>&lt;/html></string>
-       </property>
-      </widget>
-     </item>
-     <item>
-      <spacer>
-       <property name="orientation" >
-        <enum>Qt::Horizontal</enum>
-       </property>
-       <property name="sizeHint" >
-        <size>
-         <width>81</width>
-         <height>20</height>
-        </size>
-       </property>
-      </spacer>
-     </item>
-    </layout>
-   </item>
-   <item>
+   <item row="0" column="1" >
     <spacer>
      <property name="orientation" >
       <enum>Qt::Vertical</enum>
@@ -84,13 +29,26 @@ p, li { white-space: pre-wrap; }
      </property>
      <property name="sizeHint" >
       <size>
-       <width>20</width>
-       <height>10</height>
+       <width>351</width>
+       <height>20</height>
       </size>
      </property>
     </spacer>
    </item>
-   <item>
+   <item row="1" column="2" >
+    <spacer>
+     <property name="orientation" >
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <property name="sizeHint" >
+      <size>
+       <width>40</width>
+       <height>131</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+   <item row="1" column="1" >
     <layout class="QGridLayout" >
      <property name="margin" >
       <number>0</number>
@@ -98,34 +56,126 @@ p, li { white-space: pre-wrap; }
      <property name="spacing" >
       <number>6</number>
      </property>
-     <item row="3" column="1" >
+     <item row="4" column="1" >
       <widget class="QSpinBox" name="slotSpin" >
        <property name="maximum" >
         <number>10000</number>
        </property>
       </widget>
      </item>
+     <item row="5" column="0" colspan="2" >
+      <layout class="QHBoxLayout" >
+       <property name="margin" >
+        <number>0</number>
+       </property>
+       <property name="spacing" >
+        <number>6</number>
+       </property>
+       <item>
+        <spacer>
+         <property name="orientation" >
+          <enum>Qt::Horizontal</enum>
+         </property>
+         <property name="sizeHint" >
+          <size>
+           <width>40</width>
+           <height>20</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+       <item>
+        <widget class="QPushButton" name="okButton" >
+         <property name="text" >
+          <string>OK</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QPushButton" name="cancelButton" >
+         <property name="text" >
+          <string>Cancel</string>
+         </property>
+        </widget>
+       </item>
+      </layout>
+     </item>
+     <item row="0" column="0" colspan="2" >
+      <layout class="QHBoxLayout" >
+       <property name="margin" >
+        <number>0</number>
+       </property>
+       <property name="spacing" >
+        <number>6</number>
+       </property>
+       <item>
+        <spacer>
+         <property name="orientation" >
+          <enum>Qt::Horizontal</enum>
+         </property>
+         <property name="sizeHint" >
+          <size>
+           <width>71</width>
+           <height>21</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+       <item>
+        <widget class="QLabel" name="label" >
+         <property name="maximumSize" >
+          <size>
+           <width>16777215</width>
+           <height>30</height>
+          </size>
+         </property>
+         <property name="text" >
+          <string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
+p, li { white-space: pre-wrap; }
+&lt;/style>&lt;/head>&lt;body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;">
+&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;span style=" font-size:12pt; font-weight:600;">Label a Volume&lt;/span>&lt;/p>&lt;/body>&lt;/html></string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <spacer>
+         <property name="orientation" >
+          <enum>Qt::Horizontal</enum>
+         </property>
+         <property name="sizeHint" >
+          <size>
+           <width>81</width>
+           <height>20</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+      </layout>
+     </item>
+     <item row="2" column="1" >
+      <widget class="QComboBox" name="poolCombo" />
+     </item>
      <item row="1" column="0" >
-      <widget class="QLabel" name="label_3" >
+      <widget class="QLabel" name="label_2" >
        <property name="text" >
-        <string>Pool:</string>
+        <string>Storage:</string>
        </property>
        <property name="buddy" >
-        <cstring>poolCombo</cstring>
+        <cstring>storageCombo</cstring>
        </property>
       </widget>
      </item>
-     <item row="0" column="0" >
-      <widget class="QLabel" name="label_2" >
+     <item row="4" column="0" >
+      <widget class="QLabel" name="label_4" >
        <property name="text" >
-        <string>Storage:</string>
+        <string>Slot:</string>
        </property>
        <property name="buddy" >
-        <cstring>storageCombo</cstring>
+        <cstring>slotSpin</cstring>
        </property>
       </widget>
      </item>
-     <item row="2" column="1" >
+     <item row="3" column="1" >
       <widget class="QLineEdit" name="volumeName" >
        <property name="minimumSize" >
         <size>
@@ -136,94 +186,61 @@ p, li { white-space: pre-wrap; }
       </widget>
      </item>
      <item row="1" column="1" >
-      <widget class="QComboBox" name="poolCombo" />
+      <widget class="QComboBox" name="storageCombo" />
      </item>
      <item row="2" column="0" >
-      <widget class="QLabel" name="label_5" >
+      <widget class="QLabel" name="label_3" >
        <property name="text" >
-        <string>Volume Name:</string>
+        <string>Pool:</string>
        </property>
        <property name="buddy" >
-        <cstring>volumeName</cstring>
+        <cstring>poolCombo</cstring>
        </property>
       </widget>
      </item>
-     <item row="0" column="1" >
-      <widget class="QComboBox" name="storageCombo" />
-     </item>
      <item row="3" column="0" >
-      <widget class="QLabel" name="label_4" >
+      <widget class="QLabel" name="label_5" >
        <property name="text" >
-        <string>Slot:</string>
+        <string>Volume Name:</string>
        </property>
        <property name="buddy" >
-        <cstring>slotSpin</cstring>
+        <cstring>volumeName</cstring>
        </property>
       </widget>
      </item>
     </layout>
    </item>
-   <item>
+   <item row="1" column="0" >
     <spacer>
      <property name="orientation" >
-      <enum>Qt::Vertical</enum>
-     </property>
-     <property name="sizeType" >
-      <enum>QSizePolicy::Maximum</enum>
+      <enum>Qt::Horizontal</enum>
      </property>
      <property name="sizeHint" >
       <size>
-       <width>21</width>
-       <height>16</height>
+       <width>40</width>
+       <height>121</height>
       </size>
      </property>
     </spacer>
    </item>
-   <item>
-    <widget class="QDialogButtonBox" name="buttonBox" >
+   <item row="2" column="1" >
+    <spacer>
      <property name="orientation" >
-      <enum>Qt::Horizontal</enum>
+      <enum>Qt::Vertical</enum>
      </property>
-     <property name="standardButtons" >
-      <set>QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok</set>
+     <property name="sizeType" >
+      <enum>QSizePolicy::Maximum</enum>
      </property>
-    </widget>
+     <property name="sizeHint" >
+      <size>
+       <width>331</width>
+       <height>20</height>
+      </size>
+     </property>
+    </spacer>
    </item>
   </layout>
  </widget>
  <resources/>
- <connections>
-  <connection>
-   <sender>buttonBox</sender>
-   <signal>accepted()</signal>
-   <receiver>labelForm</receiver>
-   <slot>accept()</slot>
-   <hints>
-    <hint type="sourcelabel" >
-     <x>248</x>
-     <y>254</y>
-    </hint>
-    <hint type="destinationlabel" >
-     <x>157</x>
-     <y>274</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>buttonBox</sender>
-   <signal>rejected()</signal>
-   <receiver>labelForm</receiver>
-   <slot>reject()</slot>
-   <hints>
-    <hint type="sourcelabel" >
-     <x>316</x>
-     <y>260</y>
-    </hint>
-    <hint type="destinationlabel" >
-     <x>286</x>
-     <y>274</y>
-    </hint>
-   </hints>
-  </connection>
- </connections>
+ <connections/>
 </ui>
index a11c38a5d371e67ae04321eb4143d786fd82a93f..68e2d81ce24777947e3106b4608d51862465dd2e 100644 (file)
@@ -265,8 +265,8 @@ void MainWin::createConnections()
    connect(stackedWidget, SIGNAL(currentChanged(int)),
            this, SLOT(stackItemChanged(int)));
    connect(actionQuit, SIGNAL(triggered()), app, SLOT(closeAllWindows()));
-   connect(actionLabel, SIGNAL(triggered()), this,  SLOT(labelDialogClicked()));
-   connect(actionRun, SIGNAL(triggered()), this,  SLOT(runDialogClicked()));
+   connect(actionLabel, SIGNAL(triggered()), this,  SLOT(labelButtonClicked()));
+   connect(actionRun, SIGNAL(triggered()), this,  SLOT(runButtonClicked()));
    connect(actionRestore, SIGNAL(triggered()), this,  SLOT(restoreButtonClicked()));
    connect(actionUndock, SIGNAL(triggered()), this,  SLOT(undockWindowButton()));
    connect(actionToggleDock, SIGNAL(triggered()), this,  SLOT(toggleDockContextWindow()));
@@ -431,19 +431,19 @@ void MainWin::treeItemChanged(QTreeWidgetItem *currentitem, QTreeWidgetItem *pre
    }
 }
 
-void MainWin::labelDialogClicked() 
+void MainWin::labelButtonClicked() 
 {
-   new labelDialog(m_currentConsole);
+   new labelPage();
 }
 
-void MainWin::runDialogClicked() 
+void MainWin::runButtonClicked() 
 {
-   new runDialog(m_currentConsole);
+   new runPage();
 }
 
 void MainWin::restoreButtonClicked() 
 {
-   new prerestorePage(m_currentConsole);
+   new prerestorePage();
 }
 
 /*
index 6a659ffc9fae4bf927e3743c9f027286c318456b..19da0df74f76449e12cda68bb2482966bd406b70 100644 (file)
@@ -78,8 +78,8 @@ public slots:
    void input_line();
    void about();
    void treeItemClicked(QTreeWidgetItem *item, int column);
-   void labelDialogClicked();
-   void runDialogClicked();
+   void labelButtonClicked();
+   void runButtonClicked();
    void restoreButtonClicked();
    void undockWindowButton();
    void treeItemChanged(QTreeWidgetItem *, QTreeWidgetItem *);
index efee0781cfb4c9309fe2be85dd6a59f0d1e34cf3..592649e6322cafeffbe918d99ac15cca902f7ce1 100644 (file)
@@ -135,7 +135,7 @@ void Pages::closeEvent(QCloseEvent* event)
 
    /* Set the current tree widget item in the Page Selector window to the item 
     * which represents "this" */
-        setCurrent();
+   setCurrent();
 }
 
 /*
index 43897d769b0e8bcdfb2eac4fb9bb6b0412981892..a1a8423ecb051586f0d29921089180fe59561c9d 100644 (file)
 #include "restore.h"
 
 
-prerestorePage::prerestorePage(Console *console)
+prerestorePage::prerestorePage()
 {
-   console->notify(false);
    m_name = "Pre-Restore";
    setupUi(this);
-   QTreeWidgetItem *parent = mainWin->getFromHash(console);
-   if (!parent) {
-      /* ***FIXME*** */
-      printf("Error retrieving tree widget.");
-      return;
-   }
-   pgInitialize(parent);
+   pgInitialize();
+   m_console->notify(false);
    m_closeable = true;
 
-   jobCombo->addItems(console->job_list);
-   filesetCombo->addItems(console->fileset_list);
-   clientCombo->addItems(console->client_list);
-   poolCombo->addItems(console->pool_list);
-   storageCombo->addItems(console->storage_list);
-   //beforeDateTime->setDate(QDateTime::currentDateTime().toUTC().date());
+   jobCombo->addItems(m_console->job_list);
+   filesetCombo->addItems(m_console->fileset_list);
+   clientCombo->addItems(m_console->client_list);
+   poolCombo->addItems(m_console->pool_list);
+   storageCombo->addItems(m_console->storage_list);
    beforeDateTime->setDateTime(QDateTime::currentDateTime());
    beforeDateTime->setEnabled(false);
    job_name_change(0);
@@ -90,7 +83,7 @@ void prerestorePage::okButtonPushed()
    m_console->write(cmd);
    m_console->display_text(cmd);
    /* Note, do not turn notifier back on here ... */
-   new restorePage(m_console);
+   new restorePage();
    closeStackPage();
 }
 
index 98218744abc94a49ce199ed0369e250c7147cc30..b230563350e35270bd187267e45fca4e207055fe 100644 (file)
@@ -5,8 +5,8 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>561</width>
-    <height>408</height>
+    <width>578</width>
+    <height>406</height>
    </rect>
   </property>
   <property name="windowTitle" >
    <property name="spacing" >
     <number>6</number>
    </property>
-   <item row="3" column="1" >
-    <spacer>
-     <property name="orientation" >
-      <enum>Qt::Vertical</enum>
-     </property>
-     <property name="sizeHint" >
-      <size>
-       <width>20</width>
-       <height>40</height>
-      </size>
-     </property>
-    </spacer>
-   </item>
-   <item row="0" column="1" >
-    <spacer>
-     <property name="orientation" >
-      <enum>Qt::Vertical</enum>
-     </property>
-     <property name="sizeHint" >
-      <size>
-       <width>20</width>
-       <height>40</height>
-      </size>
-     </property>
-    </spacer>
-   </item>
-   <item row="1" column="2" >
+   <item row="1" column="0" >
     <spacer>
      <property name="orientation" >
       <enum>Qt::Horizontal</enum>
@@ -58,7 +32,7 @@
      </property>
     </spacer>
    </item>
-   <item row="1" column="0" >
+   <item row="1" column="2" >
     <spacer>
      <property name="orientation" >
       <enum>Qt::Horizontal</enum>
    <item row="1" column="1" >
     <layout class="QGridLayout" >
      <property name="margin" >
-      <number>8</number>
+      <number>0</number>
      </property>
      <property name="spacing" >
       <number>6</number>
      </property>
+     <item row="2" column="1" >
+      <widget class="QComboBox" name="clientCombo" />
+     </item>
      <item row="3" column="0" >
-      <widget class="QLabel" name="label_4" >
+      <widget class="QLabel" name="label_3" >
        <property name="text" >
-        <string>Pool:</string>
+        <string>File Set:</string>
        </property>
        <property name="buddy" >
-        <cstring>poolCombo</cstring>
+        <cstring>filesetCombo</cstring>
        </property>
       </widget>
      </item>
-     <item row="1" column="0" >
+     <item row="7" column="0" colspan="2" >
+      <layout class="QHBoxLayout" >
+       <property name="margin" >
+        <number>0</number>
+       </property>
+       <property name="spacing" >
+        <number>6</number>
+       </property>
+       <item>
+        <spacer>
+         <property name="orientation" >
+          <enum>Qt::Horizontal</enum>
+         </property>
+         <property name="sizeHint" >
+          <size>
+           <width>171</width>
+           <height>20</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+       <item>
+        <widget class="QPushButton" name="okButton" >
+         <property name="text" >
+          <string>OK</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QPushButton" name="cancelButton" >
+         <property name="text" >
+          <string>Cancel</string>
+         </property>
+        </widget>
+       </item>
+      </layout>
+     </item>
+     <item row="4" column="1" >
+      <widget class="QComboBox" name="poolCombo" />
+     </item>
+     <item row="2" column="0" >
       <widget class="QLabel" name="label_2" >
        <property name="text" >
         <string>Client:</string>
        </property>
       </widget>
      </item>
-     <item row="2" column="1" >
-      <widget class="QComboBox" name="filesetCombo" />
+     <item row="0" column="0" colspan="2" >
+      <layout class="QHBoxLayout" >
+       <property name="margin" >
+        <number>0</number>
+       </property>
+       <property name="spacing" >
+        <number>6</number>
+       </property>
+       <item>
+        <spacer>
+         <property name="orientation" >
+          <enum>Qt::Horizontal</enum>
+         </property>
+         <property name="sizeHint" >
+          <size>
+           <width>71</width>
+           <height>21</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+       <item>
+        <widget class="QLabel" name="run" >
+         <property name="maximumSize" >
+          <size>
+           <width>16777215</width>
+           <height>30</height>
+          </size>
+         </property>
+         <property name="text" >
+          <string>&lt;h3>Pre - Restore&lt;/h3></string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <spacer>
+         <property name="orientation" >
+          <enum>Qt::Horizontal</enum>
+         </property>
+         <property name="sizeHint" >
+          <size>
+           <width>81</width>
+           <height>20</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+      </layout>
      </item>
-     <item row="1" column="1" >
-      <widget class="QComboBox" name="clientCombo" />
+     <item row="4" column="0" >
+      <widget class="QLabel" name="label_4" >
+       <property name="text" >
+        <string>Pool:</string>
+       </property>
+       <property name="buddy" >
+        <cstring>poolCombo</cstring>
+       </property>
+      </widget>
      </item>
-     <item row="4" column="1" >
+     <item row="5" column="1" >
       <widget class="QComboBox" name="storageCombo" />
      </item>
      <item row="3" column="1" >
-      <widget class="QComboBox" name="poolCombo" />
-     </item>
-     <item row="5" column="1" >
-      <widget class="QDateTimeEdit" name="beforeDateTime" >
-       <property name="minimumDate" >
-        <date>
-         <year>2000</year>
-         <month>1</month>
-         <day>1</day>
-        </date>
-       </property>
-       <property name="displayFormat" >
-        <string>yyyy-mm-dd h:mm:ss</string>
-       </property>
-       <property name="calendarPopup" >
-        <bool>true</bool>
-       </property>
-      </widget>
+      <widget class="QComboBox" name="filesetCombo" />
      </item>
-     <item row="2" column="0" >
-      <widget class="QLabel" name="label_3" >
+     <item row="6" column="0" >
+      <widget class="QLabel" name="label_6" >
        <property name="text" >
-        <string>File Set:</string>
+        <string>Before:</string>
        </property>
        <property name="buddy" >
-        <cstring>filesetCombo</cstring>
+        <cstring>beforeDateTime</cstring>
        </property>
       </widget>
      </item>
-     <item row="0" column="0" >
+     <item row="1" column="0" >
       <widget class="QLabel" name="label" >
        <property name="text" >
         <string>Job:</string>
        </property>
       </widget>
      </item>
-     <item row="4" column="0" >
-      <widget class="QLabel" name="label_5" >
-       <property name="text" >
-        <string>Storage:</string>
-       </property>
-       <property name="buddy" >
-        <cstring>storageCombo</cstring>
+     <item row="6" column="1" >
+      <widget class="QDateTimeEdit" name="beforeDateTime" >
+       <property name="minimumDate" >
+        <date>
+         <year>2000</year>
+         <month>1</month>
+         <day>1</day>
+        </date>
        </property>
-      </widget>
-     </item>
-     <item row="5" column="0" >
-      <widget class="QLabel" name="label_6" >
-       <property name="text" >
-        <string>Before:</string>
+       <property name="displayFormat" >
+        <string>yyyy-mm-dd h:mm:ss</string>
        </property>
-       <property name="buddy" >
-        <cstring>beforeDateTime</cstring>
+       <property name="calendarPopup" >
+        <bool>true</bool>
        </property>
       </widget>
      </item>
-     <item row="0" column="1" >
+     <item row="1" column="1" >
       <widget class="QComboBox" name="jobCombo" >
        <property name="sizePolicy" >
         <sizepolicy>
        </property>
       </widget>
      </item>
-    </layout>
-   </item>
-   <item row="2" column="1" >
-    <layout class="QHBoxLayout" >
-     <property name="margin" >
-      <number>0</number>
-     </property>
-     <property name="spacing" >
-      <number>6</number>
-     </property>
-     <item>
-      <spacer>
-       <property name="orientation" >
-        <enum>Qt::Horizontal</enum>
-       </property>
-       <property name="sizeHint" >
-        <size>
-         <width>171</width>
-         <height>20</height>
-        </size>
-       </property>
-      </spacer>
-     </item>
-     <item>
-      <widget class="QPushButton" name="okButton" >
+     <item row="5" column="0" >
+      <widget class="QLabel" name="label_5" >
        <property name="text" >
-        <string>OK</string>
+        <string>Storage:</string>
        </property>
-      </widget>
-     </item>
-     <item>
-      <widget class="QPushButton" name="cancelButton" >
-       <property name="text" >
-        <string>Cancel</string>
+       <property name="buddy" >
+        <cstring>storageCombo</cstring>
        </property>
       </widget>
      </item>
     </layout>
    </item>
+   <item row="0" column="1" >
+    <spacer>
+     <property name="orientation" >
+      <enum>Qt::Vertical</enum>
+     </property>
+     <property name="sizeHint" >
+      <size>
+       <width>20</width>
+       <height>40</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+   <item row="2" column="1" >
+    <spacer>
+     <property name="orientation" >
+      <enum>Qt::Vertical</enum>
+     </property>
+     <property name="sizeHint" >
+      <size>
+       <width>20</width>
+       <height>40</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
   </layout>
  </widget>
  <resources/>
index 4cdb7470fe4cb589338e69de53833263ab53ab0e..b6e8f8d36d64891d6bf1f045189f397bbf5c8357 100644 (file)
 #include "bat.h"
 #include "restore.h"
 
-restorePage::restorePage(Console *console)
+restorePage::restorePage()
 {
    QStringList titles;
 
    setupUi(this);
-   QTreeWidgetItem *parent = mainWin->getFromHash(console);
-   if (!parent) {
-      /* Make this a user configurable stdout msg *** FIXME ****/
-      printf("Error retrieving tree widget.");
-      return;
-   }
-   m_name = "Restore";
-   pgInitialize(parent);
+   m_name = "Restore Select";
+   pgInitialize();
    m_console->notify(false);          /* this should already be off */
    m_closeable = true;
 
@@ -72,8 +66,6 @@ restorePage::restorePage(Console *console)
 
    get_cwd();
 
-   //QString root("");
-   //addDirectory(root);
    fillDirectory();
    dockPage();
    setCurrent();
index 1eab7e45b41f028cff91815bfad730433cc115c4..c4eabc69aade1c0cea87c77bc3c39649f10a21e4 100644 (file)
@@ -40,8 +40,6 @@
 #include "ui_restore.h"
 #include "ui_prerestore.h"
 
-class Console;
-
 /*
  * The pre-restore dialog selects the Job/Client to be restored
  * It really could use considerable enhancement.
@@ -51,7 +49,7 @@ class prerestorePage : public Pages, public Ui::prerestoreForm
    Q_OBJECT 
 
 public:
-   prerestorePage(Console *parent);
+   prerestorePage();
 
 private slots:
    void okButtonPushed();
@@ -71,7 +69,7 @@ class restorePage : public Pages, public Ui::restoreForm
    Q_OBJECT 
 
 public:
-   restorePage(Console *parent);
+   restorePage();
    void fillDirectory();
    char *get_cwd();
    bool cwd(const char *);
index 27682cd971c234b17cb8e5a262649bfb85769d6b..ed4af5bcbcdd67f1bb9966c451a59065348fdfb6 100644 (file)
@@ -5,8 +5,8 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>824</width>
-    <height>660</height>
+    <width>689</width>
+    <height>504</height>
    </rect>
   </property>
   <property name="windowTitle" >
     <number>6</number>
    </property>
    <item row="1" column="0" >
+    <widget class="QSplitter" name="splitter" >
+     <property name="orientation" >
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <widget class="QTreeWidget" name="directoryWidget" >
+      <property name="sizePolicy" >
+       <sizepolicy>
+        <hsizetype>5</hsizetype>
+        <vsizetype>7</vsizetype>
+        <horstretch>1</horstretch>
+        <verstretch>1</verstretch>
+       </sizepolicy>
+      </property>
+      <property name="minimumSize" >
+       <size>
+        <width>200</width>
+        <height>0</height>
+       </size>
+      </property>
+      <property name="maximumSize" >
+       <size>
+        <width>16777215</width>
+        <height>16777215</height>
+       </size>
+      </property>
+      <property name="sizeIncrement" >
+       <size>
+        <width>1</width>
+        <height>0</height>
+       </size>
+      </property>
+      <property name="baseSize" >
+       <size>
+        <width>50</width>
+        <height>0</height>
+       </size>
+      </property>
+      <property name="alternatingRowColors" >
+       <bool>true</bool>
+      </property>
+      <property name="columnCount" >
+       <number>1</number>
+      </property>
+      <column>
+       <property name="text" >
+        <string>1</string>
+       </property>
+      </column>
+     </widget>
+     <widget class="QTreeWidget" name="fileWidget" >
+      <property name="sizePolicy" >
+       <sizepolicy>
+        <hsizetype>7</hsizetype>
+        <vsizetype>5</vsizetype>
+        <horstretch>144</horstretch>
+        <verstretch>1</verstretch>
+       </sizepolicy>
+      </property>
+      <property name="minimumSize" >
+       <size>
+        <width>400</width>
+        <height>0</height>
+       </size>
+      </property>
+      <property name="sizeIncrement" >
+       <size>
+        <width>0</width>
+        <height>0</height>
+       </size>
+      </property>
+      <property name="alternatingRowColors" >
+       <bool>true</bool>
+      </property>
+      <property name="selectionMode" >
+       <enum>QAbstractItemView::ExtendedSelection</enum>
+      </property>
+      <property name="horizontalScrollMode" >
+       <enum>QAbstractItemView::ScrollPerItem</enum>
+      </property>
+      <property name="uniformRowHeights" >
+       <bool>true</bool>
+      </property>
+      <property name="columnCount" >
+       <number>7</number>
+      </property>
+      <column>
+       <property name="text" >
+        <string>1</string>
+       </property>
+      </column>
+      <column>
+       <property name="text" >
+        <string>1</string>
+       </property>
+      </column>
+      <column>
+       <property name="text" >
+        <string>2</string>
+       </property>
+      </column>
+      <column>
+       <property name="text" >
+        <string>3</string>
+       </property>
+      </column>
+      <column>
+       <property name="text" >
+        <string>4</string>
+       </property>
+      </column>
+      <column>
+       <property name="text" >
+        <string>5</string>
+       </property>
+      </column>
+      <column>
+       <property name="text" >
+        <string>6</string>
+       </property>
+      </column>
+     </widget>
+    </widget>
+   </item>
+   <item row="0" column="0" >
     <layout class="QHBoxLayout" >
      <property name="margin" >
       <number>0</number>
       <number>6</number>
      </property>
      <item>
-      <widget class="QLabel" name="label" >
+      <spacer>
+       <property name="orientation" >
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="sizeType" >
+        <enum>QSizePolicy::Preferred</enum>
+       </property>
+       <property name="sizeHint" >
+        <size>
+         <width>50</width>
+         <height>30</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+     <item>
+      <widget class="QLabel" name="label_3" >
+       <property name="text" >
+        <string>&lt;h2>Directories&lt;/h2></string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <spacer>
+       <property name="orientation" >
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="sizeType" >
+        <enum>QSizePolicy::Expanding</enum>
+       </property>
+       <property name="sizeHint" >
+        <size>
+         <width>16</width>
+         <height>30</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+     <item>
+      <widget class="QLabel" name="label_5" >
+       <property name="maximumSize" >
+        <size>
+         <width>16777215</width>
+         <height>15</height>
+        </size>
+       </property>
+       <property name="text" >
+        <string>&lt;h3>Restore Select&lt;/h3></string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <spacer>
+       <property name="orientation" >
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="sizeType" >
+        <enum>QSizePolicy::Expanding</enum>
+       </property>
+       <property name="sizeHint" >
+        <size>
+         <width>16</width>
+         <height>20</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+     <item>
+      <widget class="QPushButton" name="upButton" >
        <property name="sizePolicy" >
         <sizepolicy>
-         <hsizetype>0</hsizetype>
-         <vsizetype>5</vsizetype>
+         <hsizetype>5</hsizetype>
+         <vsizetype>0</vsizetype>
          <horstretch>0</horstretch>
          <verstretch>0</verstretch>
         </sizepolicy>
        </property>
+       <property name="minimumSize" >
+        <size>
+         <width>35</width>
+         <height>0</height>
+        </size>
+       </property>
        <property name="text" >
-        <string>Current Dir:</string>
+        <string>Up</string>
        </property>
-       <property name="buddy" >
-        <cstring>lineEdit</cstring>
+       <property name="icon" >
+        <iconset>:images/up.png</iconset>
        </property>
       </widget>
      </item>
      <item>
-      <widget class="QLineEdit" name="lineEdit" >
+      <spacer>
+       <property name="orientation" >
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="sizeType" >
+        <enum>QSizePolicy::Expanding</enum>
+       </property>
+       <property name="sizeHint" >
+        <size>
+         <width>16</width>
+         <height>20</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+     <item>
+      <widget class="QPushButton" name="markButton" >
+       <property name="sizePolicy" >
+        <sizepolicy>
+         <hsizetype>5</hsizetype>
+         <vsizetype>0</vsizetype>
+         <horstretch>0</horstretch>
+         <verstretch>0</verstretch>
+        </sizepolicy>
+       </property>
        <property name="minimumSize" >
         <size>
-         <width>100</width>
+         <width>35</width>
          <height>0</height>
         </size>
        </property>
+       <property name="text" >
+        <string>Mark</string>
+       </property>
+       <property name="icon" >
+        <iconset>:images/mark.png</iconset>
+       </property>
       </widget>
      </item>
      <item>
         <enum>Qt::Horizontal</enum>
        </property>
        <property name="sizeType" >
-        <enum>QSizePolicy::Fixed</enum>
+        <enum>QSizePolicy::Expanding</enum>
        </property>
        <property name="sizeHint" >
         <size>
-         <width>30</width>
-         <height>32</height>
+         <width>16</width>
+         <height>20</height>
         </size>
        </property>
       </spacer>
      </item>
      <item>
-      <widget class="QPushButton" name="cancelButton" >
+      <widget class="QPushButton" name="unmarkButton" >
+       <property name="sizePolicy" >
+        <sizepolicy>
+         <hsizetype>5</hsizetype>
+         <vsizetype>0</vsizetype>
+         <horstretch>0</horstretch>
+         <verstretch>0</verstretch>
+        </sizepolicy>
+       </property>
+       <property name="minimumSize" >
+        <size>
+         <width>50</width>
+         <height>0</height>
+        </size>
+       </property>
        <property name="text" >
-        <string>Cancel</string>
+        <string>Unmark</string>
+       </property>
+       <property name="icon" >
+        <iconset>:images/unmark.png</iconset>
        </property>
       </widget>
      </item>
      <item>
-      <widget class="QPushButton" name="okButton" >
+      <spacer>
+       <property name="orientation" >
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="sizeType" >
+        <enum>QSizePolicy::Expanding</enum>
+       </property>
+       <property name="sizeHint" >
+        <size>
+         <width>61</width>
+         <height>20</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+     <item>
+      <widget class="QLabel" name="label_2" >
        <property name="text" >
-        <string>OK</string>
+        <string>&lt;h2>Files&lt;/h2></string>
        </property>
       </widget>
      </item>
+     <item>
+      <spacer>
+       <property name="orientation" >
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="sizeHint" >
+        <size>
+         <width>100</width>
+         <height>30</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
     </layout>
    </item>
-   <item row="2" column="0" >
+   <item row="3" column="0" >
     <layout class="QHBoxLayout" >
      <property name="margin" >
       <number>0</number>
      </item>
     </layout>
    </item>
-   <item row="0" column="0" >
-    <widget class="QSplitter" name="splitter" >
-     <property name="orientation" >
-      <enum>Qt::Horizontal</enum>
+   <item row="2" column="0" >
+    <layout class="QHBoxLayout" >
+     <property name="margin" >
+      <number>0</number>
      </property>
-     <widget class="QWidget" name="layoutWidget_2" >
-      <layout class="QVBoxLayout" >
-       <property name="margin" >
-        <number>0</number>
-       </property>
-       <property name="spacing" >
-        <number>6</number>
-       </property>
-       <item>
-        <layout class="QHBoxLayout" >
-         <property name="margin" >
-          <number>0</number>
-         </property>
-         <property name="spacing" >
-          <number>6</number>
-         </property>
-         <item>
-          <spacer>
-           <property name="orientation" >
-            <enum>Qt::Horizontal</enum>
-           </property>
-           <property name="sizeType" >
-            <enum>QSizePolicy::Preferred</enum>
-           </property>
-           <property name="sizeHint" >
-            <size>
-             <width>50</width>
-             <height>30</height>
-            </size>
-           </property>
-          </spacer>
-         </item>
-         <item>
-          <widget class="QLabel" name="label_3" >
-           <property name="text" >
-            <string>&lt;h2>Directories&lt;/h2></string>
-           </property>
-          </widget>
-         </item>
-         <item>
-          <spacer>
-           <property name="orientation" >
-            <enum>Qt::Horizontal</enum>
-           </property>
-           <property name="sizeType" >
-            <enum>QSizePolicy::Preferred</enum>
-           </property>
-           <property name="sizeHint" >
-            <size>
-             <width>50</width>
-             <height>30</height>
-            </size>
-           </property>
-          </spacer>
-         </item>
-        </layout>
-       </item>
-       <item>
-        <widget class="QTreeWidget" name="directoryWidget" >
-         <property name="sizePolicy" >
-          <sizepolicy>
-           <hsizetype>5</hsizetype>
-           <vsizetype>7</vsizetype>
-           <horstretch>1</horstretch>
-           <verstretch>1</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="minimumSize" >
-          <size>
-           <width>60</width>
-           <height>0</height>
-          </size>
-         </property>
-         <property name="maximumSize" >
-          <size>
-           <width>16777215</width>
-           <height>16777215</height>
-          </size>
-         </property>
-         <property name="sizeIncrement" >
-          <size>
-           <width>1</width>
-           <height>0</height>
-          </size>
-         </property>
-         <property name="baseSize" >
-          <size>
-           <width>50</width>
-           <height>0</height>
-          </size>
-         </property>
-         <property name="alternatingRowColors" >
-          <bool>true</bool>
-         </property>
-         <property name="columnCount" >
-          <number>1</number>
-         </property>
-         <column>
-          <property name="text" >
-           <string>1</string>
-          </property>
-         </column>
-        </widget>
-       </item>
-      </layout>
-     </widget>
-     <widget class="QWidget" name="layoutWidget_3" >
-      <layout class="QVBoxLayout" >
-       <property name="margin" >
-        <number>0</number>
-       </property>
-       <property name="spacing" >
-        <number>6</number>
-       </property>
-       <item>
-        <layout class="QHBoxLayout" >
-         <property name="margin" >
-          <number>0</number>
-         </property>
-         <property name="spacing" >
-          <number>6</number>
-         </property>
-         <item>
-          <spacer>
-           <property name="orientation" >
-            <enum>Qt::Horizontal</enum>
-           </property>
-           <property name="sizeType" >
-            <enum>QSizePolicy::Fixed</enum>
-           </property>
-           <property name="sizeHint" >
-            <size>
-             <width>16</width>
-             <height>20</height>
-            </size>
-           </property>
-          </spacer>
-         </item>
-         <item>
-          <widget class="QPushButton" name="upButton" >
-           <property name="sizePolicy" >
-            <sizepolicy>
-             <hsizetype>5</hsizetype>
-             <vsizetype>0</vsizetype>
-             <horstretch>0</horstretch>
-             <verstretch>0</verstretch>
-            </sizepolicy>
-           </property>
-           <property name="text" >
-            <string>Up</string>
-           </property>
-           <property name="icon" >
-            <iconset>:images/up.png</iconset>
-           </property>
-          </widget>
-         </item>
-         <item>
-          <spacer>
-           <property name="orientation" >
-            <enum>Qt::Horizontal</enum>
-           </property>
-           <property name="sizeType" >
-            <enum>QSizePolicy::Fixed</enum>
-           </property>
-           <property name="sizeHint" >
-            <size>
-             <width>16</width>
-             <height>20</height>
-            </size>
-           </property>
-          </spacer>
-         </item>
-         <item>
-          <widget class="QPushButton" name="markButton" >
-           <property name="sizePolicy" >
-            <sizepolicy>
-             <hsizetype>5</hsizetype>
-             <vsizetype>0</vsizetype>
-             <horstretch>0</horstretch>
-             <verstretch>0</verstretch>
-            </sizepolicy>
-           </property>
-           <property name="text" >
-            <string>Mark</string>
-           </property>
-           <property name="icon" >
-            <iconset>:images/mark.png</iconset>
-           </property>
-          </widget>
-         </item>
-         <item>
-          <spacer>
-           <property name="orientation" >
-            <enum>Qt::Horizontal</enum>
-           </property>
-           <property name="sizeType" >
-            <enum>QSizePolicy::Fixed</enum>
-           </property>
-           <property name="sizeHint" >
-            <size>
-             <width>16</width>
-             <height>20</height>
-            </size>
-           </property>
-          </spacer>
-         </item>
-         <item>
-          <widget class="QPushButton" name="unmarkButton" >
-           <property name="sizePolicy" >
-            <sizepolicy>
-             <hsizetype>5</hsizetype>
-             <vsizetype>0</vsizetype>
-             <horstretch>0</horstretch>
-             <verstretch>0</verstretch>
-            </sizepolicy>
-           </property>
-           <property name="text" >
-            <string>Unmark</string>
-           </property>
-           <property name="icon" >
-            <iconset>:images/unmark.png</iconset>
-           </property>
-          </widget>
-         </item>
-         <item>
-          <spacer>
-           <property name="orientation" >
-            <enum>Qt::Horizontal</enum>
-           </property>
-           <property name="sizeType" >
-            <enum>QSizePolicy::Fixed</enum>
-           </property>
-           <property name="sizeHint" >
-            <size>
-             <width>61</width>
-             <height>20</height>
-            </size>
-           </property>
-          </spacer>
-         </item>
-         <item>
-          <widget class="QLabel" name="label_2" >
-           <property name="text" >
-            <string>&lt;h2>Files&lt;/h2></string>
-           </property>
-          </widget>
-         </item>
-         <item>
-          <spacer>
-           <property name="orientation" >
-            <enum>Qt::Horizontal</enum>
-           </property>
-           <property name="sizeHint" >
-            <size>
-             <width>100</width>
-             <height>30</height>
-            </size>
-           </property>
-          </spacer>
-         </item>
-        </layout>
-       </item>
-       <item>
-        <widget class="QTreeWidget" name="fileWidget" >
-         <property name="sizePolicy" >
-          <sizepolicy>
-           <hsizetype>7</hsizetype>
-           <vsizetype>5</vsizetype>
-           <horstretch>144</horstretch>
-           <verstretch>1</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="minimumSize" >
-          <size>
-           <width>400</width>
-           <height>0</height>
-          </size>
-         </property>
-         <property name="sizeIncrement" >
-          <size>
-           <width>0</width>
-           <height>0</height>
-          </size>
-         </property>
-         <property name="alternatingRowColors" >
-          <bool>true</bool>
-         </property>
-         <property name="selectionMode" >
-          <enum>QAbstractItemView::ExtendedSelection</enum>
-         </property>
-         <property name="horizontalScrollMode" >
-          <enum>QAbstractItemView::ScrollPerItem</enum>
-         </property>
-         <property name="uniformRowHeights" >
-          <bool>true</bool>
-         </property>
-         <property name="columnCount" >
-          <number>7</number>
-         </property>
-         <column>
-          <property name="text" >
-           <string>1</string>
-          </property>
-         </column>
-         <column>
-          <property name="text" >
-           <string>1</string>
-          </property>
-         </column>
-         <column>
-          <property name="text" >
-           <string>2</string>
-          </property>
-         </column>
-         <column>
-          <property name="text" >
-           <string>3</string>
-          </property>
-         </column>
-         <column>
-          <property name="text" >
-           <string>4</string>
-          </property>
-         </column>
-         <column>
-          <property name="text" >
-           <string>5</string>
-          </property>
-         </column>
-         <column>
-          <property name="text" >
-           <string>6</string>
-          </property>
-         </column>
-        </widget>
-       </item>
-      </layout>
-     </widget>
-    </widget>
+     <property name="spacing" >
+      <number>6</number>
+     </property>
+     <item>
+      <widget class="QLabel" name="label" >
+       <property name="sizePolicy" >
+        <sizepolicy>
+         <hsizetype>0</hsizetype>
+         <vsizetype>5</vsizetype>
+         <horstretch>0</horstretch>
+         <verstretch>0</verstretch>
+        </sizepolicy>
+       </property>
+       <property name="text" >
+        <string>Current Dir:</string>
+       </property>
+       <property name="buddy" >
+        <cstring>lineEdit</cstring>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QLineEdit" name="lineEdit" >
+       <property name="minimumSize" >
+        <size>
+         <width>100</width>
+         <height>0</height>
+        </size>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <spacer>
+       <property name="orientation" >
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="sizeType" >
+        <enum>QSizePolicy::Fixed</enum>
+       </property>
+       <property name="sizeHint" >
+        <size>
+         <width>30</width>
+         <height>32</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+     <item>
+      <widget class="QPushButton" name="cancelButton" >
+       <property name="text" >
+        <string>Cancel</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QPushButton" name="okButton" >
+       <property name="text" >
+        <string>OK</string>
+       </property>
+      </widget>
+     </item>
+    </layout>
    </item>
   </layout>
  </widget>
index 2124c0bdd2200090e203070704652289d19cd1e7..35e654e0a11ce7f757cb4679234797878c019b17 100644 (file)
 /*
  * Setup all the combo boxes and display the dialog
  */
-runDialog::runDialog(Console *console)
+runPage::runPage()
 {
    QDateTime dt;
 
-   m_console = console;
-   m_console->notify(false);
+   m_name = "Run";
+   pgInitialize();
    setupUi(this);
+   m_console->notify(false);
+
    m_console->beginNewCommand();
-   jobCombo->addItems(console->job_list);
-   filesetCombo->addItems(console->fileset_list);
-   levelCombo->addItems(console->level_list);
-   clientCombo->addItems(console->client_list);
-   poolCombo->addItems(console->pool_list);
-   storageCombo->addItems(console->storage_list);
+   jobCombo->addItems(m_console->job_list);
+   filesetCombo->addItems(m_console->fileset_list);
+   levelCombo->addItems(m_console->level_list);
+   clientCombo->addItems(m_console->client_list);
+   poolCombo->addItems(m_console->pool_list);
+   storageCombo->addItems(m_console->storage_list);
    dateTimeEdit->setDateTime(dt.currentDateTime());
    job_name_change(0);
    connect(jobCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(job_name_change(int)));
+   connect(okButton, SIGNAL(pressed()), this, SLOT(okButtonPushed()));
+   connect(cancelButton, SIGNAL(pressed()), this, SLOT(cancelButtonPushed()));
+
+   dockPage();
+   setCurrent();
    this->show();
 }
 
-void runDialog::accept()
+void runPage::okButtonPushed()
 {
    char cmd[1000];
 
@@ -83,17 +90,17 @@ void runDialog::accept()
    m_console->display_text(cmd);
    m_console->displayToPrompt();
    m_console->notify(true);
-   delete this;
+   closeStackPage();
    mainWin->resetFocus();
 }
 
 
-void runDialog::reject()
+void runPage::cancelButtonPushed()
 {
    mainWin->set_status(" Canceled");
    this->hide();
    m_console->notify(true);
-   delete this;
+   closeStackPage();
    mainWin->resetFocus();
 }
 
@@ -102,7 +109,7 @@ void runDialog::reject()
  *  We load the default values for the new job in the
  *  other combo boxes.
  */
-void runDialog::job_name_change(int index)
+void runPage::job_name_change(int index)
 {
    job_defaults job_defs;
 
index 5628331992cb20eb5205c0239b5e0c7380db18d6..9a8796aba867dfb22c0cf9fa6fa3a1da10ea385b 100644 (file)
@@ -7,38 +7,34 @@
 #include "ui_runcmd.h"
 #include "console.h"
 
-class runDialog : public QDialog, public Ui::runForm
+class runPage : public Pages, public Ui::runForm
 {
    Q_OBJECT 
 
 public:
-   runDialog(Console *console);
+   runPage();
 
 public slots:
-   void accept();
-   void reject();
+   void okButtonPushed();
+   void cancelButtonPushed();
    void job_name_change(int index);
 
 private:
-   Console *m_console;
-
 };
 
-class runCmdDialog : public QDialog, public Ui::runCmdForm
+class runCmdPage : public Pages, public Ui::runCmdForm
 {
    Q_OBJECT 
 
 public:
-   runCmdDialog(Console *console);
+   runCmdPage();
 
 public slots:
-   void accept();
-   void reject();
+   void okButtonPushed();
+   void cancelButtonPushed();
 
 private:
-   void fillRunDialog();
-
-   Console *m_console;
+   void fill();
 };
 
 
index 87c16237b329cda01d47f008bb8df924b8ff74ac..02679a1deba71d5e27ed00d841beca7fad452681 100644 (file)
@@ -1,93 +1,70 @@
 <ui version="4.0" >
  <class>runForm</class>
- <widget class="QDialog" name="runForm" >
-  <property name="windowModality" >
-   <enum>Qt::WindowModal</enum>
-  </property>
+ <widget class="QWidget" name="runForm" >
   <property name="geometry" >
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>590</width>
-    <height>393</height>
+    <width>777</width>
+    <height>429</height>
    </rect>
   </property>
   <property name="windowTitle" >
-   <string>Run Dialog</string>
+   <string>Form</string>
   </property>
-  <layout class="QVBoxLayout" >
+  <layout class="QGridLayout" >
    <property name="margin" >
     <number>9</number>
    </property>
    <property name="spacing" >
     <number>6</number>
    </property>
-   <item>
-    <layout class="QHBoxLayout" >
-     <property name="margin" >
-      <number>0</number>
+   <item row="1" column="2" >
+    <spacer>
+     <property name="orientation" >
+      <enum>Qt::Horizontal</enum>
      </property>
-     <property name="spacing" >
-      <number>6</number>
+     <property name="sizeHint" >
+      <size>
+       <width>40</width>
+       <height>20</height>
+      </size>
      </property>
-     <item>
-      <spacer>
-       <property name="orientation" >
-        <enum>Qt::Horizontal</enum>
-       </property>
-       <property name="sizeHint" >
-        <size>
-         <width>71</width>
-         <height>21</height>
-        </size>
-       </property>
-      </spacer>
-     </item>
-     <item>
-      <widget class="QLabel" name="run" >
-       <property name="maximumSize" >
-        <size>
-         <width>16777215</width>
-         <height>30</height>
-        </size>
-       </property>
-       <property name="text" >
-        <string>&lt;h3>Run a Job&lt;/h3></string>
-       </property>
-      </widget>
-     </item>
-     <item>
-      <spacer>
-       <property name="orientation" >
-        <enum>Qt::Horizontal</enum>
-       </property>
-       <property name="sizeHint" >
-        <size>
-         <width>81</width>
-         <height>20</height>
-        </size>
-       </property>
-      </spacer>
-     </item>
-    </layout>
+    </spacer>
+   </item>
+   <item row="0" column="1" >
+    <spacer>
+     <property name="orientation" >
+      <enum>Qt::Vertical</enum>
+     </property>
+     <property name="sizeType" >
+      <enum>QSizePolicy::Expanding</enum>
+     </property>
+     <property name="sizeHint" >
+      <size>
+       <width>351</width>
+       <height>16</height>
+      </size>
+     </property>
+    </spacer>
    </item>
-   <item>
+   <item row="2" column="1" >
     <spacer>
      <property name="orientation" >
       <enum>Qt::Vertical</enum>
      </property>
      <property name="sizeType" >
-      <enum>QSizePolicy::Maximum</enum>
+      <enum>QSizePolicy::Expanding</enum>
      </property>
      <property name="sizeHint" >
       <size>
-       <width>572</width>
+       <width>351</width>
        <height>16</height>
       </size>
      </property>
     </spacer>
    </item>
-   <item>
+   <item row="1" column="1" >
     <layout class="QGridLayout" >
      <property name="margin" >
       <number>0</number>
      <property name="spacing" >
       <number>6</number>
      </property>
-     <item row="0" column="2" >
-      <widget class="QLabel" name="label_7" >
-       <property name="text" >
-        <string>Type:</string>
-       </property>
-       <property name="buddy" >
-        <cstring>typeCombo</cstring>
-       </property>
-      </widget>
-     </item>
-     <item row="6" column="0" >
-      <widget class="QLabel" name="label_10" >
-       <property name="text" >
-        <string>Messages:</string>
-       </property>
-       <property name="buddy" >
-        <cstring>messagesCombo</cstring>
-       </property>
-      </widget>
-     </item>
-     <item rowspan="6" row="2" column="3" >
-      <spacer>
-       <property name="orientation" >
-        <enum>Qt::Vertical</enum>
-       </property>
-       <property name="sizeHint" >
-        <size>
-         <width>20</width>
-         <height>171</height>
-        </size>
-       </property>
-      </spacer>
-     </item>
-     <item row="5" column="1" >
-      <widget class="QComboBox" name="storageCombo" />
-     </item>
-     <item row="4" column="1" >
-      <widget class="QComboBox" name="poolCombo" />
-     </item>
-     <item row="7" column="0" >
-      <widget class="QLabel" name="label" >
-       <property name="text" >
-        <string>When:</string>
-       </property>
-       <property name="buddy" >
-        <cstring>dateTimeEdit</cstring>
-       </property>
-      </widget>
-     </item>
-     <item row="3" column="0" >
-      <widget class="QLabel" name="label_9" >
-       <property name="text" >
-        <string>FileSet:</string>
-       </property>
-       <property name="buddy" >
-        <cstring>filesetCombo</cstring>
-       </property>
-      </widget>
-     </item>
-     <item row="8" column="1" >
-      <widget class="QLineEdit" name="bootstrap" >
-       <property name="enabled" >
-        <bool>false</bool>
-       </property>
-       <property name="minimumSize" >
-        <size>
-         <width>200</width>
-         <height>0</height>
-        </size>
-       </property>
-       <property name="readOnly" >
-        <bool>false</bool>
-       </property>
-      </widget>
-     </item>
-     <item row="7" column="1" >
-      <widget class="QDateTimeEdit" name="dateTimeEdit" >
-       <property name="dateTime" >
-        <datetime>
-         <hour>0</hour>
-         <minute>2</minute>
-         <second>0</second>
-         <year>2000</year>
-         <month>1</month>
-         <day>1</day>
-        </datetime>
-       </property>
-       <property name="displayFormat" >
-        <string>yyyy-mm-dd hh:mm:ss</string>
-       </property>
-       <property name="calendarPopup" >
-        <bool>true</bool>
-       </property>
-      </widget>
-     </item>
-     <item row="1" column="3" >
-      <widget class="QSpinBox" name="prioritySpin" >
-       <property name="maximum" >
-        <number>10000</number>
-       </property>
-       <property name="minimum" >
-        <number>1</number>
-       </property>
-       <property name="value" >
-        <number>10</number>
-       </property>
-      </widget>
-     </item>
-     <item row="6" column="1" >
-      <widget class="QComboBox" name="messagesCombo" />
-     </item>
-     <item row="2" column="1" >
-      <widget class="QComboBox" name="levelCombo" />
-     </item>
-     <item row="3" column="1" >
-      <widget class="QComboBox" name="filesetCombo" />
-     </item>
-     <item row="4" column="0" >
-      <widget class="QLabel" name="label_3" >
-       <property name="text" >
-        <string>Pool:</string>
-       </property>
-       <property name="buddy" >
-        <cstring>poolCombo</cstring>
-       </property>
-      </widget>
-     </item>
-     <item row="8" column="0" >
-      <widget class="QLabel" name="label_5" >
-       <property name="text" >
-        <string>Bootstrap:</string>
-       </property>
-       <property name="openExternalLinks" >
-        <bool>true</bool>
-       </property>
-       <property name="buddy" >
-        <cstring>bootstrap</cstring>
-       </property>
-      </widget>
-     </item>
-     <item row="0" column="3" >
-      <widget class="QComboBox" name="typeCombo" >
-       <property name="sizePolicy" >
-        <sizepolicy>
-         <hsizetype>5</hsizetype>
-         <vsizetype>0</vsizetype>
-         <horstretch>0</horstretch>
-         <verstretch>0</verstretch>
-        </sizepolicy>
-       </property>
-       <property name="minimumSize" >
-        <size>
-         <width>150</width>
-         <height>0</height>
-        </size>
-       </property>
-      </widget>
-     </item>
-     <item row="1" column="0" >
-      <widget class="QLabel" name="label_8" >
-       <property name="text" >
-        <string>Client:</string>
-       </property>
-       <property name="buddy" >
-        <cstring>clientCombo</cstring>
-       </property>
-      </widget>
-     </item>
      <item row="0" column="0" >
-      <widget class="QLabel" name="label_6" >
-       <property name="text" >
-        <string>Job:</string>
-       </property>
-       <property name="buddy" >
-        <cstring>jobCombo</cstring>
-       </property>
-      </widget>
+      <layout class="QHBoxLayout" >
+       <property name="margin" >
+        <number>0</number>
+       </property>
+       <property name="spacing" >
+        <number>6</number>
+       </property>
+       <item>
+        <spacer>
+         <property name="orientation" >
+          <enum>Qt::Horizontal</enum>
+         </property>
+         <property name="sizeHint" >
+          <size>
+           <width>71</width>
+           <height>21</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+       <item>
+        <widget class="QLabel" name="run" >
+         <property name="maximumSize" >
+          <size>
+           <width>16777215</width>
+           <height>30</height>
+          </size>
+         </property>
+         <property name="text" >
+          <string>&lt;h3>Run a Job&lt;/h3></string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <spacer>
+         <property name="orientation" >
+          <enum>Qt::Horizontal</enum>
+         </property>
+         <property name="sizeHint" >
+          <size>
+           <width>81</width>
+           <height>20</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+      </layout>
      </item>
-     <item row="5" column="0" >
-      <widget class="QLabel" name="label_2" >
-       <property name="text" >
-        <string>Storage:</string>
-       </property>
-       <property name="buddy" >
-        <cstring>storageCombo</cstring>
-       </property>
-      </widget>
+     <item row="1" column="0" >
+      <layout class="QGridLayout" >
+       <property name="margin" >
+        <number>0</number>
+       </property>
+       <property name="spacing" >
+        <number>6</number>
+       </property>
+       <item row="0" column="2" >
+        <widget class="QLabel" name="label_7" >
+         <property name="text" >
+          <string>Type:</string>
+         </property>
+         <property name="buddy" >
+          <cstring>typeCombo</cstring>
+         </property>
+        </widget>
+       </item>
+       <item row="6" column="0" >
+        <widget class="QLabel" name="label_10" >
+         <property name="text" >
+          <string>Messages:</string>
+         </property>
+         <property name="buddy" >
+          <cstring>messagesCombo</cstring>
+         </property>
+        </widget>
+       </item>
+       <item rowspan="6" row="2" column="3" >
+        <spacer>
+         <property name="orientation" >
+          <enum>Qt::Vertical</enum>
+         </property>
+         <property name="sizeHint" >
+          <size>
+           <width>20</width>
+           <height>171</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+       <item row="5" column="1" >
+        <widget class="QComboBox" name="storageCombo" />
+       </item>
+       <item row="4" column="1" >
+        <widget class="QComboBox" name="poolCombo" />
+       </item>
+       <item row="7" column="0" >
+        <widget class="QLabel" name="label" >
+         <property name="text" >
+          <string>When:</string>
+         </property>
+         <property name="buddy" >
+          <cstring>dateTimeEdit</cstring>
+         </property>
+        </widget>
+       </item>
+       <item row="3" column="0" >
+        <widget class="QLabel" name="label_9" >
+         <property name="text" >
+          <string>FileSet:</string>
+         </property>
+         <property name="buddy" >
+          <cstring>filesetCombo</cstring>
+         </property>
+        </widget>
+       </item>
+       <item row="8" column="1" >
+        <widget class="QLineEdit" name="bootstrap" >
+         <property name="enabled" >
+          <bool>false</bool>
+         </property>
+         <property name="minimumSize" >
+          <size>
+           <width>200</width>
+           <height>0</height>
+          </size>
+         </property>
+         <property name="readOnly" >
+          <bool>false</bool>
+         </property>
+        </widget>
+       </item>
+       <item row="7" column="1" >
+        <widget class="QDateTimeEdit" name="dateTimeEdit" >
+         <property name="dateTime" >
+          <datetime>
+           <hour>0</hour>
+           <minute>2</minute>
+           <second>0</second>
+           <year>2000</year>
+           <month>1</month>
+           <day>1</day>
+          </datetime>
+         </property>
+         <property name="displayFormat" >
+          <string>yyyy-mm-dd hh:mm:ss</string>
+         </property>
+         <property name="calendarPopup" >
+          <bool>true</bool>
+         </property>
+        </widget>
+       </item>
+       <item row="1" column="3" >
+        <widget class="QSpinBox" name="prioritySpin" >
+         <property name="maximum" >
+          <number>10000</number>
+         </property>
+         <property name="minimum" >
+          <number>1</number>
+         </property>
+         <property name="value" >
+          <number>10</number>
+         </property>
+        </widget>
+       </item>
+       <item row="6" column="1" >
+        <widget class="QComboBox" name="messagesCombo" />
+       </item>
+       <item row="2" column="1" >
+        <widget class="QComboBox" name="levelCombo" />
+       </item>
+       <item row="3" column="1" >
+        <widget class="QComboBox" name="filesetCombo" />
+       </item>
+       <item row="4" column="0" >
+        <widget class="QLabel" name="label_3" >
+         <property name="text" >
+          <string>Pool:</string>
+         </property>
+         <property name="buddy" >
+          <cstring>poolCombo</cstring>
+         </property>
+        </widget>
+       </item>
+       <item row="8" column="0" >
+        <widget class="QLabel" name="label_5" >
+         <property name="text" >
+          <string>Bootstrap:</string>
+         </property>
+         <property name="openExternalLinks" >
+          <bool>true</bool>
+         </property>
+         <property name="buddy" >
+          <cstring>bootstrap</cstring>
+         </property>
+        </widget>
+       </item>
+       <item row="0" column="3" >
+        <widget class="QComboBox" name="typeCombo" >
+         <property name="sizePolicy" >
+          <sizepolicy>
+           <hsizetype>5</hsizetype>
+           <vsizetype>0</vsizetype>
+           <horstretch>0</horstretch>
+           <verstretch>0</verstretch>
+          </sizepolicy>
+         </property>
+         <property name="minimumSize" >
+          <size>
+           <width>150</width>
+           <height>0</height>
+          </size>
+         </property>
+        </widget>
+       </item>
+       <item row="1" column="0" >
+        <widget class="QLabel" name="label_8" >
+         <property name="text" >
+          <string>Client:</string>
+         </property>
+         <property name="buddy" >
+          <cstring>clientCombo</cstring>
+         </property>
+        </widget>
+       </item>
+       <item row="0" column="0" >
+        <widget class="QLabel" name="label_6" >
+         <property name="text" >
+          <string>Job:</string>
+         </property>
+         <property name="buddy" >
+          <cstring>jobCombo</cstring>
+         </property>
+        </widget>
+       </item>
+       <item row="5" column="0" >
+        <widget class="QLabel" name="label_2" >
+         <property name="text" >
+          <string>Storage:</string>
+         </property>
+         <property name="buddy" >
+          <cstring>storageCombo</cstring>
+         </property>
+        </widget>
+       </item>
+       <item row="2" column="0" >
+        <widget class="QLabel" name="label_11" >
+         <property name="text" >
+          <string>Level:</string>
+         </property>
+         <property name="buddy" >
+          <cstring>levelCombo</cstring>
+         </property>
+        </widget>
+       </item>
+       <item row="1" column="2" >
+        <widget class="QLabel" name="label_4" >
+         <property name="text" >
+          <string>Priority:</string>
+         </property>
+         <property name="buddy" >
+          <cstring>prioritySpin</cstring>
+         </property>
+        </widget>
+       </item>
+       <item row="1" column="1" >
+        <widget class="QComboBox" name="clientCombo" />
+       </item>
+       <item row="0" column="1" >
+        <widget class="QComboBox" name="jobCombo" />
+       </item>
+      </layout>
      </item>
      <item row="2" column="0" >
-      <widget class="QLabel" name="label_11" >
-       <property name="text" >
-        <string>Level:</string>
-       </property>
-       <property name="buddy" >
-        <cstring>levelCombo</cstring>
-       </property>
-      </widget>
-     </item>
-     <item row="1" column="2" >
-      <widget class="QLabel" name="label_4" >
-       <property name="text" >
-        <string>Priority:</string>
-       </property>
-       <property name="buddy" >
-        <cstring>prioritySpin</cstring>
-       </property>
-      </widget>
-     </item>
-     <item row="1" column="1" >
-      <widget class="QComboBox" name="clientCombo" />
-     </item>
-     <item row="0" column="1" >
-      <widget class="QComboBox" name="jobCombo" />
+      <layout class="QHBoxLayout" >
+       <property name="margin" >
+        <number>0</number>
+       </property>
+       <property name="spacing" >
+        <number>6</number>
+       </property>
+       <item>
+        <spacer>
+         <property name="orientation" >
+          <enum>Qt::Horizontal</enum>
+         </property>
+         <property name="sizeHint" >
+          <size>
+           <width>40</width>
+           <height>20</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+       <item>
+        <widget class="QPushButton" name="okButton" >
+         <property name="text" >
+          <string>OK</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QPushButton" name="cancelButton" >
+         <property name="text" >
+          <string>Cancel</string>
+         </property>
+        </widget>
+       </item>
+      </layout>
      </item>
     </layout>
    </item>
-   <item>
+   <item row="1" column="0" >
     <spacer>
      <property name="orientation" >
-      <enum>Qt::Vertical</enum>
-     </property>
-     <property name="sizeType" >
-      <enum>QSizePolicy::Maximum</enum>
+      <enum>Qt::Horizontal</enum>
      </property>
      <property name="sizeHint" >
       <size>
-       <width>572</width>
-       <height>16</height>
+       <width>40</width>
+       <height>20</height>
       </size>
      </property>
     </spacer>
    </item>
-   <item>
-    <widget class="QDialogButtonBox" name="buttonBox" >
-     <property name="orientation" >
-      <enum>Qt::Horizontal</enum>
-     </property>
-     <property name="standardButtons" >
-      <set>QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok</set>
-     </property>
-    </widget>
-   </item>
   </layout>
  </widget>
  <resources/>
- <connections>
-  <connection>
-   <sender>buttonBox</sender>
-   <signal>accepted()</signal>
-   <receiver>runForm</receiver>
-   <slot>accept()</slot>
-   <hints>
-    <hint type="sourcelabel" >
-     <x>248</x>
-     <y>254</y>
-    </hint>
-    <hint type="destinationlabel" >
-     <x>157</x>
-     <y>274</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>buttonBox</sender>
-   <signal>rejected()</signal>
-   <receiver>runForm</receiver>
-   <slot>reject()</slot>
-   <hints>
-    <hint type="sourcelabel" >
-     <x>316</x>
-     <y>260</y>
-    </hint>
-    <hint type="destinationlabel" >
-     <x>286</x>
-     <y>274</y>
-    </hint>
-   </hints>
-  </connection>
- </connections>
+ <connections/>
 </ui>
index b86769539027570dd94ccc391b0860defdb83519..847d00c3b4f45ce9e4a05d42806c060fa7421d2a 100644 (file)
 /*
  * Setup all the combo boxes and display the dialog
  */
-runCmdDialog::runCmdDialog(Console *console)
+runCmdPage::runCmdPage()
 {
-   m_console = console;
-   m_console->notify(false);
+   m_name = "Restore Run";
+   pgInitialize();
    setupUi(this);
-   fillRunDialog();
-   this->show();
+   m_console->notify(false);
+
+   fill();
    m_console->discardToPrompt();
+
+   connect(okButton, SIGNAL(pressed()), this, SLOT(okButtonPushed()));
+   connect(cancelButton, SIGNAL(pressed()), this, SLOT(cancelButtonPushed()));
+   dockPage();
+   setCurrent();
+   this->show();
 }
 
-void runCmdDialog::fillRunDialog()
+void runCmdPage::fill()
 {
    QString item, val;
    QStringList items;
@@ -110,7 +117,7 @@ void runCmdDialog::fillRunDialog()
    }
 }
 
-void runCmdDialog::accept()
+void runCmdPage::okButtonPushed()
 {
 
    this->hide();
@@ -123,7 +130,7 @@ void runCmdDialog::accept()
 }
 
 
-void runCmdDialog::reject()
+void runCmdPage::cancelButtonPushed()
 {
    mainWin->set_status(" Canceled");
    this->hide();
index d14cc9be002a5c7c4b543f84365f65956f365c60..3176d9650ecdd81dde9d54ba24e4cbd8a28aaa6f 100644 (file)
@@ -1,19 +1,16 @@
 <ui version="4.0" >
  <class>runCmdForm</class>
- <widget class="QDialog" name="runCmdForm" >
-  <property name="windowModality" >
-   <enum>Qt::NonModal</enum>
-  </property>
+ <widget class="QWidget" name="runCmdForm" >
   <property name="geometry" >
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>590</width>
-    <height>395</height>
+    <width>678</width>
+    <height>386</height>
    </rect>
   </property>
   <property name="windowTitle" >
-   <string>Run Job Command</string>
+   <string>Form</string>
   </property>
   <layout class="QGridLayout" >
    <property name="margin" >
    <property name="spacing" >
     <number>6</number>
    </property>
-   <item row="4" column="0" >
-    <widget class="QDialogButtonBox" name="buttonBox" >
-     <property name="orientation" >
-      <enum>Qt::Horizontal</enum>
+   <item row="1" column="1" colspan="2" >
+    <layout class="QHBoxLayout" >
+     <property name="margin" >
+      <number>0</number>
      </property>
-     <property name="standardButtons" >
-      <set>QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok</set>
+     <property name="spacing" >
+      <number>6</number>
      </property>
-    </widget>
+     <item>
+      <spacer>
+       <property name="orientation" >
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="sizeType" >
+        <enum>QSizePolicy::Fixed</enum>
+       </property>
+       <property name="sizeHint" >
+        <size>
+         <width>131</width>
+         <height>25</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+     <item>
+      <widget class="QLabel" name="run" >
+       <property name="maximumSize" >
+        <size>
+         <width>16777215</width>
+         <height>30</height>
+        </size>
+       </property>
+       <property name="text" >
+        <string>&lt;h3>Restore Run&lt;/h3></string>
+       </property>
+       <property name="alignment" >
+        <set>Qt::AlignCenter</set>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <spacer>
+       <property name="orientation" >
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="sizeType" >
+        <enum>QSizePolicy::Fixed</enum>
+       </property>
+       <property name="sizeHint" >
+        <size>
+         <width>131</width>
+         <height>25</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+    </layout>
    </item>
-   <item row="3" column="0" >
-    <spacer>
-     <property name="orientation" >
-      <enum>Qt::Vertical</enum>
-     </property>
-     <property name="sizeType" >
-      <enum>QSizePolicy::Maximum</enum>
+   <item row="3" column="1" colspan="2" >
+    <layout class="QHBoxLayout" >
+     <property name="margin" >
+      <number>0</number>
      </property>
-     <property name="sizeHint" >
-      <size>
-       <width>572</width>
-       <height>16</height>
-      </size>
+     <property name="spacing" >
+      <number>6</number>
      </property>
-    </spacer>
+     <item>
+      <spacer>
+       <property name="orientation" >
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="sizeHint" >
+        <size>
+         <width>40</width>
+         <height>20</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+     <item>
+      <widget class="QPushButton" name="okButton" >
+       <property name="text" >
+        <string>OK</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QPushButton" name="cancelButton" >
+       <property name="text" >
+        <string>Cancel</string>
+       </property>
+      </widget>
+     </item>
+    </layout>
    </item>
-   <item row="1" column="0" >
-    <spacer>
-     <property name="orientation" >
-      <enum>Qt::Vertical</enum>
-     </property>
-     <property name="sizeType" >
-      <enum>QSizePolicy::Maximum</enum>
+   <item row="2" column="1" >
+    <layout class="QGridLayout" >
+     <property name="margin" >
+      <number>0</number>
      </property>
-     <property name="sizeHint" >
-      <size>
-       <width>572</width>
-       <height>16</height>
-      </size>
+     <property name="spacing" >
+      <number>6</number>
      </property>
-    </spacer>
+     <item row="6" column="1" >
+      <widget class="QDateTimeEdit" name="dateTimeEdit" >
+       <property name="dateTime" >
+        <datetime>
+         <hour>0</hour>
+         <minute>2</minute>
+         <second>0</second>
+         <year>2000</year>
+         <month>1</month>
+         <day>1</day>
+        </datetime>
+       </property>
+       <property name="displayFormat" >
+        <string>yyyy-mm-dd hh:mm:ss</string>
+       </property>
+       <property name="calendarPopup" >
+        <bool>true</bool>
+       </property>
+      </widget>
+     </item>
+     <item row="6" column="0" >
+      <widget class="QLabel" name="label" >
+       <property name="text" >
+        <string>When:</string>
+       </property>
+       <property name="buddy" >
+        <cstring>dateTimeEdit</cstring>
+       </property>
+      </widget>
+     </item>
+     <item row="8" column="0" >
+      <widget class="QLabel" name="label_5" >
+       <property name="text" >
+        <string>Where:</string>
+       </property>
+       <property name="openExternalLinks" >
+        <bool>true</bool>
+       </property>
+       <property name="buddy" >
+        <cstring>where</cstring>
+       </property>
+      </widget>
+     </item>
+     <item row="7" column="0" >
+      <widget class="QLabel" name="label_12" >
+       <property name="text" >
+        <string>Bootstrap:</string>
+       </property>
+       <property name="buddy" >
+        <cstring>bootstrap</cstring>
+       </property>
+      </widget>
+     </item>
+     <item row="1" column="1" >
+      <widget class="QComboBox" name="clientCombo" />
+     </item>
+     <item row="4" column="1" >
+      <widget class="QComboBox" name="catalogCombo" />
+     </item>
+     <item row="0" column="0" >
+      <widget class="QLabel" name="label_6" >
+       <property name="text" >
+        <string>Job:</string>
+       </property>
+       <property name="buddy" >
+        <cstring>jobCombo</cstring>
+       </property>
+      </widget>
+     </item>
+     <item row="8" column="1" >
+      <widget class="QLineEdit" name="where" >
+       <property name="enabled" >
+        <bool>false</bool>
+       </property>
+       <property name="minimumSize" >
+        <size>
+         <width>200</width>
+         <height>0</height>
+        </size>
+       </property>
+       <property name="readOnly" >
+        <bool>false</bool>
+       </property>
+      </widget>
+     </item>
+     <item row="3" column="0" >
+      <widget class="QLabel" name="label_2" >
+       <property name="text" >
+        <string>Storage:</string>
+       </property>
+       <property name="buddy" >
+        <cstring>storageCombo</cstring>
+       </property>
+      </widget>
+     </item>
+     <item row="2" column="0" >
+      <widget class="QLabel" name="label_9" >
+       <property name="text" >
+        <string>FileSet:</string>
+       </property>
+       <property name="buddy" >
+        <cstring>filesetCombo</cstring>
+       </property>
+      </widget>
+     </item>
+     <item row="7" column="1" >
+      <widget class="QLineEdit" name="bootstrap" >
+       <property name="enabled" >
+        <bool>false</bool>
+       </property>
+       <property name="minimumSize" >
+        <size>
+         <width>200</width>
+         <height>0</height>
+        </size>
+       </property>
+       <property name="readOnly" >
+        <bool>false</bool>
+       </property>
+      </widget>
+     </item>
+     <item row="2" column="1" >
+      <widget class="QComboBox" name="filesetCombo" />
+     </item>
+     <item row="3" column="1" >
+      <widget class="QComboBox" name="storageCombo" />
+     </item>
+     <item row="0" column="1" >
+      <widget class="QComboBox" name="jobCombo" />
+     </item>
+     <item row="5" column="0" >
+      <widget class="QLabel" name="label_13" >
+       <property name="text" >
+        <string>Replace:</string>
+       </property>
+      </widget>
+     </item>
+     <item row="5" column="1" >
+      <widget class="QComboBox" name="replaceCombo" />
+     </item>
+     <item row="1" column="0" >
+      <widget class="QLabel" name="label_8" >
+       <property name="text" >
+        <string>Client:</string>
+       </property>
+       <property name="buddy" >
+        <cstring>clientCombo</cstring>
+       </property>
+      </widget>
+     </item>
+     <item row="4" column="0" >
+      <widget class="QLabel" name="label_10" >
+       <property name="text" >
+        <string>Catalog:</string>
+       </property>
+       <property name="buddy" >
+        <cstring>catalogCombo</cstring>
+       </property>
+      </widget>
+     </item>
+    </layout>
    </item>
-   <item row="2" column="0" >
-    <layout class="QHBoxLayout" >
+   <item row="2" column="2" >
+    <layout class="QVBoxLayout" >
      <property name="margin" >
       <number>0</number>
      </property>
        <property name="spacing" >
         <number>6</number>
        </property>
-       <item row="6" column="1" >
-        <widget class="QDateTimeEdit" name="dateTimeEdit" >
-         <property name="dateTime" >
-          <datetime>
-           <hour>0</hour>
-           <minute>2</minute>
-           <second>0</second>
-           <year>2000</year>
-           <month>1</month>
-           <day>1</day>
-          </datetime>
-         </property>
-         <property name="displayFormat" >
-          <string>yyyy-mm-dd hh:mm:ss</string>
-         </property>
-         <property name="calendarPopup" >
-          <bool>true</bool>
-         </property>
-        </widget>
-       </item>
-       <item row="6" column="0" >
-        <widget class="QLabel" name="label" >
-         <property name="text" >
-          <string>When:</string>
-         </property>
-         <property name="buddy" >
-          <cstring>dateTimeEdit</cstring>
-         </property>
-        </widget>
-       </item>
-       <item row="8" column="0" >
-        <widget class="QLabel" name="label_5" >
-         <property name="text" >
-          <string>Where:</string>
-         </property>
-         <property name="openExternalLinks" >
-          <bool>true</bool>
-         </property>
-         <property name="buddy" >
-          <cstring>where</cstring>
-         </property>
-        </widget>
-       </item>
-       <item row="7" column="0" >
-        <widget class="QLabel" name="label_12" >
-         <property name="text" >
-          <string>Bootstrap:</string>
-         </property>
-         <property name="buddy" >
-          <cstring>bootstrap</cstring>
-         </property>
-        </widget>
-       </item>
        <item row="1" column="1" >
-        <widget class="QComboBox" name="clientCombo" />
-       </item>
-       <item row="4" column="1" >
-        <widget class="QComboBox" name="catalogCombo" />
-       </item>
-       <item row="0" column="0" >
-        <widget class="QLabel" name="label_6" >
-         <property name="text" >
-          <string>Job:</string>
+        <widget class="QSpinBox" name="prioritySpin" >
+         <property name="maximum" >
+          <number>10000</number>
          </property>
-         <property name="buddy" >
-          <cstring>jobCombo</cstring>
+         <property name="minimum" >
+          <number>1</number>
          </property>
-        </widget>
-       </item>
-       <item row="8" column="1" >
-        <widget class="QLineEdit" name="where" >
-         <property name="enabled" >
-          <bool>false</bool>
-         </property>
-         <property name="minimumSize" >
-          <size>
-           <width>200</width>
-           <height>0</height>
-          </size>
-         </property>
-         <property name="readOnly" >
-          <bool>false</bool>
+         <property name="value" >
+          <number>10</number>
          </property>
         </widget>
        </item>
-       <item row="3" column="0" >
-        <widget class="QLabel" name="label_2" >
-         <property name="text" >
-          <string>Storage:</string>
-         </property>
-         <property name="buddy" >
-          <cstring>storageCombo</cstring>
-         </property>
-        </widget>
-       </item>
-       <item row="2" column="0" >
-        <widget class="QLabel" name="label_9" >
-         <property name="text" >
-          <string>FileSet:</string>
-         </property>
-         <property name="buddy" >
-          <cstring>filesetCombo</cstring>
-         </property>
-        </widget>
-       </item>
-       <item row="7" column="1" >
-        <widget class="QLineEdit" name="bootstrap" >
-         <property name="enabled" >
-          <bool>false</bool>
+       <item row="0" column="1" >
+        <widget class="QComboBox" name="typeCombo" >
+         <property name="sizePolicy" >
+          <sizepolicy>
+           <hsizetype>5</hsizetype>
+           <vsizetype>0</vsizetype>
+           <horstretch>0</horstretch>
+           <verstretch>0</verstretch>
+          </sizepolicy>
          </property>
          <property name="minimumSize" >
           <size>
-           <width>200</width>
+           <width>150</width>
            <height>0</height>
           </size>
          </property>
-         <property name="readOnly" >
-          <bool>false</bool>
-         </property>
-        </widget>
-       </item>
-       <item row="2" column="1" >
-        <widget class="QComboBox" name="filesetCombo" />
-       </item>
-       <item row="3" column="1" >
-        <widget class="QComboBox" name="storageCombo" />
-       </item>
-       <item row="0" column="1" >
-        <widget class="QComboBox" name="jobCombo" />
-       </item>
-       <item row="5" column="0" >
-        <widget class="QLabel" name="label_13" >
-         <property name="text" >
-          <string>Replace:</string>
-         </property>
         </widget>
        </item>
-       <item row="5" column="1" >
-        <widget class="QComboBox" name="replaceCombo" />
-       </item>
        <item row="1" column="0" >
-        <widget class="QLabel" name="label_8" >
+        <widget class="QLabel" name="label_4" >
          <property name="text" >
-          <string>Client:</string>
+          <string>Priority:</string>
          </property>
          <property name="buddy" >
-          <cstring>clientCombo</cstring>
+          <cstring>prioritySpin</cstring>
          </property>
         </widget>
        </item>
-       <item row="4" column="0" >
-        <widget class="QLabel" name="label_10" >
+       <item row="0" column="0" >
+        <widget class="QLabel" name="label_7" >
          <property name="text" >
-          <string>Catalog:</string>
+          <string>Type:</string>
          </property>
          <property name="buddy" >
-          <cstring>catalogCombo</cstring>
+          <cstring>typeCombo</cstring>
          </property>
         </widget>
        </item>
       </layout>
      </item>
-     <item>
-      <layout class="QVBoxLayout" >
-       <property name="margin" >
-        <number>0</number>
-       </property>
-       <property name="spacing" >
-        <number>6</number>
-       </property>
-       <item>
-        <layout class="QGridLayout" >
-         <property name="margin" >
-          <number>0</number>
-         </property>
-         <property name="spacing" >
-          <number>6</number>
-         </property>
-         <item row="1" column="1" >
-          <widget class="QSpinBox" name="prioritySpin" >
-           <property name="maximum" >
-            <number>10000</number>
-           </property>
-           <property name="minimum" >
-            <number>1</number>
-           </property>
-           <property name="value" >
-            <number>10</number>
-           </property>
-          </widget>
-         </item>
-         <item row="0" column="1" >
-          <widget class="QComboBox" name="typeCombo" >
-           <property name="sizePolicy" >
-            <sizepolicy>
-             <hsizetype>5</hsizetype>
-             <vsizetype>0</vsizetype>
-             <horstretch>0</horstretch>
-             <verstretch>0</verstretch>
-            </sizepolicy>
-           </property>
-           <property name="minimumSize" >
-            <size>
-             <width>150</width>
-             <height>0</height>
-            </size>
-           </property>
-          </widget>
-         </item>
-         <item row="1" column="0" >
-          <widget class="QLabel" name="label_4" >
-           <property name="text" >
-            <string>Priority:</string>
-           </property>
-           <property name="buddy" >
-            <cstring>prioritySpin</cstring>
-           </property>
-          </widget>
-         </item>
-         <item row="0" column="0" >
-          <widget class="QLabel" name="label_7" >
-           <property name="text" >
-            <string>Type:</string>
-           </property>
-           <property name="buddy" >
-            <cstring>typeCombo</cstring>
-           </property>
-          </widget>
-         </item>
-        </layout>
-       </item>
-       <item>
-        <spacer>
-         <property name="orientation" >
-          <enum>Qt::Vertical</enum>
-         </property>
-         <property name="sizeHint" >
-          <size>
-           <width>20</width>
-           <height>171</height>
-          </size>
-         </property>
-        </spacer>
-       </item>
-      </layout>
-     </item>
-    </layout>
-   </item>
-   <item row="0" column="0" >
-    <layout class="QHBoxLayout" >
-     <property name="margin" >
-      <number>0</number>
-     </property>
-     <property name="spacing" >
-      <number>6</number>
-     </property>
      <item>
       <spacer>
        <property name="orientation" >
-        <enum>Qt::Horizontal</enum>
-       </property>
-       <property name="sizeType" >
-        <enum>QSizePolicy::Fixed</enum>
+        <enum>Qt::Vertical</enum>
        </property>
        <property name="sizeHint" >
         <size>
-         <width>131</width>
-         <height>25</height>
+         <width>20</width>
+         <height>171</height>
         </size>
        </property>
       </spacer>
      </item>
-     <item>
-      <widget class="QLabel" name="run" >
-       <property name="maximumSize" >
-        <size>
-         <width>16777215</width>
-         <height>30</height>
-        </size>
-       </property>
-       <property name="text" >
-        <string/>
-       </property>
-      </widget>
-     </item>
     </layout>
    </item>
+   <item row="0" column="1" colspan="2" >
+    <spacer>
+     <property name="orientation" >
+      <enum>Qt::Vertical</enum>
+     </property>
+     <property name="sizeType" >
+      <enum>QSizePolicy::MinimumExpanding</enum>
+     </property>
+     <property name="sizeHint" >
+      <size>
+       <width>572</width>
+       <height>16</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+   <item rowspan="3" row="1" column="3" >
+    <spacer>
+     <property name="orientation" >
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <property name="sizeHint" >
+      <size>
+       <width>40</width>
+       <height>20</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+   <item rowspan="3" row="1" column="0" >
+    <spacer>
+     <property name="orientation" >
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <property name="sizeHint" >
+      <size>
+       <width>40</width>
+       <height>20</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+   <item row="4" column="1" colspan="2" >
+    <spacer>
+     <property name="orientation" >
+      <enum>Qt::Vertical</enum>
+     </property>
+     <property name="sizeType" >
+      <enum>QSizePolicy::MinimumExpanding</enum>
+     </property>
+     <property name="sizeHint" >
+      <size>
+       <width>572</width>
+       <height>16</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
   </layout>
  </widget>
  <resources/>
- <connections>
-  <connection>
-   <sender>buttonBox</sender>
-   <signal>accepted()</signal>
-   <receiver>runCmdForm</receiver>
-   <slot>accept()</slot>
-   <hints>
-    <hint type="sourcelabel" >
-     <x>258</x>
-     <y>480</y>
-    </hint>
-    <hint type="destinationlabel" >
-     <x>157</x>
-     <y>274</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>buttonBox</sender>
-   <signal>rejected()</signal>
-   <receiver>runCmdForm</receiver>
-   <slot>reject()</slot>
-   <hints>
-    <hint type="sourcelabel" >
-     <x>326</x>
-     <y>480</y>
-    </hint>
-    <hint type="destinationlabel" >
-     <x>286</x>
-     <y>274</y>
-    </hint>
-   </hints>
-  </connection>
- </connections>
+ <connections/>
 </ui>
index 2de0b053654fc8280525b46b308c40cc8f13f9e0..7d63e15cf80e90f6ea3e3aa33bda5e07265bc28b 100644 (file)
@@ -239,7 +239,7 @@ void Storage::consoleStatusStorage()
 /* Label Media populating current storage by default */
 void Storage::consoleLabelStorage()
 {
-   new labelDialog(m_console, m_currentStorage);
+   new labelPage(m_currentStorage);
 }
 
 /* Mount currently selected storage */