VirtualBox

Changeset 63950 in vbox for trunk


Ignore:
Timestamp:
Sep 22, 2016 2:07:30 PM (8 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:6899: Accessibility support (step 51): Selector UI: Doxy for UIVMDesktop.

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  
    2929/* GUI includes */
    3030# include "QIWithRetranslateUI.h"
    31 # include "UIBar.h"
    32 # include "UIIconPool.h"
    3331# include "UIVMDesktop.h"
    34 # include "UIVMItem.h"
    35 # include "UIToolBar.h"
    3632# include "VBoxUtils.h"
    3733
     
    4238
    4339
    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. */
    4544class UIVMDesktopPrivate : public QIWithRetranslateUI<QStackedWidget>
    4645{
     
    4948public:
    5049
    51     /* Constructor: */
     50    /** Constructs private desktop pane passing @a pParent to the base-class.
     51      * @param  pRefreshAction  Brings the refresh action reference. */
    5252    UIVMDesktopPrivate(QWidget *pParent, QAction *pRefreshAction);
    5353
    54     /* API: Pane text setters stuff: */
     54    /** Assigns @a strText and switches to text pane. */
    5555    void setText(const QString &strText);
     56    /** Assigns @a strError and switches to error pane. */
    5657    void setError(const QString &strError);
    5758
     59protected:
     60
     61    /** Handles translation event. */
     62    void retranslateUi();
     63
     64    /** Prepares text pane. */
     65    void prepareTextPane();
     66    /** Prepares error pane. */
     67    void prepareErrorPane();
     68
    5869private:
    5970
    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. */
    6872    QRichTextBrowser *m_pText;
    6973
    70     /* Error pane stuff: */
     74    /** Holds the error pane container. */
    7175    QWidget *m_pErrBox;
     76    /** Holds the error label instance. */
    7277    QLabel *m_pErrLabel;
     78    /** Holds the error text-browser instance. */
    7379    QTextBrowser *m_pErrText;
     80    /** Holds the VM refresh button instance. */
    7481    QToolButton *m_pRefreshButton;
     82    /** Holds the VM refresh action reference. */
    7583    QAction *m_pRefreshAction;
    7684};
     85
     86
     87/*********************************************************************************************************************************
     88*   Class UIVMDesktopPrivate implementation.                                                                                     *
     89*********************************************************************************************************************************/
    7790
    7891UIVMDesktopPrivate::UIVMDesktopPrivate(QWidget *pParent, QAction *pRefreshAction)
     
    175188    pMainLayout->addWidget(m_pErrLabel);
    176189
    177     /* Create error text browser: */
     190    /* Create error text-browser: */
    178191    m_pErrText = new QTextBrowser(m_pErrBox);
    179192    m_pErrText->setFocusPolicy(Qt::StrongFocus);
     
    207220}
    208221
     222
     223/*********************************************************************************************************************************
     224*   Class UIVMDesktop implementation.                                                                                            *
     225*********************************************************************************************************************************/
     226
    209227UIVMDesktop::UIVMDesktop(QAction *pRefreshAction, QWidget *pParent)
    210228    : QWidget(pParent)
     
    217235    m_pDesktopPrivate = new UIVMDesktopPrivate(this, pRefreshAction);
    218236
    219     /* Add the pages: */
     237    /* Add it to the layout: */
    220238    pMainLayout->addWidget(m_pDesktopPrivate);
    221239}
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/UIVMDesktop.h

    r63947 r63950  
    11/* $Id$ */
    22/** @file
    3  *
    4  * VBox frontends: Qt GUI ("VirtualBox"):
    5  * UIVMDesktop class declarations
     3 * VBox Qt GUI - UIVMDesktop class declaration.
    64 */
    75
     
    1816 */
    1917
    20 #ifndef __UIVMDesktop_h__
    21 #define __UIVMDesktop_h__
     18#ifndef ___UIVMDesktop_h___
     19#define ___UIVMDesktop_h___
    2220
    2321/* Qt includes: */
     
    2523
    2624/* Forward declarations: */
    27 class CMachine;
    2825class UIVMDesktopPrivate;
    29 class UIVMItem;
    30 class UIToolBar;
    31 class QStackedLayout;
    3226
    33 /* Class representing widget which contains three panes:
    34  * 1. Information pane reflecting base information about VirtualBox,
    35  * 2. Inaccessible machine pane reflecting information about
    36  *    currently chosen inaccessible VM and allowing to operate over it,
    37  * 3. Snapshot pane allowing to operate over the snapshots. */
    38 class UIVMDesktop: public QWidget
     27
     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. */
     32class UIVMDesktop : public QWidget
    3933{
    4034    Q_OBJECT;
     
    4236public:
    4337
    44     /* Constructor: */
     38    /** Constructs desktop pane passing @a pParent to the base-class.
     39      * @param  pRefreshAction  Brings the refresh action reference. */
    4540    UIVMDesktop(QAction *pRefreshAction, QWidget *pParent);
    4641
    47     /* Helpers: Update stuff: */
     42    /** Updates @a strText details and switches to text details pane. */
    4843    void updateDetailsText(const QString &strText);
     44    /** Updates @a strError details and switches to error details pane. */
    4945    void updateDetailsError(const QString &strError);
    5046
    5147private:
    5248
    53     /* Variables: */
     49    /** Holds the private desktop pane instance. */
    5450    UIVMDesktopPrivate *m_pDesktopPrivate;
    5551};
    5652
    57 #endif /* !__UIVMDesktop_h__ */
     53#endif /* !___UIVMDesktop_h___ */
    5854
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette