]> git.sur5r.net Git - bacula/bacula/commitdiff
Add a storage status page.
authorDirk H Bartley <dbartley@schupan.com>
Wed, 12 Mar 2008 02:50:53 +0000 (02:50 +0000)
committerDirk H Bartley <dbartley@schupan.com>
Wed, 12 Mar 2008 02:50:53 +0000 (02:50 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@6590 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/src/qt-console/bat.pro.in
bacula/src/qt-console/status/storstat.cpp [new file with mode: 0644]
bacula/src/qt-console/status/storstat.h [new file with mode: 0644]
bacula/src/qt-console/status/storstat.ui [new file with mode: 0644]
bacula/src/qt-console/storage/storage.cpp
bacula/src/qt-console/storage/storage.h
bacula/src/qt-console/storage/storage.ui

index 8007f2fa00838b086fedda893ec1f5ec32251687..385d6a2084791339b226d82d7682841c1d33932d 100644 (file)
@@ -45,6 +45,7 @@ FORMS += help/help.ui
 FORMS += jobgraphs/jobplotcontrols.ui
 FORMS += status/dirstat.ui
 FORMS += status/clientstat.ui
+FORMS += status/storstat.ui
 
 # Main directory
 HEADERS += mainwin.h bat.h bat_conf.h qstd.h pages.h
@@ -134,6 +135,10 @@ SOURCES += status/dirstat.cpp
 HEADERS += status/clientstat.h
 SOURCES += status/clientstat.cpp
 
+## Status Client
+HEADERS += status/storstat.h
+SOURCES += status/storstat.cpp
+
 INSTALLS += bins
 INSTALLS += confs
 
diff --git a/bacula/src/qt-console/status/storstat.cpp b/bacula/src/qt-console/status/storstat.cpp
new file mode 100644 (file)
index 0000000..c572098
--- /dev/null
@@ -0,0 +1,375 @@
+/*
+   Bacula® - The Network Backup Solution
+
+   Copyright (C) 2007-2008 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 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: storstat.cpp 5880 2007-11-09 01:20:40Z bartleyd2 $
+ *
+ *   Dirk Bartley, March 2007
+ */
+#include <QAbstractEventDispatcher>
+#include <QTableWidgetItem>
+#include "bat.h"
+#include "storstat.h"
+
+/*
+.status storage=<storage-name> <keyword>
+where <storage-name> is the storage name in the Director, and 
+<keyword> is one of the following:
+header
+running
+terminated
+
+waitreservation
+devices
+volumes
+spooling
+*/
+
+/*
+ * Constructor for the class
+ */
+StorStat::StorStat(QString &storage, QTreeWidgetItem *parentTreeWidgetItem)
+{
+   m_storage = storage;
+   setupUi(this);
+   m_name = tr("Storage Status");
+   m_closeable = true;
+   pgInitialize(parentTreeWidgetItem);
+   QTreeWidgetItem* thisitem = mainWin->getFromHash(this);
+   thisitem->setIcon(0,QIcon(QString::fromUtf8(":images/status.png")));
+   m_cursor = new QTextCursor(textEditHeader->document());
+
+   readSettings();
+   dockPage();
+   m_timer = new QTimer(this);
+   QWidget::connect(m_timer, SIGNAL(timeout()), this, SLOT(timerTriggered()));
+   m_timer->start(mainWin->m_refreshStatusDirInterval*1000);
+
+   createConnections();
+   setCurrent();
+}
+
+void StorStat::getFont()
+{
+   QFont font = textEditHeader->font();
+
+   QString dirname;
+   m_console->getDirResName(dirname);
+   QSettings settings(dirname, "bat");
+   settings.beginGroup("Console");
+   font.setFamily(settings.value("consoleFont", "Courier").value<QString>());
+   font.setPointSize(settings.value("consolePointSize", 10).toInt());
+   font.setFixedPitch(settings.value("consoleFixedPitch", true).toBool());
+   settings.endGroup();
+   textEditHeader->setFont(font);
+}
+
+/*
+ * Write the m_splitter settings in the destructor
+ */
+StorStat::~StorStat()
+{
+   writeSettings();
+}
+
+/*
+ * Populate all tables and header widgets
+ */
+void StorStat::populateAll()
+{
+   if (!m_console->preventInUseConnect())
+       return;
+   populateHeader();
+   populateTerminated();
+   populateRunning();
+   populateWaitReservation();
+   populateDevices();
+   populateVolumes();
+   populateSpooling();
+}
+
+/*
+ *  Timer is triggered, see if is current and repopulate.
+ */
+void StorStat::timerTriggered()
+{
+   bool iscurrent = mainWin->stackedWidget->currentIndex() == mainWin->stackedWidget->indexOf(this);
+   if (((isDocked() && iscurrent) || (!isDocked())) && mainWin->m_refreshStatusDir) {
+      if (m_console->is_ready())
+         populateAll();
+   }
+}
+
+/*
+ * Populate header text widget
+ */
+void StorStat::populateHeader()
+{
+   QString command = QString(".status storage=\"" + m_storage + "\" header");
+   QStringList results;
+   textEditHeader->clear();
+
+   if (m_console->dir_cmd(command, results)) {
+      foreach (QString line, results) {
+         line += "\n";
+         textEditHeader->insertPlainText(line);
+      }
+   }
+}
+
+void StorStat::populateWaitReservation()
+{
+   QString command = QString(".status storage=\"" + m_storage + "\" waitreservation");
+   QStringList results;
+   textEditWaitReservation->clear();
+
+   if (m_console->dir_cmd(command, results)) {
+      foreach (QString line, results) {
+         line += "\n";
+         textEditWaitReservation->insertPlainText(line);
+      }
+   }
+}
+
+void StorStat::populateDevices()
+{
+   QString command = QString(".status storage=\"" + m_storage + "\" devices");
+   QStringList results;
+   textEditDevices->clear();
+
+   if (m_console->dir_cmd(command, results)) {
+      foreach (QString line, results) {
+         line += "\n";
+         textEditDevices->insertPlainText(line);
+      }
+   }
+}
+
+void StorStat::populateVolumes()
+{
+   QString command = QString(".status storage=\"" + m_storage + "\" volumes");
+   QStringList results;
+   textEditVolumes->clear();
+
+   if (m_console->dir_cmd(command, results)) {
+      foreach (QString line, results) {
+         line += "\n";
+         textEditVolumes->insertPlainText(line);
+      }
+   }
+}
+
+void StorStat::populateSpooling()
+{
+   QString command = QString(".status storage=\"" + m_storage + "\" spooling");
+   QStringList results;
+   textEditSpooling->clear();
+
+   if (m_console->dir_cmd(command, results)) {
+      foreach (QString line, results) {
+         line += "\n";
+         textEditSpooling->insertPlainText(line);
+      }
+   }
+}
+
+/*
+ * Populate teminated table
+ */
+void StorStat::populateTerminated()
+{
+   QString command = QString(".status storage=\"" + m_storage + "\" terminated");
+   QStringList results;
+   QBrush blackBrush(Qt::black);
+
+   terminatedTable->clear();
+   QStringList headerlist = (QStringList()
+      << tr("Job Id") << tr("Job Level") << tr("Job Files")
+      << tr("Job Bytes") << tr("Job Status") << tr("Job Time") 
+      << tr("Job Name"));
+   QStringList flaglist = (QStringList()
+      << "R" << "L" << "R" << "R" << "LC" 
+      << "L" << "L");
+
+   terminatedTable->setColumnCount(headerlist.size());
+   terminatedTable->setHorizontalHeaderLabels(headerlist);
+
+   if (m_console->dir_cmd(command, results)) {
+      int row = 0;
+      QTableWidgetItem* p_tableitem;
+      terminatedTable->setRowCount(results.size());
+      foreach (QString line, results) {
+         /* Iterate through the record returned from the query */
+         QStringList fieldlist = line.split("\t");
+         int column = 0;
+         QString statusCode("");
+         /* Iterate through fields in the record */
+         foreach (QString field, fieldlist) {
+            field = field.trimmed();  /* strip leading & trailing spaces */
+            p_tableitem = new QTableWidgetItem(field, 1);
+            p_tableitem->setForeground(blackBrush);
+            p_tableitem->setFlags(0);
+            if (flaglist[column].contains("R"))
+               p_tableitem->setTextAlignment(Qt::AlignRight);
+            if (flaglist[column].contains("C"))
+               if (field == "OK")
+                  p_tableitem->setBackground(Qt::green);
+               else
+                  p_tableitem->setBackground(Qt::red);
+            terminatedTable->setItem(row, column, p_tableitem);
+            column += 1;
+         }
+         row += 1;
+      }
+   }
+   terminatedTable->resizeColumnsToContents();
+   terminatedTable->resizeRowsToContents();
+   terminatedTable->verticalHeader()->hide();
+}
+
+/*
+ * Populate running table
+ */
+void StorStat::populateRunning()
+{
+   QString command = QString(".status dir running");
+   QStringList results;
+   QBrush blackBrush(Qt::black);
+
+   runningTable->clear();
+   QStringList headerlist = (QStringList()
+      << tr("Job Id") << tr("Job Level") << tr("Job Data") << tr("Job Info"));
+
+   runningTable->setColumnCount(headerlist.size());
+   runningTable->setHorizontalHeaderLabels(headerlist);
+
+   if (m_console->dir_cmd(command, results)) {
+      int row = 0;
+      QTableWidgetItem* p_tableitem;
+      runningTable->setRowCount(results.size());
+      foreach (QString line, results) {
+         /* Iterate through the record returned from the query */
+         QStringList fieldlist = line.split("\t");
+         int column = 0;
+         QString statusCode("");
+         /* Iterate through fields in the record */
+         foreach (QString field, fieldlist) {
+            field = field.trimmed();  /* strip leading & trailing spaces */
+            p_tableitem = new QTableWidgetItem(field, 1);
+            p_tableitem->setForeground(blackBrush);
+            p_tableitem->setFlags(0);
+            runningTable->setItem(row, column, p_tableitem);
+            column += 1;
+         }
+         row += 1;
+      }
+   }
+   runningTable->resizeColumnsToContents();
+   runningTable->resizeRowsToContents();
+   runningTable->verticalHeader()->hide();
+}
+
+/*
+ * When the treeWidgetItem in the page selector tree is singleclicked, Make sure
+ * The tree has been populated.
+ */
+void StorStat::PgSeltreeWidgetClicked()
+{
+   if (!m_populated) {
+      populateAll();
+      m_populated=true;
+   }
+}
+
+/*
+ *  Virtual function override of pages function which is called when this page
+ *  is visible on the stack
+ */
+void StorStat::currentStackItem()
+{
+   populateAll();
+   if (!m_populated) {
+      m_populated=true;
+   }
+}
+
+/*
+ * Function to create connections for context sensitive menu for this and
+ * the page selector
+ */
+void StorStat::createConnections()
+{
+   connect(actionRefresh, SIGNAL(triggered()), this,
+                   SLOT(populateAll()));
+   connect(actionCancelRunning, SIGNAL(triggered()), this,
+                   SLOT(consoleCancelJob()));
+   terminatedTable->setContextMenuPolicy(Qt::ActionsContextMenu);
+   terminatedTable->addAction(actionRefresh);
+   runningTable->setContextMenuPolicy(Qt::ActionsContextMenu);
+   runningTable->addAction(actionRefresh);
+   runningTable->addAction(actionCancelRunning);
+}
+
+/*
+ * Save user settings associated with this page
+ */
+void StorStat::writeSettings()
+{
+   QSettings settings(m_console->m_dir->name(), "bat");
+   settings.beginGroup(m_groupText);
+   settings.setValue(m_splitText, splitter->saveState());
+   settings.endGroup();
+}
+
+/*
+ * Read and restore user settings associated with this page
+ */
+void StorStat::readSettings()
+{
+   m_groupText = "StorStatPage";
+   m_splitText = "splitterSizes_0";
+   QSettings settings(m_console->m_dir->name(), "bat");
+   settings.beginGroup(m_groupText);
+   splitter->restoreState(settings.value(m_splitText).toByteArray());
+   settings.endGroup();
+}
+
+/*
+ * Cancel a running job
+ */
+void StorStat::consoleCancelJob()
+{
+   int currentrow = runningTable->currentRow();
+   QTableWidgetItem *item = runningTable->item(currentrow, 0);
+   if (item) {
+      QString text = item->text();
+      QString cmd("cancel jobid=");
+      cmd += text;
+      consoleCommand(cmd);
+   }
+}
diff --git a/bacula/src/qt-console/status/storstat.h b/bacula/src/qt-console/status/storstat.h
new file mode 100644 (file)
index 0000000..60b03ab
--- /dev/null
@@ -0,0 +1,78 @@
+#ifndef _STORSTAT_H_
+#define _STORSTAT_H_
+/*
+   Bacula® - The Network Backup Solution
+
+   Copyright (C) 2007-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 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 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: dirstat.h 5372 2007-08-17 12:17:04Z kerns $
+ *
+ *   Dirk Bartley, March 2007
+ */
+
+#include <QtGui>
+#include "ui_storstat.h"
+#include "console.h"
+#include "pages.h"
+
+class StorStat : public Pages, public Ui::StorStatForm
+{
+   Q_OBJECT 
+
+public:
+   StorStat(QString &, QTreeWidgetItem *);
+   ~StorStat();
+   virtual void PgSeltreeWidgetClicked();
+   virtual void currentStackItem();
+
+public slots:
+   void populateHeader();
+   void populateTerminated();
+   void populateRunning();
+   void populateWaitReservation();
+   void populateDevices();
+   void populateVolumes();
+   void populateSpooling();
+   void populateAll();
+
+private slots:
+   void timerTriggered();
+   void consoleCancelJob();
+
+private:
+   void createConnections();
+   void writeSettings();
+   void readSettings();
+   bool m_populated;
+   QTextCursor *m_cursor;
+   void getFont();
+   QString m_groupText;
+   QString m_splitText;
+   QTimer *m_timer;
+   QString m_storage;
+};
+
+#endif /* _STORSTAT_H_ */
diff --git a/bacula/src/qt-console/status/storstat.ui b/bacula/src/qt-console/status/storstat.ui
new file mode 100644 (file)
index 0000000..7ff14d9
--- /dev/null
@@ -0,0 +1,154 @@
+<ui version="4.0" >
+ <class>StorStatForm</class>
+ <widget class="QWidget" name="StorStatForm" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>560</width>
+    <height>477</height>
+   </rect>
+  </property>
+  <property name="windowTitle" >
+   <string>Form</string>
+  </property>
+  <layout class="QGridLayout" >
+   <item row="0" column="0" >
+    <widget class="QSplitter" name="splitter" >
+     <property name="orientation" >
+      <enum>Qt::Vertical</enum>
+     </property>
+     <widget class="QTabWidget" name="tabWidget" >
+      <property name="currentIndex" >
+       <number>0</number>
+      </property>
+      <widget class="QWidget" name="tab" >
+       <attribute name="title" >
+        <string>Header</string>
+       </attribute>
+       <layout class="QGridLayout" >
+        <item row="0" column="0" >
+         <widget class="QTextEdit" name="textEditHeader" />
+        </item>
+       </layout>
+      </widget>
+      <widget class="QWidget" name="tab_2" >
+       <attribute name="title" >
+        <string>Waitreservation</string>
+       </attribute>
+       <layout class="QGridLayout" >
+        <item row="0" column="0" >
+         <widget class="QTextEdit" name="textEditWaitReservation" />
+        </item>
+       </layout>
+      </widget>
+      <widget class="QWidget" name="tab_3" >
+       <attribute name="title" >
+        <string>Devices</string>
+       </attribute>
+       <layout class="QGridLayout" >
+        <item row="0" column="0" >
+         <widget class="QTextEdit" name="textEditDevices" />
+        </item>
+       </layout>
+      </widget>
+      <widget class="QWidget" name="tab_4" >
+       <attribute name="title" >
+        <string>Volumes</string>
+       </attribute>
+       <layout class="QGridLayout" >
+        <item row="0" column="0" >
+         <widget class="QTextEdit" name="textEditVolumes" />
+        </item>
+       </layout>
+      </widget>
+      <widget class="QWidget" name="tab_5" >
+       <attribute name="title" >
+        <string>Spooling</string>
+       </attribute>
+       <layout class="QGridLayout" >
+        <item row="0" column="0" >
+         <widget class="QTextEdit" name="textEditSpooling" />
+        </item>
+       </layout>
+      </widget>
+     </widget>
+     <widget class="QWidget" name="" >
+      <layout class="QVBoxLayout" >
+       <item>
+        <widget class="QLabel" name="runningLabel" >
+         <property name="layoutDirection" >
+          <enum>Qt::LeftToRight</enum>
+         </property>
+         <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-size:13pt; font-weight:600;">Running Jobs&lt;/span>&lt;/p>&lt;/body>&lt;/html></string>
+         </property>
+         <property name="alignment" >
+          <set>Qt::AlignCenter</set>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QTableWidget" name="runningTable" />
+       </item>
+      </layout>
+     </widget>
+     <widget class="QWidget" name="" >
+      <layout class="QVBoxLayout" >
+       <item>
+        <widget class="QLabel" name="terminatedLabel" >
+         <property name="layoutDirection" >
+          <enum>Qt::LeftToRight</enum>
+         </property>
+         <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-size:13pt; font-weight:600;">Terminated Jobs&lt;/span>&lt;/p>&lt;/body>&lt;/html></string>
+         </property>
+         <property name="alignment" >
+          <set>Qt::AlignCenter</set>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QTableWidget" name="terminatedTable" />
+       </item>
+      </layout>
+     </widget>
+    </widget>
+   </item>
+  </layout>
+  <action name="actionRefresh" >
+   <property name="icon" >
+    <iconset resource="../main.qrc" >:/images/view-refresh.png</iconset>
+   </property>
+   <property name="text" >
+    <string>Refresh</string>
+   </property>
+  </action>
+  <action name="actionCancelRunning" >
+   <property name="icon" >
+    <iconset resource="../main.qrc" >:/images/utilities-terminal.png</iconset>
+   </property>
+   <property name="text" >
+    <string>Cancel Running Job</string>
+   </property>
+  </action>
+  <action name="actionDisableScheduledJob" >
+   <property name="icon" >
+    <iconset resource="../main.qrc" >:/images/utilities-terminal.png</iconset>
+   </property>
+   <property name="text" >
+    <string>Disable Scheduled Job</string>
+   </property>
+  </action>
+ </widget>
+ <resources>
+  <include location="../main.qrc" />
+ </resources>
+ <connections/>
+</ui>
index 5808c825e9bc73f8951275ce1e64cc0c8bc45a1c..388b88c3bbffe9f2c69cd47582ed670f6726f33b 100644 (file)
@@ -40,7 +40,8 @@
 #include "bat.h"
 #include "storage.h"
 #include "label/label.h"
-#include "../mount/mount.h"
+#include "mount/mount.h"
+#include "status/storstat.h"
 
 Storage::Storage()
 {
@@ -163,6 +164,7 @@ void Storage::treeItemChanged(QTreeWidgetItem *currentwidgetitem, QTreeWidgetIte
          int treedepth = previouswidgetitem->data(0, Qt::UserRole).toInt();
          if (treedepth == 1){
             mp_treeWidget->removeAction(actionStatusStorageInConsole);
+            mp_treeWidget->removeAction(actionStatusStorageWindow);
             mp_treeWidget->removeAction(actionLabelStorage);
             mp_treeWidget->removeAction(actionMountStorage);
             mp_treeWidget->removeAction(actionUnMountStorage);
@@ -179,6 +181,7 @@ void Storage::treeItemChanged(QTreeWidgetItem *currentwidgetitem, QTreeWidgetIte
          m_currentStorage = currentwidgetitem->text(0);
          m_currentAutoChanger = currentwidgetitem->text(2).toInt();
          mp_treeWidget->addAction(actionStatusStorageInConsole);
+         mp_treeWidget->addAction(actionStatusStorageWindow);
          mp_treeWidget->addAction(actionLabelStorage);
          mp_treeWidget->addAction(actionMountStorage);
          mp_treeWidget->addAction(actionUnMountStorage);
@@ -186,6 +189,8 @@ void Storage::treeItemChanged(QTreeWidgetItem *currentwidgetitem, QTreeWidgetIte
          QString text;
          text = "Status Storage \"" + m_currentStorage + "\"";
          actionStatusStorageInConsole->setText(text);
+         text = "Status Storage \"" + m_currentStorage + "\" in Window";
+         actionStatusStorageWindow->setText(text);
          text = "Label media in Storage \"" + m_currentStorage + "\"";
          actionLabelStorage->setText(text);
          text = "Mount media in Storage \"" + m_currentStorage + "\"";
@@ -235,6 +240,8 @@ void Storage::createContextMenu()
                 SLOT(consoleUpdateSlotsScan()));
    connect(actionRelease, SIGNAL(triggered()), this,
                 SLOT(consoleRelease()));
+   connect(actionStatusStorageWindow, SIGNAL(triggered()), this,
+                SLOT(statusStorageWindow()));
 }
 
 /*
@@ -313,3 +320,12 @@ void Storage::consoleRelease()
    cmd += m_currentStorage;
    consoleCommand(cmd);
 }
+
+/*
+ *  Open a status storage window
+ */
+void Storage::statusStorageWindow()
+{
+   QTreeWidgetItem *parentItem = mainWin->getFromHash(this);
+   new StorStat(m_currentStorage, parentItem);
+}
index fa33d80e725e0959d7dcc7dc7739a6385b648015..2632637ad7dcc537fefe4f362828db387eb1a173 100644 (file)
@@ -60,6 +60,7 @@ private slots:
    void consoleUpdateSlots();
    void consoleUpdateSlotsScan();
    void consoleRelease();
+   void statusStorageWindow();
 
 private:
    void createContextMenu();
index 1f2085060ce302063c6c33bf66aeb6a37e28a2e4..3ed7a4750223d391b00bd4505af927887ab788f5 100644 (file)
@@ -5,22 +5,40 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>431</width>
-    <height>296</height>
+    <width>467</width>
+    <height>383</height>
    </rect>
   </property>
   <property name="windowTitle" >
    <string>Storage Tree</string>
   </property>
   <layout class="QGridLayout" >
-   <property name="margin" >
+   <property name="leftMargin" >
     <number>9</number>
    </property>
-   <property name="spacing" >
+   <property name="topMargin" >
+    <number>9</number>
+   </property>
+   <property name="rightMargin" >
+    <number>9</number>
+   </property>
+   <property name="bottomMargin" >
+    <number>9</number>
+   </property>
+   <property name="horizontalSpacing" >
+    <number>6</number>
+   </property>
+   <property name="verticalSpacing" >
     <number>6</number>
    </property>
    <item row="0" column="0" >
-    <widget class="QTreeWidget" name="mp_treeWidget" />
+    <widget class="QTreeWidget" name="mp_treeWidget" >
+     <column>
+      <property name="text" >
+       <string>1</string>
+      </property>
+     </column>
+    </widget>
    </item>
   </layout>
   <action name="actionRefreshStorage" >
     <string>Release</string>
    </property>
   </action>
+  <action name="actionStatusStorageWindow" >
+   <property name="icon" >
+    <iconset resource="../main.qrc" >:/images/status.png</iconset>
+   </property>
+   <property name="text" >
+    <string>Status Storage Window</string>
+   </property>
+  </action>
  </widget>
  <resources>
   <include location="../main.qrc" />