summaryrefslogtreecommitdiffstats
path: root/lib/widgets/propeditor
diff options
context:
space:
mode:
Diffstat (limited to 'lib/widgets/propeditor')
-rw-r--r--lib/widgets/propeditor/Mainpage.dox2
-rw-r--r--lib/widgets/propeditor/childproperty.cpp8
-rw-r--r--lib/widgets/propeditor/childproperty.h6
-rw-r--r--lib/widgets/propeditor/multiproperty.cpp4
-rw-r--r--lib/widgets/propeditor/multiproperty.h2
-rw-r--r--lib/widgets/propeditor/pcheckbox.cpp10
-rw-r--r--lib/widgets/propeditor/pcheckbox.h3
-rw-r--r--lib/widgets/propeditor/pcolorbutton.cpp14
-rw-r--r--lib/widgets/propeditor/pcolorbutton.h3
-rw-r--r--lib/widgets/propeditor/pcolorcombo.cpp10
-rw-r--r--lib/widgets/propeditor/pcolorcombo.h3
-rw-r--r--lib/widgets/propeditor/pcombobox.cpp16
-rw-r--r--lib/widgets/propeditor/pcombobox.h5
-rw-r--r--lib/widgets/propeditor/pcursoredit.cpp4
-rw-r--r--lib/widgets/propeditor/pcursoredit.h3
-rw-r--r--lib/widgets/propeditor/pdateedit.cpp12
-rw-r--r--lib/widgets/propeditor/pdateedit.h7
-rw-r--r--lib/widgets/propeditor/pdatetimeedit.cpp10
-rw-r--r--lib/widgets/propeditor/pdatetimeedit.h7
-rw-r--r--lib/widgets/propeditor/pdoublenuminput.cpp14
-rw-r--r--lib/widgets/propeditor/pdoublenuminput.h9
-rw-r--r--lib/widgets/propeditor/pdummywidget.cpp6
-rw-r--r--lib/widgets/propeditor/pdummywidget.h5
-rw-r--r--lib/widgets/propeditor/pfontbutton.cpp12
-rw-r--r--lib/widgets/propeditor/pfontbutton.h3
-rw-r--r--lib/widgets/propeditor/pfontcombo.cpp6
-rw-r--r--lib/widgets/propeditor/pfontcombo.h5
-rw-r--r--lib/widgets/propeditor/plineedit.cpp6
-rw-r--r--lib/widgets/propeditor/plineedit.h3
-rw-r--r--lib/widgets/propeditor/plinestyleedit.cpp6
-rw-r--r--lib/widgets/propeditor/plinestyleedit.h3
-rw-r--r--lib/widgets/propeditor/ppixmapedit.cpp20
-rw-r--r--lib/widgets/propeditor/ppixmapedit.h3
-rw-r--r--lib/widgets/propeditor/ppointedit.cpp10
-rw-r--r--lib/widgets/propeditor/ppointedit.h3
-rw-r--r--lib/widgets/propeditor/prectedit.cpp10
-rw-r--r--lib/widgets/propeditor/prectedit.h3
-rw-r--r--lib/widgets/propeditor/property.h2
-rw-r--r--lib/widgets/propeditor/propertyeditor.cpp62
-rw-r--r--lib/widgets/propeditor/propertyeditor.h9
-rw-r--r--lib/widgets/propeditor/propertylist.cpp36
-rw-r--r--lib/widgets/propeditor/propertylist.h10
-rw-r--r--lib/widgets/propeditor/propertymachinefactory.cpp34
-rw-r--r--lib/widgets/propeditor/propertymachinefactory.h2
-rw-r--r--lib/widgets/propeditor/propertywidget.cpp8
-rw-r--r--lib/widgets/propeditor/propertywidget.h7
-rw-r--r--lib/widgets/propeditor/propertywidgetproxy.cpp4
-rw-r--r--lib/widgets/propeditor/propertywidgetproxy.h9
-rw-r--r--lib/widgets/propeditor/psizeedit.cpp12
-rw-r--r--lib/widgets/propeditor/psizeedit.h3
-rw-r--r--lib/widgets/propeditor/psizepolicyedit.cpp12
-rw-r--r--lib/widgets/propeditor/psizepolicyedit.h3
-rw-r--r--lib/widgets/propeditor/pspinbox.cpp10
-rw-r--r--lib/widgets/propeditor/pspinbox.h5
-rw-r--r--lib/widgets/propeditor/pstringlistedit.cpp16
-rw-r--r--lib/widgets/propeditor/pstringlistedit.h3
-rw-r--r--lib/widgets/propeditor/psymbolcombo.cpp20
-rw-r--r--lib/widgets/propeditor/psymbolcombo.h3
-rw-r--r--lib/widgets/propeditor/purledit.cpp8
-rw-r--r--lib/widgets/propeditor/purledit.h3
-rw-r--r--lib/widgets/propeditor/pyesnobutton.cpp6
-rw-r--r--lib/widgets/propeditor/pyesnobutton.h3
-rw-r--r--lib/widgets/propeditor/qeditlistbox.cpp20
-rw-r--r--lib/widgets/propeditor/qeditlistbox.h15
-rw-r--r--lib/widgets/propeditor/qfloatinput.cpp14
-rw-r--r--lib/widgets/propeditor/qfloatinput.h10
-rw-r--r--lib/widgets/propeditor/test.cpp2
67 files changed, 314 insertions, 293 deletions
diff --git a/lib/widgets/propeditor/Mainpage.dox b/lib/widgets/propeditor/Mainpage.dox
index 6bc81be0..1f98b4ac 100644
--- a/lib/widgets/propeditor/Mainpage.dox
+++ b/lib/widgets/propeditor/Mainpage.dox
@@ -56,7 +56,7 @@ called @ref PropertyLib::PropertyMachineFactory. Static function @ref PropertyLi
can be used to obtain the reference to the factory instance. Factory creates and returns
so-called @ref PropertyLib::Machine for each registered property type (either predefined or user defined).
-@ref PropertyLib::Machine contains @ref PropertyLib::PropertyWidget and a list of "detailed" machines.
+@ref PropertyLib::Machine tqcontains @ref PropertyLib::PropertyWidget and a list of "detailed" machines.
Usually only property widget is necessary for a property but there are
complex properties like "Font" for example. We would like to see separate editors
for font family, size, etc. and a button to choose all of these in the dialog.
diff --git a/lib/widgets/propeditor/childproperty.cpp b/lib/widgets/propeditor/childproperty.cpp
index ac53936a..aa1326c9 100644
--- a/lib/widgets/propeditor/childproperty.cpp
+++ b/lib/widgets/propeditor/childproperty.cpp
@@ -28,16 +28,16 @@
namespace PropertyLib{
-ChildProperty::ChildProperty(MultiProperty *parent, int type, ChildPropertyType childType, const TQString &name,
+ChildProperty::ChildProperty(MultiProperty *tqparent, int type, ChildPropertyType childType, const TQString &name,
const TQString &description, const TQVariant &value, bool save, bool readOnly)
- :Property(type, name, description, value, save, readOnly), m_parent(parent), m_childType(childType)
+ :Property(type, name, description, value, save, readOnly), m_parent(tqparent), m_childType(childType)
{
}
-ChildProperty::ChildProperty(MultiProperty *parent, const TQString & name, ChildPropertyType childType,
+ChildProperty::ChildProperty(MultiProperty *tqparent, const TQString & name, ChildPropertyType childType,
const TQMap<TQString, TQVariant> &v_valueList, const TQString &description,
const TQVariant &value, bool save, bool readOnly)
- :Property(name, v_valueList, description, value, save, readOnly), m_parent(parent), m_childType(childType)
+ :Property(name, v_valueList, description, value, save, readOnly), m_parent(tqparent), m_childType(childType)
{
}
diff --git a/lib/widgets/propeditor/childproperty.h b/lib/widgets/propeditor/childproperty.h
index 6e247fd3..0d1655ae 100644
--- a/lib/widgets/propeditor/childproperty.h
+++ b/lib/widgets/propeditor/childproperty.h
@@ -29,7 +29,7 @@ class MultiProperty;
/**
@short Child property
-Child property is a detailed property for complex parent properties.
+Child property is a detailed property for complex tqparent properties.
For example, to edit a property of Point type one can request two
child properties for "x" and "y" components of a point.
@@ -60,11 +60,11 @@ public:
/**Constructs empty property.*/
ChildProperty() {}
/**Constructs property.*/
- ChildProperty(MultiProperty *parent, int type, ChildPropertyType childType, const TQString &name,
+ ChildProperty(MultiProperty *tqparent, int type, ChildPropertyType childType, const TQString &name,
const TQString &description, const TQVariant &value = TQVariant(),
bool save = true, bool readOnly = false);
/**Constructs property with @ref ValueFromList type.*/
- ChildProperty(MultiProperty *parent, const TQString &name, ChildPropertyType childType,
+ ChildProperty(MultiProperty *tqparent, const TQString &name, ChildPropertyType childType,
const TQMap<TQString, TQVariant> &v_valueList, const TQString &description,
const TQVariant &value = TQVariant(), bool save = true, bool readOnly = false);
diff --git a/lib/widgets/propeditor/multiproperty.cpp b/lib/widgets/propeditor/multiproperty.cpp
index 9c3b04c4..ac1cb0fb 100644
--- a/lib/widgets/propeditor/multiproperty.cpp
+++ b/lib/widgets/propeditor/multiproperty.cpp
@@ -47,7 +47,7 @@ TQString MultiProperty::name() const
{
if (list.count() >= 1)
return list.getFirst()->name();
- return TQString::null;
+ return TQString();
}
int MultiProperty::type() const
@@ -86,7 +86,7 @@ TQString MultiProperty::description() const
while ((property = it.current()) != 0)
{
if (property->description() != description)
- return TQString::null;
+ return TQString();
++it;
}
diff --git a/lib/widgets/propeditor/multiproperty.h b/lib/widgets/propeditor/multiproperty.h
index 49410a04..2330ffa0 100644
--- a/lib/widgets/propeditor/multiproperty.h
+++ b/lib/widgets/propeditor/multiproperty.h
@@ -43,7 +43,7 @@ with many properties of the same name and type at the same type.
MultiProperty is also responsible for storing detailed %property editors (instances
of @ref ChildProperty class. It's too much overhead to store child properties
-with their parent properties. MultiProperty provides a way to store child properties
+with their tqparent properties. MultiProperty provides a way to store child properties
only once for all properties with the same name and same type.
*/
class MultiProperty
diff --git a/lib/widgets/propeditor/pcheckbox.cpp b/lib/widgets/propeditor/pcheckbox.cpp
index 3f406e4d..e4a14389 100644
--- a/lib/widgets/propeditor/pcheckbox.cpp
+++ b/lib/widgets/propeditor/pcheckbox.cpp
@@ -31,12 +31,12 @@
namespace PropertyLib{
-PCheckBox::PCheckBox(MultiProperty *property, TQWidget *parent, const char *name)
- :PropertyWidget(property, parent, name)
+PCheckBox::PCheckBox(MultiProperty *property, TQWidget *tqparent, const char *name)
+ :PropertyWidget(property, tqparent, name)
{
TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0);
m_edit = new TQCheckBox(this);
- m_edit->setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
+ m_edit->tqsetSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
l->addWidget(m_edit);
connect(m_edit, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(updateProperty(bool)));
@@ -64,9 +64,9 @@ void PCheckBox::updateProperty(bool val)
void PCheckBox::drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value)
{
p->setBrush(cg.background());
- p->setPen(Qt::NoPen);
+ p->setPen(TQt::NoPen);
p->drawRect(r);
- p->drawText(r, Qt::AlignLeft | Qt::AlignVCenter | Qt::SingleLine, value.toBool() ? i18n("true") : i18n("false"));
+ p->drawText(r, TQt::AlignLeft | TQt::AlignVCenter | TQt::SingleLine, value.toBool() ? i18n("true") : i18n("false"));
}
}
diff --git a/lib/widgets/propeditor/pcheckbox.h b/lib/widgets/propeditor/pcheckbox.h
index b2fffc8e..5e593588 100644
--- a/lib/widgets/propeditor/pcheckbox.h
+++ b/lib/widgets/propeditor/pcheckbox.h
@@ -31,8 +31,9 @@ namespace PropertyLib{
*/
class PCheckBox: public PropertyWidget{
Q_OBJECT
+ TQ_OBJECT
public:
- PCheckBox(MultiProperty *property, TQWidget *parent = 0, const char *name = 0);
+ PCheckBox(MultiProperty *property, TQWidget *tqparent = 0, const char *name = 0);
/**@return the value currently entered in the editor widget.*/
virtual TQVariant value() const;
diff --git a/lib/widgets/propeditor/pcolorbutton.cpp b/lib/widgets/propeditor/pcolorbutton.cpp
index 9609442f..aef37f4a 100644
--- a/lib/widgets/propeditor/pcolorbutton.cpp
+++ b/lib/widgets/propeditor/pcolorbutton.cpp
@@ -33,8 +33,8 @@
namespace PropertyLib {
-PColorButton::PColorButton(MultiProperty* property, TQWidget* parent, const char* name)
- :PropertyWidget(property, parent, name)
+PColorButton::PColorButton(MultiProperty* property, TQWidget* tqparent, const char* name)
+ :PropertyWidget(property, tqparent, name)
{
TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0);
#ifndef PURE_QT
@@ -45,7 +45,7 @@ PColorButton::PColorButton(MultiProperty* property, TQWidget* parent, const char
connect(m_edit, TQT_SIGNAL(clicked()), this, TQT_SLOT(changeColor()));
#endif
- m_edit->setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
+ m_edit->tqsetSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
l->addWidget(m_edit);
}
@@ -61,14 +61,14 @@ TQVariant PColorButton::value() const
void PColorButton::drawViewer(TQPainter* p, const TQColorGroup& cg, const TQRect& r, const TQVariant& value)
{
/* p->setBrush(value.toColor());
- p->setPen(Qt::NoPen);
+ p->setPen(TQt::NoPen);
p->drawRect(r);*/
- p->setPen(Qt::NoPen);
+ p->setPen(TQt::NoPen);
p->setBrush(cg.background());
p->drawRect(r);
p->setBrush(value.toColor());
- p->setPen(Qt::SolidLine);
+ p->setPen(TQt::SolidLine);
TQRect r2(r);
r2.setTopLeft(r.topLeft() + TQPoint(5,5));
r2.setBottomRight(r.bottomRight() - TQPoint(5,5));
@@ -103,7 +103,7 @@ void PColorButton::updateProperty(const TQColor &// color
void PColorButton::changeColor()
{
#ifdef PURE_QT
- m_color = QColorDialog::getColor(m_color,this);
+ m_color = TQColorDialog::getColor(m_color,this);
updateProperty(m_color);
m_edit->setText(m_color.name());
TQPixmap px;
diff --git a/lib/widgets/propeditor/pcolorbutton.h b/lib/widgets/propeditor/pcolorbutton.h
index 8a18ab9c..a132f0ce 100644
--- a/lib/widgets/propeditor/pcolorbutton.h
+++ b/lib/widgets/propeditor/pcolorbutton.h
@@ -36,8 +36,9 @@ namespace PropertyLib{
class PColorButton: public PropertyWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- PColorButton(MultiProperty *property, TQWidget *parent = 0, const char *name = 0);
+ PColorButton(MultiProperty *property, TQWidget *tqparent = 0, const char *name = 0);
virtual TQVariant value() const;
virtual void drawViewer(TQPainter* p, const TQColorGroup& cg, const TQRect& r, const TQVariant& value);
diff --git a/lib/widgets/propeditor/pcolorcombo.cpp b/lib/widgets/propeditor/pcolorcombo.cpp
index eeac7de8..5fee6b1f 100644
--- a/lib/widgets/propeditor/pcolorcombo.cpp
+++ b/lib/widgets/propeditor/pcolorcombo.cpp
@@ -26,12 +26,12 @@
namespace PropertyLib{
-PColorCombo::PColorCombo(MultiProperty *property, TQWidget *parent, const char *name)
- :PropertyWidget(property, parent, name)
+PColorCombo::PColorCombo(MultiProperty *property, TQWidget *tqparent, const char *name)
+ :PropertyWidget(property, tqparent, name)
{
TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0);
m_edit = new KColorCombo(this);
- m_edit->setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
+ m_edit->tqsetSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
l->addWidget(m_edit);
connect(m_edit, TQT_SIGNAL(activated(int)), this, TQT_SLOT(updateProperty(int)));
@@ -58,12 +58,12 @@ void PColorCombo::updateProperty(int /*val*/)
void PColorCombo::drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value)
{
- p->setPen(Qt::NoPen);
+ p->setPen(TQt::NoPen);
p->setBrush(cg.background());
p->drawRect(r);
p->setBrush(value.toColor());
- p->setPen(Qt::SolidLine);
+ p->setPen(TQt::SolidLine);
TQRect r2(r);
r2.setTopLeft(r.topLeft() + TQPoint(5,5));
r2.setBottomRight(r.bottomRight() - TQPoint(5,5));
diff --git a/lib/widgets/propeditor/pcolorcombo.h b/lib/widgets/propeditor/pcolorcombo.h
index 68f19e58..88c5b355 100644
--- a/lib/widgets/propeditor/pcolorcombo.h
+++ b/lib/widgets/propeditor/pcolorcombo.h
@@ -31,8 +31,9 @@ namespace PropertyLib{
*/
class PColorCombo: public PropertyWidget{
Q_OBJECT
+ TQ_OBJECT
public:
- PColorCombo(MultiProperty *property, TQWidget *parent = 0, const char *name = 0);
+ PColorCombo(MultiProperty *property, TQWidget *tqparent = 0, const char *name = 0);
/**@return the value currently entered in the editor widget.*/
virtual TQVariant value() const;
diff --git a/lib/widgets/propeditor/pcombobox.cpp b/lib/widgets/propeditor/pcombobox.cpp
index 958ba34d..18cad9b6 100644
--- a/lib/widgets/propeditor/pcombobox.cpp
+++ b/lib/widgets/propeditor/pcombobox.cpp
@@ -24,14 +24,14 @@
namespace PropertyLib{
-PComboBox::PComboBox(MultiProperty *property, const TQMap<TQString, TQVariant> &list, TQWidget *parent, const char *name)
- :PropertyWidget(property, parent, name), m_valueList(list)
+PComboBox::PComboBox(MultiProperty *property, const TQMap<TQString, TQVariant> &list, TQWidget *tqparent, const char *name)
+ :PropertyWidget(property, tqparent, name), m_valueList(list)
{
init(false);
}
-PComboBox::PComboBox(MultiProperty *property, const TQMap<TQString, TQVariant> &list, bool rw, TQWidget *parent, const char *name)
- :PropertyWidget(property, parent, name), m_valueList(list)
+PComboBox::PComboBox(MultiProperty *property, const TQMap<TQString, TQVariant> &list, bool rw, TQWidget *tqparent, const char *name)
+ :PropertyWidget(property, tqparent, name), m_valueList(list)
{
init(rw);
}
@@ -40,7 +40,7 @@ void PComboBox::init(bool rw)
{
TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0);
m_edit = new TQComboBox(rw, this);
- m_edit->setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
+ m_edit->tqsetSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
l->addWidget(m_edit);
fillBox();
@@ -58,7 +58,7 @@ void PComboBox::fillBox()
TQVariant PComboBox::value() const
{
- TQMap<TQString, TQVariant>::const_iterator it = m_valueList.find(m_edit->currentText());
+ TQMap<TQString, TQVariant>::const_iterator it = m_valueList.tqfind(m_edit->currentText());
if (it == m_valueList.end())
return TQVariant("");
return TQVariant(it.data());
@@ -66,11 +66,7 @@ TQVariant PComboBox::value() const
void PComboBox::setValue(const TQVariant &value, bool emitChange)
{
-#if QT_VERSION >= 0x030100
if (!value.isNull())
-#else
- if (value.canCast(TQVariant::String))
-#endif
{
disconnect(m_edit, TQT_SIGNAL(activated(int)), this, TQT_SLOT(updateProperty(int)));
m_edit->setCurrentText(findDescription(value));
diff --git a/lib/widgets/propeditor/pcombobox.h b/lib/widgets/propeditor/pcombobox.h
index 9f03407c..4176e2ed 100644
--- a/lib/widgets/propeditor/pcombobox.h
+++ b/lib/widgets/propeditor/pcombobox.h
@@ -35,11 +35,12 @@ namespace PropertyLib{
*/
class PComboBox: public PropertyWidget{
Q_OBJECT
+ TQ_OBJECT
public:
/**This constructor is used for read-only selection combo. It provides a value from valueList*/
- PComboBox(MultiProperty *property, const TQMap<TQString, TQVariant> &list, TQWidget *parent = 0, const char *name = 0);
+ PComboBox(MultiProperty *property, const TQMap<TQString, TQVariant> &list, TQWidget *tqparent = 0, const char *name = 0);
/**This constructor is used for read-write selection combo. It provides a value from valueList*/
- PComboBox(MultiProperty *property, const TQMap<TQString, TQVariant> &list, bool rw, TQWidget *parent = 0, const char *name = 0);
+ PComboBox(MultiProperty *property, const TQMap<TQString, TQVariant> &list, bool rw, TQWidget *tqparent = 0, const char *name = 0);
/**@return the value currently entered in the editor widget.*/
virtual TQVariant value() const;
diff --git a/lib/widgets/propeditor/pcursoredit.cpp b/lib/widgets/propeditor/pcursoredit.cpp
index 85aefd5e..02a2148c 100644
--- a/lib/widgets/propeditor/pcursoredit.cpp
+++ b/lib/widgets/propeditor/pcursoredit.cpp
@@ -24,8 +24,8 @@
namespace PropertyLib{
PCursorEdit::PCursorEdit(MultiProperty* property, const TQMap<TQString, TQVariant> &spValues,
- TQWidget* parent, const char* name)
- :PComboBox(property, spValues, parent, name)
+ TQWidget* tqparent, const char* name)
+ :PComboBox(property, spValues, tqparent, name)
{
}
diff --git a/lib/widgets/propeditor/pcursoredit.h b/lib/widgets/propeditor/pcursoredit.h
index 6149bce7..82924fd2 100644
--- a/lib/widgets/propeditor/pcursoredit.h
+++ b/lib/widgets/propeditor/pcursoredit.h
@@ -30,9 +30,10 @@ namespace PropertyLib{
class PCursorEdit: public PComboBox
{
Q_OBJECT
+ TQ_OBJECT
public:
PCursorEdit(MultiProperty* property, const TQMap<TQString, TQVariant> &spValues,
- TQWidget* parent = 0, const char* name = 0);
+ TQWidget* tqparent = 0, const char* name = 0);
virtual void drawViewer(TQPainter* p, const TQColorGroup& cg, const TQRect& r, const TQVariant& value);
};
diff --git a/lib/widgets/propeditor/pdateedit.cpp b/lib/widgets/propeditor/pdateedit.cpp
index 141eef20..46de4069 100644
--- a/lib/widgets/propeditor/pdateedit.cpp
+++ b/lib/widgets/propeditor/pdateedit.cpp
@@ -25,12 +25,12 @@
namespace PropertyLib{
-PDateEdit::PDateEdit(MultiProperty* property, TQWidget* parent, const char* name)
- :PropertyWidget(property, parent, name)
+PDateEdit::PDateEdit(MultiProperty* property, TQWidget* tqparent, const char* name)
+ :PropertyWidget(property, tqparent, name)
{
TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0);
- m_edit = new QDateEdit(this);
- m_edit->setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
+ m_edit = new TQDateEdit(this);
+ m_edit->tqsetSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
l->addWidget(m_edit);
connect(m_edit, TQT_SIGNAL(valueChanged(const TQDate&)), this, TQT_SLOT(updateProperty(const TQDate&)));
@@ -43,10 +43,10 @@ TQVariant PDateEdit::value() const
void PDateEdit::drawViewer(TQPainter* p, const TQColorGroup& cg, const TQRect& r, const TQVariant& value)
{
- p->setPen(Qt::NoPen);
+ p->setPen(TQt::NoPen);
p->setBrush(cg.background());
p->drawRect(r);
- p->drawText(r, Qt::AlignLeft | Qt::AlignVCenter | Qt::SingleLine, value.toDate().toString(Qt::LocalDate));
+ p->drawText(r, TQt::AlignLeft | TQt::AlignVCenter | TQt::SingleLine, value.toDate().toString(Qt::LocalDate));
}
void PDateEdit::setValue(const TQVariant& value, bool emitChange)
diff --git a/lib/widgets/propeditor/pdateedit.h b/lib/widgets/propeditor/pdateedit.h
index da458737..a21dbc3f 100644
--- a/lib/widgets/propeditor/pdateedit.h
+++ b/lib/widgets/propeditor/pdateedit.h
@@ -22,7 +22,7 @@
#include "propertywidget.h"
-class QDateEdit;
+class TQDateEdit;
namespace PropertyLib{
@@ -32,8 +32,9 @@ namespace PropertyLib{
class PDateEdit : public PropertyWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- PDateEdit(MultiProperty* property, TQWidget* parent=0, const char* name=0);
+ PDateEdit(MultiProperty* property, TQWidget* tqparent=0, const char* name=0);
virtual TQVariant value() const;
virtual void drawViewer(TQPainter* p, const TQColorGroup& cg, const TQRect& r, const TQVariant& value);
@@ -43,7 +44,7 @@ private slots:
void updateProperty(const TQDate &val);
private:
- QDateEdit *m_edit;
+ TQDateEdit *m_edit;
};
}
diff --git a/lib/widgets/propeditor/pdatetimeedit.cpp b/lib/widgets/propeditor/pdatetimeedit.cpp
index 5e414c77..e7a4b04f 100644
--- a/lib/widgets/propeditor/pdatetimeedit.cpp
+++ b/lib/widgets/propeditor/pdatetimeedit.cpp
@@ -25,11 +25,11 @@
namespace PropertyLib{
-PDateTimeEdit::PDateTimeEdit(MultiProperty* property, TQWidget* parent, const char* name): PropertyWidget(property, parent, name)
+PDateTimeEdit::PDateTimeEdit(MultiProperty* property, TQWidget* tqparent, const char* name): PropertyWidget(property, tqparent, name)
{
TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0);
- m_edit = new QDateTimeEdit(this);
- m_edit->setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
+ m_edit = new TQDateTimeEdit(this);
+ m_edit->tqsetSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
l->addWidget(m_edit);
connect(m_edit, TQT_SIGNAL(valueChanged(const TQDateTime&)), this, TQT_SLOT(updateProperty(const TQDateTime&)));
@@ -42,10 +42,10 @@ TQVariant PDateTimeEdit::value() const
void PDateTimeEdit::drawViewer(TQPainter* p, const TQColorGroup& cg, const TQRect& r, const TQVariant& value)
{
- p->setPen(Qt::NoPen);
+ p->setPen(TQt::NoPen);
p->setBrush(cg.background());
p->drawRect(r);
- p->drawText(r, Qt::AlignLeft | Qt::AlignVCenter | Qt::SingleLine, value.toDateTime().toString(Qt::LocalDate));
+ p->drawText(r, TQt::AlignLeft | TQt::AlignVCenter | TQt::SingleLine, value.toDateTime().toString(Qt::LocalDate));
}
void PDateTimeEdit::setValue(const TQVariant& value, bool emitChange)
diff --git a/lib/widgets/propeditor/pdatetimeedit.h b/lib/widgets/propeditor/pdatetimeedit.h
index 40e8b428..e44c07d6 100644
--- a/lib/widgets/propeditor/pdatetimeedit.h
+++ b/lib/widgets/propeditor/pdatetimeedit.h
@@ -22,7 +22,7 @@
#include "propertywidget.h"
-class QDateTimeEdit;
+class TQDateTimeEdit;
namespace PropertyLib{
@@ -32,8 +32,9 @@ namespace PropertyLib{
class PDateTimeEdit : public PropertyWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- PDateTimeEdit(MultiProperty* property, TQWidget* parent=0, const char* name=0);
+ PDateTimeEdit(MultiProperty* property, TQWidget* tqparent=0, const char* name=0);
virtual TQVariant value() const;
virtual void drawViewer(TQPainter* p, const TQColorGroup& cg, const TQRect& r, const TQVariant& value);
@@ -43,7 +44,7 @@ private slots:
void updateProperty(const TQDateTime &val);
private:
- QDateTimeEdit *m_edit;
+ TQDateTimeEdit *m_edit;
};
diff --git a/lib/widgets/propeditor/pdoublenuminput.cpp b/lib/widgets/propeditor/pdoublenuminput.cpp
index df6b3bcb..742180b4 100644
--- a/lib/widgets/propeditor/pdoublenuminput.cpp
+++ b/lib/widgets/propeditor/pdoublenuminput.cpp
@@ -22,7 +22,7 @@
#ifndef PURE_QT
#include <knuminput.h>
#else
-#include "qfloatinput.h"
+#include "tqfloatinput.h"
#endif
#include <limits.h>
@@ -31,19 +31,19 @@
namespace PropertyLib{
-PDoubleNumInput::PDoubleNumInput(MultiProperty *property, TQWidget *parent, const char *name)
- :PropertyWidget(property, parent, name)
+PDoubleNumInput::PDoubleNumInput(MultiProperty *property, TQWidget *tqparent, const char *name)
+ :PropertyWidget(property, tqparent, name)
{
TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0);
#ifndef PURE_QT
m_edit = new KDoubleNumInput(-999999.0, 999999.0, 0.0, 0.01, 2, this);
- m_edit->setLabel(TQString::null);
+ m_edit->setLabel(TQString());
connect(m_edit, TQT_SIGNAL(valueChanged(double)), this, TQT_SLOT(updateProperty(double)));
#else
- m_edit = new QFloatInput(-999999, 999999, 0.01, 2, this );
+ m_edit = new TQFloatInput(-999999, 999999, 0.01, 2, this );
connect(m_edit, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(updateProperty(int)));
#endif
- m_edit->setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
+ m_edit->tqsetSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
/* m_edit->setMinValue(-999999999);
m_edit->setMaxValue(+999999999);
m_edit->setPrecision(2);*/
@@ -78,7 +78,7 @@ void PDoubleNumInput::updateProperty(double val)
void PDoubleNumInput::updateProperty(int val)
{
#ifdef PURE_QT
- TQString format = TQString("%.%1f").arg( m_edit->digits() );
+ TQString format = TQString("%.%1f").tqarg( m_edit->digits() );
TQString strVal = TQString().sprintf(format.latin1(),
(val/(float)pow(m_edit->digits(),10)) );
emit propertyChanged(m_property, TQVariant(strVal));
diff --git a/lib/widgets/propeditor/pdoublenuminput.h b/lib/widgets/propeditor/pdoublenuminput.h
index 83849335..a59ae43d 100644
--- a/lib/widgets/propeditor/pdoublenuminput.h
+++ b/lib/widgets/propeditor/pdoublenuminput.h
@@ -25,7 +25,7 @@
#ifndef PURE_QT
class KDoubleNumInput;
#else
-class QFloatInput;
+class TQFloatInput;
#endif
namespace PropertyLib{
@@ -36,8 +36,9 @@ namespace PropertyLib{
class PDoubleNumInput: public PropertyWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- PDoubleNumInput(MultiProperty *property, TQWidget *parent = 0, const char *name = 0);
+ PDoubleNumInput(MultiProperty *property, TQWidget *tqparent = 0, const char *name = 0);
/**@return the value currently entered in the editor widget.*/
virtual TQVariant value() const;
@@ -46,7 +47,7 @@ public:
virtual void setValue(const TQVariant &value, bool emitChange=true);
private slots:
- //because of a bug in moc which doesn't detect conditional slots
+ //because of a bug in tqmoc which doesn't detect conditional slots
//we need them both
void updateProperty(double val);
void updateProperty(int val);
@@ -55,7 +56,7 @@ private:
#ifndef PURE_QT
KDoubleNumInput *m_edit;
#else
- QFloatInput *m_edit;
+ TQFloatInput *m_edit;
#endif
};
diff --git a/lib/widgets/propeditor/pdummywidget.cpp b/lib/widgets/propeditor/pdummywidget.cpp
index 65ec35e3..428953f2 100644
--- a/lib/widgets/propeditor/pdummywidget.cpp
+++ b/lib/widgets/propeditor/pdummywidget.cpp
@@ -23,8 +23,8 @@
namespace PropertyLib{
-PDummyWidget::PDummyWidget(MultiProperty *property, TQWidget *parent, const char *name)
- :PropertyWidget(property, parent, name)
+PDummyWidget::PDummyWidget(MultiProperty *property, TQWidget *tqparent, const char *name)
+ :PropertyWidget(property, tqparent, name)
{
}
@@ -43,7 +43,7 @@ void PDummyWidget::setValue(const TQVariant &value, bool emitChange)
void PDummyWidget::drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &/*value*/)
{
p->setBrush(cg.background());
- p->setPen(Qt::NoPen);
+ p->setPen(TQt::NoPen);
p->drawRect(r);
}
diff --git a/lib/widgets/propeditor/pdummywidget.h b/lib/widgets/propeditor/pdummywidget.h
index 0e191e87..f58e92b9 100644
--- a/lib/widgets/propeditor/pdummywidget.h
+++ b/lib/widgets/propeditor/pdummywidget.h
@@ -35,13 +35,14 @@ namespace PropertyLib{
@short %Property editor with empty widget.
This is usefull for properties which can't be edited in a generic way
-like QValueList's or QMap's stored in a variant.
+like TQValueList's or TQMap's stored in a variant.
*/
class PDummyWidget: public PropertyWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- PDummyWidget(MultiProperty *property, TQWidget *parent = 0, const char *name = 0);
+ PDummyWidget(MultiProperty *property, TQWidget *tqparent = 0, const char *name = 0);
/**@return the value currently entered in the editor widget.*/
virtual TQVariant value() const;
diff --git a/lib/widgets/propeditor/pfontbutton.cpp b/lib/widgets/propeditor/pfontbutton.cpp
index dc976b8f..d2a10217 100644
--- a/lib/widgets/propeditor/pfontbutton.cpp
+++ b/lib/widgets/propeditor/pfontbutton.cpp
@@ -33,12 +33,12 @@
namespace PropertyLib{
-PFontButton::PFontButton(MultiProperty* property, TQWidget* parent, const char* name)
- :PropertyWidget(property, parent, name)
+PFontButton::PFontButton(MultiProperty* property, TQWidget* tqparent, const char* name)
+ :PropertyWidget(property, tqparent, name)
{
TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0);
m_edit = new KFontRequester(this);
- m_edit->setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
+ m_edit->tqsetSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
#ifndef PURE_QT
m_edit->button()->setText(i18n("..."));
#endif
@@ -54,14 +54,14 @@ TQVariant PFontButton::value() const
void PFontButton::drawViewer(TQPainter* p, const TQColorGroup& cg, const TQRect& r, const TQVariant& value)
{
- p->setPen(Qt::NoPen);
+ p->setPen(TQt::NoPen);
p->setBrush(cg.background());
p->drawRect(r);
TQFontInfo fi(value.toFont());
- p->drawText(r, Qt::AlignLeft | Qt::AlignVCenter | Qt::SingleLine,
+ p->drawText(r, TQt::AlignLeft | TQt::AlignVCenter | TQt::SingleLine,
fi.family() + (fi.bold() ? i18n(" Bold") : TQString("")) +
(fi.italic() ? i18n(" Italic") : TQString("")) +
- " " + TQString("%1").arg(fi.pointSize()) );
+ " " + TQString("%1").tqarg(fi.pointSize()) );
}
void PFontButton::setValue(const TQVariant& value, bool emitChange)
diff --git a/lib/widgets/propeditor/pfontbutton.h b/lib/widgets/propeditor/pfontbutton.h
index 6538f5ae..d875f307 100644
--- a/lib/widgets/propeditor/pfontbutton.h
+++ b/lib/widgets/propeditor/pfontbutton.h
@@ -32,8 +32,9 @@ namespace PropertyLib{
class PFontButton : public PropertyWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- PFontButton(MultiProperty* property, TQWidget* parent = 0, const char* name = 0);
+ PFontButton(MultiProperty* property, TQWidget* tqparent = 0, const char* name = 0);
virtual TQVariant value() const;
virtual void drawViewer(TQPainter* p, const TQColorGroup& cg, const TQRect& r, const TQVariant& value);
diff --git a/lib/widgets/propeditor/pfontcombo.cpp b/lib/widgets/propeditor/pfontcombo.cpp
index 8b0ee7a7..240310c7 100644
--- a/lib/widgets/propeditor/pfontcombo.cpp
+++ b/lib/widgets/propeditor/pfontcombo.cpp
@@ -33,12 +33,12 @@
namespace PropertyLib{
-PFontCombo::PFontCombo(MultiProperty *property, TQWidget *parent, const char *name)
- :PropertyWidget(property, parent, name)
+PFontCombo::PFontCombo(MultiProperty *property, TQWidget *tqparent, const char *name)
+ :PropertyWidget(property, tqparent, name)
{
TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0);
m_edit = new KFontCombo(this);
- m_edit->setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
+ m_edit->tqsetSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
l->addWidget(m_edit);
/*adymo: KFontCombo seems to have a bug: when it is not editable, the signals
diff --git a/lib/widgets/propeditor/pfontcombo.h b/lib/widgets/propeditor/pfontcombo.h
index a703c99d..63f07f51 100644
--- a/lib/widgets/propeditor/pfontcombo.h
+++ b/lib/widgets/propeditor/pfontcombo.h
@@ -23,7 +23,7 @@
#include "propertywidget.h"
#ifdef PURE_QT
-#define KFontCombo QComboBox
+#define KFontCombo TQComboBox
#endif
class KFontCombo;
@@ -35,8 +35,9 @@ namespace PropertyLib{
*/
class PFontCombo: public PropertyWidget{
Q_OBJECT
+ TQ_OBJECT
public:
- PFontCombo(MultiProperty *property, TQWidget *parent = 0, const char *name = 0);
+ PFontCombo(MultiProperty *property, TQWidget *tqparent = 0, const char *name = 0);
/**@return the value currently entered in the editor widget.*/
virtual TQVariant value() const;
diff --git a/lib/widgets/propeditor/plineedit.cpp b/lib/widgets/propeditor/plineedit.cpp
index f5e1ecb0..0d3afa85 100644
--- a/lib/widgets/propeditor/plineedit.cpp
+++ b/lib/widgets/propeditor/plineedit.cpp
@@ -24,12 +24,12 @@
namespace PropertyLib{
-PLineEdit::PLineEdit(MultiProperty *property, TQWidget *parent, const char *name)
- :PropertyWidget(property, parent, name)
+PLineEdit::PLineEdit(MultiProperty *property, TQWidget *tqparent, const char *name)
+ :PropertyWidget(property, tqparent, name)
{
TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0);
m_edit = new KLineEdit(this);
- m_edit->setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
+ m_edit->tqsetSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
l->addWidget(m_edit);
connect(m_edit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(updateProperty(const TQString&)));
diff --git a/lib/widgets/propeditor/plineedit.h b/lib/widgets/propeditor/plineedit.h
index 6feb2a7b..c4d0c0f1 100644
--- a/lib/widgets/propeditor/plineedit.h
+++ b/lib/widgets/propeditor/plineedit.h
@@ -31,8 +31,9 @@ namespace PropertyLib{
*/
class PLineEdit: public PropertyWidget{
Q_OBJECT
+ TQ_OBJECT
public:
- PLineEdit(MultiProperty *property, TQWidget *parent = 0, const char *name = 0);
+ PLineEdit(MultiProperty *property, TQWidget *tqparent = 0, const char *name = 0);
/**@return the value currently entered in the editor widget.*/
virtual TQVariant value() const;
diff --git a/lib/widgets/propeditor/plinestyleedit.cpp b/lib/widgets/propeditor/plinestyleedit.cpp
index adee930e..13094245 100644
--- a/lib/widgets/propeditor/plinestyleedit.cpp
+++ b/lib/widgets/propeditor/plinestyleedit.cpp
@@ -127,11 +127,11 @@ namespace PropertyLib {
"................................................"};
-PLineStyleEdit::PLineStyleEdit(MultiProperty* property, TQWidget* parent, const char* name): PropertyWidget(property, parent, name)
+PLineStyleEdit::PLineStyleEdit(MultiProperty* property, TQWidget* tqparent, const char* name): PropertyWidget(property, tqparent, name)
{
TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0);
m_edit = new TQComboBox(this);
- m_edit->setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
+ m_edit->tqsetSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
l->addWidget(m_edit);
m_edit->insertItem(TQPixmap(nopen));
@@ -150,7 +150,7 @@ TQVariant PLineStyleEdit::value() const
void PLineStyleEdit::drawViewer(TQPainter* p, const TQColorGroup& cg, const TQRect& r, const TQVariant& value)
{
- p->setPen(Qt::NoPen);
+ p->setPen(TQt::NoPen);
p->setBrush(cg.background());
p->drawRect(r);
diff --git a/lib/widgets/propeditor/plinestyleedit.h b/lib/widgets/propeditor/plinestyleedit.h
index 8bb076d4..6021cb9c 100644
--- a/lib/widgets/propeditor/plinestyleedit.h
+++ b/lib/widgets/propeditor/plinestyleedit.h
@@ -31,8 +31,9 @@ namespace PropertyLib {
*/
class PLineStyleEdit : public PropertyWidget {
Q_OBJECT
+ TQ_OBJECT
public:
- PLineStyleEdit(MultiProperty* property, TQWidget* parent = 0, const char* name = 0);
+ PLineStyleEdit(MultiProperty* property, TQWidget* tqparent = 0, const char* name = 0);
virtual TQVariant value() const;
virtual void drawViewer(TQPainter* p, const TQColorGroup& cg, const TQRect& r, const TQVariant& value);
diff --git a/lib/widgets/propeditor/ppixmapedit.cpp b/lib/widgets/propeditor/ppixmapedit.cpp
index a4c18791..0eaec74b 100644
--- a/lib/widgets/propeditor/ppixmapedit.cpp
+++ b/lib/widgets/propeditor/ppixmapedit.cpp
@@ -41,23 +41,23 @@
namespace PropertyLib{
-PPixmapEdit::PPixmapEdit(MultiProperty* property, TQWidget* parent, const char* name)
- :PropertyWidget(property, parent, name)
+PPixmapEdit::PPixmapEdit(MultiProperty* property, TQWidget* tqparent, const char* name)
+ :PropertyWidget(property, tqparent, name)
{
TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0);
m_edit = new TQLabel(this);
- m_edit->setAlignment(Qt::AlignTop);
+ m_edit->tqsetAlignment(TQt::AlignTop);
m_edit->resize(width(), height()-1);
- m_edit->setBackgroundMode(Qt::PaletteBase);
+ m_edit->setBackgroundMode(TQt::PaletteBase);
m_edit->installEventFilter(this);
m_button = new TQPushButton(i18n("..."), this);
m_button->resize(height(), height()-8);
m_button->move(width() - m_button->width() -1, 0);
- m_button->setSizePolicy(TQSizePolicy::Maximum, TQSizePolicy::Fixed);
+ m_button->tqsetSizePolicy(TQSizePolicy::Maximum, TQSizePolicy::Fixed);
l->addWidget(m_edit);
l->addWidget(m_button);
- m_popup = new TQLabel(0, 0, Qt::WStyle_NoBorder|Qt::WX11BypassWM|WStyle_StaysOnTop);
+ m_popup = new TQLabel(0, 0, TQt::WStyle_NoBorder|TQt::WX11BypassWM|WStyle_StaysOnTop);
m_popup->hide();
@@ -71,7 +71,7 @@ TQVariant PPixmapEdit::value() const
void PPixmapEdit::drawViewer(TQPainter* p, const TQColorGroup& cg, const TQRect& r, const TQVariant& value)
{
- p->setPen(Qt::NoPen);
+ p->setPen(TQt::NoPen);
p->setBrush(cg.background());
p->drawRect(r);
p->drawPixmap(r.topLeft().x(), r.topLeft().y(), value.toPixmap());
@@ -87,7 +87,7 @@ void PPixmapEdit::setValue(const TQVariant& value, bool emitChange)
void PPixmapEdit::updateProperty()
{
#ifndef PURE_QT
- KURL url = KFileDialog::getImageOpenURL(TQString::null, this);
+ KURL url = KFileDialog::getImageOpenURL(TQString(), this);
if (!url.isEmpty())
{
m_edit->setPixmap(TQPixmap(url.path()));
@@ -112,7 +112,7 @@ void PPixmapEdit::resizeEvent(TQResizeEvent *ev)
bool PPixmapEdit::eventFilter(TQObject *o, TQEvent *ev)
{
- if(o == m_edit)
+ if(TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(m_edit))
{
if(ev->type() == TQEvent::MouseButtonPress)
{
@@ -131,7 +131,7 @@ bool PPixmapEdit::eventFilter(TQObject *o, TQEvent *ev)
}
if(ev->type() == TQEvent::KeyPress)
{
- TQKeyEvent* e = static_cast<TQKeyEvent*>(ev);
+ TQKeyEvent* e = TQT_TQKEYEVENT(ev);
if((e->key() == Key_Enter) || (e->key()== Key_Space) || (e->key() == Key_Return))
{
m_button->animateClick();
diff --git a/lib/widgets/propeditor/ppixmapedit.h b/lib/widgets/propeditor/ppixmapedit.h
index 7f431289..09d7ffef 100644
--- a/lib/widgets/propeditor/ppixmapedit.h
+++ b/lib/widgets/propeditor/ppixmapedit.h
@@ -33,8 +33,9 @@ namespace PropertyLib{
class PPixmapEdit : public PropertyWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- PPixmapEdit(MultiProperty* property, TQWidget* parent = 0, const char* name = 0);
+ PPixmapEdit(MultiProperty* property, TQWidget* tqparent = 0, const char* name = 0);
virtual TQVariant value() const;
virtual void drawViewer(TQPainter* p, const TQColorGroup& cg, const TQRect& r, const TQVariant& value);
diff --git a/lib/widgets/propeditor/ppointedit.cpp b/lib/widgets/propeditor/ppointedit.cpp
index eb1a382e..7f31d92d 100644
--- a/lib/widgets/propeditor/ppointedit.cpp
+++ b/lib/widgets/propeditor/ppointedit.cpp
@@ -25,11 +25,11 @@
namespace PropertyLib{
-PPointEdit::PPointEdit(MultiProperty* property, TQWidget* parent, const char* name): PropertyWidget(property, parent, name)
+PPointEdit::PPointEdit(MultiProperty* property, TQWidget* tqparent, const char* name): PropertyWidget(property, tqparent, name)
{
TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0);
m_edit = new KLineEdit(this);
- m_edit->setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
+ m_edit->tqsetSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
l->addWidget(m_edit);
m_edit->setReadOnly(true);
@@ -42,16 +42,16 @@ TQVariant PPointEdit::value() const
void PPointEdit::drawViewer(TQPainter* p, const TQColorGroup& cg, const TQRect& r, const TQVariant& value)
{
- p->setPen(Qt::NoPen);
+ p->setPen(TQt::NoPen);
p->setBrush(cg.background());
p->drawRect(r);
- p->drawText(r, Qt::AlignLeft | Qt::AlignVCenter | Qt::SingleLine, TQString("[ %1, %2 ]").arg(value.toPoint().x()).arg(value.toPoint().y()));
+ p->drawText(r, TQt::AlignLeft | TQt::AlignVCenter | TQt::SingleLine, TQString("[ %1, %2 ]").tqarg(value.toPoint().x()).tqarg(value.toPoint().y()));
}
void PPointEdit::setValue(const TQVariant& value, bool emitChange)
{
m_value = value;
- m_edit->setText(TQString("[ %1, %2 ]").arg(value.toPoint().x()).arg(value.toPoint().y()));
+ m_edit->setText(TQString("[ %1, %2 ]").tqarg(value.toPoint().x()).tqarg(value.toPoint().y()));
if (emitChange)
emit propertyChanged(m_property, value);
diff --git a/lib/widgets/propeditor/ppointedit.h b/lib/widgets/propeditor/ppointedit.h
index e78f9928..e7de9178 100644
--- a/lib/widgets/propeditor/ppointedit.h
+++ b/lib/widgets/propeditor/ppointedit.h
@@ -32,8 +32,9 @@ namespace PropertyLib{
class PPointEdit : public PropertyWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- PPointEdit(MultiProperty* property, TQWidget* parent=0, const char* name=0);
+ PPointEdit(MultiProperty* property, TQWidget* tqparent=0, const char* name=0);
virtual TQVariant value() const;
virtual void drawViewer(TQPainter* p, const TQColorGroup& cg, const TQRect& r, const TQVariant& value);
diff --git a/lib/widgets/propeditor/prectedit.cpp b/lib/widgets/propeditor/prectedit.cpp
index 6b7de9ce..562c013b 100644
--- a/lib/widgets/propeditor/prectedit.cpp
+++ b/lib/widgets/propeditor/prectedit.cpp
@@ -25,11 +25,11 @@
namespace PropertyLib{
-PRectEdit::PRectEdit(MultiProperty* property, TQWidget* parent, const char* name): PropertyWidget(property, parent, name)
+PRectEdit::PRectEdit(MultiProperty* property, TQWidget* tqparent, const char* name): PropertyWidget(property, tqparent, name)
{
TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0);
m_edit = new KLineEdit(this);
- m_edit->setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
+ m_edit->tqsetSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
l->addWidget(m_edit);
m_edit->setReadOnly(true);
@@ -42,16 +42,16 @@ TQVariant PRectEdit::value() const
void PRectEdit::drawViewer(TQPainter* p, const TQColorGroup& cg, const TQRect& r, const TQVariant& value)
{
- p->setPen(Qt::NoPen);
+ p->setPen(TQt::NoPen);
p->setBrush(cg.background());
p->drawRect(r);
- p->drawText(r, Qt::AlignLeft | Qt::AlignVCenter | Qt::SingleLine, TQString("[ %1, %2, %3, %4 ]").arg(value.toRect().x()).arg(value.toRect().y()).arg(value.toRect().width()).arg(value.toRect().height()));
+ p->drawText(r, TQt::AlignLeft | TQt::AlignVCenter | TQt::SingleLine, TQString("[ %1, %2, %3, %4 ]").tqarg(value.toRect().x()).tqarg(value.toRect().y()).tqarg(value.toRect().width()).tqarg(value.toRect().height()));
}
void PRectEdit::setValue(const TQVariant& value, bool emitChange)
{
m_value = value;
- m_edit->setText(TQString("[ %1, %2, %3, %4 ]").arg(value.toRect().x()).arg(value.toRect().y()).arg(value.toRect().width()).arg(value.toRect().height()));
+ m_edit->setText(TQString("[ %1, %2, %3, %4 ]").tqarg(value.toRect().x()).tqarg(value.toRect().y()).tqarg(value.toRect().width()).tqarg(value.toRect().height()));
if (emitChange)
emit propertyChanged(m_property, value);
diff --git a/lib/widgets/propeditor/prectedit.h b/lib/widgets/propeditor/prectedit.h
index 116ee668..14381f80 100644
--- a/lib/widgets/propeditor/prectedit.h
+++ b/lib/widgets/propeditor/prectedit.h
@@ -32,8 +32,9 @@ namespace PropertyLib{
class PRectEdit : public PropertyWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- PRectEdit(MultiProperty* property, TQWidget* parent=0, const char* name=0);
+ PRectEdit(MultiProperty* property, TQWidget* tqparent=0, const char* name=0);
virtual TQVariant value() const;
virtual void drawViewer(TQPainter* p, const TQColorGroup& cg, const TQRect& r, const TQVariant& value);
diff --git a/lib/widgets/propeditor/property.h b/lib/widgets/propeditor/property.h
index a94ea4cb..48c6987f 100644
--- a/lib/widgets/propeditor/property.h
+++ b/lib/widgets/propeditor/property.h
@@ -105,7 +105,7 @@ public:
//predefined custom types
ValueFromList = 2000 /**<string value from a list*/,
- Symbol = 2001 /**<unicode symbol code*/,
+ Symbol = 2001 /**<tqunicode symbol code*/,
FontName = 2002 /**<font name, e.g. "times new roman"*/,
FileURL = 2003 /**<url of a file*/,
DirectoryURL = 2004 /**<url of a directory*/,
diff --git a/lib/widgets/propeditor/propertyeditor.cpp b/lib/widgets/propeditor/propertyeditor.cpp
index 3cd974db..ce154236 100644
--- a/lib/widgets/propeditor/propertyeditor.cpp
+++ b/lib/widgets/propeditor/propertyeditor.cpp
@@ -42,14 +42,14 @@ namespace PropertyLib{
class PropertyItem: public KListViewItem{
public:
- PropertyItem(PropertyEditor *parent, MultiProperty *property)
- :KListViewItem(parent, property->description()), m_editor(parent), m_property(property),
+ PropertyItem(PropertyEditor *tqparent, MultiProperty *property)
+ :KListViewItem(tqparent, property->description()), m_editor(tqparent), m_property(property),
m_changed(false)
{
}
- PropertyItem(PropertyEditor *editor, KListViewItem *parent, MultiProperty *property)
- :KListViewItem(parent, property->description()), m_editor(editor),
+ PropertyItem(PropertyEditor *editor, KListViewItem *tqparent, MultiProperty *property)
+ :KListViewItem(tqparent, property->description()), m_editor(editor),
m_property(property), m_changed(false)
{
}
@@ -120,13 +120,13 @@ private:
class PropertyGroupItem: public KListViewItem{
public:
- PropertyGroupItem(KListView *parent, const TQString &name)
- :KListViewItem(parent, name)
+ PropertyGroupItem(KListView *tqparent, const TQString &name)
+ :KListViewItem(tqparent, name)
{
init();
}
- PropertyGroupItem(KListViewItem *parent, const TQString &name)
- :KListViewItem(parent, name)
+ PropertyGroupItem(KListViewItem *tqparent, const TQString &name)
+ :KListViewItem(tqparent, name)
{
init();
}
@@ -158,14 +158,14 @@ private:
class SeparatorItem: public KListViewItem{
public:
- SeparatorItem(KListView *parent)
- :KListViewItem(parent)
+ SeparatorItem(KListView *tqparent)
+ :KListViewItem(tqparent)
{
setSelectable(false);
}
};
-PropertyEditor::PropertyEditor(TQWidget *parent, const char *name)
- :KListView(parent, name)
+PropertyEditor::PropertyEditor(TQWidget *tqparent, const char *name)
+ :KListView(tqparent, name)
{
setSorting(-1);
@@ -196,7 +196,7 @@ PropertyEditor::PropertyEditor(TQWidget *parent, const char *name)
#else
m_undoButton->setPixmap( TQPixmap("undo.xpm") );
#endif
- m_undoButton->setSizePolicy(TQSizePolicy::Maximum, TQSizePolicy::MinimumExpanding);
+ m_undoButton->tqsetSizePolicy(TQSizePolicy::Maximum, TQSizePolicy::MinimumExpanding);
m_undoButton->resize(m_undoButton->height(), m_undoButton->height());
m_undoButton->hide();
connect(m_undoButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(undo()));
@@ -215,8 +215,8 @@ void PropertyEditor::populateProperties(PropertyList *list)
return;
m_list = list;
connect(m_list, TQT_SIGNAL(propertyValueChanged(Property*)), this, TQT_SLOT(propertyValueChanged(Property*)));
- const TQValueList<QPair<TQString, TQValueList<TQString> > >& groups = m_list->propertiesOfGroup();
- for (TQValueList<QPair<TQString, TQValueList<TQString> > >::const_iterator it = groups.begin();
+ const TQValueList<TQPair<TQString, TQValueList<TQString> > >& groups = m_list->propertiesOfGroup();
+ for (TQValueList<TQPair<TQString, TQValueList<TQString> > >::const_iterator it = groups.begin();
it != groups.end(); ++it)
{
// qWarning("PropertyEditor::populateProperties: adding group %s", (*it).first.ascii());
@@ -259,24 +259,24 @@ void PropertyEditor::addProperty(const TQString &name)
addChildProperties(pitem);
}
-void PropertyEditor::addChildProperties(PropertyItem *parent)
+void PropertyEditor::addChildProperties(PropertyItem *tqparent)
{
- MultiProperty *prop = parent->property();
+ MultiProperty *prop = tqparent->property();
//force machine creation to get detailed properties appended to current multiproperty
- if ( !m_registeredForType.contains(prop->name())
+ if ( !m_registeredForType.tqcontains(prop->name())
&& (PropertyMachineFactory::getInstance()->hasDetailedEditors(prop->type())) )
{
//FIXME: find better solution
machine(prop);
}
-// qWarning("seeking children: count: %d", prop->details.count());
+// qWarning("seeking tqchildren: count: %d", prop->details.count());
- parent->setOpen(true);
+ tqparent->setOpen(true);
for (TQValueList<ChildProperty>::iterator it = prop->details.begin(); it != prop->details.end(); ++it)
{
// qWarning("found child %s", (*it).name().ascii());
- new PropertyItem(this, parent, new MultiProperty(&m_detailedList, &(*it)));
+ new PropertyItem(this, tqparent, new MultiProperty(&m_detailedList, &(*it)));
}
}
@@ -301,11 +301,11 @@ void PropertyEditor::propertyValueChanged(Property *property)
m_currentEditWidget->setValue(property->value(), false);
else
{
-// repaint all items
+// tqrepaint all items
TQListViewItemIterator it(this);
while (it.current())
{
- repaintItem(it.current());
+ tqrepaintItem(it.current());
++it;
}
}
@@ -323,15 +323,15 @@ void PropertyEditor::propertyChanged(MultiProperty *property, const TQVariant &v
if (m_currentEditItem && (m_currentEditItem->property() == property))
{
m_currentEditItem->setChanged(true);
- repaintItem(m_currentEditItem);
+ tqrepaintItem(m_currentEditItem);
}
emit changed();
-/* if (m_list->contains(name))
+/* if (m_list->tqcontains(name))
{
(*m_list)[name]->setValue(value, false);
-// else if (m_detailedList->contains(*/
+// else if (m_detailedList->tqcontains(*/
}
void PropertyEditor::hideEditor()
@@ -360,11 +360,11 @@ void PropertyEditor::showEditor(PropertyItem *item)
void PropertyEditor::placeEditor(PropertyItem *item)
{
- TQRect r = itemRect(item);
+ TQRect r = tqitemRect(item);
if (!r.size().isValid())
{
ensureItemVisible(item);
- r = itemRect(item);
+ r = tqitemRect(item);
}
r.setX(header()->sectionPos(1));
@@ -386,7 +386,7 @@ void PropertyEditor::placeEditor(PropertyItem *item)
m_currentEditLayout->addWidget(editor, 0, 0);
m_currentEditLayout->addWidget(m_undoButton, 0, 1);
m_currentEditArea->resize(r.size());
-// m_currentEditLayout->invalidate();
+// m_currentEditLayout->tqinvalidate();
moveChild(m_currentEditArea, r.x(), r.y());
m_currentEditWidget = editor;
}
@@ -447,7 +447,7 @@ Machine *PropertyEditor::machine(MultiProperty *property)
m_registeredForType[name] = PropertyMachineFactory::getInstance()->machineForProperty(property);
connect(m_registeredForType[name]->propertyEditor, TQT_SIGNAL(propertyChanged(MultiProperty*, const TQVariant&)),
this, TQT_SLOT(propertyChanged(MultiProperty*, const TQVariant&)));
- m_registeredForType[name]->propertyEditor->reparent(m_currentEditArea, 0, m_currentEditArea->childrenRect().topLeft());
+ m_registeredForType[name]->propertyEditor->reparent(m_currentEditArea, 0, m_currentEditArea->tqchildrenRect().topLeft());
m_registeredForType[name]->propertyEditor->hide();
}
return m_registeredForType[name];
@@ -470,7 +470,7 @@ void PropertyEditor::undo()
m_currentEditWidget->undo();
m_currentEditItem->setChanged(false);
- repaintItem(m_currentEditItem);
+ tqrepaintItem(m_currentEditItem);
}
}
diff --git a/lib/widgets/propeditor/propertyeditor.h b/lib/widgets/propeditor/propertyeditor.h
index 6bdd3e32..ee868a55 100644
--- a/lib/widgets/propeditor/propertyeditor.h
+++ b/lib/widgets/propeditor/propertyeditor.h
@@ -24,8 +24,8 @@
#include <klistview.h>
#else
#include <tqlistview.h>
-#define KListView QListView
-#define KListViewItem QListViewItem
+#define KListView TQListView
+#define KListViewItem TQListViewItem
#endif
#include "propertylist.h"
@@ -57,9 +57,10 @@ creation of property widgets from the machine factory.
*/
class PropertyEditor: public KListView{
Q_OBJECT
+ TQ_OBJECT
public:
/**Constructs the property editor.*/
- PropertyEditor(TQWidget *parent = 0, const char *name = 0);
+ PropertyEditor(TQWidget *tqparent = 0, const char *name = 0);
~PropertyEditor();
/**@return @ref Machine for given property.
@@ -102,7 +103,7 @@ protected:
void addGroup(const TQString &name);
void addProperty(PropertyGroupItem *group, const TQString &name);
void addProperty(const TQString &name);
- void addChildProperties(PropertyItem *parent);
+ void addChildProperties(PropertyItem *tqparent);
private:
PropertyList *m_list;
diff --git a/lib/widgets/propeditor/propertylist.cpp b/lib/widgets/propeditor/propertylist.cpp
index 491c2ebb..20feeb43 100644
--- a/lib/widgets/propeditor/propertylist.cpp
+++ b/lib/widgets/propeditor/propertylist.cpp
@@ -41,7 +41,7 @@ PropertyList::~PropertyList()
MultiProperty *PropertyList::operator[](const TQString &name)
{
- if (m_list.contains(name))
+ if (m_list.tqcontains(name))
return m_list[name];
else
return new MultiProperty(this);
@@ -49,7 +49,7 @@ MultiProperty *PropertyList::operator[](const TQString &name)
MultiProperty *PropertyList::property( const TQString &name )
{
- if (m_list.contains(name))
+ if (m_list.tqcontains(name))
return m_list[name];
else
return new MultiProperty(this);
@@ -60,7 +60,7 @@ void PropertyList::addProperty(Property *property)
if (property == 0)
return;
MultiProperty *mp = 0;
- if ( m_list.contains(property->name()) )
+ if ( m_list.tqcontains(property->name()) )
{
mp = m_list[property->name()];
mp->addProperty(property);
@@ -79,7 +79,7 @@ void PropertyList::addProperty(const TQString &group, Property *property)
return;
MultiProperty *mp = 0;
- if (m_list.contains(property->name()))
+ if (m_list.tqcontains(property->name()))
{
mp = m_list[property->name()];
mp->addProperty(property);
@@ -119,7 +119,7 @@ void PropertyList::removeProperty(Property *property)
void PropertyList::removeProperty(const TQString &name)
{
- if (m_list.contains(name))
+ if (m_list.tqcontains(name))
{
TQString group = m_groupOfProperty[m_list[name]];
removeFromGroup(m_list[name]);
@@ -146,7 +146,7 @@ void PropertyList::removeProperty(const TQString &name)
}
}
-const TQValueList<QPair<TQString, TQValueList<TQString> > >& PropertyList::propertiesOfGroup() const
+const TQValueList<TQPair<TQString, TQValueList<TQString> > >& PropertyList::propertiesOfGroup() const
{
return m_propertiesOfGroup;
}
@@ -162,11 +162,11 @@ void PropertyList::addToGroup(const TQString &group, MultiProperty *property)
return;
//do not add same property to the group twice
- if (m_groupOfProperty.contains(property) && (m_groupOfProperty[property] == group))
+ if (m_groupOfProperty.tqcontains(property) && (m_groupOfProperty[property] == group))
return;
- QPair<TQString, TQValueList<TQString> > *groupPair = 0;
- for(TQValueList<QPair<TQString, TQValueList<TQString> > >::iterator it = m_propertiesOfGroup.begin();
+ TQPair<TQString, TQValueList<TQString> > *groupPair = 0;
+ for(TQValueList<TQPair<TQString, TQValueList<TQString> > >::iterator it = m_propertiesOfGroup.begin();
it != m_propertiesOfGroup.end(); ++it)
{
if ((*it).first == group)
@@ -177,7 +177,7 @@ void PropertyList::addToGroup(const TQString &group, MultiProperty *property)
}
if (groupPair == 0)
{
- groupPair = new QPair<TQString, TQValueList<TQString> >();
+ groupPair = new TQPair<TQString, TQValueList<TQString> >();
groupPair->first = group;
groupPair->second.append(property->name());
m_propertiesOfGroup.append(*groupPair);
@@ -185,7 +185,7 @@ void PropertyList::addToGroup(const TQString &group, MultiProperty *property)
return;
}
//check if group already contains property with the same name
- if (!groupPair->second.contains(property->name()))
+ if (!groupPair->second.tqcontains(property->name()))
groupPair->second.append(property->name());
m_groupOfProperty[property] = group;
@@ -196,7 +196,7 @@ void PropertyList::removeFromGroup(MultiProperty *property)
TQString group = m_groupOfProperty[property];
// qWarning("removeFromGroup group=%s", group.ascii());
- for(TQValueList<QPair<TQString, TQValueList<TQString> > >::iterator it = m_propertiesOfGroup.begin();
+ for(TQValueList<TQPair<TQString, TQValueList<TQString> > >::iterator it = m_propertiesOfGroup.begin();
it != m_propertiesOfGroup.end(); ++it)
{
// qWarning("removeFromGroup checking %s", (*it).first.ascii());
@@ -217,16 +217,16 @@ void PropertyList::clear( )
removeProperty(it.key());
}
-bool PropertyList::contains( const TQString & name )
+bool PropertyList::tqcontains( const TQString & name )
{
- if (m_list.contains(name))
+ if (m_list.tqcontains(name))
return true;
return false;
}
TQPtrList<Property> PropertyList::properties(const TQString &name)
{
- if (m_list.contains(name))
+ if (m_list.tqcontains(name))
return m_list[name]->list;
return TQPtrList<Property>();
}
@@ -309,9 +309,9 @@ void PropertyBuffer::intersect(const PropertyList *list)
for (TQMap<TQString, MultiProperty*>::iterator it = m_list.begin(); it != m_list.end(); ++it)
{
// qWarning("intersect:: for mp = %s", it.data()->name().ascii());
- if (list->m_list.contains(it.key()))
+ if (list->m_list.tqcontains(it.key()))
{
-/* qWarning("intersect:: list contains %s", it.key().ascii());
+/* qWarning("intersect:: list tqcontains %s", it.key().ascii());
if ( (*(it.data()) == *(list->m_list[it.key()])))
qWarning("intersect:: equal properties");
else
@@ -334,7 +334,7 @@ void PropertyBuffer::intersectedValueChanged(Property *property)
{
// qWarning("PropertyBuffer::intersectedValueChanged");
TQString propertyName = property->name();
- if (!contains(propertyName))
+ if (!tqcontains(propertyName))
return;
MultiProperty mp(property);
diff --git a/lib/widgets/propeditor/propertylist.h b/lib/widgets/propeditor/propertylist.h
index 96e351fc..c549048b 100644
--- a/lib/widgets/propeditor/propertylist.h
+++ b/lib/widgets/propeditor/propertylist.h
@@ -52,9 +52,10 @@ PropertyList is also capable of grouping properties.
You can have unsorted list of groups of properties or a plain
alphabetically sorted list of properties or both at the same time.
*/
-class PropertyList: public QObject
+class PropertyList: public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
class Iterator {
@@ -110,14 +111,14 @@ public:
virtual void removeProperty(const TQString &name);
/**@return the list of grouped properties.*/
- virtual const TQValueList<QPair<TQString, TQValueList<TQString> > >& propertiesOfGroup() const;
+ virtual const TQValueList<TQPair<TQString, TQValueList<TQString> > >& propertiesOfGroup() const;
/**@return the map: property - group name.*/
virtual const TQMap<MultiProperty*, TQString>& groupOfProperty() const;
/**Clears the list of properties.*/
virtual void clear();
/**Returns true if the list of properties contains property with given name.*/
- virtual bool contains(const TQString &name);
+ virtual bool tqcontains(const TQString &name);
/**The list of properties with given name.*/
TQPtrList<Property> properties(const TQString &name);
@@ -146,7 +147,7 @@ private:
//groups of properties:
// list of group name: (list of property names)
- TQValueList<QPair<TQString, TQValueList<TQString> > > m_propertiesOfGroup;
+ TQValueList<TQPair<TQString, TQValueList<TQString> > > m_propertiesOfGroup;
// map of property: group
TQMap<MultiProperty*, TQString> m_groupOfProperty;
@@ -181,6 +182,7 @@ buf->intersect(list3);
*/
class PropertyBuffer: public PropertyList{
Q_OBJECT
+ TQ_OBJECT
public:
/**Constructs a buffer from given property list.*/
PropertyBuffer(PropertyList *list);
diff --git a/lib/widgets/propeditor/propertymachinefactory.cpp b/lib/widgets/propeditor/propertymachinefactory.cpp
index 613777d6..cccc3a37 100644
--- a/lib/widgets/propeditor/propertymachinefactory.cpp
+++ b/lib/widgets/propeditor/propertymachinefactory.cpp
@@ -76,7 +76,7 @@ Machine *PropertyMachineFactory::machineForProperty(MultiProperty *property)
TQString propertyName = property->name();
TQMap<TQString, TQVariant> valueList = property->valueList();
- if (m_registeredForType.contains(propertyName))
+ if (m_registeredForType.tqcontains(propertyName))
return (*m_registeredForType[propertyName])();
switch (type)
@@ -162,22 +162,22 @@ Machine *PropertyMachineFactory::machineForProperty(MultiProperty *property)
case Property::Cursor:
{
TQMap<TQString, TQVariant> spValues;
- spValues[i18n("Arrow")] = Qt::ArrowCursor;
- spValues[i18n("Up Arrow")] = Qt::UpArrowCursor;
- spValues[i18n("Cross")] = Qt::CrossCursor;
- spValues[i18n("Waiting")] = Qt::WaitCursor;
- spValues[i18n("iBeam")] = Qt::IbeamCursor;
- spValues[i18n("Size Vertical")] = Qt::SizeVerCursor;
- spValues[i18n("Size Horizontal")] = Qt::SizeHorCursor;
- spValues[i18n("Size Slash")] = Qt::SizeBDiagCursor;
- spValues[i18n("Size Backslash")] = Qt::SizeFDiagCursor;
- spValues[i18n("Size All")] = Qt::SizeAllCursor;
- spValues[i18n("Blank")] = Qt::BlankCursor;
- spValues[i18n("Split Vertical")] = Qt::SplitVCursor;
- spValues[i18n("Split Horizontal")] = Qt::SplitHCursor;
- spValues[i18n("Pointing Hand")] = Qt::PointingHandCursor;
- spValues[i18n("Forbidden")] = Qt::ForbiddenCursor;
- spValues[i18n("What's this")] = Qt::WhatsThisCursor;
+ spValues[i18n("Arrow")] = TQt::ArrowCursor;
+ spValues[i18n("Up Arrow")] = TQt::UpArrowCursor;
+ spValues[i18n("Cross")] = TQt::CrossCursor;
+ spValues[i18n("Waiting")] = TQt::WaitCursor;
+ spValues[i18n("iBeam")] = TQt::IbeamCursor;
+ spValues[i18n("SizeQt::Vertical")] = TQt::SizeVerCursor;
+ spValues[i18n("SizeQt::Horizontal")] = TQt::SizeHorCursor;
+ spValues[i18n("Size Slash")] = TQt::SizeBDiagCursor;
+ spValues[i18n("Size Backslash")] = TQt::SizeFDiagCursor;
+ spValues[i18n("Size All")] = TQt::SizeAllCursor;
+ spValues[i18n("Blank")] = TQt::BlankCursor;
+ spValues[i18n("SplitQt::Vertical")] = TQt::SplitVCursor;
+ spValues[i18n("SplitQt::Horizontal")] = TQt::SplitHCursor;
+ spValues[i18n("Pointing Hand")] = TQt::PointingHandCursor;
+ spValues[i18n("Forbidden")] = TQt::ForbiddenCursor;
+ spValues[i18n("What's this")] = TQt::WhatsThisCursor;
Machine *mach = new Machine(new PCursorEdit(property, spValues));
return mach;
}
diff --git a/lib/widgets/propeditor/propertymachinefactory.h b/lib/widgets/propeditor/propertymachinefactory.h
index fae5569f..84da3e71 100644
--- a/lib/widgets/propeditor/propertymachinefactory.h
+++ b/lib/widgets/propeditor/propertymachinefactory.h
@@ -74,7 +74,7 @@ public:
void registerEditor(int type, createMachine creator);
/**Creates and returns the editor for given property type.
- Warning: editor and viewer widgets won't have parent widget. %Property editor
+ Warning: editor and viewer widgets won't have tqparent widget. %Property editor
cares about reparenting and deletion of returned widgets in machines.*/
Machine *machineForProperty(MultiProperty *property);
bool hasDetailedEditors(int type);
diff --git a/lib/widgets/propeditor/propertywidget.cpp b/lib/widgets/propeditor/propertywidget.cpp
index dad296c5..df0df75a 100644
--- a/lib/widgets/propeditor/propertywidget.cpp
+++ b/lib/widgets/propeditor/propertywidget.cpp
@@ -23,8 +23,8 @@
namespace PropertyLib{
-PropertyWidget::PropertyWidget(MultiProperty *property, TQWidget *parent, const char *name)
- :TQWidget(parent, name), m_property(property)
+PropertyWidget::PropertyWidget(MultiProperty *property, TQWidget *tqparent, const char *name)
+ :TQWidget(tqparent, name), m_property(property)
{
}
@@ -40,10 +40,10 @@ void PropertyWidget::setProperty(MultiProperty *property)
void PropertyWidget::drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value)
{
- p->setPen(Qt::NoPen);
+ p->setPen(TQt::NoPen);
p->setBrush(cg.background());
p->drawRect(r);
- p->drawText(r, Qt::AlignLeft | Qt::AlignVCenter | Qt::SingleLine, value.toString());
+ p->drawText(r, TQt::AlignLeft | TQt::AlignVCenter | TQt::SingleLine, value.toString());
}
void PropertyWidget::setValueList(const TQMap<TQString, TQVariant> &// valueList
diff --git a/lib/widgets/propeditor/propertywidget.h b/lib/widgets/propeditor/propertywidget.h
index edbdf6f3..d5a22777 100644
--- a/lib/widgets/propeditor/propertywidget.h
+++ b/lib/widgets/propeditor/propertywidget.h
@@ -40,17 +40,18 @@ Descendants should implement value() and setValue() methods.
Hint: in case you want to implement your property editor widget using
existing widgets like TQLineEdit, TQComboBox, etc. you can't use multiple
-inheritance from two TQObject descendants due to Qt library restriction.
+inheritance from two TQObject descendants due to TQt library restriction.
Therefore use line edits and combo boxes as child widgets.
A set of predefined widgets for predefined property types are available
in the library.
*/
-class PropertyWidget: public QWidget{
+class PropertyWidget: public TQWidget{
Q_OBJECT
+ TQ_OBJECT
public:
/**Constructs widget for property with name "propertyName".*/
- PropertyWidget(MultiProperty *property, TQWidget *parent = 0, const char *name = 0);
+ PropertyWidget(MultiProperty *property, TQWidget *tqparent = 0, const char *name = 0);
virtual ~PropertyWidget() {}
/**@return the value currently entered in the editor widget.*/
diff --git a/lib/widgets/propeditor/propertywidgetproxy.cpp b/lib/widgets/propeditor/propertywidgetproxy.cpp
index 813708ca..27f2a49c 100644
--- a/lib/widgets/propeditor/propertywidgetproxy.cpp
+++ b/lib/widgets/propeditor/propertywidgetproxy.cpp
@@ -26,8 +26,8 @@
namespace PropertyLib{
-PropertyWidgetProxy::PropertyWidgetProxy(TQWidget *parent, const char *name)
- :TQWidget(parent, name), mp(0), m_propertyType(Property::Invalid), m_editor(0)
+PropertyWidgetProxy::PropertyWidgetProxy(TQWidget *tqparent, const char *name)
+ :TQWidget(tqparent, name), mp(0), m_propertyType(Property::Invalid), m_editor(0)
{
p = new Property();
m_layout = new TQHBoxLayout(this, 0, 0);
diff --git a/lib/widgets/propeditor/propertywidgetproxy.h b/lib/widgets/propeditor/propertywidgetproxy.h
index 43ef3311..04a2503a 100644
--- a/lib/widgets/propeditor/propertywidgetproxy.h
+++ b/lib/widgets/propeditor/propertywidgetproxy.h
@@ -39,13 +39,14 @@ It is sometimes useful to create single property editor widgets instead of havin
all in the property editor. Proxy creates an empty widget and shows the property editor
depending on the property type.
*/
-class PropertyWidgetProxy: public QWidget
+class PropertyWidgetProxy: public TQWidget
{
Q_OBJECT
-Q_PROPERTY( int propertyType READ propertyType WRITE setPropertyType DESIGNABLE true )
-Q_PROPERTY( PropertyType propertyType2 READ propertyType2 WRITE setPropertyType2 DESIGNABLE false )
+ TQ_OBJECT
+TQ_PROPERTY( int propertyType READ propertyType WRITE setPropertyType DESIGNABLE true )
+TQ_PROPERTY( PropertyType propertyType2 READ propertyType2 WRITE setPropertyType2 DESIGNABLE false )
public:
- PropertyWidgetProxy(TQWidget *parent = 0, const char *name = 0);
+ PropertyWidgetProxy(TQWidget *tqparent = 0, const char *name = 0);
~PropertyWidgetProxy();
/**Sets the type of a property editor to appear.*/
diff --git a/lib/widgets/propeditor/psizeedit.cpp b/lib/widgets/propeditor/psizeedit.cpp
index 90208304..4ce6561c 100644
--- a/lib/widgets/propeditor/psizeedit.cpp
+++ b/lib/widgets/propeditor/psizeedit.cpp
@@ -25,12 +25,12 @@
namespace PropertyLib{
-PSizeEdit::PSizeEdit(MultiProperty *property, TQWidget *parent, const char *name)
- :PropertyWidget(property, parent, name)
+PSizeEdit::PSizeEdit(MultiProperty *property, TQWidget *tqparent, const char *name)
+ :PropertyWidget(property, tqparent, name)
{
TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0);
m_edit = new KLineEdit(this);
- m_edit->setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
+ m_edit->tqsetSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
l->addWidget(m_edit);
m_edit->setReadOnly(true);
@@ -43,16 +43,16 @@ TQVariant PSizeEdit::value() const
void PSizeEdit::drawViewer(TQPainter* p, const TQColorGroup& cg, const TQRect& r, const TQVariant& value)
{
- p->setPen(Qt::NoPen);
+ p->setPen(TQt::NoPen);
p->setBrush(cg.background());
p->drawRect(r);
- p->drawText(r, Qt::AlignLeft | Qt::AlignVCenter | Qt::SingleLine, TQString("[ %1, %2 ]").arg(value.toSize().width()).arg(value.toSize().height()));
+ p->drawText(r, TQt::AlignLeft | TQt::AlignVCenter | TQt::SingleLine, TQString("[ %1, %2 ]").tqarg(value.toSize().width()).tqarg(value.toSize().height()));
}
void PSizeEdit::setValue(const TQVariant& value, bool emitChange)
{
m_value = value;
- m_edit->setText(TQString("[ %1, %2 ]").arg(value.toSize().width()).arg(value.toSize().height()));
+ m_edit->setText(TQString("[ %1, %2 ]").tqarg(value.toSize().width()).tqarg(value.toSize().height()));
if (emitChange)
emit propertyChanged(m_property, value);
diff --git a/lib/widgets/propeditor/psizeedit.h b/lib/widgets/propeditor/psizeedit.h
index 38f29132..5fbd6d6d 100644
--- a/lib/widgets/propeditor/psizeedit.h
+++ b/lib/widgets/propeditor/psizeedit.h
@@ -34,8 +34,9 @@ namespace PropertyLib{
class PSizeEdit: public PropertyWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- PSizeEdit(MultiProperty *property, TQWidget *parent = 0, const char *name = 0);
+ PSizeEdit(MultiProperty *property, TQWidget *tqparent = 0, const char *name = 0);
virtual TQVariant value() const;
virtual void drawViewer(TQPainter* p, const TQColorGroup& cg, const TQRect& r, const TQVariant& value);
diff --git a/lib/widgets/propeditor/psizepolicyedit.cpp b/lib/widgets/propeditor/psizepolicyedit.cpp
index 9447a4bc..9c417005 100644
--- a/lib/widgets/propeditor/psizepolicyedit.cpp
+++ b/lib/widgets/propeditor/psizepolicyedit.cpp
@@ -26,12 +26,12 @@
namespace PropertyLib{
-PSizePolicyEdit::PSizePolicyEdit(MultiProperty* property, const TQMap<TQString, TQVariant> &spValues, TQWidget* parent, const char* name)
- :PropertyWidget(property, parent, name), m_spValues(spValues)
+PSizePolicyEdit::PSizePolicyEdit(MultiProperty* property, const TQMap<TQString, TQVariant> &spValues, TQWidget* tqparent, const char* name)
+ :PropertyWidget(property, tqparent, name), m_spValues(spValues)
{
TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0);
m_edit = new KLineEdit(this);
- m_edit->setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
+ m_edit->tqsetSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
l->addWidget(m_edit);
m_edit->setReadOnly(true);
@@ -44,16 +44,16 @@ TQVariant PSizePolicyEdit::value() const
void PSizePolicyEdit::drawViewer(TQPainter* p, const TQColorGroup& cg, const TQRect& r, const TQVariant& value)
{
- p->setPen(Qt::NoPen);
+ p->setPen(TQt::NoPen);
p->setBrush(cg.background());
p->drawRect(r);
- p->drawText(r, Qt::AlignLeft | Qt::AlignVCenter | Qt::SingleLine, TQString("%1/%2/%3/%4").arg(findValueDescription(value.toSizePolicy().horData())).arg(findValueDescription(value.toSizePolicy().verData())).arg(value.toSizePolicy().horStretch()).arg(value.toSizePolicy().verStretch()));
+ p->drawText(r, TQt::AlignLeft | TQt::AlignVCenter | TQt::SingleLine, TQString("%1/%2/%3/%4").tqarg(findValueDescription(value.toSizePolicy().horData())).tqarg(findValueDescription(value.toSizePolicy().verData())).tqarg(value.toSizePolicy().horStretch()).tqarg(value.toSizePolicy().verStretch()));
}
void PSizePolicyEdit::setValue(const TQVariant& value, bool emitChange)
{
m_value = value;
- m_edit->setText(TQString("%1/%2/%3/%4").arg(findValueDescription(value.toSizePolicy().horData())).arg(findValueDescription(value.toSizePolicy().verData())).arg(value.toSizePolicy().horStretch()).arg(value.toSizePolicy().verStretch()));
+ m_edit->setText(TQString("%1/%2/%3/%4").tqarg(findValueDescription(value.toSizePolicy().horData())).tqarg(findValueDescription(value.toSizePolicy().verData())).tqarg(value.toSizePolicy().horStretch()).tqarg(value.toSizePolicy().verStretch()));
if (emitChange)
emit propertyChanged(m_property, value);
diff --git a/lib/widgets/propeditor/psizepolicyedit.h b/lib/widgets/propeditor/psizepolicyedit.h
index 36c26d1b..613c65ea 100644
--- a/lib/widgets/propeditor/psizepolicyedit.h
+++ b/lib/widgets/propeditor/psizepolicyedit.h
@@ -34,8 +34,9 @@ namespace PropertyLib{
class PSizePolicyEdit : public PropertyWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- PSizePolicyEdit(MultiProperty* property, const TQMap<TQString, TQVariant> &spValues, TQWidget* parent=0, const char* name=0);
+ PSizePolicyEdit(MultiProperty* property, const TQMap<TQString, TQVariant> &spValues, TQWidget* tqparent=0, const char* name=0);
virtual TQVariant value() const;
virtual void drawViewer(TQPainter* p, const TQColorGroup& cg, const TQRect& r, const TQVariant& value);
diff --git a/lib/widgets/propeditor/pspinbox.cpp b/lib/widgets/propeditor/pspinbox.cpp
index 755041c1..48b36324 100644
--- a/lib/widgets/propeditor/pspinbox.cpp
+++ b/lib/widgets/propeditor/pspinbox.cpp
@@ -26,19 +26,19 @@
namespace PropertyLib{
-PSpinBox::PSpinBox(MultiProperty *property, TQWidget *parent, const char *name)
- :PropertyWidget(property, parent, name)
+PSpinBox::PSpinBox(MultiProperty *property, TQWidget *tqparent, const char *name)
+ :PropertyWidget(property, tqparent, name)
{
TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0);
m_edit = new TQSpinBox(INT_MIN, INT_MAX, 1, this);
- m_edit->setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
+ m_edit->tqsetSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
l->addWidget(m_edit);
connect(m_edit, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(updateProperty(int)));
}
-PSpinBox::PSpinBox(MultiProperty *property, int minValue, int maxValue, int step, TQWidget *parent, const char *name)
- :PropertyWidget(property, parent, name)
+PSpinBox::PSpinBox(MultiProperty *property, int minValue, int maxValue, int step, TQWidget *tqparent, const char *name)
+ :PropertyWidget(property, tqparent, name)
{
TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0);
m_edit = new TQSpinBox(minValue, maxValue, step, this);
diff --git a/lib/widgets/propeditor/pspinbox.h b/lib/widgets/propeditor/pspinbox.h
index d4486cae..28d34ef2 100644
--- a/lib/widgets/propeditor/pspinbox.h
+++ b/lib/widgets/propeditor/pspinbox.h
@@ -31,9 +31,10 @@ namespace PropertyLib{
*/
class PSpinBox: public PropertyWidget{
Q_OBJECT
+ TQ_OBJECT
public:
- PSpinBox(MultiProperty *property, TQWidget *parent = 0, const char *name = 0);
- PSpinBox(MultiProperty *property, int minValue, int maxValue, int step = 1, TQWidget *parent = 0, const char *name = 0);
+ PSpinBox(MultiProperty *property, TQWidget *tqparent = 0, const char *name = 0);
+ PSpinBox(MultiProperty *property, int minValue, int maxValue, int step = 1, TQWidget *tqparent = 0, const char *name = 0);
/**@return the value currently entered in the editor widget.*/
virtual TQVariant value() const;
diff --git a/lib/widgets/propeditor/pstringlistedit.cpp b/lib/widgets/propeditor/pstringlistedit.cpp
index f6803304..e4eeeccf 100644
--- a/lib/widgets/propeditor/pstringlistedit.cpp
+++ b/lib/widgets/propeditor/pstringlistedit.cpp
@@ -29,24 +29,24 @@
#include <kpushbutton.h>
#include <kstdguiitem.h>
#else
-#include "qeditlistbox.h"
+#include "tqeditlistbox.h"
#include <tqpushbutton.h>
#include "compat_tools.h"
#endif
namespace PropertyLib{
-PStringListEdit::PStringListEdit(MultiProperty *property, TQWidget *parent, const char *name)
- :PropertyWidget(property, parent, name)
+PStringListEdit::PStringListEdit(MultiProperty *property, TQWidget *tqparent, const char *name)
+ :PropertyWidget(property, tqparent, name)
{
l = new TQHBoxLayout(this);
edit = new KLineEdit(this);
edit->setReadOnly(true);
- edit->setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
+ edit->tqsetSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
l->addWidget(edit);
pbSelect = new TQPushButton("...", this);
- pbSelect->setSizePolicy(TQSizePolicy::Maximum, TQSizePolicy::MinimumExpanding);
+ pbSelect->tqsetSizePolicy(TQSizePolicy::Maximum, TQSizePolicy::MinimumExpanding);
l->addWidget(pbSelect);
connect(pbSelect, TQT_SIGNAL(clicked()), this, TQT_SLOT(showEditor()));
@@ -71,7 +71,7 @@ void PStringListEdit::showEditor()
TQVBoxLayout *dv = new TQVBoxLayout(dia, 2);
#ifdef PURE_QT
- QEditListBox *select = new QEditListBox(dia, "select_char");
+ TQEditListBox *select = new TQEditListBox(dia, "select_char");
#else
KEditListBox *select = new KEditListBox(dia, "select_char");
#endif
@@ -108,10 +108,10 @@ void PStringListEdit::showEditor()
void PStringListEdit::drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value)
{
- p->setPen(Qt::NoPen);
+ p->setPen(TQt::NoPen);
p->setBrush(cg.background());
p->drawRect(r);
- p->drawText(r, Qt::AlignLeft | Qt::AlignVCenter | Qt::SingleLine, value.toStringList().join(", "));
+ p->drawText(r, TQt::AlignLeft | TQt::AlignVCenter | TQt::SingleLine, value.toStringList().join(", "));
}
}
diff --git a/lib/widgets/propeditor/pstringlistedit.h b/lib/widgets/propeditor/pstringlistedit.h
index e1b076ca..45aa0e4e 100644
--- a/lib/widgets/propeditor/pstringlistedit.h
+++ b/lib/widgets/propeditor/pstringlistedit.h
@@ -35,8 +35,9 @@ namespace PropertyLib{
class PStringListEdit: public PropertyWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- PStringListEdit(MultiProperty *property, TQWidget *parent = 0, const char *name = 0);
+ PStringListEdit(MultiProperty *property, TQWidget *tqparent = 0, const char *name = 0);
/**@return the value currently entered in the editor widget.*/
virtual TQVariant value() const;
diff --git a/lib/widgets/propeditor/psymbolcombo.cpp b/lib/widgets/propeditor/psymbolcombo.cpp
index 24f4259c..087f7a8d 100644
--- a/lib/widgets/propeditor/psymbolcombo.cpp
+++ b/lib/widgets/propeditor/psymbolcombo.cpp
@@ -35,16 +35,16 @@
namespace PropertyLib{
-PSymbolCombo::PSymbolCombo(MultiProperty *property, TQWidget *parent, const char *name)
- :PropertyWidget(property, parent, name)
+PSymbolCombo::PSymbolCombo(MultiProperty *property, TQWidget *tqparent, const char *name)
+ :PropertyWidget(property, tqparent, name)
{
l = new TQHBoxLayout(this);
m_edit = new KLineEdit(this);
- m_edit->setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
+ m_edit->tqsetSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
m_edit->setMaxLength(1);
l->addWidget(m_edit);
m_select = new TQPushButton("...", this);
- m_select->setSizePolicy(TQSizePolicy::Maximum, TQSizePolicy::MinimumExpanding);
+ m_select->tqsetSizePolicy(TQSizePolicy::Maximum, TQSizePolicy::MinimumExpanding);
l->addWidget(m_select);
#ifdef PURE_QT
@@ -58,18 +58,14 @@ PSymbolCombo::PSymbolCombo(MultiProperty *property, TQWidget *parent, const char
TQVariant PSymbolCombo::value() const
{
if (!(m_edit->text().isNull()))
- return TQVariant(TQString("%1").arg(m_edit->text().at(0).unicode()));
+ return TQVariant(TQString("%1").tqarg(m_edit->text().tqat(0).tqunicode()));
else
return TQVariant(0);
}
void PSymbolCombo::setValue(const TQVariant &value, bool emitChange)
{
-#if QT_VERSION >= 0x030100
if (!(value.isNull()))
-#else
- if (value.canCast(TQVariant::Int))
-#endif
{
disconnect(m_edit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(updateProperty(const TQString&)));
m_edit->setText(TQChar(value.toInt()));
@@ -113,15 +109,15 @@ void PSymbolCombo::selectChar()
void PSymbolCombo::updateProperty(const TQString& val)
{
- emit propertyChanged(m_property, TQVariant(TQString("%1").arg(val.at(0).unicode())));
+ emit propertyChanged(m_property, TQVariant(TQString("%1").tqarg(val.tqat(0).tqunicode())));
}
void PSymbolCombo::drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value)
{
p->setBrush(cg.background());
- p->setPen(Qt::NoPen);
+ p->setPen(TQt::NoPen);
p->drawRect(r);
- p->drawText(r, Qt::AlignLeft | Qt::AlignVCenter | Qt::SingleLine, TQChar(value.toInt()));
+ p->drawText(r, TQt::AlignLeft | TQt::AlignVCenter | TQt::SingleLine, TQChar(value.toInt()));
}
}
diff --git a/lib/widgets/propeditor/psymbolcombo.h b/lib/widgets/propeditor/psymbolcombo.h
index b9682023..9c559844 100644
--- a/lib/widgets/propeditor/psymbolcombo.h
+++ b/lib/widgets/propeditor/psymbolcombo.h
@@ -34,8 +34,9 @@ namespace PropertyLib{
*/
class PSymbolCombo: public PropertyWidget{
Q_OBJECT
+ TQ_OBJECT
public:
- PSymbolCombo(MultiProperty *property, TQWidget *parent = 0, const char *name = 0);
+ PSymbolCombo(MultiProperty *property, TQWidget *tqparent = 0, const char *name = 0);
/**@return the value currently entered in the editor widget.*/
virtual TQVariant value() const;
diff --git a/lib/widgets/propeditor/purledit.cpp b/lib/widgets/propeditor/purledit.cpp
index 64e4d0c7..d27a0552 100644
--- a/lib/widgets/propeditor/purledit.cpp
+++ b/lib/widgets/propeditor/purledit.cpp
@@ -30,8 +30,8 @@
namespace PropertyLib{
-PUrlEdit::PUrlEdit(Mode mode, MultiProperty* property, TQWidget* parent, const char* name)
- :PropertyWidget(property, parent, name)
+PUrlEdit::PUrlEdit(Mode mode, MultiProperty* property, TQWidget* tqparent, const char* name)
+ :PropertyWidget(property, tqparent, name)
{
TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0);
#ifndef PURE_QT
@@ -47,7 +47,7 @@ PUrlEdit::PUrlEdit(Mode mode, MultiProperty* property, TQWidget* parent, const c
m_mode = mode;
connect( m_select, TQT_SIGNAL(clicked()),this,TQT_SLOT(select()));
#endif
- m_edit->setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
+ m_edit->tqsetSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
}
TQVariant PUrlEdit::value() const
@@ -84,7 +84,7 @@ void PUrlEdit::select()
if( m_mode == Directory )
m_url = TQFileDialog::getExistingDirectory( m_url,this);
else
- m_url = TQFileDialog::getOpenFileName(m_url, TQString::null, this);
+ m_url = TQFileDialog::getOpenFileName(m_url, TQString(), this);
updateProperty(m_url);
m_edit->setText(m_url);
#endif
diff --git a/lib/widgets/propeditor/purledit.h b/lib/widgets/propeditor/purledit.h
index d54dc3d2..4aff51b8 100644
--- a/lib/widgets/propeditor/purledit.h
+++ b/lib/widgets/propeditor/purledit.h
@@ -39,6 +39,7 @@ namespace PropertyLib{
class PUrlEdit : public PropertyWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
#ifndef PURE_QT
enum Mode {File = KFile::File,Directory = KFile::Directory};
@@ -46,7 +47,7 @@ public:
enum Mode {File,Directory};
#endif
- PUrlEdit(Mode mode, MultiProperty* property, TQWidget* parent=0, const char* name=0);
+ PUrlEdit(Mode mode, MultiProperty* property, TQWidget* tqparent=0, const char* name=0);
virtual TQVariant value() const;
virtual void setValue(const TQVariant& value, bool emitChange);
diff --git a/lib/widgets/propeditor/pyesnobutton.cpp b/lib/widgets/propeditor/pyesnobutton.cpp
index 308570be..9448d672 100644
--- a/lib/widgets/propeditor/pyesnobutton.cpp
+++ b/lib/widgets/propeditor/pyesnobutton.cpp
@@ -31,13 +31,13 @@
namespace PropertyLib{
-PYesNoButton::PYesNoButton(MultiProperty* property, TQWidget* parent, const char* name)
- :PropertyWidget(property, parent, name)
+PYesNoButton::PYesNoButton(MultiProperty* property, TQWidget* tqparent, const char* name)
+ :PropertyWidget(property, tqparent, name)
{
TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0);
m_edit = new TQPushButton(this);
m_edit->setToggleButton(true);
- m_edit->setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
+ m_edit->tqsetSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
l->addWidget(m_edit);
connect(m_edit, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(updateProperty(bool)));
diff --git a/lib/widgets/propeditor/pyesnobutton.h b/lib/widgets/propeditor/pyesnobutton.h
index 408dec4b..efe33584 100644
--- a/lib/widgets/propeditor/pyesnobutton.h
+++ b/lib/widgets/propeditor/pyesnobutton.h
@@ -32,8 +32,9 @@ namespace PropertyLib{
class PYesNoButton : public PropertyWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- PYesNoButton(MultiProperty* property, TQWidget* parent = 0, const char* name = 0);
+ PYesNoButton(MultiProperty* property, TQWidget* tqparent = 0, const char* name = 0);
virtual TQVariant value() const;
virtual void drawViewer(TQPainter* p, const TQColorGroup& cg, const TQRect& r, const TQVariant& value);
diff --git a/lib/widgets/propeditor/qeditlistbox.cpp b/lib/widgets/propeditor/qeditlistbox.cpp
index db40e8e7..565786f0 100644
--- a/lib/widgets/propeditor/qeditlistbox.cpp
+++ b/lib/widgets/propeditor/qeditlistbox.cpp
@@ -46,24 +46,24 @@ public:
int buttons;
};
-QEditListBox::QEditListBox(TQWidget *parent, const char *name,
+QEditListBox::QEditListBox(TQWidget *tqparent, const char *name,
bool checkAtEntering, int buttons )
- :TQGroupBox(parent, name )
+ :TQGroupBox(tqparent, name )
{
init( checkAtEntering, buttons );
}
-QEditListBox::QEditListBox(const TQString& title, TQWidget *parent,
+QEditListBox::QEditListBox(const TQString& title, TQWidget *tqparent,
const char *name, bool checkAtEntering, int buttons)
- :TQGroupBox(title, parent, name )
+ :TQGroupBox(title, tqparent, name )
{
init( checkAtEntering, buttons );
}
QEditListBox::QEditListBox(const TQString& title, const CustomEditor& custom,
- TQWidget *parent, const char *name,
+ TQWidget *tqparent, const char *name,
bool checkAtEntering, int buttons)
- :TQGroupBox(title, parent, name )
+ :TQGroupBox(title, tqparent, name )
{
m_lineEdit = custom.lineEdit();
init( checkAtEntering, buttons, custom.representationWidget() );
@@ -92,7 +92,7 @@ void QEditListBox::init( bool checkAtEntering, int buttons,
servNewButton = servRemoveButton = servUpButton = servDownButton = 0L;
- setSizePolicy(TQSizePolicy(TQSizePolicy::MinimumExpanding,
+ tqsetSizePolicy(TQSizePolicy(TQSizePolicy::MinimumExpanding,
TQSizePolicy::MinimumExpanding));
TQWidget * gb = this;
@@ -185,7 +185,7 @@ void QEditListBox::typedSomething(const TQString& text)
else
{
StringComparisonMode mode = (StringComparisonMode) (ExactMatch | CaseSensitive );
- bool enable = (m_listBox->findItem( text, mode ) == 0L);
+ bool enable = (m_listBox->tqfindItem( text, mode ) == 0L);
servNewButton->setEnabled( enable );
}
}
@@ -256,7 +256,7 @@ void QEditListBox::addItem()
else
{
StringComparisonMode mode = (StringComparisonMode) (ExactMatch | CaseSensitive );
- alreadyInList =(m_listBox->findItem(currentTextLE, mode) != 0);
+ alreadyInList =(m_listBox->tqfindItem(currentTextLE, mode) != 0);
}
}
@@ -298,7 +298,7 @@ void QEditListBox::removeItem()
m_listBox->removeItem( selected );
if ( count() > 0 )
- m_listBox->setSelected( QMIN( selected, count() - 1 ), true );
+ m_listBox->setSelected( TQMIN( selected, count() - 1 ), true );
emit changed();
emit removed( removedText );
diff --git a/lib/widgets/propeditor/qeditlistbox.h b/lib/widgets/propeditor/qeditlistbox.h
index 7a4a34a2..78a61bfc 100644
--- a/lib/widgets/propeditor/qeditlistbox.h
+++ b/lib/widgets/propeditor/qeditlistbox.h
@@ -17,8 +17,8 @@
Boston, MA 02110-1301, USA.
*/
-#ifndef QEDITLISTBOX_H
-#define QEDITLISTBOX_H
+#ifndef TQEDITLISTBOX_H
+#define TQEDITLISTBOX_H
#include <tqgroupbox.h>
#include <tqlistbox.h>
@@ -42,11 +42,12 @@ class TQPushButton;
class QEditListBoxPrivate;
-class QEditListBox : public QGroupBox
+class QEditListBox : public TQGroupBox
{
Q_OBJECT
+ TQ_OBJECT
- Q_PROPERTY( TQStringList items READ items WRITE setItems )
+ TQ_PROPERTY( TQStringList items READ items WRITE setItems )
public:
// @since 3.1
@@ -100,7 +101,7 @@ public:
* it will be checked if you press the Add-button. It is not
* possible to enter items twice into the listbox.
*/
- QEditListBox(TQWidget *parent = 0, const char *name = 0,
+ QEditListBox(TQWidget *tqparent = 0, const char *name = 0,
bool checkAtEntering=false, int buttons = All );
/**
* Create an editable listbox.
@@ -108,7 +109,7 @@ public:
* The same as the other constructor, additionally it takes
* @p title, which will be the title of the frame around the listbox.
*/
- QEditListBox(const TQString& title, TQWidget *parent = 0,
+ QEditListBox(const TQString& title, TQWidget *tqparent = 0,
const char *name = 0, bool checkAtEntering=false,
int buttons = All );
@@ -126,7 +127,7 @@ public:
*/
QEditListBox( const TQString& title,
const CustomEditor &customEditor,
- TQWidget *parent = 0, const char *name = 0,
+ TQWidget *tqparent = 0, const char *name = 0,
bool checkAtEntering = false, int buttons = All );
virtual ~QEditListBox();
diff --git a/lib/widgets/propeditor/qfloatinput.cpp b/lib/widgets/propeditor/qfloatinput.cpp
index a8522105..d14ea9c7 100644
--- a/lib/widgets/propeditor/qfloatinput.cpp
+++ b/lib/widgets/propeditor/qfloatinput.cpp
@@ -18,15 +18,15 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA
*/
-#include "qfloatinput.h"
+#include "tqfloatinput.h"
#include <math.h>
-QFloatInput::QFloatInput( int min, int max, float step, int digits,
- TQWidget *parent, const char *name )
+TQFloatInput::TQFloatInput( int min, int max, float step, int digits,
+ TQWidget *tqparent, const char *name )
: TQSpinBox( (int) (min*pow(digits,10)),
(int) (max*pow(digits,10)),
- (int) (step*pow(digits,10)), parent, name ),
+ (int) (step*pow(digits,10)), tqparent, name ),
m_digits( digits )
{
setValue( (int) (min*pow(digits,10)) );
@@ -36,14 +36,14 @@ QFloatInput::QFloatInput( int min, int max, float step, int digits,
setValidator( validator );
}
-TQString QFloatInput::mapValueToText( int value )
+TQString TQFloatInput::mapValueToText( int value )
{
- TQString format = TQString("%.%1f").arg( m_digits );
+ TQString format = TQString("%.%1f").tqarg( m_digits );
return TQString().sprintf(format.latin1(),
(value/(float)pow(m_digits,10)) );
}
-int QFloatInput::mapTextToValue( bool* ok )
+int TQFloatInput::mapTextToValue( bool* ok )
{
return int(cleanText().toFloat(ok)*pow(m_digits,10));
}
diff --git a/lib/widgets/propeditor/qfloatinput.h b/lib/widgets/propeditor/qfloatinput.h
index 4bbe63e6..dececcbf 100644
--- a/lib/widgets/propeditor/qfloatinput.h
+++ b/lib/widgets/propeditor/qfloatinput.h
@@ -18,18 +18,18 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA
*/
-#ifndef QFLOATINPUT_H
-#define QFLOATINPUT_H
+#ifndef TQFLOATINPUT_H
+#define TQFLOATINPUT_H
#include <tqapplication.h>
#include <tqspinbox.h>
#include <tqvalidator.h>
-class QFloatInput : public QSpinBox
+class TQFloatInput : public TQSpinBox
{
public:
- QFloatInput( int min, int max, float step, int digits,
- TQWidget *parent, const char *name = 0 );
+ TQFloatInput( int min, int max, float step, int digits,
+ TQWidget *tqparent, const char *name = 0 );
virtual TQString mapValueToText( int value );
diff --git a/lib/widgets/propeditor/test.cpp b/lib/widgets/propeditor/test.cpp
index 82665f98..a55a496b 100644
--- a/lib/widgets/propeditor/test.cpp
+++ b/lib/widgets/propeditor/test.cpp
@@ -38,7 +38,7 @@ int main( int argc, char **argv )
"Sample description", "value" ) );
currentList->addProperty(
new Property(Property::Color, "Color",
- "Sample color description", Qt::red ) );
+ "Sample color description", TQt::red ) );
currentList->addProperty(
new Property( Property::Pixmap, "Pixmap",
"sample pixmap description" ) );