diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
commit | f008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch) | |
tree | 8e9244c4d4957c36be81e15b566b4aa5ea26c982 /kexi/core/kexisharedactionhost.cpp | |
parent | 1210f27b660efb7b37ff43ec68763e85a403471f (diff) | |
download | koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip |
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kexi/core/kexisharedactionhost.cpp')
-rw-r--r-- | kexi/core/kexisharedactionhost.cpp | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/kexi/core/kexisharedactionhost.cpp b/kexi/core/kexisharedactionhost.cpp index 11ab94db..b00cbc1b 100644 --- a/kexi/core/kexisharedactionhost.cpp +++ b/kexi/core/kexisharedactionhost.cpp @@ -29,7 +29,7 @@ #include <kdebug.h> KexiSharedActionHostPrivate::KexiSharedActionHostPrivate(KexiSharedActionHost *h) -: QObject(0,"KexiSharedActionHostPrivate") +: TQObject(0,"KexiSharedActionHostPrivate") , actionProxies(401) , actionMapper( this ) , volatileActions(401) @@ -37,14 +37,14 @@ KexiSharedActionHostPrivate::KexiSharedActionHostPrivate(KexiSharedActionHost *h , host(h) { volatileActions.setAutoDelete(true); - connect(&actionMapper, SIGNAL(mapped(const QString &)), this, SLOT(slotAction(const QString &))); + connect(&actionMapper, TQT_SIGNAL(mapped(const TQString &)), this, TQT_SLOT(slotAction(const TQString &))); } -void KexiSharedActionHostPrivate::slotAction(const QString& act_id) +void KexiSharedActionHostPrivate::slotAction(const TQString& act_id) { - QWidget *w = host->focusWindow(); //focusWidget(); + TQWidget *w = host->focusWindow(); //tqfocusWidget(); // while (w && !w->inherits("KexiDialogBase") && !w->inherits("KexiDockBase")) -// w = w->parentWidget(); +// w = w->tqparentWidget(); KexiActionProxy *proxy = w ? actionProxies[ w ] : 0; @@ -104,22 +104,22 @@ void KexiSharedActionHost::setActionAvailable(const char *action_name, bool avai } } -void KexiSharedActionHost::updateActionAvailable(const char *action_name, bool avail, QObject *obj) +void KexiSharedActionHost::updateActionAvailable(const char *action_name, bool avail, TQObject *obj) { /*test if (qstrcmp(action_name, "tablepart_toggle_pkey")==0) { kdDebug() << "tablepart_toggle_pkey" << endl; }*/ if (!d) return; //sanity - QWidget *fw = d->mainWin->focusWidget(); - while (fw && obj!=fw) - fw = fw->parentWidget(); + TQWidget *fw = d->mainWin->tqfocusWidget(); + while (fw && TQT_BASE_OBJECT(obj)!=TQT_BASE_OBJECT(fw)) + fw = fw->tqparentWidget(); if (!fw) return; setActionAvailable(action_name, avail); if (avail) { - d->enablers.replace(action_name, fw); + d->enablers.tqreplace(action_name, fw); } else { d->enablers.take(action_name); @@ -137,7 +137,7 @@ KMainWindow* KexiSharedActionHost::mainWindow() const return d->mainWin; } -void KexiSharedActionHost::invalidateSharedActions(QObject *o) +void KexiSharedActionHost::tqinvalidateSharedActions(TQObject *o) { if (!d) return; @@ -149,7 +149,7 @@ void KexiSharedActionHost::invalidateSharedActions(QObject *o) KAction *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 tqinvalidate action if it comes from mainwindow's KActionCollection // (thus part-actions are untouched when the focus is e.g. in the Property Editor) continue; } @@ -157,7 +157,7 @@ void KexiSharedActionHost::invalidateSharedActions(QObject *o) KexiVolatileActionData *va = d->volatileActions[ a ]; if (va != 0) { if (p && p->isSupported(a->name())) { - QPtrList<KAction> actions_list; + TQPtrList<KAction> actions_list; actions_list.append( a ); if (!va->plugged) { va->plugged=true; @@ -178,43 +178,43 @@ void KexiSharedActionHost::invalidateSharedActions(QObject *o) } } -KexiActionProxy* KexiSharedActionHost::actionProxyFor(QObject *o) const +KexiActionProxy* KexiSharedActionHost::actionProxyFor(TQObject *o) const { return d->actionProxies[ o ]; } -KexiActionProxy* KexiSharedActionHost::takeActionProxyFor(QObject *o) +KexiActionProxy* KexiSharedActionHost::takeActionProxyFor(TQObject *o) { if (d) return d->actionProxies.take( o ); return 0; } -bool KexiSharedActionHost::acceptsSharedActions(QObject *) +bool KexiSharedActionHost::acceptsSharedActions(TQObject *) { return false; } -QWidget* KexiSharedActionHost::focusWindow() +TQWidget* KexiSharedActionHost::focusWindow() { - QWidget *fw; + TQWidget *fw; if (dynamic_cast<KMdiMainFrm*>(d->mainWin)) { fw = dynamic_cast<KMdiMainFrm*>(d->mainWin)->activeWindow(); } else { - QWidget *aw = qApp->activeWindow(); + TQWidget *aw = TQT_TQWIDGET(tqApp->activeWindow()); if (!aw) aw = d->mainWin; - fw = aw->focusWidget(); + fw = aw->tqfocusWidget(); } - while (fw && !acceptsSharedActions(fw)) - fw = fw->parentWidget(); + while (fw && !acceptsSharedActions(TQT_TQOBJECT(fw))) + fw = fw->tqparentWidget(); return fw; } KAction* KexiSharedActionHost::createSharedActionInternal( KAction *action ) { - QObject::connect(action,SIGNAL(activated()), &d->actionMapper, SLOT(map())); + TQObject::connect(action,TQT_SIGNAL(activated()), &d->actionMapper, TQT_SLOT(map())); d->actionMapper.setMapping(action, action->name()); d->sharedActions.append( action ); return action; @@ -228,17 +228,17 @@ KActionPtrList KexiSharedActionHost::sharedActions() const /*class KexiAction : public KAction { public: - KexiAction(const QString &text, const QIconSet &pix, - const KShortcut &cut, const QObject *receiver, - const char *slot, KActionCollection *parent, const char *name) - : KAction(text,pix,cut,receiver,slot,parent,name) + KexiAction(const TQString &text, const TQIconSet &pix, + const KShortcut &cut, const TQObject *receiver, + const char *slot, KActionCollection *tqparent, const char *name) + : KAction(text,pix,cut,receiver,slot,tqparent,name) { } - QPtrDict<QWidget> unplugged; + TQPtrDict<TQWidget> unplugged; };*/ -KAction* KexiSharedActionHost::createSharedAction(const QString &text, const QString &pix_name, +KAction* KexiSharedActionHost::createSharedAction(const TQString &text, const TQString &pix_name, const KShortcut &cut, const char *name, KActionCollection* col, const char *subclassName) { if (subclassName==0) |