summaryrefslogtreecommitdiffstats
path: root/kexi/core/kexisharedactionhost.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <[email protected]>2013-02-01 15:02:43 -0600
committerTimothy Pearson <[email protected]>2013-02-01 15:02:43 -0600
commitaea627236e4de24599c3e30617cf264c3c1b7d40 (patch)
tree467e13ca5a7eb0ab292259289ecc3572f53c5eae /kexi/core/kexisharedactionhost.cpp
parent786304c6211f35ddc4cdd54b7aa7985fef4a2e70 (diff)
downloadkoffice-aea627236e4de24599c3e30617cf264c3c1b7d40.tar.gz
koffice-aea627236e4de24599c3e30617cf264c3c1b7d40.zip
Rename a number of classes to enhance compatibility with KDE4
Diffstat (limited to 'kexi/core/kexisharedactionhost.cpp')
-rw-r--r--kexi/core/kexisharedactionhost.cpp54
1 files changed, 27 insertions, 27 deletions
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 );