]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/qt-console/console/console.h
921b1f9245b931f50dda0e901a88f456a046864e
[bacula/bacula] / bacula / src / qt-console / console / console.h
1
2 #ifndef _CONSOLE_H_
3 #define _CONSOLE_H_
4
5 #include <QtGui>
6
7 class DIRRES;
8 class BSOCK;
9 class JCR;
10 class CONRES;
11
12 class Console : public QWidget
13 {
14    Q_OBJECT 
15
16 public:
17    Console();
18    void set_text(const char *buf);
19    void set_text(const QString buf);
20    void set_textf(const char *fmt, ...);
21    void update_cursor(void);
22    void write_dir(const char *buf);
23    bool authenticate_director(JCR *jcr, DIRRES *director, CONRES *cons);
24    bool is_connected() { return m_sock != NULL; };
25    const QFont get_font();
26    void writeSettings();
27    void readSettings();
28
29 public slots:
30    void connect(void);
31    void read_dir(int fd);
32    void status_dir(void);
33    void set_font(void);
34
35 private:
36    QTextEdit *m_textEdit;
37    DIRRES *m_dir;
38    BSOCK *m_sock;   
39    bool m_at_prompt;
40    QSocketNotifier *m_notifier;
41    QTextCursor *m_cursor;
42    QTreeWidgetItem *m_consoleItem;
43 };
44
45 #endif /* _CONSOLE_H_ */