summaryrefslogtreecommitdiffstats
path: root/lib/widgets/flagboxes.cpp
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/flagboxes.cpp
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/flagboxes.cpp')
-rw-r--r--lib/widgets/flagboxes.cpp90
1 files changed, 45 insertions, 45 deletions
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( )