Changeset 9968 in vbox
- Timestamp:
- Jun 26, 2008 3:56:28 PM (16 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox4
- Files:
-
- 2 edited
-
include/QILabel.h (modified) (3 diffs)
-
src/QILabel.cpp (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox4/include/QILabel.h
r9729 r9968 29 29 30 30 /* Qt includes */ 31 #include <Q Widget>31 #include <QFrame> 32 32 33 33 class QILabelPrivate; … … 51 51 Qt::Alignment alignment() const; 52 52 QWidget * buddy() const; 53 int frameWidth() const; 53 54 bool hasScaledContents() const; 54 55 int indent() const; … … 60 61 void setAlignment (Qt::Alignment aAlignment); 61 62 void setBuddy (QWidget *aBuddy); 63 void setFrameShadow (QFrame::Shadow aShadow); 64 void setFrameShape (QFrame::Shape aShape); 62 65 void setIndent (int aIndent); 63 66 void setMargin (int aMargin); -
trunk/src/VBox/Frontends/VirtualBox4/src/QILabel.cpp
r9862 r9968 93 93 } 94 94 95 int QILabel::frameWidth() const 96 { 97 return mLabel->frameWidth(); 98 } 99 95 100 bool QILabel::hasScaledContents () const 96 101 { … … 128 133 } 129 134 130 void QILabel::setAlignment (Qt::Alignment aAlignment) 131 { 132 mLabel->setAlignment (aAlignment); 135 void QILabel::setAlignment (Qt::Alignment aAlignment) 136 { 137 mLabel->setAlignment (aAlignment); 133 138 } 134 139 … … 138 143 } 139 144 145 void QILabel::setFrameShadow (QFrame::Shadow aShadow) 146 { 147 mLabel->setFrameShadow (aShadow); 148 } 149 150 void QILabel::setFrameShape (QFrame::Shape aShape) 151 { 152 mLabel->setFrameShape (aShape); 153 } 154 140 155 void QILabel::setIndent (int aIndent) 141 156 { … … 149 164 150 165 void QILabel::setOpenExternalLinks (bool aOpen) 151 { 152 mLabel->setOpenExternalLinks (aOpen); 166 { 167 mLabel->setOpenExternalLinks (aOpen); 153 168 } 154 169 … … 163 178 } 164 179 165 void QILabel::setTextInteractionFlags (Qt::TextInteractionFlags aFlags) 166 { 167 mLabel->setTextInteractionFlags (aFlags); 168 } 169 170 void QILabel::setWordWrap (bool aOn) 171 { 172 mLabel->setWordWrap (aOn); 180 void QILabel::setTextInteractionFlags (Qt::TextInteractionFlags aFlags) 181 { 182 mLabel->setTextInteractionFlags (aFlags); 183 } 184 185 void QILabel::setWordWrap (bool aOn) 186 { 187 mLabel->setWordWrap (aOn); 173 188 } 174 189 … … 238 253 { 239 254 mLabel->setFullText (aText); 255 256 /* If QILabel forced to be fixed vertically */ 257 if (minimumHeight() == maximumHeight()) 258 { 259 /* Check if new text requires label growing */ 260 QSize sh (mLabel->width(), mLabel->heightForWidth (mLabel->width())); 261 if (sh.height() > minimumHeight()) 262 setFixedHeight (sh.height()); 263 } 240 264 } 241 265 … … 298 322 if (aEvent->button() == Qt::LeftButton && 299 323 geometry().contains (aEvent->pos()) && 300 mFullSizeSeclection) 324 mFullSizeSeclection) 301 325 mStartDragging = true; 302 326 else … … 432 456 text = QString (workStr).replace (compactStr, newStr); 433 457 /* For debug */ 434 // printf ("%d, %s # %s # %s ## %s\n", pos, 458 // printf ("%d, %s # %s # %s ## %s\n", pos, 435 459 // qPrintable (compactStr), 436 460 // qPrintable (elideModeStr), 437 // qPrintable (elideStr), 461 // qPrintable (elideStr), 438 462 // qPrintable (newStr)); 439 463 }
Note:
See TracChangeset
for help on using the changeset viewer.

