summaryrefslogtreecommitdiffstats
path: root/atlantik/libatlantikui/estatedetails.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'atlantik/libatlantikui/estatedetails.cpp')
-rw-r--r--atlantik/libatlantikui/estatedetails.cpp88
1 files changed, 44 insertions, 44 deletions
diff --git a/atlantik/libatlantikui/estatedetails.cpp b/atlantik/libatlantikui/estatedetails.cpp
index d143033c..3a71f25a 100644
--- a/atlantik/libatlantikui/estatedetails.cpp
+++ b/atlantik/libatlantikui/estatedetails.cpp
@@ -14,12 +14,12 @@
// the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
// Boston, MA 02110-1301, USA.
-#include <qpainter.h>
-#include <qpixmap.h>
-#include <qlayout.h>
-#include <qptrlist.h>
-#include <qregexp.h>
-#include <qvgroupbox.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
+#include <tqlayout.h>
+#include <tqptrlist.h>
+#include <tqregexp.h>
+#include <tqvgroupbox.h>
#include <kdialog.h>
#include <kglobalsettings.h>
@@ -39,7 +39,7 @@
#include "estatedetails.h"
#include "kwrappedlistviewitem.h"
-EstateDetails::EstateDetails(Estate *estate, QString text, QWidget *parent, const char *name) : QWidget(parent, name)
+EstateDetails::EstateDetails(Estate *estate, TQString text, TQWidget *parent, const char *name) : TQWidget(parent, name)
{
m_pixmap = 0;
m_quartzBlocks = 0;
@@ -51,22 +51,22 @@ EstateDetails::EstateDetails(Estate *estate, QString text, QWidget *parent, cons
m_closeButton = 0;
m_buttons.setAutoDelete(true);
- m_mainLayout = new QVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint());
+ m_mainLayout = new TQVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint());
Q_CHECK_PTR(m_mainLayout);
- m_mainLayout->addItem(new QSpacerItem(KDialog::spacingHint(), KDialog::spacingHint()+50, QSizePolicy::Fixed, QSizePolicy::Minimum));
+ m_mainLayout->addItem(new TQSpacerItem(KDialog::spacingHint(), KDialog::spacingHint()+50, TQSizePolicy::Fixed, TQSizePolicy::Minimum));
m_infoListView = new KListView(this, "infoListView");
- m_infoListView->addColumn(m_estate ? m_estate->name() : QString("") );
+ m_infoListView->addColumn(m_estate ? m_estate->name() : TQString("") );
m_infoListView->setSorting(-1);
m_mainLayout->addWidget(m_infoListView);
appendText(text);
- m_buttonBox = new QHBoxLayout(m_mainLayout, KDialog::spacingHint());
+ m_buttonBox = new TQHBoxLayout(m_mainLayout, KDialog::spacingHint());
m_buttonBox->setMargin(0);
- m_buttonBox->addItem(new QSpacerItem(20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum));
+ m_buttonBox->addItem(new TQSpacerItem(20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum));
setEstate(estate);
}
@@ -78,7 +78,7 @@ EstateDetails::~EstateDetails()
delete m_infoListView;
}
-void EstateDetails::paintEvent(QPaintEvent *)
+void EstateDetails::paintEvent(TQPaintEvent *)
{
if (m_recreateQuartz)
{
@@ -109,11 +109,11 @@ void EstateDetails::paintEvent(QPaintEvent *)
if (b_recreate)
{
delete m_pixmap;
- m_pixmap = new QPixmap(width(), height());
+ m_pixmap = new TQPixmap(width(), height());
- QColor greenHouse(0, 255, 0);
- QColor redHotel(255, 51, 51);
- QPainter painter;
+ TQColor greenHouse(0, 255, 0);
+ TQColor redHotel(255, 51, 51);
+ TQPainter painter;
painter.begin(m_pixmap, this);
painter.setPen(Qt::black);
@@ -130,12 +130,12 @@ void EstateDetails::paintEvent(QPaintEvent *)
if (m_estate)
{
int titleHeight = 50;
- QColor titleColor = (m_estate->color().isValid() ? m_estate->color() : m_estate->bgColor().light(80));
+ TQColor titleColor = (m_estate->color().isValid() ? m_estate->color() : m_estate->bgColor().light(80));
KPixmap* quartzBuffer = new KPixmap;
quartzBuffer->resize(25, (height()/4)-2);
- QPainter quartzPainter;
+ TQPainter quartzPainter;
quartzPainter.begin(quartzBuffer, this);
painter.setBrush(titleColor);
@@ -178,7 +178,7 @@ void EstateDetails::paintEvent(QPaintEvent *)
if (fontSize == -1)
fontSize = KGlobalSettings::generalFont().pixelSize();
- painter.setFont(QFont(KGlobalSettings::generalFont().family(), fontSize * 2, QFont::Bold));
+ painter.setFont(TQFont(KGlobalSettings::generalFont().family(), fontSize * 2, TQFont::Bold));
painter.drawText(KDialog::marginHint(), KDialog::marginHint(), width()-KDialog::marginHint(), titleHeight, Qt::AlignJustify, m_estate->name());
painter.setPen(Qt::black);
@@ -189,12 +189,12 @@ void EstateDetails::paintEvent(QPaintEvent *)
if (m_estate->estateGroup())
{
xText = titleHeight - fontSize - KDialog::marginHint();
- painter.setFont(QFont(KGlobalSettings::generalFont().family(), fontSize, QFont::Bold));
+ painter.setFont(TQFont(KGlobalSettings::generalFont().family(), fontSize, TQFont::Bold));
painter.drawText(5, xText, width()-10, titleHeight, Qt::AlignRight, m_estate->estateGroup()->name().upper());
}
xText = titleHeight + fontSize + 5;
- painter.setFont(QFont(KGlobalSettings::generalFont().family(), fontSize, QFont::Normal));
+ painter.setFont(TQFont(KGlobalSettings::generalFont().family(), fontSize, TQFont::Normal));
}
b_recreate = false;
@@ -202,7 +202,7 @@ void EstateDetails::paintEvent(QPaintEvent *)
bitBlt(this, 0, 0, m_pixmap);
}
-void EstateDetails::resizeEvent(QResizeEvent *)
+void EstateDetails::resizeEvent(TQResizeEvent *)
{
m_recreateQuartz = true;
b_recreate = true;
@@ -212,43 +212,43 @@ void EstateDetails::addDetails()
{
if (m_estate)
{
- QListViewItem *infoText = 0;
+ TQListViewItem *infoText = 0;
// Price
if (m_estate->price())
{
- infoText = new QListViewItem(m_infoListView, m_infoListView->lastItem(), i18n("Price: %1").arg(m_estate->price()));
- infoText->setPixmap(0, QPixmap(SmallIcon("info")));
+ infoText = new TQListViewItem(m_infoListView, m_infoListView->lastItem(), i18n("Price: %1").arg(m_estate->price()));
+ infoText->setPixmap(0, TQPixmap(SmallIcon("info")));
}
// Owner, houses, isMortgaged
if (m_estate && m_estate->canBeOwned())
{
- infoText = new QListViewItem(m_infoListView, m_infoListView->lastItem(), i18n("Owner: %1").arg(m_estate->owner() ? m_estate->owner()->name() : i18n("unowned")));
- infoText->setPixmap(0, QPixmap(SmallIcon("info")));
+ infoText = new TQListViewItem(m_infoListView, m_infoListView->lastItem(), i18n("Owner: %1").arg(m_estate->owner() ? m_estate->owner()->name() : i18n("unowned")));
+ infoText->setPixmap(0, TQPixmap(SmallIcon("info")));
if (m_estate->isOwned())
{
- infoText = new QListViewItem(m_infoListView, m_infoListView->lastItem(), i18n("Houses: %1").arg(m_estate->houses()));
- infoText->setPixmap(0, QPixmap(SmallIcon("info")));
+ infoText = new TQListViewItem(m_infoListView, m_infoListView->lastItem(), i18n("Houses: %1").arg(m_estate->houses()));
+ infoText->setPixmap(0, TQPixmap(SmallIcon("info")));
- infoText = new QListViewItem(m_infoListView, m_infoListView->lastItem(), i18n("Mortgaged: %1").arg(m_estate->isMortgaged() ? i18n("Yes") : i18n("No")));
- infoText->setPixmap(0, QPixmap(SmallIcon("info")));
+ infoText = new TQListViewItem(m_infoListView, m_infoListView->lastItem(), i18n("Mortgaged: %1").arg(m_estate->isMortgaged() ? i18n("Yes") : i18n("No")));
+ infoText->setPixmap(0, TQPixmap(SmallIcon("info")));
}
}
}
}
-void EstateDetails::addButton(QString command, QString caption, bool enabled)
+void EstateDetails::addButton(TQString command, TQString caption, bool enabled)
{
KPushButton *button = new KPushButton(caption, this);
m_buttons.append(button);
- m_buttonCommandMap[(QObject *)button] = command;
+ m_buttonCommandMap[(TQObject *)button] = command;
m_buttonBox->addWidget(button);
if (m_estate)
{
- QColor bgColor, fgColor;
+ TQColor bgColor, fgColor;
bgColor = m_estate->bgColor().light(110);
fgColor = ( bgColor.red() + bgColor.green() + bgColor.blue() < 255 ) ? Qt::white : Qt::black;
@@ -258,7 +258,7 @@ void EstateDetails::addButton(QString command, QString caption, bool enabled)
button->setEnabled(enabled);
button->show();
- connect(button, SIGNAL(pressed()), this, SLOT(buttonPressed()));
+ connect(button, TQT_SIGNAL(pressed()), this, TQT_SLOT(buttonPressed()));
}
void EstateDetails::addCloseButton()
@@ -268,7 +268,7 @@ void EstateDetails::addCloseButton()
m_closeButton = new KPushButton(KStdGuiItem::close(), this);
m_buttonBox->addWidget(m_closeButton);
m_closeButton->show();
- connect(m_closeButton, SIGNAL(pressed()), this, SIGNAL(buttonClose()));
+ connect(m_closeButton, TQT_SIGNAL(pressed()), this, TQT_SIGNAL(buttonClose()));
}
}
@@ -278,30 +278,30 @@ void EstateDetails::setEstate(Estate *estate)
{
m_estate = estate;
- m_infoListView->setColumnText( 0, m_estate ? m_estate->name() : QString("") );
+ m_infoListView->setColumnText( 0, m_estate ? m_estate->name() : TQString("") );
b_recreate = true;
update();
}
}
-void EstateDetails::setText(QString text)
+void EstateDetails::setText(TQString text)
{
m_infoListView->clear();
appendText(text);
}
-void EstateDetails::appendText(QString text)
+void EstateDetails::appendText(TQString text)
{
if ( text.isEmpty() )
return;
KWrappedListViewItem *infoText = new KWrappedListViewItem(m_infoListView, m_infoListView->lastItem(), text);
- if ( text.find( QRegExp("rolls") ) != -1 )
- infoText->setPixmap(0, QPixmap(SmallIcon("roll")));
+ if ( text.find( TQRegExp("rolls") ) != -1 )
+ infoText->setPixmap(0, TQPixmap(SmallIcon("roll")));
else
- infoText->setPixmap(0, QPixmap(SmallIcon("atlantik")));
+ infoText->setPixmap(0, TQPixmap(SmallIcon("atlantik")));
m_infoListView->ensureItemVisible( infoText );
}
@@ -321,7 +321,7 @@ void EstateDetails::clearButtons()
void EstateDetails::buttonPressed()
{
- emit buttonCommand(QString(m_buttonCommandMap[(QObject *)QObject::sender()]));
+ emit buttonCommand(TQString(m_buttonCommandMap[(TQObject *)TQObject::sender()]));
}
#include "estatedetails.moc"