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 * GuiView - Qt4 implementation of LyXView
44 * qt4-private implementation of the main LyX window.
46 class GuiView : public QMainWindow, public LyXView {
49 /// create a main window of the given dimensions
54 /// initialize the object
57 /// show - display the top-level window
61 virtual void busy(bool) const;
63 /// display a status message
64 virtual void message(std::string const & str);
66 /// clear status message
67 virtual void clearMessage();
69 /// add the command buffer
70 void addCommandBuffer(QToolBar * toolbar);
72 /// menu item has been selected
73 void activated(FuncRequest const &);
75 /// returns true if this view has the focus.
76 virtual bool hasFocus() const;
79 static QMainWindow* mainWidget();
83 void update_view_state_qt();
85 /// populate a toplevel menu and all its children on demand
86 void updateMenu(QAction *);
89 /// make sure we quit cleanly
90 virtual void closeEvent(QCloseEvent * e);
93 virtual void resizeEvent(QResizeEvent * e);
96 virtual void moveEvent(QMoveEvent * e);
99 /// focus the command buffer widget
100 void focus_command_widget();
102 /// update status bar
103 void update_view_state();
106 * setWindowTitle - set title of window
107 * @param t main window title
108 * @param it iconified (short) title
110 virtual void setWindowTitle(std::string const & t, std::string const & it);
112 QTimer statusbar_timer_;
115 QCommandBuffer * commandbuffer_;
118 static QMainWindow* mainWidget_;
121 void updateFloatingGeometry();
123 QRect floatingGeometry_;
126 } // namespace frontend