VirtualBox

Ignore:
Timestamp:
Mar 26, 2018 2:32:57 PM (7 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9049: Full and heavy cleanup for UIPopupPane Message & Details.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupPaneMessage.h

    r69500 r71515  
    55
    66/*
    7  * Copyright (C) 2013-2017 Oracle Corporation
     7 * Copyright (C) 2013-2018 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    2626class UIAnimation;
    2727
    28 /* Popup-pane text-pane prototype class: */
     28/** QWidget extension providing GUI with popup-pane message-pane prototype class. */
    2929class UIPopupPaneMessage : public QWidget
    3030{
     
    3636signals:
    3737
    38     /* Notifiers: Parent propagation stuff: */
     38    /** Notifies about focus enter. */
    3939    void sigFocusEnter();
     40    /** Notifies about focus enter. */
    4041    void sigFocusLeave();
    4142
    42     /* Notifier: Layout stuff: */
     43    /** Notifies about size-hint change. */
    4344    void sigSizeHintChanged();
    4445
    4546public:
    4647
    47     /* Constructor: */
     48    /** Constructs message-pane passing @a pParent to the base-class.
     49      * @param  strText   Brings the message text.
     50      * @param  fFcoused  Brings whether the pane is focused. */
    4851    UIPopupPaneMessage(QWidget *pParent, const QString &strText, bool fFocused);
    4952
    50     /* API: Text stuff: */
     53    /** Defines the message @a strText. */
    5154    void setText(const QString &strText);
    5255
    53     /* API: Layout stuff: */
     56    /** Returns the message minimum size-hint. */
    5457    QSize minimumSizeHint() const;
     58    /** Defines the message @a minimumSizeHint. */
    5559    void setMinimumSizeHint(const QSize &minimumSizeHint);
     60    /** Lays the content out. */
    5661    void layoutContent();
    5762
    58     /* Property: Focus stuff: */
     63    /** Returns the collapsed size-hint. */
    5964    QSize collapsedSizeHint() const { return m_collapsedSizeHint; }
     65    /** Returns the expanded size-hint. */
    6066    QSize expandedSizeHint() const { return m_expandedSizeHint; }
    6167
    6268private slots:
    6369
    64     /* Handler: Layout stuff: */
     70    /** Handles proposal for @a iWidth. */
    6571    void sltHandleProposalForWidth(int iWidth);
    6672
    67     /* Handlers: Focus stuff: */
     73    /** Handles focus enter. */
    6874    void sltFocusEnter();
     75    /** Handles focus leave. */
    6976    void sltFocusLeave();
    7077
    7178private:
    7279
    73     /* Helpers: Prepare stuff: */
     80    /** Prepares all. */
    7481    void prepare();
     82    /** Prepares content. */
    7583    void prepareContent();
     84    /** Prepares animations. */
    7685    void prepareAnimation();
    7786
    78     /* Helper: Layout stuff: */
     87    /** Updates size-hint. */
    7988    void updateSizeHint();
    8089
    81     /* Static helper: Font stuff: */
     90    /** Adjusts @a font. */
    8291    static QFont tuneFont(QFont font);
    8392
    84     /* Variables: Layout stuff: */
     93    /** Holds the layout margin. */
    8594    const int m_iLayoutMargin;
     95    /** Holds the layout spacing. */
    8696    const int m_iLayoutSpacing;
     97
     98    /** Holds the label size-hint. */
    8799    QSize m_labelSizeHint;
     100    /** Holds the collapsed size-hint. */
    88101    QSize m_collapsedSizeHint;
     102    /** Holds the expanded size-hint. */
    89103    QSize m_expandedSizeHint;
     104    /** Holds the minimum size-hint. */
    90105    QSize m_minimumSizeHint;
    91106
    92     /* Variables: Widget stuff: */
     107    /** Holds the text. */
    93108    QString m_strText;
     109
     110    /** Holds the label instance. */
    94111    QLabel *m_pLabel;
     112
     113    /** Holds the desired label width. */
    95114    int m_iDesiredLabelWidth;
    96115
    97     /* Variables: Focus stuff: */
     116    /** Holds whether message-pane is focused. */
    98117    bool m_fFocused;
     118
     119    /** Holds the animation instance. */
    99120    UIAnimation *m_pAnimation;
    100121};
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