QtBase  v6.3.1
Public Types | Public Slots | Public Attributes | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
tst_QShortcut Class Reference
Inheritance diagram for tst_QShortcut:
Inheritance graph
[legend]
Collaboration diagram for tst_QShortcut:
Collaboration graph
[legend]

Public Types

enum  Action { SetupAccel , TestAccel , ClearAll , TestEnd }
 
enum  Widget {
  NoWidget , TriggerSlot1 , TriggerSlot2 , TriggerSlot3 ,
  TriggerSlot4 , TriggerSlot5 , TriggerSlot6 , TriggerSlot7
}
 
enum  Result {
  NoResult , Slot1Triggered , Slot2Triggered , Slot3Triggered ,
  Slot4Triggered , Slot5Triggered , Slot6Triggered , Slot7Triggered ,
  SentKeyEvent , Ambiguous
}
 

Public Slots

void slotTrig1 ()
 
void slotTrig2 ()
 
void slotTrig3 ()
 
void slotTrig4 ()
 
void slotTrig5 ()
 
void slotTrig6 ()
 
void slotTrig7 ()
 
void ambigSlot1 ()
 
void ambigSlot2 ()
 
void ambigSlot3 ()
 
void ambigSlot4 ()
 
void ambigSlot5 ()
 
void ambigSlot6 ()
 
void ambigSlot7 ()
 
- Public Slots inherited from QObject
void deleteLater ()
 

Public Attributes

enum tst_QShortcut::Result currentResult = NoResult
 

Protected Member Functions

void defElements ()
 
QShortcutsetupShortcut (QWidget *parent, const QString &name, const QKeySequence &ks, Qt::ShortcutContext context=Qt::WindowShortcut)
 
QShortcutsetupShortcut (QWidget *parent, const QString &name, Widget testWidget, const QKeySequence &ks, Qt::ShortcutContext context=Qt::WindowShortcut)
 
void sendKeyEvents (QWidget *w, QKeyCombination k1, QChar c1={})
 
void testElement ()
 
- Protected Member Functions inherited from QObject
QObjectsender () const
 
int senderSignalIndex () const
 
int receivers (const char *signal) const
 
bool isSignalConnected (const QMetaMethod &signal) const
 
virtual void timerEvent (QTimerEvent *event)
 
virtual void childEvent (QChildEvent *event)
 
virtual void customEvent (QEvent *event)
 
virtual void connectNotify (const QMetaMethod &signal)
 
virtual void disconnectNotify (const QMetaMethod &signal)
 
 QObject (QObjectPrivate &dd, QObject *parent=nullptr)
 

Static Protected Member Functions

static Qt::KeyboardModifiers toButtons (int key)
 
static void sendKeyEvents (QWidget *w, int k1, QChar c1={}, int k2=0, QChar c2={}, int k3=0, QChar c3={}, int k4=0, QChar c4={})
 

Protected Attributes

Result ambigResult
 
QScopedPointer< MainWindowmainWindow
 
- Protected Attributes inherited from QObject
QScopedPointer< QObjectDatad_ptr
 

Additional Inherited Members

- Signals inherited from QObject
void destroyed (QObject *=nullptr)
 
void objectNameChanged (const QString &objectName, QPrivateSignal)
 
- Public Member Functions inherited from QObject
Q_INVOKABLE QObject (QObject *parent=nullptr)
 
virtual ~QObject ()
 
virtual bool event (QEvent *event)
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
QString objectName () const
 
void setObjectName (const QString &name)
 
QBindable< QStringbindableObjectName ()
 
bool isWidgetType () const
 
bool isWindowType () const
 
bool signalsBlocked () const noexcept
 
bool blockSignals (bool b) noexcept
 
QThreadthread () const
 
void moveToThread (QThread *thread)
 
int startTimer (int interval, Qt::TimerType timerType=Qt::CoarseTimer)
 
void killTimer (int id)
 
