]> git.lyx.org Git - lyx.git/blob - src/frontends/qt4/GuiProgressView.h
More notes.
[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 #include "ui_ProgressViewUi.h"
17
18 #include "DockView.h"
19
20 #include "GuiProgress.h"
21
22 #include <string>
23 #include <QList>
24
25
26 class QHideEvent;
27 class QShowEvent;
28
29
30 namespace lyx {
31 namespace frontend {
32
33 struct LevelButton;
34
35
36 class ProgressViewWidget : public QWidget, public Ui::ProgressViewUi
37 {
38         Q_OBJECT
39
40 public:
41         ProgressViewWidget();
42 private:
43         
44 };
45
46 class GuiProgressView : public DockView
47 {
48         Q_OBJECT
49
50 public:
51         GuiProgressView(
52                 GuiView & parent, ///< the main window where to dock.
53                 Qt::DockWidgetArea area, ///< Position of the dock (and also drawer)
54                 Qt::WindowFlags flags = 0);
55
56         ~GuiProgressView();
57         /// Controller inherited method.
58         ///@{
59         bool initialiseParams(std::string const &) { return true; }
60         void clearParams() {}
61         void dispatchParams() {}
62         bool isBufferDependent() const { return false; }
63         bool canApply() const { return true; }
64         bool canApplyToReadOnly() const { return true; }
65         void updateView() {}
66         bool wantInitialFocus() const { return false; }
67         void restoreSession();
68         void saveSession() const;
69         ///@}
70
71 private Q_SLOTS:
72         void appendText(QString const & text);
73         void clearText();
74
75         void levelChanged();
76
77 private:
78         ProgressViewWidget * widget_;
79
80         void showEvent(QShowEvent*);
81         void hideEvent(QHideEvent*);
82
83         QList<LevelButton*> level_buttons;
84 };
85
86
87 } // namespace frontend
88 } // namespace lyx
89
90 #endif
91