]> git.sur5r.net Git - bacula/bacula/commitdiff
bat: more work on brestore panel
authorEric Bollengier <eric@eb.homelinux.org>
Sun, 3 Oct 2010 20:51:29 +0000 (22:51 +0200)
committerEric Bollengier <eric@eb.homelinux.org>
Wed, 6 Oct 2010 09:11:08 +0000 (11:11 +0200)
bacula/src/qt-console/images/page-next.gif [new file with mode: 0644]
bacula/src/qt-console/images/page-prev.gif [new file with mode: 0644]
bacula/src/qt-console/main.qrc
bacula/src/qt-console/restore/brestore.cpp
bacula/src/qt-console/restore/brestore.ui
bacula/src/qt-console/restore/restore.h
bacula/src/qt-console/restore/runrestore.ui

diff --git a/bacula/src/qt-console/images/page-next.gif b/bacula/src/qt-console/images/page-next.gif
new file mode 100644 (file)
index 0000000..9601635
Binary files /dev/null and b/bacula/src/qt-console/images/page-next.gif differ
diff --git a/bacula/src/qt-console/images/page-prev.gif b/bacula/src/qt-console/images/page-prev.gif
new file mode 100644 (file)
index 0000000..eb70cf8
Binary files /dev/null and b/bacula/src/qt-console/images/page-prev.gif differ
index 224154e91df3fbc0c93ac63877050353e49c9375..f8fb90fba9b74c304356f7d4a8184689911c25ba 100644 (file)
@@ -1,73 +1,75 @@
 <RCC>
-    <qresource prefix="/" >
-        <file>images/0p.png</file>
-        <file>images/16p.png</file>
-        <file>images/32p.png</file>
-        <file>images/48p.png</file>
-        <file>images/64p.png</file>
-        <file>images/80p.png</file>
-        <file>images/96p.png</file>
-        <file>images/A.png</file>
-        <file>images/R.png</file>
-        <file>images/T.png</file>
-        <file>images/W.png</file>
-        <file>images/applications-graphics.png</file>
-        <file>images/bat.png</file>
-        <file>images/bat_icon.png</file>
-        <file>images/browse.png</file>
-        <file>images/cartridge-edit.png</file>
-        <file>images/cartridge.png</file>
-        <file>images/check.png</file>
-        <file>images/connected.png</file>
-        <file>images/copy.png</file>
-        <file>images/cut.png</file>
-        <file>images/disconnected.png</file>
-        <file>images/edit-cut.png</file>
-        <file>images/edit-delete.png</file>
-        <file>images/edit.png</file>
-        <file>images/emblem-system.png</file>
-        <file>images/estimate-job.png</file>
-        <file>images/extern.png</file>
-        <file>images/f.png</file>
-        <file>images/folder.png</file>
-        <file>images/folderbothchecked.png</file>
-        <file>images/folderchecked.png</file>
-        <file>images/folderunchecked.png</file>
-        <file>images/go-down.png</file>
-        <file>images/go-jump.png</file>
-        <file>images/go-up.png</file>
-        <file>images/graph1.png</file>
-        <file>images/help-browser.png</file>
-        <file>images/inflag0.png</file>
-        <file>images/inflag1.png</file>
-        <file>images/inflag2.png</file>
-        <file>images/intern.png</file>
-        <file>images/joblog.png</file>
-        <file>images/label.png</file>
-        <file>images/mail-message-new.png</file>
-        <file>images/mail-message-pending.png</file>
-        <file>images/mark.png</file>
-        <file>images/network-server.png</file>
-        <file>images/new.png</file>
-        <file>images/open.png</file>
-        <file>images/package-x-generic.png</file>
-        <file>images/paste.png</file>
-        <file>images/print.png</file>
-        <file>images/purge.png</file>
-        <file>images/restore.png</file>
-        <file>images/run.png</file>
-        <file>images/runit.png</file>
-        <file>images/save.png</file>
-        <file>images/status-console.png</file>
-        <file>images/status.png</file>
-        <file>images/system-file-manager.png</file>
-        <file>images/unchecked.png</file>
-        <file>images/undo.png</file>
-        <file>images/unmark.png</file>
-        <file>images/up.png</file>
-        <file>images/utilities-terminal.png</file>
-        <file>images/view-refresh.png</file>
-        <file>images/weather-severe-alert.png</file>
-        <file>images/zoom.png</file>
-    </qresource>
+  <qresource prefix="/">
+    <file>images/page-prev.gif</file>
+    <file>images/page-next.gif</file>
+    <file>images/0p.png</file>
+    <file>images/16p.png</file>
+    <file>images/32p.png</file>
+    <file>images/48p.png</file>
+    <file>images/64p.png</file>
+    <file>images/80p.png</file>
+    <file>images/96p.png</file>
+    <file>images/A.png</file>
+    <file>images/R.png</file>
+    <file>images/T.png</file>
+    <file>images/W.png</file>
+    <file>images/applications-graphics.png</file>
+    <file>images/bat.png</file>
+    <file>images/bat_icon.png</file>
+    <file>images/browse.png</file>
+    <file>images/cartridge-edit.png</file>
+    <file>images/cartridge.png</file>
+    <file>images/check.png</file>
+    <file>images/connected.png</file>
+    <file>images/copy.png</file>
+    <file>images/cut.png</file>
+    <file>images/disconnected.png</file>
+    <file>images/edit-cut.png</file>
+    <file>images/edit-delete.png</file>
+    <file>images/edit.png</file>
+    <file>images/emblem-system.png</file>
+    <file>images/estimate-job.png</file>
+    <file>images/extern.png</file>
+    <file>images/f.png</file>
+    <file>images/folder.png</file>
+    <file>images/folderbothchecked.png</file>
+    <file>images/folderchecked.png</file>
+    <file>images/folderunchecked.png</file>
+    <file>images/go-down.png</file>
+    <file>images/go-jump.png</file>
+    <file>images/go-up.png</file>
+    <file>images/graph1.png</file>
+    <file>images/help-browser.png</file>
+    <file>images/inflag0.png</file>
+    <file>images/inflag1.png</file>
+    <file>images/inflag2.png</file>
+    <file>images/intern.png</file>
+    <file>images/joblog.png</file>
+    <file>images/label.png</file>
+    <file>images/mail-message-new.png</file>
+    <file>images/mail-message-pending.png</file>
+    <file>images/mark.png</file>
+    <file>images/network-server.png</file>
+    <file>images/new.png</file>
+    <file>images/open.png</file>
+    <file>images/package-x-generic.png</file>
+    <file>images/paste.png</file>
+    <file>images/print.png</file>
+    <file>images/purge.png</file>
+    <file>images/restore.png</file>
+    <file>images/run.png</file>
+    <file>images/runit.png</file>
+    <file>images/save.png</file>
+    <file>images/status-console.png</file>
+    <file>images/status.png</file>
+    <file>images/system-file-manager.png</file>
+    <file>images/unchecked.png</file>
+    <file>images/undo.png</file>
+    <file>images/unmark.png</file>
+    <file>images/up.png</file>
+    <file>images/utilities-terminal.png</file>
+    <file>images/view-refresh.png</file>
+    <file>images/weather-severe-alert.png</file>
+    <file>images/zoom.png</file>
+  </qresource>
 </RCC>
