]> git.sur5r.net Git - bacula/bacula/commitdiff
Add new mediainfo panel to bat
authorEric Bollengier <eric@eb.homelinux.org>
Mon, 3 Aug 2009 20:58:33 +0000 (22:58 +0200)
committerEric Bollengier <eric@eb.homelinux.org>
Mon, 3 Aug 2009 20:58:33 +0000 (22:58 +0200)
bacula/src/qt-console/bat.pro.in
bacula/src/qt-console/images/edit.png [new file with mode: 0644]
bacula/src/qt-console/images/extern.png [new file with mode: 0644]
bacula/src/qt-console/images/intern.png [new file with mode: 0644]
bacula/src/qt-console/main.qrc
bacula/src/qt-console/mediainfo/mediainfo.cpp [new file with mode: 0644]
bacula/src/qt-console/mediainfo/mediainfo.h [new file with mode: 0644]
bacula/src/qt-console/mediainfo/mediainfo.ui [new file with mode: 0644]
bacula/src/qt-console/medialist/medialist.cpp
bacula/src/qt-console/medialist/medialist.h
bacula/technotes

index ba9d773fed63d11aa658e0e85ee8e039ac2d1405..fefd61410e39dc36692f72246a5c414e155ac3ef 100644 (file)
@@ -51,7 +51,7 @@ FORMS += select/select.ui select/textinput.ui
 FORMS += medialist/medialist.ui mediaedit/mediaedit.ui joblist/joblist.ui
 FORMS += clients/clients.ui storage/storage.ui fileset/fileset.ui
 FORMS += joblog/joblog.ui jobs/jobs.ui job/job.ui
-FORMS += help/help.ui
+FORMS += help/help.ui mediainfo/mediainfo.ui
 FORMS += status/dirstat.ui
 FORMS += status/clientstat.ui
 FORMS += status/storstat.ui
