]> git.sur5r.net Git - bacula/bacula/commitdiff
Create first cut prerestore and restore dialogs
authorKern Sibbald <kern@sibbald.com>
Mon, 12 Feb 2007 10:39:38 +0000 (10:39 +0000)
committerKern Sibbald <kern@sibbald.com>
Mon, 12 Feb 2007 10:39:38 +0000 (10:39 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@4168 91ce42f0-d328-0410-95d8-f526ca767f89

16 files changed:
bacula/src/qt-console/Makefile
bacula/src/qt-console/bat.h
bacula/src/qt-console/bat.pro
bacula/src/qt-console/bat_conf.cpp
bacula/src/qt-console/console/console.cpp
bacula/src/qt-console/console/console.h
bacula/src/qt-console/console/console.ui
bacula/src/qt-console/main.cpp
bacula/src/qt-console/mainwin.cpp
bacula/src/qt-console/mainwin.h
bacula/src/qt-console/restore/brestore.cpp
bacula/src/qt-console/restore/prerestore.ui [new file with mode: 0644]
bacula/src/qt-console/restore/restore-select.ui [deleted file]
bacula/src/qt-console/restore/restore.cpp [new file with mode: 0644]
bacula/src/qt-console/restore/restore.h
bacula/src/qt-console/restore/restore.ui

index fa5deb368a09cda175dfa84dbc5d4b1a7f52e83f..a36f765e4878d3fa78199206794dc8683718f53e 100644 (file)
@@ -1,6 +1,6 @@
 #############################################################################
 # Makefile for building: bat
-# Generated by qmake (2.01a) (Qt 4.2.1) on: Sun Feb 11 21:06:09 2007
+# Generated by qmake (2.01a) (Qt 4.2.1) on: Sun Feb 11 21:47:13 2007
 # Project:  bat.pro
 # Template: app
 # Command: /usr/bin/qmake -unix -o Makefile bat.pro
@@ -51,6 +51,7 @@ SOURCES       = main.cpp \
                qstd.cpp \
                console/authenticate.cpp \
                console/console.cpp \
+               restore/restore.cpp \
                restore/brestore.cpp \
                label/label.cpp \
                run/run.cpp moc/moc_mainwin.cpp \
@@ -65,6 +66,7 @@ OBJECTS       = obj/main.o \
                obj/qstd.o \
                obj/authenticate.o \
                obj/console.o \
+               obj/restore.o \
                obj/brestore.o \
                obj/label.o \
                obj/run.o \
@@ -119,7 +121,7 @@ first: all
 
 all: Makefile $(TARGET)
 
-$(TARGET): ui_main.h ui_label.h ui_console.h ui_brestore.h ui_restore.h ui_restore-select.h ui_run.h $(OBJECTS)  
+$(TARGET): ui_main.h ui_label.h ui_console.h ui_restore.h ui_prerestore.h ui_brestore.h ui_run.h $(OBJECTS)  
        $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS)
 
 Makefile: bat.pro  /usr/share/qt4/mkspecs/default/qmake.conf /usr/share/qt4/mkspecs/common/unix.conf \
@@ -164,7 +166,7 @@ qmake:  FORCE
 
 dist: 
        @$(CHK_DIR_EXISTS) obj/bat1.0.0 || $(MKDIR) obj/bat1.0.0 
