summaryrefslogtreecommitdiffstats
path: root/lib/koproperty/editors
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
commitf008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch)
tree8e9244c4d4957c36be81e15b566b4aa5ea26c982 /lib/koproperty/editors
parent1210f27b660efb7b37ff43ec68763e85a403471f (diff)
downloadkoffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz
koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'lib/koproperty/editors')
-rw-r--r--lib/koproperty/editors/booledit.cpp86
-rw-r--r--lib/koproperty/editors/booledit.h32
-rw-r--r--lib/koproperty/editors/coloredit.cpp36
-rw-r--r--lib/koproperty/editors/coloredit.h11
-rw-r--r--lib/koproperty/editors/combobox.cpp62
-rw-r--r--lib/koproperty/editors/combobox.h11
-rw-r--r--lib/koproperty/editors/cursoredit.cpp102
-rw-r--r--lib/koproperty/editors/cursoredit.h13
-rw-r--r--lib/koproperty/editors/dateedit.cpp34
-rw-r--r--lib/koproperty/editors/dateedit.h17
-rw-r--r--lib/koproperty/editors/datetimeedit.cpp34
-rw-r--r--lib/koproperty/editors/datetimeedit.h17
-rw-r--r--lib/koproperty/editors/dummywidget.cpp14
-rw-r--r--lib/koproperty/editors/dummywidget.h13
-rw-r--r--lib/koproperty/editors/fontedit.cpp78
-rw-r--r--lib/koproperty/editors/fontedit.h13
-rw-r--r--lib/koproperty/editors/linestyledit.cpp54
-rw-r--r--lib/koproperty/editors/linestyleedit.h13
-rw-r--r--lib/koproperty/editors/pixmapedit.cpp130
-rw-r--r--lib/koproperty/editors/pixmapedit.h33
-rw-r--r--lib/koproperty/editors/pointedit.cpp40
-rw-r--r--lib/koproperty/editors/pointedit.h13
-rw-r--r--lib/koproperty/editors/rectedit.cpp44
-rw-r--r--lib/koproperty/editors/rectedit.h13
-rw-r--r--lib/koproperty/editors/sizeedit.cpp38
-rw-r--r--lib/koproperty/editors/sizeedit.h13
-rw-r--r--lib/koproperty/editors/sizepolicyedit.cpp78
-rw-r--r--lib/koproperty/editors/sizepolicyedit.h23
-rw-r--r--lib/koproperty/editors/spinbox.cpp138
-rw-r--r--lib/koproperty/editors/spinbox.h36
-rw-r--r--lib/koproperty/editors/stringedit.cpp24
-rw-r--r--lib/koproperty/editors/stringedit.h13
-rw-r--r--lib/koproperty/editors/stringlistedit.cpp42
-rw-r--r--lib/koproperty/editors/stringlistedit.h21
-rw-r--r--lib/koproperty/editors/symbolcombo.cpp52
-rw-r--r--lib/koproperty/editors/symbolcombo.h19
-rw-r--r--lib/koproperty/editors/timeedit.cpp36
-rw-r--r--lib/koproperty/editors/timeedit.h15
-rw-r--r--lib/koproperty/editors/urledit.cpp22
-rw-r--r--lib/koproperty/editors/urledit.h9
40 files changed, 756 insertions, 736 deletions
diff --git a/lib/koproperty/editors/booledit.cpp b/lib/koproperty/editors/booledit.cpp
index 67fb82ec..5c347c02 100644
--- a/lib/koproperty/editors/booledit.cpp
+++ b/lib/koproperty/editors/booledit.cpp
@@ -27,48 +27,48 @@
#include <kcombobox.h>
#include <kdebug.h>
-#include <qtoolbutton.h>
-#include <qpainter.h>
-#include <qvariant.h>
-#include <qlayout.h>
-#include <qbitmap.h>
+#include <tqtoolbutton.h>
+#include <tqpainter.h>
+#include <tqvariant.h>
+#include <tqlayout.h>
+#include <tqbitmap.h>
using namespace KoProperty;
-BoolEdit::BoolEdit(Property *property, QWidget *parent, const char *name)
- : Widget(property, parent, name)
+BoolEdit::BoolEdit(Property *property, TQWidget *tqparent, const char *name)
+ : Widget(property, tqparent, name)
, m_yesIcon( SmallIcon("button_ok") )
, m_noIcon( SmallIcon("button_no") )
{
- m_toggle = new QToolButton(this);
+ m_toggle = new TQToolButton(this);
m_toggle->setToggleButton( true );
- m_toggle->setFocusPolicy(QWidget::WheelFocus);
+ m_toggle->setFocusPolicy(TQ_WheelFocus);
m_toggle->setUsesTextLabel(true);
- m_toggle->setTextPosition(QToolButton::Right);
- m_toggle->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
- //we're not using layout to because of problems with button size
+ m_toggle->setTextPosition(TQToolButton::Right);
+ m_toggle->tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed);
+ //we're not using tqlayout to because of problems with button size
m_toggle->move(0, 0);
m_toggle->resize(width(), height());
setFocusWidget(m_toggle);
- connect(m_toggle, SIGNAL(stateChanged(int)), this, SLOT(slotValueChanged(int)));
+ connect(m_toggle, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(slotValueChanged(int)));
}
BoolEdit::~BoolEdit()
{
}
-QVariant
+TQVariant
BoolEdit::value() const
{
- return QVariant(m_toggle->isOn(), 4);
+ return TQVariant(m_toggle->isOn(), 4);
}
void
-BoolEdit::setValue(const QVariant &value, bool emitChange)
+BoolEdit::setValue(const TQVariant &value, bool emitChange)
{
m_toggle->blockSignals(true);
m_toggle->setOn(value.toBool());
- setState( value.toBool() ? QButton::On : QButton::Off );
+ setState( value.toBool() ? TQButton::On : TQButton::Off );
m_toggle->blockSignals(false);
if (emitChange)
emit valueChanged(this);
@@ -81,28 +81,28 @@ BoolEdit::slotValueChanged(int state)
emit valueChanged(this);
}
-static void drawViewerInternal(QPainter *p, const QRect &r, const QVariant &value,
- const QPixmap& yesIcon, const QPixmap& noIcon, const QString& nullText)
+static void drawViewerInternal(TQPainter *p, const TQRect &r, const TQVariant &value,
+ const TQPixmap& yesIcon, const TQPixmap& noIcon, const TQString& nullText)
{
p->eraseRect(r);
- QRect r2(r);
+ TQRect r2(r);
r2.moveLeft(KIcon::SizeSmall + 6);
if(value.isNull() && !nullText.isEmpty()) {
- p->drawText(r2, Qt::AlignVCenter | Qt::AlignLeft, nullText);
+ p->drawText(r2, TQt::AlignVCenter | TQt::AlignLeft, nullText);
}
else if(value.toBool()) {
p->drawPixmap(3, (r.height()-1-KIcon::SizeSmall)/2, yesIcon);
- p->drawText(r2, Qt::AlignVCenter | Qt::AlignLeft, i18n("Yes"));
+ p->drawText(r2, TQt::AlignVCenter | TQt::AlignLeft, i18n("Yes"));
}
else {
p->drawPixmap(3, (r.height()-1-KIcon::SizeSmall)/2, noIcon);
- p->drawText(r2, Qt::AlignVCenter | Qt::AlignLeft, i18n("No"));
+ p->drawText(r2, TQt::AlignVCenter | TQt::AlignLeft, i18n("No"));
}
}
void
-BoolEdit::drawViewer(QPainter *p, const QColorGroup &cg, const QRect &r, const QVariant &value)
+BoolEdit::drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value)
{
Q_UNUSED(cg);
drawViewerInternal(p, r, value, m_yesIcon, m_noIcon, "");
@@ -111,29 +111,29 @@ BoolEdit::drawViewer(QPainter *p, const QColorGroup &cg, const QRect &r, const Q
void
BoolEdit::setState(int state)
{
- if(QButton::On == state) {
- m_toggle->setIconSet(QIconSet(m_yesIcon));
+ if(TQButton::On == state) {
+ m_toggle->setIconSet(TQIconSet(m_yesIcon));
m_toggle->setTextLabel(i18n("Yes"));
}
- else if (QButton::Off == state) {
- m_toggle->setIconSet(QIconSet(m_noIcon));
+ else if (TQButton::Off == state) {
+ m_toggle->setIconSet(TQIconSet(m_noIcon));
m_toggle->setTextLabel(i18n("No"));
}
}
void
-BoolEdit::resizeEvent(QResizeEvent *ev)
+BoolEdit::resizeEvent(TQResizeEvent *ev)
{
m_toggle->resize(ev->size());
}
bool
-BoolEdit::eventFilter(QObject* watched, QEvent* e)
+BoolEdit::eventFilter(TQObject* watched, TQEvent* e)
{
- if(e->type() == QEvent::KeyPress) {
- QKeyEvent* ev = static_cast<QKeyEvent*>(e);
+ if(e->type() == TQEvent::KeyPress) {
+ TQKeyEvent* ev = TQT_TQKEYEVENT(e);
const int k = ev->key();
- if(k == Qt::Key_Space || k == Qt::Key_Enter || k == Qt::Key_Return) {
+ if(k == TQt::Key_Space || k == TQt::Key_Enter || k == TQt::Key_Return) {
if (m_toggle)
m_toggle->toggle();
return true;
@@ -150,16 +150,16 @@ BoolEdit::setReadOnlyInternal(bool readOnly)
//--------------------------------------------------
-ThreeStateBoolEdit::ThreeStateBoolEdit(Property *property, QWidget *parent, const char *name)
- : ComboBox(property, parent, name)
+ThreeStateBoolEdit::ThreeStateBoolEdit(Property *property, TQWidget *tqparent, const char *name)
+ : ComboBox(property, tqparent, name)
, m_yesIcon( SmallIcon("button_ok") )
, m_noIcon( SmallIcon("button_no") )
{
m_edit->insertItem( m_yesIcon, i18n("Yes") );
m_edit->insertItem( m_noIcon, i18n("No") );
- QVariant thirdState = property ? property->option("3rdState") : QVariant();
- QPixmap nullIcon( m_yesIcon.size() ); //transparent pixmap of appropriate size
- nullIcon.setMask(QBitmap(m_yesIcon.size(), true));
+ TQVariant thirdState = property ? property->option("3rdState") : TQVariant();
+ TQPixmap nullIcon( m_yesIcon.size() ); //transparent pixmap of appropriate size
+ nullIcon.setMask(TQBitmap(m_yesIcon.size(), true));
m_edit->insertItem( nullIcon, thirdState.toString().isEmpty() ? i18n("None") : thirdState.toString() );
}
@@ -167,15 +167,15 @@ ThreeStateBoolEdit::~ThreeStateBoolEdit()
{
}
-QVariant
+TQVariant
ThreeStateBoolEdit::value() const
{
// list items: true, false, NULL
const int idx = m_edit->currentItem();
if (idx==0)
- return QVariant(true, 1);
+ return TQVariant(true, 1);
else
- return idx==1 ? QVariant(false) : QVariant();
+ return idx==1 ? TQVariant(false) : TQVariant();
}
void
@@ -189,7 +189,7 @@ ThreeStateBoolEdit::setProperty(Property *prop)
}
void
-ThreeStateBoolEdit::setValue(const QVariant &value, bool emitChange)
+ThreeStateBoolEdit::setValue(const TQVariant &value, bool emitChange)
{
if (!m_setValueEnabled)
return;
@@ -204,7 +204,7 @@ ThreeStateBoolEdit::setValue(const QVariant &value, bool emitChange)
}
void
-ThreeStateBoolEdit::drawViewer(QPainter *p, const QColorGroup &cg, const QRect &r, const QVariant &value)
+ThreeStateBoolEdit::drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value)
{
Q_UNUSED(cg);
drawViewerInternal(p, r, value, m_yesIcon, m_noIcon, m_edit->text(2));
diff --git a/lib/koproperty/editors/booledit.h b/lib/koproperty/editors/booledit.h
index f9ab371f..0cfbf48e 100644
--- a/lib/koproperty/editors/booledit.h
+++ b/lib/koproperty/editors/booledit.h
@@ -24,23 +24,24 @@
#include "../widget.h"
#include "combobox.h"
-#include <qpixmap.h>
+#include <tqpixmap.h>
-class QToolButton;
+class TQToolButton;
namespace KoProperty {
class KOPROPERTY_EXPORT BoolEdit : public Widget
{
Q_OBJECT
+ TQ_OBJECT
public:
- BoolEdit(Property *property, QWidget *parent=0, const char *name=0);
+ BoolEdit(Property *property, TQWidget *tqparent=0, const char *name=0);
virtual ~BoolEdit();
- virtual QVariant value() const;
- virtual void setValue(const QVariant &value, bool emitChange=true);
- virtual void drawViewer(QPainter *p, const QColorGroup &cg, const QRect &r, const QVariant &value);
+ virtual TQVariant value() const;
+ virtual void setValue(const TQVariant &value, bool emitChange=true);
+ virtual void drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value);
protected slots:
void slotValueChanged(int state);
@@ -48,28 +49,29 @@ class KOPROPERTY_EXPORT BoolEdit : public Widget
protected:
virtual void setReadOnlyInternal(bool readOnly);
void setState(int state);
- virtual void resizeEvent(QResizeEvent *ev);
- virtual bool eventFilter(QObject* watched, QEvent* e);
+ virtual void resizeEvent(TQResizeEvent *ev);
+ virtual bool eventFilter(TQObject* watched, TQEvent* e);
private:
- QToolButton *m_toggle;
- QPixmap m_yesIcon, m_noIcon; //!< icons for m_toggle
+ TQToolButton *m_toggle;
+ TQPixmap m_yesIcon, m_noIcon; //!< icons for m_toggle
};
class KOPROPERTY_EXPORT ThreeStateBoolEdit : public ComboBox
{
Q_OBJECT
+ TQ_OBJECT
public:
- ThreeStateBoolEdit(Property *property, QWidget *parent=0, const char *name=0);
+ ThreeStateBoolEdit(Property *property, TQWidget *tqparent=0, const char *name=0);
virtual ~ThreeStateBoolEdit();
- virtual QVariant value() const;
- virtual void setValue(const QVariant &value, bool emitChange=true);
+ virtual TQVariant value() const;
+ virtual void setValue(const TQVariant &value, bool emitChange=true);
virtual void setProperty(Property *property);
- virtual void drawViewer(QPainter *p, const QColorGroup &cg, const QRect &r, const QVariant &value);
- QPixmap m_yesIcon, m_noIcon; //!< icons for m_toggle
+ virtual void drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value);
+ TQPixmap m_yesIcon, m_noIcon; //!< icons for m_toggle
};
}
diff --git a/lib/koproperty/editors/coloredit.cpp b/lib/koproperty/editors/coloredit.cpp
index 81897e1d..d8504686 100644
--- a/lib/koproperty/editors/coloredit.cpp
+++ b/lib/koproperty/editors/coloredit.cpp
@@ -20,23 +20,23 @@
#include "coloredit.h"
-#include <qvariant.h>
-#include <qlayout.h>
-#include <qcolor.h>
-#include <qpainter.h>
+#include <tqvariant.h>
+#include <tqlayout.h>
+#include <tqcolor.h>
+#include <tqpainter.h>
#include <kcolorcombo.h>
using namespace KoProperty;
-ColorButton::ColorButton(Property *property, QWidget *parent, const char *name)
- : Widget(property, parent, name)
+ColorButton::ColorButton(Property *property, TQWidget *tqparent, const char *name)
+ : Widget(property, tqparent, name)
{
- QHBoxLayout *l = new QHBoxLayout(this, 0, 0);
+ TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0);
m_edit = new KColorCombo(this);
- m_edit->setFocusPolicy(QWidget::NoFocus);
- connect(m_edit, SIGNAL(activated(int)), this, SLOT(slotValueChanged(int)));
- m_edit->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+ m_edit->setFocusPolicy(TQ_NoFocus);
+ connect(m_edit, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotValueChanged(int)));
+ m_edit->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding);
m_edit->setMinimumHeight(5);
l->addWidget(m_edit);
setFocusWidget(m_edit);
@@ -45,14 +45,14 @@ ColorButton::ColorButton(Property *property, QWidget *parent, const char *name)
ColorButton::~ColorButton()
{}
-QVariant
+TQVariant
ColorButton::value() const
{
return m_edit->color();
}
void
-ColorButton::setValue(const QVariant &value, bool emitChange)
+ColorButton::setValue(const TQVariant &value, bool emitChange)
{
m_edit->blockSignals(true);
m_edit->setColor(value.toColor());
@@ -62,15 +62,15 @@ ColorButton::setValue(const QVariant &value, bool emitChange)
}
void
-ColorButton::drawViewer(QPainter *p, const QColorGroup &, const QRect &r, const QVariant &value)
+ColorButton::drawViewer(TQPainter *p, const TQColorGroup &, const TQRect &r, const TQVariant &value)
{
p->eraseRect(r);
p->setBrush(value.toColor());
- p->setPen(Qt::SolidLine);
- QRect r2(r);
- r2.setTopLeft(r.topLeft() + QPoint(5,5));
- r2.setBottomRight(r.bottomRight() - QPoint(5,5));
+ p->setPen(TQt::SolidLine);
+ TQRect r2(r);
+ r2.setTopLeft(r.topLeft() + TQPoint(5,5));
+ r2.setBottomRight(r.bottomRight() - TQPoint(5,5));
p->drawRect(r2);
}
@@ -82,7 +82,7 @@ ColorButton::slotValueChanged(int)
bool
-ColorButton::eventFilter(QObject* watched, QEvent* e)
+ColorButton::eventFilter(TQObject* watched, TQEvent* e)
{
return Widget::eventFilter(watched, e);
}
diff --git a/lib/koproperty/editors/coloredit.h b/lib/koproperty/editors/coloredit.h
index 339d6239..d869dc00 100644
--- a/lib/koproperty/editors/coloredit.h
+++ b/lib/koproperty/editors/coloredit.h
@@ -30,19 +30,20 @@ namespace KoProperty {
class KOPROPERTY_EXPORT ColorButton : public Widget
{
Q_OBJECT
+ TQ_OBJECT
public:
- ColorButton(Property *property, QWidget *parent=0, const char *name=0);
+ ColorButton(Property *property, TQWidget *tqparent=0, const char *name=0);
virtual ~ColorButton();
- virtual QVariant value() const;
- virtual void setValue(const QVariant &value, bool emitChange=true);
+ virtual TQVariant value() const;
+ virtual void setValue(const TQVariant &value, bool emitChange=true);
- virtual void drawViewer(QPainter *p, const QColorGroup &cg, const QRect &r, const QVariant &value);
+ virtual void drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value);
protected:
virtual void setReadOnlyInternal(bool readOnly);
- virtual bool eventFilter(QObject* watched, QEvent* e);
+ virtual bool eventFilter(TQObject* watched, TQEvent* e);
protected slots:
void slotValueChanged(int index);
diff --git a/lib/koproperty/editors/combobox.cpp b/lib/koproperty/editors/combobox.cpp
index 64563dcb..f1206f2d 100644
--- a/lib/koproperty/editors/combobox.cpp
+++ b/lib/koproperty/editors/combobox.cpp
@@ -19,10 +19,10 @@
*/
#include "combobox.h"
-#include <qlayout.h>
-#include <qmap.h>
-#include <qvariant.h>
-#include <qpainter.h>
+#include <tqlayout.h>
+#include <tqmap.h>
+#include <tqvariant.h>
+#include <tqpainter.h>
#include <kcombobox.h>
#include <kdebug.h>
@@ -31,18 +31,18 @@
using namespace KoProperty;
-ComboBox::ComboBox(Property *property, QWidget *parent, const char *name)
- : Widget(property, parent, name)
+ComboBox::ComboBox(Property *property, TQWidget *tqparent, const char *name)
+ : Widget(property, tqparent, name)
, m_setValueEnabled(true)
{
- QHBoxLayout *l = new QHBoxLayout(this, 0, 0);
+ TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0);
m_edit = new KComboBox(this);
- m_edit->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+ m_edit->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding);
m_edit->setMinimumHeight(5);
l->addWidget(m_edit);
m_edit->setEditable(false);
- m_edit->setInsertionPolicy(QComboBox::NoInsertion);
+ m_edit->setInsertionPolicy(TQComboBox::NoInsertion);
m_edit->setMinimumSize(10, 0); // to allow the combo to be resized to a small size
m_edit->setAutoCompletion(true);
m_edit->setContextMenuEnabled(false);
@@ -53,31 +53,31 @@ ComboBox::ComboBox(Property *property, QWidget *parent, const char *name)
//not needed for combo setLeavesTheSpaceForRevertButton(true);
setFocusWidget(m_edit);
- connect(m_edit, SIGNAL(activated(int)), this, SLOT(slotValueChanged(int)));
+ connect(m_edit, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotValueChanged(int)));
}
ComboBox::~ComboBox()
{
}
-QVariant
+TQVariant
ComboBox::value() const
{
if (!property()->listData()) {
kopropertywarn << "ComboBox::value(): propery listData not available!" << endl;
- return QVariant();
+ return TQVariant();
}
const int idx = m_edit->currentItem();
if (idx<0 || idx>=(int)property()->listData()->keys.count())
- return QVariant();
- return QVariant( property()->listData()->keys[idx] );
-// if(property()->listData() && property()->listData()->contains(m_edit->currentText()))
+ return TQVariant();
+ return TQVariant( property()->listData()->keys[idx] );
+// if(property()->listData() && property()->listData()->tqcontains(m_edit->currentText()))
// return (*(property()->valueList()))[m_edit->currentText()];
-// return QVariant();
+// return TQVariant();
}
void
-ComboBox::setValue(const QVariant &value, bool emitChange)
+ComboBox::setValue(const TQVariant &value, bool emitChange)
{
if (!property() || !property()->listData()) {
kopropertywarn << "ComboBox::value(): propery listData not available!" << endl;
@@ -85,7 +85,7 @@ ComboBox::setValue(const QVariant &value, bool emitChange)
}
if (!m_setValueEnabled)
return;
- int idx = property()->listData()->keys.findIndex( value );
+ int idx = property()->listData()->keys.tqfindIndex( value );
if (idx>=0 && idx<m_edit->count()) {
m_edit->setCurrentItem(idx);
}
@@ -94,7 +94,7 @@ ComboBox::setValue(const QVariant &value, bool emitChange)
kopropertywarn << "ComboBox::setValue(): NO SUCH KEY '" << value.toString()
<< "' (property '" << property()->name() << "')" << endl;
} else {
- QStringList list;
+ TQStringList list;
for (int i=0; i<m_edit->count(); i++)
list += m_edit->text(i);
kopropertywarn << "ComboBox::setValue(): NO SUCH INDEX WITHIN COMBOBOX: " << idx
@@ -102,7 +102,7 @@ ComboBox::setValue(const QVariant &value, bool emitChange)
<< "' (property '" << property()->name() << "')\nActual combobox contents: "
<< list << endl;
}
- m_edit->setCurrentText(QString::null);
+ m_edit->setCurrentText(TQString());
}
if(value.isNull())
@@ -116,18 +116,18 @@ ComboBox::setValue(const QVariant &value, bool emitChange)
}
void
-ComboBox::drawViewer(QPainter *p, const QColorGroup &cg, const QRect &r, const QVariant &value)
+ComboBox::drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value)
{
- QString txt;
+ TQString txt;
if (property()->listData()) {
- const int idx = property()->listData()->keys.findIndex( value );
+ const int idx = property()->listData()->keys.tqfindIndex( value );
if (idx>=0)
txt = property()->listData()->names[ idx ];
}
Widget::drawViewer(p, cg, r, txt); //keyForValue(value));
// p->eraseRect(r);
-// p->drawText(r, Qt::AlignLeft | Qt::AlignVCenter | Qt::SingleLine, keyForValue(value));
+// p->drawText(r, TQt::AlignLeft | TQt::AlignVCenter | TQt::SingleLine, keyForValue(value));
}
void
@@ -175,23 +175,23 @@ ComboBox::setReadOnlyInternal(bool readOnly)
}
-/*QString
-ComboBox::keyForValue(const QVariant &value)
+/*TQString
+ComboBox::keyForValue(const TQVariant &value)
{
- const QMap<QString, QVariant> *list = property()->valueList();
+ const TQMap<TQString, TQVariant> *list = property()->valueList();
Property::ListData *list = property()->listData();
if (!list)
- return QString::null;
+ return TQString();
int idx = listData->keys.findIndex( value );
- QMap<QString, QVariant>::ConstIterator endIt = list->constEnd();
- for(QMap<QString, QVariant>::ConstIterator it = list->constBegin(); it != endIt; ++it) {
+ TQMap<TQString, TQVariant>::ConstIterator endIt = list->constEnd();
+ for(TQMap<TQString, TQVariant>::ConstIterator it = list->constBegin(); it != endIt; ++it) {
if(it.data() == value)
return it.key();
}
- return QString::null;
+ return TQString();
}*/
diff --git a/lib/koproperty/editors/combobox.h b/lib/koproperty/editors/combobox.h
index 5d1f56f9..dda5d067 100644
--- a/lib/koproperty/editors/combobox.h
+++ b/lib/koproperty/editors/combobox.h
@@ -30,23 +30,24 @@ namespace KoProperty {
class KOPROPERTY_EXPORT ComboBox : public Widget
{
Q_OBJECT
+ TQ_OBJECT
public:
- ComboBox(Property *property, QWidget *parent=0, const char *name=0);
+ ComboBox(Property *property, TQWidget *tqparent=0, const char *name=0);
virtual ~ComboBox();
- virtual QVariant value() const;
- virtual void setValue(const QVariant &value, bool emitChange=true);
+ virtual TQVariant value() const;
+ virtual void setValue(const TQVariant &value, bool emitChange=true);
virtual void setProperty(Property *property);
- virtual void drawViewer(QPainter *p, const QColorGroup &cg, const QRect &r, const QVariant &value);
+ virtual void drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value);
protected slots:
void slotValueChanged(int value);
protected:
virtual void setReadOnlyInternal(bool readOnly);
- QString keyForValue(const QVariant &value);
+ TQString keyForValue(const TQVariant &value);
void fillBox();
KComboBox *m_edit;
diff --git a/lib/koproperty/editors/cursoredit.cpp b/lib/koproperty/editors/cursoredit.cpp
index a0b3227c..efcc0e44 100644
--- a/lib/koproperty/editors/cursoredit.cpp
+++ b/lib/koproperty/editors/cursoredit.cpp
@@ -20,9 +20,9 @@
#include "cursoredit.h"
-#include <qmap.h>
-#include <qvariant.h>
-#include <qcursor.h>
+#include <tqmap.h>
+#include <tqvariant.h>
+#include <tqcursor.h>
#include <klocale.h>
#include <kdebug.h>
@@ -31,68 +31,68 @@
using namespace KoProperty;
-//QMap<QString, QVariant> *CursorEdit::m_spValues = 0;
+//TQMap<TQString, TQVariant> *CursorEdit::m_spValues = 0;
Property::ListData *m_cursorListData = 0;
-CursorEdit::CursorEdit(Property *property, QWidget *parent, const char *name)
-: ComboBox(property, parent, name)
+CursorEdit::CursorEdit(Property *property, TQWidget *tqparent, const char *name)
+: ComboBox(property, tqparent, name)
{
/*
if(!m_spValues) {
- m_spValues = new QMap<QString, QVariant>();
- (*m_spValues)[i18n("Arrow")] = Qt::ArrowCursor;
- (*m_spValues)[i18n("Up Arrow")] = Qt::UpArrowCursor;
- (*m_spValues)[i18n("Cross")] = Qt::CrossCursor;
- (*m_spValues)[i18n("Waiting")] = Qt::WaitCursor;
- (*m_spValues)[i18n("iBeam")] = Qt::IbeamCursor;
- (*m_spValues)[i18n("Size Vertical")] = Qt::SizeVerCursor;
- (*m_spValues)[i18n("Size Horizontal")] = Qt::SizeHorCursor;
- (*m_spValues)[i18n("Size Slash")] = Qt::SizeBDiagCursor;
- (*m_spValues)[i18n("Size Backslash")] = Qt::SizeFDiagCursor;
- (*m_spValues)[i18n("Size All")] = Qt::SizeAllCursor;
- (*m_spValues)[i18n("Blank")] = Qt::BlankCursor;
- (*m_spValues)[i18n("Split Vertical")] = Qt::SplitVCursor;
- (*m_spValues)[i18n("Split Horizontal")] = Qt::SplitHCursor;
- (*m_spValues)[i18n("Pointing Hand")] = Qt::PointingHandCursor;
- (*m_spValues)[i18n("Forbidden")] = Qt::ForbiddenCursor;
- (*m_spValues)[i18n("What's this")] = Qt::WhatsThisCursor;
+ m_spValues = new TQMap<TQString, TQVariant>();
+ (*m_spValues)[i18n("Arrow")] = TQt::ArrowCursor;
+ (*m_spValues)[i18n("Up Arrow")] = TQt::UpArrowCursor;
+ (*m_spValues)[i18n("Cross")] = TQt::CrossCursor;
+ (*m_spValues)[i18n("Waiting")] = TQt::WaitCursor;
+ (*m_spValues)[i18n("iBeam")] = TQt::IbeamCursor;
+ (*m_spValues)[i18n("SizeQt::Vertical")] = TQt::SizeVerCursor;
+ (*m_spValues)[i18n("SizeQt::Horizontal")] = TQt::SizeHorCursor;
+ (*m_spValues)[i18n("Size Slash")] = TQt::SizeBDiagCursor;
+ (*m_spValues)[i18n("Size Backslash")] = TQt::SizeFDiagCursor;
+ (*m_spValues)[i18n("Size All")] = TQt::SizeAllCursor;
+ (*m_spValues)[i18n("Blank")] = TQt::BlankCursor;
+ (*m_spValues)[i18n("SplitQt::Vertical")] = TQt::SplitVCursor;
+ (*m_spValues)[i18n("SplitQt::Horizontal")] = TQt::SplitHCursor;
+ (*m_spValues)[i18n("Pointing Hand")] = TQt::PointingHandCursor;
+ (*m_spValues)[i18n("Forbidden")] = TQt::ForbiddenCursor;
+ (*m_spValues)[i18n("What's this")] = TQt::WhatsThisCursor;
}*/
//! @todo NOT THREAD-SAFE
if (!m_cursorListData) {
- QValueList<QVariant> keys;
+ TQValueList<TQVariant> keys;
keys
- << Qt::BlankCursor
- << Qt::ArrowCursor
- << Qt::UpArrowCursor
- << Qt::CrossCursor
- << Qt::WaitCursor
- << Qt::IbeamCursor
- << Qt::SizeVerCursor
- << Qt::SizeHorCursor
- << Qt::SizeBDiagCursor
- << Qt::SizeFDiagCursor
- << Qt::SizeAllCursor
- << Qt::SplitVCursor
- << Qt::SplitHCursor
- << Qt::PointingHandCursor
- << Qt::ForbiddenCursor
- << Qt::WhatsThisCursor;
- QStringList strings;
+ << TQt::BlankCursor
+ << TQt::ArrowCursor
+ << TQt::UpArrowCursor
+ << TQt::CrossCursor
+ << TQt::WaitCursor
+ << TQt::IbeamCursor
+ << TQt::SizeVerCursor
+ << TQt::SizeHorCursor
+ << TQt::SizeBDiagCursor
+ << TQt::SizeFDiagCursor
+ << TQt::SizeAllCursor
+ << TQt::SplitVCursor
+ << TQt::SplitHCursor
+ << TQt::PointingHandCursor
+ << TQt::ForbiddenCursor
+ << TQt::WhatsThisCursor;
+ TQStringList strings;
strings << i18n("Mouse Cursor Shape", "No Cursor")
<< i18n("Mouse Cursor Shape", "Arrow")
<< i18n("Mouse Cursor Shape", "Up Arrow")
<< i18n("Mouse Cursor Shape", "Cross")
<< i18n("Mouse Cursor Shape", "Waiting")
<< i18n("Mouse Cursor Shape", "I")
- << i18n("Mouse Cursor Shape", "Size Vertical")
- << i18n("Mouse Cursor Shape", "Size Horizontal")
+ << i18n("Mouse Cursor Shape", "SizeQt::Vertical")
+ << i18n("Mouse Cursor Shape", "SizeQt::Horizontal")
<< i18n("Mouse Cursor Shape", "Size Slash")
<< i18n("Mouse Cursor Shape", "Size Backslash")
<< i18n("Mouse Cursor Shape", "Size All")
- << i18n("Mouse Cursor Shape", "Split Vertical")
- << i18n("Mouse Cursor Shape", "Split Horizontal")
+ << i18n("Mouse Cursor Shape", "SplitQt::Vertical")
+ << i18n("Mouse Cursor Shape", "SplitQt::Horizontal")
<< i18n("Mouse Cursor Shape", "Pointing Hand")
<< i18n("Mouse Cursor Shape", "Forbidden")
<< i18n("Mouse Cursor Shape", "What's This?");
@@ -109,22 +109,22 @@ CursorEdit::~CursorEdit()
m_cursorListData = 0;
}
-QVariant
+TQVariant
CursorEdit::value() const
{
- return QCursor(ComboBox::value().toInt());
+ return TQCursor(ComboBox::value().toInt());
}
void
-CursorEdit::setValue(const QVariant &value, bool emitChange)
+CursorEdit::setValue(const TQVariant &value, bool emitChange)
{
- ComboBox::setValue(value.toCursor().shape(), emitChange);
+ ComboBox::setValue(value.toCursor().tqshape(), emitChange);
}
void
-CursorEdit::drawViewer(QPainter *p, const QColorGroup &cg, const QRect &r, const QVariant &value)
+CursorEdit::drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value)
{
- ComboBox::drawViewer(p, cg, r, value.toCursor().shape());
+ ComboBox::drawViewer(p, cg, r, value.toCursor().tqshape());
}
void
diff --git a/lib/koproperty/editors/cursoredit.h b/lib/koproperty/editors/cursoredit.h
index 81587cc4..850653df 100644
--- a/lib/koproperty/editors/cursoredit.h
+++ b/lib/koproperty/editors/cursoredit.h
@@ -23,26 +23,27 @@
#include "combobox.h"
-template<class U, class T> class QMap;
+template<class U, class T> class TQMap;
namespace KoProperty {
class KOPROPERTY_EXPORT CursorEdit : public ComboBox
{
Q_OBJECT
+ TQ_OBJECT
public:
- CursorEdit(Property *property, QWidget *parent=0, const char *name=0);
+ CursorEdit(Property *property, TQWidget *tqparent=0, const char *name=0);
virtual ~CursorEdit();
- virtual QVariant value() const;
- virtual void setValue(const QVariant &value, bool emitChange=true);
+ virtual TQVariant value() const;
+ virtual void setValue(const TQVariant &value, bool emitChange=true);
virtual void setProperty(Property *property);
- virtual void drawViewer(QPainter *p, const QColorGroup &cg, const QRect &r, const QVariant &value);
+ virtual void drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value);
private:
- static QMap<QString, QVariant> *m_spValues;
+ static TQMap<TQString, TQVariant> *m_spValues;
};
}
diff --git a/lib/koproperty/editors/dateedit.cpp b/lib/koproperty/editors/dateedit.cpp
index 797c0e5c..b72fd7ce 100644
--- a/lib/koproperty/editors/dateedit.cpp
+++ b/lib/koproperty/editors/dateedit.cpp
@@ -20,44 +20,44 @@
#include "dateedit.h"
-#include <qdatetimeedit.h>
-#include <qrangecontrol.h>
-#include <qobjectlist.h>
-#include <qlayout.h>
-#include <qvariant.h>
-#include <qpainter.h>
+#include <tqdatetimeedit.h>
+#include <tqrangecontrol.h>
+#include <tqobjectlist.h>
+#include <tqlayout.h>
+#include <tqvariant.h>
+#include <tqpainter.h>
#include <klocale.h>
#include <kglobal.h>
using namespace KoProperty;
-DateEdit::DateEdit(Property *property, QWidget *parent, const char *name)
- : Widget(property, parent, name)
+DateEdit::DateEdit(Property *property, TQWidget *tqparent, const char *name)
+ : Widget(property, tqparent, name)
{
- QHBoxLayout *l = new QHBoxLayout(this, 0, 0);
- m_edit = new QDateEdit(this);
- m_edit->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+ TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0);
+ m_edit = new TQDateEdit(this);
+ m_edit->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding);
m_edit->setMinimumHeight(5);
l->addWidget(m_edit);
setLeavesTheSpaceForRevertButton(true);
setFocusWidget(m_edit);
- connect(m_edit, SIGNAL(valueChanged(const QDate&)), this, SLOT(slotValueChanged(const QDate&)));
+ connect(m_edit, TQT_SIGNAL(valueChanged(const TQDate&)), this, TQT_SLOT(slotValueChanged(const TQDate&)));
}
DateEdit::~DateEdit()
{}
-QVariant
+TQVariant
DateEdit::value() const
{
return m_edit->date();
}
void
-DateEdit::setValue(const QVariant &value, bool emitChange)
+DateEdit::setValue(const TQVariant &value, bool emitChange)
{
m_edit->blockSignals(true);
m_edit->setDate(value.toDate());
@@ -67,15 +67,15 @@ DateEdit::setValue(const QVariant &value, bool emitChange)
}
void
-DateEdit::drawViewer(QPainter *p, const QColorGroup &cg, const QRect &r, const QVariant &value)
+DateEdit::drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value)
{
p->eraseRect(r);
Widget::drawViewer(p, cg, r, KGlobal::locale()->formatDate(value.toDate(), true /* use short format*/ ));
-// p->drawText(r, Qt::AlignLeft | Qt::AlignVCenter | Qt::SingleLine, KGlobal::locale()->formatDate(value.toDate(), true /* use short format*/ ));
+// p->drawText(r, TQt::AlignLeft | TQt::AlignVCenter | TQt::SingleLine, KGlobal::locale()->formatDate(value.toDate(), true /* use short format*/ ));
}
void
-DateEdit::slotValueChanged(const QDate&)
+DateEdit::slotValueChanged(const TQDate&)
{
emit valueChanged(this);
}
diff --git a/lib/koproperty/editors/dateedit.h b/lib/koproperty/editors/dateedit.h
index 509ae572..f36e7b65 100644
--- a/lib/koproperty/editors/dateedit.h
+++ b/lib/koproperty/editors/dateedit.h
@@ -23,32 +23,33 @@
#include "../widget.h"
-class QDateEdit;
-class QDate;
+class TQDateEdit;
+class TQDate;
namespace KoProperty {
class KOPROPERTY_EXPORT DateEdit : public Widget
{
Q_OBJECT
+ TQ_OBJECT
public:
- DateEdit(Property *property, QWidget *parent=0, const char *name=0);
+ DateEdit(Property *property, TQWidget *tqparent=0, const char *name=0);
virtual ~DateEdit();
- virtual QVariant value() const;
- virtual void setValue(const QVariant &value, bool emitChange=true);
+ virtual TQVariant value() const;
+ virtual void setValue(const TQVariant &value, bool emitChange=true);
- virtual void drawViewer(QPainter *p, const QColorGroup &cg, const QRect &r, const QVariant &value);
+ virtual void drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value);
protected:
virtual void setReadOnlyInternal(bool readOnly);
protected slots:
- void slotValueChanged(const QDate &date);
+ void slotValueChanged(const TQDate &date);
private:
- QDateEdit *m_edit;
+ TQDateEdit *m_edit;
};
}
diff --git a/lib/koproperty/editors/datetimeedit.cpp b/lib/koproperty/editors/datetimeedit.cpp
index 33bb8de3..7f88cb14 100644
--- a/lib/koproperty/editors/datetimeedit.cpp
+++ b/lib/koproperty/editors/datetimeedit.cpp
@@ -20,43 +20,43 @@
#include "datetimeedit.h"
-#include <qdatetimeedit.h>
-#include <qrangecontrol.h>
-#include <qobjectlist.h>
-#include <qlayout.h>
-#include <qpainter.h>
-#include <qvariant.h>
+#include <tqdatetimeedit.h>
+#include <tqrangecontrol.h>
+#include <tqobjectlist.h>
+#include <tqlayout.h>
+#include <tqpainter.h>
+#include <tqvariant.h>
#include <klocale.h>
#include <kglobal.h>
using namespace KoProperty;
-DateTimeEdit::DateTimeEdit(Property *property, QWidget *parent, const char *name)
- : Widget(property, parent, name)
+DateTimeEdit::DateTimeEdit(Property *property, TQWidget *tqparent, const char *name)
+ : Widget(property, tqparent, name)
{
- QHBoxLayout *l = new QHBoxLayout(this, 0, 0);
- m_edit = new QDateTimeEdit(this);
- m_edit->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+ TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0);
+ m_edit = new TQDateTimeEdit(this);
+ m_edit->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding);
m_edit->setMinimumHeight(5);
l->addWidget(m_edit);
setLeavesTheSpaceForRevertButton(true);
setFocusWidget(m_edit);
- connect(m_edit, SIGNAL(valueChanged(const QDateTime&)), this, SLOT(slotValueChanged(const QDateTime&)));
+ connect(m_edit, TQT_SIGNAL(valueChanged(const TQDateTime&)), this, TQT_SLOT(slotValueChanged(const TQDateTime&)));
}
DateTimeEdit::~DateTimeEdit()
{}
-QVariant
+TQVariant
DateTimeEdit::value() const
{
return m_edit->dateTime();
}
void
-DateTimeEdit::setValue(const QVariant &value, bool emitChange)
+DateTimeEdit::setValue(const TQVariant &value, bool emitChange)
{
m_edit->blockSignals(true);
m_edit->setDateTime(value.toDateTime());
@@ -66,16 +66,16 @@ DateTimeEdit::setValue(const QVariant &value, bool emitChange)
}
void
-DateTimeEdit::drawViewer(QPainter *p, const QColorGroup &cg, const QRect &r, const QVariant &value)
+DateTimeEdit::drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value)
{
p->eraseRect(r);
Widget::drawViewer(p, cg, r, KGlobal::locale()->formatDateTime(value.toDateTime(), true /* use short format*/, false /*no sec */ ));
-// p->drawText(r, Qt::AlignLeft | Qt::AlignVCenter | Qt::SingleLine,
+// p->drawText(r, TQt::AlignLeft | TQt::AlignVCenter | TQt::SingleLine,
// KGlobal::locale()->formatDateTime(value.toDateTime(), true /* use short format*/, false /*no sec */ ));
}
void
-DateTimeEdit::slotValueChanged(const QDateTime&)
+DateTimeEdit::slotValueChanged(const TQDateTime&)
{
emit valueChanged(this);
}
diff --git a/lib/koproperty/editors/datetimeedit.h b/lib/koproperty/editors/datetimeedit.h
index f7b81795..b8745b01 100644
--- a/lib/koproperty/editors/datetimeedit.h
+++ b/lib/koproperty/editors/datetimeedit.h
@@ -23,32 +23,33 @@
#include "../widget.h"
-class QDateTimeEdit;
-class QDateTime;
+class TQDateTimeEdit;
+class TQDateTime;
namespace KoProperty {
class KOPROPERTY_EXPORT DateTimeEdit : public Widget
{
Q_OBJECT
+ TQ_OBJECT
public:
- DateTimeEdit(Property *property, QWidget *parent=0, const char *name=0);
+ DateTimeEdit(Property *property, TQWidget *tqparent=0, const char *name=0);
virtual ~DateTimeEdit();
- virtual QVariant value() const;
- virtual void setValue(const QVariant &value, bool emitChange=true);
+ virtual TQVariant value() const;
+ virtual void setValue(const TQVariant &value, bool emitChange=true);
- virtual void drawViewer(QPainter *p, const QColorGroup &cg, const QRect &r, const QVariant &value);
+ virtual void drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value);
protected:
virtual void setReadOnlyInternal(bool readOnly);
protected slots:
- void slotValueChanged(const QDateTime &dateTime);
+ void slotValueChanged(const TQDateTime &dateTime);
private:
- QDateTimeEdit *m_edit;
+ TQDateTimeEdit *m_edit;
};
}
diff --git a/lib/koproperty/editors/dummywidget.cpp b/lib/koproperty/editors/dummywidget.cpp
index 9c72c8cd..e9fbe3c9 100644
--- a/lib/koproperty/editors/dummywidget.cpp
+++ b/lib/koproperty/editors/dummywidget.cpp
@@ -20,25 +20,25 @@
#include "dummywidget.h"
-#include <qpainter.h>
+#include <tqpainter.h>
using namespace KoProperty;
-DummyWidget::DummyWidget(Property *property, QWidget *parent, const char *name)
- : Widget(property, parent, name)
+DummyWidget::DummyWidget(Property *property, TQWidget *tqparent, const char *name)
+ : Widget(property, tqparent, name)
{}
DummyWidget::~DummyWidget()
{}
-QVariant
+TQVariant
DummyWidget::value() const
{
return m_value;
}
void
-DummyWidget::setValue(const QVariant &value, bool emitChange)
+DummyWidget::setValue(const TQVariant &value, bool emitChange)
{
m_value = value;
if(emitChange)
@@ -46,10 +46,10 @@ DummyWidget::setValue(const QVariant &value, bool emitChange)
}
void
-DummyWidget::drawViewer(QPainter *p, const QColorGroup &cg, const QRect &r, const QVariant &)
+DummyWidget::drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &)
{
p->setBrush(cg.background());
- p->setPen(Qt::NoPen);
+ p->setPen(TQt::NoPen);
p->drawRect(r);
}
diff --git a/lib/koproperty/editors/dummywidget.h b/lib/koproperty/editors/dummywidget.h
index b85ccb95..ef90ba8f 100644
--- a/lib/koproperty/editors/dummywidget.h
+++ b/lib/koproperty/editors/dummywidget.h
@@ -23,28 +23,29 @@
#include "../widget.h"
-#include <qvariant.h>
+#include <tqvariant.h>
namespace KoProperty {
class KOPROPERTY_EXPORT DummyWidget: public Widget
{
Q_OBJECT
+ TQ_OBJECT
public:
- DummyWidget(Property *property, QWidget *parent=0, const char *name=0);
+ DummyWidget(Property *property, TQWidget *tqparent=0, const char *name=0);
virtual ~DummyWidget();
- virtual QVariant value() const;
- virtual void setValue(const QVariant &value, bool emitChange=true);
+ virtual TQVariant value() const;
+ virtual void setValue(const TQVariant &value, bool emitChange=true);
- virtual void drawViewer(QPainter *p, const QColorGroup &cg, const QRect &r, const QVariant &value);
+ virtual void drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value);
protected:
virtual void setReadOnlyInternal(bool readOnly);
private:
- QVariant m_value;
+ TQVariant m_value;
};
}
diff --git a/lib/koproperty/editors/fontedit.cpp b/lib/koproperty/editors/fontedit.cpp
index 9d0101fa..65ae80cf 100644
--- a/lib/koproperty/editors/fontedit.cpp
+++ b/lib/koproperty/editors/fontedit.cpp
@@ -22,14 +22,14 @@
#include "fontedit.h"
#include "editoritem.h"
-#include <qpushbutton.h>
-#include <qpainter.h>
-#include <qlayout.h>
-#include <qvariant.h>
-#include <qfont.h>
-#include <qfontmetrics.h>
-#include <qlabel.h>
-#include <qtooltip.h>
+#include <tqpushbutton.h>
+#include <tqpainter.h>
+#include <tqlayout.h>
+#include <tqvariant.h>
+#include <tqfont.h>
+#include <tqfontmetrics.h>
+#include <tqlabel.h>
+#include <tqtooltip.h>
#include <kdeversion.h>
#include <kfontrequester.h>
@@ -44,32 +44,32 @@ namespace KoProperty {
class FontEditRequester : public KFontRequester
{
public:
- FontEditRequester(QWidget* parent)
- : KFontRequester(parent)
+ FontEditRequester(TQWidget* tqparent)
+ : KFontRequester(tqparent)
{
- label()->setPaletteBackgroundColor(palette().active().base());
+ label()->setPaletteBackgroundColor(tqpalette().active().base());
label()->setMinimumWidth(0);
- label()->setFrameShape(QFrame::Box);
+ label()->setFrameShape(TQFrame::Box);
label()->setIndent(-1);
#if KDE_VERSION >= KDE_MAKE_VERSION(3,4,0)
- label()->setFocusPolicy(ClickFocus);
+ label()->setFocusPolicy(TQ_ClickFocus);
KAcceleratorManager::setNoAccel(label());
#endif
- layout()->remove(label());
- layout()->remove(button());//->reparent(this, 0, QPoint(0,0));
- delete layout();
+ tqlayout()->remove(label());
+ tqlayout()->remove(button());//->reparent(this, 0, TQPoint(0,0));
+ delete tqlayout();
button()->setText(i18n("..."));
- QToolTip::add(button(), i18n("Change font"));
- button()->setFocusPolicy(NoFocus);
- button()->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
- QFontMetrics fm(button()->font());
+ TQToolTip::add(button(), i18n("Change font"));
+ button()->setFocusPolicy(TQ_NoFocus);
+ button()->tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed);
+ TQFontMetrics fm(button()->font());
button()->setFixedWidth(fm.width(button()->text()+' '));
}
- virtual void resizeEvent(QResizeEvent *e)
+ virtual void resizeEvent(TQResizeEvent *e)
{
KFontRequester::resizeEvent(e);
label()->move(0,0);
- label()->resize(e->size()-QSize(button()->width(),-1));
+ label()->resize(e->size()-TQSize(button()->width(),-1));
button()->move(label()->width(),0);
button()->setFixedSize(button()->width(), height());
}
@@ -79,35 +79,35 @@ class FontEditRequester : public KFontRequester
using namespace KoProperty;
-FontEdit::FontEdit(Property *property, QWidget *parent, const char *name)
- : Widget(property, parent, name)
+FontEdit::FontEdit(Property *property, TQWidget *tqparent, const char *name)
+ : Widget(property, tqparent, name)
{
m_edit = new FontEditRequester(this);
m_edit->setMinimumHeight(5);
setEditor(m_edit);
setFocusWidget(m_edit->label());
- connect(m_edit, SIGNAL(fontSelected(const QFont& )), this, SLOT(slotValueChanged(const QFont&)));
+ connect(m_edit, TQT_SIGNAL(fontSelected(const TQFont& )), this, TQT_SLOT(slotValueChanged(const TQFont&)));
}
FontEdit::~FontEdit()
{}
-QVariant
+TQVariant
FontEdit::value() const
{
return m_edit->font();
}
-static QString sampleText(const QVariant &value)
+static TQString sampleText(const TQVariant &value)
{
- QFontInfo fi(value.toFont());
- return fi.family() + (fi.bold() ? " " + i18n("Bold") : QString()) +
- (fi.italic() ? " " + i18n("Italic") : QString::null) +
- " " + QString::number(fi.pointSize());
+ TQFontInfo fi(value.toFont());
+ return fi.family() + (fi.bold() ? " " + i18n("Bold") : TQString()) +
+ (fi.italic() ? " " + i18n("Italic") : TQString()) +
+ " " + TQString::number(fi.pointSize());
}
void
-FontEdit::setValue(const QVariant &value, bool emitChange)
+FontEdit::setValue(const TQVariant &value, bool emitChange)
{
m_edit->blockSignals(true);
m_edit->setFont(value.toFont());
@@ -118,27 +118,27 @@ FontEdit::setValue(const QVariant &value, bool emitChange)
}
void
-FontEdit::drawViewer(QPainter *p, const QColorGroup &, const QRect &r, const QVariant &value)
+FontEdit::drawViewer(TQPainter *p, const TQColorGroup &, const TQRect &r, const TQVariant &value)
{
p->eraseRect(r);
p->setFont(value.toFont());
- QRect r2(r);
+ TQRect r2(r);
r2.setLeft(r2.left()+KPROPEDITOR_ITEM_MARGIN);
r2.setBottom(r2.bottom()+1);
- p->drawText(r2, Qt::AlignLeft | Qt::AlignVCenter | Qt::SingleLine, sampleText(value));
+ p->drawText(r2, TQt::AlignLeft | TQt::AlignVCenter | TQt::SingleLine, sampleText(value));
}
void
-FontEdit::slotValueChanged(const QFont &)
+FontEdit::slotValueChanged(const TQFont &)
{
emit valueChanged(this);
}
bool
-FontEdit::eventFilter(QObject* watched, QEvent* e)
+FontEdit::eventFilter(TQObject* watched, TQEvent* e)
{
- if(e->type() == QEvent::KeyPress) {
- QKeyEvent* ev = static_cast<QKeyEvent*>(e);
+ if(e->type() == TQEvent::KeyPress) {
+ TQKeyEvent* ev = TQT_TQKEYEVENT(e);
if(ev->key() == Key_Space) {
m_edit->button()->animateClick();
return true;
diff --git a/lib/koproperty/editors/fontedit.h b/lib/koproperty/editors/fontedit.h
index 0112171a..6c3a46a4 100644
--- a/lib/koproperty/editors/fontedit.h
+++ b/lib/koproperty/editors/fontedit.h
@@ -31,22 +31,23 @@ class FontEditRequester;
class KOPROPERTY_EXPORT FontEdit : public Widget
{
Q_OBJECT
+ TQ_OBJECT
public:
- FontEdit(Property *property, QWidget *parent=0, const char *name=0);
+ FontEdit(Property *property, TQWidget *tqparent=0, const char *name=0);
virtual ~FontEdit();
- virtual QVariant value() const;
- virtual void setValue(const QVariant &value, bool emitChange=true);
+ virtual TQVariant value() const;
+ virtual void setValue(const TQVariant &value, bool emitChange=true);
- virtual void drawViewer(QPainter *p, const QColorGroup &cg, const QRect &r, const QVariant &value);
+ virtual void drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value);
protected:
virtual void setReadOnlyInternal(bool readOnly);
- virtual bool eventFilter(QObject* watched, QEvent* e);
+ virtual bool eventFilter(TQObject* watched, TQEvent* e);
protected slots:
- void slotValueChanged(const QFont &font);
+ void slotValueChanged(const TQFont &font);
private:
FontEditRequester *m_edit;
diff --git a/lib/koproperty/editors/linestyledit.cpp b/lib/koproperty/editors/linestyledit.cpp
index 0d2353ff..91783e20 100644
--- a/lib/koproperty/editors/linestyledit.cpp
+++ b/lib/koproperty/editors/linestyledit.cpp
@@ -21,11 +21,11 @@
#include "linestyleedit.h"
#include "editoritem.h"
-#include <qpainter.h>
-#include <qpixmap.h>
-#include <qcombobox.h>
-#include <qlayout.h>
-#include <qvariant.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
+#include <tqcombobox.h>
+#include <tqlayout.h>
+#include <tqvariant.h>
using namespace KoProperty;
@@ -135,39 +135,39 @@ using namespace KoProperty;
"................................................"};
-LineStyleEdit::LineStyleEdit(Property *property, QWidget *parent, const char *name)
- : Widget(property, parent, name)
+LineStyleEdit::LineStyleEdit(Property *property, TQWidget *tqparent, const char *name)
+ : Widget(property, tqparent, name)
{
- QHBoxLayout *l = new QHBoxLayout(this, 0, 0);
- m_edit = new QComboBox(this);
- m_edit->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+ TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0);
+ m_edit = new TQComboBox(this);
+ m_edit->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding);
m_edit->setMinimumHeight(5);
l->addWidget(m_edit);
- m_edit->insertItem(QPixmap(nopen));
- m_edit->insertItem(QPixmap(solid));
- m_edit->insertItem(QPixmap(dash));
- m_edit->insertItem(QPixmap(dashdot));
- m_edit->insertItem(QPixmap(dashdotdot));
+ m_edit->insertItem(TQPixmap(nopen));
+ m_edit->insertItem(TQPixmap(solid));
+ m_edit->insertItem(TQPixmap(dash));
+ m_edit->insertItem(TQPixmap(dashdot));
+ m_edit->insertItem(TQPixmap(dashdotdot));
setLeavesTheSpaceForRevertButton(true);
setFocusWidget(m_edit);
- connect(m_edit, SIGNAL(activated(int)), this, SLOT(slotValueChanged(int)));
+ connect(m_edit, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotValueChanged(int)));
}
LineStyleEdit::~LineStyleEdit()
{}
-QVariant
+TQVariant
LineStyleEdit::value() const
{
return m_edit->currentItem();
}
void
-LineStyleEdit::setValue(const QVariant &value, bool emitChange)
+LineStyleEdit::setValue(const TQVariant &value, bool emitChange)
{
- if (!value.canCast(QVariant::Int))
+ if (!value.canCast(TQVariant::Int))
return;
if ((value.toInt() > 5) || (value.toInt() < 0))
return;
@@ -180,29 +180,29 @@ LineStyleEdit::setValue(const QVariant &value, bool emitChange)
}
void
-LineStyleEdit::drawViewer(QPainter *p, const QColorGroup &, const QRect &r, const QVariant &value)
+LineStyleEdit::drawViewer(TQPainter *p, const TQColorGroup &, const TQRect &r, const TQVariant &value)
{
p->eraseRect(r);
- if (!value.canCast(QVariant::Int))
+ if (!value.canCast(TQVariant::Int))
return;
- QPixmap px;
+ TQPixmap px;
switch (value.toInt()) {
case 0:
- px = QPixmap(nopen);
+ px = TQPixmap(nopen);
break;
case 1:
- px = QPixmap(solid);
+ px = TQPixmap(solid);
break;
case 2:
- px = QPixmap(dash);
+ px = TQPixmap(dash);
break;
case 3:
- px = QPixmap(dashdot);
+ px = TQPixmap(dashdot);
break;
case 4:
- px = QPixmap(dashdotdot);
+ px = TQPixmap(dashdotdot);
break;
default:
return;
diff --git a/lib/koproperty/editors/linestyleedit.h b/lib/koproperty/editors/linestyleedit.h
index 6392e2f7..8388b897 100644
--- a/lib/koproperty/editors/linestyleedit.h
+++ b/lib/koproperty/editors/linestyleedit.h
@@ -23,22 +23,23 @@
#include "../widget.h"
-class QComboBox;
+class TQComboBox;
namespace KoProperty {
class KOPROPERTY_EXPORT LineStyleEdit : public Widget
{
Q_OBJECT
+ TQ_OBJECT
public:
- LineStyleEdit(Property *property, QWidget *parent=0, const char *name=0);
+ LineStyleEdit(Property *property, TQWidget *tqparent=0, const char *name=0);
virtual ~LineStyleEdit();
- virtual QVariant value() const;
- virtual void setValue(const QVariant &value, bool emitChange=true);
+ virtual TQVariant value() const;
+ virtual void setValue(const TQVariant &value, bool emitChange=true);
- virtual void drawViewer(QPainter *p, const QColorGroup &cg, const QRect &r, const QVariant &value);
+ virtual void drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value);
protected:
virtual void setReadOnlyInternal(bool readOnly);
@@ -47,7 +48,7 @@ class KOPROPERTY_EXPORT LineStyleEdit : public Widget
void slotValueChanged(int value);
private:
- QComboBox *m_edit;
+ TQComboBox *m_edit;
};
}
diff --git a/lib/koproperty/editors/pixmapedit.cpp b/lib/koproperty/editors/pixmapedit.cpp
index d141eed3..95cdbb9d 100644
--- a/lib/koproperty/editors/pixmapedit.cpp
+++ b/lib/koproperty/editors/pixmapedit.cpp
@@ -23,22 +23,22 @@
#include "editoritem.h"
#include "property.h"
-#include <qlayout.h>
-#include <qpainter.h>
-#include <qlabel.h>
-#include <qcursor.h>
-#include <qpushbutton.h>
-#include <qfont.h>
-#include <qfontmetrics.h>
-#include <qimage.h>
-#include <qfiledialog.h>
-#include <qtooltip.h>
-#include <qapplication.h>
+#include <tqlayout.h>
+#include <tqpainter.h>
+#include <tqlabel.h>
+#include <tqcursor.h>
+#include <tqpushbutton.h>
+#include <tqfont.h>
+#include <tqfontmetrics.h>
+#include <tqimage.h>
+#include <tqfiledialog.h>
+#include <tqtooltip.h>
+#include <tqapplication.h>
#include <kdebug.h>
#include <kimageio.h>
-#ifdef Q_WS_WIN
+#ifdef TQ_WS_WIN
#include <win32_utils.h>
#include <krecentdirs.h>
#endif
@@ -51,36 +51,36 @@
using namespace KoProperty;
-PixmapEdit::PixmapEdit(Property *property, QWidget *parent, const char *name)
- : Widget(property, parent, name)
+PixmapEdit::PixmapEdit(Property *property, TQWidget *tqparent, const char *name)
+ : Widget(property, tqparent, name)
{
setHasBorders(false);
- m_edit = new QLabel(this, "m_edit");
- QToolTip::add(m_edit, i18n("Click to show image preview"));
- m_edit->setAlignment(Qt::AlignLeft | Qt::AlignVCenter);
+ m_edit = new TQLabel(this, "m_edit");
+ TQToolTip::add(m_edit, i18n("Click to show image preview"));
+ m_edit->tqsetAlignment(TQt::AlignLeft | TQt::AlignVCenter);
m_edit->setMinimumHeight(5);
- m_edit->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
- m_edit->setBackgroundMode(Qt::PaletteBase);
+ m_edit->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Fixed);
+ m_edit->setBackgroundMode(TQt::PaletteBase);
m_edit->setMouseTracking(true);
- setBackgroundMode(Qt::PaletteBase);
+ setBackgroundMode(TQt::PaletteBase);
- m_button = new QPushButton(i18n("..."), this, "m_button");
- QToolTip::add(m_button, i18n("Insert image from file"));
- m_button->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
- QFontMetrics fm(m_button->font());
+ m_button = new TQPushButton(i18n("..."), this, "m_button");
+ TQToolTip::add(m_button, i18n("Insert image from file"));
+ m_button->tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed);
+ TQFontMetrics fm(m_button->font());
m_button->setFixedWidth(fm.width(m_button->text()+' '));
- m_button->setFocusPolicy(NoFocus);
+ m_button->setFocusPolicy(TQ_NoFocus);
- m_popup = new QLabel(0, "m_popup", Qt::WStyle_Customize|Qt::WStyle_NoBorder|Qt::WX11BypassWM|WStyle_StaysOnTop);
- m_popup->setPaletteBackgroundColor(m_popup->palette().active().base());
- m_popup->setFrameStyle(QFrame::Plain|QFrame::Box);
+ m_popup = new TQLabel(0, "m_popup", TQt::WStyle_Customize|TQt::WStyle_NoBorder|TQt::WX11BypassWM|WStyle_StaysOnTop);
+ m_popup->setPaletteBackgroundColor(m_popup->tqpalette().active().base());
+ m_popup->setFrameStyle(TQFrame::Plain|TQFrame::Box);
m_popup->setMargin(2);
m_popup->setLineWidth(1);
m_popup->hide();
setFocusWidget(m_edit);
- connect(m_button, SIGNAL(clicked()), this, SLOT(selectPixmap()));
+ connect(m_button, TQT_SIGNAL(clicked()), this, TQT_SLOT(selectPixmap()));
}
PixmapEdit::~PixmapEdit()
@@ -88,14 +88,14 @@ PixmapEdit::~PixmapEdit()
delete m_popup;
}
-QVariant
+TQVariant
PixmapEdit::value() const
{
return m_pixmap;
}
void
-PixmapEdit::setValue(const QVariant &value, bool emitChange)
+PixmapEdit::setValue(const TQVariant &value, bool emitChange)
{
m_pixmap = value.toPixmap();
if (m_pixmap.isNull() || (m_pixmap.height()<=height())) {
@@ -103,16 +103,16 @@ PixmapEdit::setValue(const QVariant &value, bool emitChange)
m_previewPixmap = m_pixmap;
}
else {
- QImage img(m_pixmap.convertToImage());
- if (!QRect(QPoint(0,0), m_edit->size()*3).contains(m_pixmap.rect())) {
- img = img.smoothScale(m_edit->size()*3, QImage::ScaleMin);
+ TQImage img(m_pixmap.convertToImage());
+ if (!TQRect(TQPoint(0,0), m_edit->size()*3).tqcontains(m_pixmap.rect())) {
+ img = img.smoothScale(m_edit->size()*3, TQ_ScaleMin);
m_previewPixmap.convertFromImage(img);//preview pixmap is a bit larger
}
else {
m_previewPixmap = m_pixmap;
}
- img = img.smoothScale(m_edit->size(), QImage::ScaleMin);
- QPixmap pm;
+ img = img.smoothScale(m_edit->size(), TQ_ScaleMin);
+ TQPixmap pm;
pm.convertFromImage(img);
m_edit->setPixmap(pm);
}
@@ -121,11 +121,11 @@ PixmapEdit::setValue(const QVariant &value, bool emitChange)
}
void
-PixmapEdit::drawViewer(QPainter *p, const QColorGroup &, const QRect &r, const QVariant &value)
+PixmapEdit::drawViewer(TQPainter *p, const TQColorGroup &, const TQRect &r, const TQVariant &value)
{
- QRect r2(r);
+ TQRect r2(r);
r2.setHeight(r2.height()+1);
- p->setClipRect(r2, QPainter::CoordPainter);
+ p->setClipRect(r2, TQPainter::CoordPainter);
p->setClipping(true);
p->eraseRect(r2);
if (value.toPixmap().isNull())
@@ -134,8 +134,8 @@ PixmapEdit::drawViewer(QPainter *p, const QColorGroup &, const QRect &r, const Q
m_recentlyPainted = value;
m_scaledPixmap = value.toPixmap();
if (m_scaledPixmap.height() > r2.height() || m_scaledPixmap.width() > r2.width()) { //scale down
- QImage img(m_scaledPixmap.convertToImage());
- img = img.smoothScale(r2.size()/*+QSize(0,2)*/, QImage::ScaleMin);
+ TQImage img(m_scaledPixmap.convertToImage());
+ img = img.smoothScale(r2.size()/*+TQSize(0,2)*/, TQ_ScaleMin);
m_scaledPixmap.convertFromImage(img);
}
}
@@ -143,27 +143,27 @@ PixmapEdit::drawViewer(QPainter *p, const QColorGroup &, const QRect &r, const Q
r2.topLeft().y()+(r2.height()-m_scaledPixmap.height())/2, m_scaledPixmap);
}
-QString
+TQString
PixmapEdit::selectPixmapFileName()
{
/*#ifdef PURE_QT
- QString url = QFileDialog::getOpenFileName();
+ TQString url = TQFileDialog::getOpenFileName();
if (!url.isEmpty()) {
- m_edit->setPixmap(QPixmap(url));
+ m_edit->setPixmap(TQPixmap(url));
emit valueChanged(this);
}
#endif*/
- QString caption( i18n("Insert Image From File (for \"%1\" property)").arg(property()->caption()) );
-#ifdef Q_WS_WIN
- QString recentDir;
- QString fileName = QFileDialog::getOpenFileName(
+ TQString caption( i18n("Insert Image From File (for \"%1\" property)").tqarg(property()->caption()) );
+#ifdef TQ_WS_WIN
+ TQString recentDir;
+ TQString fileName = TQFileDialog::getOpenFileName(
KFileDialog::getStartURL(":lastVisitedImagePath", recentDir).path(),
- convertKFileDialogFilterToQFileDialogFilter(KImageIO::pattern(KImageIO::Reading)),
+ convertKFileDialogFilterToTQFileDialogFilter(KImageIO::pattern(KImageIO::Reading)),
this, 0, caption);
#else
KURL url( KFileDialog::getImageOpenURL(
":lastVisitedImagePath", this, caption) );
- QString fileName = url.isLocalFile() ? url.path() : url.prettyURL();
+ TQString fileName = url.isLocalFile() ? url.path() : url.prettyURL();
//! @todo download the file if remote, then set fileName properly
#endif
@@ -173,18 +173,18 @@ PixmapEdit::selectPixmapFileName()
void
PixmapEdit::selectPixmap()
{
- QString fileName( selectPixmapFileName() );
+ TQString fileName( selectPixmapFileName() );
if (fileName.isEmpty())
return;
- QPixmap pm;
+ TQPixmap pm;
if (!pm.load(fileName)) {
//! @todo err msg
return;
}
setValue(pm);
-#ifdef Q_WS_WIN
+#ifdef TQ_WS_WIN
//save last visited path
KURL url(fileName);
if (url.isLocalFile())
@@ -193,41 +193,41 @@ PixmapEdit::selectPixmap()
}
void
-PixmapEdit::resizeEvent(QResizeEvent *e)
+PixmapEdit::resizeEvent(TQResizeEvent *e)
{
Widget::resizeEvent(e);
m_edit->move(0,0);
- m_edit->resize(e->size()-QSize(m_button->width(),-1));
+ m_edit->resize(e->size()-TQSize(m_button->width(),-1));
m_button->move(m_edit->width(),0);
m_button->setFixedSize(m_button->width(), height());
}
bool
-PixmapEdit::eventFilter(QObject *o, QEvent *ev)
+PixmapEdit::eventFilter(TQObject *o, TQEvent *ev)
{
- if(o == m_edit) {
- if(ev->type() == QEvent::MouseButtonPress && static_cast<QMouseEvent*>(ev)->button()==LeftButton) {
+ if(TQT_BASE_OBJECT(o) == m_edit) {
+ if(ev->type() == TQEvent::MouseButtonPress && TQT_TQMOUSEEVENT(ev)->button()==Qt::LeftButton) {
if(m_previewPixmap.height() <= m_edit->height()
&& m_previewPixmap.width() <= m_edit->width())
return false;
m_popup->setPixmap(m_previewPixmap.isNull() ? m_pixmap : m_previewPixmap);
- m_popup->resize(m_previewPixmap.size()+QSize(2*3,2*3));
- QPoint pos = QCursor::pos()+QPoint(3,15);
- QRect screenRect = QApplication::desktop()->availableGeometry( this );
+ m_popup->resize(m_previewPixmap.size()+TQSize(2*3,2*3));
+ TQPoint pos = TQCursor::pos()+TQPoint(3,15);
+ TQRect screenRect = TQApplication::desktop()->availableGeometry( this );
if ((pos.x()+m_popup->width()) > screenRect.width())
pos.setX(screenRect.width()-m_popup->width());
if ((pos.y()+m_popup->height()) > screenRect.height())
- pos.setY(mapToGlobal(QPoint(0,0)).y()-m_popup->height());
+ pos.setY(mapToGlobal(TQPoint(0,0)).y()-m_popup->height());
m_popup->move(pos);
m_popup->show();
}
- else if(ev->type() == QEvent::MouseButtonRelease || ev->type() == QEvent::Hide) {
+ else if(ev->type() == TQEvent::MouseButtonRelease || ev->type() == TQEvent::Hide) {
if(m_popup->isVisible())
m_popup->hide();
}
- else if(ev->type() == QEvent::KeyPress) {
- QKeyEvent* e = static_cast<QKeyEvent*>(ev);
+ else if(ev->type() == TQEvent::KeyPress) {
+ TQKeyEvent* e = TQT_TQKEYEVENT(ev);
if((e->key() == Key_Enter) || (e->key()== Key_Space) || (e->key() == Key_Return)) {
m_button->animateClick();
return true;
diff --git a/lib/koproperty/editors/pixmapedit.h b/lib/koproperty/editors/pixmapedit.h
index 7b0268bf..61f75fba 100644
--- a/lib/koproperty/editors/pixmapedit.h
+++ b/lib/koproperty/editors/pixmapedit.h
@@ -23,28 +23,29 @@
#define KPROPERTY_PIXMAPEDIT_H
#include "../widget.h"
-#include <qpixmap.h>
-#include <qvariant.h>
+#include <tqpixmap.h>
+#include <tqvariant.h>
-class QLabel;
-class QPushButton;
+class TQLabel;
+class TQPushButton;
namespace KoProperty {
class KOPROPERTY_EXPORT PixmapEdit : public Widget
{
Q_OBJECT
+ TQ_OBJECT
public:
- PixmapEdit(Property *property, QWidget *parent=0, const char *name=0);
+ PixmapEdit(Property *property, TQWidget *tqparent=0, const char *name=0);
virtual ~PixmapEdit();
- virtual QVariant value() const;
- virtual void setValue(const QVariant &value, bool emitChange=true);
- virtual void drawViewer(QPainter *p, const QColorGroup &cg, const QRect &r, const QVariant &value);
+ virtual TQVariant value() const;
+ virtual void setValue(const TQVariant &value, bool emitChange=true);
+ virtual void drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value);
- void resizeEvent(QResizeEvent *ev);
- bool eventFilter(QObject *o, QEvent *ev);
+ void resizeEvent(TQResizeEvent *ev);
+ bool eventFilter(TQObject *o, TQEvent *ev);
protected:
virtual void setReadOnlyInternal(bool readOnly);
@@ -54,17 +55,17 @@ class KOPROPERTY_EXPORT PixmapEdit : public Widget
Selected path will be stored in "lastVisitedImagePath" config entry within "Recent Dirs"
config group of application's settings. This entry can be later reused when file dialogs
are opened for selecting image files. */
- QString selectPixmapFileName();
+ TQString selectPixmapFileName();
/*! Selects a new pixmap using "open" file dialog. Can be reimplemented. */
virtual void selectPixmap();
protected:
- QLabel *m_edit;
- QLabel *m_popup;
- QPushButton *m_button;
- QVariant m_recentlyPainted;
- QPixmap m_pixmap, m_scaledPixmap, m_previewPixmap;
+ TQLabel *m_edit;
+ TQLabel *m_popup;
+ TQPushButton *m_button;
+ TQVariant m_recentlyPainted;
+ TQPixmap m_pixmap, m_scaledPixmap, m_previewPixmap;
};
}
diff --git a/lib/koproperty/editors/pointedit.cpp b/lib/koproperty/editors/pointedit.cpp
index 60d74a89..d251e969 100644
--- a/lib/koproperty/editors/pointedit.cpp
+++ b/lib/koproperty/editors/pointedit.cpp
@@ -21,10 +21,10 @@
#include "pointedit.h"
#include "editoritem.h"
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpainter.h>
-#include <qtooltip.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpainter.h>
+#include <tqtooltip.h>
#include <kactivelabel.h>
#include <klocale.h>
@@ -34,17 +34,17 @@
using namespace KoProperty;
-PointEdit::PointEdit(Property *property, QWidget *parent, const char *name)
- : Widget(property, parent, name)
+PointEdit::PointEdit(Property *property, TQWidget *tqparent, const char *name)
+ : Widget(property, tqparent, name)
{
setHasBorders(false);
m_edit = new KActiveLabel(this);
- m_edit->setFocusPolicy(NoFocus);
+ m_edit->setFocusPolicy(TQ_NoFocus);
// m_edit->setIndent(KPROPEDITOR_ITEM_MARGIN);
- m_edit->setPaletteBackgroundColor(palette().active().base());
- m_edit->setWordWrap( QTextEdit::NoWrap );
-// m_edit->setBackgroundMode(Qt::PaletteBase);
-// m_edit->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+ m_edit->setPaletteBackgroundColor(tqpalette().active().base());
+ m_edit->setWordWrap( TQTextEdit::NoWrap );
+// m_edit->setBackgroundMode(TQt::PaletteBase);
+// m_edit->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding);
m_edit->setMinimumHeight(5);
setEditor(m_edit);
// setFocusWidget(m_edit);
@@ -53,33 +53,33 @@ PointEdit::PointEdit(Property *property, QWidget *parent, const char *name)
PointEdit::~PointEdit()
{}
-QVariant
+TQVariant
PointEdit::value() const
{
return m_value;
}
void
-PointEdit::setValue(const QVariant &value, bool emitChange)
+PointEdit::setValue(const TQVariant &value, bool emitChange)
{
m_value = value;
m_edit->selectAll(false);
- m_edit->setText(QString(POINTEDIT_MASK).arg(value.toPoint().x()).arg(value.toPoint().y()));
- QToolTip::add(this, QString("%1, %2").arg(value.toPoint().x()).arg(value.toPoint().y()));
+ m_edit->setText(TQString(POINTEDIT_MASK).tqarg(value.toPoint().x()).tqarg(value.toPoint().y()));
+ TQToolTip::add(this, TQString("%1, %2").tqarg(value.toPoint().x()).tqarg(value.toPoint().y()));
if (emitChange)
emit valueChanged(this);
}
void
-PointEdit::drawViewer(QPainter *p, const QColorGroup &cg, const QRect &r, const QVariant &value)
+PointEdit::drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value)
{
- QRect rect(r);
+ TQRect rect(r);
rect.setBottom(r.bottom()+1);
- Widget::drawViewer(p, cg, rect, QString(POINTEDIT_MASK).arg(value.toPoint().x()).arg(value.toPoint().y()));
+ Widget::drawViewer(p, cg, rect, TQString(POINTEDIT_MASK).tqarg(value.toPoint().x()).tqarg(value.toPoint().y()));
// p->eraseRect(r);
-// p->drawText(r, Qt::AlignLeft | Qt::AlignVCenter | Qt::SingleLine,
-// QString("[ %1, %2 ]").arg(value.toPoint().x()).arg(value.toPoint().y()));
+// p->drawText(r, TQt::AlignLeft | TQt::AlignVCenter | TQt::SingleLine,
+// TQString("[ %1, %2 ]").tqarg(value.toPoint().x()).tqarg(value.toPoint().y()));
}
void
diff --git a/lib/koproperty/editors/pointedit.h b/lib/koproperty/editors/pointedit.h
index bba2fda1..22c9a36a 100644
--- a/lib/koproperty/editors/pointedit.h
+++ b/lib/koproperty/editors/pointedit.h
@@ -23,7 +23,7 @@
#include "../widget.h"
-#include <qvariant.h>
+#include <tqvariant.h>
class KActiveLabel;
@@ -32,22 +32,23 @@ namespace KoProperty {
class KOPROPERTY_EXPORT PointEdit : public Widget
{
Q_OBJECT
+ TQ_OBJECT
public:
- PointEdit(Property *property, QWidget *parent=0, const char *name=0);
+ PointEdit(Property *property, TQWidget *tqparent=0, const char *name=0);
virtual ~PointEdit();
- virtual QVariant value() const;
- virtual void setValue(const QVariant &value, bool emitChange=true);
+ virtual TQVariant value() const;
+ virtual void setValue(const TQVariant &value, bool emitChange=true);
- virtual void drawViewer(QPainter *p, const QColorGroup &cg, const QRect &r, const QVariant &value);
+ virtual void drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value);
protected:
virtual void setReadOnlyInternal(bool readOnly);
private:
KActiveLabel *m_edit;
- QVariant m_value;
+ TQVariant m_value;
};
}
diff --git a/lib/koproperty/editors/rectedit.cpp b/lib/koproperty/editors/rectedit.cpp
index 4f495b60..313e4e53 100644
--- a/lib/koproperty/editors/rectedit.cpp
+++ b/lib/koproperty/editors/rectedit.cpp
@@ -20,10 +20,10 @@
#include "rectedit.h"
#include "editoritem.h"
-#include <qvariant.h>
-#include <qlayout.h>
-#include <qpainter.h>
-#include <qtooltip.h>
+#include <tqvariant.h>
+#include <tqlayout.h>
+#include <tqpainter.h>
+#include <tqtooltip.h>
#include <kactivelabel.h>
#include <klocale.h>
@@ -33,14 +33,14 @@
using namespace KoProperty;
-RectEdit::RectEdit(Property *property, QWidget *parent, const char *name)
- : Widget(property, parent, name)
+RectEdit::RectEdit(Property *property, TQWidget *tqparent, const char *name)
+ : Widget(property, tqparent, name)
{
setHasBorders(false);
m_edit = new KActiveLabel(this);
- m_edit->setFocusPolicy(NoFocus);
- m_edit->setPaletteBackgroundColor(palette().active().base());
- m_edit->setWordWrap( QTextEdit::NoWrap );
+ m_edit->setFocusPolicy(TQ_NoFocus);
+ m_edit->setPaletteBackgroundColor(tqpalette().active().base());
+ m_edit->setWordWrap( TQTextEdit::NoWrap );
m_edit->setMinimumHeight(5);
setEditor(m_edit);
// setFocusWidget(m_edit);
@@ -49,38 +49,38 @@ RectEdit::RectEdit(Property *property, QWidget *parent, const char *name)
RectEdit::~RectEdit()
{}
-QVariant
+TQVariant
RectEdit::value() const
{
return m_value;
}
void
-RectEdit::setValue(const QVariant &value, bool emitChange)
+RectEdit::setValue(const TQVariant &value, bool emitChange)
{
m_value = value;
m_edit->selectAll(false);
- m_edit->setText(QString(RECTEDIT_MASK).arg(value.toRect().x()).
- arg(value.toRect().y()).arg(value.toRect().width()).arg(value.toRect().height()));
- QToolTip::add(this, i18n("Position: %1, %2\nSize: %3 x %4").arg(value.toRect().x()).
- arg(value.toRect().y()).arg(value.toRect().width()).arg(value.toRect().height()));
+ m_edit->setText(TQString(RECTEDIT_MASK).tqarg(value.toRect().x()).
+ tqarg(value.toRect().y()).tqarg(value.toRect().width()).tqarg(value.toRect().height()));
+ TQToolTip::add(this, i18n("Position: %1, %2\nSize: %3 x %4").tqarg(value.toRect().x()).
+ tqarg(value.toRect().y()).tqarg(value.toRect().width()).tqarg(value.toRect().height()));
if (emitChange)
emit valueChanged(this);
}
void
-RectEdit::drawViewer(QPainter *p, const QColorGroup &cg, const QRect &r, const QVariant &value)
+RectEdit::drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value)
{
- QRect rect(r);
+ TQRect rect(r);
rect.setBottom(r.bottom()+1);
Widget::drawViewer(p, cg, rect,
- QString(RECTEDIT_MASK).arg(value.toRect().x()).arg(value.toRect().y())
- .arg(value.toRect().width()).arg(value.toRect().height()));
+ TQString(RECTEDIT_MASK).tqarg(value.toRect().x()).tqarg(value.toRect().y())
+ .tqarg(value.toRect().width()).tqarg(value.toRect().height()));
// p->eraseRect(r);
-// p->drawText(r, Qt::AlignLeft | Qt::AlignVCenter | Qt::SingleLine,
-// QString("[ %1, %2, %3, %4 ]").arg(value.toRect().x()).arg(value.toRect().y())
-// .arg(value.toRect().width()).arg(value.toRect().height()));
+// p->drawText(r, TQt::AlignLeft | TQt::AlignVCenter | TQt::SingleLine,
+// TQString("[ %1, %2, %3, %4 ]").tqarg(value.toRect().x()).tqarg(value.toRect().y())
+// .tqarg(value.toRect().width()).tqarg(value.toRect().height()));
}
void
diff --git a/lib/koproperty/editors/rectedit.h b/lib/koproperty/editors/rectedit.h
index fe1f7e74..261bf7d5 100644
--- a/lib/koproperty/editors/rectedit.h
+++ b/lib/koproperty/editors/rectedit.h
@@ -23,7 +23,7 @@
#include "../widget.h"
-#include <qvariant.h>
+#include <tqvariant.h>
class KActiveLabel;
@@ -32,22 +32,23 @@ namespace KoProperty {
class KOPROPERTY_EXPORT RectEdit : public Widget
{
Q_OBJECT
+ TQ_OBJECT
public:
- RectEdit(Property *property, QWidget *parent=0, const char *name=0);
+ RectEdit(Property *property, TQWidget *tqparent=0, const char *name=0);
virtual ~RectEdit();
- virtual QVariant value() const;
- virtual void setValue(const QVariant &value, bool emitChange=true);
+ virtual TQVariant value() const;
+ virtual void setValue(const TQVariant &value, bool emitChange=true);
- virtual void drawViewer(QPainter *p, const QColorGroup &cg, const QRect &r, const QVariant &value);
+ virtual void drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value);
protected:
virtual void setReadOnlyInternal(bool readOnly);
private:
KActiveLabel *m_edit;
- QVariant m_value;
+ TQVariant m_value;
};
}
diff --git a/lib/koproperty/editors/sizeedit.cpp b/lib/koproperty/editors/sizeedit.cpp
index e8a0c339..db8fb44f 100644
--- a/lib/koproperty/editors/sizeedit.cpp
+++ b/lib/koproperty/editors/sizeedit.cpp
@@ -21,10 +21,10 @@
#include "sizeedit.h"
#include "editoritem.h"
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpainter.h>
-#include <qtooltip.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpainter.h>
+#include <tqtooltip.h>
#include <kactivelabel.h>
#include <klocale.h>
@@ -34,16 +34,16 @@
using namespace KoProperty;
-SizeEdit::SizeEdit(Property *property, QWidget *parent, const char *name)
- : Widget(property, parent, name)
+SizeEdit::SizeEdit(Property *property, TQWidget *tqparent, const char *name)
+ : Widget(property, tqparent, name)
{
setHasBorders(false);
m_edit = new KActiveLabel(this);
- m_edit->setFocusPolicy(NoFocus);
+ m_edit->setFocusPolicy(TQ_NoFocus);
// m_edit->setIndent(KPROPEDITOR_ITEM_MARGIN);
- m_edit->setPaletteBackgroundColor(palette().active().base());
-// m_edit->setBackgroundMode(Qt::PaletteBase);
-// m_edit->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+ m_edit->setPaletteBackgroundColor(tqpalette().active().base());
+// m_edit->setBackgroundMode(TQt::PaletteBase);
+// m_edit->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding);
m_edit->setMinimumHeight(5);
setEditor(m_edit);
// setFocusWidget(m_edit);
@@ -52,34 +52,34 @@ SizeEdit::SizeEdit(Property *property, QWidget *parent, const char *name)
SizeEdit::~SizeEdit()
{}
-QVariant
+TQVariant
SizeEdit::value() const
{
return m_value;
}
void
-SizeEdit::setValue(const QVariant &value, bool emitChange)
+SizeEdit::setValue(const TQVariant &value, bool emitChange)
{
m_value = value;
m_edit->selectAll(false);
- m_edit->setText(QString(SIZEEDIT_MASK).arg(value.toSize().width()).arg(value.toSize().height()));
- QToolTip::add(this, QString("%1 x %2").arg(value.toSize().width()).arg(value.toSize().height()));
+ m_edit->setText(TQString(SIZEEDIT_MASK).tqarg(value.toSize().width()).tqarg(value.toSize().height()));
+ TQToolTip::add(this, TQString("%1 x %2").tqarg(value.toSize().width()).tqarg(value.toSize().height()));
if (emitChange)
emit valueChanged(this);
}
void
-SizeEdit::drawViewer(QPainter *p, const QColorGroup &cg, const QRect &r, const QVariant &value)
+SizeEdit::drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value)
{
- QRect rect(r);
+ TQRect rect(r);
rect.setBottom(r.bottom()+1);
Widget::drawViewer(p, cg, rect,
- QString(SIZEEDIT_MASK).arg(value.toSize().width()).arg(value.toSize().height()));
+ TQString(SIZEEDIT_MASK).tqarg(value.toSize().width()).tqarg(value.toSize().height()));
// p->eraseRect(r);
-// p->drawText(r, Qt::AlignLeft | Qt::AlignVCenter | Qt::SingleLine,
-// QString("[ %1, %2 ]").arg(value.toSize().width()).arg(value.toSize().height()));
+// p->drawText(r, TQt::AlignLeft | TQt::AlignVCenter | TQt::SingleLine,
+// TQString("[ %1, %2 ]").tqarg(value.toSize().width()).tqarg(value.toSize().height()));
}
void
diff --git a/lib/koproperty/editors/sizeedit.h b/lib/koproperty/editors/sizeedit.h
index 0fe96c64..743f630f 100644
--- a/lib/koproperty/editors/sizeedit.h
+++ b/lib/koproperty/editors/sizeedit.h
@@ -23,7 +23,7 @@
#include "../widget.h"
-#include <qvariant.h>
+#include <tqvariant.h>
class KActiveLabel;
@@ -32,22 +32,23 @@ namespace KoProperty {
class KOPROPERTY_EXPORT SizeEdit : public Widget
{
Q_OBJECT
+ TQ_OBJECT
public:
- SizeEdit(Property *property, QWidget *parent=0, const char *name=0);
+ SizeEdit(Property *property, TQWidget *tqparent=0, const char *name=0);
virtual ~SizeEdit();
- virtual QVariant value() const;
- virtual void setValue(const QVariant &value, bool emitChange=true);
+ virtual TQVariant value() const;
+ virtual void setValue(const TQVariant &value, bool emitChange=true);
- virtual void drawViewer(QPainter *p, const QColorGroup &cg, const QRect &r, const QVariant &value);
+ virtual void drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value);
protected:
virtual void setReadOnlyInternal(bool readOnly);
private:
KActiveLabel *m_edit;
- QVariant m_value;
+ TQVariant m_value;
};
}
diff --git a/lib/koproperty/editors/sizepolicyedit.cpp b/lib/koproperty/editors/sizepolicyedit.cpp
index c04c9579..0c616665 100644
--- a/lib/koproperty/editors/sizepolicyedit.cpp
+++ b/lib/koproperty/editors/sizepolicyedit.cpp
@@ -21,28 +21,28 @@
#include "sizepolicyedit.h"
#include "editoritem.h"
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpainter.h>
-#include <qsizepolicy.h>
-#include <qmap.h>
-#include <qtooltip.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpainter.h>
+#include <tqsizepolicy.h>
+#include <tqmap.h>
+#include <tqtooltip.h>
#include <klocale.h>
using namespace KoProperty;
-QMap<QString, QVariant> *SizePolicyEdit::m_spValues = 0;
+TQMap<TQString, TQVariant> *SizePolicyEdit::m_spValues = 0;
-SizePolicyEdit::SizePolicyEdit(Property *property, QWidget *parent, const char *name)
- : Widget(property, parent, name)
+SizePolicyEdit::SizePolicyEdit(Property *property, TQWidget *tqparent, const char *name)
+ : Widget(property, tqparent, name)
{
setHasBorders(false);
-// QHBoxLayout *l = new QHBoxLayout(this, 0, 0);
- m_edit = new QLabel(this);
+// TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0);
+ m_edit = new TQLabel(this);
m_edit->setIndent(KPROPEDITOR_ITEM_MARGIN);
- m_edit->setBackgroundMode(Qt::PaletteBase);
-// m_edit->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+ m_edit->setBackgroundMode(TQt::PaletteBase);
+// m_edit->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding);
m_edit->setMinimumHeight(5);
setEditor(m_edit);
// l->addWidget(m_edit);
@@ -50,14 +50,14 @@ SizePolicyEdit::SizePolicyEdit(Property *property, QWidget *parent, const char *
if(!m_spValues) {
- m_spValues = new QMap<QString, QVariant>();
- (*m_spValues)[i18n("Size Policy", "Fixed")] = QSizePolicy::Fixed;
- (*m_spValues)[i18n("Size Policy", "Minimum")] = QSizePolicy::Minimum;
- (*m_spValues)[i18n("Size Policy", "Maximum")] = QSizePolicy::Maximum;
- (*m_spValues)[i18n("Size Policy", "Preferred")] = QSizePolicy::Preferred;
- (*m_spValues)[i18n("Size Policy", "Expanding")] = QSizePolicy::Expanding;
- (*m_spValues)[i18n("Size Policy", "Minimum Expanding")] = QSizePolicy::MinimumExpanding;
- (*m_spValues)[i18n("Size Policy", "Ignored")] = QSizePolicy::Ignored;
+ m_spValues = new TQMap<TQString, TQVariant>();
+ (*m_spValues)[i18n("Size Policy", "Fixed")] = TQSizePolicy::Fixed;
+ (*m_spValues)[i18n("Size Policy", "Minimum")] = TQSizePolicy::Minimum;
+ (*m_spValues)[i18n("Size Policy", "Maximum")] = TQSizePolicy::Maximum;
+ (*m_spValues)[i18n("Size Policy", "Preferred")] = TQSizePolicy::Preferred;
+ (*m_spValues)[i18n("Size Policy", "Expanding")] = TQSizePolicy::Expanding;
+ (*m_spValues)[i18n("Size Policy", "Minimum Expanding")] = TQSizePolicy::MinimumExpanding;
+ (*m_spValues)[i18n("Size Policy", "Ignored")] = TQSizePolicy::Ignored;
}
}
@@ -67,50 +67,50 @@ SizePolicyEdit::~SizePolicyEdit()
m_spValues = 0;
}
-QVariant
+TQVariant
SizePolicyEdit::value() const
{
return m_value;
}
void
-SizePolicyEdit::setValue(const QVariant &value, bool emitChange)
+SizePolicyEdit::setValue(const TQVariant &value, bool emitChange)
{
m_value = value;
- m_edit->setText(QString("%1/%2/%3/%4").arg(findDescription(value.toSizePolicy().horData())).
- arg(findDescription(value.toSizePolicy().verData())).
- arg(value.toSizePolicy().horStretch()).arg(value.toSizePolicy().verStretch()));
- QToolTip::add(this, m_edit->text());
+ m_edit->setText(TQString("%1/%2/%3/%4").tqarg(findDescription(value.toSizePolicy().horData())).
+ tqarg(findDescription(value.toSizePolicy().verData())).
+ tqarg(value.toSizePolicy().horStretch()).tqarg(value.toSizePolicy().verStretch()));
+ TQToolTip::add(this, m_edit->text());
if (emitChange)
emit valueChanged(this);
}
void
-SizePolicyEdit::drawViewer(QPainter *p, const QColorGroup &cg, const QRect &r, const QVariant &value)
+SizePolicyEdit::drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value)
{
// p->eraseRect(r);
-// p->drawText(r, Qt::AlignLeft | Qt::AlignVCenter | Qt::SingleLine,
- QRect rect(r);
+// p->drawText(r, TQt::AlignLeft | TQt::AlignVCenter | TQt::SingleLine,
+ TQRect rect(r);
rect.setBottom(r.bottom()+1);
Widget::drawViewer(p, cg, rect,
- QString("%1/%2/%3/%4").arg(findDescription(value.toSizePolicy().horData())).
- arg(findDescription(value.toSizePolicy().verData())).
- arg(value.toSizePolicy().horStretch()).arg(value.toSizePolicy().verStretch()));
+ TQString("%1/%2/%3/%4").tqarg(findDescription(value.toSizePolicy().horData())).
+ tqarg(findDescription(value.toSizePolicy().verData())).
+ tqarg(value.toSizePolicy().horStretch()).tqarg(value.toSizePolicy().verStretch()));
}
-QString
-SizePolicyEdit::findDescription(const QVariant &value) const
+TQString
+SizePolicyEdit::findDescription(const TQVariant &value) const
{
if(!m_spValues)
- return QString::null;
+ return TQString();
- QMap<QString, QVariant>::ConstIterator endIt = m_spValues->constEnd();
- for (QMap<QString, QVariant>::ConstIterator it = m_spValues->constBegin(); it != endIt; ++ it) {
+ TQMap<TQString, TQVariant>::ConstIterator endIt = m_spValues->constEnd();
+ for (TQMap<TQString, TQVariant>::ConstIterator it = m_spValues->constBegin(); it != endIt; ++ it) {
if (it.data() == value)
return it.key();
}
- return QString::null;;
+ return TQString();;
}
void
diff --git a/lib/koproperty/editors/sizepolicyedit.h b/lib/koproperty/editors/sizepolicyedit.h
index 0edd3b38..81ffab40 100644
--- a/lib/koproperty/editors/sizepolicyedit.h
+++ b/lib/koproperty/editors/sizepolicyedit.h
@@ -23,35 +23,36 @@
#include "../widget.h"
-#include <qvariant.h>
+#include <tqvariant.h>
-template<class U, class T> class QMap;
+template<class U, class T> class TQMap;
-class QLabel;
+class TQLabel;
namespace KoProperty {
class KOPROPERTY_EXPORT SizePolicyEdit : public Widget
{
Q_OBJECT
+ TQ_OBJECT
public:
- SizePolicyEdit(Property *property, QWidget *parent=0, const char *name=0);
+ SizePolicyEdit(Property *property, TQWidget *tqparent=0, const char *name=0);
virtual ~SizePolicyEdit();
- virtual QVariant value() const;
- virtual void setValue(const QVariant &value, bool emitChange=true);
+ virtual TQVariant value() const;
+ virtual void setValue(const TQVariant &value, bool emitChange=true);
- virtual void drawViewer(QPainter *p, const QColorGroup &cg, const QRect &r, const QVariant &value);
+ virtual void drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value);
protected:
virtual void setReadOnlyInternal(bool readOnly);
- QString findDescription(const QVariant &value) const;
+ TQString findDescription(const TQVariant &value) const;
private:
- QVariant m_value;
- QLabel *m_edit;
- static QMap<QString, QVariant> *m_spValues;
+ TQVariant m_value;
+ TQLabel *m_edit;
+ static TQMap<TQString, TQVariant> *m_spValues;
};
}
diff --git a/lib/koproperty/editors/spinbox.cpp b/lib/koproperty/editors/spinbox.cpp
index 2e4bcc7c..b90485bb 100644
--- a/lib/koproperty/editors/spinbox.cpp
+++ b/lib/koproperty/editors/spinbox.cpp
@@ -22,33 +22,33 @@
#include "property.h"
-#include <qlayout.h>
-#include <qobjectlist.h>
-#include <qvariant.h>
-#include <qpainter.h>
-#include <qlineedit.h>
+#include <tqlayout.h>
+#include <tqobjectlist.h>
+#include <tqvariant.h>
+#include <tqpainter.h>
+#include <tqlineedit.h>
#include <kglobal.h>
#include <klocale.h>
using namespace KoProperty;
-IntSpinBox::IntSpinBox(int lower, int upper, int step, int value, int base, IntEdit *parent, const char *name)
-: KIntSpinBox(lower, upper, step, value, base, parent, name)
+IntSpinBox::IntSpinBox(int lower, int upper, int step, int value, int base, IntEdit *tqparent, const char *name)
+: KIntSpinBox(lower, upper, step, value, base, tqparent, name)
{
- editor()->setAlignment(Qt::AlignLeft);
+ editor()->tqsetAlignment(TQt::AlignLeft);
installEventFilter(editor());
installEventFilter(this);
- QObjectList *spinwidgets = queryList( "QSpinWidget", 0, false, true );
- QSpinWidget* spin = static_cast<QSpinWidget*>(spinwidgets->first());
+ TQObjectList *spinwidgets = queryList( TQSPINWIDGET_OBJECT_NAME_STRING, 0, false, true );
+ TQSpinWidget* spin = static_cast<TQSpinWidget*>(TQT_TQWIDGET(spinwidgets->first()));
if (spin)
spin->installEventFilter(this);
delete spinwidgets;
}
-void IntSpinBox::setValue(const QVariant &value)
+void IntSpinBox::setValue(const TQVariant &value)
{
- if (dynamic_cast<IntEdit*>(parentWidget()) && dynamic_cast<IntEdit*>(parentWidget())->isReadOnly())
+ if (dynamic_cast<IntEdit*>(tqparentWidget()) && dynamic_cast<IntEdit*>(tqparentWidget())->isReadOnly())
return;
if (value.isNull())
editor()->clear();
@@ -57,22 +57,22 @@ void IntSpinBox::setValue(const QVariant &value)
}
bool
-IntSpinBox::eventFilter(QObject *o, QEvent *e)
+IntSpinBox::eventFilter(TQObject *o, TQEvent *e)
{
- if(o == editor())
+ if(TQT_BASE_OBJECT(o) == editor())
{
- if(e->type() == QEvent::KeyPress)
+ if(e->type() == TQEvent::KeyPress)
{
- QKeyEvent* ev = static_cast<QKeyEvent*>(e);
+ TQKeyEvent* ev = TQT_TQKEYEVENT(e);
if((ev->key()==Key_Up || ev->key()==Key_Down) && ev->state() !=ControlButton)
{
- parentWidget()->eventFilter(o, e);
+ tqparentWidget()->eventFilter(o, e);
return true;
}
}
}
- if ((o == editor() || o == this || o->parent() == this)
- && e->type() == QEvent::Wheel && static_cast<IntEdit*>(parentWidget())->isReadOnly())
+ if ((TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(editor()) || TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(this) || TQT_BASE_OBJECT(o->tqparent()) == TQT_BASE_OBJECT(this))
+ && e->type() == TQEvent::Wheel && static_cast<IntEdit*>(tqparentWidget())->isReadOnly())
{
return true; //avoid value changes for read-only widget
}
@@ -83,12 +83,12 @@ IntSpinBox::eventFilter(QObject *o, QEvent *e)
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-IntEdit::IntEdit(Property *property, QWidget *parent, const char *name)
- : Widget(property, parent, name)
+IntEdit::IntEdit(Property *property, TQWidget *tqparent, const char *name)
+ : Widget(property, tqparent, name)
{
- QVariant minVal( property ? property->option("min") : 0 );
- QVariant maxVal( property ? property->option("max") : QVariant() );
- QVariant minValueText( property ? property->option("minValueText") : QVariant() );
+ TQVariant minVal( property ? property->option("min") : 0 );
+ TQVariant maxVal( property ? property->option("max") : TQVariant() );
+ TQVariant minValueText( property ? property->option("minValueText") : TQVariant() );
if (minVal.isNull())
minVal = 0;
if (maxVal.isNull())
@@ -102,22 +102,22 @@ IntEdit::IntEdit(Property *property, QWidget *parent, const char *name)
setLeavesTheSpaceForRevertButton(true);
setFocusWidget(m_edit);
- connect(m_edit, SIGNAL(valueChanged(int)), this, SLOT(slotValueChanged(int)));
+ connect(m_edit, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotValueChanged(int)));
}
IntEdit::~IntEdit()
{}
-QVariant
+TQVariant
IntEdit::value() const
{
if (m_edit->cleanText().isEmpty())
- return QVariant();
+ return TQVariant();
return m_edit->value();
}
void
-IntEdit::setValue(const QVariant &value, bool emitChange)
+IntEdit::setValue(const TQVariant &value, bool emitChange)
{
m_edit->blockSignals(true);
m_edit->setValue(value);
@@ -128,13 +128,13 @@ IntEdit::setValue(const QVariant &value, bool emitChange)
}
void
-IntEdit::drawViewer(QPainter *p, const QColorGroup &cg, const QRect &r, const QVariant &value)
+IntEdit::drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value)
{
- QString valueText = value.toString();
+ TQString valueText = value.toString();
if (property() && property()->hasOptions()) {
//replace min value with minValueText if defined
- QVariant minValue( property()->option("min") );
- QVariant minValueText( property()->option("minValueText") );
+ TQVariant minValue( property()->option("min") );
+ TQVariant minValueText( property()->option("minValueText") );
if (!minValue.isNull() && !minValueText.isNull() && minValue.toInt() == value.toInt()) {
valueText = minValueText.toString();
}
@@ -142,7 +142,7 @@ IntEdit::drawViewer(QPainter *p, const QColorGroup &cg, const QRect &r, const QV
Widget::drawViewer(p, cg, r, valueText);
// p->eraseRect(r);
-// p->drawText(r, Qt::AlignLeft | Qt::AlignVCenter | Qt::SingleLine, valueText);
+// p->drawText(r, TQt::AlignLeft | TQt::AlignVCenter | TQt::SingleLine, valueText);
}
void
@@ -154,8 +154,8 @@ IntEdit::slotValueChanged(int)
void
IntEdit::updateSpinWidgets()
{
- QObjectList *spinwidgets = queryList( "QSpinWidget", 0, false, true );
- QSpinWidget* spin = static_cast<QSpinWidget*>(spinwidgets->first());
+ TQObjectList *spinwidgets = queryList( TQSPINWIDGET_OBJECT_NAME_STRING, 0, false, true );
+ TQSpinWidget* spin = static_cast<TQSpinWidget*>(TQT_TQWIDGET(spinwidgets->first()));
if (spin) {
spin->setUpEnabled(!isReadOnly());
spin->setDownEnabled(!isReadOnly());
@@ -176,36 +176,36 @@ IntEdit::setReadOnlyInternal(bool readOnly)
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-DoubleSpinBox::DoubleSpinBox (double lower, double upper, double step, double value, int precision, DoubleEdit *parent)
-: KDoubleSpinBox(lower, upper, step, value, precision, parent)
+DoubleSpinBox::DoubleSpinBox (double lower, double upper, double step, double value, int precision, DoubleEdit *tqparent)
+: KDoubleSpinBox(lower, upper, step, value, precision, tqparent)
{
- editor()->setAlignment(Qt::AlignLeft);
+ editor()->tqsetAlignment(TQt::AlignLeft);
installEventFilter(editor());
installEventFilter(this);
- QObjectList *spinwidgets = queryList( "QSpinWidget", 0, false, true );
- QSpinWidget* spin = static_cast<QSpinWidget*>(spinwidgets->first());
+ TQObjectList *spinwidgets = queryList( TQSPINWIDGET_OBJECT_NAME_STRING, 0, false, true );
+ TQSpinWidget* spin = static_cast<TQSpinWidget*>(TQT_TQWIDGET(spinwidgets->first()));
if (spin)
spin->installEventFilter(this);
delete spinwidgets;
}
bool
-DoubleSpinBox::eventFilter(QObject *o, QEvent *e)
+DoubleSpinBox::eventFilter(TQObject *o, TQEvent *e)
{
- if(o == editor())
+ if(TQT_BASE_OBJECT(o) == editor())
{
- if(e->type() == QEvent::KeyPress)
+ if(e->type() == TQEvent::KeyPress)
{
- QKeyEvent* ev = static_cast<QKeyEvent*>(e);
+ TQKeyEvent* ev = TQT_TQKEYEVENT(e);
if((ev->key()==Key_Up || ev->key()==Key_Down) && ev->state()!=ControlButton)
{
- parentWidget()->eventFilter(o, e);
+ tqparentWidget()->eventFilter(o, e);
return true;
}
}
}
- if ((o == editor() || o == this || o->parent() == this)
- && e->type() == QEvent::Wheel && static_cast<IntEdit*>(parentWidget())->isReadOnly())
+ if ((TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(editor()) || TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(this) || TQT_BASE_OBJECT(o->tqparent()) == TQT_BASE_OBJECT(this))
+ && e->type() == TQEvent::Wheel && static_cast<IntEdit*>(tqparentWidget())->isReadOnly())
{
return true; //avoid value changes for read-only widget
}
@@ -214,9 +214,9 @@ DoubleSpinBox::eventFilter(QObject *o, QEvent *e)
}
-void DoubleSpinBox::setValue( const QVariant& value )
+void DoubleSpinBox::setValue( const TQVariant& value )
{
- if (dynamic_cast<DoubleEdit*>(parentWidget()) && dynamic_cast<DoubleEdit*>(parentWidget())->isReadOnly())
+ if (dynamic_cast<DoubleEdit*>(tqparentWidget()) && dynamic_cast<DoubleEdit*>(tqparentWidget())->isReadOnly())
return;
if (value.isNull())
editor()->clear();
@@ -226,14 +226,14 @@ void DoubleSpinBox::setValue( const QVariant& value )
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-DoubleEdit::DoubleEdit(Property *property, QWidget *parent, const char *name)
- : Widget(property, parent, name)
+DoubleEdit::DoubleEdit(Property *property, TQWidget *tqparent, const char *name)
+ : Widget(property, tqparent, name)
{
- QVariant minVal( property ? property->option("min") : 0 );
- QVariant maxVal( property ? property->option("max") : QVariant() );
- QVariant step( property ? property->option("step") : QVariant());
- QVariant precision( property ? property->option("precision") : QVariant());
- QVariant minValueText( property ? property->option("minValueText") : QVariant() );
+ TQVariant minVal( property ? property->option("min") : 0 );
+ TQVariant maxVal( property ? property->option("max") : TQVariant() );
+ TQVariant step( property ? property->option("step") : TQVariant());
+ TQVariant precision( property ? property->option("precision") : TQVariant());
+ TQVariant minValueText( property ? property->option("minValueText") : TQVariant() );
if (minVal.isNull())
minVal = 0;
if (maxVal.isNull())
@@ -247,28 +247,28 @@ DoubleEdit::DoubleEdit(Property *property, QWidget *parent, const char *name)
0, precision.toInt(), this);
if (!minValueText.isNull())
m_edit->setSpecialValueText(minValueText.toString());
- m_edit->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+ m_edit->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding);
m_edit->setMinimumHeight(5);
setEditor(m_edit);
setLeavesTheSpaceForRevertButton(true);
setFocusWidget(m_edit);
- connect(m_edit, SIGNAL(valueChanged(double)), this, SLOT(slotValueChanged(double)));
+ connect(m_edit, TQT_SIGNAL(valueChanged(double)), this, TQT_SLOT(slotValueChanged(double)));
}
DoubleEdit::~DoubleEdit()
{}
-QVariant
+TQVariant
DoubleEdit::value() const
{
if (m_edit->cleanText().isEmpty())
- return QVariant();
+ return TQVariant();
return m_edit->value();
}
void
-DoubleEdit::setValue(const QVariant &value, bool emitChange)
+DoubleEdit::setValue(const TQVariant &value, bool emitChange)
{
m_edit->blockSignals(true);
m_edit->setValue(value);
@@ -279,23 +279,23 @@ DoubleEdit::setValue(const QVariant &value, bool emitChange)
}
void
-DoubleEdit::drawViewer(QPainter *p, const QColorGroup &cg, const QRect &r, const QVariant &value)
+DoubleEdit::drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value)
{
- QString valueText;
+ TQString valueText;
if (property() && property()->hasOptions()) {
//replace min value with minValueText if defined
- QVariant minValue( property()->option("min") );
- QVariant minValueText( property()->option("minValueText") );
+ TQVariant minValue( property()->option("min") );
+ TQVariant minValueText( property()->option("minValueText") );
if (!minValue.isNull() && !minValueText.isNull() && minValue.toString().toDouble() == value.toString().toDouble()) {
valueText = minValueText.toString();
}
}
if (valueText.isEmpty())
- valueText = QString(value.toString()).replace('.', KGlobal::locale()->decimalSymbol());
+ valueText = TQString(value.toString()).tqreplace('.', KGlobal::locale()->decimalSymbol());
Widget::drawViewer(p, cg, r, valueText);
// p->eraseRect(r);
-// p->drawText(r, Qt::AlignLeft | Qt::AlignVCenter | Qt::SingleLine, valueText);
+// p->drawText(r, TQt::AlignLeft | TQt::AlignVCenter | TQt::SingleLine, valueText);
}
void
@@ -307,8 +307,8 @@ DoubleEdit::slotValueChanged(double)
void
DoubleEdit::updateSpinWidgets()
{
- QObjectList *spinwidgets = queryList( "QSpinWidget", 0, false, true );
- QSpinWidget* spin = static_cast<QSpinWidget*>(spinwidgets->first());
+ TQObjectList *spinwidgets = queryList( TQSPINWIDGET_OBJECT_NAME_STRING, 0, false, true );
+ TQSpinWidget* spin = static_cast<TQSpinWidget*>(TQT_TQWIDGET(spinwidgets->first()));
if (spin) {
spin->setUpEnabled(!isReadOnly());
spin->setDownEnabled(!isReadOnly());
diff --git a/lib/koproperty/editors/spinbox.h b/lib/koproperty/editors/spinbox.h
index 527aae4f..d16cc3e9 100644
--- a/lib/koproperty/editors/spinbox.h
+++ b/lib/koproperty/editors/spinbox.h
@@ -35,29 +35,31 @@ class DoubleEdit;
class IntSpinBox : public KIntSpinBox
{
Q_OBJECT
+ TQ_OBJECT
public:
IntSpinBox(int lower, int upper, int step, int value, int base=10,
- IntEdit *parent=0, const char *name=0);
+ IntEdit *tqparent=0, const char *name=0);
virtual ~IntSpinBox() {;}
- virtual void setValue(const QVariant &value);
+ virtual void setValue(const TQVariant &value);
- virtual bool eventFilter(QObject *o, QEvent *e);
- QLineEdit * editor () const { return KIntSpinBox::editor(); }
+ virtual bool eventFilter(TQObject *o, TQEvent *e);
+ TQLineEdit * editor () const { return KIntSpinBox::editor(); }
};
class KOPROPERTY_EXPORT IntEdit : public Widget
{
Q_OBJECT
+ TQ_OBJECT
public:
- IntEdit(Property *property, QWidget *parent=0, const char *name=0);
+ IntEdit(Property *property, TQWidget *tqparent=0, const char *name=0);
virtual ~IntEdit();
- virtual QVariant value() const;
- virtual void setValue(const QVariant &value, bool emitChange=true);
- virtual void drawViewer(QPainter *p, const QColorGroup &cg, const QRect &r, const QVariant &value);
+ virtual TQVariant value() const;
+ virtual void setValue(const TQVariant &value, bool emitChange=true);
+ virtual void drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value);
protected:
virtual void setReadOnlyInternal(bool readOnly);
@@ -75,31 +77,33 @@ class KOPROPERTY_EXPORT IntEdit : public Widget
class DoubleSpinBox : public KDoubleSpinBox
{
Q_OBJECT
+ TQ_OBJECT
public:
//! \todo Support setting precision limits, step, etc.
DoubleSpinBox(double lower, double upper, double step, double value=0,
- int precision=2, DoubleEdit *parent=0);
+ int precision=2, DoubleEdit *tqparent=0);
virtual ~DoubleSpinBox() {;}
- virtual bool eventFilter(QObject *o, QEvent *e);
- QLineEdit * editor () const { return KDoubleSpinBox::editor(); }
+ virtual bool eventFilter(TQObject *o, TQEvent *e);
+ TQLineEdit * editor () const { return KDoubleSpinBox::editor(); }
public slots:
- virtual void setValue( const QVariant& value );
+ virtual void setValue( const TQVariant& value );
};
class KOPROPERTY_EXPORT DoubleEdit : public Widget
{
Q_OBJECT
+ TQ_OBJECT
public:
- DoubleEdit(Property *property, QWidget *parent=0, const char *name=0);
+ DoubleEdit(Property *property, TQWidget *tqparent=0, const char *name=0);
virtual ~DoubleEdit();
- virtual QVariant value() const;
- virtual void setValue(const QVariant &value, bool emitChange=true);
- virtual void drawViewer(QPainter *p, const QColorGroup &cg, const QRect &r, const QVariant &value);
+ virtual TQVariant value() const;
+ virtual void setValue(const TQVariant &value, bool emitChange=true);
+ virtual void drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value);
protected:
virtual void setReadOnlyInternal(bool readOnly);
diff --git a/lib/koproperty/editors/stringedit.cpp b/lib/koproperty/editors/stringedit.cpp
index 8c58b511..d878efa1 100644
--- a/lib/koproperty/editors/stringedit.cpp
+++ b/lib/koproperty/editors/stringedit.cpp
@@ -20,37 +20,37 @@
#include "stringedit.h"
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qvariant.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqvariant.h>
using namespace KoProperty;
-StringEdit::StringEdit(Property *property, QWidget *parent, const char *name)
- : Widget(property, parent, name)
+StringEdit::StringEdit(Property *property, TQWidget *tqparent, const char *name)
+ : Widget(property, tqparent, name)
{
- QHBoxLayout *l = new QHBoxLayout(this, 0, 0);
- m_edit = new QLineEdit(this);
- m_edit->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+ TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0);
+ m_edit = new TQLineEdit(this);
+ m_edit->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding);
m_edit->setMargin(1);
m_edit->setMinimumHeight(5);
l->addWidget(m_edit);
setFocusWidget(m_edit);
- connect(m_edit, SIGNAL(textChanged(const QString&)), this, SLOT(slotValueChanged(const QString&)));
+ connect(m_edit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotValueChanged(const TQString&)));
}
StringEdit::~StringEdit()
{}
-QVariant
+TQVariant
StringEdit::value() const
{
return m_edit->text();
}
void
-StringEdit::setValue(const QVariant &value, bool emitChange)
+StringEdit::setValue(const TQVariant &value, bool emitChange)
{
m_edit->blockSignals(true);
m_edit->setText(value.toString());
@@ -60,7 +60,7 @@ StringEdit::setValue(const QVariant &value, bool emitChange)
}
void
-StringEdit::slotValueChanged(const QString &)
+StringEdit::slotValueChanged(const TQString &)
{
emit valueChanged(this);
}
diff --git a/lib/koproperty/editors/stringedit.h b/lib/koproperty/editors/stringedit.h
index 69dd45a2..fff36609 100644
--- a/lib/koproperty/editors/stringedit.h
+++ b/lib/koproperty/editors/stringedit.h
@@ -23,29 +23,30 @@
#include "../widget.h"
-class QLineEdit;
+class TQLineEdit;
namespace KoProperty {
class KOPROPERTY_EXPORT StringEdit : public Widget
{
Q_OBJECT
+ TQ_OBJECT
public:
- StringEdit(Property *property, QWidget *parent=0, const char *name=0);
+ StringEdit(Property *property, TQWidget *tqparent=0, const char *name=0);
virtual ~StringEdit();
- virtual QVariant value() const;
- virtual void setValue(const QVariant &value, bool emitChange=true);
+ virtual TQVariant value() const;
+ virtual void setValue(const TQVariant &value, bool emitChange=true);
protected:
virtual void setReadOnlyInternal(bool readOnly);
protected slots:
- void slotValueChanged(const QString&);
+ void slotValueChanged(const TQString&);
protected:
- QLineEdit *m_edit;
+ TQLineEdit *m_edit;
};
}
diff --git a/lib/koproperty/editors/stringlistedit.cpp b/lib/koproperty/editors/stringlistedit.cpp
index 44238ff9..eb4dd659 100644
--- a/lib/koproperty/editors/stringlistedit.cpp
+++ b/lib/koproperty/editors/stringlistedit.cpp
@@ -20,12 +20,12 @@
#include "stringlistedit.h"
-#include <qlineedit.h>
-#include <qlayout.h>
-#include <qdialog.h>
-#include <qpainter.h>
-#include <qvariant.h>
-#include <qpushbutton.h>
+#include <tqlineedit.h>
+#include <tqlayout.h>
+#include <tqdialog.h>
+#include <tqpainter.h>
+#include <tqvariant.h>
+#include <tqpushbutton.h>
#include <keditlistbox.h>
#include <kdialogbase.h>
@@ -37,38 +37,38 @@
using namespace KoProperty;
-StringListEdit::StringListEdit(Property *property, QWidget *parent, const char *name)
- : Widget(property, parent, name)
+StringListEdit::StringListEdit(Property *property, TQWidget *tqparent, const char *name)
+ : Widget(property, tqparent, name)
{
setHasBorders(false);
- QHBoxLayout *l = new QHBoxLayout(this, 0, 0);
+ TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0);
- m_edit = new QLineEdit(this);
+ m_edit = new TQLineEdit(this);
m_edit->setLineWidth(0);
m_edit->setReadOnly(true);
- m_edit->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+ m_edit->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding);
m_edit->setMinimumHeight(5);
l->addWidget(m_edit);
- m_selectButton = new QPushButton("...", this);
- m_selectButton->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Expanding);
+ m_selectButton = new TQPushButton("...", this);
+ m_selectButton->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Expanding);
l->addWidget(m_selectButton);
setFocusWidget(m_selectButton);
- connect(m_selectButton, SIGNAL(clicked()), this, SLOT(showEditor()));
+ connect(m_selectButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(showEditor()));
}
StringListEdit::~StringListEdit()
{}
-QVariant
+TQVariant
StringListEdit::value() const
{
return m_list;
}
void
-StringListEdit::setValue(const QVariant &value, bool emitChange)
+StringListEdit::setValue(const TQVariant &value, bool emitChange)
{
m_list = value.toStringList();
m_edit->setText(value.toStringList().join(", "));
@@ -77,24 +77,24 @@ StringListEdit::setValue(const QVariant &value, bool emitChange)
}
void
-StringListEdit::drawViewer(QPainter *p, const QColorGroup &cg, const QRect &r, const QVariant &value)
+StringListEdit::drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value)
{
// p->eraseRect(r);
-// p->drawText(r, Qt::AlignLeft | Qt::AlignVCenter | Qt::SingleLine, value.toStringList().join(", "));
+// p->drawText(r, TQt::AlignLeft | TQt::AlignVCenter | TQt::SingleLine, value.toStringList().join(", "));
Widget::drawViewer(p, cg, r, value.toStringList().join(", "));
}
void
StringListEdit::showEditor()
{
- KDialogBase dialog(this->topLevelWidget(), "stringlist_dialog", true, i18n("Edit List of Items"),
+ KDialogBase dialog(this->tqtopLevelWidget(), "stringlist_dialog", true, i18n("Edit List of Items"),
KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, false);
- KEditListBox *edit = new KEditListBox(i18n("Contents of %1").arg(property()->caption()), &dialog, "editlist");
+ KEditListBox *edit = new KEditListBox(i18n("Contents of %1").tqarg(property()->caption()), &dialog, "editlist");
dialog.setMainWidget(edit);
edit->insertStringList(m_list);
- if(dialog.exec() == QDialog::Accepted)
+ if(dialog.exec() == TQDialog::Accepted)
{
m_list = edit->items();
m_edit->setText(m_list.join(", "));
diff --git a/lib/koproperty/editors/stringlistedit.h b/lib/koproperty/editors/stringlistedit.h
index 0370e98a..846e2362 100644
--- a/lib/koproperty/editors/stringlistedit.h
+++ b/lib/koproperty/editors/stringlistedit.h
@@ -23,25 +23,26 @@
#include "../widget.h"
-#include <qstringlist.h>
+#include <tqstringlist.h>
-class QLineEdit;
-class QPushButton;
+class TQLineEdit;
+class TQPushButton;
namespace KoProperty {
class KOPROPERTY_EXPORT StringListEdit : public Widget
{
Q_OBJECT
+ TQ_OBJECT
public:
- StringListEdit(Property *property, QWidget *parent=0, const char *name=0);
+ StringListEdit(Property *property, TQWidget *tqparent=0, const char *name=0);
virtual ~StringListEdit();
- virtual QVariant value() const;
- virtual void setValue(const QVariant &value, bool emitChange=true);
+ virtual TQVariant value() const;
+ virtual void setValue(const TQVariant &value, bool emitChange=true);
- virtual void drawViewer(QPainter *p, const QColorGroup &cg, const QRect &r, const QVariant &value);
+ virtual void drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value);
protected:
virtual void setReadOnlyInternal(bool readOnly);
@@ -50,9 +51,9 @@ class KOPROPERTY_EXPORT StringListEdit : public Widget
void showEditor();
private:
- QLineEdit *m_edit;
- QStringList m_list;
- QPushButton *m_selectButton;
+ TQLineEdit *m_edit;
+ TQStringList m_list;
+ TQPushButton *m_selectButton;
};
}
diff --git a/lib/koproperty/editors/symbolcombo.cpp b/lib/koproperty/editors/symbolcombo.cpp
index ee0056bd..289badbb 100644
--- a/lib/koproperty/editors/symbolcombo.cpp
+++ b/lib/koproperty/editors/symbolcombo.cpp
@@ -18,11 +18,11 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qlineedit.h>
-#include <qpushbutton.h>
-#include <qlayout.h>
-#include <qpainter.h>
-#include <qvariant.h>
+#include <tqlineedit.h>
+#include <tqpushbutton.h>
+#include <tqlayout.h>
+#include <tqpainter.h>
+#include <tqvariant.h>
#include <kcharselect.h>
#include <klocale.h>
@@ -32,51 +32,47 @@
using namespace KoProperty;
-SymbolCombo::SymbolCombo(Property *property, QWidget *parent, const char *name)
- : Widget(property, parent, name)
+SymbolCombo::SymbolCombo(Property *property, TQWidget *tqparent, const char *name)
+ : Widget(property, tqparent, name)
{
setHasBorders(false);
- QHBoxLayout *l = new QHBoxLayout(this);
+ TQHBoxLayout *l = new TQHBoxLayout(this);
- m_edit = new QLineEdit(this);
+ m_edit = new TQLineEdit(this);
m_edit->setLineWidth(0);
m_edit->setReadOnly(true);
- m_edit->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+ m_edit->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding);
m_edit->setMinimumHeight(5);
m_edit->setMaxLength(1);
l->addWidget(m_edit);
- m_select = new QPushButton("...", this);
- m_select->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::MinimumExpanding);
+ m_select = new TQPushButton("...", this);
+ m_select->tqsetSizePolicy(TQSizePolicy::Maximum, TQSizePolicy::MinimumExpanding);
m_select->setMinimumHeight(5);
l->addWidget(m_select);
- connect(m_select, SIGNAL(clicked()), this, SLOT(selectChar()));
- connect(m_edit, SIGNAL(textChanged(const QString&)), this, SLOT(slotValueChanged(const QString&)));
+ connect(m_select, TQT_SIGNAL(clicked()), this, TQT_SLOT(selectChar()));
+ connect(m_edit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotValueChanged(const TQString&)));
}
SymbolCombo::~SymbolCombo()
{}
-QVariant
+TQVariant
SymbolCombo::value() const
{
if (!(m_edit->text().isNull()))
- return m_edit->text().at(0).unicode();
+ return m_edit->text().tqat(0).tqunicode();
else
return 0;
}
void
-SymbolCombo::setValue(const QVariant &value, bool emitChange)
+SymbolCombo::setValue(const TQVariant &value, bool emitChange)
{
-#if QT_VERSION >= 0x030100
if (!(value.isNull()))
-#else
- if (value.canCast(QVariant::Int))
-#endif
{
m_edit->blockSignals(true);
- m_edit->setText(QChar(value.toInt()));
+ m_edit->setText(TQChar(value.toInt()));
m_edit->blockSignals(false);
if (emitChange)
emit valueChanged(this);
@@ -84,17 +80,17 @@ SymbolCombo::setValue(const QVariant &value, bool emitChange)
}
void
-SymbolCombo::drawViewer(QPainter *p, const QColorGroup &cg, const QRect &r, const QVariant &value)
+SymbolCombo::drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value)
{
// p->eraseRect(r);
-// p->drawText(r, Qt::AlignLeft | Qt::AlignVCenter | Qt::SingleLine, QChar(value.toInt()));
- Widget::drawViewer(p, cg, r, QString( QChar(value.toInt()) ));
+// p->drawText(r, TQt::AlignLeft | TQt::AlignVCenter | TQt::SingleLine, TQChar(value.toInt()));
+ Widget::drawViewer(p, cg, r, TQString( TQChar(value.toInt()) ));
}
void
SymbolCombo::selectChar()
{
- KDialogBase dialog(this->topLevelWidget(), "charselect_dialog", true, i18n("Select Char"),
+ KDialogBase dialog(this->tqtopLevelWidget(), "charselect_dialog", true, i18n("Select Char"),
KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, false);
KCharSelect *select = new KCharSelect(&dialog, "select_char");
@@ -103,12 +99,12 @@ SymbolCombo::selectChar()
if (!(m_edit->text().isNull()))
select->setChar(m_edit->text().at(0));
- if (dialog.exec() == QDialog::Accepted)
+ if (dialog.exec() == TQDialog::Accepted)
m_edit->setText(select->chr());
}
void
-SymbolCombo::slotValueChanged(const QString&)
+SymbolCombo::slotValueChanged(const TQString&)
{
emit valueChanged(this);
}
diff --git a/lib/koproperty/editors/symbolcombo.h b/lib/koproperty/editors/symbolcombo.h
index 5812d4a8..7f3e89e1 100644
--- a/lib/koproperty/editors/symbolcombo.h
+++ b/lib/koproperty/editors/symbolcombo.h
@@ -23,34 +23,35 @@
#include "../widget.h"
-class QLineEdit;
-class QPushButton;
+class TQLineEdit;
+class TQPushButton;
namespace KoProperty {
class KOPROPERTY_EXPORT SymbolCombo : public Widget
{
Q_OBJECT
+ TQ_OBJECT
public:
- SymbolCombo(Property *property, QWidget *parent=0, const char *name=0);
+ SymbolCombo(Property *property, TQWidget *tqparent=0, const char *name=0);
virtual ~SymbolCombo();
- virtual QVariant value() const;
- virtual void setValue(const QVariant &value, bool emitChange=true);
+ virtual TQVariant value() const;
+ virtual void setValue(const TQVariant &value, bool emitChange=true);
- virtual void drawViewer(QPainter *p, const QColorGroup &cg, const QRect &r, const QVariant &value);
+ virtual void drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value);
protected:
virtual void setReadOnlyInternal(bool readOnly);
protected slots:
void selectChar();
- void slotValueChanged(const QString &text);
+ void slotValueChanged(const TQString &text);
private:
- QLineEdit *m_edit;
- QPushButton *m_select;
+ TQLineEdit *m_edit;
+ TQPushButton *m_select;
};
}
diff --git a/lib/koproperty/editors/timeedit.cpp b/lib/koproperty/editors/timeedit.cpp
index 3d38d39b..25972f0b 100644
--- a/lib/koproperty/editors/timeedit.cpp
+++ b/lib/koproperty/editors/timeedit.cpp
@@ -20,43 +20,43 @@
#include "timeedit.h"
-#include <qdatetimeedit.h>
-#include <qrangecontrol.h>
-#include <qobjectlist.h>
-#include <qpainter.h>
-#include <qlayout.h>
-#include <qvariant.h>
-#include <qdatetime.h>
+#include <tqdatetimeedit.h>
+#include <tqrangecontrol.h>
+#include <tqobjectlist.h>
+#include <tqpainter.h>
+#include <tqlayout.h>
+#include <tqvariant.h>
+#include <tqdatetime.h>
#include <klocale.h>
#include <kglobal.h>
using namespace KoProperty;
-TimeEdit::TimeEdit(Property *property, QWidget *parent, const char *name)
- : Widget(property, parent, name)
+TimeEdit::TimeEdit(Property *property, TQWidget *tqparent, const char *name)
+ : Widget(property, tqparent, name)
{
- QHBoxLayout *l = new QHBoxLayout(this, 0, 0);
- m_edit = new QTimeEdit(this);
- m_edit->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+ TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0);
+ m_edit = new TQTimeEdit(this);
+ m_edit->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding);
m_edit->setMinimumHeight(5);
l->addWidget(m_edit);
setLeavesTheSpaceForRevertButton(true);
- connect(m_edit, SIGNAL(valueChanged(const QTime&)), this, SLOT(slotValueChanged(const QTime&)));
+ connect(m_edit, TQT_SIGNAL(valueChanged(const TQTime&)), this, TQT_SLOT(slotValueChanged(const TQTime&)));
}
TimeEdit::~TimeEdit()
{}
-QVariant
+TQVariant
TimeEdit::value() const
{
return m_edit->time();
}
void
-TimeEdit::setValue(const QVariant &value, bool emitChange)
+TimeEdit::setValue(const TQVariant &value, bool emitChange)
{
m_edit->blockSignals(true);
m_edit->setTime(value.toTime());
@@ -66,14 +66,14 @@ TimeEdit::setValue(const QVariant &value, bool emitChange)
}
void
-TimeEdit::drawViewer(QPainter *p, const QColorGroup &cg, const QRect &r, const QVariant &value)
+TimeEdit::drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value)
{
Widget::drawViewer(p, cg, r, KGlobal::locale()->formatTime(value.toTime(), true /* include sec*/));
-// p->drawText(r, Qt::AlignLeft | Qt::AlignVCenter | Qt::SingleLine, KGlobal::locale()->formatTime(value.toTime(), true /* include sec*/));
+// p->drawText(r, TQt::AlignLeft | TQt::AlignVCenter | TQt::SingleLine, KGlobal::locale()->formatTime(value.toTime(), true /* include sec*/));
}
void
-TimeEdit::slotValueChanged(const QTime&)
+TimeEdit::slotValueChanged(const TQTime&)
{
emit valueChanged(this);
}
diff --git a/lib/koproperty/editors/timeedit.h b/lib/koproperty/editors/timeedit.h
index d41f4633..1dbec46b 100644
--- a/lib/koproperty/editors/timeedit.h
+++ b/lib/koproperty/editors/timeedit.h
@@ -23,31 +23,32 @@
#include "../widget.h"
-class QTimeEdit;
+class TQTimeEdit;
namespace KoProperty {
class KOPROPERTY_EXPORT TimeEdit : public Widget
{
Q_OBJECT
+ TQ_OBJECT
public:
- TimeEdit(Property *property, QWidget *parent=0, const char *name=0);
+ TimeEdit(Property *property, TQWidget *tqparent=0, const char *name=0);
virtual ~TimeEdit();
- virtual QVariant value() const;
- virtual void setValue(const QVariant &value, bool emitChange=true);
+ virtual TQVariant value() const;
+ virtual void setValue(const TQVariant &value, bool emitChange=true);
- virtual void drawViewer(QPainter *p, const QColorGroup &cg, const QRect &r, const QVariant &value);
+ virtual void drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value);
protected:
virtual void setReadOnlyInternal(bool readOnly);
protected slots:
- void slotValueChanged(const QTime &time);
+ void slotValueChanged(const TQTime &time);
private:
- QTimeEdit *m_edit;
+ TQTimeEdit *m_edit;
};
}
diff --git a/lib/koproperty/editors/urledit.cpp b/lib/koproperty/editors/urledit.cpp
index 41cd5efe..fc16268f 100644
--- a/lib/koproperty/editors/urledit.cpp
+++ b/lib/koproperty/editors/urledit.cpp
@@ -20,8 +20,8 @@
#include "urledit.h"
-#include <qlayout.h>
-#include <qvariant.h>
+#include <tqlayout.h>
+#include <tqvariant.h>
#include <kurlrequester.h>
#include <klineedit.h>
@@ -31,32 +31,32 @@
using namespace KoProperty;
-URLEdit::URLEdit(Property *property, QWidget *parent, const char *name)
- : Widget(property, parent, name)
+URLEdit::URLEdit(Property *property, TQWidget *tqparent, const char *name)
+ : Widget(property, tqparent, name)
{
- QHBoxLayout *l = new QHBoxLayout(this, 0, 0);
+ TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0);
m_edit = new KURLRequester(this);
- m_edit->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+ m_edit->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding);
m_edit->setMinimumHeight(5);
l->addWidget(m_edit);
setProperty(property);
- connect(m_edit, SIGNAL(textChanged(const QString&)), this, SLOT(slotValueChanged(const QString&)));
- m_edit->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
+ connect(m_edit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotValueChanged(const TQString&)));
+ m_edit->tqsetSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
}
URLEdit::~URLEdit()
{}
-QVariant
+TQVariant
URLEdit::value() const
{
return m_edit->url();
}
void
-URLEdit::setValue(const QVariant &value, bool emitChange)
+URLEdit::setValue(const TQVariant &value, bool emitChange)
{
m_edit->blockSignals(true);
m_edit->setURL(value.toString());
@@ -66,7 +66,7 @@ URLEdit::setValue(const QVariant &value, bool emitChange)
}
void
-URLEdit::slotValueChanged(const QString&)
+URLEdit::slotValueChanged(const TQString&)
{
emit valueChanged(this);
}
diff --git a/lib/koproperty/editors/urledit.h b/lib/koproperty/editors/urledit.h
index 7bebf7b1..167738df 100644
--- a/lib/koproperty/editors/urledit.h
+++ b/lib/koproperty/editors/urledit.h
@@ -30,13 +30,14 @@ namespace KoProperty {
class KOPROPERTY_EXPORT URLEdit : public Widget
{
Q_OBJECT
+ TQ_OBJECT
public:
- URLEdit(Property *property, QWidget *parent=0, const char *name=0);
+ URLEdit(Property *property, TQWidget *tqparent=0, const char *name=0);
virtual ~URLEdit();
- virtual QVariant value() const;
- virtual void setValue(const QVariant &value, bool emitChange=true);
+ virtual TQVariant value() const;
+ virtual void setValue(const TQVariant &value, bool emitChange=true);
virtual void setProperty(Property *property);
@@ -44,7 +45,7 @@ class KOPROPERTY_EXPORT URLEdit : public Widget
virtual void setReadOnlyInternal(bool readOnly);
protected slots:
- void slotValueChanged(const QString &url);
+ void slotValueChanged(const TQString &url);
private:
KURLRequester *m_edit;