template<typename T >
T findChild (const QString &aName=QString(), Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 
template<typename T >
QList< TfindChildren (const QString &aName, Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 
template<typename T >
QList< TfindChildren (Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 
const QObjectListchildren () const
 
void setParent (QObject *parent)
 
void installEventFilter (QObject *filterObj)
 
void removeEventFilter (QObject *obj)
 
QMetaObject::Connection connect (const QObject *sender, const char *signal, const char *member, Qt::ConnectionType type=Qt::AutoConnection) const
 
bool disconnect (const char *signal=nullptr, const QObject *receiver=nullptr, const char *member=nullptr) const
 
bool disconnect (const QObject *receiver, const char *member=nullptr) const
 
void dumpObjectTree () const
 
void dumpObjectInfo () const
 
bool setProperty (const char *name, const QVariant &value)
 
QVariant property (const char *name) const
 
QList< QByteArraydynamicPropertyNames () const
 
QBindingStoragebindingStorage ()
 
const QBindingStoragebindingStorage () const
 
QObjectparent () const
 
bool inherits (const char *classname) const
 
- Static Public Member Functions inherited from QObject
static QMetaObject::Connection connect (const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
 
static QMetaObject::Connection connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type=Qt::AutoConnection)
 
template<typename Func1 , typename Func2 >
static QMetaObject::Connection connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiver, Func2 slot, Qt::ConnectionType type=Qt::AutoConnection)
 
static QMetaObject::Connection ::type connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, Func2 slot)
 
static QMetaObject::Connection ::type connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const QObject *context, Func2 slot, Qt::ConnectionType type=Qt::AutoConnection)
 
template<typename Func1 , typename Func2 >
static std::enable_if< QtPrivate::FunctionPointer< Func2 >::ArgumentCount==-1 &&!std::is_convertible_v< Func2, const char * >, QMetaObject::Connection >::type connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, Func2 slot)
 
template<typename Func1 , typename Func2 >
static std::enable_if< QtPrivate::FunctionPointer< Func2 >::ArgumentCount==-1 &&!std::is_convertible_v< Func2, const char * >, QMetaObject::Connection >::type connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const QObject *context, Func2 slot, Qt::ConnectionType type=Qt::AutoConnection)
 
static bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *member)
 
static bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &member)
 
static bool disconnect (const QMetaObject::Connection &)
 
template<typename Func1 , typename Func2 >
static bool disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiver, Func2 slot)
 
template<typename Func1 >
static bool disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const QObject *receiver, void **zero)
 
- Properties inherited from QObject
QString objectName
 the name of this object More...
 

Detailed Description

Definition at line 37 of file tst_qshortcut.cpp.

Member Enumeration Documentation

◆ Action

Enumerator
SetupAccel 
TestAccel 
ClearAll 
TestEnd 

Definition at line 117 of file tst_qshortcut.cpp.

◆ Result

Enumerator
NoResult 
Slot1Triggered 
Slot2Triggered 
Slot3Triggered 
Slot4Triggered 
Slot5Triggered 
Slot6Triggered 
Slot7Triggered 
SentKeyEvent 
Ambiguous 

Definition at line 137 of file tst_qshortcut.cpp.

◆ Widget

Enumerator
NoWidget 
TriggerSlot1 
TriggerSlot2 
TriggerSlot3 
TriggerSlot4 
TriggerSlot5 
TriggerSlot6 
TriggerSlot7 

Definition at line 125 of file tst_qshortcut.cpp.

Member Function Documentation

◆ ambigSlot1

void tst_QShortcut::ambigSlot1 ( )
inlineslot

Definition at line 159 of file tst_qshortcut.cpp.

◆ ambigSlot2

void tst_QShortcut::ambigSlot2 ( )
inlineslot

Definition at line 160 of file tst_qshortcut.cpp.

◆ ambigSlot3

void tst_QShortcut::ambigSlot3 ( )
inlineslot

Definition at line 161 of file tst_qshortcut.cpp.

◆ ambigSlot4

