Changeset 71515 in vbox for trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupPaneMessage.h
- Timestamp:
- Mar 26, 2018 2:32:57 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupPaneMessage.h
r69500 r71515 5 5 6 6 /* 7 * Copyright (C) 2013-201 7Oracle Corporation7 * Copyright (C) 2013-2018 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 26 26 class UIAnimation; 27 27 28 /* Popup-pane text-pane prototype class:*/28 /** QWidget extension providing GUI with popup-pane message-pane prototype class. */ 29 29 class UIPopupPaneMessage : public QWidget 30 30 { … … 36 36 signals: 37 37 38 /* Notifiers: Parent propagation stuff:*/38 /** Notifies about focus enter. */ 39 39 void sigFocusEnter(); 40 /** Notifies about focus enter. */ 40 41 void sigFocusLeave(); 41 42 42 /* Notifier: Layout stuff:*/43 /** Notifies about size-hint change. */ 43 44 void sigSizeHintChanged(); 44 45 45 46 public: 46 47 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. */ 48 51 UIPopupPaneMessage(QWidget *pParent, const QString &strText, bool fFocused); 49 52 50 /* API: Text stuff:*/53 /** Defines the message @a strText. */ 51 54 void setText(const QString &strText); 52 55 53 /* API: Layout stuff:*/56 /** Returns the message minimum size-hint. */ 54 57 QSize minimumSizeHint() const; 58 /** Defines the message @a minimumSizeHint. */ 55 59 void setMinimumSizeHint(const QSize &minimumSizeHint); 60 /** Lays the content out. */ 56 61 void layoutContent(); 57 62 58 /* Property: Focus stuff:*/63 /** Returns the collapsed size-hint. */ 59 64 QSize collapsedSizeHint() const { return m_collapsedSizeHint; } 65 /** Returns the expanded size-hint. */ 60 66 QSize expandedSizeHint() const { return m_expandedSizeHint; } 61 67 62 68 private slots: 63 69 64 /* Handler: Layout stuff:*/70 /** Handles proposal for @a iWidth. */ 65 71 void sltHandleProposalForWidth(int iWidth); 66 72 67 /* Handlers: Focus stuff:*/73 /** Handles focus enter. */ 68 74 void sltFocusEnter(); 75 /** Handles focus leave. */ 69 76 void sltFocusLeave(); 70 77 71 78 private: 72 79 73 /* Helpers: Prepare stuff:*/80 /** Prepares all. */ 74 81 void prepare(); 82 /** Prepares content. */ 75 83 void prepareContent(); 84 /** Prepares animations. */ 76 85 void prepareAnimation(); 77 86 78 /* Helper: Layout stuff:*/87 /** Updates size-hint. */ 79 88 void updateSizeHint(); 80 89 81 /* Static helper: Font stuff:*/90 /** Adjusts @a font. */ 82 91 static QFont tuneFont(QFont font); 83 92 84 /* Variables: Layout stuff:*/93 /** Holds the layout margin. */ 85 94 const int m_iLayoutMargin; 95 /** Holds the layout spacing. */ 86 96 const int m_iLayoutSpacing; 97 98 /** Holds the label size-hint. */ 87 99 QSize m_labelSizeHint; 100 /** Holds the collapsed size-hint. */ 88 101 QSize m_collapsedSizeHint; 102 /** Holds the expanded size-hint. */ 89 103 QSize m_expandedSizeHint; 104 /** Holds the minimum size-hint. */ 90 105 QSize m_minimumSizeHint; 91 106 92 /* Variables: Widget stuff:*/107 /** Holds the text. */ 93 108 QString m_strText; 109 110 /** Holds the label instance. */ 94 111 QLabel *m_pLabel; 112 113 /** Holds the desired label width. */ 95 114 int m_iDesiredLabelWidth; 96 115 97 /* Variables: Focus stuff:*/116 /** Holds whether message-pane is focused. */ 98 117 bool m_fFocused; 118 119 /** Holds the animation instance. */ 99 120 UIAnimation *m_pAnimation; 100 121 };
Note:
See TracChangeset
for help on using the changeset viewer.