diff options
| author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:56:07 +0000 | 
|---|---|---|
| committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:56:07 +0000 | 
| commit | d6f8bbb45b267065a6907e71ff9c98bb6d161241 (patch) | |
| tree | d109539636691d7b03036ca1c0ed29dbae6577cf /lib/widgets/propeditor | |
| parent | 3331a47a9cad24795c7440ee8107143ce444ef34 (diff) | |
| download | tdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.tar.gz tdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.zip  | |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1157658 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'lib/widgets/propeditor')
68 files changed, 937 insertions, 937 deletions
diff --git a/lib/widgets/propeditor/childproperty.cpp b/lib/widgets/propeditor/childproperty.cpp index 12b7f4d9..ac53936a 100644 --- a/lib/widgets/propeditor/childproperty.cpp +++ b/lib/widgets/propeditor/childproperty.cpp @@ -19,29 +19,29 @@   ***************************************************************************/  #include "childproperty.h" -#include <qsize.h> -#include <qpoint.h> -#include <qrect.h> -#include <qsizepolicy.h> +#include <tqsize.h> +#include <tqpoint.h> +#include <tqrect.h> +#include <tqsizepolicy.h>  #include "multiproperty.h"  namespace PropertyLib{ -ChildProperty::ChildProperty(MultiProperty *parent, int type, ChildPropertyType childType, const QString &name, -    const QString &description, const QVariant &value, bool save, bool readOnly) +ChildProperty::ChildProperty(MultiProperty *parent, int type, ChildPropertyType childType, const TQString &name, +    const TQString &description, const TQVariant &value, bool save, bool readOnly)      :Property(type, name, description, value, save, readOnly), m_parent(parent), m_childType(childType)  {  } -ChildProperty::ChildProperty(MultiProperty *parent, const QString & name, ChildPropertyType childType, -    const QMap<QString, QVariant> &v_valueList, const QString &description, -    const QVariant &value, bool save, bool readOnly) +ChildProperty::ChildProperty(MultiProperty *parent, const TQString & name, ChildPropertyType childType, +    const TQMap<TQString, TQVariant> &v_valueList, const TQString &description, +    const TQVariant &value, bool save, bool readOnly)      :Property(name, v_valueList, description, value, save, readOnly), m_parent(parent), m_childType(childType)  {  } -void ChildProperty::setValue(const QVariant &value, bool // rememberOldValue +void ChildProperty::setValue(const TQVariant &value, bool // rememberOldValue                               )  {      qWarning("ChildProperty::setValue"); @@ -51,8 +51,8 @@ void ChildProperty::setValue(const QVariant &value, bool // rememberOldValue      {          case Size:          { -            qWarning("ChildProperty::setValue for QSize"); -            QSize v = m_parent->value().toSize(); +            qWarning("ChildProperty::setValue for TQSize"); +            TQSize v = m_parent->value().toSize();              if (m_childType == Size_Height)                  v.setHeight(value.toInt());              else if (m_childType == Size_Width) @@ -62,8 +62,8 @@ void ChildProperty::setValue(const QVariant &value, bool // rememberOldValue          }          case Point:          { -            qWarning("ChildProperty::setValue for QPoint"); -            QPoint v = m_parent->value().toPoint(); +            qWarning("ChildProperty::setValue for TQPoint"); +            TQPoint v = m_parent->value().toPoint();              if (m_childType == Point_X)                  v.setX(value.toInt());              else if (m_childType == Point_Y) @@ -73,8 +73,8 @@ void ChildProperty::setValue(const QVariant &value, bool // rememberOldValue          }          case Rect:          { -            qWarning("ChildProperty::setValue for QRect"); -            QRect v = m_parent->value().toRect(); +            qWarning("ChildProperty::setValue for TQRect"); +            TQRect v = m_parent->value().toRect();              if (m_childType == Rect_X)                  v.setX(value.toInt());              else if (m_childType == Rect_Y) @@ -88,12 +88,12 @@ void ChildProperty::setValue(const QVariant &value, bool // rememberOldValue          }          case SizePolicy:          { -            qWarning("ChildProperty::setValue for QSizePolicy"); -            QSizePolicy v = m_parent->value().toSizePolicy(); +            qWarning("ChildProperty::setValue for TQSizePolicy"); +            TQSizePolicy v = m_parent->value().toSizePolicy();              if (m_childType == SizePolicy_HorData) -                v.setHorData(QSizePolicy::SizeType(value.toInt())); +                v.setHorData(TQSizePolicy::SizeType(value.toInt()));              else if (m_childType == SizePolicy_VerData) -                v.setVerData(QSizePolicy::SizeType(value.toInt())); +                v.setVerData(TQSizePolicy::SizeType(value.toInt()));              else if (m_childType == SizePolicy_HorStretch)                  v.setHorStretch(value.toInt());              else if (m_childType == SizePolicy_VerStretch) @@ -104,10 +104,10 @@ void ChildProperty::setValue(const QVariant &value, bool // rememberOldValue      }  } -QVariant ChildProperty::value( ) const +TQVariant ChildProperty::value( ) const  {      if (!m_parent->valid()) -        return QVariant(); +        return TQVariant();      switch (m_parent->type())      {          case Size: @@ -139,7 +139,7 @@ QVariant ChildProperty::value( ) const              else if (m_childType == SizePolicy_VerStretch)                  return m_parent->value().toSizePolicy().verStretch();      } -    return QVariant(); +    return TQVariant();  }  } diff --git a/lib/widgets/propeditor/childproperty.h b/lib/widgets/propeditor/childproperty.h index fc43553a..6e247fd3 100644 --- a/lib/widgets/propeditor/childproperty.h +++ b/lib/widgets/propeditor/childproperty.h @@ -60,18 +60,18 @@ public:      /**Constructs empty property.*/      ChildProperty() {}      /**Constructs property.*/ -    ChildProperty(MultiProperty *parent, int type, ChildPropertyType childType, const QString &name, -        const QString &description, const QVariant &value = QVariant(), +    ChildProperty(MultiProperty *parent, int type, ChildPropertyType childType, const TQString &name, +        const TQString &description, const TQVariant &value = TQVariant(),          bool save = true, bool readOnly = false);      /**Constructs property with @ref ValueFromList type.*/ -    ChildProperty(MultiProperty *parent, const QString &name, ChildPropertyType childType, -        const QMap<QString, QVariant> &v_valueList, const QString &description, -        const QVariant &value = QVariant(), bool save = true, bool readOnly = false); +    ChildProperty(MultiProperty *parent, const TQString &name, ChildPropertyType childType, +        const TQMap<TQString, TQVariant> &v_valueList, const TQString &description, +        const TQVariant &value = TQVariant(), bool save = true, bool readOnly = false);      /**@return the value of the property.*/ -    virtual QVariant value() const; +    virtual TQVariant value() const;      /**Sets the value of the property.*/ -    virtual void setValue(const QVariant &value, bool rememberOldValue = true); +    virtual void setValue(const TQVariant &value, bool rememberOldValue = true);  private:      MultiProperty *m_parent; diff --git a/lib/widgets/propeditor/compat_tools.h b/lib/widgets/propeditor/compat_tools.h index 1a1a8735..a932b24a 100644 --- a/lib/widgets/propeditor/compat_tools.h +++ b/lib/widgets/propeditor/compat_tools.h @@ -1,6 +1,6 @@  #ifndef COMPAT_TOOLS_H  #define COMPAT_TOOLS_H -#define i18n QObject::tr +#define i18n TQObject::tr  #endif diff --git a/lib/widgets/propeditor/multiproperty.cpp b/lib/widgets/propeditor/multiproperty.cpp index 17b05797..9c3b04c4 100644 --- a/lib/widgets/propeditor/multiproperty.cpp +++ b/lib/widgets/propeditor/multiproperty.cpp @@ -43,50 +43,50 @@ MultiProperty::~MultiProperty()  {  } -QString MultiProperty::name() const +TQString MultiProperty::name() const  {      if (list.count() >= 1)          return list.getFirst()->name(); -    return QString::null;    +    return TQString::null;     }  int MultiProperty::type() const  {      if (list.count() >= 1)          return list.getFirst()->type(); -    return QVariant::Invalid;    +    return TQVariant::Invalid;     } -QVariant MultiProperty::value() const +TQVariant MultiProperty::value() const  { -    QVariant value; +    TQVariant value;      if (list.count() >= 1)          value = list.getFirst()->value(); -    QPtrListIterator<Property> it(list); +    TQPtrListIterator<Property> it(list);      Property *property;      while ((property = it.current()) != 0)      {          if (property->value() != value) -            return QVariant::Invalid; +            return TQVariant::Invalid;          ++it;      }      return value;  } -QString MultiProperty::description() const +TQString MultiProperty::description() const  { -    QString description; +    TQString description;      if (list.count() >= 1)          description = list.getFirst()->description(); -    QPtrListIterator<Property> it(list); +    TQPtrListIterator<Property> it(list);      Property *property;      while ((property = it.current()) != 0)      {          if (property->description() != description) -            return QString::null; +            return TQString::null;          ++it;      } @@ -99,7 +99,7 @@ bool MultiProperty::readOnly() const      if (list.count() >= 1)          v = list.getFirst()->readOnly(); -    QPtrListIterator<Property> it(list); +    TQPtrListIterator<Property> it(list);      Property *property;      while ((property = it.current()) != 0)      { @@ -117,7 +117,7 @@ bool MultiProperty::visible() const      if (list.count() >= 1)          v = list.getFirst()->readOnly(); -    QPtrListIterator<Property> it(list); +    TQPtrListIterator<Property> it(list);      Property *property;      while ((property = it.current()) != 0)      { @@ -129,21 +129,21 @@ bool MultiProperty::visible() const      return v;  } -QMap<QString, QVariant> MultiProperty::valueList() const +TQMap<TQString, TQVariant> MultiProperty::valueList() const  {      if (list.count() >= 1)          return list.getFirst()->valueList; -    return QMap<QString, QVariant>(); +    return TQMap<TQString, TQVariant>();  } -void MultiProperty::setDescription(const QString &description) +void MultiProperty::setDescription(const TQString &description)  {      Property *property;      for (property = list.first(); property; property = list.next())          property->setDescription(description);  } -/*void MultiProperty::setName(const QString &name) +/*void MultiProperty::setName(const TQString &name)  {  } @@ -151,7 +151,7 @@ void MultiProperty::setType(int type)  {  }  */ -void MultiProperty::setValue(const QVariant &value) +void MultiProperty::setValue(const TQVariant &value)  {      Property *property;      for (property = list.first(); property; property = list.next()) @@ -165,7 +165,7 @@ void MultiProperty::setValue(const QVariant &value)      }  } -void MultiProperty::setValue(const QVariant &value, bool emitChange) +void MultiProperty::setValue(const TQVariant &value, bool emitChange)  {      Property *property;      for (property = list.first(); property; property = list.next()) @@ -176,7 +176,7 @@ void MultiProperty::setValue(const QVariant &value, bool emitChange)      }  } -void MultiProperty::setValueList(const QMap<QString, QVariant> &valueList) +void MultiProperty::setValueList(const TQMap<TQString, TQVariant> &valueList)  {      Property *property;      for (property = list.first(); property; property = list.next()) @@ -227,13 +227,13 @@ void MultiProperty::removeProperty( MultiProperty *prop)          removeProperty(property);  } -QVariant MultiProperty::findValueDescription() const +TQVariant MultiProperty::findValueDescription() const  { -    QVariant val = value(); +    TQVariant val = value();      if (type() != Property::ValueFromList)          return val; -    QMap<QString, QVariant> vl = valueList(); -    for (QMap<QString, QVariant>::const_iterator it = vl.begin(); it != vl.end(); ++ it) +    TQMap<TQString, TQVariant> vl = valueList(); +    for (TQMap<TQString, TQVariant>::const_iterator it = vl.begin(); it != vl.end(); ++ it)      {          if (it.data() == val)              return it.key(); @@ -241,12 +241,12 @@ QVariant MultiProperty::findValueDescription() const      return "";  } -QVariant MultiProperty::findValueDescription(QVariant val) const +TQVariant MultiProperty::findValueDescription(TQVariant val) const  {      if (type() != Property::ValueFromList)          return val; -    QMap<QString, QVariant> vl = valueList(); -    for (QMap<QString, QVariant>::const_iterator it = vl.begin(); it != vl.end(); ++ it) +    TQMap<TQString, TQVariant> vl = valueList(); +    for (TQMap<TQString, TQVariant>::const_iterator it = vl.begin(); it != vl.end(); ++ it)      {          if (it.data() == val)              return it.key(); diff --git a/lib/widgets/propeditor/multiproperty.h b/lib/widgets/propeditor/multiproperty.h index a0d63c64..49410a04 100644 --- a/lib/widgets/propeditor/multiproperty.h +++ b/lib/widgets/propeditor/multiproperty.h @@ -19,9 +19,9 @@  #ifndef MULTIPROPERTY_H  #define MULTIPROPERTY_H -#include <qptrlist.h> -#include <qmap.h> -#include <qvariant.h> +#include <tqptrlist.h> +#include <tqmap.h> +#include <tqvariant.h>  #include "property.h"  #include "childproperty.h" @@ -72,36 +72,36 @@ public:      void removeProperty(MultiProperty *prop);      /**Returns the name of a %property.*/ -    QString name() const; +    TQString name() const;      /**Returns the type of a %property.*/      int type() const;      /**Returns the value of a %property.*/ -    QVariant value() const; +    TQVariant value() const;      /**Returns the description of a %property.*/ -    QString description() const; +    TQString description() const;      /**Returns the readonly attribute of a %property.*/      bool readOnly() const;      /**Returns the visibility attribute of a %property.*/      bool visible() const;      /**The string-to-value correspondence list of the %property.*/ -    QMap<QString, QVariant> valueList() const; +    TQMap<TQString, TQVariant> valueList() const;      /**Sets the value of a %property.*/ -    void setValue(const QVariant& value); +    void setValue(const TQVariant& value);      /**Sets the value of a %property.      @param value new value of thus %multiproperty       @param emitChange if set to true then %property list which owns this %multiproperty       emits propertyValueChanged signal.*/ -    void setValue(const QVariant& value, bool emitChange); +    void setValue(const TQVariant& value, bool emitChange);      /**Sets the description of a %property.*/ -    void setDescription(const QString &description); +    void setDescription(const TQString &description);      /**Sets the list of possible values of a %property.*/ -    void setValueList(const QMap< QString, QVariant >& valueList); +    void setValueList(const TQMap< TQString, TQVariant >& valueList);      /**Finds string description for a value.*/ -    QVariant findValueDescription() const; +    TQVariant findValueDescription() const;      /**Finds string description for a value.*/ -    QVariant findValueDescription(QVariant val) const; +    TQVariant findValueDescription(TQVariant val) const;      /**Returns true if the %multiproperty has no properties in the list (i.e. it's invalid).*/      bool valid() const; @@ -110,10 +110,10 @@ public:      void undo();      /**The list of child properties.*/ -    QValueList<ChildProperty> details; +    TQValueList<ChildProperty> details;  private: -    QPtrList<Property> list; +    TQPtrList<Property> list;      PropertyList *m_propertyList; diff --git a/lib/widgets/propeditor/pcheckbox.cpp b/lib/widgets/propeditor/pcheckbox.cpp index 15aacbff..3f406e4d 100644 --- a/lib/widgets/propeditor/pcheckbox.cpp +++ b/lib/widgets/propeditor/pcheckbox.cpp @@ -19,9 +19,9 @@   ***************************************************************************/  #include "pcheckbox.h" -#include <qlayout.h> -#include <qcheckbox.h> -#include <qpainter.h> +#include <tqlayout.h> +#include <tqcheckbox.h> +#include <tqpainter.h>  #ifndef PURE_QT  #include <klocale.h> @@ -31,37 +31,37 @@  namespace PropertyLib{ -PCheckBox::PCheckBox(MultiProperty *property, QWidget *parent, const char *name) +PCheckBox::PCheckBox(MultiProperty *property, TQWidget *parent, const char *name)      :PropertyWidget(property, parent, name)  { -    QHBoxLayout *l = new QHBoxLayout(this, 0, 0); -    m_edit = new QCheckBox(this); -    m_edit->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding); +    TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0); +    m_edit = new TQCheckBox(this); +    m_edit->setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);      l->addWidget(m_edit); -    connect(m_edit, SIGNAL(toggled(bool)), this, SLOT(updateProperty(bool))); +    connect(m_edit, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(updateProperty(bool)));  } -QVariant PCheckBox::value() const +TQVariant PCheckBox::value() const  { -    return QVariant(m_edit->isChecked()); +    return TQVariant(m_edit->isChecked());  } -void PCheckBox::setValue(const QVariant &value, bool emitChange) +void PCheckBox::setValue(const TQVariant &value, bool emitChange)  { -    disconnect(m_edit, SIGNAL(toggled(bool)), this, SLOT(updateProperty(bool))); +    disconnect(m_edit, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(updateProperty(bool)));      m_edit->setChecked(value.toBool()); -    connect(m_edit, SIGNAL(toggled(bool)), this, SLOT(updateProperty(bool))); +    connect(m_edit, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(updateProperty(bool)));      if (emitChange)          emit propertyChanged(m_property, value);  }  void PCheckBox::updateProperty(bool val)  { -    emit propertyChanged(m_property, QVariant(val)); +    emit propertyChanged(m_property, TQVariant(val));  } -void PCheckBox::drawViewer(QPainter *p, const QColorGroup &cg, const QRect &r, const QVariant &value) +void PCheckBox::drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value)  {      p->setBrush(cg.background());      p->setPen(Qt::NoPen); diff --git a/lib/widgets/propeditor/pcheckbox.h b/lib/widgets/propeditor/pcheckbox.h index 0ea56498..53cefe57 100644 --- a/lib/widgets/propeditor/pcheckbox.h +++ b/lib/widgets/propeditor/pcheckbox.h @@ -32,21 +32,21 @@ namespace PropertyLib{  class PCheckBox: public PropertyWidget{      Q_OBJECT  public: -    PCheckBox(MultiProperty *property, QWidget *parent = 0, const char *name = 0); +    PCheckBox(MultiProperty *property, TQWidget *parent = 0, const char *name = 0);      /**@return the value currently entered in the editor widget.*/ -    virtual QVariant value() const; +    virtual TQVariant value() const;      /**Sets the value shown in the editor widget. Set emitChange to false      if you don't want to emit propertyChanged signal.*/ -    virtual void setValue(const QVariant &value, bool emitChange=true); +    virtual void setValue(const TQVariant &value, bool emitChange=true);      /**Function to draw a property viewer when the 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);  private slots:      void updateProperty(bool val);  private: -    QCheckBox *m_edit; +    TQCheckBox *m_edit;  };  } diff --git a/lib/widgets/propeditor/pcolorbutton.cpp b/lib/widgets/propeditor/pcolorbutton.cpp index 84063e8b..9609442f 100644 --- a/lib/widgets/propeditor/pcolorbutton.cpp +++ b/lib/widgets/propeditor/pcolorbutton.cpp @@ -19,46 +19,46 @@   ***************************************************************************/  #include "pcolorbutton.h" -#include <qlayout.h> -#include <qpainter.h> +#include <tqlayout.h> +#include <tqpainter.h>  #ifndef PURE_QT  #include <kcolorbutton.h>  #else -#include <qpushbutton.h> -#include <qpixmap.h> -#include <qiconset.h> +#include <tqpushbutton.h> +#include <tqpixmap.h> +#include <tqiconset.h>  #endif -#include <qcolordialog.h> +#include <tqcolordialog.h>  namespace PropertyLib { -PColorButton::PColorButton(MultiProperty* property, QWidget* parent, const char* name) +PColorButton::PColorButton(MultiProperty* property, TQWidget* parent, const char* name)      :PropertyWidget(property, parent, name)  { -    QHBoxLayout *l = new QHBoxLayout(this, 0, 0); +    TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0);  #ifndef PURE_QT      m_edit = new KColorButton(this); -    connect(m_edit, SIGNAL(changed(const QColor&)), this, SLOT(updateProperty(const QColor&))); +    connect(m_edit, TQT_SIGNAL(changed(const TQColor&)), this, TQT_SLOT(updateProperty(const TQColor&)));  #else -    m_edit = new QPushButton(this); -    connect(m_edit, SIGNAL(clicked()), this, SLOT(changeColor())); +    m_edit = new TQPushButton(this); +    connect(m_edit, TQT_SIGNAL(clicked()), this, TQT_SLOT(changeColor()));  #endif -    m_edit->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding); +    m_edit->setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);      l->addWidget(m_edit);  } -QVariant PColorButton::value() const +TQVariant PColorButton::value() const  {  #ifndef PURE_QT -    return QVariant(m_edit->color()); +    return TQVariant(m_edit->color());  #else -    return QVariant(m_color); +    return TQVariant(m_color);  #endif  } -void PColorButton::drawViewer(QPainter* p, const QColorGroup& cg, const QRect& r, const QVariant& value) +void PColorButton::drawViewer(TQPainter* p, const TQColorGroup& cg, const TQRect& r, const TQVariant& value)  {  /*    p->setBrush(value.toColor());      p->setPen(Qt::NoPen); @@ -69,22 +69,22 @@ void PColorButton::drawViewer(QPainter* p, const QColorGroup& cg, const QRect& 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)); +    TQRect r2(r); +    r2.setTopLeft(r.topLeft() + TQPoint(5,5)); +    r2.setBottomRight(r.bottomRight() - TQPoint(5,5));      p->drawRect(r2);  } -void PColorButton::setValue(const QVariant& value, bool emitChange) +void PColorButton::setValue(const TQVariant& value, bool emitChange)  {  #ifndef PURE_QT -    disconnect(m_edit, SIGNAL(changed(const QColor&)), this, SLOT(updateProperty(const QColor&))); +    disconnect(m_edit, TQT_SIGNAL(changed(const TQColor&)), this, TQT_SLOT(updateProperty(const TQColor&)));      m_edit->setColor(value.toColor()); -    connect(m_edit, SIGNAL(changed(const QColor&)), this, SLOT(updateProperty(const QColor&))); +    connect(m_edit, TQT_SIGNAL(changed(const TQColor&)), this, TQT_SLOT(updateProperty(const TQColor&)));  #else      m_color = value.toColor();      m_edit->setText(m_color.name()); -    QPixmap px; +    TQPixmap px;      px.resize(14,14);      px.fill(m_color);      m_edit->setIconSet(px); @@ -94,7 +94,7 @@ void PColorButton::setValue(const QVariant& value, bool emitChange)  } -void PColorButton::updateProperty(const QColor &// color +void PColorButton::updateProperty(const TQColor &// color                                    )  {      emit propertyChanged(m_property, value()); @@ -106,7 +106,7 @@ void PColorButton::changeColor()     m_color = QColorDialog::getColor(m_color,this);     updateProperty(m_color);     m_edit->setText(m_color.name()); -   QPixmap px; +   TQPixmap px;     px.resize(14,14);     px.fill(m_color);     m_edit->setIconSet(px); diff --git a/lib/widgets/propeditor/pcolorbutton.h b/lib/widgets/propeditor/pcolorbutton.h index 8c2ec49d..04126a50 100644 --- a/lib/widgets/propeditor/pcolorbutton.h +++ b/lib/widgets/propeditor/pcolorbutton.h @@ -26,7 +26,7 @@  class KColorButton;  #else  class QPushButton; -#include <qcolor.h> +#include <tqcolor.h>  #endif  namespace PropertyLib{ @@ -37,14 +37,14 @@ class PColorButton: public PropertyWidget  {      Q_OBJECT  public: -    PColorButton(MultiProperty *property, QWidget *parent = 0, const char *name = 0); +    PColorButton(MultiProperty *property, TQWidget *parent = 0, const char *name = 0); -    virtual QVariant value() const; -    virtual void drawViewer(QPainter* p, const QColorGroup& cg, const QRect& r, const QVariant& value); -    virtual void setValue(const QVariant& value, bool emitChange); +    virtual TQVariant value() const; +    virtual void drawViewer(TQPainter* p, const TQColorGroup& cg, const TQRect& r, const TQVariant& value); +    virtual void setValue(const TQVariant& value, bool emitChange);  protected slots: -    void updateProperty(const QColor& color); +    void updateProperty(const TQColor& color);      void changeColor(); @@ -52,8 +52,8 @@ private:  #ifndef PURE_QT      KColorButton *m_edit;  #else -    QPushButton *m_edit; -    QColor m_color; +    TQPushButton *m_edit; +    TQColor m_color;  #endif  }; diff --git a/lib/widgets/propeditor/pcolorcombo.cpp b/lib/widgets/propeditor/pcolorcombo.cpp index ecb3e618..eeac7de8 100644 --- a/lib/widgets/propeditor/pcolorcombo.cpp +++ b/lib/widgets/propeditor/pcolorcombo.cpp @@ -19,34 +19,34 @@   ***************************************************************************/  #include "pcolorcombo.h" -#include <qlayout.h> -#include <qpainter.h> +#include <tqlayout.h> +#include <tqpainter.h>  #include <kcolorcombo.h>  namespace PropertyLib{ -PColorCombo::PColorCombo(MultiProperty *property, QWidget *parent, const char *name) +PColorCombo::PColorCombo(MultiProperty *property, TQWidget *parent, const char *name)      :PropertyWidget(property, parent, name)  { -    QHBoxLayout *l = new QHBoxLayout(this, 0, 0); +    TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0);      m_edit = new KColorCombo(this); -    m_edit->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding); +    m_edit->setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);      l->addWidget(m_edit); -    connect(m_edit, SIGNAL(activated(int)), this, SLOT(updateProperty(int))); +    connect(m_edit, TQT_SIGNAL(activated(int)), this, TQT_SLOT(updateProperty(int)));  } -QVariant PColorCombo::value() const +TQVariant PColorCombo::value() const  { -    return QVariant(m_edit->color()); +    return TQVariant(m_edit->color());  } -void PColorCombo::setValue(const QVariant &value, bool emitChange) +void PColorCombo::setValue(const TQVariant &value, bool emitChange)  { -    disconnect(m_edit, SIGNAL(activated(int)), this, SLOT(updateProperty(int))); +    disconnect(m_edit, TQT_SIGNAL(activated(int)), this, TQT_SLOT(updateProperty(int)));      m_edit->setColor(value.toColor()); -    connect(m_edit, SIGNAL(activated(int)), this, SLOT(updateProperty(int))); +    connect(m_edit, TQT_SIGNAL(activated(int)), this, TQT_SLOT(updateProperty(int)));      if (emitChange)          emit propertyChanged(m_property, value);  } @@ -56,7 +56,7 @@ void PColorCombo::updateProperty(int /*val*/)      emit propertyChanged(m_property, value());  } -void PColorCombo::drawViewer(QPainter *p, const QColorGroup &cg, const QRect &r, const QVariant &value) +void PColorCombo::drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value)  {      p->setPen(Qt::NoPen);      p->setBrush(cg.background()); @@ -64,9 +64,9 @@ void PColorCombo::drawViewer(QPainter *p, const QColorGroup &cg, const QRect &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)); +    TQRect r2(r); +    r2.setTopLeft(r.topLeft() + TQPoint(5,5)); +    r2.setBottomRight(r.bottomRight() - TQPoint(5,5));      p->drawRect(r2);  } diff --git a/lib/widgets/propeditor/pcolorcombo.h b/lib/widgets/propeditor/pcolorcombo.h index 203058c0..68f19e58 100644 --- a/lib/widgets/propeditor/pcolorcombo.h +++ b/lib/widgets/propeditor/pcolorcombo.h @@ -32,15 +32,15 @@ namespace PropertyLib{  class PColorCombo: public PropertyWidget{      Q_OBJECT  public: -    PColorCombo(MultiProperty *property, QWidget *parent = 0, const char *name = 0); +    PColorCombo(MultiProperty *property, TQWidget *parent = 0, const char *name = 0);      /**@return the value currently entered in the editor widget.*/ -    virtual QVariant value() const; +    virtual TQVariant value() const;      /**Sets the value shown in the editor widget. Set emitChange to false      if you don't want to emit propertyChanged signal.*/ -    virtual void setValue(const QVariant &value, bool emitChange=true); +    virtual void setValue(const TQVariant &value, bool emitChange=true);      /**Function to draw a property viewer when the 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);  private slots:      void updateProperty(int val); diff --git a/lib/widgets/propeditor/pcombobox.cpp b/lib/widgets/propeditor/pcombobox.cpp index 36296a25..958ba34d 100644 --- a/lib/widgets/propeditor/pcombobox.cpp +++ b/lib/widgets/propeditor/pcombobox.cpp @@ -19,18 +19,18 @@   ***************************************************************************/  #include "pcombobox.h" -#include <qcombobox.h> -#include <qlayout.h> +#include <tqcombobox.h> +#include <tqlayout.h>  namespace PropertyLib{ -PComboBox::PComboBox(MultiProperty *property, const QMap<QString, QVariant> &list, QWidget *parent, const char *name) +PComboBox::PComboBox(MultiProperty *property, const TQMap<TQString, TQVariant> &list, TQWidget *parent, const char *name)      :PropertyWidget(property, parent, name), m_valueList(list)  {      init(false);  } -PComboBox::PComboBox(MultiProperty *property, const QMap<QString, QVariant> &list, bool rw, QWidget *parent, const char *name) +PComboBox::PComboBox(MultiProperty *property, const TQMap<TQString, TQVariant> &list, bool rw, TQWidget *parent, const char *name)      :PropertyWidget(property, parent, name), m_valueList(list)  {      init(rw); @@ -38,43 +38,43 @@ PComboBox::PComboBox(MultiProperty *property, const QMap<QString, QVariant> &lis  void PComboBox::init(bool rw)  { -    QHBoxLayout *l = new QHBoxLayout(this, 0, 0); -    m_edit = new QComboBox(rw, this); -    m_edit->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding); +    TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0); +    m_edit = new TQComboBox(rw, this); +    m_edit->setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);      l->addWidget(m_edit);      fillBox(); -    connect(m_edit, SIGNAL(activated(int)), this, SLOT(updateProperty(int))); +    connect(m_edit, TQT_SIGNAL(activated(int)), this, TQT_SLOT(updateProperty(int)));  }  void PComboBox::fillBox()  { -    for (QMap<QString, QVariant>::const_iterator it = m_valueList.begin(); it != m_valueList.end(); it++) +    for (TQMap<TQString, TQVariant>::const_iterator it = m_valueList.begin(); it != m_valueList.end(); it++)      {          m_edit->insertItem(it.key());      }  } -QVariant PComboBox::value() const +TQVariant PComboBox::value() const  { -    QMap<QString, QVariant>::const_iterator it = m_valueList.find(m_edit->currentText()); +    TQMap<TQString, TQVariant>::const_iterator it = m_valueList.find(m_edit->currentText());      if (it == m_valueList.end()) -        return QVariant(""); -    return QVariant(it.data()); +        return TQVariant(""); +    return TQVariant(it.data());  } -void PComboBox::setValue(const QVariant &value, bool emitChange) +void PComboBox::setValue(const TQVariant &value, bool emitChange)  {  #if QT_VERSION >= 0x030100      if (!value.isNull())  #else -    if (value.canCast(QVariant::String)) +    if (value.canCast(TQVariant::String))  #endif      { -        disconnect(m_edit, SIGNAL(activated(int)), this, SLOT(updateProperty(int))); +        disconnect(m_edit, TQT_SIGNAL(activated(int)), this, TQT_SLOT(updateProperty(int)));          m_edit->setCurrentText(findDescription(value)); -        connect(m_edit, SIGNAL(activated(int)), this, SLOT(updateProperty(int))); +        connect(m_edit, TQT_SIGNAL(activated(int)), this, TQT_SLOT(updateProperty(int)));          if (emitChange)              emit propertyChanged(m_property, value);      } @@ -85,9 +85,9 @@ void PComboBox::updateProperty(int /*val*/)      emit propertyChanged(m_property, value());  } -QString PComboBox::findDescription(const QVariant &value) +TQString PComboBox::findDescription(const TQVariant &value)  { -    for (QMap<QString, QVariant>::const_iterator it = m_valueList.begin(); it != m_valueList.end(); ++ it) +    for (TQMap<TQString, TQVariant>::const_iterator it = m_valueList.begin(); it != m_valueList.end(); ++ it)      {          if (it.data() == value)              return it.key(); @@ -95,7 +95,7 @@ QString PComboBox::findDescription(const QVariant &value)      return "";  } -void PComboBox::setValueList(const QMap<QString, QVariant> &valueList) +void PComboBox::setValueList(const TQMap<TQString, TQVariant> &valueList)  {      m_valueList = valueList;      m_edit->clear(); diff --git a/lib/widgets/propeditor/pcombobox.h b/lib/widgets/propeditor/pcombobox.h index c74869f3..71deb388 100644 --- a/lib/widgets/propeditor/pcombobox.h +++ b/lib/widgets/propeditor/pcombobox.h @@ -20,9 +20,9 @@  #ifndef PCOMBOBOX_H  #define PCOMBOBOX_H -#include <qmap.h> +#include <tqmap.h> -#include <qcombobox.h> +#include <tqcombobox.h>  #include "propertywidget.h" @@ -37,22 +37,22 @@ class PComboBox: public PropertyWidget{      Q_OBJECT  public:      /**This constructor is used for read-only selection combo. It provides a value from valueList*/ -    PComboBox(MultiProperty *property, const QMap<QString, QVariant> &list, QWidget *parent = 0, const char *name = 0); +    PComboBox(MultiProperty *property, const TQMap<TQString, TQVariant> &list, TQWidget *parent = 0, const char *name = 0);      /**This constructor is used for read-write selection combo. It provides a value from valueList*/ -    PComboBox(MultiProperty *property, const QMap<QString, QVariant> &list, bool rw, QWidget *parent = 0, const char *name = 0); +    PComboBox(MultiProperty *property, const TQMap<TQString, TQVariant> &list, bool rw, TQWidget *parent = 0, const char *name = 0);      /**@return the value currently entered in the editor widget.*/ -    virtual QVariant value() const; +    virtual TQVariant value() const;      /**Sets the value shown in the editor widget. Set emitChange to false      if you don't want to emit propertyChanged signal.*/ -    virtual void setValue(const QVariant &value, bool emitChange=true); +    virtual void setValue(const TQVariant &value, bool emitChange=true);      /**Sets the list of possible values shown in the editor widget. This method       does not emit propertyChanged signal. Reimplemented because combobox is used      to display possible values from valueList.*/ -    virtual void setValueList(const QMap<QString, QVariant> &valueList); +    virtual void setValueList(const TQMap<TQString, TQVariant> &valueList);  protected: -    QString findDescription(const QVariant &value); +    TQString findDescription(const TQVariant &value);  protected slots:      void updateProperty(int val); @@ -62,9 +62,9 @@ private:      void init(bool rw = false);      /** map<description, value>*/ -    QMap<QString, QVariant> m_valueList; +    TQMap<TQString, TQVariant> m_valueList; -    QComboBox *m_edit; +    TQComboBox *m_edit;  };  } diff --git a/lib/widgets/propeditor/pcursoredit.cpp b/lib/widgets/propeditor/pcursoredit.cpp index 7147d317..85aefd5e 100644 --- a/lib/widgets/propeditor/pcursoredit.cpp +++ b/lib/widgets/propeditor/pcursoredit.cpp @@ -19,17 +19,17 @@   ***************************************************************************/  #include "pcursoredit.h" -#include <qpainter.h> +#include <tqpainter.h>  namespace PropertyLib{ -PCursorEdit::PCursorEdit(MultiProperty* property, const QMap<QString, QVariant> &spValues, -    QWidget* parent, const char* name) +PCursorEdit::PCursorEdit(MultiProperty* property, const TQMap<TQString, TQVariant> &spValues, +    TQWidget* parent, const char* name)      :PComboBox(property, spValues, parent, name)  {  } -void PCursorEdit::drawViewer(QPainter* p, const QColorGroup& cg, const QRect& r, const QVariant& value) +void PCursorEdit::drawViewer(TQPainter* p, const TQColorGroup& cg, const TQRect& r, const TQVariant& value)  {      PropertyWidget::drawViewer(p, cg, r, findDescription(value));  } diff --git a/lib/widgets/propeditor/pcursoredit.h b/lib/widgets/propeditor/pcursoredit.h index bdd063f4..6149bce7 100644 --- a/lib/widgets/propeditor/pcursoredit.h +++ b/lib/widgets/propeditor/pcursoredit.h @@ -25,16 +25,16 @@  namespace PropertyLib{  /** -@short %Property editor for QCursor values. +@short %Property editor for TQCursor values.  */  class PCursorEdit: public PComboBox  {      Q_OBJECT  public: -    PCursorEdit(MultiProperty* property, const QMap<QString, QVariant> &spValues, -        QWidget* parent = 0, const char* name = 0); +    PCursorEdit(MultiProperty* property, const TQMap<TQString, TQVariant> &spValues, +        TQWidget* parent = 0, const char* name = 0); -    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);     };  } diff --git a/lib/widgets/propeditor/pdateedit.cpp b/lib/widgets/propeditor/pdateedit.cpp index 5aa5231c..141eef20 100644 --- a/lib/widgets/propeditor/pdateedit.cpp +++ b/lib/widgets/propeditor/pdateedit.cpp @@ -19,29 +19,29 @@   ***************************************************************************/  #include "pdateedit.h" -#include <qdatetimeedit.h> -#include <qpainter.h> -#include <qlayout.h> +#include <tqdatetimeedit.h> +#include <tqpainter.h> +#include <tqlayout.h>  namespace PropertyLib{ -PDateEdit::PDateEdit(MultiProperty* property, QWidget* parent, const char* name) +PDateEdit::PDateEdit(MultiProperty* property, TQWidget* parent, const char* name)      :PropertyWidget(property, parent, name)  { -    QHBoxLayout *l = new QHBoxLayout(this, 0, 0); +    TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0);      m_edit = new QDateEdit(this); -    m_edit->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding); +    m_edit->setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);      l->addWidget(m_edit); -    connect(m_edit, SIGNAL(valueChanged(const QDate&)), this, SLOT(updateProperty(const QDate&))); +    connect(m_edit, TQT_SIGNAL(valueChanged(const TQDate&)), this, TQT_SLOT(updateProperty(const TQDate&)));  } -QVariant PDateEdit::value() const +TQVariant PDateEdit::value() const  { -     return QVariant(m_edit->date()); +     return TQVariant(m_edit->date());  } -void PDateEdit::drawViewer(QPainter* p, const QColorGroup& cg, const QRect& r, const QVariant& value) +void PDateEdit::drawViewer(TQPainter* p, const TQColorGroup& cg, const TQRect& r, const TQVariant& value)  {      p->setPen(Qt::NoPen);      p->setBrush(cg.background()); @@ -49,18 +49,18 @@ void PDateEdit::drawViewer(QPainter* p, const QColorGroup& cg, const QRect& r, c      p->drawText(r, Qt::AlignLeft | Qt::AlignVCenter | Qt::SingleLine, value.toDate().toString(Qt::LocalDate));  } -void PDateEdit::setValue(const QVariant& value, bool emitChange) +void PDateEdit::setValue(const TQVariant& value, bool emitChange)  { -    disconnect(m_edit, SIGNAL(valueChanged(const QDate&)), this, SLOT(updateProperty(const QDate&))); +    disconnect(m_edit, TQT_SIGNAL(valueChanged(const TQDate&)), this, TQT_SLOT(updateProperty(const TQDate&)));      m_edit->setDate(value.toDate()); -    connect(m_edit, SIGNAL(valueChanged(const QDate&)), this, SLOT(updateProperty(const QDate&))); +    connect(m_edit, TQT_SIGNAL(valueChanged(const TQDate&)), this, TQT_SLOT(updateProperty(const TQDate&)));      if (emitChange)          emit propertyChanged(m_property, value);  } -void PDateEdit::updateProperty(const QDate &val) +void PDateEdit::updateProperty(const TQDate &val)  { -    emit propertyChanged(m_property, QVariant(val)); +    emit propertyChanged(m_property, TQVariant(val));  }  } diff --git a/lib/widgets/propeditor/pdateedit.h b/lib/widgets/propeditor/pdateedit.h index dd876557..da458737 100644 --- a/lib/widgets/propeditor/pdateedit.h +++ b/lib/widgets/propeditor/pdateedit.h @@ -27,20 +27,20 @@ class QDateEdit;  namespace PropertyLib{  /** -@short %Property editor for QDate values. +@short %Property editor for TQDate values.  */  class PDateEdit : public PropertyWidget  {  Q_OBJECT  public: -    PDateEdit(MultiProperty* property, QWidget* parent=0, const char* name=0); +    PDateEdit(MultiProperty* property, TQWidget* parent=0, const char* name=0); -    virtual QVariant value() const; -    virtual void drawViewer(QPainter* p, const QColorGroup& cg, const QRect& r, const QVariant& value); -    virtual void setValue(const QVariant& value, bool emitChange); +    virtual TQVariant value() const; +    virtual void drawViewer(TQPainter* p, const TQColorGroup& cg, const TQRect& r, const TQVariant& value); +    virtual void setValue(const TQVariant& value, bool emitChange);  private slots: -    void updateProperty(const QDate &val);     +    void updateProperty(const TQDate &val);      private:      QDateEdit *m_edit; diff --git a/lib/widgets/propeditor/pdatetimeedit.cpp b/lib/widgets/propeditor/pdatetimeedit.cpp index 8f561888..5e414c77 100644 --- a/lib/widgets/propeditor/pdatetimeedit.cpp +++ b/lib/widgets/propeditor/pdatetimeedit.cpp @@ -19,28 +19,28 @@   ***************************************************************************/  #include "pdatetimeedit.h" -#include <qdatetimeedit.h> -#include <qpainter.h> -#include <qlayout.h> +#include <tqdatetimeedit.h> +#include <tqpainter.h> +#include <tqlayout.h>  namespace PropertyLib{ -PDateTimeEdit::PDateTimeEdit(MultiProperty* property, QWidget* parent, const char* name): PropertyWidget(property, parent, name) +PDateTimeEdit::PDateTimeEdit(MultiProperty* property, TQWidget* parent, const char* name): PropertyWidget(property, parent, name)  { -    QHBoxLayout *l = new QHBoxLayout(this, 0, 0); +    TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0);      m_edit = new QDateTimeEdit(this); -    m_edit->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding); +    m_edit->setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);      l->addWidget(m_edit); -    connect(m_edit, SIGNAL(valueChanged(const QDateTime&)), this, SLOT(updateProperty(const QDateTime&))); +    connect(m_edit, TQT_SIGNAL(valueChanged(const TQDateTime&)), this, TQT_SLOT(updateProperty(const TQDateTime&)));  } -QVariant PDateTimeEdit::value() const +TQVariant PDateTimeEdit::value() const  { -     return QVariant(m_edit->dateTime()); +     return TQVariant(m_edit->dateTime());  } -void PDateTimeEdit::drawViewer(QPainter* p, const QColorGroup& cg, const QRect& r, const QVariant& value) +void PDateTimeEdit::drawViewer(TQPainter* p, const TQColorGroup& cg, const TQRect& r, const TQVariant& value)  {      p->setPen(Qt::NoPen);      p->setBrush(cg.background()); @@ -48,18 +48,18 @@ void PDateTimeEdit::drawViewer(QPainter* p, const QColorGroup& cg, const QRect&      p->drawText(r, Qt::AlignLeft | Qt::AlignVCenter | Qt::SingleLine, value.toDateTime().toString(Qt::LocalDate));  } -void PDateTimeEdit::setValue(const QVariant& value, bool emitChange) +void PDateTimeEdit::setValue(const TQVariant& value, bool emitChange)  { -    disconnect(m_edit, SIGNAL(valueChanged(const QDateTime&)), this, SLOT(updateProperty(const QDateTime&))); +    disconnect(m_edit, TQT_SIGNAL(valueChanged(const TQDateTime&)), this, TQT_SLOT(updateProperty(const TQDateTime&)));      m_edit->setDateTime(value.toDateTime()); -    connect(m_edit, SIGNAL(valueChanged(const QDateTime&)), this, SLOT(updateProperty(const QDateTime&))); +    connect(m_edit, TQT_SIGNAL(valueChanged(const TQDateTime&)), this, TQT_SLOT(updateProperty(const TQDateTime&)));      if (emitChange)          emit propertyChanged(m_property, value);  } -void PDateTimeEdit::updateProperty(const QDateTime &val) +void PDateTimeEdit::updateProperty(const TQDateTime &val)  { -    emit propertyChanged(m_property, QVariant(val)); +    emit propertyChanged(m_property, TQVariant(val));  }  } diff --git a/lib/widgets/propeditor/pdatetimeedit.h b/lib/widgets/propeditor/pdatetimeedit.h index 39d9acba..40e8b428 100644 --- a/lib/widgets/propeditor/pdatetimeedit.h +++ b/lib/widgets/propeditor/pdatetimeedit.h @@ -27,20 +27,20 @@ class QDateTimeEdit;  namespace PropertyLib{  /** -@short %Property editor for QDateTime values. +@short %Property editor for TQDateTime values.  */  class PDateTimeEdit : public PropertyWidget  {  Q_OBJECT  public: -    PDateTimeEdit(MultiProperty* property, QWidget* parent=0, const char* name=0); +    PDateTimeEdit(MultiProperty* property, TQWidget* parent=0, const char* name=0); -    virtual QVariant value() const; -    virtual void drawViewer(QPainter* p, const QColorGroup& cg, const QRect& r, const QVariant& value); -    virtual void setValue(const QVariant& value, bool emitChange); +    virtual TQVariant value() const; +    virtual void drawViewer(TQPainter* p, const TQColorGroup& cg, const TQRect& r, const TQVariant& value); +    virtual void setValue(const TQVariant& value, bool emitChange);  private slots: -    void updateProperty(const QDateTime &val);     +    void updateProperty(const TQDateTime &val);      private:      QDateTimeEdit *m_edit; diff --git a/lib/widgets/propeditor/pdoublenuminput.cpp b/lib/widgets/propeditor/pdoublenuminput.cpp index aa4f72aa..df6b3bcb 100644 --- a/lib/widgets/propeditor/pdoublenuminput.cpp +++ b/lib/widgets/propeditor/pdoublenuminput.cpp @@ -27,23 +27,23 @@  #include <limits.h>  #include <math.h> -#include <qlayout.h> +#include <tqlayout.h>  namespace PropertyLib{ -PDoubleNumInput::PDoubleNumInput(MultiProperty *property, QWidget *parent, const char *name) +PDoubleNumInput::PDoubleNumInput(MultiProperty *property, TQWidget *parent, const char *name)      :PropertyWidget(property, parent, name)  { -    QHBoxLayout *l = new QHBoxLayout(this, 0, 0); +    TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0);  #ifndef PURE_QT      m_edit = new KDoubleNumInput(-999999.0, 999999.0, 0.0, 0.01, 2, this); -    m_edit->setLabel(QString::null); -    connect(m_edit, SIGNAL(valueChanged(double)), this, SLOT(updateProperty(double))); +    m_edit->setLabel(TQString::null); +    connect(m_edit, TQT_SIGNAL(valueChanged(double)), this, TQT_SLOT(updateProperty(double)));  #else      m_edit = new QFloatInput(-999999, 999999, 0.01, 2, this ); -    connect(m_edit, SIGNAL(valueChanged(int)), this, SLOT(updateProperty(int))); +    connect(m_edit, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(updateProperty(int)));  #endif -    m_edit->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding); +    m_edit->setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);  /*    m_edit->setMinValue(-999999999);      m_edit->setMaxValue(+999999999);      m_edit->setPrecision(2);*/ @@ -51,21 +51,21 @@ PDoubleNumInput::PDoubleNumInput(MultiProperty *property, QWidget *parent, const  } -QVariant PDoubleNumInput::value() const +TQVariant PDoubleNumInput::value() const  { -    return QVariant(m_edit->value()); +    return TQVariant(m_edit->value());  } -void PDoubleNumInput::setValue(const QVariant &value, bool emitChange) +void PDoubleNumInput::setValue(const TQVariant &value, bool emitChange)  {  #ifndef PURE_QT -    disconnect(m_edit, SIGNAL(valueChanged(double)), this, SLOT(updateProperty(double))); +    disconnect(m_edit, TQT_SIGNAL(valueChanged(double)), this, TQT_SLOT(updateProperty(double)));      m_edit->setValue(value.toDouble()); -    connect(m_edit, SIGNAL(valueChanged(double)), this, SLOT(updateProperty(double))); +    connect(m_edit, TQT_SIGNAL(valueChanged(double)), this, TQT_SLOT(updateProperty(double)));  #else -    disconnect(m_edit, SIGNAL(valueChanged(int)), this, SLOT(updateProperty(int))); +    disconnect(m_edit, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(updateProperty(int)));      m_edit->setValue(int(value.toDouble()*pow(m_edit->digits(),10))); -    connect(m_edit, SIGNAL(valueChanged(int)), this, SLOT(updateProperty(int))); +    connect(m_edit, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(updateProperty(int)));  #endif      if (emitChange)          emit propertyChanged(m_property, value); @@ -73,15 +73,15 @@ void PDoubleNumInput::setValue(const QVariant &value, bool emitChange)  void PDoubleNumInput::updateProperty(double val)  { -    emit propertyChanged(m_property, QVariant(val)); +    emit propertyChanged(m_property, TQVariant(val));  }  void PDoubleNumInput::updateProperty(int val)  {  #ifdef PURE_QT -    QString format = QString("%.%1f").arg( m_edit->digits() ); -    QString strVal = QString().sprintf(format.latin1(), +    TQString format = TQString("%.%1f").arg( m_edit->digits() ); +    TQString strVal = TQString().sprintf(format.latin1(),                                         (val/(float)pow(m_edit->digits(),10)) ); -    emit propertyChanged(m_property, QVariant(strVal)); +    emit propertyChanged(m_property, TQVariant(strVal));  #else      Q_UNUSED(val);  #endif diff --git a/lib/widgets/propeditor/pdoublenuminput.h b/lib/widgets/propeditor/pdoublenuminput.h index a612601a..83849335 100644 --- a/lib/widgets/propeditor/pdoublenuminput.h +++ b/lib/widgets/propeditor/pdoublenuminput.h @@ -37,13 +37,13 @@ class PDoubleNumInput: public PropertyWidget  {  Q_OBJECT  public: -    PDoubleNumInput(MultiProperty *property, QWidget *parent = 0, const char *name = 0); +    PDoubleNumInput(MultiProperty *property, TQWidget *parent = 0, const char *name = 0);      /**@return the value currently entered in the editor widget.*/ -    virtual QVariant value() const; +    virtual TQVariant value() const;      /**Sets the value shown in the editor widget. Set emitChange to false      if you don't want to emit propertyChanged signal.*/ -    virtual void setValue(const QVariant &value, bool emitChange=true); +    virtual void setValue(const TQVariant &value, bool emitChange=true);  private slots:      //because of a bug in moc which doesn't detect conditional slots diff --git a/lib/widgets/propeditor/pdummywidget.cpp b/lib/widgets/propeditor/pdummywidget.cpp index b27f7476..65ec35e3 100644 --- a/lib/widgets/propeditor/pdummywidget.cpp +++ b/lib/widgets/propeditor/pdummywidget.cpp @@ -19,28 +19,28 @@   ***************************************************************************/  #include "pdummywidget.h" -#include <qpainter.h> +#include <tqpainter.h>  namespace PropertyLib{ -PDummyWidget::PDummyWidget(MultiProperty *property, QWidget *parent, const char *name) +PDummyWidget::PDummyWidget(MultiProperty *property, TQWidget *parent, const char *name)      :PropertyWidget(property, parent, name)  {  } -QVariant PDummyWidget::value() const +TQVariant PDummyWidget::value() const  {      return m_value;  } -void PDummyWidget::setValue(const QVariant &value, bool emitChange) +void PDummyWidget::setValue(const TQVariant &value, bool emitChange)  {      m_value = value;      if (emitChange)          emit propertyChanged(m_property, value);  } -void PDummyWidget::drawViewer(QPainter *p, const QColorGroup &cg, const QRect &r, const QVariant &/*value*/) +void PDummyWidget::drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &/*value*/)  {      p->setBrush(cg.background());      p->setPen(Qt::NoPen); diff --git a/lib/widgets/propeditor/pdummywidget.h b/lib/widgets/propeditor/pdummywidget.h index 6fcca0a5..7e94428a 100644 --- a/lib/widgets/propeditor/pdummywidget.h +++ b/lib/widgets/propeditor/pdummywidget.h @@ -41,18 +41,18 @@ class PDummyWidget: public PropertyWidget  {      Q_OBJECT  public: -    PDummyWidget(MultiProperty *property, QWidget *parent = 0, const char *name = 0); +    PDummyWidget(MultiProperty *property, TQWidget *parent = 0, const char *name = 0);      /**@return the value currently entered in the editor widget.*/ -    virtual QVariant value() const; +    virtual TQVariant value() const;      /**Sets the value shown in the editor widget. Set emitChange to false      if you don't want to emit propertyChanged signal.*/ -    virtual void setValue(const QVariant& value, bool emitChange); +    virtual void setValue(const TQVariant& value, bool emitChange);      /**Function to draw a property viewer when the 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);  private: -    QVariant m_value; +    TQVariant m_value;  };  } diff --git a/lib/widgets/propeditor/pfontbutton.cpp b/lib/widgets/propeditor/pfontbutton.cpp index e4fdf7eb..dc976b8f 100644 --- a/lib/widgets/propeditor/pfontbutton.cpp +++ b/lib/widgets/propeditor/pfontbutton.cpp @@ -19,9 +19,9 @@   ***************************************************************************/  #include "pfontbutton.h" -#include <qlayout.h> -#include <qpainter.h> -#include <qpushbutton.h> +#include <tqlayout.h> +#include <tqpainter.h> +#include <tqpushbutton.h>  #include <kfontrequester.h> @@ -33,47 +33,47 @@  namespace PropertyLib{ -PFontButton::PFontButton(MultiProperty* property, QWidget* parent, const char* name) +PFontButton::PFontButton(MultiProperty* property, TQWidget* parent, const char* name)      :PropertyWidget(property, parent, name)  { -    QHBoxLayout *l = new QHBoxLayout(this, 0, 0); +    TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0);      m_edit = new KFontRequester(this); -    m_edit->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding); +    m_edit->setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);  #ifndef PURE_QT      m_edit->button()->setText(i18n("..."));  #endif      l->addWidget(m_edit); -    connect(m_edit, SIGNAL(fontSelected(const QFont& )), this, SLOT(updateProperty(const QFont& ))); +    connect(m_edit, TQT_SIGNAL(fontSelected(const TQFont& )), this, TQT_SLOT(updateProperty(const TQFont& )));  } -QVariant PFontButton::value() const +TQVariant PFontButton::value() const  { -    return QVariant(m_edit->font()); +    return TQVariant(m_edit->font());  } -void PFontButton::drawViewer(QPainter* p, const QColorGroup& cg, const QRect& r, const QVariant& value) +void PFontButton::drawViewer(TQPainter* p, const TQColorGroup& cg, const TQRect& r, const TQVariant& value)  {      p->setPen(Qt::NoPen);      p->setBrush(cg.background());      p->drawRect(r); -    QFontInfo fi(value.toFont()); +    TQFontInfo fi(value.toFont());      p->drawText(r, Qt::AlignLeft | Qt::AlignVCenter | Qt::SingleLine, -        fi.family() + (fi.bold() ? i18n(" Bold") : QString("")) + -        (fi.italic() ? i18n(" Italic") : QString("")) + -        " " + QString("%1").arg(fi.pointSize()) ); +        fi.family() + (fi.bold() ? i18n(" Bold") : TQString("")) + +        (fi.italic() ? i18n(" Italic") : TQString("")) + +        " " + TQString("%1").arg(fi.pointSize()) );  } -void PFontButton::setValue(const QVariant& value, bool emitChange) +void PFontButton::setValue(const TQVariant& value, bool emitChange)  { -    disconnect(m_edit, SIGNAL(fontSelected(const QFont&)), this, SLOT(updateProperty(const QFont&))); +    disconnect(m_edit, TQT_SIGNAL(fontSelected(const TQFont&)), this, TQT_SLOT(updateProperty(const TQFont&)));      m_edit->setFont(value.toFont()); -    connect(m_edit, SIGNAL(fontSelected(const QFont& )), this, SLOT(updateProperty(const QFont& ))); +    connect(m_edit, TQT_SIGNAL(fontSelected(const TQFont& )), this, TQT_SLOT(updateProperty(const TQFont& )));      if (emitChange)          emit propertyChanged(m_property, value);  } -void PFontButton::updateProperty(const QFont &// font +void PFontButton::updateProperty(const TQFont &// font                                   )  {      emit propertyChanged(m_property, value()); diff --git a/lib/widgets/propeditor/pfontbutton.h b/lib/widgets/propeditor/pfontbutton.h index 54ada141..6538f5ae 100644 --- a/lib/widgets/propeditor/pfontbutton.h +++ b/lib/widgets/propeditor/pfontbutton.h @@ -33,14 +33,14 @@ class PFontButton : public PropertyWidget  {  Q_OBJECT  public: -    PFontButton(MultiProperty* property, QWidget* parent = 0, const char* name = 0); +    PFontButton(MultiProperty* property, TQWidget* parent = 0, const char* name = 0); -    virtual QVariant value() const; -    virtual void drawViewer(QPainter* p, const QColorGroup& cg, const QRect& r, const QVariant& value); -    virtual void setValue(const QVariant& value, bool emitChange); +    virtual TQVariant value() const; +    virtual void drawViewer(TQPainter* p, const TQColorGroup& cg, const TQRect& r, const TQVariant& value); +    virtual void setValue(const TQVariant& value, bool emitChange);  protected slots: -    void updateProperty(const QFont& font); +    void updateProperty(const TQFont& font);  private:      KFontRequester *m_edit; diff --git a/lib/widgets/propeditor/pfontcombo.cpp b/lib/widgets/propeditor/pfontcombo.cpp index 368f18d9..8b0ee7a7 100644 --- a/lib/widgets/propeditor/pfontcombo.cpp +++ b/lib/widgets/propeditor/pfontcombo.cpp @@ -22,61 +22,61 @@  #ifndef PURE_QT  #include <kfontcombo.h>  #else -#include <qcombobox.h> +#include <tqcombobox.h>  #endif -#include <qlayout.h> +#include <tqlayout.h>  #ifdef PURE_QT -#include <qfontdatabase.h> +#include <tqfontdatabase.h>  #endif  namespace PropertyLib{ -PFontCombo::PFontCombo(MultiProperty *property, QWidget *parent, const char *name) +PFontCombo::PFontCombo(MultiProperty *property, TQWidget *parent, const char *name)      :PropertyWidget(property, parent, name)  { -    QHBoxLayout *l = new QHBoxLayout(this, 0, 0); +    TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0);      m_edit = new KFontCombo(this); -    m_edit->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding); +    m_edit->setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);      l->addWidget(m_edit);      /*adymo: KFontCombo seems to have a bug: when it is not editable, the signals -    activated(int) and textChanged(const QString &) are not emitted*/ +    activated(int) and textChanged(const TQString &) are not emitted*/  #ifdef PURE_QT -    QFontDatabase fonts; +    TQFontDatabase fonts;      m_edit->insertStringList(fonts.families()); -    connect(m_edit, SIGNAL(activated(const QString &)), this, SLOT(updateProperty(const QString&))); +    connect(m_edit, TQT_SIGNAL(activated(const TQString &)), this, TQT_SLOT(updateProperty(const TQString&)));  #else -    connect(m_edit, SIGNAL(textChanged(const QString&)), this, SLOT(updateProperty(const QString&))); +    connect(m_edit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(updateProperty(const TQString&)));  #endif  } -QVariant PFontCombo::value() const +TQVariant PFontCombo::value() const  {  #ifndef PURE_QT -    return QVariant(m_edit->currentFont()); +    return TQVariant(m_edit->currentFont());  #else -    return QVariant(m_edit->currentText()); +    return TQVariant(m_edit->currentText());  #endif  } -void PFontCombo::setValue(const QVariant &value, bool emitChange) +void PFontCombo::setValue(const TQVariant &value, bool emitChange)  { -    disconnect(m_edit, SIGNAL(textChanged(const QString&)), this, SLOT(updateProperty(const QString&))); +    disconnect(m_edit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(updateProperty(const TQString&)));  #ifndef PURE_QT      m_edit->setCurrentFont(value.toString());  #else      m_edit->setCurrentText(value.toString());  #endif -    connect(m_edit, SIGNAL(textChanged(const QString&)), this, SLOT(updateProperty(const QString&))); +    connect(m_edit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(updateProperty(const TQString&)));      if (emitChange)          emit propertyChanged(m_property, value);  } -void PFontCombo::updateProperty(const QString &val) +void PFontCombo::updateProperty(const TQString &val)  { -    emit propertyChanged(m_property, QVariant(val)); +    emit propertyChanged(m_property, TQVariant(val));  }  } diff --git a/lib/widgets/propeditor/pfontcombo.h b/lib/widgets/propeditor/pfontcombo.h index c2aa1948..a703c99d 100644 --- a/lib/widgets/propeditor/pfontcombo.h +++ b/lib/widgets/propeditor/pfontcombo.h @@ -36,16 +36,16 @@ namespace PropertyLib{  class PFontCombo: public PropertyWidget{      Q_OBJECT  public: -    PFontCombo(MultiProperty *property, QWidget *parent = 0, const char *name = 0); +    PFontCombo(MultiProperty *property, TQWidget *parent = 0, const char *name = 0);      /**@return the value currently entered in the editor widget.*/ -    virtual QVariant value() const; +    virtual TQVariant value() const;      /**Sets the value shown in the editor widget. Set emitChange to false      if you don't want to emit propertyChanged signal.*/ -    virtual void setValue(const QVariant &value, bool emitChange=true); +    virtual void setValue(const TQVariant &value, bool emitChange=true);  private slots: -    void updateProperty(const QString &val); +    void updateProperty(const TQString &val);  private:      KFontCombo *m_edit; diff --git a/lib/widgets/propeditor/plineedit.cpp b/lib/widgets/propeditor/plineedit.cpp index ebd8d848..f5e1ecb0 100644 --- a/lib/widgets/propeditor/plineedit.cpp +++ b/lib/widgets/propeditor/plineedit.cpp @@ -20,38 +20,38 @@  #include "plineedit.h"  #include <klineedit.h> -#include <qlayout.h> +#include <tqlayout.h>  namespace PropertyLib{ -PLineEdit::PLineEdit(MultiProperty *property, QWidget *parent, const char *name) +PLineEdit::PLineEdit(MultiProperty *property, TQWidget *parent, const char *name)      :PropertyWidget(property, parent, name)  { -    QHBoxLayout *l = new QHBoxLayout(this, 0, 0); +    TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0);      m_edit = new KLineEdit(this); -    m_edit->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding); +    m_edit->setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);      l->addWidget(m_edit); -    connect(m_edit, SIGNAL(textChanged(const QString&)), this, SLOT(updateProperty(const QString&))); +    connect(m_edit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(updateProperty(const TQString&)));  } -QVariant PLineEdit::value() const +TQVariant PLineEdit::value() const  { -    return QVariant(m_edit->text()); +    return TQVariant(m_edit->text());  } -void PLineEdit::setValue(const QVariant &value, bool emitChange) +void PLineEdit::setValue(const TQVariant &value, bool emitChange)  { -    disconnect(m_edit, SIGNAL(textChanged(const QString&)), this, SLOT(updateProperty(const QString&))); +    disconnect(m_edit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(updateProperty(const TQString&)));      m_edit->setText(value.toString()); -    connect(m_edit, SIGNAL(textChanged(const QString&)), this, SLOT(updateProperty(const QString&))); +    connect(m_edit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(updateProperty(const TQString&)));      if (emitChange)          emit propertyChanged(m_property, value);  } -void PLineEdit::updateProperty(const QString& val) +void PLineEdit::updateProperty(const TQString& val)  { -    emit propertyChanged(m_property, QVariant(val)); +    emit propertyChanged(m_property, TQVariant(val));  }  } diff --git a/lib/widgets/propeditor/plineedit.h b/lib/widgets/propeditor/plineedit.h index f28ba191..6feb2a7b 100644 --- a/lib/widgets/propeditor/plineedit.h +++ b/lib/widgets/propeditor/plineedit.h @@ -32,16 +32,16 @@ namespace PropertyLib{  class PLineEdit: public PropertyWidget{      Q_OBJECT  public: -    PLineEdit(MultiProperty *property, QWidget *parent = 0, const char *name = 0); +    PLineEdit(MultiProperty *property, TQWidget *parent = 0, const char *name = 0);      /**@return the value currently entered in the editor widget.*/ -    virtual QVariant value() const; +    virtual TQVariant value() const;      /**Sets the value shown in the editor widget. Set emitChange to false      if you don't want to emit propertyChanged signal.*/ -    virtual void setValue(const QVariant &value, bool emitChange=true); +    virtual void setValue(const TQVariant &value, bool emitChange=true);  private slots: -    void updateProperty(const QString &val); +    void updateProperty(const TQString &val);  private:      KLineEdit *m_edit; diff --git a/lib/widgets/propeditor/plinestyleedit.cpp b/lib/widgets/propeditor/plinestyleedit.cpp index 50f55e5d..adee930e 100644 --- a/lib/widgets/propeditor/plinestyleedit.cpp +++ b/lib/widgets/propeditor/plinestyleedit.cpp @@ -19,10 +19,10 @@   ***************************************************************************/  #include "plinestyleedit.h" -#include <qpainter.h> -#include <qpixmap.h> -#include <qcombobox.h> -#include <qlayout.h> +#include <tqpainter.h> +#include <tqpixmap.h> +#include <tqcombobox.h> +#include <tqlayout.h>  namespace PropertyLib { @@ -127,75 +127,75 @@ namespace PropertyLib {      "................................................"}; -PLineStyleEdit::PLineStyleEdit(MultiProperty* property, QWidget* parent, const char* name): PropertyWidget(property, parent, name) +PLineStyleEdit::PLineStyleEdit(MultiProperty* property, TQWidget* parent, const char* name): PropertyWidget(property, parent, name)  { -    QHBoxLayout *l = new QHBoxLayout(this, 0, 0); -    m_edit = new QComboBox(this); -    m_edit->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding); +    TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0); +    m_edit = new TQComboBox(this); +    m_edit->setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);      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));     -    connect(m_edit, SIGNAL(activated(int)), this, SLOT(updateProperty(int))); +    connect(m_edit, TQT_SIGNAL(activated(int)), this, TQT_SLOT(updateProperty(int)));  } -QVariant PLineStyleEdit::value() const +TQVariant PLineStyleEdit::value() const  {      return m_edit->currentItem();  } -void PLineStyleEdit::drawViewer(QPainter* p, const QColorGroup& cg, const QRect& r, const QVariant& value) +void PLineStyleEdit::drawViewer(TQPainter* p, const TQColorGroup& cg, const TQRect& r, const TQVariant& value)  {      p->setPen(Qt::NoPen);      p->setBrush(cg.background());      p->drawRect(r); -    if (!value.canCast(QVariant::Int)) +    if (!value.canCast(TQVariant::Int))      if ((value.toInt() > 5) || (value.toInt() < 0))          return;      switch (value.toInt()) {      case 0: -        p->drawPixmap(r, QPixmap(nopen)); +        p->drawPixmap(r, TQPixmap(nopen));          break;      case 1: -        p->drawPixmap(r, QPixmap(solid)); +        p->drawPixmap(r, TQPixmap(solid));          break;      case 2: -        p->drawPixmap(r, QPixmap(dash)); +        p->drawPixmap(r, TQPixmap(dash));          break;      case 3: -        p->drawPixmap(r, QPixmap(dashdot)); +        p->drawPixmap(r, TQPixmap(dashdot));          break;      case 4: -        p->drawPixmap(r, QPixmap(dashdot)); +        p->drawPixmap(r, TQPixmap(dashdot));          break;      case 5: -        p->drawPixmap(r, QPixmap(dashdotdot)); +        p->drawPixmap(r, TQPixmap(dashdotdot));          break;      }  } -void PLineStyleEdit::setValue(const QVariant& value, bool emitChange) +void PLineStyleEdit::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; -    disconnect(m_edit, SIGNAL(activated(int)), this, SLOT(updateProperty(int))); +    disconnect(m_edit, TQT_SIGNAL(activated(int)), this, TQT_SLOT(updateProperty(int)));      m_edit->setCurrentItem(value.toInt()); -    connect(m_edit, SIGNAL(activated(int)), this, SLOT(updateProperty(int))); +    connect(m_edit, TQT_SIGNAL(activated(int)), this, TQT_SLOT(updateProperty(int)));      if (emitChange)          emit propertyChanged(m_property, value);  }  void PLineStyleEdit::updateProperty(int val)  { -    emit propertyChanged(m_property, QVariant(val)); +    emit propertyChanged(m_property, TQVariant(val));  }  } diff --git a/lib/widgets/propeditor/plinestyleedit.h b/lib/widgets/propeditor/plinestyleedit.h index 16441273..00b546c6 100644 --- a/lib/widgets/propeditor/plinestyleedit.h +++ b/lib/widgets/propeditor/plinestyleedit.h @@ -32,17 +32,17 @@ namespace PropertyLib {  class PLineStyleEdit : public PropertyWidget {      Q_OBJECT  public: -    PLineStyleEdit(MultiProperty* property, QWidget* parent = 0, const char* name = 0); +    PLineStyleEdit(MultiProperty* property, TQWidget* parent = 0, const char* name = 0); -    virtual QVariant value() const; -    virtual void drawViewer(QPainter* p, const QColorGroup& cg, const QRect& r, const QVariant& value); -    virtual void setValue(const QVariant& value, bool emitChange); +    virtual TQVariant value() const; +    virtual void drawViewer(TQPainter* p, const TQColorGroup& cg, const TQRect& r, const TQVariant& value); +    virtual void setValue(const TQVariant& value, bool emitChange);  private slots:      void updateProperty(int val);  private: -    QComboBox *m_edit; +    TQComboBox *m_edit;  };  } diff --git a/lib/widgets/propeditor/ppixmapedit.cpp b/lib/widgets/propeditor/ppixmapedit.cpp index db6a69d3..a4c18791 100644 --- a/lib/widgets/propeditor/ppixmapedit.cpp +++ b/lib/widgets/propeditor/ppixmapedit.cpp @@ -21,10 +21,10 @@   ***************************************************************************/  #include "ppixmapedit.h" -#include <qlayout.h> -#include <qpainter.h> -#include <qlabel.h> -#include <qcursor.h> +#include <tqlayout.h> +#include <tqpainter.h> +#include <tqlabel.h> +#include <tqcursor.h>  #ifndef PURE_QT  #include <klocale.h> @@ -35,41 +35,41 @@  #ifndef PURE_QT  #include <kfiledialog.h>  #else -#include <qfiledialog.h> +#include <tqfiledialog.h>  #endif -#include <qpushbutton.h> +#include <tqpushbutton.h>  namespace PropertyLib{ -PPixmapEdit::PPixmapEdit(MultiProperty* property, QWidget* parent, const char* name) +PPixmapEdit::PPixmapEdit(MultiProperty* property, TQWidget* parent, const char* name)      :PropertyWidget(property, parent, name)  { -    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->setAlignment(Qt::AlignTop);      m_edit->resize(width(), height()-1);      m_edit->setBackgroundMode(Qt::PaletteBase);      m_edit->installEventFilter(this); -    m_button = new QPushButton(i18n("..."), this); +    m_button = new TQPushButton(i18n("..."), this);      m_button->resize(height(), height()-8);      m_button->move(width() - m_button->width() -1, 0); -    m_button->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Fixed); +    m_button->setSizePolicy(TQSizePolicy::Maximum, TQSizePolicy::Fixed);      l->addWidget(m_edit);      l->addWidget(m_button); -    m_popup = new QLabel(0, 0, Qt::WStyle_NoBorder|Qt::WX11BypassWM|WStyle_StaysOnTop); +    m_popup = new TQLabel(0, 0, Qt::WStyle_NoBorder|Qt::WX11BypassWM|WStyle_StaysOnTop);      m_popup->hide(); -    connect(m_button, SIGNAL(clicked()), this, SLOT(updateProperty())); +    connect(m_button, TQT_SIGNAL(clicked()), this, TQT_SLOT(updateProperty()));  } -QVariant PPixmapEdit::value() const +TQVariant PPixmapEdit::value() const  { -    return QVariant(*(m_edit->pixmap())); +    return TQVariant(*(m_edit->pixmap()));  } -void PPixmapEdit::drawViewer(QPainter* p, const QColorGroup& cg, const QRect& r, const QVariant& value) +void PPixmapEdit::drawViewer(TQPainter* p, const TQColorGroup& cg, const TQRect& r, const TQVariant& value)  {      p->setPen(Qt::NoPen);      p->setBrush(cg.background()); @@ -77,7 +77,7 @@ void PPixmapEdit::drawViewer(QPainter* p, const QColorGroup& cg, const QRect& r,      p->drawPixmap(r.topLeft().x(), r.topLeft().y(), value.toPixmap());      } -void PPixmapEdit::setValue(const QVariant& value, bool emitChange) +void PPixmapEdit::setValue(const TQVariant& value, bool emitChange)  {      m_edit->setPixmap(value.toPixmap());      if (emitChange) @@ -87,51 +87,51 @@ void PPixmapEdit::setValue(const QVariant& value, bool emitChange)  void PPixmapEdit::updateProperty()  {  #ifndef PURE_QT -    KURL url = KFileDialog::getImageOpenURL(QString::null, this); +    KURL url = KFileDialog::getImageOpenURL(TQString::null, this);      if (!url.isEmpty())      { -        m_edit->setPixmap(QPixmap(url.path())); +        m_edit->setPixmap(TQPixmap(url.path()));          emit propertyChanged(m_property, value());      }  #else -    QString url = QFileDialog::getOpenFileName(); +    TQString url = TQFileDialog::getOpenFileName();      if (!url.isEmpty())      { -        m_edit->setPixmap(QPixmap(url)); +        m_edit->setPixmap(TQPixmap(url));          emit propertyChanged(m_property, value());      }  #endif  } -void PPixmapEdit::resizeEvent(QResizeEvent *ev) +void PPixmapEdit::resizeEvent(TQResizeEvent *ev)  {      m_edit->resize(ev->size().width(), ev->size().height()-1);      m_button->move(ev->size().width() - m_button->width(), 0);      m_edit->setMaximumHeight(m_button->height());  } -bool PPixmapEdit::eventFilter(QObject *o, QEvent *ev) +bool PPixmapEdit::eventFilter(TQObject *o, TQEvent *ev)  {      if(o == m_edit)      { -        if(ev->type() == QEvent::MouseButtonPress) +        if(ev->type() == TQEvent::MouseButtonPress)          {              if(m_edit->pixmap()->size().height() < height()-2                      && m_edit->pixmap()->size().width() < width()-20)                      return false;              m_popup->setPixmap(*(m_edit->pixmap()));              m_popup->resize(m_edit->pixmap()->size()); -            m_popup->move(QCursor::pos()); +            m_popup->move(TQCursor::pos());              m_popup->show();          } -        if(ev->type() == QEvent::MouseButtonRelease) +        if(ev->type() == TQEvent::MouseButtonRelease)          {              if(m_popup->isVisible())                      m_popup->hide();          } -        if(ev->type() == QEvent::KeyPress) +        if(ev->type() == TQEvent::KeyPress)          { -            QKeyEvent* e = static_cast<QKeyEvent*>(ev); +            TQKeyEvent* e = static_cast<TQKeyEvent*>(ev);              if((e->key() == Key_Enter) || (e->key()== Key_Space) || (e->key() == Key_Return))              {                      m_button->animateClick(); diff --git a/lib/widgets/propeditor/ppixmapedit.h b/lib/widgets/propeditor/ppixmapedit.h index bf7b1bfc..aacc0be8 100644 --- a/lib/widgets/propeditor/ppixmapedit.h +++ b/lib/widgets/propeditor/ppixmapedit.h @@ -34,22 +34,22 @@ class PPixmapEdit : public PropertyWidget  {      Q_OBJECT  public: -    PPixmapEdit(MultiProperty* property, QWidget* parent = 0, const char* name = 0); +    PPixmapEdit(MultiProperty* property, TQWidget* parent = 0, const char* name = 0); -    virtual QVariant value() const; -    virtual void drawViewer(QPainter* p, const QColorGroup& cg, const QRect& r, const QVariant& value); -    virtual void setValue(const QVariant& value, bool emitChange); +    virtual TQVariant value() const; +    virtual void drawViewer(TQPainter* p, const TQColorGroup& cg, const TQRect& r, const TQVariant& value); +    virtual void setValue(const TQVariant& value, bool emitChange); -    virtual void resizeEvent(QResizeEvent *ev); -    virtual bool eventFilter(QObject *o, QEvent *ev); +    virtual void resizeEvent(TQResizeEvent *ev); +    virtual bool eventFilter(TQObject *o, TQEvent *ev);  protected slots:      void updateProperty();  private: -    QLabel *m_edit; -    QLabel *m_popup; -    QPushButton *m_button; +    TQLabel *m_edit; +    TQLabel *m_popup; +    TQPushButton *m_button;  };  } diff --git a/lib/widgets/propeditor/ppointedit.cpp b/lib/widgets/propeditor/ppointedit.cpp index a76f881a..eb1a382e 100644 --- a/lib/widgets/propeditor/ppointedit.cpp +++ b/lib/widgets/propeditor/ppointedit.cpp @@ -20,38 +20,38 @@  #include "ppointedit.h"  #include <klineedit.h> -#include <qlayout.h> -#include <qpainter.h> +#include <tqlayout.h> +#include <tqpainter.h>  namespace PropertyLib{ -PPointEdit::PPointEdit(MultiProperty* property, QWidget* parent, const char* name): PropertyWidget(property, parent, name) +PPointEdit::PPointEdit(MultiProperty* property, TQWidget* parent, const char* name): PropertyWidget(property, parent, name)  { -    QHBoxLayout *l = new QHBoxLayout(this, 0, 0); +    TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0);      m_edit = new KLineEdit(this); -    m_edit->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding); +    m_edit->setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);      l->addWidget(m_edit);      m_edit->setReadOnly(true);  } -QVariant PPointEdit::value() const +TQVariant PPointEdit::value() const  {      return m_value;  } -void PPointEdit::drawViewer(QPainter* p, const QColorGroup& cg, const QRect& r, const QVariant& value) +void PPointEdit::drawViewer(TQPainter* p, const TQColorGroup& cg, const TQRect& r, const TQVariant& value)  {      p->setPen(Qt::NoPen);      p->setBrush(cg.background());      p->drawRect(r); -    p->drawText(r, Qt::AlignLeft | Qt::AlignVCenter | Qt::SingleLine, QString("[ %1, %2 ]").arg(value.toPoint().x()).arg(value.toPoint().y())); +    p->drawText(r, Qt::AlignLeft | Qt::AlignVCenter | Qt::SingleLine, TQString("[ %1, %2 ]").arg(value.toPoint().x()).arg(value.toPoint().y()));  } -void PPointEdit::setValue(const QVariant& value, bool emitChange) +void PPointEdit::setValue(const TQVariant& value, bool emitChange)  {      m_value = value; -    m_edit->setText(QString("[ %1, %2 ]").arg(value.toPoint().x()).arg(value.toPoint().y())); +    m_edit->setText(TQString("[ %1, %2 ]").arg(value.toPoint().x()).arg(value.toPoint().y()));      if (emitChange)          emit propertyChanged(m_property, value); diff --git a/lib/widgets/propeditor/ppointedit.h b/lib/widgets/propeditor/ppointedit.h index 754e1c79..e78f9928 100644 --- a/lib/widgets/propeditor/ppointedit.h +++ b/lib/widgets/propeditor/ppointedit.h @@ -27,21 +27,21 @@ class KLineEdit;  namespace PropertyLib{  /** -@short %Property editor for QPoint values. +@short %Property editor for TQPoint values.  */  class PPointEdit : public PropertyWidget  {  Q_OBJECT  public: -    PPointEdit(MultiProperty* property, QWidget* parent=0, const char* name=0); +    PPointEdit(MultiProperty* property, TQWidget* parent=0, const char* name=0); -    virtual QVariant value() const; -    virtual void drawViewer(QPainter* p, const QColorGroup& cg, const QRect& r, const QVariant& value); -    virtual void setValue(const QVariant& value, bool emitChange); +    virtual TQVariant value() const; +    virtual void drawViewer(TQPainter* p, const TQColorGroup& cg, const TQRect& r, const TQVariant& value); +    virtual void setValue(const TQVariant& value, bool emitChange);  private:      KLineEdit *m_edit; -    QVariant m_value; +    TQVariant m_value;  }; diff --git a/lib/widgets/propeditor/prectedit.cpp b/lib/widgets/propeditor/prectedit.cpp index 4fd57fc2..6b7de9ce 100644 --- a/lib/widgets/propeditor/prectedit.cpp +++ b/lib/widgets/propeditor/prectedit.cpp @@ -20,38 +20,38 @@  #include "prectedit.h"  #include <klineedit.h> -#include <qlayout.h> -#include <qpainter.h> +#include <tqlayout.h> +#include <tqpainter.h>  namespace PropertyLib{ -PRectEdit::PRectEdit(MultiProperty* property, QWidget* parent, const char* name): PropertyWidget(property, parent, name) +PRectEdit::PRectEdit(MultiProperty* property, TQWidget* parent, const char* name): PropertyWidget(property, parent, name)  { -    QHBoxLayout *l = new QHBoxLayout(this, 0, 0); +    TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0);      m_edit = new KLineEdit(this); -    m_edit->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding); +    m_edit->setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);      l->addWidget(m_edit);      m_edit->setReadOnly(true);  } -QVariant PRectEdit::value() const +TQVariant PRectEdit::value() const  {      return m_value;  } -void PRectEdit::drawViewer(QPainter* p, const QColorGroup& cg, const QRect& r, const QVariant& value) +void PRectEdit::drawViewer(TQPainter* p, const TQColorGroup& cg, const TQRect& r, const TQVariant& value)  {      p->setPen(Qt::NoPen);      p->setBrush(cg.background());      p->drawRect(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, Qt::AlignLeft | Qt::AlignVCenter | Qt::SingleLine, TQString("[ %1, %2, %3, %4 ]").arg(value.toRect().x()).arg(value.toRect().y()).arg(value.toRect().width()).arg(value.toRect().height()));  } -void PRectEdit::setValue(const QVariant& value, bool emitChange) +void PRectEdit::setValue(const TQVariant& value, bool emitChange)  {      m_value = value; -    m_edit->setText(QString("[ %1, %2, %3, %4 ]").arg(value.toRect().x()).arg(value.toRect().y()).arg(value.toRect().width()).arg(value.toRect().height())); +    m_edit->setText(TQString("[ %1, %2, %3, %4 ]").arg(value.toRect().x()).arg(value.toRect().y()).arg(value.toRect().width()).arg(value.toRect().height()));      if (emitChange)          emit propertyChanged(m_property, value); diff --git a/lib/widgets/propeditor/prectedit.h b/lib/widgets/propeditor/prectedit.h index 3f8995b1..116ee668 100644 --- a/lib/widgets/propeditor/prectedit.h +++ b/lib/widgets/propeditor/prectedit.h @@ -27,21 +27,21 @@ class KLineEdit;  namespace PropertyLib{  /** -@short %Property editor for QRect values. +@short %Property editor for TQRect values.  */  class PRectEdit : public PropertyWidget  {      Q_OBJECT  public: -    PRectEdit(MultiProperty* property, QWidget* parent=0, const char* name=0); +    PRectEdit(MultiProperty* property, TQWidget* parent=0, const char* name=0); -    virtual QVariant value() const; -    virtual void drawViewer(QPainter* p, const QColorGroup& cg, const QRect& r, const QVariant& value); -    virtual void setValue(const QVariant& value, bool emitChange); +    virtual TQVariant value() const; +    virtual void drawViewer(TQPainter* p, const TQColorGroup& cg, const TQRect& r, const TQVariant& value); +    virtual void setValue(const TQVariant& value, bool emitChange);  private:      KLineEdit *m_edit; -    QVariant m_value; +    TQVariant m_value;  }; diff --git a/lib/widgets/propeditor/property.cpp b/lib/widgets/propeditor/property.cpp index 621a2cc9..d219b8c3 100644 --- a/lib/widgets/propeditor/property.cpp +++ b/lib/widgets/propeditor/property.cpp @@ -18,19 +18,19 @@   ***************************************************************************/  #include "property.h" -#include <qstring.h> +#include <tqstring.h>  namespace PropertyLib{ -Property::Property(int type, const QString &name, const QString &description, -    const QVariant &value, bool save, bool readOnly): +Property::Property(int type, const TQString &name, const TQString &description, +    const TQVariant &value, bool save, bool readOnly):      m_type(type), m_name(name), m_description(description), m_value(value), m_save(save),      m_readOnly(readOnly), m_visible(true)  {  } -Property::Property(const QString &name, const QMap<QString, QVariant> &v_valueList, -    const QString &description, const QVariant &value, bool save, bool readOnly): +Property::Property(const TQString &name, const TQMap<TQString, TQVariant> &v_valueList, +    const TQString &description, const TQVariant &value, bool save, bool readOnly):      valueList(v_valueList), m_type(ValueFromList), m_name(name),      m_description(description), m_value(value), m_save(save), m_readOnly(readOnly),      m_visible(true) @@ -54,12 +54,12 @@ bool Property::operator<(const Property &prop) const          return false;  } -QString Property::name() const +TQString Property::name() const  {      return m_name;  } -void Property::setName(const QString &name) +void Property::setName(const TQString &name)  {      m_name = name;  } @@ -74,12 +74,12 @@ void Property::setType(int type)      m_type = type;  } -QVariant Property::value() const +TQVariant Property::value() const  {      return m_value;  } -void Property::setValue(const QVariant &value, bool rememberOldValue) +void Property::setValue(const TQVariant &value, bool rememberOldValue)  {      if (rememberOldValue)          m_oldValue = m_value; @@ -88,17 +88,17 @@ void Property::setValue(const QVariant &value, bool rememberOldValue)      m_value = value;  } -QString Property::description() const +TQString Property::description() const  {      return m_description;  } -void Property::setDescription(const QString &description) +void Property::setDescription(const TQString &description)  {      m_description = description;  } -void Property::setValueList(const QMap<QString, QVariant> &v_valueList) +void Property::setValueList(const TQMap<TQString, TQVariant> &v_valueList)  {      valueList = v_valueList;  } @@ -118,7 +118,7 @@ void Property::setVisible( const bool visible )      m_visible = visible;  } -QVariant Property::oldValue() const +TQVariant Property::oldValue() const  {      if (m_oldValue.isNull())          return m_value; diff --git a/lib/widgets/propeditor/property.h b/lib/widgets/propeditor/property.h index 06f39c66..74fcb890 100644 --- a/lib/widgets/propeditor/property.h +++ b/lib/widgets/propeditor/property.h @@ -19,9 +19,9 @@  #ifndef PROPERTY_H  #define PROPERTY_H -#include <qvariant.h> +#include <tqvariant.h> -#include <qmap.h> +#include <tqmap.h>  class QWidget;  class QString; @@ -36,14 +36,14 @@ namespace PropertyLib{  /**  @short Property. -It includes support for QStringList properties, an i18n'ed label and stores an old value to allow undo. +It includes support for TQStringList properties, an i18n'ed label and stores an old value to allow undo.  Contains name, type and value. -Type can be one of predefined types (including standard @ref QVariant types) by @ref PropertyLib::Property::PropertyType  +Type can be one of predefined types (including standard @ref TQVariant types) by @ref PropertyLib::Property::PropertyType   enum or custom user type. User defined types should have values more than 3000. -Value is a @ref QVariant. +Value is a @ref TQVariant.  Property can optionally have a list of possible values.  In that case use @ref ValueFromList type and valueList member. @@ -64,43 +64,43 @@ public:      /** PropertyType.          Integers that represent the type of the property. */      enum PropertyType { -        //standard supported QVariant types -        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*/, -        //@todo implement QVariant::CString -        //@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*/, -        //@todo implement QVariant::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 +        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*/, +        //@todo implement TQVariant::CString +        //@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*/, +        //@todo implement TQVariant::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 @@ -117,36 +117,36 @@ public:      /**Constructs empty property.*/      Property() {}      /**Constructs property.*/ -    Property(int type, const QString &name, const QString &description, -        const QVariant &value = QVariant(), bool save = true, bool readOnly = false); +    Property(int type, const TQString &name, const TQString &description, +        const TQVariant &value = TQVariant(), bool save = true, bool readOnly = false);      /**Constructs property with @ref ValueFromList type.*/ -    Property(const QString &name, const QMap<QString, QVariant> &v_valueList, -        const QString &description, const QVariant &value = QVariant(), bool save = true, bool readOnly = false); +    Property(const TQString &name, const TQMap<TQString, TQVariant> &v_valueList, +        const TQString &description, const TQVariant &value = TQVariant(), bool save = true, bool readOnly = false);      virtual ~Property();      virtual bool operator<(const Property &prop) const;      /**@return the name of the property.*/ -    virtual QString name() const; +    virtual TQString name() const;      /**Sets the name of the property.*/ -    virtual void setName(const QString &name); +    virtual void setName(const TQString &name);      /**@return the type of the property.*/      virtual int type() const;      /**Sets the type of the property.*/      virtual void setType(int type);      /**@return the value of the property.*/ -    virtual QVariant value() const; +    virtual TQVariant value() const;      /**Sets the value of the property.*/ -    virtual void setValue(const QVariant &value, bool rememberOldValue = true); +    virtual void setValue(const TQVariant &value, bool rememberOldValue = true);      /**@return the description of the property.*/ -    virtual QString description() const; +    virtual TQString description() const;      /**Sets the description of the property.*/ -    virtual void setDescription(const QString &description); +    virtual void setDescription(const TQString &description);      /**Sets the string-to-value correspondence list of the property.      This is used to create comboboxes-like property editors.*/ -    virtual void setValueList(const QMap<QString, QVariant> &list); +    virtual void setValueList(const TQMap<TQString, TQVariant> &list);      /**The string-to-value correspondence list of the property.*/ -    QMap<QString, QVariant> valueList; +    TQMap<TQString, TQVariant> valueList;      /**Tells if the property can be saved to a stream, xml, etc.      There is a possibility to use "GUI" properties that aren't @@ -160,17 +160,17 @@ public:      virtual void setVisible(const bool visible);      /**Gets the previous property value.*/ -    virtual QVariant oldValue() const; +    virtual TQVariant oldValue() const;  private:  //    Property(Property &property) {};  //    void operator=(Property &property) {};      int m_type; -    QString m_name; -    QString m_description; -    QVariant m_value; -    QVariant m_oldValue; +    TQString m_name; +    TQString m_description; +    TQVariant m_value; +    TQVariant m_oldValue;      bool m_save;      bool m_readOnly;      bool m_visible; diff --git a/lib/widgets/propeditor/propertyeditor.cpp b/lib/widgets/propeditor/propertyeditor.cpp index 10f21ac1..c9e6e85d 100644 --- a/lib/widgets/propeditor/propertyeditor.cpp +++ b/lib/widgets/propeditor/propertyeditor.cpp @@ -27,12 +27,12 @@  #include "compat_tools.h"  #endif -#include <qtable.h> -#include <qlayout.h> -#include <qpainter.h> -#include <qptrlist.h> -#include <qvaluelist.h> -#include <qpushbutton.h> +#include <tqtable.h> +#include <tqlayout.h> +#include <tqpainter.h> +#include <tqptrlist.h> +#include <tqvaluelist.h> +#include <tqpushbutton.h>  #include "property.h"  #include "multiproperty.h" @@ -59,7 +59,7 @@ public:          return m_property->type();      } -    QString name() const +    TQString name() const      {          return m_property->name();      } @@ -69,11 +69,11 @@ public:          return m_property;      } -    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)      {          if ((column == 0) && m_changed)          { -            QFont font; +            TQFont font;              font.setBold(true);              p->setFont(font);              p->setBrush(cg.highlight()); @@ -81,18 +81,18 @@ public:          }          if (column == 1)          { -            QRect r(0, 0, m_editor->header()->sectionSize(1), height()); +            TQRect r(0, 0, m_editor->header()->sectionSize(1), height());              //FIXME: this is ugly, but how else can we deal with ValueFromList properties? -            QVariant valueToDraw; +            TQVariant valueToDraw;              if (m_property->type() == Property::ValueFromList)                  valueToDraw = m_property->findValueDescription();              else                  valueToDraw = m_property->value(); -            QColorGroup icg(cg); +            TQColorGroup icg(cg);  #ifndef PURE_QT -            icg.setColor(QColorGroup::Background, backgroundColor()); +            icg.setColor(TQColorGroup::Background, backgroundColor());  #else -            icg.setColor(QColorGroup::Background, white); +            icg.setColor(TQColorGroup::Background, white);  #endif              m_editor->machine(m_property)->propertyEditor->drawViewer(p, icg, r, valueToDraw);              return; @@ -120,22 +120,22 @@ private:  class PropertyGroupItem: public KListViewItem{  public: -    PropertyGroupItem(KListView *parent, const QString &name) +    PropertyGroupItem(KListView *parent, const TQString &name)          :KListViewItem(parent, name)      {          init();      } -    PropertyGroupItem(KListViewItem *parent, const QString &name) +    PropertyGroupItem(KListViewItem *parent, const TQString &name)          :KListViewItem(parent, name)      {          init();      } -    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)      {          if (column == 0)          { -            QFont font; +            TQFont font;              font.setBold(true);              p->setFont(font);              p->setBrush(cg.highlight()); @@ -164,7 +164,7 @@ public:          setSelectable(false);      }  }; -PropertyEditor::PropertyEditor(QWidget *parent, const char *name) +PropertyEditor::PropertyEditor(TQWidget *parent, const char *name)      :KListView(parent, name)  {      setSorting(-1); @@ -172,15 +172,15 @@ PropertyEditor::PropertyEditor(QWidget *parent, const char *name)      addColumn(i18n("Name"));      addColumn(i18n("Value"));      setAllColumnsShowFocus(true); -    setColumnWidthMode(0, QListView::Maximum); -    setResizeMode(QListView::LastColumn); +    setColumnWidthMode(0, TQListView::Maximum); +    setResizeMode(TQListView::LastColumn);      header()->setClickEnabled(false); -    connect(header(), SIGNAL(sizeChange(int, int, int)), -        this, SLOT(updateEditorSize())); -    connect(this, SIGNAL(currentChanged(QListViewItem*)), -        this, SLOT(slotClicked(QListViewItem*))); +    connect(header(), TQT_SIGNAL(sizeChange(int, int, int)), +        this, TQT_SLOT(updateEditorSize())); +    connect(this, TQT_SIGNAL(currentChanged(TQListViewItem*)), +        this, TQT_SLOT(slotClicked(TQListViewItem*)));      m_currentEditItem = 0;      m_doubleClickForEdit = true; @@ -188,19 +188,19 @@ PropertyEditor::PropertyEditor(QWidget *parent, const char *name)      m_currentEditWidget = 0;      m_list = 0; -    m_currentEditArea = new QWidget(viewport()); +    m_currentEditArea = new TQWidget(viewport());      m_currentEditArea->hide(); -    m_undoButton = new QPushButton(m_currentEditArea); +    m_undoButton = new TQPushButton(m_currentEditArea);  #ifndef PURE_QT      m_undoButton->setPixmap(SmallIcon("undo"));  #else -    m_undoButton->setPixmap( QPixmap("undo.xpm") ); +    m_undoButton->setPixmap( TQPixmap("undo.xpm") );  #endif -    m_undoButton->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::MinimumExpanding); +    m_undoButton->setSizePolicy(TQSizePolicy::Maximum, TQSizePolicy::MinimumExpanding);      m_undoButton->resize(m_undoButton->height(), m_undoButton->height());      m_undoButton->hide(); -    connect(m_undoButton, SIGNAL(clicked()), this, SLOT(undo())); -    m_currentEditLayout = new QGridLayout(m_currentEditArea, 1, 2, 0, 0); +    connect(m_undoButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(undo())); +    m_currentEditLayout = new TQGridLayout(m_currentEditArea, 1, 2, 0, 0);  //    m_currentEditLayout->addWidget(m_undoButton, 0, 1);  } @@ -214,17 +214,17 @@ void PropertyEditor::populateProperties(PropertyList *list)      if (list == 0)          return;      m_list = list; -    connect(m_list, SIGNAL(propertyValueChanged(Property*)), this, SLOT(propertyValueChanged(Property*))); -    const QValueList<QPair<QString, QValueList<QString> > >& groups = m_list->propertiesOfGroup(); -    for (QValueList<QPair<QString, QValueList<QString> > >::const_iterator it = groups.begin(); +    connect(m_list, TQT_SIGNAL(propertyValueChanged(Property*)), this, TQT_SLOT(propertyValueChanged(Property*))); +    const TQValueList<QPair<TQString, TQValueList<TQString> > >& groups = m_list->propertiesOfGroup(); +    for (TQValueList<QPair<TQString, TQValueList<TQString> > >::const_iterator it = groups.begin();          it != groups.end(); ++it)      {  //        qWarning("PropertyEditor::populateProperties:    adding group %s", (*it).first.ascii());          PropertyGroupItem *group = 0;          if ( (!(*it).first.isEmpty()) && ((*it).second.count() > 0) )              group = new PropertyGroupItem(this, (*it).first); -        const QValueList<QString> &properties = (*it).second; -        for (QValueList<QString>::const_iterator it2 = properties.begin(); it2 != properties.end(); ++it2) +        const TQValueList<TQString> &properties = (*it).second; +        for (TQValueList<TQString>::const_iterator it2 = properties.begin(); it2 != properties.end(); ++it2)          {  //            qWarning("PropertyEditor::populateProperties:    adding property %s", (*it2).ascii());              if (group) @@ -241,7 +241,7 @@ void PropertyEditor::populateProperties(PropertyList *list)      }  } -void PropertyEditor::addProperty(PropertyGroupItem *group, const QString &name) +void PropertyEditor::addProperty(PropertyGroupItem *group, const TQString &name)  {      if ((*m_list)[name] == 0)          return; @@ -250,7 +250,7 @@ void PropertyEditor::addProperty(PropertyGroupItem *group, const QString &name)      addChildProperties(pitem);  } -void PropertyEditor::addProperty(const QString &name) +void PropertyEditor::addProperty(const TQString &name)  {      if ((*m_list)[name] == 0)          return; @@ -273,7 +273,7 @@ void PropertyEditor::addChildProperties(PropertyItem *parent)  //     qWarning("seeking children: count: %d", prop->details.count());      parent->setOpen(true); -    for (QValueList<ChildProperty>::iterator it = prop->details.begin(); it != prop->details.end(); ++it) +    for (TQValueList<ChildProperty>::iterator it = prop->details.begin(); it != prop->details.end(); ++it)      {  //         qWarning("found child %s", (*it).name().ascii());          new PropertyItem(this, parent, new MultiProperty(&m_detailedList, &(*it))); @@ -288,7 +288,7 @@ void PropertyEditor::clearProperties()      hideEditor(); -    disconnect(m_list, SIGNAL(propertyValueChanged(Property*)), this, SLOT(propertyValueChanged(Property*))); +    disconnect(m_list, TQT_SIGNAL(propertyValueChanged(Property*)), this, TQT_SLOT(propertyValueChanged(Property*)));      clear();      delete m_list;      m_list = 0; @@ -302,7 +302,7 @@ void PropertyEditor::propertyValueChanged(Property *property)      else      {  //        repaint all items -        QListViewItemIterator it(this); +        TQListViewItemIterator it(this);          while (it.current())          {              repaintItem(it.current()); @@ -311,7 +311,7 @@ void PropertyEditor::propertyValueChanged(Property *property)      }  } -void PropertyEditor::propertyChanged(MultiProperty *property, const QVariant &value) +void PropertyEditor::propertyChanged(MultiProperty *property, const TQVariant &value)  {      if (!property)          return; @@ -360,7 +360,7 @@ void PropertyEditor::showEditor(PropertyItem *item)  void PropertyEditor::placeEditor(PropertyItem *item)  { -    QRect r = itemRect(item); +    TQRect r = itemRect(item);      if (!r.size().isValid())      {          ensureItemVisible(item); @@ -374,7 +374,7 @@ void PropertyEditor::placeEditor(PropertyItem *item)      if (visibleWidth() < r.right())          r.setRight(visibleWidth()); -    r = QRect(viewportToContents(r.topLeft()), r.size()); +    r = TQRect(viewportToContents(r.topLeft()), r.size());      if (item->pixmap(1))      { @@ -417,7 +417,7 @@ void PropertyEditor::updateEditorSize()          placeEditor(m_currentEditItem);  } -void PropertyEditor::slotClicked(QListViewItem *item) +void PropertyEditor::slotClicked(TQListViewItem *item)  {      if (item == 0)      { @@ -440,13 +440,13 @@ void PropertyEditor::slotClicked(QListViewItem *item)  Machine *PropertyEditor::machine(MultiProperty *property)  {  //    int type = property->type(); -    QString name = property->name(); -    QMap<QString, QVariant> values = property->valueList(); +    TQString name = property->name(); +    TQMap<TQString, TQVariant> values = property->valueList();      if (m_registeredForType[name] == 0)      {          m_registeredForType[name] = PropertyMachineFactory::getInstance()->machineForProperty(property); -        connect(m_registeredForType[name]->propertyEditor, SIGNAL(propertyChanged(MultiProperty*, const QVariant&)), -		this, SLOT(propertyChanged(MultiProperty*, const QVariant&))); +        connect(m_registeredForType[name]->propertyEditor, TQT_SIGNAL(propertyChanged(MultiProperty*, const TQVariant&)), +		this, TQT_SLOT(propertyChanged(MultiProperty*, const TQVariant&)));          m_registeredForType[name]->propertyEditor->reparent(m_currentEditArea, 0, m_currentEditArea->childrenRect().topLeft());          m_registeredForType[name]->propertyEditor->hide();      } @@ -455,7 +455,7 @@ Machine *PropertyEditor::machine(MultiProperty *property)  void PropertyEditor::clearMachineCache()  { -    for (QMap<QString, Machine* >::iterator it = m_registeredForType.begin(); it != m_registeredForType.end(); ++it) +    for (TQMap<TQString, Machine* >::iterator it = m_registeredForType.begin(); it != m_registeredForType.end(); ++it)      {          delete it.data();      } diff --git a/lib/widgets/propeditor/propertyeditor.h b/lib/widgets/propeditor/propertyeditor.h index 4091d31a..c6c72237 100644 --- a/lib/widgets/propeditor/propertyeditor.h +++ b/lib/widgets/propeditor/propertyeditor.h @@ -23,7 +23,7 @@  #ifndef PURE_QT  #include <klistview.h>  #else -#include <qlistview.h> +#include <tqlistview.h>  #define KListView QListView  #define KListViewItem QListViewItem  #endif @@ -59,7 +59,7 @@ class PropertyEditor: public KListView{     Q_OBJECT  public:      /**Constructs the property editor.*/ -    PropertyEditor(QWidget *parent = 0, const char *name = 0); +    PropertyEditor(TQWidget *parent = 0, const char *name = 0);      ~PropertyEditor();      /**@return @ref Machine for given property. @@ -83,25 +83,25 @@ protected slots:      /**Updates property widget in the editor.*/      void propertyValueChanged(Property* property);      /**Updates property in the list when new value is selected in the editor.*/ -    void propertyChanged(MultiProperty *property, const QVariant &value); +    void propertyChanged(MultiProperty *property, const TQVariant &value);      /**Shows property editor.*/ -    void slotClicked(QListViewItem* item); +    void slotClicked(TQListViewItem* item);      void updateEditorSize();      /**Undoes the last change in property editor.*/      void undo();  protected: -    void editItem(QListViewItem*, int); +    void editItem(TQListViewItem*, int);      void hideEditor();      void showEditor(PropertyItem *item);      void placeEditor(PropertyItem *item);      PropertyWidget *prepareEditor(PropertyItem *item); -    void addGroup(const QString &name); -    void addProperty(PropertyGroupItem *group, const QString &name); -    void addProperty(const QString &name); +    void addGroup(const TQString &name); +    void addProperty(PropertyGroupItem *group, const TQString &name); +    void addProperty(const TQString &name);      void addChildProperties(PropertyItem *parent);  private: @@ -109,17 +109,17 @@ private:      PropertyList m_detailedList;      //machines cache for property types, machines will be deleted -    QMap<QString, Machine* > m_registeredForType; +    TQMap<TQString, Machine* > m_registeredForType;      PropertyItem *m_currentEditItem;      PropertyWidget *m_currentEditWidget; -    QWidget *m_currentEditArea; -    QGridLayout *m_currentEditLayout; +    TQWidget *m_currentEditArea; +    TQGridLayout *m_currentEditLayout;      bool m_doubleClickForEdit; -    QListViewItem* m_lastClickedItem; +    TQListViewItem* m_lastClickedItem; -    QPushButton *m_undoButton; +    TQPushButton *m_undoButton;  friend class PropertyItem;  }; diff --git a/lib/widgets/propeditor/propertylist.cpp b/lib/widgets/propeditor/propertylist.cpp index e92f28b3..491c2ebb 100644 --- a/lib/widgets/propeditor/propertylist.cpp +++ b/lib/widgets/propeditor/propertylist.cpp @@ -25,12 +25,12 @@  namespace PropertyLib{  PropertyList::PropertyList() -    :QObject(0, 0), m_propertyOwner(true) +    :TQObject(0, 0), m_propertyOwner(true)  {  }  PropertyList::PropertyList(bool propertyOwner) -    :QObject(0, 0), m_propertyOwner(propertyOwner) +    :TQObject(0, 0), m_propertyOwner(propertyOwner)  {  } @@ -39,7 +39,7 @@ PropertyList::~PropertyList()      clear();  } -MultiProperty *PropertyList::operator[](const QString &name) +MultiProperty *PropertyList::operator[](const TQString &name)  {      if (m_list.contains(name))          return m_list[name]; @@ -47,7 +47,7 @@ MultiProperty *PropertyList::operator[](const QString &name)          return new MultiProperty(this);  } -MultiProperty *PropertyList::property( const QString &name ) +MultiProperty *PropertyList::property( const TQString &name )  {  	if (m_list.contains(name))  		return m_list[name]; @@ -73,7 +73,7 @@ void PropertyList::addProperty(Property *property)      }  } -void PropertyList::addProperty(const QString &group, Property *property) +void PropertyList::addProperty(const TQString &group, Property *property)  {      if (property == 0)          return; @@ -101,9 +101,9 @@ void PropertyList::removeProperty(Property *property)          emit aboutToDeleteProperty(property);      MultiProperty *mp = m_list[property->name()]; -    QString group = m_groupOfProperty[mp]; +    TQString group = m_groupOfProperty[mp];      removeFromGroup(mp); -    QString pname = property->name(); +    TQString pname = property->name();      mp->removeProperty(property);      if (m_propertyOwner)          delete property; @@ -117,11 +117,11 @@ void PropertyList::removeProperty(Property *property)          addToGroup(group, mp);  } -void PropertyList::removeProperty(const QString &name) +void PropertyList::removeProperty(const TQString &name)  {      if (m_list.contains(name))      { -        QString group = m_groupOfProperty[m_list[name]]; +        TQString group = m_groupOfProperty[m_list[name]];          removeFromGroup(m_list[name]);          Property *property;          for (property = m_list[name]->list.first(); property; property = m_list[name]->list.next()) @@ -146,17 +146,17 @@ void PropertyList::removeProperty(const QString &name)      }  } -const QValueList<QPair<QString, QValueList<QString> > >& PropertyList::propertiesOfGroup() const +const TQValueList<QPair<TQString, TQValueList<TQString> > >& PropertyList::propertiesOfGroup() const  {      return m_propertiesOfGroup;  } -const QMap<MultiProperty*, QString>& PropertyList::groupOfProperty() const +const TQMap<MultiProperty*, TQString>& PropertyList::groupOfProperty() const  {      return m_groupOfProperty;  } -void PropertyList::addToGroup(const QString &group, MultiProperty *property) +void PropertyList::addToGroup(const TQString &group, MultiProperty *property)  {      if (!property)          return; @@ -165,8 +165,8 @@ void PropertyList::addToGroup(const QString &group, MultiProperty *property)      if (m_groupOfProperty.contains(property) && (m_groupOfProperty[property] == group))          return; -    QPair<QString, QValueList<QString> > *groupPair = 0; -    for(QValueList<QPair<QString, QValueList<QString> > >::iterator it = m_propertiesOfGroup.begin(); +    QPair<TQString, TQValueList<TQString> > *groupPair = 0; +    for(TQValueList<QPair<TQString, TQValueList<TQString> > >::iterator it = m_propertiesOfGroup.begin();          it != m_propertiesOfGroup.end(); ++it)      {          if ((*it).first == group) @@ -177,7 +177,7 @@ void PropertyList::addToGroup(const QString &group, MultiProperty *property)      }      if (groupPair == 0)      { -        groupPair = new QPair<QString, QValueList<QString> >(); +        groupPair = new QPair<TQString, TQValueList<TQString> >();          groupPair->first = group;          groupPair->second.append(property->name());          m_propertiesOfGroup.append(*groupPair); @@ -193,10 +193,10 @@ void PropertyList::addToGroup(const QString &group, MultiProperty *property)  void PropertyList::removeFromGroup(MultiProperty *property)  { -    QString group = m_groupOfProperty[property]; +    TQString group = m_groupOfProperty[property];  //    qWarning("removeFromGroup group=%s", group.ascii()); -    for(QValueList<QPair<QString, QValueList<QString> > >::iterator it = m_propertiesOfGroup.begin(); +    for(TQValueList<QPair<TQString, TQValueList<TQString> > >::iterator it = m_propertiesOfGroup.begin();          it != m_propertiesOfGroup.end(); ++it)      {  //        qWarning("removeFromGroup checking %s", (*it).first.ascii()); @@ -213,22 +213,22 @@ void PropertyList::removeFromGroup(MultiProperty *property)  void PropertyList::clear( )  { -    for (QMap<QString, MultiProperty*>::iterator it = m_list.begin(); it != m_list.end(); ++it) +    for (TQMap<TQString, MultiProperty*>::iterator it = m_list.begin(); it != m_list.end(); ++it)          removeProperty(it.key());  } -bool PropertyList::contains( const QString & name ) +bool PropertyList::contains( const TQString & name )  {      if (m_list.contains(name))          return true;      return false;  } -QPtrList<Property> PropertyList::properties(const QString &name) +TQPtrList<Property> PropertyList::properties(const TQString &name)  {      if (m_list.contains(name))          return m_list[name]->list; -    return QPtrList<Property>(); +    return TQPtrList<Property>();  }  PropertyList::Iterator PropertyList::begin() @@ -276,7 +276,7 @@ MultiProperty *PropertyList::Iterator::operator *()      return data();  } -QString PropertyList::Iterator::key() +TQString PropertyList::Iterator::key()  {      return current.key();  } @@ -306,7 +306,7 @@ PropertyBuffer::PropertyBuffer( )  void PropertyBuffer::intersect(const PropertyList *list)  {      qWarning("PropertyBuffer::intersect"); -    for (QMap<QString, MultiProperty*>::iterator it = m_list.begin(); it != m_list.end(); ++it) +    for (TQMap<TQString, MultiProperty*>::iterator it = m_list.begin(); it != m_list.end(); ++it)      {  //        qWarning("intersect:: for mp = %s", it.data()->name().ascii());          if (list->m_list.contains(it.key())) @@ -327,13 +327,13 @@ void PropertyBuffer::intersect(const PropertyList *list)  //        qWarning("intersect::     removing %s from intersection", it.key().ascii());          removeProperty(it.key());      } -    connect(list, SIGNAL(propertyValueChanged(Property*)), this, SLOT(intersectedValueChanged(Property*))); +    connect(list, TQT_SIGNAL(propertyValueChanged(Property*)), this, TQT_SLOT(intersectedValueChanged(Property*)));  }  void PropertyBuffer::intersectedValueChanged(Property *property)  {  //     qWarning("PropertyBuffer::intersectedValueChanged"); -    QString propertyName = property->name(); +    TQString propertyName = property->name();      if (!contains(propertyName))          return; @@ -341,7 +341,7 @@ void PropertyBuffer::intersectedValueChanged(Property *property)      if (mp == *m_list[propertyName])      {          Property *prop; -        QPtrList<Property> props = properties(propertyName); +        TQPtrList<Property> props = properties(propertyName);          for (prop = props.first(); prop; prop = props.next())              emit propertyValueChanged(prop);      } @@ -351,7 +351,7 @@ PropertyBuffer::PropertyBuffer(PropertyList *list)      :PropertyList(false)  {      //deep copy of m_list -    for (QMap<QString, MultiProperty*>::const_iterator it = list->m_list.begin(); +    for (TQMap<TQString, MultiProperty*>::const_iterator it = list->m_list.begin();              it != list->m_list.end(); ++it)      {          MultiProperty *mp = new MultiProperty(*it.data()); @@ -359,7 +359,7 @@ PropertyBuffer::PropertyBuffer(PropertyList *list)          addToGroup(list->m_groupOfProperty[it.data()], mp);          m_list[it.key()] = mp;      } -    connect(list, SIGNAL(propertyValueChanged(Property*)), this, SLOT(intersectedValueChanged(Property*))); +    connect(list, TQT_SIGNAL(propertyValueChanged(Property*)), this, TQT_SLOT(intersectedValueChanged(Property*)));  }  } diff --git a/lib/widgets/propeditor/propertylist.h b/lib/widgets/propeditor/propertylist.h index 45071606..96e351fc 100644 --- a/lib/widgets/propeditor/propertylist.h +++ b/lib/widgets/propeditor/propertylist.h @@ -20,11 +20,11 @@  #ifndef PROPERTYLIST_H  #define PROPERTYLIST_H -#include <qobject.h> -#include <qmap.h> -#include <qptrlist.h> -#include <qvaluelist.h> -#include <qpair.h> +#include <tqobject.h> +#include <tqmap.h> +#include <tqptrlist.h> +#include <tqvaluelist.h> +#include <tqpair.h>  namespace PropertyLib{ @@ -66,7 +66,7 @@ public:          bool operator != (Iterator it); -        QString key(); +        TQString key();          MultiProperty *data();      private: @@ -74,7 +74,7 @@ public:          Iterator(PropertyList *list, bool end);          void next(); -        QMap<QString, MultiProperty*>::iterator current; +        TQMap<TQString, MultiProperty*>::iterator current;          PropertyList *m_list;          friend class PropertyList; @@ -93,34 +93,34 @@ public:      list["My Property"]->setValue("My Value");      /endcode      @return @ref MultiProperty with given name.*/ -    virtual MultiProperty *operator[](const QString &name); +    virtual MultiProperty *operator[](const TQString &name);      /**Accesses a property by it's name. All property modifications are allowed      trough this method. For example, to set a value of a property      */ -    MultiProperty *property( const QString &name ); +    MultiProperty *property( const TQString &name );      /**Adds the property to the list to the "common" group.*/      virtual void addProperty(Property *property);      /**Adds the property to the list in group.*/ -    virtual void addProperty(const QString &group, Property *property); +    virtual void addProperty(const TQString &group, Property *property);      /**Removes property from the list. Emits aboutToDeleteProperty before removing.*/      virtual void removeProperty(Property *property);      /**Removes property with the given name from the list.      Emits @ref aboutToDeleteProperty before removing.*/ -    virtual void removeProperty(const QString &name); +    virtual void removeProperty(const TQString &name);      /**@return the list of grouped properties.*/ -    virtual const QValueList<QPair<QString, QValueList<QString> > >& propertiesOfGroup() const; +    virtual const TQValueList<QPair<TQString, TQValueList<TQString> > >& propertiesOfGroup() const;      /**@return the map: property - group name.*/ -    virtual const QMap<MultiProperty*, QString>& groupOfProperty() const; +    virtual const TQMap<MultiProperty*, TQString>& groupOfProperty() const;      /**Clears the list of properties.*/      virtual void clear();      /**Returns true if the list of properties contains property with given name.*/ -    virtual bool contains(const QString &name); +    virtual bool contains(const TQString &name);      /**The list of properties with given name.*/ -    QPtrList<Property> properties(const QString &name); +    TQPtrList<Property> properties(const TQString &name);      Iterator begin();      Iterator end(); @@ -136,19 +136,19 @@ protected:      PropertyList(bool propertyOwner);      /**Adds property to a group.*/ -    void addToGroup(const QString &group, MultiProperty *property); +    void addToGroup(const TQString &group, MultiProperty *property);      /**Removes property from a group.*/      void removeFromGroup(MultiProperty *property);  private:      //sorted list of properties in form name: property -    QMap<QString, MultiProperty*> m_list; +    TQMap<TQString, MultiProperty*> m_list;      //groups of properties:      // list of group name: (list of property names) -    QValueList<QPair<QString, QValueList<QString> > > m_propertiesOfGroup; +    TQValueList<QPair<TQString, TQValueList<TQString> > > m_propertiesOfGroup;      // map of property: group -    QMap<MultiProperty*, QString> m_groupOfProperty; +    TQMap<MultiProperty*, TQString> m_groupOfProperty;      //indicates that this list will delete properties after removeProperty()      //and also in destructor diff --git a/lib/widgets/propeditor/propertymachinefactory.cpp b/lib/widgets/propeditor/propertymachinefactory.cpp index 0ab0945f..613777d6 100644 --- a/lib/widgets/propeditor/propertymachinefactory.cpp +++ b/lib/widgets/propeditor/propertymachinefactory.cpp @@ -22,10 +22,10 @@  #ifndef PURE_QT  #include <klocale.h>  #else -#define i18n QObject::tr +#define i18n TQObject::tr  #endif -#include <qmap.h> +#include <tqmap.h>  #include "property.h"  #include "childproperty.h" @@ -73,8 +73,8 @@ PropertyMachineFactory::~PropertyMachineFactory()  Machine *PropertyMachineFactory::machineForProperty(MultiProperty *property)  {      int type = property->type(); -    QString propertyName = property->name(); -    QMap<QString, QVariant> valueList = property->valueList(); +    TQString propertyName = property->name(); +    TQMap<TQString, TQVariant> valueList = property->valueList();      if (m_registeredForType.contains(propertyName))          return (*m_registeredForType[propertyName])(); @@ -143,14 +143,14 @@ Machine *PropertyMachineFactory::machineForProperty(MultiProperty *property)          }          case Property::SizePolicy:          { -            QMap<QString, QVariant> spValues; -            spValues[i18n("Fixed")] = QSizePolicy::Fixed; -            spValues[i18n("Minimum")] = QSizePolicy::Minimum; -            spValues[i18n("Maximum")] = QSizePolicy::Maximum; -            spValues[i18n("Preferred")] = QSizePolicy::Preferred; -            spValues[i18n("Expanding")] = QSizePolicy::Expanding; -            spValues[i18n("Minimum Expanding")] = QSizePolicy::MinimumExpanding; -            spValues[i18n("Ignored")] = QSizePolicy::Ignored; +            TQMap<TQString, TQVariant> spValues; +            spValues[i18n("Fixed")] = TQSizePolicy::Fixed; +            spValues[i18n("Minimum")] = TQSizePolicy::Minimum; +            spValues[i18n("Maximum")] = TQSizePolicy::Maximum; +            spValues[i18n("Preferred")] = TQSizePolicy::Preferred; +            spValues[i18n("Expanding")] = TQSizePolicy::Expanding; +            spValues[i18n("Minimum Expanding")] = TQSizePolicy::MinimumExpanding; +            spValues[i18n("Ignored")] = TQSizePolicy::Ignored;              Machine *mach = new Machine(new PSizePolicyEdit(property, spValues));              property->details.append(ChildProperty(property, i18n("hSizeType"), ChildProperty::SizePolicy_HorData, spValues, i18n("Horizontal Size Type"))); @@ -161,7 +161,7 @@ Machine *PropertyMachineFactory::machineForProperty(MultiProperty *property)          }          case Property::Cursor:          { -            QMap<QString, QVariant> spValues; +            TQMap<TQString, TQVariant> spValues;              spValues[i18n("Arrow")] = Qt::ArrowCursor;              spValues[i18n("Up Arrow")] = Qt::UpArrowCursor;              spValues[i18n("Cross")] = Qt::CrossCursor; diff --git a/lib/widgets/propeditor/propertymachinefactory.h b/lib/widgets/propeditor/propertymachinefactory.h index a8d1e33f..09ea3bbe 100644 --- a/lib/widgets/propeditor/propertymachinefactory.h +++ b/lib/widgets/propeditor/propertymachinefactory.h @@ -20,7 +20,7 @@  #ifndef PROPERTYMACHINEFACTORY_H  #define PROPERTYMACHINEFACTORY_H -#include <qmap.h> +#include <tqmap.h>  #include "propertywidget.h" @@ -89,7 +89,7 @@ private:      virtual ~PropertyMachineFactory();      //registered machines for property types -    QMap<QString, createMachine > m_registeredForType; +    TQMap<TQString, createMachine > m_registeredForType;  };  } diff --git a/lib/widgets/propeditor/propertywidget.cpp b/lib/widgets/propeditor/propertywidget.cpp index 388fd68a..dad296c5 100644 --- a/lib/widgets/propeditor/propertywidget.cpp +++ b/lib/widgets/propeditor/propertywidget.cpp @@ -19,16 +19,16 @@   ***************************************************************************/  #include "propertywidget.h" -#include <qpainter.h> +#include <tqpainter.h>  namespace PropertyLib{ -PropertyWidget::PropertyWidget(MultiProperty *property, QWidget *parent, const char *name) -    :QWidget(parent, name), m_property(property) +PropertyWidget::PropertyWidget(MultiProperty *property, TQWidget *parent, const char *name) +    :TQWidget(parent, name), m_property(property)  {  } -QString PropertyWidget::propertyName() const +TQString PropertyWidget::propertyName() const  {      return m_property->name();  } @@ -38,7 +38,7 @@ void PropertyWidget::setProperty(MultiProperty *property)      m_property = property;  } -void PropertyWidget::drawViewer(QPainter *p, const QColorGroup &cg, const QRect &r, const QVariant &value) +void PropertyWidget::drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value)  {      p->setPen(Qt::NoPen);      p->setBrush(cg.background()); @@ -46,7 +46,7 @@ void PropertyWidget::drawViewer(QPainter *p, const QColorGroup &cg, const QRect      p->drawText(r, Qt::AlignLeft | Qt::AlignVCenter | Qt::SingleLine, value.toString());  } -void PropertyWidget::setValueList(const QMap<QString, QVariant> &// valueList +void PropertyWidget::setValueList(const TQMap<TQString, TQVariant> &// valueList                                    )  {      //this does nothing diff --git a/lib/widgets/propeditor/propertywidget.h b/lib/widgets/propeditor/propertywidget.h index 42ebfa95..edbdf6f3 100644 --- a/lib/widgets/propeditor/propertywidget.h +++ b/lib/widgets/propeditor/propertywidget.h @@ -20,8 +20,8 @@  #ifndef PROPERTYWIDGET_H  #define PROPERTYWIDGET_H -#include <qwidget.h> -#include <qvariant.h> +#include <tqwidget.h> +#include <tqvariant.h>  /** @file propertywidget.h  @short Contains @ref PropertyLib::PropertyWidget class. @@ -39,8 +39,8 @@ Subclass this class to create custom property viewer and editor widget.  Descendants should implement value() and setValue() methods.  Hint: in case you want to implement your property editor widget using -existing widgets like QLineEdit, QComboBox, etc. you can't use multiple -inheritance from two QObject descendants due to Qt library restriction. +existing widgets like TQLineEdit, TQComboBox, etc. you can't use multiple +inheritance from two TQObject descendants due to Qt library restriction.  Therefore use line edits and combo boxes as child widgets.  A set of predefined widgets for predefined property types are available @@ -50,24 +50,24 @@ class PropertyWidget: public QWidget{      Q_OBJECT  public:      /**Constructs widget for property with name "propertyName".*/ -    PropertyWidget(MultiProperty *property, QWidget *parent = 0, const char *name = 0); +    PropertyWidget(MultiProperty *property, TQWidget *parent = 0, const char *name = 0);      virtual ~PropertyWidget() {}      /**@return the value currently entered in the editor widget.*/ -    virtual QVariant value() const = 0; +    virtual TQVariant value() const = 0;      /**Sets the value shown in the 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 the name of edited property.*/ -    virtual QString propertyName() const; +    virtual TQString propertyName() const;      /**Sets the name of edited property.*/      virtual void setProperty(MultiProperty *property);      /**Sets the list of possible values shown in the editor widget. This method       does not emit propertyChanged signal.*/ -    virtual void setValueList(const QMap<QString, QVariant> &valueList); +    virtual void setValueList(const TQMap<TQString, TQVariant> &valueList);      /**Function to draw a property viewer when the 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(); @@ -77,7 +77,7 @@ signals:      to emit it only from @ref setValue() method.      @ref PropertyLib::PropertyEditor widget will connect this to the appropriate slot which      will make updates to the @ref PropertyLib::PropertyList that hold propeties.*/ -    void propertyChanged(MultiProperty *property, const QVariant &value); +    void propertyChanged(MultiProperty *property, const TQVariant &value);  protected:      MultiProperty *m_property; diff --git a/lib/widgets/propeditor/propertywidgetproxy.cpp b/lib/widgets/propeditor/propertywidgetproxy.cpp index d2c29aae..813708ca 100644 --- a/lib/widgets/propeditor/propertywidgetproxy.cpp +++ b/lib/widgets/propeditor/propertywidgetproxy.cpp @@ -19,18 +19,18 @@   ***************************************************************************/  #include "propertywidgetproxy.h" -#include <qlayout.h> +#include <tqlayout.h>  #include "propertywidget.h"  #include "propertymachinefactory.h"  namespace PropertyLib{ -PropertyWidgetProxy::PropertyWidgetProxy(QWidget *parent, const char *name) -    :QWidget(parent, name), mp(0), m_propertyType(Property::Invalid), m_editor(0) +PropertyWidgetProxy::PropertyWidgetProxy(TQWidget *parent, const char *name) +    :TQWidget(parent, name), mp(0), m_propertyType(Property::Invalid), m_editor(0)  {      p = new Property(); -    m_layout = new QHBoxLayout(this, 0, 0); +    m_layout = new TQHBoxLayout(this, 0, 0);  }  PropertyWidgetProxy::~PropertyWidgetProxy() @@ -60,26 +60,26 @@ void PropertyWidgetProxy::setWidget()      m_editor = PropertyMachineFactory::getInstance()->machineForProperty(mp)->propertyEditor;      if (m_editor)      { -        m_editor->reparent(this, QPoint(0,0), true); +        m_editor->reparent(this, TQPoint(0,0), true);          m_layout->addWidget(m_editor);      }  } -QVariant PropertyWidgetProxy::value() const +TQVariant PropertyWidgetProxy::value() const  {      if (m_editor)          return m_editor->value();      else -        return QVariant(); +        return TQVariant();  } -void PropertyWidgetProxy::setValue(const QVariant &value) +void PropertyWidgetProxy::setValue(const TQVariant &value)  {      if (m_editor)          m_editor->setValue(value, false);  } -bool PropertyWidgetProxy::setProperty( const char * name, const QVariant & value ) +bool PropertyWidgetProxy::setProperty( const char * name, const TQVariant & value )  {  	if( strcmp( name, "value") == 0 )  	{ @@ -88,15 +88,15 @@ bool PropertyWidgetProxy::setProperty( const char * name, const QVariant & value  		return true;  	}  	else -		return QWidget::setProperty(name, value); +		return TQWidget::setProperty(name, value);  } -QVariant PropertyWidgetProxy::property( const char * name ) const +TQVariant PropertyWidgetProxy::property( const char * name ) const  {  	if( strcmp( name, "value") == 0 )  		return value(  );  	else -		return QWidget::property(name); +		return TQWidget::property(name);  }  } diff --git a/lib/widgets/propeditor/propertywidgetproxy.h b/lib/widgets/propeditor/propertywidgetproxy.h index 31c28e76..e1183d91 100644 --- a/lib/widgets/propeditor/propertywidgetproxy.h +++ b/lib/widgets/propeditor/propertywidgetproxy.h @@ -20,8 +20,8 @@  #ifndef PROPERTYWIDGETPROXY_H  #define PROPERTYWIDGETPROXY_H -#include <qwidget.h> -#include <qvariant.h> +#include <tqwidget.h> +#include <tqvariant.h>  #include "multiproperty.h" @@ -45,7 +45,7 @@ Q_OBJECT  Q_PROPERTY( int propertyType READ propertyType WRITE setPropertyType DESIGNABLE true )  Q_PROPERTY( PropertyType propertyType2 READ propertyType2 WRITE setPropertyType2 DESIGNABLE false )  public: -    PropertyWidgetProxy(QWidget *parent = 0, const char *name = 0); +    PropertyWidgetProxy(TQWidget *parent = 0, const char *name = 0);      ~PropertyWidgetProxy();      /**Sets the type of a property editor to appear.*/ @@ -55,13 +55,13 @@ public:      void setPropertyType2(PropertyType propertyType);      PropertyType propertyType2() const { return m_propertyType; } -    QVariant value() const; -    void setValue(const QVariant &value); +    TQVariant value() const; +    void setValue(const TQVariant &value);      /**Sets the type of an editor basing on the @p value if the name is "value". -    Otherwise works as QWidget::setProperty.*/ -    bool setProperty( const char *name, const QVariant &value); -    QVariant property( const char *name) const; +    Otherwise works as TQWidget::setProperty.*/ +    bool setProperty( const char *name, const TQVariant &value); +    TQVariant property( const char *name) const;  protected:      virtual void setWidget(); @@ -73,7 +73,7 @@ private:      PropertyType m_propertyType;      PropertyWidget *m_editor; -    QHBoxLayout *m_layout; +    TQHBoxLayout *m_layout;  };  } diff --git a/lib/widgets/propeditor/psizeedit.cpp b/lib/widgets/propeditor/psizeedit.cpp index 5cbc1d40..90208304 100644 --- a/lib/widgets/propeditor/psizeedit.cpp +++ b/lib/widgets/propeditor/psizeedit.cpp @@ -20,39 +20,39 @@  #include "psizeedit.h"  #include <klineedit.h> -#include <qlayout.h> -#include <qpainter.h> +#include <tqlayout.h> +#include <tqpainter.h>  namespace PropertyLib{ -PSizeEdit::PSizeEdit(MultiProperty *property, QWidget *parent, const char *name) +PSizeEdit::PSizeEdit(MultiProperty *property, TQWidget *parent, const char *name)      :PropertyWidget(property, parent, name)  { -    QHBoxLayout *l = new QHBoxLayout(this, 0, 0); +    TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0);      m_edit = new KLineEdit(this); -    m_edit->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding); +    m_edit->setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);      l->addWidget(m_edit);      m_edit->setReadOnly(true);  } -QVariant PSizeEdit::value() const +TQVariant PSizeEdit::value() const  {      return m_value;  } -void PSizeEdit::drawViewer(QPainter* p, const QColorGroup& cg, const QRect& r, const QVariant& value) +void PSizeEdit::drawViewer(TQPainter* p, const TQColorGroup& cg, const TQRect& r, const TQVariant& value)  {      p->setPen(Qt::NoPen);      p->setBrush(cg.background());      p->drawRect(r); -    p->drawText(r, Qt::AlignLeft | Qt::AlignVCenter | Qt::SingleLine, QString("[ %1, %2 ]").arg(value.toSize().width()).arg(value.toSize().height())); +    p->drawText(r, Qt::AlignLeft | Qt::AlignVCenter | Qt::SingleLine, TQString("[ %1, %2 ]").arg(value.toSize().width()).arg(value.toSize().height()));  } -void PSizeEdit::setValue(const QVariant& value, bool emitChange) +void PSizeEdit::setValue(const TQVariant& value, bool emitChange)  {      m_value = value; -    m_edit->setText(QString("[ %1, %2 ]").arg(value.toSize().width()).arg(value.toSize().height())); +    m_edit->setText(TQString("[ %1, %2 ]").arg(value.toSize().width()).arg(value.toSize().height()));      if (emitChange)          emit propertyChanged(m_property, value); diff --git a/lib/widgets/propeditor/psizeedit.h b/lib/widgets/propeditor/psizeedit.h index 3053f28f..4613f532 100644 --- a/lib/widgets/propeditor/psizeedit.h +++ b/lib/widgets/propeditor/psizeedit.h @@ -29,21 +29,21 @@ class QPainter;  namespace PropertyLib{  /** -@short %Property editor for QSize values. +@short %Property editor for TQSize values.  */  class PSizeEdit: public PropertyWidget  {      Q_OBJECT  public: -    PSizeEdit(MultiProperty *property, QWidget *parent = 0, const char *name = 0); +    PSizeEdit(MultiProperty *property, TQWidget *parent = 0, const char *name = 0); -    virtual QVariant value() const; -    virtual void drawViewer(QPainter* p, const QColorGroup& cg, const QRect& r, const QVariant& value); -    virtual void setValue(const QVariant& value, bool emitChange); +    virtual TQVariant value() const; +    virtual void drawViewer(TQPainter* p, const TQColorGroup& cg, const TQRect& r, const TQVariant& value); +    virtual void setValue(const TQVariant& value, bool emitChange);  private:      KLineEdit *m_edit; -    QVariant m_value; +    TQVariant m_value;  };  } diff --git a/lib/widgets/propeditor/psizepolicyedit.cpp b/lib/widgets/propeditor/psizepolicyedit.cpp index 8695b9cd..9447a4bc 100644 --- a/lib/widgets/propeditor/psizepolicyedit.cpp +++ b/lib/widgets/propeditor/psizepolicyedit.cpp @@ -20,49 +20,49 @@  #include "psizepolicyedit.h"  #include <klineedit.h> -#include <qlayout.h> -#include <qpainter.h> -#include <qsizepolicy.h> +#include <tqlayout.h> +#include <tqpainter.h> +#include <tqsizepolicy.h>  namespace PropertyLib{ -PSizePolicyEdit::PSizePolicyEdit(MultiProperty* property, const QMap<QString, QVariant> &spValues, QWidget* parent, const char* name) +PSizePolicyEdit::PSizePolicyEdit(MultiProperty* property, const TQMap<TQString, TQVariant> &spValues, TQWidget* parent, const char* name)      :PropertyWidget(property, parent, name), m_spValues(spValues)  { -    QHBoxLayout *l = new QHBoxLayout(this, 0, 0); +    TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0);      m_edit = new KLineEdit(this); -    m_edit->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding); +    m_edit->setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);      l->addWidget(m_edit);      m_edit->setReadOnly(true);  } -QVariant PSizePolicyEdit::value() const +TQVariant PSizePolicyEdit::value() const  {      return m_value;  } -void PSizePolicyEdit::drawViewer(QPainter* p, const QColorGroup& cg, const QRect& r, const QVariant& value) +void PSizePolicyEdit::drawViewer(TQPainter* p, const TQColorGroup& cg, const TQRect& r, const TQVariant& value)  {      p->setPen(Qt::NoPen);      p->setBrush(cg.background());      p->drawRect(r); -    p->drawText(r, Qt::AlignLeft | Qt::AlignVCenter | Qt::SingleLine, QString("%1/%2/%3/%4").arg(findValueDescription(value.toSizePolicy().horData())).arg(findValueDescription(value.toSizePolicy().verData())).arg(value.toSizePolicy().horStretch()).arg(value.toSizePolicy().verStretch())); +    p->drawText(r, Qt::AlignLeft | Qt::AlignVCenter | Qt::SingleLine, TQString("%1/%2/%3/%4").arg(findValueDescription(value.toSizePolicy().horData())).arg(findValueDescription(value.toSizePolicy().verData())).arg(value.toSizePolicy().horStretch()).arg(value.toSizePolicy().verStretch()));  } -void PSizePolicyEdit::setValue(const QVariant& value, bool emitChange) +void PSizePolicyEdit::setValue(const TQVariant& value, bool emitChange)  {      m_value = value; -    m_edit->setText(QString("%1/%2/%3/%4").arg(findValueDescription(value.toSizePolicy().horData())).arg(findValueDescription(value.toSizePolicy().verData())).arg(value.toSizePolicy().horStretch()).arg(value.toSizePolicy().verStretch())); +    m_edit->setText(TQString("%1/%2/%3/%4").arg(findValueDescription(value.toSizePolicy().horData())).arg(findValueDescription(value.toSizePolicy().verData())).arg(value.toSizePolicy().horStretch()).arg(value.toSizePolicy().verStretch()));      if (emitChange)          emit propertyChanged(m_property, value);  } -QString PSizePolicyEdit::findValueDescription(QVariant val) const +TQString PSizePolicyEdit::findValueDescription(TQVariant val) const  {  //    qWarning("PSizePolicyEdit::findValueDescription : %d", val.toInt()); -    for (QMap<QString, QVariant>::const_iterator it = m_spValues.begin(); it != m_spValues.end(); ++ it) +    for (TQMap<TQString, TQVariant>::const_iterator it = m_spValues.begin(); it != m_spValues.end(); ++ it)      {          if (it.data() == val)              return it.key(); diff --git a/lib/widgets/propeditor/psizepolicyedit.h b/lib/widgets/propeditor/psizepolicyedit.h index 668359c2..36c26d1b 100644 --- a/lib/widgets/propeditor/psizepolicyedit.h +++ b/lib/widgets/propeditor/psizepolicyedit.h @@ -22,31 +22,31 @@  #include "propertywidget.h" -#include <qmap.h> +#include <tqmap.h>  class KLineEdit;  namespace PropertyLib{  /** -@short %Property editor for QSizePolicy values. +@short %Property editor for TQSizePolicy values.  */  class PSizePolicyEdit : public PropertyWidget  {  Q_OBJECT  public: -    PSizePolicyEdit(MultiProperty* property, const QMap<QString, QVariant> &spValues, QWidget* parent=0, const char* name=0); +    PSizePolicyEdit(MultiProperty* property, const TQMap<TQString, TQVariant> &spValues, TQWidget* parent=0, const char* name=0); -    virtual QVariant value() const; -    virtual void drawViewer(QPainter* p, const QColorGroup& cg, const QRect& r, const QVariant& value); -    virtual void setValue(const QVariant& value, bool emitChange); +    virtual TQVariant value() const; +    virtual void drawViewer(TQPainter* p, const TQColorGroup& cg, const TQRect& r, const TQVariant& value); +    virtual void setValue(const TQVariant& value, bool emitChange); -    QString findValueDescription(QVariant val) const; +    TQString findValueDescription(TQVariant val) const;  private:      KLineEdit *m_edit; -    QVariant m_value; -    QMap<QString, QVariant> m_spValues; +    TQVariant m_value; +    TQMap<TQString, TQVariant> m_spValues;  };  } diff --git a/lib/widgets/propeditor/pspinbox.cpp b/lib/widgets/propeditor/pspinbox.cpp index 0171adfb..755041c1 100644 --- a/lib/widgets/propeditor/pspinbox.cpp +++ b/lib/widgets/propeditor/pspinbox.cpp @@ -21,49 +21,49 @@  #include <limits.h> -#include <qspinbox.h> -#include <qlayout.h> +#include <tqspinbox.h> +#include <tqlayout.h>  namespace PropertyLib{ -PSpinBox::PSpinBox(MultiProperty *property, QWidget *parent, const char *name) +PSpinBox::PSpinBox(MultiProperty *property, TQWidget *parent, const char *name)      :PropertyWidget(property, parent, name)  { -    QHBoxLayout *l = new QHBoxLayout(this, 0, 0); -    m_edit = new QSpinBox(INT_MIN, INT_MAX, 1, this); -    m_edit->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding); +    TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0); +    m_edit = new TQSpinBox(INT_MIN, INT_MAX, 1, this); +    m_edit->setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);      l->addWidget(m_edit); -    connect(m_edit, SIGNAL(valueChanged(int)), this, SLOT(updateProperty(int))); +    connect(m_edit, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(updateProperty(int)));  } -PSpinBox::PSpinBox(MultiProperty *property, int minValue, int maxValue, int step, QWidget *parent, const char *name) +PSpinBox::PSpinBox(MultiProperty *property, int minValue, int maxValue, int step, TQWidget *parent, const char *name)      :PropertyWidget(property, parent, name)  { -    QHBoxLayout *l = new QHBoxLayout(this, 0, 0); -    m_edit = new QSpinBox(minValue, maxValue, step, this); +    TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0); +    m_edit = new TQSpinBox(minValue, maxValue, step, this);      l->addWidget(m_edit); -    connect(m_edit, SIGNAL(valueChanged(int)), this, SLOT(updateProperty(int))); +    connect(m_edit, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(updateProperty(int)));  } -QVariant PSpinBox::value() const +TQVariant PSpinBox::value() const  { -    return QVariant(m_edit->cleanText().toInt()); +    return TQVariant(m_edit->cleanText().toInt());  } -void PSpinBox::setValue(const QVariant &value, bool emitChange) +void PSpinBox::setValue(const TQVariant &value, bool emitChange)  { -    disconnect(m_edit, SIGNAL(valueChanged(int)), this, SLOT(updateProperty(int))); +    disconnect(m_edit, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(updateProperty(int)));      m_edit->setValue(value.toInt()); -    connect(m_edit, SIGNAL(valueChanged(int)), this, SLOT(updateProperty(int))); +    connect(m_edit, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(updateProperty(int)));      if (emitChange)          emit propertyChanged(m_property, value);  }  void PSpinBox::updateProperty(int val)  { -    emit propertyChanged(m_property, QVariant(val)); +    emit propertyChanged(m_property, TQVariant(val));  }  } diff --git a/lib/widgets/propeditor/pspinbox.h b/lib/widgets/propeditor/pspinbox.h index 55d723f2..9998ff2f 100644 --- a/lib/widgets/propeditor/pspinbox.h +++ b/lib/widgets/propeditor/pspinbox.h @@ -32,20 +32,20 @@ namespace PropertyLib{  class PSpinBox: public PropertyWidget{      Q_OBJECT  public: -    PSpinBox(MultiProperty *property, QWidget *parent = 0, const char *name = 0); -    PSpinBox(MultiProperty *property, int minValue, int maxValue, int step = 1, QWidget *parent = 0, const char *name = 0); +    PSpinBox(MultiProperty *property, TQWidget *parent = 0, const char *name = 0); +    PSpinBox(MultiProperty *property, int minValue, int maxValue, int step = 1, TQWidget *parent = 0, const char *name = 0);      /**@return the value currently entered in the editor widget.*/ -    virtual QVariant value() const; +    virtual TQVariant value() const;      /**Sets the value shown in the editor widget. Set emitChange to false      if you don't want to emit propertyChanged signal.*/ -    virtual void setValue(const QVariant &value, bool emitChange=true); +    virtual void setValue(const TQVariant &value, bool emitChange=true);  private slots:      void updateProperty(int val);  private: -    QSpinBox *m_edit; +    TQSpinBox *m_edit;  };  } diff --git a/lib/widgets/propeditor/pstringlistedit.cpp b/lib/widgets/propeditor/pstringlistedit.cpp index 18b8756e..f6803304 100644 --- a/lib/widgets/propeditor/pstringlistedit.cpp +++ b/lib/widgets/propeditor/pstringlistedit.cpp @@ -19,9 +19,9 @@   ***************************************************************************/  #include "pstringlistedit.h" -#include <qlayout.h> -#include <qdialog.h> -#include <qpainter.h> +#include <tqlayout.h> +#include <tqdialog.h> +#include <tqpainter.h>  #include <klineedit.h>  #ifndef PURE_QT @@ -30,34 +30,34 @@  #include <kstdguiitem.h>  #else  #include "qeditlistbox.h" -#include <qpushbutton.h> +#include <tqpushbutton.h>  #include "compat_tools.h"  #endif  namespace PropertyLib{ -PStringListEdit::PStringListEdit(MultiProperty *property, QWidget *parent, const char *name) +PStringListEdit::PStringListEdit(MultiProperty *property, TQWidget *parent, const char *name)       :PropertyWidget(property, parent, name)  { -    l = new QHBoxLayout(this); +    l = new TQHBoxLayout(this);      edit = new KLineEdit(this);      edit->setReadOnly(true); -    edit->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding); +    edit->setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);      l->addWidget(edit); -    pbSelect = new QPushButton("...", this); -    pbSelect->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::MinimumExpanding); +    pbSelect = new TQPushButton("...", this); +    pbSelect->setSizePolicy(TQSizePolicy::Maximum, TQSizePolicy::MinimumExpanding);      l->addWidget(pbSelect); -    connect(pbSelect, SIGNAL(clicked()), this, SLOT(showEditor())); +    connect(pbSelect, TQT_SIGNAL(clicked()), this, TQT_SLOT(showEditor()));  } -QVariant PStringListEdit::value() const +TQVariant PStringListEdit::value() const  { -    return QVariant(m_list); +    return TQVariant(m_list);  } -void PStringListEdit::setValue(const QVariant &value, bool emitChange) +void PStringListEdit::setValue(const TQVariant &value, bool emitChange)  {      m_list = value.toStringList();      edit->setText(value.toStringList().join(", ")); @@ -67,8 +67,8 @@ void PStringListEdit::setValue(const QVariant &value, bool emitChange)  void PStringListEdit::showEditor()  { -    QDialog* dia = new QDialog(this, "stringlist_dialog", true); -    QVBoxLayout *dv = new QVBoxLayout(dia, 2); +    TQDialog* dia = new TQDialog(this, "stringlist_dialog", true); +    TQVBoxLayout *dv = new TQVBoxLayout(dia, 2);  #ifdef PURE_QT      QEditListBox *select = new QEditListBox(dia, "select_char"); @@ -77,18 +77,18 @@ void PStringListEdit::showEditor()  #endif      dv->addWidget(select); -    QHBoxLayout *dh = new QHBoxLayout(dv, 6); +    TQHBoxLayout *dh = new TQHBoxLayout(dv, 6);  #ifndef PURE_QT      KPushButton *pbOk = new KPushButton(KStdGuiItem::ok(), dia);      KPushButton *pbCancel = new KPushButton(KStdGuiItem::cancel(), dia);  #else -    QPushButton *pbOk = new QPushButton(i18n("Ok"), dia); -    QPushButton *pbCancel = new QPushButton(i18n("Cancel"), dia); +    TQPushButton *pbOk = new TQPushButton(i18n("Ok"), dia); +    TQPushButton *pbCancel = new TQPushButton(i18n("Cancel"), dia);  #endif -    QSpacerItem *si = new QSpacerItem(30, 0, QSizePolicy::Expanding, QSizePolicy::Expanding); +    TQSpacerItem *si = new TQSpacerItem(30, 0, TQSizePolicy::Expanding, TQSizePolicy::Expanding); -    connect(pbOk, SIGNAL(clicked()), dia, SLOT(accept())); -    connect(pbCancel, SIGNAL(clicked()), dia, SLOT(reject())); +    connect(pbOk, TQT_SIGNAL(clicked()), dia, TQT_SLOT(accept())); +    connect(pbCancel, TQT_SIGNAL(clicked()), dia, TQT_SLOT(reject()));      dh->addItem(si);      dh->addWidget(pbOk); @@ -96,7 +96,7 @@ void PStringListEdit::showEditor()      select->insertStringList(m_list); -    if (dia->exec() == QDialog::Accepted) +    if (dia->exec() == TQDialog::Accepted)      {          m_list = select->items();          edit->setText(select->items().join(", ")); @@ -106,7 +106,7 @@ void PStringListEdit::showEditor()      emit propertyChanged(m_property, m_list);  } -void PStringListEdit::drawViewer(QPainter *p, const QColorGroup &cg, const QRect &r, const QVariant &value) +void PStringListEdit::drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value)  {      p->setPen(Qt::NoPen);      p->setBrush(cg.background()); diff --git a/lib/widgets/propeditor/pstringlistedit.h b/lib/widgets/propeditor/pstringlistedit.h index 086391e8..25bbec74 100644 --- a/lib/widgets/propeditor/pstringlistedit.h +++ b/lib/widgets/propeditor/pstringlistedit.h @@ -36,25 +36,25 @@ class PStringListEdit: public PropertyWidget  {      Q_OBJECT  public: -    PStringListEdit(MultiProperty *property, QWidget *parent = 0, const char *name = 0); +    PStringListEdit(MultiProperty *property, TQWidget *parent = 0, const char *name = 0);      /**@return the value currently entered in the editor widget.*/ -    virtual QVariant value() const; +    virtual TQVariant value() const;      /**Sets the value shown in the editor widget. Set emitChange to false      if you don't want to emit propertyChanged signal.*/ -    virtual void setValue(const QVariant &value, bool emitChange=true); +    virtual void setValue(const TQVariant &value, bool emitChange=true);      /**Function to draw a property viewer when the 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);  private slots:      void showEditor();  private: -    QPushButton *pbSelect; -    QHBoxLayout *l; +    TQPushButton *pbSelect; +    TQHBoxLayout *l;      KLineEdit *edit; -    QStringList m_list; +    TQStringList m_list;  };  } diff --git a/lib/widgets/propeditor/psymbolcombo.cpp b/lib/widgets/propeditor/psymbolcombo.cpp index 05ec4563..24f4259c 100644 --- a/lib/widgets/propeditor/psymbolcombo.cpp +++ b/lib/widgets/propeditor/psymbolcombo.cpp @@ -18,9 +18,9 @@   *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.             *   ***************************************************************************/ -#include <qlayout.h> -#include <qpainter.h> -#include <qpushbutton.h> +#include <tqlayout.h> +#include <tqpainter.h> +#include <tqpushbutton.h>  #include <klineedit.h>  #ifndef PURE_QT @@ -28,52 +28,52 @@  #include <klocale.h>  #include <kpushbutton.h>  #include <kstdguiitem.h> -#include <qdialog.h> +#include <tqdialog.h>  #endif  #include "psymbolcombo.h"  namespace PropertyLib{ -PSymbolCombo::PSymbolCombo(MultiProperty *property, QWidget *parent, const char *name) +PSymbolCombo::PSymbolCombo(MultiProperty *property, TQWidget *parent, const char *name)      :PropertyWidget(property, parent, name)  { -    l = new QHBoxLayout(this); +    l = new TQHBoxLayout(this);      m_edit = new KLineEdit(this); -    m_edit->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding); +    m_edit->setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);      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->setSizePolicy(TQSizePolicy::Maximum, TQSizePolicy::MinimumExpanding);      l->addWidget(m_select);  #ifdef PURE_QT      m_select->hide();  #endif -    connect(m_select, SIGNAL(clicked()), this, SLOT(selectChar())); -    connect(m_edit, SIGNAL(textChanged(const QString&)), this, SLOT(updateProperty(const QString&))); +    connect(m_select, TQT_SIGNAL(clicked()), this, TQT_SLOT(selectChar())); +    connect(m_edit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(updateProperty(const TQString&)));  } -QVariant PSymbolCombo::value() const +TQVariant PSymbolCombo::value() const  {      if (!(m_edit->text().isNull())) -        return QVariant(QString("%1").arg(m_edit->text().at(0).unicode())); +        return TQVariant(TQString("%1").arg(m_edit->text().at(0).unicode()));      else -        return QVariant(0); +        return TQVariant(0);  } -void PSymbolCombo::setValue(const QVariant &value, bool emitChange) +void PSymbolCombo::setValue(const TQVariant &value, bool emitChange)  {  #if QT_VERSION >= 0x030100      if (!(value.isNull()))  #else -    if (value.canCast(QVariant::Int)) +    if (value.canCast(TQVariant::Int))  #endif      { -        disconnect(m_edit, SIGNAL(textChanged(const QString&)), this, SLOT(updateProperty(const QString&))); -        m_edit->setText(QChar(value.toInt())); -        connect(m_edit, SIGNAL(textChanged(const QString&)), this, SLOT(updateProperty(const QString&))); +        disconnect(m_edit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(updateProperty(const TQString&))); +        m_edit->setText(TQChar(value.toInt())); +        connect(m_edit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(updateProperty(const TQString&)));          if (emitChange)              emit propertyChanged(m_property, value);      } @@ -82,19 +82,19 @@ void PSymbolCombo::setValue(const QVariant &value, bool emitChange)  void PSymbolCombo::selectChar()  {  #ifndef PURE_QT -    QDialog* dia = new QDialog(this, "select_dialog", true); -    QVBoxLayout *dv = new QVBoxLayout(dia, 2); +    TQDialog* dia = new TQDialog(this, "select_dialog", true); +    TQVBoxLayout *dv = new TQVBoxLayout(dia, 2);      KCharSelect *select = new KCharSelect(dia, "select_char");      dv->addWidget(select); -    QHBoxLayout *dh = new QHBoxLayout(dv, 6); +    TQHBoxLayout *dh = new TQHBoxLayout(dv, 6);      KPushButton *pbOk = new KPushButton(KStdGuiItem::ok(), dia);      KPushButton *pbCancel = new KPushButton(KStdGuiItem::cancel(), dia); -    QSpacerItem *si = new QSpacerItem(30, 0, QSizePolicy::Expanding, QSizePolicy::Expanding); +    TQSpacerItem *si = new TQSpacerItem(30, 0, TQSizePolicy::Expanding, TQSizePolicy::Expanding); -    connect(pbOk, SIGNAL(clicked()), dia, SLOT(accept())); -    connect(pbCancel, SIGNAL(clicked()), dia, SLOT(reject())); +    connect(pbOk, TQT_SIGNAL(clicked()), dia, TQT_SLOT(accept())); +    connect(pbCancel, TQT_SIGNAL(clicked()), dia, TQT_SLOT(reject()));      dh->addItem(si);      dh->addWidget(pbOk); @@ -103,7 +103,7 @@ void PSymbolCombo::selectChar()      if (!(m_edit->text().isNull()))          select->setChar(m_edit->text().at(0)); -    if (dia->exec() == QDialog::Accepted) +    if (dia->exec() == TQDialog::Accepted)      {          m_edit->setText(select->chr());      } @@ -111,17 +111,17 @@ void PSymbolCombo::selectChar()  #endif  } -void PSymbolCombo::updateProperty(const QString& val) +void PSymbolCombo::updateProperty(const TQString& val)  { -    emit propertyChanged(m_property, QVariant(QString("%1").arg(val.at(0).unicode()))); +    emit propertyChanged(m_property, TQVariant(TQString("%1").arg(val.at(0).unicode())));  } -void PSymbolCombo::drawViewer(QPainter *p, const QColorGroup &cg, const QRect &r, const QVariant &value) +void PSymbolCombo::drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value)  {      p->setBrush(cg.background());      p->setPen(Qt::NoPen);      p->drawRect(r); -    p->drawText(r, Qt::AlignLeft | Qt::AlignVCenter | Qt::SingleLine, QChar(value.toInt())); +    p->drawText(r, Qt::AlignLeft | Qt::AlignVCenter | Qt::SingleLine, TQChar(value.toInt()));  }  } diff --git a/lib/widgets/propeditor/psymbolcombo.h b/lib/widgets/propeditor/psymbolcombo.h index e3bedfa8..621ce23c 100644 --- a/lib/widgets/propeditor/psymbolcombo.h +++ b/lib/widgets/propeditor/psymbolcombo.h @@ -35,26 +35,26 @@ namespace PropertyLib{  class PSymbolCombo: public PropertyWidget{      Q_OBJECT  public: -    PSymbolCombo(MultiProperty *property, QWidget *parent = 0, const char *name = 0); +    PSymbolCombo(MultiProperty *property, TQWidget *parent = 0, const char *name = 0);      /**@return the value currently entered in the editor widget.*/ -    virtual QVariant value() const; +    virtual TQVariant value() const;      /**Sets the value shown in the editor widget. Set emitChange to false      if you don't want to emit propertyChanged signal.*/ -    virtual void setValue(const QVariant &value, bool emitChange=true); +    virtual void setValue(const TQVariant &value, bool emitChange=true);      /**Function to draw a property viewer when the 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);  public slots:      void selectChar();  private slots: -    void updateProperty(const QString &val); +    void updateProperty(const TQString &val);  private:      KLineEdit *m_edit; -    QPushButton *m_select; -    QHBoxLayout *l; +    TQPushButton *m_select; +    TQHBoxLayout *l;  };  } diff --git a/lib/widgets/propeditor/purledit.cpp b/lib/widgets/propeditor/purledit.cpp index 3a896cdf..64e4d0c7 100644 --- a/lib/widgets/propeditor/purledit.cpp +++ b/lib/widgets/propeditor/purledit.cpp @@ -22,49 +22,49 @@  #ifndef PURE_QT  #include <kurlrequester.h>  #else -#include <qpushbutton.h> -#include <qlineedit.h> +#include <tqpushbutton.h> +#include <tqlineedit.h>  #endif -#include <qfiledialog.h> -#include <qlayout.h> +#include <tqfiledialog.h> +#include <tqlayout.h>  namespace PropertyLib{ -PUrlEdit::PUrlEdit(Mode mode, MultiProperty* property, QWidget* parent, const char* name) +PUrlEdit::PUrlEdit(Mode mode, MultiProperty* property, TQWidget* parent, const char* name)      :PropertyWidget(property, parent, name)  { -    QHBoxLayout *l = new QHBoxLayout(this, 0, 0); +    TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0);  #ifndef PURE_QT      m_edit = new KURLRequester(this);      l->addWidget(m_edit);      m_edit->setMode((KFile::Mode)mode); -    connect(m_edit, SIGNAL(textChanged(const QString&)), this, SLOT(updateProperty(const QString&))); +    connect(m_edit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(updateProperty(const TQString&)));  #else      m_edit = new KLineEdit(this); -    m_select = new QPushButton("...",this); +    m_select = new TQPushButton("...",this);      l->addWidget(m_edit);      l->addWidget(m_select);      m_mode = mode; -    connect( m_select, SIGNAL(clicked()),this,SLOT(select())); +    connect( m_select, TQT_SIGNAL(clicked()),this,TQT_SLOT(select()));  #endif -    m_edit->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding); +    m_edit->setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);  } -QVariant PUrlEdit::value() const +TQVariant PUrlEdit::value() const  {  #ifndef PURE_QT -     return QVariant(m_edit->url()); +     return TQVariant(m_edit->url());  #else -     return QVariant(m_url); +     return TQVariant(m_url);  #endif  } -void PUrlEdit::setValue(const QVariant& value, bool emitChange) +void PUrlEdit::setValue(const TQVariant& value, bool emitChange)  {  #ifndef PURE_QT -    disconnect(m_edit, SIGNAL(textChanged(const QString&)), this, SLOT(updateProperty(const QString&))); +    disconnect(m_edit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(updateProperty(const TQString&)));      m_edit->setURL(value.toString()); -    connect(m_edit, SIGNAL(textChanged(const QString&)), this, SLOT(updateProperty(const QString&))); +    connect(m_edit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(updateProperty(const TQString&)));  #else      m_edit->setText(value.toString());  #endif @@ -72,19 +72,19 @@ void PUrlEdit::setValue(const QVariant& value, bool emitChange)          emit propertyChanged(m_property, value);  } -void PUrlEdit::updateProperty(const QString &val) +void PUrlEdit::updateProperty(const TQString &val)  { -    emit propertyChanged(m_property, QVariant(val)); +    emit propertyChanged(m_property, TQVariant(val));  }  void PUrlEdit::select()  {  #ifdef PURE_QT -    QString path = m_url; +    TQString path = m_url;      if( m_mode == Directory ) -	m_url = QFileDialog::getExistingDirectory( m_url,this); +	m_url = TQFileDialog::getExistingDirectory( m_url,this);      else -        m_url = QFileDialog::getOpenFileName(m_url, QString::null, this); +        m_url = TQFileDialog::getOpenFileName(m_url, TQString::null, this);      updateProperty(m_url);      m_edit->setText(m_url);  #endif diff --git a/lib/widgets/propeditor/purledit.h b/lib/widgets/propeditor/purledit.h index 6c9c8a8d..6508ea7d 100644 --- a/lib/widgets/propeditor/purledit.h +++ b/lib/widgets/propeditor/purledit.h @@ -46,21 +46,21 @@ public:      enum Mode {File,Directory};  #endif -    PUrlEdit(Mode mode, MultiProperty* property, QWidget* parent=0, const char* name=0); +    PUrlEdit(Mode mode, MultiProperty* property, TQWidget* parent=0, const char* name=0); -    virtual QVariant value() const; -    virtual void setValue(const QVariant& value, bool emitChange); +    virtual TQVariant value() const; +    virtual void setValue(const TQVariant& value, bool emitChange);  private slots: -    void updateProperty(const QString &val);     +    void updateProperty(const TQString &val);          void select();  private:  #ifndef PURE_QT      KURLRequester *m_edit;  #else      KLineEdit *m_edit; -    QPushButton *m_select; -    QString m_url; +    TQPushButton *m_select; +    TQString m_url;      Mode m_mode;  #endif  }; diff --git a/lib/widgets/propeditor/pyesnobutton.cpp b/lib/widgets/propeditor/pyesnobutton.cpp index 763ac630..308570be 100644 --- a/lib/widgets/propeditor/pyesnobutton.cpp +++ b/lib/widgets/propeditor/pyesnobutton.cpp @@ -19,9 +19,9 @@   ***************************************************************************/  #include "pyesnobutton.h" -#include <qlayout.h> -#include <qpainter.h> -#include <qpushbutton.h> +#include <tqlayout.h> +#include <tqpainter.h> +#include <tqpushbutton.h>  #ifndef PURE_QT  #include <klocale.h> @@ -31,34 +31,34 @@  namespace PropertyLib{ -PYesNoButton::PYesNoButton(MultiProperty* property, QWidget* parent, const char* name) +PYesNoButton::PYesNoButton(MultiProperty* property, TQWidget* parent, const char* name)      :PropertyWidget(property, parent, name)  { -    QHBoxLayout *l = new QHBoxLayout(this, 0, 0); -    m_edit = new QPushButton(this); +    TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0); +    m_edit = new TQPushButton(this);      m_edit->setToggleButton(true); -    m_edit->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding); +    m_edit->setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);      l->addWidget(m_edit); -    connect(m_edit, SIGNAL(toggled(bool)), this, SLOT(updateProperty(bool))); +    connect(m_edit, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(updateProperty(bool)));  } -QVariant PYesNoButton::value() const +TQVariant PYesNoButton::value() const  { -    return QVariant(m_edit->isOn()); +    return TQVariant(m_edit->isOn());  } -void PYesNoButton::drawViewer(QPainter* p, const QColorGroup& cg, const QRect& r, const QVariant& value) +void PYesNoButton::drawViewer(TQPainter* p, const TQColorGroup& cg, const TQRect& r, const TQVariant& value)  {      PropertyWidget::drawViewer(p, cg, r, value.toBool() ? i18n("Yes") : i18n("No"));  } -void PYesNoButton::setValue(const QVariant& value, bool emitChange) +void PYesNoButton::setValue(const TQVariant& value, bool emitChange)  { -    disconnect(m_edit, SIGNAL(toggled(bool)), this, SLOT(updateProperty(bool))); +    disconnect(m_edit, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(updateProperty(bool)));      m_edit->setDown(value.toBool());      value.toBool() ? m_edit->setText(i18n("Yes")) : m_edit->setText(i18n("No")); -    connect(m_edit, SIGNAL(toggled(bool)), this, SLOT(updateProperty(bool))); +    connect(m_edit, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(updateProperty(bool)));      if (emitChange)          emit propertyChanged(m_property, value);  } diff --git a/lib/widgets/propeditor/pyesnobutton.h b/lib/widgets/propeditor/pyesnobutton.h index 3f4cabc4..9e5af75b 100644 --- a/lib/widgets/propeditor/pyesnobutton.h +++ b/lib/widgets/propeditor/pyesnobutton.h @@ -33,17 +33,17 @@ class PYesNoButton : public PropertyWidget  {      Q_OBJECT  public: -    PYesNoButton(MultiProperty* property, QWidget* parent = 0, const char* name = 0); +    PYesNoButton(MultiProperty* property, TQWidget* parent = 0, const char* name = 0); -    virtual QVariant value() const; -    virtual void drawViewer(QPainter* p, const QColorGroup& cg, const QRect& r, const QVariant& value); -    virtual void setValue(const QVariant& value, bool emitChange); +    virtual TQVariant value() const; +    virtual void drawViewer(TQPainter* p, const TQColorGroup& cg, const TQRect& r, const TQVariant& value); +    virtual void setValue(const TQVariant& value, bool emitChange);  protected slots:      void updateProperty(bool toggled);  private: -    QPushButton *m_edit; +    TQPushButton *m_edit;  };  } diff --git a/lib/widgets/propeditor/qeditlistbox.cpp b/lib/widgets/propeditor/qeditlistbox.cpp index 4de4e567..e1b09e4e 100644 --- a/lib/widgets/propeditor/qeditlistbox.cpp +++ b/lib/widgets/propeditor/qeditlistbox.cpp @@ -23,15 +23,15 @@  #include <klineedit.h> -#include <qpushbutton.h> -#include <qlayout.h> -#include <qgroupbox.h> -#include <qlistbox.h> -#include <qwhatsthis.h> -#include <qlabel.h> -#include <qcombobox.h> -#include <qapplication.h> -#include <qstringlist.h> +#include <tqpushbutton.h> +#include <tqlayout.h> +#include <tqgroupbox.h> +#include <tqlistbox.h> +#include <tqwhatsthis.h> +#include <tqlabel.h> +#include <tqcombobox.h> +#include <tqapplication.h> +#include <tqstringlist.h>  #include <assert.h> @@ -46,24 +46,24 @@ public:      int buttons;  }; -QEditListBox::QEditListBox(QWidget *parent, const char *name, +QEditListBox::QEditListBox(TQWidget *parent, const char *name,  			   bool checkAtEntering, int buttons ) -    :QGroupBox(parent, name ) +    :TQGroupBox(parent, name )  {      init( checkAtEntering, buttons );  } -QEditListBox::QEditListBox(const QString& title, QWidget *parent, +QEditListBox::QEditListBox(const TQString& title, TQWidget *parent,  			   const char *name, bool checkAtEntering, int buttons) -    :QGroupBox(title, parent, name ) +    :TQGroupBox(title, parent, name )  {      init( checkAtEntering, buttons );  } -QEditListBox::QEditListBox(const QString& title, const CustomEditor& custom, -                           QWidget *parent, const char *name, +QEditListBox::QEditListBox(const TQString& title, const CustomEditor& custom, +                           TQWidget *parent, const char *name,                             bool checkAtEntering, int buttons) -    :QGroupBox(title, parent, name ) +    :TQGroupBox(title, parent, name )  {      m_lineEdit = custom.lineEdit();      init( checkAtEntering, buttons, custom.representationWidget() ); @@ -76,7 +76,7 @@ QEditListBox::~QEditListBox()  }  void QEditListBox::init( bool checkAtEntering, int buttons, -                         QWidget *representationWidget ) +                         TQWidget *representationWidget )  {      d=new QEditListBoxPrivate;      d->m_checkAtEntering=checkAtEntering; @@ -92,11 +92,11 @@ void QEditListBox::init( bool checkAtEntering, int buttons,      servNewButton = servRemoveButton = servUpButton = servDownButton = 0L; -    setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding, -                              QSizePolicy::MinimumExpanding)); +    setSizePolicy(TQSizePolicy(TQSizePolicy::MinimumExpanding, +                              TQSizePolicy::MinimumExpanding)); -    QWidget * gb = this; -    QGridLayout * grid = new QGridLayout(gb, 7 - lostButtons, 2, +    TQWidget * gb = this; +    TQGridLayout * grid = new TQGridLayout(gb, 7 - lostButtons, 2,                                           MarginSize,                                           SpazingSize);      grid->addRowSpacing(0, fontMetrics().lineSpacing()); @@ -106,56 +106,56 @@ void QEditListBox::init( bool checkAtEntering, int buttons,      grid->setMargin(15);      if ( representationWidget ) -        representationWidget->reparent( gb, QPoint(0,0) ); +        representationWidget->reparent( gb, TQPoint(0,0) );      else          m_lineEdit=new KLineEdit(gb); -    m_listBox = new QListBox(gb); +    m_listBox = new TQListBox(gb); -    QWidget *editingWidget = representationWidget ? +    TQWidget *editingWidget = representationWidget ?                               representationWidget : m_lineEdit;      grid->addMultiCellWidget(editingWidget,1,1,0,1);      grid->addMultiCellWidget(m_listBox, 2, 6 - lostButtons, 0, 0);      int row = 2;      if ( buttons & Add ) { -        servNewButton = new QPushButton(i18n("&Add"), gb); +        servNewButton = new TQPushButton(i18n("&Add"), gb);          servNewButton->setEnabled(false); -        connect(servNewButton, SIGNAL(clicked()), SLOT(addItem())); +        connect(servNewButton, TQT_SIGNAL(clicked()), TQT_SLOT(addItem()));          grid->addWidget(servNewButton, row++, 1);      }      if ( buttons & Remove ) { -        servRemoveButton = new QPushButton(i18n("&Remove"), gb); +        servRemoveButton = new TQPushButton(i18n("&Remove"), gb);          servRemoveButton->setEnabled(false); -        connect(servRemoveButton, SIGNAL(clicked()), SLOT(removeItem())); +        connect(servRemoveButton, TQT_SIGNAL(clicked()), TQT_SLOT(removeItem()));          grid->addWidget(servRemoveButton, row++, 1);      }      if ( buttons & UpDown ) { -        servUpButton = new QPushButton(i18n("Move &Up"), gb); +        servUpButton = new TQPushButton(i18n("Move &Up"), gb);          servUpButton->setEnabled(false); -        connect(servUpButton, SIGNAL(clicked()), SLOT(moveItemUp())); +        connect(servUpButton, TQT_SIGNAL(clicked()), TQT_SLOT(moveItemUp())); -        servDownButton = new QPushButton(i18n("Move &Down"), gb); +        servDownButton = new TQPushButton(i18n("Move &Down"), gb);          servDownButton->setEnabled(false); -        connect(servDownButton, SIGNAL(clicked()), SLOT(moveItemDown())); +        connect(servDownButton, TQT_SIGNAL(clicked()), TQT_SLOT(moveItemDown()));          grid->addWidget(servUpButton, row++, 1);          grid->addWidget(servDownButton, row++, 1);      } -    connect(m_lineEdit,SIGNAL(textChanged(const QString&)),this,SLOT(typedSomething(const QString&))); +    connect(m_lineEdit,TQT_SIGNAL(textChanged(const TQString&)),this,TQT_SLOT(typedSomething(const TQString&))); -    connect(m_lineEdit,SIGNAL(returnPressed()),this,SLOT(addItem())); -    connect(m_listBox, SIGNAL(highlighted(int)), SLOT(enableMoveButtons(int))); +    connect(m_lineEdit,TQT_SIGNAL(returnPressed()),this,TQT_SLOT(addItem())); +    connect(m_listBox, TQT_SIGNAL(highlighted(int)), TQT_SLOT(enableMoveButtons(int)));      // maybe supplied lineedit has some text already      typedSomething( m_lineEdit->text() );  } -void QEditListBox::typedSomething(const QString& text) +void QEditListBox::typedSomething(const TQString& text)  {      if(currentItem() >= 0) {          if(currentText() != m_lineEdit->text()) @@ -206,7 +206,7 @@ void QEditListBox::moveItemUp()          return;      } -    QListBoxItem *selItem = m_listBox->item(selIndex); +    TQListBoxItem *selItem = m_listBox->item(selIndex);      m_listBox->takeItem(selItem);      m_listBox->insertItem(selItem, selIndex-1);      m_listBox->setCurrentItem(selIndex - 1); @@ -229,7 +229,7 @@ void QEditListBox::moveItemDown()          return;      } -    QListBoxItem *selItem = m_listBox->item(selIndex); +    TQListBoxItem *selItem = m_listBox->item(selIndex);      m_listBox->takeItem(selItem);      m_listBox->insertItem(selItem, selIndex+1);      m_listBox->setCurrentItem(selIndex + 1); @@ -245,7 +245,7 @@ void QEditListBox::addItem()      if ( !servNewButton || !servNewButton->isEnabled() )          return; -    const QString& currentTextLE=m_lineEdit->text(); +    const TQString& currentTextLE=m_lineEdit->text();      bool alreadyInList(false);      //if we didn't check for dupes at the inserting we have to do it now      if (!d->m_checkAtEntering) @@ -294,7 +294,7 @@ void QEditListBox::removeItem()      if ( selected >= 0 )      { -	QString removedText = m_listBox->currentText(); +	TQString removedText = m_listBox->currentText();          m_listBox->removeItem( selected );          if ( count() > 0 ) @@ -351,17 +351,17 @@ void QEditListBox::clear()      emit changed();  } -void QEditListBox::insertStringList(const QStringList& list, int index) +void QEditListBox::insertStringList(const TQStringList& list, int index)  {      m_listBox->insertStringList(list,index);  } -void QEditListBox::insertStrList(const QStrList* list, int index) +void QEditListBox::insertStrList(const TQStrList* list, int index)  {      m_listBox->insertStrList(list,index);  } -void QEditListBox::insertStrList(const QStrList& list, int index) +void QEditListBox::insertStrList(const TQStrList& list, int index)  {      m_listBox->insertStrList(list,index);  } @@ -371,16 +371,16 @@ void QEditListBox::insertStrList(const char ** list, int numStrings, int index)      m_listBox->insertStrList(list,numStrings,index);  } -QStringList QEditListBox::items() const +TQStringList QEditListBox::items() const  { -    QStringList list; +    TQStringList list;      for ( uint i = 0; i < m_listBox->count(); i++ )  	list.append( m_listBox->text( i ));      return list;  } -void QEditListBox::setItems(const QStringList& items) +void QEditListBox::setItems(const TQStringList& items)  {    m_listBox->clear();    m_listBox->insertStringList(items, 0); @@ -393,7 +393,7 @@ void QEditListBox::virtual_hook( int, void* )  ///////////////////////////////////////////////////////////////////  /////////////////////////////////////////////////////////////////// -QEditListBox::CustomEditor::CustomEditor( QComboBox *combo ) +QEditListBox::CustomEditor::CustomEditor( TQComboBox *combo )  {      m_representationWidget = combo;      m_lineEdit = dynamic_cast<KLineEdit*>( combo->lineEdit() ); diff --git a/lib/widgets/propeditor/qeditlistbox.h b/lib/widgets/propeditor/qeditlistbox.h index 93bf8bf3..245f8b57 100644 --- a/lib/widgets/propeditor/qeditlistbox.h +++ b/lib/widgets/propeditor/qeditlistbox.h @@ -20,8 +20,8 @@  #ifndef QEDITLISTBOX_H  #define QEDITLISTBOX_H -#include <qgroupbox.h> -#include <qlistbox.h> +#include <tqgroupbox.h> +#include <tqlistbox.h>  class KLineEdit;  class QComboBox; @@ -46,7 +46,7 @@ class QEditListBox : public QGroupBox  {     Q_OBJECT -   Q_PROPERTY( QStringList items READ items WRITE setItems ) +   Q_PROPERTY( TQStringList items READ items WRITE setItems )  public:      // @since 3.1 @@ -56,19 +56,19 @@ public:          CustomEditor()              : m_representationWidget( 0L ),                m_lineEdit( 0L ) {} -        CustomEditor( QWidget *repWidget, KLineEdit *edit ) +        CustomEditor( TQWidget *repWidget, KLineEdit *edit )              : m_representationWidget( repWidget ),                m_lineEdit( edit ) {} -        CustomEditor( QComboBox *combo ); +        CustomEditor( TQComboBox *combo ); -        void setRepresentationWidget( QWidget *repWidget ) { +        void setRepresentationWidget( TQWidget *repWidget ) {              m_representationWidget = repWidget;          }          void setLineEdit( KLineEdit *edit ) {              m_lineEdit = edit;          } -        virtual QWidget   *representationWidget() const { +        virtual TQWidget   *representationWidget() const {              return m_representationWidget;          }          virtual KLineEdit *lineEdit() const { @@ -76,7 +76,7 @@ public:          }      protected: -        QWidget *m_representationWidget; +        TQWidget *m_representationWidget;          KLineEdit *m_lineEdit;      }; @@ -100,7 +100,7 @@ public:         * it will be checked if you press the Add-button. It is not         * possible to enter items twice into the listbox.         */ -      QEditListBox(QWidget *parent = 0, const char *name = 0, +      QEditListBox(TQWidget *parent = 0, const char *name = 0,  		   bool checkAtEntering=false, int buttons = All );        /**         * Create an editable listbox. @@ -108,33 +108,33 @@ public:         * The same as the other constructor, additionally it takes         * @p title, which will be the title of the frame around the listbox.         */ -      QEditListBox(const QString& title, QWidget *parent = 0, +      QEditListBox(const TQString& title, TQWidget *parent = 0,  		   const char *name = 0, bool checkAtEntering=false,  		   int buttons = All );        /**         * Another constructor, which allows to use a custom editing widget -       * instead of the standard QLineEdit widget. E.g. you can use a -       * KURLRequester or a QComboBox as input widget. The custom +       * instead of the standard TQLineEdit widget. E.g. you can use a +       * KURLRequester or a TQComboBox as input widget. The custom         * editor must consist of a lineedit and optionally another widget that -       * is used as representation. A QComboBox or a KURLRequester have a -       * QLineEdit as child-widget for example, so the QComboBox is used as +       * is used as representation. A TQComboBox or a KURLRequester have a +       * TQLineEdit as child-widget for example, so the TQComboBox is used as         * the representation widget.         *         * @see KURLRequester::customEditor()         * @since 3.1         */ -      QEditListBox( const QString& title, +      QEditListBox( const TQString& title,                      const CustomEditor &customEditor, -                    QWidget *parent = 0, const char *name = 0, +                    TQWidget *parent = 0, const char *name = 0,                      bool checkAtEntering = false, int buttons = All );        virtual ~QEditListBox();        /** -       * Return a pointer to the embedded QListBox. +       * Return a pointer to the embedded TQListBox.         */ -      QListBox* listBox() const     { return m_listBox; } +      TQListBox* listBox() const     { return m_listBox; }        /**         * Return a pointer to the embedded KLineEdit.         */ @@ -142,72 +142,72 @@ public:        /**         * Return a pointer to the Add button         */ -      QPushButton* addButton() const     { return servNewButton; } +      TQPushButton* addButton() const     { return servNewButton; }        /**         * Return a pointer to the Remove button         */ -      QPushButton* removeButton() const     { return servRemoveButton; } +      TQPushButton* removeButton() const     { return servRemoveButton; }        /**         * Return a pointer to the Up button         */ -      QPushButton* upButton() const     { return servUpButton; } +      TQPushButton* upButton() const     { return servUpButton; }        /**         * Return a pointer to the Down button         */ -      QPushButton* downButton() const     { return servDownButton; } +      TQPushButton* downButton() const     { return servDownButton; }        /** -       * See QListBox::count() +       * See TQListBox::count()         */        int count() const   { return int(m_listBox->count()); }        /** -       * See QListBox::insertStringList() +       * See TQListBox::insertStringList()         */ -      void insertStringList(const QStringList& list, int index=-1); +      void insertStringList(const TQStringList& list, int index=-1);        /** -       * See QListBox::insertStringList() +       * See TQListBox::insertStringList()         */ -      void insertStrList(const QStrList* list, int index=-1); +      void insertStrList(const TQStrList* list, int index=-1);        /** -       * See QListBox::insertStrList() +       * See TQListBox::insertStrList()         */ -      void insertStrList(const QStrList& list, int index=-1); +      void insertStrList(const TQStrList& list, int index=-1);        /** -       * See QListBox::insertStrList() +       * See TQListBox::insertStrList()         */        void insertStrList(const char ** list, int numStrings=-1, int index=-1);        /** -       * See QListBox::insertItem() +       * See TQListBox::insertItem()         */ -      void insertItem(const QString& text, int index=-1) {m_listBox->insertItem(text,index);} +      void insertItem(const TQString& text, int index=-1) {m_listBox->insertItem(text,index);}        /**         * Clears both the listbox and the line edit.         */        void clear();        /** -       * See QListBox::text() +       * See TQListBox::text()         */ -      QString text(int index) const { return m_listBox->text(index); } +      TQString text(int index) const { return m_listBox->text(index); }        /** -       * See QListBox::currentItem() +       * See TQListBox::currentItem()         */        int currentItem() const;        /** -       * See QListBox::currentText() +       * See TQListBox::currentText()         */ -      QString currentText() const  { return m_listBox->currentText(); } +      TQString currentText() const  { return m_listBox->currentText(); }        /**         * @returns a stringlist of all items in the listbox         */ -      QStringList items() const; +      TQStringList items() const;        /**         * Clears the listbox and sets the contents to @p items         *         * @since 3.4         */ -      void setItems(const QStringList& items); +      void setItems(const TQStringList& items);     signals:        void changed(); @@ -217,14 +217,14 @@ public:         * the parameter is the added string.         * @since 3.2         */ -      void added( const QString & text ); +      void added( const TQString & text );        /**         * This signal is emitted when the user removes a string from the list,         * the parameter is the removed string.         * @since 3.2         */ -      void removed( const QString & text ); +      void removed( const TQString & text );     protected slots:        //the names should be self-explaining @@ -233,17 +233,17 @@ public:        void addItem();        void removeItem();        void enableMoveButtons(int index); -      void typedSomething(const QString& text); +      void typedSomething(const TQString& text);     private: -      QListBox *m_listBox; -      QPushButton *servUpButton, *servDownButton; -      QPushButton *servNewButton, *servRemoveButton; +      TQListBox *m_listBox; +      TQPushButton *servUpButton, *servDownButton; +      TQPushButton *servNewButton, *servRemoveButton;        KLineEdit *m_lineEdit;        //this is called in both ctors, to avoid code duplication        void init( bool checkAtEntering, int buttons, -                 QWidget *representationWidget = 0L ); +                 TQWidget *representationWidget = 0L );     protected:        virtual void virtual_hook( int id, void* data ); diff --git a/lib/widgets/propeditor/qfloatinput.cpp b/lib/widgets/propeditor/qfloatinput.cpp index f1bde4cd..a8522105 100644 --- a/lib/widgets/propeditor/qfloatinput.cpp +++ b/lib/widgets/propeditor/qfloatinput.cpp @@ -23,23 +23,23 @@  #include <math.h>  QFloatInput::QFloatInput( int min, int max, float step, int digits, -                            QWidget *parent, const char *name ) -    : QSpinBox( (int) (min*pow(digits,10)), +                            TQWidget *parent, const char *name ) +    : TQSpinBox( (int) (min*pow(digits,10)),                  (int) (max*pow(digits,10)),                  (int) (step*pow(digits,10)), parent, name ),        m_digits( digits )  {      setValue( (int) (min*pow(digits,10)) );      delete validator(); -    QDoubleValidator* validator = -        new QDoubleValidator( min,  max, m_digits, this ); +    TQDoubleValidator* validator = +        new TQDoubleValidator( min,  max, m_digits, this );      setValidator( validator );  } -QString QFloatInput::mapValueToText( int value ) +TQString QFloatInput::mapValueToText( int value )  { -    QString format = QString("%.%1f").arg( m_digits ); -    return QString().sprintf(format.latin1(), +    TQString format = TQString("%.%1f").arg( m_digits ); +    return TQString().sprintf(format.latin1(),                               (value/(float)pow(m_digits,10)) );  } diff --git a/lib/widgets/propeditor/qfloatinput.h b/lib/widgets/propeditor/qfloatinput.h index 5f5adbd4..4bbe63e6 100644 --- a/lib/widgets/propeditor/qfloatinput.h +++ b/lib/widgets/propeditor/qfloatinput.h @@ -21,17 +21,17 @@  #ifndef QFLOATINPUT_H  #define QFLOATINPUT_H -#include <qapplication.h> -#include <qspinbox.h> -#include <qvalidator.h> +#include <tqapplication.h> +#include <tqspinbox.h> +#include <tqvalidator.h>  class QFloatInput : public QSpinBox  {  public:      QFloatInput( int min, int max, float step, int digits, -                  QWidget *parent, const char *name = 0 ); +                  TQWidget *parent, const char *name = 0 ); -    virtual QString  mapValueToText( int value ); +    virtual TQString  mapValueToText( int value );      virtual int mapTextToValue( bool* ok ); diff --git a/lib/widgets/propeditor/test.cpp b/lib/widgets/propeditor/test.cpp index 0063e2d6..82665f98 100644 --- a/lib/widgets/propeditor/test.cpp +++ b/lib/widgets/propeditor/test.cpp @@ -17,7 +17,7 @@   *   Free Software Foundation, Inc.,                                       *   *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.             *   ***************************************************************************/ -#include <qapplication.h> +#include <tqapplication.h>  #include "propertyeditor.h"  #include "propertylist.h" @@ -27,7 +27,7 @@ using namespace PropertyLib;  int main( int argc, char **argv )  { -    QApplication app( argc, argv ); +    TQApplication app( argc, argv );      PropertyEditor *editor = new PropertyEditor( 0 ); @@ -44,10 +44,10 @@ int main( int argc, char **argv )                        "sample pixmap description" ) );      currentList->addProperty(          new Property( Property::Rect, "Rectangle", -                      "sample rectangle", QRect( 10, 11, 30, 40 ) ) ); +                      "sample rectangle", TQRect( 10, 11, 30, 40 ) ) );      currentList->addProperty(          new Property( Property::Point, "Point", -                      "sample point", QPoint( 20, 30 ) ) ); +                      "sample point", TQPoint( 20, 30 ) ) );      currentList->addProperty(          new Property( Property::Boolean, "Boolean",                        "sample bool", false ) ); @@ -59,7 +59,7 @@ int main( int argc, char **argv )          new Property( Property::Double, "Double",                        "sample double", 7.0 ) ); -    QStringList things; +    TQStringList things;      things += "Thing 1";      things += "Thing 2";  | 
