m_gridLayout->setMargin(9);
m_gridLayout->setObjectName(QString::fromUtf8("m_gridLayout"));
- QSplitter *splitter_2 = new QSplitter(Qt::Vertical, this);
+ splitter = new QSplitter(Qt::Vertical, this);
QScrollArea *area = new QScrollArea();
area->setObjectName(QString::fromUtf8("area"));
area->setWidget(frame);
area->setWidgetResizable(true);
- splitter_2->addWidget(mp_tableWidget);
- splitter_2->addWidget(area);
+ splitter->addWidget(mp_tableWidget);
+ splitter->addWidget(area);
- m_gridLayout->addWidget(splitter_2, 0, 0, 1, 1);
+ m_gridLayout->addWidget(splitter, 0, 0, 1, 1);
+ readSettings();
+}
+
+/*
+ * Write the splitter settings in the destructor
+ */
+JobList::~JobList()
+{
+ writeSettings();
}
/*
QTreeWidgetItem* pageSelectorTreeWidgetItem = mainWin->getFromHash(this);
new JobPlot(pageSelectorTreeWidgetItem, pass);
}
+/*
+ * Save user settings associated with this page
+ */
+void JobList::writeSettings()
+{
+ QSettings settings(m_console->m_dir->name(), "bat");
+ settings.beginGroup("JobListPage");
+ settings.setValue("splitterSizes", splitter->saveState());
+ settings.endGroup();
+}
+
+/*
+ * Read and restore user settings associated with this page
+ */
+void JobList::readSettings()
+{
+ QSettings settings(m_console->m_dir->name(), "bat");
+ settings.beginGroup("JobListPage");
+ splitter->restoreState(settings.value("splitterSizes").toByteArray());
+ settings.endGroup();
+}
public:
JobList(const QString &medianame, const QString &clientname,
const QString &jobname, const QString &filesetname, QTreeWidgetItem *);
+ ~JobList();
virtual void PgSeltreeWidgetClicked();
virtual void currentStackItem();
int m_resultCount;
private:
void createConnections();
void setStatusColor(QTableWidgetItem *item, QString &field);
+ void writeSettings();
+ void readSettings();
+ QSplitter *splitter;
QString m_mediaName;
QString m_clientName;
QString m_jobName;
m_closeable = true;
m_populated = false;
- readSettings();
dockPage();
m_winRegExpDrive.setPattern("^[a-z]:/$");
m_winRegExpPath.setPattern("^[a-z]:/");
m_gridLayout->setMargin(9);
m_gridLayout->setObjectName(QString::fromUtf8("m_gridLayout"));
- QSplitter *splitter_2 = new QSplitter(Qt::Vertical, this);
+ splitter_2 = new QSplitter(Qt::Vertical, this);
QScrollArea *area = new QScrollArea();
area->setObjectName(QString::fromUtf8("area"));
area->setWidget(widget);
limitSpinBox->setValue(mainWin->m_recordLimitVal);
daysCheckBox->setCheckState(mainWin->m_daysLimitCheck ? Qt::Checked : Qt::Unchecked);
daysSpinBox->setValue(mainWin->m_daysLimitVal);
+ readSettings();
}
restoreTree::~restoreTree()
QSettings settings(m_console->m_dir->name(), "bat");
settings.beginGroup("RestoreTree");
settings.setValue("splitterSizes", splitter->saveState());
+ settings.setValue("splitter_2Sizes", splitter_2->saveState());
settings.endGroup();
}
QSettings settings(m_console->m_dir->name(), "bat");
settings.beginGroup("RestoreTree");
splitter->restoreState(settings.value("splitterSizes").toByteArray());
+ splitter_2->restoreState(settings.value("splitter_2Sizes").toByteArray());
settings.endGroup();
}