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