From 12483a31c635bb7792d0ef3c66e29cc4ad2f54cf Mon Sep 17 00:00:00 2001 From: Dirk H Bartley Date: Wed, 30 May 2007 14:49:52 +0000 Subject: [PATCH] Joblist: change page select widget name to "JobList" MediaEdit added months spin. Not sure I like it because 365=yr but 30 days is not always equal to a month. JobLog: add Icon for page selector. mainwin and others. Move dockPage() into the class' constructors so that the createPage functions in main win are not of benefit. Jobs: a new page for displaying jobs and job defaults. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@4940 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/src/qt-console/TODO | 19 +- bacula/src/qt-console/bat.pro.in | 6 +- bacula/src/qt-console/clients/clients.cpp | 4 +- bacula/src/qt-console/fileset/fileset.cpp | 1 + bacula/src/qt-console/joblist/joblist.cpp | 9 +- bacula/src/qt-console/joblog/joblog.cpp | 2 + bacula/src/qt-console/jobs/jobs.cpp | 203 +++++++ bacula/src/qt-console/jobs/jobs.h | 64 ++ bacula/src/qt-console/jobs/jobs.ui | 42 ++ bacula/src/qt-console/mainwin.cpp | 58 +- bacula/src/qt-console/mainwin.h | 5 - bacula/src/qt-console/mediaedit/mediaedit.cpp | 21 +- bacula/src/qt-console/mediaedit/mediaedit.ui | 559 +++++++++--------- bacula/src/qt-console/medialist/medialist.cpp | 1 + bacula/src/qt-console/restore/brestore.cpp | 1 + bacula/src/qt-console/storage/storage.cpp | 1 + 16 files changed, 650 insertions(+), 346 deletions(-) create mode 100644 bacula/src/qt-console/jobs/jobs.cpp create mode 100644 bacula/src/qt-console/jobs/jobs.h create mode 100644 bacula/src/qt-console/jobs/jobs.ui diff --git a/bacula/src/qt-console/TODO b/bacula/src/qt-console/TODO index 71c4f8fcc4..16d57c796e 100644 --- a/bacula/src/qt-console/TODO +++ b/bacula/src/qt-console/TODO @@ -1,14 +1,8 @@ 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. @@ -53,9 +47,6 @@ loop creating pages. ======================================================== 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?? @@ -97,9 +88,19 @@ global one defined in the mainWin class (if I remember right). 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 diff --git a/bacula/src/qt-console/bat.pro.in b/bacula/src/qt-console/bat.pro.in index 7dc375575a..5135732811 100644 --- a/bacula/src/qt-console/bat.pro.in +++ b/bacula/src/qt-console/bat.pro.in @@ -39,7 +39,7 @@ FORMS += run/run.ui run/runcmd.ui run/estimate.ui run/prune.ui 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 @@ -105,6 +105,10 @@ SOURCES += fileset/fileset.cpp 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 diff --git a/bacula/src/qt-console/clients/clients.cpp b/bacula/src/qt-console/clients/clients.cpp index 657f5261cd..b6d021d712 100644 --- a/bacula/src/qt-console/clients/clients.cpp +++ b/bacula/src/qt-console/clients/clients.cpp @@ -56,6 +56,8 @@ Clients::Clients() /* 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() @@ -143,7 +145,6 @@ void Clients::PgSeltreeWidgetClicked() { if(!m_populated) { populateTree(); - createContextMenu(); m_populated=true; } } @@ -235,7 +236,6 @@ void Clients::currentStackItem() if(!m_populated) { populateTree(); /* Create the context menu for the client tree */ - createContextMenu(); m_populated=true; } } diff --git a/bacula/src/qt-console/fileset/fileset.cpp b/bacula/src/qt-console/fileset/fileset.cpp index 55d6b216b1..9676de3c2f 100644 --- a/bacula/src/qt-console/fileset/fileset.cpp +++ b/bacula/src/qt-console/fileset/fileset.cpp @@ -56,6 +56,7 @@ FileSet::FileSet() /* 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() diff --git a/bacula/src/qt-console/joblist/joblist.cpp b/bacula/src/qt-console/joblist/joblist.cpp index b539c873ca..eb0a83f3c2 100644 --- a/bacula/src/qt-console/joblist/joblist.cpp +++ b/bacula/src/qt-console/joblist/joblist.cpp @@ -45,7 +45,7 @@ JobList::JobList(QString &mediaName, QString &clientname, 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); @@ -64,6 +64,7 @@ JobList::JobList(QString &mediaName, QString &clientname, limitSpinBox->setValue(mainWin->m_recordLimitVal); daysCheckBox->setCheckState(mainWin->m_daysLimitCheck ? Qt::Checked : Qt::Unchecked); daysSpinBox->setValue(mainWin->m_daysLimitVal); + dockPage(); } /* @@ -315,11 +316,11 @@ void JobList::currentStackItem() 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; diff --git a/bacula/src/qt-console/joblog/joblog.cpp b/bacula/src/qt-console/joblog/joblog.cpp index f9b6539f30..a3dd9e4ab0 100644 --- a/bacula/src/qt-console/joblog/joblog.cpp +++ b/bacula/src/qt-console/joblog/joblog.cpp @@ -44,6 +44,8 @@ JobLog::JobLog(QString &jobId, QTreeWidgetItem *parentTreeWidgetItem) 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; diff --git a/bacula/src/qt-console/jobs/jobs.cpp b/bacula/src/qt-console/jobs/jobs.cpp new file mode 100644 index 0000000000..2174a7df92 --- /dev/null +++ b/bacula/src/qt-console/jobs/jobs.cpp @@ -0,0 +1,203 @@ +/* + 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 +//#include +#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; isetData(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; cnterresizeColumnToContents(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; + } +} diff --git a/bacula/src/qt-console/jobs/jobs.h b/bacula/src/qt-console/jobs/jobs.h new file mode 100644 index 0000000000..94a657f44e --- /dev/null +++ b/bacula/src/qt-console/jobs/jobs.h @@ -0,0 +1,64 @@ +#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 +#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_ */ diff --git a/bacula/src/qt-console/jobs/jobs.ui b/bacula/src/qt-console/jobs/jobs.ui new file mode 100644 index 0000000000..de7876d822 --- /dev/null +++ b/bacula/src/qt-console/jobs/jobs.ui @@ -0,0 +1,42 @@ + + jobsForm + + + + 0 + 0 + 413 + 258 + + + + Client Tree + + + + 9 + + + 6 + + + + + + + + :/images/view-refresh.svg + + + Refresh Jobs List + + + Requery the director for the list of clients. + + + + + + + + diff --git a/bacula/src/qt-console/mainwin.cpp b/bacula/src/qt-console/mainwin.cpp index 3f5ad3979d..12a943221a 100644 --- a/bacula/src/qt-console/mainwin.cpp +++ b/bacula/src/qt-console/mainwin.cpp @@ -47,6 +47,7 @@ #include "joblist/joblist.h" #include "clients/clients.h" #include "help/help.h" +#include "jobs/jobs.h" /* * Daemon message callback @@ -132,13 +133,14 @@ void MainWin::createPages() * 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); @@ -146,24 +148,6 @@ void MainWin::createPages() 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 */ @@ -175,7 +159,6 @@ void MainWin::createPageJobList(QString &media, QString &client, /* 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(); @@ -187,33 +170,6 @@ void MainWin::createPageJobList(QString &media, QString &client, } } -/* - * 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) { diff --git a/bacula/src/qt-console/mainwin.h b/bacula/src/qt-console/mainwin.h index c5f59cc17f..b79ff405d7 100644 --- a/bacula/src/qt-console/mainwin.h +++ b/bacula/src/qt-console/mainwin.h @@ -110,11 +110,6 @@ private: 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; diff --git a/bacula/src/qt-console/mediaedit/mediaedit.cpp b/bacula/src/qt-console/mediaedit/mediaedit.cpp index c817585ba0..fa6429a02d 100644 --- a/bacula/src/qt-console/mediaedit/mediaedit.cpp +++ b/bacula/src/qt-console/mediaedit/mediaedit.cpp @@ -299,10 +299,12 @@ void MediaEdit::useDurationChanged() */ 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); @@ -311,6 +313,7 @@ void MediaEdit::setSpins(int value) seconds = left - minutes * 60; disconnectSpins(); yearsSpin->setValue(years); + monthsSpin->setValue(months); daysSpin->setValue(days); hoursSpin->setValue(hours); minutesSpin->setValue(minutes); @@ -337,7 +340,11 @@ void MediaEdit::durationChanged() 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) { @@ -356,8 +363,12 @@ void MediaEdit::durationChanged() 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(); @@ -365,6 +376,7 @@ void MediaEdit::durationChanged() 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); @@ -374,6 +386,7 @@ void MediaEdit::durationChanged() 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); @@ -388,6 +401,7 @@ void MediaEdit::connectSpins() 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())); } @@ -398,6 +412,7 @@ void MediaEdit::disconnectSpins() 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())); } diff --git a/bacula/src/qt-console/mediaedit/mediaedit.ui b/bacula/src/qt-console/mediaedit/mediaedit.ui index 269ae9ee28..90277f39ef 100644 --- a/bacula/src/qt-console/mediaedit/mediaedit.ui +++ b/bacula/src/qt-console/mediaedit/mediaedit.ui @@ -5,8 +5,8 @@ 0 0 - 468 - 451 + 487 + 470 @@ -19,32 +19,6 @@ 6 - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - @@ -53,76 +27,63 @@ 6 - - - - 2147483647 + + + + Pool: + + + poolCombo - - - - 0 - - - 6 + + + + Volume Status: - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - 16777215 - 48 - - - - Volume : - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - + - - - - 10000 + + + + Max Volume Bytes: + + + slotSpin - - + + + + + - Max Volume Files: + Slot: + + + slotSpin + + + + + + + Max Volume Jobs: + + + slotSpin + + + + + + + Use Duration: slotSpin @@ -166,62 +127,30 @@ - - - - 0 + + + + 2147483647 - - 6 + + + + + + Retension: - - - - Qt::Horizontal - - - - 71 - 21 - - - - - - - - - 16777215 - 30 - - - - <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> - - - - - - - Qt::Horizontal - - - - 81 - 20 - - - - - + + slotSpin + + - - + + - Volume Status: + Recycle Pool: + + + slotSpin @@ -258,6 +187,23 @@ p, li { white-space: pre-wrap; } + + + + 2147483647 + + + + + + + Max Volume Files: + + + slotSpin + + + @@ -266,44 +212,50 @@ p, li { white-space: pre-wrap; } 6 - - - - Minutes + + + + Qt::Vertical - + + + 97 + 21 + + + - - + + - 24 + 999 -1 - - 0 - - - + + - Seconds + Years - - + + - Retention + Seconds - - - - Days + + + + 30 + + + -1 @@ -314,7 +266,7 @@ p, li { white-space: pre-wrap; } - + Qt::Vertical @@ -322,30 +274,44 @@ p, li { white-space: pre-wrap; } 97 - 81 + 31 - - + + - Years + Days - - + + - 365 + 60 -1 + + + + Hours + + + + + + + Months + + + - + 60 @@ -354,50 +320,106 @@ p, li { white-space: pre-wrap; } - - + + - 999 + 24 -1 + + 0 + - - + + - Hours + Retention - - + + - 60 + 12 -1 - + + + + Minutes + + + + + + + + + 2147483647 + + + + + + + 0 + + + 6 + + - Qt::Vertical + Qt::Horizontal - 97 - 71 + 40 + 20 + + + + + + + + + 16777215 + 48 + + + + Volume : + + + + + + + Qt::Horizontal + + + + 40 + 20 - - + + + + + 2147483647 @@ -436,106 +458,75 @@ p, li { white-space: pre-wrap; } - - - - 2147483647 - - - - - - - 2147483647 - - - - - - - Use Duration: - - - slotSpin - - - - - - - Pool: - - - poolCombo - - - - - - - - - - Max Volume Bytes: - - - slotSpin - - - - - - - Retension: + + + + 0 - - slotSpin + + 6 - - - - + + + + Qt::Horizontal + + + + 71 + 21 + + + + + + + + + 16777215 + 30 + + + + <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> + + + + + + + Qt::Horizontal + + + + 81 + 20 + + + + + - - - - Slot: - - - slotSpin + + + + 10000 - - + + 2147483647 - - - - Recycle Pool: - - - slotSpin - - - - - - - Max Volume Jobs: - - - slotSpin - - - - + Qt::Vertical @@ -548,7 +539,20 @@ p, li { white-space: pre-wrap; } - + + + + Qt::Horizontal + + + + 40 + 20 + + + + + Qt::Vertical @@ -561,6 +565,19 @@ p, li { white-space: pre-wrap; } + + + + Qt::Horizontal + + + + 40 + 20 + + + + diff --git a/bacula/src/qt-console/medialist/medialist.cpp b/bacula/src/qt-console/medialist/medialist.cpp index e8d248bc90..dc1e974c6f 100644 --- a/bacula/src/qt-console/medialist/medialist.cpp +++ b/bacula/src/qt-console/medialist/medialist.cpp @@ -59,6 +59,7 @@ MediaList::MediaList() /* 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() diff --git a/bacula/src/qt-console/restore/brestore.cpp b/bacula/src/qt-console/restore/brestore.cpp index 7e27665784..aeecc278d2 100644 --- a/bacula/src/qt-console/restore/brestore.cpp +++ b/bacula/src/qt-console/restore/brestore.cpp @@ -44,6 +44,7 @@ bRestore::bRestore() setupUi(this); pgInitialize(); m_closeable = true; + dockPage(); } bRestore::~bRestore() diff --git a/bacula/src/qt-console/storage/storage.cpp b/bacula/src/qt-console/storage/storage.cpp index 7eafaf9ffd..8ebbda6e8b 100644 --- a/bacula/src/qt-console/storage/storage.cpp +++ b/bacula/src/qt-console/storage/storage.cpp @@ -58,6 +58,7 @@ Storage::Storage() /* 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() -- 2.39.5