VirtualBox

Ignore:
Timestamp:
May 20, 2014 12:25:16 PM (11 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
93783
Message:

FE/Qt: Runtime UI: UIVMInfoDialog: Doxygen stuff mostly.

Location:
trunk/src/VBox/Frontends/VirtualBox/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/UIVMInfoDialog.cpp

    r51304 r51305  
    11/* $Id$ */
    22/** @file
    3  *
    4  * VBox frontends: Qt4 GUI ("VirtualBox"):
    5  * UIVMInfoDialog class implementation
     3 * VBox Qt GUI - UIVMInfoDialog class implementation.
    64 */
    75
    86/*
    9  * Copyright (C) 2006-2012 Oracle Corporation
     7 * Copyright (C) 2006-2014 Oracle Corporation
    108 *
    119 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    7674    : QIWithRetranslateUI<QMainWindow>(0)
    7775    , m_pPseudoParentWidget(pMachineWindow)
     76    , mIsPolished (false)
     77    , mWidth(0), mHeight(0), mMax(false)
    7878    , mSession (pMachineWindow->session())
    79     , mIsPolished (false)
    8079    , mStatTimer (new QTimer (this))
    8180{
  • trunk/src/VBox/Frontends/VirtualBox/src/UIVMInfoDialog.h

    r51304 r51305  
    11/** @file
    2  *
    3  * VBox frontends: Qt4 GUI ("VirtualBox"):
    4  * UIVMInfoDialog class declaration
     2 * VBox Qt GUI - UIVMInfoDialog class declaration.
    53 */
    64
    75/*
    8  * Copyright (C) 2006-2012 Oracle Corporation
     6 * Copyright (C) 2006-2014 Oracle Corporation
    97 *
    108 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    1715 */
    1816
    19 #ifndef __VBoxVMInformationDlg_h__
    20 #define __VBoxVMInformationDlg_h__
     17#ifndef ___UIVMInfoDialog_h___
     18#define ___UIVMInfoDialog_h___
    2119
    2220/* Qt includes: */
     
    2422
    2523/* GUI includes: */
     24#include "QIWithRetranslateUI.h"
    2625#include "UIVMInfoDialog.gen.h"
    27 #include "QIWithRetranslateUI.h"
    2826
    2927/* COM includes: */
     
    3129#include "CSession.h"
    3230
     31/* Forward declarations: */
    3332class UIMachineWindow;
    3433class QTimer;
    3534
     35/** QMainWindow based dialog providing user with VM details and statistics. */
    3636class UIVMInfoDialog : public QIWithRetranslateUI<QMainWindow>, public Ui::UIVMInfoDialog
    3737{
     
    4040public:
    4141
    42     typedef QMap <QString, QString> DataMapType;
    43     typedef QMap <QString, QStringList> LinksMapType;
    44     struct CounterElementType { QString type; DataMapType list; };
     42    /** Instance pointer map. */
    4543    typedef QMap <QString, UIVMInfoDialog*> InfoDlgMap;
    4644
     45    /** VM statistics counter data map. */
     46    typedef QMap <QString, QString> DataMapType;
     47    /** VM statistics counter links map. */
     48    typedef QMap <QString, QStringList> LinksMapType;
     49    /** VM statistics counter struct. */
     50    struct CounterElementType { QString type; DataMapType list; };
     51
     52    /** Factory function to create information-dialog for passed @a pMachineWindow. */
    4753    static void createInformationDlg(UIMachineWindow *pMachineWindow);
    4854
    4955protected:
    5056
     57    /** Information dialog constructor. */
    5158    UIVMInfoDialog(UIMachineWindow *pMachineWindow);
    52    ~UIVMInfoDialog();
     59    /** Information dialog destructor. */
     60    ~UIVMInfoDialog();
    5361
     62    /** Translation handler. */
    5463    void retranslateUi();
    5564
     65    /** Common event-handler. */
    5666    virtual bool event (QEvent *aEvent);
     67    /** Resize event-handler. */
    5768    virtual void resizeEvent (QResizeEvent *aEvent);
     69    /** Show event-handler. */
    5870    virtual void showEvent (QShowEvent *aEvent);
    5971
    6072private slots:
    6173
     74    /** Slot to update general VM details. */
    6275    void updateDetails();
     76    /** Slot to update runtime VM statistics. */
    6377    void processStatistics();
     78    /** Slot to handle tab-widget page change. */
    6479    void onPageChanged (int aIndex);
    6580
    6681private:
    6782
     83    /** Helper to parse passed VM statistics @a aText. */
    6884    QString parseStatistics (const QString &aText);
     85    /** Helper to re-acquire whole VM statistics. */
    6986    void refreshStatistics();
    7087
     88    /** Helper to format common VM statistics value. */
    7189    QString formatValue (const QString &aValueName, const QString &aValue, int aMaxSize);
     90    /** Helper to format VM storage-medium statistics value. */
    7291    QString formatMedium (const QString &aCtrName, LONG aPort, LONG aDevice, const QString &aBelongsTo);
     92    /** Helper to format VM network-adapter statistics value. */
    7393    QString formatAdapter (ULONG aSlot, const QString &aBelongsTo);
    7494
     95    /** Helper to compose user-oriented article. */
    7596    QString composeArticle (const QString &aBelongsTo, int aSpacesCount = 0);
    7697
     98    /** @name General variables.
     99     * @{ */
     100    /** Dialog instance array. */
    77101    static InfoDlgMap  mSelfArray;
     102    /** Widget to center dialog according. */
     103    QWidget           *m_pPseudoParentWidget;
     104    /** Whether dialog was polished. */
     105    bool               mIsPolished;
     106    /** @} */
    78107
    79     /** Widget to center UIMediumManager according. */
    80     QWidget           *m_pPseudoParentWidget;
     108    /** @name Geometry variables.
     109     * @{ */
     110    /** Current dialog width. */
     111    int                mWidth;
     112    /** Current dialog height. */
     113    int                mHeight;
     114    /** Whether dialog maximized. */
     115    bool               mMax;
     116    /** @} */
    81117
     118    /** @name VM details/statistics variables.
     119     * @{ */
     120    /** Session to acquire VM details/statistics from. */
    82121    CSession           mSession;
    83     bool               mIsPolished;
     122    /** VM statistics update timer. */
    84123    QTimer            *mStatTimer;
    85 
    86     int                mWidth;
    87     int                mHeight;
    88     bool               mMax;
    89 
     124    /** VM statistics counter names. */
    90125    DataMapType        mNamesMap;
     126    /** VM statistics counter values. */
    91127    DataMapType        mValuesMap;
     128    /** VM statistics counter units. */
    92129    DataMapType        mUnitsMap;
     130    /** VM statistics counter links. */
    93131    LinksMapType       mLinksMap;
     132    /** @} */
    94133};
    95134
    96 #endif // __VBoxVMInformationDlg_h__
    97 
     135#endif /* !___UIVMInfoDialog_h___ */
Note: See TracChangeset for help on using the changeset viewer.

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