]> git.sur5r.net Git - bacula/bacula/commitdiff
Add Slot to Media View table
authorKern Sibbald <kern@sibbald.com>
Sat, 25 Dec 2010 12:41:01 +0000 (13:41 +0100)
committerKern Sibbald <kern@sibbald.com>
Sat, 20 Apr 2013 12:39:47 +0000 (14:39 +0200)
bacula/src/qt-console/medialist/mediaview.cpp
bacula/src/qt-console/medialist/mediaview.ui

index 1c44df8f5ff9c0b19c48d982c768d1af8b97eed8..3e3c7ffe6f945fb6fc703100c7ff1ba893feac63 100644 (file)
@@ -324,7 +324,7 @@ void MediaView::populateTable()
 
       foreach (resultline, results) { // should have only one result
          int index = 0;
-         QString VolBytes, MediaType, LastWritten, VolStatus;
+         QString Slot, VolBytes, MediaType, LastWritten, VolStatus;
          fieldlist = resultline.split("\t");
          if (fieldlist.size() != 10) {
             continue;
@@ -337,7 +337,9 @@ void MediaView::populateTable()
          
          /* Online */
          mediaitem.setInChanger(index++, fld.next());
-         fld.next();            // Slot
+
+         Slot = fld.next();            // Slot
+         mediaitem.setTextFld(index++, Slot);
 
          MediaType = fld.next();
          VolStatus = fld.next();
index a13e6f31f552d3f49664747067468dea3311c5bc..1fe54180885b045412cb7f94f21c16615e81d148 100644 (file)
@@ -1,7 +1,8 @@
-<ui version="4.0" >
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
  <class>MediaViewForm</class>
- <widget class="QWidget" name="MediaViewForm" >
-  <property name="geometry" >
+ <widget class="QWidget" name="MediaViewForm">
+  <property name="geometry">
    <rect>
     <x>0</x>
     <y>0</y>
     <height>638</height>
    </rect>
   </property>
-  <property name="windowTitle" >
+  <property name="windowTitle">
    <string>Form</string>
   </property>
-  <layout class="QVBoxLayout" >
+  <layout class="QVBoxLayout">
    <item>
-    <layout class="QHBoxLayout" >
+    <layout class="QHBoxLayout">
      <item>
-      <widget class="QPushButton" name="m_pbEdit" >
-       <property name="text" >
+      <widget class="QPushButton" name="m_pbEdit">
+       <property name="text">
         <string>Edit</string>
        </property>
-       <property name="icon" >
-        <iconset resource="../main.qrc" >:/images/edit.png</iconset>
+       <property name="icon">
+        <iconset resource="../main.qrc">
+         <normaloff>:/images/edit.png</normaloff>:/images/edit.png</iconset>
        </property>
-       <property name="flat" >
+       <property name="flat">
         <bool>true</bool>
        </property>
       </widget>
      </item>
      <item>
-      <widget class="QPushButton" name="m_pbPurge" >
-       <property name="text" >
+      <widget class="QPushButton" name="m_pbPurge">
+       <property name="text">
         <string>Purge</string>
        </property>
-       <property name="icon" >
-        <iconset resource="../main.qrc" >:/images/purge.png</iconset>
+       <property name="icon">
+        <iconset resource="../main.qrc">
+         <normaloff>:/images/purge.png</normaloff>:/images/purge.png</iconset>
        </property>
-       <property name="flat" >
+       <property name="flat">
         <bool>true</bool>
        </property>
       </widget>
      </item>
      <item>
-      <widget class="QPushButton" name="m_pbDelete" >
-       <property name="text" >
+      <widget class="QPushButton" name="m_pbDelete">
+       <property name="text">
         <string>Delete</string>
        </property>
-       <property name="icon" >
-        <iconset resource="../main.qrc" >:/images/purge.png</iconset>
+       <property name="icon">
+        <iconset resource="../main.qrc">
+         <normaloff>:/images/purge.png</normaloff>:/images/purge.png</iconset>
        </property>
-       <property name="flat" >
+       <property name="flat">
         <bool>true</bool>
        </property>
       </widget>
      </item>
      <item>
-      <widget class="QPushButton" name="m_pbPrune" >
-       <property name="text" >
+      <widget class="QPushButton" name="m_pbPrune">
+       <property name="text">
         <string>Prune</string>
        </property>
-       <property name="icon" >
-        <iconset resource="../main.qrc" >:/images/edit-cut.png</iconset>
+       <property name="icon">
+        <iconset resource="../main.qrc">
+         <normaloff>:/images/edit-cut.png</normaloff>:/images/edit-cut.png</iconset>
        </property>
-       <property name="flat" >
+       <property name="flat">
         <bool>true</bool>
        </property>
       </widget>
      </item>
      <item>
       <spacer>
-       <property name="orientation" >
+       <property name="orientation">
         <enum>Qt::Horizontal</enum>
        </property>
-       <property name="sizeHint" >
+       <property name="sizeHint" stdset="0">
         <size>
          <width>40</width>
          <height>20</height>
     </layout>
    </item>
    <item>
-    <widget class="QGroupBox" name="groupBox" >
-     <property name="title" >
+    <widget class="QGroupBox" name="groupBox">
+     <property name="title">
       <string>Filter</string>
      </property>
-     <layout class="QGridLayout" >
-      <item row="0" column="0" >
-       <widget class="QLabel" name="label_2" >
-        <property name="text" >
+     <layout class="QGridLayout">
+      <item row="0" column="0">
+       <widget class="QLabel" name="label_2">
+        <property name="text">
          <string>Media Type:</string>
         </property>
        </widget>
       </item>
-      <item row="0" column="1" >
-       <widget class="QComboBox" name="m_cbMediaType" />
+      <item row="0" column="1">
+       <widget class="QComboBox" name="m_cbMediaType"/>
       </item>
-      <item row="0" column="2" >
-       <widget class="QLabel" name="label_4" >
-        <property name="text" >
+      <item row="0" column="2">
+       <widget class="QLabel" name="label_4">
+        <property name="text">
          <string>Status:</string>
         </property>
        </widget>
       </item>
-      <item row="0" column="3" >
-       <widget class="QComboBox" name="m_cbStatus" />
+      <item row="0" column="3">
+       <widget class="QComboBox" name="m_cbStatus"/>
       </item>
-      <item row="0" column="4" >
-       <widget class="QLabel" name="label_6" >
-        <property name="text" >
+      <item row="0" column="4">
+       <widget class="QLabel" name="label_6">
+        <property name="text">
          <string>Limit:</string>
         </property>
        </widget>
       </item>
-      <item row="0" column="5" >
-       <widget class="QSpinBox" name="m_sbLimit" >
-        <property name="minimum" >
+      <item row="0" column="5">
+       <widget class="QSpinBox" name="m_sbLimit">
+        <property name="minimum">
          <number>1</number>
         </property>
-        <property name="maximum" >
+        <property name="maximum">
          <number>1000</number>
         </property>
-        <property name="value" >
+        <property name="value">
          <number>100</number>
         </property>
        </widget>
       </item>
-      <item row="0" column="6" >
-       <widget class="QLabel" name="label_3" >
-        <property name="text" >
+      <item row="0" column="6">
+       <widget class="QLabel" name="label_3">
+        <property name="text">
          <string>Name:</string>
         </property>
        </widget>
       </item>
-      <item row="0" column="7" >
-       <widget class="QLineEdit" name="m_textName" >
-        <property name="sizePolicy" >
-         <sizepolicy vsizetype="Fixed" hsizetype="Maximum" >
+      <item row="0" column="7">
+       <widget class="QLineEdit" name="m_textName">
+        <property name="sizePolicy">
+         <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
           <horstretch>0</horstretch>
           <verstretch>0</verstretch>
          </sizepolicy>
         </property>
        </widget>
       </item>
-      <item row="0" column="8" colspan="2" >
+      <item row="0" column="8" colspan="2">
        <spacer>
-        <property name="orientation" >
+        <property name="orientation">
          <enum>Qt::Horizontal</enum>
         </property>
-        <property name="sizeHint" >
+        <property name="sizeHint" stdset="0">
          <size>
           <width>40</width>
           <height>20</height>
         </property>
        </spacer>
       </item>
-      <item row="1" column="0" >
-       <widget class="QLabel" name="label" >
-        <property name="text" >
+      <item row="1" column="0">
+       <widget class="QLabel" name="label">
+        <property name="text">
          <string>Pool:</string>
         </property>
        </widget>
       </item>
-      <item row="1" column="1" >
-       <widget class="QComboBox" name="m_cbPool" />
+      <item row="1" column="1">
+       <widget class="QComboBox" name="m_cbPool"/>
       </item>
-      <item row="1" column="2" >
-       <widget class="QLabel" name="label_5" >
-        <property name="text" >
+      <item row="1" column="2">
+       <widget class="QLabel" name="label_5">
+        <property name="text">
          <string>Location:</string>
         </property>
        </widget>
       </item>
-      <item row="1" column="3" >
-       <widget class="QComboBox" name="m_cbLocation" />
+      <item row="1" column="3">
+       <widget class="QComboBox" name="m_cbLocation"/>
       </item>
-      <item row="1" column="4" colspan="2" >
-       <widget class="QCheckBox" name="m_chkExpired" >
-        <property name="text" >
+      <item row="1" column="4" colspan="2">
+       <widget class="QCheckBox" name="m_chkExpired">
+        <property name="text">
          <string>Expired</string>
         </property>
        </widget>
       </item>
-      <item row="1" column="7" colspan="2" >
+      <item row="1" column="7" colspan="2">
        <spacer>
-        <property name="orientation" >
+        <property name="orientation">
          <enum>Qt::Horizontal</enum>
         </property>
-        <property name="sizeHint" >
+        <property name="sizeHint" stdset="0">
          <size>
           <width>40</width>
           <height>20</height>
         </property>
        </spacer>
       </item>
-      <item row="1" column="9" >
-       <widget class="QPushButton" name="m_pbApply" >
-        <property name="text" >
+      <item row="1" column="9">
+       <widget class="QPushButton" name="m_pbApply">
+        <property name="text">
          <string>Apply</string>
         </property>
-        <property name="icon" >
-         <iconset resource="../main.qrc" >:/images/view-refresh.png</iconset>
+        <property name="icon">
+         <iconset resource="../main.qrc">
+          <normaloff>:/images/view-refresh.png</normaloff>:/images/view-refresh.png</iconset>
         </property>
        </widget>
       </item>
     </widget>
    </item>
    <item>
-    <widget class="QTableWidget" name="m_tableMedia" >
-     <property name="selectionMode" >
+    <widget class="QTableWidget" name="m_tableMedia">
+     <property name="selectionMode">
       <enum>QAbstractItemView::ExtendedSelection</enum>
      </property>
-     <property name="selectionBehavior" >
+     <property name="selectionBehavior">
       <enum>QAbstractItemView::SelectRows</enum>
      </property>
-     <property name="sortingEnabled" >
+     <property name="sortingEnabled">
       <bool>true</bool>
      </property>
      <column>
-      <property name="text" >
+      <property name="text">
        <string> Volume Name </string>
       </property>
      </column>
-     <property name="sortingEnabled" >
-      <bool>true</bool>
-     </property>
      <column>
-      <property name="text" >
+      <property name="text">
        <string>Online</string>
       </property>
      </column>
-     <property name="sortingEnabled" >
-      <bool>true</bool>
-     </property>
      <column>
-      <property name="text" >
+      <property name="text">
+       <string>Slot</string>
+      </property>
+     </column>
+     <column>
+      <property name="text">
        <string>Vol Bytes</string>
       </property>
      </column>
-     <property name="sortingEnabled" >
-      <bool>true</bool>
-     </property>
      <column>
-      <property name="text" >
+      <property name="text">
        <string>Vol Usage</string>
       </property>
      </column>
-     <property name="sortingEnabled" >
-      <bool>true</bool>
-     </property>
      <column>
-      <property name="text" >
+      <property name="text">
        <string>Vol Status</string>
       </property>
      </column>
-     <property name="sortingEnabled" >
-      <bool>true</bool>
-     </property>
      <column>
-      <property name="text" >
+      <property name="text">
        <string>Pool</string>
       </property>
      </column>
-     <property name="sortingEnabled" >
-      <bool>true</bool>
-     </property>
      <column>
-      <property name="text" >
+      <property name="text">
        <string>Media Type</string>
       </property>
      </column>
-     <property name="sortingEnabled" >
-      <bool>true</bool>
-     </property>
      <column>
-      <property name="text" >
+      <property name="text">
        <string>Last Written</string>
       </property>
      </column>
-     <property name="sortingEnabled" >
-      <bool>true</bool>
-     </property>
      <column>
-      <property name="text" >
+      <property name="text">
        <string>When expire?</string>
       </property>
      </column>
   </layout>
  </widget>
  <resources>
-  <include location="../main.qrc" />
+  <include location="../main.qrc"/>
  </resources>
  <connections/>
 </ui>