summaryrefslogtreecommitdiffstats
path: root/kexi/core
diff options
context:
space:
mode:
Diffstat (limited to 'kexi/core')
-rw-r--r--kexi/core/kexiactionproxy.cpp30
-rw-r--r--kexi/core/kexiactionproxy.h16
-rw-r--r--kexi/core/kexiactionproxy_p.h4
-rw-r--r--kexi/core/kexidialogbase.h2
-rw-r--r--kexi/core/keximainwindow.h2
-rw-r--r--kexi/core/kexipart.cpp36
-rw-r--r--kexi/core/kexipart.h40
-rw-r--r--kexi/core/kexipartinfo.h2
-rw-r--r--kexi/core/kexisharedactionhost.cpp54
-rw-r--r--kexi/core/kexisharedactionhost.h34
-rw-r--r--kexi/core/kexisharedactionhost_p.h6
-rw-r--r--kexi/core/kexiuseraction.cpp6
-rw-r--r--kexi/core/kexiuseraction.h8
-rw-r--r--kexi/core/kexiviewbase.cpp10
-rw-r--r--kexi/core/kexiviewbase.h2
15 files changed, 126 insertions, 126 deletions
diff --git a/kexi/core/kexiactionproxy.cpp b/kexi/core/kexiactionproxy.cpp
index 851a4d3a..72004434 100644
--- a/kexi/core/kexiactionproxy.cpp
+++ b/kexi/core/kexiactionproxy.cpp
@@ -29,16 +29,16 @@
#include <tqsignal.h>
#include <tqiconset.h>
-KAction_setEnabled_Helper::KAction_setEnabled_Helper(KexiActionProxy* proxy)
- : TQObject(0,"KAction_setEnabled_Helper")
+TDEAction_setEnabled_Helper::TDEAction_setEnabled_Helper(KexiActionProxy* proxy)
+ : TQObject(0,"TDEAction_setEnabled_Helper")
, m_proxy( proxy )
{
}
-void KAction_setEnabled_Helper::slotSetEnabled(bool enabled)
+void TDEAction_setEnabled_Helper::slotSetEnabled(bool enabled)
{
- if (sender()->inherits("KAction")) {
- const KAction *a = static_cast<const KAction*>(sender());
+ if (sender()->inherits("TDEAction")) {
+ const TDEAction *a = static_cast<const TDEAction*>(sender());
m_proxy->setAvailable(a->name(), enabled);
}
}
@@ -81,7 +81,7 @@ KexiActionProxy::KexiActionProxy(TQObject *receiver, KexiSharedActionHost *host)
, m_signals(47)
, m_actionProxyParent(0)
, m_signal_parent( 0, "signal_parent" )
- , m_KAction_setEnabled_helper( new KAction_setEnabled_Helper(this) )
+ , m_TDEAction_setEnabled_helper( new TDEAction_setEnabled_Helper(this) )
, m_focusedChild(0)
{
m_signals.setAutoDelete(true);
@@ -103,7 +103,7 @@ KexiActionProxy::~KexiActionProxy()
m_host->takeActionProxyFor(m_receiver);
- delete m_KAction_setEnabled_helper;
+ delete m_TDEAction_setEnabled_helper;
}
void KexiActionProxy::plugSharedAction(const char *action_name, TQObject* receiver, const char *slot)
@@ -130,7 +130,7 @@ void KexiActionProxy::unplugSharedAction(const char *action_name)
int KexiActionProxy::plugSharedAction(const char *action_name, TQWidget* w)
{
- KAction *a = sharedAction(action_name);
+ TDEAction *a = sharedAction(action_name);
if (!a) {
kdWarning() << "KexiActionProxy::plugSharedAction(): NO SUCH ACTION: " << action_name << endl;
return -1;
@@ -140,7 +140,7 @@ int KexiActionProxy::plugSharedAction(const char *action_name, TQWidget* w)
void KexiActionProxy::unplugSharedAction(const char *action_name, TQWidget* w)
{
- KAction *a = sharedAction(action_name);
+ TDEAction *a = sharedAction(action_name);
if (!a) {
kdWarning() << "KexiActionProxy::unplugSharedAction(): NO SUCH ACTION: " << action_name << endl;
return;
@@ -148,16 +148,16 @@ void KexiActionProxy::unplugSharedAction(const char *action_name, TQWidget* w)
a->unplug(w);
}
-KAction* KexiActionProxy::plugSharedAction(const char *action_name, const TQString& alternativeText, TQWidget* w)
+TDEAction* KexiActionProxy::plugSharedAction(const char *action_name, const TQString& alternativeText, TQWidget* w)
{
- KAction *a = sharedAction(action_name);
+ TDEAction *a = sharedAction(action_name);
if (!a) {
kdWarning() << "KexiActionProxy::plugSharedAction(): NO SUCH ACTION: " << action_name << endl;
return 0;
}
TQCString altName = a->name();
altName += "_alt";
- KAction *alt_act = new KAction(alternativeText, a->iconSet(), a->shortcut(),
+ TDEAction *alt_act = new TDEAction(alternativeText, a->iconSet(), a->shortcut(),
0, 0, a->parent(), altName);
TQObject::connect(alt_act, TQT_SIGNAL(activated()), a, TQT_SLOT(activate()));
alt_act->plug(w);
@@ -170,7 +170,7 @@ KAction* KexiActionProxy::plugSharedAction(const char *action_name, const TQStri
void KexiActionProxy::plugSharedActionToExternalGUI(const char *action_name, KXMLGUIClient *client)
{
- KAction *a = client->action(action_name);
+ TDEAction *a = client->action(action_name);
if (!a)
return;
plugSharedAction(a->name(), a, TQT_SLOT(activate()));
@@ -178,7 +178,7 @@ void KexiActionProxy::plugSharedActionToExternalGUI(const char *action_name, KXM
//update availability
setAvailable(a->name(), a->isEnabled());
//changes will be signaled
- TQObject::connect(a, TQT_SIGNAL(enabled(bool)), m_KAction_setEnabled_helper, TQT_SLOT(slotSetEnabled(bool)));
+ TQObject::connect(a, TQT_SIGNAL(enabled(bool)), m_TDEAction_setEnabled_helper, TQT_SLOT(slotSetEnabled(bool)));
}
void KexiActionProxy::plugSharedActionsToExternalGUI(
@@ -208,7 +208,7 @@ bool KexiActionProxy::activateSharedAction(const char *action_name, bool alsoChe
return true;
}
-KAction* KexiActionProxy::sharedAction(const char* action_name)
+TDEAction* KexiActionProxy::sharedAction(const char* action_name)
{
return m_host->mainWindow()->actionCollection()->action(action_name);
}
diff --git a/kexi/core/kexiactionproxy.h b/kexi/core/kexiactionproxy.h
index 163efced..d9868976 100644
--- a/kexi/core/kexiactionproxy.h
+++ b/kexi/core/kexiactionproxy.h
@@ -32,9 +32,9 @@
#include "kexisharedactionhost.h"
class TQSignal;
-class KAction;
+class TDEAction;
class KXMLGUIClient;
-class KAction_setEnabled_Helper;
+class TDEAction_setEnabled_Helper;
class KexiActionProxy;
//! Abstract helper class used to connect shared actions from outside of shared-action-aware object.
@@ -122,7 +122,7 @@ class KEXICORE_EXPORT KexiActionProxy
Does nothing if no action found, so generally this is safer than just caling e.g.
<code> action("myaction")->plug(myPopup); </code>
\return index of inserted item, or -1 if there is not action with name \a action_name.
- \sa action(), KAction::plug(TQWidget*, int) */
+ \sa action(), TDEAction::plug(TQWidget*, int) */
int plugSharedAction(const char *action_name, TQWidget* w);
void plugSharedActionToExternalGUI(const char *action_name, KXMLGUIClient *client);
@@ -139,10 +139,10 @@ class KEXICORE_EXPORT KexiActionProxy
specified by \a action_name is activated. The aternative action has autmatically set name as:
action_name + "_alt".
\return newly created action or 0 if \a action_name not found. */
- KAction* plugSharedAction(const char *action_name, const TQString& alternativeText, TQWidget* w);
+ TDEAction* plugSharedAction(const char *action_name, const TQString& alternativeText, TQWidget* w);
/*! \return action named with \a name or NULL if there is no such action. */
- virtual KAction* sharedAction(const char* action_name);
+ virtual TDEAction* sharedAction(const char* action_name);
inline TQObject *receiver() const { return m_receiver; }
@@ -165,14 +165,14 @@ class KEXICORE_EXPORT KexiActionProxy
TQPtrList<KexiActionProxy> m_sharedActionChildren;
- TQPtrList<KAction> m_alternativeActions;
+ TQPtrList<TDEAction> m_alternativeActions;
KexiActionProxy* m_actionProxyParent;
TQObject m_signal_parent; //!< it's just to have common parent for owned signals
//! For internal use by plugSharedActionToExternalGUI()
- KAction_setEnabled_Helper *m_KAction_setEnabled_helper;
+ TDEAction_setEnabled_Helper *m_TDEAction_setEnabled_helper;
public:
//! For internal use by addActionProxyChild(). \a parent can be 0.
@@ -182,7 +182,7 @@ class KEXICORE_EXPORT KexiActionProxy
KexiActionProxy *m_focusedChild;
friend class KexiSharedActionHost;
- friend class KAction_setEnabled_Helper;
+ friend class TDEAction_setEnabled_Helper;
friend class KexiSharedActionConnector;
};
diff --git a/kexi/core/kexiactionproxy_p.h b/kexi/core/kexiactionproxy_p.h
index 07931b9c..57d351ce 100644
--- a/kexi/core/kexiactionproxy_p.h
+++ b/kexi/core/kexiactionproxy_p.h
@@ -25,12 +25,12 @@
class KexiActionProxy;
//! Helper class for KexiActionProxy::plugSharedActionToExternalGUI() method.
-class KAction_setEnabled_Helper : public TQObject
+class TDEAction_setEnabled_Helper : public TQObject
{
Q_OBJECT
public:
- KAction_setEnabled_Helper(KexiActionProxy* proxy);
+ TDEAction_setEnabled_Helper(KexiActionProxy* proxy);
public slots:
void slotSetEnabled(bool enabled);
diff --git a/kexi/core/kexidialogbase.h b/kexi/core/kexidialogbase.h
index cf455885..ae1169a9 100644
--- a/kexi/core/kexidialogbase.h
+++ b/kexi/core/kexidialogbase.h
@@ -34,7 +34,7 @@
class TQWidgetStack;
class KexiMainWindow;
class KexiViewBase;
-class KActionCollection;
+class TDEActionCollection;
class KexiContextHelpInfo;
namespace KexiPart {
class Part;
diff --git a/kexi/core/keximainwindow.h b/kexi/core/keximainwindow.h
index 4dbb6b18..1f14e0d6 100644
--- a/kexi/core/keximainwindow.h
+++ b/kexi/core/keximainwindow.h
@@ -75,7 +75,7 @@ class KEXICORE_EXPORT KexiMainWindow : public KMdiMainFrm, public KexiSharedActi
/*! \return a list of all actions defined by application.
Not all of them are shared. Don't use plug these actions
in your windows by hand but user methods from KexiViewBase! */
- virtual KActionPtrList allActions() const = 0;
+ virtual TDEActionPtrList allActions() const = 0;
/*! \return currently active dialog (window) od 0 if there is no active dialog. */
virtual KexiDialogBase* currentDialog() const = 0;
diff --git a/kexi/core/kexipart.cpp b/kexi/core/kexipart.cpp
index 49f1aeab..e1ed78fe 100644
--- a/kexi/core/kexipart.cpp
+++ b/kexi/core/kexipart.cpp
@@ -126,11 +126,11 @@ void Part::createGUIClients(KexiMainWindow *win)
m_guiClient = new GUIClient(m_mainWin, this, false, "part");
//default actions for part's gui client:
- KAction *act = new KAction(m_names["instanceCaption"]+"...", info()->createItemIcon(), 0, this,
+ TDEAction *act = new TDEAction(m_names["instanceCaption"]+"...", info()->createItemIcon(), 0, this,
TQT_SLOT(slotCreate()), m_mainWin->actionCollection(),
KexiPart::nameForCreateAction(*info()));
act->plug( m_mainWin->findPopupMenu("insert") );
-// new KAction(m_names["instance"]+"...", info()->itemIcon(), 0, this,
+// new TDEAction(m_names["instance"]+"...", info()->itemIcon(), 0, this,
// TQT_SLOT(create()), m_guiClient->actionCollection(), (info()->objectName()+"part_create").latin1());
//let init specific actions for parts
// initPartActions( m_guiClient->actionCollection() );
@@ -161,14 +161,14 @@ void Part::createGUIClients(KexiMainWindow *win)
}
}
-KActionCollection* Part::actionCollectionForMode(int viewMode) const
+TDEActionCollection* Part::actionCollectionForMode(int viewMode) const
{
KXMLGUIClient *cli = m_instanceGuiClients[viewMode];
return cli ? cli->actionCollection() : 0;
}
-KAction* Part::createSharedAction(int mode, const TQString &text,
- const TQString &pix_name, const KShortcut &cut, const char *name,
+TDEAction* Part::createSharedAction(int mode, const TQString &text,
+ const TQString &pix_name, const TDEShortcut &cut, const char *name,
const char *subclassName)
{
GUIClient *instanceGuiClient = m_instanceGuiClients[mode];
@@ -180,8 +180,8 @@ KAction* Part::createSharedAction(int mode, const TQString &text,
instanceGuiClient->actionCollection(), subclassName);
}
-KAction* Part::createSharedPartAction(const TQString &text,
- const TQString &pix_name, const KShortcut &cut, const char *name,
+TDEAction* Part::createSharedPartAction(const TQString &text,
+ const TQString &pix_name, const TDEShortcut &cut, const char *name,
const char *subclassName)
{
if (!m_guiClient)
@@ -190,19 +190,19 @@ KAction* Part::createSharedPartAction(const TQString &text,
m_guiClient->actionCollection(), subclassName);
}
-KAction* Part::createSharedToggleAction(int mode, const TQString &text,
- const TQString &pix_name, const KShortcut &cut, const char *name)
+TDEAction* Part::createSharedToggleAction(int mode, const TQString &text,
+ const TQString &pix_name, const TDEShortcut &cut, const char *name)
{
- return createSharedAction(mode, text, pix_name, cut, name, "KToggleAction");
+ return createSharedAction(mode, text, pix_name, cut, name, "TDEToggleAction");
}
-KAction* Part::createSharedPartToggleAction(const TQString &text,
- const TQString &pix_name, const KShortcut &cut, const char *name)
+TDEAction* Part::createSharedPartToggleAction(const TQString &text,
+ const TQString &pix_name, const TDEShortcut &cut, const char *name)
{
- return createSharedPartAction(text, pix_name, cut, name, "KToggleAction");
+ return createSharedPartAction(text, pix_name, cut, name, "TDEToggleAction");
}
-/*KAction* Part::sharedAction(int mode, const char* name, const char *classname)
+/*TDEAction* Part::sharedAction(int mode, const char* name, const char *classname)
{
GUIClient *instanceGuiClient = m_instanceGuiClients[mode];
if (!instanceGuiClient) {
@@ -212,7 +212,7 @@ KAction* Part::createSharedPartToggleAction(const TQString &text,
return instanceGuiClient->actionCollection()->action(name, classname);
}
-KAction* Part::sharedPartAction(int mode, const char* name, const char *classname)
+TDEAction* Part::sharedPartAction(int mode, const char* name, const char *classname)
{
if (!m_guiClient)
return 0;
@@ -223,7 +223,7 @@ void Part::setActionAvailable(const char *action_name, bool avail)
{
TQIntDictIterator<GUIClient> it( m_instanceGuiClients );
for (;it.current();++it) {
- KAction *act = it.current()->actionCollection()->action(action_name);
+ TDEAction *act = it.current()->actionCollection()->action(action_name);
if (act) {
act->setEnabled(avail);
return;
@@ -438,10 +438,10 @@ GUIClient::GUIClient(KexiMainWindow *win, Part* part, bool partInstanceClient, c
setXMLFile(TQString::fromLatin1("kexi")+part->info()->objectName()
+"part"+(partInstanceClient?"inst":"")+"ui.rc");
-// new KAction(part->m_names["new"], part->info()->itemIcon(), 0, this,
+// new TDEAction(part->m_names["new"], part->info()->itemIcon(), 0, this,
// TQT_SLOT(create()), actionCollection(), (part->info()->objectName()+"part_create").latin1());
-// new KAction(i18nInstanceName+"...", part->info()->itemIcon(), 0, this,
+// new TDEAction(i18nInstanceName+"...", part->info()->itemIcon(), 0, this,
// TQT_SLOT(create()), actionCollection(), (part->info()->objectName()+"part_create").latin1());
// win->guiFactory()->addClient(this);
diff --git a/kexi/core/kexipart.h b/kexi/core/kexipart.h
index 752140d1..1d800854 100644
--- a/kexi/core/kexipart.h
+++ b/kexi/core/kexipart.h
@@ -28,13 +28,13 @@
#include "kexi.h"
#include "keximainwindow.h"
-class KActionCollection;
+class TDEActionCollection;
class KexiDialogBase;
class KexiDialogTempData;
class KexiViewBase;
class KexiMainWindowImpl;
-class KAction;
-class KShortcut;
+class TDEAction;
+class TDEShortcut;
class KTabWidget;
namespace KexiPart
@@ -184,7 +184,7 @@ class KEXICORE_EXPORT Part : public TQObject
#endif
/*! \return action collection for mode \a viewMode. */
- KActionCollection* actionCollectionForMode(int viewMode) const;
+ TDEActionCollection* actionCollectionForMode(int viewMode) const;
const Kexi::ObjectStatus& lastOperationStatus() const { return m_status; }
@@ -222,14 +222,14 @@ class KEXICORE_EXPORT Part : public TQObject
void createGUIClients(KexiMainWindow *win);
#if 0
- /*! For reimplementation. Create here all part actions (KAction or similar).
+ /*! For reimplementation. Create here all part actions (TDEAction or similar).
"Part action" is an action that is bound to given part, not for dialogs
created with this part, eg. "Open external project" action for Form part.
Default implementation does nothing.
*/
- virtual void initPartActions( KActionCollection * ) {};
+ virtual void initPartActions( TDEActionCollection * ) {};
- /*! For reimplementation. You should here create all instance actions (KAction or similar)
+ /*! For reimplementation. You should here create all instance actions (TDEAction or similar)
for \a mode (this method called for every value given by Kexi::ViewMode enum,
and in special cases, in the future - for user-defined part-specific modes).
Actions should be bound to action collection \a col.
@@ -241,7 +241,7 @@ class KEXICORE_EXPORT Part : public TQObject
all supported views.
Default implementation does nothing.
*/
- virtual void initInstanceActions( int mode, KActionCollection *col ) {};
+ virtual void initInstanceActions( int mode, TDEActionCollection *col ) {};
#endif
virtual void initPartActions();
@@ -255,29 +255,29 @@ class KEXICORE_EXPORT Part : public TQObject
/*! Creates shared action for action collection declared
for 'instance actions' of this part.
See KexiSharedActionHost::createSharedAction() for details.
- Pass desired KAction subclass with \a subclassName (e.g. "KToggleAction") to have
- that subclass allocated instead just KAction (what is the default). */
- KAction* createSharedAction(int mode, const TQString &text,
- const TQString &pix_name, const KShortcut &cut, const char *name,
+ Pass desired TDEAction subclass with \a subclassName (e.g. "TDEToggleAction") to have
+ that subclass allocated instead just TDEAction (what is the default). */
+ TDEAction* createSharedAction(int mode, const TQString &text,
+ const TQString &pix_name, const TDEShortcut &cut, const char *name,
const char *subclassName = 0);
/*! Convenience version of above method - creates shared toggle action. */
- KAction* createSharedToggleAction(int mode, const TQString &text,
- const TQString &pix_name, const KShortcut &cut, const char *name);
+ TDEAction* createSharedToggleAction(int mode, const TQString &text,
+ const TQString &pix_name, const TDEShortcut &cut, const char *name);
/*! Creates shared action for action collection declared
for 'part actions' of this part.
See KexiSharedActionHost::createSharedAction() for details.
- Pass desired KAction subclass with \a subclassName (e.g. "KToggleAction") to have
- that subclass allocated instead just KAction (what is the default). */
- KAction* createSharedPartAction(const TQString &text,
- const TQString &pix_name, const KShortcut &cut, const char *name,
+ Pass desired TDEAction subclass with \a subclassName (e.g. "TDEToggleAction") to have
+ that subclass allocated instead just TDEAction (what is the default). */
+ TDEAction* createSharedPartAction(const TQString &text,
+ const TQString &pix_name, const TDEShortcut &cut, const char *name,
const char *subclassName = 0);
/*! Convenience version of above method - creates shared toggle action
for 'part actions' of this part. */
- KAction* createSharedPartToggleAction(const TQString &text,
- const TQString &pix_name, const KShortcut &cut, const char *name);
+ TDEAction* createSharedPartToggleAction(const TQString &text,
+ const TQString &pix_name, const TDEShortcut &cut, const char *name);
void setActionAvailable(const char *action_name, bool avail);
diff --git a/kexi/core/kexipartinfo.h b/kexi/core/kexipartinfo.h
index b7ad6f29..2159377d 100644
--- a/kexi/core/kexipartinfo.h
+++ b/kexi/core/kexipartinfo.h
@@ -150,7 +150,7 @@ class KEXICORE_EXPORT Info
Private *d;
};
-/*! \return "create" KAction's name for part defined by \a info.
+/*! \return "create" TDEAction's name for part defined by \a info.
The result is like "tablepart_create". Used in Part::createGUIClients()
and KexiBrowser. */
KEXICORE_EXPORT TQCString nameForCreateAction(const Info& info);
diff --git a/kexi/core/kexisharedactionhost.cpp b/kexi/core/kexisharedactionhost.cpp
index 4c7bc9ea..550cfe7c 100644
--- a/kexi/core/kexisharedactionhost.cpp
+++ b/kexi/core/kexisharedactionhost.cpp
@@ -80,7 +80,7 @@ void KexiSharedActionHost::setAsDefaultHost()
//--------------------------------------------------
-KexiSharedActionHost::KexiSharedActionHost(KMainWindow* mainWin)
+KexiSharedActionHost::KexiSharedActionHost(TDEMainWindow* mainWin)
: d( new KexiSharedActionHostPrivate(this) )
{
d->mainWin = mainWin;
@@ -98,7 +98,7 @@ KexiSharedActionHost::~KexiSharedActionHost()
void KexiSharedActionHost::setActionAvailable(const char *action_name, bool avail)
{
- KAction *act = d->mainWin->actionCollection()->action(action_name);
+ TDEAction *act = d->mainWin->actionCollection()->action(action_name);
if (act) {
act->setEnabled(avail);
}
@@ -132,7 +132,7 @@ void KexiSharedActionHost::plugActionProxy(KexiActionProxy *proxy)
d->actionProxies.insert( proxy->receiver(), proxy );
}
-KMainWindow* KexiSharedActionHost::mainWindow() const
+TDEMainWindow* KexiSharedActionHost::mainWindow() const
{
return d->mainWin;
}
@@ -144,12 +144,12 @@ void KexiSharedActionHost::invalidateSharedActions(TQObject *o)
bool insideDialogBase = o && (o->inherits("KexiDialogBase") || 0!=KexiUtils::findParent<KexiDialogBase>(o, "KexiDialogBase"));
KexiActionProxy *p = o ? d->actionProxies[ o ] : 0;
- for (KActionPtrList::ConstIterator it=d->sharedActions.constBegin(); it!=d->sharedActions.constEnd(); ++it) {
+ for (TDEActionPtrList::ConstIterator it=d->sharedActions.constBegin(); it!=d->sharedActions.constEnd(); ++it) {
// setActionAvailable((*it)->name(),p && p->isAvailable((*it)->name()));
- KAction *a = *it;
+ TDEAction *a = *it;
if (!insideDialogBase && d->mainWin->actionCollection()!=a->parentCollection()) {
//o is not KexiDialogBase or its child:
- // only invalidate action if it comes from mainwindow's KActionCollection
+ // only invalidate action if it comes from mainwindow's TDEActionCollection
// (thus part-actions are untouched when the focus is e.g. in the Property Editor)
continue;
}
@@ -157,7 +157,7 @@ void KexiSharedActionHost::invalidateSharedActions(TQObject *o)
KexiVolatileActionData *va = d->volatileActions[ a ];
if (va != 0) {
if (p && p->isSupported(a->name())) {
- TQPtrList<KAction> actions_list;
+ TQPtrList<TDEAction> actions_list;
actions_list.append( a );
if (!va->plugged) {
va->plugged=true;
@@ -212,7 +212,7 @@ TQWidget* KexiSharedActionHost::focusWindow()
return fw;
}
-KAction* KexiSharedActionHost::createSharedActionInternal( KAction *action )
+TDEAction* KexiSharedActionHost::createSharedActionInternal( TDEAction *action )
{
TQObject::connect(action,TQT_SIGNAL(activated()), &d->actionMapper, TQT_SLOT(map()));
d->actionMapper.setMapping(action, action->name());
@@ -220,63 +220,63 @@ KAction* KexiSharedActionHost::createSharedActionInternal( KAction *action )
return action;
}
-KActionPtrList KexiSharedActionHost::sharedActions() const
+TDEActionPtrList KexiSharedActionHost::sharedActions() const
{
return d->sharedActions;
}
-/*class KexiAction : public KAction
+/*class KexiAction : public TDEAction
{
public:
KexiAction(const TQString &text, const TQIconSet &pix,
- const KShortcut &cut, const TQObject *receiver,
- const char *slot, KActionCollection *parent, const char *name)
- : KAction(text,pix,cut,receiver,slot,parent,name)
+ const TDEShortcut &cut, const TQObject *receiver,
+ const char *slot, TDEActionCollection *parent, const char *name)
+ : TDEAction(text,pix,cut,receiver,slot,parent,name)
{
}
TQPtrDict<TQWidget> unplugged;
};*/
-KAction* KexiSharedActionHost::createSharedAction(const TQString &text, const TQString &pix_name,
- const KShortcut &cut, const char *name, KActionCollection* col, const char *subclassName)
+TDEAction* KexiSharedActionHost::createSharedAction(const TQString &text, const TQString &pix_name,
+ const TDEShortcut &cut, const char *name, TDEActionCollection* col, const char *subclassName)
{
if (subclassName==0)
return createSharedActionInternal(
- new KAction(text, pix_name,
+ new TDEAction(text, pix_name,
cut, 0/*receiver*/, 0/*slot*/, col ? col : d->mainWin->actionCollection(), name)
);
- else if (tqstricmp(subclassName,"KToggleAction")==0)
+ else if (tqstricmp(subclassName,"TDEToggleAction")==0)
return createSharedActionInternal(
- new KToggleAction(text, pix_name,
+ new TDEToggleAction(text, pix_name,
cut, 0/*receiver*/, 0/*slot*/, col ? col : d->mainWin->actionCollection(), name)
);
- else if (tqstricmp(subclassName,"KActionMenu")==0)
+ else if (tqstricmp(subclassName,"TDEActionMenu")==0)
return createSharedActionInternal(
- new KActionMenu(text, pix_name, col ? col : d->mainWin->actionCollection(), name)
+ new TDEActionMenu(text, pix_name, col ? col : d->mainWin->actionCollection(), name)
);
-//TODO: more KAction subclasses
+//TODO: more TDEAction subclasses
return 0;
}
-KAction* KexiSharedActionHost::createSharedAction( KStdAction::StdAction id, const char *name,
- KActionCollection* col)
+TDEAction* KexiSharedActionHost::createSharedAction( KStdAction::StdAction id, const char *name,
+ TDEActionCollection* col)
{
return createSharedActionInternal(
KStdAction::create( id, name, 0/*receiver*/, 0/*slot*/, col ? col : d->mainWin->actionCollection() )
);
}
-KAction* KexiSharedActionHost::createSharedAction(const KGuiItem& guiItem, const KShortcut &cut,
- const char *name, KActionCollection* col)
+TDEAction* KexiSharedActionHost::createSharedAction(const KGuiItem& guiItem, const TDEShortcut &cut,
+ const char *name, TDEActionCollection* col)
{
return createSharedActionInternal(
- new KAction(guiItem, cut, 0/*receiver*/, 0/*slot*/,
+ new TDEAction(guiItem, cut, 0/*receiver*/, 0/*slot*/,
col ? col : d->mainWin->actionCollection(), name));
}
-void KexiSharedActionHost::setActionVolatile( KAction *a, bool set )
+void KexiSharedActionHost::setActionVolatile( TDEAction *a, bool set )
{
if (!set) {
d->volatileActions.remove( a );
diff --git a/kexi/core/kexisharedactionhost.h b/kexi/core/kexisharedactionhost.h
index c7fcb181..5b2046d6 100644
--- a/kexi/core/kexisharedactionhost.h
+++ b/kexi/core/kexisharedactionhost.h
@@ -28,9 +28,9 @@
#include <kstdaction.h>
#include <kaction.h>
-class KShortcut;
+class TDEShortcut;
class KGuiItem;
-class KMainWindow;
+class TDEMainWindow;
class KexiActionProxy;
class KexiSharedActionHostPrivate;
@@ -40,7 +40,7 @@ namespace KexiPart {
//! Acts as application-wide host that offers shared actions.
/*!
- You can inherit this class together with KMainWindow (or any KMainWindow).
+ You can inherit this class together with TDEMainWindow (or any TDEMainWindow).
Call setAsDefaultHost() to make the host default for all shared actions that have
not explicitly specified host.
@@ -54,7 +54,7 @@ class KEXICORE_EXPORT KexiSharedActionHost
public:
/*! Constructs host for main window \a mainWin. */
- KexiSharedActionHost(KMainWindow* mainWin);
+ KexiSharedActionHost(TDEMainWindow* mainWin);
virtual ~KexiSharedActionHost();
@@ -86,10 +86,10 @@ class KEXICORE_EXPORT KexiSharedActionHost
static KexiSharedActionHost& defaultHost();
/*! \return shared actions list. */
- KActionPtrList sharedActions() const;
+ TDEActionPtrList sharedActions() const;
/*! PROTOTYPE, DO NOT USE YET */
- void setActionVolatile( KAction *a, bool set );
+ void setActionVolatile( TDEAction *a, bool set );
protected:
@@ -100,7 +100,7 @@ class KEXICORE_EXPORT KexiSharedActionHost
Otherwise the action is disabled.
If \a o is not KexiDialogBase or its child,
- actions are only invalidated if these come from mainwindow's KActionCollection
+ actions are only invalidated if these come from mainwindow's TDEActionCollection
(thus part-actions are untouched when the focus is e.g. in the Property Editor.
Call this method when it is known that some actions need invalidation
@@ -118,28 +118,28 @@ class KEXICORE_EXPORT KexiSharedActionHost
void updateActionAvailable(const char *action_name, bool avail, TQObject *obj);
/*! \return main window for which this host is defined. */
- KMainWindow* mainWindow() const;
+ TDEMainWindow* mainWindow() const;
/*! Creates shared action using \a text, \a pix_name pixmap, shortcut \a cut,
optional \a name. You can pass your own action collection as \a col.
If \a col action collection is null, main window's action will be used.
- Pass desired KAction subclass with \a subclassName (e.g. "KToggleAction") to have
- that subclass allocated instead just KAction (what is the default).
+ Pass desired TDEAction subclass with \a subclassName (e.g. "TDEToggleAction") to have
+ that subclass allocated instead just TDEAction (what is the default).
Created action's data is owned by the main window. */
- KAction* createSharedAction(const TQString &text, const TQString &pix_name,
- const KShortcut &cut, const char *name, KActionCollection* col = 0,
+ TDEAction* createSharedAction(const TQString &text, const TQString &pix_name,
+ const TDEShortcut &cut, const char *name, TDEActionCollection* col = 0,
const char *subclassName = 0);
/*! Like above - creates shared action, but from standard action identified by \a id.
Action's data is owned by the main window. */
- KAction* createSharedAction( KStdAction::StdAction id, const char *name,
- KActionCollection* col = 0);
+ TDEAction* createSharedAction( KStdAction::StdAction id, const char *name,
+ TDEActionCollection* col = 0);
/*! Creates shared action with name \a name and shortcut \a cut
by copying all properties of \a guiItem.
If \a col action collection is null, main window's action will be used. */
- KAction* createSharedAction(const KGuiItem& guiItem, const KShortcut &cut, const char *name,
- KActionCollection* col = 0);
+ TDEAction* createSharedAction(const KGuiItem& guiItem, const TDEShortcut &cut, const char *name,
+ TDEActionCollection* col = 0);
/*! \return action proxy for object \a o, or NULL if this object has
no plugged shared actions. */
@@ -151,7 +151,7 @@ class KEXICORE_EXPORT KexiSharedActionHost
private:
/*! Helper function for createSharedAction(). */
- KAction* createSharedActionInternal( KAction *action );
+ TDEAction* createSharedActionInternal( TDEAction *action );
KexiSharedActionHostPrivate *d;
diff --git a/kexi/core/kexisharedactionhost_p.h b/kexi/core/kexisharedactionhost_p.h
index 605cc681..eef28a19 100644
--- a/kexi/core/kexisharedactionhost_p.h
+++ b/kexi/core/kexisharedactionhost_p.h
@@ -34,7 +34,7 @@ class KexiVolatileActionData
{
public:
KexiVolatileActionData() { plugged=false; }
-// KAction *kaction;
+// TDEAction *kaction;
bool plugged : 1;
};
@@ -52,8 +52,8 @@ class KEXICORE_EXPORT KexiSharedActionHostPrivate : public TQObject
public:
TQPtrDict<KexiActionProxy> actionProxies;
- KMainWindow *mainWin;
- KActionPtrList sharedActions;
+ TDEMainWindow *mainWin;
+ TDEActionPtrList sharedActions;
TQSignalMapper actionMapper;
TQPtrDict<KexiVolatileActionData> volatileActions;
TQAsciiDict<TQWidget> enablers;
diff --git a/kexi/core/kexiuseraction.cpp b/kexi/core/kexiuseraction.cpp
index b0966463..5a79929e 100644
--- a/kexi/core/kexiuseraction.cpp
+++ b/kexi/core/kexiuseraction.cpp
@@ -11,8 +11,8 @@
#include "keximainwindow.h"
#include "kexiuseraction.h"
-KexiUserAction::KexiUserAction(KexiMainWindow *win, KActionCollection *parent, const TQString &name, const TQString &text, const TQString &pixmap)
- : KAction(text, pixmap, KShortcut::null(), this, TQT_SLOT(execute()), parent, name.latin1())
+KexiUserAction::KexiUserAction(KexiMainWindow *win, TDEActionCollection *parent, const TQString &name, const TQString &text, const TQString &pixmap)
+ : TDEAction(text, pixmap, TDEShortcut::null(), this, TQT_SLOT(execute()), parent, name.latin1())
{
m_win = win;
m_method = 0;
@@ -59,7 +59,7 @@ KexiUserAction::execute()
}
KexiUserAction *
-KexiUserAction::fromCurrentRecord(KexiMainWindow *context, KActionCollection *parent, KexiDB::Cursor *c)
+KexiUserAction::fromCurrentRecord(KexiMainWindow *context, TDEActionCollection *parent, KexiDB::Cursor *c)
{
if(!c || c->bof() || c->eof())
return 0;
diff --git a/kexi/core/kexiuseraction.h b/kexi/core/kexiuseraction.h
index 57b82984..602d5751 100644
--- a/kexi/core/kexiuseraction.h
+++ b/kexi/core/kexiuseraction.h
@@ -16,7 +16,7 @@ typedef TQValueVector<TQVariant> Arguments;
the actions can have some predefined \ref Methods which are described in \ref KexiUserActionMethod
e.g. OpenObject, ExecuteScript ... those methods take different arguments also described in \ref KexiUserActionMethod
*/
-class KEXICORE_EXPORT KexiUserAction : public KAction
+class KEXICORE_EXPORT KexiUserAction : public TDEAction
{
Q_OBJECT
@@ -48,7 +48,7 @@ class KEXICORE_EXPORT KexiUserAction : public KAction
/*! constructs an action
\note methods are associated using setMethod()
*/
- KexiUserAction(KexiMainWindow *context, KActionCollection *parent, const TQString &name, const TQString &text, const TQString &pixmap);
+ KexiUserAction(KexiMainWindow *context, TDEActionCollection *parent, const TQString &name, const TQString &text, const TQString &pixmap);
~KexiUserAction();
/*! sets execution information associated with this action this will mostly look like
@@ -64,11 +64,11 @@ class KEXICORE_EXPORT KexiUserAction : public KAction
/*! creates a KexiUserAction from current record in \a c
mostly needed for creation from kexi__useractions table */
- static KexiUserAction *fromCurrentRecord(KexiMainWindow *context, KActionCollection *parent, KexiDB::Cursor *c);
+ static KexiUserAction *fromCurrentRecord(KexiMainWindow *context, TDEActionCollection *parent, KexiDB::Cursor *c);
protected slots:
/*! actually executes the associated method
- \note KexiUserAction automatically connects KAction::activated() to KexiUserAction::execute()
+ \note KexiUserAction automatically connects TDEAction::activated() to KexiUserAction::execute()
*/
void execute();
diff --git a/kexi/core/kexiviewbase.cpp b/kexi/core/kexiviewbase.cpp
index 65f2e68f..c4eb3eaa 100644
--- a/kexi/core/kexiviewbase.cpp
+++ b/kexi/core/kexiviewbase.cpp
@@ -289,12 +289,12 @@ void KexiViewBase::setFocus()
m_mainWin->invalidateSharedActions(TQT_TQOBJECT(this));
}
-KAction* KexiViewBase::sharedAction( const char *action_name )
+TDEAction* KexiViewBase::sharedAction( const char *action_name )
{
if (part()) {
- KActionCollection *ac;
+ TDEActionCollection *ac;
if ( (ac = part()->actionCollectionForMode( viewMode() )) ) {
- KAction* a = ac->action( action_name );
+ TDEAction* a = ac->action( action_name );
if (a)
return a;
}
@@ -305,8 +305,8 @@ KAction* KexiViewBase::sharedAction( const char *action_name )
void KexiViewBase::setAvailable(const char* action_name, bool set)
{
if (part()) {
- KActionCollection *ac;
- KAction* a;
+ TDEActionCollection *ac;
+ TDEAction* a;
if ( (ac = part()->actionCollectionForMode( viewMode() )) && (a = ac->action( action_name )) ) {
a->setEnabled(set);
//why? return;
diff --git a/kexi/core/kexiviewbase.h b/kexi/core/kexiviewbase.h
index b0984157..adca7622 100644
--- a/kexi/core/kexiviewbase.h
+++ b/kexi/core/kexiviewbase.h
@@ -97,7 +97,7 @@ class KEXICORE_EXPORT KexiViewBase : public TQWidget, public KexiActionProxy
\return shared action with name \a action_name for this view.
If there's no such action declared in Kexi Part (part()),
global shared action is returned (if exists). */
- virtual KAction* sharedAction( const char *action_name );
+ virtual TDEAction* sharedAction( const char *action_name );
/*! Enables or disables shared action declared in Kexi Part (part()).
If there's no such action, global shared action is enabled or disabled (if exists). */