Frank Sweetser
Howard Thomson
Jaime Ventura
+James Harper
Jan Kesten
Joao Henrique Freitas
John Goerzen
return;
m_populated = true;
- QBrush blackBrush(Qt::black);
+ Freeze frz(*tableWidget); /* disable updating*/
QStringList headerlist = (QStringList() << tr("Client Name") << tr("File Retention")
<< tr("Job Retention") << tr("AutoPrune") << tr("ClientId") << tr("Uname") );
return;
m_populated = true;
- QBrush blackBrush(Qt::black);
+ Freeze frz(*tableWidget); /* disable updating*/
m_checkcurwidget = false;
tableWidget->clear();
prepareFilterWidgets();
m_populated = true;
+ Freeze frz(*mp_tableWidget); /* disable updating*/
+
/* Set up query */
QString query;
fillQueryString(query);
if (!m_console->preventInUseConnect())
return;
m_populated = true;
+
+ Freeze frz(*tableWidget); /* disable updating*/
+
QBrush blackBrush(Qt::black);
m_checkcurwidget = false;
tableWidget->clear();
writeExpandedSettings();
m_populated = true;
- QTreeWidgetItem *pooltreeitem;
-
if (!m_console->preventInUseConnect())
return;
+ Freeze frz(*mp_treeWidget); /* disable updating*/
+
QStringList headerlist = (QStringList()
<< tr("Volume Name") << tr("Id") << tr("Status") << tr("Enabled") << tr("Bytes") << tr("Files")
<< tr("Jobs") << tr("Retention") << tr("Media Type") << tr("Slot") << tr("Use Duration")
settings.beginGroup("MediaListTreeExpanded");
QString query;
+ QTreeWidgetItem *pooltreeitem;
foreach (QString pool_listItem, m_console->pool_list) {
pooltreeitem = new QTreeWidgetItem(m_topItem);
pooltreeitem->setText(0, pool_listItem);
writeExpandedSettings();
m_populated = true;
+ Freeze frz(*mp_treeWidget); /* disable updating*/
+
m_checkcurwidget = false;
mp_treeWidget->clear();
m_checkcurwidget = true;
return QString(buf);
}
+/*
+ * disable widget updating
+ */
+Freeze::Freeze(QWidget &q):
+qw(&q)
+{
+ QApplication::setOverrideCursor(Qt::WaitCursor);
+ qw->setUpdatesEnabled(false);
+}
+
+Freeze::~Freeze()
+{
+ if (qw) {
+ qw->setUpdatesEnabled(true);
+ QApplication::restoreOverrideCursor();
+ }
+}
+
/***********************************************
*
* ItemFormatterBase static members
* TreeView formatting helpers - Riccardo Ghetta, May 2008
*/
+class QWidget;
class QTreeWidgetItem;
class QTableWidget;
class QTableWidgetItem;
*/
QString convertJobStatus(const QString &sts);
+/*
+ * disable widget updating
+ */
+class Freeze
+{
+private:
+ QWidget *qw;
+
+ public:
+ Freeze(QWidget &q);
+ ~Freeze();
+};
+
+
/*
* base class for formatters
General:
29Oct08
+kes Apply pane freezing during updates patch from Riccardo Ghetta.
kes Rework next_vol and autoprune a bit due to failure in
recycle-test. prune_volumes() now returns no status,
but should prune at least one Volume, if possible.