-       $(COPY_FILE) --parents $(SOURCES) $(DIST) obj/bat1.0.0/ && $(COPY_FILE) --parents mainwin.h bat.h bat_conf.h qstd.h console/console.h restore/restore.h label/label.h run/run.h obj/bat1.0.0/ && $(COPY_FILE) --parents main.qrc obj/bat1.0.0/ && $(COPY_FILE) --parents main.cpp bat_conf.cpp mainwin.cpp qstd.cpp console/authenticate.cpp console/console.cpp restore/brestore.cpp label/label.cpp run/run.cpp obj/bat1.0.0/ && $(COPY_FILE) --parents main.ui label/label.ui console/console.ui restore/brestore.ui restore/restore.ui restore/restore-select.ui run/run.ui obj/bat1.0.0/ && (cd `dirname obj/bat1.0.0` && $(TAR) bat1.0.0.tar bat1.0.0 && $(COMPRESS) bat1.0.0.tar) && $(MOVE) `dirname obj/bat1.0.0`/bat1.0.0.tar.gz . && $(DEL_FILE) -r obj/bat1.0.0
+       $(COPY_FILE) --parents $(SOURCES) $(DIST) obj/bat1.0.0/ && $(COPY_FILE) --parents mainwin.h bat.h bat_conf.h qstd.h console/console.h restore/restore.h label/label.h run/run.h obj/bat1.0.0/ && $(COPY_FILE) --parents main.qrc obj/bat1.0.0/ && $(COPY_FILE) --parents main.cpp bat_conf.cpp mainwin.cpp qstd.cpp console/authenticate.cpp console/console.cpp restore/restore.cpp restore/brestore.cpp label/label.cpp run/run.cpp obj/bat1.0.0/ && $(COPY_FILE) --parents main.ui label/label.ui console/console.ui restore/restore.ui restore/prerestore.ui restore/brestore.ui run/run.ui obj/bat1.0.0/ && (cd `dirname obj/bat1.0.0` && $(TAR) bat1.0.0.tar bat1.0.0 && $(COMPRESS) bat1.0.0.tar) && $(MOVE) `dirname obj/bat1.0.0`/bat1.0.0.tar.gz . && $(DEL_FILE) -r obj/bat1.0.0
 
 
 yaccclean:
@@ -206,6 +208,8 @@ moc/moc_console.cpp: ui_console.h \
        /usr/bin/moc $(DEFINES) $(INCPATH) console/console.h -o moc/moc_console.cpp
 
 moc/moc_restore.cpp: ui_brestore.h \
+               ui_restore.h \
+               ui_prerestore.h \
                restore/restore.h \
                /usr/bin/moc
        /usr/bin/moc $(DEFINES) $(INCPATH) restore/restore.h -o moc/moc_restore.cpp
@@ -246,9 +250,9 @@ compiler_image_collection_clean:
        -$(DEL_FILE) qmake_image_collection.cpp
 compiler_moc_source_make_all:
 compiler_moc_source_clean:
-compiler_uic_make_all: ui_main.h ui_label.h ui_console.h ui_brestore.h ui_restore.h ui_restore-select.h ui_run.h
+compiler_uic_make_all: ui_main.h ui_label.h ui_console.h ui_restore.h ui_prerestore.h ui_brestore.h ui_run.h
 compiler_uic_clean:
-       -$(DEL_FILE) ui_main.h ui_label.h ui_console.h ui_brestore.h ui_restore.h ui_restore-select.h ui_run.h
+       -$(DEL_FILE) ui_main.h ui_label.h ui_console.h ui_restore.h ui_prerestore.h ui_brestore.h ui_run.h
 ui_main.h: main.ui
        /usr/bin/uic main.ui -o ui_main.h
 
@@ -258,14 +262,14 @@ ui_label.h: label/label.ui
 ui_console.h: console/console.ui
        /usr/bin/uic console/console.ui -o ui_console.h
 
-ui_brestore.h: restore/brestore.ui
-       /usr/bin/uic restore/brestore.ui -o ui_brestore.h
-
 ui_restore.h: restore/restore.ui
        /usr/bin/uic restore/restore.ui -o ui_restore.h
 
-ui_restore-select.h: restore/restore-select.ui
-       /usr/bin/uic restore/restore-select.ui -o ui_restore-select.h
+ui_prerestore.h: restore/prerestore.ui
+       /usr/bin/uic restore/prerestore.ui -o ui_prerestore.h
+
+ui_brestore.h: restore/brestore.ui
+       /usr/bin/uic restore/brestore.ui -o ui_brestore.h
 
 ui_run.h: run/run.ui
        /usr/bin/uic run/run.ui -o ui_run.h
@@ -326,6 +330,21 @@ obj/console.o: console/console.cpp bat.h \
                ui_console.h
        $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/console.o console/console.cpp
 
