Changeset 11158 in ntrip for trunk/BNC/qwt/qwt_picker_machine.h


Ignore:
Timestamp:
Nov 3, 2026, 10:53:35 AM (3 weeks ago)
Author:
stuerze
Message:

deprecated functions exchanged libs updated

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/qwt/qwt_picker_machine.h

    r9383 r11158  
    1 /* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
     1/******************************************************************************
    22 * Qwt Widget Library
    33 * Copyright (C) 1997   Josef Wilgen
    … …  
    99
    1010#ifndef QWT_PICKER_MACHINE
    11 #define QWT_PICKER_MACHINE 1
     11#define QWT_PICKER_MACHINE
    1212
    1313#include "qwt_global.h"
    14 #include <qlist.h>
    15 
     14
     15class QwtEventPattern;
    1616class QEvent;
    17 class QwtEventPattern;
    18 
    19 /*!
    20   \brief A state machine for QwtPicker selections
    21 
    22   QwtPickerMachine accepts key and mouse events and translates them
    23   into selection commands.
    24 
    25   \sa QwtEventPattern::MousePatternCode, QwtEventPattern::KeyPatternCode
    26 */
     17template< typename T > class QList;
     18
     19/*!
     20   \brief A state machine for QwtPicker selections
     21
     22   QwtPickerMachine accepts key and mouse events and translates them
     23   into selection commands.
     24
     25   \sa QwtEventPattern::MousePatternCode, QwtEventPattern::KeyPatternCode
     26 */
    2727
    2828class QWT_EXPORT QwtPickerMachine
    2929{
    30 public:
     30  public:
    3131    /*!
    32       Type of a selection.
    33       \sa selectionType()
    34     */
     32       Type of a selection.
     33       \sa selectionType()
     34     */
    3535    enum SelectionType
    3636    {
    … …  
    5858    };
    5959
    60     QwtPickerMachine( SelectionType );
     60    explicit QwtPickerMachine( SelectionType );
    6161    virtual ~QwtPickerMachine();
    6262
    6363    //! Transition
    64     virtual QList<Command> transition(
    65         const QwtEventPattern &, const QEvent * ) = 0;
     64    virtual QList< Command > transition(
     65        const QwtEventPattern&, const QEvent* ) = 0;
    6666    void reset();
    6767
    … …  
    7171    SelectionType selectionType() const;
    7272
    73 private:
    74     const SelectionType d_selectionType;
    75     int d_state;
    76 };
    77 
    78 /*!
    79   \brief A state machine for indicating mouse movements
    80 
    81   QwtPickerTrackerMachine supports displaying information
    82   corresponding to mouse movements, but is not intended for
    83   selecting anything. Begin/End are related to Enter/Leave events.
    84 */
    85 class QWT_EXPORT QwtPickerTrackerMachine: public QwtPickerMachine
    86 {
    87 public:
     73  private:
     74    const SelectionType m_selectionType;
     75    int m_state;
     76};
     77
     78/*!
     79   \brief A state machine for indicating mouse movements
     80
     81   QwtPickerTrackerMachine supports displaying information
     82   corresponding to mouse movements, but is not intended for
     83   selecting anything. Begin/End are related to Enter/Leave events.
     84 */
     85class QWT_EXPORT QwtPickerTrackerMachine : public QwtPickerMachine
     86{
     87  public:
    8888    QwtPickerTrackerMachine();
    8989
    90     virtual QList<Command> transition(
    91         const QwtEventPattern &, const QEvent * );
    92 };
    93 
    94 /*!
    95   \brief A state machine for point selections
    96 
    97   Pressing QwtEventPattern::MouseSelect1 or
    98   QwtEventPattern::KeySelect1 selects a point.
    99 
    100   \sa QwtEventPattern::MousePatternCode, QwtEventPattern::KeyPatternCode
    101 */
    102 class QWT_EXPORT QwtPickerClickPointMachine: public QwtPickerMachine
    103 {
    104 public:
     90    virtual QList< Command > transition(
     91        const QwtEventPattern&, const QEvent* ) QWT_OVERRIDE;
     92};
     93
     94/*!
     95   \brief A state machine for point selections
     96
     97   Pressing QwtEventPattern::MouseSelect1 or
     98   QwtEventPattern::KeySelect1 selects a point.
     99
     100   \sa QwtEventPattern::MousePatternCode, QwtEventPattern::KeyPatternCode
     101 */
     102class QWT_EXPORT QwtPickerClickPointMachine : public QwtPickerMachine
     103{
     104  public:
    105105    QwtPickerClickPointMachine();
    106106
    107     virtual QList<Command> transition(
    108         const QwtEventPattern &, const QEvent * );
    109 };
    110 
    111 /*!
    112   \brief A state machine for point selections
    113 
    114   Pressing QwtEventPattern::MouseSelect1 or QwtEventPattern::KeySelect1
    115   starts the selection, releasing QwtEventPattern::MouseSelect1 or
    116   a second press of QwtEventPattern::KeySelect1 terminates it.
    117 */
    118 class QWT_EXPORT QwtPickerDragPointMachine: public QwtPickerMachine
    119 {
    120 public:
     107    virtual QList< Command > transition(
     108        const QwtEventPattern&, const QEvent* ) QWT_OVERRIDE;
     109};
     110
     111/*!
     112   \brief A state machine for point selections
     113
     114   Pressing QwtEventPattern::MouseSelect1 or QwtEventPattern::KeySelect1
     115   starts the selection, releasing QwtEventPattern::MouseSelect1 or
     116   a second press of QwtEventPattern::KeySelect1 terminates it.
     117 */
     118class QWT_EXPORT QwtPickerDragPointMachine : public QwtPickerMachine
     119{
     120  public:
    121121    QwtPickerDragPointMachine();
    122122
    123     virtual QList<Command> transition(
    124         const QwtEventPattern &, const QEvent * );
    125 };
    126 
    127 /*!
    128   \brief A state machine for rectangle selections
    129 
    130   Pressing QwtEventPattern::MouseSelect1 starts
    131   the selection, releasing it selects the first point. Pressing it
    132   again selects the second point and terminates the selection.
    133   Pressing QwtEventPattern::KeySelect1 also starts the
    134   selection, a second press selects the first point. A third one selects
    135   the second point and terminates the selection.
    136 
    137   \sa QwtEventPattern::MousePatternCode, QwtEventPattern::KeyPatternCode
    138 */
    139 
    140 class QWT_EXPORT QwtPickerClickRectMachine: public QwtPickerMachine
    141 {
    142 public:
     123    virtual QList< Command > transition(
     124        const QwtEventPattern&, const QEvent* ) QWT_OVERRIDE;
     125};
     126
     127/*!
     128   \brief A state machine for rectangle selections
     129
     130   Pressing QwtEventPattern::MouseSelect1 starts
     131   the selection, releasing it selects the first point. Pressing it
     132   again selects the second point and terminates the selection.
     133   Pressing QwtEventPattern::KeySelect1 also starts the
     134   selection, a second press selects the first point. A third one selects
     135   the second point and terminates the selection.
     136
     137   \sa QwtEventPattern::MousePatternCode, QwtEventPattern::KeyPatternCode
     138 */
     139
     140class QWT_EXPORT QwtPickerClickRectMachine : public QwtPickerMachine
     141{
     142  public:
    143143    QwtPickerClickRectMachine();
    144144
    145     virtual QList<Command> transition(
    146         const QwtEventPattern &, const QEvent * );
    147 };
    148 
    149 /*!
    150   \brief A state machine for rectangle selections
    151 
    152   Pressing QwtEventPattern::MouseSelect1 selects
    153   the first point, releasing it the second point.
    154   Pressing QwtEventPattern::KeySelect1 also selects the
    155   first point, a second press selects the second point and terminates
    156   the selection.
    157 
    158   \sa QwtEventPattern::MousePatternCode, QwtEventPattern::KeyPatternCode
    159 */
    160 
    161 class QWT_EXPORT QwtPickerDragRectMachine: public QwtPickerMachine
    162 {
    163 public:
     145    virtual QList< Command > transition(
     146        const QwtEventPattern&, const QEvent* ) QWT_OVERRIDE;
     147};
     148
     149/*!
     150   \brief A state machine for rectangle selections
     151
     152   Pressing QwtEventPattern::MouseSelect1 selects
     153   the first point, releasing it the second point.
     154   Pressing QwtEventPattern::KeySelect1 also selects the
     155   first point, a second press selects the second point and terminates
     156   the selection.
     157
     158   \sa QwtEventPattern::MousePatternCode, QwtEventPattern::KeyPatternCode
     159 */
     160
     161class QWT_EXPORT QwtPickerDragRectMachine : public QwtPickerMachine
     162{
     163  public:
    164164    QwtPickerDragRectMachine();
    165165
    166     virtual QList<Command> transition(
    167         const QwtEventPattern &, const QEvent * );
    168 };
    169 
    170 /*!
    171   \brief A state machine for line selections
    172 
    173   Pressing QwtEventPattern::MouseSelect1 selects
    174   the first point, releasing it the second point.
    175   Pressing QwtEventPattern::KeySelect1 also selects the
    176   first point, a second press selects the second point and terminates
    177   the selection.
    178 
    179   A common use case of QwtPickerDragLineMachine are pickers for
    180   distance measurements.
    181 
    182   \sa QwtEventPattern::MousePatternCode, QwtEventPattern::KeyPatternCode
    183 */
    184 
    185 class QWT_EXPORT QwtPickerDragLineMachine: public QwtPickerMachine
    186 {
    187 public:
     166    virtual QList< Command > transition(
     167        const QwtEventPattern&, const QEvent* ) QWT_OVERRIDE;
     168};
     169
     170/*!
     171   \brief A state machine for line selections
     172
     173   Pressing QwtEventPattern::MouseSelect1 selects
     174   the first point, releasing it the second point.
     175   Pressing QwtEventPattern::KeySelect1 also selects the
     176   first point, a second press selects the second point and terminates
     177   the selection.
     178
     179   A common use case of QwtPickerDragLineMachine are pickers for
     180   distance measurements.
     181
     182   \sa QwtEventPattern::MousePatternCode, QwtEventPattern::KeyPatternCode
     183 */
     184
     185class QWT_EXPORT QwtPickerDragLineMachine : public QwtPickerMachine
     186{
     187  public:
    188188    QwtPickerDragLineMachine();
    189189
    190     virtual QList<Command> transition(
    191         const QwtEventPattern &, const QEvent * );
    192 };
    193 
    194 /*!
    195   \brief A state machine for polygon selections
    196 
    197   Pressing QwtEventPattern::MouseSelect1 or QwtEventPattern::KeySelect1
    198   starts the selection and selects the first point, or appends a point.
    199   Pressing QwtEventPattern::MouseSelect2 or QwtEventPattern::KeySelect2
    200   appends the last point and terminates the selection.
    201 
    202   \sa QwtEventPattern::MousePatternCode, QwtEventPattern::KeyPatternCode
    203 */
    204 
    205 class QWT_EXPORT QwtPickerPolygonMachine: public QwtPickerMachine
    206 {
    207 public:
     190    virtual QList< Command > transition(
     191        const QwtEventPattern&, const QEvent* ) QWT_OVERRIDE;
     192};
     193
     194/*!
     195   \brief A state machine for polygon selections
     196
     197   Pressing QwtEventPattern::MouseSelect1 or QwtEventPattern::KeySelect1
     198   starts the selection and selects the first point, or appends a point.
     199   Pressing QwtEventPattern::MouseSelect2 or QwtEventPattern::KeySelect2
     200   appends the last point and terminates the selection.
     201
     202   \sa QwtEventPattern::MousePatternCode, QwtEventPattern::KeyPatternCode
     203 */
     204
     205class QWT_EXPORT QwtPickerPolygonMachine : public QwtPickerMachine
     206{
     207  public:
    208208    QwtPickerPolygonMachine();
    209209
    210     virtual QList<Command> transition(
    211         const QwtEventPattern &, const QEvent * );
     210    virtual QList< Command > transition(
     211        const QwtEventPattern&, const QEvent* ) QWT_OVERRIDE;
    212212};
    213213
Note: See TracChangeset for help on using the changeset viewer.