summaryrefslogtreecommitdiffstats
path: root/lib/koproperty
diff options
context:
space:
mode:
Diffstat (limited to 'lib/koproperty')
-rw-r--r--lib/koproperty/customproperty.cpp138
-rw-r--r--lib/koproperty/customproperty.h46
-rw-r--r--lib/koproperty/editor.cpp316
-rw-r--r--lib/koproperty/editor.h41
-rw-r--r--lib/koproperty/editoritem.cpp216
-rw-r--r--lib/koproperty/editoritem.h54
-rw-r--r--lib/koproperty/editors/booledit.cpp86
-rw-r--r--lib/koproperty/editors/booledit.h32
-rw-r--r--lib/koproperty/editors/coloredit.cpp36
-rw-r--r--lib/koproperty/editors/coloredit.h11
-rw-r--r--lib/koproperty/editors/combobox.cpp62
-rw-r--r--lib/koproperty/editors/combobox.h11
-rw-r--r--lib/koproperty/editors/cursoredit.cpp102
-rw-r--r--lib/koproperty/editors/cursoredit.h13
-rw-r--r--lib/koproperty/editors/dateedit.cpp34
-rw-r--r--lib/koproperty/editors/dateedit.h17
-rw-r--r--lib/koproperty/editors/datetimeedit.cpp34
-rw-r--r--lib/koproperty/editors/datetimeedit.h17
-rw-r--r--lib/koproperty/editors/dummywidget.cpp14
-rw-r--r--lib/koproperty/editors/dummywidget.h13
-rw-r--r--lib/koproperty/editors/fontedit.cpp78
-rw-r--r--lib/koproperty/editors/fontedit.h13
-rw-r--r--lib/koproperty/editors/linestyledit.cpp54
-rw-r--r--lib/koproperty/editors/linestyleedit.h13
-rw-r--r--lib/koproperty/editors/pixmapedit.cpp130
-rw-r--r--lib/koproperty/editors/pixmapedit.h33
-rw-r--r--lib/koproperty/editors/pointedit.cpp40
-rw-r--r--lib/koproperty/editors/pointedit.h13
-rw-r--r--lib/koproperty/editors/rectedit.cpp44
-rw-r--r--lib/koproperty/editors/rectedit.h13
-rw-r--r--lib/koproperty/editors/sizeedit.cpp38
-rw-r--r--lib/koproperty/editors/sizeedit.h13
-rw-r--r--lib/koproperty/editors/sizepolicyedit.cpp78
-rw-r--r--lib/koproperty/editors/sizepolicyedit.h23
-rw-r--r--lib/koproperty/editors/spinbox.cpp138
-rw-r--r--lib/koproperty/editors/spinbox.h36
-rw-r--r--lib/koproperty/editors/stringedit.cpp24
-rw-r--r--lib/koproperty/editors/stringedit.h13
-rw-r--r--lib/koproperty/editors/stringlistedit.cpp42
-rw-r--r--lib/koproperty/editors/stringlistedit.h21
-rw-r--r--lib/koproperty/editors/symbolcombo.cpp52
-rw-r--r--lib/koproperty/editors/symbolcombo.h19
-rw-r--r--lib/koproperty/editors/timeedit.cpp36
-rw-r--r--lib/koproperty/editors/timeedit.h15
-rw-r--r--lib/koproperty/editors/urledit.cpp22
-rw-r--r--lib/koproperty/editors/urledit.h9
-rw-r--r--lib/koproperty/factory.cpp58
-rw-r--r--lib/koproperty/factory.h44
-rw-r--r--lib/koproperty/property.cpp256
-rw-r--r--lib/koproperty/property.h200
-rw-r--r--lib/koproperty/set.cpp136
-rw-r--r--lib/koproperty/set.h56
-rw-r--r--lib/koproperty/test/test.cpp52
-rw-r--r--lib/koproperty/test/test.h1
-rw-r--r--lib/koproperty/utils.h14
-rw-r--r--lib/koproperty/widget.cpp36
-rw-r--r--lib/koproperty/widget.h21
-rw-r--r--lib/koproperty/widgetproxy.cpp32
-rw-r--r--lib/koproperty/widgetproxy.h17
59 files changed, 1626 insertions, 1600 deletions
diff --git a/lib/koproperty/customproperty.cpp b/lib/koproperty/customproperty.cpp
index 700baa79..f2c17808 100644
--- a/lib/koproperty/customproperty.cpp
+++ b/lib/koproperty/customproperty.cpp
@@ -20,18 +20,18 @@
#include "customproperty.h"
#include "property.h"
-#include <qsize.h>
-#include <qrect.h>
-#include <qsizepolicy.h>
-#include <qpoint.h>
+#include <tqsize.h>
+#include <tqrect.h>
+#include <tqsizepolicy.h>
+#include <tqpoint.h>
#include <klocale.h>
#include <kdebug.h>
using namespace KoProperty;
-CustomProperty::CustomProperty(Property *parent)
- : m_property(parent)
+CustomProperty::CustomProperty(Property *tqparent)
+ : m_property(tqparent)
{
}
@@ -51,7 +51,7 @@ SizeCustomProperty::SizeCustomProperty(Property *property)
: CustomProperty(property)
{
if(property && (property->type() == Size) ) {
- QSize s = property->value().toSize();
+ TQSize s = property->value().toSize();
new Property("width", s.width(), i18n("Width"), i18n("Width"), Size_Width, property);
new Property("height", s.height(), i18n("Height"), i18n("Height"), Size_Height, property);
}
@@ -75,40 +75,40 @@ SizeCustomProperty::handleValue() const
}
void
-SizeCustomProperty::setValue(const QVariant &value, bool rememberOldValue)
+SizeCustomProperty::setValue(const TQVariant &value, bool rememberOldValue)
{
if(!m_property)
return;
- if(m_property->parent()) {
- QSize s = m_property->parent()->value().toSize();
+ if(m_property->tqparent()) {
+ TQSize s = m_property->tqparent()->value().toSize();
if(m_property->type() == Size_Height)
s.setHeight(value.toInt());
else if(m_property->type() == Size_Width)
s.setWidth(value.toInt());
- m_property->parent()->setValue(s, true, false);
+ m_property->tqparent()->setValue(s, true, false);
}
else{
- QSize s = value.toSize();
+ TQSize s = value.toSize();
m_property->child("width")->setValue(s.width(), rememberOldValue, false);
m_property->child("height")->setValue(s.height(), rememberOldValue, false);
}
}
-QVariant
+TQVariant
SizeCustomProperty::value() const
{
- if(!m_property || !m_property->parent())
- return QVariant();
+ if(!m_property || !m_property->tqparent())
+ return TQVariant();
if(m_property->type() == Size_Height)
- return m_property->parent()->value().toSize().height();
+ return m_property->tqparent()->value().toSize().height();
else if(m_property->type() == Size_Width)
- return m_property->parent()->value().toSize().width();
+ return m_property->tqparent()->value().toSize().width();
- return QVariant();
+ return TQVariant();
}
/////////////// PointCustomProperty /////////////////////
@@ -117,7 +117,7 @@ PointCustomProperty::PointCustomProperty(Property *property)
: CustomProperty(property)
{
if(property && (property->type() == Point) ) {
- QPoint p = property->value().toPoint();
+ TQPoint p = property->value().toPoint();
new Property("x", p.x(), i18n("X"), i18n("X"), Point_X, property);
new Property("y", p.y(), i18n("Y"), i18n("Y"), Point_Y, property);
}
@@ -141,40 +141,40 @@ PointCustomProperty::handleValue() const
}
void
-PointCustomProperty::setValue(const QVariant &value, bool rememberOldValue)
+PointCustomProperty::setValue(const TQVariant &value, bool rememberOldValue)
{
if(!m_property)
return;
- if(m_property->parent()) {
- QPoint p = m_property->parent()->value().toPoint();
+ if(m_property->tqparent()) {
+ TQPoint p = m_property->tqparent()->value().toPoint();
if(m_property->type() == Point_X)
p.setX(value.toInt());
else if(m_property->type() == Point_Y)
p.setY(value.toInt());
- m_property->parent()->setValue(p, true, false);
+ m_property->tqparent()->setValue(p, true, false);
}
else {
- QPoint p = value.toPoint();
+ TQPoint p = value.toPoint();
m_property->child("x")->setValue(p.x(), rememberOldValue, false);
m_property->child("y")->setValue(p.y(), rememberOldValue, false);
}
}
-QVariant
+TQVariant
PointCustomProperty::value() const
{
- if(!m_property || !m_property->parent())
- return QVariant();
+ if(!m_property || !m_property->tqparent())
+ return TQVariant();
if(m_property->type() == Point_X)
- return m_property->parent()->value().toPoint().x();
+ return m_property->tqparent()->value().toPoint().x();
else if(m_property->type() == Point_Y)
- return m_property->parent()->value().toPoint().y();
+ return m_property->tqparent()->value().toPoint().y();
- return QVariant();
+ return TQVariant();
}
/////////////// RectCustomProperty /////////////////////
@@ -183,7 +183,7 @@ RectCustomProperty::RectCustomProperty(Property *property)
: CustomProperty(property)
{
if(property && (property->type() == Rect) ) {
- QRect r = property->value().toRect();
+ TQRect r = property->value().toRect();
new Property("x", r.x(), i18n("X"), i18n("X"), Rect_X, property);
new Property("y", r.y(), i18n("Y"), i18n("Y"), Rect_Y, property);
new Property("width", r.width(), i18n("Width"), i18n("Width"), Rect_Width, property);
@@ -209,13 +209,13 @@ RectCustomProperty::handleValue() const
}
void
-RectCustomProperty::setValue(const QVariant &value, bool rememberOldValue)
+RectCustomProperty::setValue(const TQVariant &value, bool rememberOldValue)
{
if(!m_property)
return;
- if(m_property->parent()) {
- QRect r = m_property->parent()->value().toRect();
+ if(m_property->tqparent()) {
+ TQRect r = m_property->tqparent()->value().toRect();
if(m_property->type() == Rect_X) {
//changing x component of Rect shouldn't change width
@@ -234,10 +234,10 @@ RectCustomProperty::setValue(const QVariant &value, bool rememberOldValue)
else if(m_property->type() == Rect_Height)
r.setHeight(value.toInt());
- m_property->parent()->setValue(r, true, false);
+ m_property->tqparent()->setValue(r, true, false);
}
else {
- QRect r = value.toRect();
+ TQRect r = value.toRect();
m_property->child("x")->setValue(r.x(), rememberOldValue, false);
m_property->child("y")->setValue(r.y(), rememberOldValue, false);
m_property->child("width")->setValue(r.width(), rememberOldValue, false);
@@ -245,22 +245,22 @@ RectCustomProperty::setValue(const QVariant &value, bool rememberOldValue)
}
}
-QVariant
+TQVariant
RectCustomProperty::value() const
{
- if(!m_property || !m_property->parent())
- return QVariant();
+ if(!m_property || !m_property->tqparent())
+ return TQVariant();
if(m_property->type() == Rect_X)
- return m_property->parent()->value().toRect().x();
+ return m_property->tqparent()->value().toRect().x();
else if(m_property->type() == Rect_Y)
- return m_property->parent()->value().toRect().y();
+ return m_property->tqparent()->value().toRect().y();
else if(m_property->type() == Rect_Width)
- return m_property->parent()->value().toRect().width();
+ return m_property->tqparent()->value().toRect().width();
else if(m_property->type() == Rect_Height)
- return m_property->parent()->value().toRect().height();
+ return m_property->tqparent()->value().toRect().height();
- return QVariant();
+ return TQVariant();
}
@@ -270,16 +270,16 @@ SizePolicyCustomProperty::SizePolicyCustomProperty(Property *property)
: CustomProperty(property)
{
if(property && (property->type() == SizePolicy) ) {
-// QMap<QString, QVariant> spValues;
- QValueList<QVariant> keys;
- keys << QSizePolicy::Fixed
- << QSizePolicy::Minimum
- << QSizePolicy::Maximum
- << QSizePolicy::Preferred
- << QSizePolicy::Expanding
- << QSizePolicy::MinimumExpanding
- << QSizePolicy::Ignored;
- QStringList strings;
+// TQMap<TQString, TQVariant> spValues;
+ TQValueList<TQVariant> keys;
+ keys << TQSizePolicy::Fixed
+ << TQSizePolicy::Minimum
+ << TQSizePolicy::Maximum
+ << TQSizePolicy::Preferred
+ << TQSizePolicy::Expanding
+ << TQSizePolicy::MinimumExpanding
+ << TQSizePolicy::Ignored;
+ TQStringList strings;
strings << i18n("Size Policy", "Fixed")
<< i18n("Size Policy", "Minimum")
<< i18n("Size Policy", "Maximum")
@@ -329,27 +329,27 @@ SizePolicyCustomProperty::handleValue() const
}
void
-SizePolicyCustomProperty::setValue(const QVariant &value, bool rememberOldValue)
+SizePolicyCustomProperty::setValue(const TQVariant &value, bool rememberOldValue)
{
if(!m_property)
return;
- if(m_property->parent()) {
- QSizePolicy v = m_property->parent()->value().toSizePolicy();
+ if(m_property->tqparent()) {
+ TQSizePolicy v = m_property->tqparent()->value().toSizePolicy();
if(m_property->type() == SizePolicy_HorData)
- v.setHorData(QSizePolicy::SizeType(value.toInt()));
+ v.setHorData(TQSizePolicy::SizeType(value.toInt()));
else if(m_property->type() == SizePolicy_VerData)
- v.setVerData(QSizePolicy::SizeType(value.toInt()));
+ v.setVerData(TQSizePolicy::SizeType(value.toInt()));
else if(m_property->type() == SizePolicy_HorStretch)
v.setHorStretch(value.toInt());
else if(m_property->type() == SizePolicy_VerStretch)
v.setVerStretch(value.toInt());
- m_property->parent()->setValue(v, true, false);
+ m_property->tqparent()->setValue(v, true, false);
}
else {
- QSizePolicy v = value.toSizePolicy();
+ TQSizePolicy v = value.toSizePolicy();
m_property->child("hSizeType")->setValue(v.horData(), rememberOldValue, false);
m_property->child("vSizeType")->setValue(v.verData(), rememberOldValue, false);
m_property->child("hStretch")->setValue(v.horStretch(), rememberOldValue, false);
@@ -357,20 +357,20 @@ SizePolicyCustomProperty::setValue(const QVariant &value, bool rememberOldValue)
}
}
-QVariant
+TQVariant
SizePolicyCustomProperty::value() const
{
- if(!m_property || !m_property->parent())
- return QVariant();
+ if(!m_property || !m_property->tqparent())
+ return TQVariant();
if(m_property->type() == SizePolicy_HorData)
- return m_property->parent()->value().toSizePolicy().horData();
+ return m_property->tqparent()->value().toSizePolicy().horData();
else if(m_property->type() == SizePolicy_VerData)
- return m_property->parent()->value().toSizePolicy().verData();
+ return m_property->tqparent()->value().toSizePolicy().verData();
else if(m_property->type() == SizePolicy_HorStretch)
- return m_property->parent()->value().toSizePolicy().horStretch();
+ return m_property->tqparent()->value().toSizePolicy().horStretch();
else if(m_property->type() == SizePolicy_VerStretch)
- return m_property->parent()->value().toSizePolicy().verStretch();
+ return m_property->tqparent()->value().toSizePolicy().verStretch();
- return QVariant();
+ return TQVariant();
}
diff --git a/lib/koproperty/customproperty.h b/lib/koproperty/customproperty.h
index dff3e990..60584ca3 100644
--- a/lib/koproperty/customproperty.h
+++ b/lib/koproperty/customproperty.h
@@ -22,7 +22,7 @@
#include "koproperty_global.h"
-class QVariant;
+class TQVariant;
namespace KoProperty {
@@ -40,21 +40,21 @@ class Property;
class KOPROPERTY_EXPORT CustomProperty
{
public:
- CustomProperty(Property *parent);
+ CustomProperty(Property *tqparent);
virtual ~CustomProperty();
/*! This function is called by \ref Property::setValue() when
a custom property is set.
You don't have to modify the property value, it is done by Property class.
- You just have to update child or parent properties value (m_property->parent()->setValue()).
+ You just have to update child or tqparent properties value (m_property->tqparent()->setValue()).
Note that, when calling Property::setValue, you <b>need</b> to set
useCustomProperty (3rd parameter) to false, or there will be infinite recursion. */
- virtual void setValue(const QVariant &value, bool rememberOldValue) = 0;
+ virtual void setValue(const TQVariant &value, bool rememberOldValue) = 0;
/*! This function is called by \ref Property::value() when
a custom property is set and \ref handleValue() is true.
- You should return property's value, taken from parent's value.*/
- virtual QVariant value() const = 0;
+ You should return property's value, taken from tqparent's value.*/
+ virtual TQVariant value() const = 0;
/*! Tells whether CustomProperty should be used to get the property's value.
CustomProperty::setValue() will always be called. But if hadleValue() == true,
@@ -66,55 +66,55 @@ class KOPROPERTY_EXPORT CustomProperty
Property *m_property;
/*! This method emits the \a Set::propertyChanged() signal for all
- sets our parent-property is registered in. */
+ sets our tqparent-property is registered in. */
void emitPropertyChanged();
};
-//! \brief Custom property implementation for QSize type
+//! \brief Custom property implementation for TQSize type
class KOPROPERTY_EXPORT SizeCustomProperty : public CustomProperty
{
public:
- SizeCustomProperty(Property *parent);
+ SizeCustomProperty(Property *tqparent);
~SizeCustomProperty();
- void setValue(const QVariant &value, bool rememberOldValue);
- QVariant value() const;
+ void setValue(const TQVariant &value, bool rememberOldValue);
+ TQVariant value() const;
bool handleValue() const;
};
-//! \brief Custom property implementation for QPoint type
+//! \brief Custom property implementation for TQPoint type
class KOPROPERTY_EXPORT PointCustomProperty : public CustomProperty
{
public:
- PointCustomProperty(Property *parent);
+ PointCustomProperty(Property *tqparent);
~PointCustomProperty();
- void setValue(const QVariant &value, bool rememberOldValue);
- QVariant value() const;
+ void setValue(const TQVariant &value, bool rememberOldValue);
+ TQVariant value() const;
bool handleValue() const;
};
-//! \brief Custom property implementation for QRect type
+//! \brief Custom property implementation for TQRect type
class KOPROPERTY_EXPORT RectCustomProperty : public CustomProperty
{
public:
- RectCustomProperty(Property *parent);
+ RectCustomProperty(Property *tqparent);
~RectCustomProperty();
- void setValue(const QVariant &value, bool rememberOldValue);
- QVariant value() const;
+ void setValue(const TQVariant &value, bool rememberOldValue);
+ TQVariant value() const;
bool handleValue() const;
};
-//! \brief Custom property implementation for QSizePolicy type
+//! \brief Custom property implementation for TQSizePolicy type
class KOPROPERTY_EXPORT SizePolicyCustomProperty : public CustomProperty
{
public:
- SizePolicyCustomProperty(Property *parent);
+ SizePolicyCustomProperty(Property *tqparent);
~SizePolicyCustomProperty();
- void setValue(const QVariant &value, bool rememberOldValue);
- QVariant value() const;
+ void setValue(const TQVariant &value, bool rememberOldValue);
+ TQVariant value() const;
bool handleValue() const;
};
diff --git a/lib/koproperty/editor.cpp b/lib/koproperty/editor.cpp
index 3ae52d40..d664b6b8 100644
--- a/lib/koproperty/editor.cpp
+++ b/lib/koproperty/editor.cpp
@@ -26,17 +26,17 @@
#include "property.h"
#include "widget.h"
-#include <qpushbutton.h>
-#include <qlayout.h>
-#include <qmap.h>
-#include <qguardedptr.h>
-#include <qheader.h>
-#include <qasciidict.h>
-#include <qtooltip.h>
-#include <qapplication.h>
-#include <qeventloop.h>
-#include <qtimer.h>
-#include <qlabel.h>
+#include <tqpushbutton.h>
+#include <tqlayout.h>
+#include <tqmap.h>
+#include <tqguardedptr.h>
+#include <tqheader.h>
+#include <tqasciidict.h>
+#include <tqtooltip.h>
+#include <tqapplication.h>
+#include <tqeventloop.h>
+#include <tqtimer.h>
+#include <tqlabel.h>
#include <kdebug.h>
#include <kiconloader.h>
@@ -49,14 +49,14 @@ namespace KoProperty {
//! @internal
static bool kofficeAppDirAdded = false;
-//! \return true if \a o has parent \a par.
+//! \return true if \a o has tqparent \a par.
//! @internal
-inline bool hasParent(QObject* par, QObject* o)
+inline bool hasParent(TQObject* par, TQObject* o)
{
if (!o || !par)
return false;
while (o && o != par)
- o = o->parent();
+ o = o->tqparent();
return o == par;
}
@@ -77,20 +77,20 @@ class EditorPrivate
previouslyCollapsedGroupItem = 0;
childFormPreviouslyCollapsedGroupItem = 0;
slotPropertyChanged_enabled = true;
- QObject::connect(&changeSetLaterTimer, SIGNAL(timeout()),
- editor, SLOT(changeSetLater()));
+ TQObject::connect(&changeSetLaterTimer, TQT_SIGNAL(timeout()),
+ editor, TQT_SLOT(changeSetLater()));
}
~EditorPrivate()
{
}
- QGuardedPtr<Set> set;
+ TQGuardedPtr<Set> set;
//! widget cache for property types, widget will be deleted
- QMap<Property*, Widget* > widgetCache;
- QGuardedPtr<Widget> currentWidget;
+ TQMap<Property*, Widget* > widgetCache;
+ TQGuardedPtr<Widget> currentWidget;
EditorItem *currentItem;
EditorItem *topItem; //! The top item is used to control the drawing of every branches.
- QPushButton *undoButton; //! "Revert to defaults" button
+ TQPushButton *undoButton; //! "Revert to defaults" button
EditorItem::Dict itemDict;
int baseRowHeight;
@@ -98,10 +98,10 @@ class EditorPrivate
bool insideSlotValueChanged : 1;
//! Helpers for changeSetLater()
- QTimer changeSetLaterTimer;
+ TQTimer changeSetLaterTimer;
bool setListLater_set : 1;
bool preservePrevSelection_preservePrevSelection : 1;
- QCString preservePrevSelection_propertyToSelect;
+ TQCString preservePrevSelection_propertyToSelect;
//bool doNotSetFocusOnSelection : 1;
//! Used in setFocus() to prevent scrolling to previously selected item on mouse click
bool justClickedItem : 1;
@@ -112,15 +112,15 @@ class EditorPrivate
//! used by selectItemLater()
EditorItem *itemToSelectLater;
- QListViewItem *previouslyCollapsedGroupItem;
- QListViewItem *childFormPreviouslyCollapsedGroupItem;
+ TQListViewItem *previouslyCollapsedGroupItem;
+ TQListViewItem *childFormPreviouslyCollapsedGroupItem;
};
}
using namespace KoProperty;
-Editor::Editor(QWidget *parent, bool autoSync, const char *name)
- : KListView(parent, name)
+Editor::Editor(TQWidget *tqparent, bool autoSync, const char *name)
+ : KListView(tqparent, name)
{
d = new EditorPrivate(this);
d->itemDict.setAutoDelete(false);
@@ -134,14 +134,14 @@ Editor::Editor(QWidget *parent, bool autoSync, const char *name)
d->preservePrevSelection_preservePrevSelection = false;
d->setListLater_list = 0;
- d->undoButton = new QPushButton(viewport());
- d->undoButton->setFocusPolicy(QWidget::NoFocus);
- setFocusPolicy(QWidget::ClickFocus);
- d->undoButton->setMinimumSize(QSize(5,5)); // allow to resize undoButton even below pixmap size
+ d->undoButton = new TQPushButton(viewport());
+ d->undoButton->setFocusPolicy(TQ_NoFocus);
+ setFocusPolicy(TQ_ClickFocus);
+ d->undoButton->setMinimumSize(TQSize(5,5)); // allow to resize undoButton even below pixmap size
d->undoButton->setPixmap(SmallIcon("undo"));
- QToolTip::add(d->undoButton, i18n("Undo changes"));
+ TQToolTip::add(d->undoButton, i18n("Undo changes"));
d->undoButton->hide();
- connect(d->undoButton, SIGNAL(clicked()), this, SLOT(undo()));
+ connect(d->undoButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(undo()));
installEventFilter(this);
viewport()->installEventFilter(this);
@@ -149,7 +149,7 @@ Editor::Editor(QWidget *parent, bool autoSync, const char *name)
addColumn(i18n("Name"));
addColumn(i18n("Value"));
setAllColumnsShowFocus(true);
- setColumnWidthMode(0, QListView::Maximum);
+ setColumnWidthMode(0, TQListView::Maximum);
setFullWidth(true);
setShowSortIndicator(false);
#if KDE_IS_VERSION(3,3,9)
@@ -162,16 +162,16 @@ Editor::Editor(QWidget *parent, bool autoSync, const char *name)
setTreeStepSize(16 + 2/*left*/ + 1/*right*/);
updateFont();
-// d->baseRowHeight = QFontMetrics(font()).height() + itemMargin()*2;
-
- connect(this, SIGNAL(selectionChanged(QListViewItem *)), this, SLOT(slotClicked(QListViewItem *)));
- connect(this, SIGNAL(currentChanged(QListViewItem *)), this, SLOT(slotCurrentChanged(QListViewItem *)));
- connect(this, SIGNAL(expanded(QListViewItem *)), this, SLOT(slotExpanded(QListViewItem *)));
- connect(this, SIGNAL(collapsed(QListViewItem *)), this, SLOT(slotCollapsed(QListViewItem *)));
- connect(header(), SIGNAL(sizeChange(int, int, int)), this, SLOT(slotColumnSizeChanged(int, int, int)));
-// connect(header(), SIGNAL(clicked(int)), this, SLOT(updateEditorGeometry()));
-// connect(header(), SIGNAL(clicked(int)), this, SLOT(updateEditorGeometryAndGroupLabels()));
- connect(header(), SIGNAL(sectionHandleDoubleClicked (int)), this, SLOT(slotColumnSizeChanged(int)));
+// d->baseRowHeight = TQFontMetrics(font()).height() + itemMargin()*2;
+
+ connect(this, TQT_SIGNAL(selectionChanged(TQListViewItem *)), this, TQT_SLOT(slotClicked(TQListViewItem *)));
+ connect(this, TQT_SIGNAL(currentChanged(TQListViewItem *)), this, TQT_SLOT(slotCurrentChanged(TQListViewItem *)));
+ connect(this, TQT_SIGNAL(expanded(TQListViewItem *)), this, TQT_SLOT(slotExpanded(TQListViewItem *)));
+ connect(this, TQT_SIGNAL(collapsed(TQListViewItem *)), this, TQT_SLOT(slotCollapsed(TQListViewItem *)));
+ connect(header(), TQT_SIGNAL(sizeChange(int, int, int)), this, TQT_SLOT(slotColumnSizeChanged(int, int, int)));
+// connect(header(), TQT_SIGNAL(clicked(int)), this, TQT_SLOT(updateEditorGeometry()));
+// connect(header(), TQT_SIGNAL(clicked(int)), this, TQT_SLOT(updateEditorGeometryAndGroupLabels()));
+ connect(header(), TQT_SIGNAL(sectionHandleDoubleClicked (int)), this, TQT_SLOT(slotColumnSizeChanged(int)));
updateGroupLabelsPosition();
}
@@ -187,7 +187,7 @@ Editor::fill()
{
setUpdatesEnabled(false);
d->itemToSelectLater = 0;
- qApp->eventLoop()->processEvents(QEventLoop::AllEvents);
+ tqApp->eventLoop()->processEvents(TQEventLoop::AllEvents);
hideEditor();
KListView::clear();
d->itemDict.clear();
@@ -201,22 +201,22 @@ Editor::fill()
d->topItem = new EditorDummyItem(this);
- const QValueList<QCString> groupNames = d->set->groupNames();
+ const TQValueList<TQCString> groupNames = d->set->groupNames();
// kopropertydbg << "Editor::fill(): group names = " << groupNames.count() << endl;
if(groupNames.count() == 1) { // one group (default one), so don't show groups
//add flat set of properties
- const QValueList<QCString>& propertyNames = d->set->propertyNamesForGroup( groupNames.first() );
- QValueListConstIterator<QCString> it = propertyNames.constBegin();
+ const TQValueList<TQCString>& propertyNames = d->set->propertyNamesForGroup( groupNames.first() );
+ TQValueListConstIterator<TQCString> it = propertyNames.constBegin();
for( ; it != propertyNames.constEnd(); ++it)
addItem(*it, d->topItem);
}
else { // create a groupItem for each group
EditorGroupItem *prevGroupItem = 0;
int sortOrder = 0;
- for (QValueListConstIterator<QCString> it = groupNames.constBegin(); it!=groupNames.constEnd();
+ for (TQValueListConstIterator<TQCString> it = groupNames.constBegin(); it!=groupNames.constEnd();
++it, sortOrder++)
{
- const QValueList<QCString>& propertyNames = d->set->propertyNamesForGroup(*it);
+ const TQValueList<TQCString>& propertyNames = d->set->propertyNamesForGroup(*it);
EditorGroupItem *groupItem;
if (prevGroupItem)
groupItem = new EditorGroupItem(d->topItem, prevGroupItem,
@@ -225,7 +225,7 @@ Editor::fill()
groupItem = new EditorGroupItem(d->topItem,
d->set->groupDescription(*it), d->set->groupIcon(*it), sortOrder );
- QValueList<QCString>::ConstIterator it2 = propertyNames.constBegin();
+ TQValueList<TQCString>::ConstIterator it2 = propertyNames.constBegin();
for( ; it2 != propertyNames.constEnd(); ++it2)
addItem(*it2, groupItem);
@@ -233,7 +233,7 @@ Editor::fill()
}
}
-// repaint();
+// tqrepaint();
if (firstChild())
{
@@ -248,9 +248,9 @@ Editor::fill()
}
void
-Editor::addItem(const QCString &name, EditorItem *parent)
+Editor::addItem(const TQCString &name, EditorItem *tqparent)
{
- if(!d->set || !d->set->contains(name))
+ if(!d->set || !d->set->tqcontains(name))
return;
Property *property = &(d->set->property(name));
@@ -258,25 +258,25 @@ Editor::addItem(const QCString &name, EditorItem *parent)
// kopropertydbg << "Property is not visible: " << name << endl;
return;
}
- QListViewItem *last = parent ? parent->firstChild() : d->topItem->firstChild();
+ TQListViewItem *last = tqparent ? tqparent->firstChild() : d->topItem->firstChild();
while(last && last->nextSibling())
last = last->nextSibling();
EditorItem *item=0;
- if(parent)
- item = new EditorItem(this, parent, property, last);
+ if(tqparent)
+ item = new EditorItem(this, tqparent, property, last);
else
item = new EditorItem(this, d->topItem, property, last);
d->itemDict.insert(name, item);
// Create child items
item->setOpen(true);
- if(!property->children())
+ if(!property->tqchildren())
return;
last = 0;
- QValueList<Property*>::ConstIterator endIt = property->children()->constEnd();
- for(QValueList<Property*>::ConstIterator it = property->children()->constBegin(); it != endIt; ++it) {
+ TQValueList<Property*>::ConstIterator endIt = property->tqchildren()->constEnd();
+ for(TQValueList<Property*>::ConstIterator it = property->tqchildren()->constBegin(); it != endIt; ++it) {
//! \todo allow to have child prop with child items too
if( *it && (*it)->isVisible() )
last = new EditorItem(this, item, *it, last);
@@ -290,13 +290,13 @@ Editor::changeSet(Set *set, bool preservePrevSelection)
}
void
-Editor::changeSet(Set *set, const QCString& propertyToSelect)
+Editor::changeSet(Set *set, const TQCString& propertyToSelect)
{
changeSetInternal(set, !propertyToSelect.isEmpty(), propertyToSelect);
}
void
-Editor::changeSetInternal(Set *set, bool preservePrevSelection, const QCString& propertyToSelect)
+Editor::changeSetInternal(Set *set, bool preservePrevSelection, const TQCString& propertyToSelect)
{
if (d->insideSlotValueChanged) {
//changeSet() called from inside of slotValueChanged()
@@ -305,7 +305,7 @@ Editor::changeSetInternal(Set *set, bool preservePrevSelection, const QCString&
d->setListLater_list = set;
d->preservePrevSelection_preservePrevSelection = preservePrevSelection;
d->preservePrevSelection_propertyToSelect = propertyToSelect;
- qApp->eventLoop()->processEvents(QEventLoop::AllEvents);
+ tqApp->eventLoop()->processEvents(TQEventLoop::AllEvents);
if (d->set) {
//store prev. selection for this prop set
if (d->currentItem)
@@ -329,7 +329,7 @@ Editor::changeSetInternal(Set *set, bool preservePrevSelection, const QCString&
d->set->disconnect(this);
}
- QCString selectedPropertyName1 = propertyToSelect, selectedPropertyName2 = propertyToSelect;
+ TQCString selectedPropertyName1 = propertyToSelect, selectedPropertyName2 = propertyToSelect;
if (preservePrevSelection) {
//try to find prev. selection:
//1. in new list's prev. selection
@@ -343,12 +343,12 @@ Editor::changeSetInternal(Set *set, bool preservePrevSelection, const QCString&
d->set = set;
if (d->set) {
//receive property changes
- connect(d->set, SIGNAL(propertyChangedInternal(KoProperty::Set&, KoProperty::Property&)),
- this, SLOT(slotPropertyChanged(KoProperty::Set&, KoProperty::Property&)));
- connect(d->set, SIGNAL(propertyReset(KoProperty::Set&, KoProperty::Property&)),
- this, SLOT(slotPropertyReset(KoProperty::Set&, KoProperty::Property&)));
- connect(d->set,SIGNAL(aboutToBeCleared()), this, SLOT(slotSetWillBeCleared()));
- connect(d->set,SIGNAL(aboutToBeDeleted()), this, SLOT(slotSetWillBeDeleted()));
+ connect(d->set, TQT_SIGNAL(propertyChangedInternal(KoProperty::Set&, KoProperty::Property&)),
+ this, TQT_SLOT(slotPropertyChanged(KoProperty::Set&, KoProperty::Property&)));
+ connect(d->set, TQT_SIGNAL(propertyReset(KoProperty::Set&, KoProperty::Property&)),
+ this, TQT_SLOT(slotPropertyReset(KoProperty::Set&, KoProperty::Property&)));
+ connect(d->set,TQT_SIGNAL(aboutToBeCleared()), this, TQT_SLOT(slotSetWillBeCleared()));
+ connect(d->set,TQT_SIGNAL(aboutToBeDeleted()), this, TQT_SLOT(slotSetWillBeDeleted()));
}
fill();
@@ -365,8 +365,8 @@ Editor::changeSetInternal(Set *set, bool preservePrevSelection, const QCString&
if (item) {
d->itemToSelectLater = item;
- QTimer::singleShot(10, this, SLOT(selectItemLater()));
- //d->doNotSetFocusOnSelection = !hasParent(this, focusWidget());
+ TQTimer::singleShot(10, this, TQT_SLOT(selectItemLater()));
+ //d->doNotSetFocusOnSelection = !hasParent(this, tqfocusWidget());
//setSelected(item, true);
//d->doNotSetFocusOnSelection = false;
// ensureItemVisible(item);
@@ -389,7 +389,7 @@ void Editor::selectItemLater()
void
Editor::changeSetLater()
{
- qApp->eventLoop()->processEvents(QEventLoop::AllEvents);
+ tqApp->eventLoop()->processEvents(TQEventLoop::AllEvents);
if (kapp->hasPendingEvents()) {
d->changeSetLaterTimer.start(10, true); //try again...
return;
@@ -412,7 +412,7 @@ Editor::clear(bool editorOnly)
hideEditor();
if(!editorOnly) {
- qApp->eventLoop()->processEvents(QEventLoop::AllEvents);
+ tqApp->eventLoop()->processEvents(TQEventLoop::AllEvents);
if(d->set)
d->set->disconnect(this);
clearWidgetCache();
@@ -436,7 +436,7 @@ Editor::undo()
d->currentItem->property()->resetValue();
if (d->currentWidget && d->currentItem) {//(check because current widget could be removed by resetValue())
d->currentWidget->setValue( d->currentItem->property()->value());
- repaintItem(d->currentItem);
+ tqrepaintItem(d->currentItem);
}
}
@@ -450,33 +450,33 @@ Editor::slotPropertyChanged(Set& set, Property& property)
if (d->currentItem && d->currentItem->property() == &property) {
d->currentWidget->setValue(property.value(), false);
- for(QListViewItem *item = d->currentItem->firstChild(); item; item = item->nextSibling())
- repaintItem(item);
+ for(TQListViewItem *item = d->currentItem->firstChild(); item; item = item->nextSibling())
+ tqrepaintItem(item);
}
else {
// prop not in the dict, might be a child property:
EditorItem *item = d->itemDict[property.name()];
- if(!item && property.parent())
- item = d->itemDict[property.parent()->name()];
+ if(!item && property.tqparent())
+ item = d->itemDict[property.tqparent()->name()];
if (item) {
- repaintItem(item);
- for(QListViewItem *it = item->firstChild(); it; it = it->nextSibling())
- repaintItem(it);
+ tqrepaintItem(item);
+ for(TQListViewItem *it = item->firstChild(); it; it = it->nextSibling())
+ tqrepaintItem(it);
}
}
//! @todo should we move this somewhere?
#if 0
- if (property.parent() && property.parent()->type()==Rect) {
+ if (property.tqparent() && property.tqparent()->type()==Rect) {
const int delta = property.value().toInt()-previousValue.toInt();
if (property.type()==Rect_X) { //|| property.type()==Rect_Y)
- property.parent()->child("width")->setValue(delta, false);
+ property.tqparent()->child("width")->setValue(delta, false);
}
-/* if (widget->property() && (QWidget*)d->currentWidget==widget && d->currentItem->parent()) {
- EditorItem *parentItem = static_cast<EditorItem*>(d->currentItem->parent());
+/* if (widget->property() && (TQWidget*)d->currentWidget==widget && d->currentItem->tqparent()) {
+ EditorItem *tqparentItem = static_cast<EditorItem*>(d->currentItem->tqparent());
const int thisType = ;
- && parentItem->property()->type()==Rect) {
+ && tqparentItem->property()->type()==Rect) {
//changing x or y components of Rect type shouldn't change width or height, respectively
if (thisType==Rect_X) {
EditorItem *rectWidthItem = static_cast<EditorItem*>(d->currentItem->nextSibling()->nextSibling());
@@ -498,18 +498,18 @@ Editor::slotPropertyReset(Set& set, Property& property)
if (d->currentItem && d->currentItem->property() == &property) {
d->currentWidget->setValue(property.value(), false);
- for(QListViewItem *item = d->currentItem->firstChild(); item; item = item->nextSibling())
- repaintItem(item);
+ for(TQListViewItem *item = d->currentItem->firstChild(); item; item = item->nextSibling())
+ tqrepaintItem(item);
}
else {
EditorItem *item = d->itemDict[property.name()];
// prop not in the dict, might be a child prop.
- if(!item && property.parent())
- item = d->itemDict[property.parent()->name()];
+ if(!item && property.tqparent())
+ item = d->itemDict[property.tqparent()->name()];
if (item) {
- repaintItem(item);
- for(QListViewItem *it = item->firstChild(); it; it = it->nextSibling())
- repaintItem(it);
+ tqrepaintItem(item);
+ for(TQListViewItem *it = item->firstChild(); it; it = it->nextSibling())
+ tqrepaintItem(it);
}
}
@@ -524,14 +524,14 @@ Editor::slotWidgetValueChanged(Widget *widget)
d->insideSlotValueChanged = true;
- QVariant value = widget->value();
+ TQVariant value = widget->value();
int propertySync = widget->property()->autoSync();
bool sync = (propertySync != 0 && propertySync != 1) ?
d->sync : (propertySync!=0);
if(sync) {
d->slotPropertyChanged_enabled = false;
- QGuardedPtr<Widget> pWidget = widget; //safe, widget can be destroyed in the meantime
+ TQGuardedPtr<Widget> pWidget = widget; //safe, widget can be destroyed in the meantime
widget->property()->setValue(value);
if (pWidget)
showUndoButton( pWidget->property()->isModified() );
@@ -566,7 +566,7 @@ Editor::slotWidgetRejectInput(Widget *widget)
}
void
-Editor::slotClicked(QListViewItem *it)
+Editor::slotClicked(TQListViewItem *it)
{
d->previouslyCollapsedGroupItem = 0;
d->childFormPreviouslyCollapsedGroupItem = 0;
@@ -590,7 +590,7 @@ Editor::slotClicked(QListViewItem *it)
if (d->currentWidget) {
if (d->currentWidget->visibleFlag()) {
d->currentWidget->show();
- if (hasParent( this, kapp->focusWidget() ))
+ if (hasParent( TQT_TQOBJECT(this), TQT_TQOBJECT(kapp->tqfocusWidget()) ))
d->currentWidget->setFocus();
}
}
@@ -599,10 +599,10 @@ Editor::slotClicked(QListViewItem *it)
}
void
-Editor::slotCurrentChanged(QListViewItem *item)
+Editor::slotCurrentChanged(TQListViewItem *item)
{
if (item == firstChild()) {
- QListViewItem *oldItem = item;
+ TQListViewItem *oldItem = item;
while (item && (!item->isSelectable() || !item->isVisible()))
item = item->itemBelow();
if (item && item != oldItem) {
@@ -634,7 +634,7 @@ Widget*
Editor::createWidgetForProperty(Property *property, bool changeWidgetProperty)
{
// int type = property->type();
- QGuardedPtr<Widget> widget = d->widgetCache[property];
+ TQGuardedPtr<Widget> widget = d->widgetCache[property];
if(!widget) {
widget = FactoryManager::self()->createWidgetForProperty(property);
@@ -644,15 +644,15 @@ Editor::createWidgetForProperty(Property *property, bool changeWidgetProperty)
d->widgetCache[property] = widget;
widget->setProperty(0); // to force reloading property later
widget->hide();
- connect(widget, SIGNAL(valueChanged(Widget*)),
- this, SLOT(slotWidgetValueChanged(Widget*)) );
- connect(widget, SIGNAL(acceptInput(Widget*)),
- this, SLOT(slotWidgetAcceptInput(Widget*)) );
- connect(widget, SIGNAL(rejectInput(Widget*)),
- this, SLOT(slotWidgetRejectInput(Widget*)) );
+ connect(widget, TQT_SIGNAL(valueChanged(Widget*)),
+ this, TQT_SLOT(slotWidgetValueChanged(Widget*)) );
+ connect(widget, TQT_SIGNAL(acceptInput(Widget*)),
+ this, TQT_SLOT(slotWidgetAcceptInput(Widget*)) );
+ connect(widget, TQT_SIGNAL(rejectInput(Widget*)),
+ this, TQT_SLOT(slotWidgetRejectInput(Widget*)) );
}
- //update geometry earlier, because Widget::setValue() can depend on widget's geometry
+ //update tqgeometry earlier, because Widget::setValue() can depend on widget's tqgeometry
updateEditorGeometry(d->currentItem, widget);
if(widget && (!widget->property() || changeWidgetProperty))
@@ -669,7 +669,7 @@ Editor::createWidgetForProperty(Property *property, bool changeWidgetProperty)
void
Editor::clearWidgetCache()
{
- for(QMap<Property*, Widget*>::iterator it = d->widgetCache.begin(); it != d->widgetCache.end(); ++it)
+ for(TQMap<Property*, Widget*>::iterator it = d->widgetCache.begin(); it != d->widgetCache.end(); ++it)
it.data()->deleteLater();
// delete it.data();
d->widgetCache.clear();
@@ -695,7 +695,7 @@ Editor::updateEditorGeometry(EditorItem *item, Widget* widget,
else
placeForUndoButton = widget->leavesTheSpaceForRevertButton() ? d->undoButton->width() : 0;
- QRect r;
+ TQRect r;
int y = itemPos(item);
r.setX(header()->sectionPos(1)-(widget->hasBorders()?1:0)); //-1, to align to horizontal line
r.setY(y-(widget->hasBorders()?1:0));
@@ -709,7 +709,7 @@ Editor::updateEditorGeometry(EditorItem *item, Widget* widget,
moveChild(widget, r.x(), r.y());
widget->resize(r.size());
- qApp->eventLoop()->processEvents(QEventLoop::AllEvents);
+ tqApp->eventLoop()->processEvents(TQEventLoop::AllEvents);
}
void
@@ -720,10 +720,10 @@ Editor::updateGroupLabelsPosition()
EditorGroupItem *group = dynamic_cast<EditorGroupItem*>(d->topItem->firstChild());
while(group) {
- QRect r = itemRect((QListViewItem*) group);
+ TQRect r = tqitemRect((TQListViewItem*) group);
if(group->label()) {
group->label()->setGeometry(r);
- group->label()->repaint();
+ group->label()->tqrepaint();
}
group = dynamic_cast<EditorGroupItem*>(group->nextSibling());
}
@@ -733,7 +733,7 @@ void
Editor::hideEditor()
{
d->currentItem = 0;
- QWidget *cw = d->currentWidget;
+ TQWidget *cw = d->currentWidget;
if(cw) {
d->currentWidget = 0;
cw->hide();
@@ -747,8 +747,8 @@ Editor::showUndoButton( bool show )
if (!d->currentItem || !d->currentWidget || (d->currentWidget && d->currentWidget->isReadOnly()))
return;
- int y = viewportToContents(QPoint(0, itemRect(d->currentItem).y())).y();
- QRect geometry(columnWidth(0), y, columnWidth(1) + 1, d->currentItem->height());
+ int y = viewportToContents(TQPoint(0, tqitemRect(d->currentItem).y())).y();
+ TQRect tqgeometry(columnWidth(0), y, columnWidth(1) + 1, d->currentItem->height());
d->undoButton->resize(d->baseRowHeight, d->currentItem->height());
updateEditorGeometry(true, show);
@@ -756,27 +756,27 @@ Editor::showUndoButton( bool show )
if (!show) {
/* if (d->currentWidget) {
if (d->currentWidget->leavesTheSpaceForRevertButton()) {
- geometry.setWidth(geometry.width()-d->undoButton->width());
+ tqgeometry.setWidth(tqgeometry.width()-d->undoButton->width());
}
- d->currentWidget->resize(geometry.width(), geometry.height());
+ d->currentWidget->resize(tqgeometry.width(), tqgeometry.height());
}*/
d->undoButton->hide();
return;
}
- QPoint p = contentsToViewport(QPoint(0, geometry.y()));
- d->undoButton->move(geometry.x() + geometry.width()
+ TQPoint p = contentsToViewport(TQPoint(0, tqgeometry.y()));
+ d->undoButton->move(tqgeometry.x() + tqgeometry.width()
-((d->currentWidget && d->currentWidget->hasBorders())?1:0)/*editor is moved by 1 to left*/
- d->undoButton->width(), p.y());
// if (d->currentWidget) {
// d->currentWidget->move(d->currentWidget->x(), p.y());
-// d->currentWidget->resize(geometry.width()-d->undoButton->width(), geometry.height());
+// d->currentWidget->resize(tqgeometry.width()-d->undoButton->width(), tqgeometry.height());
// }
d->undoButton->show();
}
void
-Editor::slotExpanded(QListViewItem *item)
+Editor::slotExpanded(TQListViewItem *item)
{
if (!item)
return;
@@ -790,19 +790,19 @@ Editor::slotExpanded(QListViewItem *item)
}
updateEditorGeometry();
updateGroupLabelsPosition();
- repaintContents();
- repaint();
+ tqrepaintContents();
+ tqrepaint();
}
void
-Editor::slotCollapsed(QListViewItem *item)
+Editor::slotCollapsed(TQListViewItem *item)
{
if (!item)
return;
//unselect child item and hide editor if a group item has been collapsed
if (dynamic_cast<EditorGroupItem*>(item)) {
- for (QListViewItem *i = selectedItem(); i; i = i->parent()) {
- if (i->parent()==item) {
+ for (TQListViewItem *i = selectedItem(); i; i = i->tqparent()) {
+ if (i->tqparent()==item) {
d->previouslyCollapsedGroupItem = item;
d->childFormPreviouslyCollapsedGroupItem = selectedItem();
hideEditor();
@@ -814,8 +814,8 @@ Editor::slotCollapsed(QListViewItem *item)
}
updateEditorGeometry();
updateGroupLabelsPosition();
- repaintContents();
- repaint();
+ tqrepaintContents();
+ tqrepaint();
}
void
@@ -824,9 +824,9 @@ Editor::slotColumnSizeChanged(int section, int oldSize, int newSize)
Q_UNUSED(section);
Q_UNUSED(oldSize);
Q_UNUSED(newSize);
- /*for (QListViewItemIterator it(this); it.current(); ++it) {
+ /*for (TQListViewItemIterator it(this); it.current(); ++it) {
if (section == 0 && dynamic_cast<EditorGroupItem*>(it.current())) {
- it.current()->repaint();
+ it.current()->tqrepaint();
}
}*/
/*
@@ -842,8 +842,8 @@ Editor::slotColumnSizeChanged(int section, int oldSize, int newSize)
d->currentWidget->height());
}
}*/
-// repaintContents();
-// repaint();
+// tqrepaintContents();
+// tqrepaint();
updateEditorGeometry();
update();
}
@@ -868,11 +868,11 @@ Editor::slotColumnSizeChanged(int section)
updateEditorGeometry();
}
-QSize
-Editor::sizeHint() const
+TQSize
+Editor::tqsizeHint() const
{
- return QSize( QFontMetrics(font()).width(columnText(0)+columnText(1)+" "),
- KListView::sizeHint().height());
+ return TQSize( TQFontMetrics(font()).width(columnText(0)+columnText(1)+" "),
+ KListView::tqsizeHint().height());
}
void
@@ -886,7 +886,7 @@ Editor::setFocus()
}
else {
//select an item before focusing
- item = static_cast<EditorItem *>(itemAt(QPoint(10,1)));
+ item = static_cast<EditorItem *>(itemAt(TQPoint(10,1)));
if (item) {
ensureItemVisible(item);
setSelected(item, true);
@@ -903,7 +903,7 @@ Editor::setFocus()
}
void
-Editor::resizeEvent(QResizeEvent *ev)
+Editor::resizeEvent(TQResizeEvent *ev)
{
KListView::resizeEvent(ev);
if(d->undoButton->isVisible())
@@ -913,25 +913,25 @@ Editor::resizeEvent(QResizeEvent *ev)
}
bool
-Editor::eventFilter( QObject * watched, QEvent * e )
+Editor::eventFilter( TQObject * watched, TQEvent * e )
{
- if ((watched==this || watched==viewport()) && e->type()==QEvent::KeyPress) {
- if (handleKeyPress(static_cast<QKeyEvent*>(e)))
+ if ((TQT_BASE_OBJECT(watched)==TQT_BASE_OBJECT(this) || TQT_BASE_OBJECT(watched)==TQT_BASE_OBJECT(viewport())) && e->type()==TQEvent::KeyPress) {
+ if (handleKeyPress(TQT_TQKEYEVENT(e)))
return true;
}
return KListView::eventFilter(watched, e);
}
bool
-Editor::handleKeyPress(QKeyEvent* ev)
+Editor::handleKeyPress(TQKeyEvent* ev)
{
const int k = ev->key();
- const Qt::ButtonState s = ev->state();
+ const TQt::ButtonState s = ev->state();
//selection moving
- QListViewItem *item = 0;
+ TQListViewItem *item = 0;
- if ( ((s == NoButton) && (k == Key_Up)) || (k==Key_BackTab) ) {
+ if ( ((s == Qt::NoButton) && (k == Key_Up)) || (k==Key_BackTab) ) {
//find prev visible
item = selectedItem() ? selectedItem()->itemAbove() : 0;
while (item && (!item->isSelectable() || !item->isVisible()))
@@ -939,7 +939,7 @@ Editor::handleKeyPress(QKeyEvent* ev)
if (!item)
return true;
}
- else if( (s == NoButton) && ((k == Key_Down) || (k == Key_Tab)) ) {
+ else if( (s == Qt::NoButton) && ((k == Key_Down) || (k == Key_Tab)) ) {
//find next visible
item = selectedItem() ? selectedItem()->itemBelow() : 0;
while (item && (!item->isSelectable() || !item->isVisible()))
@@ -947,20 +947,20 @@ Editor::handleKeyPress(QKeyEvent* ev)
if (!item)
return true;
}
- else if( (s==NoButton) && (k==Key_Home) ) {
+ else if( (s==Qt::NoButton) && (k==Key_Home) ) {
if (d->currentWidget && d->currentWidget->hasFocus())
return false;
- //find 1st visible
+ //tqfind 1st visible
item = firstChild();
while (item && (!item->isSelectable() || !item->isVisible()))
item = item->itemBelow();
}
- else if( (s==NoButton) && (k==Key_End) ) {
+ else if( (s==Qt::NoButton) && (k==Key_End) ) {
if (d->currentWidget && d->currentWidget->hasFocus())
return false;
//find last visible
item = selectedItem();
- QListViewItem *lastVisible = item;
+ TQListViewItem *lastVisible = item;
while (item) { // && (!item->isSelectable() || !item->isVisible()))
item = item->itemBelow();
if (item && item->isSelectable() && item->isVisible())
@@ -981,8 +981,8 @@ Editor::handleKeyPress(QKeyEvent* ev)
void
Editor::updateFont()
{
- setFont(parentWidget()->font());
- d->baseRowHeight = QFontMetrics(parentWidget()->font()).height() + itemMargin() * 2;
+ setFont(tqparentWidget()->font());
+ d->baseRowHeight = TQFontMetrics(tqparentWidget()->font()).height() + itemMargin() * 2;
if (!d->currentItem)
d->undoButton->resize(d->baseRowHeight, d->baseRowHeight);
else {
@@ -993,18 +993,18 @@ Editor::updateFont()
}
bool
-Editor::event( QEvent * e )
+Editor::event( TQEvent * e )
{
- if (e->type()==QEvent::ParentFontChange) {
+ if (e->type()==TQEvent::ParentFontChange) {
updateFont();
}
return KListView::event(e);
}
void
-Editor::contentsMousePressEvent( QMouseEvent * e )
+Editor::contentsMousePressEvent( TQMouseEvent * e )
{
- QListViewItem *item = itemAt(e->pos());
+ TQListViewItem *item = itemAt(e->pos());
if (dynamic_cast<EditorGroupItem*>(item)) {
setOpen( item, !isOpen(item) );
return;
@@ -1020,8 +1020,8 @@ Editor::setSorting( int column, bool ascending )
KListView::setSorting( column, ascending );
updateEditorGeometry();
updateGroupLabelsPosition();
- repaintContents();
- repaint();
+ tqrepaintContents();
+ tqrepaint();
}
#include "editor.moc"
diff --git a/lib/koproperty/editor.h b/lib/koproperty/editor.h
index 9cd794f7..677208de 100644
--- a/lib/koproperty/editor.h
+++ b/lib/koproperty/editor.h
@@ -22,12 +22,12 @@
#ifndef KPROPERTY_PROPERTYEDITOR_H
#define KPROPERTY_PROPERTYEDITOR_H
-#include <qguardedptr.h>
+#include <tqguardedptr.h>
#include "koproperty_global.h"
#include <klistview.h>
-class QSize;
+class TQSize;
namespace KoProperty {
@@ -44,15 +44,15 @@ class EditorItem;
Currently supported options are:
<ul><li> min: integer setting for minimum value of IntEdit and DoubleEdit item. Default is 0.
Set "min" to -1, if you want this special value to be allowed.</li>
- <li> minValueText: i18n'd QString used in IntEdit to set "specialValueText"
+ <li> minValueText: i18n'd TQString used in IntEdit to set "specialValueText"
widget's property</li>
<li> max: integer setting for minimum value of IntEdit item. Default is 0xffff.</li>
<li> precision: The number of decimals after the decimal point. (for DoubleEdit)</li>
<li> step : the size of the step that is taken when the user hits the up
or down buttons (for DoubleEdit) </li>
- <li> 3rdState: i18n'd QString used in BoolEdit. If not empty, the the editor's button
+ <li> 3rdState: i18n'd TQString used in BoolEdit. If not empty, the the editor's button
accept third "null" state with name equal to this string. When this value is selected,
- Widget::value() returns null QVariant. This option is used for example in the "defaultValue"
+ Widget::value() returns null TQVariant. This option is used for example in the "defaultValue"
property for a field of type boolean (in Kexi Table Designer). Third, "null" value
of the property means there is no "defaultValue" specified. </li>
</ul>
@@ -63,20 +63,21 @@ class EditorItem;
class KOPROPERTY_EXPORT Editor : public KListView
{
Q_OBJECT
+ TQ_OBJECT
public:
- /*! Creates an empty Editor with \a parent as parent widget.
+ /*! Creates an empty Editor with \a tqparent as tqparent widget.
If \a autoSync == true, properties values are automatically synced as
soon as editor contents change (eg the user types text, etc.)
and the values are written in the property set. Otherwise, property set
is updated only when selected item changes or user presses Enter key.
Each property can overwrite this if its autoSync() == 0 or 1.
*/
- Editor(QWidget *parent=0, bool autoSync=true, const char *name=0);
+ Editor(TQWidget *tqparent=0, bool autoSync=true, const char *name=0);
virtual ~Editor();
- virtual QSize sizeHint() const;
+ virtual TQSize tqsizeHint() const;
virtual void setFocus();
virtual void setSorting( int column, bool ascending = true );
@@ -91,7 +92,7 @@ class KOPROPERTY_EXPORT Editor : public KListView
Also creates child items for composed properties.
If \a propertyToSelect is not empty, editor item for this property name
will be selected, if present. */
- void changeSet(Set *set, const QCString& propertyToSelect);
+ void changeSet(Set *set, const TQCString& propertyToSelect);
/*! Clears all items in the list.
if \a editorOnly is true, then only the current editor will be cleared,
@@ -131,7 +132,7 @@ class KOPROPERTY_EXPORT Editor : public KListView
/*! This slot is called when the user clicks the list view.
It takes care of deleting current editor and
creating a new editor for the newly selected item. */
- void slotClicked(QListViewItem *item);
+ void slotClicked(TQListViewItem *item);
/*! Undoes the last change in property editor.*/
void undo();
@@ -142,11 +143,11 @@ class KOPROPERTY_EXPORT Editor : public KListView
void hideEditor();
- void slotCollapsed(QListViewItem *item);
- void slotExpanded(QListViewItem *item);
+ void slotCollapsed(TQListViewItem *item);
+ void slotExpanded(TQListViewItem *item);
void slotColumnSizeChanged(int section);
void slotColumnSizeChanged(int section, int oldSize, int newSize);
- void slotCurrentChanged(QListViewItem *item);
+ void slotCurrentChanged(TQListViewItem *item);
void changeSetLater();
void selectItemLater();
protected:
@@ -159,22 +160,22 @@ class KOPROPERTY_EXPORT Editor : public KListView
void clearWidgetCache();
void fill();
- void addItem(const QCString &name, EditorItem *parent);
+ void addItem(const TQCString &name, EditorItem *tqparent);
void showUndoButton( bool show );
- virtual void resizeEvent(QResizeEvent *ev);
- virtual bool eventFilter( QObject * watched, QEvent * e );
- bool handleKeyPress(QKeyEvent* ev);
+ virtual void resizeEvent(TQResizeEvent *ev);
+ virtual bool eventFilter( TQObject * watched, TQEvent * e );
+ bool handleKeyPress(TQKeyEvent* ev);
- virtual bool event( QEvent * e );
+ virtual bool event( TQEvent * e );
void updateFont();
- virtual void contentsMousePressEvent( QMouseEvent * e );
+ virtual void contentsMousePressEvent( TQMouseEvent * e );
/*! Used for changeSet(). */
void changeSetInternal(Set *set, bool preservePrevSelection,
- const QCString& propertyToSelect);
+ const TQCString& propertyToSelect);
private:
EditorPrivate *d;
diff --git a/lib/koproperty/editoritem.cpp b/lib/koproperty/editoritem.cpp
index 604c9fab..385ec891 100644
--- a/lib/koproperty/editoritem.cpp
+++ b/lib/koproperty/editoritem.cpp
@@ -26,12 +26,12 @@
#include "factory.h"
#include "utils.h"
-#include <qpainter.h>
-#include <qpixmap.h>
-#include <qheader.h>
-#include <qstyle.h>
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
+#include <tqheader.h>
+#include <tqstyle.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <kdebug.h>
#include <kiconloader.h>
@@ -54,7 +54,7 @@ class EditorItemPrivate
};
//! @internal
-static void paintListViewExpander(QPainter* p, QWidget* w, int height, const QColorGroup& cg, bool isOpen)
+static void paintListViewExpander(TQPainter* p, TQWidget* w, int height, const TQColorGroup& cg, bool isOpen)
{
const int marg = (height -2 - BRANCHBOX_SIZE) / 2;
int xmarg = marg;
@@ -65,9 +65,9 @@ static void paintListViewExpander(QPainter* p, QWidget* w, int height, const QCo
KStyle* kstyle = dynamic_cast<KStyle*>(widget->style());
if (kstyle) {
kstyle->drawKStylePrimitive(
- KStyle::KPE_ListViewExpander, p, w, QRect( xmarg, marg, BRANCHBOX_SIZE, BRANCHBOX_SIZE ),
- cg, isOpen ? 0 : QStyle::Style_On,
- QStyleOption::Default);
+ KStyle::KPE_ListViewExpander, p, w, TQRect( xmarg, marg, BRANCHBOX_SIZE, BRANCHBOX_SIZE ),
+ cg, isOpen ? 0 : TQStyle::Style_On,
+ TQStyleOption::Default);
}
else {
#endif
@@ -90,23 +90,23 @@ static void paintListViewExpander(QPainter* p, QWidget* w, int height, const QCo
//! @internal
//! Based on KPopupTitle, see kpopupmenu.cpp
-class GroupWidgetBase : public QWidget
+class GroupWidgetBase : public TQWidget
{
public:
- GroupWidgetBase(QWidget* parent)
- : QWidget(parent)
+ GroupWidgetBase(TQWidget* tqparent)
+ : TQWidget(tqparent)
, m_isOpen(true)
, m_mouseDown(false)
{
- setSizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed, 0, 1));
+ tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed, 0, 1));
}
- void setText( const QString &text )
+ void setText( const TQString &text )
{
m_titleStr = text;
}
- void setIcon( const QPixmap &pix )
+ void setIcon( const TQPixmap &pix )
{
m_miniicon = pix;
}
@@ -121,21 +121,21 @@ class GroupWidgetBase : public QWidget
m_isOpen = set;
}
- virtual QSize sizeHint () const
+ virtual TQSize tqsizeHint () const
{
- QSize s( QWidget::sizeHint() );
+ TQSize s( TQWidget::tqsizeHint() );
s.setHeight(fontMetrics().height()*2);
return s;
}
protected:
- virtual void paintEvent(QPaintEvent *) {
- QRect r(rect());
- QPainter p(this);
- QStyle::StyleFlags flags = m_mouseDown ? QStyle::Style_Down : QStyle::Style_Default;
- kapp->style().drawPrimitive(QStyle::PE_HeaderSection, &p, r, palette().active(), flags);
+ virtual void paintEvent(TQPaintEvent *) {
+ TQRect r(rect());
+ TQPainter p(this);
+ TQStyle::StyleFlags flags = m_mouseDown ? TQStyle::Style_Down : TQStyle::Style_Default;
+ kapp->tqstyle().tqdrawPrimitive(TQStyle::PE_HeaderSection, &p, r, tqpalette().active(), flags);
- paintListViewExpander(&p, this, r.height()+2, palette().active(), isOpen());
+ paintListViewExpander(&p, this, r.height()+2, tqpalette().active(), isOpen());
if (!m_miniicon.isNull()) {
p.drawPixmap(24, (r.height()-m_miniicon.height())/2, m_miniicon);
}
@@ -143,8 +143,8 @@ class GroupWidgetBase : public QWidget
if (!m_titleStr.isNull())
{
int indent = 16 + (m_miniicon.isNull() ? 0 : (m_miniicon.width()+4));
- p.setPen(palette().active().text());
- QFont f = p.font();
+ p.setPen(tqpalette().active().text());
+ TQFont f = p.font();
f.setBold(true);
p.setFont(f);
p.drawText(indent+8, 0, width()-(indent+8),
@@ -155,20 +155,20 @@ class GroupWidgetBase : public QWidget
// p.drawLine(0, 0, r.right(), 0);
}
- virtual bool event( QEvent * e ) {
- if (e->type()==QEvent::MouseButtonPress || e->type()==QEvent::MouseButtonRelease) {
- QMouseEvent* me = static_cast<QMouseEvent*>(e);
+ virtual bool event( TQEvent * e ) {
+ if (e->type()==TQEvent::MouseButtonPress || e->type()==TQEvent::MouseButtonRelease) {
+ TQMouseEvent* me = TQT_TQMOUSEEVENT(e);
if (me->button() == Qt::LeftButton) {
- m_mouseDown = e->type()==QEvent::MouseButtonPress;
+ m_mouseDown = e->type()==TQEvent::MouseButtonPress;
update();
}
}
- return QWidget::event(e);
+ return TQWidget::event(e);
}
protected:
- QString m_titleStr;
- QPixmap m_miniicon;
+ TQString m_titleStr;
+ TQPixmap m_miniicon;
bool m_isOpen : 1;
bool m_mouseDown : 1;
};
@@ -176,9 +176,9 @@ class GroupWidgetBase : public QWidget
class GroupWidget : public GroupWidgetBase
{
public:
- GroupWidget(EditorGroupItem *parentItem)
- : GroupWidgetBase(parentItem->listView()->viewport())
- , m_parentItem(parentItem)
+ GroupWidget(EditorGroupItem *tqparentItem)
+ : GroupWidgetBase(tqparentItem->listView()->viewport())
+ , m_parentItem(tqparentItem)
{
}
@@ -195,21 +195,21 @@ class GroupContainer::Private
{
public:
Private() {}
- QVBoxLayout* lyr;
+ TQVBoxLayout* lyr;
GroupWidgetBase *groupWidget;
- QGuardedPtr<QWidget> contents;
+ TQGuardedPtr<TQWidget> contents;
};
}//namespace
using namespace KoProperty;
-GroupContainer::GroupContainer(const QString& title, QWidget* parent)
-: QWidget(parent)
+GroupContainer::GroupContainer(const TQString& title, TQWidget* tqparent)
+: TQWidget(tqparent)
, d(new Private())
{
- setSizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed, 0, 1));
- d->lyr = new QVBoxLayout(this);
+ tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed, 0, 1));
+ d->lyr = new TQVBoxLayout(this);
d->groupWidget = new GroupWidgetBase(this);
d->groupWidget->setText( title );
d->lyr->addWidget(d->groupWidget);
@@ -221,7 +221,7 @@ GroupContainer::~GroupContainer()
delete d;
}
-void GroupContainer::setContents( QWidget* contents )
+void GroupContainer::setContents( TQWidget* contents )
{
if (d->contents) {
d->contents->hide();
@@ -236,26 +236,26 @@ void GroupContainer::setContents( QWidget* contents )
update();
}
-bool GroupContainer::event( QEvent * e ) {
- if (e->type()==QEvent::MouseButtonPress) {
- QMouseEvent* me = static_cast<QMouseEvent*>(e);
- if (me->button() == Qt::LeftButton && d->contents && d->groupWidget->rect().contains(me->pos())) {
+bool GroupContainer::event( TQEvent * e ) {
+ if (e->type()==TQEvent::MouseButtonPress) {
+ TQMouseEvent* me = TQT_TQMOUSEEVENT(e);
+ if (me->button() == Qt::LeftButton && d->contents && TQT_TQRECT_OBJECT(d->groupWidget->rect()).tqcontains(me->pos())) {
d->groupWidget->setOpen(!d->groupWidget->isOpen());
if (d->groupWidget->isOpen())
d->contents->show();
else
d->contents->hide();
- d->lyr->invalidate();
+ d->lyr->tqinvalidate();
update();
}
}
- return QWidget::event(e);
+ return TQWidget::event(e);
}
//////////////////////////////////////////////////////
-EditorItem::EditorItem(Editor *editor, EditorItem *parent, Property *property, QListViewItem *after)
- : KListViewItem(parent, after,
+EditorItem::EditorItem(Editor *editor, EditorItem *tqparent, Property *property, TQListViewItem *after)
+ : KListViewItem(tqparent, after,
property->captionForDisplaying().isEmpty() ? property->name() : property->captionForDisplaying())
{
d = new EditorItemPrivate();
@@ -266,7 +266,7 @@ EditorItem::EditorItem(Editor *editor, EditorItem *parent, Property *property, Q
//setHeight(static_cast<Editor*>(listView())->baseRowHeight()*3);
/*
if (property && !property->caption().isEmpty()) {
- QSimpleRichText srt(property->caption(), font());
+ TQSimpleRichText srt(property->caption(), font());
srt.setWidth(columnWidth(0)-KPROPEDITOR_ITEM_MARGIN*2-20+1);
int oldHeight = it.current()->height();
int textHeight = srt.height()+KPROPEDITOR_ITEM_MARGIN;
@@ -280,8 +280,8 @@ EditorItem::EditorItem(Editor *editor, EditorItem *parent, Property *property, Q
*/
}
-EditorItem::EditorItem(KListView *parent)
- : KListViewItem(parent)
+EditorItem::EditorItem(KListView *tqparent)
+ : KListViewItem(tqparent)
{
d = new EditorItemPrivate();
d->property = 0;
@@ -289,8 +289,8 @@ EditorItem::EditorItem(KListView *parent)
setMultiLinesEnabled(true);
}
-EditorItem::EditorItem(EditorItem *parent, const QString &text)
- : KListViewItem(parent, text)
+EditorItem::EditorItem(EditorItem *tqparent, const TQString &text)
+ : KListViewItem(tqparent, text)
{
d = new EditorItemPrivate();
d->property = 0;
@@ -298,8 +298,8 @@ EditorItem::EditorItem(EditorItem *parent, const QString &text)
setMultiLinesEnabled(true);
}
-EditorItem::EditorItem(EditorItem *parent, EditorItem *after, const QString &text)
- : KListViewItem(parent, after, text)
+EditorItem::EditorItem(EditorItem *tqparent, EditorItem *after, const TQString &text)
+ : KListViewItem(tqparent, after, text)
{
d = new EditorItemPrivate();
d->property = 0;
@@ -319,7 +319,7 @@ EditorItem::property()
}
void
-EditorItem::paintCell(QPainter *p, const QColorGroup & cg, int column, int width, int align)
+EditorItem::paintCell(TQPainter *p, const TQColorGroup & cg, int column, int width, int align)
{
//int margin = static_cast<Editor*>(listView())->itemMargin();
if(!d->property)
@@ -327,50 +327,50 @@ EditorItem::paintCell(QPainter *p, const QColorGroup & cg, int column, int width
if(column == 0)
{
- QFont font = listView()->font();
+ TQFont font = listView()->font();
if(d->property->isModified())
font.setBold(true);
p->setFont(font);
p->setBrush(cg.highlight());
p->setPen(cg.highlightedText());
KListViewItem::paintCell(p, cg, column, width, align);
- p->fillRect(parent() ? 0 : 50, 0, width, height()-1,
- QBrush(isSelected() ? cg.highlight() : backgroundColor()));
+ p->fillRect(tqparent() ? 0 : 50, 0, width, height()-1,
+ TQBrush(isSelected() ? cg.highlight() : backgroundColor()));
p->setPen(isSelected() ? cg.highlightedText() : cg.text());
int delta = -20+KPROPEDITOR_ITEM_MARGIN;
- if ((firstChild() && dynamic_cast<EditorGroupItem*>(parent()))) {
+ if ((firstChild() && dynamic_cast<EditorGroupItem*>(tqparent()))) {
delta = -KPROPEDITOR_ITEM_MARGIN-1;
}
- if (dynamic_cast<EditorDummyItem*>(parent())) {
+ if (dynamic_cast<EditorDummyItem*>(tqparent())) {
delta = KPROPEDITOR_ITEM_MARGIN*2;
}
- else if (parent() && dynamic_cast<EditorDummyItem*>(parent()->parent())) {
- if (dynamic_cast<EditorGroupItem*>(parent()))
+ else if (tqparent() && dynamic_cast<EditorDummyItem*>(tqparent()->tqparent())) {
+ if (dynamic_cast<EditorGroupItem*>(tqparent()))
delta += KPROPEDITOR_ITEM_MARGIN*2;
else
delta += KPROPEDITOR_ITEM_MARGIN*5;
}
p->drawText(
- QRect(delta,2, width+listView()->columnWidth(1)-KPROPEDITOR_ITEM_MARGIN*2, height()),
- Qt::AlignLeft | Qt::AlignTop /*| Qt::SingleLine*/, text(0));
+ TQRect(delta,2, width+listView()->columnWidth(1)-KPROPEDITOR_ITEM_MARGIN*2, height()),
+ TQt::AlignLeft | TQt::AlignTop /*| TQt::SingleLine*/, text(0));
p->setPen( KPROPEDITOR_ITEM_BORDER_COLOR );
p->drawLine(width-1, 0, width-1, height()-1);
p->drawLine(0, -1, width-1, -1);
p->setPen( KPROPEDITOR_ITEM_BORDER_COLOR ); //! \todo custom color?
- if (dynamic_cast<EditorDummyItem*>(parent()))
+ if (dynamic_cast<EditorDummyItem*>(tqparent()))
p->drawLine(0, 0, 0, height()-1 );
}
else if(column == 1)
{
- QColorGroup icg(cg);
- icg.setColor(QColorGroup::Background, backgroundColor());
+ TQColorGroup icg(cg);
+ icg.setColor(TQColorGroup::Background, backgroundColor());
p->setBackgroundColor(backgroundColor());
Widget *widget = d->editor->createWidgetForProperty(d->property, false /*don't change Widget::property() */);
if(widget) {
- QRect r(0, 0, d->editor->header()->sectionSize(1), height() - (widget->hasBorders() ? 0 : 1));
- p->setClipRect(r, QPainter::CoordPainter);
+ TQRect r(0, 0, d->editor->header()->sectionSize(1), height() - (widget->hasBorders() ? 0 : 1));
+ p->setClipRect(r, TQPainter::CoordPainter);
p->setClipping(true);
widget->drawViewer(p, icg, r, d->property->value());
p->setClipping(false);
@@ -381,17 +381,17 @@ EditorItem::paintCell(QPainter *p, const QColorGroup & cg, int column, int width
}
void
-EditorItem::paintBranches(QPainter *p, const QColorGroup &cg, int w, int y, int h)
+EditorItem::paintBranches(TQPainter *p, const TQColorGroup &cg, int w, int y, int h)
{
p->eraseRect(0,0,w,h);
KListViewItem *item = static_cast<KListViewItem*>(firstChild());
if(!item)
return;
- QColor backgroundColor;
+ TQColor backgroundColor;
p->save();
p->translate(0,y);
- QFont font = listView()->font();
+ TQFont font = listView()->font();
while(item)
{
if(item->isSelected())
@@ -402,30 +402,30 @@ EditorItem::paintBranches(QPainter *p, const QColorGroup &cg, int w, int y, int
else
backgroundColor = item->backgroundColor();
}
-// p->fillRect(-50,0,50, item->height(), QBrush(backgroundColor));
+// p->fillRect(-50,0,50, item->height(), TQBrush(backgroundColor));
p->save();
p->setPen( KPROPEDITOR_ITEM_BORDER_COLOR );
int delta = 0;
int fillWidth = w;
int x = 0;
- if (dynamic_cast<EditorGroupItem*>(item->parent())) {
+ if (dynamic_cast<EditorGroupItem*>(item->tqparent())) {
delta = 0;//-19;
fillWidth += 19;
}
else {
- if (dynamic_cast<EditorGroupItem*>(item) || /*for flat mode*/ dynamic_cast<EditorDummyItem*>(item->parent()))
+ if (dynamic_cast<EditorGroupItem*>(item) || /*for flat mode*/ dynamic_cast<EditorDummyItem*>(item->tqparent()))
x = 19;
else
x = -19;
fillWidth += 19;
}
- if (dynamic_cast<EditorDummyItem*>(item->parent())) {
+ if (dynamic_cast<EditorDummyItem*>(item->tqparent())) {
x = 19;
}
- else if (item->parent() && dynamic_cast<EditorDummyItem*>(item->parent()->parent())) {
+ else if (item->tqparent() && dynamic_cast<EditorDummyItem*>(item->tqparent()->tqparent())) {
x = 0;
}
- p->fillRect(x+1, 0, fillWidth-1, item->height()-1, QBrush(backgroundColor));
+ p->fillRect(x+1, 0, fillWidth-1, item->height()-1, TQBrush(backgroundColor));
p->drawLine(x, item->height()-1, w, item->height()-1 );
if (!dynamic_cast<EditorGroupItem*>(item))
p->drawLine(x, 0, x, item->height()-1 );
@@ -434,8 +434,8 @@ EditorItem::paintBranches(QPainter *p, const QColorGroup &cg, int w, int y, int
// for (int i=0; i<10000000; i++)
// ;
// if(item->isSelected()) {
-// p->fillRect(parent() ? 0 : 50, 0, w, item->height()-1, QBrush(cg.highlight()));
-// p->fillRect(-50,0,50, item->height(), QBrush(cg.highlight()));
+// p->fillRect(tqparent() ? 0 : 50, 0, w, item->height()-1, TQBrush(cg.highlight()));
+// p->fillRect(-50,0,50, item->height(), TQBrush(cg.highlight()));
// }
//sorry, but we need to draw text here again
@@ -443,22 +443,22 @@ EditorItem::paintBranches(QPainter *p, const QColorGroup &cg, int w, int y, int
|| (static_cast<EditorItem*>(item)->property() && static_cast<EditorItem*>(item)->property()->isModified()) );
p->setFont(font);
p->setPen(item->isSelected() ? cg.highlightedText() : cg.text());
- if (item->firstChild() && dynamic_cast<EditorGroupItem*>(item->parent())) {
+ if (item->firstChild() && dynamic_cast<EditorGroupItem*>(item->tqparent())) {
delta = 19-KPROPEDITOR_ITEM_MARGIN-1;
}
- else if (dynamic_cast<EditorDummyItem*>(item->parent())) {
+ else if (dynamic_cast<EditorDummyItem*>(item->tqparent())) {
delta = 19;
}
- if (item->parent() && dynamic_cast<EditorDummyItem*>(item->parent()->parent())) {
- if (dynamic_cast<EditorGroupItem*>(item->parent()))
+ if (item->tqparent() && dynamic_cast<EditorDummyItem*>(item->tqparent()->tqparent())) {
+ if (dynamic_cast<EditorGroupItem*>(item->tqparent()))
delta += KPROPEDITOR_ITEM_MARGIN*2;
else
delta += KPROPEDITOR_ITEM_MARGIN*5;
}
- if (!dynamic_cast<EditorDummyItem*>(item->parent()))
- p->drawText(QRect(delta+1,0, w+listView()->columnWidth(1), item->height()),
- Qt::AlignLeft | Qt::AlignVCenter /*| Qt::SingleLine*/, item->text(0));
+ if (!dynamic_cast<EditorDummyItem*>(item->tqparent()))
+ p->drawText(TQRect(delta+1,0, w+listView()->columnWidth(1), item->height()),
+ TQt::AlignLeft | TQt::AlignVCenter /*| TQt::SingleLine*/, item->text(0));
if(item->firstChild()) {
paintListViewExpander(p, listView(), item->height(),
@@ -469,7 +469,7 @@ EditorItem::paintBranches(QPainter *p, const QColorGroup &cg, int w, int y, int
EditorItem *editorItem = dynamic_cast<EditorItem*>(item);
if (editorItem && editorItem->property() && !editorItem->property()->icon().isEmpty()) {
//int margin = listView()->itemMargin();
- QPixmap pix = SmallIcon(editorItem->property()->icon());
+ TQPixmap pix = SmallIcon(editorItem->property()->icon());
if (!pix.isNull())
p->drawPixmap(-19+(19-pix.width())/2, (item->height() - pix.height()) / 2, pix);
}
@@ -481,15 +481,15 @@ EditorItem::paintBranches(QPainter *p, const QColorGroup &cg, int w, int y, int
}
void
-EditorItem::paintFocus(QPainter *, const QColorGroup &, const QRect & )
+EditorItem::paintFocus(TQPainter *, const TQColorGroup &, const TQRect & )
{
}
int
-EditorItem::compare( QListViewItem *i, int col, bool ascending ) const
+EditorItem::compare( TQListViewItem *i, int col, bool ascending ) const
{
if (!ascending)
- return -QListViewItem::key( col, ascending ).localeAwareCompare( i->key( col, ascending ) );
+ return -TQListViewItem::key( col, ascending ).localeAwareCompare( i->key( col, ascending ) );
if (d->property) {
// kopropertydbg << d->property->name() << " " << d->property->sortingKey() << " | "
@@ -512,16 +512,16 @@ EditorItem::setHeight( int height )
//////////////////////////////////////////////////////
-EditorGroupItem::EditorGroupItem(EditorItem *parent, EditorItem *after, const QString &text, const QString &icon, int sortOrder)
- : EditorItem(parent, after, text)
+EditorGroupItem::EditorGroupItem(EditorItem *tqparent, EditorItem *after, const TQString &text, const TQString &icon, int sortOrder)
+ : EditorItem(tqparent, after, text)
, m_label(0)
, m_sortOrder(sortOrder)
{
init(icon);
}
-EditorGroupItem::EditorGroupItem(EditorItem *parent, const QString &text, const QString &icon, int sortOrder)
- : EditorItem(parent, text)
+EditorGroupItem::EditorGroupItem(EditorItem *tqparent, const TQString &text, const TQString &icon, int sortOrder)
+ : EditorItem(tqparent, text)
, m_label(0)
, m_sortOrder(sortOrder)
{
@@ -533,12 +533,12 @@ EditorGroupItem::~EditorGroupItem()
delete m_label;
}
-QWidget* EditorGroupItem::label() const
+TQWidget* EditorGroupItem::label() const
{
return m_label;
}
-void EditorGroupItem::init(const QString &icon)
+void EditorGroupItem::init(const TQString &icon)
{
setOpen(true);
setSelectable(false);
@@ -550,7 +550,7 @@ void EditorGroupItem::init(const QString &icon)
}
void
-EditorGroupItem::paintCell(QPainter *p, const QColorGroup & cg, int column, int width, int /*align*/)
+EditorGroupItem::paintCell(TQPainter *p, const TQColorGroup & cg, int column, int width, int /*align*/)
{
Q_UNUSED(p);
Q_UNUSED(cg);
@@ -563,22 +563,22 @@ EditorGroupItem::paintCell(QPainter *p, const QColorGroup & cg, int column, int
// return;
/*p->setPen( KPROPEDITOR_ITEM_BORDER_COLOR ); //! \todo custom color?
- p->setClipRect(listView()->itemRect(this));
+ p->setClipRect(listView()->tqitemRect(this));
if(column == 1)
p->translate(-listView()->columnWidth(0) + 20, 0);
int totalWidth = listView()->columnWidth(0) + listView()->columnWidth(1) - 20;
- p->eraseRect(QRect(0,0, totalWidth,height()-1));
+ p->eraseRect(TQRect(0,0, totalWidth,height()-1));
p->drawLine(0, height()-1, totalWidth-1, height()-1);
- QFont font = listView()->font();
+ TQFont font = listView()->font();
font.setBold(true);
p->setFont(font);
p->setBrush(cg.highlight());
//p->setPen(cg.highlightedText());
KListViewItem::paintCell(p, cg, column, width, align);
p->setPen(cg.text());
- p->drawText(QRect(0,0, totalWidth, height()),
- Qt::AlignLeft | Qt::AlignVCenter | Qt::SingleLine, text(0));*/
+ p->drawText(TQRect(0,0, totalWidth, height()),
+ TQt::AlignLeft | TQt::AlignVCenter | TQt::SingleLine, text(0));*/
}
void
@@ -589,7 +589,7 @@ EditorGroupItem::setup()
}
int
-EditorGroupItem::compare( QListViewItem *i, int col, bool ascending ) const
+EditorGroupItem::compare( TQListViewItem *i, int col, bool ascending ) const
{
Q_UNUSED(col);
Q_UNUSED(ascending);
diff --git a/lib/koproperty/editoritem.h b/lib/koproperty/editoritem.h
index 4cc1a28e..a3993d86 100644
--- a/lib/koproperty/editoritem.h
+++ b/lib/koproperty/editoritem.h
@@ -26,10 +26,10 @@
#include <klistview.h>
#define KPROPEDITOR_ITEM_MARGIN 2
-#define KPROPEDITOR_ITEM_BORDER_COLOR QColor(200,200,200) //! \todo custom color?
+#define KPROPEDITOR_ITEM_BORDER_COLOR TQColor(200,200,200) //! \todo custom color?
-template<class U> class QAsciiDict;
-class QLabel;
+template<class U> class TQAsciiDict;
+class TQLabel;
namespace KoProperty {
@@ -47,18 +47,18 @@ class GroupWidget;
class EditorItem : public KListViewItem
{
public:
- typedef QAsciiDict<EditorItem> Dict;
+ typedef TQAsciiDict<EditorItem> Dict;
- /*! Creates an EditorItem child of \a parent, associated to \a property.
+ /*! Creates an EditorItem child of \a tqparent, associated to \a property.
It \a property has not desctiption set, its name (i.e. not i18n'ed) is reused.
*/
- EditorItem(Editor *editor, EditorItem *parent, Property *property,
- QListViewItem *after=0);
+ EditorItem(Editor *editor, EditorItem *tqparent, Property *property,
+ TQListViewItem *after=0);
//! Two helper contructors for subclass
- EditorItem(KListView *parent);
- EditorItem(EditorItem *parent, const QString &text);
- EditorItem(EditorItem *parent, EditorItem *after, const QString &text);
+ EditorItem(KListView *tqparent);
+ EditorItem(EditorItem *tqparent, const TQString &text);
+ EditorItem(EditorItem *tqparent, EditorItem *after, const TQString &text);
virtual ~EditorItem();
@@ -69,16 +69,16 @@ class EditorItem : public KListViewItem
/*! Reimplemented from KListViewItem to draw custom contents. Properties names are wriiten in bold if
modified. Also takes care of drawing borders around the cells as well as pixmaps or colors if necessary.
*/
- virtual void paintCell(QPainter *p, const QColorGroup & cg, int column, int width, int align);
+ virtual void paintCell(TQPainter *p, const TQColorGroup & cg, int column, int width, int align);
/*! Reimplemented from KListViewItem to draw custom contents. It takes care of drawing the [+] and [-]
- signs only if the item has children.
+ signs only if the item has tqchildren.
*/
- virtual void paintBranches(QPainter *p, const QColorGroup &cg, int w, int y, int h);
+ virtual void paintBranches(TQPainter *p, const TQColorGroup &cg, int w, int y, int h);
- virtual void paintFocus(QPainter * p, const QColorGroup & cg, const QRect & r);
+ virtual void paintFocus(TQPainter * p, const TQColorGroup & cg, const TQRect & r);
- virtual int compare( QListViewItem *i, int col, bool ascending ) const;
+ virtual int compare( TQListViewItem *i, int col, bool ascending ) const;
virtual void setHeight( int height );
@@ -90,22 +90,22 @@ class EditorItem : public KListViewItem
class EditorGroupItem : public EditorItem
{
public:
- EditorGroupItem(EditorItem *parent, EditorItem *after, const QString &text,
- const QString &icon, int sortOrder);
- EditorGroupItem(EditorItem *parent, const QString &text,
- const QString &icon, int sortOrder);
+ EditorGroupItem(EditorItem *tqparent, EditorItem *after, const TQString &text,
+ const TQString &icon, int sortOrder);
+ EditorGroupItem(EditorItem *tqparent, const TQString &text,
+ const TQString &icon, int sortOrder);
virtual ~EditorGroupItem();
-// void setLabel(QLabel *label) { m_label = label; }
- QWidget* label() const;
+// void setLabel(TQLabel *label) { m_label = label; }
+ TQWidget* label() const;
protected:
- virtual void init(const QString &icon);
+ virtual void init(const TQString &icon);
/*! Reimplemented from KListViewItem to draw custom contents. */
- virtual void paintCell(QPainter *p, const QColorGroup & cg, int column, int width, int align);
+ virtual void paintCell(TQPainter *p, const TQColorGroup & cg, int column, int width, int align);
virtual void setup();
- virtual int compare( QListViewItem *i, int col, bool ascending ) const;
+ virtual int compare( TQListViewItem *i, int col, bool ascending ) const;
GroupWidget *m_label;
int m_sortOrder;
@@ -115,13 +115,13 @@ class EditorGroupItem : public EditorItem
class EditorDummyItem : public EditorItem
{
public:
- EditorDummyItem(KListView *parent);
+ EditorDummyItem(KListView *tqparent);
virtual ~EditorDummyItem();
protected:
virtual void setup();
- /*virtual void paintCell(QPainter *p, const QColorGroup & cg, int column, int width, int align);
- virtual void paintFocus(QPainter * p, const QColorGroup & cg, const QRect & r);*/
+ /*virtual void paintCell(TQPainter *p, const TQColorGroup & cg, int column, int width, int align);
+ virtual void paintFocus(TQPainter * p, const TQColorGroup & cg, const TQRect & r);*/
};
}
diff --git a/lib/koproperty/editors/booledit.cpp b/lib/koproperty/editors/booledit.cpp
index 67fb82ec..5c347c02 100644
--- a/lib/koproperty/editors/booledit.cpp
+++ b/lib/koproperty/editors/booledit.cpp
@@ -27,48 +27,48 @@
#include <kcombobox.h>
#include <kdebug.h>
-#include <qtoolbutton.h>
-#include <qpainter.h>
-#include <qvariant.h>
-#include <qlayout.h>
-#include <qbitmap.h>
+#include <tqtoolbutton.h>
+#include <tqpainter.h>
+#include <tqvariant.h>
+#include <tqlayout.h>
+#include <tqbitmap.h>
using namespace KoProperty;
-BoolEdit::BoolEdit(Property *property, QWidget *parent, const char *name)
- : Widget(property, parent, name)
+BoolEdit::BoolEdit(Property *property, TQWidget *tqparent, const char *name)
+ : Widget(property, tqparent, name)
, m_yesIcon( SmallIcon("button_ok") )
, m_noIcon( SmallIcon("button_no") )
{
- m_toggle = new QToolButton(this);
+ m_toggle = new TQToolButton(this);
m_toggle->setToggleButton( true );
- m_toggle->setFocusPolicy(QWidget::WheelFocus);
+ m_toggle->setFocusPolicy(TQ_WheelFocus);
m_toggle->setUsesTextLabel(true);
- m_toggle->setTextPosition(QToolButton::Right);
- m_toggle->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
- //we're not using layout to because of problems with button size
+ m_toggle->setTextPosition(TQToolButton::Right);
+ m_toggle->tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed);
+ //we're not using tqlayout to because of problems with button size
m_toggle->move(0, 0);
m_toggle->resize(width(), height());
setFocusWidget(m_toggle);
- connect(m_toggle, SIGNAL(stateChanged(int)), this, SLOT(slotValueChanged(int)));
+ connect(m_toggle, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(slotValueChanged(int)));
}
BoolEdit::~BoolEdit()
{
}
-QVariant
+TQVariant
BoolEdit::value() const
{
- return QVariant(m_toggle->isOn(), 4);
+ return TQVariant(m_toggle->isOn(), 4);
}
void
-BoolEdit::setValue(const QVariant &value, bool emitChange)
+BoolEdit::setValue(const TQVariant &value, bool emitChange)
{
m_toggle->blockSignals(true);
m_toggle->setOn(value.toBool());
- setState( value.toBool() ? QButton::On : QButton::Off );
+ setState( value.toBool() ? TQButton::On : TQButton::Off );
m_toggle->blockSignals(false);
if (emitChange)
emit valueChanged(this);
@@ -81,28 +81,28 @@ BoolEdit::slotValueChanged(int state)
emit valueChanged(this);
}
-static void drawViewerInternal(QPainter *p, const QRect &r, const QVariant &value,
- const QPixmap& yesIcon, const QPixmap& noIcon, const QString& nullText)
+static void drawViewerInternal(TQPainter *p, const TQRect &r, const TQVariant &value,
+ const TQPixmap& yesIcon, const TQPixmap& noIcon, const TQString& nullText)
{
p->eraseRect(r);
- QRect r2(r);
+ TQRect r2(r);
r2.moveLeft(KIcon::SizeSmall + 6);
if(value.isNull() && !nullText.isEmpty()) {
- p->drawText(r2, Qt::AlignVCenter | Qt::AlignLeft, nullText);
+ p->drawText(r2, TQt::AlignVCenter | TQt::AlignLeft, nullText);
}
else if(value.toBool()) {
p->drawPixmap(3, (r.height()-1-KIcon::SizeSmall)/2, yesIcon);
- p->drawText(r2, Qt::AlignVCenter | Qt::AlignLeft, i18n("Yes"));
+ p->drawText(r2, TQt::AlignVCenter | TQt::AlignLeft, i18n("Yes"));
}
else {
p->drawPixmap(3, (r.height()-1-KIcon::SizeSmall)/2, noIcon);
- p->drawText(r2, Qt::AlignVCenter | Qt::AlignLeft, i18n("No"));
+ p->drawText(r2, TQt::AlignVCenter | TQt::AlignLeft, i18n("No"));
}
}
void
-BoolEdit::drawViewer(QPainter *p, const QColorGroup &cg, const QRect &r, const QVariant &value)
+BoolEdit::drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value)
{
Q_UNUSED(cg);
drawViewerInternal(p, r, value, m_yesIcon, m_noIcon, "");
@@ -111,29 +111,29 @@ BoolEdit::drawViewer(QPainter *p, const QColorGroup &cg, const QRect &r, const Q
void
BoolEdit::setState(int state)
{
- if(QButton::On == state) {
- m_toggle->setIconSet(QIconSet(m_yesIcon));
+ if(TQButton::On == state) {
+ m_toggle->setIconSet(TQIconSet(m_yesIcon));
m_toggle->setTextLabel(i18n("Yes"));
}
- else if (QButton::Off == state) {
- m_toggle->setIconSet(QIconSet(m_noIcon));
+ else if (TQButton::Off == state) {
+ m_toggle->setIconSet(TQIconSet(m_noIcon));
m_toggle->setTextLabel(i18n("No"));
}
}
void
-BoolEdit::resizeEvent(QResizeEvent *ev)
+BoolEdit::resizeEvent(TQResizeEvent *ev)
{
m_toggle->resize(ev->size());
}
bool
-BoolEdit::eventFilter(QObject* watched, QEvent* e)
+BoolEdit::eventFilter(TQObject* watched, TQEvent* e)
{
- if(e->type() == QEvent::KeyPress) {
- QKeyEvent* ev = static_cast<QKeyEvent*>(e);
+ if(e->type() == TQEvent::KeyPress) {
+ TQKeyEvent* ev = TQT_TQKEYEVENT(e);
const int k = ev->key();
- if(k == Qt::Key_Space || k == Qt::Key_Enter || k == Qt::Key_Return) {
+ if(k == TQt::Key_Space || k == TQt::Key_Enter || k == TQt::Key_Return) {
if (m_toggle)
m_toggle->toggle();
return true;
@@ -150,16 +150,16 @@ BoolEdit::setReadOnlyInternal(bool readOnly)
//--------------------------------------------------
-ThreeStateBoolEdit::ThreeStateBoolEdit(Property *property, QWidget *parent, const char *name)
- : ComboBox(property, parent, name)
+ThreeStateBoolEdit::ThreeStateBoolEdit(Property *property, TQWidget *tqparent, const char *name)
+ : ComboBox(property, tqparent, name)
, m_yesIcon( SmallIcon("button_ok") )
, m_noIcon( SmallIcon("button_no") )
{
m_edit->insertItem( m_yesIcon, i18n("Yes") );
m_edit->insertItem( m_noIcon, i18n("No") );
- QVariant thirdState = property ? property->option("3rdState") : QVariant();
- QPixmap nullIcon( m_yesIcon.size() ); //transparent pixmap of appropriate size
- nullIcon.setMask(QBitmap(m_yesIcon.size(), true));
+ TQVariant thirdState = property ? property->option("3rdState") : TQVariant();
+ TQPixmap nullIcon( m_yesIcon.size() ); //transparent pixmap of appropriate size
+ nullIcon.setMask(TQBitmap(m_yesIcon.size(), true));
m_edit->insertItem( nullIcon, thirdState.toString().isEmpty() ? i18n("None") : thirdState.toString() );
}
@@ -167,15 +167,15 @@ ThreeStateBoolEdit::~ThreeStateBoolEdit()
{
}
-QVariant
+TQVariant
ThreeStateBoolEdit::value() const
{
// list items: true, false, NULL
const int idx = m_edit->currentItem();
if (idx==0)
- return QVariant(true, 1);
+ return TQVariant(true, 1);
else
- return idx==1 ? QVariant(false) : QVariant();
+ return idx==1 ? TQVariant(false) : TQVariant();
}
void
@@ -189,7 +189,7 @@ ThreeStateBoolEdit::setProperty(Property *prop)
}
void
-ThreeStateBoolEdit::setValue(const QVariant &value, bool emitChange)
+ThreeStateBoolEdit::setValue(const TQVariant &value, bool emitChange)
{
if (!m_setValueEnabled)
return;
@@ -204,7 +204,7 @@ ThreeStateBoolEdit::setValue(const QVariant &value, bool emitChange)
}
void
-ThreeStateBoolEdit::drawViewer(QPainter *p, const QColorGroup &cg, const QRect &r, const QVariant &value)
+ThreeStateBoolEdit::drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value)
{
Q_UNUSED(cg);
drawViewerInternal(p, r, value, m_yesIcon, m_noIcon, m_edit->text(2));
diff --git a/lib/koproperty/editors/booledit.h b/lib/koproperty/editors/booledit.h
index f9ab371f..0cfbf48e 100644
--- a/lib/koproperty/editors/booledit.h
+++ b/lib/koproperty/editors/booledit.h
@@ -24,23 +24,24 @@
#include "../widget.h"
#include "combobox.h"
-#include <qpixmap.h>
+#include <tqpixmap.h>
-class QToolButton;
+class TQToolButton;
namespace KoProperty {
class KOPROPERTY_EXPORT BoolEdit : public Widget
{
Q_OBJECT
+ TQ_OBJECT
public:
- BoolEdit(Property *property, QWidget *parent=0, const char *name=0);
+ BoolEdit(Property *property, TQWidget *tqparent=0, const char *name=0);
virtual ~BoolEdit();
- virtual QVariant value() const;
- virtual void setValue(const QVariant &value, bool emitChange=true);
- virtual void drawViewer(QPainter *p, const QColorGroup &cg, const QRect &r, const QVariant &value);
+ virtual TQVariant value() const;
+ virtual void setValue(const TQVariant &value, bool emitChange=true);
+ virtual void drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value);
protected slots:
void slotValueChanged(int state);
@@ -48,28 +49,29 @@ class KOPROPERTY_EXPORT BoolEdit : public Widget
protected:
virtual void setReadOnlyInternal(bool readOnly);
void setState(int state);
- virtual void resizeEvent(QResizeEvent *ev);
- virtual bool eventFilter(QObject* watched, QEvent* e);
+ virtual void resizeEvent(TQResizeEvent *ev);
+ virtual bool eventFilter(TQObject* watched, TQEvent* e);
private:
- QToolButton *m_toggle;
- QPixmap m_yesIcon, m_noIcon; //!< icons for m_toggle
+ TQToolButton *m_toggle;
+ TQPixmap m_yesIcon, m_noIcon; //!< icons for m_toggle
};
class KOPROPERTY_EXPORT ThreeStateBoolEdit : public ComboBox
{
Q_OBJECT
+ TQ_OBJECT
public:
- ThreeStateBoolEdit(Property *property, QWidget *parent=0, const char *name=0);
+ ThreeStateBoolEdit(Property *property, TQWidget *tqparent=0, const char *name=0);
virtual ~ThreeStateBoolEdit();
- virtual QVariant value() const;
- virtual void setValue(const QVariant &value, bool emitChange=true);
+ virtual TQVariant value() const;
+ virtual void setValue(const TQVariant &value, bool emitChange=true);
virtual void setProperty(Property *property);
- virtual void drawViewer(QPainter *p, const QColorGroup &cg, const QRect &r, const QVariant &value);
- QPixmap m_yesIcon, m_noIcon; //!< icons for m_toggle
+ virtual void drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value);
+ TQPixmap m_yesIcon, m_noIcon; //!< icons for m_toggle
};
}
diff --git a/lib/koproperty/editors/coloredit.cpp b/lib/koproperty/editors/coloredit.cpp
index 81897e1d..d8504686 100644
--- a/lib/koproperty/editors/coloredit.cpp
+++ b/lib/koproperty/editors/coloredit.cpp
@@ -20,23 +20,23 @@
#include "coloredit.h"
-#include <qvariant.h>
-#include <qlayout.h>
-#include <qcolor.h>
-#include <qpainter.h>
+#include <tqvariant.h>
+#include <tqlayout.h>
+#include <tqcolor.h>
+#include <tqpainter.h>
#include <kcolorcombo.h>
using namespace KoProperty;
-ColorButton::ColorButton(Property *property, QWidget *parent, const char *name)
- : Widget(property, parent, name)
+ColorButton::ColorButton(Property *property, TQWidget *tqparent, const char *name)
+ : Widget(property, tqparent, name)
{
- QHBoxLayout *l = new QHBoxLayout(this, 0, 0);
+ TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0);
m_edit = new KColorCombo(this);
- m_edit->setFocusPolicy(QWidget::NoFocus);
- connect(m_edit, SIGNAL(activated(int)), this, SLOT(slotValueChanged(int)));
- m_edit->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+ m_edit->setFocusPolicy(TQ_NoFocus);
+ connect(m_edit, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotValueChanged(int)));
+ m_edit->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding);
m_edit->setMinimumHeight(5);
l->addWidget(m_edit);
setFocusWidget(m_edit);
@@ -45,14 +45,14 @@ ColorButton::ColorButton(Property *property, QWidget *parent, const char *name)
ColorButton::~ColorButton()
{}
-QVariant
+TQVariant
ColorButton::value() const
{
return m_edit->color();
}
void
-ColorButton::setValue(const QVariant &value, bool emitChange)
+ColorButton::setValue(const TQVariant &value, bool emitChange)
{
m_edit->blockSignals(true);
m_edit->setColor(value.toColor());
@@ -62,15 +62,15 @@ ColorButton::setValue(const QVariant &value, bool emitChange)
}
void
-ColorButton::drawViewer(QPainter *p, const QColorGroup &, const QRect &r, const QVariant &value)
+ColorButton::drawViewer(TQPainter *p, const TQColorGroup &, const TQRect &r, const TQVariant &value)
{
p->eraseRect(r);
p->setBrush(value.toColor());
- p->setPen(Qt::SolidLine);
- QRect r2(r);
- r2.setTopLeft(r.topLeft() + QPoint(5,5));
- r2.setBottomRight(r.bottomRight() - QPoint(5,5));
+ p->setPen(TQt::SolidLine);
+ TQRect r2(r);
+ r2.setTopLeft(r.topLeft() + TQPoint(5,5));
+ r2.setBottomRight(r.bottomRight() - TQPoint(5,5));
p->drawRect(r2);
}
@@ -82,7 +82,7 @@ ColorButton::slotValueChanged(int)
bool
-ColorButton::eventFilter(QObject* watched, QEvent* e)
+ColorButton::eventFilter(TQObject* watched, TQEvent* e)
{
return Widget::eventFilter(watched, e);
}
diff --git a/lib/koproperty/editors/coloredit.h b/lib/koproperty/editors/coloredit.h
index 339d6239..d869dc00 100644
--- a/lib/koproperty/editors/coloredit.h
+++ b/lib/koproperty/editors/coloredit.h
@@ -30,19 +30,20 @@ namespace KoProperty {
class KOPROPERTY_EXPORT ColorButton : public Widget
{
Q_OBJECT
+ TQ_OBJECT
public:
- ColorButton(Property *property, QWidget *parent=0, const char *name=0);
+ ColorButton(Property *property, TQWidget *tqparent=0, const char *name=0);
virtual ~ColorButton();
- virtual QVariant value() const;
- virtual void setValue(const QVariant &value, bool emitChange=true);
+ virtual TQVariant value() const;
+ virtual void setValue(const TQVariant &value, bool emitChange=true);
- virtual void drawViewer(QPainter *p, const QColorGroup &cg, const QRect &r, const QVariant &value);
+ virtual void drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value);
protected:
virtual void setReadOnlyInternal(bool readOnly);
- virtual bool eventFilter(QObject* watched, QEvent* e);
+ virtual bool eventFilter(TQObject* watched, TQEvent* e);
protected slots:
void slotValueChanged(int index);
diff --git a/lib/koproperty/editors/combobox.cpp b/lib/koproperty/editors/combobox.cpp
index 64563dcb..f1206f2d 100644
--- a/lib/koproperty/editors/combobox.cpp
+++ b/lib/koproperty/editors/combobox.cpp
@@ -19,10 +19,10 @@
*/
#include "combobox.h"
-#include <qlayout.h>
-#include <qmap.h>
-#include <qvariant.h>
-#include <qpainter.h>
+#include <tqlayout.h>
+#include <tqmap.h>
+#include <tqvariant.h>
+#include <tqpainter.h>
#include <kcombobox.h>
#include <kdebug.h>
@@ -31,18 +31,18 @@
using namespace KoProperty;
-ComboBox::ComboBox(Property *property, QWidget *parent, const char *name)
- : Widget(property, parent, name)
+ComboBox::ComboBox(Property *property, TQWidget *tqparent, const char *name)
+ : Widget(property, tqparent, name)
, m_setValueEnabled(true)
{
- QHBoxLayout *l = new QHBoxLayout(this, 0, 0);
+ TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0);
m_edit = new KComboBox(this);
- m_edit->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+ m_edit->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding);
m_edit->setMinimumHeight(5);
l->addWidget(m_edit);
m_edit->setEditable(false);
- m_edit->setInsertionPolicy(QComboBox::NoInsertion);
+ m_edit->setInsertionPolicy(TQComboBox::NoInsertion);
m_edit->setMinimumSize(10, 0); // to allow the combo to be resized to a small size
m_edit->setAutoCompletion(true);
m_edit->setContextMenuEnabled(false);
@@ -53,31 +53,31 @@ ComboBox::ComboBox(Property *property, QWidget *parent, const char *name)
//not needed for combo setLeavesTheSpaceForRevertButton(true);
setFocusWidget(m_edit);
- connect(m_edit, SIGNAL(activated(int)), this, SLOT(slotValueChanged(int)));
+ connect(m_edit, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotValueChanged(int)));
}
ComboBox::~ComboBox()
{
}
-QVariant
+TQVariant
ComboBox::value() const
{
if (!property()->listData()) {
kopropertywarn << "ComboBox::value(): propery listData not available!" << endl;
- return QVariant();
+ return TQVariant();
}
const int idx = m_edit->currentItem();
if (idx<0 || idx>=(int)property()->listData()->keys.count())
- return QVariant();
- return QVariant( property()->listData()->keys[idx] );
-// if(property()->listData() && property()->listData()->contains(m_edit->currentText()))
+ return TQVariant();
+ return TQVariant( property()->listData()->keys[idx] );
+// if(property()->listData() && property()->listData()->tqcontains(m_edit->currentText()))
// return (*(property()->valueList()))[m_edit->currentText()];
-// return QVariant();
+// return TQVariant();
}
void
-ComboBox::setValue(const QVariant &value, bool emitChange)
+ComboBox::setValue(const TQVariant &value, bool emitChange)
{
if (!property() || !property()->listData()) {
kopropertywarn << "ComboBox::value(): propery listData not available!" << endl;
@@ -85,7 +85,7 @@ ComboBox::setValue(const QVariant &value, bool emitChange)
}
if (!m_setValueEnabled)
return;
- int idx = property()->listData()->keys.findIndex( value );
+ int idx = property()->listData()->keys.tqfindIndex( value );
if (idx>=0 && idx<m_edit->count()) {
m_edit->setCurrentItem(idx);
}
@@ -94,7 +94,7 @@ ComboBox::setValue(const QVariant &value, bool emitChange)
kopropertywarn << "ComboBox::setValue(): NO SUCH KEY '" << value.toString()
<< "' (property '" << property()->name() << "')" << endl;
} else {
- QStringList list;
+ TQStringList list;
for (int i=0; i<m_edit->count(); i++)
list += m_edit->text(i);
kopropertywarn << "ComboBox::setValue(): NO SUCH INDEX WITHIN COMBOBOX: " << idx
@@ -102,7 +102,7 @@ ComboBox::setValue(const QVariant &value, bool emitChange)
<< "' (property '" << property()->name() << "')\nActual combobox contents: "
<< list << endl;
}
- m_edit->setCurrentText(QString::null);
+ m_edit->setCurrentText(TQString());
}
if(value.isNull())
@@ -116,18 +116,18 @@ ComboBox::setValue(const QVariant &value, bool emitChange)
}
void
-ComboBox::drawViewer(QPainter *p, const QColorGroup &cg, const QRect &r, const QVariant &value)
+ComboBox::drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value)
{
- QString txt;
+ TQString txt;
if (property()->listData()) {
- const int idx = property()->listData()->keys.findIndex( value );
+ const int idx = property()->listData()->keys.tqfindIndex( value );
if (idx>=0)
txt = property()->listData()->names[ idx ];
}
Widget::drawViewer(p, cg, r, txt); //keyForValue(value));
// p->eraseRect(r);
-// p->drawText(r, Qt::AlignLeft | Qt::AlignVCenter | Qt::SingleLine, keyForValue(value));
+// p->drawText(r, TQt::AlignLeft | TQt::AlignVCenter | TQt::SingleLine, keyForValue(value));
}
void
@@ -175,23 +175,23 @@ ComboBox::setReadOnlyInternal(bool readOnly)
}
-/*QString
-ComboBox::keyForValue(const QVariant &value)
+/*TQString
+ComboBox::keyForValue(const TQVariant &value)
{
- const QMap<QString, QVariant> *list = property()->valueList();
+ const TQMap<TQString, TQVariant> *list = property()->valueList();
Property::ListData *list = property()->listData();
if (!list)
- return QString::null;
+ return TQString();
int idx = listData->keys.findIndex( value );
- QMap<QString, QVariant>::ConstIterator endIt = list->constEnd();
- for(QMap<QString, QVariant>::ConstIterator it = list->constBegin(); it != endIt; ++it) {
+ TQMap<TQString, TQVariant>::ConstIterator endIt = list->constEnd();
+ for(TQMap<TQString, TQVariant>::ConstIterator it = list->constBegin(); it != endIt; ++it) {
if(it.data() == value)
return it.key();
}
- return QString::null;
+ return TQString();
}*/
diff --git a/lib/koproperty/editors/combobox.h b/lib/koproperty/editors/combobox.h
index 5d1f56f9..dda5d067 100644
--- a/lib/koproperty/editors/combobox.h
+++ b/lib/koproperty/editors/combobox.h
@@ -30,23 +30,24 @@ namespace KoProperty {
class KOPROPERTY_EXPORT ComboBox : public Widget
{
Q_OBJECT
+ TQ_OBJECT
public:
- ComboBox(Property *property, QWidget *parent=0, const char *name=0);
+ ComboBox(Property *property, TQWidget *tqparent=0, const char *name=0);
virtual ~ComboBox();
- virtual QVariant value() const;
- virtual void setValue(const QVariant &value, bool emitChange=true);
+ virtual TQVariant value() const;
+ virtual void setValue(const TQVariant &value, bool emitChange=true);
virtual void setProperty(Property *property);
- virtual void drawViewer(QPainter *p, const QColorGroup &cg, const QRect &r, const QVariant &value);
+ virtual void drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value);
protected slots:
void slotValueChanged(int value);
protected:
virtual void setReadOnlyInternal(bool readOnly);
- QString keyForValue(const QVariant &value);
+ TQString keyForValue(const TQVariant &value);
void fillBox();
KComboBox *m_edit;
diff --git a/lib/koproperty/editors/cursoredit.cpp b/lib/koproperty/editors/cursoredit.cpp
index a0b3227c..efcc0e44 100644
--- a/lib/koproperty/editors/cursoredit.cpp
+++ b/lib/koproperty/editors/cursoredit.cpp
@@ -20,9 +20,9 @@
#include "cursoredit.h"
-#include <qmap.h>
-#include <qvariant.h>
-#include <qcursor.h>
+#include <tqmap.h>
+#include <tqvariant.h>
+#include <tqcursor.h>
#include <klocale.h>
#include <kdebug.h>
@@ -31,68 +31,68 @@
using namespace KoProperty;
-//QMap<QString, QVariant> *CursorEdit::m_spValues = 0;
+//TQMap<TQString, TQVariant> *CursorEdit::m_spValues = 0;
Property::ListData *m_cursorListData = 0;
-CursorEdit::CursorEdit(Property *property, QWidget *parent, const char *name)
-: ComboBox(property, parent, name)
+CursorEdit::CursorEdit(Property *property, TQWidget *tqparent, const char *name)
+: ComboBox(property, tqparent, name)
{
/*
if(!m_spValues) {
- m_spValues = new QMap<QString, QVariant>();
- (*m_spValues)[i18n("Arrow")] = Qt::ArrowCursor;
- (*m_spValues)[i18n("Up Arrow")] = Qt::UpArrowCursor;
- (*m_spValues)[i18n("Cross")] = Qt::CrossCursor;
- (*m_spValues)[i18n("Waiting")] = Qt::WaitCursor;
- (*m_spValues)[i18n("iBeam")] = Qt::IbeamCursor;
- (*m_spValues)[i18n("Size Vertical")] = Qt::SizeVerCursor;
- (*m_spValues)[i18n("Size Horizontal")] = Qt::SizeHorCursor;
- (*m_spValues)[i18n("Size Slash")] = Qt::SizeBDiagCursor;
- (*m_spValues)[i18n("Size Backslash")] = Qt::SizeFDiagCursor;
- (*m_spValues)[i18n("Size All")] = Qt::SizeAllCursor;
- (*m_spValues)[i18n("Blank")] = Qt::BlankCursor;
- (*m_spValues)[i18n("Split Vertical")] = Qt::SplitVCursor;
- (*m_spValues)[i18n("Split Horizontal")] = Qt::SplitHCursor;
- (*m_spValues)[i18n("Pointing Hand")] = Qt::PointingHandCursor;
- (*m_spValues)[i18n("Forbidden")] = Qt::ForbiddenCursor;
- (*m_spValues)[i18n("What's this")] = Qt::WhatsThisCursor;
+ m_spValues = new TQMap<TQString, TQVariant>();
+ (*m_spValues)[i18n("Arrow")] = TQt::ArrowCursor;
+ (*m_spValues)[i18n("Up Arrow")] = TQt::UpArrowCursor;
+ (*m_spValues)[i18n("Cross")] = TQt::CrossCursor;
+ (*m_spValues)[i18n("Waiting")] = TQt::WaitCursor;
+ (*m_spValues)[i18n("iBeam")] = TQt::IbeamCursor;
+ (*m_spValues)[i18n("SizeQt::Vertical")] = TQt::SizeVerCursor;
+ (*m_spValues)[i18n("SizeQt::Horizontal")] = TQt::SizeHorCursor;
+ (*m_spValues)[i18n("Size Slash")] = TQt::SizeBDiagCursor;
+ (*m_spValues)[i18n("Size Backslash")] = TQt::SizeFDiagCursor;
+ (*m_spValues)[i18n("Size All")] = TQt::SizeAllCursor;
+ (*m_spValues)[i18n("Blank")] = TQt::BlankCursor;
+ (*m_spValues)[i18n("SplitQt::Vertical")] = TQt::SplitVCursor;
+ (*m_spValues)[i18n("SplitQt::Horizontal")] = TQt::SplitHCursor;
+ (*m_spValues)[i18n("Pointing Hand")] = TQt::PointingHandCursor;
+ (*m_spValues)[i18n("Forbidden")] = TQt::ForbiddenCursor;
+ (*m_spValues)[i18n("What's this")] = TQt::WhatsThisCursor;
}*/
//! @todo NOT THREAD-SAFE
if (!m_cursorListData) {
- QValueList<QVariant> keys;
+ TQValueList<TQVariant> keys;
keys
- << Qt::BlankCursor
- << Qt::ArrowCursor
- << Qt::UpArrowCursor
- << Qt::CrossCursor
- << Qt::WaitCursor
- << Qt::IbeamCursor
- << Qt::SizeVerCursor
- << Qt::SizeHorCursor
- << Qt::SizeBDiagCursor
- << Qt::SizeFDiagCursor
- << Qt::SizeAllCursor
- << Qt::SplitVCursor
- << Qt::SplitHCursor
- << Qt::PointingHandCursor
- << Qt::ForbiddenCursor
- << Qt::WhatsThisCursor;
- QStringList strings;
+ << TQt::BlankCursor
+ << TQt::ArrowCursor
+ << TQt::UpArrowCursor
+ << TQt::CrossCursor
+ << TQt::WaitCursor
+ << TQt::IbeamCursor
+ << TQt::SizeVerCursor
+ << TQt::SizeHorCursor
+ << TQt::SizeBDiagCursor
+ << TQt::SizeFDiagCursor
+ << TQt::SizeAllCursor
+ << TQt::SplitVCursor
+ << TQt::SplitHCursor
+ << TQt::PointingHandCursor
+ << TQt::ForbiddenCursor
+ << TQt::WhatsThisCursor;
+ TQStringList strings;
strings << i18n("Mouse Cursor Shape", "No Cursor")
<< i18n("Mouse Cursor Shape", "Arrow")
<< i18n("Mouse Cursor Shape", "Up Arrow")
<< i18n("Mouse Cursor Shape", "Cross")
<< i18n("Mouse Cursor Shape", "Waiting")
<< i18n("Mouse Cursor Shape", "I")
- << i18n("Mouse Cursor Shape", "Size Vertical")
- << i18n("Mouse Cursor Shape", "Size Horizontal")
+ << i18n("Mouse Cursor Shape", "SizeQt::Vertical")
+ << i18n("Mouse Cursor Shape", "SizeQt::Horizontal")
<< i18n("Mouse Cursor Shape", "Size Slash")
<< i18n("Mouse Cursor Shape", "Size Backslash")
<< i18n("Mouse Cursor Shape", "Size All")
- << i18n("Mouse Cursor Shape", "Split Vertical")
- << i18n("Mouse Cursor Shape", "Split Horizontal")
+ << i18n("Mouse Cursor Shape", "SplitQt::Vertical")
+ << i18n("Mouse Cursor Shape", "SplitQt::Horizontal")
<< i18n("Mouse Cursor Shape", "Pointing Hand")
<< i18n("Mouse Cursor Shape", "Forbidden")
<< i18n("Mouse Cursor Shape", "What's This?");
@@ -109,22 +109,22 @@ CursorEdit::~CursorEdit()
m_cursorListData = 0;
}
-QVariant
+TQVariant
CursorEdit::value() const
{
- return QCursor(ComboBox::value().toInt());
+ return TQCursor(ComboBox::value().toInt());
}
void
-CursorEdit::setValue(const QVariant &value, bool emitChange)
+CursorEdit::setValue(const TQVariant &value, bool emitChange)
{
- ComboBox::setValue(value.toCursor().shape(), emitChange);
+ ComboBox::setValue(value.toCursor().tqshape(), emitChange);
}
void
-CursorEdit::drawViewer(QPainter *p, const QColorGroup &cg, const QRect &r, const QVariant &value)
+CursorEdit::drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value)
{
- ComboBox::drawViewer(p, cg, r, value.toCursor().shape());
+ ComboBox::drawViewer(p, cg, r, value.toCursor().tqshape());
}
void
diff --git a/lib/koproperty/editors/cursoredit.h b/lib/koproperty/editors/cursoredit.h
index 81587cc4..850653df 100644
--- a/lib/koproperty/editors/cursoredit.h
+++ b/lib/koproperty/editors/cursoredit.h
@@ -23,26 +23,27 @@
#include "combobox.h"
-template<class U, class T> class QMap;
+template<class U, class T> class TQMap;
namespace KoProperty {
class KOPROPERTY_EXPORT CursorEdit : public ComboBox
{
Q_OBJECT
+ TQ_OBJECT
public:
- CursorEdit(Property *property, QWidget *parent=0, const char *name=0);
+ CursorEdit(Property *property, TQWidget *tqparent=0, const char *name=0);
virtual ~CursorEdit();
- virtual QVariant value() const;
- virtual void setValue(const QVariant &value, bool emitChange=true);
+ virtual TQVariant value() const;
+ virtual void setValue(const TQVariant &value, bool emitChange=true);
virtual void setProperty(Property *property);
- virtual void drawViewer(QPainter *p, const QColorGroup &cg, const QRect &r, const QVariant &value);
+ virtual void drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value);
private:
- static QMap<QString, QVariant> *m_spValues;
+ static TQMap<TQString, TQVariant> *m_spValues;
};
}
diff --git a/lib/koproperty/editors/dateedit.cpp b/lib/koproperty/editors/dateedit.cpp
index 797c0e5c..b72fd7ce 100644
--- a/lib/koproperty/editors/dateedit.cpp
+++ b/lib/koproperty/editors/dateedit.cpp
@@ -20,44 +20,44 @@
#include "dateedit.h"
-#include <qdatetimeedit.h>
-#include <qrangecontrol.h>
-#include <qobjectlist.h>
-#include <qlayout.h>
-#include <qvariant.h>
-#include <qpainter.h>
+#include <tqdatetimeedit.h>
+#include <tqrangecontrol.h>
+#include <tqobjectlist.h>
+#include <tqlayout.h>
+#include <tqvariant.h>
+#include <tqpainter.h>
#include <klocale.h>
#include <kglobal.h>
using namespace KoProperty;
-DateEdit::DateEdit(Property *property, QWidget *parent, const char *name)
- : Widget(property, parent, name)
+DateEdit::DateEdit(Property *property, TQWidget *tqparent, const char *name)
+ : Widget(property, tqparent, name)
{
- QHBoxLayout *l = new QHBoxLayout(this, 0, 0);
- m_edit = new QDateEdit(this);
- m_edit->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+ TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0);
+ m_edit = new TQDateEdit(this);
+ m_edit->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding);
m_edit->setMinimumHeight(5);
l->addWidget(m_edit);
setLeavesTheSpaceForRevertButton(true);
setFocusWidget(m_edit);
- connect(m_edit, SIGNAL(valueChanged(const QDate&)), this, SLOT(slotValueChanged(const QDate&)));
+ connect(m_edit, TQT_SIGNAL(valueChanged(const TQDate&)), this, TQT_SLOT(slotValueChanged(const TQDate&)));
}
DateEdit::~DateEdit()
{}
-QVariant
+TQVariant
DateEdit::value() const
{
return m_edit->date();
}
void
-DateEdit::setValue(const QVariant &value, bool emitChange)
+DateEdit::setValue(const TQVariant &value, bool emitChange)
{
m_edit->blockSignals(true);
m_edit->setDate(value.toDate());
@@ -67,15 +67,15 @@ DateEdit::setValue(const QVariant &value, bool emitChange)
}
void
-DateEdit::drawViewer(QPainter *p, const QColorGroup &cg, const QRect &r, const QVariant &value)
+DateEdit::drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value)
{
p->eraseRect(r);
Widget::drawViewer(p, cg, r, KGlobal::locale()->formatDate(value.toDate(), true /* use short format*/ ));
-// p->drawText(r, Qt::AlignLeft | Qt::AlignVCenter | Qt::SingleLine, KGlobal::locale()->formatDate(value.toDate(), true /* use short format*/ ));
+// p->drawText(r, TQt::AlignLeft | TQt::AlignVCenter | TQt::SingleLine, KGlobal::locale()->formatDate(value.toDate(), true /* use short format*/ ));
}
void
-DateEdit::slotValueChanged(const QDate&)
+DateEdit::slotValueChanged(const TQDate&)
{
emit valueChanged(this);
}
diff --git a/lib/koproperty/editors/dateedit.h b/lib/koproperty/editors/dateedit.h
index 509ae572..f36e7b65 100644
--- a/lib/koproperty/editors/dateedit.h
+++ b/lib/koproperty/editors/dateedit.h
@@ -23,32 +23,33 @@
#include "../widget.h"
-class QDateEdit;
-class QDate;
+class TQDateEdit;
+class TQDate;
namespace KoProperty {
class KOPROPERTY_EXPORT DateEdit : public Widget
{
Q_OBJECT
+ TQ_OBJECT
public:
- DateEdit(Property *property, QWidget *parent=0, const char *name=0);
+ DateEdit(Property *property, TQWidget *tqparent=0, const char *name=0);
virtual ~DateEdit();
- virtual QVariant value() const;
- virtual void setValue(const QVariant &value, bool emitChange=true);
+ virtual TQVariant value() const;
+ virtual void setValue(const TQVariant &value, bool emitChange=true);
- virtual void drawViewer(QPainter *p, const QColorGroup &cg, const QRect &r, const QVariant &value);
+ virtual void drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value);
protected:
virtual void setReadOnlyInternal(bool readOnly);
protected slots:
- void slotValueChanged(const QDate &date);
+ void slotValueChanged(const TQDate &date);
private:
- QDateEdit *m_edit;
+ TQDateEdit *m_edit;
};
}
diff --git a/lib/koproperty/editors/datetimeedit.cpp b/lib/koproperty/editors/datetimeedit.cpp
index 33bb8de3..7f88cb14 100644
--- a/lib/koproperty/editors/datetimeedit.cpp
+++ b/lib/koproperty/editors/datetimeedit.cpp
@@ -20,43 +20,43 @@
#include "datetimeedit.h"
-#include <qdatetimeedit.h>
-#include <qrangecontrol.h>
-#include <qobjectlist.h>
-#include <qlayout.h>
-#include <qpainter.h>
-#include <qvariant.h>
+#include <tqdatetimeedit.h>
+#include <tqrangecontrol.h>
+#include <tqobjectlist.h>
+#include <tqlayout.h>
+#include <tqpainter.h>
+#include <tqvariant.h>
#include <klocale.h>
#include <kglobal.h>
using namespace KoProperty;
-DateTimeEdit::DateTimeEdit(Property *property, QWidget *parent, const char *name)
- : Widget(property, parent, name)
+DateTimeEdit::DateTimeEdit(Property *property, TQWidget *tqparent, const char *name)
+ : Widget(property, tqparent, name)
{
- QHBoxLayout *l = new QHBoxLayout(this, 0, 0);
- m_edit = new QDateTimeEdit(this);
- m_edit->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+ TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0);
+ m_edit = new TQDateTimeEdit(this);
+ m_edit->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding);
m_edit->setMinimumHeight(5);
l->addWidget(m_edit);
setLeavesTheSpaceForRevertButton(true);
setFocusWidget(m_edit);
- connect(m_edit, SIGNAL(valueChanged(const QDateTime&)), this, SLOT(slotValueChanged(const QDateTime&)));
+ connect(m_edit, TQT_SIGNAL(valueChanged(const TQDateTime&)), this, TQT_SLOT(slotValueChanged(const TQDateTime&)));
}
DateTimeEdit::~DateTimeEdit()
{}
-QVariant
+TQVariant
DateTimeEdit::value() const
{
return m_edit->dateTime();
}
void
-DateTimeEdit::setValue(const QVariant &value, bool emitChange)
+DateTimeEdit::setValue(const TQVariant &value, bool emitChange)
{
m_edit->blockSignals(true);
m_edit->setDateTime(value.toDateTime());
@@ -66,16 +66,16 @@ DateTimeEdit::setValue(const QVariant &value, bool emitChange)
}
void
-DateTimeEdit::drawViewer(QPainter *p, const QColorGroup &cg, const QRect &r, const QVariant &value)
+DateTimeEdit::drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value)
{
p->eraseRect(r);
Widget::drawViewer(p, cg, r, KGlobal::locale()->formatDateTime(value.toDateTime(), true /* use short format*/, false /*no sec */ ));
-// p->drawText(r, Qt::AlignLeft | Qt::AlignVCenter | Qt::SingleLine,
+// p->drawText(r, TQt::AlignLeft | TQt::AlignVCenter | TQt::SingleLine,
// KGlobal::locale()->formatDateTime(value.toDateTime(), true /* use short format*/, false /*no sec */ ));
}
void
-DateTimeEdit::slotValueChanged(const QDateTime&)
+DateTimeEdit::slotValueChanged(const TQDateTime&)
{
emit valueChanged(this);
}
diff --git a/lib/koproperty/editors/datetimeedit.h b/lib/koproperty/editors/datetimeedit.h
index f7b81795..b8745b01 100644
--- a/lib/koproperty/editors/datetimeedit.h
+++ b/lib/koproperty/editors/datetimeedit.h
@@ -23,32 +23,33 @@
#include "../widget.h"
-class QDateTimeEdit;
-class QDateTime;
+class TQDateTimeEdit;
+class TQDateTime;
namespace KoProperty {
class KOPROPERTY_EXPORT DateTimeEdit : public Widget
{
Q_OBJECT
+ TQ_OBJECT
public:
- DateTimeEdit(Property *property, QWidget *parent=0, const char *name=0);
+ DateTimeEdit(Property *property, TQWidget *tqparent=0, const char *name=0);
virtual ~DateTimeEdit();
- virtual QVariant value() const;
- virtual void setValue(const QVariant &value, bool emitChange=true);
+ virtual TQVariant value() const;
+ virtual void setValue(const TQVariant &value, bool emitChange=true);
- virtual void drawViewer(QPainter *p, const QColorGroup &cg, const QRect &r, const QVariant &value);
+ virtual void drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value);
protected:
virtual void setReadOnlyInternal(bool readOnly);
protected slots:
- void slotValueChanged(const QDateTime &dateTime);
+ void slotValueChanged(const TQDateTime &dateTime);
private:
- QDateTimeEdit *m_edit;
+ TQDateTimeEdit *m_edit;
};
}
diff --git a/lib/koproperty/editors/dummywidget.cpp b/lib/koproperty/editors/dummywidget.cpp
index 9c72c8cd..e9fbe3c9 100644
--- a/lib/koproperty/editors/dummywidget.cpp
+++ b/lib/koproperty/editors/dummywidget.cpp
@@ -20,25 +20,25 @@
#include "dummywidget.h"
-#include <qpainter.h>
+#include <tqpainter.h>
using namespace KoProperty;
-DummyWidget::DummyWidget(Property *property, QWidget *parent, const char *name)
- : Widget(property, parent, name)
+DummyWidget::DummyWidget(Property *property, TQWidget *tqparent, const char *name)
+ : Widget(property, tqparent, name)
{}
DummyWidget::~DummyWidget()
{}
-QVariant
+TQVariant
DummyWidget::value() const
{
return m_value;
}
void
-DummyWidget::setValue(const QVariant &value, bool emitChange)
+DummyWidget::setValue(const TQVariant &value, bool emitChange)
{
m_value = value;
if(emitChange)
@@ -46,10 +46,10 @@ DummyWidget::setValue(const QVariant &value, bool emitChange)
}
void
-DummyWidget::drawViewer(QPainter *p, const QColorGroup &cg, const QRect &r, const QVariant &)
+DummyWidget::drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &)
{
p->setBrush(cg.background());
- p->setPen(Qt::NoPen);
+ p->setPen(TQt::NoPen);
p->drawRect(r);
}
diff --git a/lib/koproperty/editors/dummywidget.h b/lib/koproperty/editors/dummywidget.h
index b85ccb95..ef90ba8f 100644
--- a/lib/koproperty/editors/dummywidget.h
+++ b/lib/koproperty/editors/dummywidget.h
@@ -23,28 +23,29 @@
#include "../widget.h"
-#include <qvariant.h>
+#include <tqvariant.h>
namespace KoProperty {
class KOPROPERTY_EXPORT DummyWidget: public Widget
{
Q_OBJECT
+ TQ_OBJECT
public:
- DummyWidget(Property *property, QWidget *parent=0, const char *name=0);
+ DummyWidget(Property *property, TQWidget *tqparent=0, const char *name=0);
virtual ~DummyWidget();
- virtual QVariant value() const;
- virtual void setValue(const QVariant &value, bool emitChange=true);
+ virtual TQVariant value() const;
+ virtual void setValue(const TQVariant &value, bool emitChange=true);
- virtual void drawViewer(QPainter *p, const QColorGroup &cg, const QRect &r, const QVariant &value);
+ virtual void drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value);
protected:
virtual void setReadOnlyInternal(bool readOnly);
private:
- QVariant m_value;
+ TQVariant m_value;
};
}
diff --git a/lib/koproperty/editors/fontedit.cpp b/lib/koproperty/editors/fontedit.cpp
index 9d0101fa..65ae80cf 100644
--- a/lib/koproperty/editors/fontedit.cpp
+++ b/lib/koproperty/editors/fontedit.cpp
@@ -22,14 +22,14 @@
#include "fontedit.h"
#include "editoritem.h"
-#include <qpushbutton.h>
-#include <qpainter.h>
-#include <qlayout.h>
-#include <qvariant.h>
-#include <qfont.h>
-#include <qfontmetrics.h>
-#include <qlabel.h>
-#include <qtooltip.h>
+#include <tqpushbutton.h>
+#include <tqpainter.h>
+#include <tqlayout.h>
+#include <tqvariant.h>
+#include <tqfont.h>
+#include <tqfontmetrics.h>
+#include <tqlabel.h>
+#include <tqtooltip.h>
#include <kdeversion.h>
#include <kfontrequester.h>
@@ -44,32 +44,32 @@ namespace KoProperty {
class FontEditRequester : public KFontRequester
{
public:
- FontEditRequester(QWidget* parent)
- : KFontRequester(parent)
+ FontEditRequester(TQWidget* tqparent)
+ : KFontRequester(tqparent)
{
- label()->setPaletteBackgroundColor(palette().active().base());
+ label()->setPaletteBackgroundColor(tqpalette().active().base());
label()->setMinimumWidth(0);
- label()->setFrameShape(QFrame::Box);
+ label()->setFrameShape(TQFrame::Box);
label()->setIndent(-1);
#if KDE_VERSION >= KDE_MAKE_VERSION(3,4,0)
- label()->setFocusPolicy(ClickFocus);
+ label()->setFocusPolicy(TQ_ClickFocus);
KAcceleratorManager::setNoAccel(label());
#endif
- layout()->remove(label());
- layout()->remove(button());//->reparent(this, 0, QPoint(0,0));
- delete layout();
+ tqlayout()->remove(label());
+ tqlayout()->remove(button());//->reparent(this, 0, TQPoint(0,0));
+ delete tqlayout();
button()->setText(i18n("..."));
- QToolTip::add(button(), i18n("Change font"));
- button()->setFocusPolicy(NoFocus);
- button()->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
- QFontMetrics fm(button()->font());
+ TQToolTip::add(button(), i18n("Change font"));
+ button()->setFocusPolicy(TQ_NoFocus);
+ button()->tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed);
+ TQFontMetrics fm(button()->font());
button()->setFixedWidth(fm.width(button()->text()+' '));
}
- virtual void resizeEvent(QResizeEvent *e)
+ virtual void resizeEvent(TQResizeEvent *e)
{
KFontRequester::resizeEvent(e);
label()->move(0,0);
- label()->resize(e->size()-QSize(button()->width(),-1));
+ label()->resize(e->size()-TQSize(button()->width(),-1));
button()->move(label()->width(),0);
button()->setFixedSize(button()->width(), height());
}
@@ -79,35 +79,35 @@ class FontEditRequester : public KFontRequester
using namespace KoProperty;
-FontEdit::FontEdit(Property *property, QWidget *parent, const char *name)
- : Widget(property, parent, name)
+FontEdit::FontEdit(Property *property, TQWidget *tqparent, const char *name)
+ : Widget(property, tqparent, name)
{
m_edit = new FontEditRequester(this);
m_edit->setMinimumHeight(5);
setEditor(m_edit);
setFocusWidget(m_edit->label());
- connect(m_edit, SIGNAL(fontSelected(const QFont& )), this, SLOT(slotValueChanged(const QFont&)));
+ connect(m_edit, TQT_SIGNAL(fontSelected(const TQFont& )), this, TQT_SLOT(slotValueChanged(const TQFont&)));
}
FontEdit::~FontEdit()
{}
-QVariant
+TQVariant
FontEdit::value() const
{
return m_edit->font();
}
-static QString sampleText(const QVariant &value)
+static TQString sampleText(const TQVariant &value)
{
- QFontInfo fi(value.toFont());
- return fi.family() + (fi.bold() ? " " + i18n("Bold") : QString()) +
- (fi.italic() ? " " + i18n("Italic") : QString::null) +
- " " + QString::number(fi.pointSize());
+ TQFontInfo fi(value.toFont());
+ return fi.family() + (fi.bold() ? " " + i18n("Bold") : TQString()) +
+ (fi.italic() ? " " + i18n("Italic") : TQString()) +
+ " " + TQString::number(fi.pointSize());
}
void
-FontEdit::setValue(const QVariant &value, bool emitChange)
+FontEdit::setValue(const TQVariant &value, bool emitChange)
{
m_edit->blockSignals(true);
m_edit->setFont(value.toFont());
@@ -118,27 +118,27 @@ FontEdit::setValue(const QVariant &value, bool emitChange)
}
void
-FontEdit::drawViewer(QPainter *p, const QColorGroup &, const QRect &r, const QVariant &value)
+FontEdit::drawViewer(TQPainter *p, const TQColorGroup &, const TQRect &r, const TQVariant &value)
{
p->eraseRect(r);
p->setFont(value.toFont());
- QRect r2(r);
+ TQRect r2(r);
r2.setLeft(r2.left()+KPROPEDITOR_ITEM_MARGIN);
r2.setBottom(r2.bottom()+1);
- p->drawText(r2, Qt::AlignLeft | Qt::AlignVCenter | Qt::SingleLine, sampleText(value));
+ p->drawText(r2, TQt::AlignLeft | TQt::AlignVCenter | TQt::SingleLine, sampleText(value));
}
void
-FontEdit::slotValueChanged(const QFont &)
+FontEdit::slotValueChanged(const TQFont &)
{
emit valueChanged(this);
}
bool
-FontEdit::eventFilter(QObject* watched, QEvent* e)
+FontEdit::eventFilter(TQObject* watched, TQEvent* e)
{
- if(e->type() == QEvent::KeyPress) {
- QKeyEvent* ev = static_cast<QKeyEvent*>(e);
+ if(e->type() == TQEvent::KeyPress) {
+ TQKeyEvent* ev = TQT_TQKEYEVENT(e);
if(ev->key() == Key_Space) {
m_edit->button()->animateClick();
return true;
diff --git a/lib/koproperty/editors/fontedit.h b/lib/koproperty/editors/fontedit.h
index 0112171a..6c3a46a4 100644
--- a/lib/koproperty/editors/fontedit.h
+++ b/lib/koproperty/editors/fontedit.h
@@ -31,22 +31,23 @@ class FontEditRequester;
class KOPROPERTY_EXPORT FontEdit : public Widget
{
Q_OBJECT
+ TQ_OBJECT
public:
- FontEdit(Property *property, QWidget *parent=0, const char *name=0);
+ FontEdit(Property *property, TQWidget *tqparent=0, const char *name=0);
virtual ~FontEdit();
- virtual QVariant value() const;
- virtual void setValue(const QVariant &value, bool emitChange=true);
+ virtual TQVariant value() const;
+ virtual void setValue(const TQVariant &value, bool emitChange=true);
- virtual void drawViewer(QPainter *p, const QColorGroup &cg, const QRect &r, const QVariant &value);
+ virtual void drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value);
protected:
virtual void setReadOnlyInternal(bool readOnly);
- virtual bool eventFilter(QObject* watched, QEvent* e);
+ virtual bool eventFilter(TQObject* watched, TQEvent* e);
protected slots:
- void slotValueChanged(const QFont &font);
+ void slotValueChanged(const TQFont &font);
private:
FontEditRequester *m_edit;
diff --git a/lib/koproperty/editors/linestyledit.cpp b/lib/koproperty/editors/linestyledit.cpp
index 0d2353ff..91783e20 100644
--- a/lib/koproperty/editors/linestyledit.cpp
+++ b/lib/koproperty/editors/linestyledit.cpp
@@ -21,11 +21,11 @@
#include "linestyleedit.h"
#include "editoritem.h"
-#include <qpainter.h>
-#include <qpixmap.h>
-#include <qcombobox.h>
-#include <qlayout.h>
-#include <qvariant.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
+#include <tqcombobox.h>
+#include <tqlayout.h>
+#include <tqvariant.h>
using namespace KoProperty;
@@ -135,39 +135,39 @@ using namespace KoProperty;
"................................................"};
-LineStyleEdit::LineStyleEdit(Property *property, QWidget *parent, const char *name)
- : Widget(property, parent, name)
+LineStyleEdit::LineStyleEdit(Property *property, TQWidget *tqparent, const char *name)
+ : Widget(property, tqparent, name)
{
- QHBoxLayout *l = new QHBoxLayout(this, 0, 0);
- m_edit = new QComboBox(this);
- m_edit->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+ TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0);
+ m_edit = new TQComboBox(this);
+ m_edit->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding);
m_edit->setMinimumHeight(5);
l->addWidget(m_edit);
- m_edit->insertItem(QPixmap(nopen));
- m_edit->insertItem(QPixmap(solid));
- m_edit->insertItem(QPixmap(dash));
- m_edit->insertItem(QPixmap(dashdot));
- m_edit->insertItem(QPixmap(dashdotdot));
+ m_edit->insertItem(TQPixmap(nopen));
+ m_edit->insertItem(TQPixmap(solid));
+ m_edit->insertItem(TQPixmap(dash));
+ m_edit->insertItem(TQPixmap(dashdot));
+ m_edit->insertItem(TQPixmap(dashdotdot));
setLeavesTheSpaceForRevertButton(true);
setFocusWidget(m_edit);
- connect(m_edit, SIGNAL(activated(int)), this, SLOT(slotValueChanged(int)));
+ connect(m_edit, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotValueChanged(int)));
}
LineStyleEdit::~LineStyleEdit()
{}
-QVariant
+TQVariant
LineStyleEdit::value() const
{
return m_edit->currentItem();
}
void
-LineStyleEdit::setValue(const QVariant &value, bool emitChange)
+LineStyleEdit::setValue(const TQVariant &value, bool emitChange)
{
- if (!value.canCast(QVariant::Int))
+ if (!value.canCast(TQVariant::Int))
return;
if ((value.toInt() > 5) || (value.toInt() < 0))
return;
@@ -180,29 +180,29 @@ LineStyleEdit::setValue(const QVariant &value, bool emitChange)
}
void
-LineStyleEdit::drawViewer(QPainter *p, const QColorGroup &, const QRect &r, const QVariant &value)
+LineStyleEdit::drawViewer(TQPainter *p, const TQColorGroup &, const TQRect &r, const TQVariant &value)
{
p->eraseRect(r);
- if (!value.canCast(QVariant::Int))
+ if (!value.canCast(TQVariant::Int))
return;
- QPixmap px;
+ TQPixmap px;
switch (value.toInt()) {
case 0:
- px = QPixmap(nopen);
+ px = TQPixmap(nopen);
break;
case 1:
- px = QPixmap(solid);
+ px = TQPixmap(solid);
break;
case 2:
- px = QPixmap(dash);
+ px = TQPixmap(dash);
break;
case 3:
- px = QPixmap(dashdot);
+ px = TQPixmap(dashdot);
break;
case 4:
- px = QPixmap(dashdotdot);
+ px = TQPixmap(dashdotdot);
break;
default:
return;
diff --git a/lib/koproperty/editors/linestyleedit.h b/lib/koproperty/editors/linestyleedit.h
index 6392e2f7..8388b897 100644
--- a/lib/koproperty/editors/linestyleedit.h
+++ b/lib/koproperty/editors/linestyleedit.h
@@ -23,22 +23,23 @@
#include "../widget.h"
-class QComboBox;
+class TQComboBox;
namespace KoProperty {
class KOPROPERTY_EXPORT LineStyleEdit : public Widget
{
Q_OBJECT
+ TQ_OBJECT
public:
- LineStyleEdit(Property *property, QWidget *parent=0, const char *name=0);
+ LineStyleEdit(Property *property, TQWidget *tqparent=0, const char *name=0);
virtual ~LineStyleEdit();
- virtual QVariant value() const;
- virtual void setValue(const QVariant &value, bool emitChange=true);
+ virtual TQVariant value() const;
+ virtual void setValue(const TQVariant &value, bool emitChange=true);
- virtual void drawViewer(QPainter *p, const QColorGroup &cg, const QRect &r, const QVariant &value);
+ virtual void drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value);
protected:
virtual void setReadOnlyInternal(bool readOnly);
@@ -47,7 +48,7 @@ class KOPROPERTY_EXPORT LineStyleEdit : public Widget
void slotValueChanged(int value);
private:
- QComboBox *m_edit;
+ TQComboBox *m_edit;
};
}
diff --git a/lib/koproperty/editors/pixmapedit.cpp b/lib/koproperty/editors/pixmapedit.cpp
index d141eed3..95cdbb9d 100644
--- a/lib/koproperty/editors/pixmapedit.cpp
+++ b/lib/koproperty/editors/pixmapedit.cpp
@@ -23,22 +23,22 @@
#include "editoritem.h"
#include "property.h"
-#include <qlayout.h>
-#include <qpainter.h>
-#include <qlabel.h>
-#include <qcursor.h>
-#include <qpushbutton.h>
-#include <qfont.h>
-#include <qfontmetrics.h>
-#include <qimage.h>
-#include <qfiledialog.h>
-#include <qtooltip.h>
-#include <qapplication.h>
+#include <tqlayout.h>
+#include <tqpainter.h>
+#include <tqlabel.h>
+#include <tqcursor.h>
+#include <tqpushbutton.h>
+#include <tqfont.h>
+#include <tqfontmetrics.h>
+#include <tqimage.h>
+#include <tqfiledialog.h>
+#include <tqtooltip.h>
+#include <tqapplication.h>
#include <kdebug.h>
#include <kimageio.h>
-#ifdef Q_WS_WIN
+#ifdef TQ_WS_WIN
#include <win32_utils.h>
#include <krecentdirs.h>
#endif
@@ -51,36 +51,36 @@
using namespace KoProperty;
-PixmapEdit::PixmapEdit(Property *property, QWidget *parent, const char *name)
- : Widget(property, parent, name)
+PixmapEdit::PixmapEdit(Property *property, TQWidget *tqparent, const char *name)
+ : Widget(property, tqparent, name)
{
setHasBorders(false);
- m_edit = new QLabel(this, "m_edit");
- QToolTip::add(m_edit, i18n("Click to show image preview"));
- m_edit->setAlignment(Qt::AlignLeft | Qt::AlignVCenter);
+ m_edit = new TQLabel(this, "m_edit");
+ TQToolTip::add(m_edit, i18n("Click to show image preview"));
+ m_edit->tqsetAlignment(TQt::AlignLeft | TQt::AlignVCenter);
m_edit->setMinimumHeight(5);
- m_edit->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
- m_edit->setBackgroundMode(Qt::PaletteBase);
+ m_edit->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Fixed);
+ m_edit->setBackgroundMode(TQt::PaletteBase);
m_edit->setMouseTracking(true);
- setBackgroundMode(Qt::PaletteBase);
+ setBackgroundMode(TQt::PaletteBase);
- m_button = new QPushButton(i18n("..."), this, "m_button");
- QToolTip::add(m_button, i18n("Insert image from file"));
- m_button->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
- QFontMetrics fm(m_button->font());
+ m_button = new TQPushButton(i18n("..."), this, "m_button");
+ TQToolTip::add(m_button, i18n("Insert image from file"));
+ m_button->tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed);
+ TQFontMetrics fm(m_button->font());
m_button->setFixedWidth(fm.width(m_button->text()+' '));
- m_button->setFocusPolicy(NoFocus);
+ m_button->setFocusPolicy(TQ_NoFocus);
- m_popup = new QLabel(0, "m_popup", Qt::WStyle_Customize|Qt::WStyle_NoBorder|Qt::WX11BypassWM|WStyle_StaysOnTop);
- m_popup->setPaletteBackgroundColor(m_popup->palette().active().base());
- m_popup->setFrameStyle(QFrame::Plain|QFrame::Box);
+ m_popup = new TQLabel(0, "m_popup", TQt::WStyle_Customize|TQt::WStyle_NoBorder|TQt::WX11BypassWM|WStyle_StaysOnTop);
+ m_popup->setPaletteBackgroundColor(m_popup->tqpalette().active().base());
+ m_popup->setFrameStyle(TQFrame::Plain|TQFrame::Box);
m_popup->setMargin(2);
m_popup->setLineWidth(1);
m_popup->hide();
setFocusWidget(m_edit);
- connect(m_button, SIGNAL(clicked()), this, SLOT(selectPixmap()));
+ connect(m_button, TQT_SIGNAL(clicked()), this, TQT_SLOT(selectPixmap()));
}
PixmapEdit::~PixmapEdit()
@@ -88,14 +88,14 @@ PixmapEdit::~PixmapEdit()
delete m_popup;
}
-QVariant
+TQVariant
PixmapEdit::value() const
{
return m_pixmap;
}
void
-PixmapEdit::setValue(const QVariant &value, bool emitChange)
+PixmapEdit::setValue(const TQVariant &value, bool emitChange)
{
m_pixmap = value.toPixmap();
if (m_pixmap.isNull() || (m_pixmap.height()<=height())) {
@@ -103,16 +103,16 @@ PixmapEdit::setValue(const QVariant &value, bool emitChange)
m_previewPixmap = m_pixmap;
}
else {
- QImage img(m_pixmap.convertToImage());
- if (!QRect(QPoint(0,0), m_edit->size()*3).contains(m_pixmap.rect())) {
- img = img.smoothScale(m_edit->size()*3, QImage::ScaleMin);
+ TQImage img(m_pixmap.convertToImage());
+ if (!TQRect(TQPoint(0,0), m_edit->size()*3).tqcontains(m_pixmap.rect())) {
+ img = img.smoothScale(m_edit->size()*3, TQ_ScaleMin);
m_previewPixmap.convertFromImage(img);//preview pixmap is a bit larger
}
else {
m_previewPixmap = m_pixmap;
}
- img = img.smoothScale(m_edit->size(), QImage::ScaleMin);
- QPixmap pm;
+ img = img.smoothScale(m_edit->size(), TQ_ScaleMin);
+ TQPixmap pm;
pm.convertFromImage(img);
m_edit->setPixmap(pm);
}
@@ -121,11 +121,11 @@ PixmapEdit::setValue(const QVariant &value, bool emitChange)
}
void
-PixmapEdit::drawViewer(QPainter *p, const QColorGroup &, const QRect &r, const QVariant &value)
+PixmapEdit::drawViewer(TQPainter *p, const TQColorGroup &, const TQRect &r, const TQVariant &value)
{
- QRect r2(r);
+ TQRect r2(r);
r2.setHeight(r2.height()+1);
- p->setClipRect(r2, QPainter::CoordPainter);
+ p->setClipRect(r2, TQPainter::CoordPainter);
p->setClipping(true);
p->eraseRect(r2);
if (value.toPixmap().isNull())
@@ -134,8 +134,8 @@ PixmapEdit::drawViewer(QPainter *p, const QColorGroup &, const QRect &r, const Q
m_recentlyPainted = value;
m_scaledPixmap = value.toPixmap();
if (m_scaledPixmap.height() > r2.height() || m_scaledPixmap.width() > r2.width()) { //scale down
- QImage img(m_scaledPixmap.convertToImage());
- img = img.smoothScale(r2.size()/*+QSize(0,2)*/, QImage::ScaleMin);
+ TQImage img(m_scaledPixmap.convertToImage());
+ img = img.smoothScale(r2.size()/*+TQSize(0,2)*/, TQ_ScaleMin);
m_scaledPixmap.convertFromImage(img);
}
}
@@ -143,27 +143,27 @@ PixmapEdit::drawViewer(QPainter *p, const QColorGroup &, const QRect &r, const Q
r2.topLeft().y()+(r2.height()-m_scaledPixmap.height())/2, m_scaledPixmap);
}
-QString
+TQString
PixmapEdit::selectPixmapFileName()
{
/*#ifdef PURE_QT
- QString url = QFileDialog::getOpenFileName();
+ TQString url = TQFileDialog::getOpenFileName();
if (!url.isEmpty()) {
- m_edit->setPixmap(QPixmap(url));
+ m_edit->setPixmap(TQPixmap(url));
emit valueChanged(this);
}
#endif*/
- QString caption( i18n("Insert Image From File (for \"%1\" property)").arg(property()->caption()) );
-#ifdef Q_WS_WIN
- QString recentDir;
- QString fileName = QFileDialog::getOpenFileName(
+ TQString caption( i18n("Insert Image From File (for \"%1\" property)").tqarg(property()->caption()) );
+#ifdef TQ_WS_WIN
+ TQString recentDir;
+ TQString fileName = TQFileDialog::getOpenFileName(
KFileDialog::getStartURL(":lastVisitedImagePath", recentDir).path(),
- convertKFileDialogFilterToQFileDialogFilter(KImageIO::pattern(KImageIO::Reading)),
+ convertKFileDialogFilterToTQFileDialogFilter(KImageIO::pattern(KImageIO::Reading)),
this, 0, caption);
#else
KURL url( KFileDialog::getImageOpenURL(
":lastVisitedImagePath", this, caption) );
- QString fileName = url.isLocalFile() ? url.path() : url.prettyURL();
+ TQString fileName = url.isLocalFile() ? url.path() : url.prettyURL();
//! @todo download the file if remote, then set fileName properly
#endif
@@ -173,18 +173,18 @@ PixmapEdit::selectPixmapFileName()
void
PixmapEdit::selectPixmap()
{
- QString fileName( selectPixmapFileName() );
+ TQString fileName( selectPixmapFileName() );
if (fileName.isEmpty())
return;
- QPixmap pm;
+ TQPixmap pm;
if (!pm.load(fileName)) {
//! @todo err msg
return;
}
setValue(pm);
-#ifdef Q_WS_WIN
+#ifdef TQ_WS_WIN
//save last visited path
KURL url(fileName);
if (url.isLocalFile())
@@ -193,41 +193,41 @@ PixmapEdit::selectPixmap()
}
void
-PixmapEdit::resizeEvent(QResizeEvent *e)
+PixmapEdit::resizeEvent(TQResizeEvent *e)
{
Widget::resizeEvent(e);
m_edit->move(0,0);
- m_edit->resize(e->size()-QSize(m_button->width(),-1));
+ m_edit->resize(e->size()-TQSize(m_button->width(),-1));
m_button->move(m_edit->width(),0);
m_button->setFixedSize(m_button->width(), height());
}
bool
-PixmapEdit::eventFilter(QObject *o, QEvent *ev)
+PixmapEdit::eventFilter(TQObject *o, TQEvent *ev)
{
- if(o == m_edit) {
- if(ev->type() == QEvent::MouseButtonPress && static_cast<QMouseEvent*>(ev)->button()==LeftButton) {
+ if(TQT_BASE_OBJECT(o) == m_edit) {
+ if(ev->type() == TQEvent::MouseButtonPress && TQT_TQMOUSEEVENT(ev)->button()==Qt::LeftButton) {
if(m_previewPixmap.height() <= m_edit->height()
&& m_previewPixmap.width() <= m_edit->width())
return false;
m_popup->setPixmap(m_previewPixmap.isNull() ? m_pixmap : m_previewPixmap);
- m_popup->resize(m_previewPixmap.size()+QSize(2*3,2*3));
- QPoint pos = QCursor::pos()+QPoint(3,15);
- QRect screenRect = QApplication::desktop()->availableGeometry( this );
+ m_popup->resize(m_previewPixmap.size()+TQSize(2*3,2*3));
+ TQPoint pos = TQCursor::pos()+TQPoint(3,15);
+ TQRect screenRect = TQApplication::desktop()->availableGeometry( this );
if ((pos.x()+m_popup->width()) > screenRect.width())
pos.setX(screenRect.width()-m_popup->width());
if ((pos.y()+m_popup->height()) > screenRect.height())
- pos.setY(mapToGlobal(QPoint(0,0)).y()-m_popup->height());
+ pos.setY(mapToGlobal(TQPoint(0,0)).y()-m_popup->height());
m_popup->move(pos);
m_popup->show();
}
- else if(ev->type() == QEvent::MouseButtonRelease || ev->type() == QEvent::Hide) {
+ else if(ev->type() == TQEvent::MouseButtonRelease || ev->type() == TQEvent::Hide) {
if(m_popup->isVisible())
m_popup->hide();
}
- else if(ev->type() == QEvent::KeyPress) {
- QKeyEvent* e = static_cast<QKeyEvent*>(ev);
+ else if(ev->type() == TQEvent::KeyPress) {
+ TQKeyEvent* e = TQT_TQKEYEVENT(ev);
if((e->key() == Key_Enter) || (e->key()== Key_Space) || (e->key() == Key_Return)) {
m_button->animateClick();
return true;
diff --git a/lib/koproperty/editors/pixmapedit.h b/lib/koproperty/editors/pixmapedit.h
index 7b0268bf..61f75fba 100644
--- a/lib/koproperty/editors/pixmapedit.h
+++ b/lib/koproperty/editors/pixmapedit.h
@@ -23,28 +23,29 @@
#define KPROPERTY_PIXMAPEDIT_H
#include "../widget.h"
-#include <qpixmap.h>
-#include <qvariant.h>
+#include <tqpixmap.h>
+#include <tqvariant.h>
-class QLabel;
-class QPushButton;
+class TQLabel;
+class TQPushButton;
namespace KoProperty {
class KOPROPERTY_EXPORT PixmapEdit : public Widget
{
Q_OBJECT
+ TQ_OBJECT
public:
- PixmapEdit(Property *property, QWidget *parent=0, const char *name=0);
+ PixmapEdit(Property *property, TQWidget *tqparent=0, const char *name=0);
virtual ~PixmapEdit();
- virtual QVariant value() const;
- virtual void setValue(const QVariant &value, bool emitChange=true);
- virtual void drawViewer(QPainter *p, const QColorGroup &cg, const QRect &r, const QVariant &value);
+ virtual TQVariant value() const;
+ virtual void setValue(const TQVariant &value, bool emitChange=true);
+ virtual void drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value);
- void resizeEvent(QResizeEvent *ev);
- bool eventFilter(QObject *o, QEvent *ev);
+ void resizeEvent(TQResizeEvent *ev);
+ bool eventFilter(TQObject *o, TQEvent *ev);
protected:
virtual void setReadOnlyInternal(bool readOnly);
@@ -54,17 +55,17 @@ class KOPROPERTY_EXPORT PixmapEdit : public Widget
Selected path will be stored in "lastVisitedImagePath" config entry within "Recent Dirs"
config group of application's settings. This entry can be later reused when file dialogs
are opened for selecting image files. */
- QString selectPixmapFileName();
+ TQString selectPixmapFileName();
/*! Selects a new pixmap using "open" file dialog. Can be reimplemented. */
virtual void selectPixmap();
protected:
- QLabel *m_edit;
- QLabel *m_popup;
- QPushButton *m_button;
- QVariant m_recentlyPainted;
- QPixmap m_pixmap, m_scaledPixmap, m_previewPixmap;
+ TQLabel *m_edit;
+ TQLabel *m_popup;
+ TQPushButton *m_button;
+ TQVariant m_recentlyPainted;
+ TQPixmap m_pixmap, m_scaledPixmap, m_previewPixmap;
};
}
diff --git a/lib/koproperty/editors/pointedit.cpp b/lib/koproperty/editors/pointedit.cpp
index 60d74a89..d251e969 100644
--- a/lib/koproperty/editors/pointedit.cpp
+++ b/lib/koproperty/editors/pointedit.cpp
@@ -21,10 +21,10 @@
#include "pointedit.h"
#include "editoritem.h"
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpainter.h>
-#include <qtooltip.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpainter.h>
+#include <tqtooltip.h>
#include <kactivelabel.h>
#include <klocale.h>
@@ -34,17 +34,17 @@
using namespace KoProperty;
-PointEdit::PointEdit(Property *property, QWidget *parent, const char *name)
- : Widget(property, parent, name)
+PointEdit::PointEdit(Property *property, TQWidget *tqparent, const char *name)
+ : Widget(property, tqparent, name)
{
setHasBorders(false);
m_edit = new KActiveLabel(this);
- m_edit->setFocusPolicy(NoFocus);
+ m_edit->setFocusPolicy(TQ_NoFocus);
// m_edit->setIndent(KPROPEDITOR_ITEM_MARGIN);
- m_edit->setPaletteBackgroundColor(palette().active().base());
- m_edit->setWordWrap( QTextEdit::NoWrap );
-// m_edit->setBackgroundMode(Qt::PaletteBase);
-// m_edit->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+ m_edit->setPaletteBackgroundColor(tqpalette().active().base());
+ m_edit->setWordWrap( TQTextEdit::NoWrap );
+// m_edit->setBackgroundMode(TQt::PaletteBase);
+// m_edit->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding);
m_edit->setMinimumHeight(5);
setEditor(m_edit);
// setFocusWidget(m_edit);
@@ -53,33 +53,33 @@ PointEdit::PointEdit(Property *property, QWidget *parent, const char *name)
PointEdit::~PointEdit()
{}
-QVariant
+TQVariant
PointEdit::value() const
{
return m_value;
}
void
-PointEdit::setValue(const QVariant &value, bool emitChange)
+PointEdit::setValue(const TQVariant &value, bool emitChange)
{
m_value = value;
m_edit->selectAll(false);
- m_edit->setText(QString(POINTEDIT_MASK).arg(value.toPoint().x()).arg(value.toPoint().y()));
- QToolTip::add(this, QString("%1, %2").arg(value.toPoint().x()).arg(value.toPoint().y()));
+ m_edit->setText(TQString(POINTEDIT_MASK).tqarg(value.toPoint().x()).tqarg(value.toPoint().y()));
+ TQToolTip::add(this, TQString("%1, %2").tqarg(value.toPoint().x()).tqarg(value.toPoint().y()));
if (emitChange)
emit valueChanged(this);
}
void
-PointEdit::drawViewer(QPainter *p, const QColorGroup &cg, const QRect &r, const QVariant &value)
+PointEdit::drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value)
{
- QRect rect(r);
+ TQRect rect(r);
rect.setBottom(r.bottom()+1);
- Widget::drawViewer(p, cg, rect, QString(POINTEDIT_MASK).arg(value.toPoint().x()).arg(value.toPoint().y()));
+ Widget::drawViewer(p, cg, rect, TQString(POINTEDIT_MASK).tqarg(value.toPoint().x()).tqarg(value.toPoint().y()));
// p->eraseRect(r);
-// p->drawText(r, Qt::AlignLeft | Qt::AlignVCenter | Qt::SingleLine,
-// QString("[ %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
diff --git a/lib/koproperty/editors/pointedit.h b/lib/koproperty/editors/pointedit.h
index bba2fda1..22c9a36a 100644
--- a/lib/koproperty/editors/pointedit.h
+++ b/lib/koproperty/editors/pointedit.h
@@ -23,7 +23,7 @@
#include "../widget.h"
-#include <qvariant.h>
+#include <tqvariant.h>
class KActiveLabel;
@@ -32,22 +32,23 @@ namespace KoProperty {
class KOPROPERTY_EXPORT PointEdit : public Widget
{
Q_OBJECT
+ TQ_OBJECT
public:
- PointEdit(Property *property, QWidget *parent=0, const char *name=0);
+ PointEdit(Property *property, TQWidget *tqparent=0, const char *name=0);
virtual ~PointEdit();
- virtual QVariant value() const;
- virtual void setValue(const QVariant &value, bool emitChange=true);
+ virtual TQVariant value() const;
+ virtual void setValue(const TQVariant &value, bool emitChange=true);
- virtual void drawViewer(QPainter *p, const QColorGroup &cg, const QRect &r, const QVariant &value);
+ virtual void drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value);
protected:
virtual void setReadOnlyInternal(bool readOnly);
private:
KActiveLabel *m_edit;
- QVariant m_value;
+ TQVariant m_value;
};
}
diff --git a/lib/koproperty/editors/rectedit.cpp b/lib/koproperty/editors/rectedit.cpp
index 4f495b60..313e4e53 100644
--- a/lib/koproperty/editors/rectedit.cpp
+++ b/lib/koproperty/editors/rectedit.cpp
@@ -20,10 +20,10 @@
#include "rectedit.h"
#include "editoritem.h"
-#include <qvariant.h>
-#include <qlayout.h>
-#include <qpainter.h>
-#include <qtooltip.h>
+#include <tqvariant.h>
+#include <tqlayout.h>
+#include <tqpainter.h>
+#include <tqtooltip.h>
#include <kactivelabel.h>
#include <klocale.h>
@@ -33,14 +33,14 @@
using namespace KoProperty;
-RectEdit::RectEdit(Property *property, QWidget *parent, const char *name)
- : Widget(property, parent, name)
+RectEdit::RectEdit(Property *property, TQWidget *tqparent, const char *name)
+ : Widget(property, tqparent, name)
{
setHasBorders(false);
m_edit = new KActiveLabel(this);
- m_edit->setFocusPolicy(NoFocus);
- m_edit->setPaletteBackgroundColor(palette().active().base());
- m_edit->setWordWrap( QTextEdit::NoWrap );
+ m_edit->setFocusPolicy(TQ_NoFocus);
+ m_edit->setPaletteBackgroundColor(tqpalette().active().base());
+ m_edit->setWordWrap( TQTextEdit::NoWrap );
m_edit->setMinimumHeight(5);
setEditor(m_edit);
// setFocusWidget(m_edit);
@@ -49,38 +49,38 @@ RectEdit::RectEdit(Property *property, QWidget *parent, const char *name)
RectEdit::~RectEdit()
{}
-QVariant
+TQVariant
RectEdit::value() const
{
return m_value;
}
void
-RectEdit::setValue(const QVariant &value, bool emitChange)
+RectEdit::setValue(const TQVariant &value, bool emitChange)
{
m_value = value;
m_edit->selectAll(false);
- m_edit->setText(QString(RECTEDIT_MASK).arg(value.toRect().x()).
- arg(value.toRect().y()).arg(value.toRect().width()).arg(value.toRect().height()));
- QToolTip::add(this, i18n("Position: %1, %2\nSize: %3 x %4").arg(value.toRect().x()).
- arg(value.toRect().y()).arg(value.toRect().width()).arg(value.toRect().height()));
+ m_edit->setText(TQString(RECTEDIT_MASK).tqarg(value.toRect().x()).
+ tqarg(value.toRect().y()).tqarg(value.toRect().width()).tqarg(value.toRect().height()));
+ TQToolTip::add(this, i18n("Position: %1, %2\nSize: %3 x %4").tqarg(value.toRect().x()).
+ tqarg(value.toRect().y()).tqarg(value.toRect().width()).tqarg(value.toRect().height()));
if (emitChange)
emit valueChanged(this);
}
void
-RectEdit::drawViewer(QPainter *p, const QColorGroup &cg, const QRect &r, const QVariant &value)
+RectEdit::drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value)
{
- QRect rect(r);
+ TQRect rect(r);
rect.setBottom(r.bottom()+1);
Widget::drawViewer(p, cg, rect,
- QString(RECTEDIT_MASK).arg(value.toRect().x()).arg(value.toRect().y())
- .arg(value.toRect().width()).arg(value.toRect().height()));
+ TQString(RECTEDIT_MASK).tqarg(value.toRect().x()).tqarg(value.toRect().y())
+ .tqarg(value.toRect().width()).tqarg(value.toRect().height()));
// p->eraseRect(r);
-// p->drawText(r, Qt::AlignLeft | Qt::AlignVCenter | Qt::SingleLine,
-// QString("[ %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
diff --git a/lib/koproperty/editors/rectedit.h b/lib/koproperty/editors/rectedit.h
index fe1f7e74..261bf7d5 100644
--- a/lib/koproperty/editors/rectedit.h
+++ b/lib/koproperty/editors/rectedit.h
@@ -23,7 +23,7 @@
#include "../widget.h"
-#include <qvariant.h>
+#include <tqvariant.h>
class KActiveLabel;
@@ -32,22 +32,23 @@ namespace KoProperty {
class KOPROPERTY_EXPORT RectEdit : public Widget
{
Q_OBJECT
+ TQ_OBJECT
public:
- RectEdit(Property *property, QWidget *parent=0, const char *name=0);
+ RectEdit(Property *property, TQWidget *tqparent=0, const char *name=0);
virtual ~RectEdit();
- virtual QVariant value() const;
- virtual void setValue(const QVariant &value, bool emitChange=true);
+ virtual TQVariant value() const;
+ virtual void setValue(const TQVariant &value, bool emitChange=true);
- virtual void drawViewer(QPainter *p, const QColorGroup &cg, const QRect &r, const QVariant &value);
+ virtual void drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value);
protected:
virtual void setReadOnlyInternal(bool readOnly);
private:
KActiveLabel *m_edit;
- QVariant m_value;
+ TQVariant m_value;
};
}
diff --git a/lib/koproperty/editors/sizeedit.cpp b/lib/koproperty/editors/sizeedit.cpp
index e8a0c339..db8fb44f 100644
--- a/lib/koproperty/editors/sizeedit.cpp
+++ b/lib/koproperty/editors/sizeedit.cpp
@@ -21,10 +21,10 @@
#include "sizeedit.h"
#include "editoritem.h"
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpainter.h>
-#include <qtooltip.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpainter.h>
+#include <tqtooltip.h>
#include <kactivelabel.h>
#include <klocale.h>
@@ -34,16 +34,16 @@
using namespace KoProperty;
-SizeEdit::SizeEdit(Property *property, QWidget *parent, const char *name)
- : Widget(property, parent, name)
+SizeEdit::SizeEdit(Property *property, TQWidget *tqparent, const char *name)
+ : Widget(property, tqparent, name)
{
setHasBorders(false);
m_edit = new KActiveLabel(this);
- m_edit->setFocusPolicy(NoFocus);
+ m_edit->setFocusPolicy(TQ_NoFocus);
// m_edit->setIndent(KPROPEDITOR_ITEM_MARGIN);
- m_edit->setPaletteBackgroundColor(palette().active().base());
-// m_edit->setBackgroundMode(Qt::PaletteBase);
-// m_edit->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+ m_edit->setPaletteBackgroundColor(tqpalette().active().base());
+// m_edit->setBackgroundMode(TQt::PaletteBase);
+// m_edit->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding);
m_edit->setMinimumHeight(5);
setEditor(m_edit);
// setFocusWidget(m_edit);
@@ -52,34 +52,34 @@ SizeEdit::SizeEdit(Property *property, QWidget *parent, const char *name)
SizeEdit::~SizeEdit()
{}
-QVariant
+TQVariant
SizeEdit::value() const
{
return m_value;
}
void
-SizeEdit::setValue(const QVariant &value, bool emitChange)
+SizeEdit::setValue(const TQVariant &value, bool emitChange)
{
m_value = value;
m_edit->selectAll(false);
- m_edit->setText(QString(SIZEEDIT_MASK).arg(value.toSize().width()).arg(value.toSize().height()));
- QToolTip::add(this, QString("%1 x %2").arg(value.toSize().width()).arg(value.toSize().height()));
+ m_edit->setText(TQString(SIZEEDIT_MASK).tqarg(value.toSize().width()).tqarg(value.toSize().height()));
+ TQToolTip::add(this, TQString("%1 x %2").tqarg(value.toSize().width()).tqarg(value.toSize().height()));
if (emitChange)
emit valueChanged(this);
}
void
-SizeEdit::drawViewer(QPainter *p, const QColorGroup &cg, const QRect &r, const QVariant &value)
+SizeEdit::drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value)
{
- QRect rect(r);
+ TQRect rect(r);
rect.setBottom(r.bottom()+1);
Widget::drawViewer(p, cg, rect,
- QString(SIZEEDIT_MASK).arg(value.toSize().width()).arg(value.toSize().height()));
+ TQString(SIZEEDIT_MASK).tqarg(value.toSize().width()).tqarg(value.toSize().height()));
// p->eraseRect(r);
-// p->drawText(r, Qt::AlignLeft | Qt::AlignVCenter | Qt::SingleLine,
-// QString("[ %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
diff --git a/lib/koproperty/editors/sizeedit.h b/lib/koproperty/editors/sizeedit.h
index 0fe96c64..743f630f 100644
--- a/lib/koproperty/editors/sizeedit.h
+++ b/lib/koproperty/editors/sizeedit.h
@@ -23,7 +23,7 @@
#include "../widget.h"
-#include <qvariant.h>
+#include <tqvariant.h>
class KActiveLabel;
@@ -32,22 +32,23 @@ namespace KoProperty {
class KOPROPERTY_EXPORT SizeEdit : public Widget
{
Q_OBJECT
+ TQ_OBJECT
public:
- SizeEdit(Property *property, QWidget *parent=0, const char *name=0);
+ SizeEdit(Property *property, TQWidget *tqparent=0, const char *name=0);
virtual ~SizeEdit();
- virtual QVariant value() const;
- virtual void setValue(const QVariant &value, bool emitChange=true);
+ virtual TQVariant value() const;
+ virtual void setValue(const TQVariant &value, bool emitChange=true);
- virtual void drawViewer(QPainter *p, const QColorGroup &cg, const QRect &r, const QVariant &value);
+ virtual void drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value);
protected:
virtual void setReadOnlyInternal(bool readOnly);
private:
KActiveLabel *m_edit;
- QVariant m_value;
+ TQVariant m_value;
};
}
diff --git a/lib/koproperty/editors/sizepolicyedit.cpp b/lib/koproperty/editors/sizepolicyedit.cpp
index c04c9579..0c616665 100644
--- a/lib/koproperty/editors/sizepolicyedit.cpp
+++ b/lib/koproperty/editors/sizepolicyedit.cpp
@@ -21,28 +21,28 @@
#include "sizepolicyedit.h"
#include "editoritem.h"
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpainter.h>
-#include <qsizepolicy.h>
-#include <qmap.h>
-#include <qtooltip.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpainter.h>
+#include <tqsizepolicy.h>
+#include <tqmap.h>
+#include <tqtooltip.h>
#include <klocale.h>
using namespace KoProperty;
-QMap<QString, QVariant> *SizePolicyEdit::m_spValues = 0;
+TQMap<TQString, TQVariant> *SizePolicyEdit::m_spValues = 0;
-SizePolicyEdit::SizePolicyEdit(Property *property, QWidget *parent, const char *name)
- : Widget(property, parent, name)
+SizePolicyEdit::SizePolicyEdit(Property *property, TQWidget *tqparent, const char *name)
+ : Widget(property, tqparent, name)
{
setHasBorders(false);
-// QHBoxLayout *l = new QHBoxLayout(this, 0, 0);
- m_edit = new QLabel(this);
+// TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0);
+ m_edit = new TQLabel(this);
m_edit->setIndent(KPROPEDITOR_ITEM_MARGIN);
- m_edit->setBackgroundMode(Qt::PaletteBase);
-// m_edit->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+ m_edit->setBackgroundMode(TQt::PaletteBase);
+// m_edit->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding);
m_edit->setMinimumHeight(5);
setEditor(m_edit);
// l->addWidget(m_edit);
@@ -50,14 +50,14 @@ SizePolicyEdit::SizePolicyEdit(Property *property, QWidget *parent, const char *
if(!m_spValues) {
- m_spValues = new QMap<QString, QVariant>();
- (*m_spValues)[i18n("Size Policy", "Fixed")] = QSizePolicy::Fixed;
- (*m_spValues)[i18n("Size Policy", "Minimum")] = QSizePolicy::Minimum;
- (*m_spValues)[i18n("Size Policy", "Maximum")] = QSizePolicy::Maximum;
- (*m_spValues)[i18n("Size Policy", "Preferred")] = QSizePolicy::Preferred;
- (*m_spValues)[i18n("Size Policy", "Expanding")] = QSizePolicy::Expanding;
- (*m_spValues)[i18n("Size Policy", "Minimum Expanding")] = QSizePolicy::MinimumExpanding;
- (*m_spValues)[i18n("Size Policy", "Ignored")] = QSizePolicy::Ignored;
+ m_spValues = new TQMap<TQString, TQVariant>();
+ (*m_spValues)[i18n("Size Policy", "Fixed")] = TQSizePolicy::Fixed;
+ (*m_spValues)[i18n("Size Policy", "Minimum")] = TQSizePolicy::Minimum;
+ (*m_spValues)[i18n("Size Policy", "Maximum")] = TQSizePolicy::Maximum;
+ (*m_spValues)[i18n("Size Policy", "Preferred")] = TQSizePolicy::Preferred;
+ (*m_spValues)[i18n("Size Policy", "Expanding")] = TQSizePolicy::Expanding;
+ (*m_spValues)[i18n("Size Policy", "Minimum Expanding")] = TQSizePolicy::MinimumExpanding;
+ (*m_spValues)[i18n("Size Policy", "Ignored")] = TQSizePolicy::Ignored;
}
}
@@ -67,50 +67,50 @@ SizePolicyEdit::~SizePolicyEdit()
m_spValues = 0;
}
-QVariant
+TQVariant
SizePolicyEdit::value() const
{
return m_value;
}
void
-SizePolicyEdit::setValue(const QVariant &value, bool emitChange)
+SizePolicyEdit::setValue(const TQVariant &value, bool emitChange)
{
m_value = value;
- m_edit->setText(QString("%1/%2/%3/%4").arg(findDescription(value.toSizePolicy().horData())).
- arg(findDescription(value.toSizePolicy().verData())).
- arg(value.toSizePolicy().horStretch()).arg(value.toSizePolicy().verStretch()));
- QToolTip::add(this, m_edit->text());
+ m_edit->setText(TQString("%1/%2/%3/%4").tqarg(findDescription(value.toSizePolicy().horData())).
+ tqarg(findDescription(value.toSizePolicy().verData())).
+ tqarg(value.toSizePolicy().horStretch()).tqarg(value.toSizePolicy().verStretch()));
+ TQToolTip::add(this, m_edit->text());
if (emitChange)
emit valueChanged(this);
}
void
-SizePolicyEdit::drawViewer(QPainter *p, const QColorGroup &cg, const QRect &r, const QVariant &value)
+SizePolicyEdit::drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value)
{
// p->eraseRect(r);
-// p->drawText(r, Qt::AlignLeft | Qt::AlignVCenter | Qt::SingleLine,
- QRect rect(r);
+// p->drawText(r, TQt::AlignLeft | TQt::AlignVCenter | TQt::SingleLine,
+ TQRect rect(r);
rect.setBottom(r.bottom()+1);
Widget::drawViewer(p, cg, rect,
- QString("%1/%2/%3/%4").arg(findDescription(value.toSizePolicy().horData())).
- arg(findDescription(value.toSizePolicy().verData())).
- arg(value.toSizePolicy().horStretch()).arg(value.toSizePolicy().verStretch()));
+ TQString("%1/%2/%3/%4").tqarg(findDescription(value.toSizePolicy().horData())).
+ tqarg(findDescription(value.toSizePolicy().verData())).
+ tqarg(value.toSizePolicy().horStretch()).tqarg(value.toSizePolicy().verStretch()));
}
-QString
-SizePolicyEdit::findDescription(const QVariant &value) const
+TQString
+SizePolicyEdit::findDescription(const TQVariant &value) const
{
if(!m_spValues)
- return QString::null;
+ return TQString();
- QMap<QString, QVariant>::ConstIterator endIt = m_spValues->constEnd();
- for (QMap<QString, QVariant>::ConstIterator it = m_spValues->constBegin(); it != endIt; ++ it) {
+ TQMap<TQString, TQVariant>::ConstIterator endIt = m_spValues->constEnd();
+ for (TQMap<TQString, TQVariant>::ConstIterator it = m_spValues->constBegin(); it != endIt; ++ it) {
if (it.data() == value)
return it.key();
}
- return QString::null;;
+ return TQString();;
}
void
diff --git a/lib/koproperty/editors/sizepolicyedit.h b/lib/koproperty/editors/sizepolicyedit.h
index 0edd3b38..81ffab40 100644
--- a/lib/koproperty/editors/sizepolicyedit.h
+++ b/lib/koproperty/editors/sizepolicyedit.h
@@ -23,35 +23,36 @@
#include "../widget.h"
-#include <qvariant.h>
+#include <tqvariant.h>
-template<class U, class T> class QMap;
+template<class U, class T> class TQMap;
-class QLabel;
+class TQLabel;
namespace KoProperty {
class KOPROPERTY_EXPORT SizePolicyEdit : public Widget
{
Q_OBJECT
+ TQ_OBJECT
public:
- SizePolicyEdit(Property *property, QWidget *parent=0, const char *name=0);
+ SizePolicyEdit(Property *property, TQWidget *tqparent=0, const char *name=0);
virtual ~SizePolicyEdit();
- virtual QVariant value() const;
- virtual void setValue(const QVariant &value, bool emitChange=true);
+ virtual TQVariant value() const;
+ virtual void setValue(const TQVariant &value, bool emitChange=true);
- virtual void drawViewer(QPainter *p, const QColorGroup &cg, const QRect &r, const QVariant &value);
+ virtual void drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value);
protected:
virtual void setReadOnlyInternal(bool readOnly);
- QString findDescription(const QVariant &value) const;
+ TQString findDescription(const TQVariant &value) const;
private:
- QVariant m_value;
- QLabel *m_edit;
- static QMap<QString, QVariant> *m_spValues;
+ TQVariant m_value;
+ TQLabel *m_edit;
+ static TQMap<TQString, TQVariant> *m_spValues;
};
}
diff --git a/lib/koproperty/editors/spinbox.cpp b/lib/koproperty/editors/spinbox.cpp
index 2e4bcc7c..b90485bb 100644
--- a/lib/koproperty/editors/spinbox.cpp
+++ b/lib/koproperty/editors/spinbox.cpp
@@ -22,33 +22,33 @@
#include "property.h"
-#include <qlayout.h>
-#include <qobjectlist.h>
-#include <qvariant.h>
-#include <qpainter.h>
-#include <qlineedit.h>
+#include <tqlayout.h>
+#include <tqobjectlist.h>
+#include <tqvariant.h>
+#include <tqpainter.h>
+#include <tqlineedit.h>
#include <kglobal.h>
#include <klocale.h>
using namespace KoProperty;
-IntSpinBox::IntSpinBox(int lower, int upper, int step, int value, int base, IntEdit *parent, const char *name)
-: KIntSpinBox(lower, upper, step, value, base, parent, name)
+IntSpinBox::IntSpinBox(int lower, int upper, int step, int value, int base, IntEdit *tqparent, const char *name)
+: KIntSpinBox(lower, upper, step, value, base, tqparent, name)
{
- editor()->setAlignment(Qt::AlignLeft);
+ editor()->tqsetAlignment(TQt::AlignLeft);
installEventFilter(editor());
installEventFilter(this);
- QObjectList *spinwidgets = queryList( "QSpinWidget", 0, false, true );
- QSpinWidget* spin = static_cast<QSpinWidget*>(spinwidgets->first());
+ TQObjectList *spinwidgets = queryList( TQSPINWIDGET_OBJECT_NAME_STRING, 0, false, true );
+ TQSpinWidget* spin = static_cast<TQSpinWidget*>(TQT_TQWIDGET(spinwidgets->first()));
if (spin)
spin->installEventFilter(this);
delete spinwidgets;
}
-void IntSpinBox::setValue(const QVariant &value)
+void IntSpinBox::setValue(const TQVariant &value)
{
- if (dynamic_cast<IntEdit*>(parentWidget()) && dynamic_cast<IntEdit*>(parentWidget())->isReadOnly())
+ if (dynamic_cast<IntEdit*>(tqparentWidget()) && dynamic_cast<IntEdit*>(tqparentWidget())->isReadOnly())
return;
if (value.isNull())
editor()->clear();
@@ -57,22 +57,22 @@ void IntSpinBox::setValue(const QVariant &value)
}
bool
-IntSpinBox::eventFilter(QObject *o, QEvent *e)
+IntSpinBox::eventFilter(TQObject *o, TQEvent *e)
{
- if(o == editor())
+ if(TQT_BASE_OBJECT(o) == editor())
{
- if(e->type() == QEvent::KeyPress)
+ if(e->type() == TQEvent::KeyPress)
{
- QKeyEvent* ev = static_cast<QKeyEvent*>(e);
+ TQKeyEvent* ev = TQT_TQKEYEVENT(e);
if((ev->key()==Key_Up || ev->key()==Key_Down) && ev->state() !=ControlButton)
{
- parentWidget()->eventFilter(o, e);
+ tqparentWidget()->eventFilter(o, e);
return true;
}
}
}
- if ((o == editor() || o == this || o->parent() == this)
- && e->type() == QEvent::Wheel && static_cast<IntEdit*>(parentWidget())->isReadOnly())
+ if ((TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(editor()) || TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(this) || TQT_BASE_OBJECT(o->tqparent()) == TQT_BASE_OBJECT(this))
+ && e->type() == TQEvent::Wheel && static_cast<IntEdit*>(tqparentWidget())->isReadOnly())
{
return true; //avoid value changes for read-only widget
}
@@ -83,12 +83,12 @@ IntSpinBox::eventFilter(QObject *o, QEvent *e)
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-IntEdit::IntEdit(Property *property, QWidget *parent, const char *name)
- : Widget(property, parent, name)
+IntEdit::IntEdit(Property *property, TQWidget *tqparent, const char *name)
+ : Widget(property, tqparent, name)
{
- QVariant minVal( property ? property->option("min") : 0 );
- QVariant maxVal( property ? property->option("max") : QVariant() );
- QVariant minValueText( property ? property->option("minValueText") : QVariant() );
+ TQVariant minVal( property ? property->option("min") : 0 );
+ TQVariant maxVal( property ? property->option("max") : TQVariant() );
+ TQVariant minValueText( property ? property->option("minValueText") : TQVariant() );
if (minVal.isNull())
minVal = 0;
if (maxVal.isNull())
@@ -102,22 +102,22 @@ IntEdit::IntEdit(Property *property, QWidget *parent, const char *name)
setLeavesTheSpaceForRevertButton(true);
setFocusWidget(m_edit);
- connect(m_edit, SIGNAL(valueChanged(int)), this, SLOT(slotValueChanged(int)));
+ connect(m_edit, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotValueChanged(int)));
}
IntEdit::~IntEdit()
{}
-QVariant
+TQVariant
IntEdit::value() const
{
if (m_edit->cleanText().isEmpty())
- return QVariant();
+ return TQVariant();
return m_edit->value();
}
void
-IntEdit::setValue(const QVariant &value, bool emitChange)
+IntEdit::setValue(const TQVariant &value, bool emitChange)
{
m_edit->blockSignals(true);
m_edit->setValue(value);
@@ -128,13 +128,13 @@ IntEdit::setValue(const QVariant &value, bool emitChange)
}
void
-IntEdit::drawViewer(QPainter *p, const QColorGroup &cg, const QRect &r, const QVariant &value)
+IntEdit::drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value)
{
- QString valueText = value.toString();
+ TQString valueText = value.toString();
if (property() && property()->hasOptions()) {
//replace min value with minValueText if defined
- QVariant minValue( property()->option("min") );
- QVariant minValueText( property()->option("minValueText") );
+ TQVariant minValue( property()->option("min") );
+ TQVariant minValueText( property()->option("minValueText") );
if (!minValue.isNull() && !minValueText.isNull() && minValue.toInt() == value.toInt()) {
valueText = minValueText.toString();
}
@@ -142,7 +142,7 @@ IntEdit::drawViewer(QPainter *p, const QColorGroup &cg, const QRect &r, const QV
Widget::drawViewer(p, cg, r, valueText);
// p->eraseRect(r);
-// p->drawText(r, Qt::AlignLeft | Qt::AlignVCenter | Qt::SingleLine, valueText);
+// p->drawText(r, TQt::AlignLeft | TQt::AlignVCenter | TQt::SingleLine, valueText);
}
void
@@ -154,8 +154,8 @@ IntEdit::slotValueChanged(int)
void
IntEdit::updateSpinWidgets()
{
- QObjectList *spinwidgets = queryList( "QSpinWidget", 0, false, true );
- QSpinWidget* spin = static_cast<QSpinWidget*>(spinwidgets->first());
+ TQObjectList *spinwidgets = queryList( TQSPINWIDGET_OBJECT_NAME_STRING, 0, false, true );
+ TQSpinWidget* spin = static_cast<TQSpinWidget*>(TQT_TQWIDGET(spinwidgets->first()));
if (spin) {
spin->setUpEnabled(!isReadOnly());
spin->setDownEnabled(!isReadOnly());
@@ -176,36 +176,36 @@ IntEdit::setReadOnlyInternal(bool readOnly)
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-DoubleSpinBox::DoubleSpinBox (double lower, double upper, double step, double value, int precision, DoubleEdit *parent)
-: KDoubleSpinBox(lower, upper, step, value, precision, parent)
+DoubleSpinBox::DoubleSpinBox (double lower, double upper, double step, double value, int precision, DoubleEdit *tqparent)
+: KDoubleSpinBox(lower, upper, step, value, precision, tqparent)
{
- editor()->setAlignment(Qt::AlignLeft);
+ editor()->tqsetAlignment(TQt::AlignLeft);
installEventFilter(editor());
installEventFilter(this);
- QObjectList *spinwidgets = queryList( "QSpinWidget", 0, false, true );
- QSpinWidget* spin = static_cast<QSpinWidget*>(spinwidgets->first());
+ TQObjectList *spinwidgets = queryList( TQSPINWIDGET_OBJECT_NAME_STRING, 0, false, true );
+ TQSpinWidget* spin = static_cast<TQSpinWidget*>(TQT_TQWIDGET(spinwidgets->first()));
if (spin)
spin->installEventFilter(this);
delete spinwidgets;
}
bool
-DoubleSpinBox::eventFilter(QObject *o, QEvent *e)
+DoubleSpinBox::eventFilter(TQObject *o, TQEvent *e)
{
- if(o == editor())
+ if(TQT_BASE_OBJECT(o) == editor())
{
- if(e->type() == QEvent::KeyPress)
+ if(e->type() == TQEvent::KeyPress)
{
- QKeyEvent* ev = static_cast<QKeyEvent*>(e);
+ TQKeyEvent* ev = TQT_TQKEYEVENT(e);
if((ev->key()==Key_Up || ev->key()==Key_Down) && ev->state()!=ControlButton)
{
- parentWidget()->eventFilter(o, e);
+ tqparentWidget()->eventFilter(o, e);
return true;
}
}
}
- if ((o == editor() || o == this || o->parent() == this)
- && e->type() == QEvent::Wheel && static_cast<IntEdit*>(parentWidget())->isReadOnly())
+ if ((TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(editor()) || TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(this) || TQT_BASE_OBJECT(o->tqparent()) == TQT_BASE_OBJECT(this))
+ && e->type() == TQEvent::Wheel && static_cast<IntEdit*>(tqparentWidget())->isReadOnly())
{
return true; //avoid value changes for read-only widget
}
@@ -214,9 +214,9 @@ DoubleSpinBox::eventFilter(QObject *o, QEvent *e)
}
-void DoubleSpinBox::setValue( const QVariant& value )
+void DoubleSpinBox::setValue( const TQVariant& value )
{
- if (dynamic_cast<DoubleEdit*>(parentWidget()) && dynamic_cast<DoubleEdit*>(parentWidget())->isReadOnly())
+ if (dynamic_cast<DoubleEdit*>(tqparentWidget()) && dynamic_cast<DoubleEdit*>(tqparentWidget())->isReadOnly())
return;
if (value.isNull())
editor()->clear();
@@ -226,14 +226,14 @@ void DoubleSpinBox::setValue( const QVariant& value )
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-DoubleEdit::DoubleEdit(Property *property, QWidget *parent, const char *name)
- : Widget(property, parent, name)
+DoubleEdit::DoubleEdit(Property *property, TQWidget *tqparent, const char *name)
+ : Widget(property, tqparent, name)
{
- QVariant minVal( property ? property->option("min") : 0 );
- QVariant maxVal( property ? property->option("max") : QVariant() );
- QVariant step( property ? property->option("step") : QVariant());
- QVariant precision( property ? property->option("precision") : QVariant());
- QVariant minValueText( property ? property->option("minValueText") : QVariant() );
+ TQVariant minVal( property ? property->option("min") : 0 );
+ TQVariant maxVal( property ? property->option("max") : TQVariant() );
+ TQVariant step( property ? property->option("step") : TQVariant());
+ TQVariant precision( property ? property->option("precision") : TQVariant());
+ TQVariant minValueText( property ? property->option("minValueText") : TQVariant() );
if (minVal.isNull())
minVal = 0;
if (maxVal.isNull())
@@ -247,28 +247,28 @@ DoubleEdit::DoubleEdit(Property *property, QWidget *parent, const char *name)
0, precision.toInt(), this);
if (!minValueText.isNull())
m_edit->setSpecialValueText(minValueText.toString());
- m_edit->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+ m_edit->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding);
m_edit->setMinimumHeight(5);
setEditor(m_edit);
setLeavesTheSpaceForRevertButton(true);
setFocusWidget(m_edit);
- connect(m_edit, SIGNAL(valueChanged(double)), this, SLOT(slotValueChanged(double)));
+ connect(m_edit, TQT_SIGNAL(valueChanged(double)), this, TQT_SLOT(slotValueChanged(double)));
}
DoubleEdit::~DoubleEdit()
{}
-QVariant
+TQVariant
DoubleEdit::value() const
{
if (m_edit->cleanText().isEmpty())
- return QVariant();
+ return TQVariant();
return m_edit->value();
}
void
-DoubleEdit::setValue(const QVariant &value, bool emitChange)
+DoubleEdit::setValue(const TQVariant &value, bool emitChange)
{
m_edit->blockSignals(true);
m_edit->setValue(value);
@@ -279,23 +279,23 @@ DoubleEdit::setValue(const QVariant &value, bool emitChange)
}
void
-DoubleEdit::drawViewer(QPainter *p, const QColorGroup &cg, const QRect &r, const QVariant &value)
+DoubleEdit::drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value)
{
- QString valueText;
+ TQString valueText;
if (property() && property()->hasOptions()) {
//replace min value with minValueText if defined
- QVariant minValue( property()->option("min") );
- QVariant minValueText( property()->option("minValueText") );
+ TQVariant minValue( property()->option("min") );
+ TQVariant minValueText( property()->option("minValueText") );
if (!minValue.isNull() && !minValueText.isNull() && minValue.toString().toDouble() == value.toString().toDouble()) {
valueText = minValueText.toString();
}
}
if (valueText.isEmpty())
- valueText = QString(value.toString()).replace('.', KGlobal::locale()->decimalSymbol());
+ valueText = TQString(value.toString()).tqreplace('.', KGlobal::locale()->decimalSymbol());
Widget::drawViewer(p, cg, r, valueText);
// p->eraseRect(r);
-// p->drawText(r, Qt::AlignLeft | Qt::AlignVCenter | Qt::SingleLine, valueText);
+// p->drawText(r, TQt::AlignLeft | TQt::AlignVCenter | TQt::SingleLine, valueText);
}
void
@@ -307,8 +307,8 @@ DoubleEdit::slotValueChanged(double)
void
DoubleEdit::updateSpinWidgets()
{
- QObjectList *spinwidgets = queryList( "QSpinWidget", 0, false, true );
- QSpinWidget* spin = static_cast<QSpinWidget*>(spinwidgets->first());
+ TQObjectList *spinwidgets = queryList( TQSPINWIDGET_OBJECT_NAME_STRING, 0, false, true );
+ TQSpinWidget* spin = static_cast<TQSpinWidget*>(TQT_TQWIDGET(spinwidgets->first()));
if (spin) {
spin->setUpEnabled(!isReadOnly());
spin->setDownEnabled(!isReadOnly());
diff --git a/lib/koproperty/editors/spinbox.h b/lib/koproperty/editors/spinbox.h
index 527aae4f..d16cc3e9 100644
--- a/lib/koproperty/editors/spinbox.h
+++ b/lib/koproperty/editors/spinbox.h
@@ -35,29 +35,31 @@ class DoubleEdit;
class IntSpinBox : public KIntSpinBox
{
Q_OBJECT
+ TQ_OBJECT
public:
IntSpinBox(int lower, int upper, int step, int value, int base=10,
- IntEdit *parent=0, const char *name=0);
+ IntEdit *tqparent=0, const char *name=0);
virtual ~IntSpinBox() {;}
- virtual void setValue(const QVariant &value);
+ virtual void setValue(const TQVariant &value);
- virtual bool eventFilter(QObject *o, QEvent *e);
- QLineEdit * editor () const { return KIntSpinBox::editor(); }
+ virtual bool eventFilter(TQObject *o, TQEvent *e);
+ TQLineEdit * editor () const { return KIntSpinBox::editor(); }
};
class KOPROPERTY_EXPORT IntEdit : public Widget
{
Q_OBJECT
+ TQ_OBJECT
public:
- IntEdit(Property *property, QWidget *parent=0, const char *name=0);
+ IntEdit(Property *property, TQWidget *tqparent=0, const char *name=0);
virtual ~IntEdit();
- virtual QVariant value() const;
- virtual void setValue(const QVariant &value, bool emitChange=true);
- virtual void drawViewer(QPainter *p, const QColorGroup &cg, const QRect &r, const QVariant &value);
+ virtual TQVariant value() const;
+ virtual void setValue(const TQVariant &value, bool emitChange=true);
+ virtual void drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value);
protected:
virtual void setReadOnlyInternal(bool readOnly);
@@ -75,31 +77,33 @@ class KOPROPERTY_EXPORT IntEdit : public Widget
class DoubleSpinBox : public KDoubleSpinBox
{
Q_OBJECT
+ TQ_OBJECT
public:
//! \todo Support setting precision limits, step, etc.
DoubleSpinBox(double lower, double upper, double step, double value=0,
- int precision=2, DoubleEdit *parent=0);
+ int precision=2, DoubleEdit *tqparent=0);
virtual ~DoubleSpinBox() {;}
- virtual bool eventFilter(QObject *o, QEvent *e);
- QLineEdit * editor () const { return KDoubleSpinBox::editor(); }
+ virtual bool eventFilter(TQObject *o, TQEvent *e);
+ TQLineEdit * editor () const { return KDoubleSpinBox::editor(); }
public slots:
- virtual void setValue( const QVariant& value );
+ virtual void setValue( const TQVariant& value );
};
class KOPROPERTY_EXPORT DoubleEdit : public Widget
{
Q_OBJECT
+ TQ_OBJECT
public:
- DoubleEdit(Property *property, QWidget *parent=0, const char *name=0);
+ DoubleEdit(Property *property, TQWidget *tqparent=0, const char *name=0);
virtual ~DoubleEdit();
- virtual QVariant value() const;
- virtual void setValue(const QVariant &value, bool emitChange=true);
- virtual void drawViewer(QPainter *p, const QColorGroup &cg, const QRect &r, const QVariant &value);
+ virtual TQVariant value() const;
+ virtual void setValue(const TQVariant &value, bool emitChange=true);
+ virtual void drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value);
protected:
virtual void setReadOnlyInternal(bool readOnly);
diff --git a/lib/koproperty/editors/stringedit.cpp b/lib/koproperty/editors/stringedit.cpp
index 8c58b511..d878efa1 100644
--- a/lib/koproperty/editors/stringedit.cpp
+++ b/lib/koproperty/editors/stringedit.cpp
@@ -20,37 +20,37 @@
#include "stringedit.h"
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qvariant.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqvariant.h>
using namespace KoProperty;
-StringEdit::StringEdit(Property *property, QWidget *parent, const char *name)
- : Widget(property, parent, name)
+StringEdit::StringEdit(Property *property, TQWidget *tqparent, const char *name)
+ : Widget(property, tqparent, name)
{
- QHBoxLayout *l = new QHBoxLayout(this, 0, 0);
- m_edit = new QLineEdit(this);
- m_edit->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+ TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0);
+ m_edit = new TQLineEdit(this);
+ m_edit->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding);
m_edit->setMargin(1);
m_edit->setMinimumHeight(5);
l->addWidget(m_edit);
setFocusWidget(m_edit);
- connect(m_edit, SIGNAL(textChanged(const QString&)), this, SLOT(slotValueChanged(const QString&)));
+ connect(m_edit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotValueChanged(const TQString&)));
}
StringEdit::~StringEdit()
{}
-QVariant
+TQVariant
StringEdit::value() const
{
return m_edit->text();
}
void
-StringEdit::setValue(const QVariant &value, bool emitChange)
+StringEdit::setValue(const TQVariant &value, bool emitChange)
{
m_edit->blockSignals(true);
m_edit->setText(value.toString());
@@ -60,7 +60,7 @@ StringEdit::setValue(const QVariant &value, bool emitChange)
}
void
-StringEdit::slotValueChanged(const QString &)
+StringEdit::slotValueChanged(const TQString &)
{
emit valueChanged(this);
}
diff --git a/lib/koproperty/editors/stringedit.h b/lib/koproperty/editors/stringedit.h
index 69dd45a2..fff36609 100644
--- a/lib/koproperty/editors/stringedit.h
+++ b/lib/koproperty/editors/stringedit.h
@@ -23,29 +23,30 @@
#include "../widget.h"
-class QLineEdit;
+class TQLineEdit;
namespace KoProperty {
class KOPROPERTY_EXPORT StringEdit : public Widget
{
Q_OBJECT
+ TQ_OBJECT
public:
- StringEdit(Property *property, QWidget *parent=0, const char *name=0);
+ StringEdit(Property *property, TQWidget *tqparent=0, const char *name=0);
virtual ~StringEdit();
- virtual QVariant value() const;
- virtual void setValue(const QVariant &value, bool emitChange=true);
+ virtual TQVariant value() const;
+ virtual void setValue(const TQVariant &value, bool emitChange=true);
protected:
virtual void setReadOnlyInternal(bool readOnly);
protected slots:
- void slotValueChanged(const QString&);
+ void slotValueChanged(const TQString&);
protected:
- QLineEdit *m_edit;
+ TQLineEdit *m_edit;
};
}
diff --git a/lib/koproperty/editors/stringlistedit.cpp b/lib/koproperty/editors/stringlistedit.cpp
index 44238ff9..eb4dd659 100644
--- a/lib/koproperty/editors/stringlistedit.cpp
+++ b/lib/koproperty/editors/stringlistedit.cpp
@@ -20,12 +20,12 @@
#include "stringlistedit.h"
-#include <qlineedit.h>
-#include <qlayout.h>
-#include <qdialog.h>
-#include <qpainter.h>
-#include <qvariant.h>
-#include <qpushbutton.h>
+#include <tqlineedit.h>
+#include <tqlayout.h>
+#include <tqdialog.h>
+#include <tqpainter.h>
+#include <tqvariant.h>
+#include <tqpushbutton.h>
#include <keditlistbox.h>
#include <kdialogbase.h>
@@ -37,38 +37,38 @@
using namespace KoProperty;
-StringListEdit::StringListEdit(Property *property, QWidget *parent, const char *name)
- : Widget(property, parent, name)
+StringListEdit::StringListEdit(Property *property, TQWidget *tqparent, const char *name)
+ : Widget(property, tqparent, name)
{
setHasBorders(false);
- QHBoxLayout *l = new QHBoxLayout(this, 0, 0);
+ TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0);
- m_edit = new QLineEdit(this);
+ m_edit = new TQLineEdit(this);
m_edit->setLineWidth(0);
m_edit->setReadOnly(true);
- m_edit->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+ m_edit->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding);
m_edit->setMinimumHeight(5);
l->addWidget(m_edit);
- m_selectButton = new QPushButton("...", this);
- m_selectButton->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Expanding);
+ m_selectButton = new TQPushButton("...", this);
+ m_selectButton->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Expanding);
l->addWidget(m_selectButton);
setFocusWidget(m_selectButton);
- connect(m_selectButton, SIGNAL(clicked()), this, SLOT(showEditor()));
+ connect(m_selectButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(showEditor()));
}
StringListEdit::~StringListEdit()
{}
-QVariant
+TQVariant
StringListEdit::value() const
{
return m_list;
}
void
-StringListEdit::setValue(const QVariant &value, bool emitChange)
+StringListEdit::setValue(const TQVariant &value, bool emitChange)
{
m_list = value.toStringList();
m_edit->setText(value.toStringList().join(", "));
@@ -77,24 +77,24 @@ StringListEdit::setValue(const QVariant &value, bool emitChange)
}
void
-StringListEdit::drawViewer(QPainter *p, const QColorGroup &cg, const QRect &r, const QVariant &value)
+StringListEdit::drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value)
{
// p->eraseRect(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(", "));
Widget::drawViewer(p, cg, r, value.toStringList().join(", "));
}
void
StringListEdit::showEditor()
{
- KDialogBase dialog(this->topLevelWidget(), "stringlist_dialog", true, i18n("Edit List of Items"),
+ KDialogBase dialog(this->tqtopLevelWidget(), "stringlist_dialog", true, i18n("Edit List of Items"),
KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, false);
- KEditListBox *edit = new KEditListBox(i18n("Contents of %1").arg(property()->caption()), &dialog, "editlist");
+ KEditListBox *edit = new KEditListBox(i18n("Contents of %1").tqarg(property()->caption()), &dialog, "editlist");
dialog.setMainWidget(edit);
edit->insertStringList(m_list);
- if(dialog.exec() == QDialog::Accepted)
+ if(dialog.exec() == TQDialog::Accepted)
{
m_list = edit->items();
m_edit->setText(m_list.join(", "));
diff --git a/lib/koproperty/editors/stringlistedit.h b/lib/koproperty/editors/stringlistedit.h
index 0370e98a..846e2362 100644
--- a/lib/koproperty/editors/stringlistedit.h
+++ b/lib/koproperty/editors/stringlistedit.h
@@ -23,25 +23,26 @@
#include "../widget.h"
-#include <qstringlist.h>
+#include <tqstringlist.h>
-class QLineEdit;
-class QPushButton;
+class TQLineEdit;
+class TQPushButton;
namespace KoProperty {
class KOPROPERTY_EXPORT StringListEdit : public Widget
{
Q_OBJECT
+ TQ_OBJECT
public:
- StringListEdit(Property *property, QWidget *parent=0, const char *name=0);
+ StringListEdit(Property *property, TQWidget *tqparent=0, const char *name=0);
virtual ~StringListEdit();
- virtual QVariant value() const;
- virtual void setValue(const QVariant &value, bool emitChange=true);
+ virtual TQVariant value() const;
+ virtual void setValue(const TQVariant &value, bool emitChange=true);
- virtual void drawViewer(QPainter *p, const QColorGroup &cg, const QRect &r, const QVariant &value);
+ virtual void drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value);
protected:
virtual void setReadOnlyInternal(bool readOnly);
@@ -50,9 +51,9 @@ class KOPROPERTY_EXPORT StringListEdit : public Widget
void showEditor();
private:
- QLineEdit *m_edit;
- QStringList m_list;
- QPushButton *m_selectButton;
+ TQLineEdit *m_edit;
+ TQStringList m_list;
+ TQPushButton *m_selectButton;
};
}
diff --git a/lib/koproperty/editors/symbolcombo.cpp b/lib/koproperty/editors/symbolcombo.cpp
index ee0056bd..289badbb 100644
--- a/lib/koproperty/editors/symbolcombo.cpp
+++ b/lib/koproperty/editors/symbolcombo.cpp
@@ -18,11 +18,11 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qlineedit.h>
-#include <qpushbutton.h>
-#include <qlayout.h>
-#include <qpainter.h>
-#include <qvariant.h>
+#include <tqlineedit.h>
+#include <tqpushbutton.h>
+#include <tqlayout.h>
+#include <tqpainter.h>
+#include <tqvariant.h>
#include <kcharselect.h>
#include <klocale.h>
@@ -32,51 +32,47 @@
using namespace KoProperty;
-SymbolCombo::SymbolCombo(Property *property, QWidget *parent, const char *name)
- : Widget(property, parent, name)
+SymbolCombo::SymbolCombo(Property *property, TQWidget *tqparent, const char *name)
+ : Widget(property, tqparent, name)
{
setHasBorders(false);
- QHBoxLayout *l = new QHBoxLayout(this);
+ TQHBoxLayout *l = new TQHBoxLayout(this);
- m_edit = new QLineEdit(this);
+ m_edit = new TQLineEdit(this);
m_edit->setLineWidth(0);
m_edit->setReadOnly(true);
- m_edit->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+ m_edit->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding);
m_edit->setMinimumHeight(5);
m_edit->setMaxLength(1);
l->addWidget(m_edit);
- m_select = new QPushButton("...", this);
- m_select->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::MinimumExpanding);
+ m_select = new TQPushButton("...", this);
+ m_select->tqsetSizePolicy(TQSizePolicy::Maximum, TQSizePolicy::MinimumExpanding);
m_select->setMinimumHeight(5);
l->addWidget(m_select);
- connect(m_select, SIGNAL(clicked()), this, SLOT(selectChar()));
- connect(m_edit, SIGNAL(textChanged(const QString&)), this, SLOT(slotValueChanged(const QString&)));
+ connect(m_select, TQT_SIGNAL(clicked()), this, TQT_SLOT(selectChar()));
+ connect(m_edit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotValueChanged(const TQString&)));
}
SymbolCombo::~SymbolCombo()
{}
-QVariant
+TQVariant
SymbolCombo::value() const
{
if (!(m_edit->text().isNull()))
- return m_edit->text().at(0).unicode();
+ return m_edit->text().tqat(0).tqunicode();
else
return 0;
}
void
-SymbolCombo::setValue(const QVariant &value, bool emitChange)
+SymbolCombo::setValue(const TQVariant &value, bool emitChange)
{
-#if QT_VERSION >= 0x030100
if (!(value.isNull()))
-#else
- if (value.canCast(QVariant::Int))
-#endif
{
m_edit->blockSignals(true);
- m_edit->setText(QChar(value.toInt()));
+ m_edit->setText(TQChar(value.toInt()));
m_edit->blockSignals(false);
if (emitChange)
emit valueChanged(this);
@@ -84,17 +80,17 @@ SymbolCombo::setValue(const QVariant &value, bool emitChange)
}
void
-SymbolCombo::drawViewer(QPainter *p, const QColorGroup &cg, const QRect &r, const QVariant &value)
+SymbolCombo::drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value)
{
// p->eraseRect(r);
-// p->drawText(r, Qt::AlignLeft | Qt::AlignVCenter | Qt::SingleLine, QChar(value.toInt()));
- Widget::drawViewer(p, cg, r, QString( QChar(value.toInt()) ));
+// p->drawText(r, TQt::AlignLeft | TQt::AlignVCenter | TQt::SingleLine, TQChar(value.toInt()));
+ Widget::drawViewer(p, cg, r, TQString( TQChar(value.toInt()) ));
}
void
SymbolCombo::selectChar()
{
- KDialogBase dialog(this->topLevelWidget(), "charselect_dialog", true, i18n("Select Char"),
+ KDialogBase dialog(this->tqtopLevelWidget(), "charselect_dialog", true, i18n("Select Char"),
KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, false);
KCharSelect *select = new KCharSelect(&dialog, "select_char");
@@ -103,12 +99,12 @@ SymbolCombo::selectChar()
if (!(m_edit->text().isNull()))
select->setChar(m_edit->text().at(0));
- if (dialog.exec() == QDialog::Accepted)
+ if (dialog.exec() == TQDialog::Accepted)
m_edit->setText(select->chr());
}
void
-SymbolCombo::slotValueChanged(const QString&)
+SymbolCombo::slotValueChanged(const TQString&)
{
emit valueChanged(this);
}
diff --git a/lib/koproperty/editors/symbolcombo.h b/lib/koproperty/editors/symbolcombo.h
index 5812d4a8..7f3e89e1 100644
--- a/lib/koproperty/editors/symbolcombo.h
+++ b/lib/koproperty/editors/symbolcombo.h
@@ -23,34 +23,35 @@
#include "../widget.h"
-class QLineEdit;
-class QPushButton;
+class TQLineEdit;
+class TQPushButton;
namespace KoProperty {
class KOPROPERTY_EXPORT SymbolCombo : public Widget
{
Q_OBJECT
+ TQ_OBJECT
public:
- SymbolCombo(Property *property, QWidget *parent=0, const char *name=0);
+ SymbolCombo(Property *property, TQWidget *tqparent=0, const char *name=0);
virtual ~SymbolCombo();
- virtual QVariant value() const;
- virtual void setValue(const QVariant &value, bool emitChange=true);
+ virtual TQVariant value() const;
+ virtual void setValue(const TQVariant &value, bool emitChange=true);
- virtual void drawViewer(QPainter *p, const QColorGroup &cg, const QRect &r, const QVariant &value);
+ virtual void drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value);
protected:
virtual void setReadOnlyInternal(bool readOnly);
protected slots:
void selectChar();
- void slotValueChanged(const QString &text);
+ void slotValueChanged(const TQString &text);
private:
- QLineEdit *m_edit;
- QPushButton *m_select;
+ TQLineEdit *m_edit;
+ TQPushButton *m_select;
};
}
diff --git a/lib/koproperty/editors/timeedit.cpp b/lib/koproperty/editors/timeedit.cpp
index 3d38d39b..25972f0b 100644
--- a/lib/koproperty/editors/timeedit.cpp
+++ b/lib/koproperty/editors/timeedit.cpp
@@ -20,43 +20,43 @@
#include "timeedit.h"
-#include <qdatetimeedit.h>
-#include <qrangecontrol.h>
-#include <qobjectlist.h>
-#include <qpainter.h>
-#include <qlayout.h>
-#include <qvariant.h>
-#include <qdatetime.h>
+#include <tqdatetimeedit.h>
+#include <tqrangecontrol.h>
+#include <tqobjectlist.h>
+#include <tqpainter.h>
+#include <tqlayout.h>
+#include <tqvariant.h>
+#include <tqdatetime.h>
#include <klocale.h>
#include <kglobal.h>
using namespace KoProperty;
-TimeEdit::TimeEdit(Property *property, QWidget *parent, const char *name)
- : Widget(property, parent, name)
+TimeEdit::TimeEdit(Property *property, TQWidget *tqparent, const char *name)
+ : Widget(property, tqparent, name)
{
- QHBoxLayout *l = new QHBoxLayout(this, 0, 0);
- m_edit = new QTimeEdit(this);
- m_edit->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+ TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0);
+ m_edit = new TQTimeEdit(this);
+ m_edit->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding);
m_edit->setMinimumHeight(5);
l->addWidget(m_edit);
setLeavesTheSpaceForRevertButton(true);
- connect(m_edit, SIGNAL(valueChanged(const QTime&)), this, SLOT(slotValueChanged(const QTime&)));
+ connect(m_edit, TQT_SIGNAL(valueChanged(const TQTime&)), this, TQT_SLOT(slotValueChanged(const TQTime&)));
}
TimeEdit::~TimeEdit()
{}
-QVariant
+TQVariant
TimeEdit::value() const
{
return m_edit->time();
}
void
-TimeEdit::setValue(const QVariant &value, bool emitChange)
+TimeEdit::setValue(const TQVariant &value, bool emitChange)
{
m_edit->blockSignals(true);
m_edit->setTime(value.toTime());
@@ -66,14 +66,14 @@ TimeEdit::setValue(const QVariant &value, bool emitChange)
}
void
-TimeEdit::drawViewer(QPainter *p, const QColorGroup &cg, const QRect &r, const QVariant &value)
+TimeEdit::drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value)
{
Widget::drawViewer(p, cg, r, KGlobal::locale()->formatTime(value.toTime(), true /* include sec*/));
-// p->drawText(r, Qt::AlignLeft | Qt::AlignVCenter | Qt::SingleLine, KGlobal::locale()->formatTime(value.toTime(), true /* include sec*/));
+// p->drawText(r, TQt::AlignLeft | TQt::AlignVCenter | TQt::SingleLine, KGlobal::locale()->formatTime(value.toTime(), true /* include sec*/));
}
void
-TimeEdit::slotValueChanged(const QTime&)
+TimeEdit::slotValueChanged(const TQTime&)
{
emit valueChanged(this);
}
diff --git a/lib/koproperty/editors/timeedit.h b/lib/koproperty/editors/timeedit.h
index d41f4633..1dbec46b 100644
--- a/lib/koproperty/editors/timeedit.h
+++ b/lib/koproperty/editors/timeedit.h
@@ -23,31 +23,32 @@
#include "../widget.h"
-class QTimeEdit;
+class TQTimeEdit;
namespace KoProperty {
class KOPROPERTY_EXPORT TimeEdit : public Widget
{
Q_OBJECT
+ TQ_OBJECT
public:
- TimeEdit(Property *property, QWidget *parent=0, const char *name=0);
+ TimeEdit(Property *property, TQWidget *tqparent=0, const char *name=0);
virtual ~TimeEdit();
- virtual QVariant value() const;
- virtual void setValue(const QVariant &value, bool emitChange=true);
+ virtual TQVariant value() const;
+ virtual void setValue(const TQVariant &value, bool emitChange=true);
- virtual void drawViewer(QPainter *p, const QColorGroup &cg, const QRect &r, const QVariant &value);
+ virtual void drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value);
protected:
virtual void setReadOnlyInternal(bool readOnly);
protected slots:
- void slotValueChanged(const QTime &time);
+ void slotValueChanged(const TQTime &time);
private:
- QTimeEdit *m_edit;
+ TQTimeEdit *m_edit;
};
}
diff --git a/lib/koproperty/editors/urledit.cpp b/lib/koproperty/editors/urledit.cpp
index 41cd5efe..fc16268f 100644
--- a/lib/koproperty/editors/urledit.cpp
+++ b/lib/koproperty/editors/urledit.cpp
@@ -20,8 +20,8 @@
#include "urledit.h"
-#include <qlayout.h>
-#include <qvariant.h>
+#include <tqlayout.h>
+#include <tqvariant.h>
#include <kurlrequester.h>
#include <klineedit.h>
@@ -31,32 +31,32 @@
using namespace KoProperty;
-URLEdit::URLEdit(Property *property, QWidget *parent, const char *name)
- : Widget(property, parent, name)
+URLEdit::URLEdit(Property *property, TQWidget *tqparent, const char *name)
+ : Widget(property, tqparent, name)
{
- QHBoxLayout *l = new QHBoxLayout(this, 0, 0);
+ TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0);
m_edit = new KURLRequester(this);
- m_edit->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+ m_edit->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding);
m_edit->setMinimumHeight(5);
l->addWidget(m_edit);
setProperty(property);
- connect(m_edit, SIGNAL(textChanged(const QString&)), this, SLOT(slotValueChanged(const QString&)));
- m_edit->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
+ connect(m_edit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotValueChanged(const TQString&)));
+ m_edit->tqsetSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
}
URLEdit::~URLEdit()
{}
-QVariant
+TQVariant
URLEdit::value() const
{
return m_edit->url();
}
void
-URLEdit::setValue(const QVariant &value, bool emitChange)
+URLEdit::setValue(const TQVariant &value, bool emitChange)
{
m_edit->blockSignals(true);
m_edit->setURL(value.toString());
@@ -66,7 +66,7 @@ URLEdit::setValue(const QVariant &value, bool emitChange)
}
void
-URLEdit::slotValueChanged(const QString&)
+URLEdit::slotValueChanged(const TQString&)
{
emit valueChanged(this);
}
diff --git a/lib/koproperty/editors/urledit.h b/lib/koproperty/editors/urledit.h
index 7bebf7b1..167738df 100644
--- a/lib/koproperty/editors/urledit.h
+++ b/lib/koproperty/editors/urledit.h
@@ -30,13 +30,14 @@ namespace KoProperty {
class KOPROPERTY_EXPORT URLEdit : public Widget
{
Q_OBJECT
+ TQ_OBJECT
public:
- URLEdit(Property *property, QWidget *parent=0, const char *name=0);
+ URLEdit(Property *property, TQWidget *tqparent=0, const char *name=0);
virtual ~URLEdit();
- virtual QVariant value() const;
- virtual void setValue(const QVariant &value, bool emitChange=true);
+ virtual TQVariant value() const;
+ virtual void setValue(const TQVariant &value, bool emitChange=true);
virtual void setProperty(Property *property);
@@ -44,7 +45,7 @@ class KOPROPERTY_EXPORT URLEdit : public Widget
virtual void setReadOnlyInternal(bool readOnly);
protected slots:
- void slotValueChanged(const QString &url);
+ void slotValueChanged(const TQString &url);
private:
KURLRequester *m_edit;
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;
}
diff --git a/lib/koproperty/factory.h b/lib/koproperty/factory.h
index eba55f62..8abc93b3 100644
--- a/lib/koproperty/factory.h
+++ b/lib/koproperty/factory.h
@@ -24,9 +24,9 @@
#include "koproperty_global.h"
#include <kstaticdeleter.h>
-#include <qobject.h>
+#include <tqobject.h>
-template<class U> class QValueList;
+template<class U> class TQValueList;
namespace KoProperty {
@@ -40,20 +40,20 @@ class FactoryManagerPrivate;
//typedef CustomProperty *(*createCustomProperty) (Property*);
//! \brief A prototype for custom property factory
-class KOPROPERTY_EXPORT CustomPropertyFactory : public QObject
+class KOPROPERTY_EXPORT CustomPropertyFactory : public TQObject
{
public:
- CustomPropertyFactory(QObject *parent);
+ CustomPropertyFactory(TQObject *tqparent);
virtual ~CustomPropertyFactory();
- /*! \return a new instance of custom property for \a parent.
+ /*! \return a new instance of custom property for \a tqparent.
Implement this for property types you want to support.
- Use parent->type() to get type of the property. */
- virtual CustomProperty* createCustomProperty(Property *parent) = 0;
+ Use tqparent->type() to get type of the property. */
+ virtual CustomProperty* createCustomProperty(Property *tqparent) = 0;
/*! \return a new instance of custom property for \a property.
Implement this for property editor types you want to support.
- Use parent->type() to get type of the property. */
+ Use tqparent->type() to get type of the property. */
virtual Widget* createCustomWidget(Property *property) = 0;
};
@@ -81,15 +81,15 @@ class KOPROPERTY_EXPORT CustomPropertyFactory : public QObject
\section custom_prop_composed Using Custom Properties to create composed properties
Use a composed property when you need more than one editor for a property. Examples
are rect, size or point properties.
- If you create a composed property, both parent and children properties must have custom
+ If you create a composed property, both tqparent and tqchildren properties must have custom
(different) types.
- Child properties are created in CustomProperty constructor of the <b>parent</b> type,
- by adding CustomProperty::property() as parent in Property constructor.\n
+ Child properties are created in CustomProperty constructor of the <b>tqparent</b> type,
+ by adding CustomProperty::property() as tqparent in Property constructor.\n
Child properties should return handleValue() == true and in CustomProperty::setValue(),
- parent's Property::setValue() should be called, making sure that useCustomProperty argument is set
+ tqparent's Property::setValue() should be called, making sure that useCustomProperty argument is set
to false.\n
- Parent's handleValue() should be set to false, unless you cannot store the property in a QVariant.
- You just need to update children's value, making sure that useCustomProperty argument is set
+ Parent's handleValue() should be set to false, unless you cannot store the property in a TQVariant.
+ You just need to update tqchildren's value, making sure that useCustomProperty argument is set
to false.
\section custom_editor Using Custom Editors
@@ -102,21 +102,21 @@ class KOPROPERTY_EXPORT CustomPropertyFactory : public QObject
To use your new editor, just create properties with the type number you registered using
\ref registerFactoryForEditor() . Your editor will automatically appear in the Editor.
- \section custom_prop_composed Using Custom Properties with value that cannot be stored in a QVariant
+ \section custom_prop_composed Using Custom Properties with value that cannot be stored in a TQVariant
You then need to set handleValue() to true. The Widget you create also have
to call directly CustomProperty member to store the value. just make sure you call emitPropertyChanged()
- when the proerty value changes. Also make sure to avoid infinite recursion if you use children properties.
+ when the proerty value changes. Also make sure to avoid infinite recursion if you use tqchildren properties.
\author Cedric Pasteur <cedric.pasteur@free.fr>
\author Alexander Dymo <cloudtemple@mskat.net>
*/
-class KOPROPERTY_EXPORT FactoryManager : public QObject
+class KOPROPERTY_EXPORT FactoryManager : public TQObject
{
public:
/*! Registers a custom factory \a factory for handling property editor for \a editorType.
This custom factory will be used before defaults when widgetForProperty() is called.
\a creator is not owned by this Factory object, but it's good idea
- to instantiate CustomPropertyFactory object itself as a child of Factory parent. For example:
+ to instantiate CustomPropertyFactory object itself as a child of Factory tqparent. For example:
\code
MyCustomPropertyFactory *f = new MyCustomPropertyFactory(KoProperty::Factory::self());
KoProperty::Factory::self()->registerEditor( MyCustomType, f );
@@ -125,7 +125,7 @@ class KOPROPERTY_EXPORT FactoryManager : public QObject
/*! Registers custom factory \a factory for handling property editors for \a editorTypes.
@see registerFactoryForEditor(). */
- void registerFactoryForEditors(const QValueList<int> &editorTypes, CustomPropertyFactory *factory);
+ void registerFactoryForEditors(const TQValueList<int> &editorTypes, CustomPropertyFactory *factory);
/*! \return custom factory for type \a type or NULL if there
is no such property type registered.
@@ -133,7 +133,7 @@ class KOPROPERTY_EXPORT FactoryManager : public QObject
CustomPropertyFactory *factoryForEditorType(int type);
/*! 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.
If \a createWidget is false, just create child properties, not widget.*/
Widget* createWidgetForProperty(Property *property);
@@ -144,13 +144,13 @@ class KOPROPERTY_EXPORT FactoryManager : public QObject
/*! Registers a custom property factory that handles a CustomProperty for \a types.
@see registerFactoryForProperty() */
- void registerFactoryForProperties(const QValueList<int> &propertyTypes,
+ void registerFactoryForProperties(const TQValueList<int> &propertyTypes,
CustomPropertyFactory *factory);
/*! This function is called in Property::Property() to create (optional)
custom property. It creates the custom property for built-in types, or
calls one of createCustomProperty function previously registered for other types. */
- CustomProperty* createCustomProperty(Property *parent);
+ CustomProperty* createCustomProperty(Property *tqparent);
/*! \return a pointer to a property factory instance.*/
static FactoryManager* self();
diff --git a/lib/koproperty/property.cpp b/lib/koproperty/property.cpp
index 9d677bd8..87d12a6d 100644
--- a/lib/koproperty/property.cpp
+++ b/lib/koproperty/property.cpp
@@ -26,10 +26,10 @@
#include <kdebug.h>
-#include <qobject.h>
-#include <qptrdict.h>
-#include <qasciidict.h>
-#include <qguardedptr.h>
+#include <tqobject.h>
+#include <tqptrdict.h>
+#include <tqasciidict.h>
+#include <tqguardedptr.h>
namespace KoProperty {
@@ -43,16 +43,16 @@ class PropertyPrivate
: caption(0), listData(0), changed(false), storable(true),
readOnly(false), visible(true),
autosync(-1), custom(0), useCustomProperty(true),
- sets(0), parent(0), children(0), relatedProperties(0),
+ sets(0), tqparent(0), tqchildren(0), relatedProperties(0),
sortingKey(0)
{
}
- inline void setCaptionForDisplaying(const QString& captionForDisplaying)
+ inline void setCaptionForDisplaying(const TQString& captionForDisplaying)
{
delete caption;
if (captionForDisplaying.simplifyWhiteSpace()!=captionForDisplaying)
- caption = new QString(captionForDisplaying.simplifyWhiteSpace());
+ caption = new TQString(captionForDisplaying.simplifyWhiteSpace());
else
caption = 0;
this->captionForDisplaying = captionForDisplaying;
@@ -63,45 +63,45 @@ class PropertyPrivate
delete caption;
caption = 0;
delete listData;
- delete children;
+ delete tqchildren;
delete relatedProperties;
delete custom;
delete sets;
}
int type;
- QCString name;
- QString captionForDisplaying;
- QString* caption;
- QString description;
- QVariant value;
- QVariant oldValue;
+ TQCString name;
+ TQString captionForDisplaying;
+ TQString* caption;
+ TQString description;
+ TQVariant value;
+ TQVariant oldValue;
/*! The string-to-value correspondence list of the property.*/
Property::ListData* listData;
-// QMap<QString, QVariant> *valueList;
- QString icon;
+// TQMap<TQString, TQVariant> *valueList;
+ TQString icon;
bool changed : 1;
bool storable : 1;
bool readOnly : 1;
bool visible : 1;
int autosync;
- QMap<QCString, QVariant> options;
+ TQMap<TQCString, TQVariant> options;
CustomProperty *custom;
//! Flag used to allow CustomProperty to use setValue()
bool useCustomProperty;
//! Used when a single set is assigned for the property
- QGuardedPtr<Set> set;
+ TQGuardedPtr<Set> set;
//! Used when multiple sets are assigned for the property
- QPtrDict< QGuardedPtr<Set> > *sets;
-// QValueList<Set*> sets;
+ TQPtrDict< TQGuardedPtr<Set> > *sets;
+// TQValueList<Set*> sets;
- Property *parent;
- QValueList<Property*> *children;
+ Property *tqparent;
+ TQValueList<Property*> *tqchildren;
//! list of properties with the same name (when intersecting buffers)
- QValueList<Property*> *relatedProperties;
+ TQValueList<Property*> *relatedProperties;
int sortingKey;
};
@@ -111,14 +111,14 @@ using namespace KoProperty;
/////////////////////////////////////////////////////////////////
-Property::ListData::ListData(const QStringList& keys_, const QStringList& names_)
+Property::ListData::ListData(const TQStringList& keys_, const TQStringList& names_)
: names(names_)
// , fixed(true)
{
setKeysAsStringList(keys_);
}
-Property::ListData::ListData(const QValueList<QVariant> keys_, const QStringList& names_)
+Property::ListData::ListData(const TQValueList<TQVariant> keys_, const TQStringList& names_)
: keys(keys_), names(names_)
// , fixed(true)
{
@@ -133,18 +133,18 @@ Property::ListData::~ListData()
{
}
-void Property::ListData::setKeysAsStringList(const QStringList& list)
+void Property::ListData::setKeysAsStringList(const TQStringList& list)
{
keys.clear();
- for (QStringList::ConstIterator it = list.constBegin(); it!=list.constEnd(); ++it) {
+ for (TQStringList::ConstIterator it = list.constBegin(); it!=list.constEnd(); ++it) {
keys.append(*it);
}
}
-QStringList Property::ListData::keysAsStringList() const
+TQStringList Property::ListData::keysAsStringList() const
{
- QStringList result;
- for (QValueList<QVariant>::ConstIterator it = keys.constBegin(); it!=keys.constEnd(); ++it) {
+ TQStringList result;
+ for (TQValueList<TQVariant>::ConstIterator it = keys.constBegin(); it!=keys.constEnd(); ++it) {
result.append((*it).toString());
}
return result;
@@ -153,16 +153,16 @@ QStringList Property::ListData::keysAsStringList() const
/////////////////////////////////////////////////////////////////
/*
-KOPROPERTY_EXPORT QMap<QString, QVariant>
-KoProperty::createValueListFromStringLists(const QStringList &keys, const QStringList &values)
+KOPROPERTY_EXPORT TQMap<TQString, TQVariant>
+KoProperty::createValueListFromStringLists(const TQStringList &keys, const TQStringList &values)
{
- QMap<QString, QVariant> map;
+ TQMap<TQString, TQVariant> map;
if(keys.count() != values.count())
return map;
- QStringList::ConstIterator valueIt = values.begin();
- QStringList::ConstIterator endIt = keys.constEnd();
- for(QStringList::ConstIterator it = keys.begin(); it != endIt; ++it, ++valueIt)
+ TQStringList::ConstIterator valueIt = values.begin();
+ TQStringList::ConstIterator endIt = keys.constEnd();
+ for(TQStringList::ConstIterator it = keys.begin(); it != endIt; ++it, ++valueIt)
map.insert( *it, *valueIt);
return map;
@@ -170,9 +170,9 @@ KoProperty::createValueListFromStringLists(const QStringList &keys, const QStrin
*/
-Property::Property(const QCString &name, const QVariant &value,
- const QString &caption, const QString &description,
- int type, Property* parent)
+Property::Property(const TQCString &name, const TQVariant &value,
+ const TQString &caption, const TQString &description,
+ int type, Property* tqparent)
: d( new PropertyPrivate() )
{
d->name = name;
@@ -186,14 +186,14 @@ Property::Property(const QCString &name, const QVariant &value,
d->custom = FactoryManager::self()->createCustomProperty(this);
- if (parent)
- parent->addChild(this);
+ if (tqparent)
+ tqparent->addChild(this);
setValue(value, false);
}
-Property::Property(const QCString &name, const QStringList &keys, const QStringList &strings,
- const QVariant &value, const QString &caption, const QString &description,
- int type, Property* parent)
+Property::Property(const TQCString &name, const TQStringList &keys, const TQStringList &strings,
+ const TQVariant &value, const TQString &caption, const TQString &description,
+ int type, Property* tqparent)
: d( new PropertyPrivate() )
{
d->name = name;
@@ -204,14 +204,14 @@ Property::Property(const QCString &name, const QStringList &keys, const QStringL
d->custom = FactoryManager::self()->createCustomProperty(this);
- if (parent)
- parent->addChild(this);
+ if (tqparent)
+ tqparent->addChild(this);
setValue(value, false);
}
-Property::Property(const QCString &name, ListData* listData,
- const QVariant &value, const QString &caption, const QString &description,
- int type, Property* parent)
+Property::Property(const TQCString &name, ListData* listData,
+ const TQVariant &value, const TQString &caption, const TQString &description,
+ int type, Property* tqparent)
: d( new PropertyPrivate() )
{
d->name = name;
@@ -222,8 +222,8 @@ Property::Property(const QCString &name, ListData* listData,
d->custom = FactoryManager::self()->createCustomProperty(this);
- if (parent)
- parent->addChild(this);
+ if (tqparent)
+ tqparent->addChild(this);
setValue(value, false);
}
@@ -244,44 +244,44 @@ Property::~Property()
d = 0;
}
-QCString
+TQCString
Property::name() const
{
return d->name;
}
void
-Property::setName(const QCString &name)
+Property::setName(const TQCString &name)
{
d->name = name;
}
-QString
+TQString
Property::caption() const
{
return d->caption ? *d->caption : d->captionForDisplaying;
}
-QString
+TQString
Property::captionForDisplaying() const
{
return d->captionForDisplaying;
}
void
-Property::setCaption(const QString &caption)
+Property::setCaption(const TQString &caption)
{
d->setCaptionForDisplaying(caption);
}
-QString
+TQString
Property::description() const
{
return d->description;
}
void
-Property::setDescription(const QString &desc)
+Property::setDescription(const TQString &desc)
{
d->description = desc;
}
@@ -298,19 +298,19 @@ Property::setType(int type)
d->type = type;
}
-QString
+TQString
Property::icon() const
{
return d->icon;
}
void
-Property::setIcon(const QString &icon)
+Property::setIcon(const TQString &icon)
{
d->icon = icon;
}
-QVariant
+TQVariant
Property::value() const
{
if(d->custom && d->custom->handleValue())
@@ -318,7 +318,7 @@ Property::value() const
return d->value;
}
-QVariant
+TQVariant
Property::oldValue() const
{
/* if(d->oldValue.isNull())
@@ -328,23 +328,23 @@ Property::oldValue() const
}
void
-Property::setValue(const QVariant &value, bool rememberOldValue, bool useCustomProperty)
+Property::setValue(const TQVariant &value, bool rememberOldValue, bool useCustomProperty)
{
if (d->name.isEmpty()) {
kopropertywarn << "Property::setValue(): COULD NOT SET value to a null property" << endl;
return;
}
- QVariant currentValue = this->value();
- const QVariant::Type t = currentValue.type();
- const QVariant::Type newt = value.type();
+ TQVariant currentValue = this->value();
+ const TQVariant::Type t = currentValue.type();
+ const TQVariant::Type newt = value.type();
// kopropertydbg << d->name << " : setValue('" << value.toString() << "' type=" << type() << ")" << endl;
if (t != newt && !currentValue.isNull() && !value.isNull()
- && !( (t==QVariant::Int && newt==QVariant::UInt)
- || (t==QVariant::UInt && newt==QVariant::Int)
- || (t==QVariant::CString && newt==QVariant::String)
- || (t==QVariant::String && newt==QVariant::CString)
- || (t==QVariant::ULongLong && newt==QVariant::LongLong)
- || (t==QVariant::LongLong && newt==QVariant::ULongLong)
+ && !( (t==TQVariant::Int && newt==TQVariant::UInt)
+ || (t==TQVariant::UInt && newt==TQVariant::Int)
+ || (t==TQVariant::CString && newt==TQVariant::String)
+ || (t==TQVariant::String && newt==TQVariant::CString)
+ || (t==TQVariant::ULongLong && newt==TQVariant::LongLong)
+ || (t==TQVariant::LongLong && newt==TQVariant::ULongLong)
)) {
kopropertywarn << "Property::setValue(): INCOMPATIBLE TYPES! old=" << currentValue
<< " new=" << value << endl;
@@ -352,20 +352,20 @@ Property::setValue(const QVariant &value, bool rememberOldValue, bool useCustomP
//1. Check if the value should be changed
bool ch;
- if (t == QVariant::DateTime
- || t == QVariant::Time) {
+ if (t == TQVariant::DateTime
+ || t == TQVariant::Time) {
//for date and datetime types: compare with strings, because there
//can be miliseconds difference
ch = (currentValue.toString() != value.toString());
}
- else if (t == QVariant::String || t==QVariant::CString) {
+ else if (t == TQVariant::String || t==TQVariant::CString) {
//property is changed for string type,
//if one of value is empty and other isn't..
ch = ( (currentValue.toString().isEmpty() != value.toString().isEmpty())
//..or both are not empty and values differ
|| (!currentValue.toString().isEmpty() && !value.toString().isEmpty() && currentValue != value) );
}
- else if (t == QVariant::Invalid && newt == QVariant::Invalid)
+ else if (t == TQVariant::Invalid && newt == TQVariant::Invalid)
ch = false;
else
ch = (currentValue != value);
@@ -380,10 +380,10 @@ Property::setValue(const QVariant &value, bool rememberOldValue, bool useCustomP
d->changed = true;
}
else {
- d->oldValue = QVariant(); // clear old value
+ d->oldValue = TQVariant(); // clear old value
d->changed = false;
}
- QVariant prevValue;
+ TQVariant prevValue;
if(d->custom && useCustomProperty) {
d->custom->setValue(value, rememberOldValue);
prevValue = d->custom->value();
@@ -408,12 +408,12 @@ Property::resetValue()
if (cleared)
return; //property set has been cleared: no further actions make sense as 'this' is dead
- // maybe parent prop is also unchanged now
- if(d->parent && d->parent->value() == d->parent->oldValue())
- d->parent->d->changed = false;
+ // maybe tqparent prop is also unchanged now
+ if(d->tqparent && d->tqparent->value() == d->tqparent->oldValue())
+ d->tqparent->d->changed = false;
if (d->sets) {
- for (QPtrDictIterator< QGuardedPtr<Set> > it(*d->sets); it.current(); ++it) {
+ for (TQPtrDictIterator< TQGuardedPtr<Set> > it(*d->sets); it.current(); ++it) {
if (it.current()) //may be destroyed in the meantime
emit (*it.current())->propertyReset(**it.current(), *this);
}
@@ -423,7 +423,7 @@ Property::resetValue()
}
}
-//const QMap<QString, QVariant>*
+//const TQMap<TQString, TQVariant>*
Property::ListData*
Property::listData() const
{
@@ -431,10 +431,10 @@ Property::listData() const
}
void
-Property::setListData(ListData* list) //const QMap<QString, QVariant> &list)
+Property::setListData(ListData* list) //const TQMap<TQString, TQVariant> &list)
{
// if(!d->valueList)
-// d->valueList = new QMap<QString, QVariant>();
+// d->valueList = new TQMap<TQString, TQVariant>();
if (list == d->listData)
return;
delete d->listData;
@@ -442,13 +442,13 @@ Property::setListData(ListData* list) //const QMap<QString, QVariant> &list)
}
void
-Property::setListData(const QStringList &keys, const QStringList &names)
+Property::setListData(const TQStringList &keys, const TQStringList &names)
{
ListData* list = new ListData(keys, names);
setListData(list);
// if(!d->valueList)
-// d->valueList = new QMap<QString, QVariant>();
+// d->valueList = new TQMap<TQString, TQVariant>();
// *(d->valueList) = createValueListFromStringLists(keys, values);
}
@@ -521,17 +521,17 @@ Property::setStorable(bool storable)
}
void
-Property::setOption(const char* name, const QVariant& val)
+Property::setOption(const char* name, const TQVariant& val)
{
d->options[name] = val;
}
-QVariant
+TQVariant
Property::option(const char* name) const
{
- if (d->options.contains(name))
+ if (d->options.tqcontains(name))
return d->options[name];
- return QVariant();
+ return TQVariant();
}
bool
@@ -548,7 +548,7 @@ Property::operator bool () const
}
const Property&
-Property::operator= (const QVariant& val)
+Property::operator= (const TQVariant& val)
{
setValue(val);
return *this;
@@ -564,9 +564,9 @@ Property::operator= (const Property &property)
delete d->listData;
d->listData = 0;
}
- if(d->children) {
- delete d->children;
- d->children = 0;
+ if(d->tqchildren) {
+ delete d->tqchildren;
+ d->tqchildren = 0;
}
if(d->relatedProperties) {
delete d->relatedProperties;
@@ -590,20 +590,20 @@ Property::operator= (const Property &property)
d->options = property.d->options;
if(property.d->listData) {
- d->listData = new ListData(*property.d->listData); //QMap<QString, QVariant>(*(property.d->valueList));
+ d->listData = new ListData(*property.d->listData); //TQMap<TQString, TQVariant>(*(property.d->valueList));
}
if(property.d->custom) {
d->custom = FactoryManager::self()->createCustomProperty(this);
- // updates all children value, using CustomProperty
+ // updates all tqchildren value, using CustomProperty
setValue(property.value());
}
else {
d->value = property.d->value;
- if(property.d->children) {
- // no CustomProperty (should never happen), simply copy all children
- d->children = new QValueList<Property*>();
- QValueList<Property*>::ConstIterator endIt = property.d->children->constEnd();
- for(QValueList<Property*>::ConstIterator it = property.d->children->constBegin(); it != endIt; ++it) {
+ if(property.d->tqchildren) {
+ // no CustomProperty (should never happen), simply copy all tqchildren
+ d->tqchildren = new TQValueList<Property*>();
+ TQValueList<Property*>::ConstIterator endIt = property.d->tqchildren->constEnd();
+ for(TQValueList<Property*>::ConstIterator it = property.d->tqchildren->constBegin(); it != endIt; ++it) {
Property *child = new Property( *(*it) );
addChild(child);
}
@@ -611,10 +611,10 @@ Property::operator= (const Property &property)
}
if(property.d->relatedProperties) {
- d->relatedProperties = new QValueList<Property*>( *(property.d->relatedProperties));
+ d->relatedProperties = new TQValueList<Property*>( *(property.d->relatedProperties));
}
- // update these later because they may have been changed when creating children
+ // update these later because they may have been changed when creating tqchildren
d->oldValue = property.d->oldValue;
d->changed = property.d->changed;
d->sortingKey = property.d->sortingKey;
@@ -630,17 +630,17 @@ Property::operator ==(const Property &prop) const
/////////////////////////////////////////////////////////////////
-const QValueList<Property*>*
-Property::children() const
+const TQValueList<Property*>*
+Property::tqchildren() const
{
- return d->children;
+ return d->tqchildren;
}
Property*
-Property::child(const QCString &name)
+Property::child(const TQCString &name)
{
- QValueList<Property*>::ConstIterator endIt = d->children->constEnd();
- for(QValueList<Property*>::ConstIterator it = d->children->constBegin(); it != endIt; ++it) {
+ TQValueList<Property*>::ConstIterator endIt = d->tqchildren->constEnd();
+ for(TQValueList<Property*>::ConstIterator it = d->tqchildren->constBegin(); it != endIt; ++it) {
if((*it)->name() == name)
return *it;
}
@@ -648,9 +648,9 @@ Property::child(const QCString &name)
}
Property*
-Property::parent() const
+Property::tqparent() const
{
- return d->parent;
+ return d->tqparent;
}
void
@@ -659,12 +659,12 @@ Property::addChild(Property *prop)
if (!prop)
return;
- if(!d->children || qFind( d->children->begin(), d->children->end(), prop) == d->children->end()) { // not in our list
- if(!d->children)
- d->children = new QValueList<Property*>();
- d->children->append(prop);
- prop->setSortingKey(d->children->count());
- prop->d->parent = this;
+ if(!d->tqchildren || tqFind( d->tqchildren->begin(), d->tqchildren->end(), prop) == d->tqchildren->end()) { // not in our list
+ if(!d->tqchildren)
+ d->tqchildren = new TQValueList<Property*>();
+ d->tqchildren->append(prop);
+ prop->setSortingKey(d->tqchildren->count());
+ prop->d->tqparent = this;
}
else {
kopropertywarn << "Property::addChild(): property \"" << name()
@@ -685,22 +685,22 @@ Property::addSet(Set *set)
}
if ((Set*)d->set==set)
return;
- QGuardedPtr<Set> *pset = d->sets ? d->sets->find(set) : 0;
+ TQGuardedPtr<Set> *pset = d->sets ? d->sets->tqfind(set) : 0;
if (pset && (Set*)*pset == set)
return;
if (!d->sets) {
- d->sets = new QPtrDict< QGuardedPtr<Set> >( 101 );
+ d->sets = new TQPtrDict< TQGuardedPtr<Set> >( 101 );
d->sets->setAutoDelete(true);
}
- d->sets->replace(set, new QGuardedPtr<Set>( set ));
+ d->sets->tqreplace(set, new TQGuardedPtr<Set>( set ));
-// QValueList<Set*>::iterator it = qFind( d->sets.begin(), d->sets.end(), set);
+// TQValueList<Set*>::iterator it = tqFind( d->sets.begin(), d->sets.end(), set);
// if(it == d->sets.end()) // not in our list
// d->sets.append(set);
}
-const QValueList<Property*>*
+const TQValueList<Property*>*
Property::related() const
{
return d->relatedProperties;
@@ -710,9 +710,9 @@ void
Property::addRelatedProperty(Property *property)
{
if(!d->relatedProperties)
- d->relatedProperties = new QValueList<Property*>();
+ d->relatedProperties = new TQValueList<Property*>();
- QValueList<Property*>::iterator it = qFind( d->relatedProperties->begin(), d->relatedProperties->end(), property);
+ TQValueList<Property*>::iterator it = tqFind( d->relatedProperties->begin(), d->relatedProperties->end(), property);
if(it == d->relatedProperties->end()) // not in our list
d->relatedProperties->append(property);
}
@@ -742,7 +742,7 @@ void Property::setSortingKey(int key)
void Property::emitPropertyChanged()
{
if (d->sets) {
- for (QPtrDictIterator< QGuardedPtr<Set> > it(*d->sets); it.current(); ++it) {
+ for (TQPtrDictIterator< TQGuardedPtr<Set> > it(*d->sets); it.current(); ++it) {
if (it.current()) {//may be destroyed in the meantime
emit (*it.current())->propertyChangedInternal(**it.current(), *this);
emit (*it.current())->propertyChanged(**it.current(), *this);
@@ -766,11 +766,11 @@ void Property::emitPropertyChanged()
void
Property::debug()
{
- QString dbg = "Property( name='" + QString(d->name) + "' desc='" + d->description
+ TQString dbg = "Property( name='" + TQString(d->name) + "' desc='" + d->description
+ "' val=" + (value().isValid() ? value().toString() : "<INVALID>");
if (!d->oldValue.isValid())
dbg += (", oldVal='" + d->oldValue.toString() + '\'');
- dbg += (QString(d->changed ? " " : " un") + "changed");
+ dbg += (TQString(d->changed ? " " : " un") + "changed");
dbg += (d->visible ? " visible" : " hidden");
dbg+=" )";
diff --git a/lib/koproperty/property.h b/lib/koproperty/property.h
index cce3f087..8d7f01d6 100644
--- a/lib/koproperty/property.h
+++ b/lib/koproperty/property.h
@@ -22,11 +22,11 @@
#ifndef KPROPERTY_PROPERTY_H
#define KPROPERTY_PROPERTY_H
-#include <qvariant.h>
+#include <tqvariant.h>
#include "koproperty_global.h"
-template<class U> class QAsciiDict;
-template<class U> class QAsciiDictIterator;
+template<class U> class TQAsciiDict;
+template<class U> class TQAsciiDictIterator;
/*! \brief Namespace for a set of classes implementing generic properties framework.
@@ -39,7 +39,7 @@ template<class U> class QAsciiDictIterator;
KoProperty framework also supports adding custom property types
and custom property editor types using Custom Property and CustomPropertyFactory.
- If you cannot store your value type in a QVariant, consider using composed properties
+ If you cannot store your value type in a TQVariant, consider using composed properties
(see FactoryManager for more information) or storing it in CustomProperty yourself with handleValue()
set to true.
@@ -56,55 +56,55 @@ class CustomProperty;
class Set;
///*! Helper function to create a value list from two string lists. */
-//KOPROPERTY_EXPORT QMap<QString, QVariant> createValueListFromStringLists(
-// const QStringList &keys, const QStringList &values);
+//KOPROPERTY_EXPORT TQMap<TQString, TQVariant> createValueListFromStringLists(
+// const TQStringList &keys, const TQStringList &values);
/*! PropertyType.
Integers that represent the type of the property. Plugin defined properties
should have a type number >= UserDefined .*/
enum PropertyType {
- //standard supported QVariant types
- Auto = QVariant::Invalid - 1,
- Invalid = QVariant::Invalid /**<invalid property type*/,
- Map = QVariant::Map /**<QMap<QString, QVariant>*/,
- List = QVariant::List /**<QValueList<QVariant>*/,
- String = QVariant::String /**<string*/,
- StringList = QVariant::StringList /**<string list*/,
- Font = QVariant::Font /**<font*/,
- Pixmap = QVariant::Pixmap /**<pixmap*/,
- //! @todo implement QVariant::Brush
- Rect = QVariant::Rect /**<rectangle (x,y, width, height)*/,
- Size = QVariant::Size /**<size (width, height)*/,
- Color = QVariant::Color /**<color*/,
- //! \todo implement QVariant::Palette
- //! \todo implement QVariant::ColorGroup
- //! \todo implement QVariant::IconSet
- Point = QVariant::Point /**<point (x,y)*/,
- //! \todo implement QVariant::Image
- Integer = QVariant::Int /**<integer*/,
- //! \todo implement QVariant::UInt
- Boolean = QVariant::Bool /**<boolean*/,
- Double = QVariant::Double /**<double*/,
- CString = QVariant::CString /** latin-1 string*/,
- //! @todo implement QVariant::PointArray
- //! @todo implement QVariant::Region
- //! @todo implement QVariant::Bitmap
- Cursor = QVariant::Cursor /**<cursor*/,
- SizePolicy = QVariant::SizePolicy /**<size policy (horizontal, vertical)*/,
- Date = QVariant::Date /**<date*/,
- Time = QVariant::Time /**<time*/,
- DateTime = QVariant::DateTime /**<date and time*/,
- //! @todo implement QVariant::ByteArray
- //! @todo implement QVariant::BitArray
- //! @todo implement QVariant::KeySequence
- //! @todo implement QVariant::Pen
- //! @todo implement QVariant::Long
- //! @todo implement QVariant::LongLong
- //! @todo implement QVariant::ULongLong
+ //standard supported TQVariant types
+ Auto = TQVariant::Invalid - 1,
+ Invalid = TQVariant::Invalid /**<invalid property type*/,
+ Map = TQVariant::Map /**<TQMap<TQString, TQVariant>*/,
+ List = TQVariant::List /**<TQValueList<TQVariant>*/,
+ String = TQVariant::String /**<string*/,
+ StringList = TQVariant::StringList /**<string list*/,
+ Font = TQVariant::Font /**<font*/,
+ Pixmap = TQVariant::Pixmap /**<pixmap*/,
+ //! @todo implement TQVariant::Brush
+ Rect = TQVariant::Rect /**<rectangle (x,y, width, height)*/,
+ Size = TQVariant::Size /**<size (width, height)*/,
+ Color = TQVariant::Color /**<color*/,
+ //! \todo implement TQVariant::Palette
+ //! \todo implement TQVariant::ColorGroup
+ //! \todo implement TQVariant::IconSet
+ Point = TQVariant::Point /**<point (x,y)*/,
+ //! \todo implement TQVariant::Image
+ Integer = TQVariant::Int /**<integer*/,
+ //! \todo implement TQVariant::UInt
+ Boolean = TQVariant::Bool /**<boolean*/,
+ Double = TQVariant::Double /**<double*/,
+ CString = TQVariant::CString /** latin-1 string*/,
+ //! @todo implement TQVariant::PointArray
+ //! @todo implement TQVariant::Region
+ //! @todo implement TQVariant::Bitmap
+ Cursor = TQVariant::Cursor /**<cursor*/,
+ SizePolicy = TQVariant::SizePolicy /**<size policy (horizontal, vertical)*/,
+ Date = TQVariant::Date /**<date*/,
+ Time = TQVariant::Time /**<time*/,
+ DateTime = TQVariant::DateTime /**<date and time*/,
+ //! @todo implement TQVariant::ByteArray
+ //! @todo implement TQVariant::BitArray
+ //! @todo implement TQVariant::KeySequence
+ //! @todo implement TQVariant::Pen
+ //! @todo implement TQVariant::Long
+ //! @todo implement TQVariant::LongLong
+ //! @todo implement TQVariant::ULongLong
//predefined custom types
ValueFromList = 2000 /**<string value from a list*/,
- Symbol = 2001 /**<unicode symbol code*/,
+ Symbol = 2001 /**<tqunicode symbol code*/,
FontName /**<font name, e.g. "times new roman"*/,
FileURL /**<url of a file*/,
PictureFileURL /**<url of a pixmap*/,
@@ -130,28 +130,28 @@ enum PropertyType {
/*! \brief The base class representing a single property
- It can hold a property of any type supported by QVariant. You can also create you own property
+ It can hold a property of any type supported by TQVariant. You can also create you own property
types (see Using Custom Properties in Factory doc). As a consequence, do not subclass Property,
use \ref CustomProperty instead. \n
- Each property stores old value to allow undo. It has a name (a QCString), a caption (i18n'ed name
+ Each property stores old value to allow undo. It has a name (a TQCString), a caption (i18n'ed name
shown in Editor) and a description (also i18n'ed). \n
It also supports setting arbitrary number of options (of type option=value).
See Editor for a list of options, and their meaning.
\code
// To create a property
- property = Property(name, value, caption, description); // name is a QCString,
- // value is whatever type QVariant supports
+ property = Property(name, value, caption, description); // name is a TQCString,
+ // value is whatever type TQVariant supports
// To create a valueFromList property (matching strings with strings)
- QStringList keys, strings;
+ TQStringList keys, strings;
keys << "one" << "two" << "three"; // possible values of the property
// Strings (possibly i18n-ed) shown in the editor instead of the values
strings << i18n("One") << i18n("Two") << i18n("Three");
property = Property(name, keys, strings, "two", caption);
- // To create a valueFromList property (matching strings with QVariant)
- QValueList<QVariant> keys2;
+ // To create a valueFromList property (matching strings with TQVariant)
+ TQValueList<TQVariant> keys2;
keys2.append(1);
keys2.append(2);
keys2.append(3);
@@ -159,8 +159,8 @@ enum PropertyType {
m_set->addProperty(new Property("List2", listData, "otheritem", "List2"), group);
\endcode
- Note that you need to use QVariant(bool, int) to create a boolean property value.
- See QVariant docs for more details.
+ Note that you need to use TQVariant(bool, int) to create a boolean property value.
+ See TQVariant docs for more details.
Sometimes, for longer property captions or these with more words, e.g. "Allow Zero Size",
it's usable to provide newline characters, e.g. "Allow Zero\nSize".
@@ -179,8 +179,8 @@ class KOPROPERTY_EXPORT Property
//! A contant for null property
QT_STATIC_CONST Property null;
- typedef QAsciiDict<Property> Dict;
- typedef QAsciiDictIterator<Property> DictIterator;
+ typedef TQAsciiDict<Property> Dict;
+ typedef TQAsciiDictIterator<Property> DictIterator;
/*! Data container for properties of list type. */
class KOPROPERTY_EXPORT ListData
@@ -188,25 +188,25 @@ class KOPROPERTY_EXPORT Property
public:
/*! Data container for list-value property.
We will be able to choose an item from this list. */
- ListData(const QStringList& keys_, const QStringList& names_);
- ListData(const QValueList<QVariant> keys_, const QStringList& names_);
+ ListData(const TQStringList& keys_, const TQStringList& names_);
+ ListData(const TQValueList<TQVariant> keys_, const TQStringList& names_);
ListData();
~ListData();
- void setKeysAsStringList(const QStringList& list);
- QStringList keysAsStringList() const;
+ void setKeysAsStringList(const TQStringList& list);
+ TQStringList keysAsStringList() const;
/*! The string list containing all possible keys for this property
or NULL if this is not a property of type 'list'. The values in this list are ordered,
so the first key element is associated with first element from
the 'names' list, and so on. */
- QValueList<QVariant> keys;
-// QStringList keys;
+ TQValueList<TQVariant> keys;
+// TQStringList keys;
-//! @todo what about using QValueList<QVariant> here too?
+//! @todo what about using TQValueList<TQVariant> here too?
/*! The list of i18n'ed names that will be visible on the screen.
First value is referenced by first key, and so on. */
- QStringList names;
+ TQStringList names;
//unused for now /*! True (the default), if the list has fixed number of possible
//unused for now items (keys). If this is false, user can add or enter own values. */
@@ -220,22 +220,22 @@ class KOPROPERTY_EXPORT Property
If \a caption contains newline characters, caption() will return \a caption with substituted
these with spaces. captionForDisplaying() is used to get original caption text usable
(with newline, if any) for displaying within a property editor. */
- Property(const QCString &name, const QVariant &value = QVariant(),
- const QString &caption = QString::null, const QString &description = QString::null,
- int type = Auto, Property* parent = 0);
+ Property(const TQCString &name, const TQVariant &value = TQVariant(),
+ const TQString &caption = TQString(), const TQString &description = TQString(),
+ int type = Auto, Property* tqparent = 0);
/*! Constructs property of \ref ValueFromList type. */
- Property(const QCString &name, const QStringList &keys, const QStringList &strings,
- const QVariant &value = QVariant(),
- const QString &caption = QString::null, const QString &description = QString::null,
- int type = ValueFromList, Property* parent = 0);
+ Property(const TQCString &name, const TQStringList &keys, const TQStringList &strings,
+ const TQVariant &value = TQVariant(),
+ const TQString &caption = TQString(), const TQString &description = TQString(),
+ int type = ValueFromList, Property* tqparent = 0);
/*! Constructs property of \ref ValueFromList type.
This is overload of the above ctor added for convenience. */
- Property(const QCString &name, ListData* listData,
- const QVariant &value = QVariant(),
- const QString &caption = QString::null, const QString &description = QString::null,
- int type = ValueFromList, Property* parent = 0);
+ Property(const TQCString &name, ListData* listData,
+ const TQVariant &value = TQVariant(),
+ const TQString &caption = TQString(), const TQString &description = TQString(),
+ int type = ValueFromList, Property* tqparent = 0);
/*! Constructs a deep copy of \a prop property. */
Property(const Property &prop);
@@ -243,29 +243,29 @@ class KOPROPERTY_EXPORT Property
~Property();
/*! \return the internal name of the property (that's used in List).*/
- QCString name() const;
+ TQCString name() const;
/*! Sets the internal name of the property.*/
- void setName(const QCString &name);
+ void setName(const TQCString &name);
/*! \return the caption of the property.*/
- QString caption() const;
+ TQString caption() const;
/*! \return the caption text of the property for displaying.
It is similar to caption() but if the property caption contains newline characters,
these are not substituted with spaces. */
- QString captionForDisplaying() const;
+ TQString captionForDisplaying() const;
/*! Sets the name of the property. If the caption contains newline characters,
these are replaced by spaces. You can use captionForDisplaying()
to access the original caption text you passed here.*/
- void setCaption(const QString &caption);
+ void setCaption(const TQString &caption);
/*! \return the description of the property.*/
- QString description() const;
+ TQString description() const;
/*! Sets the description of the property.*/
- void setDescription(const QString &description);
+ void setDescription(const TQString &description);
/*! \return the type of the property.*/
int type() const;
@@ -274,13 +274,13 @@ class KOPROPERTY_EXPORT Property
void setType(int type);
/*! \return the value of the property.*/
- QVariant value() const;
+ TQVariant value() const;
/*! Gets the previous property value.*/
- QVariant oldValue() const;
+ TQVariant oldValue() const;
/*! Sets the value of the property.*/
- void setValue(const QVariant &value, bool rememberOldValue = true, bool useCustomProperty=true);
+ void setValue(const TQVariant &value, bool rememberOldValue = true, bool useCustomProperty=true);
/*! Resets the value of the property to the old value.
@see oldValue() */
@@ -297,24 +297,24 @@ class KOPROPERTY_EXPORT Property
/*! Sets the string-to-value correspondence list of the property.
This is used to create comboboxes-like property editors.
This is overload of the above ctor added for convenience. */
- void setListData(const QStringList &keys, const QStringList &names);
+ void setListData(const TQStringList &keys, const TQStringList &names);
/*! Sets icon by \a name for this property. Icons are optional and are used e.g.
in property editor - displayed at the left hand. */
- void setIcon(const QString &icon);
+ void setIcon(const TQString &icon);
/*! \return property icon's string. Can be empty. */
- QString icon() const;
+ TQString icon() const;
- /*! \return a list of all children for this property, or NULL of there
- is no children for this property */
- const QValueList<Property*>* children() const;
+ /*! \return a list of all tqchildren for this property, or NULL of there
+ is no tqchildren for this property */
+ const TQValueList<Property*>* tqchildren() const;
/*! \return a child property for \a name, or NULL if there is no property with that name. */
- Property* child(const QCString &name);
+ Property* child(const TQCString &name);
- /*! \return parent property for this property, or NULL if there is no parent property. */
- Property* parent() const;
+ /*! \return tqparent property for this property, or NULL if there is no tqparent property. */
+ Property* tqparent() const;
/*! \return the custom property for this property.or NULL if there was
no custom property defined. */
@@ -382,16 +382,16 @@ class KOPROPERTY_EXPORT Property
e.g. within Editor. See Editor ctor documentation for
the list of supported options.
*/
- void setOption(const char* name, const QVariant& val);
+ void setOption(const char* name, const TQVariant& val);
/*! \return a value for option \a name or null value if there is no such option set. */
- QVariant option(const char* name) const;
+ TQVariant option(const char* name) const;
/*! \return true if at least one option is defined for this property. */
bool hasOptions() const;
- /*! Equivalent to setValue(const QVariant &) */
- const Property& operator= (const QVariant& val);
+ /*! Equivalent to setValue(const TQVariant &) */
+ const Property& operator= (const TQVariant& val);
/*! Assigns a deep copy of all attributes of \a property to this property. */
const Property& operator= (const Property &property);
@@ -407,7 +407,7 @@ class KOPROPERTY_EXPORT Property
protected:
/*! Adds \a prop as a child of this property.
- The children will be owned by this property. */
+ The tqchildren will be owned by this property. */
void addChild(Property *prop);
/*! Adds \a set to this property. */
@@ -417,7 +417,7 @@ class KOPROPERTY_EXPORT Property
void setSortingKey(int key);
/*! \return a list of related properties for this property. */
- const QValueList<Property*>* related() const;
+ const TQValueList<Property*>* related() const;
/*! Adds related property for this property. */
void addRelatedProperty(Property *property);
diff --git a/lib/koproperty/set.cpp b/lib/koproperty/set.cpp
index 2e016b64..3193a50f 100644
--- a/lib/koproperty/set.cpp
+++ b/lib/koproperty/set.cpp
@@ -23,15 +23,15 @@
#include "property.h"
#include "utils.h"
-#include <qapplication.h>
-#include <qasciidict.h>
-//#include <qvaluelist.h>
+#include <tqapplication.h>
+#include <tqasciidict.h>
+//#include <tqvaluelist.h>
#include <kdebug.h>
#include <klocale.h>
-typedef QMap<QCString, QValueList<QCString> > StringListMap;
-typedef QMapIterator<QCString, QStringList> StringListMapIterator;
+typedef TQMap<TQCString, TQValueList<TQCString> > StringListMap;
+typedef TQMapIterator<TQCString, TQStringList> StringListMapIterator;
namespace KoProperty {
@@ -55,25 +55,25 @@ class SetPrivate
//groups of properties:
// list of group name: (list of property names)
StringListMap propertiesOfGroup;
- QValueList<QCString> groupNames;
- QMap<QCString, QString> groupDescriptions;
- QMap<QCString, QString> groupIcons;
+ TQValueList<TQCString> groupNames;
+ TQMap<TQCString, TQString> groupDescriptions;
+ TQMap<TQCString, TQString> groupIcons;
// map of property: group
- QMap<Property*, QCString> groupForProperty;
+ TQMap<Property*, TQCString> groupForProperty;
bool ownProperty : 1;
bool readOnly : 1;
// static Property nonConstNull;
- QCString prevSelection;
- QString typeName;
+ TQCString prevSelection;
+ TQString typeName;
//! Used in Set::informAboutClearing(Property*) to declare that the property wants
//! to be informed that the set has been cleared (all properties are deleted)
bool* informAboutClearing;
- inline KoProperty::Property& property(const QCString &name) const
+ inline KoProperty::Property& property(const TQCString &name) const
{
- KoProperty::Property *p = dict.find(name);
+ KoProperty::Property *p = dict.tqfind(name);
if (p)
return *p;
Set_nonConstNull.setName(0); //to ensure returned property is null
@@ -109,13 +109,13 @@ Set::Iterator::operator *() const
return current();
}
-QCString
+TQCString
Set::Iterator::currentKey() const
{
if (iterator)
return iterator->currentKey();
- return QCString();
+ return TQCString();
}
Property*
@@ -129,8 +129,8 @@ Set::Iterator::current() const
//////////////////////////////////////////////
-Set::Set(QObject *parent, const QString &typeName)
-: QObject(parent, typeName.latin1())
+Set::Set(TQObject *tqparent, const TQString &typeName)
+: TQObject(tqparent, typeName.latin1())
{
d = new SetPrivate();
d->ownProperty = true;
@@ -140,14 +140,14 @@ Set::Set(QObject *parent, const QString &typeName)
Set::Set(const Set &set)
- : QObject(0 /* implicit sharing the parent is dangerous */, set.name())
+ : TQObject(0 /* implicit sharing the tqparent is dangerous */, set.name())
{
d = new SetPrivate();
*this = set;
}
Set::Set(bool propertyOwner)
- : QObject(0, 0)
+ : TQObject(0, 0)
{
d = new SetPrivate();
d->ownProperty = propertyOwner;
@@ -165,7 +165,7 @@ Set::~Set()
/////////////////////////////////////////////////////
void
-Set::addPropertyInternal(Property *property, QCString group, bool updateSortingKey)
+Set::addPropertyInternal(Property *property, TQCString group, bool updateSortingKey)
{
if (group.isEmpty())
group = "common";
@@ -178,7 +178,7 @@ Set::addPropertyInternal(Property *property, QCString group, bool updateSortingK
return;
}
- Property *p = d->dict.find(property->name());
+ Property *p = d->dict.tqfind(property->name());
if(p) {
p->addRelatedProperty(property);
}
@@ -193,7 +193,7 @@ Set::addPropertyInternal(Property *property, QCString group, bool updateSortingK
}
void
-Set::addProperty(Property *property, QCString group)
+Set::addProperty(Property *property, TQCString group)
{
addPropertyInternal(property, group, true);
}
@@ -213,12 +213,12 @@ Set::removeProperty(Property *property)
}
void
-Set::removeProperty(const QCString &name)
+Set::removeProperty(const TQCString &name)
{
if(name.isNull())
return;
- Property *p = d->dict.find(name);
+ Property *p = d->dict.tqfind(name);
removeProperty(p);
}
@@ -249,17 +249,17 @@ Set::informAboutClearing(bool& cleared)
/////////////////////////////////////////////////////
void
-Set::addToGroup(const QCString &group, Property *property)
+Set::addToGroup(const TQCString &group, Property *property)
{
if(!property)
return;
//do not add the same property to the group twice
- if(d->groupForProperty.contains(property) && (d->groupForProperty[property] == group))
+ if(d->groupForProperty.tqcontains(property) && (d->groupForProperty[property] == group))
return;
- if(!d->propertiesOfGroup.contains(group)) { // group doesn't exist
- QValueList<QCString> l;
+ if(!d->propertiesOfGroup.tqcontains(group)) { // group doesn't exist
+ TQValueList<TQCString> l;
l.append(property->name());
d->propertiesOfGroup.insert(group, l);
d->groupNames.append(group);
@@ -275,12 +275,12 @@ Set::removeFromGroup(Property *property)
{
if(!property)
return;
- QCString group = d->groupForProperty[property];
+ TQCString group = d->groupForProperty[property];
d->propertiesOfGroup[group].remove(property->name());
if (d->propertiesOfGroup[group].isEmpty()) {
//remove group as well
d->propertiesOfGroup.remove(group);
- QValueListIterator<QCString> it = d->groupNames.find(group);
+ TQValueListIterator<TQCString> it = d->groupNames.tqfind(group);
if (it != d->groupNames.end()) {
d->groupNames.remove(it);
}
@@ -288,40 +288,40 @@ Set::removeFromGroup(Property *property)
d->groupForProperty.remove(property);
}
-const QValueList<QCString>&
+const TQValueList<TQCString>&
Set::groupNames() const
{
return d->groupNames;
}
-const QValueList<QCString>&
-Set::propertyNamesForGroup(const QCString &group) const
+const TQValueList<TQCString>&
+Set::propertyNamesForGroup(const TQCString &group) const
{
return d->propertiesOfGroup[group];
}
void
-Set::setGroupDescription(const QCString &group, const QString& desc)
+Set::setGroupDescription(const TQCString &group, const TQString& desc)
{
d->groupDescriptions[group] = desc;
}
-QString
-Set::groupDescription(const QCString &group) const
+TQString
+Set::groupDescription(const TQCString &group) const
{
- if(d->groupDescriptions.contains(group))
+ if(d->groupDescriptions.tqcontains(group))
return d->groupDescriptions[group];
return group;
}
void
-Set::setGroupIcon(const QCString &group, const QString& icon)
+Set::setGroupIcon(const TQCString &group, const TQString& icon)
{
d->groupIcons[group] = icon;
}
-QString
-Set::groupIcon(const QCString &group) const
+TQString
+Set::groupIcon(const TQCString &group) const
{
return d->groupIcons[group];
}
@@ -353,19 +353,19 @@ Set::setReadOnly(bool readOnly)
}
bool
-Set::contains(const QCString &name) const
+Set::tqcontains(const TQCString &name) const
{
- return d->dict.find(name);
+ return d->dict.tqfind(name);
}
Property&
-Set::property(const QCString &name) const
+Set::property(const TQCString &name) const
{
return d->property(name);
}
Property&
-Set::operator[](const QCString &name) const
+Set::operator[](const TQCString &name) const
{
return d->property(name);
}
@@ -393,7 +393,7 @@ Set::operator= (const Set &set)
}
void
-Set::changeProperty(const QCString &property, const QVariant &value)
+Set::changeProperty(const TQCString &property, const TQVariant &value)
{
Property *p = d->dict[property];
if(p)
@@ -416,19 +416,19 @@ Set::debug()
it.current()->debug();
}
-QCString
+TQCString
Set::prevSelection() const
{
return d->prevSelection;
}
void
-Set::setPrevSelection(const QCString &prevSelection)
+Set::setPrevSelection(const TQCString &prevSelection)
{
d->prevSelection = prevSelection;
}
-QString
+TQString
Set::typeName() const
{
return d->typeName;
@@ -439,21 +439,21 @@ Set::typeName() const
Buffer::Buffer()
:Set(false)
{
- connect( this, SIGNAL( propertyChanged( KoProperty::Set&, KoProperty::Property& ) ),
- this, SLOT(intersectedChanged( KoProperty::Set&, KoProperty::Property& ) ) );
+ connect( this, TQT_SIGNAL( propertyChanged( KoProperty::Set&, KoProperty::Property& ) ),
+ this, TQT_SLOT(intersectedChanged( KoProperty::Set&, KoProperty::Property& ) ) );
- connect( this, SIGNAL( propertyReset( KoProperty::Set&, KoProperty::Property& ) ),
- this, SLOT(intersectedReset( KoProperty::Set&, KoProperty::Property& ) ) );
+ connect( this, TQT_SIGNAL( propertyReset( KoProperty::Set&, KoProperty::Property& ) ),
+ this, TQT_SLOT(intersectedReset( KoProperty::Set&, KoProperty::Property& ) ) );
}
Buffer::Buffer(const Set *set)
:Set(false)
{
- connect( this, SIGNAL( propertyChanged( KoProperty::Set&, KoProperty::Property& ) ),
- this, SLOT(intersectedChanged( KoProperty::Set&, KoProperty::Property& ) ) );
+ connect( this, TQT_SIGNAL( propertyChanged( KoProperty::Set&, KoProperty::Property& ) ),
+ this, TQT_SLOT(intersectedChanged( KoProperty::Set&, KoProperty::Property& ) ) );
- connect( this, SIGNAL( propertyReset( KoProperty::Set&, KoProperty::Property& ) ),
- this, SLOT(intersectedReset( KoProperty::Set&, KoProperty::Property& ) ) );
+ connect( this, TQT_SIGNAL( propertyReset( KoProperty::Set&, KoProperty::Property& ) ),
+ this, TQT_SLOT(intersectedReset( KoProperty::Set&, KoProperty::Property& ) ) );
initialSet( set );
}
@@ -463,8 +463,8 @@ void Buffer::initialSet(const Set *set)
//deep copy of set
for(Property::DictIterator it(set->d->dict); it.current(); ++it) {
Property *prop = new Property( *it.current() );
- QCString group = set->d->groupForProperty[it.current()];
- QString groupDesc = set->d->groupDescriptions[ group ];
+ TQCString group = set->d->groupForProperty[it.current()];
+ TQString groupDesc = set->d->groupDescriptions[ group ];
setGroupDescription( group, groupDesc );
addProperty( prop, group );
prop->addRelatedProperty( it.current() );
@@ -496,12 +496,12 @@ void Buffer::intersect(const Set *set)
void Buffer::intersectedChanged(KoProperty::Set& set, KoProperty::Property& prop)
{
Q_UNUSED(set);
- QCString propertyName = prop.name();
- if ( !contains( propertyName ) )
+ TQCString propertyName = prop.name();
+ if ( !tqcontains( propertyName ) )
return;
- const QValueList<Property*> *props = prop.related();
- QValueList<Property*>::const_iterator it = props->begin();
+ const TQValueList<Property*> *props = prop.related();
+ TQValueList<Property*>::const_iterator it = props->begin();
for ( ; it != props->end(); ++it ) {
( *it )->setValue( prop.value(), false );
}
@@ -510,12 +510,12 @@ void Buffer::intersectedChanged(KoProperty::Set& set, KoProperty::Property& prop
void Buffer::intersectedReset(KoProperty::Set& set, KoProperty::Property& prop)
{
Q_UNUSED(set);
- QCString propertyName = prop.name();
- if ( !contains( propertyName ) )
+ TQCString propertyName = prop.name();
+ if ( !tqcontains( propertyName ) )
return;
- const QValueList<Property*> *props = prop.related();
- QValueList<Property*>::const_iterator it = props->begin();
+ const TQValueList<Property*> *props = prop.related();
+ TQValueList<Property*>::const_iterator it = props->begin();
for ( ; it != props->end(); ++it ) {
( *it )->setValue( prop.value(), false );
}
@@ -523,9 +523,9 @@ void Buffer::intersectedReset(KoProperty::Set& set, KoProperty::Property& prop)
//////////////////////////////////////////////
-QMap<QCString, QVariant> KoProperty::propertyValues(const Set& set)
+TQMap<TQCString, TQVariant> KoProperty::propertyValues(const Set& set)
{
- QMap<QCString, QVariant> result;
+ TQMap<TQCString, TQVariant> result;
for (Set::Iterator it(set); it.current(); ++it)
result.insert( it.currentKey(), it.current()->value() );
diff --git a/lib/koproperty/set.h b/lib/koproperty/set.h
index f7c455ed..567bcdad 100644
--- a/lib/koproperty/set.h
+++ b/lib/koproperty/set.h
@@ -23,8 +23,8 @@
#define KPROPERTY_SET_H
#include "koproperty_global.h"
-#include <qobject.h>
-#include <qasciidict.h>
+#include <tqobject.h>
+#include <tqasciidict.h>
namespace KoProperty {
@@ -37,13 +37,14 @@ class SetPrivate;
\author Alexander Dymo <cloudtemple@mskat.net>
\author Jaroslaw Staniek <js@iidea.pl>
*/
-class KOPROPERTY_EXPORT Set : public QObject
+class KOPROPERTY_EXPORT Set : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
/*! \brief A class to iterate over a Set.
- It behaves like a QDictIterator. To use it:
+ It behaves like a TQDictIterator. To use it:
\code for(Set::Iterator it(set); it.current(); ++it) { .... }
\endcode
\author Cedric Pasteur <cedric.pasteur@free.fr>
@@ -56,32 +57,32 @@ class KOPROPERTY_EXPORT Set : public QObject
void operator ++();
Property* operator *() const;
- QCString currentKey() const;
+ TQCString currentKey() const;
Property* current() const;
private:
- QAsciiDictIterator<Property> *iterator;
+ TQAsciiDictIterator<Property> *iterator;
friend class Set;
};
- explicit Set(QObject *parent=0, const QString &typeName=QString::null);
+ explicit Set(TQObject *tqparent=0, const TQString &typeName=TQString());
/*! Constructs a deep copy of \a set.
- The new object will not have a QObject parent even if \a set has such parent. */
+ The new object will not have a TQObject tqparent even if \a set has such tqparent. */
explicit Set(const Set& set);
virtual ~Set();
/*! Adds the property to the set, in the group. You can use any group name, except "common"
(which is already used for basic group). */
- void addProperty(Property *property, QCString group = "common");
+ void addProperty(Property *property, TQCString group = "common");
/*! Removes property from the set. Emits aboutToDeleteProperty before removing.*/
void removeProperty(Property *property);
/*! Removes property with the given name from the set.
Emits aboutToDeleteProperty() before removing.*/
- void removeProperty(const QCString &name);
+ void removeProperty(const TQCString &name);
/*! Removes all properties from the property set and destroys them. */
virtual void clear();
@@ -106,63 +107,63 @@ class KOPROPERTY_EXPORT Set : public QObject
void setReadOnly(bool readOnly);
/*! \return true if the set contains property names \a name. */
- bool contains(const QCString &name) const;
+ bool tqcontains(const TQCString &name) const;
/*! \return property named with \a name. If no such property is found,
null property (Property::null) is returned. */
- Property& property( const QCString &name) const;
+ Property& property( const TQCString &name) const;
/*! Accesses a property by it's name.
Property reference is returned, so all property modifications are allowed.
If there is no such property, null property is returned,
- so it's good practice to use contains() is you're unsure if the property exists.
+ so it's good practice to use tqcontains() is you're unsure if the property exists.
For example, to set a value of a property, use:
/code
Set set;
...
- if (!set.contains("myProperty")) {
+ if (!set.tqcontains("myProperty")) {
dosomething;
}
set["myProperty"].setValue("My Value");
/endcode
\return \ref Property with given name. */
- Property& operator[](const QCString &name) const;
+ Property& operator[](const TQCString &name) const;
/*! Creates a deep copy of \a set and assigns it to this property set. */
const Set& operator= (const Set &set);
/*! Change the value of property whose key is \a property to \a value.
By default, it only calls Property::setValue(). */
- void changeProperty(const QCString &property, const QVariant &value);
+ void changeProperty(const TQCString &property, const TQVariant &value);
/*! Sets the i18n'ed string that will be shown in Editor to represent
\a group. */
- void setGroupDescription(const QCString &group, const QString& desc);
+ void setGroupDescription(const TQCString &group, const TQString& desc);
/*! \return the i18n'ed description string for \a group that will
be shown in Editor to represent \a group. If there is no special
description set for the group, \a group is just returned. */
- QString groupDescription(const QCString &group) const;
+ TQString groupDescription(const TQCString &group) const;
/*! Sets the icon name \a icon to be displayed for \a group. */
- void setGroupIcon(const QCString &group, const QString& icon);
+ void setGroupIcon(const TQCString &group, const TQString& icon);
/*! \return the icons name for \a group. */
- QString groupIcon(const QCString &group) const;
+ TQString groupIcon(const TQCString &group) const;
/*! \return a list of all group names. The order is the same as the order
of creation. */
- const QValueList<QCString>& groupNames() const;
+ const TQValueList<TQCString>& groupNames() const;
/*! \return a list of all property names. The order is the same as the order
of creation. */
- const QValueList<QCString>& propertyNamesForGroup(const QCString &group) const;
+ const TQValueList<TQCString>& propertyNamesForGroup(const TQCString &group) const;
/*! Used by property editor to preserve previous selection when this set
is assigned again. */
- QCString prevSelection() const;
+ TQCString prevSelection() const;
- void setPrevSelection(const QCString& prevSelection);
+ void setPrevSelection(const TQCString& prevSelection);
/*! A name of this property set type, that is usable when
we want to know if two property set objects have the same type.
@@ -170,7 +171,7 @@ class KOPROPERTY_EXPORT Set : public QObject
Also, this allows to know if two property set objects are compatible
by their property sets.
For comparing purposes, type names are case insensitive.*/
- QString typeName() const;
+ TQString typeName() const;
/*! Prints debug output for this set. */
void debug();
@@ -180,7 +181,7 @@ class KOPROPERTY_EXPORT Set : public QObject
Set(bool propertyOwner);
/*! Adds property to a group.*/
- void addToGroup(const QCString &group, Property *property);
+ void addToGroup(const TQCString &group, Property *property);
/*! Removes property from a group.*/
void removeFromGroup(Property *property);
@@ -189,7 +190,7 @@ class KOPROPERTY_EXPORT Set : public QObject
(which is already used for basic group). If \a updateSortingKey is true, the sorting key
will be set automatically to count().
@internal */
- void addPropertyInternal(Property *property, QCString group, bool updateSortingKey);
+ void addPropertyInternal(Property *property, TQCString group, bool updateSortingKey);
/*! @internal used to declare that \a property wants to be informed
that the set has been cleared (all properties are deleted) */
@@ -233,6 +234,7 @@ class KOPROPERTY_EXPORT Set : public QObject
class KOPROPERTY_EXPORT Buffer : public Set
{
Q_OBJECT
+ TQ_OBJECT
public:
Buffer();
diff --git a/lib/koproperty/test/test.cpp b/lib/koproperty/test/test.cpp
index 2c7c7561..df0ec956 100644
--- a/lib/koproperty/test/test.cpp
+++ b/lib/koproperty/test/test.cpp
@@ -23,11 +23,11 @@
#include <kcmdlineargs.h>
#include <kiconloader.h>
-#include <qpixmap.h>
-#include <qstringlist.h>
-#include <qdatetimeedit.h>
-#include <qcursor.h>
-#include <qapplication.h>
+#include <tqpixmap.h>
+#include <tqstringlist.h>
+#include <tqdatetimeedit.h>
+#include <tqcursor.h>
+#include <tqapplication.h>
#include <koproperty/property.h>
#include <koproperty/editor.h>
@@ -44,15 +44,15 @@ Test::Test()
const bool readOnly = args->isSet("ro");
// setXMLFile("testui.rc");
- QFont f;
+ TQFont f;
f.setPixelSize(f.pixelSize()*2/3);
setFont(f);
/* First, create the Set which will hold the properties. */
Property *p = 0;
- m_set = new Set(this, "test");
+ m_set = new Set(TQT_TQOBJECT(this), "test");
m_set->setReadOnly(readOnly);
- QCString group;
+ TQCString group;
if (!flat) {
group = "SimpleGroup";
m_set->setGroupDescription(group, "Simple Group");
@@ -62,22 +62,22 @@ Test::Test()
m_set->addProperty(new Property("Int", 2, "Int"), group);
m_set->addProperty(new Property("Double", 3.1415,"Double"), group);
- m_set->addProperty(new Property("Bool", QVariant(true, 4), "Bool"), group);
- m_set->addProperty(p = new Property("3 States", QVariant(), "3 States", "", Boolean), group);
+ m_set->addProperty(new Property("Bool", TQVariant(true, 4), "Bool"), group);
+ m_set->addProperty(p = new Property("3 States", TQVariant(), "3 States", "", Boolean), group);
p->setOption("3rdState", "None");
- m_set->addProperty(p = new Property("Date", QDate::currentDate(),"Date"), group);
+ m_set->addProperty(p = new Property("Date", TQDate::tqcurrentDate(),"Date"), group);
p->setIcon("date");
- m_set->addProperty(new Property("Time", QTime::currentTime(),"Time"), group);
- m_set->addProperty(new Property("DateTime", QDateTime::currentDateTime(),"Date/Time"), group);
+ m_set->addProperty(new Property("Time", TQTime::currentTime(),"Time"), group);
+ m_set->addProperty(new Property("DateTime", TQDateTime::tqcurrentDateTime(),"Date/Time"), group);
- QStringList list;//keys
+ TQStringList list;//keys
list << "myitem" << "otheritem" << "3rditem";
- QStringList name_list; //strings
+ TQStringList name_list; //strings
name_list << "My Item" << "Other Item" << "Third Item";
m_set->addProperty(new Property("List", list, name_list, "otheritem", "List"), group);
- // A valueFromList property matching strings with ints (could be any type supported by QVariant)
- QValueList<QVariant> keys;
+ // A valueFromList property matching strings with ints (could be any type supported by TQVariant)
+ TQValueList<TQVariant> keys;
keys.append(1);
keys.append(2);
keys.append(3);
@@ -89,9 +89,9 @@ Test::Test()
group = "ComplexGroup";
m_set->setGroupDescription(group, "Complex Group");
}
- m_set->addProperty(new Property("Rect", this->geometry(),"Rect"), group);
- m_set->addProperty(new Property("Point", QPoint(3,4), "Point"), group);
- m_set->addProperty(new Property("Size", QPoint(3,4), "Size"), group);
+ m_set->addProperty(new Property("Rect", this->tqgeometry(),"Rect"), group);
+ m_set->addProperty(new Property("Point", TQPoint(3,4), "Point"), group);
+ m_set->addProperty(new Property("Size", TQPoint(3,4), "Size"), group);
// Appearance
if (!flat) {
@@ -99,22 +99,22 @@ Test::Test()
m_set->setGroupDescription(group, "Appearance Group");
m_set->setGroupIcon(group, "appearance");
}
- m_set->addProperty(new Property("Color", this->paletteBackgroundColor(),"Color"), group);
- QPixmap pm(DesktopIcon("network"));
+ m_set->addProperty(new Property("Color", TQColor(this->paletteBackgroundColor()),"Color"), group);
+ TQPixmap pm(DesktopIcon("network"));
m_set->addProperty(p = new Property("Pixmap", pm,"Pixmap"), group);
p->setIcon("kpaint");
- m_set->addProperty(p = new Property("Font", this->font(),"Font"), group);
+ m_set->addProperty(p = new Property("Font", TQFont(this->font()),"Font"), group);
p->setIcon("fonts");
- m_set->addProperty(new Property("Cursor", QCursor(Qt::WaitCursor),"Cursor"), group);
+ m_set->addProperty(new Property("Cursor", TQCursor(TQt::WaitCursor),"Cursor"), group);
m_set->addProperty(new Property("LineStyle", 3, "Line Style", "", LineStyle), group);
- m_set->addProperty(new Property("SizePolicy", sizePolicy(), "Size Policy"), group);
+ m_set->addProperty(new Property("SizePolicy", tqsizePolicy(), "Size Policy"), group);
// kdDebug() << m_set->groupNames() << endl;
Editor *edit = new Editor(this,true/*autosync*/);
setCentralWidget(edit);
edit->changeSet(m_set);
- resize(400,qApp->desktop()->height()-200);
+ resize(400,tqApp->desktop()->height()-200);
move(x(),5);
edit->setFocus();
}
diff --git a/lib/koproperty/test/test.h b/lib/koproperty/test/test.h
index cef6e97a..b0a278c8 100644
--- a/lib/koproperty/test/test.h
+++ b/lib/koproperty/test/test.h
@@ -36,6 +36,7 @@
class Test : public KMainWindow
{
Q_OBJECT
+ TQ_OBJECT
public:
Test();
virtual ~Test();
diff --git a/lib/koproperty/utils.h b/lib/koproperty/utils.h
index ee583508..ad77bf90 100644
--- a/lib/koproperty/utils.h
+++ b/lib/koproperty/utils.h
@@ -20,29 +20,29 @@
#ifndef KOPROPERTY_UTILS_H
#define KOPROPERTY_UTILS_H
-#include <qmap.h>
-#include <qwidget.h>
+#include <tqmap.h>
+#include <tqwidget.h>
namespace KoProperty {
//! @short A container widget that can be used to split information into hideable sections
//! for a property editor-like panes.
-class KOPROPERTY_EXPORT GroupContainer : public QWidget
+class KOPROPERTY_EXPORT GroupContainer : public TQWidget
{
public:
- GroupContainer(const QString& title, QWidget* parent);
+ GroupContainer(const TQString& title, TQWidget* tqparent);
~GroupContainer();
- void setContents( QWidget* contents );
+ void setContents( TQWidget* contents );
protected:
- virtual bool event( QEvent * e );
+ virtual bool event( TQEvent * e );
class Private;
Private *d;
};
-KOPROPERTY_EXPORT QMap<QCString, QVariant> propertyValues(const Set& set);
+KOPROPERTY_EXPORT TQMap<TQCString, TQVariant> propertyValues(const Set& set);
}
diff --git a/lib/koproperty/widget.cpp b/lib/koproperty/widget.cpp
index 2584477e..1efeb5c0 100644
--- a/lib/koproperty/widget.cpp
+++ b/lib/koproperty/widget.cpp
@@ -23,8 +23,8 @@
#include "editoritem.h"
#include "editor.h"
-#include <qpainter.h>
-#include <qvariant.h>
+#include <tqpainter.h>
+#include <tqvariant.h>
#include <klistview.h>
#include <kdebug.h>
@@ -47,7 +47,7 @@ class WidgetPrivate
~WidgetPrivate() {}
Property *property;
- QWidget *editor;
+ TQWidget *editor;
bool leaveTheSpaceForRevertButton : 1;
bool hasBorders : 1;
bool readOnly : 1;
@@ -55,8 +55,8 @@ class WidgetPrivate
};
}
-Widget::Widget(Property *property, QWidget *parent, const char *name)
- : QWidget(parent, name)
+Widget::Widget(Property *property, TQWidget *tqparent, const char *name)
+ : TQWidget(tqparent, name)
{
d = new WidgetPrivate();
d->property = property;
@@ -85,16 +85,16 @@ Widget::setProperty(Property *property)
}
void
-Widget::drawViewer(QPainter *p, const QColorGroup &, const QRect &r, const QVariant &value)
+Widget::drawViewer(TQPainter *p, const TQColorGroup &, const TQRect &r, const TQVariant &value)
{
p->eraseRect(r);
- QRect rect(r);
+ TQRect rect(r);
rect.setLeft(rect.left()+KPROPEDITOR_ITEM_MARGIN);
// if (d->hasBorders)
// rect.setTop(rect.top()+1); //+1 to have the same vertical position as editor
// else
// rect.setHeight(rect.height()-1); //don't place over listviews's border
- p->drawText(rect, Qt::AlignLeft | Qt::AlignVCenter | Qt::SingleLine, value.toString());
+ p->drawText(rect, TQt::AlignLeft | TQt::AlignVCenter | TQt::SingleLine, value.toString());
}
void
@@ -105,11 +105,11 @@ Widget::undo()
}
bool
-Widget::eventFilter(QObject*, QEvent* e)
+Widget::eventFilter(TQObject*, TQEvent* e)
{
- if(e->type() == QEvent::KeyPress)
+ if(e->type() == TQEvent::KeyPress)
{
- QKeyEvent* ev = static_cast<QKeyEvent*>(e);
+ TQKeyEvent* ev = TQT_TQKEYEVENT(e);
if(ev->key() == Key_Escape)
{
emit rejectInput(this);
@@ -122,7 +122,7 @@ Widget::eventFilter(QObject*, QEvent* e)
return true;
}
else {
- Editor *list = static_cast<KoProperty::Editor*>(parentWidget()->parentWidget());
+ Editor *list = static_cast<KoProperty::Editor*>(tqparentWidget()->tqparentWidget());
if (!list)
return false; //for sanity
return list->handleKeyPress(ev);
@@ -149,10 +149,10 @@ Widget::eventFilter(QObject*, QEvent* e)
}
void
-Widget::setFocusWidget(QWidget*focusProxy)
+Widget::setFocusWidget(TQWidget*focusProxy)
{
if (focusProxy) {
- if (focusProxy->focusPolicy() != NoFocus)
+ if (focusProxy->focusPolicy() != TQ_NoFocus)
setFocusProxy(focusProxy);
focusProxy->installEventFilter(this);
}
@@ -187,19 +187,19 @@ Widget::hasBorders() const
}
void
-Widget::setEditor(QWidget* editor)
+Widget::setEditor(TQWidget* editor)
{
d->editor = editor;
if (!d->editor)
return;
- d->editor->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
+ d->editor->tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed);
d->editor->move(0,0);
}
void
-Widget::resizeEvent(QResizeEvent *e)
+Widget::resizeEvent(TQResizeEvent *e)
{
- QWidget::resizeEvent(e);
+ TQWidget::resizeEvent(e);
if (d->editor)
d->editor->resize(size());
}
diff --git a/lib/koproperty/widget.h b/lib/koproperty/widget.h
index a758589e..9646ecc9 100644
--- a/lib/koproperty/widget.h
+++ b/lib/koproperty/widget.h
@@ -21,7 +21,7 @@
#ifndef KPROPERTY_PROPERTYWIDGET_H
#define KPROPERTY_PROPERTYWIDGET_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include "koproperty_global.h"
namespace KoProperty {
@@ -33,20 +33,21 @@ class Property;
\author Cedric Pasteur <cedric.pasteur@free.fr>
\author Alexander Dymo <cloudtemple@mskat.net>
*/
-class KOPROPERTY_EXPORT Widget : public QWidget
+class KOPROPERTY_EXPORT Widget : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- Widget(Property *property, QWidget *parent, const char *name="property_editor");
+ Widget(Property *property, TQWidget *tqparent, const char *name="property_editor");
virtual ~Widget();
/*! \return the value currently entered in the item editor widget.*/
- virtual QVariant value() const = 0;
+ virtual TQVariant value() const = 0;
/*! Sets the value shown in the item editor widget. Set emitChange to false
if you don't want to emit propertyChanged signal.*/
- virtual void setValue(const QVariant &value, bool emitChange=true) = 0;
+ virtual void setValue(const TQVariant &value, bool emitChange=true) = 0;
/*! \return edited property. */
virtual Property* property() const;
@@ -55,13 +56,13 @@ class KOPROPERTY_EXPORT Widget : public QWidget
virtual void setProperty(Property *property);
/*! Function to draw a property viewer when the item editor isn't shown.*/
- virtual void drawViewer(QPainter *p, const QColorGroup &cg, const QRect &r, const QVariant &value);
+ virtual void drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value);
/*! Reverts the property value to previous setting.*/
virtual void undo();
/*! Sets the widget that will receive focus when the Widget is selected. */
- void setFocusWidget(QWidget*focusProxy);
+ void setFocusWidget(TQWidget*focusProxy);
//! \sa d->leaveTheSpaceForRevertButton description
bool leavesTheSpaceForRevertButton() const;
@@ -92,12 +93,12 @@ class KOPROPERTY_EXPORT Widget : public QWidget
void rejectInput(Widget *widget);
protected:
- void setEditor(QWidget* editor);
+ void setEditor(TQWidget* editor);
/*! Filters some event for main widget, eg Enter or Esc key presses. */
- virtual bool eventFilter(QObject* watched, QEvent* e);
+ virtual bool eventFilter(TQObject* watched, TQEvent* e);
- virtual void resizeEvent(QResizeEvent *e);
+ virtual void resizeEvent(TQResizeEvent *e);
void setLeavesTheSpaceForRevertButton(bool set);
void setHasBorders(bool set);
diff --git a/lib/koproperty/widgetproxy.cpp b/lib/koproperty/widgetproxy.cpp
index a98f57a1..94656038 100644
--- a/lib/koproperty/widgetproxy.cpp
+++ b/lib/koproperty/widgetproxy.cpp
@@ -22,15 +22,15 @@
#include "widget.h"
#include "factory.h"
-#include <qlayout.h>
-#include <qvariant.h>
+#include <tqlayout.h>
+#include <tqvariant.h>
namespace KoProperty {
class WidgetProxyPrivate
{
public:
WidgetProxyPrivate()
- : property(0), widget(0), type(Invalid), layout(0)
+ : property(0), widget(0), type(Invalid), tqlayout(0)
{}
~WidgetProxyPrivate() {}
@@ -38,18 +38,18 @@ class WidgetProxyPrivate
Widget *widget;
PropertyType type;
- QHBoxLayout *layout;
+ TQHBoxLayout *tqlayout;
};
}
using namespace KoProperty;
-WidgetProxy::WidgetProxy(QWidget *parent, const char *name)
- : QWidget(parent, name)
+WidgetProxy::WidgetProxy(TQWidget *tqparent, const char *name)
+ : TQWidget(tqparent, name)
{
d = new WidgetProxyPrivate();
d->property = new Property();
- d->layout = new QHBoxLayout(this, 0, 0);
+ d->tqlayout = new TQHBoxLayout(this, 0, 0);
}
WidgetProxy::~WidgetProxy()
@@ -70,24 +70,24 @@ WidgetProxy::propertyType() const
return d->type;
}
-QVariant
+TQVariant
WidgetProxy::value() const
{
if (m_editor)
return m_editor->value();
else
- return QVariant();
+ return TQVariant();
}
void
-WidgetProxy::setValue(const QVariant &value)
+WidgetProxy::setValue(const TQVariant &value)
{
if (d->widget)
d->widget->setValue(value, false);
}
bool
-WidgetProxy::setProperty(const char *name, const QVariant &value)
+WidgetProxy::setProperty(const char *name, const TQVariant &value)
{
if( strcmp(name, "value") == 0 ) {
setPropertyType((int) value.type() );
@@ -95,16 +95,16 @@ WidgetProxy::setProperty(const char *name, const QVariant &value)
return true;
}
else
- return QWidget::setProperty(name, value);
+ return TQWidget::setProperty(name, value);
}
-QVariant
+TQVariant
WidgetProxy::property(const char *name) const
{
if( strcmp( name, "value") == 0 )
return value( );
else
- return QWidget::property(name);
+ return TQWidget::property(name);
}
void
@@ -117,8 +117,8 @@ WidgetProxy::setWidget()
d->widget = Factory::getInstance()->widgetForProperty(p);
if (d->widget) {
- d->widget->reparent(this, QPoint(0,0), true);
- d->layout->addWidget(d->widget);
+ d->widget->reparent(this, TQPoint(0,0), true);
+ d->tqlayout->addWidget(d->widget);
}
}
diff --git a/lib/koproperty/widgetproxy.h b/lib/koproperty/widgetproxy.h
index 17c9b4ff..4724eb61 100644
--- a/lib/koproperty/widgetproxy.h
+++ b/lib/koproperty/widgetproxy.h
@@ -21,10 +21,10 @@
#ifndef KPROPERTY_PROPERTYWIDGETPROXY_H
#define KPROPERTY_PROPERTYWIDGETPROXY_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include "koproperty_global.h"
-class QVariant;
+class TQVariant;
namespace KoProperty {
@@ -34,22 +34,23 @@ class WidgetProxyPrivate;
\author Cedric Pasteur <cedric.pasteur@free.fr>
\author Alexander Dymo <cloudtemple@mskat.net>
*/
-class KOPROPERTY_EXPORT WidgetProxy : public QWidget
+class KOPROPERTY_EXPORT WidgetProxy : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- WidgetProxy(QWidget *parent, const char *name=0);
+ WidgetProxy(TQWidget *tqparent, const char *name=0);
WidgetProxy();
void setPropertyType(int propertyType);
int propertyType() const;
- QVariant value() const;
- void setValue(const QVariant &value);
+ TQVariant value() const;
+ void setValue(const TQVariant &value);
- virtual bool setProperty( const char *name, const QVariant &value);
- virtual QVariant property( const char *name) const;
+ virtual bool setProperty( const char *name, const TQVariant &value);
+ virtual TQVariant property( const char *name) const;
protected:
void setWidget();