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.
31 * qt-console main window class definition.
33 * Written by Kern Sibbald, January MMVII
46 class MainWin : public QMainWindow, public Ui::MainForm
51 MainWin(QWidget *parent = 0);
52 void set_statusf(const char *fmt, ...);
53 void set_status_ready();
54 void set_status(const char *buf);
57 void resetFocus() { lineEdit->setFocus(); };
58 void hashInsert(QTreeWidgetItem *, Pages *);
59 void hashRemove(Pages *);
60 void hashRemove(QTreeWidgetItem *, Pages *);
61 Console *currentConsole();
62 QTreeWidgetItem *currentTopItem();
63 Pages* getFromHash(QTreeWidgetItem *);
64 QTreeWidgetItem* getFromHash(Pages *);
65 /* This hash is to get the page when the page selector widget is known */
66 QHash<QTreeWidgetItem*,Pages*> m_pagehash;
67 /* This hash is to get the page selector widget when the page is known */
68 QHash<Pages*,QTreeWidgetItem*> m_widgethash;
69 /* This is a list of consoles */
70 QHash<QTreeWidgetItem*,Console*> m_consoleHash;
71 void createPageJobList(QString &, QString &, QTreeWidgetItem *);
76 void treeItemClicked(QTreeWidgetItem *item, int column);
77 void labelButtonClicked();
78 void runButtonClicked();
79 void restoreButtonClicked();
80 void undockWindowButton();
81 void treeItemChanged(QTreeWidgetItem *, QTreeWidgetItem *);
82 void stackItemChanged(int);
83 void toggleDockContextWindow();
85 void setPreferences();
88 void closeEvent(QCloseEvent *event);
89 void keyPressEvent(QKeyEvent *event);
92 void createConnections();
94 QTreeWidgetItem *createTopPage(char *name);
95 QTreeWidgetItem *createPage(char *name, QTreeWidgetItem *parent);
96 void createPagebRestore();
97 void createPageMediaList();
98 void createPageClients();
99 void createPageStorage();
100 void createPageFileSet();
103 Console *m_currentConsole;
104 Pages *m_pagespophold;
105 QStringList m_cmd_history;
107 QTreeWidgetItem *m_firstItem;
110 #include "ui_prefs.h"
112 class prefsDialog : public QDialog, public Ui::PrefsForm
124 #endif /* _MAINWIN_H_ */