2 Bacula(R) - The Network Backup Solution
4 Copyright (C) 2000-2016 Kern Sibbald
6 The original author of Bacula is Kern Sibbald, with contributions
7 from many others, a complete list can be found in the file AUTHORS.
9 You may use this file and others of this release according to the
10 license defined in the LICENSE file, which includes the Affero General
11 Public License, v3.0 ("AGPLv3") and some additional permissions and
12 terms pursuant to its AGPLv3 Section 7.
14 This notice must be preserved when any source code is
15 conveyed and/or propagated.
17 Bacula(R) is a registered trademark of Kern Sibbald.
20 * qt-console main window class definition.
22 * Written by Kern Sibbald, January MMVII
28 #if QT_VERSION >= 0x050000
39 class MainWin : public QMainWindow, public Ui::MainForm
44 MainWin(QWidget *parent = 0);
45 void set_statusf(const char *fmt, ...);
46 void set_status_ready();
47 void set_status(const char *buf);
48 void set_status(const QString &str);
51 void resetFocus() { lineEdit->setFocus(); };
52 void hashInsert(QTreeWidgetItem *, Pages *);
53 void hashRemove(Pages *);
54 void hashRemove(QTreeWidgetItem *, Pages *);
55 void setMessageIcon();
56 bool getWaitState() {return m_waitState; };
57 bool isClosing() {return m_isClosing; };
58 Console *currentConsole();
59 QTreeWidgetItem *currentTopItem();
60 Pages* getFromHash(QTreeWidgetItem *);
61 QTreeWidgetItem* getFromHash(Pages *);
62 /* This hash is to get the page when the page selector widget is known */
63 QHash<QTreeWidgetItem*,Pages*> m_pagehash;
64 /* This hash is to get the page selector widget when the page is known */
65 QHash<Pages*,QTreeWidgetItem*> m_widgethash;
66 /* This is a list of consoles */
67 QHash<QTreeWidgetItem*,Console*> m_consoleHash;
68 void createPageJobList(const QString &, const QString &,
69 const QString &, const QString &, QTreeWidgetItem *);
71 /* Begin Preferences variables */
78 bool m_recordLimitCheck;
80 bool m_daysLimitCheck;
83 int m_checkMessagesInterval;
86 bool m_rtDirCurICDebug;
88 bool m_rtFileTabICDebug;
89 bool m_rtVerTabICDebug;
90 bool m_rtUpdateFTDebug;
91 bool m_rtUpdateVTDebug;
93 bool m_rtIconStateDebug;
94 bool m_rtRestore1Debug;
95 bool m_rtRestore2Debug;
96 bool m_rtRestore3Debug;
102 bool m_notify; /* global flag to turn on/off all notifiers */
108 void treeItemClicked(QTreeWidgetItem *item, int column);
109 void labelButtonClicked();
110 void runButtonClicked();
111 void estimateButtonClicked();
112 void browseButtonClicked();
113 void statusPageButtonClicked();
114 void jobPlotButtonClicked();
115 void restoreButtonClicked();
116 void undockWindowButton();
117 void treeItemChanged(QTreeWidgetItem *, QTreeWidgetItem *);
118 void stackItemChanged(int);
119 void toggleDockContextWindow();
120 void closePage(int item);
121 void closeCurrentPage();
122 void setPreferences();
123 void readPreferences();
127 void reloadRepopLists();
129 void goToPreviousPage();
132 void closeEvent(QCloseEvent *event);
133 void keyPressEvent(QKeyEvent *event);
136 void connectConsole();
138 void connectSignals();
139 void disconnectSignals();
140 void connectConsoleSignals();
141 void disconnectConsoleSignals(Console *console);
144 Console *m_currentConsole;
145 Pages *m_pagespophold;
146 QStringList m_cmd_history;
148 QTreeWidgetItem *m_firstItem;
149 QTreeWidgetItem *m_waitTreeItem;
153 QList<QTreeWidgetItem *> m_treeWidgetStack;
154 bool m_treeStackTrap;
157 #include "ui_prefs.h"
159 class prefsDialog : public QDialog, public Ui::PrefsForm
171 #endif /* _MAINWIN_H_ */