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
10 * \author Peter Kümmel
12 * Full author contact details are available in file CREDITS.
18 // Must be here because of moc.
21 #include "frontends/LyXView.h"
22 #include "funcrequest.h"
24 #include <QMainWindow>
27 #include <QCloseEvent>
38 QWidget* mainWindow();
41 * GuiView - Qt4 implementation of LyXView
43 * qt4-private implementation of the main LyX window.
45 * Note: any QObject emits a destroyed(QObject *) Qt signal when it
46 * is deleted.This might be useful for closing other dialogs
47 * depending on a given GuiView.
49 class GuiView : public QMainWindow, public LyXView {
52 /// create a main window of the given dimensions
59 virtual void setGeometry(
64 unsigned int iconSizeXY,
65 const std::string & geometryArg);
66 virtual void saveGeometry();
67 virtual void busy(bool);
68 Toolbars::ToolbarPtr makeToolbar(ToolbarBackend::Toolbar const & tbb);
69 virtual void updateStatusBar();
70 virtual void message(lyx::docstring const & str);
71 virtual void clearMessage();
72 virtual bool hasFocus() const;
74 virtual void updateTab();
76 /// show - display the top-level window
79 /// add the command buffer
80 void addCommandBuffer(QToolBar * toolbar);
82 /// menu item has been selected
83 void activated(FuncRequest const &);
85 void initTab(QWidget* workArea);
87 QMenu* createPopupMenu();
94 void update_view_state_qt();
96 /// populate a toplevel menu and all its children on demand
97 void updateMenu(QAction *);
99 void currentTabChanged (int index);
101 /// slots to change the icon size
102 void smallSizedIcons();
103 void normalSizedIcons();
104 void bigSizedIcons();
107 /// make sure we quit cleanly
108 virtual void closeEvent(QCloseEvent * e);
111 virtual void resizeEvent(QResizeEvent * e);
114 virtual void moveEvent(QMoveEvent * e);
117 /// focus the command buffer widget
118 void focus_command_widget();
121 * setWindowTitle - set title of window
122 * @param t main window title
123 * @param it iconified (short) title
125 virtual void setWindowTitle(lyx::docstring const & t, lyx::docstring const & it);
127 QTimer statusbar_timer_;
130 QCommandBuffer * commandbuffer_;
133 void updateFloatingGeometry();
135 QRect floatingGeometry_;
137 void setIconSize(unsigned int size);
139 struct GuiViewPrivate;
143 } // namespace frontend