Changeset 72245 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- May 17, 2018 1:37:11 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIVMNamePathSelector.cpp
r72240 r72245 43 43 const float UIVMNamePathSelector::s_fPathLabelWidthWeight = 0.65f; 44 44 45 46 /********************************************************************************************************************************* 47 * UIPathLabel definition. * 48 *********************************************************************************************************************************/ 49 /** A QLabel extension used to display long texts in a single line with ellipses (if necessary). The client passes 50 * a maximum width the label can have. If the original text is wider than it is compacted */ 45 51 class UIPathLabel : public QLabel 46 52 { … … 52 58 UIPathLabel(QWidget *parent = 0); 53 59 54 int maxWidth() const;60 int maxWidth() const; 55 61 void setMaxWidth(int width); 56 void setText(const QString &text) ;62 void setText(const QString &text) /* override */; 57 63 58 64 private: 59 65 60 /** Compact the text thisis not wider than maxWidth */66 /** Compact the text so that the label is not wider than maxWidth */ 61 67 void compactText(); 62 68 63 int m_maxWidth;69 int m_maxWidth; 64 70 QString m_strOriginalText; 65 71 }; 72 73 74 /********************************************************************************************************************************* 75 * UIPathLabel implemetation. * 76 *********************************************************************************************************************************/ 66 77 67 78 UIPathLabel::UIPathLabel(QWidget *parent /* = 0*/) … … 100 111 } 101 112 113 114 /********************************************************************************************************************************* 115 * UIVMNamePathSelector implemetation. * 116 *********************************************************************************************************************************/ 102 117 103 118 UIVMNamePathSelector::UIVMNamePathSelector(QWidget *pParent /* = 0 */)
Note:
See TracChangeset
for help on using the changeset viewer.