summaryrefslogtreecommitdiffstats
path: root/src/electronics/components/eckeypad.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/electronics/components/eckeypad.cpp')
-rw-r--r--src/electronics/components/eckeypad.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/electronics/components/eckeypad.cpp b/src/electronics/components/eckeypad.cpp
index 89d2659..c92a562 100644
--- a/src/electronics/components/eckeypad.cpp
+++ b/src/electronics/components/eckeypad.cpp
@@ -24,7 +24,7 @@ Item* ECKeyPad::construct( ItemDocument *itemDocument, bool newItem, const char
LibraryItem* ECKeyPad::libraryItem()
{
return new LibraryItem(
- QString("ec/keypad"),
+ TQString("ec/keypad"),
i18n("Keypad"),
i18n("Switches"),
"keypad.png",
@@ -32,7 +32,7 @@ LibraryItem* ECKeyPad::libraryItem()
ECKeyPad::construct );
}
-const QString text[4][9] =
+const TQString text[4][9] =
{ { "1","2","3","A","E","I","M","Q","U" },
{ "4","5","6","B","F","J","N","R","V" },
{ "7","8","9","C","G","K","O","S","W" },
@@ -66,7 +66,7 @@ ECKeyPad::ECKeyPad( ICNDocument *icnDocument, bool newItem, const char *id )
v->setValue(5e-3);
for ( int i = 0; i < 4; i++ )
- createPin( 0, -32+i*24, 0, QString("row_%1").arg(QString::number(i)) );
+ createPin( 0, -32+i*24, 0, TQString("row_%1").tqarg(TQString::number(i)) );
m_numCols = 0;
}
@@ -77,9 +77,9 @@ ECKeyPad::~ECKeyPad()
}
-QString ECKeyPad::buttonID( int row, int col ) const
+TQString ECKeyPad::buttonID( int row, int col ) const
{
- return QString("b_%1_%2").arg(QString::number(row)).arg(QString::number(col));
+ return TQString("b_%1_%2").tqarg(TQString::number(row)).tqarg(TQString::number(col));
}
@@ -129,17 +129,17 @@ void ECKeyPad::initPins( unsigned numCols )
for ( unsigned i = 0; i < 4; i++ )
{
for ( unsigned j = m_numCols; j < numCols; j++ )
- addButton( buttonID(i,j), QRect( 0, 0, 20, 20 ), text[i][j] );
+ addButton( buttonID(i,j), TQRect( 0, 0, 20, 20 ), text[i][j] );
}
ECNode * cols[numCols];
for ( unsigned j = m_numCols; j < numCols; j++ )
- cols[j] = createPin( 0, 64, 270, "col_" + QString::number(j) );
+ cols[j] = createPin( 0, 64, 270, "col_" + TQString::number(j) );
for ( unsigned i = 0; i < 4; i++ )
{
- ECNode * row = ecNodeWithID("row_"+QString::number(i));
+ ECNode * row = ecNodeWithID("row_"+TQString::number(i));
for ( unsigned j = m_numCols; j < numCols; j++ )
m_switch[i][j] = createSwitch( cols[j], row, true );
}
@@ -155,7 +155,7 @@ void ECKeyPad::initPins( unsigned numCols )
}
for ( unsigned j = numCols; j < m_numCols; j++ )
- removeNode( "col_" + QString::number(j) );
+ removeNode( "col_" + TQString::number(j) );
for ( unsigned i = 0; i < 4; i++ )
{
@@ -172,27 +172,27 @@ void ECKeyPad::initPins( unsigned numCols )
for ( int j = 0; j < int(m_numCols); j++ )
{
widgetWithID( buttonID(i,j) )->setOriginalRect(
- QRect( offsetX() + 6 + 24*j, offsetY() + 6 + 24*i, 20, 20 ) );
+ TQRect( offsetX() + 6 + 24*j, offsetY() + 6 + 24*i, 20, 20 ) );
}
}
for ( int i = 0; i < 4; i++ )
- m_nodeMap["row_" + QString::number(i)].x = width()+offsetX();
+ m_nodeMap["row_" + TQString::number(i)].x = width()+offsetX();
for ( int j = 0; j < int(m_numCols); j++ )
- m_nodeMap["col_" + QString::number(j)].x = 24*j+offsetX()+16;
+ m_nodeMap["col_" + TQString::number(j)].x = 24*j+offsetX()+16;
updateAttachedPositioning();
//END Update Positions
}
-void ECKeyPad::buttonStateChanged( const QString &id, bool state )
+void ECKeyPad::buttonStateChanged( const TQString &id, bool state )
{
if ( !id.startsWith("b_") )
return;
- QStringList tags = QStringList::split( '_', id );
+ TQStringList tags = TQStringList::split( '_', id );
const int i = tags[1].toInt();
const int j = tags[2].toInt();
m_switch[i][j]->setState( state ? Switch::Closed : Switch::Open );