From e654398e46e37abf457b2b1122ab898d2c51c49f Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:43:15 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdemultimedia@1157644 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- krec/krecfile.h | 90 ++++++++++++++++++++++++++++----------------------------- 1 file changed, 45 insertions(+), 45 deletions(-) (limited to 'krec/krecfile.h') diff --git a/krec/krecfile.h b/krec/krecfile.h index ba307838..8b030833 100644 --- a/krec/krecfile.h +++ b/krec/krecfile.h @@ -14,9 +14,9 @@ #ifndef KRECFILE_H #define KRECFILE_H -#include -#include -#include +#include +#include +#include #include @@ -26,31 +26,31 @@ class KSimpleConfig; class QFile; class KRecFileViewWidget; -class KRecFile : virtual public QObject { +class KRecFile : virtual public TQObject { Q_OBJECT friend class KRecFileWidget; public: - KRecFile( QObject*, const char* =0 ); - KRecFile( const QString &, QObject*, const char* =0 ); + KRecFile( TQObject*, const char* =0 ); + KRecFile( const TQString &, TQObject*, const char* =0 ); ~KRecFile(); - QString filename(); - void filename( const QString &); + TQString filename(); + void filename( const TQString &); bool saved() const { return _saved; } int samplerate() const { return _samplerate; } int channels() const { return _channels; } int bits() const { return _bits; } - QIODevice::Offset offsetSize() const { return samplesToOffset( _size ); } - QIODevice::Offset offsetPosition() const { return samplesToOffset( _pos ); } + TQIODevice::Offset offsetSize() const { return samplesToOffset( _size ); } + TQIODevice::Offset offsetPosition() const { return samplesToOffset( _pos ); } int size() const { return _size; } int position() const { return _pos; } /// Calculates an offset into a frames-value depending on the files settings (channels and bits) - int offsetToSamples( QIODevice::Offset ) const; - QIODevice::Offset samplesToOffset( int ) const; + int offsetToSamples( TQIODevice::Offset ) const; + TQIODevice::Offset samplesToOffset( int ) const; public slots: /// Creates a new empty buffer and marks it for recording. void newBuffer(); @@ -59,22 +59,22 @@ public slots: void deleteBuffer( KRecBuffer* =0 ); void writeData( Arts::mcopbyte* data, uint length ); - void writeData( QByteArray* ); - void writeData( QByteArray& ); + void writeData( TQByteArray* ); + void writeData( TQByteArray& ); - void save( const QString & ); - void exportwave( const QString & ); + void save( const TQString & ); + void exportwave( const TQString & ); - /// Fills a QByteArray with values from the specified Offset. - QByteArray* getData( int ); + /// Fills a TQByteArray with values from the specified Offset. + TQByteArray* getData( int ); - void getData( QByteArray& ); + void getData( TQByteArray& ); void newPos( int ); private slots: - void newPos( KRecBuffer*, QIODevice::Offset ); - void newSize( KRecBuffer*, QIODevice::Offset ); + void newPos( KRecBuffer*, TQIODevice::Offset ); + void newSize( KRecBuffer*, TQIODevice::Offset ); signals: /// Position signals void posChanged( int ); @@ -86,7 +86,7 @@ signals: void sNewBuffer( KRecBuffer* ); void sDeleteBuffer( KRecBuffer* ); - void filenameChanged( const QString & ); + void filenameChanged( const TQString & ); private: void saveProps(); void loadProps(); @@ -94,7 +94,7 @@ private: Creates a new buffer for a given file @param filename Name of the file */ - void newBuffer( const QString &filename ); + void newBuffer( const TQString &filename ); /** Adds buffer to the buffers. @param buffer The to be added buffer @@ -106,10 +106,10 @@ private: KRecBuffer* getTopBuffer_buffer( int ); bool _saved; - QString _filename; + TQString _filename; int _samplerate, _channels, _bits; int _currentBuffer; - QValueList _buffers; + TQValueList _buffers; KTempDir *_dir; KSimpleConfig *_config; int _pos, _size; @@ -123,16 +123,16 @@ class QFileInfo; class KConfig; class QDataStream; -class KRecBuffer : virtual public QObject { +class KRecBuffer : virtual public TQObject { Q_OBJECT public: - KRecBuffer( const QString &, int, bool, KRecFile*, const char* =0 ); + KRecBuffer( const TQString &, int, bool, KRecFile*, const char* =0 ); ~KRecBuffer(); // After how many samples in the File this Buffer starts... int startpos() const; - QIODevice::Offset size() const; + TQIODevice::Offset size() const; int sizeInSamples() const { return _krecfile->offsetToSamples( size() ); } /** @@ -148,37 +148,37 @@ public: @param config The configuration thats read @param dir The directory where the file is saved */ - static KRecBuffer* fromConfig( KConfig* config, QDir* dir, KRecFile* p, const char* n=0 ); + static KRecBuffer* fromConfig( KConfig* config, TQDir* dir, KRecFile* p, const char* n=0 ); - QString filename() const; + TQString filename() const; bool active() const; - QString title() const; - QString comment() const; + TQString title() const; + TQString comment() const; public slots: /// writes the data into the buffer void writeData( Arts::mcopbyte* data, uint length ); - void writeData( QByteArray* ); - void writeData( QByteArray& ); + void writeData( TQByteArray* ); + void writeData( TQByteArray& ); /// gets the data from the stream - void getData( QByteArray& ); + void getData( TQByteArray& ); - void setPos( QIODevice::Offset ); + void setPos( TQIODevice::Offset ); void setActive( bool ); void deleteBuffer(); - void setTitle( const QString & ); - void setComment( const QString & ); + void setTitle( const TQString & ); + void setComment( const TQString & ); /// Returns the sample at the specified position and channel. float getSample( int pos, int channel ); float* getsamples( int start, int end, int channel ); signals: - void posChanged( KRecBuffer*, QIODevice::Offset ); - void sizeChanged( KRecBuffer*, QIODevice::Offset ); + void posChanged( KRecBuffer*, TQIODevice::Offset ); + void sizeChanged( KRecBuffer*, TQIODevice::Offset ); void activeChanged( bool ); /// Is emitted when something has changed. @@ -187,13 +187,13 @@ signals: void deleteSelf( KRecBuffer* ); private: KRecFile* _krecfile; - QFile* _file; - QDataStream* _stream; - QFileInfo* _fileinfo; + TQFile* _file; + TQDataStream* _stream; + TQFileInfo* _fileinfo; bool _open, _active; - QIODevice::Offset _pos; + TQIODevice::Offset _pos; int _start; - QString _title, _comment; + TQString _title, _comment; }; #endif -- cgit v1.2.1