+obj/restore.o: restore/restore.cpp bat.h \
+               mainwin.h \
+               ui_main.h \
+               label/label.h \
+               ui_label.h \
+               run/run.h \
+               ui_run.h \
+               bat_conf.h \
+               qstd.h \
+               restore/restore.h \
+               ui_brestore.h \
+               ui_restore.h \
+               ui_prerestore.h
+       $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/restore.o restore/restore.cpp
+
 obj/brestore.o: restore/brestore.cpp bat.h \
                mainwin.h \
                ui_main.h \
@@ -336,7 +355,9 @@ obj/brestore.o: restore/brestore.cpp bat.h \
                bat_conf.h \
                qstd.h \
                restore/restore.h \
-               ui_brestore.h
+               ui_brestore.h \
+               ui_restore.h \
+               ui_prerestore.h
        $(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/brestore.o restore/brestore.cpp
 
 obj/label.o: label/label.cpp bat.h \
index 06b4fdb57850653d6202ad4155ab042d27582de4..e54064e040974d91e664a2265f625927f0ddb57c 100644 (file)
@@ -1,7 +1,39 @@
-
 #ifndef _BAT_H_
 #define _BAT_H_
 
+/*
+   Bacula® - The Network Backup Solution
+
+   Copyright (C) 2000-2007 Free Software Foundation Europe e.V.
+
+   The main author of Bacula is Kern Sibbald, with contributions from
+   many others, a complete list can be found in the file AUTHORS.
+   This program is Free Software; you can redistribute it and/or
+   modify it under the terms of version two of the GNU General Public
+   License as published by the Free Software Foundation plus additions
+   that are listed in the file LICENSE.
+
+   This program is distributed in the hope that it will be useful, but
+   WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+   General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+   02110-1301, USA.
+
+   Bacula® is a registered trademark of John Walker.
+   The licensor of Bacula is the Free Software Foundation Europe
+   (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
+   Switzerland, email:ftf@fsfeurope.org.
+*/
+/*
+ *   Version $Id$
+ *
+ *   Kern Sibbald, January 2007
+ */
+
 #include "mainwin.h"
 #include "config.h"
 #include "bacula.h"
index b23aab5a3e842852a7f9afb00c00ab4ea6e3120e..7959015474b18266a91d7e9e38a01142ff6c6664 100644 (file)
@@ -18,8 +18,7 @@ OBJECTS_DIR = obj
 FORMS += main.ui
 FORMS += label/label.ui
 FORMS += console/console.ui
-FORMS += restore/brestore.ui
-FORMS += restore/restore.ui restore/restore-select.ui
+FORMS += restore/restore.ui restore/prerestore.ui restore/brestore.ui
 FORMS += run/run.ui
 
 
@@ -32,7 +31,7 @@ SOURCES += console/authenticate.cpp console/console.cpp
 
 # Restore
 HEADERS += restore/restore.h
-SOURCES += restore/brestore.cpp
+SOURCES += restore/restore.cpp restore/brestore.cpp
 
 # Label dialog
 HEADERS += label/label.h
index c7537b786352860353566cd32f79661437102d6c..88457be53f87d15d8a85909e42eaaf21edb010cf 100644 (file)
@@ -1,26 +1,3 @@
-/*
- *   Main configuration file parser for Bacula User Agent
- *    some parts may be split into separate files such as
- *    the schedule configuration (sch_config.c).
- *
- *   Note, the configuration file parser consists of three parts
- *
- *   1. The generic lexical scanner in lib/lex.c and lib/lex.h
- *
- *   2. The generic config  scanner in lib/parse_config.c and
- *      lib/parse_config.h.
- *      These files contain the parser code, some utility
- *      routines, and the common store routines (name, int,
- *      string).
- *
- *   3. The daemon specific file, which contains the Resource
- *      definitions as well as any specific store routines
- *      for the resource records.
- *
- *     Kern Sibbald, January MM, September MM
- *
- *     Version $Id$
- */
 /*
    Bacula® - The Network Backup Solution
 
    (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
    Switzerland, email:ftf@fsfeurope.org.
 */
+/*
+ *   Main configuration file parser for Bacula User Agent
+ *    some parts may be split into separate files such as
+ *    the schedule configuration (sch_config.c).
+ *
+ *   Note, the configuration file parser consists of three parts
+ *
+ *   1. The generic lexical scanner in lib/lex.c and lib/lex.h
+ *
+ *   2. The generic config  scanner in lib/parse_config.c and
+ *      lib/parse_config.h.
+ *      These files contain the parser code, some utility
+ *      routines, and the common store routines (name, int,
+ *      string).
+ *
+ *   3. The daemon specific file, which contains the Resource
+ *      definitions as well as any specific store routines
+ *      for the resource records.
+ *
+ *     Kern Sibbald, January MM, September MM
+ *
+ *     Version $Id$
+ */
 
 #include "bacula.h"
 #include "bat_conf.h"
index 9ff33183b978324c5b6312510a495c9aacf8caa5..b071f29a93332a53342f8e2b2126a31cf7138cba 100644 (file)
@@ -27,6 +27,8 @@
 */
  
 /*
+ *   Version $Id$
+ *
  *  Console Class
  *
  *   Kern Sibbald, January MMVI
@@ -36,7 +38,6 @@
 #include <QAbstractEventDispatcher>
 #include "bat.h"
 #include "console.h"
-#include "restore.h"
 
 Console::Console(QStackedWidget *parent)
 {
@@ -52,9 +53,9 @@ Console::Console(QStackedWidget *parent)
    m_cursor = new QTextCursor(m_textEdit->document());
    mainWin->actionConnect->setIcon(QIcon(QString::fromUtf8("images/disconnected.png")));
 
-   bRestore *restore = new bRestore(parent);
-   restore->setupUi(restore);
-   parent->addWidget(restore);
+   bRestore *brestore = new bRestore(parent);
+   brestore->setupUi(brestore);
+   parent->addWidget(brestore);
 
    /* Just take the first Director */
    LockRes();
@@ -75,7 +76,7 @@ Console::Console(QStackedWidget *parent)
    QBrush redBrush(Qt::red);
    item->setForeground(0, redBrush);
    item = new QTreeWidgetItem(topItem);
-   item->setText(0, "Restore");
+   item->setText(0, "brestore");
    item->setText(1, "1");
    treeWidget->expandItem(topItem);
 
@@ -177,7 +178,9 @@ QStringList Console::get_list(char *cmd)
    return list;
 }
 
