diff options
Diffstat (limited to 'src/sound/MappedStudio.cpp')
-rw-r--r-- | src/sound/MappedStudio.cpp | 130 |
1 files changed, 65 insertions, 65 deletions
diff --git a/src/sound/MappedStudio.cpp b/src/sound/MappedStudio.cpp index b72550b..3d9dbb8 100644 --- a/src/sound/MappedStudio.cpp +++ b/src/sound/MappedStudio.cpp @@ -59,17 +59,17 @@ static inline void releaseLock(const char *file, int line) #define GET_LOCK getLock(__FILE__,__LINE__) #define RELEASE_LOCK releaseLock(__FILE__,__LINE__) -// These stream functions are stolen and adapted from Qt3 tqvaluevector.h +// These stream functions are stolen and adapted from TQt3 tqvaluevector.h // // ** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. // TQDataStream& operator>>(TQDataStream& s, MappedObjectIdList& v) { v.clear(); - Q_UINT32 c; + TQ_UINT32 c; s >> c; v.resize(c); - for (Q_UINT32 i = 0; i < c; ++i) { + for (TQ_UINT32 i = 0; i < c; ++i) { MappedObjectId t; s >> t; v[i] = t; @@ -79,7 +79,7 @@ TQDataStream& operator>>(TQDataStream& s, MappedObjectIdList& v) TQDataStream& operator<<(TQDataStream& s, const MappedObjectIdList& v) { - s << (Q_UINT32)v.size(); + s << (TQ_UINT32)v.size(); MappedObjectIdList::const_iterator it = v.begin(); for ( ; it != v.end(); ++it ) s << *it; @@ -89,10 +89,10 @@ TQDataStream& operator<<(TQDataStream& s, const MappedObjectIdList& v) TQDataStream& operator>>(TQDataStream& s, MappedObjectPropertyList& v) { v.clear(); - Q_UINT32 c; + TQ_UINT32 c; s >> c; v.resize(c); - for (Q_UINT32 i = 0; i < c; ++i) { + for (TQ_UINT32 i = 0; i < c; ++i) { MappedObjectProperty t; s >> t; v[i] = t; @@ -102,7 +102,7 @@ TQDataStream& operator>>(TQDataStream& s, MappedObjectPropertyList& v) TQDataStream& operator<<(TQDataStream& s, const MappedObjectPropertyList& v) { - s << (Q_UINT32)v.size(); + s << (TQ_UINT32)v.size(); MappedObjectPropertyList::const_iterator it = v.begin(); for ( ; it != v.end(); ++it ) s << *it; @@ -112,10 +112,10 @@ TQDataStream& operator<<(TQDataStream& s, const MappedObjectPropertyList& v) TQDataStream& operator>>(TQDataStream& s, MappedObjectValueList& v) { v.clear(); - Q_UINT32 c; + TQ_UINT32 c; s >> c; v.resize(c); - for (Q_UINT32 i = 0; i < c; ++i) { + for (TQ_UINT32 i = 0; i < c; ++i) { MappedObjectValue t; s >> t; v[i] = t; @@ -125,7 +125,7 @@ TQDataStream& operator>>(TQDataStream& s, MappedObjectValueList& v) TQDataStream& operator<<(TQDataStream& s, const MappedObjectValueList& v) { - s << (Q_UINT32)v.size(); + s << (TQ_UINT32)v.size(); MappedObjectValueList::const_iterator it = v.begin(); for ( ; it != v.end(); ++it ) s << *it; @@ -185,21 +185,21 @@ const MappedObjectProperty MappedPluginPort::Value = "value"; void MappedObject::addChild(MappedObject *object) { - std::vector<MappedObject*>::iterator it = m_children.begin(); - for (; it != m_children.end(); it++) + std::vector<MappedObject*>::iterator it = m_tqchildren.begin(); + for (; it != m_tqchildren.end(); it++) if ((*it) == object) return ; - m_children.push_back(object); + m_tqchildren.push_back(object); } void MappedObject::removeChild(MappedObject *object) { - std::vector<MappedObject*>::iterator it = m_children.begin(); - for (; it != m_children.end(); it++) { + std::vector<MappedObject*>::iterator it = m_tqchildren.begin(); + for (; it != m_tqchildren.end(); it++) { if ((*it) == object) { - m_children.erase(it); + m_tqchildren.erase(it); return ; } } @@ -211,9 +211,9 @@ MappedObjectPropertyList MappedObject::getChildren() { MappedObjectPropertyList list; - std::vector<MappedObject*>::iterator it = m_children.begin(); - for (; it != m_children.end(); it++) - list.push_back(TQString("%1").arg((*it)->getId())); + std::vector<MappedObject*>::iterator it = m_tqchildren.begin(); + for (; it != m_tqchildren.end(); it++) + list.push_back(TQString("%1").tqarg((*it)->getId())); return list; } @@ -225,10 +225,10 @@ MappedObjectPropertyList MappedObject::getChildren(MappedObjectType type) { MappedObjectPropertyList list; - std::vector<MappedObject*>::iterator it = m_children.begin(); - for (; it != m_children.end(); it++) { + std::vector<MappedObject*>::iterator it = m_tqchildren.begin(); + for (; it != m_tqchildren.end(); it++) { if ((*it)->getType() == type) - list.push_back(TQString("%1").arg((*it)->getId())); + list.push_back(TQString("%1").tqarg((*it)->getId())); } return list; @@ -244,16 +244,16 @@ MappedObject::destroyChildren() // see note in destroy() below - std::vector<MappedObject *> children = m_children; - m_children.clear(); + std::vector<MappedObject *> tqchildren = m_tqchildren; + m_tqchildren.clear(); - std::vector<MappedObject *>::iterator it = children.begin(); - for (; it != children.end(); it++) + std::vector<MappedObject *>::iterator it = tqchildren.begin(); + for (; it != tqchildren.end(); it++) (*it)->destroy(); // remove from studio and destroy } // Destroy this object and remove it from the studio and -// do the same for all its children. +// do the same for all its tqchildren. // void MappedObject::destroy() @@ -265,17 +265,17 @@ MappedObject::destroy() MappedStudio *studio = dynamic_cast<MappedStudio*>(studioObject); // The destroy method on each child calls studio->clearObject, - // which calls back on the parent (in this case us) to remove the + // which calls back on the tqparent (in this case us) to remove the // child. (That's necessary for the case of destroying a plugin, // where we need to remove it from its plugin manager -- etc.) So - // we don't want to be iterating over m_children here, as it will + // we don't want to be iterating over m_tqchildren here, as it will // change from under us. - std::vector<MappedObject *> children = m_children; - m_children.clear(); + std::vector<MappedObject *> tqchildren = m_tqchildren; + m_tqchildren.clear(); - std::vector<MappedObject *>::iterator it = children.begin(); - for (; it != children.end(); it++) { + std::vector<MappedObject *>::iterator it = tqchildren.begin(); + for (; it != tqchildren.end(); it++) { (*it)->destroy(); } @@ -387,7 +387,7 @@ MappedStudio::createObject(MappedObjectType type, } else if (type == MappedObject::PluginPort) { mO = new MappedPluginPort(this, id); - // reset the port's parent after creation outside this method + // reset the port's tqparent after creation outside this method } // Insert @@ -597,11 +597,11 @@ MappedStudio::clearObject(MappedObjectId id) MappedObjectCategory::iterator j = i->second.find(id); if (j != i->second.end()) { - // if the object has a parent other than the studio, - // persuade that parent to abandon it - MappedObject *parent = j->second->getParent(); - if (parent && !dynamic_cast<MappedStudio *>(parent)) { - parent->removeChild(j->second); + // if the object has a tqparent other than the studio, + // persuade that tqparent to abandon it + MappedObject *tqparent = j->second->getParent(); + if (tqparent && !dynamic_cast<MappedStudio *>(tqparent)) { + tqparent->removeChild(j->second); } i->second.erase(j); @@ -776,11 +776,11 @@ MappedStudio::getAudioInput(int inputNumber) // -------------- MappedConnectableObject ----------------- // // -MappedConnectableObject::MappedConnectableObject(MappedObject *parent, +MappedConnectableObject::MappedConnectableObject(MappedObject *tqparent, const std::string &name, MappedObjectType type, MappedObjectId id): - MappedObject(parent, + MappedObject(tqparent, name, type, id) @@ -842,10 +842,10 @@ MappedConnectableObject::getConnections(ConnectionDirection dir) // ------------ MappedAudioFader ---------------- // -MappedAudioFader::MappedAudioFader(MappedObject *parent, +MappedAudioFader::MappedAudioFader(MappedObject *tqparent, MappedObjectId id, MappedObjectValue channels): - MappedConnectableObject(parent, + MappedConnectableObject(tqparent, "MappedAudioFader", AudioFader, id), @@ -875,30 +875,30 @@ MappedAudioFader::getPropertyList(const MappedObjectProperty &property) list.push_back(MappedConnectableObject::ConnectionsIn); list.push_back(MappedConnectableObject::ConnectionsOut); } else if (property == MappedObject::Instrument) { - list.push_back(MappedObjectProperty("%1").arg(m_instrumentId)); + list.push_back(MappedObjectProperty("%1").tqarg(m_instrumentId)); } else if (property == MappedAudioFader::FaderLevel) { - list.push_back(MappedObjectProperty("%1").arg(m_level)); + list.push_back(MappedObjectProperty("%1").tqarg(m_level)); } else if (property == MappedAudioFader::FaderRecordLevel) { - list.push_back(MappedObjectProperty("%1").arg(m_recordLevel)); + list.push_back(MappedObjectProperty("%1").tqarg(m_recordLevel)); } else if (property == MappedAudioFader::Channels) { - list.push_back(MappedObjectProperty("%1").arg(m_channels)); + list.push_back(MappedObjectProperty("%1").tqarg(m_channels)); } else if (property == MappedAudioFader::InputChannel) { - list.push_back(MappedObjectProperty("%1").arg(m_inputChannel)); + list.push_back(MappedObjectProperty("%1").tqarg(m_inputChannel)); } else if (property == MappedAudioFader::Pan) { - list.push_back(MappedObjectProperty("%1").arg(m_pan)); + list.push_back(MappedObjectProperty("%1").tqarg(m_pan)); } else if (property == MappedConnectableObject::ConnectionsIn) { MappedObjectValueList::const_iterator it = m_connectionsIn.begin(); for ( ; it != m_connectionsIn.end(); ++it) { - list.push_back(TQString("%1").arg(*it)); + list.push_back(TQString("%1").tqarg(*it)); } } else if (property == MappedConnectableObject::ConnectionsOut) { MappedObjectValueList::const_iterator it = m_connectionsOut.begin(); for ( ; it != m_connectionsOut.end(); ++it) { - list.push_back(TQString("%1").arg(*it)); + list.push_back(TQString("%1").tqarg(*it)); } } @@ -987,9 +987,9 @@ MappedAudioFader::setProperty(const MappedObjectProperty &property, // ---------------- MappedAudioBuss ------------------- // // -MappedAudioBuss::MappedAudioBuss(MappedObject *parent, +MappedAudioBuss::MappedAudioBuss(MappedObject *tqparent, MappedObjectId id) : - MappedConnectableObject(parent, + MappedConnectableObject(tqparent, "MappedAudioBuss", AudioBuss, id), @@ -1013,22 +1013,22 @@ MappedAudioBuss::getPropertyList(const MappedObjectProperty &property) list.push_back(MappedConnectableObject::ConnectionsIn); list.push_back(MappedConnectableObject::ConnectionsOut); } else if (property == BussId) { - list.push_back(MappedObjectProperty("%1").arg(m_bussId)); + list.push_back(MappedObjectProperty("%1").tqarg(m_bussId)); } else if (property == Level) { - list.push_back(MappedObjectProperty("%1").arg(m_level)); + list.push_back(MappedObjectProperty("%1").tqarg(m_level)); } else if (property == MappedConnectableObject::ConnectionsIn) { MappedObjectValueList::const_iterator it = m_connectionsIn.begin(); for ( ; it != m_connectionsIn.end(); ++it) { - list.push_back(TQString("%1").arg(*it)); + list.push_back(TQString("%1").tqarg(*it)); } } else if (property == MappedConnectableObject::ConnectionsOut) { MappedObjectValueList::const_iterator it = m_connectionsOut.begin(); for ( ; it != m_connectionsOut.end(); ++it) { - list.push_back(TQString("%1").arg(*it)); + list.push_back(TQString("%1").tqarg(*it)); } } @@ -1133,9 +1133,9 @@ MappedAudioBuss::getInstruments() // ---------------- MappedAudioInput ------------------- // // -MappedAudioInput::MappedAudioInput(MappedObject *parent, +MappedAudioInput::MappedAudioInput(MappedObject *tqparent, MappedObjectId id) : - MappedConnectableObject(parent, + MappedConnectableObject(tqparent, "MappedAudioInput", AudioInput, id) @@ -1152,7 +1152,7 @@ MappedAudioInput::getPropertyList(const MappedObjectProperty &property) if (property == "") { list.push_back(MappedAudioInput::InputNumber); } else if (property == InputNumber) { - list.push_back(MappedObjectProperty("%1").arg(m_inputNumber)); + list.push_back(MappedObjectProperty("%1").tqarg(m_inputNumber)); } return list; @@ -1191,8 +1191,8 @@ MappedAudioInput::setProperty(const MappedObjectProperty &property, } -MappedPluginSlot::MappedPluginSlot(MappedObject *parent, MappedObjectId id) : - MappedObject(parent, "MappedPluginSlot", PluginSlot, id) +MappedPluginSlot::MappedPluginSlot(MappedObject *tqparent, MappedObjectId id) : + MappedObject(tqparent, "MappedPluginSlot", PluginSlot, id) { #ifdef DEBUG_MAPPEDSTUDIO std::cerr << "MappedPluginSlot::MappedPluginSlot: id = " << id << std::endl; @@ -1322,7 +1322,7 @@ MappedPluginSlot::getProperty(const MappedObjectProperty &property, return true; } -QString +TQString MappedPluginSlot::getProgram(int bank, int program) { MappedStudio *studio = @@ -1548,8 +1548,8 @@ MappedPluginSlot::getPort(unsigned long portNumber) } -MappedPluginPort::MappedPluginPort(MappedObject *parent, MappedObjectId id) : - MappedObject(parent, "MappedPluginPort", PluginPort, id) +MappedPluginPort::MappedPluginPort(MappedObject *tqparent, MappedObjectId id) : + MappedObject(tqparent, "MappedPluginPort", PluginPort, id) {} MappedPluginPort::~MappedPluginPort() |