dhb
====================================================
Add context sensitive options for most commands
-status dir on page select director item
-All items with jobid= that I thought could work from joblist are done.
-As well as many more
-update slots scan
see COMMANDS file
-Create edit pool interface.
-
========LOW priority items:
Use settings object to size the restore window. Similar to the saving of the
state of the main window.
========================================================
This release or next:
-A window showing a list of jobs and defaults. Defaults can be gotten in manner
-similar to what the first restore window does.
-
A window showing a list of schedule resources.
A list of message resources??
I'm working on this (kes). It is not so simple, but moving forward
gradually ...
+Create edit pool interface.
+ This is done from config file
+
============================================================
DONE:
============================================================
+A window showing a list of jobs and defaults. Defaults can be gotten in manner
+similar to what the first restore window does.
+
+status dir on page select director item
+All items with jobid= that I thought could work from joblist are done.
+As well as many more
+update slots scan
Preferences for the messages timer.
Get the 5 second bring to bottom of console to stop
FORMS += select/select.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
+FORMS += joblog/joblog.ui jobs/jobs.ui
FORMS += help/help.ui
HEADERS += mainwin.h bat.h bat_conf.h qstd.h
HEADERS += joblog/joblog.h
SOURCES += joblog/joblog.cpp
+## Jobs
+HEADERS += jobs/jobs.h
+SOURCES += jobs/jobs.cpp
+
# Help dialog
HEADERS += help/help.h
SOURCES += help/help.cpp
/* add context sensitive menu items specific to this classto the page
* selector tree. m_contextActions is QList of QActions */
m_contextActions.append(actionRefreshClients);
+ createContextMenu();
+ dockPage();
}
Clients::~Clients()
{
if(!m_populated) {
populateTree();
- createContextMenu();
m_populated=true;
}
}
if(!m_populated) {
populateTree();
/* Create the context menu for the client tree */
- createContextMenu();
m_populated=true;
}
}
/* add context sensitive menu items specific to this classto the page
* selector tree. m_contextActions is QList of QActions */
m_contextActions.append(actionRefreshFileSet);
+ dockPage();
}
FileSet::~FileSet()
QTreeWidgetItem *parentTreeWidgetItem)
{
setupUi(this);
- m_name = "Clients";
+ m_name = ""; /* treeWidgetName has a virtual override in this class */
m_mediaName = mediaName;
m_clientName = clientname;
pgInitialize(parentTreeWidgetItem);
limitSpinBox->setValue(mainWin->m_recordLimitVal);
daysCheckBox->setCheckState(mainWin->m_daysLimitCheck ? Qt::Checked : Qt::Unchecked);
daysSpinBox->setValue(mainWin->m_daysLimitVal);
+ dockPage();
}
/*
void JobList::treeWidgetName(QString &desc)
{
if ((m_mediaName == "") && (m_clientName == "")) {
- desc = "Jobs";
+ desc = "JobList";
} else {
- desc = "Jobs ";
+ desc = "JobList ";
if (m_mediaName != "" ) {
- desc += "on Volume " + m_mediaName;
+ desc += "of Volume " + m_mediaName;
}
if (m_clientName != "" ) {
desc += "of Client " + m_clientName;
m_name = "JobLog";
m_closeable = true;
pgInitialize(parentTreeWidgetItem);
+ QTreeWidgetItem* thisitem = mainWin->getFromHash(this);
+ thisitem->setIcon(0,QIcon(QString::fromUtf8(":images/emblem-system.svg")));
m_cursor = new QTextCursor(textEdit->document());
m_jobId = jobId;
--- /dev/null
+/*
+ Bacula® - The Network Backup Solution
+
+ Copyright (C) 2000-2007 Free Software Foundation Europe e.V.
+
+ The main author of Bacula is Kern Sibbald, with contributions from
+ many others, a complete list can be found in the file AUTHORS.
+ This program is Free Software; you can redistribute it and/or
+ modify it under the terms of version two of the GNU General Public
+ License as published by the Free Software Foundation plus additions
+ that are listed in the file LICENSE.
+
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301, USA.
+
+ Bacula® is a registered trademark of John Walker.
+ The licensor of Bacula is the Free Software Foundation Europe
+ (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
+ Switzerland, email:ftf@fsfeurope.org.
+*/
+
+/*
+ * Version $Id: client.cpp 4230 2007-02-21 20:07:37Z kerns $
+ *
+ * Jobs Class
+ *
+ * Dirk Bartley, March 2007
+ *
+ */
+
+//#include <QAbstractEventDispatcher>
+//#include <QMenu>
+#include "bat.h"
+#include "jobs/jobs.h"
+
+Jobs::Jobs()
+{
+ setupUi(this);
+ m_name = "Jobs";
+ pgInitialize();
+ QTreeWidgetItem* thisitem = mainWin->getFromHash(this);
+ thisitem->setIcon(0,QIcon(QString::fromUtf8(":images/emblem-system.svg")));
+
+ /* mp_treeWidget, Storage Tree Tree Widget inherited from ui_client.h */
+ m_populated = false;
+ m_checkcurwidget = true;
+ m_closeable = false;
+ /* add context sensitive menu items specific to this classto the page
+ * selector tree. m_contextActions is QList of QActions */
+ m_contextActions.append(actionRefreshJobs);
+ createContextMenu();
+ dockPage();
+}
+
+Jobs::~Jobs()
+{
+}
+
+/*
+ * The main meat of the class!! The function that querries the director and
+ * creates the widgets with appropriate values.
+ */
+void Jobs::populateTree()
+{
+ QTreeWidgetItem *jobsItem, *topItem;
+
+ if (!m_console->preventInUseConnect())
+ return;
+ m_checkcurwidget = false;
+ mp_treeWidget->clear();
+ m_checkcurwidget = true;
+ QStringList headerlist = (QStringList() << "Job Name" << "Pool" << "Messages"
+ << "Client" << "Storage" << "Where" << "Level" << "Type" << "FileSet"
+ << "Catalog" << "Enabled");
+
+ topItem = new QTreeWidgetItem(mp_treeWidget);
+ topItem->setText(0, "Jobs");
+ topItem->setData(0, Qt::UserRole, 0);
+ topItem->setExpanded(true);
+
+ mp_treeWidget->setColumnCount(headerlist.count());
+ mp_treeWidget->setHeaderLabels(headerlist);
+
+ foreach (QString jobName, m_console->job_list){
+ jobsItem = new QTreeWidgetItem(topItem);
+ jobsItem->setText(0, jobName);
+ //jobsItem->setExpanded(true);
+
+ for (int i=0; i<headerlist.count(); i++)
+ jobsItem->setData(i, Qt::UserRole, 1);
+/*struct job_defaults {
+ QString job_name;
+ QString pool_name;
+ QString messages_name;
+ QString client_name;
+ QString store_name;
+ QString where;
+ QString level;
+ QString type;
+ QString fileset_name;
+ QString catalog_name;
+ bool enabled;
+};*/
+ job_defaults job_defs;
+ job_defs.job_name = jobName;
+ if (m_console->get_job_defaults(job_defs)) {
+ int col = 1;
+ jobsItem->setText(col++, job_defs.pool_name);
+ jobsItem->setText(col++, job_defs.messages_name);
+ jobsItem->setText(col++, job_defs.client_name);
+ jobsItem->setText(col++, job_defs.store_name);
+ jobsItem->setText(col++, job_defs.where);
+ jobsItem->setText(col++, job_defs.level);
+ jobsItem->setText(col++, job_defs.type);
+ jobsItem->setText(col++, job_defs.fileset_name);
+ jobsItem->setText(col++, job_defs.catalog_name);
+ if (job_defs.enabled) {
+ jobsItem->setText(col++, "Yes");
+ } else {
+ jobsItem->setText(col++, "No");
+ }
+ }
+
+ }
+ /* Resize the columns */
+ for(int cnter=0; cnter<headerlist.size(); cnter++) {
+ mp_treeWidget->resizeColumnToContents(cnter);
+ }
+}
+
+/*
+ * When the treeWidgetItem in the page selector tree is singleclicked, Make sure
+ * The tree has been populated.
+ */
+void Jobs::PgSeltreeWidgetClicked()
+{
+ if(!m_populated) {
+ populateTree();
+ m_populated=true;
+ }
+}
+
+/*
+ * Added to set the context menu policy based on currently active treeWidgetItem
+ * signaled by currentItemChanged
+ */
+void Jobs::treeItemChanged(QTreeWidgetItem *currentwidgetitem, QTreeWidgetItem *previouswidgetitem )
+{
+ /* m_checkcurwidget checks to see if this is during a refresh, which will segfault */
+ if (m_checkcurwidget) {
+ /* The Previous item */
+ if (previouswidgetitem) { /* avoid a segfault if first time */
+ int treedepth = previouswidgetitem->data(0, Qt::UserRole).toInt();
+ if (treedepth == 1){
+ //mp_treeWidget->removeAction(actionListJobsofClient);
+ }
+ }
+
+ int treedepth = currentwidgetitem->data(0, Qt::UserRole).toInt();
+ if (treedepth == 1){
+ /* set a hold variable to the client name in case the context sensitive
+ * menu is used */
+ m_currentlyselected=currentwidgetitem->text(0);
+ //mp_treeWidget->addAction(actionListJobsofClient);
+ }
+ }
+}
+
+/*
+ * Setup a context menu
+ * Made separate from populate so that it would not create context menu over and
+ * over as the tree is repopulated.
+ */
+void Jobs::createContextMenu()
+{
+ mp_treeWidget->setContextMenuPolicy(Qt::ActionsContextMenu);
+ mp_treeWidget->addAction(actionRefreshJobs);
+ connect(mp_treeWidget, SIGNAL(
+ currentItemChanged(QTreeWidgetItem *, QTreeWidgetItem *)),
+ this, SLOT(treeItemChanged(QTreeWidgetItem *, QTreeWidgetItem *)));
+ /* connect to the action specific to this pages class */
+ connect(actionRefreshJobs, SIGNAL(triggered()), this,
+ SLOT(populateTree()));
+}
+
+/*
+ * Virtual function which is called when this page is visible on the stack
+ */
+void Jobs::currentStackItem()
+{
+ if(!m_populated) {
+ populateTree();
+ /* Create the context menu for the client tree */
+ m_populated=true;
+ }
+}
--- /dev/null
+#ifndef _JOBS_H_
+#define _JOBS_H_
+/*
+ Bacula® - The Network Backup Solution
+
+ Copyright (C) 2000-2007 Free Software Foundation Europe e.V.
+
+ The main author of Bacula is Kern Sibbald, with contributions from
+ many others, a complete list can be found in the file AUTHORS.
+ This program is Free Software; you can redistribute it and/or
+ modify it under the terms of version two of the GNU General Public
+ License as published by the Free Software Foundation plus additions
+ that are listed in the file LICENSE.
+
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301, USA.
+
+ Bacula® is a registered trademark of John Walker.
+ The licensor of Bacula is the Free Software Foundation Europe
+ (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
+ Switzerland, email:ftf@fsfeurope.org.
+*/
+/*
+ * Version $Id: jobs.h 4923 2007-05-28 11:51:53Z bartleyd2 $
+ *
+ * Dirk Bartley, March 2007
+ */
+
+#include <QtGui>
+#include "ui_jobs.h"
+#include "console.h"
+#include "pages.h"
+
+class Jobs : public Pages, public Ui::jobsForm
+{
+ Q_OBJECT
+
+public:
+ Jobs();
+ ~Jobs();
+ virtual void PgSeltreeWidgetClicked();
+ virtual void currentStackItem();
+
+public slots:
+ void treeItemChanged(QTreeWidgetItem *, QTreeWidgetItem *);
+
+private slots:
+ void populateTree();
+
+private:
+ void createContextMenu();
+ QString m_currentlyselected;
+ bool m_populated;
+ bool m_checkcurwidget;
+};
+
+#endif /* _JOBS_H_ */
--- /dev/null
+<ui version="4.0" >
+ <class>jobsForm</class>
+ <widget class="QWidget" name="jobsForm" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>413</width>
+ <height>258</height>
+ </rect>
+ </property>
+ <property name="windowTitle" >
+ <string>Client Tree</string>
+ </property>
+ <layout class="QGridLayout" >
+ <property name="margin" >
+ <number>9</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item row="0" column="0" >
+ <widget class="QTreeWidget" name="mp_treeWidget" />
+ </item>
+ </layout>
+ <action name="actionRefreshJobs" >
+ <property name="icon" >
+ <iconset resource="../main.qrc" >:/images/view-refresh.svg</iconset>
+ </property>
+ <property name="text" >
+ <string>Refresh Jobs List</string>
+ </property>
+ <property name="statusTip" >
+ <string>Requery the director for the list of clients.</string>
+ </property>
+ </action>
+ </widget>
+ <resources>
+ <include location="../main.qrc" />
+ </resources>
+ <connections/>
+</ui>
#include "joblist/joblist.h"
#include "clients/clients.h"
#include "help/help.h"
+#include "jobs/jobs.h"
/*
* Daemon message callback
* Create instances in alphabetic order of the rest
* of the classes that will by default exist under each Director.
*/
-// createPagebRestore();
- createPageClients();
- createPageFileSet();
+// new new bRestore();
+ new Clients();
+ new FileSet();
+ new Jobs();
QString emptymedia(""), emptyclient("");
createPageJobList(emptymedia, emptyclient, NULL);
- createPageMediaList();
- createPageStorage();
+ new MediaList();
+ new Storage();
treeWidget->expandItem(topItem);
stackedWidget->setCurrentWidget(m_currentConsole);
UnlockRes();
}
-/*
- * create an instance of the the brestore class on the stack
- */
-void MainWin::createPagebRestore()
-{
- bRestore* brestore = new bRestore();
- brestore->dockPage();
-}
-
-/*
- * create an instance of the the medialist class on the stack
- */
-void MainWin::createPageMediaList()
-{
- MediaList* medialist = new MediaList();
- medialist->dockPage();
-}
-
/*
* create an instance of the the joblist class on the stack
*/
/* save current tree widget item in case query produces no results */
holdItem = treeWidget->currentItem();
JobList* joblist = new JobList(media, client, parentTreeWidgetItem);
- joblist->dockPage();
/* If this is a query of jobs on a specific media */
if ((media != "") || (client != "")) {
joblist->setCurrent();
}
}
-/*
- * create an instance of the the Clients class on the stack
- */
-void MainWin::createPageClients()
-{
- Clients* clients = new Clients();
- clients->dockPage();
-}
-
-/*
- * create an instance of the the storage class on the stack
- */
-void MainWin::createPageStorage()
-{
- Storage* storage = new Storage();
- storage->dockPage();
-}
-
-/*
- * create an instance of the the fileset class on the stack
- */
-void MainWin::createPageFileSet()
-{
- FileSet* fileset = new FileSet();
- fileset->dockPage();
-}
-
/* Create a root Tree Widget */
QTreeWidgetItem *MainWin::createTopPage(char *name)
{
void createPages();
QTreeWidgetItem *createTopPage(char *name);
QTreeWidgetItem *createPage(char *name, QTreeWidgetItem *parent);
- void createPagebRestore();
- void createPageMediaList();
- void createPageClients();
- void createPageStorage();
- void createPageFileSet();
private:
Console *m_currentConsole;
*/
void MediaEdit::setSpins(int value)
{
- int years, days, hours, minutes, seconds, left;
+ int years, months, days, hours, minutes, seconds, left;
years = abs(value / 31536000);
left = value - years * 31536000;
+ months = abs(left / 2592000);
+ left = left - months * 2592000;
days = abs(left / 86400);
left = left - days * 86400;
hours = abs(left / 3600);
seconds = left - minutes * 60;
disconnectSpins();
yearsSpin->setValue(years);
+ monthsSpin->setValue(months);
daysSpin->setValue(days);
hoursSpin->setValue(hours);
minutesSpin->setValue(minutes);
daysSpin->setValue(daysSpin->value()-1);
}
if (daysSpin->value() == -1) {
- daysSpin->setValue(364);
+ daysSpin->setValue(29);
+ monthsSpin->setValue(monthsSpin->value()-1);
+ }
+ if (monthsSpin->value() == -1) {
+ monthsSpin->setValue(11);
yearsSpin->setValue(yearsSpin->value()-1);
}
if (yearsSpin->value() == -1) {
hoursSpin->setValue(0);
daysSpin->setValue(daysSpin->value()+1);
}
- if (daysSpin->value() == 365) {
+ if (daysSpin->value() == 30) {
daysSpin->setValue(0);
+ monthsSpin->setValue(monthsSpin->value()+1);
+ }
+ if (monthsSpin->value() == 12) {
+ monthsSpin->setValue(0);
yearsSpin->setValue(yearsSpin->value()+1);
}
connectSpins();
int retention;
retention = secondsSpin->value() + minutesSpin->value() * 60 +
hoursSpin->value() * 3600 + daysSpin->value() * 86400 +
+ monthsSpin->value() * 2592000 +
yearsSpin->value() * 31536000;
disconnect(retentionSpin, SIGNAL(valueChanged(int)), this, SLOT(retentionChanged()));
retentionSpin->setValue(retention);
int useDuration;
useDuration = secondsSpin->value() + minutesSpin->value() * 60 +
hoursSpin->value() * 3600 + daysSpin->value() * 86400 +
+ monthsSpin->value() * 2592000 +
yearsSpin->value() * 31536000;
disconnect(useDurationSpin, SIGNAL(valueChanged(int)), this, SLOT(useDurationChanged()));
useDurationSpin->setValue(useDuration);
connect(minutesSpin, SIGNAL(valueChanged(int)), this, SLOT(durationChanged()));
connect(hoursSpin, SIGNAL(valueChanged(int)), this, SLOT(durationChanged()));
connect(daysSpin, SIGNAL(valueChanged(int)), this, SLOT(durationChanged()));
+ connect(monthsSpin, SIGNAL(valueChanged(int)), this, SLOT(durationChanged()));
connect(yearsSpin, SIGNAL(valueChanged(int)), this, SLOT(durationChanged()));
}
disconnect(minutesSpin, SIGNAL(valueChanged(int)), this, SLOT(durationChanged()));
disconnect(hoursSpin, SIGNAL(valueChanged(int)), this, SLOT(durationChanged()));
disconnect(daysSpin, SIGNAL(valueChanged(int)), this, SLOT(durationChanged()));
+ disconnect(monthsSpin, SIGNAL(valueChanged(int)), this, SLOT(durationChanged()));
disconnect(yearsSpin, SIGNAL(valueChanged(int)), this, SLOT(durationChanged()));
}
<rect>
<x>0</x>
<y>0</y>
- <width>468</width>
- <height>451</height>
+ <width>487</width>
+ <height>470</height>
</rect>
</property>
<property name="windowTitle" >
<property name="spacing" >
<number>6</number>
</property>
- <item row="1" column="2" >
- <spacer>
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" >
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item row="1" column="0" >
- <spacer>
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" >
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
<item row="1" column="1" >
<layout class="QGridLayout" >
<property name="margin" >
<property name="spacing" >
<number>6</number>
</property>
- <item row="8" column="1" >
- <widget class="QSpinBox" name="maxBytesSpin" >
- <property name="maximum" >
- <number>2147483647</number>
+ <item row="2" column="0" >
+ <widget class="QLabel" name="label_3" >
+ <property name="text" >
+ <string>Pool:</string>
+ </property>
+ <property name="buddy" >
+ <cstring>poolCombo</cstring>
</property>
</widget>
</item>
- <item row="1" column="0" colspan="2" >
- <layout class="QHBoxLayout" >
- <property name="margin" >
- <number>0</number>
- </property>
- <property name="spacing" >
- <number>6</number>
+ <item row="3" column="0" >
+ <widget class="QLabel" name="label_5" >
+ <property name="text" >
+ <string>Volume Status:</string>
</property>
- <item>
- <spacer>
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" >
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <widget class="QLabel" name="volumeLabel" >
- <property name="maximumSize" >
- <size>
- <width>16777215</width>
- <height>48</height>
- </size>
- </property>
- <property name="text" >
- <string>Volume : </string>
- </property>
- </widget>
- </item>
- <item>
- <spacer>
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" >
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
+ </widget>
</item>
- <item row="4" column="1" >
- <widget class="QSpinBox" name="slotSpin" >
- <property name="maximum" >
- <number>10000</number>
+ <item row="8" column="0" >
+ <widget class="QLabel" name="label_13" >
+ <property name="text" >
+ <string>Max Volume Bytes:</string>
+ </property>
+ <property name="buddy" >
+ <cstring>slotSpin</cstring>
</property>
</widget>
</item>
<item row="3" column="1" >
<widget class="QComboBox" name="statusCombo" />
</item>
- <item row="9" column="0" >
- <widget class="QLabel" name="label_14" >
+ <item row="10" column="1" >
+ <widget class="QComboBox" name="recyclePoolCombo" />
+ </item>
+ <item row="4" column="0" >
+ <widget class="QLabel" name="label_4" >
<property name="text" >
- <string>Max Volume Files:</string>
+ <string>Slot:</string>
+ </property>
+ <property name="buddy" >
+ <cstring>slotSpin</cstring>
+ </property>
+ </widget>
+ </item>
+ <item row="7" column="0" >
+ <widget class="QLabel" name="label_12" >
+ <property name="text" >
+ <string>Max Volume Jobs:</string>
+ </property>
+ <property name="buddy" >
+ <cstring>slotSpin</cstring>
+ </property>
+ </widget>
+ </item>
+ <item row="6" column="0" >
+ <widget class="QLabel" name="label_7" >
+ <property name="text" >
+ <string>Use Duration:</string>
</property>
<property name="buddy" >
<cstring>slotSpin</cstring>
</item>
</layout>
</item>
- <item row="0" column="0" colspan="2" >
- <layout class="QHBoxLayout" >
- <property name="margin" >
- <number>0</number>
+ <item row="8" column="1" >
+ <widget class="QSpinBox" name="maxBytesSpin" >
+ <property name="maximum" >
+ <number>2147483647</number>
</property>
- <property name="spacing" >
- <number>6</number>
+ </widget>
+ </item>
+ <item row="5" column="0" >
+ <widget class="QLabel" name="label_6" >
+ <property name="text" >
+ <string>Retension:</string>
</property>
- <item>
- <spacer>
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" >
- <size>
- <width>71</width>
- <height>21</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <widget class="QLabel" name="label" >
- <property name="maximumSize" >
- <size>
- <width>16777215</width>
- <height>30</height>
- </size>
- </property>
- <property name="text" >
- <string><html><head><meta name="qrichtext" content="1" /><style type="text/css">
-p, li { white-space: pre-wrap; }
-</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;">
-<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt; font-weight:600;">Edit a Volume</span></p></body></html></string>
- </property>
- </widget>
- </item>
- <item>
- <spacer>
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" >
- <size>
- <width>81</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
+ <property name="buddy" >
+ <cstring>slotSpin</cstring>
+ </property>
+ </widget>
</item>
- <item row="3" column="0" >
- <widget class="QLabel" name="label_5" >
+ <item row="10" column="0" >
+ <widget class="QLabel" name="label_15" >
<property name="text" >
- <string>Volume Status:</string>
+ <string>Recycle Pool:</string>
+ </property>
+ <property name="buddy" >
+ <cstring>slotSpin</cstring>
</property>
</widget>
</item>
</item>
</layout>
</item>
+ <item row="9" column="1" >
+ <widget class="QSpinBox" name="maxFilesSpin" >
+ <property name="maximum" >
+ <number>2147483647</number>
+ </property>
+ </widget>
+ </item>
+ <item row="9" column="0" >
+ <widget class="QLabel" name="label_14" >
+ <property name="text" >
+ <string>Max Volume Files:</string>
+ </property>
+ <property name="buddy" >
+ <cstring>slotSpin</cstring>
+ </property>
+ </widget>
+ </item>
<item rowspan="13" row="0" column="2" >
<layout class="QGridLayout" >
<property name="margin" >
<property name="spacing" >
<number>6</number>
</property>
- <item row="6" column="0" >
- <widget class="QLabel" name="label_10" >
- <property name="text" >
- <string>Minutes</string>
+ <item row="9" column="0" colspan="2" >
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Vertical</enum>
</property>
- </widget>
+ <property name="sizeHint" >
+ <size>
+ <width>97</width>
+ <height>21</height>
+ </size>
+ </property>
+ </spacer>
</item>
- <item row="5" column="1" >
- <widget class="QSpinBox" name="hoursSpin" >
+ <item row="3" column="1" >
+ <widget class="QSpinBox" name="yearsSpin" >
<property name="maximum" >
- <number>24</number>
+ <number>999</number>
</property>
<property name="minimum" >
<number>-1</number>
</property>
- <property name="value" >
- <number>0</number>
- </property>
</widget>
</item>
- <item row="7" column="0" >
- <widget class="QLabel" name="label_11" >
+ <item row="3" column="0" >
+ <widget class="QLabel" name="label_2" >
<property name="text" >
- <string>Seconds</string>
+ <string>Years</string>
</property>
</widget>
</item>
- <item row="1" column="0" colspan="2" >
- <widget class="QRadioButton" name="retentionRadio" >
+ <item row="8" column="0" >
+ <widget class="QLabel" name="label_11" >
<property name="text" >
- <string>Retention</string>
+ <string>Seconds</string>
</property>
</widget>
</item>
- <item row="4" column="0" >
- <widget class="QLabel" name="label_8" >
- <property name="text" >
- <string>Days</string>
+ <item row="5" column="1" >
+ <widget class="QSpinBox" name="daysSpin" >
+ <property name="maximum" >
+ <number>30</number>
+ </property>
+ <property name="minimum" >
+ <number>-1</number>
</property>
</widget>
</item>
</property>
</widget>
</item>
- <item row="8" column="0" colspan="2" >
+ <item row="0" column="0" colspan="2" >
<spacer>
<property name="orientation" >
<enum>Qt::Vertical</enum>
<property name="sizeHint" >
<size>
<width>97</width>
- <height>81</height>
+ <height>31</height>
</size>
</property>
</spacer>
</item>
- <item row="3" column="0" >
- <widget class="QLabel" name="label_2" >
+ <item row="5" column="0" >
+ <widget class="QLabel" name="label_8" >
<property name="text" >
- <string>Years</string>
+ <string>Days</string>
</property>
</widget>
</item>
- <item row="4" column="1" >
- <widget class="QSpinBox" name="daysSpin" >
+ <item row="8" column="1" >
+ <widget class="QSpinBox" name="secondsSpin" >
<property name="maximum" >
- <number>365</number>
+ <number>60</number>
</property>
<property name="minimum" >
<number>-1</number>
</property>
</widget>
</item>
+ <item row="6" column="0" >
+ <widget class="QLabel" name="label_9" >
+ <property name="text" >
+ <string>Hours</string>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="0" >
+ <widget class="QLabel" name="label_16" >
+ <property name="text" >
+ <string>Months</string>
+ </property>
+ </widget>
+ </item>
<item row="7" column="1" >
- <widget class="QSpinBox" name="secondsSpin" >
+ <widget class="QSpinBox" name="minutesSpin" >
<property name="maximum" >
<number>60</number>
</property>
</property>
</widget>
</item>
- <item row="3" column="1" >
- <widget class="QSpinBox" name="yearsSpin" >
+ <item row="6" column="1" >
+ <widget class="QSpinBox" name="hoursSpin" >
<property name="maximum" >
- <number>999</number>
+ <number>24</number>
</property>
<property name="minimum" >
<number>-1</number>
</property>
+ <property name="value" >
+ <number>0</number>
+ </property>
</widget>
</item>
- <item row="5" column="0" >
- <widget class="QLabel" name="label_9" >
+ <item row="1" column="0" colspan="2" >
+ <widget class="QRadioButton" name="retentionRadio" >
<property name="text" >
- <string>Hours</string>
+ <string>Retention</string>
</property>
</widget>
</item>
- <item row="6" column="1" >
- <widget class="QSpinBox" name="minutesSpin" >
+ <item row="4" column="1" >
+ <widget class="QSpinBox" name="monthsSpin" >
<property name="maximum" >
- <number>60</number>
+ <number>12</number>
</property>
<property name="minimum" >
<number>-1</number>
</property>
</widget>
</item>
- <item row="0" column="0" colspan="2" >
+ <item row="7" column="0" >
+ <widget class="QLabel" name="label_10" >
+ <property name="text" >
+ <string>Minutes</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item row="5" column="1" >
+ <widget class="QSpinBox" name="retentionSpin" >
+ <property name="maximum" >
+ <number>2147483647</number>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0" colspan="2" >
+ <layout class="QHBoxLayout" >
+ <property name="margin" >
+ <number>0</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
<spacer>
<property name="orientation" >
- <enum>Qt::Vertical</enum>
+ <enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" >
<size>
- <width>97</width>
- <height>71</height>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QLabel" name="volumeLabel" >
+ <property name="maximumSize" >
+ <size>
+ <width>16777215</width>
+ <height>48</height>
+ </size>
+ </property>
+ <property name="text" >
+ <string>Volume : </string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>40</width>
+ <height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
- <item row="9" column="1" >
- <widget class="QSpinBox" name="maxFilesSpin" >
+ <item row="2" column="1" >
+ <widget class="QComboBox" name="poolCombo" />
+ </item>
+ <item row="6" column="1" >
+ <widget class="QSpinBox" name="useDurationSpin" >
<property name="maximum" >
<number>2147483647</number>
</property>
</item>
</layout>
</item>
- <item row="6" column="1" >
- <widget class="QSpinBox" name="useDurationSpin" >
- <property name="maximum" >
- <number>2147483647</number>
- </property>
- </widget>
- </item>
- <item row="7" column="1" >
- <widget class="QSpinBox" name="maxJobsSpin" >
- <property name="maximum" >
- <number>2147483647</number>
- </property>
- </widget>
- </item>
- <item row="6" column="0" >
- <widget class="QLabel" name="label_7" >
- <property name="text" >
- <string>Use Duration:</string>
- </property>
- <property name="buddy" >
- <cstring>slotSpin</cstring>
- </property>
- </widget>
- </item>
- <item row="2" column="0" >
- <widget class="QLabel" name="label_3" >
- <property name="text" >
- <string>Pool:</string>
- </property>
- <property name="buddy" >
- <cstring>poolCombo</cstring>
- </property>
- </widget>
- </item>
- <item row="10" column="1" >
- <widget class="QComboBox" name="recyclePoolCombo" />
- </item>
- <item row="8" column="0" >
- <widget class="QLabel" name="label_13" >
- <property name="text" >
- <string>Max Volume Bytes:</string>
- </property>
- <property name="buddy" >
- <cstring>slotSpin</cstring>
- </property>
- </widget>
- </item>
- <item row="5" column="0" >
- <widget class="QLabel" name="label_6" >
- <property name="text" >
- <string>Retension:</string>
+ <item row="0" column="0" colspan="2" >
+ <layout class="QHBoxLayout" >
+ <property name="margin" >
+ <number>0</number>
</property>
- <property name="buddy" >
- <cstring>slotSpin</cstring>
+ <property name="spacing" >
+ <number>6</number>
</property>
- </widget>
- </item>
- <item row="2" column="1" >
- <widget class="QComboBox" name="poolCombo" />
+ <item>
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>71</width>
+ <height>21</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QLabel" name="label" >
+ <property name="maximumSize" >
+ <size>
+ <width>16777215</width>
+ <height>30</height>
+ </size>
+ </property>
+ <property name="text" >
+ <string><html><head><meta name="qrichtext" content="1" /><style type="text/css">
+p, li { white-space: pre-wrap; }
+</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;">
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt; font-weight:600;">Edit a Volume</span></p></body></html></string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>81</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
</item>
- <item row="4" column="0" >
- <widget class="QLabel" name="label_4" >
- <property name="text" >
- <string>Slot:</string>
- </property>
- <property name="buddy" >
- <cstring>slotSpin</cstring>
+ <item row="4" column="1" >
+ <widget class="QSpinBox" name="slotSpin" >
+ <property name="maximum" >
+ <number>10000</number>
</property>
</widget>
</item>
- <item row="5" column="1" >
- <widget class="QSpinBox" name="retentionSpin" >
+ <item row="7" column="1" >
+ <widget class="QSpinBox" name="maxJobsSpin" >
<property name="maximum" >
<number>2147483647</number>
</property>
</widget>
</item>
- <item row="10" column="0" >
- <widget class="QLabel" name="label_15" >
- <property name="text" >
- <string>Recycle Pool:</string>
- </property>
- <property name="buddy" >
- <cstring>slotSpin</cstring>
- </property>
- </widget>
- </item>
- <item row="7" column="0" >
- <widget class="QLabel" name="label_12" >
- <property name="text" >
- <string>Max Volume Jobs:</string>
- </property>
- <property name="buddy" >
- <cstring>slotSpin</cstring>
- </property>
- </widget>
- </item>
</layout>
</item>
- <item row="2" column="1" >
+ <item row="0" column="1" >
<spacer>
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
</spacer>
</item>
- <item row="0" column="1" >
+ <item row="1" column="2" >
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="2" column="1" >
<spacer>
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
</spacer>
</item>
+ <item row="1" column="0" >
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
</layout>
</widget>
<resources/>
/* add context sensitive menu items specific to this classto the page
* selector tree. m_contextActions is QList of QActions */
m_contextActions.append(actionRefreshMediaList);
+ dockPage();
}
MediaList::~MediaList()
setupUi(this);
pgInitialize();
m_closeable = true;
+ dockPage();
}
bRestore::~bRestore()
/* add context sensitive menu items specific to this classto the page
* selector tree. m_contextActions is QList of QActions */
m_contextActions.append(actionRefreshStorage);
+ dockPage();
}
Storage::~Storage()