VirtualBox

Changeset 10887 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Jul 25, 2008 12:05:11 PM (17 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
33710
Message:

Fe/Qt4: Removing garbage from QIStatusBar sources.

Location:
trunk/src/VBox/Frontends/VirtualBox4
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox4/include/QIStatusBar.h

    r9729 r10887  
    2727#include <QStatusBar>
    2828
    29 class QPaintEvent;
    30 
     29/**
     30 *  The QIStatusBar class is a replacement of QStatusBar with disabling
     31 *  drawing of sunken borders around every widget on the status bar.
     32 */
    3133class QIStatusBar : public QStatusBar
    3234{
     
    3537public:
    3638
    37     QIStatusBar (QWidget *parent = 0);
     39    QIStatusBar (QWidget *aParent = 0);
     40
     41protected slots:
     42
     43    void rememberLastMessage (const QString &aMsg) { mMessage = aMsg; }
    3844
    3945protected:
    4046
    41     virtual void paintEvent (QPaintEvent *);
    42 
    43 protected slots:
    44 
    45     void rememberLastMessage (const QString &msg) { message = msg; }
    46 
    47 protected:
    48 
    49     QString message;
     47    QString mMessage;
    5048};
    5149
  • trunk/src/VBox/Frontends/VirtualBox4/src/QIStatusBar.cpp

    r10373 r10887  
    2323#include "QIStatusBar.h"
    2424
    25 /* Qt includes */
    26 #include <QPainter>
    27 //#include <qsizegrip.h>
     25QIStatusBar::QIStatusBar (QWidget *aParent)
     26    : QStatusBar (aParent)
     27{
     28    connect (this, SIGNAL (messageChanged (const QString&)),
     29             this, SLOT (rememberLastMessage (const QString&)));
    2830
    29 /** @clas QIStatusLine
    30  *
    31  *  The QIStatusBar class is a replacement of QStatusBar that reimplements
    32  *  QStatusBar::paintEvent() to disable drawing of those sunken borders
    33  *  around every widget on the status bar.
    34  */
    35 
    36 QIStatusBar::QIStatusBar (QWidget *parent) :
    37     QStatusBar (parent)
    38 {
    39     connect (
    40         this, SIGNAL( messageChanged (const QString &) ),
    41         this, SLOT( rememberLastMessage (const QString &) )
    42     );
    4331    /* Remove that ugly border around the statusbar items on every platform */
    4432    setStyleSheet ("QStatusBar::item { border: 0px none black; }");
    4533}
    4634
    47 /**
    48  *  Reimplemented to disable drawing of sunken borders around statusbar's
    49  *  widgets.
    50  */
    51 void QIStatusBar::paintEvent (QPaintEvent *e)
    52 {
    53     QStatusBar::paintEvent (e);
    54     return;
    55 //#warning port me: is this needed anymore?
    56 //    QPainter p (this);
    57 //
    58 //#ifndef QT_NO_SIZEGRIP
    59     // this will work provided that QStatusBar::setSizeGripEnabled() names
    60     // its resizer child as specified (at least Qt 3.3.x does this).
    61 //#warning port me: check this
    62 //    QSizeGrip *resizer = (QSizeGrip *) child ("QStatusBar::resizer", "QSizeGrip");
    63 //    int psx = (resizer && resizer->isVisible()) ? resizer->x() : width() - 12;
    64 //#else
    65 //    int psx = width() - 12;
    66 //#endif
    67 //
    68 //    if (!message.isEmpty())
    69 //    {
    70 //        p.setPen (colorGroup().foreground());
    71 //        p.drawText (6, 0, psx, height(), Qt::AlignVCenter | Qt::TextSingleLine, message);
    72 //    }
    73 }
    74 
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette