Changeset View
Changeset View
Standalone View
Standalone View
tools/kpToolAction.cpp
Show All 35 Lines | |||||
36 | kpToolAction::kpToolAction(const QString &text, | 36 | kpToolAction::kpToolAction(const QString &text, | ||
37 | const QString &pic, const QList<QKeySequence> &shortcut, | 37 | const QString &pic, const QList<QKeySequence> &shortcut, | ||
38 | const QObject *receiver, const char *slot, | 38 | const QObject *receiver, const char *slot, | ||
39 | KActionCollection *ac, const QString &name) | 39 | KActionCollection *ac, const QString &name) | ||
40 | : KToggleAction(KDE::icon(pic), text, ac) | 40 | : KToggleAction(KDE::icon(pic), text, ac) | ||
41 | { | 41 | { | ||
42 | ac->setDefaultShortcuts(this, shortcut); | 42 | ac->setDefaultShortcuts(this, shortcut); | ||
43 | 43 | | |||
44 | | ||||
44 | if ( receiver && slot ) | 45 | if ( receiver && slot ) | ||
45 | connect(this, SIGNAL(triggered(bool)), receiver, slot); | 46 | connect (this, SIGNAL(triggered(bool)), receiver, slot); | ||
46 | 47 | | |||
47 | updateToolTip(); | 48 | updateToolTip(); | ||
48 | connect(this, SIGNAL(changed()), this, SLOT(updateToolTip())); | 49 | connect (this, &kpToolAction::changed, this, &kpToolAction::updateToolTip); | ||
49 | 50 | | |||
50 | ac->addAction(name, this); | 51 | ac->addAction(name, this); | ||
51 | } | 52 | } | ||
52 | 53 | | |||
53 | //--------------------------------------------------------------------- | 54 | //--------------------------------------------------------------------- | ||
54 | 55 | | |||
55 | // protected | 56 | // protected | ||
56 | void kpToolAction::updateToolTip() | 57 | void kpToolAction::updateToolTip() | ||
Show All 12 Lines |