- Timestamp:
- Sep 22, 2016 2:07:30 PM (8 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/selector
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/selector/UIVMDesktop.cpp
r63947 r63950 29 29 /* GUI includes */ 30 30 # include "QIWithRetranslateUI.h" 31 # include "UIBar.h"32 # include "UIIconPool.h"33 31 # include "UIVMDesktop.h" 34 # include "UIVMItem.h"35 # include "UIToolBar.h"36 32 # include "VBoxUtils.h" 37 33 … … 42 38 43 39 44 /* Container to store VM desktop panes. */ 40 /** QStackedWidget subclass representing container which have two panes: 41 * 1. Text pane reflecting base information about VirtualBox, 42 * 2. Error pane reflecting information about currently chosen 43 * inaccessible VM and allowing to operate over it. */ 45 44 class UIVMDesktopPrivate : public QIWithRetranslateUI<QStackedWidget> 46 45 { … … 49 48 public: 50 49 51 /* Constructor: */ 50 /** Constructs private desktop pane passing @a pParent to the base-class. 51 * @param pRefreshAction Brings the refresh action reference. */ 52 52 UIVMDesktopPrivate(QWidget *pParent, QAction *pRefreshAction); 53 53 54 /* API: Pane text setters stuff:*/54 /** Assigns @a strText and switches to text pane. */ 55 55 void setText(const QString &strText); 56 /** Assigns @a strError and switches to error pane. */ 56 57 void setError(const QString &strError); 57 58 59 protected: 60 61 /** Handles translation event. */ 62 void retranslateUi(); 63 64 /** Prepares text pane. */ 65 void prepareTextPane(); 66 /** Prepares error pane. */ 67 void prepareErrorPane(); 68 58 69 private: 59 70 60 /* Helper: Translate stuff: */ 61 void retranslateUi(); 62 63 /* Helpers: Prepare stuff: */ 64 void prepareTextPane(); 65 void prepareErrorPane(); 66 67 /* Text pane stuff: */ 71 /** Holds the text pane instance. */ 68 72 QRichTextBrowser *m_pText; 69 73 70 /* Error pane stuff:*/74 /** Holds the error pane container. */ 71 75 QWidget *m_pErrBox; 76 /** Holds the error label instance. */ 72 77 QLabel *m_pErrLabel; 78 /** Holds the error text-browser instance. */ 73 79 QTextBrowser *m_pErrText; 80 /** Holds the VM refresh button instance. */ 74 81 QToolButton *m_pRefreshButton; 82 /** Holds the VM refresh action reference. */ 75 83 QAction *m_pRefreshAction; 76 84 }; 85 86 87 /********************************************************************************************************************************* 88 * Class UIVMDesktopPrivate implementation. * 89 *********************************************************************************************************************************/ 77 90 78 91 UIVMDesktopPrivate::UIVMDesktopPrivate(QWidget *pParent, QAction *pRefreshAction) … … 175 188 pMainLayout->addWidget(m_pErrLabel); 176 189 177 /* Create error text 190 /* Create error text-browser: */ 178 191 m_pErrText = new QTextBrowser(m_pErrBox); 179 192 m_pErrText->setFocusPolicy(Qt::StrongFocus); … … 207 220 } 208 221 222 223 /********************************************************************************************************************************* 224 * Class UIVMDesktop implementation. * 225 *********************************************************************************************************************************/ 226 209 227 UIVMDesktop::UIVMDesktop(QAction *pRefreshAction, QWidget *pParent) 210 228 : QWidget(pParent) … … 217 235 m_pDesktopPrivate = new UIVMDesktopPrivate(this, pRefreshAction); 218 236 219 /* Add the pages: */237 /* Add it to the layout: */ 220 238 pMainLayout->addWidget(m_pDesktopPrivate); 221 239 } -
trunk/src/VBox/Frontends/VirtualBox/src/selector/UIVMDesktop.h
r63947 r63950 1 1 /* $Id$ */ 2 2 /** @file 3 * 4 * VBox frontends: Qt GUI ("VirtualBox"): 5 * UIVMDesktop class declarations 3 * VBox Qt GUI - UIVMDesktop class declaration. 6 4 */ 7 5 … … 18 16 */ 19 17 20 #ifndef __ UIVMDesktop_h__21 #define __ UIVMDesktop_h__18 #ifndef ___UIVMDesktop_h___ 19 #define ___UIVMDesktop_h___ 22 20 23 21 /* Qt includes: */ … … 25 23 26 24 /* Forward declarations: */ 27 class CMachine;28 25 class UIVMDesktopPrivate; 29 class UIVMItem;30 class UIToolBar;31 class QStackedLayout;32 26 33 /* Class representing widget which contains three panes: 34 * 1. Information pane reflecting base information about VirtualBox, 35 * 2. Inaccessible machine pane reflecting information about36 * currently chosen inaccessible VM and allowing to operate over it,37 * 3. Snapshot pane allowing to operate over the snapshots. */38 class UIVMDesktop : public QWidget27 28 /** QWidget subclass representing container which have two panes: 29 * 1. Text details pane reflecting base information about VirtualBox, 30 * 2. Error details pane reflecting information about currently chosen 31 * inaccessible VM and allowing to operate over it. */ 32 class UIVMDesktop : public QWidget 39 33 { 40 34 Q_OBJECT; … … 42 36 public: 43 37 44 /* Constructor: */ 38 /** Constructs desktop pane passing @a pParent to the base-class. 39 * @param pRefreshAction Brings the refresh action reference. */ 45 40 UIVMDesktop(QAction *pRefreshAction, QWidget *pParent); 46 41 47 /* Helpers: Update stuff:*/42 /** Updates @a strText details and switches to text details pane. */ 48 43 void updateDetailsText(const QString &strText); 44 /** Updates @a strError details and switches to error details pane. */ 49 45 void updateDetailsError(const QString &strError); 50 46 51 47 private: 52 48 53 /* Variables:*/49 /** Holds the private desktop pane instance. */ 54 50 UIVMDesktopPrivate *m_pDesktopPrivate; 55 51 }; 56 52 57 #endif /* !__ UIVMDesktop_h__ */53 #endif /* !___UIVMDesktop_h___ */ 58 54
Note:
See TracChangeset
for help on using the changeset viewer.