-
+/*
+ * Save user settings
+ */
 void Console::writeSettings()
 {
    QFont font = get_font();
@@ -190,6 +193,9 @@ void Console::writeSettings()
    settings.endGroup();
 }
 
+/*
+ * Read and restore user settings
+ */
 void Console::readSettings()
 { 
    QFont font = get_font();
@@ -203,6 +209,9 @@ void Console::readSettings()
    m_textEdit->setFont(font);
 }
 
+/*
+ * Set the console textEdit font
+ */
 void Console::set_font()
 {
    bool ok;
@@ -212,6 +221,9 @@ void Console::set_font()
    }
 }
 
+/*
+ * Get the console text edit font
+ */
 const QFont Console::get_font()
 {
    return m_textEdit->font();
@@ -223,6 +235,9 @@ void Console::status_dir()
    write_dir("status dir\n");
 }
 
+/*
+ * Put text into the console window
+ */
 void Console::set_textf(const char *fmt, ...)
 {
    va_list arg_ptr;
@@ -255,6 +270,9 @@ void Console::update_cursor()
    m_textEdit->ensureCursorVisible();
 }
 
+/* 
+ * This should be moved into a bSocket class 
+ */
 char *Console::msg()
 {
    if (m_sock) {
index 652a89df8d04a9759e5ea190ef7dd36d0f51b1ac..e31792c53241cbf2b1a2bd86a173778184331885 100644 (file)
@@ -4,6 +4,7 @@
 
 #include <QtGui>
 #include "ui_console.h"
+#include "restore.h"
 
 class DIRRES;
 class BSOCK;
index 2a0521e9765bd446129f406d0a8ca97142a61df5..f491ac74067984b58d726a140ddb44362b1df2be 100644 (file)
@@ -25,6 +25,9 @@
       <set>Qt::AllDockWidgetAreas</set>
      </property>
      <widget class="QWidget" name="dockWidgetContents" >
+      <property name="focusPolicy" >
+       <enum>Qt::StrongFocus</enum>
+      </property>
       <layout class="QGridLayout" >
        <property name="margin" >
         <number>9</number>
index cc993770625c35471be5ce4f93956907b9a91e73..a2260c97fd347548612ae04a6b00af92df9e98c9 100644 (file)
@@ -25,8 +25,9 @@
    (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
    Switzerland, email:ftf@fsfeurope.org.
 */
-
 /*
+ *   Version $Id$
+ *
  *  Main program for bat (qt-console)
  *
  *   Kern Sibbald, January MMVI
index 54627a5ae1a55425fa113d1d7ae7192dc45c8bd8..a75ec9b1175fd5ebdfd7fcffdd6a8351079663cf 100644 (file)
@@ -27,6 +27,8 @@
 */
 
 /*
+ *   Version $Id$
+ *
  *  Main Window control for bat (qt-console)
  *
  *   Kern Sibbald, January MMVI
@@ -76,6 +78,7 @@ void MainWin::createConnections()
    connect(actionSelectFont, SIGNAL(triggered()), m_console, SLOT(set_font()));
    connect(actionLabel, SIGNAL(triggered()), this,  SLOT(labelDialogClicked()));
    connect(actionRun, SIGNAL(triggered()), this,  SLOT(runDialogClicked()));
+   connect(actionRestore, SIGNAL(triggered()), this,  SLOT(restoreDialogClicked()));
 }
 
 /* 
@@ -113,7 +116,7 @@ void MainWin::treeItemClicked(QTreeWidgetItem *item, int column)
 {
    (void)column;
    int index = item->text(1).toInt();
-   if (index >= 0 && index < 2) {
+   if (index >= 0 && index < 4) {
       stackedWidget->setCurrentIndex(index);
    }
 }
@@ -125,7 +128,7 @@ void MainWin::treeItemDoubleClicked(QTreeWidgetItem *item, int column)
    (void)column;
    int index = item->text(1).toInt();
    /* ***FIXME**** make this automatic */
-   if (index >= 0 && index < 2) {
+   if (index >= 0 && index < 4) {
       stackedWidget->setCurrentIndex(index);
    }
 }
@@ -140,6 +143,12 @@ void MainWin::runDialogClicked()
    new runDialog(m_console);
 }
 
+void MainWin::restoreDialogClicked() 
+{
+   new prerestoreDialog(m_console);
+}
+
+
 
 /*
  * The user just finished typing a line in the command line edit box
index e2f2ac3a16186d473ad92f6bf12a1bb720e40d07..f1936f7ef8491b5b999d4a2af632c84146053b84 100644 (file)
@@ -27,6 +27,8 @@
 */
 
 /* 
+ *   Version $Id$
+ *
  * qt-console main window class definition.
  *
  *  Written by Kern Sibbald, January MMVI
@@ -39,6 +41,7 @@
 #include "ui_main.h"
 #include "label/label.h"
 #include "run/run.h"
+#include "restore/restore.h"
 
 class Console;
 
@@ -61,6 +64,7 @@ public slots:
    void treeItemDoubleClicked(QTreeWidgetItem *item, int column);
    void labelDialogClicked();
    void runDialogClicked();
+   void restoreDialogClicked();
 
 protected:
    void closeEvent(QCloseEvent *event);
index 3c43fbdf0df8d73ff184f5580b6877147953ba74..d85cb132c20663041a0ea3c4297ae33b617be0cc 100644 (file)
 */
  
 /*
+ *   Version $Id$
+ *
  *  bRestore Class  (Eric's brestore)
  *
  *   Kern Sibbald, January MMVI
  *
  */ 
 
-#include <QAbstractEventDispatcher>
 #include "bat.h"
 #include "restore.h"
 
diff --git a/bacula/src/qt-console/restore/prerestore.ui b/bacula/src/qt-console/restore/prerestore.ui
new file mode 100644 (file)
index 0000000..57f81b0
--- /dev/null
@@ -0,0 +1,195 @@
+<ui version="4.0" >
+ <class>prerestoreForm</class>
+ <widget class="QDialog" name="prerestoreForm" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>366</width>
+    <height>299</height>
+   </rect>
+  </property>
+  <property name="maximumSize" >
+   <size>
+    <width>500</width>
+    <height>500</height>
+   </size>
+  </property>
+  <property name="focusPolicy" >
+   <enum>Qt::StrongFocus</enum>
+  </property>
+  <property name="windowTitle" >
+   <string>Restore Files</string>
+  </property>
+  <layout class="QVBoxLayout" >
+   <property name="margin" >
+    <number>9</number>
+   </property>
+   <property name="spacing" >
+    <number>6</number>
+   </property>
+   <item>
+    <layout class="QGridLayout" >
+     <property name="margin" >
+      <number>8</number>
+     </property>
+     <property name="spacing" >
+      <number>6</number>
+     </property>
+     <item row="3" 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="1" column="0" >
+      <widget class="QLabel" name="label_2" >
+       <property name="text" >
+        <string>Client:</string>
+       </property>
+       <property name="buddy" >
+        <cstring>clientCombo</cstring>
+       </property>
+      </widget>
+     </item>
+     <item row="2" column="1" >
+      <widget class="QComboBox" name="filesetCombo" />
+     </item>
+     <item row="1" column="1" >
+      <widget class="QComboBox" name="clientCombo" />
+     </item>
+     <item row="4" 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>
+     </item>
+     <item row="2" column="0" >
+      <widget class="QLabel" name="label_3" >
+       <property name="text" >
+        <string>File Set:</string>
+       </property>
+       <property name="buddy" >
+        <cstring>filesetCombo</cstring>
+       </property>
+      </widget>
+     </item>
+     <item row="0" column="0" >
+      <widget class="QLabel" name="label" >
+       <property name="text" >
+        <string>Job:</string>
+       </property>
+       <property name="buddy" >
+        <cstring>jobCombo</cstring>
+       </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>
+       </property>
+      </widget>
+     </item>
+     <item row="5" column="0" >
+      <widget class="QLabel" name="label_6" >
+       <property name="text" >
+        <string>Before:</string>
+       </property>
+       <property name="buddy" >
+        <cstring>beforeDateTime</cstring>
+       </property>
+      </widget>
+     </item>
+     <item row="0" column="1" >
+      <widget class="QComboBox" name="jobCombo" >
+       <property name="sizePolicy" >
+        <sizepolicy>
+         <hsizetype>7</hsizetype>
+         <vsizetype>0</vsizetype>
+         <horstretch>0</horstretch>
+         <verstretch>0</verstretch>
+        </sizepolicy>
+       </property>
+       <property name="maximumSize" >
+        <size>
+         <width>600</width>
+         <height>600</height>
+        </size>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </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>prerestoreForm</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>prerestoreForm</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>
+</ui>
diff --git a/bacula/src/qt-console/restore/restore-select.ui b/bacula/src/qt-console/restore/restore-select.ui
deleted file mode 100644 (file)
index d9f3efa..0000000
+++ /dev/null
@@ -1,190 +0,0 @@
-<ui version="4.0" >
- <class>restoreFileForm</class>
- <widget class="QWidget" name="restoreFileForm" >
-  <property name="geometry" >
-   <rect>
-    <x>0</x>
-    <y>0</y>
-    <width>400</width>
-    <height>300</height>
-   </rect>
-  </property>
-  <property name="windowTitle" >
-   <string>Restore Files Dialog</string>
-  </property>
-  <layout class="QVBoxLayout" >
-   <property name="margin" >
-    <number>9</number>
-   </property>
-   <property name="spacing" >
-    <number>6</number>
-   </property>
-   <item>
-    <layout class="QGridLayout" >
-     <property name="margin" >
-      <number>8</number>
-     </property>
-     <property name="spacing" >
-      <number>6</number>
-     </property>
-     <item row="2" column="0" >
-      <widget class="QLabel" name="label_3" >
-       <property name="text" >
-        <string>File Set:</string>
-       </property>
-       <property name="buddy" >
-        <cstring>filesetCombo</cstring>
-       </property>
-      </widget>
-     </item>
-     <item row="3" column="1" >
-      <widget class="QComboBox" name="poolCombo" />
-     </item>
-     <item row="0" column="1" >
-      <widget class="QComboBox" name="jobCombo" >
-       <property name="sizePolicy" >
-        <sizepolicy>
-         <hsizetype>7</hsizetype>
-         <vsizetype>0</vsizetype>
-         <horstretch>0</horstretch>
-         <verstretch>0</verstretch>
-        </sizepolicy>
-       </property>
-      </widget>
-     </item>
-     <item row="1" column="0" >
-      <widget class="QLabel" name="label_2" >
-       <property name="text" >
-        <string>Client:</string>
-       </property>
-       <property name="buddy" >
-        <cstring>clientCombo</cstring>
-       </property>
-      </widget>
-     </item>
-     <item row="5" column="0" >
-      <widget class="QLabel" name="label_6" >
-       <property name="text" >
-        <string>Before:</string>
-       </property>
-       <property name="buddy" >
-        <cstring>dateTimeEdit</cstring>
-       </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>
-       </property>
-      </widget>
-     </item>
-     <item row="4" column="1" >
-      <widget class="QComboBox" name="storageCombo" />
-     </item>
-     <item row="3" 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="1" column="1" >
-      <widget class="QComboBox" name="clientCombo" />
-     </item>
-     <item row="5" column="1" >
-      <widget class="QDateTimeEdit" name="dateTimeEdit" >
-       <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>
-     </item>
-     <item row="0" column="0" >
-      <widget class="QLabel" name="label" >
-       <property name="text" >
-        <string>Job:</string>
-       </property>
-       <property name="buddy" >
-        <cstring>jobCombo</cstring>
-       </property>
-      </widget>
-     </item>
-     <item row="2" column="1" >
-      <widget class="QComboBox" name="filesetCombo" />
-     </item>
-    </layout>
-   </item>
-   <item>
-    <layout class="QHBoxLayout" >
-     <property name="margin" >
-      <number>8</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="nextButton" >
-       <property name="text" >
-        <string>Next</string>
-       </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>21</height>
-        </size>
-       </property>
-      </spacer>
-     </item>
-     <item>
-      <widget class="QPushButton" name="cancelButton" >
-       <property name="text" >
-        <string>Cancel</string>
-       </property>
-      </widget>
-     </item>
-    </layout>
-   </item>
-  </layout>
- </widget>
- <resources/>
- <connections/>
-</ui>
diff --git a/bacula/src/qt-console/restore/restore.cpp b/bacula/src/qt-console/restore/restore.cpp
new file mode 100644 (file)
index 0000000..58973fb
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+   Bacula® - The Network Backup Solution
+
+   Copyright (C) 2000-2007 Free Software Foundation Europe e.V.
+
+   The main author of Bacula is Kern Sibbald, with contributions from
+   many others, a complete list can be found in the file AUTHORS.
+   This program is Free Software; you can redistribute it and/or
+   modify it under the terms of version two of the GNU General Public
+   License as published by the Free Software Foundation plus additions
+   that are listed in the file LICENSE.
+
+   This program is distributed in the hope that it will be useful, but
+   WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+   General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+   02110-1301, USA.
+
+   Bacula® is a registered trademark of John Walker.
+   The licensor of Bacula is the Free Software Foundation Europe
+   (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
+   Switzerland, email:ftf@fsfeurope.org.
+*/
+/*
+ *   Version $Id: $
+ *
+ *  Restore Class  (Eric's brestore)
+ *
+ *   Kern Sibbald, February MMVI
+ *
+ */ 
+
+#include "bat.h"
+#include "restore.h"
+
+restoreDialog::restoreDialog(Console *parent)
+{
+   setupUi(this);
+   this->show();
+}
+
+prerestoreDialog::prerestoreDialog(Console *parent)
+{
+   setupUi(this);
+   this->show();
+}
index 682e3e625948188e786305334b245ebe459470d4..b1b43f495d34c3f903f7faa5438cb0bc03518db6 100644 (file)
@@ -1,9 +1,72 @@
-
 #ifndef _RESTORE_H_
 #define _RESTORE_H_
 
+/*
+   Bacula® - The Network Backup Solution
+
+   Copyright (C) 2000-2007 Free Software Foundation Europe e.V.
+
+   The main author of Bacula is Kern Sibbald, with contributions from
+   many others, a complete list can be found in the file AUTHORS.
+   This program is Free Software; you can redistribute it and/or
+   modify it under the terms of version two of the GNU General Public
+   License as published by the Free Software Foundation plus additions
+   that are listed in the file LICENSE.
+
+   This program is distributed in the hope that it will be useful, but
+   WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+   General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+   02110-1301, USA.
+
+   Bacula® is a registered trademark of John Walker.
+   The licensor of Bacula is the Free Software Foundation Europe
+   (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
+   Switzerland, email:ftf@fsfeurope.org.
+*/
+/*
+ *   Version $Id$
+ *
+ *  Kern Sibbald, February 2007
+ */
+
 #include <QtGui>
 #include "ui_brestore.h"
+#include "ui_restore.h"
+#include "ui_prerestore.h"
+
+class Console;
+
+class prerestoreDialog : public QDialog, public Ui::prerestoreForm
+{
+   Q_OBJECT 
+
+public:
+   prerestoreDialog(Console *parent);
+
+public slots:
+
+private:
+
+};
+
+class restoreDialog : public QDialog, public Ui::restoreForm
+{
+   Q_OBJECT 
+
+public:
+   restoreDialog(Console *parent);
+
+public slots:
+
+private:
+
+};
+
 
 class bRestore : public QWidget, public Ui::bRestoreForm
 {
@@ -18,4 +81,6 @@ private:
 
 };
 
+
+
 #endif /* _RESTORE_H_ */
index 9b2dfe64254361bbe586388266786444c350bf63..4f1136525a6f2047404280f47cd50ac58bb92a66 100644 (file)
@@ -1,12 +1,12 @@
 <ui version="4.0" >
  <class>restoreForm</class>
- <widget class="QWidget" name="restoreForm" >
+ <widget class="QDialog" name="restoreForm" >
   <property name="geometry" >
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>693</width>
-    <height>366</height>
+    <width>1047</width>
+    <height>764</height>
    </rect>
   </property>
   <property name="windowTitle" >
      <property name="orientation" >
       <enum>Qt::Horizontal</enum>
      </property>
-     <widget class="QTreeWidget" name="treeWidget" />
-     <widget class="QTreeWidget" name="fileWidget" />
+     <widget class="QTreeWidget" name="treeWidget" >
+      <property name="sizePolicy" >
+       <sizepolicy>
+        <hsizetype>5</hsizetype>
+        <vsizetype>7</vsizetype>
+        <horstretch>0</horstretch>
+        <verstretch>0</verstretch>
+       </sizepolicy>
+      </property>
+      <property name="minimumSize" >
+       <size>
+        <width>0</width>
+        <height>0</height>
+       </size>
+      </property>
+      <property name="maximumSize" >
+       <size>
+        <width>16777215</width>
+        <height>16777215</height>
+       </size>
+      </property>
+      <property name="sizeIncrement" >
+       <size>
+        <width>0</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>188</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="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>
        </property>
        <property name="sizeHint" >
         <size>
-         <width>60</width>
+         <width>30</width>
          <height>20</height>
         </size>
        </property>
       </spacer>
      </item>
      <item>
-      <widget class="QPushButton" name="okButton" >
-       <property name="text" >
-        <string>OK</string>
-       </property>
-      </widget>
-     </item>
-     <item>
-      <spacer>
+      <widget class="QDialogButtonBox" name="buttonBox" >
        <property name="orientation" >
         <enum>Qt::Horizontal</enum>
        </property>
-       <property name="sizeType" >
-        <enum>QSizePolicy::Fixed</enum>
-       </property>
-       <property name="sizeHint" >
-        <size>
-         <width>31</width>
-         <height>20</height>
-        </size>
-       </property>
-      </spacer>
-     </item>
-     <item>
-      <widget class="QPushButton" name="cancelButton" >
-       <property name="text" >
-        <string>Cancel</string>
+       <property name="standardButtons" >
+        <set>QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok</set>
        </property>
       </widget>
      </item>
   </layout>
  </widget>
  <resources/>
- <connections/>
+ <connections>
+  <connection>
+   <sender>buttonBox</sender>
+   <signal>accepted()</signal>
+   <receiver>restoreForm</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>restoreForm</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>
 </ui>