summaryrefslogtreecommitdiffstats
path: root/lib/widgets
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-14 16:45:05 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-14 16:45:05 +0000
commit48d4a26399959121f33d2bc3bfe51c7827b654fc (patch)
tree5ae5e6e00d3ba330b7b8be9bc097154b6bc739e8 /lib/widgets
parent7e701ace6592d09e1f2c0cf28c7d6d872d78f4f5 (diff)
downloadtdevelop-48d4a26399959121f33d2bc3bfe51c7827b654fc.tar.gz
tdevelop-48d4a26399959121f33d2bc3bfe51c7827b654fc.zip
TQt4 port kdevelop
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1236710 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'lib/widgets')
-rw-r--r--lib/widgets/fancylistviewitem.cpp8
-rw-r--r--lib/widgets/fancylistviewitem.h8
-rw-r--r--lib/widgets/flagboxes.cpp90
-rw-r--r--lib/widgets/flagboxes.h39
-rw-r--r--lib/widgets/kcomboview.cpp4
-rw-r--r--lib/widgets/kcomboview.h3
-rw-r--r--lib/widgets/kdevhtmlpart.cpp16
-rw-r--r--lib/widgets/kdevhtmlpart.h1
-rw-r--r--lib/widgets/kdevtabwidget.cpp6
-rw-r--r--lib/widgets/klistviewaction.cpp8
-rw-r--r--lib/widgets/klistviewaction.h4
-rw-r--r--lib/widgets/ksavealldialog.cpp16
-rw-r--r--lib/widgets/ksavealldialog.h6
-rw-r--r--lib/widgets/processlinemaker.cpp4
-rw-r--r--lib/widgets/processlinemaker.h5
-rw-r--r--lib/widgets/processwidget.cpp34
-rw-r--r--lib/widgets/processwidget.h7
-rw-r--r--lib/widgets/propeditor/Mainpage.dox2
-rw-r--r--lib/widgets/propeditor/childproperty.cpp8
-rw-r--r--lib/widgets/propeditor/childproperty.h6
-rw-r--r--lib/widgets/propeditor/multiproperty.cpp4
-rw-r--r--lib/widgets/propeditor/multiproperty.h2
-rw-r--r--lib/widgets/propeditor/pcheckbox.cpp10
-rw-r--r--lib/widgets/propeditor/pcheckbox.h3
-rw-r--r--lib/widgets/propeditor/pcolorbutton.cpp14
-rw-r--r--lib/widgets/propeditor/pcolorbutton.h3
-rw-r--r--lib/widgets/propeditor/pcolorcombo.cpp10
-rw-r--r--lib/widgets/propeditor/pcolorcombo.h3
-rw-r--r--lib/widgets/propeditor/pcombobox.cpp16
-rw-r--r--lib/widgets/propeditor/pcombobox.h5
-rw-r--r--lib/widgets/propeditor/pcursoredit.cpp4
-rw-r--r--lib/widgets/propeditor/pcursoredit.h3
-rw-r--r--lib/widgets/propeditor/pdateedit.cpp12
-rw-r--r--lib/widgets/propeditor/pdateedit.h7
-rw-r--r--lib/widgets/propeditor/pdatetimeedit.cpp10
-rw-r--r--lib/widgets/propeditor/pdatetimeedit.h7
-rw-r--r--lib/widgets/propeditor/pdoublenuminput.cpp14
-rw-r--r--lib/widgets/propeditor/pdoublenuminput.h9
-rw-r--r--lib/widgets/propeditor/pdummywidget.cpp6
-rw-r--r--lib/widgets/propeditor/pdummywidget.h5
-rw-r--r--lib/widgets/propeditor/pfontbutton.cpp12
-rw-r--r--lib/widgets/propeditor/pfontbutton.h3
-rw-r--r--lib/widgets/propeditor/pfontcombo.cpp6
-rw-r--r--lib/widgets/propeditor/pfontcombo.h5
-rw-r--r--lib/widgets/propeditor/plineedit.cpp6
-rw-r--r--lib/widgets/propeditor/plineedit.h3
-rw-r--r--lib/widgets/propeditor/plinestyleedit.cpp6
-rw-r--r--lib/widgets/propeditor/plinestyleedit.h3
-rw-r--r--lib/widgets/propeditor/ppixmapedit.cpp20
-rw-r--r--lib/widgets/propeditor/ppixmapedit.h3
-rw-r--r--lib/widgets/propeditor/ppointedit.cpp10
-rw-r--r--lib/widgets/propeditor/ppointedit.h3
-rw-r--r--lib/widgets/propeditor/prectedit.cpp10
-rw-r--r--lib/widgets/propeditor/prectedit.h3
-rw-r--r--lib/widgets/propeditor/property.h2
-rw-r--r--lib/widgets/propeditor/propertyeditor.cpp62
-rw-r--r--lib/widgets/propeditor/propertyeditor.h9
-rw-r--r--lib/widgets/propeditor/propertylist.cpp36
-rw-r--r--lib/widgets/propeditor/propertylist.h10
-rw-r--r--lib/widgets/propeditor/propertymachinefactory.cpp34
-rw-r--r--lib/widgets/propeditor/propertymachinefactory.h2
-rw-r--r--lib/widgets/propeditor/propertywidget.cpp8
-rw-r--r--lib/widgets/propeditor/propertywidget.h7
-rw-r--r--lib/widgets/propeditor/propertywidgetproxy.cpp4
-rw-r--r--lib/widgets/propeditor/propertywidgetproxy.h9
-rw-r--r--lib/widgets/propeditor/psizeedit.cpp12
-rw-r--r--lib/widgets/propeditor/psizeedit.h3
-rw-r--r--lib/widgets/propeditor/psizepolicyedit.cpp12
-rw-r--r--lib/widgets/propeditor/psizepolicyedit.h3
-rw-r--r--lib/widgets/propeditor/pspinbox.cpp10
-rw-r--r--lib/widgets/propeditor/pspinbox.h5
-rw-r--r--lib/widgets/propeditor/pstringlistedit.cpp16
-rw-r--r--lib/widgets/propeditor/pstringlistedit.h3
-rw-r--r--lib/widgets/propeditor/psymbolcombo.cpp20
-rw-r--r--lib/widgets/propeditor/psymbolcombo.h3
-rw-r--r--lib/widgets/propeditor/purledit.cpp8
-rw-r--r--lib/widgets/propeditor/purledit.h3
-rw-r--r--lib/widgets/propeditor/pyesnobutton.cpp6
-rw-r--r--lib/widgets/propeditor/pyesnobutton.h3
-rw-r--r--lib/widgets/propeditor/qeditlistbox.cpp20
-rw-r--r--lib/widgets/propeditor/qeditlistbox.h15
-rw-r--r--lib/widgets/propeditor/qfloatinput.cpp14
-rw-r--r--lib/widgets/propeditor/qfloatinput.h10
-rw-r--r--lib/widgets/propeditor/test.cpp2
-rw-r--r--lib/widgets/qcomboview.cpp148
-rw-r--r--lib/widgets/qcomboview.h47
-rw-r--r--lib/widgets/resizablecombo.cpp10
-rw-r--r--lib/widgets/resizablecombo.h9
88 files changed, 557 insertions, 523 deletions
diff --git a/lib/widgets/fancylistviewitem.cpp b/lib/widgets/fancylistviewitem.cpp
index 6e60f1a4..26677de6 100644
--- a/lib/widgets/fancylistviewitem.cpp
+++ b/lib/widgets/fancylistviewitem.cpp
@@ -108,13 +108,13 @@ void FancyListViewItem::paintCell( TQPainter *painter, const TQColorGroup &cg,
if ( isEnabled() || !lv )
p->setPen( cg.highlightedText() );
else if ( !isEnabled() && lv)
- p->setPen( lv->palette().disabled().highlightedText() );
+ p->setPen( lv->tqpalette().disabled().highlightedText() );
}
{
if ( isEnabled() || !lv )
p->setPen( cg.text() );
else if ( !isEnabled() && lv)
- p->setPen( lv->palette().disabled().text() );
+ p->setPen( lv->tqpalette().disabled().text() );
int iconWidth = 0;
@@ -129,7 +129,7 @@ void FancyListViewItem::paintCell( TQPainter *painter, const TQColorGroup &cg,
else if ( align & AlignTop )
yo = 0;
-// respect horizontal alignment when there is no text for an item.
+// respect horizontal tqalignment when there is no text for an item.
if ( t.isEmpty() ) {
if ( align & AlignRight )
xo = width - 2 * marg - iconWidth;
@@ -193,7 +193,7 @@ int FancyListViewItem::width(const TQFontMetrics &fm, const TQListView *lv, int
if ( pm )
width += pm->width() + lv->itemMargin();
- width = QMAX( width, TQApplication::globalStrut().width() );
+ width = TQMAX( width, TQApplication::globalStrut().width() );
}
else
width = TQListViewItem::width(fm, lv, column);
diff --git a/lib/widgets/fancylistviewitem.h b/lib/widgets/fancylistviewitem.h
index ab8b3310..9673d8cc 100644
--- a/lib/widgets/fancylistviewitem.h
+++ b/lib/widgets/fancylistviewitem.h
@@ -53,7 +53,7 @@ class TextPaintStyleStore {
}
Item& getStyle( int num ) {
- Store::Iterator it = m_styles.find( num );
+ Store::Iterator it = m_styles.tqfind( num );
if( it != m_styles.end() ) return *it;
return m_styles[0];
}
@@ -67,7 +67,7 @@ class TextPaintStyleStore {
}
bool hasStyle( int num ) {
- Store::Iterator it = m_styles.find( num );
+ Store::Iterator it = m_styles.tqfind( num );
return ( it != m_styles.end() );
}
@@ -124,11 +124,11 @@ class TextPaintItem {
class FancyListViewItem : public KListViewItem
{
public:
- FancyListViewItem(TextPaintStyleStore& styles, TQListView *parent, const TQString &label1, const TQString &label2="") : KListViewItem(parent, label1, label2), m_styles(styles) {
+ FancyListViewItem(TextPaintStyleStore& styles, TQListView *tqparent, const TQString &label1, const TQString &label2="") : KListViewItem(tqparent, label1, label2), m_styles(styles) {
init(label1, label2);
}
- FancyListViewItem(TextPaintStyleStore& styles, TQListViewItem *parent, const TQString &label1, const TQString &label2="") : KListViewItem(parent, label1, label2), m_styles(styles) {
+ FancyListViewItem(TextPaintStyleStore& styles, TQListViewItem *tqparent, const TQString &label1, const TQString &label2="") : KListViewItem(tqparent, label1, label2), m_styles(styles) {
init(label1, label2);
}
diff --git a/lib/widgets/flagboxes.cpp b/lib/widgets/flagboxes.cpp
index e109a36d..53a9af77 100644
--- a/lib/widgets/flagboxes.cpp
+++ b/lib/widgets/flagboxes.cpp
@@ -35,8 +35,8 @@
#include "flagboxes.h"
-// partial copy of Qt-3.1 for back-compatibility to KDE-3.0
-TQString QRegExp_escape( const TQString& str )
+// partial copy of TQt-3.1 for back-compatibility to KDE-3.0
+TQString TQRegExp_escape( const TQString& str )
{
static const char meta[] = "$()*+.?[\\]^{|}";
TQString quoted = str;
@@ -51,47 +51,47 @@ TQString QRegExp_escape( const TQString& str )
}
-class FlagListToolTip : public QToolTip
+class FlagListToolTip : public TQToolTip
{
public:
- FlagListToolTip(TQWidget *parent);
+ FlagListToolTip(TQWidget *tqparent);
protected:
void maybeTip(const TQPoint &p);
};
-FlagListToolTip::FlagListToolTip(TQWidget *parent)
- : TQToolTip(parent)
+FlagListToolTip::FlagListToolTip(TQWidget *tqparent)
+ : TQToolTip(tqparent)
{}
void FlagListToolTip::maybeTip(const TQPoint &pos)
{
- FlagListBox *listbox = static_cast<FlagListBox*>(parentWidget());
+ FlagListBox *listbox = static_cast<FlagListBox*>(tqparentWidget());
TQListViewItem *item = listbox->itemAt(pos);
FlagListItem *flitem = static_cast<FlagListItem*>(item);
if (item)
- tip(listbox->itemRect(item), flitem->desc);
+ tip(listbox->tqitemRect(item), flitem->desc);
}
-FlagListItem::FlagListItem(FlagListBox *parent, const TQString &flagstr,
+FlagListItem::FlagListItem(FlagListBox *tqparent, const TQString &flagstr,
const TQString &description)
- : TQCheckListItem(parent, flagstr, TQCheckListItem::CheckBox),
+ : TQCheckListItem(tqparent, flagstr, TQCheckListItem::CheckBox),
flag(flagstr), desc(description)
{}
-FlagListItem::FlagListItem(FlagListBox *parent, const TQString &flagstr,
+FlagListItem::FlagListItem(FlagListBox *tqparent, const TQString &flagstr,
const TQString &description, const TQString &offstr)
- : TQCheckListItem(parent, flagstr, TQCheckListItem::CheckBox),
+ : TQCheckListItem(tqparent, flagstr, TQCheckListItem::CheckBox),
flag(flagstr), off(offstr), desc(description)
{}
-FlagListBox::FlagListBox(TQWidget *parent, const char *name)
- : TQListView(parent, name)
+FlagListBox::FlagListBox(TQWidget *tqparent, const char *name)
+ : TQListView(tqparent, name)
{
setResizeMode(LastColumn);
header()->hide();
@@ -105,12 +105,12 @@ void FlagListBox::readFlags(TQStringList *list)
TQListViewItem *item = firstChild();
for (; item; item = item->nextSibling()) {
FlagListItem *flitem = static_cast<FlagListItem*>(item);
- TQStringList::Iterator sli = list->find(flitem->flag);
+ TQStringList::Iterator sli = list->tqfind(flitem->flag);
if (sli != list->end()) {
flitem->setOn(true);
list->remove(sli);
}
- sli = list->find(flitem->off);
+ sli = list->tqfind(flitem->off);
if (sli != list->end()) {
flitem->setOn(false);
list->remove(sli);
@@ -130,28 +130,28 @@ void FlagListBox::writeFlags(TQStringList *list)
}
-FlagCheckBox::FlagCheckBox(TQWidget *parent, FlagCheckBoxController *controller,
+FlagCheckBox::FlagCheckBox(TQWidget *tqparent, FlagCheckBoxController *controller,
const TQString &flagstr, const TQString &description)
- : TQCheckBox(description, parent), flag(flagstr), includeOff(false), useDef(false), defSet(false)
+ : TQCheckBox(description, tqparent), flag(flagstr), includeOff(false), useDef(false), defSet(false)
{
TQToolTip::add(this, flagstr);
controller->addCheckBox(this);
}
-FlagCheckBox::FlagCheckBox(TQWidget *parent, FlagCheckBoxController *controller,
+FlagCheckBox::FlagCheckBox(TQWidget *tqparent, FlagCheckBoxController *controller,
const TQString &flagstr, const TQString &description,
const TQString &offstr)
- : TQCheckBox(description, parent), flag(flagstr), off(offstr), includeOff(false), useDef(false), defSet(false)
+ : TQCheckBox(description, tqparent), flag(flagstr), off(offstr), includeOff(false), useDef(false), defSet(false)
{
TQToolTip::add(this, flagstr);
controller->addCheckBox(this);
}
-FlagCheckBox::FlagCheckBox(TQWidget *parent, FlagCheckBoxController *controller,
+FlagCheckBox::FlagCheckBox(TQWidget *tqparent, FlagCheckBoxController *controller,
const TQString &flagstr, const TQString &description,
const TQString &offstr, const TQString &defstr)
- : TQCheckBox(description, parent), flag(flagstr), off(offstr), def(defstr), includeOff(false), useDef(true), defSet(false)
+ : TQCheckBox(description, tqparent), flag(flagstr), off(offstr), def(defstr), includeOff(false), useDef(true), defSet(false)
{
TQToolTip::add(this, flagstr);
controller->addCheckBox(this);
@@ -205,13 +205,13 @@ void FlagCheckBoxController::readFlags(TQStringList *list)
TQPtrListIterator<FlagCheckBox> it(cblist);
for (; it.current(); ++it) {
FlagCheckBox *fitem = it.current();
- TQStringList::Iterator sli = list->find(fitem->flag);
+ TQStringList::Iterator sli = list->tqfind(fitem->flag);
if (sli != list->end()) {
fitem->setChecked(true);
fitem->useDef = false;
list->remove(sli);
}
- sli = list->find(fitem->off);
+ sli = list->tqfind(fitem->off);
if (sli != list->end()) {
fitem->setChecked(false);
fitem->includeOff = true;
@@ -270,13 +270,13 @@ void FlagPathEditController::readFlags( TQStringList * list )
if ((*sli).startsWith(peitem->flag))
{
// kdDebug() << "Processing.." << endl;
- peitem->setText((*sli).replace(TQRegExp(QRegExp_escape(peitem->flag)),""));
+ peitem->setText((*sli).tqreplace(TQRegExp(TQRegExp_escape(peitem->flag)),""));
sli = list->remove(sli);
continue;
}
++sli;
}
-/* TQStringList::Iterator sli = list->find(peitem->flag);
+/* TQStringList::Iterator sli = list->tqfind(peitem->flag);
if (sli != list->end()) {
peitem->setText((*sli).remove(peitem->flag));
list->remove(sli);
@@ -299,29 +299,29 @@ void FlagPathEditController::addPathEdit( FlagPathEdit * item )
plist.append(item);
}
-FlagPathEdit::FlagPathEdit( TQWidget * parent, TQString pathDelimiter,
+FlagPathEdit::FlagPathEdit( TQWidget * tqparent, TQString pathDelimiter,
FlagPathEditController * controller, const TQString & flagstr, const TQString & description,
KFile::Mode mode )
- : TQWidget(parent), delimiter(pathDelimiter), flag(flagstr), m_description(description)
+ : TQWidget(tqparent), delimiter(pathDelimiter), flag(flagstr), m_description(description)
{
TQBoxLayout *topLayout = new TQVBoxLayout(this, 0, 1);
topLayout->addWidget(new TQLabel(description, this));
- TQBoxLayout *layout = new TQHBoxLayout(topLayout, KDialog::spacingHint());
+ TQBoxLayout *tqlayout = new TQHBoxLayout(topLayout, KDialog::spacingHint());
if (delimiter.isEmpty())
{
url = new KURLRequester(this);
url->setMode(mode);
- layout->addWidget(url);
+ tqlayout->addWidget(url);
}
else
{
edit = new KLineEdit(this);
- layout->addWidget(edit);
+ tqlayout->addWidget(edit);
details = new TQPushButton("...", this);
details->setMaximumWidth(30);
connect(details, TQT_SIGNAL(clicked()), this, TQT_SLOT(showPathDetails()));
- layout->addWidget(details);
+ tqlayout->addWidget(details);
}
TQApplication::sendPostedEvents(this, TQEvent::ChildInserted);
@@ -379,8 +379,8 @@ bool FlagPathEdit::isEmpty( )
return edit->text().isEmpty();
}
-FlagRadioButton::FlagRadioButton( TQWidget * parent, FlagRadioButtonController * controller, const TQString & flagstr, const TQString & description )
- : TQRadioButton(description, parent), flag(flagstr)
+FlagRadioButton::FlagRadioButton( TQWidget * tqparent, FlagRadioButtonController * controller, const TQString & flagstr, const TQString & description )
+ : TQRadioButton(description, tqparent), flag(flagstr)
{
TQToolTip::add(this, flagstr);
controller->addRadioButton(this);
@@ -433,7 +433,7 @@ void FlagRadioButtonController::readFlags(TQStringList *list)
TQPtrListIterator<FlagRadioButton> it(cblist);
for (; it.current(); ++it) {
FlagRadioButton *fitem = it.current();
- TQStringList::Iterator sli = list->find(fitem->flag);
+ TQStringList::Iterator sli = list->tqfind(fitem->flag);
if (sli != list->end()) {
fitem->setChecked(true);
list->remove(sli);
@@ -471,7 +471,7 @@ void FlagEditController::readFlags( TQStringList * list )
{
if ((*sli).startsWith(peitem->flag))
{
- peitem->appendText((*sli).replace(TQRegExp(QRegExp_escape(peitem->flag)),""));
+ peitem->appendText((*sli).tqreplace(TQRegExp(TQRegExp_escape(peitem->flag)),""));
sli = list->remove(sli);
continue;
}
@@ -489,7 +489,7 @@ void FlagEditController::readFlags( TQStringList * list )
{
if ((*sli).startsWith(sitem->flag))
{
- sitem->setText((*sli).replace(TQRegExp(QRegExp_escape(sitem->flag)),""));
+ sitem->setText((*sli).tqreplace(TQRegExp(TQRegExp_escape(sitem->flag)),""));
sli = list->remove(sli);
continue;
}
@@ -526,22 +526,22 @@ void FlagEditController::addSpinBox(FlagSpinEdit *item)
}
-FlagListEdit::FlagListEdit( TQWidget * parent, TQString listDelimiter, FlagEditController * controller,
+FlagListEdit::FlagListEdit( TQWidget * tqparent, TQString listDelimiter, FlagEditController * controller,
const TQString & flagstr, const TQString & description)
- : TQWidget(parent), delimiter(listDelimiter), flag(flagstr), m_description(description)
+ : TQWidget(tqparent), delimiter(listDelimiter), flag(flagstr), m_description(description)
{
TQBoxLayout *topLayout = new TQVBoxLayout(this, 0, 1);
topLayout->addWidget(new TQLabel(description, this));
- TQBoxLayout *layout = new TQHBoxLayout(topLayout, KDialog::spacingHint());
+ TQBoxLayout *tqlayout = new TQHBoxLayout(topLayout, KDialog::spacingHint());
edit = new KLineEdit(this);
- layout->addWidget(edit);
+ tqlayout->addWidget(edit);
if (! listDelimiter.isEmpty())
{
details = new TQPushButton("...", this);
details->setMaximumWidth(30);
connect(details, TQT_SIGNAL(clicked()), this, TQT_SLOT(showListDetails()));
- layout->addWidget(details);
+ tqlayout->addWidget(details);
}
TQApplication::sendPostedEvents(this, TQEvent::ChildInserted);
@@ -601,8 +601,8 @@ TQStringList FlagListEdit::flags( )
return fl;
}
-FlagSpinEdit::FlagSpinEdit( TQWidget * parent, int minVal, int maxVal, int incr, int defaultVal, FlagEditController * controller, const TQString & flagstr, const TQString & description )
- :TQWidget(parent), m_defaultVal(defaultVal), flag(flagstr)
+FlagSpinEdit::FlagSpinEdit( TQWidget * tqparent, int minVal, int maxVal, int incr, int defaultVal, FlagEditController * controller, const TQString & flagstr, const TQString & description )
+ :TQWidget(tqparent), m_defaultVal(defaultVal), flag(flagstr)
{
TQBoxLayout *topLayout = new TQVBoxLayout(this, 0, 1);
topLayout->addWidget(new TQLabel(description, this));
@@ -624,7 +624,7 @@ void FlagSpinEdit::setText( const TQString text )
TQString FlagSpinEdit::text( )
{
- return TQString("%1").arg(spb->value());
+ return TQString("%1").tqarg(spb->value());
}
TQString FlagSpinEdit::flags( )
diff --git a/lib/widgets/flagboxes.h b/lib/widgets/flagboxes.h
index e45d8230..a2193277 100644
--- a/lib/widgets/flagboxes.h
+++ b/lib/widgets/flagboxes.h
@@ -46,12 +46,12 @@ class TQPushButton;
class KURLRequester;
/**List item holding a compiler flag.*/
-class FlagListItem : public QCheckListItem
+class FlagListItem : public TQCheckListItem
{
public:
- FlagListItem(FlagListBox *parent, const TQString &flagstr,
+ FlagListItem(FlagListBox *tqparent, const TQString &flagstr,
const TQString &description);
- FlagListItem(FlagListBox *parent, const TQString &flagstr,
+ FlagListItem(FlagListBox *tqparent, const TQString &flagstr,
const TQString &description, const TQString &offstr);
~FlagListItem()
{}
@@ -65,11 +65,12 @@ private:
/**List box item holding a compiler flag.*/
-class FlagListBox : public QListView
+class FlagListBox : public TQListView
{
Q_OBJECT
+ TQ_OBJECT
public:
- FlagListBox( TQWidget *parent=0, const char *name=0 );
+ FlagListBox( TQWidget *tqparent=0, const char *name=0 );
~FlagListBox()
{}
@@ -79,16 +80,17 @@ public:
/**Check box item holding a compiler flag.*/
-class FlagCheckBox : public QCheckBox
+class FlagCheckBox : public TQCheckBox
{
Q_OBJECT
+ TQ_OBJECT
public:
- FlagCheckBox(TQWidget *parent, FlagCheckBoxController *controller,
+ FlagCheckBox(TQWidget *tqparent, FlagCheckBoxController *controller,
const TQString &flagstr, const TQString &description);
- FlagCheckBox(TQWidget *parent, FlagCheckBoxController *controller,
+ FlagCheckBox(TQWidget *tqparent, FlagCheckBoxController *controller,
const TQString &flagstr, const TQString &description,
const TQString &offstr);
- FlagCheckBox(TQWidget *parent, FlagCheckBoxController *controller,
+ FlagCheckBox(TQWidget *tqparent, FlagCheckBoxController *controller,
const TQString &flagstr, const TQString &description,
const TQString &offstr, const TQString &defstr);
~FlagCheckBox()
@@ -105,11 +107,12 @@ private:
};
/**Radiobutton item holding an option of a compiler flag.*/
-class FlagRadioButton : public QRadioButton
+class FlagRadioButton : public TQRadioButton
{
Q_OBJECT
+ TQ_OBJECT
public:
- FlagRadioButton(TQWidget *parent, FlagRadioButtonController *controller,
+ FlagRadioButton(TQWidget *tqparent, FlagRadioButtonController *controller,
const TQString &flagstr, const TQString &description);
~FlagRadioButton()
{}
@@ -120,12 +123,13 @@ private:
};
/**Path editor if path is a compiler flag.*/
-class FlagPathEdit: public QWidget
+class FlagPathEdit: public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
/**If the pathDelimiter is not empty then path edit can contain a list of paths*/
- FlagPathEdit(TQWidget *parent, TQString pathDelimiter, FlagPathEditController *controller,
+ FlagPathEdit(TQWidget *tqparent, TQString pathDelimiter, FlagPathEditController *controller,
const TQString &flagstr, const TQString &description, KFile::Mode mode = KFile::Directory);
~FlagPathEdit() {}
@@ -149,12 +153,13 @@ private:
};
/**List editor if list is a compiler flag.*/
-class FlagListEdit: public QWidget
+class FlagListEdit: public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
/**If the listDelimiter is not empty then list edit can contain a list of entries*/
- FlagListEdit(TQWidget *parent, TQString listDelimiter, FlagEditController *controller,
+ FlagListEdit(TQWidget *tqparent, TQString listDelimiter, FlagEditController *controller,
const TQString &flagstr, const TQString &description);
~FlagListEdit() {}
@@ -179,10 +184,10 @@ private:
};
/**Spin editor of a compiler flag.*/
-class FlagSpinEdit: public QWidget
+class FlagSpinEdit: public TQWidget
{
public:
- FlagSpinEdit(TQWidget *parent, int minVal, int maxVal, int incr, int defaultVal, FlagEditController *controller,
+ FlagSpinEdit(TQWidget *tqparent, int minVal, int maxVal, int incr, int defaultVal, FlagEditController *controller,
const TQString &flagstr, const TQString &description);
~FlagSpinEdit() {}
diff --git a/lib/widgets/kcomboview.cpp b/lib/widgets/kcomboview.cpp
index 2576ed0c..ad4cd188 100644
--- a/lib/widgets/kcomboview.cpp
+++ b/lib/widgets/kcomboview.cpp
@@ -25,8 +25,8 @@
#include "kcomboview.h"
-KComboView::KComboView( bool rw, int defaultWidth, TQWidget* parent, const char* name , CustomCompleter* comp)
- :QComboView(rw, parent, name), m_comp( comp ), m_defaultWidth(defaultWidth)
+KComboView::KComboView( bool rw, int defaultWidth, TQWidget* tqparent, const char* name , CustomCompleter* comp)
+ :QComboView(rw, tqparent, name), m_comp( comp ), m_defaultWidth(defaultWidth)
{
if (rw)
{
diff --git a/lib/widgets/kcomboview.h b/lib/widgets/kcomboview.h
index e0230b52..e73b73e6 100644
--- a/lib/widgets/kcomboview.h
+++ b/lib/widgets/kcomboview.h
@@ -55,9 +55,10 @@ class CustomCompleter : public KCompletion {
class KComboView: public QComboView
{
Q_OBJECT
+ TQ_OBJECT
public:
///The combo-view takes the ownership of the completer and deletes it on destruction
- KComboView( bool rw, int defaultWidth = 100, TQWidget* parent=0, const char* name=0, CustomCompleter* completer = new CustomCompleter() );
+ KComboView( bool rw, int defaultWidth = 100, TQWidget* tqparent=0, const char* name=0, CustomCompleter* completer = new CustomCompleter() );
virtual ~KComboView();
virtual void addItem(TQListViewItem *it);
diff --git a/lib/widgets/kdevhtmlpart.cpp b/lib/widgets/kdevhtmlpart.cpp
index c99dcf36..5bda3bed 100644
--- a/lib/widgets/kdevhtmlpart.cpp
+++ b/lib/widgets/kdevhtmlpart.cpp
@@ -97,7 +97,7 @@ void KDevHTMLPart::popup( const TQString & url, const TQPoint & p )
if (!url.isEmpty() && (m_options & CanOpenInNewWindow))
{
idNewWindow = popup.insertItem(SmallIcon("window_new"),i18n("Open in New Tab"));
- popup.setWhatsThis(idNewWindow, i18n("<b>Open in new window</b><p>Opens current link in a new window."));
+ popup.TQMenuData::setWhatsThis(idNewWindow, i18n("<b>Open in new window</b><p>Opens current link in a new window."));
needSep = true;
}
if (m_options & CanDuplicate)
@@ -254,7 +254,7 @@ TQString KDevHTMLPart::resolveEnvVarsInURL(const TQString& url)
{
// check for environment variables and make necessary translations
TQString path = url;
- int nDollarPos = path.find( '$' );
+ int nDollarPos = path.tqfind( '$' );
// Note: the while loop below is a copy of code in kdecore/kconfigbase.cpp ;)
while( nDollarPos != -1 && nDollarPos+1 < static_cast<int>(path.length())) {
@@ -275,7 +275,7 @@ TQString KDevHTMLPart::resolveEnvVarsInURL(const TQString& url)
result = ts.read().stripWhiteSpace();
pclose(fs);
}
- path.replace( nDollarPos, nEndPos-nDollarPos, result );
+ path.tqreplace( nDollarPos, nEndPos-nDollarPos, result );
} else if( (path)[nDollarPos+1] != '$' ) {
uint nEndPos = nDollarPos+1;
// the next character is no $
@@ -302,9 +302,9 @@ TQString KDevHTMLPart::resolveEnvVarsInURL(const TQString& url)
// A environment variables may contain values in 8bit
// locale cpecified encoding or in UTF8 encoding.
if (isUtf8( pEnv ))
- path.replace( nDollarPos, nEndPos-nDollarPos, TQString::fromUtf8(pEnv) );
+ path.tqreplace( nDollarPos, nEndPos-nDollarPos, TQString::fromUtf8(pEnv) );
else
- path.replace( nDollarPos, nEndPos-nDollarPos, TQString::fromLocal8Bit(pEnv) );
+ path.tqreplace( nDollarPos, nEndPos-nDollarPos, TQString::fromLocal8Bit(pEnv) );
} else
path.remove( nDollarPos, nEndPos-nDollarPos );
} else {
@@ -312,7 +312,7 @@ TQString KDevHTMLPart::resolveEnvVarsInURL(const TQString& url)
path.remove( nDollarPos, 1 );
nDollarPos++;
}
- nDollarPos = path.find( '$', nDollarPos );
+ nDollarPos = path.tqfind( '$', nDollarPos );
}
return path;
@@ -494,8 +494,8 @@ void KDevHTMLPart::addHistoryEntry()
void KDevHTMLPart::slotCopy( )
{
TQString text = selectedText();
- text.replace( TQChar( 0xa0 ), ' ' );
- QClipboard *cb = TQApplication::clipboard();
+ text.tqreplace( TQChar( 0xa0 ), ' ' );
+ TQClipboard *cb = TQApplication::tqclipboard();
disconnect( cb, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotClearSelection() ) );
cb->setText(text);
connect( cb, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotClearSelection() ) );
diff --git a/lib/widgets/kdevhtmlpart.h b/lib/widgets/kdevhtmlpart.h
index 4a03eec9..22da1d65 100644
--- a/lib/widgets/kdevhtmlpart.h
+++ b/lib/widgets/kdevhtmlpart.h
@@ -44,6 +44,7 @@ It has it's own popup menu and font/zoom settings.
class KDevHTMLPart : public KHTMLPart
{
Q_OBJECT
+ TQ_OBJECT
public:
diff --git a/lib/widgets/kdevtabwidget.cpp b/lib/widgets/kdevtabwidget.cpp
index a7d12348..4631f16a 100644
--- a/lib/widgets/kdevtabwidget.cpp
+++ b/lib/widgets/kdevtabwidget.cpp
@@ -18,7 +18,7 @@
#include "kdevtabwidget.h"
-KDevTabWidget::KDevTabWidget(TQWidget *parent, const char *name) : TQTabWidget(parent,name)
+KDevTabWidget::KDevTabWidget(TQWidget *tqparent, const char *name) : TQTabWidget(tqparent,name)
{
m_pTabBar = new KTabBar(this, "tabbar");
setTabBar(m_pTabBar);
@@ -26,7 +26,7 @@ KDevTabWidget::KDevTabWidget(TQWidget *parent, const char *name) : TQTabWidget(p
connect(m_pTabBar, TQT_SIGNAL(closeOthers(TQWidget*)), this, TQT_SIGNAL(closeOthers(TQWidget*)));
}
-KTabBar::KTabBar(TQWidget *parent, const char *name) : TQTabBar(parent,name)
+KTabBar::KTabBar(TQWidget *tqparent, const char *name) : TQTabBar(tqparent,name)
{
m_pPopupMenu = new TQPopupMenu(this);
@@ -55,7 +55,7 @@ void KTabBar::mousePressEvent(TQMouseEvent *e)
TQTab *tab = selectTab(e->pos() );
if( tab == 0L ) return;
- m_pPage = ((KDevTabWidget*)parent())->page(indexOf(tab->identifier() ) );
+ m_pPage = ((KDevTabWidget*)tqparent())->page(indexOf(tab->identifier() ) );
if(m_pPage == 0L) return;
m_pPopupMenu->exec(mapToGlobal(e->pos()));
diff --git a/lib/widgets/klistviewaction.cpp b/lib/widgets/klistviewaction.cpp
index 0a219da5..f439de6b 100644
--- a/lib/widgets/klistviewaction.cpp
+++ b/lib/widgets/klistviewaction.cpp
@@ -38,8 +38,8 @@ KListViewAction::~KListViewAction()
}
KListViewAction::KListViewAction(KComboView *view, const TQString & text, const KShortcut & cut,
- const TQObject * receiver, const char * slot, KActionCollection * parent, const char * name ):
- KWidgetAction(view, text, cut, receiver, slot, parent, name), m_view(view)
+ const TQObject * receiver, const char * slot, KActionCollection * tqparent, const char * name ):
+ KWidgetAction(view, text, cut, receiver, slot, tqparent, name), m_view(view)
{
m_view->setDuplicatesEnabled(false);
m_view->setInsertionPolicy(KComboView::NoInsertion);
@@ -48,8 +48,8 @@ KListViewAction::KListViewAction(KComboView *view, const TQString & text, const
}
KListViewAction::KListViewAction( KComboView * view, const TQString & text, const KShortcut & cut,
- const TQObject * receiver, const char * slot, KActionCollection * parent, const char * name, const bool /*dummy*/ ):
- KWidgetAction(new ResizableCombo(view), text, cut, receiver, slot, parent, name), m_view(view)
+ const TQObject * receiver, const char * slot, KActionCollection * tqparent, const char * name, const bool /*dummy*/ ):
+ KWidgetAction(new ResizableCombo(view), text, cut, receiver, slot, tqparent, name), m_view(view)
{
m_view->setDuplicatesEnabled(false);
m_view->setInsertionPolicy(KComboView::NoInsertion);
diff --git a/lib/widgets/klistviewaction.h b/lib/widgets/klistviewaction.h
index d8f53eb8..0334ec30 100644
--- a/lib/widgets/klistviewaction.h
+++ b/lib/widgets/klistviewaction.h
@@ -38,8 +38,8 @@ Can be used on toolbars. It appears as @ref ResizableCombo.
class KListViewAction: public KWidgetAction
{
public:
- KListViewAction(KComboView *view, const TQString &text, const KShortcut &cut, const TQObject *receiver, const char *slot, KActionCollection *parent, const char *name);
- KListViewAction(KComboView *view, const TQString &text, const KShortcut &cut, const TQObject *receiver, const char *slot, KActionCollection *parent, const char *name, const bool);
+ KListViewAction(KComboView *view, const TQString &text, const KShortcut &cut, const TQObject *receiver, const char *slot, KActionCollection *tqparent, const char *name);
+ KListViewAction(KComboView *view, const TQString &text, const KShortcut &cut, const TQObject *receiver, const char *slot, KActionCollection *tqparent, const char *name, const bool);
~KListViewAction();
diff --git a/lib/widgets/ksavealldialog.cpp b/lib/widgets/ksavealldialog.cpp
index 8ddb5c89..ab267ff2 100644
--- a/lib/widgets/ksavealldialog.cpp
+++ b/lib/widgets/ksavealldialog.cpp
@@ -32,7 +32,7 @@
namespace
{
-class CheckURL : public QCheckListItem
+class CheckURL : public TQCheckListItem
{
public:
CheckURL( TQListView * lv, KURL const & url )
@@ -49,8 +49,8 @@ private:
}
-KSaveSelectDialog::KSaveSelectDialog( KURL::List const & filelist, KURL::List const & ignorelist, TQWidget * parent ) :
- KDialogBase( parent, "SaveAllDialog", true, i18n("Save Modified Files?"),
+KSaveSelectDialog::KSaveSelectDialog( KURL::List const & filelist, KURL::List const & ignorelist, TQWidget * tqparent ) :
+ KDialogBase( tqparent, "SaveAllDialog", true, i18n("Save Modified Files?"),
Ok | User1 | Close )
{
TQVBox *top = makeVBoxMainWidget();
@@ -62,7 +62,7 @@ KSaveSelectDialog::KSaveSelectDialog( KURL::List const & filelist, KURL::List co
_listview->header()->hide();
_listview->setResizeMode( TQListView::LastColumn );
- setButtonOK( KGuiItem(i18n("Save &Selected"), TQString::null, i18n("Saves all selected files")) );
+ setButtonOK( KGuiItem(i18n("Save &Selected"), TQString(), i18n("Saves all selected files")) );
setButtonText( User1, i18n("Save &None") );
setButtonText( Close, KStdGuiItem::cancel().text() );
setButtonTip( User1, i18n("Lose all modifications") );
@@ -71,7 +71,7 @@ KSaveSelectDialog::KSaveSelectDialog( KURL::List const & filelist, KURL::List co
KURL::List::ConstIterator it = filelist.begin();
while ( it != filelist.end() )
{
- if ( !ignorelist.contains( *it ) )
+ if ( !ignorelist.tqcontains( *it ) )
{
TQCheckListItem * x = new CheckURL( _listview, *it );
x->setOn( true );
@@ -140,8 +140,8 @@ KURL::List KSaveSelectDialog::filesNotToSave( )
}
-KSaveAllDialog::KSaveAllDialog( const TQStringList& filenames, TQWidget* parent ) :
- KDialogBase( parent, "SaveAllDialog", true, i18n("Save Modified Files?"),
+KSaveAllDialog::KSaveAllDialog( const TQStringList& filenames, TQWidget* tqparent ) :
+ KDialogBase( tqparent, "SaveAllDialog", true, i18n("Save Modified Files?"),
Ok | User1 | Close )
{
m_result = Cancel;
@@ -153,7 +153,7 @@ KSaveAllDialog::KSaveAllDialog( const TQStringList& filenames, TQWidget* parent
lb->setMinimumHeight( lb->fontMetrics().height() * 5 );
lb->insertStringList( filenames );
- setButtonOK( KGuiItem(i18n("Save &All"), TQString::null, i18n("Saves all modified files")) );
+ setButtonOK( KGuiItem(i18n("Save &All"), TQString(), i18n("Saves all modified files")) );
setButtonText( User1, i18n("Save &None") );
setButtonText( Close, KStdGuiItem::cancel().text() );
setButtonTip( User1, i18n("Lose all modifications") );
diff --git a/lib/widgets/ksavealldialog.h b/lib/widgets/ksavealldialog.h
index c6592b4a..091a3ae0 100644
--- a/lib/widgets/ksavealldialog.h
+++ b/lib/widgets/ksavealldialog.h
@@ -36,9 +36,10 @@ Dialog to save selected files.
class KSaveSelectDialog : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- KSaveSelectDialog( KURL::List const & filelist, KURL::List const & ignorelist, TQWidget * parent );
+ KSaveSelectDialog( KURL::List const & filelist, KURL::List const & ignorelist, TQWidget * tqparent );
virtual ~KSaveSelectDialog();
KURL::List filesToSave();
@@ -61,11 +62,12 @@ Dialog to save all files.
class KSaveAllDialog : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
enum SaveAllResult{ SaveAll, Cancel, Revert };
- KSaveAllDialog( const TQStringList& filenames, TQWidget* parent );
+ KSaveAllDialog( const TQStringList& filenames, TQWidget* tqparent );
virtual ~KSaveAllDialog();
SaveAllResult result() const { return m_result; }
diff --git a/lib/widgets/processlinemaker.cpp b/lib/widgets/processlinemaker.cpp
index 8fdbc5d2..ad5f307c 100644
--- a/lib/widgets/processlinemaker.cpp
+++ b/lib/widgets/processlinemaker.cpp
@@ -39,7 +39,7 @@ void ProcessLineMaker::slotReceivedStdout( const char *buffer )
{
stdoutbuf += buffer;
int pos;
- while ( (pos = stdoutbuf.find('\n')) != -1) {
+ while ( (pos = stdoutbuf.tqfind('\n')) != -1) {
TQCString line = stdoutbuf.left( pos );
emit receivedStdoutLine(line);
stdoutbuf.remove(0, pos+1);
@@ -60,7 +60,7 @@ void ProcessLineMaker::slotReceivedStderr( const char *buffer )
{
stderrbuf += buffer;
int pos;
- while ( (pos = stderrbuf.find('\n')) != -1) {
+ while ( (pos = stderrbuf.tqfind('\n')) != -1) {
TQCString line = stderrbuf.left( pos );
emit receivedStderrLine(line);
stderrbuf.remove(0, pos+1);
diff --git a/lib/widgets/processlinemaker.h b/lib/widgets/processlinemaker.h
index d124e2ed..cf5e78e4 100644
--- a/lib/widgets/processlinemaker.h
+++ b/lib/widgets/processlinemaker.h
@@ -32,9 +32,10 @@ class KProcess;
/**
Convenience class to catch output of KProcess.
*/
-class ProcessLineMaker : public QObject
+class ProcessLineMaker : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
ProcessLineMaker();
@@ -64,4 +65,4 @@ private:
#endif
-//kate: replace-tabs off; indent-spaces off;
+//kate: tqreplace-tabs off; indent-spaces off;
diff --git a/lib/widgets/processwidget.cpp b/lib/widgets/processwidget.cpp
index a49a1078..66796266 100644
--- a/lib/widgets/processwidget.cpp
+++ b/lib/widgets/processwidget.cpp
@@ -33,9 +33,9 @@ ProcessListBoxItem::ProcessListBoxItem(const TQString &s, Type type)
: TQListBoxText(s), t(type)
{
TQString clean = s;
- clean.replace( TQChar('\t'), TQString(" ") );
- clean.replace( TQChar('\n'), TQString() );
- clean.replace( TQChar('\r'), TQString() );
+ clean.tqreplace( TQChar('\t'), TQString(" ") );
+ clean.tqreplace( TQChar('\n'), TQString() );
+ clean.tqreplace( TQChar('\r'), TQString() );
setText( clean );
setCustomHighlighting(true);
@@ -66,14 +66,14 @@ TQColor ProcessListBoxItem::blend(const TQColor &c1, const TQColor &c2, double k
int g = normalize((int)blend1((double)c1.green(), (double)c2.green(), k));
int b = normalize((int)blend1((double)c1.blue(), (double)c2.blue(), k));
- return TQColor(qRgb(r, g, b));
+ return TQColor(tqRgb(r, g, b));
}
void ProcessListBoxItem::paint(TQPainter *p)
{
TQColor dim, warn, err, back;
if (listBox()) {
- const TQColorGroup& group = listBox()->palette().active();
+ const TQColorGroup& group = listBox()->tqpalette().active();
if (isSelected()) {
back = group.button();
warn = group.buttonText();
@@ -88,13 +88,13 @@ void ProcessListBoxItem::paint(TQPainter *p)
}
else
{
- warn = Qt::black;
- dim = Qt::darkBlue;
- err = Qt::darkRed;
+ warn = TQt::black;
+ dim = TQt::darkBlue;
+ err = TQt::darkRed;
if (isSelected())
- back = Qt::lightGray;
+ back = TQt::lightGray;
else
- back = Qt::white;
+ back = TQt::white;
}
p->fillRect(p->window(), TQBrush(back));
p->setPen((t==Error)? err :
@@ -103,10 +103,10 @@ void ProcessListBoxItem::paint(TQPainter *p)
}
-ProcessWidget::ProcessWidget(TQWidget *parent, const char *name)
- : KListBox(parent, name)
+ProcessWidget::ProcessWidget(TQWidget *tqparent, const char *name)
+ : KListBox(tqparent, name)
{
- setFocusPolicy(TQWidget::NoFocus);
+ setFocusPolicy(TQ_NoFocus);
// Don't override the palette, as that can mess up styles. Instead, draw
// the background ourselves (see ProcessListBoxItem::paint).
@@ -227,7 +227,7 @@ void ProcessWidget::childFinished(bool normal, int status)
if (normal) {
if (status) {
- s = i18n("*** Exited with status: %1 ***").arg(status);
+ s = i18n("*** Exited with status: %1 ***").tqarg(status);
t = ProcessListBoxItem::Error;
} else {
s = i18n("*** Exited normally ***");
@@ -249,12 +249,12 @@ void ProcessWidget::childFinished(bool normal, int status)
}
-TQSize ProcessWidget::minimumSizeHint() const
+TQSize ProcessWidget::tqminimumSizeHint() const
{
- // I'm not sure about this, but when I don't use override minimumSizeHint(),
+ // I'm not sure about this, but when I don't use override tqminimumSizeHint(),
// the initial size in clearly too small
- return TQSize( TQListBox::sizeHint().width(),
+ return TQSize( TQListBox::tqsizeHint().width(),
(fontMetrics().lineSpacing()+2)*4 );
}
diff --git a/lib/widgets/processwidget.h b/lib/widgets/processwidget.h
index ee1a6012..e4ef0c5d 100644
--- a/lib/widgets/processwidget.h
+++ b/lib/widgets/processwidget.h
@@ -33,7 +33,7 @@ class ProcessLineMaker;
/**
Listbox item for process widgets.
*/
-class ProcessListBoxItem : public QListBoxText
+class ProcessListBoxItem : public TQListBoxText
{
public:
enum Type { Diagnostic, Normal, Error };
@@ -58,9 +58,10 @@ private:
class ProcessWidget : public KListBox
{
Q_OBJECT
+ TQ_OBJECT
public:
- ProcessWidget(TQWidget *parent, const char *name=0);
+ ProcessWidget(TQWidget *tqparent, const char *name=0);
~ProcessWidget();
/**
@@ -108,7 +109,7 @@ signals:
void rowSelected(int row);
protected:
- virtual TQSize minimumSizeHint() const;
+ virtual TQSize tqminimumSizeHint() const;
void maybeScrollToBottom();
protected slots:
diff --git a/lib/widgets/propeditor/Mainpage.dox b/lib/widgets/propeditor/Mainpage.dox
index 6bc81be0..1f98b4ac 100644
--- a/lib/widgets/propeditor/Mainpage.dox
+++ b/lib/widgets/propeditor/Mainpage.dox
@@ -56,7 +56,7 @@ called @ref PropertyLib::PropertyMachineFactory. Static function @ref PropertyLi
can be used to obtain the reference to the factory instance. Factory creates and returns
so-called @ref PropertyLib::Machine for each registered property type (either predefined or user defined).
-@ref PropertyLib::Machine contains @ref PropertyLib::PropertyWidget and a list of "detailed" machines.
+@ref PropertyLib::Machine tqcontains @ref PropertyLib::PropertyWidget and a list of "detailed" machines.
Usually only property widget is necessary for a property but there are
complex properties like "Font" for example. We would like to see separate editors
for font family, size, etc. and a button to choose all of these in the dialog.
diff --git a/lib/widgets/propeditor/childproperty.cpp b/lib/widgets/propeditor/childproperty.cpp
index ac53936a..aa1326c9 100644
--- a/lib/widgets/propeditor/childproperty.cpp
+++ b/lib/widgets/propeditor/childproperty.cpp
@@ -28,16 +28,16 @@
namespace PropertyLib{
-ChildProperty::ChildProperty(MultiProperty *parent, int type, ChildPropertyType childType, const TQString &name,
+ChildProperty::ChildProperty(MultiProperty *tqparent, int type, ChildPropertyType childType, const TQString &name,
const TQString &description, const TQVariant &value, bool save, bool readOnly)
- :Property(type, name, description, value, save, readOnly), m_parent(parent), m_childType(childType)
+ :Property(type, name, description, value, save, readOnly), m_parent(tqparent), m_childType(childType)
{
}
-ChildProperty::ChildProperty(MultiProperty *parent, const TQString & name, ChildPropertyType childType,
+ChildProperty::ChildProperty(MultiProperty *tqparent, const TQString & name, ChildPropertyType childType,
const TQMap<TQString, TQVariant> &v_valueList, const TQString &description,
const TQVariant &value, bool save, bool readOnly)
- :Property(name, v_valueList, description, value, save, readOnly), m_parent(parent), m_childType(childType)
+ :Property(name, v_valueList, description, value, save, readOnly), m_parent(tqparent), m_childType(childType)
{
}
diff --git a/lib/widgets/propeditor/childproperty.h b/lib/widgets/propeditor/childproperty.h
index 6e247fd3..0d1655ae 100644
--- a/lib/widgets/propeditor/childproperty.h
+++ b/lib/widgets/propeditor/childproperty.h
@@ -29,7 +29,7 @@ class MultiProperty;
/**
@short Child property
-Child property is a detailed property for complex parent properties.
+Child property is a detailed property for complex tqparent properties.
For example, to edit a property of Point type one can request two
child properties for "x" and "y" components of a point.
@@ -60,11 +60,11 @@ public:
/**Constructs empty property.*/
ChildProperty() {}
/**Constructs property.*/
- ChildProperty(MultiProperty *parent, int type, ChildPropertyType childType, const TQString &name,
+ ChildProperty(MultiProperty *tqparent, int type, ChildPropertyType childType, const TQString &name,
const TQString &description, const TQVariant &value = TQVariant(),
bool save = true, bool readOnly = false);
/**Constructs property with @ref ValueFromList type.*/
- ChildProperty(MultiProperty *parent, const TQString &name, ChildPropertyType childType,
+ ChildProperty(MultiProperty *tqparent, const TQString &name, ChildPropertyType childType,
const TQMap<TQString, TQVariant> &v_valueList, const TQString &description,
const TQVariant &value = TQVariant(), bool save = true, bool readOnly = false);
diff --git a/lib/widgets/propeditor/multiproperty.cpp b/lib/widgets/propeditor/multiproperty.cpp
index 9c3b04c4..ac1cb0fb 100644
--- a/lib/widgets/propeditor/multiproperty.cpp
+++ b/lib/widgets/propeditor/multiproperty.cpp
@@ -47,7 +47,7 @@ TQString MultiProperty::name() const
{
if (list.count() >= 1)
return list.getFirst()->name();
- return TQString::null;
+ return TQString();
}
int MultiProperty::type() const
@@ -86,7 +86,7 @@ TQString MultiProperty::description() const
while ((property = it.current()) != 0)
{
if (property->description() != description)
- return TQString::null;
+ return TQString();
++it;
}
diff --git a/lib/widgets/propeditor/multiproperty.h b/lib/widgets/propeditor/multiproperty.h
index 49410a04..2330ffa0 100644
--- a/lib/widgets/propeditor/multiproperty.h
+++ b/lib/widgets/propeditor/multiproperty.h
@@ -43,7 +43,7 @@ with many properties of the same name and type at the same type.
MultiProperty is also responsible for storing detailed %property editors (instances
of @ref ChildProperty class. It's too much overhead to store child properties
-with their parent properties. MultiProperty provides a way to store child properties
+with their tqparent properties. MultiProperty provides a way to store child properties
only once for all properties with the same name and same type.
*/
class MultiProperty
diff --git a/lib/widgets/propeditor/pcheckbox.cpp b/lib/widgets/propeditor/pcheckbox.cpp
index 3f406e4d..e4a14389 100644
--- a/lib/widgets/propeditor/pcheckbox.cpp
+++ b/lib/widgets/propeditor/pcheckbox.cpp
@@ -31,12 +31,12 @@
namespace PropertyLib{
-PCheckBox::PCheckBox(MultiProperty *property, TQWidget *parent, const char *name)
- :PropertyWidget(property, parent, name)
+PCheckBox::PCheckBox(MultiProperty *property, TQWidget *tqparent, const char *name)
+ :PropertyWidget(property, tqparent, name)
{
TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0);
m_edit = new TQCheckBox(this);
- m_edit->setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
+ m_edit->tqsetSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
l->addWidget(m_edit);
connect(m_edit, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(updateProperty(bool)));
@@ -64,9 +64,9 @@ void PCheckBox::updateProperty(bool val)
void PCheckBox::drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value)
{
p->setBrush(cg.background());
- p->setPen(Qt::NoPen);
+ p->setPen(TQt::NoPen);
p->drawRect(r);
- p->drawText(r, Qt::AlignLeft | Qt::AlignVCenter | Qt::SingleLine, value.toBool() ? i18n("true") : i18n("false"));
+ p->drawText(r, TQt::AlignLeft | TQt::AlignVCenter | TQt::SingleLine, value.toBool() ? i18n("true") : i18n("false"));
}
}
diff --git a/lib/widgets/propeditor/pcheckbox.h b/lib/widgets/propeditor/pcheckbox.h
index b2fffc8e..5e593588 100644
--- a/lib/widgets/propeditor/pcheckbox.h
+++ b/lib/widgets/propeditor/pcheckbox.h
@@ -31,8 +31,9 @@ namespace PropertyLib{
*/
class PCheckBox: public PropertyWidget{
Q_OBJECT
+ TQ_OBJECT
public:
- PCheckBox(MultiProperty *property, TQWidget *parent = 0, const char *name = 0);
+ PCheckBox(MultiProperty *property, TQWidget *tqparent = 0, const char *name = 0);
/**@return the value currently entered in the editor widget.*/
virtual TQVariant value() const;
diff --git a/lib/widgets/propeditor/pcolorbutton.cpp b/lib/widgets/propeditor/pcolorbutton.cpp
index 9609442f..aef37f4a 100644
--- a/lib/widgets/propeditor/pcolorbutton.cpp
+++ b/lib/widgets/propeditor/pcolorbutton.cpp
@@ -33,8 +33,8 @@
namespace PropertyLib {
-PColorButton::PColorButton(MultiProperty* property, TQWidget* parent, const char* name)
- :PropertyWidget(property, parent, name)
+PColorButton::PColorButton(MultiProperty* property, TQWidget* tqparent, const char* name)
+ :PropertyWidget(property, tqparent, name)
{
TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0);
#ifndef PURE_QT
@@ -45,7 +45,7 @@ PColorButton::PColorButton(MultiProperty* property, TQWidget* parent, const char
connect(m_edit, TQT_SIGNAL(clicked()), this, TQT_SLOT(changeColor()));
#endif
- m_edit->setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
+ m_edit->tqsetSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
l->addWidget(m_edit);
}
@@ -61,14 +61,14 @@ TQVariant PColorButton::value() const
void PColorButton::drawViewer(TQPainter* p, const TQColorGroup& cg, const TQRect& r, const TQVariant& value)
{
/* p->setBrush(value.toColor());
- p->setPen(Qt::NoPen);
+ p->setPen(TQt::NoPen);
p->drawRect(r);*/
- p->setPen(Qt::NoPen);
+ p->setPen(TQt::NoPen);
p->setBrush(cg.background());
p->drawRect(r);
p->setBrush(value.toColor());
- p->setPen(Qt::SolidLine);
+ p->setPen(TQt::SolidLine);
TQRect r2(r);
r2.setTopLeft(r.topLeft() + TQPoint(5,5));
r2.setBottomRight(r.bottomRight() - TQPoint(5,5));
@@ -103,7 +103,7 @@ void PColorButton::updateProperty(const TQColor &// color
void PColorButton::changeColor()
{
#ifdef PURE_QT
- m_color = QColorDialog::getColor(m_color,this);
+ m_color = TQColorDialog::getColor(m_color,this);
updateProperty(m_color);
m_edit->setText(m_color.name());
TQPixmap px;
diff --git a/lib/widgets/propeditor/pcolorbutton.h b/lib/widgets/propeditor/pcolorbutton.h
index 8a18ab9c..a132f0ce 100644
--- a/lib/widgets/propeditor/pcolorbutton.h
+++ b/lib/widgets/propeditor/pcolorbutton.h
@@ -36,8 +36,9 @@ namespace PropertyLib{
class PColorButton: public PropertyWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- PColorButton(MultiProperty *property, TQWidget *parent = 0, const char *name = 0);
+ PColorButton(MultiProperty *property, TQWidget *tqparent = 0, const char *name = 0);
virtual TQVariant value() const;
virtual void drawViewer(TQPainter* p, const TQColorGroup& cg, const TQRect& r, const TQVariant& value);
diff --git a/lib/widgets/propeditor/pcolorcombo.cpp b/lib/widgets/propeditor/pcolorcombo.cpp
index eeac7de8..5fee6b1f 100644
--- a/lib/widgets/propeditor/pcolorcombo.cpp
+++ b/lib/widgets/propeditor/pcolorcombo.cpp
@@ -26,12 +26,12 @@
namespace PropertyLib{
-PColorCombo::PColorCombo(MultiProperty *property, TQWidget *parent, const char *name)
- :PropertyWidget(property, parent, name)
+PColorCombo::PColorCombo(MultiProperty *property, TQWidget *tqparent, const char *name)
+ :PropertyWidget(property, tqparent, name)
{
TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0);
m_edit = new KColorCombo(this);
- m_edit->setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
+ m_edit->tqsetSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
l->addWidget(m_edit);
connect(m_edit, TQT_SIGNAL(activated(int)), this, TQT_SLOT(updateProperty(int)));
@@ -58,12 +58,12 @@ void PColorCombo::updateProperty(int /*val*/)
void PColorCombo::drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value)
{
- p->setPen(Qt::NoPen);
+ p->setPen(TQt::NoPen);
p->setBrush(cg.background());
p->drawRect(r);
p->setBrush(value.toColor());
- p->setPen(Qt::SolidLine);
+ p->setPen(TQt::SolidLine);
TQRect r2(r);
r2.setTopLeft(r.topLeft() + TQPoint(5,5));
r2.setBottomRight(r.bottomRight() - TQPoint(5,5));
diff --git a/lib/widgets/propeditor/pcolorcombo.h b/lib/widgets/propeditor/pcolorcombo.h
index 68f19e58..88c5b355 100644
--- a/lib/widgets/propeditor/pcolorcombo.h
+++ b/lib/widgets/propeditor/pcolorcombo.h
@@ -31,8 +31,9 @@ namespace PropertyLib{
*/
class PColorCombo: public PropertyWidget{
Q_OBJECT
+ TQ_OBJECT
public:
- PColorCombo(MultiProperty *property, TQWidget *parent = 0, const char *name = 0);
+ PColorCombo(MultiProperty *property, TQWidget *tqparent = 0, const char *name = 0);
/**@return the value currently entered in the editor widget.*/
virtual TQVariant value() const;
diff --git a/lib/widgets/propeditor/pcombobox.cpp b/lib/widgets/propeditor/pcombobox.cpp
index 958ba34d..18cad9b6 100644
--- a/lib/widgets/propeditor/pcombobox.cpp
+++ b/lib/widgets/propeditor/pcombobox.cpp
@@ -24,14 +24,14 @@
namespace PropertyLib{
-PComboBox::PComboBox(MultiProperty *property, const TQMap<TQString, TQVariant> &list, TQWidget *parent, const char *name)
- :PropertyWidget(property, parent, name), m_valueList(list)
+PComboBox::PComboBox(MultiProperty *property, const TQMap<TQString, TQVariant> &list, TQWidget *tqparent, const char *name)
+ :PropertyWidget(property, tqparent, name), m_valueList(list)
{
init(false);
}
-PComboBox::PComboBox(MultiProperty *property, const TQMap<TQString, TQVariant> &list, bool rw, TQWidget *parent, const char *name)
- :PropertyWidget(property, parent, name), m_valueList(list)
+PComboBox::PComboBox(MultiProperty *property, const TQMap<TQString, TQVariant> &list, bool rw, TQWidget *tqparent, const char *name)
+ :PropertyWidget(property, tqparent, name), m_valueList(list)
{
init(rw);
}
@@ -40,7 +40,7 @@ void PComboBox::init(bool rw)
{
TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0);
m_edit = new TQComboBox(rw, this);
- m_edit->setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
+ m_edit->tqsetSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
l->addWidget(m_edit);
fillBox();
@@ -58,7 +58,7 @@ void PComboBox::fillBox()
TQVariant PComboBox::value() const
{
- TQMap<TQString, TQVariant>::const_iterator it = m_valueList.find(m_edit->currentText());
+ TQMap<TQString, TQVariant>::const_iterator it = m_valueList.tqfind(m_edit->currentText());
if (it == m_valueList.end())
return TQVariant("");
return TQVariant(it.data());
@@ -66,11 +66,7 @@ TQVariant PComboBox::value() const
void PComboBox::setValue(const TQVariant &value, bool emitChange)
{
-#if QT_VERSION >= 0x030100
if (!value.isNull())
-#else
- if (value.canCast(TQVariant::String))
-#endif
{
disconnect(m_edit, TQT_SIGNAL(activated(int)), this, TQT_SLOT(updateProperty(int)));
m_edit->setCurrentText(findDescription(value));
diff --git a/lib/widgets/propeditor/pcombobox.h b/lib/widgets/propeditor/pcombobox.h
index 9f03407c..4176e2ed 100644
--- a/lib/widgets/propeditor/pcombobox.h
+++ b/lib/widgets/propeditor/pcombobox.h
@@ -35,11 +35,12 @@ namespace PropertyLib{
*/
class PComboBox: public PropertyWidget{
Q_OBJECT
+ TQ_OBJECT
public:
/**This constructor is used for read-only selection combo. It provides a value from valueList*/
- PComboBox(MultiProperty *property, const TQMap<TQString, TQVariant> &list, TQWidget *parent = 0, const char *name = 0);
+ PComboBox(MultiProperty *property, const TQMap<TQString, TQVariant> &list, TQWidget *tqparent = 0, const char *name = 0);
/**This constructor is used for read-write selection combo. It provides a value from valueList*/
- PComboBox(MultiProperty *property, const TQMap<TQString, TQVariant> &list, bool rw, TQWidget *parent = 0, const char *name = 0);
+ PComboBox(MultiProperty *property, const TQMap<TQString, TQVariant> &list, bool rw, TQWidget *tqparent = 0, const char *name = 0);
/**@return the value currently entered in the editor widget.*/
virtual TQVariant value() const;
diff --git a/lib/widgets/propeditor/pcursoredit.cpp b/lib/widgets/propeditor/pcursoredit.cpp
index 85aefd5e..02a2148c 100644
--- a/lib/widgets/propeditor/pcursoredit.cpp
+++ b/lib/widgets/propeditor/pcursoredit.cpp
@@ -24,8 +24,8 @@
namespace PropertyLib{
PCursorEdit::PCursorEdit(MultiProperty* property, const TQMap<TQString, TQVariant> &spValues,
- TQWidget* parent, const char* name)
- :PComboBox(property, spValues, parent, name)
+ TQWidget* tqparent, const char* name)
+ :PComboBox(property, spValues, tqparent, name)
{
}
diff --git a/lib/widgets/propeditor/pcursoredit.h b/lib/widgets/propeditor/pcursoredit.h
index 6149bce7..82924fd2 100644
--- a/lib/widgets/propeditor/pcursoredit.h
+++ b/lib/widgets/propeditor/pcursoredit.h
@@ -30,9 +30,10 @@ namespace PropertyLib{
class PCursorEdit: public PComboBox
{
Q_OBJECT
+ TQ_OBJECT
public:
PCursorEdit(MultiProperty* property, const TQMap<TQString, TQVariant> &spValues,
- TQWidget* parent = 0, const char* name = 0);
+ TQWidget* tqparent = 0, const char* name = 0);
virtual void drawViewer(TQPainter* p, const TQColorGroup& cg, const TQRect& r, const TQVariant& value);
};
diff --git a/lib/widgets/propeditor/pdateedit.cpp b/lib/widgets/propeditor/pdateedit.cpp
index 141eef20..46de4069 100644
--- a/lib/widgets/propeditor/pdateedit.cpp
+++ b/lib/widgets/propeditor/pdateedit.cpp
@@ -25,12 +25,12 @@
namespace PropertyLib{
-PDateEdit::PDateEdit(MultiProperty* property, TQWidget* parent, const char* name)
- :PropertyWidget(property, parent, name)
+PDateEdit::PDateEdit(MultiProperty* property, TQWidget* tqparent, const char* name)
+ :PropertyWidget(property, tqparent, name)
{
TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0);
- m_edit = new QDateEdit(this);
- m_edit->setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
+ m_edit = new TQDateEdit(this);
+ m_edit->tqsetSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
l->addWidget(m_edit);
connect(m_edit, TQT_SIGNAL(valueChanged(const TQDate&)), this, TQT_SLOT(updateProperty(const TQDate&)));
@@ -43,10 +43,10 @@ TQVariant PDateEdit::value() const
void PDateEdit::drawViewer(TQPainter* p, const TQColorGroup& cg, const TQRect& r, const TQVariant& value)
{
- p->setPen(Qt::NoPen);
+ p->setPen(TQt::NoPen);
p->setBrush(cg.background());
p->drawRect(r);
- p->drawText(r, Qt::AlignLeft | Qt::AlignVCenter | Qt::SingleLine, value.toDate().toString(Qt::LocalDate));
+ p->drawText(r, TQt::AlignLeft | TQt::AlignVCenter | TQt::SingleLine, value.toDate().toString(Qt::LocalDate));
}
void PDateEdit::setValue(const TQVariant& value, bool emitChange)
diff --git a/lib/widgets/propeditor/pdateedit.h b/lib/widgets/propeditor/pdateedit.h
index da458737..a21dbc3f 100644
--- a/lib/widgets/propeditor/pdateedit.h
+++ b/lib/widgets/propeditor/pdateedit.h
@@ -22,7 +22,7 @@
#include "propertywidget.h"
-class QDateEdit;
+class TQDateEdit;
namespace PropertyLib{
@@ -32,8 +32,9 @@ namespace PropertyLib{
class PDateEdit : public PropertyWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- PDateEdit(MultiProperty* property, TQWidget* parent=0, const char* name=0);
+ PDateEdit(MultiProperty* property, TQWidget* tqparent=0, const char* name=0);
virtual TQVariant value() const;
virtual void drawViewer(TQPainter* p, const TQColorGroup& cg, const TQRect& r, const TQVariant& value);
@@ -43,7 +44,7 @@ private slots:
void updateProperty(const TQDate &val);
private:
- QDateEdit *m_edit;
+ TQDateEdit *m_edit;
};
}
diff --git a/lib/widgets/propeditor/pdatetimeedit.cpp b/lib/widgets/propeditor/pdatetimeedit.cpp
index 5e414c77..e7a4b04f 100644
--- a/lib/widgets/propeditor/pdatetimeedit.cpp
+++ b/lib/widgets/propeditor/pdatetimeedit.cpp
@@ -25,11 +25,11 @@
namespace PropertyLib{
-PDateTimeEdit::PDateTimeEdit(MultiProperty* property, TQWidget* parent, const char* name): PropertyWidget(property, parent, name)
+PDateTimeEdit::PDateTimeEdit(MultiProperty* property, TQWidget* tqparent, const char* name): PropertyWidget(property, tqparent, name)
{
TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0);
- m_edit = new QDateTimeEdit(this);
- m_edit->setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
+ m_edit = new TQDateTimeEdit(this);
+ m_edit->tqsetSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
l->addWidget(m_edit);
connect(m_edit, TQT_SIGNAL(valueChanged(const TQDateTime&)), this, TQT_SLOT(updateProperty(const TQDateTime&)));
@@ -42,10 +42,10 @@ TQVariant PDateTimeEdit::value() const
void PDateTimeEdit::drawViewer(TQPainter* p, const TQColorGroup& cg, const TQRect& r, const TQVariant& value)
{
- p->setPen(Qt::NoPen);
+ p->setPen(TQt::NoPen);
p->setBrush(cg.background());
p->drawRect(r);
- p->drawText(r, Qt::AlignLeft | Qt::AlignVCenter | Qt::SingleLine, value.toDateTime().toString(Qt::LocalDate));
+ p->drawText(r, TQt::AlignLeft | TQt::AlignVCenter | TQt::SingleLine, value.toDateTime().toString(Qt::LocalDate));
}
void PDateTimeEdit::setValue(const TQVariant& value, bool emitChange)
diff --git a/lib/widgets/propeditor/pdatetimeedit.h b/lib/widgets/propeditor/pdatetimeedit.h
index 40e8b428..e44c07d6 100644
--- a/lib/widgets/propeditor/pdatetimeedit.h
+++ b/lib/widgets/propeditor/pdatetimeedit.h
@@ -22,7 +22,7 @@
#include "propertywidget.h"
-class QDateTimeEdit;
+class TQDateTimeEdit;
namespace PropertyLib{
@@ -32,8 +32,9 @@ namespace PropertyLib{
class PDateTimeEdit : public PropertyWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- PDateTimeEdit(MultiProperty* property, TQWidget* parent=0, const char* name=0);
+ PDateTimeEdit(MultiProperty* property, TQWidget* tqparent=0, const char* name=0);
virtual TQVariant value() const;
virtual void drawViewer(TQPainter* p, const TQColorGroup& cg, const TQRect& r, const TQVariant& value);
@@ -43,7 +44,7 @@ private slots:
void updateProperty(const TQDateTime &val);
private:
- QDateTimeEdit *m_edit;
+ TQDateTimeEdit *m_edit;
};
diff --git a/lib/widgets/propeditor/pdoublenuminput.cpp b/lib/widgets/propeditor/pdoublenuminput.cpp
index df6b3bcb..742180b4 100644
--- a/lib/widgets/propeditor/pdoublenuminput.cpp
+++ b/lib/widgets/propeditor/pdoublenuminput.cpp
@@ -22,7 +22,7 @@
#ifndef PURE_QT
#include <knuminput.h>
#else
-#include "qfloatinput.h"
+#include "tqfloatinput.h"
#endif
#include <limits.h>
@@ -31,19 +31,19 @@
namespace PropertyLib{
-PDoubleNumInput::PDoubleNumInput(MultiProperty *property, TQWidget *parent, const char *name)
- :PropertyWidget(property, parent, name)
+PDoubleNumInput::PDoubleNumInput(MultiProperty *property, TQWidget *tqparent, const char *name)
+ :PropertyWidget(property, tqparent, name)
{
TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0);
#ifndef PURE_QT
m_edit = new KDoubleNumInput(-999999.0, 999999.0, 0.0, 0.01, 2, this);
- m_edit->setLabel(TQString::null);
+ m_edit->setLabel(TQString());
connect(m_edit, TQT_SIGNAL(valueChanged(double)), this, TQT_SLOT(updateProperty(double)));
#else
- m_edit = new QFloatInput(-999999, 999999, 0.01, 2, this );
+ m_edit = new TQFloatInput(-999999, 999999, 0.01, 2, this );
connect(m_edit, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(updateProperty(int)));
#endif
- m_edit->setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
+ m_edit->tqsetSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
/* m_edit->setMinValue(-999999999);
m_edit->setMaxValue(+999999999);
m_edit->setPrecision(2);*/
@@ -78,7 +78,7 @@ void PDoubleNumInput::updateProperty(double val)
void PDoubleNumInput::updateProperty(int val)
{
#ifdef PURE_QT
- TQString format = TQString("%.%1f").arg( m_edit->digits() );
+ TQString format = TQString("%.%1f").tqarg( m_edit->digits() );
TQString strVal = TQString().sprintf(format.latin1(),
(val/(float)pow(m_edit->digits(),10)) );
emit propertyChanged(m_property, TQVariant(strVal));
diff --git a/lib/widgets/propeditor/pdoublenuminput.h b/lib/widgets/propeditor/pdoublenuminput.h
index 83849335..a59ae43d 100644
--- a/lib/widgets/propeditor/pdoublenuminput.h
+++ b/lib/widgets/propeditor/pdoublenuminput.h
@@ -25,7 +25,7 @@
#ifndef PURE_QT
class KDoubleNumInput;
#else
-class QFloatInput;
+class TQFloatInput;
#endif
namespace PropertyLib{
@@ -36,8 +36,9 @@ namespace PropertyLib{
class PDoubleNumInput: public PropertyWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- PDoubleNumInput(MultiProperty *property, TQWidget *parent = 0, const char *name = 0);
+ PDoubleNumInput(MultiProperty *property, TQWidget *tqparent = 0, const char *name = 0);
/**@return the value currently entered in the editor widget.*/
virtual TQVariant value() const;
@@ -46,7 +47,7 @@ public:
virtual void setValue(const TQVariant &value, bool emitChange=true);
private slots:
- //because of a bug in moc which doesn't detect conditional slots
+ //because of a bug in tqmoc which doesn't detect conditional slots
//we need them both
void updateProperty(double val);
void updateProperty(int val);
@@ -55,7 +56,7 @@ private:
#ifndef PURE_QT
KDoubleNumInput *m_edit;
#else
- QFloatInput *m_edit;
+ TQFloatInput *m_edit;
#endif
};
diff --git a/lib/widgets/propeditor/pdummywidget.cpp b/lib/widgets/propeditor/pdummywidget.cpp
index 65ec35e3..428953f2 100644
--- a/lib/widgets/propeditor/pdummywidget.cpp
+++ b/lib/widgets/propeditor/pdummywidget.cpp
@@ -23,8 +23,8 @@
namespace PropertyLib{
-PDummyWidget::PDummyWidget(MultiProperty *property, TQWidget *parent, const char *name)
- :PropertyWidget(property, parent, name)
+PDummyWidget::PDummyWidget(MultiProperty *property, TQWidget *tqparent, const char *name)
+ :PropertyWidget(property, tqparent, name)
{
}
@@ -43,7 +43,7 @@ void PDummyWidget::setValue(const TQVariant &value, bool emitChange)
void PDummyWidget::drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &/*value*/)
{
p->setBrush(cg.background());
- p->setPen(Qt::NoPen);
+ p->setPen(TQt::NoPen);
p->drawRect(r);
}
diff --git a/lib/widgets/propeditor/pdummywidget.h b/lib/widgets/propeditor/pdummywidget.h
index 0e191e87..f58e92b9 100644
--- a/lib/widgets/propeditor/pdummywidget.h
+++ b/lib/widgets/propeditor/pdummywidget.h
@@ -35,13 +35,14 @@ namespace PropertyLib{
@short %Property editor with empty widget.
This is usefull for properties which can't be edited in a generic way
-like QValueList's or QMap's stored in a variant.
+like TQValueList's or TQMap's stored in a variant.
*/
class PDummyWidget: public PropertyWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- PDummyWidget(MultiProperty *property, TQWidget *parent = 0, const char *name = 0);
+ PDummyWidget(MultiProperty *property, TQWidget *tqparent = 0, const char *name = 0);
/**@return the value currently entered in the editor widget.*/
virtual TQVariant value() const;
diff --git a/lib/widgets/propeditor/pfontbutton.cpp b/lib/widgets/propeditor/pfontbutton.cpp
index dc976b8f..d2a10217 100644
--- a/lib/widgets/propeditor/pfontbutton.cpp
+++ b/lib/widgets/propeditor/pfontbutton.cpp
@@ -33,12 +33,12 @@
namespace PropertyLib{
-PFontButton::PFontButton(MultiProperty* property, TQWidget* parent, const char* name)
- :PropertyWidget(property, parent, name)
+PFontButton::PFontButton(MultiProperty* property, TQWidget* tqparent, const char* name)
+ :PropertyWidget(property, tqparent, name)
{
TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0);
m_edit = new KFontRequester(this);
- m_edit->setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
+ m_edit->tqsetSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
#ifndef PURE_QT
m_edit->button()->setText(i18n("..."));
#endif
@@ -54,14 +54,14 @@ TQVariant PFontButton::value() const
void PFontButton::drawViewer(TQPainter* p, const TQColorGroup& cg, const TQRect& r, const TQVariant& value)
{
- p->setPen(Qt::NoPen);
+ p->setPen(TQt::NoPen);
p->setBrush(cg.background());
p->drawRect(r);
TQFontInfo fi(value.toFont());
- p->drawText(r, Qt::AlignLeft | Qt::AlignVCenter | Qt::SingleLine,
+ p->drawText(r, TQt::AlignLeft | TQt::AlignVCenter | TQt::SingleLine,
fi.family() + (fi.bold() ? i18n(" Bold") : TQString("")) +
(fi.italic() ? i18n(" Italic") : TQString("")) +
- " " + TQString("%1").arg(fi.pointSize()) );
+ " " + TQString("%1").tqarg(fi.pointSize()) );
}
void PFontButton::setValue(const TQVariant& value, bool emitChange)
diff --git a/lib/widgets/propeditor/pfontbutton.h b/lib/widgets/propeditor/pfontbutton.h
index 6538f5ae..d875f307 100644
--- a/lib/widgets/propeditor/pfontbutton.h
+++ b/lib/widgets/propeditor/pfontbutton.h
@@ -32,8 +32,9 @@ namespace PropertyLib{
class PFontButton : public PropertyWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- PFontButton(MultiProperty* property, TQWidget* parent = 0, const char* name = 0);
+ PFontButton(MultiProperty* property, TQWidget* tqparent = 0, const char* name = 0);
virtual TQVariant value() const;
virtual void drawViewer(TQPainter* p, const TQColorGroup& cg, const TQRect& r, const TQVariant& value);
diff --git a/lib/widgets/propeditor/pfontcombo.cpp b/lib/widgets/propeditor/pfontcombo.cpp
index 8b0ee7a7..240310c7 100644
--- a/lib/widgets/propeditor/pfontcombo.cpp
+++ b/lib/widgets/propeditor/pfontcombo.cpp
@@ -33,12 +33,12 @@
namespace PropertyLib{
-PFontCombo::PFontCombo(MultiProperty *property, TQWidget *parent, const char *name)
- :PropertyWidget(property, parent, name)
+PFontCombo::PFontCombo(MultiProperty *property, TQWidget *tqparent, const char *name)
+ :PropertyWidget(property, tqparent, name)
{
TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0);
m_edit = new KFontCombo(this);
- m_edit->setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
+ m_edit->tqsetSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
l->addWidget(m_edit);
/*adymo: KFontCombo seems to have a bug: when it is not editable, the signals
diff --git a/lib/widgets/propeditor/pfontcombo.h b/lib/widgets/propeditor/pfontcombo.h
index a703c99d..63f07f51 100644
--- a/lib/widgets/propeditor/pfontcombo.h
+++ b/lib/widgets/propeditor/pfontcombo.h
@@ -23,7 +23,7 @@
#include "propertywidget.h"
#ifdef PURE_QT
-#define KFontCombo QComboBox
+#define KFontCombo TQComboBox
#endif
class KFontCombo;
@@ -35,8 +35,9 @@ namespace PropertyLib{
*/
class PFontCombo: public PropertyWidget{
Q_OBJECT
+ TQ_OBJECT
public:
- PFontCombo(MultiProperty *property, TQWidget *parent = 0, const char *name = 0);
+ PFontCombo(MultiProperty *property, TQWidget *tqparent = 0, const char *name = 0);
/**@return the value currently entered in the editor widget.*/
virtual TQVariant value() const;
diff --git a/lib/widgets/propeditor/plineedit.cpp b/lib/widgets/propeditor/plineedit.cpp
index f5e1ecb0..0d3afa85 100644
--- a/lib/widgets/propeditor/plineedit.cpp
+++ b/lib/widgets/propeditor/plineedit.cpp
@@ -24,12 +24,12 @@
namespace PropertyLib{
-PLineEdit::PLineEdit(MultiProperty *property, TQWidget *parent, const char *name)
- :PropertyWidget(property, parent, name)
+PLineEdit::PLineEdit(MultiProperty *property, TQWidget *tqparent, const char *name)
+ :PropertyWidget(property, tqparent, name)
{
TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0);
m_edit = new KLineEdit(this);
- m_edit->setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
+ m_edit->tqsetSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
l->addWidget(m_edit);
connect(m_edit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(updateProperty(const TQString&)));
diff --git a/lib/widgets/propeditor/plineedit.h b/lib/widgets/propeditor/plineedit.h
index 6feb2a7b..c4d0c0f1 100644
--- a/lib/widgets/propeditor/plineedit.h
+++ b/lib/widgets/propeditor/plineedit.h
@@ -31,8 +31,9 @@ namespace PropertyLib{
*/
class PLineEdit: public PropertyWidget{
Q_OBJECT
+ TQ_OBJECT
public:
- PLineEdit(MultiProperty *property, TQWidget *parent = 0, const char *name = 0);
+ PLineEdit(MultiProperty *property, TQWidget *tqparent = 0, const char *name = 0);
/**@return the value currently entered in the editor widget.*/
virtual TQVariant value() const;
diff --git a/lib/widgets/propeditor/plinestyleedit.cpp b/lib/widgets/propeditor/plinestyleedit.cpp
index adee930e..13094245 100644
--- a/lib/widgets/propeditor/plinestyleedit.cpp
+++ b/lib/widgets/propeditor/plinestyleedit.cpp
@@ -127,11 +127,11 @@ namespace PropertyLib {
"................................................"};
-PLineStyleEdit::PLineStyleEdit(MultiProperty* property, TQWidget* parent, const char* name): PropertyWidget(property, parent, name)
+PLineStyleEdit::PLineStyleEdit(MultiProperty* property, TQWidget* tqparent, const char* name): PropertyWidget(property, tqparent, name)
{
TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0);
m_edit = new TQComboBox(this);
- m_edit->setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
+ m_edit->tqsetSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
l->addWidget(m_edit);
m_edit->insertItem(TQPixmap(nopen));
@@ -150,7 +150,7 @@ TQVariant PLineStyleEdit::value() const
void PLineStyleEdit::drawViewer(TQPainter* p, const TQColorGroup& cg, const TQRect& r, const TQVariant& value)
{
- p->setPen(Qt::NoPen);
+ p->setPen(TQt::NoPen);
p->setBrush(cg.background());
p->drawRect(r);
diff --git a/lib/widgets/propeditor/plinestyleedit.h b/lib/widgets/propeditor/plinestyleedit.h
index 8bb076d4..6021cb9c 100644
--- a/lib/widgets/propeditor/plinestyleedit.h
+++ b/lib/widgets/propeditor/plinestyleedit.h
@@ -31,8 +31,9 @@ namespace PropertyLib {
*/
class PLineStyleEdit : public PropertyWidget {
Q_OBJECT
+ TQ_OBJECT
public:
- PLineStyleEdit(MultiProperty* property, TQWidget* parent = 0, const char* name = 0);
+ PLineStyleEdit(MultiProperty* property, TQWidget* tqparent = 0, const char* name = 0);
virtual TQVariant value() const;
virtual void drawViewer(TQPainter* p, const TQColorGroup& cg, const TQRect& r, const TQVariant& value);
diff --git a/lib/widgets/propeditor/ppixmapedit.cpp b/lib/widgets/propeditor/ppixmapedit.cpp
index a4c18791..0eaec74b 100644
--- a/lib/widgets/propeditor/ppixmapedit.cpp
+++ b/lib/widgets/propeditor/ppixmapedit.cpp
@@ -41,23 +41,23 @@
namespace PropertyLib{
-PPixmapEdit::PPixmapEdit(MultiProperty* property, TQWidget* parent, const char* name)
- :PropertyWidget(property, parent, name)
+PPixmapEdit::PPixmapEdit(MultiProperty* property, TQWidget* tqparent, const char* name)
+ :PropertyWidget(property, tqparent, name)
{
TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0);
m_edit = new TQLabel(this);
- m_edit->setAlignment(Qt::AlignTop);
+ m_edit->tqsetAlignment(TQt::AlignTop);
m_edit->resize(width(), height()-1);
- m_edit->setBackgroundMode(Qt::PaletteBase);
+ m_edit->setBackgroundMode(TQt::PaletteBase);
m_edit->installEventFilter(this);
m_button = new TQPushButton(i18n("..."), this);
m_button->resize(height(), height()-8);
m_button->move(width() - m_button->width() -1, 0);
- m_button->setSizePolicy(TQSizePolicy::Maximum, TQSizePolicy::Fixed);
+ m_button->tqsetSizePolicy(TQSizePolicy::Maximum, TQSizePolicy::Fixed);
l->addWidget(m_edit);
l->addWidget(m_button);
- m_popup = new TQLabel(0, 0, Qt::WStyle_NoBorder|Qt::WX11BypassWM|WStyle_StaysOnTop);
+ m_popup = new TQLabel(0, 0, TQt::WStyle_NoBorder|TQt::WX11BypassWM|WStyle_StaysOnTop);
m_popup->hide();
@@ -71,7 +71,7 @@ TQVariant PPixmapEdit::value() const
void PPixmapEdit::drawViewer(TQPainter* p, const TQColorGroup& cg, const TQRect& r, const TQVariant& value)
{
- p->setPen(Qt::NoPen);
+ p->setPen(TQt::NoPen);
p->setBrush(cg.background());
p->drawRect(r);
p->drawPixmap(r.topLeft().x(), r.topLeft().y(), value.toPixmap());
@@ -87,7 +87,7 @@ void PPixmapEdit::setValue(const TQVariant& value, bool emitChange)
void PPixmapEdit::updateProperty()
{
#ifndef PURE_QT
- KURL url = KFileDialog::getImageOpenURL(TQString::null, this);
+ KURL url = KFileDialog::getImageOpenURL(TQString(), this);
if (!url.isEmpty())
{
m_edit->setPixmap(TQPixmap(url.path()));
@@ -112,7 +112,7 @@ void PPixmapEdit::resizeEvent(TQResizeEvent *ev)
bool PPixmapEdit::eventFilter(TQObject *o, TQEvent *ev)
{
- if(o == m_edit)
+ if(TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(m_edit))
{
if(ev->type() == TQEvent::MouseButtonPress)
{
@@ -131,7 +131,7 @@ bool PPixmapEdit::eventFilter(TQObject *o, TQEvent *ev)
}
if(ev->type() == TQEvent::KeyPress)
{
- TQKeyEvent* e = static_cast<TQKeyEvent*>(ev);
+ TQKeyEvent* e = TQT_TQKEYEVENT(ev);
if((e->key() == Key_Enter) || (e->key()== Key_Space) || (e->key() == Key_Return))
{
m_button->animateClick();
diff --git a/lib/widgets/propeditor/ppixmapedit.h b/lib/widgets/propeditor/ppixmapedit.h
index 7f431289..09d7ffef 100644
--- a/lib/widgets/propeditor/ppixmapedit.h
+++ b/lib/widgets/propeditor/ppixmapedit.h
@@ -33,8 +33,9 @@ namespace PropertyLib{
class PPixmapEdit : public PropertyWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- PPixmapEdit(MultiProperty* property, TQWidget* parent = 0, const char* name = 0);
+ PPixmapEdit(MultiProperty* property, TQWidget* tqparent = 0, const char* name = 0);
virtual TQVariant value() const;
virtual void drawViewer(TQPainter* p, const TQColorGroup& cg, const TQRect& r, const TQVariant& value);
diff --git a/lib/widgets/propeditor/ppointedit.cpp b/lib/widgets/propeditor/ppointedit.cpp
index eb1a382e..7f31d92d 100644
--- a/lib/widgets/propeditor/ppointedit.cpp
+++ b/lib/widgets/propeditor/ppointedit.cpp
@@ -25,11 +25,11 @@
namespace PropertyLib{
-PPointEdit::PPointEdit(MultiProperty* property, TQWidget* parent, const char* name): PropertyWidget(property, parent, name)
+PPointEdit::PPointEdit(MultiProperty* property, TQWidget* tqparent, const char* name): PropertyWidget(property, tqparent, name)
{
TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0);
m_edit = new KLineEdit(this);
- m_edit->setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
+ m_edit->tqsetSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
l->addWidget(m_edit);
m_edit->setReadOnly(true);
@@ -42,16 +42,16 @@ TQVariant PPointEdit::value() const
void PPointEdit::drawViewer(TQPainter* p, const TQColorGroup& cg, const TQRect& r, const TQVariant& value)
{
- p->setPen(Qt::NoPen);
+ p->setPen(TQt::NoPen);
p->setBrush(cg.background());
p->drawRect(r);
- p->drawText(r, Qt::AlignLeft | Qt::AlignVCenter | Qt::SingleLine, TQString("[ %1, %2 ]").arg(value.toPoint().x()).arg(value.toPoint().y()));
+ p->drawText(r, TQt::AlignLeft | TQt::AlignVCenter | TQt::SingleLine, TQString("[ %1, %2 ]").tqarg(value.toPoint().x()).tqarg(value.toPoint().y()));
}
void PPointEdit::setValue(const TQVariant& value, bool emitChange)
{
m_value = value;
- m_edit->setText(TQString("[ %1, %2 ]").arg(value.toPoint().x()).arg(value.toPoint().y()));
+ m_edit->setText(TQString("[ %1, %2 ]").tqarg(value.toPoint().x()).tqarg(value.toPoint().y()));
if (emitChange)
emit propertyChanged(m_property, value);
diff --git a/lib/widgets/propeditor/ppointedit.h b/lib/widgets/propeditor/ppointedit.h
index e78f9928..e7de9178 100644
--- a/lib/widgets/propeditor/ppointedit.h
+++ b/lib/widgets/propeditor/ppointedit.h
@@ -32,8 +32,9 @@ namespace PropertyLib{
class PPointEdit : public PropertyWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- PPointEdit(MultiProperty* property, TQWidget* parent=0, const char* name=0);
+ PPointEdit(MultiProperty* property, TQWidget* tqparent=0, const char* name=0);
virtual TQVariant value() const;
virtual void drawViewer(TQPainter* p, const TQColorGroup& cg, const TQRect& r, const TQVariant& value);
diff --git a/lib/widgets/propeditor/prectedit.cpp b/lib/widgets/propeditor/prectedit.cpp
index 6b7de9ce..562c013b 100644
--- a/lib/widgets/propeditor/prectedit.cpp
+++ b/lib/widgets/propeditor/prectedit.cpp
@@ -25,11 +25,11 @@
namespace PropertyLib{
-PRectEdit::PRectEdit(MultiProperty* property, TQWidget* parent, const char* name): PropertyWidget(property, parent, name)
+PRectEdit::PRectEdit(MultiProperty* property, TQWidget* tqparent, const char* name): PropertyWidget(property, tqparent, name)
{
TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0);
m_edit = new KLineEdit(this);
- m_edit->setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
+ m_edit->tqsetSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
l->addWidget(m_edit);
m_edit->setReadOnly(true);
@@ -42,16 +42,16 @@ TQVariant PRectEdit::value() const
void PRectEdit::drawViewer(TQPainter* p, const TQColorGroup& cg, const TQRect& r, const TQVariant& value)
{
- p->setPen(Qt::NoPen);
+ p->setPen(TQt::NoPen);
p->setBrush(cg.background());
p->drawRect(r);
- p->drawText(r, Qt::AlignLeft | Qt::AlignVCenter | Qt::SingleLine, TQString("[ %1, %2, %3, %4 ]").arg(value.toRect().x()).arg(value.toRect().y()).arg(value.toRect().width()).arg(value.toRect().height()));
+ p->drawText(r, TQt::AlignLeft | TQt::AlignVCenter | TQt::SingleLine, TQString("[ %1, %2, %3, %4 ]").tqarg(value.toRect().x()).tqarg(value.toRect().y()).tqarg(value.toRect().width()).tqarg(value.toRect().height()));
}
void PRectEdit::setValue(const TQVariant& value, bool emitChange)
{
m_value = value;
- m_edit->setText(TQString("[ %1, %2, %3, %4 ]").arg(value.toRect().x()).arg(value.toRect().y()).arg(value.toRect().width()).arg(value.toRect().height()));
+ m_edit->setText(TQString("[ %1, %2, %3, %4 ]").tqarg(value.toRect().x()).tqarg(value.toRect().y()).tqarg(value.toRect().width()).tqarg(value.toRect().height()));
if (emitChange)
emit propertyChanged(m_property, value);
diff --git a/lib/widgets/propeditor/prectedit.h b/lib/widgets/propeditor/prectedit.h
index 116ee668..14381f80 100644
--- a/lib/widgets/propeditor/prectedit.h
+++ b/lib/widgets/propeditor/prectedit.h
@@ -32,8 +32,9 @@ namespace PropertyLib{
class PRectEdit : public PropertyWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- PRectEdit(MultiProperty* property, TQWidget* parent=0, const char* name=0);
+ PRectEdit(MultiProperty* property, TQWidget* tqparent=0, const char* name=0);
virtual TQVariant value() const;
virtual void drawViewer(TQPainter* p, const TQColorGroup& cg, const TQRect& r, const TQVariant& value);
diff --git a/lib/widgets/propeditor/property.h b/lib/widgets/propeditor/property.h
index a94ea4cb..48c6987f 100644
--- a/lib/widgets/propeditor/property.h
+++ b/lib/widgets/propeditor/property.h
@@ -105,7 +105,7 @@ public:
//predefined custom types
ValueFromList = 2000 /**<string value from a list*/,
- Symbol = 2001 /**<unicode symbol code*/,
+ Symbol = 2001 /**<tqunicode symbol code*/,
FontName = 2002 /**<font name, e.g. "times new roman"*/,
FileURL = 2003 /**<url of a file*/,
DirectoryURL = 2004 /**<url of a directory*/,
diff --git a/lib/widgets/propeditor/propertyeditor.cpp b/lib/widgets/propeditor/propertyeditor.cpp
index 3cd974db..ce154236 100644
--- a/lib/widgets/propeditor/propertyeditor.cpp
+++ b/lib/widgets/propeditor/propertyeditor.cpp
@@ -42,14 +42,14 @@ namespace PropertyLib{
class PropertyItem: public KListViewItem{
public:
- PropertyItem(PropertyEditor *parent, MultiProperty *property)
- :KListViewItem(parent, property->description()), m_editor(parent), m_property(property),
+ PropertyItem(PropertyEditor *tqparent, MultiProperty *property)
+ :KListViewItem(tqparent, property->description()), m_editor(tqparent), m_property(property),
m_changed(false)
{
}
- PropertyItem(PropertyEditor *editor, KListViewItem *parent, MultiProperty *property)
- :KListViewItem(parent, property->description()), m_editor(editor),
+ PropertyItem(PropertyEditor *editor, KListViewItem *tqparent, MultiProperty *property)
+ :KListViewItem(tqparent, property->description()), m_editor(editor),
m_property(property), m_changed(false)
{
}
@@ -120,13 +120,13 @@ private:
class PropertyGroupItem: public KListViewItem{
public:
- PropertyGroupItem(KListView *parent, const TQString &name)
- :KListViewItem(parent, name)
+ PropertyGroupItem(KListView *tqparent, const TQString &name)
+ :KListViewItem(tqparent, name)
{
init();
}
- PropertyGroupItem(KListViewItem *parent, const TQString &name)
- :KListViewItem(parent, name)
+ PropertyGroupItem(KListViewItem *tqparent, const TQString &name)
+ :KListViewItem(tqparent, name)
{
init();
}
@@ -158,14 +158,14 @@ private:
class SeparatorItem: public KListViewItem{
public:
- SeparatorItem(KListView *parent)
- :KListViewItem(parent)
+ SeparatorItem(KListView *tqparent)
+ :KListViewItem(tqparent)
{
setSelectable(false);
}
};
-PropertyEditor::PropertyEditor(TQWidget *parent, const char *name)
- :KListView(parent, name)
+PropertyEditor::PropertyEditor(TQWidget *tqparent, const char *name)
+ :KListView(tqparent, name)
{
setSorting(-1);
@@ -196,7 +196,7 @@ PropertyEditor::PropertyEditor(TQWidget *parent, const char *name)
#else
m_undoButton->setPixmap( TQPixmap("undo.xpm") );
#endif
- m_undoButton->setSizePolicy(TQSizePolicy::Maximum, TQSizePolicy::MinimumExpanding);
+ m_undoButton->tqsetSizePolicy(TQSizePolicy::Maximum, TQSizePolicy::MinimumExpanding);
m_undoButton->resize(m_undoButton->height(), m_undoButton->height());
m_undoButton->hide();
connect(m_undoButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(undo()));
@@ -215,8 +215,8 @@ void PropertyEditor::populateProperties(PropertyList *list)
return;
m_list = list;
connect(m_list, TQT_SIGNAL(propertyValueChanged(Property*)), this, TQT_SLOT(propertyValueChanged(Property*)));
- const TQValueList<QPair<TQString, TQValueList<TQString> > >& groups = m_list->propertiesOfGroup();
- for (TQValueList<QPair<TQString, TQValueList<TQString> > >::const_iterator it = groups.begin();
+ const TQValueList<TQPair<TQString, TQValueList<TQString> > >& groups = m_list->propertiesOfGroup();
+ for (TQValueList<TQPair<TQString, TQValueList<TQString> > >::const_iterator it = groups.begin();
it != groups.end(); ++it)
{
// qWarning("PropertyEditor::populateProperties: adding group %s", (*it).first.ascii());
@@ -259,24 +259,24 @@ void PropertyEditor::addProperty(const TQString &name)
addChildProperties(pitem);
}
-void PropertyEditor::addChildProperties(PropertyItem *parent)
+void PropertyEditor::addChildProperties(PropertyItem *tqparent)
{
- MultiProperty *prop = parent->property();
+ MultiProperty *prop = tqparent->property();
//force machine creation to get detailed properties appended to current multiproperty
- if ( !m_registeredForType.contains(prop->name())
+ if ( !m_registeredForType.tqcontains(prop->name())
&& (PropertyMachineFactory::getInstance()->hasDetailedEditors(prop->type())) )
{
//FIXME: find better solution
machine(prop);
}
-// qWarning("seeking children: count: %d", prop->details.count());
+// qWarning("seeking tqchildren: count: %d", prop->details.count());
- parent->setOpen(true);
+ tqparent->setOpen(true);
for (TQValueList<ChildProperty>::iterator it = prop->details.begin(); it != prop->details.end(); ++it)
{
// qWarning("found child %s", (*it).name().ascii());
- new PropertyItem(this, parent, new MultiProperty(&m_detailedList, &(*it)));
+ new PropertyItem(this, tqparent, new MultiProperty(&m_detailedList, &(*it)));
}
}
@@ -301,11 +301,11 @@ void PropertyEditor::propertyValueChanged(Property *property)
m_currentEditWidget->setValue(property->value(), false);
else
{
-// repaint all items
+// tqrepaint all items
TQListViewItemIterator it(this);
while (it.current())
{
- repaintItem(it.current());
+ tqrepaintItem(it.current());
++it;
}
}
@@ -323,15 +323,15 @@ void PropertyEditor::propertyChanged(MultiProperty *property, const TQVariant &v
if (m_currentEditItem && (m_currentEditItem->property() == property))
{
m_currentEditItem->setChanged(true);
- repaintItem(m_currentEditItem);
+ tqrepaintItem(m_currentEditItem);
}
emit changed();
-/* if (m_list->contains(name))
+/* if (m_list->tqcontains(name))
{
(*m_list)[name]->setValue(value, false);
-// else if (m_detailedList->contains(*/
+// else if (m_detailedList->tqcontains(*/
}
void PropertyEditor::hideEditor()
@@ -360,11 +360,11 @@ void PropertyEditor::showEditor(PropertyItem *item)
void PropertyEditor::placeEditor(PropertyItem *item)
{
- TQRect r = itemRect(item);
+ TQRect r = tqitemRect(item);
if (!r.size().isValid())
{
ensureItemVisible(item);
- r = itemRect(item);
+ r = tqitemRect(item);
}
r.setX(header()->sectionPos(1));
@@ -386,7 +386,7 @@ void PropertyEditor::placeEditor(PropertyItem *item)
m_currentEditLayout->addWidget(editor, 0, 0);
m_currentEditLayout->addWidget(m_undoButton, 0, 1);
m_currentEditArea->resize(r.size());
-// m_currentEditLayout->invalidate();
+// m_currentEditLayout->tqinvalidate();
moveChild(m_currentEditArea, r.x(), r.y());
m_currentEditWidget = editor;
}
@@ -447,7 +447,7 @@ Machine *PropertyEditor::machine(MultiProperty *property)
m_registeredForType[name] = PropertyMachineFactory::getInstance()->machineForProperty(property);
connect(m_registeredForType[name]->propertyEditor, TQT_SIGNAL(propertyChanged(MultiProperty*, const TQVariant&)),
this, TQT_SLOT(propertyChanged(MultiProperty*, const TQVariant&)));
- m_registeredForType[name]->propertyEditor->reparent(m_currentEditArea, 0, m_currentEditArea->childrenRect().topLeft());
+ m_registeredForType[name]->propertyEditor->reparent(m_currentEditArea, 0, m_currentEditArea->tqchildrenRect().topLeft());
m_registeredForType[name]->propertyEditor->hide();
}
return m_registeredForType[name];
@@ -470,7 +470,7 @@ void PropertyEditor::undo()
m_currentEditWidget->undo();
m_currentEditItem->setChanged(false);
- repaintItem(m_currentEditItem);
+ tqrepaintItem(m_currentEditItem);
}
}
diff --git a/lib/widgets/propeditor/propertyeditor.h b/lib/widgets/propeditor/propertyeditor.h
index 6bdd3e32..ee868a55 100644
--- a/lib/widgets/propeditor/propertyeditor.h
+++ b/lib/widgets/propeditor/propertyeditor.h
@@ -24,8 +24,8 @@
#include <klistview.h>
#else
#include <tqlistview.h>
-#define KListView QListView
-#define KListViewItem QListViewItem
+#define KListView TQListView
+#define KListViewItem TQListViewItem
#endif
#include "propertylist.h"
@@ -57,9 +57,10 @@ creation of property widgets from the machine factory.
*/
class PropertyEditor: public KListView{
Q_OBJECT
+ TQ_OBJECT
public:
/**Constructs the property editor.*/
- PropertyEditor(TQWidget *parent = 0, const char *name = 0);
+ PropertyEditor(TQWidget *tqparent = 0, const char *name = 0);
~PropertyEditor();
/**@return @ref Machine for given property.
@@ -102,7 +103,7 @@ protected:
void addGroup(const TQString &name);
void addProperty(PropertyGroupItem *group, const TQString &name);
void addProperty(const TQString &name);
- void addChildProperties(PropertyItem *parent);
+ void addChildProperties(PropertyItem *tqparent);
private:
PropertyList *m_list;
diff --git a/lib/widgets/propeditor/propertylist.cpp b/lib/widgets/propeditor/propertylist.cpp
index 491c2ebb..20feeb43 100644
--- a/lib/widgets/propeditor/propertylist.cpp
+++ b/lib/widgets/propeditor/propertylist.cpp
@@ -41,7 +41,7 @@ PropertyList::~PropertyList()
MultiProperty *PropertyList::operator[](const TQString &name)
{
- if (m_list.contains(name))
+ if (m_list.tqcontains(name))
return m_list[name];
else
return new MultiProperty(this);
@@ -49,7 +49,7 @@ MultiProperty *PropertyList::operator[](const TQString &name)
MultiProperty *PropertyList::property( const TQString &name )
{
- if (m_list.contains(name))
+ if (m_list.tqcontains(name))
return m_list[name];
else
return new MultiProperty(this);
@@ -60,7 +60,7 @@ void PropertyList::addProperty(Property *property)
if (property == 0)
return;
MultiProperty *mp = 0;
- if ( m_list.contains(property->name()) )
+ if ( m_list.tqcontains(property->name()) )
{
mp = m_list[property->name()];
mp->addProperty(property);
@@ -79,7 +79,7 @@ void PropertyList::addProperty(const TQString &group, Property *property)
return;
MultiProperty *mp = 0;
- if (m_list.contains(property->name()))
+ if (m_list.tqcontains(property->name()))
{
mp = m_list[property->name()];
mp->addProperty(property);
@@ -119,7 +119,7 @@ void PropertyList::removeProperty(Property *property)
void PropertyList::removeProperty(const TQString &name)
{
- if (m_list.contains(name))
+ if (m_list.tqcontains(name))
{
TQString group = m_groupOfProperty[m_list[name]];
removeFromGroup(m_list[name]);
@@ -146,7 +146,7 @@ void PropertyList::removeProperty(const TQString &name)
}
}
-const TQValueList<QPair<TQString, TQValueList<TQString> > >& PropertyList::propertiesOfGroup() const
+const TQValueList<TQPair<TQString, TQValueList<TQString> > >& PropertyList::propertiesOfGroup() const
{
return m_propertiesOfGroup;
}
@@ -162,11 +162,11 @@ void PropertyList::addToGroup(const TQString &group, MultiProperty *property)
return;
//do not add same property to the group twice
- if (m_groupOfProperty.contains(property) && (m_groupOfProperty[property] == group))
+ if (m_groupOfProperty.tqcontains(property) && (m_groupOfProperty[property] == group))
return;
- QPair<TQString, TQValueList<TQString> > *groupPair = 0;
- for(TQValueList<QPair<TQString, TQValueList<TQString> > >::iterator it = m_propertiesOfGroup.begin();
+ TQPair<TQString, TQValueList<TQString> > *groupPair = 0;
+ for(TQValueList<TQPair<TQString, TQValueList<TQString> > >::iterator it = m_propertiesOfGroup.begin();
it != m_propertiesOfGroup.end(); ++it)
{
if ((*it).first == group)
@@ -177,7 +177,7 @@ void PropertyList::addToGroup(const TQString &group, MultiProperty *property)
}
if (groupPair == 0)
{
- groupPair = new QPair<TQString, TQValueList<TQString> >();
+ groupPair = new TQPair<TQString, TQValueList<TQString> >();
groupPair->first = group;
groupPair->second.append(property->name());
m_propertiesOfGroup.append(*groupPair);
@@ -185,7 +185,7 @@ void PropertyList::addToGroup(const TQString &group, MultiProperty *property)
return;
}
//check if group already contains property with the same name
- if (!groupPair->second.contains(property->name()))
+ if (!groupPair->second.tqcontains(property->name()))
groupPair->second.append(property->name());
m_groupOfProperty[property] = group;
@@ -196,7 +196,7 @@ void PropertyList::removeFromGroup(MultiProperty *property)
TQString group = m_groupOfProperty[property];
// qWarning("removeFromGroup group=%s", group.ascii());
- for(TQValueList<QPair<TQString, TQValueList<TQString> > >::iterator it = m_propertiesOfGroup.begin();
+ for(TQValueList<TQPair<TQString, TQValueList<TQString> > >::iterator it = m_propertiesOfGroup.begin();
it != m_propertiesOfGroup.end(); ++it)
{
// qWarning("removeFromGroup checking %s", (*it).first.ascii());
@@ -217,16 +217,16 @@ void PropertyList::clear( )
removeProperty(it.key());
}
-bool PropertyList::contains( const TQString & name )
+bool PropertyList::tqcontains( const TQString & name )
{
- if (m_list.contains(name))
+ if (m_list.tqcontains(name))
return true;
return false;
}
TQPtrList<Property> PropertyList::properties(const TQString &name)
{
- if (m_list.contains(name))
+ if (m_list.tqcontains(name))
return m_list[name]->list;
return TQPtrList<Property>();
}
@@ -309,9 +309,9 @@ void PropertyBuffer::intersect(const PropertyList *list)
for (TQMap<TQString, MultiProperty*>::iterator it = m_list.begin(); it != m_list.end(); ++it)
{
// qWarning("intersect:: for mp = %s", it.data()->name().ascii());
- if (list->m_list.contains(it.key()))
+ if (list->m_list.tqcontains(it.key()))
{
-/* qWarning("intersect:: list contains %s", it.key().ascii());
+/* qWarning("intersect:: list tqcontains %s", it.key().ascii());
if ( (*(it.data()) == *(list->m_list[it.key()])))
qWarning("intersect:: equal properties");
else
@@ -334,7 +334,7 @@ void PropertyBuffer::intersectedValueChanged(Property *property)
{
// qWarning("PropertyBuffer::intersectedValueChanged");
TQString propertyName = property->name();
- if (!contains(propertyName))
+ if (!tqcontains(propertyName))
return;
MultiProperty mp(property);
diff --git a/lib/widgets/propeditor/propertylist.h b/lib/widgets/propeditor/propertylist.h
index 96e351fc..c549048b 100644
--- a/lib/widgets/propeditor/propertylist.h
+++ b/lib/widgets/propeditor/propertylist.h
@@ -52,9 +52,10 @@ PropertyList is also capable of grouping properties.
You can have unsorted list of groups of properties or a plain
alphabetically sorted list of properties or both at the same time.
*/
-class PropertyList: public QObject
+class PropertyList: public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
class Iterator {
@@ -110,14 +111,14 @@ public:
virtual void removeProperty(const TQString &name);
/**@return the list of grouped properties.*/
- virtual const TQValueList<QPair<TQString, TQValueList<TQString> > >& propertiesOfGroup() const;
+ virtual const TQValueList<TQPair<TQString, TQValueList<TQString> > >& propertiesOfGroup() const;
/**@return the map: property - group name.*/
virtual const TQMap<MultiProperty*, TQString>& groupOfProperty() const;
/**Clears the list of properties.*/
virtual void clear();
/**Returns true if the list of properties contains property with given name.*/
- virtual bool contains(const TQString &name);
+ virtual bool tqcontains(const TQString &name);
/**The list of properties with given name.*/
TQPtrList<Property> properties(const TQString &name);
@@ -146,7 +147,7 @@ private:
//groups of properties:
// list of group name: (list of property names)
- TQValueList<QPair<TQString, TQValueList<TQString> > > m_propertiesOfGroup;
+ TQValueList<TQPair<TQString, TQValueList<TQString> > > m_propertiesOfGroup;
// map of property: group
TQMap<MultiProperty*, TQString> m_groupOfProperty;
@@ -181,6 +182,7 @@ buf->intersect(list3);
*/
class PropertyBuffer: public PropertyList{
Q_OBJECT
+ TQ_OBJECT
public:
/**Constructs a buffer from given property list.*/
PropertyBuffer(PropertyList *list);
diff --git a/lib/widgets/propeditor/propertymachinefactory.cpp b/lib/widgets/propeditor/propertymachinefactory.cpp
index 613777d6..cccc3a37 100644
--- a/lib/widgets/propeditor/propertymachinefactory.cpp
+++ b/lib/widgets/propeditor/propertymachinefactory.cpp
@@ -76,7 +76,7 @@ Machine *PropertyMachineFactory::machineForProperty(MultiProperty *property)
TQString propertyName = property->name();
TQMap<TQString, TQVariant> valueList = property->valueList();
- if (m_registeredForType.contains(propertyName))
+ if (m_registeredForType.tqcontains(propertyName))
return (*m_registeredForType[propertyName])();
switch (type)
@@ -162,22 +162,22 @@ Machine *PropertyMachineFactory::machineForProperty(MultiProperty *property)
case Property::Cursor:
{
TQMap<TQString, TQVariant> spValues;
- spValues[i18n("Arrow")] = Qt::ArrowCursor;
- spValues[i18n("Up Arrow")] = Qt::UpArrowCursor;
- spValues[i18n("Cross")] = Qt::CrossCursor;
- spValues[i18n("Waiting")] = Qt::WaitCursor;
- spValues[i18n("iBeam")] = Qt::IbeamCursor;
- spValues[i18n("Size Vertical")] = Qt::SizeVerCursor;
- spValues[i18n("Size Horizontal")] = Qt::SizeHorCursor;
- spValues[i18n("Size Slash")] = Qt::SizeBDiagCursor;
- spValues[i18n("Size Backslash")] = Qt::SizeFDiagCursor;
- spValues[i18n("Size All")] = Qt::SizeAllCursor;
- spValues[i18n("Blank")] = Qt::BlankCursor;
- spValues[i18n("Split Vertical")] = Qt::SplitVCursor;
- spValues[i18n("Split Horizontal")] = Qt::SplitHCursor;
- spValues[i18n("Pointing Hand")] = Qt::PointingHandCursor;
- spValues[i18n("Forbidden")] = Qt::ForbiddenCursor;
- spValues[i18n("What's this")] = Qt::WhatsThisCursor;
+ spValues[i18n("Arrow")] = TQt::ArrowCursor;
+ spValues[i18n("Up Arrow")] = TQt::UpArrowCursor;
+ spValues[i18n("Cross")] = TQt::CrossCursor;
+ spValues[i18n("Waiting")] = TQt::WaitCursor;
+ spValues[i18n("iBeam")] = TQt::IbeamCursor;
+ spValues[i18n("SizeQt::Vertical")] = TQt::SizeVerCursor;
+ spValues[i18n("SizeQt::Horizontal")] = TQt::SizeHorCursor;
+ spValues[i18n("Size Slash")] = TQt::SizeBDiagCursor;
+ spValues[i18n("Size Backslash")] = TQt::SizeFDiagCursor;
+ spValues[i18n("Size All")] = TQt::SizeAllCursor;
+ spValues[i18n("Blank")] = TQt::BlankCursor;
+ spValues[i18n("SplitQt::Vertical")] = TQt::SplitVCursor;
+ spValues[i18n("SplitQt::Horizontal")] = TQt::SplitHCursor;
+ spValues[i18n("Pointing Hand")] = TQt::PointingHandCursor;
+ spValues[i18n("Forbidden")] = TQt::ForbiddenCursor;
+ spValues[i18n("What's this")] = TQt::WhatsThisCursor;
Machine *mach = new Machine(new PCursorEdit(property, spValues));
return mach;
}
diff --git a/lib/widgets/propeditor/propertymachinefactory.h b/lib/widgets/propeditor/propertymachinefactory.h
index fae5569f..84da3e71 100644
--- a/lib/widgets/propeditor/propertymachinefactory.h
+++ b/lib/widgets/propeditor/propertymachinefactory.h
@@ -74,7 +74,7 @@ public:
void registerEditor(int type, createMachine creator);
/**Creates and returns the editor for given property type.
- Warning: editor and viewer widgets won't have parent widget. %Property editor
+ Warning: editor and viewer widgets won't have tqparent widget. %Property editor
cares about reparenting and deletion of returned widgets in machines.*/
Machine *machineForProperty(MultiProperty *property);
bool hasDetailedEditors(int type);
diff --git a/lib/widgets/propeditor/propertywidget.cpp b/lib/widgets/propeditor/propertywidget.cpp
index dad296c5..df0df75a 100644
--- a/lib/widgets/propeditor/propertywidget.cpp
+++ b/lib/widgets/propeditor/propertywidget.cpp
@@ -23,8 +23,8 @@
namespace PropertyLib{
-PropertyWidget::PropertyWidget(MultiProperty *property, TQWidget *parent, const char *name)
- :TQWidget(parent, name), m_property(property)
+PropertyWidget::PropertyWidget(MultiProperty *property, TQWidget *tqparent, const char *name)
+ :TQWidget(tqparent, name), m_property(property)
{
}
@@ -40,10 +40,10 @@ void PropertyWidget::setProperty(MultiProperty *property)
void PropertyWidget::drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value)
{
- p->setPen(Qt::NoPen);
+ p->setPen(TQt::NoPen);
p->setBrush(cg.background());
p->drawRect(r);
- p->drawText(r, Qt::AlignLeft | Qt::AlignVCenter | Qt::SingleLine, value.toString());
+ p->drawText(r, TQt::AlignLeft | TQt::AlignVCenter | TQt::SingleLine, value.toString());
}
void PropertyWidget::setValueList(const TQMap<TQString, TQVariant> &// valueList
diff --git a/lib/widgets/propeditor/propertywidget.h b/lib/widgets/propeditor/propertywidget.h
index edbdf6f3..d5a22777 100644
--- a/lib/widgets/propeditor/propertywidget.h
+++ b/lib/widgets/propeditor/propertywidget.h
@@ -40,17 +40,18 @@ Descendants should implement value() and setValue() methods.
Hint: in case you want to implement your property editor widget using
existing widgets like TQLineEdit, TQComboBox, etc. you can't use multiple
-inheritance from two TQObject descendants due to Qt library restriction.
+inheritance from two TQObject descendants due to TQt library restriction.
Therefore use line edits and combo boxes as child widgets.
A set of predefined widgets for predefined property types are available
in the library.
*/
-class PropertyWidget: public QWidget{
+class PropertyWidget: public TQWidget{
Q_OBJECT
+ TQ_OBJECT
public:
/**Constructs widget for property with name "propertyName".*/
- PropertyWidget(MultiProperty *property, TQWidget *parent = 0, const char *name = 0);
+ PropertyWidget(MultiProperty *property, TQWidget *tqparent = 0, const char *name = 0);
virtual ~PropertyWidget() {}
/**@return the value currently entered in the editor widget.*/
diff --git a/lib/widgets/propeditor/propertywidgetproxy.cpp b/lib/widgets/propeditor/propertywidgetproxy.cpp
index 813708ca..27f2a49c 100644
--- a/lib/widgets/propeditor/propertywidgetproxy.cpp
+++ b/lib/widgets/propeditor/propertywidgetproxy.cpp
@@ -26,8 +26,8 @@
namespace PropertyLib{
-PropertyWidgetProxy::PropertyWidgetProxy(TQWidget *parent, const char *name)
- :TQWidget(parent, name), mp(0), m_propertyType(Property::Invalid), m_editor(0)
+PropertyWidgetProxy::PropertyWidgetProxy(TQWidget *tqparent, const char *name)
+ :TQWidget(tqparent, name), mp(0), m_propertyType(Property::Invalid), m_editor(0)
{
p = new Property();
m_layout = new TQHBoxLayout(this, 0, 0);
diff --git a/lib/widgets/propeditor/propertywidgetproxy.h b/lib/widgets/propeditor/propertywidgetproxy.h
index 43ef3311..04a2503a 100644
--- a/lib/widgets/propeditor/propertywidgetproxy.h
+++ b/lib/widgets/propeditor/propertywidgetproxy.h
@@ -39,13 +39,14 @@ It is sometimes useful to create single property editor widgets instead of havin
all in the property editor. Proxy creates an empty widget and shows the property editor
depending on the property type.
*/
-class PropertyWidgetProxy: public QWidget
+class PropertyWidgetProxy: public TQWidget
{
Q_OBJECT
-Q_PROPERTY( int propertyType READ propertyType WRITE setPropertyType DESIGNABLE true )
-Q_PROPERTY( PropertyType propertyType2 READ propertyType2 WRITE setPropertyType2 DESIGNABLE false )
+ TQ_OBJECT
+TQ_PROPERTY( int propertyType READ propertyType WRITE setPropertyType DESIGNABLE true )
+TQ_PROPERTY( PropertyType propertyType2 READ propertyType2 WRITE setPropertyType2 DESIGNABLE false )
public:
- PropertyWidgetProxy(TQWidget *parent = 0, const char *name = 0);
+ PropertyWidgetProxy(TQWidget *tqparent = 0, const char *name = 0);
~PropertyWidgetProxy();
/**Sets the type of a property editor to appear.*/
diff --git a/lib/widgets/propeditor/psizeedit.cpp b/lib/widgets/propeditor/psizeedit.cpp
index 90208304..4ce6561c 100644
--- a/lib/widgets/propeditor/psizeedit.cpp
+++ b/lib/widgets/propeditor/psizeedit.cpp
@@ -25,12 +25,12 @@
namespace PropertyLib{
-PSizeEdit::PSizeEdit(MultiProperty *property, TQWidget *parent, const char *name)
- :PropertyWidget(property, parent, name)
+PSizeEdit::PSizeEdit(MultiProperty *property, TQWidget *tqparent, const char *name)
+ :PropertyWidget(property, tqparent, name)
{
TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0);
m_edit = new KLineEdit(this);
- m_edit->setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
+ m_edit->tqsetSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
l->addWidget(m_edit);
m_edit->setReadOnly(true);
@@ -43,16 +43,16 @@ TQVariant PSizeEdit::value() const
void PSizeEdit::drawViewer(TQPainter* p, const TQColorGroup& cg, const TQRect& r, const TQVariant& value)
{
- p->setPen(Qt::NoPen);
+ p->setPen(TQt::NoPen);
p->setBrush(cg.background());
p->drawRect(r);
- p->drawText(r, Qt::AlignLeft | Qt::AlignVCenter | Qt::SingleLine, TQString("[ %1, %2 ]").arg(value.toSize().width()).arg(value.toSize().height()));
+ p->drawText(r, TQt::AlignLeft | TQt::AlignVCenter | TQt::SingleLine, TQString("[ %1, %2 ]").tqarg(value.toSize().width()).tqarg(value.toSize().height()));
}
void PSizeEdit::setValue(const TQVariant& value, bool emitChange)
{
m_value = value;
- m_edit->setText(TQString("[ %1, %2 ]").arg(value.toSize().width()).arg(value.toSize().height()));
+ m_edit->setText(TQString("[ %1, %2 ]").tqarg(value.toSize().width()).tqarg(value.toSize().height()));
if (emitChange)
emit propertyChanged(m_property, value);
diff --git a/lib/widgets/propeditor/psizeedit.h b/lib/widgets/propeditor/psizeedit.h
index 38f29132..5fbd6d6d 100644
--- a/lib/widgets/propeditor/psizeedit.h
+++ b/lib/widgets/propeditor/psizeedit.h
@@ -34,8 +34,9 @@ namespace PropertyLib{
class PSizeEdit: public PropertyWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- PSizeEdit(MultiProperty *property, TQWidget *parent = 0, const char *name = 0);
+ PSizeEdit(MultiProperty *property, TQWidget *tqparent = 0, const char *name = 0);
virtual TQVariant value() const;
virtual void drawViewer(TQPainter* p, const TQColorGroup& cg, const TQRect& r, const TQVariant& value);
diff --git a/lib/widgets/propeditor/psizepolicyedit.cpp b/lib/widgets/propeditor/psizepolicyedit.cpp
index 9447a4bc..9c417005 100644
--- a/lib/widgets/propeditor/psizepolicyedit.cpp
+++ b/lib/widgets/propeditor/psizepolicyedit.cpp
@@ -26,12 +26,12 @@
namespace PropertyLib{
-PSizePolicyEdit::PSizePolicyEdit(MultiProperty* property, const TQMap<TQString, TQVariant> &spValues, TQWidget* parent, const char* name)
- :PropertyWidget(property, parent, name), m_spValues(spValues)
+PSizePolicyEdit::PSizePolicyEdit(MultiProperty* property, const TQMap<TQString, TQVariant> &spValues, TQWidget* tqparent, const char* name)
+ :PropertyWidget(property, tqparent, name), m_spValues(spValues)
{
TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0);
m_edit = new KLineEdit(this);
- m_edit->setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
+ m_edit->tqsetSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
l->addWidget(m_edit);
m_edit->setReadOnly(true);
@@ -44,16 +44,16 @@ TQVariant PSizePolicyEdit::value() const
void PSizePolicyEdit::drawViewer(TQPainter* p, const TQColorGroup& cg, const TQRect& r, const TQVariant& value)
{
- p->setPen(Qt::NoPen);
+ p->setPen(TQt::NoPen);
p->setBrush(cg.background());
p->drawRect(r);
- p->drawText(r, Qt::AlignLeft | Qt::AlignVCenter | Qt::SingleLine, TQString("%1/%2/%3/%4").arg(findValueDescription(value.toSizePolicy().horData())).arg(findValueDescription(value.toSizePolicy().verData())).arg(value.toSizePolicy().horStretch()).arg(value.toSizePolicy().verStretch()));
+ p->drawText(r, TQt::AlignLeft | TQt::AlignVCenter | TQt::SingleLine, TQString("%1/%2/%3/%4").tqarg(findValueDescription(value.toSizePolicy().horData())).tqarg(findValueDescription(value.toSizePolicy().verData())).tqarg(value.toSizePolicy().horStretch()).tqarg(value.toSizePolicy().verStretch()));
}
void PSizePolicyEdit::setValue(const TQVariant& value, bool emitChange)
{
m_value = value;
- m_edit->setText(TQString("%1/%2/%3/%4").arg(findValueDescription(value.toSizePolicy().horData())).arg(findValueDescription(value.toSizePolicy().verData())).arg(value.toSizePolicy().horStretch()).arg(value.toSizePolicy().verStretch()));
+ m_edit->setText(TQString("%1/%2/%3/%4").tqarg(findValueDescription(value.toSizePolicy().horData())).tqarg(findValueDescription(value.toSizePolicy().verData())).tqarg(value.toSizePolicy().horStretch()).tqarg(value.toSizePolicy().verStretch()));
if (emitChange)
emit propertyChanged(m_property, value);
diff --git a/lib/widgets/propeditor/psizepolicyedit.h b/lib/widgets/propeditor/psizepolicyedit.h
index 36c26d1b..613c65ea 100644
--- a/lib/widgets/propeditor/psizepolicyedit.h
+++ b/lib/widgets/propeditor/psizepolicyedit.h
@@ -34,8 +34,9 @@ namespace PropertyLib{
class PSizePolicyEdit : public PropertyWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- PSizePolicyEdit(MultiProperty* property, const TQMap<TQString, TQVariant> &spValues, TQWidget* parent=0, const char* name=0);
+ PSizePolicyEdit(MultiProperty* property, const TQMap<TQString, TQVariant> &spValues, TQWidget* tqparent=0, const char* name=0);
virtual TQVariant value() const;
virtual void drawViewer(TQPainter* p, const TQColorGroup& cg, const TQRect& r, const TQVariant& value);
diff --git a/lib/widgets/propeditor/pspinbox.cpp b/lib/widgets/propeditor/pspinbox.cpp
index 755041c1..48b36324 100644
--- a/lib/widgets/propeditor/pspinbox.cpp
+++ b/lib/widgets/propeditor/pspinbox.cpp
@@ -26,19 +26,19 @@
namespace PropertyLib{
-PSpinBox::PSpinBox(MultiProperty *property, TQWidget *parent, const char *name)
- :PropertyWidget(property, parent, name)
+PSpinBox::PSpinBox(MultiProperty *property, TQWidget *tqparent, const char *name)
+ :PropertyWidget(property, tqparent, name)
{
TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0);
m_edit = new TQSpinBox(INT_MIN, INT_MAX, 1, this);
- m_edit->setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
+ m_edit->tqsetSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
l->addWidget(m_edit);
connect(m_edit, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(updateProperty(int)));
}
-PSpinBox::PSpinBox(MultiProperty *property, int minValue, int maxValue, int step, TQWidget *parent, const char *name)
- :PropertyWidget(property, parent, name)
+PSpinBox::PSpinBox(MultiProperty *property, int minValue, int maxValue, int step, TQWidget *tqparent, const char *name)
+ :PropertyWidget(property, tqparent, name)
{
TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0);
m_edit = new TQSpinBox(minValue, maxValue, step, this);
diff --git a/lib/widgets/propeditor/pspinbox.h b/lib/widgets/propeditor/pspinbox.h
index d4486cae..28d34ef2 100644
--- a/lib/widgets/propeditor/pspinbox.h
+++ b/lib/widgets/propeditor/pspinbox.h
@@ -31,9 +31,10 @@ namespace PropertyLib{
*/
class PSpinBox: public PropertyWidget{
Q_OBJECT
+ TQ_OBJECT
public:
- PSpinBox(MultiProperty *property, TQWidget *parent = 0, const char *name = 0);
- PSpinBox(MultiProperty *property, int minValue, int maxValue, int step = 1, TQWidget *parent = 0, const char *name = 0);
+ PSpinBox(MultiProperty *property, TQWidget *tqparent = 0, const char *name = 0);
+ PSpinBox(MultiProperty *property, int minValue, int maxValue, int step = 1, TQWidget *tqparent = 0, const char *name = 0);
/**@return the value currently entered in the editor widget.*/
virtual TQVariant value() const;
diff --git a/lib/widgets/propeditor/pstringlistedit.cpp b/lib/widgets/propeditor/pstringlistedit.cpp
index f6803304..e4eeeccf 100644
--- a/lib/widgets/propeditor/pstringlistedit.cpp
+++ b/lib/widgets/propeditor/pstringlistedit.cpp
@@ -29,24 +29,24 @@
#include <kpushbutton.h>
#include <kstdguiitem.h>
#else
-#include "qeditlistbox.h"
+#include "tqeditlistbox.h"
#include <tqpushbutton.h>
#include "compat_tools.h"
#endif
namespace PropertyLib{
-PStringListEdit::PStringListEdit(MultiProperty *property, TQWidget *parent, const char *name)
- :PropertyWidget(property, parent, name)
+PStringListEdit::PStringListEdit(MultiProperty *property, TQWidget *tqparent, const char *name)
+ :PropertyWidget(property, tqparent, name)
{
l = new TQHBoxLayout(this);
edit = new KLineEdit(this);
edit->setReadOnly(true);
- edit->setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
+ edit->tqsetSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
l->addWidget(edit);
pbSelect = new TQPushButton("...", this);
- pbSelect->setSizePolicy(TQSizePolicy::Maximum, TQSizePolicy::MinimumExpanding);
+ pbSelect->tqsetSizePolicy(TQSizePolicy::Maximum, TQSizePolicy::MinimumExpanding);
l->addWidget(pbSelect);
connect(pbSelect, TQT_SIGNAL(clicked()), this, TQT_SLOT(showEditor()));
@@ -71,7 +71,7 @@ void PStringListEdit::showEditor()
TQVBoxLayout *dv = new TQVBoxLayout(dia, 2);
#ifdef PURE_QT
- QEditListBox *select = new QEditListBox(dia, "select_char");
+ TQEditListBox *select = new TQEditListBox(dia, "select_char");
#else
KEditListBox *select = new KEditListBox(dia, "select_char");
#endif
@@ -108,10 +108,10 @@ void PStringListEdit::showEditor()
void PStringListEdit::drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value)
{
- p->setPen(Qt::NoPen);
+ p->setPen(TQt::NoPen);
p->setBrush(cg.background());
p->drawRect(r);
- p->drawText(r, Qt::AlignLeft | Qt::AlignVCenter | Qt::SingleLine, value.toStringList().join(", "));
+ p->drawText(r, TQt::AlignLeft | TQt::AlignVCenter | TQt::SingleLine, value.toStringList().join(", "));
}
}
diff --git a/lib/widgets/propeditor/pstringlistedit.h b/lib/widgets/propeditor/pstringlistedit.h
index e1b076ca..45aa0e4e 100644
--- a/lib/widgets/propeditor/pstringlistedit.h
+++ b/lib/widgets/propeditor/pstringlistedit.h
@@ -35,8 +35,9 @@ namespace PropertyLib{
class PStringListEdit: public PropertyWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- PStringListEdit(MultiProperty *property, TQWidget *parent = 0, const char *name = 0);
+ PStringListEdit(MultiProperty *property, TQWidget *tqparent = 0, const char *name = 0);
/**@return the value currently entered in the editor widget.*/
virtual TQVariant value() const;
diff --git a/lib/widgets/propeditor/psymbolcombo.cpp b/lib/widgets/propeditor/psymbolcombo.cpp
index 24f4259c..087f7a8d 100644
--- a/lib/widgets/propeditor/psymbolcombo.cpp
+++ b/lib/widgets/propeditor/psymbolcombo.cpp
@@ -35,16 +35,16 @@
namespace PropertyLib{
-PSymbolCombo::PSymbolCombo(MultiProperty *property, TQWidget *parent, const char *name)
- :PropertyWidget(property, parent, name)
+PSymbolCombo::PSymbolCombo(MultiProperty *property, TQWidget *tqparent, const char *name)
+ :PropertyWidget(property, tqparent, name)
{
l = new TQHBoxLayout(this);
m_edit = new KLineEdit(this);
- m_edit->setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
+ m_edit->tqsetSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
m_edit->setMaxLength(1);
l->addWidget(m_edit);
m_select = new TQPushButton("...", this);
- m_select->setSizePolicy(TQSizePolicy::Maximum, TQSizePolicy::MinimumExpanding);
+ m_select->tqsetSizePolicy(TQSizePolicy::Maximum, TQSizePolicy::MinimumExpanding);
l->addWidget(m_select);
#ifdef PURE_QT
@@ -58,18 +58,14 @@ PSymbolCombo::PSymbolCombo(MultiProperty *property, TQWidget *parent, const char
TQVariant PSymbolCombo::value() const
{
if (!(m_edit->text().isNull()))
- return TQVariant(TQString("%1").arg(m_edit->text().at(0).unicode()));
+ return TQVariant(TQString("%1").tqarg(m_edit->text().tqat(0).tqunicode()));
else
return TQVariant(0);
}
void PSymbolCombo::setValue(const TQVariant &value, bool emitChange)
{
-#if QT_VERSION >= 0x030100
if (!(value.isNull()))
-#else
- if (value.canCast(TQVariant::Int))
-#endif
{
disconnect(m_edit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(updateProperty(const TQString&)));
m_edit->setText(TQChar(value.toInt()));
@@ -113,15 +109,15 @@ void PSymbolCombo::selectChar()
void PSymbolCombo::updateProperty(const TQString& val)
{
- emit propertyChanged(m_property, TQVariant(TQString("%1").arg(val.at(0).unicode())));
+ emit propertyChanged(m_property, TQVariant(TQString("%1").tqarg(val.tqat(0).tqunicode())));
}
void PSymbolCombo::drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value)
{
p->setBrush(cg.background());
- p->setPen(Qt::NoPen);
+ p->setPen(TQt::NoPen);
p->drawRect(r);
- p->drawText(r, Qt::AlignLeft | Qt::AlignVCenter | Qt::SingleLine, TQChar(value.toInt()));
+ p->drawText(r, TQt::AlignLeft | TQt::AlignVCenter | TQt::SingleLine, TQChar(value.toInt()));
}
}
diff --git a/lib/widgets/propeditor/psymbolcombo.h b/lib/widgets/propeditor/psymbolcombo.h
index b9682023..9c559844 100644
--- a/lib/widgets/propeditor/psymbolcombo.h
+++ b/lib/widgets/propeditor/psymbolcombo.h
@@ -34,8 +34,9 @@ namespace PropertyLib{
*/
class PSymbolCombo: public PropertyWidget{
Q_OBJECT
+ TQ_OBJECT
public:
- PSymbolCombo(MultiProperty *property, TQWidget *parent = 0, const char *name = 0);
+ PSymbolCombo(MultiProperty *property, TQWidget *tqparent = 0, const char *name = 0);
/**@return the value currently entered in the editor widget.*/
virtual TQVariant value() const;
diff --git a/lib/widgets/propeditor/purledit.cpp b/lib/widgets/propeditor/purledit.cpp
index 64e4d0c7..d27a0552 100644
--- a/lib/widgets/propeditor/purledit.cpp
+++ b/lib/widgets/propeditor/purledit.cpp
@@ -30,8 +30,8 @@
namespace PropertyLib{
-PUrlEdit::PUrlEdit(Mode mode, MultiProperty* property, TQWidget* parent, const char* name)
- :PropertyWidget(property, parent, name)
+PUrlEdit::PUrlEdit(Mode mode, MultiProperty* property, TQWidget* tqparent, const char* name)
+ :PropertyWidget(property, tqparent, name)
{
TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0);
#ifndef PURE_QT
@@ -47,7 +47,7 @@ PUrlEdit::PUrlEdit(Mode mode, MultiProperty* property, TQWidget* parent, const c
m_mode = mode;
connect( m_select, TQT_SIGNAL(clicked()),this,TQT_SLOT(select()));
#endif
- m_edit->setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
+ m_edit->tqsetSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
}
TQVariant PUrlEdit::value() const
@@ -84,7 +84,7 @@ void PUrlEdit::select()
if( m_mode == Directory )
m_url = TQFileDialog::getExistingDirectory( m_url,this);
else
- m_url = TQFileDialog::getOpenFileName(m_url, TQString::null, this);
+ m_url = TQFileDialog::getOpenFileName(m_url, TQString(), this);
updateProperty(m_url);
m_edit->setText(m_url);
#endif
diff --git a/lib/widgets/propeditor/purledit.h b/lib/widgets/propeditor/purledit.h
index d54dc3d2..4aff51b8 100644
--- a/lib/widgets/propeditor/purledit.h
+++ b/lib/widgets/propeditor/purledit.h
@@ -39,6 +39,7 @@ namespace PropertyLib{
class PUrlEdit : public PropertyWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
#ifndef PURE_QT
enum Mode {File = KFile::File,Directory = KFile::Directory};
@@ -46,7 +47,7 @@ public:
enum Mode {File,Directory};
#endif
- PUrlEdit(Mode mode, MultiProperty* property, TQWidget* parent=0, const char* name=0);
+ PUrlEdit(Mode mode, MultiProperty* property, TQWidget* tqparent=0, const char* name=0);
virtual TQVariant value() const;
virtual void setValue(const TQVariant& value, bool emitChange);
diff --git a/lib/widgets/propeditor/pyesnobutton.cpp b/lib/widgets/propeditor/pyesnobutton.cpp
index 308570be..9448d672 100644
--- a/lib/widgets/propeditor/pyesnobutton.cpp
+++ b/lib/widgets/propeditor/pyesnobutton.cpp
@@ -31,13 +31,13 @@
namespace PropertyLib{
-PYesNoButton::PYesNoButton(MultiProperty* property, TQWidget* parent, const char* name)
- :PropertyWidget(property, parent, name)
+PYesNoButton::PYesNoButton(MultiProperty* property, TQWidget* tqparent, const char* name)
+ :PropertyWidget(property, tqparent, name)
{
TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0);
m_edit = new TQPushButton(this);
m_edit->setToggleButton(true);
- m_edit->setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
+ m_edit->tqsetSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
l->addWidget(m_edit);
connect(m_edit, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(updateProperty(bool)));
diff --git a/lib/widgets/propeditor/pyesnobutton.h b/lib/widgets/propeditor/pyesnobutton.h
index 408dec4b..efe33584 100644
--- a/lib/widgets/propeditor/pyesnobutton.h
+++ b/lib/widgets/propeditor/pyesnobutton.h
@@ -32,8 +32,9 @@ namespace PropertyLib{
class PYesNoButton : public PropertyWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- PYesNoButton(MultiProperty* property, TQWidget* parent = 0, const char* name = 0);
+ PYesNoButton(MultiProperty* property, TQWidget* tqparent = 0, const char* name = 0);
virtual TQVariant value() const;
virtual void drawViewer(TQPainter* p, const TQColorGroup& cg, const TQRect& r, const TQVariant& value);
diff --git a/lib/widgets/propeditor/qeditlistbox.cpp b/lib/widgets/propeditor/qeditlistbox.cpp
index db40e8e7..565786f0 100644
--- a/lib/widgets/propeditor/qeditlistbox.cpp
+++ b/lib/widgets/propeditor/qeditlistbox.cpp
@@ -46,24 +46,24 @@ public:
int buttons;
};
-QEditListBox::QEditListBox(TQWidget *parent, const char *name,
+QEditListBox::QEditListBox(TQWidget *tqparent, const char *name,
bool checkAtEntering, int buttons )
- :TQGroupBox(parent, name )
+ :TQGroupBox(tqparent, name )
{
init( checkAtEntering, buttons );
}
-QEditListBox::QEditListBox(const TQString& title, TQWidget *parent,
+QEditListBox::QEditListBox(const TQString& title, TQWidget *tqparent,
const char *name, bool checkAtEntering, int buttons)
- :TQGroupBox(title, parent, name )
+ :TQGroupBox(title, tqparent, name )
{
init( checkAtEntering, buttons );
}
QEditListBox::QEditListBox(const TQString& title, const CustomEditor& custom,
- TQWidget *parent, const char *name,
+ TQWidget *tqparent, const char *name,
bool checkAtEntering, int buttons)
- :TQGroupBox(title, parent, name )
+ :TQGroupBox(title, tqparent, name )
{
m_lineEdit = custom.lineEdit();
init( checkAtEntering, buttons, custom.representationWidget() );
@@ -92,7 +92,7 @@ void QEditListBox::init( bool checkAtEntering, int buttons,
servNewButton = servRemoveButton = servUpButton = servDownButton = 0L;
- setSizePolicy(TQSizePolicy(TQSizePolicy::MinimumExpanding,
+ tqsetSizePolicy(TQSizePolicy(TQSizePolicy::MinimumExpanding,
TQSizePolicy::MinimumExpanding));
TQWidget * gb = this;
@@ -185,7 +185,7 @@ void QEditListBox::typedSomething(const TQString& text)
else
{
StringComparisonMode mode = (StringComparisonMode) (ExactMatch | CaseSensitive );
- bool enable = (m_listBox->findItem( text, mode ) == 0L);
+ bool enable = (m_listBox->tqfindItem( text, mode ) == 0L);
servNewButton->setEnabled( enable );
}
}
@@ -256,7 +256,7 @@ void QEditListBox::addItem()
else
{
StringComparisonMode mode = (StringComparisonMode) (ExactMatch | CaseSensitive );
- alreadyInList =(m_listBox->findItem(currentTextLE, mode) != 0);
+ alreadyInList =(m_listBox->tqfindItem(currentTextLE, mode) != 0);
}
}
@@ -298,7 +298,7 @@ void QEditListBox::removeItem()
m_listBox->removeItem( selected );
if ( count() > 0 )
- m_listBox->setSelected( QMIN( selected, count() - 1 ), true );
+ m_listBox->setSelected( TQMIN( selected, count() - 1 ), true );
emit changed();
emit removed( removedText );
diff --git a/lib/widgets/propeditor/qeditlistbox.h b/lib/widgets/propeditor/qeditlistbox.h
index 7a4a34a2..78a61bfc 100644
--- a/lib/widgets/propeditor/qeditlistbox.h
+++ b/lib/widgets/propeditor/qeditlistbox.h
@@ -17,8 +17,8 @@
Boston, MA 02110-1301, USA.
*/
-#ifndef QEDITLISTBOX_H
-#define QEDITLISTBOX_H
+#ifndef TQEDITLISTBOX_H
+#define TQEDITLISTBOX_H
#include <tqgroupbox.h>
#include <tqlistbox.h>
@@ -42,11 +42,12 @@ class TQPushButton;
class QEditListBoxPrivate;
-class QEditListBox : public QGroupBox
+class QEditListBox : public TQGroupBox
{
Q_OBJECT
+ TQ_OBJECT
- Q_PROPERTY( TQStringList items READ items WRITE setItems )
+ TQ_PROPERTY( TQStringList items READ items WRITE setItems )
public:
// @since 3.1
@@ -100,7 +101,7 @@ public:
* it will be checked if you press the Add-button. It is not
* possible to enter items twice into the listbox.
*/
- QEditListBox(TQWidget *parent = 0, const char *name = 0,
+ QEditListBox(TQWidget *tqparent = 0, const char *name = 0,
bool checkAtEntering=false, int buttons = All );
/**
* Create an editable listbox.
@@ -108,7 +109,7 @@ public:
* The same as the other constructor, additionally it takes
* @p title, which will be the title of the frame around the listbox.
*/
- QEditListBox(const TQString& title, TQWidget *parent = 0,
+ QEditListBox(const TQString& title, TQWidget *tqparent = 0,
const char *name = 0, bool checkAtEntering=false,
int buttons = All );
@@ -126,7 +127,7 @@ public:
*/
QEditListBox( const TQString& title,
const CustomEditor &customEditor,
- TQWidget *parent = 0, const char *name = 0,
+ TQWidget *tqparent = 0, const char *name = 0,
bool checkAtEntering = false, int buttons = All );
virtual ~QEditListBox();
diff --git a/lib/widgets/propeditor/qfloatinput.cpp b/lib/widgets/propeditor/qfloatinput.cpp
index a8522105..d14ea9c7 100644
--- a/lib/widgets/propeditor/qfloatinput.cpp
+++ b/lib/widgets/propeditor/qfloatinput.cpp
@@ -18,15 +18,15 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA
*/
-#include "qfloatinput.h"
+#include "tqfloatinput.h"
#include <math.h>
-QFloatInput::QFloatInput( int min, int max, float step, int digits,
- TQWidget *parent, const char *name )
+TQFloatInput::TQFloatInput( int min, int max, float step, int digits,
+ TQWidget *tqparent, const char *name )
: TQSpinBox( (int) (min*pow(digits,10)),
(int) (max*pow(digits,10)),
- (int) (step*pow(digits,10)), parent, name ),
+ (int) (step*pow(digits,10)), tqparent, name ),
m_digits( digits )
{
setValue( (int) (min*pow(digits,10)) );
@@ -36,14 +36,14 @@ QFloatInput::QFloatInput( int min, int max, float step, int digits,
setValidator( validator );
}
-TQString QFloatInput::mapValueToText( int value )
+TQString TQFloatInput::mapValueToText( int value )
{
- TQString format = TQString("%.%1f").arg( m_digits );
+ TQString format = TQString("%.%1f").tqarg( m_digits );
return TQString().sprintf(format.latin1(),
(value/(float)pow(m_digits,10)) );
}
-int QFloatInput::mapTextToValue( bool* ok )
+int TQFloatInput::mapTextToValue( bool* ok )
{
return int(cleanText().toFloat(ok)*pow(m_digits,10));
}
diff --git a/lib/widgets/propeditor/qfloatinput.h b/lib/widgets/propeditor/qfloatinput.h
index 4bbe63e6..dececcbf 100644
--- a/lib/widgets/propeditor/qfloatinput.h
+++ b/lib/widgets/propeditor/qfloatinput.h
@@ -18,18 +18,18 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301 USA
*/
-#ifndef QFLOATINPUT_H
-#define QFLOATINPUT_H
+#ifndef TQFLOATINPUT_H
+#define TQFLOATINPUT_H
#include <tqapplication.h>
#include <tqspinbox.h>
#include <tqvalidator.h>
-class QFloatInput : public QSpinBox
+class TQFloatInput : public TQSpinBox
{
public:
- QFloatInput( int min, int max, float step, int digits,
- TQWidget *parent, const char *name = 0 );
+ TQFloatInput( int min, int max, float step, int digits,
+ TQWidget *tqparent, const char *name = 0 );
virtual TQString mapValueToText( int value );
diff --git a/lib/widgets/propeditor/test.cpp b/lib/widgets/propeditor/test.cpp
index 82665f98..a55a496b 100644
--- a/lib/widgets/propeditor/test.cpp
+++ b/lib/widgets/propeditor/test.cpp
@@ -38,7 +38,7 @@ int main( int argc, char **argv )
"Sample description", "value" ) );
currentList->addProperty(
new Property(Property::Color, "Color",
- "Sample color description", Qt::red ) );
+ "Sample color description", TQt::red ) );
currentList->addProperty(
new Property( Property::Pixmap, "Pixmap",
"sample pixmap description" ) );
diff --git a/lib/widgets/qcomboview.cpp b/lib/widgets/qcomboview.cpp
index 800eec47..eea88588 100644
--- a/lib/widgets/qcomboview.cpp
+++ b/lib/widgets/qcomboview.cpp
@@ -15,7 +15,7 @@
#include "qcomboview.h"
#include <kdeversion.h>
-#ifndef QT_NO_COMBOBOX
+#ifndef TQT_NO_COMBOBOX
#include "tqpopupmenu.h"
#include "tqlistview.h"
#include "tqpainter.h"
@@ -26,7 +26,7 @@
#include "tqapplication.h"
#include "tqlineedit.h"
#include "tqbitmap.h"
-#include "private/qeffects_p.h"
+#include "private/tqeffects_p.h"
#include "tqstringlist.h"
#include "tqcombobox.h"
#include "tqstyle.h"
@@ -39,7 +39,7 @@ public:
QComboViewData( QComboView *cb ): current(0), lView( 0 ), combo( cb )
{
duplicatesEnabled = TRUE;
- cb->setSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Fixed ) );
+ cb->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Fixed ) );
}
inline TQListView * listView() { return lView; }
@@ -68,7 +68,7 @@ public:
TQLineEdit * ed; // /bin/ed rules!
TQTimer *completionTimer;
- TQSize sizeHint;
+ TQSize tqsizeHint;
private:
bool usinglView;
@@ -81,14 +81,14 @@ void QComboViewData::updateLinedGeometry()
{
if ( !ed || !combo )
return;
- TQRect r = TQStyle::visualRect( combo->style().querySubControlMetrics(TQStyle::CC_ComboBox, combo,
+ TQRect r = TQStyle::tqvisualRect( combo->tqstyle().querySubControlMetrics(TQStyle::CC_ComboBox, combo,
TQStyle::SC_ComboBoxEditField), combo );
// qWarning("updateLinedGeometry(): currentItem is %d", combo->currentItem() == 0 ? 0 : 1);
const TQPixmap *pix = combo->currentItem() ? combo->currentItem()->pixmap(0) : 0;
if ( pix && pix->width() < r.width() )
r.setLeft( r.left() + pix->width() + 4 );
- if ( r != ed->geometry() )
+ if ( r != ed->tqgeometry() )
ed->setGeometry( r );
}
@@ -96,7 +96,7 @@ static inline bool checkInsertIndex( const char *method, const char * name,
int count, int *index)
{
bool range_err = (*index > count);
-#if defined(QT_CHECK_RANGE)
+#if defined(TQT_CHECK_RANGE)
if ( range_err )
qWarning( "QComboView::%s: (%s) Index %d out of range",
method, name ? name : "<no name>", *index );
@@ -114,7 +114,7 @@ static inline bool checkIndex( const char *method, const char * name,
int count, int index )
{
bool range_err = (index >= count);
-#if defined(QT_CHECK_RANGE)
+#if defined(TQT_CHECK_RANGE)
if ( range_err )
qWarning( "QComboView::%s: (%s) Index %i out of range",
method, name ? name : "<no name>", index );
@@ -133,13 +133,13 @@ static inline bool checkIndex( const char *method, const char * name,
The input field can be edited if \a rw is TRUE, otherwise the user
may only choose one of the items in the combobox.
- The \a parent and \a name arguments are passed on to the QWidget
+ The \a tqparent and \a name arguments are passed on to the TQWidget
constructor.
*/
-QComboView::QComboView( bool rw, TQWidget *parent, const char *name )
- : TQWidget( parent, name, WResizeNoErase )
+QComboView::QComboView( bool rw, TQWidget *tqparent, const char *name )
+ : TQWidget( tqparent, name, WResizeNoErase )
{
d = new QComboViewData( this );
setUpListView();
@@ -158,7 +158,7 @@ QComboView::QComboView( bool rw, TQWidget *parent, const char *name )
d->completeNow = FALSE;
d->completionTimer = new TQTimer( this );
- setFocusPolicy( StrongFocus );
+ setFocusPolicy( TQ_StrongFocus );
d->ed = 0;
if ( rw )
@@ -204,7 +204,7 @@ void QComboView::clear()
d->current = 0;
if ( d->ed ) {
- d->ed->setText( TQString::fromLatin1("") );
+ d->ed->setText( TQString::tqfromLatin1("") );
d->updateLinedGeometry();
}
currentChanged();
@@ -269,20 +269,20 @@ void QComboView::setAutoResize( bool enable )
reimp
This implementation caches the size hint to avoid resizing when
- the contents change dynamically. To invalidate the cached value
+ the contents change dynamically. To tqinvalidate the cached value
call setFont().
*/
-TQSize QComboView::sizeHint() const
+TQSize QComboView::tqsizeHint() const
{
- if ( isVisible() && d->sizeHint.isValid() )
- return d->sizeHint;
+ if ( isVisible() && d->tqsizeHint.isValid() )
+ return d->tqsizeHint;
constPolish();
// int i, w;
TQFontMetrics fm = fontMetrics();
int maxW = childCount() ? 18 : 7 * fm.width(TQChar('x')) + 18;
- int maxH = QMAX( fm.lineSpacing(), 14 ) + 2;
+ int maxH = TQMAX( fm.lineSpacing(), 14 ) + 2;
/* for( i = 0; i < count(); i++ ) {
w = d->listView()->item( i )->width( d->listView() );
@@ -290,10 +290,10 @@ TQSize QComboView::sizeHint() const
maxW = w;
}
*/
- d->sizeHint = (style().sizeFromContents(TQStyle::CT_ComboBox, this,
+ d->tqsizeHint = (tqstyle().tqsizeFromContents(TQStyle::CT_ComboBox, this,
TQSize(maxW, maxH)).expandedTo(TQApplication::globalStrut()));
- return d->sizeHint;
+ return d->tqsizeHint;
}
@@ -385,7 +385,7 @@ void QComboView::setPalette( const TQPalette &palette )
void QComboView::setFont( const TQFont &font )
{
- d->sizeHint = TQSize(); // invalidate size hint
+ d->tqsizeHint = TQSize(); // tqinvalidate size hint
TQWidget::setFont( font );
d->listView()->setFont( font );
if (d->ed)
@@ -412,7 +412,7 @@ void QComboView::resizeEvent( TQResizeEvent * e )
void QComboView::paintEvent( TQPaintEvent * )
{
TQPainter p( this );
- const TQColorGroup & g = colorGroup();
+ const TQColorGroup & g = tqcolorGroup();
p.setPen(g.text());
TQStyle::SFlags flags = TQStyle::Style_Default;
@@ -428,31 +428,31 @@ void QComboView::paintEvent( TQPaintEvent * )
}
// bool reverse = TQApplication::reverseLayout();
- style().drawComplexControl( TQStyle::CC_ComboBox, &p, this, rect(), g,
+ tqstyle().tqdrawComplexControl( TQStyle::CC_ComboBox, &p, this, rect(), g,
flags, TQStyle::SC_All,
(d->arrowDown ?
TQStyle::SC_ComboBoxArrow :
TQStyle::SC_None ));
- TQRect re = style().querySubControlMetrics( TQStyle::CC_ComboBox, this,
+ TQRect re = tqstyle().querySubControlMetrics( TQStyle::CC_ComboBox, this,
TQStyle::SC_ComboBoxEditField );
- re = TQStyle::visualRect(re, this);
+ re = TQStyle::tqvisualRect(re, this);
p.setClipRect( re );
if ( !d->ed ) {
TQListViewItem * item = d->current;
if ( item ) {
- // we calculate the QListBoxTexts height (ignoring strut)
+ // we calculate the TQListBoxTexts height (ignoring strut)
int itemh = d->listView()->fontMetrics().lineSpacing() + 2;
p.translate( re.x(), re.y() + (re.height() - itemh)/2 );
- item->paintCell( &p, d->listView()->colorGroup(), 0, width(), AlignLeft | AlignVCenter );
+ item->paintCell( &p, d->listView()->tqcolorGroup(), 0, width(), AlignLeft | AlignVCenter );
}
} else if ( d->listView() && d->listView()->currentItem( ) && d->current ) {
TQListViewItem * item = d->current ;
const TQPixmap *pix = item->pixmap(0);
if ( pix ) {
p.fillRect( re.x(), re.y(), pix->width() + 4, re.height(),
- colorGroup().brush( TQColorGroup::Base ) );
+ tqcolorGroup().brush( TQColorGroup::Base ) );
p.drawPixmap( re.x() + 2, re.y() +
( re.height() - pix->height() ) / 2, *pix );
}
@@ -466,30 +466,30 @@ void QComboView::paintEvent( TQPaintEvent * )
void QComboView::mousePressEvent( TQMouseEvent *e )
{
- if ( e->button() != LeftButton )
+ if ( e->button() != Qt::LeftButton )
return;
if ( d->discardNextMousePress ) {
d->discardNextMousePress = FALSE;
return;
}
- TQRect arrowRect = style().querySubControlMetrics( TQStyle::CC_ComboBox, this,
+ TQRect arrowRect = tqstyle().querySubControlMetrics( TQStyle::CC_ComboBox, this,
TQStyle::SC_ComboBoxArrow);
- arrowRect = TQStyle::visualRect(arrowRect, this);
+ arrowRect = TQStyle::tqvisualRect(arrowRect, this);
// Correction for motif style, where arrow is smaller
// and thus has a rect that doesn't fit the button.
- arrowRect.setHeight( QMAX( height() - (2 * arrowRect.y()), arrowRect.height() ) );
+ arrowRect.setHeight( TQMAX( height() - (2 * arrowRect.y()), arrowRect.height() ) );
- if ( childCount() && ( !editable() || arrowRect.contains( e->pos() ) ) ) {
+ if ( childCount() && ( !editable() || arrowRect.tqcontains( e->pos() ) ) ) {
d->arrowPressed = FALSE;
listView()->blockSignals( TRUE );
- qApp->sendEvent( listView(), e ); // trigger the listbox's autoscroll
+ tqApp->sendEvent( listView(), e ); // trigger the listbox's autoscroll
listView()->blockSignals( FALSE );
popup();
- if ( arrowRect.contains( e->pos() ) ) {
+ if ( arrowRect.tqcontains( e->pos() ) ) {
d->arrowPressed = TRUE;
d->arrowDown = TRUE;
- repaint( FALSE );
+ tqrepaint( FALSE );
}
TQTimer::singleShot( 200, this, TQT_SLOT(internalClickTimeout()));
d->shortClick = TRUE;
@@ -604,7 +604,7 @@ TQString QComboView::currentText() const
else if ( d->current )
return currentItem()->text(0);
else
- return TQString::null;
+ return TQString();
}
/*!reimp
@@ -689,23 +689,23 @@ int childCount(TQListView *lv)
static int listHeight( TQListView *l, int /*sl*/ )
{
/* if ( l->childCount() > 0 )
- return QMIN( l->childCount(), (uint)sl) * l->firstChild()->height();
+ return TQMIN( l->childCount(), (uint)sl) * l->firstChild()->height();
else*/
int prefH = 0;
int ch = childCount(l);
- ch = QMIN(ch, 10);
+ ch = TQMIN(ch, 10);
if (l->firstChild())
{
prefH = ch * l->firstChild()->height();
}
else
- prefH = l->sizeHint().height();
+ prefH = l->tqsizeHint().height();
if (l->header()->isVisible())
- prefH += l->header()->sizeHint().height();
+ prefH += l->header()->tqsizeHint().height();
-// return prefH < l->sizeHint().height() ? prefH : l->sizeHint().height();
+// return prefH < l->tqsizeHint().height() ? prefH : l->tqsizeHint().height();
return prefH+2;
}
@@ -727,7 +727,7 @@ void QComboView::popup()
lb->installEventFilter( this );
lb->viewport()->installEventFilter( this );
d->mouseWasInsidePopup = FALSE;
-// int w = lb->variableWidth() ? lb->sizeHint().width() : width();
+// int w = lb->variableWidth() ? lb->tqsizeHint().width() : width();
int w = width();
int h = listHeight( lb, d->sizeLimit );
TQRect screen = TQApplication::desktop()->availableGeometry( const_cast<QComboView*>(this) );
@@ -737,7 +737,7 @@ void QComboView::popup()
int sw = screen.width(); // screen width
int sh = screen.height(); // screen height
TQPoint pos = mapToGlobal( TQPoint(0,height()) );
- // ## Similar code is in QPopupMenu
+ // ## Similar code is in TQPopupMenu
int x = pos.x();
int y = pos.y();
@@ -749,7 +749,7 @@ void QComboView::popup()
if (y + h > sy+sh && y - h - height() >= 0 )
y = y - h - height();
TQRect rect =
- style().querySubControlMetrics( TQStyle::CC_ComboBox, this,
+ tqstyle().querySubControlMetrics( TQStyle::CC_ComboBox, this,
TQStyle::SC_ComboBoxListBoxPopup,
TQStyleOption( x, y, w, h ) );
if ( rect.isNull() )
@@ -767,10 +767,10 @@ void QComboView::popup()
lb->blockSignals( block );
lb->setVScrollBarMode(TQScrollView::Auto);
-//#ifndef QT_NO_EFFECTS
+//#ifndef TQT_NO_EFFECTS
/* if ( TQApplication::isEffectEnabled( UI_AnimateCombo ) ) {
if ( lb->y() < mapToGlobal(TQPoint(0,0)).y() )
- qScrollEffect( lb, QEffects::UpScroll );
+ qScrollEffect( lb, TQEffects::UpScroll );
else
qScrollEffect( lb );
} else*/
@@ -790,7 +790,7 @@ void QComboView::updateMask()
{
TQPainter p( &bm, this );
- style().drawComplexControlMask(TQStyle::CC_ComboBox, &p, this, rect());
+ tqstyle().tqdrawComplexControlMask(TQStyle::CC_ComboBox, &p, this, rect());
}
setMask( bm );
@@ -808,7 +808,7 @@ void QComboView::popDownListView()
d->listView()->setCurrentItem( d->current );
if ( d->arrowDown ) {
d->arrowDown = FALSE;
- repaint( FALSE );
+ tqrepaint( FALSE );
}
d->poppedUp = FALSE;
}
@@ -850,7 +850,7 @@ bool QComboView::eventFilter( TQObject *object, TQEvent *event )
{
if ( !event )
return TRUE;
- else if ( object == d->ed ) {
+ else if ( TQT_BASE_OBJECT(object) == TQT_BASE_OBJECT(d->ed) ) {
if ( event->type() == TQEvent::KeyPress ) {
bool isAccepted = ( (TQKeyEvent*)event )->isAccepted();
keyPressEvent( (TQKeyEvent *)event );
@@ -887,38 +887,38 @@ bool QComboView::eventFilter( TQObject *object, TQEvent *event )
}
}
}
- } else if ( ( object == d->listView() ||
- object == d->listView()->viewport() )) {
+ } else if ( ( TQT_BASE_OBJECT(object) == TQT_BASE_OBJECT(d->listView()) ||
+ TQT_BASE_OBJECT(object) == TQT_BASE_OBJECT(d->listView()->viewport()) )) {
TQMouseEvent *e = (TQMouseEvent*)event;
switch( event->type() ) {
case TQEvent::MouseMove:
if ( !d->mouseWasInsidePopup ) {
// qWarning("!d->mouseWasInsidePopup");
TQPoint pos = e->pos();
- if ( d->listView()->rect().contains( pos ) )
+ if ( TQT_TQRECT_OBJECT(d->listView()->rect()).tqcontains( pos ) )
d->mouseWasInsidePopup = TRUE;
// Check if arrow button should toggle
if ( d->arrowPressed ) {
TQPoint comboPos;
comboPos = mapFromGlobal( d->listView()->mapToGlobal(pos) );
TQRect arrowRect =
- style().querySubControlMetrics( TQStyle::CC_ComboBox, this,
+ tqstyle().querySubControlMetrics( TQStyle::CC_ComboBox, this,
TQStyle::SC_ComboBoxArrow);
- arrowRect = TQStyle::visualRect(arrowRect, this);
- if ( arrowRect.contains( comboPos ) ) {
+ arrowRect = TQStyle::tqvisualRect(arrowRect, this);
+ if ( arrowRect.tqcontains( comboPos ) ) {
if ( !d->arrowDown ) {
d->arrowDown = TRUE;
- repaint( FALSE );
+ tqrepaint( FALSE );
}
} else {
if ( d->arrowDown ) {
d->arrowDown = FALSE;
- repaint( FALSE );
+ tqrepaint( FALSE );
}
}
}
- } else if ((e->state() & ( RightButton | LeftButton | MidButton ) ) == 0 &&
- style().styleHint(TQStyle::SH_ComboBox_ListMouseTracking, this)) {
+ } else if ((e->state() & ( Qt::RightButton | Qt::LeftButton | Qt::MidButton ) ) == 0 &&
+ tqstyle().tqstyleHint(TQStyle::SH_ComboBox_ListMouseTracking, this)) {
// qWarning("event filter:: emu");
TQWidget *mouseW = TQApplication::widgetAt( e->globalPos(), TRUE );
// if ( mouseW == d->listView()->viewport() ) { //###
@@ -935,7 +935,7 @@ bool QComboView::eventFilter( TQObject *object, TQEvent *event )
break;
case TQEvent::MouseButtonRelease:
- if ( d->listView()->rect().contains( e->pos() ) ) {
+ if ( TQT_TQRECT_OBJECT(d->listView()->rect()).tqcontains( e->pos() ) ) {
TQMouseEvent tmp( TQEvent::MouseButtonDblClick,
e->pos(), e->button(), e->state() ) ;
// will hide popup
@@ -948,14 +948,14 @@ bool QComboView::eventFilter( TQObject *object, TQEvent *event )
d->arrowPressed = FALSE;
if ( d->arrowDown ) {
d->arrowDown = FALSE;
- repaint( FALSE );
+ tqrepaint( FALSE );
}
}
}
break;
case TQEvent::MouseButtonDblClick:
case TQEvent::MouseButtonPress:
- if ( !d->listView()->rect().contains( e->pos() ) ) {
+ if ( !TQT_TQRECT_OBJECT(d->listView()->rect()).tqcontains( e->pos() ) ) {
TQPoint globalPos = d->listView()->mapToGlobal(e->pos());
if ( TQApplication::widgetAt( globalPos, TRUE ) == this ) {
d->discardNextMousePress = TRUE;
@@ -980,7 +980,7 @@ bool QComboView::eventFilter( TQObject *object, TQEvent *event )
break;
case Key_Enter:
case Key_Return:
- // work around QDialog's enter handling
+ // work around TQDialog's enter handling
return FALSE;
default:
break;
@@ -1085,7 +1085,7 @@ void QComboView::returnPressed()
TQListViewItem *c = 0;
bool doInsert = TRUE;
if ( !d->duplicatesEnabled ) {
- c = listView()->findItem(s, 0);
+ c = listView()->tqfindItem(s, 0);
if ( c )
doInsert = FALSE;
}
@@ -1161,7 +1161,7 @@ void QComboView::setEnabled( bool enable )
This function does nothing if the combobox is not editable.
- \sa validator() clearValidator() QValidator
+ \sa validator() clearValidator() TQValidator
*/
void QComboView::setValidator( const TQValidator * v )
@@ -1175,7 +1175,7 @@ void QComboView::setValidator( const TQValidator * v )
Returns the validator which constrains editing for this combobox
if there is one; otherwise returns 0.
- \sa setValidator() clearValidator() QValidator
+ \sa setValidator() clearValidator() TQValidator
*/
const TQValidator * QComboView::validator() const
@@ -1333,7 +1333,7 @@ bool QComboView::autoCompletion() const
*/
void QComboView::styleChange( TQStyle& s )
{
- d->sizeHint = TQSize(); // invalidate size hint...
+ d->tqsizeHint = TQSize(); // tqinvalidate size hint...
if ( d->ed )
d->updateLinedGeometry();
TQWidget::styleChange( s );
@@ -1359,7 +1359,7 @@ void QComboView::setEditable( bool y )
d->ed = 0;
}
- setFocusPolicy( StrongFocus );
+ setFocusPolicy( TQ_StrongFocus );
updateGeometry();
update();
}
@@ -1412,7 +1412,7 @@ void QComboView::setUpLineEdit()
void QComboView::setLineEdit( TQLineEdit *edit )
{
if ( !edit ) {
-#if defined(QT_CHECK_NULL)
+#if defined(TQT_CHECK_NULL)
Q_ASSERT( edit != 0 );
#endif
return;
@@ -1430,7 +1430,7 @@ void QComboView::setLineEdit( TQLineEdit *edit )
d->ed = edit;
- if ( edit->parent() != this ) {
+ if ( TQT_BASE_OBJECT(edit->tqparent()) != TQT_BASE_OBJECT(this) ) {
edit->reparent( this, TQPoint(0,0), FALSE );
edit->setFont( font() );
}
@@ -1443,7 +1443,7 @@ void QComboView::setLineEdit( TQLineEdit *edit )
d->updateLinedGeometry();
edit->installEventFilter( this );
setFocusProxy( edit );
- setFocusPolicy( StrongFocus );
+ setFocusPolicy( TQ_StrongFocus );
setUpListView();
@@ -1457,7 +1457,7 @@ void QComboView::setLineEdit( TQLineEdit *edit )
void QComboView::setCurrentText( const TQString& txt )
{
TQListViewItem *i;
- i = listView()->findItem(txt, 0);
+ i = listView()->tqfindItem(txt, 0);
if ( i )
setCurrentItem( i );
else if ( d->ed )
@@ -1501,5 +1501,5 @@ void QComboView::setCurrentActiveItem( TQListViewItem * item )
#include "qcomboview.moc"
-#endif // QT_NO_COMBOBOX
+#endif // TQT_NO_COMBOBOX
diff --git a/lib/widgets/qcomboview.h b/lib/widgets/qcomboview.h
index 1fc87e14..213c278f 100644
--- a/lib/widgets/qcomboview.h
+++ b/lib/widgets/qcomboview.h
@@ -13,14 +13,14 @@
**
**********************************************************************/
-#ifndef QCOMBOVIEW_H
-#define QCOMBOVIEW_H
+#ifndef TQCOMBOVIEW_H
+#define TQCOMBOVIEW_H
-#ifndef QT_H
+#ifndef TQT_H
#include "tqwidget.h"
-#endif // QT_H
+#endif // TQT_H
-#ifndef QT_NO_COMBOBOX
+#ifndef TQT_NO_COMBOBOX
/**
@file qcomboview.h
@@ -40,25 +40,26 @@ QComboView - a combo with a TQListView as a popup widget.
This means that you can have a treeview inside of a combo. Otherwise it works
in the same way as TQComboBox and have similar API.
*/
-class Q_EXPORT QComboView : public QWidget
+class TQ_EXPORT QComboView : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
Q_ENUMS( Policy )
- Q_PROPERTY( bool editable READ editable WRITE setEditable )
-// Q_PROPERTY( int count READ count )
- Q_PROPERTY( TQString currentText READ currentText WRITE setCurrentText DESIGNABLE false )
-// Q_PROPERTY( TQListView *currentItem READ currentItem WRITE setCurrentItem )
- Q_PROPERTY( bool autoResize READ autoResize WRITE setAutoResize DESIGNABLE false )
- Q_PROPERTY( int sizeLimit READ sizeLimit WRITE setSizeLimit )
-// Q_PROPERTY( int maxCount READ maxCount WRITE setMaxCount )
- Q_PROPERTY( Policy insertionPolicy READ insertionPolicy WRITE setInsertionPolicy )
- Q_PROPERTY( bool autoCompletion READ autoCompletion WRITE setAutoCompletion )
- Q_PROPERTY( bool duplicatesEnabled READ duplicatesEnabled WRITE setDuplicatesEnabled )
- Q_OVERRIDE( bool autoMask DESIGNABLE true SCRIPTABLE true )
+ TQ_PROPERTY( bool editable READ editable WRITE setEditable )
+// TQ_PROPERTY( int count READ count )
+ TQ_PROPERTY( TQString currentText READ currentText WRITE setCurrentText DESIGNABLE false )
+// TQ_PROPERTY( TQListView *currentItem READ currentItem WRITE setCurrentItem )
+ TQ_PROPERTY( bool autoResize READ autoResize WRITE setAutoResize DESIGNABLE false )
+ TQ_PROPERTY( int sizeLimit READ sizeLimit WRITE setSizeLimit )
+// TQ_PROPERTY( int maxCount READ maxCount WRITE setMaxCount )
+ TQ_PROPERTY( Policy insertionPolicy READ insertionPolicy WRITE setInsertionPolicy )
+ TQ_PROPERTY( bool autoCompletion READ autoCompletion WRITE setAutoCompletion )
+ TQ_PROPERTY( bool duplicatesEnabled READ duplicatesEnabled WRITE setDuplicatesEnabled )
+ TQ_OVERRIDE( bool autoMask DESIGNABLE true SCRIPTABLE true )
public:
-// QComboView( TQWidget* parent=0, const char* name=0 );
- QComboView( bool rw, TQWidget* parent=0, const char* name=0 );
+// QComboView( TQWidget* tqparent=0, const char* name=0 );
+ QComboView( bool rw, TQWidget* tqparent=0, const char* name=0 );
~QComboView();
int childCount() const;
@@ -69,7 +70,7 @@ public:
bool autoResize() const;
virtual void setAutoResize( bool );
- QSize sizeHint() const;
+ TQSize tqsizeHint() const;
void setPalette( const TQPalette & );
void setFont( const TQFont & );
@@ -160,13 +161,13 @@ private:
QComboViewData *d;
private: // Disabled copy constructor and operator=
-#if defined(Q_DISABLE_COPY)
+#if defined(TQ_DISABLE_COPY)
QComboView( const QComboView & );
QComboView &operator=( const QComboView & );
#endif
};
-#endif // QT_NO_COMBOBOX
+#endif // TQT_NO_COMBOBOX
-#endif // QCOMBOVIEW_H
+#endif // TQCOMBOVIEW_H
diff --git a/lib/widgets/resizablecombo.cpp b/lib/widgets/resizablecombo.cpp
index 6ca7e239..eeeba8d0 100644
--- a/lib/widgets/resizablecombo.cpp
+++ b/lib/widgets/resizablecombo.cpp
@@ -51,8 +51,8 @@ static const char * resize_xpm[] = {
" . ",
" "};
-ResizableCombo::ResizableCombo(KComboView *view, TQWidget *parent, const char *name):
- TQWidget(parent, name), m_sizer(0), m_combo(view)
+ResizableCombo::ResizableCombo(KComboView *view, TQWidget *tqparent, const char *name):
+ TQWidget(tqparent, name), m_sizer(0), m_combo(view)
{
TQHBoxLayout *l = new TQHBoxLayout(this);
view->reparent(this, TQPoint(0,0));
@@ -86,10 +86,10 @@ void MyPushButton::mouseMoveEvent( TQMouseEvent * e )
TQPushButton::mouseMoveEvent(e);
}
-MyPushButton::MyPushButton( ResizableCombo * parent, const char * name )
- :TQPushButton(parent, name), m_resizing(false), m_combo(parent)
+MyPushButton::MyPushButton( ResizableCombo * tqparent, const char * name )
+ :TQPushButton(tqparent, name), m_resizing(false), m_combo(tqparent)
{
- setFocusPolicy(NoFocus);
+ setFocusPolicy(TQ_NoFocus);
setFlat(true);
m_width = m_combo->m_combo->width();
}
diff --git a/lib/widgets/resizablecombo.h b/lib/widgets/resizablecombo.h
index 9301ddea..bafefe33 100644
--- a/lib/widgets/resizablecombo.h
+++ b/lib/widgets/resizablecombo.h
@@ -35,10 +35,11 @@ Resizable combo box.
Resizable combo box.
Used to place resizable KComboBox onto toolbars.
*/
-class ResizableCombo: public QWidget{
+class ResizableCombo: public TQWidget{
Q_OBJECT
+ TQ_OBJECT
public:
- ResizableCombo(KComboView *view, TQWidget *parent = 0, const char *name = 0);
+ ResizableCombo(KComboView *view, TQWidget *tqparent = 0, const char *name = 0);
private:
MyPushButton *m_sizer;
@@ -47,10 +48,10 @@ private:
friend class MyPushButton;
};
-class MyPushButton: public QPushButton
+class MyPushButton: public TQPushButton
{
public:
- MyPushButton(ResizableCombo *parent = 0, const char *name = 0 );
+ MyPushButton(ResizableCombo *tqparent = 0, const char *name = 0 );
TQPoint pressedPos()
{