1
/***************************************************************************
4
begin : Fri Feb 27 2004
5
copyright : (C) 2004 by Scott Wheeler
6
email : wheeler@kde.org
7
***************************************************************************/
9
/***************************************************************************
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 *
13
* the Free Software Foundation; either version 2 of the License, or *
14
* (at your option) any later version. *
16
***************************************************************************/
18
#ifndef JUK_ACTIONCOLLECTION_H
19
#define JUK_ACTIONCOLLECTION_H
21
class KActionCollection;
24
namespace ActionCollection
27
* The global action collection for JuK.
29
KActionCollection *actions();
32
* Returns the action for the associated key from the global action
35
KAction *action(const char *key);
38
* Returns the action for the associated key but includes a cast to the
39
* type \a T. i.e. KSelectAction *a = action<KSelectAction>("chooser");
41
template <class T> T *action(const char *key)
43
return dynamic_cast<T *>(action(key));