summaryrefslogtreecommitdiffstats
path: root/lib/kross
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-02-01 15:02:43 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-02-01 15:02:43 -0600
commitaea627236e4de24599c3e30617cf264c3c1b7d40 (patch)
tree467e13ca5a7eb0ab292259289ecc3572f53c5eae /lib/kross
parent786304c6211f35ddc4cdd54b7aa7985fef4a2e70 (diff)
downloadkoffice-aea627236e4de24599c3e30617cf264c3c1b7d40.tar.gz
koffice-aea627236e4de24599c3e30617cf264c3c1b7d40.zip
Rename a number of classes to enhance compatibility with KDE4
Diffstat (limited to 'lib/kross')
-rw-r--r--lib/kross/api/eventaction.cpp2
-rw-r--r--lib/kross/api/eventaction.h6
-rw-r--r--lib/kross/main/mainmodule.cpp4
-rw-r--r--lib/kross/main/mainmodule.h8
-rw-r--r--lib/kross/main/scriptaction.cpp10
-rw-r--r--lib/kross/main/scriptaction.h20
-rw-r--r--lib/kross/main/scriptguiclient.cpp4
-rw-r--r--lib/kross/main/scriptguiclient.h4
-rw-r--r--lib/kross/main/wdgscriptsmanager.cpp6
-rw-r--r--lib/kross/main/wdgscriptsmanagerbase.ui6
-rw-r--r--lib/kross/test/testaction.cpp10
-rw-r--r--lib/kross/test/testaction.h8
-rw-r--r--lib/kross/test/testwindow.cpp12
-rw-r--r--lib/kross/test/testwindow.h2
14 files changed, 51 insertions, 51 deletions
diff --git a/lib/kross/api/eventaction.cpp b/lib/kross/api/eventaction.cpp
index 4210fb0e..7578eb30 100644
--- a/lib/kross/api/eventaction.cpp
+++ b/lib/kross/api/eventaction.cpp
@@ -25,7 +25,7 @@
using namespace Kross::Api;
-EventAction::EventAction(const TQString& name, KAction* action)
+EventAction::EventAction(const TQString& name, TDEAction* action)
: Event<EventAction>(name.isEmpty() ? TQString(action->name()) : name)
, m_action(action)
{
diff --git a/lib/kross/api/eventaction.h b/lib/kross/api/eventaction.h
index e20656df..602a697f 100644
--- a/lib/kross/api/eventaction.h
+++ b/lib/kross/api/eventaction.h
@@ -33,7 +33,7 @@ namespace Kross { namespace Api {
class ScriptContainer;
/**
- * The EventAction class is used to wrap KAction instances
+ * The EventAction class is used to wrap TDEAction instances
* into the Kross object hierachy and provide access to
* them.
*/
@@ -50,7 +50,7 @@ namespace Kross { namespace Api {
/**
* Constructor.
*/
- EventAction(const TQString& name, KAction* action);
+ EventAction(const TQString& name, TDEAction* action);
/**
* Destructor.
@@ -64,7 +64,7 @@ namespace Kross { namespace Api {
//virtual Object::Ptr call(const TQString& name, TDESharedPtr<List> arguments);
private:
- KAction* m_action;
+ TDEAction* m_action;
/// \return the text associated with this action.
Kross::Api::Object::Ptr getText(Kross::Api::List::Ptr);
diff --git a/lib/kross/main/mainmodule.cpp b/lib/kross/main/mainmodule.cpp
index 8c29180f..bd5a9aab 100644
--- a/lib/kross/main/mainmodule.cpp
+++ b/lib/kross/main/mainmodule.cpp
@@ -105,11 +105,11 @@ QtObject::Ptr MainModule::addTQObject(TQObject* object, const TQString& name)
return qtobject;
}
-EventAction::Ptr MainModule::addKAction(KAction* action, const TQString& name)
+EventAction::Ptr MainModule::addTDEAction(TDEAction* action, const TQString& name)
{
EventAction* event = new EventAction(name, action);
if(! addChild(name, event)) {
- krosswarning( TQString("Failed to add KAction name='%1'").arg(action->name()) );
+ krosswarning( TQString("Failed to add TDEAction name='%1'").arg(action->name()) );
return 0;
}
return event;
diff --git a/lib/kross/main/mainmodule.h b/lib/kross/main/mainmodule.h
index 96abd06d..06a4836d 100644
--- a/lib/kross/main/mainmodule.h
+++ b/lib/kross/main/mainmodule.h
@@ -151,19 +151,19 @@ namespace Kross { namespace Api {
QtObject::Ptr addTQObject(TQObject* object, const TQString& name = TQString());
/**
- * Add a \a KAction to the eventcollection. The
- * KAction will be wrapped by a \a EventAction
+ * Add a \a TDEAction to the eventcollection. The
+ * TDEAction will be wrapped by a \a EventAction
* and will be added to this collection.
*
* \param name name to identify the \a action by
- * \param action the KAction instance that should
+ * \param action the TDEAction instance that should
* be added to this \a MainModule
* \return the newly added \a EventAction instance
* which is now a child of this \a MainModule
*
* \todo check \a name dox.
*/
- EventAction::Ptr addKAction(KAction* action, const TQString& name = TQString());
+ EventAction::Ptr addTDEAction(TDEAction* action, const TQString& name = TQString());
//typedef TQValueList<Callable::Ptr> EventList;
//EventList getEvents();
diff --git a/lib/kross/main/scriptaction.cpp b/lib/kross/main/scriptaction.cpp
index f7e11618..2e775fcb 100644
--- a/lib/kross/main/scriptaction.cpp
+++ b/lib/kross/main/scriptaction.cpp
@@ -83,7 +83,7 @@ namespace Kross { namespace Api {
}}
ScriptAction::ScriptAction(const TQString& file)
- : KAction(0, file.latin1())
+ : TDEAction(0, file.latin1())
, Kross::Api::ScriptContainer(file)
, d( new ScriptActionPrivate() ) // initialize d-pointer class
{
@@ -102,7 +102,7 @@ ScriptAction::ScriptAction(const TQString& file)
}
ScriptAction::ScriptAction(const TQString& scriptconfigfile, const TQDomElement& element)
- : KAction()
+ : TDEAction()
, Kross::Api::ScriptContainer()
, d( new ScriptActionPrivate() ) // initialize d-pointer class
{
@@ -158,10 +158,10 @@ ScriptAction::ScriptAction(const TQString& scriptconfigfile, const TQDomElement&
ScriptContainer::setName(file);
}
- KAction::setName(name.latin1());
- KAction::setText(text);
+ TDEAction::setName(name.latin1());
+ TDEAction::setText(text);
setDescription(description);
- KAction::setIcon(icon);
+ TDEAction::setIcon(icon);
// connect signal
connect(this, TQT_SIGNAL(activated()), this, TQT_SLOT(activate()));
diff --git a/lib/kross/main/scriptaction.h b/lib/kross/main/scriptaction.h
index 3d6e890b..4d60d4dc 100644
--- a/lib/kross/main/scriptaction.h
+++ b/lib/kross/main/scriptaction.h
@@ -33,11 +33,11 @@ namespace Kross { namespace Api {
class ScriptActionPrivate;
/**
- * A ScriptAction extends a KAction by providing a wrapper around
+ * A ScriptAction extends a TDEAction by providing a wrapper around
* a \a ScriptContainer to execute scripting code on activation.
*/
class ScriptAction
- : public KAction
+ : public TDEAction
, public Kross::Api::ScriptContainer
{
Q_OBJECT
@@ -206,10 +206,10 @@ namespace Kross { namespace Api {
TQMap<TQCString, ScriptAction::Ptr> m_actions;
/**
- * A KActionMenu which could be used to display the
+ * A TDEActionMenu which could be used to display the
* content of this \a ScriptActionCollection instance.
*/
- KActionMenu* m_actionmenu;
+ TDEActionMenu* m_actionmenu;
/**
* Boolean value used to represent the modified-state. Will
@@ -234,12 +234,12 @@ namespace Kross { namespace Api {
* Constructor.
*
* \param text The text used to display some describing caption.
- * \param ac The KActionCollection which should be used to as
- * initial content for the KActionMenu \a m_actionmenu .
+ * \param ac The TDEActionCollection which should be used to as
+ * initial content for the TDEActionMenu \a m_actionmenu .
* \param name The internal name.
*/
- ScriptActionCollection(const TQString& text, KActionCollection* ac, const char* name)
- : m_actionmenu( new KActionMenu(text, ac, name) )
+ ScriptActionCollection(const TQString& text, TDEActionCollection* ac, const char* name)
+ : m_actionmenu( new TDEActionMenu(text, ac, name) )
, m_dirty(true) {}
@@ -263,9 +263,9 @@ namespace Kross { namespace Api {
TQValueList<ScriptAction::Ptr> actions() { return m_list; }
/**
- * \return the KActionMenu \a m_actionmenu .
+ * \return the TDEActionMenu \a m_actionmenu .
*/
- KActionMenu* actionMenu() { return m_actionmenu; }
+ TDEActionMenu* actionMenu() { return m_actionmenu; }
/**
* Attach a \a ScriptAction instance to this \a ScriptActionCollection .
diff --git a/lib/kross/main/scriptguiclient.cpp b/lib/kross/main/scriptguiclient.cpp
index eaf31101..9dd304ae 100644
--- a/lib/kross/main/scriptguiclient.cpp
+++ b/lib/kross/main/scriptguiclient.cpp
@@ -76,10 +76,10 @@ ScriptGUIClient::ScriptGUIClient(KXMLGUIClient* guiclient, TQWidget* parent)
setInstance( ScriptGUIClient::instance() );
// action to execute a scriptfile.
- new KAction(i18n("Execute Script File..."), 0, 0, this, TQT_SLOT(executeScriptFile()), actionCollection(), "executescriptfile");
+ new TDEAction(i18n("Execute Script File..."), 0, 0, this, TQT_SLOT(executeScriptFile()), actionCollection(), "executescriptfile");
// acion to show the ScriptManagerGUI dialog.
- new KAction(i18n("Scripts Manager..."), 0, 0, this, TQT_SLOT(showScriptManager()), actionCollection(), "configurescripts");
+ new TDEAction(i18n("Scripts Manager..."), 0, 0, this, TQT_SLOT(showScriptManager()), actionCollection(), "configurescripts");
// The predefined ScriptActionCollection's this ScriptGUIClient provides.
d->collections.replace("installedscripts",
diff --git a/lib/kross/main/scriptguiclient.h b/lib/kross/main/scriptguiclient.h
index c8ebf912..01a9b22e 100644
--- a/lib/kross/main/scriptguiclient.h
+++ b/lib/kross/main/scriptguiclient.h
@@ -50,8 +50,8 @@ namespace Kross { namespace Api {
public:
- /// List of KAction instances.
- typedef TQPtrList<KAction> List;
+ /// List of TDEAction instances.
+ typedef TQPtrList<TDEAction> List;
/**
* Constructor.
diff --git a/lib/kross/main/wdgscriptsmanager.cpp b/lib/kross/main/wdgscriptsmanager.cpp
index c63b7603..de653fbd 100644
--- a/lib/kross/main/wdgscriptsmanager.cpp
+++ b/lib/kross/main/wdgscriptsmanager.cpp
@@ -87,7 +87,7 @@ class ListItem : public TQListViewItem
class ToolTip : public TQToolTip
{
public:
- ToolTip(KListView* parent) : TQToolTip(parent->viewport()), m_parent(parent) {}
+ ToolTip(TDEListView* parent) : TQToolTip(parent->viewport()), m_parent(parent) {}
virtual ~ToolTip () { remove(m_parent->viewport()); }
protected:
virtual void maybeTip(const TQPoint& p) {
@@ -100,7 +100,7 @@ class ToolTip : public TQToolTip
}
}
private:
- KListView* m_parent;
+ TDEListView* m_parent;
};
class WdgScriptsManagerPrivate
@@ -152,7 +152,7 @@ WdgScriptsManager::WdgScriptsManager(ScriptGUIClient* scr, TQWidget* parent, con
connect(btnNewStuff, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotGetNewScript()));
#endif
/*
- toolBar->setIconText( KToolBar::IconTextRight );
+ toolBar->setIconText( TDEToolBar::IconTextRight );
toolBar->insertButton("exec", WdgScriptsManagerPrivate::ExecBtn, false, i18n("Execute"));
toolBar->addConnection(WdgScriptsManagerPrivate::ExecBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotExecuteScript()));
diff --git a/lib/kross/main/wdgscriptsmanagerbase.ui b/lib/kross/main/wdgscriptsmanagerbase.ui
index 1140e848..116b1ca3 100644
--- a/lib/kross/main/wdgscriptsmanagerbase.ui
+++ b/lib/kross/main/wdgscriptsmanagerbase.ui
@@ -36,7 +36,7 @@
<property name="margin">
<number>0</number>
</property>
- <widget class="KListView">
+ <widget class="TDEListView">
<property name="name">
<cstring>scriptsList</cstring>
</property>
@@ -49,7 +49,7 @@
</sizepolicy>
</property>
</widget>
- <widget class="KToolBar">
+ <widget class="TDEToolBar">
<property name="name">
<cstring>toolBar</cstring>
</property>
@@ -212,7 +212,7 @@
</widget>
<customwidgets>
<customwidget>
- <class>KToolBar</class>
+ <class>TDEToolBar</class>
<header location="local">ktoolbar.h</header>
<sizehint>
<width>20</width>
diff --git a/lib/kross/test/testaction.cpp b/lib/kross/test/testaction.cpp
index 481de0cf..42963904 100644
--- a/lib/kross/test/testaction.cpp
+++ b/lib/kross/test/testaction.cpp
@@ -22,15 +22,15 @@
TestAction::TestAction(Kross::Api::ScriptContainer::Ptr scriptcontainer)
: TQWidget()
{
- m_actioncollection = new KActionCollection(this, this);
+ m_actioncollection = new TDEActionCollection(this, this);
- m_action1 = new KAction("Action1_Text", 0, this, TQT_SLOT(activatedAction1()), m_actioncollection, "Action1");
+ m_action1 = new TDEAction("Action1_Text", 0, this, TQT_SLOT(activatedAction1()), m_actioncollection, "Action1");
m_actionlist.append(m_action1);
- scriptcontainer->addKAction(m_action1);
+ scriptcontainer->addTDEAction(m_action1);
- m_action2 = new KAction("Action2_Text", 0, this, TQT_SLOT(activatedAction2()), m_actioncollection, "Action2");
+ m_action2 = new TDEAction("Action2_Text", 0, this, TQT_SLOT(activatedAction2()), m_actioncollection, "Action2");
m_actionlist.append(m_action2);
- scriptcontainer->addKAction(m_action2);
+ scriptcontainer->addTDEAction(m_action2);
}
TestAction::~TestAction()
diff --git a/lib/kross/test/testaction.h b/lib/kross/test/testaction.h
index 7f4dd79c..32e6cdcd 100644
--- a/lib/kross/test/testaction.h
+++ b/lib/kross/test/testaction.h
@@ -42,10 +42,10 @@ class TestAction : public TQWidget
void activatedAction2();
private:
- KAction* m_action1;
- KAction* m_action2;
- KActionCollection* m_actioncollection;
- KActionPtrList m_actionlist;
+ TDEAction* m_action1;
+ TDEAction* m_action2;
+ TDEActionCollection* m_actioncollection;
+ TDEActionPtrList m_actionlist;
};
#endif
diff --git a/lib/kross/test/testwindow.cpp b/lib/kross/test/testwindow.cpp
index ec0090b6..f83d7ace 100644
--- a/lib/kross/test/testwindow.cpp
+++ b/lib/kross/test/testwindow.cpp
@@ -35,7 +35,7 @@
#include <kstandarddirs.h>
TestWindow::TestWindow(const TQString& interpretername, const TQString& scriptcode)
- : KMainWindow()
+ : TDEMainWindow()
, m_interpretername(interpretername)
, m_scriptcode(scriptcode)
{
@@ -43,7 +43,7 @@ TestWindow::TestWindow(const TQString& interpretername, const TQString& scriptco
manager->addModule( new TestPluginModule("krosstestpluginmodule") );
m_scriptcontainer = manager->getScriptContainer("test");
- KPopupMenu *menuFile = new KPopupMenu( this );
+ TDEPopupMenu *menuFile = new TDEPopupMenu( this );
menuBar()->insertItem( "&File", menuFile );
m_scriptextension = new Kross::Api::ScriptGUIClient(this, this);
@@ -58,15 +58,15 @@ TestWindow::TestWindow(const TQString& interpretername, const TQString& scriptco
//menuFile->insertSeparator();
- KAction* execaction = m_scriptextension->action("executescriptfile");
+ TDEAction* execaction = m_scriptextension->action("executescriptfile");
if(execaction) execaction->plug(menuFile);
- KAction* configaction = m_scriptextension->action("configurescripts");
+ TDEAction* configaction = m_scriptextension->action("configurescripts");
if(configaction) configaction->plug(menuFile);
- KAction* scriptsaction = m_scriptextension->action("installedscripts");
+ TDEAction* scriptsaction = m_scriptextension->action("installedscripts");
if(scriptsaction) scriptsaction->plug(menuFile);
- //menuFile->insertItem( ( (KActionMenu*)m_scriptextension->action("scripts") )->popupMenu() );
+ //menuFile->insertItem( ( (TDEActionMenu*)m_scriptextension->action("scripts") )->popupMenu() );
TQVBox* mainbox = new TQVBox(this);
diff --git a/lib/kross/test/testwindow.h b/lib/kross/test/testwindow.h
index 9a10104c..c3da5cc5 100644
--- a/lib/kross/test/testwindow.h
+++ b/lib/kross/test/testwindow.h
@@ -33,7 +33,7 @@
class TQComboBox;
class KTextEdit;
-class TestWindow : public KMainWindow
+class TestWindow : public TDEMainWindow
{
Q_OBJECT