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>
37 QWidget* mainWindow();
40 * GuiView - Qt4 implementation of LyXView
42 * qt4-private implementation of the main LyX window.
44 * Note: any QObject emits a destroyed(QObject *) Qt signal when it
45 * is deleted.This might be useful for closing other dialogs
46 * depending on a given GuiView.
48 class GuiView : public QMainWindow, public LyXView {
51 /// create a main window of the given dimensions
58 virtual void setGeometry(
63 virtual void saveGeometry();
64 virtual void busy(bool);
65 Toolbars::ToolbarPtr makeToolbar(ToolbarBackend::Toolbar const & tbb);
66 virtual void updateStatusBar();
67 virtual void message(lyx::docstring const & str);
68 virtual void clearMessage();
69 virtual bool hasFocus() const;
71 virtual void updateTab();
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 &);
82 void initTab(QWidget* workArea);
84 QMenu* createPopupMenu();
91 void update_view_state_qt();
93 /// populate a toplevel menu and all its children on demand
94 void updateMenu(QAction *);
96 void currentTabChanged (int index);
99 /// make sure we quit cleanly
100 virtual void closeEvent(QCloseEvent * e);
103 virtual void resizeEvent(QResizeEvent * e);
106 virtual void moveEvent(QMoveEvent * e);
109 /// focus the command buffer widget
110 void focus_command_widget();
113 * setWindowTitle - set title of window
114 * @param t main window title
115 * @param it iconified (short) title
117 virtual void setWindowTitle(lyx::docstring const & t, lyx::docstring const & it);
119 QTimer statusbar_timer_;
122 QCommandBuffer * commandbuffer_;
125 void updateFloatingGeometry();
127 QRect floatingGeometry_;
129 struct GuiViewPrivate;
133 } // namespace frontend