summaryrefslogtreecommitdiffstats
path: root/lib/widgets/processwidget.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/processwidget.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/processwidget.cpp')
-rw-r--r--lib/widgets/processwidget.cpp34
1 files changed, 17 insertions, 17 deletions
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 );
}