Changeset 105327 in vbox
- Timestamp:
- Jul 15, 2024 2:48:33 PM (5 months ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/extensions
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIStatusBarIndicator.cpp
r101561 r105327 5 5 6 6 /* 7 * Copyright (C) 2006-202 3Oracle and/or its affiliates.7 * Copyright (C) 2006-2024 Oracle and/or its affiliates. 8 8 * 9 9 * This file is part of VirtualBox base platform packages, as … … 30 30 #include <QHBoxLayout> 31 31 #include <QLabel> 32 #include <QIcon>33 32 #include <QPainter> 34 33 #include <QStyle> … … 70 69 if (cme.isAccepted()) 71 70 pEvent->accept(); 72 else73 QWidget::mousePressEvent(pEvent);74 71 } 75 else 76 QWidget::mousePressEvent(pEvent); 72 73 /* Call to base-class: */ 74 QWidget::mousePressEvent(pEvent); 77 75 } 78 76 #endif /* VBOX_WS_MAC */ … … 139 137 , m_pLabel(0) 140 138 { 141 /* Create main-layout: */139 /* Prepare main-layout: */ 142 140 QHBoxLayout *pMainLayout = new QHBoxLayout(this); 143 141 if (pMainLayout) 144 142 { 145 /* Configure main-layout: */146 143 pMainLayout->setContentsMargins(0, 0, 0, 0); 147 144 pMainLayout->setSpacing(0); 145 148 146 /* Create label: */ 149 m_pLabel = new QLabel ;147 m_pLabel = new QLabel(this); 150 148 if (m_pLabel) 151 {152 /* Add label into main-layout: */153 149 pMainLayout->addWidget(m_pLabel); 154 }155 150 } 156 151 } -
trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIStatusBarIndicator.h
r103977 r105327 5 5 6 6 /* 7 * Copyright (C) 2006-202 3Oracle and/or its affiliates.7 * Copyright (C) 2006-2024 Oracle and/or its affiliates. 8 8 * 9 9 * This file is part of VirtualBox base platform packages, as … … 35 35 #include <QIcon> 36 36 #include <QMap> 37 #include <QSize> 37 38 #include <QWidget> 38 39 … … 41 42 42 43 /* Forward declarations: */ 43 class QIcon;44 44 class QLabel; 45 class QSize;46 class QString;47 class QWidget;48 45 49 46 … … 81 78 82 79 /** Holds currently cached size. */ 83 QSize m_size;80 QSize m_size; 84 81 }; 85 82 … … 105 102 public slots: 106 103 107 /** Defines int @a state. */104 /** Defines int @a iState. */ 108 105 virtual void setState(int iState) { m_iState = iState; repaint(); } 109 /** Defines bool @a state. */110 void setState(bool fState) { setState((int)fState); }111 106 112 107 protected: … … 121 116 122 117 /** Holds current state. */ 123 int m_iState;118 int m_iState; 124 119 /** Holds cached state icons. */ 125 QMap<int, QIcon> m_icons;120 QMap<int, QIcon> m_icons; 126 121 }; 127 122 128 123 129 /** QIStatusBarIndicator extension used as status-bar stateindicator. */124 /** QIStatusBarIndicator extension used as status-bar text indicator. */ 130 125 class SHARED_LIBRARY_STUFF QITextStatusBarIndicator : public QIStatusBarIndicator 131 126 {
Note:
See TracChangeset
for help on using the changeset viewer.