Changeset 11158 in ntrip for trunk/BNC/qwt/qwt_picker_machine.cpp
- Timestamp:
- Nov 3, 2026, 10:53:35 AM (8 days ago)
- File:
-
- 1 edited
-
trunk/BNC/qwt/qwt_picker_machine.cpp (modified) (26 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/qwt/qwt_picker_machine.cpp
r9383 r11158 1 /* -*- mode: C++ ; c-file-style: "stroustrup" -*-*****************************1 /****************************************************************************** 2 2 * Qwt Widget Library 3 3 * Copyright (C) 1997 Josef Wilgen … … 10 10 #include "qwt_picker_machine.h" 11 11 #include "qwt_event_pattern.h" 12 12 13 #include <qevent.h> 13 14 14 15 //! Constructor 15 QwtPickerMachine::QwtPickerMachine( SelectionType type ) :16 d_selectionType( type ),17 d_state( 0 )16 QwtPickerMachine::QwtPickerMachine( SelectionType type ) 17 : m_selectionType( type ) 18 , m_state( 0 ) 18 19 { 19 20 } … … 27 28 QwtPickerMachine::SelectionType QwtPickerMachine::selectionType() const 28 29 { 29 return d_selectionType;30 return m_selectionType; 30 31 } 31 32 … … 33 34 int QwtPickerMachine::state() const 34 35 { 35 return d_state;36 return m_state; 36 37 } 37 38 … … 39 40 void QwtPickerMachine::setState( int state ) 40 41 { 41 d_state = state;42 m_state = state; 42 43 } 43 44 … … 55 56 56 57 //! Transition 57 QList<QwtPickerMachine::Command> QwtPickerTrackerMachine::transition( 58 const QwtEventPattern &, const QEvent*e )59 { 60 QList<QwtPickerMachine::Command> cmdList; 58 QList< QwtPickerMachine::Command > QwtPickerTrackerMachine::transition( 59 const QwtEventPattern&, const QEvent* e ) 60 { 61 QList< QwtPickerMachine::Command > cmdList; 61 62 62 63 switch ( e->type() ) … … 97 98 98 99 //! Transition 99 QList<QwtPickerMachine::Command> QwtPickerClickPointMachine::transition( 100 const QwtEventPattern &eventPattern, const QEvent*event )101 { 102 QList<QwtPickerMachine::Command> cmdList; 100 QList< QwtPickerMachine::Command > QwtPickerClickPointMachine::transition( 101 const QwtEventPattern& eventPattern, const QEvent* event ) 102 { 103 QList< QwtPickerMachine::Command > cmdList; 103 104 104 105 switch ( event->type() ) … … 107 108 { 108 109 if ( eventPattern.mouseMatch( QwtEventPattern::MouseSelect1, 109 static_cast<const QMouseEvent *>( event ) ) )110 static_cast< const QMouseEvent* >( event ) ) ) 110 111 { 111 112 cmdList += Begin; … … 117 118 case QEvent::KeyPress: 118 119 { 119 const QKeyEvent *keyEvent = static_cast<const QKeyEvent*> ( event );120 const QKeyEvent* keyEvent = static_cast< const QKeyEvent* > ( event ); 120 121 if ( eventPattern.keyMatch( QwtEventPattern::KeySelect1, keyEvent ) ) 121 122 { … … 143 144 144 145 //! Transition 145 QList<QwtPickerMachine::Command> QwtPickerDragPointMachine::transition( 146 const QwtEventPattern &eventPattern, const QEvent*event )147 { 148 QList<QwtPickerMachine::Command> cmdList; 146 QList< QwtPickerMachine::Command > QwtPickerDragPointMachine::transition( 147 const QwtEventPattern& eventPattern, const QEvent* event ) 148 { 149 QList< QwtPickerMachine::Command > cmdList; 149 150 150 151 switch ( event->type() ) … … 153 154 { 154 155 if ( eventPattern.mouseMatch( QwtEventPattern::MouseSelect1, 155 static_cast<const QMouseEvent *>( event ) ) )156 static_cast< const QMouseEvent* >( event ) ) ) 156 157 { 157 158 if ( state() == 0 ) … … 182 183 case QEvent::KeyPress: 183 184 { 184 const QKeyEvent *keyEvent = static_cast<const QKeyEvent*> ( event );185 const QKeyEvent* keyEvent = static_cast< const QKeyEvent* > ( event ); 185 186 if ( eventPattern.keyMatch( QwtEventPattern::KeySelect1, keyEvent ) ) 186 187 { … … 216 217 217 218 //! Transition 218 QList<QwtPickerMachine::Command> QwtPickerClickRectMachine::transition( 219 const QwtEventPattern &eventPattern, const QEvent*event )220 { 221 QList<QwtPickerMachine::Command> cmdList; 219 QList< QwtPickerMachine::Command > QwtPickerClickRectMachine::transition( 220 const QwtEventPattern& eventPattern, const QEvent* event ) 221 { 222 QList< QwtPickerMachine::Command > cmdList; 222 223 223 224 switch ( event->type() ) … … 226 227 { 227 228 if ( eventPattern.mouseMatch( QwtEventPattern::MouseSelect1, 228 static_cast<const QMouseEvent *>( event ) ) )229 static_cast< const QMouseEvent* >( event ) ) ) 229 230 { 230 231 switch ( state() ) … … 261 262 { 262 263 if ( eventPattern.mouseMatch( QwtEventPattern::MouseSelect1, 263 static_cast<const QMouseEvent *>( event ) ) )264 static_cast< const QMouseEvent* >( event ) ) ) 264 265 { 265 266 if ( state() == 1 ) … … 273 274 case QEvent::KeyPress: 274 275 { 275 const QKeyEvent *keyEvent = static_cast<const QKeyEvent*> ( event );276 const QKeyEvent* keyEvent = static_cast< const QKeyEvent* > ( event ); 276 277 if ( eventPattern.keyMatch( QwtEventPattern::KeySelect1, keyEvent ) ) 277 278 { … … 315 316 316 317 //! Transition 317 QList<QwtPickerMachine::Command> QwtPickerDragRectMachine::transition( 318 const QwtEventPattern &eventPattern, const QEvent*event )319 { 320 QList<QwtPickerMachine::Command> cmdList; 318 QList< QwtPickerMachine::Command > QwtPickerDragRectMachine::transition( 319 const QwtEventPattern& eventPattern, const QEvent* event ) 320 { 321 QList< QwtPickerMachine::Command > cmdList; 321 322 322 323 switch ( event->type() ) … … 325 326 { 326 327 if ( eventPattern.mouseMatch( QwtEventPattern::MouseSelect1, 327 static_cast<const QMouseEvent *>( event ) ) )328 static_cast< const QMouseEvent* >( event ) ) ) 328 329 { 329 330 if ( state() == 0 ) … … 356 357 { 357 358 if ( eventPattern.keyMatch( QwtEventPattern::KeySelect1, 358 static_cast<const QKeyEvent *> ( event ) ) )359 static_cast< const QKeyEvent* > ( event ) ) ) 359 360 { 360 361 if ( state() == 0 ) … … 387 388 388 389 //! Transition 389 QList<QwtPickerMachine::Command> QwtPickerPolygonMachine::transition( 390 const QwtEventPattern &eventPattern, const QEvent*event )391 { 392 QList<QwtPickerMachine::Command> cmdList; 390 QList< QwtPickerMachine::Command > QwtPickerPolygonMachine::transition( 391 const QwtEventPattern& eventPattern, const QEvent* event ) 392 { 393 QList< QwtPickerMachine::Command > cmdList; 393 394 394 395 switch ( event->type() ) … … 397 398 { 398 399 if ( eventPattern.mouseMatch( QwtEventPattern::MouseSelect1, 399 static_cast<const QMouseEvent *>( event ) ) )400 static_cast< const QMouseEvent* >( event ) ) ) 400 401 { 401 402 if ( state() == 0 ) … … 412 413 } 413 414 if ( eventPattern.mouseMatch( QwtEventPattern::MouseSelect2, 414 static_cast<const QMouseEvent *>( event ) ) )415 static_cast< const QMouseEvent* >( event ) ) ) 415 416 { 416 417 if ( state() == 1 ) … … 431 432 case QEvent::KeyPress: 432 433 { 433 const QKeyEvent *keyEvent = static_cast<const QKeyEvent*> ( event );434 const QKeyEvent* keyEvent = static_cast< const QKeyEvent* > ( event ); 434 435 if ( eventPattern.keyMatch( QwtEventPattern::KeySelect1, keyEvent ) ) 435 436 { … … 476 477 477 478 //! Transition 478 QList<QwtPickerMachine::Command> QwtPickerDragLineMachine::transition( 479 const QwtEventPattern &eventPattern, const QEvent*event )480 { 481 QList<QwtPickerMachine::Command> cmdList; 479 QList< QwtPickerMachine::Command > QwtPickerDragLineMachine::transition( 480 const QwtEventPattern& eventPattern, const QEvent* event ) 481 { 482 QList< QwtPickerMachine::Command > cmdList; 482 483 483 484 switch( event->type() ) … … 486 487 { 487 488 if ( eventPattern.mouseMatch( QwtEventPattern::MouseSelect1, 488 static_cast<const QMouseEvent *>( event ) ) )489 static_cast< const QMouseEvent* >( event ) ) ) 489 490 { 490 491 if ( state() == 0 ) … … 501 502 { 502 503 if ( eventPattern.keyMatch( QwtEventPattern::KeySelect1, 503 static_cast<const QKeyEvent *> ( event ) ) )504 static_cast< const QKeyEvent* > ( event ) ) ) 504 505 { 505 506 if ( state() == 0 )
Note:
See TracChangeset
for help on using the changeset viewer.
