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 runCmdPage::runCmdPage()
49 m_name = "Restore Run";
52 m_console->notify(false);
55 m_console->discardToPrompt();
57 connect(okButton, SIGNAL(pressed()), this, SLOT(okButtonPushed()));
58 connect(cancelButton, SIGNAL(pressed()), this, SLOT(cancelButtonPushed()));
64 void runCmdPage::fill()
68 QRegExp rx("^.*:\\s*(\\S.*$)"); /* Regex to get value */
71 item = m_console->msg();
72 items = item.split("\n");
73 label->setText(items[0]);
74 Dmsg1(200, "Title=%s\n", items[0].toUtf8().data());
75 items.removeFirst(); /* remove title */
76 foreach(item, items) {
79 Dmsg1(200, "Item=%s\n", item.toUtf8().data());
80 Dmsg1(200, "Value=%s\n", val.toUtf8().data());
82 if (item.startsWith("JobName:")) {
83 jobCombo->addItem(val);
86 if (item.startsWith("Bootstrap:")) {
87 bootstrap->setText(val);
90 if (item.startsWith("Backup Client:")) {
91 clientCombo->addItem(val);
94 if (item.startsWith("Storage:")) {
95 storageCombo->addItem(val);
98 if (item.startsWith("Where:")) {
102 if (item.startsWith("When:")) {
105 if (item.startsWith("Catalog:")) {
106 catalogCombo->addItem(val);
109 if (item.startsWith("Fileset:")) {
110 filesetCombo->addItem(val);
113 if (item.startsWith("Priority:")) {
114 // prioritySpin->setValue(atoi(val));
120 void runCmdPage::okButtonPushed()
125 m_console->write_dir("yes");
126 m_console->displayToPrompt();
127 m_console->notify(true);
129 mainWin->resetFocus();
133 void runCmdPage::cancelButtonPushed()
135 m_console->displayToPrompt();
136 mainWin->set_status(" Canceled");
138 m_console->notify(true);
140 mainWin->resetFocus();