2 Bacula® - The Network Backup Solution
4 Copyright (C) 2007-2007 Free Software Foundation Europe e.V.
6 The main author of Bacula is Kern Sibbald, with contributions from
7 many others, a complete list can be found in the file AUTHORS.
8 This program is Free Software; you can redistribute it and/or
9 modify it under the terms of version two of the GNU General Public
10 License as published by the Free Software Foundation plus additions
11 that are listed in the file LICENSE.
13 This program is distributed in the hope that it will be useful, but
14 WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
23 Bacula® is a registered trademark of John Walker.
24 The licensor of Bacula is the Free Software Foundation Europe
25 (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
26 Switzerland, email:ftf@fsfeurope.org.
30 * Run Command Dialog class
32 * This is called when a Run Command signal is received from the
33 * Director. We parse the Director's output and throw up a
36 * Kern Sibbald, March MMVII
45 * Setup all the combo boxes and display the dialog
47 runCmdDialog::runCmdDialog(Console *console)
50 m_console->notify(false);
54 m_console->discardToPrompt();
57 void runCmdDialog::fillRunDialog()
61 QRegExp rx("^.*:\\s*(\\S.*$)"); /* Regex to get value */
64 item = m_console->msg();
65 items = item.split("\n");
66 label->setText(items[0]);
67 Dmsg1(000, "Title=%s\n", items[0].toUtf8().data());
68 items.removeFirst(); /* remove title */
69 foreach(item, items) {
72 Dmsg1(000, "Item=%s\n", item.toUtf8().data());
73 Dmsg1(000, "Value=%s\n", val.toUtf8().data());
75 if (item.startsWith("JobName:")) {
76 jobCombo->addItem(val);
79 if (item.startsWith("Bootstrap:")) {
80 bootstrap->setText(val);
83 if (item.startsWith("Backup Client:")) {
84 clientCombo->addItem(val);
87 if (item.startsWith("Storage:")) {
88 storageCombo->addItem(val);
91 if (item.startsWith("Where:")) {
95 if (item.startsWith("When:")) {
98 if (item.startsWith("Catalog:")) {
99 catalogCombo->addItem(val);
102 if (item.startsWith("Fileset:")) {
103 filesetCombo->addItem(val);
106 if (item.startsWith("Priority:")) {
107 // prioritySpin->setValue(atoi(val));
113 void runCmdDialog::accept()
118 m_console->write_dir("yes");
119 m_console->displayToPrompt();
120 m_console->notify(true);
122 mainWin->resetFocus();
126 void runCmdDialog::reject()
128 mainWin->set_status(" Canceled");
130 m_console->notify(true);
132 mainWin->resetFocus();