Changeset 11158 in ntrip for trunk/BNC/qwt/qwt_event_pattern.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_event_pattern.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_EVENT_PATTERN
    11 #define QWT_EVENT_PATTERN 1
     11#define QWT_EVENT_PATTERN
    1212
    1313#include "qwt_global.h"
     14
    1415#include <qnamespace.h>
    1516#include <qvector.h>
    … …  
    1920
    2021/*!
    21   \brief A collection of event patterns
    22 
    23   QwtEventPattern introduces an level of indirection for mouse and
    24   keyboard inputs. Those are represented by symbolic names, so
    25   the application code can be configured by individual mappings.
    26 
    27   \sa QwtPicker, QwtPickerMachine, QwtPlotZoomer
    28 */
     22   \brief A collection of event patterns
     23
     24   QwtEventPattern introduces an level of indirection for mouse and
     25   keyboard inputs. Those are represented by symbolic names, so
     26   the application code can be configured by individual mappings.
     27
     28   \sa QwtPicker, QwtPickerMachine, QwtPlotZoomer
     29 */
    2930class QWT_EXPORT QwtEventPattern
    3031{
    31 public:
     32  public:
    3233    /*!
    33       \brief Symbolic mouse input codes
    34 
    35       QwtEventPattern implements 3 different settings for
    36       mice with 1, 2, or 3 buttons that can be activated
    37       using initMousePattern(). The default setting is for
    38       3 button mice.
    39 
    40       Individual settings can be configured using setMousePattern().
    41 
    42       \sa initMousePattern(), setMousePattern(), setKeyPattern()
    43     */
     34       \brief Symbolic mouse input codes
     35
     36       QwtEventPattern implements 3 different settings for
     37       mice with 1, 2, or 3 buttons that can be activated
     38       using initMousePattern(). The default setting is for
     39       3 button mice.
     40
     41       Individual settings can be configured using setMousePattern().
     42
     43       \sa initMousePattern(), setMousePattern(), setKeyPattern()
     44     */
    4445    enum MousePatternCode
    4546    {
    4647        /*!
    47           The default setting for 1, 2 and 3 button mice is:
    48 
    49           - Qt::LeftButton
    50           - Qt::LeftButton
    51           - Qt::LeftButton
     48           The default setting for 1, 2 and 3 button mice is:
     49
     50           - Qt::LeftButton
     51           - Qt::LeftButton
     52           - Qt::LeftButton
    5253         */
    5354        MouseSelect1,
    5455
    5556        /*!
    56           The default setting for 1, 2 and 3 button mice is:
    57 
    58           - Qt::LeftButton + Qt::ControlModifier
    59           - Qt::RightButton
    60           - Qt::RightButton
     57           The default setting for 1, 2 and 3 button mice is:
     58
     59           - Qt::LeftButton + Qt::ControlModifier
     60           - Qt::RightButton
     61           - Qt::RightButton
    6162         */
    6263        MouseSelect2,
    6364
    6465        /*!
    65           The default setting for 1, 2 and 3 button mice is:
    66 
    67           - Qt::LeftButton + Qt::AltModifier
    68           - Qt::LeftButton + Qt::AltModifier
    69           - Qt::MidButton
     66           The default setting for 1, 2 and 3 button mice is:
     67
     68           - Qt::LeftButton + Qt::AltModifier
     69           - Qt::LeftButton + Qt::AltModifier
     70           - Qt::MidButton
    7071         */
    7172        MouseSelect3,
    7273
    7374        /*!
    74           The default setting for 1, 2 and 3 button mice is:
    75 
    76           - Qt::LeftButton + Qt::ShiftModifier
    77           - Qt::LeftButton + Qt::ShiftModifier
    78           - Qt::LeftButton + Qt::ShiftModifier
     75           The default setting for 1, 2 and 3 button mice is:
     76
     77           - Qt::LeftButton + Qt::ShiftModifier
     78           - Qt::LeftButton + Qt::ShiftModifier
     79           - Qt::LeftButton + Qt::ShiftModifier
    7980         */
    8081        MouseSelect4,
    8182
    8283        /*!
    83           The default setting for 1, 2 and 3 button mice is:
    84 
    85           - Qt::LeftButton + Qt::ControlButton | Qt::ShiftModifier
    86           - Qt::RightButton + Qt::ShiftModifier
    87           - Qt::RightButton + Qt::ShiftModifier
     84           The default setting for 1, 2 and 3 button mice is:
     85
     86           - Qt::LeftButton + Qt::ControlButton | Qt::ShiftModifier
     87           - Qt::RightButton + Qt::ShiftModifier
     88           - Qt::RightButton + Qt::ShiftModifier
    8889         */
    8990        MouseSelect5,
    9091
    9192        /*!
    92           The default setting for 1, 2 and 3 button mice is:
    93 
    94           - Qt::LeftButton + Qt::AltModifier + Qt::ShiftModifier
    95           - Qt::LeftButton + Qt::AltModifier | Qt::ShiftModifier
    96           - Qt::MidButton + Qt::ShiftModifier
     93           The default setting for 1, 2 and 3 button mice is:
     94
     95           - Qt::LeftButton + Qt::AltModifier + Qt::ShiftModifier
     96           - Qt::LeftButton + Qt::AltModifier | Qt::ShiftModifier
     97           - Qt::MidButton + Qt::ShiftModifier
    9798         */
    9899        MouseSelect6,
    … …  
    103104
    104105    /*!
    105       \brief Symbolic keyboard input codes
    106 
    107       Individual settings can be configured using setKeyPattern()
    108 
    109       \sa setKeyPattern(), setMousePattern()
    110     */
     106       \brief Symbolic keyboard input codes
     107
     108       Individual settings can be configured using setKeyPattern()
     109
     110       \sa setKeyPattern(), setMousePattern()
     111     */
    111112    enum KeyPatternCode
    112113    {
    … …  
    148149    class MousePattern
    149150    {
    150     public:
     151      public:
    151152        //! Constructor
    152153        MousePattern( Qt::MouseButton btn = Qt::NoButton,
    153                 Qt::KeyboardModifiers modifierCodes = Qt::NoModifier ):
     154            Qt::KeyboardModifiers modifierCodes = Qt::NoModifier ):
    154155            button( btn ),
    155156            modifiers( modifierCodes )
    … …  
    167168    class KeyPattern
    168169    {
    169     public:
     170      public:
    170171        //! Constructor
    171172        KeyPattern( int keyCode = Qt::Key_unknown,
    172                 Qt::KeyboardModifiers modifierCodes = Qt::NoModifier ):
     173            Qt::KeyboardModifiers modifierCodes = Qt::NoModifier ):
    173174            key( keyCode ),
    174175            modifiers( modifierCodes )
    … …  
    195196        Qt::KeyboardModifiers modifiers = Qt::NoModifier );
    196197
    197     void setMousePattern( const QVector<MousePattern> & );
    198     void setKeyPattern( const QVector<KeyPattern> & );
    199 
    200     const QVector<MousePattern> &mousePattern() const;
    201     const QVector<KeyPattern> &keyPattern() const;
    202 
    203     QVector<MousePattern> &mousePattern();
    204     QVector<KeyPattern> &keyPattern();
    205 
    206     bool mouseMatch( MousePatternCode, const QMouseEvent * ) const;
    207     bool keyMatch( KeyPatternCode, const QKeyEvent * ) const;
    208 
    209 protected:
    210     virtual bool mouseMatch( const MousePattern &, const QMouseEvent * ) const;
    211     virtual bool keyMatch( const KeyPattern &, const QKeyEvent * ) const;
    212 
    213 private:
    214 
    215 #if defined(_MSC_VER)
     198    void setMousePattern( const QVector< MousePattern >& );
     199    void setKeyPattern( const QVector< KeyPattern >& );
     200
     201    const QVector< MousePattern >& mousePattern() const;
     202    const QVector< KeyPattern >& keyPattern() const;
     203
     204    QVector< MousePattern >& mousePattern();
     205    QVector< KeyPattern >& keyPattern();
     206
     207    bool mouseMatch( MousePatternCode, const QMouseEvent* ) const;
     208    bool keyMatch( KeyPatternCode, const QKeyEvent* ) const;
     209
     210  protected:
     211    virtual bool mouseMatch( const MousePattern&, const QMouseEvent* ) const;
     212    virtual bool keyMatch( const KeyPattern&, const QKeyEvent* ) const;
     213
     214  private:
     215
     216#if defined( _MSC_VER )
    216217#pragma warning(push)
    217218#pragma warning(disable: 4251)
    218219#endif
    219     QVector<MousePattern> d_mousePattern;
    220     QVector<KeyPattern> d_keyPattern;
    221 #if defined(_MSC_VER)
     220    QVector< MousePattern > m_mousePattern;
     221    QVector< KeyPattern > m_keyPattern;
     222#if defined( _MSC_VER )
    222223#pragma warning(pop)
    223224#endif
    … …  
    226227//! Compare operator
    227228inline bool operator==( QwtEventPattern::MousePattern b1,
    228     QwtEventPattern::MousePattern  b2 )
     229    QwtEventPattern::MousePattern b2 )
    229230{
    230231    return b1.button == b2.button && b1.modifiers == b2.modifiers;
    … …  
    233234//! Compare operator
    234235inline bool operator==( QwtEventPattern::KeyPattern b1,
    235    QwtEventPattern::KeyPattern  b2 )
     236    QwtEventPattern::KeyPattern b2 )
    236237{
    237238    return b1.key == b2.key && b1.modifiers == b2.modifiers;
Note: See TracChangeset for help on using the changeset viewer.