diff options
Diffstat (limited to 'atlantik/libatlantikui/portfolioview.cpp')
-rw-r--r-- | atlantik/libatlantikui/portfolioview.cpp | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/atlantik/libatlantikui/portfolioview.cpp b/atlantik/libatlantikui/portfolioview.cpp index c07d426b..6725cbca 100644 --- a/atlantik/libatlantikui/portfolioview.cpp +++ b/atlantik/libatlantikui/portfolioview.cpp @@ -14,8 +14,8 @@ // the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, // Boston, MA 02110-1301, USA. -#include <qpainter.h> -#include <qcursor.h> +#include <tqpainter.h> +#include <tqcursor.h> #include <kdebug.h> #include <kdialogbase.h> @@ -40,7 +40,7 @@ #define PE_MARGINH 2 #define ICONSIZE 48 -PortfolioView::PortfolioView(AtlanticCore *core, Player *player, QColor activeColor, QColor inactiveColor, QWidget *parent, const char *name) : QWidget(parent, name) +PortfolioView::PortfolioView(AtlanticCore *core, Player *player, TQColor activeColor, TQColor inactiveColor, TQWidget *parent, const char *name) : TQWidget(parent, name) { m_atlanticCore = core; m_player = player; @@ -79,14 +79,14 @@ void PortfolioView::buildPortfolio() clearPortfolio(); // Loop through estate groups in order - QPtrList<EstateGroup> estateGroups = m_atlanticCore->estateGroups(); + TQPtrList<EstateGroup> estateGroups = m_atlanticCore->estateGroups(); PortfolioEstate *lastPE = 0, *firstPEprevGroup = 0; int x = 100, y = 25, marginHint = 5, bottom; bottom = ICONSIZE - PE_HEIGHT - marginHint; EstateGroup *estateGroup; - for (QPtrListIterator<EstateGroup> it(estateGroups); *it; ++it) + for (TQPtrListIterator<EstateGroup> it(estateGroups); *it; ++it) { if ((estateGroup = *it)) { @@ -94,9 +94,9 @@ void PortfolioView::buildPortfolio() lastPE = 0; // Loop through estates - QPtrList<Estate> estates = m_atlanticCore->estates(); + TQPtrList<Estate> estates = m_atlanticCore->estates(); Estate *estate; - for (QPtrListIterator<Estate> it(estates); *it; ++it) + for (TQPtrListIterator<Estate> it(estates); *it; ++it) { if ((estate = *it) && estate->estateGroup() == estateGroup) { @@ -104,7 +104,7 @@ void PortfolioView::buildPortfolio() PortfolioEstate *portfolioEstate = new PortfolioEstate(estate, m_player, false, this, "portfolioestate"); m_portfolioEstates.append(portfolioEstate); - connect(portfolioEstate, SIGNAL(estateClicked(Estate *)), this, SIGNAL(estateClicked(Estate *))); + connect(portfolioEstate, TQT_SIGNAL(estateClicked(Estate *)), this, TQT_SIGNAL(estateClicked(Estate *))); if (lastPE) { x = lastPE->x() + 2; @@ -130,7 +130,7 @@ void PortfolioView::buildPortfolio() portfolioEstate->setGeometry(x, y, portfolioEstate->width(), portfolioEstate->height()); portfolioEstate->show(); - connect(estate, SIGNAL(changed()), portfolioEstate, SLOT(estateChanged())); + connect(estate, TQT_SIGNAL(changed()), portfolioEstate, TQT_SLOT(estateChanged())); lastPE = portfolioEstate; } @@ -159,9 +159,9 @@ void PortfolioView::loadIcon() if (!m_imageName.isEmpty()) { - QString filename = locate("data", "atlantik/themes/default/tokens/" + m_imageName); + TQString filename = locate("data", "atlantik/themes/default/tokens/" + m_imageName); if (KStandardDirs::exists(filename)) - m_image = new QPixmap(filename); + m_image = new TQPixmap(filename); } if (!m_image) @@ -171,31 +171,31 @@ void PortfolioView::loadIcon() /* m_imageName = "hamburger.png"; - QString filename = locate("data", "atlantik/themes/default/tokens/" + m_imageName); + TQString filename = locate("data", "atlantik/themes/default/tokens/" + m_imageName); if (KStandardDirs::exists(filename)) - m_image = new QPixmap(filename); + m_image = new TQPixmap(filename); */ } else if (ICONSIZE > minimumHeight()) setMinimumHeight(ICONSIZE); - QWMatrix m; + TQWMatrix m; m.scale(double(ICONSIZE) / m_image->width(), double(ICONSIZE) / m_image->height()); - QPixmap *scaledPixmap = new QPixmap(ICONSIZE, ICONSIZE); + TQPixmap *scaledPixmap = new TQPixmap(ICONSIZE, ICONSIZE); *scaledPixmap = m_image->xForm(m); delete m_image; m_image = scaledPixmap; } -void PortfolioView::paintEvent(QPaintEvent *) +void PortfolioView::paintEvent(TQPaintEvent *) { if (b_recreate) { delete qpixmap; - qpixmap = new QPixmap(width(), height()); + qpixmap = new TQPixmap(width(), height()); - QPainter painter; + TQPainter painter; painter.begin(qpixmap, this); painter.setPen(Qt::white); @@ -216,17 +216,17 @@ void PortfolioView::paintEvent(QPaintEvent *) } painter.setPen(Qt::white); - painter.setFont(QFont(KGlobalSettings::generalFont().family(), KGlobalSettings::generalFont().pointSize(), QFont::Bold)); + painter.setFont(TQFont(KGlobalSettings::generalFont().family(), KGlobalSettings::generalFont().pointSize(), TQFont::Bold)); painter.drawText(ICONSIZE + KDialog::marginHint(), 15, m_player->name()); if ( m_portfolioEstates.count() ) - painter.drawText(width() - 50, 15, QString::number(m_player->money())); + painter.drawText(width() - 50, 15, TQString::number(m_player->money())); else { painter.setPen(Qt::black); painter.setBrush(Qt::white); - painter.setFont(QFont(KGlobalSettings::generalFont().family(), KGlobalSettings::generalFont().pointSize(), QFont::Normal)); + painter.setFont(TQFont(KGlobalSettings::generalFont().family(), KGlobalSettings::generalFont().pointSize(), TQFont::Normal)); painter.drawText(ICONSIZE + KDialog::marginHint(), 30, m_player->host()); } @@ -235,7 +235,7 @@ void PortfolioView::paintEvent(QPaintEvent *) bitBlt(this, 0, 0, qpixmap); } -void PortfolioView::resizeEvent(QResizeEvent *) +void PortfolioView::resizeEvent(TQResizeEvent *) { b_recreate = true; } @@ -248,7 +248,7 @@ void PortfolioView::playerChanged() update(); } -void PortfolioView::mousePressEvent(QMouseEvent *e) +void PortfolioView::mousePressEvent(TQMouseEvent *e) { Player *playerSelf = m_atlanticCore->playerSelf(); @@ -269,8 +269,8 @@ void PortfolioView::mousePressEvent(QMouseEvent *e) rmbMenu->setItemEnabled( 0, m_atlanticCore->selfIsMaster() ); } - connect(rmbMenu, SIGNAL(activated(int)), this, SLOT(slotMenuAction(int))); - QPoint g = QCursor::pos(); + connect(rmbMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotMenuAction(int))); + TQPoint g = TQCursor::pos(); rmbMenu->exec(g); } } |