summaryrefslogtreecommitdiffstats
path: root/src/gui/studio/DeviceEditorDialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/studio/DeviceEditorDialog.cpp')
-rw-r--r--src/gui/studio/DeviceEditorDialog.cpp96
1 files changed, 48 insertions, 48 deletions
diff --git a/src/gui/studio/DeviceEditorDialog.cpp b/src/gui/studio/DeviceEditorDialog.cpp
index 29c9dd4..9f45c31 100644
--- a/src/gui/studio/DeviceEditorDialog.cpp
+++ b/src/gui/studio/DeviceEditorDialog.cpp
@@ -39,23 +39,23 @@
#include "gui/application/RosegardenApplication.h"
#include <kdialogbase.h>
#include <kmessagebox.h>
-#include <qcstring.h>
-#include <qdatastream.h>
-#include <qhbox.h>
-#include <qpushbutton.h>
-#include <qregexp.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qtable.h>
-#include <qvbox.h>
-#include <qwidget.h>
+#include <tqcstring.h>
+#include <tqdatastream.h>
+#include <tqhbox.h>
+#include <tqpushbutton.h>
+#include <tqregexp.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqtable.h>
+#include <tqvbox.h>
+#include <tqwidget.h>
#include <algorithm>
namespace Rosegarden
{
-DeviceEditorDialog::DeviceEditorDialog(QWidget *parent,
+DeviceEditorDialog::DeviceEditorDialog(TQWidget *parent,
RosegardenGUIDoc *document) :
KDialogBase(parent, "deviceeditordialog", true,
i18n("Manage MIDI Devices"), Ok | Apply | Close, Ok, true),
@@ -63,9 +63,9 @@ DeviceEditorDialog::DeviceEditorDialog(QWidget *parent,
m_studio(&document->getStudio()),
m_modified(false)
{
- QVBox *mainBox = makeVBoxMainWidget();
+ TQVBox *mainBox = makeVBoxMainWidget();
- m_table = new QTable(0, 4, mainBox);
+ m_table = new TQTable(0, 4, mainBox);
m_table->setSorting(false);
m_table->setRowMovingEnabled(false);
m_table->setColumnMovingEnabled(false);
@@ -77,7 +77,7 @@ DeviceEditorDialog::DeviceEditorDialog(QWidget *parent,
m_table->horizontalHeader()->show();
m_table->verticalHeader()->hide();
m_table->setLeftMargin(0);
- m_table->setSelectionMode(QTable::SingleRow);
+ m_table->setSelectionMode(TQTable::SingleRow);
m_table->setColumnReadOnly(0, true);
m_table->setColumnReadOnly(2, true);
@@ -88,15 +88,15 @@ DeviceEditorDialog::DeviceEditorDialog(QWidget *parent,
populate();
- QHBox *hbox = new QHBox(mainBox);
- QPushButton *addButton = new QPushButton(i18n("Add Play Device"), hbox);
- QPushButton *addRButton = new QPushButton(i18n("Add Record Device"), hbox);
- QPushButton *deleteButton = new QPushButton(i18n("Delete Device"), hbox);
- connect(addButton, SIGNAL(clicked()), this, SLOT(slotAddPlayDevice()));
- connect(addRButton, SIGNAL(clicked()), this, SLOT(slotAddRecordDevice()));
- connect(deleteButton, SIGNAL(clicked()), this, SLOT(slotDeleteDevice()));
- connect(m_table, SIGNAL(valueChanged(int, int)),
- this, SLOT(slotValueChanged (int, int)));
+ TQHBox *hbox = new TQHBox(mainBox);
+ TQPushButton *addButton = new TQPushButton(i18n("Add Play Device"), hbox);
+ TQPushButton *addRButton = new TQPushButton(i18n("Add Record Device"), hbox);
+ TQPushButton *deleteButton = new TQPushButton(i18n("Delete Device"), hbox);
+ connect(addButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotAddPlayDevice()));
+ connect(addRButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotAddRecordDevice()));
+ connect(deleteButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotDeleteDevice()));
+ connect(m_table, TQT_SIGNAL(valueChanged(int, int)),
+ this, TQT_SLOT(slotValueChanged (int, int)));
setMinimumHeight(250);
@@ -145,9 +145,9 @@ DeviceEditorDialog::populate()
MidiDevice *md = static_cast<MidiDevice *>(*it);
// if you change this string ("Device %1"), change test in slotApply
- QString deviceName = i18n("Device %1").arg(md->getId() + 1);
- QString deviceLabel = strtoqstr(md->getName());
- QString connectionName = strtoqstr(md->getConnection());
+ TQString deviceName = i18n("Device %1").arg(md->getId() + 1);
+ TQString deviceLabel = strtoqstr(md->getName());
+ TQString connectionName = strtoqstr(md->getConnection());
m_table->setText(deviceCount, NAME_COL, deviceName);
m_table->setText(deviceCount, LABEL_COL, deviceLabel);
@@ -155,7 +155,7 @@ DeviceEditorDialog::populate()
(md->getDirection() == MidiDevice::Play ?
i18n("Play") : i18n("Record")));
- QStringList &list(md->getDirection() == MidiDevice::Play ?
+ TQStringList &list(md->getDirection() == MidiDevice::Play ?
m_playConnections : m_recordConnections);
int currentConnectionIndex = list.size() - 1;
for (unsigned int i = 0; i < list.size(); ++i) {
@@ -163,7 +163,7 @@ DeviceEditorDialog::populate()
currentConnectionIndex = i;
}
- QComboTableItem *item = new QComboTableItem(m_table, list, false);
+ TQComboTableItem *item = new TQComboTableItem(m_table, list, false);
item->setCurrentItem(currentConnectionIndex);
m_table->setItem(deviceCount, CONNECTION_COL, item);
@@ -181,12 +181,12 @@ DeviceEditorDialog::populate()
void
DeviceEditorDialog::makeConnectionList(unsigned int direction,
- QStringList &list)
+ TQStringList &list)
{
- QByteArray data;
- QByteArray replyData;
- QCString replyType;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data;
+ TQByteArray replyData;
+ TQCString replyType;
+ TQDataStream arg(data, IO_WriteOnly);
arg << (int)Device::Midi;
arg << direction;
@@ -196,17 +196,17 @@ DeviceEditorDialog::makeConnectionList(unsigned int direction,
return ;
}
- QDataStream reply(replyData, IO_ReadOnly);
+ TQDataStream reply(replyData, IO_ReadOnly);
unsigned int connections = 0;
if (replyType == "unsigned int")
reply >> connections;
for (unsigned int i = 0; i < connections; ++i) {
- QByteArray data;
- QByteArray replyData;
- QCString replyType;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data;
+ TQByteArray replyData;
+ TQCString replyType;
+ TQDataStream arg(data, IO_WriteOnly);
arg << (int)Device::Midi;
arg << direction;
arg << i;
@@ -219,9 +219,9 @@ DeviceEditorDialog::makeConnectionList(unsigned int direction,
return ;
}
- QDataStream reply(replyData, IO_ReadOnly);
- QString connection;
- if (replyType == "QString") {
+ TQDataStream reply(replyData, IO_ReadOnly);
+ TQString connection;
+ if (replyType == "TQString") {
reply >> connection;
list.append(connection);
}
@@ -335,12 +335,12 @@ DeviceEditorDialog::slotApply()
int
DeviceEditorDialog::getDeviceIdAt(int row) // -1 for new device w/o an id yet
{
- QString t(m_table->text(row, 0));
+ TQString t(m_table->text(row, 0));
- QRegExp re("^.*(\\d+).*$");
+ TQRegExp re("^.*(\\d+).*$");
re.search(t);
- QString number = re.cap(1);
+ TQString number = re.cap(1);
int id = -1;
if (number && number != "")
@@ -360,8 +360,8 @@ DeviceEditorDialog::slotAddPlayDevice()
m_table->setText(n, 1, i18n("New Device"));
m_table->setText(n, 2, i18n("Play"));
- QComboTableItem *item =
- new QComboTableItem(m_table, m_playConnections, false);
+ TQComboTableItem *item =
+ new TQComboTableItem(m_table, m_playConnections, false);
item->setCurrentItem(m_playConnections.size() - 1);
m_table->setItem(n, 3, item);
m_table->adjustRow(n);
@@ -378,8 +378,8 @@ DeviceEditorDialog::slotAddRecordDevice()
m_table->setText(n, 1, i18n("New Device"));
m_table->setText(n, 2, i18n("Record"));
- QComboTableItem *item =
- new QComboTableItem(m_table, m_recordConnections, false);
+ TQComboTableItem *item =
+ new TQComboTableItem(m_table, m_recordConnections, false);
item->setCurrentItem(m_recordConnections.size() - 1);
m_table->setItem(n, 3, item);
m_table->adjustRow(n);