FougTools  0.7.0dev-046fb6a
Handy tools for C++, Qt and OpenCascade
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Static Public Member Functions | List of all members
qtcore::QSignalMapperUtils Class Reference

Provides a collection of tools around QSignalMapper. More...

#include <qttools/core/qsignal_mapper_utils.h>

Public Types

typedef void(QSignalMapper::* SignalMapped_int )(int)
 
typedef void(QSignalMapper::* SignalMapped_QString )(const QString &)
 
typedef void(QSignalMapper::* SignalMapped_QWidgetPtr )(QWidget *)
 
typedef void(QSignalMapper::* SignalMapped_QObjectPtr )(QObject *)
 
typedef void(QSignalMapper::* SlotMap )()
 
typedef void(QSignalMapper::* SlotMap_QObjectPtr )(QObject *)
 

Static Public Member Functions

static SignalMapped_int signalMapped_int ()
 
static SignalMapped_QString signalMapped_QString ()
 
static SignalMapped_QWidgetPtr signalMapped_QWidgetPtr ()
 
static SignalMapped_QObjectPtr signalMapped_QObjectPtr ()
 
static SlotMap slotMap ()
 Returns the member function pointer(Qt slot) to QSignalMapper::map() More...
 
static SlotMap_QObjectPtr slotMap_QObjectPtr ()
 

Detailed Description

Provides a collection of tools around QSignalMapper.

Member Typedef Documentation

typedef void(QSignalMapper::* qtcore::QSignalMapperUtils::SignalMapped_int)(int)
typedef void(QSignalMapper::* qtcore::QSignalMapperUtils::SignalMapped_QObjectPtr)(QObject *)
typedef void(QSignalMapper::* qtcore::QSignalMapperUtils::SignalMapped_QString)(const QString &)
typedef void(QSignalMapper::* qtcore::QSignalMapperUtils::SignalMapped_QWidgetPtr)(QWidget *)
typedef void(QSignalMapper::* qtcore::QSignalMapperUtils::SlotMap)()
typedef void(QSignalMapper::* qtcore::QSignalMapperUtils::SlotMap_QObjectPtr)(QObject *)

Member Function Documentation

QSignalMapperUtils::SignalMapped_int qtcore::QSignalMapperUtils::signalMapped_int ( )
static

Returns the member function pointer(Qt signal) to QSignalMapper::mapped(int)

This is a helper to disambiguate and choose the right QSignalMapper::mapped() signal overload. It is particularly useful for the new Qt5 QObject::connect() syntax.
Example :

// Error: the compiler doesn't know the right QSignalMapper::mapped()
// overload to pick
QObject::connect(sigMap, &QSignalMapper::mapped, this, &MyClass:onSigMapped);
// You have to specify the signal overload :
QObject::connect(sigMap, (void QSignalMapper::*(int))&QSignalMapper::mapped,
this, &MyClass:onSigMapped);
// More readable :
this, &MyClass:onSigMapped);
QSignalMapperUtils::SignalMapped_QObjectPtr qtcore::QSignalMapperUtils::signalMapped_QObjectPtr ( )
static

Returns the member function pointer(Qt signal) to QSignalMapper::mapped(QObject*)

See also
QSignalMapperUtils::signalMapped_int()
QSignalMapperUtils::SignalMapped_QString qtcore::QSignalMapperUtils::signalMapped_QString ( )
static

Returns the member function pointer(Qt signal) to QSignalMapper::mapped(const QString&)

See also
QSignalMapperUtils::signalMapped_int()
QSignalMapperUtils::SignalMapped_QWidgetPtr qtcore::QSignalMapperUtils::signalMapped_QWidgetPtr ( )
static

Returns the member function pointer(Qt signal) to QSignalMapper::mapped(QWidget*)

See also
QSignalMapperUtils::signalMapped_int()
QSignalMapperUtils::SlotMap qtcore::QSignalMapperUtils::slotMap ( )
static

Returns the member function pointer(Qt slot) to QSignalMapper::map()

This is a helper to disambiguate and choose the right QSignalMapper::map() slot overload. It is particularly useful for the new Qt5 QObject::connect() syntax.
Example :

// Error: the compiler doesn't know the right QSignalMapper::map()
// overload to pick
QObject::connect(action, &QAction::triggered, sigMap, &QSignalMapper::map);
// You have to specify the slot overload :
QObject::connect(action, &QAction::triggered,
sigMap, (void QSignalMapper::*())&QSignalMapper::map);
// More readable :
QObject::connect(action, &QAction::triggered,
QSignalMapperUtils::SlotMap_QObjectPtr qtcore::QSignalMapperUtils::slotMap_QObjectPtr ( )
static

Returns the member function pointer(Qt slot) to QSignalMapper::map(QObject*)

See also
QSignalMapperUtils::slotMap()

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