Changeset View
Changeset View
Standalone View
Standalone View
src/widgets/MetaQueryWidget.h
Show First 20 Lines • Show All 48 Lines • ▼ Show 20 Line(s) | |||||
49 | { | 49 | { | ||
50 | Q_OBJECT | 50 | Q_OBJECT | ||
51 | 51 | | |||
52 | public: | 52 | public: | ||
53 | explicit TimeDistanceWidget( QWidget *parent = 0 ); | 53 | explicit TimeDistanceWidget( QWidget *parent = 0 ); | ||
54 | qint64 timeDistance() const; | 54 | qint64 timeDistance() const; | ||
55 | void setTimeDistance( qint64 value ); | 55 | void setTimeDistance( qint64 value ); | ||
56 | 56 | | |||
57 | template<typename Func> | 57 | template<class Receiver, class Func> | ||
58 | void connectChanged( typename QtPrivate::FunctionPointer<Func>::Object *receiver, Func slot ) | 58 | void connectChanged( Receiver receiver, Func slot ) | ||
59 | { | 59 | { | ||
60 | connect( m_timeEdit, QOverload<int>::of(&QSpinBox::valueChanged), | 60 | connect( m_timeEdit, QOverload<int>::of(&QSpinBox::valueChanged), | ||
61 | receiver, slot ); | 61 | receiver, slot ); | ||
62 | connect( m_unitSelection, QOverload<int>::of(&QComboBox::currentIndexChanged), | 62 | connect( m_unitSelection, QOverload<int>::of(&QComboBox::currentIndexChanged), | ||
63 | receiver, slot ); | 63 | receiver, slot ); | ||
64 | } | 64 | } | ||
65 | 65 | | |||
66 | protected: | 66 | protected: | ||
▲ Show 20 Lines • Show All 165 Lines • Show Last 20 Lines |