Go to the
documentation of this file.
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042 #ifndef QMDISUBWINDOW_H
00043 #define QMDISUBWINDOW_H
00044
00045 #include <QtGui/qwidget.h>
00046
00047 QT_BEGIN_HEADER
00048
00049 QT_BEGIN_NAMESPACE
00050
00051 QT_MODULE(Gui)
00052
00053 #ifndef QT_NO_MDIAREA
00054
00055 class QMenu;
00056 class QMdiArea;
00057
00058 namespace QMdi { class ControlContainer; }
00059 class QMdiSubWindowPrivate;
00060 class Q_GUI_EXPORT QMdiSubWindow : public QWidget
00061 {
00062 Q_OBJECT
00063 Q_PROPERTY(int keyboardSingleStep READ keyboardSingleStep WRITE setKeyboardSingleStep)
00064 Q_PROPERTY(int keyboardPageStep READ keyboardPageStep WRITE setKeyboardPageStep)
00065 public:
00066 enum SubWindowOption {
00067 AllowOutsideAreaHorizontally = 0x1,
00068 AllowOutsideAreaVertically = 0x2,
00069 RubberBandResize = 0x4,
00070 RubberBandMove = 0x8
00071 };
00072 Q_DECLARE_FLAGS(SubWindowOptions, SubWindowOption)
00073
00074 QMdiSubWindow(QWidget *parent = 0, Qt::WindowFlags flags = 0);
00075 ~QMdiSubWindow();
00076
00077 QSize sizeHint() const;
00078 QSize minimumSizeHint() const;
00079
00080 void setWidget(QWidget *widget);
00081 QWidget *widget() const;
00082
00083 QWidget *maximizedButtonsWidget() const;
00084 QWidget *maximizedSystemMenuIconWidget() const;
00085
00086 bool isShaded() const;
00087
00088 void setOption(SubWindowOption option, bool on = true);
00089 bool testOption(SubWindowOption) const;
00090
00091 void setKeyboardSingleStep(int step);
00092 int keyboardSingleStep() const;
00093
00094 void setKeyboardPageStep(int step);
00095 int keyboardPageStep() const;
00096
00097 #ifndef QT_NO_MENU
00098 void setSystemMenu(QMenu *systemMenu);
00099 QMenu *systemMenu() const;
00100 #endif
00101
00102 QMdiArea *mdiArea() const;
00103
00104 Q_SIGNALS:
00105 void windowStateChanged(Qt::WindowStates oldState, Qt::WindowStates newState);
00106 void aboutToActivate();
00107
00108 public Q_SLOTS:
00109 #ifndef QT_NO_MENU
00110 void showSystemMenu();
00111 #endif
00112 void showShaded();
00113
00114 protected:
00115 bool eventFilter(QObject *object, QEvent *event);
00116 bool event(QEvent *event);
00117 void showEvent(QShowEvent *showEvent);
00118 void hideEvent(QHideEvent *hideEvent);
00119 void changeEvent(QEvent *changeEvent);
00120 void closeEvent(QCloseEvent *closeEvent);
00121 void leaveEvent(QEvent *leaveEvent);
00122 void resizeEvent(QResizeEvent *resizeEvent);
00123 void timerEvent(QTimerEvent *timerEvent);
00124 void moveEvent(QMoveEvent *moveEvent);
00125 void paintEvent(QPaintEvent *paintEvent);
00126 void mousePressEvent(QMouseEvent *mouseEvent);
00127 void mouseDoubleClickEvent(QMouseEvent *mouseEvent);
00128 void mouseReleaseEvent(QMouseEvent *mouseEvent);
00129 void mouseMoveEvent(QMouseEvent *mouseEvent);
00130 void keyPressEvent(QKeyEvent *keyEvent);
00131 #ifndef QT_NO_CONTEXTMENU
00132 void contextMenuEvent(QContextMenuEvent *contextMenuEvent);
00133 #endif
00134 void focusInEvent(QFocusEvent *focusInEvent);
00135 void focusOutEvent(QFocusEvent *focusOutEvent);
00136 void childEvent(QChildEvent *childEvent);
00137
00138 private:
00139 Q_DISABLE_COPY(QMdiSubWindow)
00140 Q_DECLARE_PRIVATE(QMdiSubWindow)
00141 Q_PRIVATE_SLOT(d_func(), void _q_updateStaysOnTopHint())
00142 Q_PRIVATE_SLOT(d_func(), void _q_enterInteractiveMode())
00143 Q_PRIVATE_SLOT(d_func(), void _q_processFocusChanged(QWidget *, QWidget *))
00144 friend class QMdiAreaPrivate;
00145 #ifndef QT_NO_TABBAR
00146 friend class QMdiAreaTabBar;
00147 #endif
00148 friend class QMdi::ControlContainer;
00149 };
00150
00151 Q_DECLARE_OPERATORS_FOR_FLAGS(QMdiSubWindow::SubWindowOptions)
00152
00153 QT_END_NAMESPACE
00154
00155 QT_END_HEADER
00156
00157 #endif // QT_NO_MDIAREA
00158
00159 #endif // QMDISUBWINDOW_H