kexi
KexiActionProxy Class Reference
#include <kexiactionproxy.h>
Inheritance diagram for KexiActionProxy:

Detailed Description
An interface that acts as proxy for shared actions within the application.For example, edit->copy action can be reused to copy different types of items. Availability and meaning of given action depends on the context, while the context changes e.g. when another window is activated. This class is mostly used by subclassing in KexiDialogBase or KexiDockBase
- you can subclass in a similar way.
Definition at line 83 of file kexiactionproxy.h.
Public Member Functions | |
KexiActionProxy (QObject *receiver, KexiSharedActionHost *host=0) | |
virtual | ~KexiActionProxy () |
bool | activateSharedAction (const char *action_name, bool alsoCheckInChildren=true) |
void | setSharedActionHost (KexiSharedActionHost &host) |
bool | isAvailable (const char *action_name, bool alsoCheckInChildren=true) const |
bool | isSupported (const char *action_name) const |
void | setActionProxyParent_internal (KexiActionProxy *parent) |
Public Attributes | |
KexiActionProxy * | m_focusedChild |
Protected Member Functions | |
void | plugSharedAction (const char *action_name, QObject *receiver, const char *slot) |
void | unplugSharedAction (const char *action_name) |
void | plugSharedAction (const char *action_name, const char *slot) |
int | plugSharedAction (const char *action_name, QWidget *w) |
void | plugSharedActionToExternalGUI (const char *action_name, KXMLGUIClient *client) |
void | plugSharedActionsToExternalGUI (const QValueList< QCString > &action_names, KXMLGUIClient *client) |
void | unplugSharedAction (const char *action_name, QWidget *w) |
KAction * | plugSharedAction (const char *action_name, const QString &alternativeText, QWidget *w) |
virtual KAction * | sharedAction (const char *action_name) |
QObject * | receiver () const |
virtual void | setAvailable (const char *action_name, bool set) |
void | addActionProxyChild (KexiActionProxy *child) |
void | takeActionProxyChild (KexiActionProxy *child) |
Protected Attributes | |
KexiSharedActionHost * | m_host |
QGuardedPtr< QObject > | m_receiver |
QAsciiDict< QPair< QSignal *, bool > > | m_signals |
QPtrList< KexiActionProxy > | m_sharedActionChildren |
QPtrList< KAction > | m_alternativeActions |
KexiActionProxy * | m_actionProxyParent |
QObject | m_signal_parent |
KAction_setEnabled_Helper * | m_KAction_setEnabled_helper |
Friends | |
class | KexiSharedActionHost |
class | KAction_setEnabled_Helper |
class | KexiSharedActionConnector |
Constructor & Destructor Documentation
|
Constructs action proxy for object receiver, using host. If host is NULL, KexiSharedActionHost::defaultHost() is used. (you must be sure that it's true) -- it is casted to QObject and assigned as the receiver. Definition at line 78 of file kexiactionproxy.cpp. |
Member Function Documentation
|
Activates action named action_name for this proxy. If the action is executed (accepted), true is returned. Definition at line 192 of file kexiactionproxy.cpp. |
|
Adds child of this proxy. Children will receive activateSharedAction() event, If activateSharedAction() "event" is not consumed by the main proxy, we start to iterate over proxy children (in unspecified order) to and call activateSharedAction() on every child until one of them accept the "event". If proxy child is destroyed, it is automatically detached from its parent proxy. Parent proxy is 0 by default. This pointer is properly cleared when parent proxy is destroyed. Definition at line 262 of file kexiactionproxy.cpp. |
|
Definition at line 233 of file kexiactionproxy.cpp. |
|
Definition at line 216 of file kexiactionproxy.cpp. |
|
Like above, but creates alternative action as a copy of action_name, with alternativeText set. When this action is activated, just original action specified by action_name is activated. The aternative action has autmatically set name as: action_name + "_alt".
Definition at line 151 of file kexiactionproxy.cpp. |
|
Plugs action named action_name to a widget w, so the action is visible on this widget as an item. w will typically be a menu, popup menu or a toolbar. Does nothing if no action found, so generally this is safer than just caling e.g.
Definition at line 131 of file kexiactionproxy.cpp. |
|
Typical version of plugAction() method -- plugs action named action_name to slot slot in _this_ widget. Definition at line 116 of file kexiactionproxy.h. |
|
Plugs shared action named action_name to slot slot in receiver. Receiver is usually a child of _this_ widget. Definition at line 109 of file kexiactionproxy.cpp. |
|
For internal use by addActionProxyChild(). parent can be 0.
Definition at line 276 of file kexiactionproxy.cpp. |
|
Sets host to host; rerely used. Definition at line 97 of file kexiactionproxy.h. |
|
Reimplemented in KexiViewBase. Definition at line 211 of file kexiactionproxy.cpp. |
|
Unplugs action named action_name from a widget w. Definition at line 141 of file kexiactionproxy.cpp. |
Member Data Documentation
|
For internal use by plugSharedActionToExternalGUI().
Definition at line 175 of file kexiactionproxy.h. |
|
it's just to have common parent for owned signals
Definition at line 172 of file kexiactionproxy.h. |
The documentation for this class was generated from the following files: