Changeset 62216 in vbox
- Timestamp:
- Jul 13, 2016 11:40:39 AM (9 years ago)
- svn:sync-xref-src-repo-rev:
- 108726
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/extensions
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIDialog.cpp
r61241 r62216 5 5 6 6 /* 7 * Copyright (C) 2008-201 3Oracle Corporation7 * Copyright (C) 2008-2016 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 31 31 , m_fPolished(false) 32 32 { 33 /* No need tocount that window as important for application,33 /* Do not count that window as important for application, 34 34 * it will NOT be taken into account when other top-level windows will be closed: */ 35 35 setAttribute(Qt::WA_QuitOnClose, false); … … 121 121 } 122 122 123 void QIDialog::polishEvent(QShowEvent *)123 void QIDialog::polishEvent(QShowEvent *) 124 124 { 125 125 /* Make sure layout is polished: */ -
trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIDialog.h
r61241 r62216 5 5 6 6 /* 7 * Copyright (C) 2008-201 3Oracle Corporation7 * Copyright (C) 2008-2016 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 16 16 */ 17 17 18 #ifndef __ QIDialog_h__19 #define __ QIDialog_h__18 #ifndef ___QIDialog_h___ 19 #define ___QIDialog_h___ 20 20 21 21 /* Qt includes: */ … … 26 26 class QEventLoop; 27 27 28 /* Qt dialog extension: */ 29 class QIDialog: public QDialog 28 29 /** QDialog extension providing the GUI with 30 * the advanced capabilities like delayed show. */ 31 class QIDialog : public QDialog 30 32 { 31 33 Q_OBJECT; … … 33 35 public: 34 36 35 /* Constructor/destructor:*/37 /** Constructs the dialog passing @a pParent and @a flags to the base-class. */ 36 38 QIDialog(QWidget *pParent = 0, Qt::WindowFlags flags = 0); 39 /** Destructs the dialog. */ 37 40 ~QIDialog(); 38 41 39 /* API: Visibility stuff:*/42 /** Defines whether the dialog is @a fVisible. */ 40 43 void setVisible(bool fVisible); 41 44 42 45 public slots: 43 46 44 /** Shows the dialog as a modal dialog, blocking until the user closes it.47 /** Shows the dialog as a modal one, blocking until the user closes it. 45 48 * @param fShow detemines whether the dialog should be shown instantly. 46 49 * @param fApplicationModal determine whether the dialog should be application-modal. */ 47 50 virtual int execute(bool fShow = true, bool fApplicationModal = false); 48 51 49 /** Shows the dialog as a modal dialog, blocking until the user closes it.52 /** Shows the dialog as a modal one, blocking until the user closes it. 50 53 * @note Provided for compatibility with various Qt versions. */ 51 54 virtual int exec() /* overload for Qt4, override for Qt5 */ { return execute(); } … … 53 56 protected: 54 57 55 /* Handler: Show-event stuff:*/58 /** Handles show @a pEvent. */ 56 59 void showEvent(QShowEvent *pEvent); 57 58 /* Handler: Polish-event stuff: */ 60 /** Handles show @a pEvent sent for the first time. */ 59 61 virtual void polishEvent(QShowEvent *pEvent); 60 62 61 63 private: 62 64 63 /* Variables:*/65 /** Holds whether the dialog is polished. */ 64 66 bool m_fPolished; 67 68 /** Holds the separate event-loop instance. 69 * @note This event-loop is only used when the dialog being executed via the execute() 70 * functionality, allowing for the delayed show and advanced modality flag. */ 65 71 QPointer<QEventLoop> m_pEventLoop; 66 72 }; 67 73 74 /** Safe pointer to the QIDialog class. */ 68 75 typedef QPointer<QIDialog> UISafePointerDialog; 69 76 70 #endif /* __QIDialog_h__ */77 #endif /* !___QIDialog_h___ */ 71 78
Note:
See TracChangeset
for help on using the changeset viewer.