@@ -145,6 +145,10 @@ qwt {
 HEADERS += help/help.h
 SOURCES += help/help.cpp
 
+# Media info dialog
+HEADERS += mediainfo/mediainfo.h
+HEADERS += mediainfo/mediainfo.cpp
+
 ## Status Dir
 HEADERS += status/dirstat.h
 SOURCES += status/dirstat.cpp
diff --git a/bacula/src/qt-console/images/edit.png b/bacula/src/qt-console/images/edit.png
new file mode 100644 (file)
index 0000000..3677539
Binary files /dev/null and b/bacula/src/qt-console/images/edit.png differ
diff --git a/bacula/src/qt-console/images/extern.png b/bacula/src/qt-console/images/extern.png
new file mode 100644 (file)
index 0000000..cfc3b35
Binary files /dev/null and b/bacula/src/qt-console/images/extern.png differ
diff --git a/bacula/src/qt-console/images/intern.png b/bacula/src/qt-console/images/intern.png
new file mode 100644 (file)
index 0000000..64b8300
Binary files /dev/null and b/bacula/src/qt-console/images/intern.png differ
index dddeb1a4c266ad3bf5935593535e5d79104ed7e6..0f9d56ea1688f08f1aadb69218a201a1b11cfd82 100644 (file)
@@ -1,5 +1,8 @@
 <RCC>
   <qresource prefix="/" >
+    <file>images/edit.png</file>
+    <file>images/extern.png</file>
+    <file>images/intern.png</file>
     <file>images/R.png</file>
     <file>images/T.png</file>
     <file>images/f.png</file>
diff --git a/bacula/src/qt-console/mediainfo/mediainfo.cpp b/bacula/src/qt-console/mediainfo/mediainfo.cpp
new file mode 100644 (file)
index 0000000..be37689
--- /dev/null
@@ -0,0 +1,47 @@
+/*
+   Bacula® - The Network Backup Solution
+
+   Copyright (C) 2007-2009 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 and included
+   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 Kern Sibbald.
+   The licensor of Bacula is the Free Software Foundation Europe
+   (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
+   Switzerland, email:ftf@fsfeurope.org.
+*/
+#include "bat.h"
+#include <QAbstractEventDispatcher>
+#include <QTableWidgetItem>
+#include <QMessageBox>
+#include "mediainfo.h"
+
+/*
+ * A constructor 
+ */
+MediaInfo::MediaInfo(QTreeWidgetItem *parentWidget, QString &mediaId)
+{
+   setupUi(this);
+   pgInitialize(tr("Media Info"), parentWidget);
+   QTreeWidgetItem* thisitem = mainWin->getFromHash(this);
+   thisitem->setIcon(0,QIcon(QString::fromUtf8(":images/cartridge-edit.png")));
+   m_closeable = true;
+   dockPage();
+   setCurrent();
+}
diff --git a/bacula/src/qt-console/mediainfo/mediainfo.h b/bacula/src/qt-console/mediainfo/mediainfo.h
new file mode 100644 (file)
index 0000000..6311e86
--- /dev/null
@@ -0,0 +1,53 @@
+#ifndef _MEDIAINFO_H_
+#define _MEDIAINFO_H_
+/*
+   Bacula® - The Network Backup Solution
+
+   Copyright (C) 2007-2009 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 and included
+   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 Kern Sibbald.
+   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$
+ *
+ */
+
+#include <QtGui>
+#include "ui_mediainfo.h"
+#include "console.h"
+#include "pages.h"
+
+class MediaInfo : public Pages, public Ui::mediaInfoForm
+{
+   Q_OBJECT 
+
+public:
+   MediaInfo(QTreeWidgetItem *parentWidget, QString &mediaId);
+
+private slots:
+
+private:
+   QString m_mediaName;
+};
+
+#endif /* _MEDIAINFO_H_ */
diff --git a/bacula/src/qt-console/mediainfo/mediainfo.ui b/bacula/src/qt-console/mediainfo/mediainfo.ui
new file mode 100644 (file)
index 0000000..257533e
--- /dev/null
@@ -0,0 +1,634 @@
+<ui version="4.0" >
+ <class>mediaInfoForm</class>
+ <widget class="QWidget" name="mediaInfoForm" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>828</width>
+    <height>852</height>
+   </rect>
+  </property>
+  <property name="windowTitle" >
+   <string>Form</string>
+  </property>
+  <layout class="QVBoxLayout" name="verticalLayout" >
+   <item>
+    <layout class="QHBoxLayout" name="horizontalLayout_2" >
+     <item>
+      <widget class="QPushButton" name="pushButton" >
+       <property name="text" >
+        <string>Load</string>
+       </property>
+       <property name="icon" >
+        <iconset resource="../main.qrc" >
+         <normaloff>:/images/intern.png</normaloff>:/images/intern.png</iconset>
+       </property>
+       <property name="flat" >
+        <bool>true</bool>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QPushButton" name="pushButton_6" >
+       <property name="text" >
+        <string>Unload</string>
+       </property>
+       <property name="icon" >
+        <iconset resource="../main.qrc" >
+         <normaloff>:/images/extern.png</normaloff>:/images/extern.png</iconset>
+       </property>
+       <property name="flat" >
+        <bool>true</bool>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QPushButton" name="pushButton_2" >
+       <property name="text" >
+        <string>Edit</string>
+       </property>
+       <property name="icon" >
+        <iconset resource="../main.qrc" >
+         <normaloff>:/images/edit.png</normaloff>:/images/edit.png</iconset>
+       </property>
+       <property name="flat" >
+        <bool>true</bool>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QPushButton" name="pushButton_3" >
+       <property name="text" >
+        <string>Purge</string>
+       </property>
+       <property name="icon" >
+        <iconset resource="../main.qrc" >
+         <normaloff>:/images/purge.png</normaloff>:/images/purge.png</iconset>
+       </property>
+       <property name="flat" >
+        <bool>true</bool>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QPushButton" name="pushButton_4" >
+       <property name="text" >
+        <string>Prune</string>
+       </property>
+       <property name="icon" >
+        <iconset resource="../main.qrc" >
+         <normaloff>:/images/edit-cut.png</normaloff>:/images/edit-cut.png</iconset>
+       </property>
+       <property name="flat" >
+        <bool>true</bool>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QPushButton" name="pushButton_5" >
+       <property name="text" >
+        <string>Delete</string>
+       </property>
+       <property name="icon" >
+        <iconset resource="../main.qrc" >
+         <normaloff>:/images/purge.png</normaloff>:/images/purge.png</iconset>
+       </property>
+       <property name="flat" >
+        <bool>true</bool>
+       </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>
+    </layout>
+   </item>
+   <item>
+    <layout class="QHBoxLayout" name="horizontalLayout_3" >
+     <property name="sizeConstraint" >
+      <enum>QLayout::SetFixedSize</enum>
+     </property>
+     <item>
+      <widget class="QGroupBox" name="groupBox_2" >
+       <property name="sizePolicy" >
+        <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
+         <horstretch>0</horstretch>
+         <verstretch>0</verstretch>
+        </sizepolicy>
+       </property>
+       <property name="minimumSize" >
+        <size>
+         <width>251</width>
+         <height>241</height>
+        </size>
+       </property>
+       <property name="baseSize" >
+        <size>
+         <width>251</width>
+         <height>243</height>
+        </size>
+       </property>
+       <property name="title" >
+        <string>Information</string>
+       </property>
+       <layout class="QFormLayout" name="formLayout_3" >
+         <property name="labelAlignment" >
+          <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
+         </property>
+         <property name="formAlignment" >
+          <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
+         </property>
+        <property name="fieldGrowthPolicy" >
+         <enum>QFormLayout::AllNonFixedFieldsGrow</enum>
+        </property>
+        <item row="0" column="0" >
+         <widget class="QLabel" name="label" >
+          <property name="text" >
+           <string>Pool:</string>
+          </property>
+         </widget>
+        </item>
+        <item row="1" column="0" >
+         <widget class="QLabel" name="label_2" >
+          <property name="text" >
+           <string>Online:</string>
+          </property>
+         </widget>
+        </item>
+        <item row="1" column="1" >
+         <widget class="QLabel" name="label_17" >
+          <property name="text" >
+           <string/>
+          </property>
+          <property name="pixmap" >
+           <pixmap resource="../main.qrc" >:/images/inflag0.png</pixmap>
+          </property>
+         </widget>
+        </item>
+        <item row="2" column="0" >
+         <widget class="QLabel" name="label_3" >
+          <property name="text" >
+           <string>Enabled:</string>
+          </property>
+         </widget>
+        </item>
+        <item row="2" column="1" >
+         <widget class="QLabel" name="label_18" >
+          <property name="text" >
+           <string>yes</string>
+          </property>
+         </widget>
+        </item>
+        <item row="3" column="0" >
+         <widget class="QLabel" name="label_4" >
+          <property name="text" >
+           <string>Location:</string>
+          </property>
+         </widget>
+        </item>
+        <item row="3" column="1" >
+         <widget class="QLabel" name="label_19" >
+          <property name="text" >
+           <string>Vault</string>
+          </property>
+         </widget>
+        </item>
+        <item row="4" column="0" >
+         <widget class="QLabel" name="label_5" >
+          <property name="text" >
+           <string>Status:</string>
+          </property>
+         </widget>
+        </item>
+        <item row="4" column="1" >
+         <widget class="QLabel" name="label_20" >
+          <property name="text" >
+           <string>Append</string>
+          </property>
+         </widget>
+        </item>
+        <item row="5" column="0" >
+         <widget class="QLabel" name="label_33" >
+          <property name="text" >
+           <string>Media Type:</string>
+          </property>
+         </widget>
+        </item>
+        <item row="5" column="1" >
+         <widget class="QLabel" name="label_34" >
+          <property name="text" >
+           <string>File</string>
+          </property>
+         </widget>
+        </item>
+        <item row="6" column="0" >
+         <widget class="QLabel" name="label_7" >
+          <property name="text" >
+           <string>Expire:</string>
+          </property>
+         </widget>
+        </item>
+        <item row="6" column="1" >
+         <widget class="QLabel" name="label_22" >
+          <property name="text" >
+           <string>2010-08-03 23:10:03</string>
+          </property>
+         </widget>
+        </item>
+        <item row="7" column="0" >
+         <widget class="QLabel" name="label_35" >
+          <property name="text" >
+           <string>Recycle Pool:</string>
+          </property>
+         </widget>
+        </item>
+        <item row="7" column="1" >
+         <widget class="QLabel" name="label_36" >
+          <property name="text" >
+           <string>Scratch</string>
+          </property>
+         </widget>
+        </item>
+        <item row="0" column="1" >
+         <widget class="QLabel" name="label_16" >
+          <property name="text" >
+           <string>Default</string>
+          </property>
+         </widget>
+        </item>
+       </layout>
+       <zorder>label</zorder>
+       <zorder>label_2</zorder>
+       <zorder>label_3</zorder>
+       <zorder>label_4</zorder>
+       <zorder>label_5</zorder>
+       <zorder>label_7</zorder>
+       <zorder>label_17</zorder>
+       <zorder>label_18</zorder>
+       <zorder>label_19</zorder>
+       <zorder>label_20</zorder>
+       <zorder>label_22</zorder>
+       <zorder>label_33</zorder>
+       <zorder>label_34</zorder>
+       <zorder>label_35</zorder>
+       <zorder>label_36</zorder>
+       <zorder>label_16</zorder>
+      </widget>
+     </item>
+     <item>
+      <widget class="QGroupBox" name="groupBox_3" >
+       <property name="sizePolicy" >
+        <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
+         <horstretch>0</horstretch>
+         <verstretch>0</verstretch>
+        </sizepolicy>
+       </property>
+       <property name="minimumSize" >
+        <size>
+         <width>261</width>
+         <height>241</height>
+        </size>
+       </property>
+       <property name="baseSize" >
+        <size>
+         <width>261</width>
+         <height>241</height>
+        </size>
+       </property>
+       <property name="title" >
+        <string>Statistics</string>
+       </property>
+       <layout class="QFormLayout" name="formLayout_2" >
+         <property name="labelAlignment" >
+          <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
+         </property>
+         <property name="formAlignment" >
+          <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
+         </property>
+        <property name="fieldGrowthPolicy" >
+         <enum>QFormLayout::AllNonFixedFieldsGrow</enum>
+        </property>
+        <item row="0" column="0" >
+         <widget class="QLabel" name="label_6" >
+          <property name="text" >
+           <string>Vol Bytes:</string>
+          </property>
+         </widget>
+        </item>
+        <item row="1" column="0" >
+         <widget class="QLabel" name="label_11" >
+          <property name="text" >
+           <string>Vol Mounts:</string>
+          </property>
+         </widget>
+        </item>
+        <item row="1" column="1" >
+         <widget class="QLabel" name="label_26" >
+          <property name="text" >
+           <string>10</string>
+          </property>
+         </widget>
+        </item>
+        <item row="2" column="0" >
+         <widget class="QLabel" name="label_12" >
+          <property name="text" >
+           <string>Recycle count:</string>
+          </property>
+         </widget>
+        </item>
+        <item row="2" column="1" >
+         <widget class="QLabel" name="label_27" >
+          <property name="text" >
+           <string>5</string>
+          </property>
+         </widget>
+        </item>
+        <item row="3" column="0" >
+         <widget class="QLabel" name="label_13" >
+          <property name="text" >
+           <string>Read time:</string>
+          </property>
+         </widget>
+        </item>
+        <item row="3" column="1" >
+         <widget class="QLabel" name="label_28" >
+          <property name="text" >
+           <string>10 mins</string>
+          </property>
+         </widget>
+        </item>
+        <item row="4" column="0" >
+         <widget class="QLabel" name="label_14" >
+          <property name="text" >
+           <string>Write time:</string>
+          </property>
+         </widget>
+        </item>
+        <item row="4" column="1" >
+         <widget class="QLabel" name="label_29" >
+          <property name="text" >
+           <string>20 mins</string>
+          </property>
+         </widget>
+        </item>
+        <item row="5" column="0" >
+         <widget class="QLabel" name="label_15" >
+          <property name="text" >
+           <string>Errors:</string>
+          </property>
+         </widget>
+        </item>
+        <item row="5" column="1" >
+         <widget class="QLabel" name="label_30" >
+          <property name="text" >
+           <string>0</string>
+          </property>
+         </widget>
+        </item>
+        <item row="6" column="0" >
+         <widget class="QLabel" name="label_31" >
+          <property name="text" >
+           <string>Last Written:</string>
+          </property>
+         </widget>
+        </item>
+        <item row="6" column="1" >
+         <widget class="QLabel" name="label_32" >
+          <property name="text" >
+           <string>2009-07-05 12:23:00</string>
+          </property>
+         </widget>
+        </item>
+        <item row="0" column="1" >
+         <widget class="QLabel" name="label_21" >
+          <property name="text" >
+           <string>19.8 MB</string>
+          </property>
+         </widget>
+        </item>
+       </layout>
+       <zorder>label_14</zorder>
+       <zorder>label_15</zorder>
+       <zorder>label_11</zorder>
+       <zorder>label_12</zorder>
+       <zorder>label_13</zorder>
+       <zorder>label_26</zorder>
+       <zorder>label_27</zorder>
+       <zorder>label_28</zorder>
+       <zorder>label_29</zorder>
+       <zorder>label_30</zorder>
+       <zorder>label_6</zorder>
+       <zorder>label_31</zorder>
+       <zorder>label_32</zorder>
+       <zorder>label_21</zorder>
+      </widget>
+     </item>
+     <item>
+      <widget class="QGroupBox" name="groupBox_4" >
+       <property name="sizePolicy" >
+        <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
+         <horstretch>0</horstretch>
+         <verstretch>0</verstretch>
+        </sizepolicy>
+       </property>
+       <property name="minimumSize" >
+        <size>
+         <width>200</width>
+         <height>241</height>
+        </size>
+       </property>
+       <property name="baseSize" >
+        <size>
+         <width>200</width>
+         <height>241</height>
+        </size>
+       </property>
+       <property name="title" >
+        <string>Limits</string>
+       </property>
+       <layout class="QFormLayout" name="formLayout" >
+         <property name="labelAlignment" >
+          <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
+         </property>
+         <property name="formAlignment" >
+          <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
+         </property>
+        <item row="0" column="0" >
+         <widget class="QLabel" name="label_9" >
+          <property name="text" >
+           <string>Max use duration:</string>
+          </property>
+         </widget>
+        </item>
+        <item row="0" column="1" >
+         <widget class="QLabel" name="label_25" >
+          <property name="text" >
+           <string>0</string>
+          </property>
+         </widget>
+        </item>
+        <item row="1" column="0" >
+         <widget class="QLabel" name="label_10" >
+          <property name="text" >
+           <string>Max jobs:</string>
+          </property>
+         </widget>
+        </item>
+        <item row="1" column="1" >
+         <widget class="QLabel" name="label_24" >
+          <property name="text" >
+           <string>0</string>
+          </property>
+         </widget>
+        </item>
+        <item row="2" column="0" >
+         <widget class="QLabel" name="label_37" >
+          <property name="text" >
+           <string>Max files:</string>
+          </property>
+         </widget>
+        </item>
+        <item row="2" column="1" >
+         <widget class="QLabel" name="label_39" >
+          <property name="text" >
+           <string>0</string>
+          </property>
+         </widget>
+        </item>
+        <item row="3" column="0" >
+         <widget class="QLabel" name="label_38" >
+          <property name="text" >
+           <string>Max bytes:</string>
+          </property>
+         </widget>
+        </item>
+        <item row="3" column="1" >
+         <widget class="QLabel" name="label_40" >
+          <property name="text" >
+           <string>0</string>
+          </property>
+         </widget>
+        </item>
+        <item row="4" column="0" >
+         <widget class="QLabel" name="label_41" >
+          <property name="text" >
+           <string>Recycle:</string>
+          </property>
+         </widget>
+        </item>
+        <item row="4" column="1" >
+         <widget class="QCheckBox" name="checkBox" >
+          <property name="text" >
+           <string/>
+          </property>
+         </widget>
+        </item>
+        <item row="5" column="0" >
+         <widget class="QLabel" name="label_8" >
+          <property name="text" >
+           <string>Retention:</string>
+          </property>
+         </widget>
+        </item>
+        <item row="5" column="1" >
+         <widget class="QLabel" name="label_23" >
+          <property name="text" >
+           <string>365 days</string>
+          </property>
+         </widget>
+        </item>
+       </layout>
+      </widget>
+     </item>
+     <item>
+      <spacer name="horizontalSpacer_2" >
+       <property name="orientation" >
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="sizeHint" stdset="0" >
+        <size>
+         <width>40</width>
+         <height>20</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+    </layout>
+   </item>
+   <item>
+    <widget class="QGroupBox" name="groupBox" >
+     <property name="sizePolicy" >
+      <sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="title" >
+      <string>Jobs</string>
+     </property>
+     <layout class="QHBoxLayout" name="horizontalLayout" >
+      <item>
+       <widget class="QTableWidget" name="tableWidget" >
+        <column>
+         <property name="text" >
+          <string>JobId</string>
+         </property>
+        </column>
+        <column>
+         <property name="text" >
+          <string>Name</string>
+         </property>
+        </column>
+        <column>
+         <property name="text" >
+          <string>Start Time</string>
+         </property>
+        </column>
+        <column>
+         <property name="text" >
+          <string>Type</string>
+         </property>
+        </column>
+        <column>
+         <property name="text" >
+          <string>Level</string>
+         </property>
+        </column>
+        <column>
+         <property name="text" >
+          <string>Files</string>
+         </property>
+        </column>
+        <column>
+         <property name="text" >
+          <string>Bytes</string>
+         </property>
+        </column>
+        <column>
+         <property name="text" >
+          <string>Status</string>
+         </property>
+        </column>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources>
+  <include location="../main.qrc" />
+ </resources>
+ <connections/>
+</ui>
index f48d287ad8dc7a939e1d295c6994590d15b43e42..c3315e9a181368f48958ae352daa0bc6ee1e3e59 100644 (file)
@@ -41,6 +41,7 @@
 #include <math.h>
 #include "medialist.h"
 #include "mediaedit/mediaedit.h"
+#include "mediainfo/mediainfo.h"
 #include "joblist/joblist.h"
 #include "relabel/relabel.h"
 #include "run/run.h"
@@ -279,6 +280,16 @@ void MediaList::showJobs()
    mainWin->createPageJobList(m_currentVolumeName, "", "", "", parentItem);
 }
 
