diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-29 16:05:55 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-29 16:05:55 +0000 |
commit | 87a016680e3677da3993f333561e79eb0cead7d5 (patch) | |
tree | cbda2b4df8b8ee0d8d1617e6c75bec1e3ee0ccba /src/electronics/components/matrixdisplay.cpp | |
parent | 6ce3d1ad09c1096b5ed3db334e02859e45d5c32b (diff) | |
download | ktechlab-87a016680e3677da3993f333561e79eb0cead7d5.tar.gz ktechlab-87a016680e3677da3993f333561e79eb0cead7d5.zip |
TQt4 port ktechlab
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/ktechlab@1238801 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/electronics/components/matrixdisplay.cpp')
-rw-r--r-- | src/electronics/components/matrixdisplay.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/electronics/components/matrixdisplay.cpp b/src/electronics/components/matrixdisplay.cpp index dd40b6a..c2a271d 100644 --- a/src/electronics/components/matrixdisplay.cpp +++ b/src/electronics/components/matrixdisplay.cpp @@ -18,8 +18,8 @@ #include <kdebug.h> #include <klocale.h> -#include <qpainter.h> -#include <qstring.h> +#include <tqpainter.h> +#include <tqstring.h> Item* MatrixDisplay::construct( ItemDocument *itemDocument, bool newItem, const char *id ) { @@ -77,7 +77,7 @@ MatrixDisplay::MatrixDisplay( ICNDocument *icnDocument, bool newItem, const char createProperty( "diode-configuration", Variant::Type::Select ); property("diode-configuration")->setCaption( i18n("Configuration") ); - property("diode-configuration")->setAllowed( QStringList::split(',',"Row Cathode,Column Cathode") ); + property("diode-configuration")->setAllowed( TQStringList::split(',',"Row Cathode,Column Cathode") ); property("diode-configuration")->setValue("Row Cathode"); property("diode-configuration")->setAdvanced(true); } @@ -90,7 +90,7 @@ MatrixDisplay::~MatrixDisplay() void MatrixDisplay::dataChanged() { - QColor color = dataColor("color"); + TQColor color = dataColor("color"); m_r = double(color.red()) / double(0x100); m_g = double(color.green()) / double(0x100); m_b = double(color.blue()) / double(0x100); @@ -221,13 +221,13 @@ void MatrixDisplay::initPins( unsigned numRows, unsigned numCols ) } -QString MatrixDisplay::colPinID( int col ) const +TQString MatrixDisplay::colPinID( int col ) const { - return QString("col_%1").arg(QString::number(col)); + return TQString("col_%1").tqarg(TQString::number(col)); } -QString MatrixDisplay::rowPinID( int row ) const +TQString MatrixDisplay::rowPinID( int row ) const { - return QString("row_%1").arg(QString::number(row)); + return TQString("row_%1").tqarg(TQString::number(row)); } @@ -245,7 +245,7 @@ void MatrixDisplay::stepNonLogic() } -void MatrixDisplay::drawShape( QPainter &p ) +void MatrixDisplay::drawShape( TQPainter &p ) { if ( isSelected() ) p.setPen(m_selectedCol); @@ -269,9 +269,9 @@ void MatrixDisplay::drawShape( QPainter &p ) double _b = m_lastBrightness[i][j]; - QColor brush = QColor( uint(255-(255-_b)*(1-m_r)), uint(255-(255-_b)*(1-m_g)), uint(255-(255-_b)*(1-m_b)) ); + TQColor brush = TQColor( uint(255-(255-_b)*(1-m_r)), uint(255-(255-_b)*(1-m_g)), uint(255-(255-_b)*(1-m_b)) ); p.setBrush(brush); - p.setPen( Qt::NoPen ); + p.setPen( TQt::NoPen ); p.drawEllipse( _x+10+i*16, _y+10+j*16, 12, 12 ); } } |