consoleCommand(cmd);
}
-/* Function to get a list of volumes */
-void Console::getVolumeList(QStringList &volumeList)
-{
- QString query("SELECT VolumeName AS Media FROM Media ORDER BY Media");
- if (mainWin->m_sqlDebug) {
- Pmsg1(000, "Query cmd : %s\n",query.toUtf8().data());
- }
- QStringList results;
- if (sql_cmd(query, results)) {
- QString field;
- QStringList fieldlist;
- /* Iterate through the lines of results. */
- foreach (QString resultline, results) {
- fieldlist = resultline.split("\t");
- volumeList.append(fieldlist[0]);
- } /* foreach resultline */
- } /* if results from query */
-}
-
-/* Function to get a list of volumes */
-void Console::getStatusList(QStringList &statusLongList)
-{
- QString statusQuery("SELECT JobStatusLong FROM Status");
- if (mainWin->m_sqlDebug) {
- Pmsg1(000, "Query cmd : %s\n",statusQuery.toUtf8().data());
- }
- QStringList statusResults;
- if (sql_cmd(statusQuery, statusResults)) {
- QString field;
- QStringList fieldlist;
- /* Iterate through the lines of results. */
- foreach (QString resultline, statusResults) {
- fieldlist = resultline.split("\t");
- statusLongList.append(fieldlist[0]);
- } /* foreach resultline */
- } /* if results from statusquery */
-}
-
/* For suppressing .messages
* This may be rendered not needed if the multiple connections feature gets working */
bool Console::hasFocus()
bool get_job_defaults(int &conn, struct job_defaults &);
const QFont get_font();
void beginNewCommand(int conn);
- void getVolumeList(QStringList &);
- void getStatusList(QStringList &);
private:
bool get_job_defaults(int &conn, struct job_defaults &, bool donotify);
controls->clientComboBox->addItems(m_console->client_list);
QStringList volumeList;
- m_console->getVolumeList(volumeList);
+ getVolumeList(volumeList);
controls->volumeComboBox->addItem(tr("Any"));
controls->volumeComboBox->addItems(volumeList);
controls->jobComboBox->addItem(tr("Any"));
controls->fileSetComboBox->addItem(tr("Any"));
controls->fileSetComboBox->addItems(m_console->fileset_list);
QStringList statusLongList;
- m_console->getStatusList(statusLongList);
+ getStatusList(statusLongList);
controls->statusComboBox->addItem(tr("Any"));
controls->statusComboBox->addItems(statusLongList);
comboSel(clientComboBox, m_clientName);
QStringList volumeList;
- m_console->getVolumeList(volumeList);
+ getVolumeList(volumeList);
volumeComboBox->addItem(tr("Any"));
volumeComboBox->addItems(volumeList);
comboSel(volumeComboBox, m_mediaName);
}
}
}
+
+/* Function to get a list of volumes */
+void Pages::getVolumeList(QStringList &volumeList)
+{
+ QString query("SELECT VolumeName AS Media FROM Media ORDER BY Media");
+ if (mainWin->m_sqlDebug) {
+ Pmsg1(000, "Query cmd : %s\n",query.toUtf8().data());
+ }
+ QStringList results;
+ if (m_console->sql_cmd(query, results)) {
+ QString field;
+ QStringList fieldlist;
+ /* Iterate through the lines of results. */
+ foreach (QString resultline, results) {
+ fieldlist = resultline.split("\t");
+ volumeList.append(fieldlist[0]);
+ } /* foreach resultline */
+ } /* if results from query */
+}
+
+/* Function to get a list of volumes */
+void Pages::getStatusList(QStringList &statusLongList)
+{
+ QString statusQuery("SELECT JobStatusLong FROM Status");
+ if (mainWin->m_sqlDebug) {
+ Pmsg1(000, "Query cmd : %s\n",statusQuery.toUtf8().data());
+ }
+ QStringList statusResults;
+ if (m_console->sql_cmd(statusQuery, statusResults)) {
+ QString field;
+ QStringList fieldlist;
+ /* Iterate through the lines of results. */
+ foreach (QString resultline, statusResults) {
+ fieldlist = resultline.split("\t");
+ statusLongList.append(fieldlist[0]);
+ } /* foreach resultline */
+ } /* if results from statusquery */
+}
void consoleCommand(QString &);
void consoleInput(QString &);
QString &name() { return m_name; };
+ void getVolumeList(QStringList &);
+ void getStatusList(QStringList &);
public slots:
/* closeEvent is a virtual function inherited from QWidget */