]> git.sur5r.net Git - bacula/bacula/commitdiff
Add brestore page
authorKern Sibbald <kern@sibbald.com>
Sat, 3 Feb 2007 13:01:19 +0000 (13:01 +0000)
committerKern Sibbald <kern@sibbald.com>
Sat, 3 Feb 2007 13:01:19 +0000 (13:01 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@4092 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/src/qt-console/Makefile
bacula/src/qt-console/bat.pro
bacula/src/qt-console/console/console.cpp
bacula/src/qt-console/restore/brestore.cpp [new file with mode: 0644]
bacula/src/qt-console/restore/brestore.ui [new file with mode: 0644]
bacula/src/qt-console/restore/restore.h [new file with mode: 0644]

index a15efb5ef16f8cffe2ecda9f3fc5a8a05ce3d21a..2855bb4935ccde3cb158217f60157081cbbf4d2d 100644 (file)
@@ -1,6 +1,6 @@
 #############################################################################
 # Makefile for building: bat
-# Generated by qmake (2.01a) (Qt 4.2.1) on: Sat Feb 3 11:19:57 2007
+# Generated by qmake (2.01a) (Qt 4.2.1) on: Sat Feb 3 13:49:24 2007
 # Project:  bat.pro
 # Template: app
 # Command: /usr/bin/qmake -unix -o Makefile bat.pro
@@ -17,7 +17,7 @@ CFLAGS        = -pipe -O2 -Wall -W -D_REENTRANT  $(DEFINES)
 CXXFLAGS      = -pipe -O2 -Wall -W -D_REENTRANT  $(DEFINES)
 LEXFLAGS      = 
 YACCFLAGS     = -d
-INCPATH       = -I/usr/share/qt4/mkspecs/default -I. -I/usr/include/QtCore -I/usr/include/QtCore -I/usr/include/QtGui -I/usr/include/QtGui -I/usr/include -I. -Iconsole -I.. -I. -I.
+INCPATH       = -I/usr/share/qt4/mkspecs/default -I. -I/usr/include/QtCore -I/usr/include/QtCore -I/usr/include/QtGui -I/usr/include/QtGui -I/usr/include -I. -Iconsole -Irestore -I.. -I. -I.
 LINK          = g++
 LFLAGS        = 
 LIBS          = $(SUBLIBS)  -L/usr/lib -L../lib -lbac -lssl -lcrypto -lQtGui -L/usr/lib -L/usr/X11R6/lib -lpng -lSM -lICE -lXi -lXrender -lXrandr -lXfixes -lXcursor -lXinerama -lfreetype -lfontconfig -lXext -lX11 -lQtCore -lz -lm -ldl -lpthread
@@ -49,16 +49,20 @@ SOURCES       = main.cpp \
                bat_conf.cpp \
                mainwin.cpp \
                console/authenticate.cpp \
-               console/console.cpp moc_mainwin.cpp \
+               console/console.cpp \
+               restore/brestore.cpp moc_mainwin.cpp \
                moc_console.cpp \
+               moc_restore.cpp \
                qrc_main.cpp
 OBJECTS       = main.o \
                bat_conf.o \
                mainwin.o \
                authenticate.o \
                console.o \
+               brestore.o \
                moc_mainwin.o \
                moc_console.o \
+               moc_restore.o \
                qrc_main.o
 DIST          = /usr/share/qt4/mkspecs/common/unix.conf \
                /usr/share/qt4/mkspecs/common/g++.conf \
@@ -105,7 +109,7 @@ first: all
 
 all: Makefile $(TARGET)
 
-$(TARGET): ui_main.h ui_label.h ui_console.h $(OBJECTS)  
+$(TARGET): ui_main.h ui_label.h ui_console.h ui_brestore.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 \
@@ -150,7 +154,7 @@ qmake:  FORCE
 
 dist: 
        @$(CHK_DIR_EXISTS) .tmp/bat1.0.0 || $(MKDIR) .tmp/bat1.0.0 
-       $(COPY_FILE) --parents $(SOURCES) $(DIST) .tmp/bat1.0.0/ && $(COPY_FILE) --parents mainwin.h bat.h bat_conf.h console/console.h .tmp/bat1.0.0/ && $(COPY_FILE) --parents main.qrc .tmp/bat1.0.0/ && $(COPY_FILE) --parents main.cpp bat_conf.cpp mainwin.cpp console/authenticate.cpp console/console.cpp .tmp/bat1.0.0/ && $(COPY_FILE) --parents main.ui label.ui console/console.ui .tmp/bat1.0.0/ && (cd `dirname .tmp/bat1.0.0` && $(TAR) bat1.0.0.tar bat1.0.0 && $(COMPRESS) bat1.0.0.tar) && $(MOVE) `dirname .tmp/bat1.0.0`/bat1.0.0.tar.gz . && $(DEL_FILE) -r .tmp/bat1.0.0
+       $(COPY_FILE) --parents $(SOURCES) $(DIST) .tmp/bat1.0.0/ && $(COPY_FILE) --parents mainwin.h bat.h bat_conf.h console/console.h restore/restore.h .tmp/bat1.0.0/ && $(COPY_FILE) --parents main.qrc .tmp/bat1.0.0/ && $(COPY_FILE) --parents main.cpp bat_conf.cpp mainwin.cpp console/authenticate.cpp console/console.cpp restore/brestore.cpp .tmp/bat1.0.0/ && $(COPY_FILE) --parents main.ui label.ui console/console.ui restore/brestore.ui .tmp/bat1.0.0/ && (cd `dirname .tmp/bat1.0.0` && $(TAR) bat1.0.0.tar bat1.0.0 && $(COMPRESS) bat1.0.0.tar) && $(MOVE) `dirname .tmp/bat1.0.0`/bat1.0.0.tar.gz . && $(DEL_FILE) -r .tmp/bat1.0.0
 
 
 yaccclean:
@@ -174,18 +178,24 @@ mocclean: compiler_moc_header_clean compiler_moc_source_clean
 
 mocables: compiler_moc_header_make_all compiler_moc_source_make_all
 
-compiler_moc_header_make_all: moc_mainwin.cpp moc_console.cpp
+compiler_moc_header_make_all: moc_mainwin.cpp moc_console.cpp moc_restore.cpp
 compiler_moc_header_clean:
-       -$(DEL_FILE) moc_mainwin.cpp moc_console.cpp
+       -$(DEL_FILE) moc_mainwin.cpp moc_console.cpp moc_restore.cpp
 moc_mainwin.cpp: ui_main.h \
                mainwin.h \
                /usr/bin/moc
        /usr/bin/moc $(DEFINES) $(INCPATH) mainwin.h -o moc_mainwin.cpp
 
-moc_console.cpp: console/console.h \
+moc_console.cpp: ui_console.h \
+               console/console.h \
                /usr/bin/moc
        /usr/bin/moc $(DEFINES) $(INCPATH) console/console.h -o moc_console.cpp
 
+moc_restore.cpp: ui_brestore.h \
+               restore/restore.h \
+               /usr/bin/moc
+       /usr/bin/moc $(DEFINES) $(INCPATH) restore/restore.h -o moc_restore.cpp
+
 compiler_rcc_make_all: qrc_main.cpp
 compiler_rcc_clean:
        -$(DEL_FILE) qrc_main.cpp
@@ -212,9 +222,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
+compiler_uic_make_all: ui_main.h ui_label.h ui_console.h ui_brestore.h
 compiler_uic_clean:
-       -$(DEL_FILE) ui_main.h ui_label.h ui_console.h
+       -$(DEL_FILE) ui_main.h ui_label.h ui_console.h ui_brestore.h
 ui_main.h: main.ui
        /usr/bin/uic main.ui -o ui_main.h
 
@@ -224,6 +234,9 @@ ui_label.h: 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
+
 compiler_clean: compiler_moc_header_clean compiler_rcc_clean compiler_image_collection_clean compiler_moc_source_clean compiler_uic_clean 
 
 ####### Compile
@@ -253,15 +266,27 @@ console.o: console/console.cpp bat.h \
                mainwin.h \
                ui_main.h \
                bat_conf.h \
-               console/console.h
+               console/console.h \
+               ui_console.h
        $(CXX) -c $(CXXFLAGS) $(INCPATH) -o console.o console/console.cpp
 
+brestore.o: restore/brestore.cpp bat.h \
+               mainwin.h \
+               ui_main.h \
+               bat_conf.h \
+               restore/restore.h \
+               ui_brestore.h
+       $(CXX) -c $(CXXFLAGS) $(INCPATH) -o brestore.o restore/brestore.cpp
+
 moc_mainwin.o: moc_mainwin.cpp 
        $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_mainwin.o moc_mainwin.cpp
 
 moc_console.o: moc_console.cpp 
        $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_console.o moc_console.cpp
 
+moc_restore.o: moc_restore.cpp 
+       $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_restore.o moc_restore.cpp
+
 qrc_main.o: qrc_main.cpp 
        $(CXX) -c $(CXXFLAGS) $(INCPATH) -o qrc_main.o qrc_main.cpp
 
index 57f9454e26f71af2f58db87ea1122e8f04868b54..19efb18cbf65feb03c5a5c40ce3f07cfd5e39560 100644 (file)
@@ -5,7 +5,7 @@
 TEMPLATE = app
 TARGET = bat
 DEPENDPATH += .
-INCLUDEPATH += . ./console
+INCLUDEPATH += . ./console ./restore
 INCLUDEPATH += ..
 LIBS        += -L../lib
 LIBS        += -lbac
@@ -17,6 +17,7 @@ FORMS += main.ui
 # Label dialog
 FORMS += label.ui
 FORMS += console/console.ui
+FORMS += restore/brestore.ui
 
 
 HEADERS += mainwin.h bat.h bat_conf.h 
@@ -26,4 +27,8 @@ SOURCES += main.cpp bat_conf.cpp mainwin.cpp
 HEADERS += console/console.h
 SOURCES += console/authenticate.cpp console/console.cpp
 
+# Restore
+HEADERS += restore/restore.h
+SOURCES += restore/brestore.cpp
+
 # Label dialog
index 4e210998d933b7dabab627a99b923064dad449b0..ca3eb4e62badb3959bdd37cb939de160ba97500c 100644 (file)
@@ -36,6 +36,7 @@
 #include <QAbstractEventDispatcher>
 #include "bat.h"
 #include "console.h"
+#include "restore.h"
 
 Console::Console(QStackedWidget *parent)
 {
@@ -51,6 +52,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);
 
    /* Just take the first Director */
    LockRes();
diff --git a/bacula/src/qt-console/restore/brestore.cpp b/bacula/src/qt-console/restore/brestore.cpp
new file mode 100644 (file)
index 0000000..0f47d69
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+   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.
+*/
+/*
+ *  bRestore Class  (Eric's brestore)
+ *
+ *   Kern Sibbald, January MMVI
+ *
+ */ 
+
+#include <QAbstractEventDispatcher>
+#include "bat.h"
+#include "restore.h"
+
+bRestore::bRestore(QStackedWidget *parent)
+{
+   setupUi(this);
+   parent->addWidget(this);
+}
+
diff --git a/bacula/src/qt-console/restore/brestore.ui b/bacula/src/qt-console/restore/brestore.ui
new file mode 100644 (file)
index 0000000..f35c71b
--- /dev/null
@@ -0,0 +1,311 @@
+<ui version="4.0" >
+ <class>bRestoreForm</class>
+ <widget class="QWidget" name="bRestoreForm" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>800</width>
+    <height>600</height>
+   </rect>
+  </property>
+  <property name="windowTitle" >
+   <string>brestore</string>
+  </property>
+  <widget class="QWidget" name="centralwidget" >
+   <property name="geometry" >
+    <rect>
+     <x>70</x>
+     <y>30</y>
+     <width>582</width>
+     <height>533</height>
+    </rect>
+   </property>
+   <layout class="QVBoxLayout" >
+    <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>
+       <widget class="QComboBox" name="ClientList" />
+      </item>
+      <item>
+       <widget class="QComboBox" name="JobList" >
+        <property name="enabled" >
+         <bool>false</bool>
+        </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>40</width>
+          <height>20</height>
+         </size>
+        </property>
+       </spacer>
+      </item>
+      <item>
+       <widget class="QPushButton" name="pushButton_4" >
+        <property name="text" >
+         <string>Location</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QLineEdit" name="lineEdit" />
+      </item>
+     </layout>
+    </item>
+    <item>
+     <widget class="QSplitter" name="splitter_2" >
+      <property name="orientation" >
+       <enum>Qt::Vertical</enum>
+      </property>
+      <widget class="QSplitter" name="splitter" >
+       <property name="orientation" >
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <widget class="QGroupBox" name="groupBox" >
+        <property name="sizePolicy" >
+         <sizepolicy>
+          <hsizetype>7</hsizetype>
+          <vsizetype>7</vsizetype>
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="title" >
+         <string>File list</string>
+        </property>
+        <layout class="QVBoxLayout" >
+         <property name="margin" >
+          <number>9</number>
+         </property>
+         <property name="spacing" >
+          <number>6</number>
+         </property>
+         <item>
+          <widget class="QTableWidget" name="FileList" >
+           <property name="sizePolicy" >
+            <sizepolicy>
+             <hsizetype>7</hsizetype>
+             <vsizetype>7</vsizetype>
+             <horstretch>5</horstretch>
+             <verstretch>5</verstretch>
+            </sizepolicy>
+           </property>
+           <column>
+            <property name="text" >
+             <string>Type</string>
+            </property>
+           </column>
+           <column>
+            <property name="text" >
+             <string>File Name</string>
+            </property>
+           </column>
+           <column>
+            <property name="text" >
+             <string>Size</string>
+            </property>
+           </column>
+           <column>
+            <property name="text" >
+             <string>Date</string>
+            </property>
+           </column>
+          </widget>
+         </item>
+        </layout>
+       </widget>
+       <widget class="QGroupBox" name="groupBox_2" >
+        <property name="sizePolicy" >
+         <sizepolicy>
+          <hsizetype>7</hsizetype>
+          <vsizetype>7</vsizetype>
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+        <property name="title" >
+         <string>File revisions</string>
+        </property>
+        <layout class="QVBoxLayout" >
+         <property name="margin" >
+          <number>9</number>
+         </property>
+         <property name="spacing" >
+          <number>6</number>
+         </property>
+         <item>
+          <widget class="QTableWidget" name="FileRevisions" >
+           <property name="sizePolicy" >
+            <sizepolicy>
+             <hsizetype>7</hsizetype>
+             <vsizetype>7</vsizetype>
+             <horstretch>0</horstretch>
+             <verstretch>0</verstretch>
+            </sizepolicy>
+           </property>
+           <column>
+            <property name="text" >
+             <string>InChanger</string>
+            </property>
+           </column>
+           <column>
+            <property name="text" >
+             <string>Volume</string>
+            </property>
+           </column>
+           <column>
+            <property name="text" >
+             <string>JobId</string>
+            </property>
+           </column>
+           <column>
+            <property name="text" >
+             <string>Size</string>
+            </property>
+           </column>
+           <column>
+            <property name="text" >
+             <string>Date</string>
+            </property>
+           </column>
+           <column>
+            <property name="text" >
+             <string>Chksum</string>
+            </property>
+           </column>
+          </widget>
+         </item>
+        </layout>
+       </widget>
+      </widget>
+      <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>
+           <widget class="QLabel" name="label" >
+            <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-weight:600;">Restore items list&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>40</width>
+              <height>20</height>
+             </size>
+            </property>
+           </spacer>
+          </item>
+          <item>
+           <widget class="QPushButton" name="pushButton" >
+            <property name="text" >
+             <string>Clear</string>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <widget class="QPushButton" name="pushButton_2" >
+            <property name="text" >
+             <string>Estimate</string>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <widget class="QPushButton" name="pushButton_3" >
+            <property name="text" >
+             <string>Restore</string>
+            </property>
+           </widget>
+          </item>
+         </layout>
+        </item>
+        <item>
+         <widget class="QTableWidget" name="RestoreList" >
+          <property name="acceptDrops" >
+           <bool>true</bool>
+          </property>
+          <column>
+           <property name="text" >
+            <string>Type</string>
+           </property>
+          </column>
+          <column>
+           <property name="text" >
+            <string>FileName</string>
+           </property>
+          </column>
+          <column>
+           <property name="text" >
+            <string>JobId</string>
+           </property>
+          </column>
+          <column>
+           <property name="text" >
+            <string>FileIndex</string>
+           </property>
+          </column>
+          <column>
+           <property name="text" >
+            <string>Nb Files</string>
+           </property>
+          </column>
+          <column>
+           <property name="text" >
+            <string>Size</string>
+           </property>
+          </column>
+         </widget>
+        </item>
+       </layout>
+      </widget>
+     </widget>
+    </item>
+   </layout>
+  </widget>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/bacula/src/qt-console/restore/restore.h b/bacula/src/qt-console/restore/restore.h
new file mode 100644 (file)
index 0000000..682e3e6
--- /dev/null
@@ -0,0 +1,21 @@
+
+#ifndef _RESTORE_H_
+#define _RESTORE_H_
+
+#include <QtGui>
+#include "ui_brestore.h"
+
+class bRestore : public QWidget, public Ui::bRestoreForm
+{
+   Q_OBJECT 
+
+public:
+   bRestore(QStackedWidget *parent);
+
+public slots:
+
+private:
+
+};
+
+#endif /* _RESTORE_H_ */