4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Lars Gullik Bjornes
9 * \author Abdelrazak Younes
11 * Full author contact details are available in file CREDITS.
17 // Must be here because of moc.
20 #include "frontends/LyXView.h"
21 #include "funcrequest.h"
23 #include <QMainWindow>
26 #include <QCloseEvent>
39 QWidget* mainWindow();
42 * QtView - Qt implementation of LyXView
44 * Qt-private implementation of the main LyX window.
46 class QtView : public QMainWindow, public LyXView {
49 /// create a main window of the given dimensions
50 QtView(unsigned int w, unsigned int h, bool maximize);
54 /// show - display the top-level window
58 virtual void busy(bool) const;
60 /// display a status message
61 virtual void message(std::string const & str);
63 /// clear status message
64 virtual void clearMessage();
66 /// add the command buffer
67 void addCommandBuffer(QToolBar * toolbar);
69 /// menu item has been selected
70 void activated(FuncRequest const &);
72 // returns true if this view has the focus.
73 virtual bool hasFocus() const;
75 static QMainWindow* mainWidget();
79 void update_view_state_qt();
81 /// populate a toplevel menu and all its children on demand
82 void updateMenu(QAction *);
85 /// make sure we quit cleanly
86 virtual void closeEvent(QCloseEvent * e);
88 /// focus the command buffer widget
89 void focus_command_widget();
92 void update_view_state();
95 * setWindowTitle - set title of window
96 * @param t main window title
97 * @param it iconified (short) title
99 virtual void setWindowTitle(std::string const & t, std::string const & it);
101 QTimer statusbar_timer_;
104 QCommandBuffer * commandbuffer_;
107 static QMainWindow* mainWidget_;
110 } // namespace frontend