+/*
+ * Called from the signal of the context sensitive menu!
+ */
+void MediaList::viewVolume()
+{
+   MediaInfo* view = new MediaInfo(mainWin->getFromHash(this), m_currentVolumeId);
+   connect(view, SIGNAL(destroyed()), this, SLOT(populateTree()));
+
+}
+
 /*
  * When the treeWidgetItem in the page selector tree is singleclicked, Make sure
  * The tree has been populated.
@@ -333,6 +344,7 @@ void MediaList::treeItemChanged(QTreeWidgetItem *currentwidgetitem, QTreeWidgetI
 void MediaList::createContextMenu()
 {
    mp_treeWidget->setContextMenuPolicy(Qt::ActionsContextMenu);
+   connect(mp_treeWidget, SIGNAL(itemDoubleClicked(QTreeWidgetItem *, int)), this, SLOT(viewVolume()));
    connect(actionEditVolume, SIGNAL(triggered()), this, SLOT(editVolume()));
    connect(actionListJobsOnVolume, SIGNAL(triggered()), this, SLOT(showJobs()));
    connect(actionDeleteVolume, SIGNAL(triggered()), this, SLOT(deleteVolume()));
index f51f565e3bdea9230a6c40fa06c87a4fb88e3778..63c2a19f3f70d161082a62d0173503a6606b481d 100644 (file)
@@ -54,6 +54,7 @@ public slots:
 private slots:
    void populateTree();
    void showJobs();
+   void viewVolume();
    void editVolume();
    void deleteVolume();
    void purgeVolume();
index 323db81f12e720ea80e26bfd9b05e6bc574dcb30..c61981288f40a0ad99f45e79183d828be764d73e 100644 (file)
@@ -2,6 +2,8 @@
           
 General:
 
+03Aug09
+ebl  Add new media info panel to bat
 02Aug09
 kes  Remove old sqlite3 build from bacula.spec
 kes  Move bat from bacula.spec to bacula-bat.spec