- Timestamp:
- Jun 4, 2008 12:49:29 PM (17 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox4
- Files:
-
- 13 edited
- 3 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox4/Makefile.kmk
r9382 r9386 442 442 include/QIStateIndicator.h \ 443 443 include/QIMessageBox.h \ 444 include/QI RichLabel.h \445 include/QI RichLabel_p.h \444 include/QILabel.h \ 445 include/QILabel_p.h \ 446 446 include/QIAbstractWizard.h \ 447 447 include/QIListView.h \ … … 526 526 src/QIStatusBar.cpp \ 527 527 src/QIMessageBox.cpp \ 528 src/QI RichLabel.cpp \528 src/QILabel.cpp \ 529 529 src/QIAbstractWizard.cpp \ 530 530 src/QIDialog.cpp \ -
trunk/src/VBox/Frontends/VirtualBox4/include/QIAbstractWizard.h
r9091 r9386 67 67 * 2. Tries to take into account horizontal scrollbar if present to avoid 68 68 * vertical scrollbar appearing. 69 * 70 * --> uses now global QILabel 69 71 */ 70 class QILabel : public QLabel71 {72 Q_OBJECT;73 74 public:75 76 QILabel (QWidget *aParent);77 78 QSize sizeHint() const;79 void updateSizeHint();80 81 private:82 83 QSize mOwnSizeHint;84 };85 72 86 73 /** -
trunk/src/VBox/Frontends/VirtualBox4/include/QILabel.h
r9382 r9386 2 2 * 3 3 * VBox frontends: Qt GUI ("VirtualBox"): 4 * VirtualBox Qt extensions: QI RichLabel class declaration4 * VirtualBox Qt extensions: QILabel class declaration 5 5 */ 6 6 … … 25 25 */ 26 26 27 #ifndef __QI RichLabel_h__28 #define __QI RichLabel_h__27 #ifndef __QILabel_h__ 28 #define __QILabel_h__ 29 29 30 30 /* Qt includes */ … … 33 33 class QILabelPrivate; 34 34 35 class QI RichLabel: public QWidget35 class QILabel: public QWidget 36 36 { 37 37 Q_OBJECT; … … 39 39 public: 40 40 41 QI RichLabel (QWidget *aParent = NULL, Qt::WindowFlags aFlags = 0);42 QI RichLabel (const QString &aText, QWidget *aParent = NULL, Qt::WindowFlags aFlags = 0);41 QILabel (QWidget *aParent = NULL, Qt::WindowFlags aFlags = 0); 42 QILabel (const QString &aText, QWidget *aParent = NULL, Qt::WindowFlags aFlags = 0); 43 43 44 44 /* QLabel extensions */ 45 45 bool fullSizeSelection () const; 46 46 void setFullSizeSelection (bool bOn); 47 48 void updateSizeHint(); 47 49 48 50 /* Default QLabel methods */ … … 70 72 bool wordWrap() const; 71 73 74 /* Default QWidget methods */ 75 void setSizePolicy (QSizePolicy aPolicy); 76 void setMinimumSize (const QSize &aSize); 77 72 78 public slots: 73 79 … … 93 99 }; 94 100 95 #endif // __QIRichLabel_h__ 101 #endif // __QILabel_h__ 102 -
trunk/src/VBox/Frontends/VirtualBox4/include/QILabel_p.h
r9382 r9386 70 70 void setFullSizeSelection (bool bOn); 71 71 72 void updateSizeHint() 73 { 74 if (minimumWidth() > 0) 75 mOwnSizeHint = QSize (minimumWidth(), 76 heightForWidth (minimumWidth())); 77 } 78 79 QSize sizeHint() const 80 { 81 /* If there is an updated sizeHint() present - using it. */ 82 return mOwnSizeHint.isValid() ? mOwnSizeHint : QLabel::sizeHint(); 83 } 84 72 85 protected: 73 86 … … 115 128 static const QRegExp mCopyRegExp; 116 129 static QRegExp mElideRegExp; 130 QSize mOwnSizeHint; 117 131 }; 118 132 -
trunk/src/VBox/Frontends/VirtualBox4/include/QIMessageBox.h
r9287 r9386 31 31 #include <QTextEdit> 32 32 33 class QI RichLabel;33 class QILabel; 34 34 class QLabel; 35 35 class QPushButton; … … 106 106 int mButton0, mButton1, mButton2, mButtonEsc; 107 107 QLabel *mIconLabel; 108 QI RichLabel *mTextLabel;108 QILabel *mTextLabel; 109 109 QPushButton *mButton0PB, *mButton1PB, *mButton2PB; 110 110 QCheckBox *mFlagCB, *mFlagCB_Main, *mFlagCB_Details; … … 116 116 117 117 #endif 118 -
trunk/src/VBox/Frontends/VirtualBox4/src/QIAbstractWizard.cpp
r9091 r9386 22 22 23 23 #include "QIAbstractWizard.h" 24 #include "QILabel.h" 24 25 25 26 /* Qt includes */ … … 67 68 QTextEdit::setText (aText); 68 69 updateSizeHint(); 69 }70 71 72 QILabel::QILabel (QWidget *aParent)73 : QLabel (aParent)74 {75 }76 77 QSize QILabel::sizeHint() const78 {79 /* If there is an updated sizeHint() present - using it. */80 return mOwnSizeHint.isValid() ? mOwnSizeHint : QLabel::sizeHint();81 }82 83 void QILabel::updateSizeHint()84 {85 if (minimumWidth() > 0)86 mOwnSizeHint = QSize (minimumWidth(),87 heightForWidth (minimumWidth()));88 70 } 89 71 -
trunk/src/VBox/Frontends/VirtualBox4/src/QILabel.cpp
r9382 r9386 2 2 * 3 3 * VBox frontends: Qt GUI ("VirtualBox"): 4 * VirtualBox Qt extensions: QI RichLabel class implementation4 * VirtualBox Qt extensions: QILabel class implementation 5 5 */ 6 6 … … 25 25 */ 26 26 27 #include "QI RichLabel.h"28 #include "QI RichLabel_p.h"27 #include "QILabel.h" 28 #include "QILabel_p.h" 29 29 #include "VBoxGlobal.h" 30 30 … … 36 36 /* @todo: Compare the minimal size behavior in the qt3 & qt4 version. */ 37 37 38 QI RichLabel::QIRichLabel (QWidget *aParent /* = NULL */, Qt::WindowFlags aFlags /* = 0 */)38 QILabel::QILabel (QWidget *aParent /* = NULL */, Qt::WindowFlags aFlags /* = 0 */) 39 39 : QWidget (aParent, aFlags) 40 40 , mLabel (NULL) … … 43 43 } 44 44 45 QI RichLabel::QIRichLabel (const QString &aText, QWidget *aParent /* = NULL */, Qt::WindowFlags aFlags /* = 0 */)45 QILabel::QILabel (const QString &aText, QWidget *aParent /* = NULL */, Qt::WindowFlags aFlags /* = 0 */) 46 46 : QWidget (aParent, aFlags) 47 47 , mLabel (NULL) … … 51 51 } 52 52 53 bool QI RichLabel::fullSizeSelection () const54 { 55 mLabel->fullSizeSelection();56 } 57 58 void QI RichLabel::setFullSizeSelection (bool bOn)53 bool QILabel::fullSizeSelection () const 54 { 55 return mLabel->fullSizeSelection(); 56 } 57 58 void QILabel::setFullSizeSelection (bool bOn) 59 59 { 60 60 mLabel->setFullSizeSelection (bOn); 61 61 } 62 62 63 void QIRichLabel::init() 63 void QILabel::updateSizeHint() 64 { 65 mLabel->updateSizeHint(); 66 } 67 68 void QILabel::init() 64 69 { 65 70 QHBoxLayout *layout = new QHBoxLayout (this); … … 76 81 /* Default QLabel methods */ 77 82 78 Qt::Alignment QI RichLabel::alignment () const83 Qt::Alignment QILabel::alignment () const 79 84 { 80 85 return mLabel->alignment(); 81 86 } 82 87 83 QWidget *QI RichLabel::buddy () const88 QWidget *QILabel::buddy () const 84 89 { 85 90 return mLabel->buddy(); 86 91 } 87 92 88 bool QI RichLabel::hasScaledContents () const93 bool QILabel::hasScaledContents () const 89 94 { 90 95 return mLabel->hasScaledContents(); 91 96 } 92 97 93 int QI RichLabel::indent () const98 int QILabel::indent () const 94 99 { 95 100 return mLabel->indent(); 96 101 } 97 102 98 int QI RichLabel::margin () const103 int QILabel::margin () const 99 104 { 100 105 return mLabel->margin(); 101 106 } 102 107 103 QMovie *QI RichLabel::movie () const108 QMovie *QILabel::movie () const 104 109 { 105 110 return mLabel->movie(); 106 111 } 107 112 108 bool QI RichLabel::openExternalLinks () const113 bool QILabel::openExternalLinks () const 109 114 { 110 115 return mLabel->openExternalLinks(); 111 116 } 112 117 113 const QPicture *QI RichLabel::picture () const118 const QPicture *QILabel::picture () const 114 119 { 115 120 return mLabel->picture(); 116 121 } 117 122 118 const QPixmap *QI RichLabel::pixmap () const123 const QPixmap *QILabel::pixmap () const 119 124 { 120 125 return mLabel->pixmap(); 121 126 } 122 127 123 void QI RichLabel::setAlignment (Qt::Alignment aAlignment)128 void QILabel::setAlignment (Qt::Alignment aAlignment) 124 129 { 125 130 mLabel->setAlignment (aAlignment); 126 131 } 127 132 128 void QI RichLabel::setBuddy (QWidget *aBuddy)133 void QILabel::setBuddy (QWidget *aBuddy) 129 134 { 130 135 mLabel->setBuddy (aBuddy); 131 136 } 132 137 133 void QI RichLabel::setIndent (int aIndent)138 void QILabel::setIndent (int aIndent) 134 139 { 135 140 mLabel->setIndent (aIndent); 136 141 } 137 142 138 void QI RichLabel::setMargin (int aMargin)143 void QILabel::setMargin (int aMargin) 139 144 { 140 145 mLabel->setMargin (aMargin); 141 146 } 142 147 143 void QI RichLabel::setOpenExternalLinks (bool aOpen)148 void QILabel::setOpenExternalLinks (bool aOpen) 144 149 { 145 150 mLabel->setOpenExternalLinks (aOpen); 146 151 } 147 152 148 void QI RichLabel::setScaledContents (bool aOn)153 void QILabel::setScaledContents (bool aOn) 149 154 { 150 155 mLabel->setScaledContents (aOn); 151 156 } 152 157 153 void QI RichLabel::setTextFormat (Qt::TextFormat aFormat)158 void QILabel::setTextFormat (Qt::TextFormat aFormat) 154 159 { 155 160 mLabel->setTextFormat (aFormat); 156 161 } 157 162 158 void QI RichLabel::setTextInteractionFlags (Qt::TextInteractionFlags aFlags)163 void QILabel::setTextInteractionFlags (Qt::TextInteractionFlags aFlags) 159 164 { 160 165 mLabel->setTextInteractionFlags (aFlags); 161 166 } 162 167 163 void QI RichLabel::setWordWrap (bool aOn)168 void QILabel::setWordWrap (bool aOn) 164 169 { 165 170 mLabel->setWordWrap (aOn); 166 171 } 167 172 168 QString QI RichLabel::text () const173 QString QILabel::text () const 169 174 { 170 175 return mLabel->fullText(); 171 176 } 172 177 173 Qt::TextFormat QI RichLabel::textFormat () const178 Qt::TextFormat QILabel::textFormat () const 174 179 { 175 180 return mLabel->textFormat(); 176 181 } 177 182 178 Qt::TextInteractionFlags QI RichLabel::textInteractionFlags () const183 Qt::TextInteractionFlags QILabel::textInteractionFlags () const 179 184 { 180 185 return mLabel->textInteractionFlags(); 181 186 } 182 187 183 bool QI RichLabel::wordWrap () const188 bool QILabel::wordWrap () const 184 189 { 185 190 return mLabel->wordWrap(); 186 191 } 187 192 188 void QIRichLabel::clear() 193 void QILabel::setSizePolicy (QSizePolicy aPolicy) 194 { 195 mLabel->setSizePolicy (aPolicy); 196 QWidget::setSizePolicy (aPolicy); 197 } 198 199 void QILabel::setMinimumSize (const QSize &aSize) 200 { 201 mLabel->setMinimumSize (aSize); 202 QWidget::setMinimumSize (aSize); 203 } 204 205 void QILabel::clear() 189 206 { 190 207 mLabel->clearAll(); 191 208 } 192 209 193 void QI RichLabel::setMovie (QMovie *aMovie)210 void QILabel::setMovie (QMovie *aMovie) 194 211 { 195 212 mLabel->setMovie (aMovie); 196 213 } 197 214 198 void QI RichLabel::setNum (int aNum)215 void QILabel::setNum (int aNum) 199 216 { 200 217 mLabel->setNum (aNum); 201 218 } 202 219 203 void QI RichLabel::setNum (double aNum)220 void QILabel::setNum (double aNum) 204 221 { 205 222 mLabel->setNum (aNum); 206 223 } 207 224 208 void QI RichLabel::setPicture (const QPicture &aPicture)225 void QILabel::setPicture (const QPicture &aPicture) 209 226 { 210 227 mLabel->setPicture (aPicture); 211 228 } 212 229 213 void QI RichLabel::setPixmap (const QPixmap &aPixmap)230 void QILabel::setPixmap (const QPixmap &aPixmap) 214 231 { 215 232 mLabel->setPixmap (aPixmap); 216 233 } 217 234 218 void QI RichLabel::setText (const QString &aText)235 void QILabel::setText (const QString &aText) 219 236 { 220 237 mLabel->setFullText (aText); -
trunk/src/VBox/Frontends/VirtualBox4/src/QIMessageBox.cpp
r9382 r9386 25 25 26 26 #include "QIMessageBox.h" 27 #include "QI RichLabel.h"27 #include "QILabel.h" 28 28 #include "QIDialogButtonBox.h" 29 29 … … 82 82 hLayout->addLayout (messageVBoxLayout); 83 83 84 mTextLabel = new QI RichLabel (aText, NULL);84 mTextLabel = new QILabel (aText, NULL); 85 85 mTextLabel->setAlignment (Qt::AlignLeft | Qt::AlignTop); 86 86 mTextLabel->setWordWrap (true); -
trunk/src/VBox/Frontends/VirtualBox4/src/VBoxDiskImageManagerDlg.cpp
r9382 r9386 23 23 #include "VBoxDiskImageManagerDlg.h" 24 24 #include "VBoxToolBar.h" 25 #include "QI RichLabel.h"25 #include "QILabel.h" 26 26 #include "VBoxNewHDWzd.h" 27 27 #include "VBoxProblemReporter.h" … … 192 192 }; 193 193 194 class InfoPaneLabel : public QI RichLabel194 class InfoPaneLabel : public QILabel 195 195 { 196 196 public: 197 197 198 198 InfoPaneLabel (QWidget *aParent, QLabel *aLabel = 0) 199 : QI RichLabel (aParent), mLabel (aLabel) {}199 : QILabel (aParent), mLabel (aLabel) {} 200 200 201 201 QLabel* label() const { return mLabel; } -
trunk/src/VBox/Frontends/VirtualBox4/src/VBoxRegistrationDlg.cpp
r9089 r9386 244 244 this, SLOT (revalidate (QIWidgetValidator *))); 245 245 connect (mTimeout, SIGNAL (timeout()), this, SLOT (processTimeout())); 246 /* TODO: Implement mouse on link click for QILabel:247 * connect (mTextRegInfo, SIGNAL (clickedOnLink (const QString &)),248 * &vboxGlobal(), SLOT (openURL (const QString &))); */249 246 250 247 /* Setup initial dialog parameters. */ -
trunk/src/VBox/Frontends/VirtualBox4/ui/VBoxGlobalSettingsDlg.ui
r8155 r9386 1308 1308 <include location="local" impldecl="in implementation">VBoxProblemReporter.h</include> 1309 1309 <include location="local" impldecl="in implementation">VBoxUSBFilterSettings.h</include> 1310 <include location="local" impldecl="in implementation">QI RichLabel.h</include>1310 <include location="local" impldecl="in implementation">QILabel.h</include> 1311 1311 </includes> 1312 1312 <forwards> 1313 1313 <forward>class VBoxUSBMenu</forward> 1314 <forward>class QI RichLabel</forward>1314 <forward>class QILabel</forward> 1315 1315 </forwards> 1316 1316 <variables> … … 1327 1327 <variable access="private">VBoxUSBMenu *usbDevicesMenu;</variable> 1328 1328 <variable access="private">bool mLanguageChanged;</variable> 1329 <variable access="private">QI RichLabel *whatsThisLabel;</variable>1329 <variable access="private">QILabel *whatsThisLabel;</variable> 1330 1330 </variables> 1331 1331 <slots> -
trunk/src/VBox/Frontends/VirtualBox4/ui/VBoxGlobalSettingsDlg.ui.h
r9382 r9386 30 30 *****************************************************************************/ 31 31 32 #include "QILabel.h" 33 32 34 #include <iprt/err.h> 33 35 #include <iprt/param.h> … … 303 305 304 306 #warning port me 305 whatsThisLabel = new QI RichLabel (this);307 whatsThisLabel = new QILabel (this); 306 308 // VBoxGlobalSettingsDlgLayout->addWidget (whatsThisLabel, 2, 1); 307 309 -
trunk/src/VBox/Frontends/VirtualBox4/ui/VBoxNewHDWzd.ui
r8621 r9386 948 948 <class>QILabel</class> 949 949 <extends>QLabel</extends> 950 <header>QI AbstractWizard.h</header>950 <header>QILabel.h</header> 951 951 </customwidget> 952 952 <customwidget> -
trunk/src/VBox/Frontends/VirtualBox4/ui/VBoxNewVMWzd.ui
r8632 r9386 1213 1213 <class>QILabel</class> 1214 1214 <extends>QLabel</extends> 1215 <header>QI AbstractWizard.h</header>1215 <header>QILabel.h</header> 1216 1216 </customwidget> 1217 1217 <customwidget> -
trunk/src/VBox/Frontends/VirtualBox4/ui/VBoxRegistrationDlg.ui
r8648 r9386 255 255 <class>QILabel</class> 256 256 <extends>QLabel</extends> 257 <header>QI AbstractWizard.h</header>257 <header>QILabel.h</header> 258 258 </customwidget> 259 259 </customwidgets> -
trunk/src/VBox/Frontends/VirtualBox4/ui/VBoxVMFirstRunWzd.ui
r8641 r9386 849 849 <class>QILabel</class> 850 850 <extends>QLabel</extends> 851 <header>QI AbstractWizard.h</header>851 <header>QILabel.h</header> 852 852 </customwidget> 853 853 <customwidget>
Note:
See TracChangeset
for help on using the changeset viewer.