- Timestamp:
- Jul 12, 2007 12:20:50 AM (18 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/include/QIStateIndicator.h
r2981 r3567 62 62 virtual void drawContents (QPainter *aPainter); 63 63 64 #ifdef Q_WS_MAC 65 virtual void mousePressEvent (QMouseEvent *aEv); 66 #endif 64 67 virtual void mouseDoubleClickEvent (QMouseEvent *aEv); 65 68 virtual void contextMenuEvent (QContextMenuEvent *aEv); -
trunk/src/VBox/Frontends/VirtualBox/src/QIStateIndicator.cpp
r2981 r3567 151 151 } 152 152 153 #ifdef Q_WS_MAC 154 /** 155 * Make the left button also show the context menu to make things 156 * simpler for users with single mouse button mice (laptops++). 157 */ 158 void QIStateIndicator::mousePressEvent (QMouseEvent *aEv) 159 { 160 QContextMenuEvent qme (QContextMenuEvent::Mouse, aEv->pos(), aEv->globalPos(), 0); 161 emit contextMenuRequested (this, &qme); 162 if (qme.isAccepted()) 163 aEv->accept(); 164 else 165 QFrame::mousePressEvent (aEv); 166 } 167 #endif /* Q_WS_MAC */ 168 153 169 void QIStateIndicator::mouseDoubleClickEvent (QMouseEvent * e) 154 170 { … … 160 176 emit contextMenuRequested (this, e); 161 177 } 178
Note:
See TracChangeset
for help on using the changeset viewer.