2 Bacula® - The Network Backup Solution
4 Copyright (C) 2007-2009 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 three of the GNU Affero General Public
10 License as published by the Free Software Foundation and included
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 Affero 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 Kern Sibbald.
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);
55 void set_status(const QString &str);
58 void resetFocus() { lineEdit->setFocus(); };
59 void hashInsert(QTreeWidgetItem *, Pages *);
60 void hashRemove(Pages *);
61 void hashRemove(QTreeWidgetItem *, Pages *);
62 void setMessageIcon();
63 bool getWaitState() {return m_waitState; };
64 bool isClosing() {return m_isClosing; };
65 Console *currentConsole();
66 QTreeWidgetItem *currentTopItem();
67 Pages* getFromHash(QTreeWidgetItem *);
68 QTreeWidgetItem* getFromHash(Pages *);
69 /* This hash is to get the page when the page selector widget is known */
70 QHash<QTreeWidgetItem*,Pages*> m_pagehash;
71 /* This hash is to get the page selector widget when the page is known */
72 QHash<Pages*,QTreeWidgetItem*> m_widgethash;
73 /* This is a list of consoles */
74 QHash<QTreeWidgetItem*,Console*> m_consoleHash;
75 void createPageJobList(const QString &, const QString &,
76 const QString &, const QString &, QTreeWidgetItem *);
78 /* Begin Preferences variables */
85 bool m_recordLimitCheck;
87 bool m_daysLimitCheck;
90 int m_checkMessagesInterval;
93 bool m_rtDirCurICDebug;
95 bool m_rtFileTabICDebug;
96 bool m_rtVerTabICDebug;
97 bool m_rtUpdateFTDebug;
98 bool m_rtUpdateVTDebug;
100 bool m_rtIconStateDebug;
101 bool m_rtRestore1Debug;
102 bool m_rtRestore2Debug;
103 bool m_rtRestore3Debug;
112 void treeItemClicked(QTreeWidgetItem *item, int column);
113 void labelButtonClicked();
114 void runButtonClicked();
115 void estimateButtonClicked();
116 void browseButtonClicked();
117 void statusPageButtonClicked();
118 void jobPlotButtonClicked();
119 void restoreButtonClicked();
120 void undockWindowButton();
121 void treeItemChanged(QTreeWidgetItem *, QTreeWidgetItem *);
122 void stackItemChanged(int);
123 void toggleDockContextWindow();
125 void setPreferences();
126 void readPreferences();
130 void reloadRepopLists();
132 void goToPreviousPage();
135 void closeEvent(QCloseEvent *event);
136 void keyPressEvent(QKeyEvent *event);
139 void connectConsole();
141 void connectSignals();
142 void disconnectSignals();
143 void connectConsoleSignals();
144 void disconnectConsoleSignals(Console *console);
147 Console *m_currentConsole;
148 Pages *m_pagespophold;
149 QStringList m_cmd_history;
151 QTreeWidgetItem *m_firstItem;
152 QTreeWidgetItem *m_waitTreeItem;
156 QList<QTreeWidgetItem *> m_treeWidgetStack;
157 bool m_treeStackTrap;
160 #include "ui_prefs.h"
162 class prefsDialog : public QDialog, public Ui::PrefsForm
174 #endif /* _MAINWIN_H_ */