Changeset 7369 in vbox for trunk/src/VBox/Frontends/VirtualBox4/src/QIStatusBar.cpp
- Timestamp:
- Mar 7, 2008 2:35:57 PM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 28793
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox4/src/QIStatusBar.cpp
r7220 r7369 19 19 #include "QIStatusBar.h" 20 20 21 #include <qpainter.h> 22 #include <qsizegrip.h> 23 //Added by qt3to4: 24 #include <QPaintEvent> 21 /* Qt includes */ 22 #include <QPainter> 23 //#include <qsizegrip.h> 25 24 26 25 /** @clas QIStatusLine … … 31 30 */ 32 31 33 QIStatusBar::QIStatusBar (QWidget *parent , const char *name) :34 QStatusBar (parent , name)32 QIStatusBar::QIStatusBar (QWidget *parent) : 33 QStatusBar (parent) 35 34 { 36 35 connect ( … … 44 43 * widgets. 45 44 */ 46 void QIStatusBar::paintEvent (QPaintEvent * )45 void QIStatusBar::paintEvent (QPaintEvent *e) 47 46 { 48 QPainter p (this); 49 50 #ifndef QT_NO_SIZEGRIP 47 QStatusBar::paintEvent (e); 48 return; 49 #warning port me: is this needed anymore? 50 // QPainter p (this); 51 // 52 //#ifndef QT_NO_SIZEGRIP 51 53 // this will work provided that QStatusBar::setSizeGripEnabled() names 52 54 // its resizer child as specified (at least Qt 3.3.x does this). 53 QSizeGrip *resizer = (QSizeGrip *) child ("QStatusBar::resizer", "QSizeGrip"); 54 int psx = (resizer && resizer->isVisible()) ? resizer->x() : width() - 12; 55 #else 56 int psx = width() - 12; 57 #endif 58 59 if (!message.isEmpty()) { 60 p.setPen (colorGroup().foreground()); 61 p.drawText (6, 0, psx, height(), Qt::AlignVCenter | Qt::TextSingleLine, message); 62 } 55 //#warning port me: check this 56 // QSizeGrip *resizer = (QSizeGrip *) child ("QStatusBar::resizer", "QSizeGrip"); 57 // int psx = (resizer && resizer->isVisible()) ? resizer->x() : width() - 12; 58 //#else 59 // int psx = width() - 12; 60 //#endif 61 // 62 // if (!message.isEmpty()) 63 // { 64 // p.setPen (colorGroup().foreground()); 65 // p.drawText (6, 0, psx, height(), Qt::AlignVCenter | Qt::TextSingleLine, message); 66 // } 63 67 }
Note:
See TracChangeset
for help on using the changeset viewer.