index 65908b990a6c79f8229555f2cad4b79863fbcfe4..9e592a9f2680f6348d56502c1958d20d3cfef18e 100644 (file)
@@ -174,8 +174,10 @@ void bRestore::displayFiles(int64_t pathid, QString path)
       arg = " path=\"" + m_path + "\"";
    }
    LocationEntry->setText(m_path);
-
-   QString q = ".bvfs_lsdir jobid=" + m_jobids + arg;
+   QString offset = QString().setNum(Offset1Spin->value());
+   QString limit=QString().setNum(Offset2Spin->value() - Offset1Spin->value());
+   QString q = ".bvfs_lsdir jobid=" + m_jobids + arg 
+      + " limit=" + limit + " offset=" + offset ;
    if (m_console->dir_cmd(q, results)) {
       nb = results.size();
       FileList->setRowCount(nb);
@@ -188,6 +190,7 @@ void bRestore::displayFiles(int64_t pathid, QString path)
          item.setTextFld(col++, fieldlist.at(5)); // path
          decode_stat(fieldlist.at(4).toLocal8Bit().data(), 
                      &statp, &LinkFI);
+         item.setBytesFld(col++, QString().setNum(statp.st_size));
          item.setDateFld(col++, statp.st_mtime); // date
          fieldlist.replace(3, m_jobids);      // use current jobids selection
          item.widget(1)->setData(Qt::UserRole, fieldlist.join("\t")); // keep info
@@ -195,7 +198,8 @@ void bRestore::displayFiles(int64_t pathid, QString path)
    }
 
    results.clear();
