Changeset 71870 in vbox for trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIMainDialog.h
- Timestamp:
- Apr 17, 2018 11:25:31 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIMainDialog.h
r71027 r71870 1 1 /* $Id$ */ 2 2 /** @file 3 * VBox Qt GUI - Qt extensions: QIMainDialog class implementation.3 * VBox Qt GUI - Qt extensions: QIMainDialog class declaration. 4 4 */ 5 5 6 6 /* 7 * Copyright (C) 2008-201 7Oracle Corporation7 * Copyright (C) 2008-2018 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 20 20 21 21 /* Qt includes: */ 22 #include <QDialog> 22 23 #include <QMainWindow> 23 24 #include <QPointer> 24 #include <QDialog> 25 26 /* GUI includes: */ 27 #include "UILibraryDefs.h" 25 28 26 29 /* Forward declarations: */ … … 30 33 31 34 /** QDialog analog based on QMainWindow. */ 32 class QIMainDialog: public QMainWindow35 class SHARED_LIBRARY_STUFF QIMainDialog : public QMainWindow 33 36 { 34 37 Q_OBJECT; … … 36 39 public: 37 40 38 /** Constructor. 39 * @param pParent holds the parent widget passed to the base-class, 40 * @param enmFlags holds the cumulative window flags passed to the base-class, 41 * @param fIsAutoCentering defines whether this dialog should be centered according it's parent. */ 41 /** Constructs main-dialog passing @a pParent and @a fFlags to the base-class. 42 * @param fIsAutoCentering Brigs whether this dialog should be centered according it's parent. */ 42 43 QIMainDialog(QWidget *pParent = 0, 43 Qt::WindowFlags enmFlags = Qt::Dialog,44 Qt::WindowFlags fFlags = Qt::Dialog, 44 45 bool fIsAutoCentering = true); 45 46 … … 51 52 QDialog::DialogCode exec(bool fApplicationModal = true); 52 53 53 /** Returns dialog's default -button. */54 QPushButton *defaultButton() const;55 /** Defines dialog's default -button. */54 /** Returns dialog's default button. */ 55 QPushButton *defaultButton() const; 56 /** Defines dialog's default @a pButton. */ 56 57 void setDefaultButton(QPushButton *pButton); 57 58 … … 68 69 protected: 69 70 70 /** General event handler. */ 71 virtual bool event(QEvent *pEvent); 72 /** Show event handler. */ 73 virtual void showEvent(QShowEvent *pEvent); 74 /** Our own polish event handler. */ 71 /** Preprocesses any Qt @a pEvent for passed @a pObject. */ 72 virtual bool eventFilter(QObject *pObject, QEvent *pEvent) /* override */; 73 /** Handles any Qt @a pEvent. */ 74 virtual bool event(QEvent *pEvent) /* override */; 75 76 /** Handles show @a pEvent. */ 77 virtual void showEvent(QShowEvent *pEvent) /* override */; 78 /** Handles first show @a pEvent. */ 75 79 virtual void polishEvent(QShowEvent *pEvent); 76 /** Resize event handler. */77 virtual void resizeEvent(QResizeEvent *pEvent);78 /** Key-press event handler. */79 virtual void keyPressEvent(QKeyEvent *pEvent);80 /** General event filter. */81 virtual bool eventFilter(QObject *aObject, QEvent *pEvent);82 80 83 /** Function to search for dialog's default-button. */ 84 QPushButton* searchDefaultButton() const; 81 /** Handles resize @a pEvent. */ 82 virtual void resizeEvent(QResizeEvent *pEvent) /* override */; 83 84 /** Handles key-press @a pEvent. */ 85 virtual void keyPressEvent(QKeyEvent *pEvent) /* override */; 86 87 /** Searches for dialog's default button. */ 88 QPushButton *searchDefaultButton() const; 85 89 86 90 protected slots: … … 101 105 102 106 /** Holds whether this dialog should be centered according it's parent. */ 103 const bool m_fIsAutoCentering;107 const bool m_fIsAutoCentering; 104 108 /** Holds whether this dialog is polished. */ 105 bool m_fPolished;109 bool m_fPolished; 106 110 107 111 /** Holds modal dialog's result code. */ 108 QDialog::DialogCode m_enmResult;112 QDialog::DialogCode m_enmResult; 109 113 /** Holds modal dialog's event-loop. */ 110 QPointer<QEventLoop> m_pEventLoop;114 QPointer<QEventLoop> m_pEventLoop; 111 115 112 /** Holds dialog's default -button. */113 QPointer<QPushButton> m_pDefaultButton;116 /** Holds dialog's default button. */ 117 QPointer<QPushButton> m_pDefaultButton; 114 118 /** Holds dialog's size-grip. */ 115 QPointer<QSizeGrip> m_pSizeGrip;119 QPointer<QSizeGrip> m_pSizeGrip; 116 120 }; 117 121
Note:
See TracChangeset
for help on using the changeset viewer.