Changeset View
Changeset View
Standalone View
Standalone View
src/guiutils.h
1 | /*************************************************************************** | 1 | /*************************************************************************** | ||
---|---|---|---|---|---|
2 | kdiff3.h - description | 2 | kdiff3.h - description | ||
3 | ------------------- | 3 | ------------------- | ||
4 | begin : March 26 17:44 CEST 2002 | 4 | begin : March 26 17:44 CEST 2002 | ||
5 | copyright : (c) 2008 by Valentin Rusu | 5 | copyright : (c) 2008 by Valentin Rusu | ||
6 | email : kde at rusu.info | 6 | email : kde at rusu.info | ||
7 | ***************************************************************************/ | 7 | ***************************************************************************/ | ||
8 | 8 | | |||
9 | /*************************************************************************** | 9 | /*************************************************************************** | ||
10 | * * | 10 | * * | ||
11 | * This program is free software; you can redistribute it and/or modify * | 11 | * This program is free software; you can redistribute it and/or modify * | ||
12 | * it under the terms of the GNU General Public License as published by * | 12 | * it under the terms of the GNU General Public License as published by * | ||
13 | * the Free Software Foundation; either version 3 of the License, or * | 13 | * the Free Software Foundation; either version 3 of the License, or * | ||
14 | * (at your option) any later version. * | 14 | * (at your option) any later version. * | ||
15 | * * | 15 | * * | ||
16 | ***************************************************************************/ | 16 | ***************************************************************************/ | ||
17 | #ifndef GUIUTILS_H | ||||
18 | #define GUIUTILS_H | ||||
17 | 19 | | |||
18 | #include <QObject> | 20 | #include <QObject> | ||
19 | #include <kactioncollection.h> | 21 | #include <kactioncollection.h> | ||
20 | 22 | | |||
21 | namespace KDiff3 { | 23 | namespace KDiff3 { | ||
22 | 24 | | |||
23 | template <class T> | 25 | template <class T> | ||
24 | T* createAction( | 26 | T* createAction( | ||
▲ Show 20 Lines • Show All 98 Lines • ▼ Show 20 Line(s) | 117 | T* createAction( | |||
123 | const QString &actionName) | 125 | const QString &actionName) | ||
124 | { | 126 | { | ||
125 | T* theAction = createAction<T>( text, shortcut, receiver, slot, ac, actionName ); | 127 | T* theAction = createAction<T>( text, shortcut, receiver, slot, ac, actionName ); | ||
126 | theAction->setIcon( icon ); | 128 | theAction->setIcon( icon ); | ||
127 | theAction->setIconText( iconText ); | 129 | theAction->setIconText( iconText ); | ||
128 | return theAction; | 130 | return theAction; | ||
129 | } | 131 | } | ||
130 | } | 132 | } | ||
133 | | ||||
134 | #endif |