summaryrefslogtreecommitdiffstats
path: root/src/gui/studio/StudioControl.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-09-06 20:59:29 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-09-06 20:59:29 +0000
commit11f31c37e5fa4889d9989f10272f44845449cb7b (patch)
tree4383da04a76c497950d957fc6120b0fd0d9082c2 /src/gui/studio/StudioControl.cpp
parent832eb69d571e8e518db45d0c0e6fbc0f00690209 (diff)
downloadrosegarden-11f31c37e5fa4889d9989f10272f44845449cb7b.tar.gz
rosegarden-11f31c37e5fa4889d9989f10272f44845449cb7b.zip
Initial TQt conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/rosegarden@1172292 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/gui/studio/StudioControl.cpp')
-rw-r--r--src/gui/studio/StudioControl.cpp158
1 files changed, 79 insertions, 79 deletions
diff --git a/src/gui/studio/StudioControl.cpp b/src/gui/studio/StudioControl.cpp
index e94016a..6a4d643 100644
--- a/src/gui/studio/StudioControl.cpp
+++ b/src/gui/studio/StudioControl.cpp
@@ -36,9 +36,9 @@
#include "sound/MappedEvent.h"
#include "sound/MappedInstrument.h"
#include "sound/MappedStudio.h"
-#include <qcstring.h>
-#include <qdatastream.h>
-#include <qstring.h>
+#include <tqcstring.h>
+#include <tqdatastream.h>
+#include <tqstring.h>
namespace Rosegarden
@@ -50,10 +50,10 @@ StudioControl::createStudioObject(MappedObject::MappedObjectType type)
Profiler profiler("StudioControl::createStudioObject", true);
int value = -1;
-QByteArray data;
-QCString replyType;
-QByteArray replyData;
-QDataStream streamOut(data, IO_WriteOnly);
+TQByteArray data;
+TQCString replyType;
+TQByteArray replyData;
+TQDataStream streamOut(data, IO_WriteOnly);
streamOut << (int)type;
@@ -65,7 +65,7 @@ if (!rgapp->sequencerCall("createMappedObject(int)",
<< endl;
} else
{
- QDataStream streamIn(replyData, IO_ReadOnly);
+ TQDataStream streamIn(replyData, IO_ReadOnly);
streamIn >> value;
}
@@ -78,10 +78,10 @@ StudioControl::destroyStudioObject(MappedObjectId id)
Profiler profiler("StudioControl::destroyStudioObject", true);
int value = 0;
- QByteArray data;
- QCString replyType;
- QByteArray replyData;
- QDataStream streamOut(data, IO_WriteOnly);
+ TQByteArray data;
+ TQCString replyType;
+ TQByteArray replyData;
+ TQDataStream streamOut(data, IO_WriteOnly);
streamOut << int(id);
@@ -91,7 +91,7 @@ StudioControl::destroyStudioObject(MappedObjectId id)
<< "failed to contact Rosegarden sequencer"
<< endl;
} else {
- QDataStream streamIn(replyData, IO_ReadOnly);
+ TQDataStream streamIn(replyData, IO_ReadOnly);
streamIn >> value;
}
@@ -109,21 +109,21 @@ StudioControl::getStudioObjectProperty(MappedObjectId id,
MappedObjectPropertyList list;
- QByteArray data;
- QCString replyType;
- QByteArray replyData;
- QDataStream streamOut(data, IO_WriteOnly);
+ TQByteArray data;
+ TQCString replyType;
+ TQByteArray replyData;
+ TQDataStream streamOut(data, IO_WriteOnly);
streamOut << (int)id;
- streamOut << QString(property);
+ streamOut << TQString(property);
- if (!rgapp->sequencerCall("getPropertyList(int, QString)",
+ if (!rgapp->sequencerCall("getPropertyList(int, TQString)",
replyType, replyData, data)) {
SEQMAN_DEBUG << "getStudioObjectProperty - "
<< "failed to contact Rosegarden sequencer"
<< endl;
} else {
- QDataStream streamIn(replyData, IO_ReadOnly);
+ TQDataStream streamIn(replyData, IO_ReadOnly);
streamIn >> list;
}
@@ -137,14 +137,14 @@ StudioControl::setStudioObjectProperty(MappedObjectId id,
{
Profiler profiler("StudioControl::setStudioObjectProperty(float)", true);
- QByteArray data;
- QDataStream streamOut(data, IO_WriteOnly);
+ TQByteArray data;
+ TQDataStream streamOut(data, IO_WriteOnly);
streamOut << (int)id;
- streamOut << (QString)property;
+ streamOut << (TQString)property;
streamOut << (float)value;
- rgapp->sequencerSend("setMappedProperty(int, QString, float)", data);
+ rgapp->sequencerSend("setMappedProperty(int, TQString, float)", data);
return true;
}
@@ -156,8 +156,8 @@ StudioControl::setStudioObjectProperties(const MappedObjectIdList &ids,
{
Profiler profiler("StudioControl::setStudioObjectProperties(floats)", true);
- QByteArray data;
- QDataStream streamOut(data, IO_WriteOnly);
+ TQByteArray data;
+ TQDataStream streamOut(data, IO_WriteOnly);
streamOut << ids;
streamOut << properties;
@@ -171,18 +171,18 @@ StudioControl::setStudioObjectProperties(const MappedObjectIdList &ids,
bool
StudioControl::setStudioObjectProperty(MappedObjectId id,
const MappedObjectProperty &property,
- const QString &value)
+ const TQString &value)
{
Profiler profiler("StudioControl::setStudioObjectProperty(string)", true);
- QByteArray data;
- QDataStream streamOut(data, IO_WriteOnly);
+ TQByteArray data;
+ TQDataStream streamOut(data, IO_WriteOnly);
streamOut << (int)id;
- streamOut << (QString)property;
- streamOut << (QString)value;
+ streamOut << (TQString)property;
+ streamOut << (TQString)value;
- rgapp->sequencerSend("setMappedProperty(int, QString, QString)", data);
+ rgapp->sequencerSend("setMappedProperty(int, TQString, TQString)", data);
return true;
}
@@ -194,16 +194,16 @@ StudioControl::setStudioObjectPropertyList(MappedObjectId id,
{
Profiler profiler("StudioControl::setStudioObjectPropertyList", true);
- QByteArray data;
- QDataStream streamOut(data, IO_WriteOnly);
+ TQByteArray data;
+ TQDataStream streamOut(data, IO_WriteOnly);
streamOut << (int)id;
- streamOut << (QString)property;
+ streamOut << (TQString)property;
streamOut << values;
RG_DEBUG << "StudioControl::setStudioObjectPropertyList: " << values.size() << " values for property " << property << endl;
- rgapp->sequencerSend("setMappedPropertyList(int, QString, MappedObjectPropertyList)",
+ rgapp->sequencerSend("setMappedPropertyList(int, TQString, MappedObjectPropertyList)",
data);
return true;
@@ -215,10 +215,10 @@ StudioControl::getStudioObjectByType(MappedObject::MappedObjectType type)
Profiler profiler("StudioControl::getStudioObjectByType", true);
int value = -1;
- QByteArray data;
- QCString replyType;
- QByteArray replyData;
- QDataStream streamOut(data, IO_WriteOnly);
+ TQByteArray data;
+ TQCString replyType;
+ TQByteArray replyData;
+ TQDataStream streamOut(data, IO_WriteOnly);
streamOut << (int)type;
@@ -228,7 +228,7 @@ StudioControl::getStudioObjectByType(MappedObject::MappedObjectType type)
<< "failed to contact Rosegarden sequencer"
<< endl;
} else {
- QDataStream streamIn(replyData, IO_ReadOnly);
+ TQDataStream streamIn(replyData, IO_ReadOnly);
streamIn >> value;
}
@@ -242,8 +242,8 @@ StudioControl::setStudioPluginPort(MappedObjectId pluginId,
{
Profiler profiler("StudioControl::setStudioPluginPort", true);
- QByteArray data;
- QDataStream streamOut(data, IO_WriteOnly);
+ TQByteArray data;
+ TQDataStream streamOut(data, IO_WriteOnly);
// Use new MappedEvent interface
//
@@ -261,10 +261,10 @@ StudioControl::getStudioPluginPort(MappedObjectId pluginId,
Profiler profiler("StudioControl::getStudioPluginPort", true);
float value = 0.0;
- QByteArray data;
- QCString replyType;
- QByteArray replyData;
- QDataStream streamOut(data, IO_WriteOnly);
+ TQByteArray data;
+ TQCString replyType;
+ TQByteArray replyData;
+ TQDataStream streamOut(data, IO_WriteOnly);
streamOut << (int)pluginId;
streamOut << (unsigned long)portId;
@@ -275,7 +275,7 @@ StudioControl::getStudioPluginPort(MappedObjectId pluginId,
<< "failed to contact Rosegarden sequencer"
<< endl;
} else {
- QDataStream streamIn(replyData, IO_ReadOnly);
+ TQDataStream streamIn(replyData, IO_ReadOnly);
streamIn >> value;
}
@@ -287,9 +287,9 @@ StudioControl::getPluginInformation()
{
MappedObjectPropertyList list;
- QByteArray data;
- QCString replyType;
- QByteArray replyData;
+ TQByteArray data;
+ TQCString replyType;
+ TQByteArray replyData;
if (!rgapp->sequencerCall("getPluginInformation()",
replyType, replyData, data)) {
@@ -297,7 +297,7 @@ StudioControl::getPluginInformation()
<< "failed to contact Rosegarden sequencer"
<< endl;
} else {
- QDataStream streamIn(replyData, IO_ReadOnly);
+ TQDataStream streamIn(replyData, IO_ReadOnly);
streamIn >> list;
}
@@ -307,16 +307,16 @@ StudioControl::getPluginInformation()
QString
StudioControl::getPluginProgram(MappedObjectId id, int bank, int program)
{
- QByteArray data;
- QCString replyType;
- QByteArray replyData;
- QDataStream streamOut(data, IO_WriteOnly);
+ TQByteArray data;
+ TQCString replyType;
+ TQByteArray replyData;
+ TQDataStream streamOut(data, IO_WriteOnly);
streamOut << (int)id;
streamOut << (int)bank;
streamOut << (int)program;
- QString programName;
+ TQString programName;
if (!rgapp->sequencerCall("getPluginProgram(int, int, int)",
replyType, replyData, data)) {
@@ -324,7 +324,7 @@ StudioControl::getPluginProgram(MappedObjectId id, int bank, int program)
<< "failed to contact Rosegarden sequencer"
<< endl;
} else {
- QDataStream streamIn(replyData, IO_ReadOnly);
+ TQDataStream streamIn(replyData, IO_ReadOnly);
streamIn >> programName;
}
@@ -332,25 +332,25 @@ StudioControl::getPluginProgram(MappedObjectId id, int bank, int program)
}
unsigned long
-StudioControl::getPluginProgram(MappedObjectId id, QString name)
+StudioControl::getPluginProgram(MappedObjectId id, TQString name)
{
- QByteArray data;
- QCString replyType;
- QByteArray replyData;
- QDataStream streamOut(data, IO_WriteOnly);
+ TQByteArray data;
+ TQCString replyType;
+ TQByteArray replyData;
+ TQDataStream streamOut(data, IO_WriteOnly);
streamOut << (int)id;
streamOut << name;
unsigned long rv;
- if (!rgapp->sequencerCall("getPluginProgram(int, QString)",
+ if (!rgapp->sequencerCall("getPluginProgram(int, TQString)",
replyType, replyData, data)) {
SEQMAN_DEBUG << "getPluginProgram - "
<< "failed to contact Rosegarden sequencer"
<< endl;
} else {
- QDataStream streamIn(replyData, IO_ReadOnly);
+ TQDataStream streamIn(replyData, IO_ReadOnly);
streamIn >> rv;
}
@@ -363,8 +363,8 @@ StudioControl::connectStudioObjects(MappedObjectId id1,
{
Profiler profiler("StudioControl::connectStudioObjects", true);
- QByteArray data;
- QDataStream streamOut(data, IO_WriteOnly);
+ TQByteArray data;
+ TQDataStream streamOut(data, IO_WriteOnly);
streamOut << (int)id1;
streamOut << (int)id2;
@@ -384,8 +384,8 @@ StudioControl::disconnectStudioObjects(MappedObjectId id1,
{
Profiler profiler("StudioControl::disconnectStudioObjects", true);
- QByteArray data;
- QDataStream streamOut(data, IO_WriteOnly);
+ TQByteArray data;
+ TQDataStream streamOut(data, IO_WriteOnly);
streamOut << (int)id1;
streamOut << (int)id2;
@@ -404,8 +404,8 @@ StudioControl::disconnectStudioObject(MappedObjectId id)
{
Profiler profiler("StudioControl::disconnectStudioObject", true);
- QByteArray data;
- QDataStream streamOut(data, IO_WriteOnly);
+ TQByteArray data;
+ TQDataStream streamOut(data, IO_WriteOnly);
streamOut << (int)id;
@@ -443,14 +443,14 @@ StudioControl::sendMappedComposition(const MappedComposition &mC)
if (mC.size() == 0)
return ;
- QCString replyType;
- QByteArray replyData;
+ TQCString replyType;
+ TQByteArray replyData;
MappedComposition::const_iterator it = mC.begin();
for (; it != mC.end(); it++) {
- QByteArray data;
- QDataStream streamOut(data, IO_WriteOnly);
+ TQByteArray data;
+ TQDataStream streamOut(data, IO_WriteOnly);
streamOut << (*it);
rgapp->sequencerSend("processMappedEvent(MappedEvent)", data);
@@ -462,8 +462,8 @@ StudioControl::sendMappedInstrument(const MappedInstrument &mI)
{
Profiler profiler("StudioControl::sendMappedInstrument", true);
- QByteArray data;
- QDataStream streamOut(data, IO_WriteOnly);
+ TQByteArray data;
+ TQDataStream streamOut(data, IO_WriteOnly);
streamOut << (int)mI.getType();
streamOut << (unsigned char)mI.getChannel();
@@ -477,8 +477,8 @@ StudioControl::sendQuarterNoteLength(const RealTime &length)
{
Profiler profiler("StudioControl::sendQuarterNoteLength", true);
- QByteArray data;
- QDataStream streamOut(data, IO_WriteOnly);
+ TQByteArray data;
+ TQDataStream streamOut(data, IO_WriteOnly);
streamOut << (long)length.sec;
streamOut << (long)length.nsec;