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
35 class MainWin : public QMainWindow, public Ui::MainForm
40 MainWin(QWidget *parent = 0);
41 void set_statusf(const char *fmt, ...);
42 void set_status_ready();
43 void set_status(const char *buf);
44 void set_status(const QString &str);
47 void resetFocus() { lineEdit->setFocus(); };
48 void hashInsert(QTreeWidgetItem *, Pages *);
49 void hashRemove(Pages *);
50 void hashRemove(QTreeWidgetItem *, Pages *);
51 void setMessageIcon();
52 bool getWaitState() {return m_waitState; };
53 bool isClosing() {return m_isClosing; };
54 Console *currentConsole();
55 QTreeWidgetItem *currentTopItem();
56 Pages* getFromHash(QTreeWidgetItem *);
57 QTreeWidgetItem* getFromHash(Pages *);
58 /* This hash is to get the page when the page selector widget is known */
59 QHash<QTreeWidgetItem*,Pages*> m_pagehash;
60 /* This hash is to get the page selector widget when the page is known */
61 QHash<Pages*,QTreeWidgetItem*> m_widgethash;
62 /* This is a list of consoles */
63 QHash<QTreeWidgetItem*,Console*> m_consoleHash;
64 void createPageJobList(const QString &, const QString &,
65 const QString &, const QString &, QTreeWidgetItem *);
67 /* Begin Preferences variables */
74 bool m_recordLimitCheck;
76 bool m_daysLimitCheck;
79 int m_checkMessagesInterval;
82 bool m_rtDirCurICDebug;
84 bool m_rtFileTabICDebug;
85 bool m_rtVerTabICDebug;
86 bool m_rtUpdateFTDebug;
87 bool m_rtUpdateVTDebug;
89 bool m_rtIconStateDebug;
90 bool m_rtRestore1Debug;
91 bool m_rtRestore2Debug;
92 bool m_rtRestore3Debug;
98 bool m_notify; /* global flag to turn on/off all notifiers */
104 void treeItemClicked(QTreeWidgetItem *item, int column);
105 void labelButtonClicked();
106 void runButtonClicked();
107 void estimateButtonClicked();
108 void browseButtonClicked();
109 void statusPageButtonClicked();
110 void jobPlotButtonClicked();
111 void restoreButtonClicked();
112 void undockWindowButton();
113 void treeItemChanged(QTreeWidgetItem *, QTreeWidgetItem *);
114 void stackItemChanged(int);
115 void toggleDockContextWindow();
116 void closePage(int item);
117 void closeCurrentPage();
118 void setPreferences();
119 void readPreferences();
123 void reloadRepopLists();
125 void goToPreviousPage();
128 void closeEvent(QCloseEvent *event);
129 void keyPressEvent(QKeyEvent *event);
132 void connectConsole();
134 void connectSignals();
135 void disconnectSignals();
136 void connectConsoleSignals();
137 void disconnectConsoleSignals(Console *console);
140 Console *m_currentConsole;
141 Pages *m_pagespophold;
142 QStringList m_cmd_history;
144 QTreeWidgetItem *m_firstItem;
145 QTreeWidgetItem *m_waitTreeItem;
149 QList<QTreeWidgetItem *> m_treeWidgetStack;
150 bool m_treeStackTrap;
153 #include "ui_prefs.h"
155 class prefsDialog : public QDialog, public Ui::PrefsForm
167 #endif /* _MAINWIN_H_ */