]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/GuiProgressView.h
4fbfa2b1198f8370d559b0e76718f67551ad62b1
[lyx.git] / src / frontends / qt4 / GuiProgressView.h
1 // -*- C++ -*-
2 /**
3  * \file GuiProgressView.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Peter Kümmel
8  * \author Pavel Sanda
9  *
10  * Full author contact details are available in file CREDITS.
11  */
12
13 #ifndef GUIPROGRESSVIEW_H
14 #define GUIPROGRESSVIEW_H
15
16 #if QT_VERSION < 0x040400
17 #define settingsLayout gridLayout1
18 #endif
19
20 #include "ui_ProgressViewUi.h"
21
22 #include "DockView.h"
23
24 #include "GuiProgress.h"
25
26 #include <string>
27 #include <QList>
28
29
30 class QHideEvent;
31 class QShowEvent;
32
33
34 namespace lyx {
35 namespace frontend {
36
37
38 class ProgressViewWidget : public QWidget, public Ui::ProgressViewUi
39 {
40         Q_OBJECT
41
42 public:
43         ProgressViewWidget();
44 private:
45         
46 };
47
48 class GuiProgressView : public DockView
49 {
50         Q_OBJECT
51
52 public:
53         GuiProgressView(
54                 GuiView & parent, ///< the main window where to dock.
55                 Qt::DockWidgetArea area, ///< Position of the dock (and also drawer)
56                 Qt::WindowFlags flags = 0);
57
58         ~GuiProgressView();
59         /// Controller inherited method.
60         ///@{
61         bool initialiseParams(std::string const &) { return true; }
62         void clearParams() {}
63         void dispatchParams() {}
64         bool isBufferDependent() const { return false; }
65         bool canApply() const { return true; }
66         bool canApplyToReadOnly() const { return true; }
67         void updateView() {}
68         bool wantInitialFocus() const { return false; }
69         void restoreSession();
70         void saveSession() const;
71         ///@}
72
73 private Q_SLOTS:
74         void appendText(QString const & text);
75         void appendLyXErrText(QString const & text);
76         void clearText();
77         void debugMessageActivated(QTreeWidgetItem *, int);
78         void debugSelectionChanged();
79
80 private:
81         ProgressViewWidget * widget_;
82
83         void levelChanged();
84         void showEvent(QShowEvent*);
85         void hideEvent(QHideEvent*);
86 };
87
88
89 } // namespace frontend
90 } // namespace lyx
91
92 #endif
93