summaryrefslogtreecommitdiffstats
path: root/src/sound/MappedEvent.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/sound/MappedEvent.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/sound/MappedEvent.cpp')
-rw-r--r--src/sound/MappedEvent.cpp48
1 files changed, 24 insertions, 24 deletions
diff --git a/src/sound/MappedEvent.cpp b/src/sound/MappedEvent.cpp
index 9b4ccab..4bae51e 100644
--- a/src/sound/MappedEvent.cpp
+++ b/src/sound/MappedEvent.cpp
@@ -19,9 +19,9 @@
COPYING included with this distribution for more information.
*/
-#include <qdir.h>
-#include <qfile.h>
-#include <qfileinfo.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
#include <kstddirs.h>
@@ -181,8 +181,8 @@ MappedEvent::operator=(const MappedEvent &mE)
//
//const size_t MappedEvent::streamedSize = 12 * sizeof(unsigned int);
-QDataStream&
-operator<<(QDataStream &dS, MappedEvent *mE)
+TQDataStream&
+operator<<(TQDataStream &dS, MappedEvent *mE)
{
dS << (unsigned int)mE->getTrackId();
dS << (unsigned int)mE->getInstrument();
@@ -208,8 +208,8 @@ operator<<(QDataStream &dS, MappedEvent *mE)
return dS;
}
-QDataStream&
-operator<<(QDataStream &dS, const MappedEvent &mE)
+TQDataStream&
+operator<<(TQDataStream &dS, const MappedEvent &mE)
{
dS << (unsigned int)mE.getTrackId();
dS << (unsigned int)mE.getInstrument();
@@ -235,8 +235,8 @@ operator<<(QDataStream &dS, const MappedEvent &mE)
return dS;
}
-QDataStream&
-operator>>(QDataStream &dS, MappedEvent *mE)
+TQDataStream&
+operator>>(TQDataStream &dS, MappedEvent *mE)
{
unsigned int trackId = 0, instrument = 0, type = 0, data1 = 0, data2 = 0;
long eventTimeSec = 0, eventTimeNsec = 0, durationSec = 0, durationNsec = 0,
@@ -288,8 +288,8 @@ operator>>(QDataStream &dS, MappedEvent *mE)
return dS;
}
-QDataStream&
-operator>>(QDataStream &dS, MappedEvent &mE)
+TQDataStream&
+operator>>(TQDataStream &dS, MappedEvent &mE)
{
unsigned int trackId = 0, instrument = 0, type = 0, data1 = 0, data2 = 0;
long eventTimeSec = 0, eventTimeNsec = 0, durationSec = 0, durationNsec = 0,
@@ -363,7 +363,7 @@ public:
DataBlockFile(DataBlockRepository::blockid id);
~DataBlockFile();
- QString getFileName()
+ TQString getFileName()
{
return m_fileName;
}
@@ -384,13 +384,13 @@ protected:
void prepareToRead();
//--------------- Data members ---------------------------------
- QString m_fileName;
- QFile m_file;
+ TQString m_fileName;
+ TQFile m_file;
bool m_cleared;
};
DataBlockFile::DataBlockFile(DataBlockRepository::blockid id)
- : m_fileName(KGlobal::dirs()->resourceDirs("tmp").first() + QString("/rosegarden_datablock_%1").arg(id)),
+ : m_fileName(KGlobal::dirs()->resourceDirs("tmp").first() + TQString("/rosegarden_datablock_%1").arg(id)),
m_file(m_fileName),
m_cleared(false)
{
@@ -401,7 +401,7 @@ DataBlockFile::~DataBlockFile()
{
if (m_cleared) {
// std::cerr << "~DataBlockFile : removing " << m_fileName.latin1() << std::endl;
- QFile::remove
+ TQFile::remove
(m_fileName);
}
@@ -409,7 +409,7 @@ DataBlockFile::~DataBlockFile()
bool DataBlockFile::exists()
{
- return QFile::exists(m_fileName);
+ return TQFile::exists(m_fileName);
}
void DataBlockFile::setData(const std::string& s)
@@ -417,7 +417,7 @@ void DataBlockFile::setData(const std::string& s)
// std::cerr << "DataBlockFile::setData() : setting data to " << m_fileName << std::endl;
prepareToWrite();
- QDataStream stream(&m_file);
+ TQDataStream stream(&m_file);
stream.writeRawBytes(s.data(), s.length());
}
@@ -428,7 +428,7 @@ std::string DataBlockFile::getData()
prepareToRead();
- QDataStream stream(&m_file);
+ TQDataStream stream(&m_file);
// std::cerr << "DataBlockFile::getData() : file size = " << m_file.size() << std::endl;
char* tmp = new char[m_file.size()];
stream.readRawBytes(tmp, m_file.size());
@@ -447,7 +447,7 @@ void DataBlockFile::addDataByte(MidiByte byte)
void DataBlockFile::addDataString(const std::string& s)
{
prepareToWrite();
- QDataStream stream(&m_file);
+ TQDataStream stream(&m_file);
stream.writeRawBytes(s.data(), s.length());
}
@@ -564,12 +564,12 @@ void DataBlockRepository::clear()
// Erase all 'datablock_*' files
//
- QString tmpPath = KGlobal::dirs()->resourceDirs("tmp").first();
+ TQString tmpPath = KGlobal::dirs()->resourceDirs("tmp").first();
- QDir segmentsDir(tmpPath, "rosegarden_datablock_*");
+ TQDir segmentsDir(tmpPath, "rosegarden_datablock_*");
for (unsigned int i = 0; i < segmentsDir.count(); ++i) {
- QString segmentName = tmpPath + '/' + segmentsDir[i];
- QFile::remove
+ TQString segmentName = tmpPath + '/' + segmentsDir[i];
+ TQFile::remove
(segmentName);
}
}