list nextvol job=<job-name>
list nextvol job=<job-name> days=nnn
-prune files|jobs|volume client=<client-name> volume=<volume-name>
-could add as a dialog box from both client and medialist
-
release storage=<storage-name>
Would need to explain what this does in bat with a dialog
-run
-done
-
setdebug
I'd say we could choose not to implement this in bat
-status
-done, want to implement graphically
-
-unmount storage=<storage-name> [ drive=\lt{}num\gt{} ]
-done
unmount [ jobid=<id> | job=<job-name> ]
Mmmmm
label
Done by kern before I started
+prune files|jobs|volume client=<client-name> volume=<volume-name>
+could add as a dialog box from both client and medialist
+
purge files jobid=<jobid>|job=<job-name>|client=<client-name>
purge volume|volume=<vol-name> (of all jobs)
purge jobs client=<client-name> (of all jobs)
relabel
-done
+
+run
reload
-could be done in console or on director's page selector widget
+
+status
+
+unmount storage=<storage-name> [ drive=\lt{}num\gt{} ]
in the front of the stack.
Closing
-Use the function closeDockPage() to close from within the class. Otherwise, if
+Use the function closeStackPage() to close from within the class. Otherwise, if
there are pointers which need to be deleted, use a destructor. The m_closeable
page member will determine whether the option to close will appear in context
menu of page selector.
pgInitialize();
setupUi(this);
m_console->notify(false);
+ QTreeWidgetItem* thisitem = mainWin->getFromHash(this);
+ thisitem->setIcon(0,QIcon(QString::fromUtf8(":images/label.png")));
storageCombo->addItems(m_console->storage_list);
int index = storageCombo->findText(defString, Qt::MatchExactly);
<addaction name="actionCut" />
<addaction name="actionPaste" />
</widget>
- <widget class="QMenu" name="menuFile" >
- <property name="title" >
- <string>&File</string>
- </property>
- <addaction name="actionPrint" />
- <addaction name="actionSave" />
- <addaction name="actionQuit" />
- </widget>
<widget class="QMenu" name="menuSettings" >
<property name="title" >
<string>Settings</string>
<addaction name="actionBat_Help" />
<addaction name="actionAbout_bat" />
</widget>
+ <widget class="QMenu" name="menuFile" >
+ <property name="title" >
+ <string>&File</string>
+ </property>
+ <addaction name="actionPrint" />
+ <addaction name="actionSave" />
+ <addaction name="actionQuit" />
+ </widget>
<addaction name="menuFile" />
<addaction name="menuEdit" />
<addaction name="menuSettings" />
<iconset resource="main.qrc" >:/images/status.png</iconset>
</property>
<property name="text" >
- <string>StatusDir</string>
+ <string comment="Query status of director" >Status Dir</string>
+ </property>
+ <property name="iconText" >
+ <string>Status Dir</string>
</property>
<property name="toolTip" >
- <string>status dir</string>
+ <string>Query status of director</string>
</property>
<property name="statusTip" >
- <string>Status of Director</string>
+ <string>Query status of director</string>
+ </property>
+ <property name="autoRepeat" >
+ <bool>true</bool>
</property>
</action>
<action name="actionSelectFont" >
<property name="text" >
<string>Undock Window</string>
</property>
+ <property name="statusTip" >
+ <string>Undock Current Window</string>
+ </property>
</action>
<action name="actionToggleDock" >
<property name="icon" >
<property name="text" >
<string>ToggleDock</string>
</property>
+ <property name="toolTip" >
+ <string>Toggle Dock Status</string>
+ </property>
+ <property name="statusTip" >
+ <string>Toggle Dock Status</string>
+ </property>
</action>
<action name="actionClosePage" >
<property name="icon" >
<property name="statusTip" >
<string>Display any messages queued at the director</string>
</property>
+ <property name="autoRepeat" >
+ <bool>false</bool>
+ </property>
</action>
<action name="actionPreferences" >
<property name="text" >
#include <QMessageBox>
#include "bat.h"
#include "mediaedit.h"
+#include <inttypes.h>
/*
* A constructor
*/
-MediaEdit::MediaEdit(Console *console, QString &mediaId)
+MediaEdit::MediaEdit(QTreeWidgetItem *parentWidget, QString &mediaId)
{
- m_console = console;
- m_console->notify(false);
+ setupUi(this);
+ m_name = "Media Edit";
+ pgInitialize(parentWidget);
+ QTreeWidgetItem* thisitem = mainWin->getFromHash(this);
+ thisitem->setIcon(0,QIcon(QString::fromUtf8(":images/cartridge-edit.svg")));
+ m_closeable = true;
+ dockPage();
+ setCurrent();
+
+ connect(okButton, SIGNAL(pressed()), this, SLOT(okButtonPushed()));
+ connect(cancelButton, SIGNAL(pressed()), this, SLOT(cancelButtonPushed()));
+ connectSpins();
+ connect(retentionSpin, SIGNAL(valueChanged(int)), this, SLOT(retentionChanged()));
+ connect(useDurationSpin, SIGNAL(valueChanged(int)), this, SLOT(useDurationChanged()));
+ connect(retentionRadio, SIGNAL(pressed()), this, SLOT(retentionRadioPressed()));
+ connect(useDurationRadio, SIGNAL(pressed()), this, SLOT(useDurationRadioPressed()));
+
m_pool = "";
m_status = "";
m_slot = 0;
- setupUi(this);
-
if (!m_console->preventInUseConnect())
- return;
+ return;
/* The media's pool */
- poolCombo->addItems(console->pool_list);
+ poolCombo->addItems(m_console->pool_list);
/* The media's Status */
QStringList statusList = (QStringList() << "Full" << "Used" << "Append" << "Error" << "Purged" << "Recycled");
/* Set up the query for the default values */
QStringList FieldList = (QStringList()
- << "Media.VolumeName" << "Pool.Name" << "Media.VolStatus" << "Media.Slot" );
+ << "Media.VolumeName" << "Pool.Name" << "Media.VolStatus" << "Media.Slot"
+ << "Media.VolRetention" << "Media.VolUseDuration");
QStringList AsList = (QStringList()
- << "VolumeName" << "PoolName" << "Status" << "Slot" );
+ << "VolumeName" << "PoolName" << "Status" << "Slot"
+ << "Retention" << "UseDuration");
int i = 0;
QString query("SELECT ");
foreach (QString field, FieldList) {
/* Iterate through fields in the record */
foreach (field, fieldlist) {
field = field.trimmed(); /* strip leading & trailing spaces */
+ bool ok;
if (i == 0) {
m_mediaName = field;
volumeLabel->setText(QString("Volume : %1").arg(m_mediaName));
} else if (i == 2) {
m_status = field;
} else if (i == 3) {
- bool ok;
m_slot = field.toInt(&ok, 10);
if (!ok){ m_slot = 0; }
+ } else if (i == 4) {
+ m_retention = field.toLong(&ok, 10);
+ if (!ok){ m_retention = 0; }
+ } else if (i == 5) {
+ m_useDuration = field.toLong(&ok, 10);
+ if (!ok){ m_useDuration = 0; }
}
i++;
} /* foreach field */
statusCombo->setCurrentIndex(index);
}
slotSpin->setValue(m_slot);
+ retentionSpin->setValue(m_retention);
+ useDurationSpin->setValue(m_useDuration);
this->show();
} else {
QMessageBox::Ok, QMessageBox::Ok);
return;
}
-
}
/*
- * Function to handle updating the record
+ * Function to handle updating the record then closing the page
*/
-void MediaEdit::accept()
+void MediaEdit::okButtonPushed()
{
+//update volume=xxx slots MaxVolJobs=nnn MaxVolBytes=nnn Recycle=yes|no
+// enabled=n recyclepool=zzz
+// done pool=yyy volstatus=xxx slot=nnn VolUse=ddd VolRetention=ddd
QString scmd;
this->hide();
bool docmd = false;
scmd += " slot=" + QString().setNum(slotSpin->value());
docmd = true;
}
+ if (m_retention != retentionSpin->value()) {
+ scmd += " VolRetention=" + QString().setNum(retentionSpin->value());
+ docmd = true;
+ }
+ if (m_useDuration != useDurationSpin->value()) {
+ scmd += " VolUse=" + QString().setNum(useDurationSpin->value());
+ docmd = true;
+ }
if (docmd) {
if (mainWin->m_commandDebug) {
Pmsg1(000, "sending command : %s\n",scmd.toUtf8().data());
}
- m_console->write_dir(scmd.toUtf8().data());
- m_console->displayToPrompt();
- m_console->notify(true);
- }
- delete this;
- mainWin->resetFocus();
+ consoleCommand(scmd);
+ }
+ closeStackPage();
}
-void MediaEdit::reject()
+/* close if cancel */
+void MediaEdit::cancelButtonPushed()
{
- this->hide();
- m_console->notify(true);
- delete this;
- mainWin->resetFocus();
+ closeStackPage();
+}
+
+/*
+ * Slot for user changed retention
+ */
+void MediaEdit::retentionChanged()
+{
+ retentionRadio->setChecked(true);
+ setSpins(retentionSpin->value());
+}
+
+/*
+ * Slot for user changed the use duration
+ */
+void MediaEdit::useDurationChanged()
+{
+ useDurationRadio->setChecked(true);
+ setSpins(useDurationSpin->value());
+}
+
+/*
+ * Set the 5 duration spins from a known duration value
+ */
+void MediaEdit::setSpins(int value)
+{
+ int years, days, hours, minutes, seconds, left;
+
+ years = abs(value / 31536000);
+ left = value - years * 31536000;
+ days = abs(left / 86400);
+ left = left - days * 86400;
+ hours = abs(left / 3600);
+ left = left - hours * 3600;
+ minutes = abs(left / 60);
+ seconds = left - minutes * 60;
+ disconnectSpins();
+ yearsSpin->setValue(years);
+ daysSpin->setValue(days);
+ hoursSpin->setValue(hours);
+ minutesSpin->setValue(minutes);
+ secondsSpin->setValue(seconds);
+ connectSpins();
+}
+
+/*
+ * This slot is called any time any one of the 5 duration spins a changed.
+ */
+void MediaEdit::durationChanged()
+{
+ disconnectSpins();
+ if (secondsSpin->value() == -1) {
+ secondsSpin->setValue(59);
+ minutesSpin->setValue(minutesSpin->value()-1);
+ }
+ if (minutesSpin->value() == -1) {
+ minutesSpin->setValue(59);
+ hoursSpin->setValue(hoursSpin->value()-1);
+ }
+ if (hoursSpin->value() == -1) {
+ hoursSpin->setValue(23);
+ daysSpin->setValue(daysSpin->value()-1);
+ }
+ if (daysSpin->value() == -1) {
+ daysSpin->setValue(364);
+ yearsSpin->setValue(yearsSpin->value()-1);
+ }
+ if (yearsSpin->value() == -1) {
+ yearsSpin->setValue(0);
+ }
+
+ if (secondsSpin->value() == 60) {
+ secondsSpin->setValue(0);
+ minutesSpin->setValue(minutesSpin->value()+1);
+ }
+ if (minutesSpin->value() == 60) {
+ minutesSpin->setValue(0);
+ hoursSpin->setValue(hoursSpin->value()+1);
+ }
+ if (hoursSpin->value() == 24) {
+ hoursSpin->setValue(0);
+ daysSpin->setValue(daysSpin->value()+1);
+ }
+ if (daysSpin->value() == 365) {
+ daysSpin->setValue(0);
+ yearsSpin->setValue(yearsSpin->value()+1);
+ }
+ connectSpins();
+ if (retentionRadio->isChecked()) {
+ int retention;
+ retention = secondsSpin->value() + minutesSpin->value() * 60 +
+ hoursSpin->value() * 3600 + daysSpin->value() * 86400 +
+ yearsSpin->value() * 31536000;
+ disconnect(retentionSpin, SIGNAL(valueChanged(int)), this, SLOT(retentionChanged()));
+ retentionSpin->setValue(retention);
+ connect(retentionSpin, SIGNAL(valueChanged(int)), this, SLOT(retentionChanged()));
+ }
+ if (useDurationRadio->isChecked()) {
+ int useDuration;
+ useDuration = secondsSpin->value() + minutesSpin->value() * 60 +
+ hoursSpin->value() * 3600 + daysSpin->value() * 86400 +
+ yearsSpin->value() * 31536000;
+ disconnect(useDurationSpin, SIGNAL(valueChanged(int)), this, SLOT(useDurationChanged()));
+ useDurationSpin->setValue(useDuration);
+ connect(useDurationSpin, SIGNAL(valueChanged(int)), this, SLOT(useDurationChanged()));
+ }
+}
+
+/* Connect the spins */
+void MediaEdit::connectSpins()
+{
+ connect(secondsSpin, SIGNAL(valueChanged(int)), this, SLOT(durationChanged()));
+ 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(yearsSpin, SIGNAL(valueChanged(int)), this, SLOT(durationChanged()));
+}
+
+/* disconnect spins so that we can set the value of other spin from changed duration spin */
+void MediaEdit::disconnectSpins()
+{
+ disconnect(secondsSpin, 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(yearsSpin, SIGNAL(valueChanged(int)), this, SLOT(durationChanged()));
+}
+
+/* slot for setting spins when retention radio checked */
+void MediaEdit::retentionRadioPressed()
+{
+ setSpins(retentionSpin->value());
+}
+
+/* slot for setting spins when duration radio checked */
+void MediaEdit::useDurationRadioPressed()
+{
+ setSpins(useDurationSpin->value());
}
#include <QtGui>
#include "ui_mediaedit.h"
#include "console.h"
+#include "pages.h"
-class MediaEdit : public QDialog, public Ui::mediaeditForm
+class MediaEdit : public Pages, public Ui::mediaEditForm
{
Q_OBJECT
public:
- MediaEdit(Console *console, QString &mediaId);
+ MediaEdit(QTreeWidgetItem *parentWidget, QString &mediaId);
-public slots:
- void accept();
- void reject();
+private slots:
+ void okButtonPushed();
+ void cancelButtonPushed();
+ void retentionChanged();
+ void durationChanged();
+ void useDurationChanged();
+ void setSpins(int value);
+ void retentionRadioPressed();
+ void useDurationRadioPressed();
private:
- Console *m_console;
+ void connectSpins();
+ void disconnectSpins();
QString m_mediaName;
QString m_pool;
QString m_status;
int m_slot;
+ int m_retention;
+ int m_useDuration;
};
#endif /* _MEDIAEDIT_H_ */
<ui version="4.0" >
- <class>mediaeditForm</class>
- <widget class="QDialog" name="mediaeditForm" >
- <property name="windowModality" >
- <enum>Qt::WindowModal</enum>
- </property>
+ <class>mediaEditForm</class>
+ <widget class="QWidget" name="mediaEditForm" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
- <width>416</width>
- <height>230</height>
+ <width>515</width>
+ <height>334</height>
</rect>
</property>
<property name="windowTitle" >
- <string>Label</string>
+ <string>Form</string>
</property>
<layout class="QGridLayout" >
<property name="margin" >
<property name="spacing" >
<number>6</number>
</property>
- <item row="1" column="0" >
- <layout class="QHBoxLayout" >
+ <item row="1" column="1" >
+ <layout class="QGridLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
- <item>
- <spacer>
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
+ <item row="6" column="1" >
+ <widget class="QLabel" name="label_10" >
+ <property name="text" >
+ <string>Minutes</string>
</property>
- <property name="sizeHint" >
- <size>
- <width>40</width>
- <height>20</height>
- </size>
+ </widget>
+ </item>
+ <item row="5" column="2" >
+ <widget class="QSpinBox" name="hoursSpin" >
+ <property name="maximum" >
+ <number>24</number>
</property>
- </spacer>
+ <property name="minimum" >
+ <number>-1</number>
+ </property>
+ <property name="value" >
+ <number>0</number>
+ </property>
+ </widget>
</item>
- <item>
- <widget class="QLabel" name="volumeLabel" >
- <property name="maximumSize" >
- <size>
- <width>16777215</width>
- <height>48</height>
- </size>
+ <item row="4" column="2" >
+ <widget class="QSpinBox" name="daysSpin" >
+ <property name="maximum" >
+ <number>365</number>
</property>
- <property name="text" >
- <string>Volume : </string>
+ <property name="minimum" >
+ <number>-1</number>
</property>
</widget>
</item>
- <item>
+ <item rowspan="8" row="0" column="0" >
+ <layout class="QGridLayout" >
+ <property name="margin" >
+ <number>0</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item row="3" column="1" >
+ <widget class="QComboBox" name="statusCombo" />
+ </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::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>
+ </item>
+ <item row="0" 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::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>
+ </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="5" column="0" >
+ <widget class="QLabel" name="label_6" >
+ <property name="text" >
+ <string>Retension:</string>
+ </property>
+ <property name="buddy" >
+ <cstring>slotSpin</cstring>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="1" >
+ <widget class="QSpinBox" name="retentionSpin" >
+ <property name="maximum" >
+ <number>2147483647</number>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="0" >
+ <widget class="QLabel" name="label_5" >
+ <property name="text" >
+ <string>Volume Status:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="1" >
+ <widget class="QSpinBox" name="slotSpin" >
+ <property name="maximum" >
+ <number>10000</number>
+ </property>
+ </widget>
+ </item>
+ <item row="7" 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::Horizontal</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QPushButton" name="okButton" >
+ <property name="text" >
+ <string>OK</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="cancelButton" >
+ <property name="text" >
+ <string>Cancel</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </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="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>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item row="0" column="1" colspan="2" >
<spacer>
<property name="orientation" >
- <enum>Qt::Horizontal</enum>
+ <enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" >
<size>
- <width>40</width>
- <height>20</height>
+ <width>97</width>
+ <height>16</height>
</size>
</property>
</spacer>
</item>
- </layout>
- </item>
- <item row="3" column="0" >
- <layout class="QGridLayout" >
- <property name="margin" >
- <number>0</number>
- </property>
- <property name="spacing" >
- <number>6</number>
- </property>
- <item row="1" column="0" >
- <widget class="QLabel" name="label_5" >
+ <item row="3" column="1" >
+ <widget class="QLabel" name="label_2" >
<property name="text" >
- <string>Volume Status:</string>
+ <string>Years</string>
</property>
</widget>
</item>
- <item row="1" column="1" >
- <widget class="QComboBox" name="statusCombo" />
+ <item row="5" column="1" >
+ <widget class="QLabel" name="label_9" >
+ <property name="text" >
+ <string>Hours</string>
+ </property>
+ </widget>
</item>
- <item row="0" column="1" >
- <widget class="QComboBox" name="poolCombo" />
+ <item row="2" column="1" colspan="2" >
+ <widget class="QRadioButton" name="useDurationRadio" >
+ <property name="text" >
+ <string>Use Duration</string>
+ </property>
+ </widget>
</item>
- <item row="2" column="1" >
- <widget class="QSpinBox" name="slotSpin" >
+ <item row="3" column="2" >
+ <widget class="QSpinBox" name="yearsSpin" >
<property name="maximum" >
- <number>10000</number>
+ <number>999</number>
+ </property>
+ <property name="minimum" >
+ <number>-1</number>
</property>
</widget>
</item>
- <item row="0" column="0" >
- <widget class="QLabel" name="label_3" >
+ <item row="4" column="1" >
+ <widget class="QLabel" name="label_8" >
<property name="text" >
- <string>Pool:</string>
- </property>
- <property name="buddy" >
- <cstring>poolCombo</cstring>
+ <string>Days</string>
</property>
</widget>
</item>
- <item row="2" column="0" >
- <widget class="QLabel" name="label_4" >
+ <item row="7" column="1" >
+ <widget class="QLabel" name="label_11" >
<property name="text" >
- <string>Slot:</string>
- </property>
- <property name="buddy" >
- <cstring>slotSpin</cstring>
+ <string>Seconds</string>
</property>
</widget>
</item>
- </layout>
- </item>
- <item row="0" column="0" >
- <layout class="QHBoxLayout" >
- <property name="margin" >
- <number>0</number>
- </property>
- <property name="spacing" >
- <number>6</number>
- </property>
- <item>
- <spacer>
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" >
- <size>
- <width>71</width>
- <height>21</height>
- </size>
+ <item row="1" column="1" colspan="2" >
+ <widget class="QRadioButton" name="retentionRadio" >
+ <property name="text" >
+ <string>Retention</string>
</property>
- </spacer>
+ </widget>
</item>
- <item>
- <widget class="QLabel" name="label" >
- <property name="maximumSize" >
- <size>
- <width>16777215</width>
- <height>30</height>
- </size>
+ <item row="7" column="2" >
+ <widget class="QSpinBox" name="secondsSpin" >
+ <property name="maximum" >
+ <number>60</number>
</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 name="minimum" >
+ <number>-1</number>
</property>
</widget>
</item>
- <item>
- <spacer>
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
+ <item row="6" column="2" >
+ <widget class="QSpinBox" name="minutesSpin" >
+ <property name="maximum" >
+ <number>60</number>
</property>
- <property name="sizeHint" >
- <size>
- <width>81</width>
- <height>20</height>
- </size>
+ <property name="minimum" >
+ <number>-1</number>
</property>
- </spacer>
+ </widget>
</item>
</layout>
</item>
- <item row="4" column="0" >
+ <item row="0" column="1" >
<spacer>
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
- <property name="sizeType" >
- <enum>QSizePolicy::Maximum</enum>
+ <property name="sizeHint" >
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="2" column="1" >
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" >
<size>
- <width>21</width>
- <height>16</height>
+ <width>20</width>
+ <height>40</height>
</size>
</property>
</spacer>
</item>
- <item row="5" column="0" >
- <widget class="QDialogButtonBox" name="buttonBox" >
+ <item row="1" column="0" >
+ <spacer>
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
- <property name="standardButtons" >
- <set>QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok</set>
+ <property name="sizeHint" >
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
</property>
- </widget>
+ </spacer>
</item>
- <item row="2" column="0" >
+ <item row="1" column="2" >
<spacer>
<property name="orientation" >
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeType" >
- <enum>QSizePolicy::Maximum</enum>
+ <enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" >
<size>
- <width>398</width>
- <height>16</height>
+ <width>40</width>
+ <height>20</height>
</size>
</property>
</spacer>
</layout>
</widget>
<resources/>
- <connections>
- <connection>
- <sender>buttonBox</sender>
- <signal>accepted()</signal>
- <receiver>mediaeditForm</receiver>
- <slot>accept()</slot>
- <hints>
- <hint type="sourcelabel" >
- <x>248</x>
- <y>254</y>
- </hint>
- <hint type="destinationlabel" >
- <x>157</x>
- <y>274</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>buttonBox</sender>
- <signal>rejected()</signal>
- <receiver>mediaeditForm</receiver>
- <slot>reject()</slot>
- <hints>
- <hint type="sourcelabel" >
- <x>316</x>
- <y>260</y>
- </hint>
- <hint type="destinationlabel" >
- <x>286</x>
- <y>274</y>
- </hint>
- </hints>
- </connection>
- </connections>
+ <connections/>
</ui>
*/
void MediaList::editVolume()
{
- MediaEdit* edit = new MediaEdit(m_console, m_currentVolumeId);
+ MediaEdit* edit = new MediaEdit(mainWin->getFromHash(this), m_currentVolumeId);
connect(edit, SIGNAL(destroyed()), this, SLOT(populateTree()));
}