void tst_QShortcut::ambigSlot4 ( )
inlineslot

Definition at line 162 of file tst_qshortcut.cpp.

◆ ambigSlot5

void tst_QShortcut::ambigSlot5 ( )
inlineslot

Definition at line 163 of file tst_qshortcut.cpp.

◆ ambigSlot6

void tst_QShortcut::ambigSlot6 ( )
inlineslot

Definition at line 164 of file tst_qshortcut.cpp.

◆ ambigSlot7

void tst_QShortcut::ambigSlot7 ( )
inlineslot

Definition at line 165 of file tst_qshortcut.cpp.

◆ defElements()

void tst_QShortcut::defElements ( )
protected

Definition at line 271 of file tst_qshortcut.cpp.

◆ sendKeyEvents() [1/2]

void tst_QShortcut::sendKeyEvents ( QWidget w,
int  k1,
QChar  c1 = {},
int  k2 = 0,
QChar  c2 = {},
int  k3 = 0,
QChar  c3 = {},
int  k4 = 0,
QChar  c4 = {} 
)
staticprotected

Definition at line 1238 of file tst_qshortcut.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sendKeyEvents() [2/2]

void tst_QShortcut::sendKeyEvents ( QWidget w,
QKeyCombination  k1,
QChar  c1 = {} 
)
inlineprotected

Definition at line 196 of file tst_qshortcut.cpp.

◆ setupShortcut() [1/2]

QShortcut * tst_QShortcut::setupShortcut ( QWidget parent,
const QString name,
const QKeySequence ks,
Qt::ShortcutContext  context = Qt::WindowShortcut 
)
protected

Definition at line 1189 of file tst_qshortcut.cpp.

Here is the caller graph for this function:

◆ setupShortcut() [2/2]

QShortcut * tst_QShortcut::setupShortcut ( QWidget parent,
const QString name,
Widget  testWidget,
const QKeySequence ks,
Qt::ShortcutContext  context = Qt::WindowShortcut 
)
protected

Definition at line 1197 of file tst_qshortcut.cpp.

◆ slotTrig1

void tst_QShortcut::slotTrig1 ( )
inlineslot

Definition at line 152 of file tst_qshortcut.cpp.

◆ slotTrig2

void tst_QShortcut::slotTrig2 ( )
inlineslot

Definition at line 153 of file tst_qshortcut.cpp.

◆ slotTrig3

void tst_QShortcut::slotTrig3 ( )
inlineslot

Definition at line 154 of file tst_qshortcut.cpp.

◆ slotTrig4

void tst_QShortcut::slotTrig4 ( )
inlineslot

Definition at line 155 of file tst_qshortcut.cpp.

◆ slotTrig5

void tst_QShortcut::slotTrig5 ( )
inlineslot

Definition at line 156 of file tst_qshortcut.cpp.

◆ slotTrig6

void tst_QShortcut::slotTrig6 ( )
inlineslot

Definition at line 157 of file tst_qshortcut.cpp.

◆ slotTrig7

void tst_QShortcut::slotTrig7 ( )
inlineslot

Definition at line 158 of file tst_qshortcut.cpp.

◆ testElement()

void tst_QShortcut::testElement ( )
protected

Definition at line 1275 of file tst_qshortcut.cpp.

Here is the call graph for this function:

◆ toButtons()

Qt::KeyboardModifiers tst_QShortcut::toButtons ( int  key)
staticprotected

Definition at line 257 of file tst_qshortcut.cpp.

Here is the caller graph for this function:

Member Data Documentation

◆ ambigResult

Result tst_QShortcut::ambigResult
protected

Definition at line 201 of file tst_qshortcut.cpp.

◆ currentResult

enum tst_QShortcut::Result tst_QShortcut::currentResult = NoResult

◆ mainWindow

QScopedPointer<MainWindow> tst_QShortcut::mainWindow
protected

Definition at line 202 of file tst_qshortcut.cpp.


The documentation for this class was generated from the following file: