summaryrefslogtreecommitdiffstats
path: root/lib/koproperty/factory.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
commitf008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch)
tree8e9244c4d4957c36be81e15b566b4aa5ea26c982 /lib/koproperty/factory.cpp
parent1210f27b660efb7b37ff43ec68763e85a403471f (diff)
downloadkoffice-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 'lib/koproperty/factory.cpp')
-rw-r--r--lib/koproperty/factory.cpp58
1 files changed, 29 insertions, 29 deletions
diff --git a/lib/koproperty/factory.cpp b/lib/koproperty/factory.cpp
index 9b05552d..a042ca28 100644
--- a/lib/koproperty/factory.cpp
+++ b/lib/koproperty/factory.cpp
@@ -43,8 +43,8 @@
#include "timeedit.h"
#include "urledit.h"
-#include <qvaluelist.h>
-#include <qintdict.h>
+#include <tqvaluelist.h>
+#include <tqintdict.h>
#include <kdebug.h>
@@ -53,8 +53,8 @@ static KoProperty::FactoryManager* m_manager = 0;
namespace KoProperty {
-CustomPropertyFactory::CustomPropertyFactory(QObject *parent)
- : QObject(parent)
+CustomPropertyFactory::CustomPropertyFactory(TQObject *tqparent)
+ : TQObject(tqparent)
{
}
@@ -71,15 +71,15 @@ class FactoryManagerPrivate
~FactoryManagerPrivate() {}
//registered widgets for property types
- QIntDict<CustomPropertyFactory> registeredWidgets;
- QIntDict<CustomPropertyFactory> registeredCustomProperties;
+ TQIntDict<CustomPropertyFactory> registeredWidgets;
+ TQIntDict<CustomPropertyFactory> registeredCustomProperties;
};
}
using namespace KoProperty;
FactoryManager::FactoryManager()
-: QObject(0, "KoProperty::FactoryManager")
+: TQObject(0, "KoProperty::FactoryManager")
{
d = new FactoryManagerPrivate();
}
@@ -104,24 +104,24 @@ FactoryManager::registerFactoryForEditor(int editorType, CustomPropertyFactory *
{
if(!widgetFactory)
return;
- if(d->registeredWidgets.find(editorType))
+ if(d->registeredWidgets.tqfind(editorType))
kopropertywarn << "FactoryManager::registerFactoryForEditor(): "
"Overriding already registered custom widget type \"" << editorType << "\"" << endl;
- d->registeredWidgets.replace(editorType, widgetFactory);
+ d->registeredWidgets.tqreplace(editorType, widgetFactory);
}
void
-FactoryManager::registerFactoryForEditors(const QValueList<int> &editorTypes, CustomPropertyFactory *factory)
+FactoryManager::registerFactoryForEditors(const TQValueList<int> &editorTypes, CustomPropertyFactory *factory)
{
- QValueList<int>::ConstIterator endIt = editorTypes.constEnd();
- for(QValueList<int>::ConstIterator it = editorTypes.constBegin(); it != endIt; ++it)
+ TQValueList<int>::ConstIterator endIt = editorTypes.constEnd();
+ for(TQValueList<int>::ConstIterator it = editorTypes.constBegin(); it != endIt; ++it)
registerFactoryForEditor(*it, factory);
}
CustomPropertyFactory *
FactoryManager::factoryForEditorType(int type)
{
- return d->registeredWidgets.find(type);
+ return d->registeredWidgets.tqfind(type);
}
Widget*
@@ -132,7 +132,7 @@ FactoryManager::createWidgetForProperty(Property *property)
const int type = property->type();
- CustomPropertyFactory *factory = d->registeredWidgets.find(type);
+ CustomPropertyFactory *factory = d->registeredWidgets.tqfind(type);
if (factory)
return factory->createCustomWidget(property);
@@ -147,7 +147,7 @@ FactoryManager::createWidgetForProperty(Property *property)
//handle other widget types:
switch(type)
{
- // Default QVariant types
+ // Default TQVariant types
case String:
case CString:
return new StringEdit(property);
@@ -167,7 +167,7 @@ FactoryManager::createWidgetForProperty(Property *property)
return new DoubleEdit(property);
case Boolean: {
//boolean editors can optionally accept 3rd state:
- QVariant thirdState = property ? property->option("3rdState") : QVariant();
+ TQVariant thirdState = property ? property->option("3rdState") : TQVariant();
if (thirdState.toString().isEmpty())
return new BoolEdit(property);
else
@@ -224,40 +224,40 @@ FactoryManager::registerFactoryForProperty(int propertyType, CustomPropertyFacto
{
if(!factory)
return;
- if(d->registeredCustomProperties.find(propertyType))
+ if(d->registeredCustomProperties.tqfind(propertyType))
kopropertywarn << "FactoryManager::registerFactoryForProperty(): "
"Overriding already registered custom property type \"" << propertyType << "\"" << endl;
- d->registeredCustomProperties.replace(propertyType, factory);
+ d->registeredCustomProperties.tqreplace(propertyType, factory);
}
void
-FactoryManager::registerFactoryForProperties(const QValueList<int> &propertyTypes,
+FactoryManager::registerFactoryForProperties(const TQValueList<int> &propertyTypes,
CustomPropertyFactory *factory)
{
- QValueList<int>::ConstIterator endIt = propertyTypes.constEnd();
- for(QValueList<int>::ConstIterator it = propertyTypes.constBegin(); it != endIt; ++it)
+ TQValueList<int>::ConstIterator endIt = propertyTypes.constEnd();
+ for(TQValueList<int>::ConstIterator it = propertyTypes.constBegin(); it != endIt; ++it)
registerFactoryForProperty(*it, factory);
}
CustomProperty*
-FactoryManager::createCustomProperty(Property *parent)
+FactoryManager::createCustomProperty(Property *tqparent)
{
- const int type = parent->type();
- CustomPropertyFactory *factory = d->registeredWidgets.find(type);
+ const int type = tqparent->type();
+ CustomPropertyFactory *factory = d->registeredWidgets.tqfind(type);
if (factory)
- return factory->createCustomProperty(parent);
+ return factory->createCustomProperty(tqparent);
switch(type) {
case Size: case Size_Width: case Size_Height:
- return new SizeCustomProperty(parent);
+ return new SizeCustomProperty(tqparent);
case Point: case Point_X: case Point_Y:
- return new PointCustomProperty(parent);
+ return new PointCustomProperty(tqparent);
case Rect: case Rect_X: case Rect_Y: case Rect_Width: case Rect_Height:
- return new RectCustomProperty(parent);
+ return new RectCustomProperty(tqparent);
case SizePolicy: case SizePolicy_HorStretch: case SizePolicy_VerStretch:
case SizePolicy_HorData: case SizePolicy_VerData:
- return new SizePolicyCustomProperty(parent);
+ return new SizePolicyCustomProperty(tqparent);
default:
return 0;
}