Changeset 7590 in vbox for trunk/src/VBox/Frontends/VirtualBox4/include/VBoxConsoleView.h
- Timestamp:
- Mar 27, 2008 1:21:57 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox4/include/VBoxConsoleView.h
r7512 r7590 26 26 27 27 /* Qt includes */ 28 #include <q3scrollview.h> 28 #include <QAbstractScrollArea> 29 #include <QScrollBar> 29 30 30 31 #if defined (Q_WS_PM) … … 46 47 class QMenuData; 47 48 48 class VBoxConsoleView : public Q 3ScrollView49 class VBoxConsoleView : public QAbstractScrollArea 49 50 { 50 51 Q_OBJECT … … 64 65 const CConsole &console, 65 66 VBoxDefs::RenderMode rm, 66 QWidget *parent = 0 , const char *name = 0, Qt::WFlags f = 0);67 QWidget *parent = 0); 67 68 ~VBoxConsoleView(); 68 69 … … 95 96 96 97 QRect getDesktopGeometry(); 98 99 /* todo: This are some support functions for the qt4 port. Maybe we get rid 100 * of them some day. */ 101 int contentsX() const { return horizontalScrollBar()->value(); } 102 int contentsY() const { return verticalScrollBar()->value(); } 103 int contentsWidth() const; 104 int contentsHeight() const; 105 int visibleWidth() const { return horizontalScrollBar()->pageStep(); } 106 int visibleHeight() const { return verticalScrollBar()->pageStep(); } 107 void scrollBy (int dx, int dy) 108 { 109 horizontalScrollBar()->setValue (horizontalScrollBar()->value() + dx); 110 verticalScrollBar()->setValue (verticalScrollBar()->value() + dy); 111 } 112 QPoint viewportToContents ( const QPoint & vp ) const 113 { 114 return QPoint (vp.x() + contentsX(), 115 vp.y() + contentsY()); 116 } 117 void updateSliders(); 97 118 98 119 signals: … … 141 162 bool mouseEvent (int aType, const QPoint &aPos, const QPoint &aGlobalPos, 142 163 Qt::ButtonState aButton, 143 Qt:: ButtonState aState, Qt::ButtonState aStateAfter,164 Qt::MouseButtons aButtons, Qt::KeyboardModifiers aModifiers, 144 165 int aWheelDelta, Qt::Orientation aWheelDir); 145 166 … … 162 183 void doRefresh(); 163 184 164 void viewportPaintEvent( QPaintEvent * ); 185 void resizeEvent (QResizeEvent *); 186 void paintEvent (QPaintEvent *); 165 187 #ifdef VBOX_GUI_USE_REFRESH_TIMER 166 188 void timerEvent( QTimerEvent * ); … … 170 192 void captureMouse (bool aCapture, bool aEmitSignal = true); 171 193 172 bool processHotKey (const QKeySequence &key, QMenuData *data);194 bool processHotKey (const QKeySequence &key, const QList<QAction*>& data); 173 195 void updateModifiers (bool fNumLock, bool fCapsLock, bool fScrollLock); 174 196 … … 235 257 long muCapsLockAdaptionCnt; 236 258 237 QTimer *resize_hint_timer;238 259 QTimer *mToggleFSModeTimer; 239 260
Note:
See TracChangeset
for help on using the changeset viewer.