VirtualBox

Ignore:
Timestamp:
Apr 3, 2008 3:18:22 PM (17 years ago)
Author:
vboxsync
Message:

VBoxSnapshotsWgt ported qt3=>qt4.

File:
1 edited

Legend:

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

    r7308 r7727  
    2222/* Qt includes */
    2323#include <QToolBar>
    24 #include <QToolButton>
    2524#include <QMainWindow>
    26 #include <QContextMenuEvent>
    2725#ifdef Q_WS_MAC
    2826//# include "VBoxAquaStyle.h"
     
    3533class VBoxToolBar : public QToolBar
    3634{
     35
    3736public:
    3837
    39     VBoxToolBar (QMainWindow *aMainWindow, QWidget *aParent = NULL)
    40         : QToolBar (aParent),
    41           mMainWindow (aMainWindow)
     38    VBoxToolBar (QWidget *aParent)
     39        : QToolBar (aParent)
     40        , mMainWindow (qobject_cast<QMainWindow*> (aParent))
    4241    {
    4342        setFloatable (false);
    4443        setMovable (false);
    45     };
    46 
    47     /** Reimplements and does nothing to disable the context menu */
    48     void contextMenuEvent (QContextMenuEvent *) {};
     44        if (layout())
     45            layout()->setContentsMargins (0, 0, 0, 0);;
     46    }
    4947
    5048    /**
     
    5452    void setUsesBigPixmaps (bool enable)
    5553    {
    56         QSize size (32, 32);
     54        QSize size (24, 24);
    5755        if (!enable)
    5856            size = QSize (16, 16);
    59                
     57
    6058        if (mMainWindow)
    6159            mMainWindow->setIconSize (size);
     
    6967        if (!enable)
    7068            tbs = Qt::ToolButtonIconOnly;
    71            
     69
    7270        if (mMainWindow)
    7371            mMainWindow->setToolButtonStyle (tbs);
     
    7775
    7876#ifdef Q_WS_MAC
    79     /** 
    80      * This is a temporary hack, we'll set the style globally later. 
     77    /**
     78     * This is a temporary hack, we'll set the style globally later.
    8179     */
    8280#warning port me
    83     void setMacStyle() 
     81    void setMacStyle()
    8482    {
    8583        /* self */
     
    10199        /** @todo the separator */
    102100    }
    103 #endif
     101#endif
     102
    104103private:
     104
    105105    QMainWindow *mMainWindow;
    106106};
    107107
    108108#endif // __VBoxToolBar_h__
     109
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