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 * Note: any QObject emits a destroyed(QObject *) Qt signal when it
47 * is deleted.This might be useful for closing other dialogs
48 * depending on a given GuiView.
50 class GuiView : public QMainWindow, public LyXView {
53 /// create a main window of the given dimensions
60 virtual void setGeometry(
65 virtual void saveGeometry();
66 virtual void busy(bool);
67 Toolbars::ToolbarPtr makeToolbar(ToolbarBackend::Toolbar const & tbb);
68 virtual void updateStatusBar();
69 virtual void message(lyx::docstring const & str);
70 virtual void clearMessage();
71 virtual bool hasFocus() const;
73 /// show - display the top-level window
76 /// add the command buffer
77 void addCommandBuffer(QToolBar * toolbar);
79 /// menu item has been selected
80 void activated(FuncRequest const &);
88 void update_view_state_qt();
90 /// populate a toplevel menu and all its children on demand
91 void updateMenu(QAction *);
94 /// make sure we quit cleanly
95 virtual void closeEvent(QCloseEvent * e);
98 virtual void resizeEvent(QResizeEvent * e);
101 virtual void moveEvent(QMoveEvent * e);
104 /// focus the command buffer widget
105 void focus_command_widget();
108 * setWindowTitle - set title of window
109 * @param t main window title
110 * @param it iconified (short) title
112 virtual void setWindowTitle(lyx::docstring const & t, lyx::docstring const & it);
114 QTimer statusbar_timer_;
117 QCommandBuffer * commandbuffer_;
120 void updateFloatingGeometry();
122 QRect floatingGeometry_;
125 } // namespace frontend