Changeset 7727 in vbox for trunk/src/VBox/Frontends/VirtualBox4/include/VBoxToolBar.h
- Timestamp:
- Apr 3, 2008 3:18:22 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox4/include/VBoxToolBar.h
r7308 r7727 22 22 /* Qt includes */ 23 23 #include <QToolBar> 24 #include <QToolButton>25 24 #include <QMainWindow> 26 #include <QContextMenuEvent>27 25 #ifdef Q_WS_MAC 28 26 //# include "VBoxAquaStyle.h" … … 35 33 class VBoxToolBar : public QToolBar 36 34 { 35 37 36 public: 38 37 39 VBoxToolBar (Q MainWindow *aMainWindow, QWidget *aParent = NULL)40 : QToolBar (aParent) ,41 mMainWindow (aMainWindow)38 VBoxToolBar (QWidget *aParent) 39 : QToolBar (aParent) 40 , mMainWindow (qobject_cast<QMainWindow*> (aParent)) 42 41 { 43 42 setFloatable (false); 44 43 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 } 49 47 50 48 /** … … 54 52 void setUsesBigPixmaps (bool enable) 55 53 { 56 QSize size ( 32, 32);54 QSize size (24, 24); 57 55 if (!enable) 58 56 size = QSize (16, 16); 59 57 60 58 if (mMainWindow) 61 59 mMainWindow->setIconSize (size); … … 69 67 if (!enable) 70 68 tbs = Qt::ToolButtonIconOnly; 71 69 72 70 if (mMainWindow) 73 71 mMainWindow->setToolButtonStyle (tbs); … … 77 75 78 76 #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. 81 79 */ 82 80 #warning port me 83 void setMacStyle() 81 void setMacStyle() 84 82 { 85 83 /* self */ … … 101 99 /** @todo the separator */ 102 100 } 103 #endif 101 #endif 102 104 103 private: 104 105 105 QMainWindow *mMainWindow; 106 106 }; 107 107 108 108 #endif // __VBoxToolBar_h__ 109
Note:
See TracChangeset
for help on using the changeset viewer.