-   q = ".bvfs_lsfiles jobid=" + m_jobids + arg;
+   q = ".bvfs_lsfiles jobid=" + m_jobids + arg
+      + " limit=" + limit + " offset=" + offset ;
    if (m_console->dir_cmd(q, results)) {
       FileList->setRowCount(results.size() + nb);
       foreach (QString resultline, results) {
@@ -483,6 +487,7 @@ void bRunRestore::useRegexp()
 
 bRunRestore::bRunRestore(bRestore *parent)
 {
+   brestore = parent;
    setupUi(this);
    ClientCb->addItems(parent->console()->client_list);
    int i = ClientCb->findText(parent->m_client);
@@ -495,8 +500,108 @@ bRunRestore::bRunRestore(bRestore *parent)
    StorageCb->addItems(parent->console()->storage_list);
    connect(UseFileRelocationChk, SIGNAL(clicked()), this, SLOT(UFRcb()));
    connect(UseRegexpChk, SIGNAL(clicked()), this, SLOT(useRegexp()));
+   connect(ActionBp, SIGNAL(accepted()), this, SLOT(computeRestore()));
    struct job_defaults jd;
    jd.job_name = parent->console()->restore_list[0];
-   parent->console()->get_job_defaults(jd);
+   brestore->console()->get_job_defaults(jd);
    WhereEntry->setText(jd.where);
+   computeVolumeList();
+}
+
+void bRestore::get_info_from_selection(QStringList &fileids, 
+                                       QStringList &jobids,
+                                       QStringList &dirids,
+                                       QStringList &findexes)
+{
+   struct stat statp;
+   int32_t LinkFI;
+   for (int i=0; i < RestoreList->rowCount(); i++) {
+      QTableWidgetItem *item = RestoreList->item(i, 1);
+      QString data = item->data(Qt::UserRole).toString();
+      QStringList lst = data.split("\t");
+      if (lst.at(1) != "0") {   // skip path
+         fileids << lst.at(2);
+         jobids << lst.at(3);
+         decode_stat(lst.at(4).toLocal8Bit().data(), 
+                     &statp, &LinkFI);
+         if (LinkFI) {
+            findexes << lst.at(3) + "," + QString().setNum(LinkFI);
+         }
+      } else {
+         dirids << lst.at(0);
+         jobids << lst.at(3).split(","); // Can have multiple jobids
+      }
+   }
+   fileids.removeDuplicates();
+   jobids.removeDuplicates();
+   dirids.removeDuplicates();
+   findexes.removeDuplicates();
+   qDebug() << fileids << jobids << dirids << findexes;
+}
+
+void bRunRestore::computeVolumeList()
+{
+   brestore->get_info_from_selection(m_fileids, m_jobids, m_dirids, m_findexes);
+   if (m_fileids.size() == 0) {
+      return;
+   }
+
+   Freeze frz_lst(*TableMedia); /* disable updating*/
+   QString q =
+" SELECT DISTINCT VolumeName, Enabled, InChanger "
+ " FROM File, "
+  " ( " // -- Get all media from this job 
+     " SELECT MIN(FirstIndex) AS FirstIndex, MAX(LastIndex) AS LastIndex, "
+            " VolumeName, Enabled, Inchanger "
+       " FROM JobMedia JOIN Media USING (MediaId) "
+      " WHERE JobId IN (" + m_jobids.join(",") + ") "
+      " GROUP BY VolumeName,Enabled,InChanger "
+   " ) AS allmedia "
+  " WHERE File.FileId IN (" + m_fileids.join(",") + ") "
+   " AND File.FileIndex >= allmedia.FirstIndex "
+   " AND File.FileIndex <= allmedia.LastIndex ";
+   int row=0;
+   QStringList results;
+   if (brestore->console()->sql_cmd(q, results)) {
+      QStringList fieldlist;
+      TableMedia->setRowCount(results.size());
+      /* Iterate through the record returned from the query */
+      foreach (QString resultline, results) {
+         // 0        1          2 
+         //volname, enabled, inchanger
+         fieldlist = resultline.split("\t");
+         int col=0;
+         TableItemFormatter item(*TableMedia, row++);
+         item.setInChanger(col++, fieldlist.at(2));    // inchanger
+         item.setTextFld(col++, fieldlist.at(0)); // Volume
+      }
+   }
+   TableMedia->verticalHeader()->hide();
+   TableMedia->resizeColumnsToContents();
+   TableMedia->resizeRowsToContents();
+   TableMedia->setEditTriggers(QAbstractItemView::NoEditTriggers);
+}
+
+void bRunRestore::computeRestore()
+{
+   QString q = ".bvfs_restore path=b2123 jobid=" + m_jobids.join(",");
+   if (m_fileids.size() > 0) {
+      q += " fileid=" + m_fileids.join(",");
+   }
+   if (m_dirids.size() > 0) {
+      q += " dirid=" + m_dirids.join(",");
+   }
+   if (m_findexes.size() > 0) {
+      q += " hardlink=" + m_findexes.join(",");
+   }
+   qDebug() << q;
+
+   QStringList results;
+   if (brestore->console()->dir_cmd(q, results)) {
+      if (results.size() == 1 && results[0] == "OK") {
+         qDebug() << "Run restore!";
+         q = ".bvfs_cleanup path=b2123";
+         brestore->console()->dir_cmd(q, results);
+      }
+   }   
 }
index 5023098ad03784ad7263f80c44a4d6e4e5497781..7750264f5a8329d4e4333673a3afdc121440ae93 100644 (file)
    <property name="spacing">
     <number>6</number>
    </property>
+   <item row="0" column="0">
+    <layout class="QHBoxLayout">
+     <property name="spacing">
+      <number>6</number>
+     </property>
+     <property name="margin">
+      <number>0</number>
+     </property>
+     <item>
+      <widget class="QComboBox" name="ClientList">
+       <property name="sizePolicy">
+        <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
+         <horstretch>0</horstretch>
+         <verstretch>0</verstretch>
+        </sizepolicy>
+       </property>
+       <property name="sizeAdjustPolicy">
+        <enum>QComboBox::AdjustToContents</enum>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QComboBox" name="JobList">
+       <property name="enabled">
+        <bool>false</bool>
+       </property>
+       <property name="sizePolicy">
+        <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+         <horstretch>0</horstretch>
+         <verstretch>0</verstretch>
+        </sizepolicy>
+       </property>
+       <property name="sizeAdjustPolicy">
+        <enum>QComboBox::AdjustToContents</enum>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <spacer>
+       <property name="orientation">
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="sizeType">
+        <enum>QSizePolicy::Expanding</enum>
+       </property>
+       <property name="sizeHint" stdset="0">
+        <size>
+         <width>40</width>
+         <height>20</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+     <item>
+      <widget class="QCheckBox" name="MergeChk">
+       <property name="text">
+        <string>Merge Jobs</string>
+       </property>
+       <property name="checked">
+        <bool>true</bool>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QCheckBox" name="VersionsChk">
+       <property name="text">
+        <string>View all Versions</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QPushButton" name="LocationBp">
+       <property name="text">
+        <string>Location</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QLineEdit" name="LocationEntry"/>
+     </item>
+    </layout>
+   </item>
    <item row="1" column="0">
     <widget class="QSplitter" name="splitter_2">
      <property name="orientation">
        <property name="title">
         <string>File list</string>
        </property>
-       <layout class="QVBoxLayout">
-        <property name="spacing">
-         <number>6</number>
-        </property>
-        <property name="margin">
-         <number>9</number>
-        </property>
+       <layout class="QVBoxLayout" name="verticalLayout">
         <item>
          <widget class="bRestoreTable" name="FileList">
           <property name="sizePolicy">
           </column>
          </widget>
         </item>
+        <item>
+         <layout class="QHBoxLayout" name="horizontalLayout">
+          <property name="sizeConstraint">
+           <enum>QLayout::SetMinimumSize</enum>
+          </property>
+          <item>
+           <widget class="QPushButton" name="OffsetPrevBp">
+            <property name="sizePolicy">
+             <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+              <horstretch>0</horstretch>
+              <verstretch>0</verstretch>
+             </sizepolicy>
+            </property>
+            <property name="baseSize">
+             <size>
+              <width>25</width>
+              <height>25</height>
+             </size>
+            </property>
+            <property name="text">
+             <string/>
+            </property>
+            <property name="icon">
+             <iconset resource="../main.qrc">
+              <normaloff>:/images/page-prev.gif</normaloff>:/images/page-prev.gif</iconset>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <widget class="QSpinBox" name="Offset1Spin">
+            <property name="buttonSymbols">
+             <enum>QAbstractSpinBox::NoButtons</enum>
+            </property>
+            <property name="maximum">
+             <number>9000000</number>
+            </property>
+            <property name="singleStep">
+             <number>500</number>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <widget class="QLabel" name="label_2">
+            <property name="sizePolicy">
+             <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
+              <horstretch>0</horstretch>
+              <verstretch>0</verstretch>
+             </sizepolicy>
+            </property>
+            <property name="baseSize">
+             <size>
+              <width>16</width>
+              <height>16</height>
+             </size>
+            </property>
+            <property name="text">
+             <string>-</string>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <widget class="QSpinBox" name="Offset2Spin">
+            <property name="buttonSymbols">
+             <enum>QAbstractSpinBox::NoButtons</enum>
+            </property>
+            <property name="accelerated">
+             <bool>false</bool>
+            </property>
+            <property name="minimum">
+             <number>0</number>
+            </property>
+            <property name="maximum">
+             <number>9999999</number>
+            </property>
+            <property name="singleStep">
+             <number>500</number>
+            </property>
+            <property name="value">
+             <number>500</number>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <widget class="QPushButton" name="OffsetNextBp">
+            <property name="sizePolicy">
+             <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+              <horstretch>0</horstretch>
+              <verstretch>0</verstretch>
+             </sizepolicy>
+            </property>
+            <property name="baseSize">
+             <size>
+              <width>25</width>
+              <height>25</height>
+             </size>
+            </property>
+            <property name="text">
+             <string/>
+            </property>
+            <property name="icon">
+             <iconset resource="../main.qrc">
+              <normaloff>:/images/page-next.gif</normaloff>:/images/page-next.gif</iconset>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <spacer name="horizontalSpacer">
+            <property name="orientation">
+             <enum>Qt::Horizontal</enum>
+            </property>
+            <property name="sizeHint" stdset="0">
+             <size>
+              <width>40</width>
+              <height>20</height>
+             </size>
+            </property>
+           </spacer>
+          </item>
+          <item>
+           <widget class="QLineEdit" name="FilterEntry">
+            <property name="sizePolicy">
+             <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+              <horstretch>0</horstretch>
+              <verstretch>0</verstretch>
+             </sizepolicy>
+            </property>
+            <property name="baseSize">
+             <size>
+              <width>111</width>
+              <height>23</height>
+             </size>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <widget class="QPushButton" name="FilterBp">
+            <property name="baseSize">
+             <size>
+              <width>25</width>
+              <height>25</height>
+             </size>
+            </property>
+            <property name="text">
+             <string/>
+            </property>
+            <property name="icon">
+             <iconset resource="../main.qrc">
+              <normaloff>:/images/view-refresh.png</normaloff>:/images/view-refresh.png</iconset>
+            </property>
+           </widget>
+          </item>
+         </layout>
+        </item>
        </layout>
       </widget>
       <widget class="QGroupBox" name="groupBox_2">
@@ -303,88 +532,6 @@ p, li { white-space: pre-wrap; }
      </widget>
     </widget>
    </item>
-   <item row="0" column="0">
-    <layout class="QHBoxLayout">
-     <property name="spacing">
-      <number>6</number>
-     </property>
-     <property name="margin">
-      <number>0</number>
-     </property>
-     <item>
-      <widget class="QComboBox" name="ClientList">
-       <property name="sizePolicy">
-        <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
-         <horstretch>0</horstretch>
-         <verstretch>0</verstretch>
-        </sizepolicy>
-       </property>
-       <property name="sizeAdjustPolicy">
-        <enum>QComboBox::AdjustToContents</enum>
-       </property>
-      </widget>
-     </item>
-     <item>
-      <widget class="QComboBox" name="JobList">
-       <property name="enabled">
-        <bool>false</bool>
-       </property>
-       <property name="sizePolicy">
-        <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
-         <horstretch>0</horstretch>
-         <verstretch>0</verstretch>
-        </sizepolicy>
-       </property>
-       <property name="sizeAdjustPolicy">
-        <enum>QComboBox::AdjustToContents</enum>
-       </property>
-      </widget>
-     </item>
-     <item>
-      <spacer>
-       <property name="orientation">
-        <enum>Qt::Horizontal</enum>
-       </property>
-       <property name="sizeType">
-        <enum>QSizePolicy::Expanding</enum>
-       </property>
-       <property name="sizeHint" stdset="0">
-        <size>
-         <width>40</width>
-         <height>20</height>
-        </size>
-       </property>
-      </spacer>
-     </item>
-     <item>
-      <widget class="QCheckBox" name="MergeChk">
-       <property name="text">
-        <string>Merge Jobs</string>
-       </property>
-       <property name="checked">
-        <bool>true</bool>
-       </property>
-      </widget>
-     </item>
-     <item>
-      <widget class="QCheckBox" name="VersionsChk">
-       <property name="text">
-        <string>View all Versions</string>
-       </property>
-      </widget>
-     </item>
-     <item>
-      <widget class="QPushButton" name="LocationBp">
-       <property name="text">
-        <string>Location</string>
-       </property>
-      </widget>
-     </item>
-     <item>
-      <widget class="QLineEdit" name="LocationEntry"/>
-     </item>
-    </layout>
-   </item>
   </layout>
  </widget>
  <customwidgets>
@@ -394,6 +541,73 @@ p, li { white-space: pre-wrap; }
    <header>restore.h</header>
   </customwidget>
  </customwidgets>
- <resources/>
- <connections/>
+ <resources>
+  <include location="../main.qrc"/>
+ </resources>
+ <connections>
+  <connection>
+   <sender>OffsetNextBp</sender>
+   <signal>clicked()</signal>
+   <receiver>Offset2Spin</receiver>
+   <slot>stepUp()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>275</x>
+     <y>279</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>232</x>
+     <y>279</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>OffsetNextBp</sender>
+   <signal>clicked()</signal>
+   <receiver>Offset1Spin</receiver>
+   <slot>stepUp()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>272</x>
+     <y>281</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>92</x>
+     <y>279</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>OffsetPrevBp</sender>
+   <signal>clicked()</signal>
+   <receiver>Offset1Spin</receiver>
+   <slot>stepDown()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>44</x>
+     <y>287</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>123</x>
+     <y>282</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>OffsetPrevBp</sender>
+   <signal>clicked()</signal>
+   <receiver>Offset2Spin</receiver>
+   <slot>stepDown()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>50</x>
+     <y>284</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>221</x>
+     <y>282</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
 </ui>
index 8280a5d6c6027ca73475cd20239baa6763fed4d3..e7e3705cecec8f1d78583e955130782ee46e6b1f 100644 (file)
@@ -143,6 +143,8 @@ public:
    void PgSeltreeWidgetClicked();
    QString m_client;
    QString m_jobids;
+   void get_info_from_selection(QStringList &fileids, QStringList &jobids,
+                                QStringList &dirids, QStringList &fileindexes);
 
 public slots:
    void setClient();
@@ -166,13 +168,19 @@ private:
 class bRunRestore : public QDialog, public Ui::bRunRestoreForm
 {
    Q_OBJECT 
+private:
+   bRestore *brestore;
+   QStringList m_fileids, m_jobids, m_dirids, m_findexes;
 
 public:
    bRunRestore(bRestore *parent);
    ~bRunRestore() {}
+   void computeVolumeList();
+
 public slots:
    void useRegexp();
    void UFRcb();
+   void computeRestore();
 };
 
 #endif /* _RESTORE_H_ */
index 558febdffef0cc8b0b82dfc6a04df8cc8934e637..20ff1609de71ed763bb894f9d5b353f3481788ee 100644 (file)
          </property>
          <layout class="QVBoxLayout" name="verticalLayout_2">
           <item>
-           <widget class="QTableView" name="TableMedia"/>
+           <widget class="QTableWidget" name="TableMedia">
+            <property name="showGrid">
+             <bool>false</bool>
+            </property>
+            <property name="gridStyle">
+             <enum>Qt::NoPen</enum>
+            </property>
+            <column>
+             <property name="text">
+              <string>InChanger</string>
+             </property>
+            </column>
+            <column>
+             <property name="text">
+              <string>Volume</string>
+             </property>
+            </column>
+           </widget>
           </item>
           <item>
            <widget class="QPushButton" name="pushButton">
@@ -284,7 +301,7 @@ regexp:</string>
     </widget>
    </item>
    <item>
-    <widget class="QDialogButtonBox" name="buttonBox">
+    <widget class="QDialogButtonBox" name="ActionBp">
      <property name="orientation">
       <enum>Qt::Horizontal</enum>
      </property>
@@ -298,7 +315,7 @@ regexp:</string>
  <resources/>
  <connections>
   <connection>
-   <sender>buttonBox</sender>
+   <sender>ActionBp</sender>
    <signal>accepted()</signal>
    <receiver>bRunRestoreForm</receiver>
    <slot>accept()</slot>
@@ -314,7 +331,7 @@ regexp:</string>
    </hints>
   </connection>
   <connection>
-   <sender>buttonBox</sender>
+   <sender>ActionBp</sender>
    <signal>rejected()</signal>
    <receiver>bRunRestoreForm</receiver>
    <slot>reject()</slot>