summaryrefslogtreecommitdiffstats
path: root/src/gui/editors/segment/segmentcanvas
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/editors/segment/segmentcanvas')
-rw-r--r--src/gui/editors/segment/segmentcanvas/AudioPreviewPainter.cpp10
-rw-r--r--src/gui/editors/segment/segmentcanvas/AudioPreviewPainter.h12
-rw-r--r--src/gui/editors/segment/segmentcanvas/AudioPreviewThread.cpp24
-rw-r--r--src/gui/editors/segment/segmentcanvas/AudioPreviewThread.h20
-rw-r--r--src/gui/editors/segment/segmentcanvas/AudioPreviewUpdater.cpp16
-rw-r--r--src/gui/editors/segment/segmentcanvas/AudioPreviewUpdater.h16
-rw-r--r--src/gui/editors/segment/segmentcanvas/CompositionColourCache.cpp2
-rw-r--r--src/gui/editors/segment/segmentcanvas/CompositionColourCache.h28
-rw-r--r--src/gui/editors/segment/segmentcanvas/CompositionItem.cpp4
-rw-r--r--src/gui/editors/segment/segmentcanvas/CompositionItem.h16
-rw-r--r--src/gui/editors/segment/segmentcanvas/CompositionItemHelper.cpp14
-rw-r--r--src/gui/editors/segment/segmentcanvas/CompositionItemImpl.cpp18
-rw-r--r--src/gui/editors/segment/segmentcanvas/CompositionItemImpl.h4
-rw-r--r--src/gui/editors/segment/segmentcanvas/CompositionModel.h46
-rw-r--r--src/gui/editors/segment/segmentcanvas/CompositionModelImpl.cpp88
-rw-r--r--src/gui/editors/segment/segmentcanvas/CompositionModelImpl.h44
-rw-r--r--src/gui/editors/segment/segmentcanvas/CompositionRect.cpp18
-rw-r--r--src/gui/editors/segment/segmentcanvas/CompositionRect.h54
-rw-r--r--src/gui/editors/segment/segmentcanvas/CompositionView.cpp318
-rw-r--r--src/gui/editors/segment/segmentcanvas/CompositionView.h156
-rw-r--r--src/gui/editors/segment/segmentcanvas/PreviewRect.cpp4
-rw-r--r--src/gui/editors/segment/segmentcanvas/PreviewRect.h20
-rw-r--r--src/gui/editors/segment/segmentcanvas/SegmentEraser.cpp12
-rw-r--r--src/gui/editors/segment/segmentcanvas/SegmentEraser.h12
-rw-r--r--src/gui/editors/segment/segmentcanvas/SegmentItemPreview.cpp6
-rw-r--r--src/gui/editors/segment/segmentcanvas/SegmentItemPreview.h12
-rw-r--r--src/gui/editors/segment/segmentcanvas/SegmentJoiner.cpp14
-rw-r--r--src/gui/editors/segment/segmentcanvas/SegmentJoiner.h14
-rw-r--r--src/gui/editors/segment/segmentcanvas/SegmentMover.cpp36
-rw-r--r--src/gui/editors/segment/segmentcanvas/SegmentMover.h16
-rw-r--r--src/gui/editors/segment/segmentcanvas/SegmentPencil.cpp44
-rw-r--r--src/gui/editors/segment/segmentcanvas/SegmentPencil.h14
-rw-r--r--src/gui/editors/segment/segmentcanvas/SegmentResizer.cpp42
-rw-r--r--src/gui/editors/segment/segmentcanvas/SegmentResizer.h16
-rw-r--r--src/gui/editors/segment/segmentcanvas/SegmentSelector.cpp34
-rw-r--r--src/gui/editors/segment/segmentcanvas/SegmentSelector.h18
-rw-r--r--src/gui/editors/segment/segmentcanvas/SegmentSplitter.cpp20
-rw-r--r--src/gui/editors/segment/segmentcanvas/SegmentSplitter.h16
-rw-r--r--src/gui/editors/segment/segmentcanvas/SegmentTool.cpp8
-rw-r--r--src/gui/editors/segment/segmentcanvas/SegmentTool.h16
-rw-r--r--src/gui/editors/segment/segmentcanvas/SegmentToolBox.cpp10
-rw-r--r--src/gui/editors/segment/segmentcanvas/SegmentToolBox.h6
42 files changed, 649 insertions, 649 deletions
diff --git a/src/gui/editors/segment/segmentcanvas/AudioPreviewPainter.cpp b/src/gui/editors/segment/segmentcanvas/AudioPreviewPainter.cpp
index 1b982dc..b0d3f3b 100644
--- a/src/gui/editors/segment/segmentcanvas/AudioPreviewPainter.cpp
+++ b/src/gui/editors/segment/segmentcanvas/AudioPreviewPainter.cpp
@@ -34,8 +34,8 @@
#include "misc/Debug.h"
#include "document/ConfigGroups.h"
-#include <qimage.h>
-#include <qapplication.h>
+#include <tqimage.h>
+#include <tqapplication.h>
#include <kapp.h>
#include <kconfig.h>
@@ -57,7 +57,7 @@ AudioPreviewPainter::AudioPreviewPainter(CompositionModelImpl& model,
{
int pixWidth = std::min(m_rect.getBaseWidth(), tileWidth());
- m_image = QImage(pixWidth, m_rect.height(), 8, 4);
+ m_image = TQImage(pixWidth, m_rect.height(), 8, 4);
m_image.setAlphaBuffer(true);
m_penWidth = (std::max(1U, m_rect.getPen().width()) * 2);
@@ -67,7 +67,7 @@ AudioPreviewPainter::AudioPreviewPainter(CompositionModelImpl& model,
int AudioPreviewPainter::tileWidth()
{
static int tw = -1;
- if (tw == -1) tw = QApplication::desktop()->width();
+ if (tw == -1) tw = TQApplication::desktop()->width();
return tw;
}
@@ -294,7 +294,7 @@ void AudioPreviewPainter::finalizeCurrentSlice()
m_image.setColor(0, qRgba(255, 255, 255, 0));
// foreground from computeSegmentPreviewColor
- QColor c = m_model.computeSegmentPreviewColor(m_segment);
+ TQColor c = m_model.computeSegmentPreviewColor(m_segment);
QRgb rgba = qRgba(c.red(), c.green(), c.blue(), 255);
m_image.setColor(1, rgba);
diff --git a/src/gui/editors/segment/segmentcanvas/AudioPreviewPainter.h b/src/gui/editors/segment/segmentcanvas/AudioPreviewPainter.h
index b3c1cac..202b5dd 100644
--- a/src/gui/editors/segment/segmentcanvas/AudioPreviewPainter.h
+++ b/src/gui/editors/segment/segmentcanvas/AudioPreviewPainter.h
@@ -27,8 +27,8 @@
#include "CompositionModel.h"
-#include <qpainter.h>
-#include <qcolor.h>
+#include <tqpainter.h>
+#include <tqcolor.h>
namespace Rosegarden {
@@ -60,12 +60,12 @@ protected:
const Segment* m_segment;
CompositionRect m_rect;
- QImage m_image;
+ TQImage m_image;
PixmapArray m_previewPixmaps;
- QPainter m_p;
- QPainter m_pb;
- QColor m_defaultCol;
+ TQPainter m_p;
+ TQPainter m_pb;
+ TQColor m_defaultCol;
int m_penWidth;
int m_height;
int m_halfRectHeight;
diff --git a/src/gui/editors/segment/segmentcanvas/AudioPreviewThread.cpp b/src/gui/editors/segment/segmentcanvas/AudioPreviewThread.cpp
index ae64134..b686b35 100644
--- a/src/gui/editors/segment/segmentcanvas/AudioPreviewThread.cpp
+++ b/src/gui/editors/segment/segmentcanvas/AudioPreviewThread.cpp
@@ -28,11 +28,11 @@
#include "base/RealTime.h"
#include "sound/AudioFileManager.h"
#include "sound/PeakFileManager.h"
-#include <qapplication.h>
-#include <qevent.h>
-#include <qmutex.h>
-#include <qobject.h>
-#include <qthread.h>
+#include <tqapplication.h>
+#include <tqevent.h>
+#include <tqmutex.h>
+#include <tqobject.h>
+#include <tqthread.h>
namespace Rosegarden
@@ -59,8 +59,8 @@ AudioPreviewThread::run()
if (m_queue.empty()) {
if (m_emptyQueueListener && !emptyQueueSignalled) {
- QApplication::postEvent(m_emptyQueueListener,
- new QCustomEvent(AudioPreviewQueueEmpty, 0));
+ TQApplication::postEvent(m_emptyQueueListener,
+ new TQCustomEvent(AudioPreviewQueueEmpty, 0));
emptyQueueSignalled = true;
}
@@ -159,10 +159,10 @@ AudioPreviewThread::process()
unsigned int channels =
m_manager->getAudioFile(req.audioFileId)->getChannels();
m_results[token] = ResultsPair(channels, results);
- QObject *notify = req.notify;
- QApplication::postEvent
+ TQObject *notify = req.notify;
+ TQApplication::postEvent
(notify,
- new QCustomEvent(AudioPreviewReady, (void *)token));
+ new TQCustomEvent(AudioPreviewReady, (void *)token));
}
m_mutex.unlock();
@@ -261,7 +261,7 @@ AudioPreviewThread::getPreview(int token, unsigned int &channels,
return ;
}
-const QEvent::Type AudioPreviewThread::AudioPreviewReady = QEvent::Type(QEvent::User + 1);
-const QEvent::Type AudioPreviewThread::AudioPreviewQueueEmpty = QEvent::Type(QEvent::User + 2);
+const TQEvent::Type AudioPreviewThread::AudioPreviewReady = TQEvent::Type(TQEvent::User + 1);
+const TQEvent::Type AudioPreviewThread::AudioPreviewQueueEmpty = TQEvent::Type(TQEvent::User + 2);
}
diff --git a/src/gui/editors/segment/segmentcanvas/AudioPreviewThread.h b/src/gui/editors/segment/segmentcanvas/AudioPreviewThread.h
index ae3ac81..0337346 100644
--- a/src/gui/editors/segment/segmentcanvas/AudioPreviewThread.h
+++ b/src/gui/editors/segment/segmentcanvas/AudioPreviewThread.h
@@ -28,14 +28,14 @@
#include "base/RealTime.h"
#include <map>
-#include <qevent.h>
-#include <qmutex.h>
-#include <qthread.h>
+#include <tqevent.h>
+#include <tqmutex.h>
+#include <tqthread.h>
#include <utility>
#include <vector>
-class QObject;
+class TQObject;
namespace Rosegarden
@@ -58,7 +58,7 @@ public:
RealTime audioEndTime;
int width;
bool showMinima;
- QObject *notify;
+ TQObject *notify;
};
virtual int requestPreview(const Request &request);
@@ -66,10 +66,10 @@ public:
virtual void getPreview(int token, unsigned int &channels,
std::vector<float> &values);
- void setEmptyQueueListener(QObject* o) { m_emptyQueueListener = o; }
+ void setEmptyQueueListener(TQObject* o) { m_emptyQueueListener = o; }
- static const QEvent::Type AudioPreviewReady;
- static const QEvent::Type AudioPreviewQueueEmpty;
+ static const TQEvent::Type AudioPreviewReady;
+ static const TQEvent::Type AudioPreviewQueueEmpty;
protected:
@@ -80,7 +80,7 @@ protected:
int m_nextToken;
bool m_exiting;
- QObject* m_emptyQueueListener;
+ TQObject* m_emptyQueueListener;
typedef std::pair<int, Request> RequestRec;
typedef std::multimap<int, RequestRec> RequestQueue;
@@ -90,7 +90,7 @@ protected:
typedef std::map<int, ResultsPair> ResultsQueue;
ResultsQueue m_results;
- QMutex m_mutex;
+ TQMutex m_mutex;
};
diff --git a/src/gui/editors/segment/segmentcanvas/AudioPreviewUpdater.cpp b/src/gui/editors/segment/segmentcanvas/AudioPreviewUpdater.cpp
index 76497b9..182eb9b 100644
--- a/src/gui/editors/segment/segmentcanvas/AudioPreviewUpdater.cpp
+++ b/src/gui/editors/segment/segmentcanvas/AudioPreviewUpdater.cpp
@@ -31,9 +31,9 @@
#include "base/RealTime.h"
#include "base/Segment.h"
#include "CompositionModelImpl.h"
-#include <qevent.h>
-#include <qobject.h>
-#include <qrect.h>
+#include <tqevent.h>
+#include <tqobject.h>
+#include <tqrect.h>
namespace Rosegarden
@@ -43,9 +43,9 @@ static int apuExtantCount = 0;
AudioPreviewUpdater::AudioPreviewUpdater(AudioPreviewThread &thread,
const Composition& c, const Segment* s,
- const QRect& r,
+ const TQRect& r,
CompositionModelImpl* parent)
- : QObject(parent),
+ : TQObject(parent),
m_thread(thread),
m_composition(c),
m_segment(s),
@@ -100,12 +100,12 @@ void AudioPreviewUpdater::cancel()
m_previewToken = -1;
}
-bool AudioPreviewUpdater::event(QEvent *e)
+bool AudioPreviewUpdater::event(TQEvent *e)
{
RG_DEBUG << "AudioPreviewUpdater(" << this << ")::event (" << e << ")" << endl;
if (e->type() == AudioPreviewThread::AudioPreviewReady) {
- QCustomEvent *ev = dynamic_cast<QCustomEvent *>(e);
+ TQCustomEvent *ev = dynamic_cast<TQCustomEvent *>(e);
if (ev) {
intptr_t token = (intptr_t)ev->data();
m_channels = 0; // to be filled as getPreview return value
@@ -142,7 +142,7 @@ bool AudioPreviewUpdater::event(QEvent *e)
}
}
- return QObject::event(e);
+ return TQObject::event(e);
}
}
diff --git a/src/gui/editors/segment/segmentcanvas/AudioPreviewUpdater.h b/src/gui/editors/segment/segmentcanvas/AudioPreviewUpdater.h
index ffc97c9..347ba16 100644
--- a/src/gui/editors/segment/segmentcanvas/AudioPreviewUpdater.h
+++ b/src/gui/editors/segment/segmentcanvas/AudioPreviewUpdater.h
@@ -26,12 +26,12 @@
#ifndef _RG_AUDIOPREVIEWUPDATER_H_
#define _RG_AUDIOPREVIEWUPDATER_H_
-#include <qobject.h>
-#include <qrect.h>
+#include <tqobject.h>
+#include <tqrect.h>
#include <vector>
-class QEvent;
+class TQEvent;
namespace Rosegarden
@@ -51,15 +51,15 @@ public:
AudioPreviewUpdater(AudioPreviewThread &thread,
const Composition &composition,
const Segment *segment,
- const QRect &displayExtent,
+ const TQRect &displayExtent,
CompositionModelImpl *parent);
~AudioPreviewUpdater();
void update();
void cancel();
- QRect getDisplayExtent() const { return m_rect; }
- void setDisplayExtent(const QRect &rect) { m_rect = rect; }
+ TQRect getDisplayExtent() const { return m_rect; }
+ void setDisplayExtent(const TQRect &rect) { m_rect = rect; }
const Segment *getSegment() const { return m_segment; }
@@ -70,13 +70,13 @@ signals:
void audioPreviewComplete(AudioPreviewUpdater*);
protected:
- virtual bool event(QEvent*);
+ virtual bool event(TQEvent*);
AudioPreviewThread& m_thread;
const Composition& m_composition;
const Segment* m_segment;
- QRect m_rect;
+ TQRect m_rect;
bool m_showMinima;
unsigned int m_channels;
std::vector<float> m_values;
diff --git a/src/gui/editors/segment/segmentcanvas/CompositionColourCache.cpp b/src/gui/editors/segment/segmentcanvas/CompositionColourCache.cpp
index b36d6e0..b9f05d4 100644
--- a/src/gui/editors/segment/segmentcanvas/CompositionColourCache.cpp
+++ b/src/gui/editors/segment/segmentcanvas/CompositionColourCache.cpp
@@ -26,7 +26,7 @@
#include "CompositionColourCache.h"
#include "gui/general/GUIPalette.h"
-#include <qcolor.h>
+#include <tqcolor.h>
namespace Rosegarden
diff --git a/src/gui/editors/segment/segmentcanvas/CompositionColourCache.h b/src/gui/editors/segment/segmentcanvas/CompositionColourCache.h
index 32d4719..c9dcafc 100644
--- a/src/gui/editors/segment/segmentcanvas/CompositionColourCache.h
+++ b/src/gui/editors/segment/segmentcanvas/CompositionColourCache.h
@@ -26,7 +26,7 @@
#ifndef _RG_COMPOSITIONCOLOURCACHE_H_
#define _RG_COMPOSITIONCOLOURCACHE_H_
-#include <qcolor.h>
+#include <tqcolor.h>
@@ -43,19 +43,19 @@ public:
void init();
- QColor SegmentCanvas;
- QColor SegmentAudioPreview;
- QColor SegmentInternalPreview;
- QColor SegmentLabel;
- QColor SegmentBorder;
- QColor RepeatSegmentBorder;
- QColor RecordingSegmentBorder;
- QColor RecordingAudioSegmentBlock;
- QColor RecordingInternalSegmentBlock;
- QColor Pointer;
- QColor MovementGuide;
- QColor RotaryFloatBackground;
- QColor RotaryFloatForeground;
+ TQColor SegmentCanvas;
+ TQColor SegmentAudioPreview;
+ TQColor SegmentInternalPreview;
+ TQColor SegmentLabel;
+ TQColor SegmentBorder;
+ TQColor RepeatSegmentBorder;
+ TQColor RecordingSegmentBorder;
+ TQColor RecordingAudioSegmentBlock;
+ TQColor RecordingInternalSegmentBlock;
+ TQColor Pointer;
+ TQColor MovementGuide;
+ TQColor RotaryFloatBackground;
+ TQColor RotaryFloatForeground;
protected:
CompositionColourCache() { init(); }
diff --git a/src/gui/editors/segment/segmentcanvas/CompositionItem.cpp b/src/gui/editors/segment/segmentcanvas/CompositionItem.cpp
index 798178a..f37487b 100644
--- a/src/gui/editors/segment/segmentcanvas/CompositionItem.cpp
+++ b/src/gui/editors/segment/segmentcanvas/CompositionItem.cpp
@@ -25,8 +25,8 @@
#include "CompositionItem.h"
-#include <qobject.h>
-#include <qrect.h>
+#include <tqobject.h>
+#include <tqrect.h>
namespace Rosegarden
diff --git a/src/gui/editors/segment/segmentcanvas/CompositionItem.h b/src/gui/editors/segment/segmentcanvas/CompositionItem.h
index b5e749b..f86f1b0 100644
--- a/src/gui/editors/segment/segmentcanvas/CompositionItem.h
+++ b/src/gui/editors/segment/segmentcanvas/CompositionItem.h
@@ -26,18 +26,18 @@
#ifndef _RG_COMPOSITIONITEM_H_
#define _RG_COMPOSITIONITEM_H_
-#include <qguardedptr.h>
-#include <qobject.h>
-#include <qrect.h>
+#include <tqguardedptr.h>
+#include <tqobject.h>
+#include <tqrect.h>
namespace Rosegarden
{
-class _CompositionItem : public QObject {
+class _CompositionItem : public TQObject {
public:
virtual bool isRepeating() const = 0;
- virtual QRect rect() const = 0;
+ virtual TQRect rect() const = 0;
virtual void moveBy(int x, int y) = 0;
virtual void moveTo(int x, int y) = 0;
virtual void setX(int x) = 0;
@@ -51,14 +51,14 @@ public:
// used by itemcontainer
virtual long hashKey() = 0;
- QRect savedRect() const { return m_savedRect; }
+ TQRect savedRect() const { return m_savedRect; }
void saveRect() const { m_savedRect = rect(); }
protected:
- mutable QRect m_savedRect;
+ mutable TQRect m_savedRect;
};
-typedef QGuardedPtr<_CompositionItem> CompositionItem;
+typedef TQGuardedPtr<_CompositionItem> CompositionItem;
bool operator<(const CompositionItem&, const CompositionItem&);
diff --git a/src/gui/editors/segment/segmentcanvas/CompositionItemHelper.cpp b/src/gui/editors/segment/segmentcanvas/CompositionItemHelper.cpp
index e1705cd..9579ba2 100644
--- a/src/gui/editors/segment/segmentcanvas/CompositionItemHelper.cpp
+++ b/src/gui/editors/segment/segmentcanvas/CompositionItemHelper.cpp
@@ -31,9 +31,9 @@
#include "misc/Debug.h"
#include "CompositionModel.h"
#include "CompositionItemImpl.h"
-#include <qcolor.h>
-#include <qpoint.h>
-#include <qrect.h>
+#include <tqcolor.h>
+#include <tqpoint.h>
+#include <tqrect.h>
namespace Rosegarden
{
@@ -60,7 +60,7 @@ timeT CompositionItemHelper::getEndTime(const CompositionItem& item, const Roseg
timeT t = 0;
if (item) {
- QRect itemRect = item->rect();
+ TQRect itemRect = item->rect();
t = std::max(grid.snapX(itemRect.x() + itemRect.width()), 0L);
@@ -102,8 +102,8 @@ void CompositionItemHelper::setEndTime(CompositionItem& item, timeT time,
{
if (item) {
int x = int(nearbyint(grid.getRulerScale()->getXForTime(time)));
- QRect r = item->rect();
- QPoint topRight = r.topRight();
+ TQRect r = item->rect();
+ TQPoint topRight = r.topRight();
topRight.setX(x);
r.setTopRight(topRight);
item->setWidth(r.width());
@@ -127,7 +127,7 @@ Rosegarden::Segment* CompositionItemHelper::getSegment(CompositionItem item)
CompositionItem CompositionItemHelper::makeCompositionItem(Rosegarden::Segment* segment)
{
- return CompositionItem(new CompositionItemImpl(*segment, QRect()));
+ return CompositionItem(new CompositionItemImpl(*segment, TQRect()));
}
CompositionItem CompositionItemHelper::findSiblingCompositionItem(const CompositionModel::itemcontainer& items,
diff --git a/src/gui/editors/segment/segmentcanvas/CompositionItemImpl.cpp b/src/gui/editors/segment/segmentcanvas/CompositionItemImpl.cpp
index 5508ad2..12984a0 100644
--- a/src/gui/editors/segment/segmentcanvas/CompositionItemImpl.cpp
+++ b/src/gui/editors/segment/segmentcanvas/CompositionItemImpl.cpp
@@ -28,13 +28,13 @@
#include "misc/Debug.h"
#include "base/Segment.h"
#include "CompositionRect.h"
-#include <qbrush.h>
-#include <qcolor.h>
-#include <qpen.h>
-#include <qpoint.h>
-#include <qrect.h>
-#include <qsize.h>
-#include <qstring.h>
+#include <tqbrush.h>
+#include <tqcolor.h>
+#include <tqpen.h>
+#include <tqpoint.h>
+#include <tqrect.h>
+#include <tqsize.h>
+#include <tqstring.h>
namespace Rosegarden
@@ -46,9 +46,9 @@ CompositionItemImpl::CompositionItemImpl(Segment& s, const CompositionRect& rect
m_z(0)
{}
-QRect CompositionItemImpl::rect() const
+TQRect CompositionItemImpl::rect() const
{
- QRect res = m_rect;
+ TQRect res = m_rect;
if (m_rect.isRepeating()) {
CompositionRect::repeatmarks repeatMarks = m_rect.getRepeatMarks();
int neww = m_rect.getBaseWidth();
diff --git a/src/gui/editors/segment/segmentcanvas/CompositionItemImpl.h b/src/gui/editors/segment/segmentcanvas/CompositionItemImpl.h
index b5b3ef7..bd61bd0 100644
--- a/src/gui/editors/segment/segmentcanvas/CompositionItemImpl.h
+++ b/src/gui/editors/segment/segmentcanvas/CompositionItemImpl.h
@@ -28,7 +28,7 @@
#include "CompositionRect.h"
#include "CompositionItem.h"
-#include <qrect.h>
+#include <tqrect.h>
@@ -43,7 +43,7 @@ class CompositionItemImpl : public _CompositionItem {
public:
CompositionItemImpl(Segment& s, const CompositionRect&);
virtual bool isRepeating() const { return m_rect.isRepeating(); }
- virtual QRect rect() const;
+ virtual TQRect rect() const;
virtual void moveBy(int x, int y) { m_rect.moveBy(x, y); }
virtual void moveTo(int x, int y) { m_rect.setRect(x, y, m_rect.width(), m_rect.height()); }
virtual void setX(int x) { m_rect.setX(x); }
diff --git a/src/gui/editors/segment/segmentcanvas/CompositionModel.h b/src/gui/editors/segment/segmentcanvas/CompositionModel.h
index beafc2e..63412c0 100644
--- a/src/gui/editors/segment/segmentcanvas/CompositionModel.h
+++ b/src/gui/editors/segment/segmentcanvas/CompositionModel.h
@@ -29,11 +29,11 @@
#include "base/Composition.h"
#include "base/Segment.h"
#include <set>
-#include <qcolor.h>
-#include <qobject.h>
-#include <qimage.h>
-#include <qpoint.h>
-#include <qrect.h>
+#include <tqcolor.h>
+#include <tqobject.h>
+#include <tqimage.h>
+#include <tqpoint.h>
+#include <tqrect.h>
#include <utility>
#include <vector>
#include "base/Event.h"
@@ -50,10 +50,10 @@ namespace Rosegarden
{
class SnapGrid;
-typedef std::vector<QImage> PixmapArray;
+typedef std::vector<TQImage> PixmapArray;
-class CompositionModel : public QObject, public CompositionObserver, public SegmentObserver
+class CompositionModel : public TQObject, public CompositionObserver, public SegmentObserver
{
Q_OBJECT
public:
@@ -62,17 +62,17 @@ public:
bool operator()(const CompositionItem &c1, const CompositionItem &c2) const;
};
- typedef std::vector<QRect> rectlist;
+ typedef std::vector<TQRect> rectlist;
typedef std::vector<int> heightlist;
typedef std::vector<CompositionRect> rectcontainer;
typedef std::set<CompositionItem, CompositionItemCompare> itemcontainer;
struct AudioPreviewDrawDataItem {
- AudioPreviewDrawDataItem(PixmapArray p, QPoint bp, QRect r) :
+ AudioPreviewDrawDataItem(PixmapArray p, TQPoint bp, TQRect r) :
pixmap(p), basePoint(bp), rect(r), resizeOffset(0) {};
PixmapArray pixmap;
- QPoint basePoint;
- QRect rect;
+ TQPoint basePoint;
+ TQRect rect;
// when showing a segment that is being resized from the
// beginning, this contains the offset between the current
@@ -84,8 +84,8 @@ public:
struct RectRange {
std::pair<rectlist::iterator, rectlist::iterator> range;
- QPoint basePoint;
- QColor color;
+ TQPoint basePoint;
+ TQColor color;
};
typedef std::vector<RectRange> RectRanges;
@@ -104,14 +104,14 @@ public:
const std::vector<float> &getValues() const { return m_values; }
void setValues(const std::vector<float>&v) { m_values = v; }
- QRect getSegmentRect() { return m_segmentRect; }
- void setSegmentRect(const QRect& r) { m_segmentRect = r; }
+ TQRect getSegmentRect() { return m_segmentRect; }
+ void setSegmentRect(const TQRect& r) { m_segmentRect = r; }
protected:
std::vector<float> m_values;
bool m_showMinima;
unsigned int m_channels;
- QRect m_segmentRect;
+ TQRect m_segmentRect;
private:
// no copy ctor
@@ -122,13 +122,13 @@ public:
virtual ~CompositionModel() {};
virtual unsigned int getNbRows() = 0;
- virtual const rectcontainer& getRectanglesIn(const QRect& rect,
+ virtual const rectcontainer& getRectanglesIn(const TQRect& rect,
RectRanges* notationRects, AudioPreviewDrawData* audioRects) = 0;
- virtual heightlist getTrackDividersIn(const QRect& rect) = 0;
+ virtual heightlist getTrackDividersIn(const TQRect& rect) = 0;
- virtual itemcontainer getItemsAt (const QPoint&) = 0;
- virtual timeT getRepeatTimeAt (const QPoint&, const CompositionItem&) = 0;
+ virtual itemcontainer getItemsAt (const TQPoint&) = 0;
+ virtual timeT getRepeatTimeAt (const TQPoint&, const CompositionItem&) = 0;
virtual SnapGrid& grid() = 0;
@@ -140,9 +140,9 @@ public:
virtual bool haveSelection() const = 0;
virtual bool haveMultipleSelection() const = 0;
virtual void signalSelection() = 0;
- virtual void setSelectionRect(const QRect&) = 0;
+ virtual void setSelectionRect(const TQRect&) = 0;
virtual void finalizeSelectionRect() = 0;
- virtual QRect getSelectionContentsRect() = 0;
+ virtual TQRect getSelectionContentsRect() = 0;
virtual void signalContentChange() = 0;
virtual void addRecordingItem(const CompositionItem&) = 0;
@@ -163,7 +163,7 @@ public:
signals:
void needContentUpdate();
- void needContentUpdate(const QRect&);
+ void needContentUpdate(const TQRect&);
void needArtifactsUpdate();
protected:
diff --git a/src/gui/editors/segment/segmentcanvas/CompositionModelImpl.cpp b/src/gui/editors/segment/segmentcanvas/CompositionModelImpl.cpp
index 39deb2e..9627b16 100644
--- a/src/gui/editors/segment/segmentcanvas/CompositionModelImpl.cpp
+++ b/src/gui/editors/segment/segmentcanvas/CompositionModelImpl.cpp
@@ -50,14 +50,14 @@
#include "AudioPreviewPainter.h"
#include "gui/general/GUIPalette.h"
#include "SegmentOrderer.h"
-#include <qbrush.h>
-#include <qcolor.h>
-#include <qpen.h>
-#include <qpoint.h>
-#include <qrect.h>
-#include <qregexp.h>
-#include <qsize.h>
-#include <qstring.h>
+#include <tqbrush.h>
+#include <tqcolor.h>
+#include <tqpen.h>
+#include <tqpoint.h>
+#include <tqrect.h>
+#include <tqregexp.h>
+#include <tqsize.h>
+#include <tqstring.h>
@@ -120,13 +120,13 @@ CompositionModelImpl::~CompositionModelImpl()
}
struct RectCompare {
- bool operator()(const QRect &r1, const QRect &r2) const {
+ bool operator()(const TQRect &r1, const TQRect &r2) const {
return r1.x() < r2.x();
}
};
-void CompositionModelImpl::makeNotationPreviewRects(RectRanges* npRects, QPoint basePoint,
- const Segment* segment, const QRect& clipRect)
+void CompositionModelImpl::makeNotationPreviewRects(RectRanges* npRects, TQPoint basePoint,
+ const Segment* segment, const TQRect& clipRect)
{
rectlist* cachedNPData = getNotationPreviewData(segment);
@@ -167,8 +167,8 @@ void CompositionModelImpl::makeNotationPreviewRects(RectRanges* npRects, QPoint
npRects->push_back(interval);
}
-void CompositionModelImpl::makeNotationPreviewRectsMovingSegment(RectRanges* npRects, QPoint basePoint,
- const Segment* segment, const QRect& currentSR)
+void CompositionModelImpl::makeNotationPreviewRectsMovingSegment(RectRanges* npRects, TQPoint basePoint,
+ const Segment* segment, const TQRect& currentSR)
{
CompositionRect unmovedSR = computeSegmentRect(*segment);
@@ -222,14 +222,14 @@ void CompositionModelImpl::makeNotationPreviewRectsMovingSegment(RectRanges* npR
}
void CompositionModelImpl::makeAudioPreviewRects(AudioPreviewDrawData* apRects, const Segment* segment,
- const CompositionRect& segRect, const QRect& clipRect)
+ const CompositionRect& segRect, const TQRect& clipRect)
{
Profiler profiler("CompositionModelImpl::makeAudioPreviewRects", true);
RG_DEBUG << "CompositionModelImpl::makeAudioPreviewRects - segRect = " << segRect << endl;
PixmapArray previewImage = getAudioPreviewPixmap(segment);
- QPoint basePoint = segRect.topLeft();
+ TQPoint basePoint = segRect.topLeft();
AudioPreviewDrawDataItem previewItem(previewImage, basePoint, segRect);
@@ -392,7 +392,7 @@ void CompositionModelImpl::updatePreviewCacheForNotationSegment(const Segment* s
if (y > y1 - height + 1)
y = y1 - height + 1;
- QRect r(x, (int)y, width, height);
+ TQRect r(x, (int)y, width, height);
// RG_DEBUG << "CompositionModelImpl::updatePreviewCacheForNotationSegment() : npData = "
// << npData << ", preview rect = "
@@ -402,10 +402,10 @@ void CompositionModelImpl::updatePreviewCacheForNotationSegment(const Segment* s
}
-QColor CompositionModelImpl::computeSegmentPreviewColor(const Segment* segment)
+TQColor CompositionModelImpl::computeSegmentPreviewColor(const Segment* segment)
{
// compute the preview color so it's as visible as possible over the segment's color
- QColor segColor = GUIPalette::convertColour(m_composition.getSegmentColourMap().getColourByIndex(segment->getColourIndex()));
+ TQColor segColor = GUIPalette::convertColour(m_composition.getSegmentColourMap().getColourByIndex(segment->getColourIndex()));
int h, s, v;
segColor.hsv(&h, &s, &v);
@@ -440,7 +440,7 @@ void CompositionModelImpl::updatePreviewCacheForAudioSegment(const Segment* segm
CompositionRect segRect = computeSegmentRect(*segment);
segRect.setWidth(segRect.getBaseWidth()); // don't use repeating area
- segRect.moveTopLeft(QPoint(0, 0));
+ segRect.moveTopLeft(TQPoint(0, 0));
if (apData)
apData->setSegmentRect(segRect);
@@ -451,8 +451,8 @@ void CompositionModelImpl::updatePreviewCacheForAudioSegment(const Segment* segm
AudioPreviewUpdater *updater = new AudioPreviewUpdater
(*m_audioPreviewThread, m_composition, segment, segRect, this);
- connect(updater, SIGNAL(audioPreviewComplete(AudioPreviewUpdater*)),
- this, SLOT(slotAudioPreviewComplete(AudioPreviewUpdater*)));
+ connect(updater, TQT_SIGNAL(audioPreviewComplete(AudioPreviewUpdater*)),
+ this, TQT_SLOT(slotAudioPreviewComplete(AudioPreviewUpdater*)));
m_audioPreviewUpdaterMap[segment] = updater;
@@ -473,7 +473,7 @@ void CompositionModelImpl::slotAudioPreviewComplete(AudioPreviewUpdater* apu)
RG_DEBUG << "CompositionModelImpl::slotAudioPreviewComplete()\n";
AudioPreviewData *apData = getAudioPreviewData(apu->getSegment());
- QRect updateRect;
+ TQRect updateRect;
if (apData) {
RG_DEBUG << "CompositionModelImpl::slotAudioPreviewComplete(" << apu << "): apData contains " << apData->getValues().size() << " values already" << endl;
@@ -492,7 +492,7 @@ void CompositionModelImpl::slotAudioPreviewComplete(AudioPreviewUpdater* apu)
emit needContentUpdate(updateRect);
}
-QRect CompositionModelImpl::postProcessAudioPreview(AudioPreviewData* apData, const Segment* segment)
+TQRect CompositionModelImpl::postProcessAudioPreview(AudioPreviewData* apData, const Segment* segment)
{
// RG_DEBUG << "CompositionModelImpl::postProcessAudioPreview()\n";
@@ -608,7 +608,7 @@ void CompositionModelImpl::segmentRemoved(const Composition *, Segment *s)
{
setTrackHeights();
- QRect r = computeSegmentRect(*s);
+ TQRect r = computeSegmentRect(*s);
m_selectedSegments.erase(s);
@@ -658,7 +658,7 @@ void CompositionModelImpl::endMarkerTimeChanged(const Composition *, bool)
emit needSizeUpdate();
}
-void CompositionModelImpl::setSelectionRect(const QRect& r)
+void CompositionModelImpl::setSelectionRect(const TQRect& r)
{
m_selectionRect = r.normalize();
@@ -668,7 +668,7 @@ void CompositionModelImpl::setSelectionRect(const QRect& r)
const Composition::segmentcontainer& segments = m_composition.getSegments();
Composition::segmentcontainer::iterator segEnd = segments.end();
- QRect updateRect = m_selectionRect;
+ TQRect updateRect = m_selectionRect;
for (Composition::segmentcontainer::iterator i = segments.begin();
i != segEnd; ++i) {
@@ -711,13 +711,13 @@ void CompositionModelImpl::finalizeSelectionRect()
}
}
- m_previousSelectionUpdateRect = m_selectionRect = QRect();
+ m_previousSelectionUpdateRect = m_selectionRect = TQRect();
m_tmpSelectedSegments.clear();
}
-QRect CompositionModelImpl::getSelectionContentsRect()
+TQRect CompositionModelImpl::getSelectionContentsRect()
{
- QRect selectionRect;
+ TQRect selectionRect;
SegmentSelection sel = getSelectedSegments();
for (SegmentSelection::iterator i = sel.begin();
@@ -784,7 +784,7 @@ bool CompositionModelImpl::isRecording(const Segment* s) const
return m_recordingSegments.find(const_cast<Segment*>(s)) != m_recordingSegments.end();
}
-CompositionModel::itemcontainer CompositionModelImpl::getItemsAt(const QPoint& point)
+CompositionModel::itemcontainer CompositionModelImpl::getItemsAt(const TQPoint& point)
{
itemcontainer res;
@@ -953,7 +953,7 @@ int CompositionModelImpl::getLength()
return w;
}
-timeT CompositionModelImpl::getRepeatTimeAt(const QPoint& p, const CompositionItem& cItem)
+timeT CompositionModelImpl::getRepeatTimeAt(const TQPoint& p, const CompositionItem& cItem)
{
// timeT timeAtClick = m_grid.getRulerScale()->getTimeForX(p.x());
@@ -1009,14 +1009,14 @@ bool CompositionModelImpl::setTrackHeights(Segment *s)
return heightsChanged;
}
-QPoint CompositionModelImpl::computeSegmentOrigin(const Segment& s)
+TQPoint CompositionModelImpl::computeSegmentOrigin(const Segment& s)
{
// Profiler profiler("CompositionModelImpl::computeSegmentOrigin", true);
int trackPosition = m_composition.getTrackPositionById(s.getTrack());
timeT startTime = s.getStartTime();
- QPoint res;
+ TQPoint res;
res.setX(int(nearbyint(m_grid.getRulerScale()->getXForTime(startTime))));
@@ -1027,7 +1027,7 @@ QPoint CompositionModelImpl::computeSegmentOrigin(const Segment& s)
return res;
}
-bool CompositionModelImpl::isCachedRectCurrent(const Segment& s, const CompositionRect& r, QPoint cachedSegmentOrigin, timeT cachedSegmentEndTime)
+bool CompositionModelImpl::isCachedRectCurrent(const Segment& s, const CompositionRect& r, TQPoint cachedSegmentOrigin, timeT cachedSegmentEndTime)
{
return s.isRepeating() == r.isRepeating() &&
((cachedSegmentOrigin.x() != r.x() && s.getEndMarkerTime() != cachedSegmentEndTime) ||
@@ -1059,7 +1059,7 @@ CompositionRect CompositionModelImpl::computeSegmentRect(const Segment& s, bool
{
// Profiler profiler("CompositionModelImpl::computeSegmentRect", true);
- QPoint origin = computeSegmentOrigin(s);
+ TQPoint origin = computeSegmentOrigin(s);
bool isRecordingSegment = isRecording(&s);
@@ -1119,11 +1119,11 @@ CompositionRect CompositionModelImpl::computeSegmentRect(const Segment& s, bool
// << " w = " << w << " (x for time at start is " << m_grid.getRulerScale()->getXForTime(startTime) << ", end is " << m_grid.getRulerScale()->getXForTime(endTime) << ")" << endl;
}
- CompositionRect cr(origin, QSize(w, h));
- QString label = strtoqstr(s.getLabel());
+ CompositionRect cr(origin, TQSize(w, h));
+ TQString label = strtoqstr(s.getLabel());
if (s.getType() == Segment::Audio) {
- static QRegExp re1("( *\\([^)]*\\))*$"); // (inserted) (copied) (etc)
- static QRegExp re2("\\.[^.]+$"); // filename suffix
+ static TQRegExp re1("( *\\([^)]*\\))*$"); // (inserted) (copied) (etc)
+ static TQRegExp re2("\\.[^.]+$"); // filename suffix
label.replace(re1, "").replace(re2, "");
}
cr.setLabel(label);
@@ -1155,7 +1155,7 @@ unsigned int CompositionModelImpl::getNbRows()
return m_composition.getNbTracks();
}
-const CompositionModel::rectcontainer& CompositionModelImpl::getRectanglesIn(const QRect& rect,
+const CompositionModel::rectcontainer& CompositionModelImpl::getRectanglesIn(const TQRect& rect,
RectRanges* npData,
AudioPreviewDrawData* apData)
{
@@ -1199,7 +1199,7 @@ const CompositionModel::rectcontainer& CompositionModelImpl::getRectanglesIn(con
bool isAudio = (s && s->getType() == Segment::Audio);
if (!isRecording(s)) {
- QColor brushColor = GUIPalette::convertColour(m_composition.
+ TQColor brushColor = GUIPalette::convertColour(m_composition.
getSegmentColourMap().getColourByIndex(s->getColourIndex()));
sr.setBrush(brushColor);
sr.setPen(CompositionColourCache::getInstance()->SegmentBorder);
@@ -1217,7 +1217,7 @@ const CompositionModel::rectcontainer& CompositionModelImpl::getRectanglesIn(con
// Notation preview data
if (npData && s->getType() == Segment::Internal) {
- makeNotationPreviewRects(npData, QPoint(0, sr.y()), s, rect);
+ makeNotationPreviewRects(npData, TQPoint(0, sr.y()), s, rect);
// Audio preview data
} else if (apData && s->getType() == Segment::Audio) {
makeAudioPreviewRects(apData, s, sr, rect);
@@ -1238,7 +1238,7 @@ const CompositionModel::rectcontainer& CompositionModelImpl::getRectanglesIn(con
if (sr.intersects(rect)) {
Segment* s = CompositionItemHelper::getSegment(*i);
sr.setSelected(true);
- QColor brushColor = GUIPalette::convertColour(m_composition.getSegmentColourMap().getColourByIndex(s->getColourIndex()));
+ TQColor brushColor = GUIPalette::convertColour(m_composition.getSegmentColourMap().getColourByIndex(s->getColourIndex()));
sr.setBrush(brushColor);
sr.setPen(CompositionColourCache::getInstance()->SegmentBorder);
@@ -1259,7 +1259,7 @@ const CompositionModel::rectcontainer& CompositionModelImpl::getRectanglesIn(con
}
CompositionModel::heightlist
-CompositionModelImpl::getTrackDividersIn(const QRect& rect)
+CompositionModelImpl::getTrackDividersIn(const TQRect& rect)
{
int top = m_grid.getYBin(rect.y());
int bottom = m_grid.getYBin(rect.y() + rect.height());
diff --git a/src/gui/editors/segment/segmentcanvas/CompositionModelImpl.h b/src/gui/editors/segment/segmentcanvas/CompositionModelImpl.h
index 6e1c9d6..2d3fd64 100644
--- a/src/gui/editors/segment/segmentcanvas/CompositionModelImpl.h
+++ b/src/gui/editors/segment/segmentcanvas/CompositionModelImpl.h
@@ -33,10 +33,10 @@
#include <map>
#include "SegmentOrderer.h"
#include <set>
-#include <qcolor.h>
-#include <qpoint.h>
-#include <qptrdict.h>
-#include <qrect.h>
+#include <tqcolor.h>
+#include <tqpoint.h>
+#include <tqptrdict.h>
+#include <tqrect.h>
#include <vector>
#include "base/Event.h"
@@ -72,11 +72,11 @@ public:
virtual ~CompositionModelImpl();
virtual unsigned int getNbRows();
- virtual const rectcontainer& getRectanglesIn(const QRect& rect,
+ virtual const rectcontainer& getRectanglesIn(const TQRect& rect,
RectRanges* notationRects, AudioPreviewDrawData* audioRects);
- virtual heightlist getTrackDividersIn(const QRect& rect);
- virtual itemcontainer getItemsAt (const QPoint&);
- virtual timeT getRepeatTimeAt (const QPoint&, const CompositionItem&);
+ virtual heightlist getTrackDividersIn(const TQRect& rect);
+ virtual itemcontainer getItemsAt (const TQPoint&);
+ virtual timeT getRepeatTimeAt (const TQPoint&, const CompositionItem&);
virtual SnapGrid& grid() { return m_grid; }
@@ -88,9 +88,9 @@ public:
virtual bool haveSelection() const { return !m_selectedSegments.empty(); }
virtual bool haveMultipleSelection() const { return m_selectedSegments.size() > 1; }
virtual void signalSelection();
- virtual void setSelectionRect(const QRect&);
+ virtual void setSelectionRect(const TQRect&);
virtual void finalizeSelectionRect();
- virtual QRect getSelectionContentsRect();
+ virtual TQRect getSelectionContentsRect();
virtual void signalContentChange();
virtual void addRecordingItem(const CompositionItem&);
@@ -117,8 +117,8 @@ public:
AudioPreviewData* makeAudioPreviewDataCache(const Segment *s);
CompositionRect computeSegmentRect(const Segment&, bool computeZ = false);
- QColor computeSegmentPreviewColor(const Segment*);
- QPoint computeSegmentOrigin(const Segment&);
+ TQColor computeSegmentPreviewColor(const Segment*);
+ TQPoint computeSegmentOrigin(const Segment&);
void computeRepeatMarks(CompositionItem&);
SegmentSelection getSelectedSegments() { return m_selectedSegments; }
@@ -173,21 +173,21 @@ protected:
rectlist* getNotationPreviewData(const Segment* s);
AudioPreviewData* getAudioPreviewData(const Segment* s);
PixmapArray getAudioPreviewPixmap(const Segment* s);
- QRect postProcessAudioPreview(AudioPreviewData*, const Segment*);
+ TQRect postProcessAudioPreview(AudioPreviewData*, const Segment*);
void makePreviewCache(const Segment* s);
void removePreviewCache(const Segment* s);
- void makeNotationPreviewRects(RectRanges* npData, QPoint basePoint, const Segment*, const QRect&);
- void makeNotationPreviewRectsMovingSegment(RectRanges* npData, QPoint basePoint, const Segment*,
- const QRect&);
+ void makeNotationPreviewRects(RectRanges* npData, TQPoint basePoint, const Segment*, const TQRect&);
+ void makeNotationPreviewRectsMovingSegment(RectRanges* npData, TQPoint basePoint, const Segment*,
+ const TQRect&);
void makeAudioPreviewRects(AudioPreviewDrawData* apRects, const Segment*,
- const CompositionRect& segRect, const QRect& clipRect);
+ const CompositionRect& segRect, const TQRect& clipRect);
void clearInCache(const Segment*, bool clearPreviewCache = false);
void putInCache(const Segment*, const CompositionRect&);
const CompositionRect& getFromCache(const Segment*, timeT& endTime);
bool isCachedRectCurrent(const Segment& s, const CompositionRect& r,
- QPoint segmentOrigin, timeT segmentEndTime);
+ TQPoint segmentOrigin, timeT segmentEndTime);
//--------------- Data members ---------------------------------
Composition& m_composition;
@@ -206,8 +206,8 @@ protected:
AudioPreviewThread* m_audioPreviewThread;
- typedef QPtrDict<rectlist> NotationPreviewDataCache;
- typedef QPtrDict<AudioPreviewData> AudioPreviewDataCache;
+ typedef TQPtrDict<rectlist> NotationPreviewDataCache;
+ typedef TQPtrDict<AudioPreviewData> AudioPreviewDataCache;
NotationPreviewDataCache m_notationPreviewDataCache;
AudioPreviewDataCache m_audioPreviewDataCache;
@@ -217,8 +217,8 @@ protected:
ChangeType m_changeType;
itemgc m_itemGC;
- QRect m_selectionRect;
- QRect m_previousSelectionUpdateRect;
+ TQRect m_selectionRect;
+ TQRect m_previousSelectionUpdateRect;
std::map<const Segment*, CompositionRect> m_segmentRectMap;
std::map<const Segment*, timeT> m_segmentEndTimeMap;
diff --git a/src/gui/editors/segment/segmentcanvas/CompositionRect.cpp b/src/gui/editors/segment/segmentcanvas/CompositionRect.cpp
index 9e34d71..9f867a5 100644
--- a/src/gui/editors/segment/segmentcanvas/CompositionRect.cpp
+++ b/src/gui/editors/segment/segmentcanvas/CompositionRect.cpp
@@ -26,17 +26,17 @@
#include "CompositionRect.h"
#include "base/ColourMap.h"
-#include <qbrush.h>
-#include <qcolor.h>
-#include <qpen.h>
-#include <qpoint.h>
-#include <qrect.h>
-#include <qsize.h>
-#include <qstring.h>
+#include <tqbrush.h>
+#include <tqcolor.h>
+#include <tqpen.h>
+#include <tqpoint.h>
+#include <tqrect.h>
+#include <tqsize.h>
+#include <tqstring.h>
namespace Rosegarden
{
- const QColor CompositionRect::DefaultPenColor = Qt::black;
- const QColor CompositionRect::DefaultBrushColor = QColor(COLOUR_DEF_R, COLOUR_DEF_G, COLOUR_DEF_B);
+ const TQColor CompositionRect::DefaultPenColor = Qt::black;
+ const TQColor CompositionRect::DefaultBrushColor = TQColor(COLOUR_DEF_R, COLOUR_DEF_G, COLOUR_DEF_B);
}
diff --git a/src/gui/editors/segment/segmentcanvas/CompositionRect.h b/src/gui/editors/segment/segmentcanvas/CompositionRect.h
index 3c3d2b6..45c5f50 100644
--- a/src/gui/editors/segment/segmentcanvas/CompositionRect.h
+++ b/src/gui/editors/segment/segmentcanvas/CompositionRect.h
@@ -26,16 +26,16 @@
#ifndef _RG_COMPOSITIONRECT_H_
#define _RG_COMPOSITIONRECT_H_
-#include <qbrush.h>
-#include <qcolor.h>
-#include <qpen.h>
-#include <qrect.h>
-#include <qstring.h>
-#include <qvaluevector.h>
+#include <tqbrush.h>
+#include <tqcolor.h>
+#include <tqpen.h>
+#include <tqrect.h>
+#include <tqstring.h>
+#include <tqvaluevector.h>
-class QSize;
-class QPoint;
+class TQSize;
+class TQPoint;
namespace Rosegarden
@@ -44,22 +44,22 @@ namespace Rosegarden
class CompositionRect : public QRect
{
public:
- typedef QValueVector<int> repeatmarks;
+ typedef TQValueVector<int> repeatmarks;
friend bool operator<(const CompositionRect&, const CompositionRect&);
- CompositionRect() : QRect(), m_selected(false),
+ CompositionRect() : TQRect(), m_selected(false),
m_needUpdate(false), m_brush(DefaultBrushColor), m_pen(DefaultPenColor) {};
- CompositionRect(const QRect& r) : QRect(r), m_resized(false), m_selected(false),
+ CompositionRect(const TQRect& r) : TQRect(r), m_resized(false), m_selected(false),
m_needUpdate(false), m_brush(DefaultBrushColor), m_pen(DefaultPenColor), m_z(0) {};
- CompositionRect(const QPoint & topLeft, const QPoint & bottomRight)
- : QRect(topLeft, bottomRight), m_resized(false), m_selected(false),
+ CompositionRect(const TQPoint & topLeft, const TQPoint & bottomRight)
+ : TQRect(topLeft, bottomRight), m_resized(false), m_selected(false),
m_needUpdate(false), m_brush(DefaultBrushColor), m_pen(DefaultPenColor), m_z(0) {};
- CompositionRect(const QPoint & topLeft, const QSize & size)
- : QRect(topLeft, size), m_resized(false), m_selected(false),
+ CompositionRect(const TQPoint & topLeft, const TQSize & size)
+ : TQRect(topLeft, size), m_resized(false), m_selected(false),
m_needUpdate(false), m_brush(DefaultBrushColor), m_pen(DefaultPenColor), m_z(0) {};
CompositionRect(int left, int top, int width, int height)
- : QRect(left, top, width, height), m_resized(false), m_selected(false),
+ : TQRect(left, top, width, height), m_resized(false), m_selected(false),
m_needUpdate(false), m_brush(DefaultBrushColor), m_pen(DefaultPenColor), m_z(0) {};
void setResized(bool s) { m_resized = s; }
@@ -73,10 +73,10 @@ public:
int z() const { return m_z; }
// brush, pen draw info
- void setBrush(QBrush b) { m_brush = b; }
- QBrush getBrush() const { return m_brush; }
- void setPen(QPen b) { m_pen = b; }
- QPen getPen() const { return m_pen; }
+ void setBrush(TQBrush b) { m_brush = b; }
+ TQBrush getBrush() const { return m_brush; }
+ void setPen(TQPen b) { m_pen = b; }
+ TQPen getPen() const { return m_pen; }
// repeating segments
void setRepeatMarks(const repeatmarks& rm) { m_repeatMarks = rm; }
@@ -84,21 +84,21 @@ public:
bool isRepeating() const { return m_repeatMarks.size() > 0; }
int getBaseWidth() const { return m_baseWidth; }
void setBaseWidth(int bw) { m_baseWidth = bw; }
- QString getLabel() const { return m_label; }
- void setLabel(QString l) { m_label = l; }
+ TQString getLabel() const { return m_label; }
+ void setLabel(TQString l) { m_label = l; }
- static const QColor DefaultPenColor;
- static const QColor DefaultBrushColor;
+ static const TQColor DefaultPenColor;
+ static const TQColor DefaultBrushColor;
protected:
bool m_resized;
bool m_selected;
bool m_needUpdate;
- QBrush m_brush;
- QPen m_pen;
+ TQBrush m_brush;
+ TQPen m_pen;
repeatmarks m_repeatMarks;
int m_baseWidth;
- QString m_label;
+ TQString m_label;
int m_z;
};
diff --git a/src/gui/editors/segment/segmentcanvas/CompositionView.cpp b/src/gui/editors/segment/segmentcanvas/CompositionView.cpp
index 8e83a6b..1ff0263 100644
--- a/src/gui/editors/segment/segmentcanvas/CompositionView.cpp
+++ b/src/gui/editors/segment/segmentcanvas/CompositionView.cpp
@@ -47,22 +47,22 @@
#include "SegmentToolBox.h"
#include "SegmentTool.h"
#include <kmessagebox.h>
-#include <qbrush.h>
-#include <qcolor.h>
-#include <qevent.h>
-#include <qfont.h>
-#include <qfontmetrics.h>
-#include <qmemarray.h>
-#include <qpainter.h>
-#include <qpen.h>
-#include <qpixmap.h>
-#include <qpoint.h>
-#include <qrect.h>
-#include <qscrollbar.h>
-#include <qscrollview.h>
-#include <qsize.h>
-#include <qstring.h>
-#include <qwidget.h>
+#include <tqbrush.h>
+#include <tqcolor.h>
+#include <tqevent.h>
+#include <tqfont.h>
+#include <tqfontmetrics.h>
+#include <tqmemarray.h>
+#include <tqpainter.h>
+#include <tqpen.h>
+#include <tqpixmap.h>
+#include <tqpoint.h>
+#include <tqrect.h>
+#include <tqscrollbar.h>
+#include <tqscrollview.h>
+#include <tqsize.h>
+#include <tqstring.h>
+#include <tqwidget.h>
#include <kapplication.h>
#include <kconfig.h>
#include <algorithm>
@@ -71,24 +71,24 @@
namespace Rosegarden
{
-class PreviewRect : public QRect {
+class PreviewRect : public TQRect {
public:
PreviewRect(int left, int top, int width, int height) :
- QRect(left, top, width, height) {};
+ TQRect(left, top, width, height) {};
- PreviewRect(const QRect& r) :
- QRect(r) {};
+ PreviewRect(const TQRect& r) :
+ TQRect(r) {};
- const QColor& getColor() const { return m_color; }
- void setColor(QColor c) { m_color = c; }
+ const TQColor& getColor() const { return m_color; }
+ void setColor(TQColor c) { m_color = c; }
protected:
- QColor m_color;
+ TQColor m_color;
};
CompositionView::CompositionView(RosegardenGUIDoc* doc,
CompositionModel* model,
- QWidget * parent, const char * name, WFlags f)
+ TQWidget * parent, const char * name, WFlags f)
#if KDE_VERSION >= KDE_MAKE_VERSION(3,2,0)
: RosegardenScrollView(parent, name, f | WNoAutoErase | WStaticContents),
#else
@@ -110,8 +110,8 @@ CompositionView::CompositionView(RosegardenGUIDoc* doc,
m_pointerPos(0),
m_pointerColor(GUIPalette::getColour(GUIPalette::Pointer)),
m_pointerWidth(4),
- m_pointerPen(QPen(m_pointerColor, m_pointerWidth)),
- m_tmpRect(QRect(QPoint(0, 0), QPoint( -1, -1))),
+ m_pointerPen(TQPen(m_pointerColor, m_pointerWidth)),
+ m_tmpRect(TQRect(TQPoint(0, 0), TQPoint( -1, -1))),
m_tmpRectFill(CompositionRect::DefaultBrushColor),
m_trackDividerColor(GUIPalette::getColour(GUIPalette::TrackDivider)),
m_drawGuides(false),
@@ -132,8 +132,8 @@ CompositionView::CompositionView(RosegardenGUIDoc* doc,
if (doc) {
m_toolBox = new SegmentToolBox(this, doc);
- connect(m_toolBox, SIGNAL(showContextHelp(const QString &)),
- this, SLOT(slotToolHelpChanged(const QString &)));
+ connect(m_toolBox, TQT_SIGNAL(showContextHelp(const TQString &)),
+ this, TQT_SLOT(slotToolHelpChanged(const TQString &)));
}
setDragAutoScroll(true);
@@ -143,46 +143,46 @@ CompositionView::CompositionView(RosegardenGUIDoc* doc,
slotUpdateSize();
- QScrollBar* hsb = horizontalScrollBar();
+ TQScrollBar* hsb = horizontalScrollBar();
// dynamically adjust content size when scrolling past current composition's end
- connect(hsb, SIGNAL(nextLine()),
- this, SLOT(scrollRight()));
- connect(hsb, SIGNAL(prevLine()),
- this, SLOT(scrollLeft()));
-
- // connect(this, SIGNAL(contentsMoving(int, int)),
- // this, SLOT(slotAllDrawBuffersNeedRefresh()));
-
- // connect(this, SIGNAL(contentsMoving(int, int)),
- // this, SLOT(slotContentsMoving(int, int)));
-
- connect(model, SIGNAL(needContentUpdate()),
- this, SLOT(slotUpdateSegmentsDrawBuffer()));
- connect(model, SIGNAL(needContentUpdate(const QRect&)),
- this, SLOT(slotUpdateSegmentsDrawBuffer(const QRect&)));
- connect(model, SIGNAL(needArtifactsUpdate()),
- this, SLOT(slotArtifactsDrawBufferNeedsRefresh()));
- connect(model, SIGNAL(needSizeUpdate()),
- this, SLOT(slotUpdateSize()));
+ connect(hsb, TQT_SIGNAL(nextLine()),
+ this, TQT_SLOT(scrollRight()));
+ connect(hsb, TQT_SIGNAL(prevLine()),
+ this, TQT_SLOT(scrollLeft()));
+
+ // connect(this, TQT_SIGNAL(contentsMoving(int, int)),
+ // this, TQT_SLOT(slotAllDrawBuffersNeedRefresh()));
+
+ // connect(this, TQT_SIGNAL(contentsMoving(int, int)),
+ // this, TQT_SLOT(slotContentsMoving(int, int)));
+
+ connect(model, TQT_SIGNAL(needContentUpdate()),
+ this, TQT_SLOT(slotUpdateSegmentsDrawBuffer()));
+ connect(model, TQT_SIGNAL(needContentUpdate(const TQRect&)),
+ this, TQT_SLOT(slotUpdateSegmentsDrawBuffer(const TQRect&)));
+ connect(model, TQT_SIGNAL(needArtifactsUpdate()),
+ this, TQT_SLOT(slotArtifactsDrawBufferNeedsRefresh()));
+ connect(model, TQT_SIGNAL(needSizeUpdate()),
+ this, TQT_SLOT(slotUpdateSize()));
if (doc) {
- connect(doc, SIGNAL(docColoursChanged()),
- this, SLOT(slotRefreshColourCache()));
+ connect(doc, TQT_SIGNAL(docColoursChanged()),
+ this, TQT_SLOT(slotRefreshColourCache()));
// recording-related signals
- connect(doc, SIGNAL(newMIDIRecordingSegment(Segment*)),
- this, SLOT(slotNewMIDIRecordingSegment(Segment*)));
- connect(doc, SIGNAL(newAudioRecordingSegment(Segment*)),
- this, SLOT(slotNewAudioRecordingSegment(Segment*)));
- // connect(doc, SIGNAL(recordMIDISegmentUpdated(Segment*, timeT)),
- // this, SLOT(slotRecordMIDISegmentUpdated(Segment*, timeT)));
- connect(doc, SIGNAL(stoppedAudioRecording()),
- this, SLOT(slotStoppedRecording()));
- connect(doc, SIGNAL(stoppedMIDIRecording()),
- this, SLOT(slotStoppedRecording()));
- connect(doc, SIGNAL(audioFileFinalized(Segment*)),
- getModel(), SLOT(slotAudioFileFinalized(Segment*)));
+ connect(doc, TQT_SIGNAL(newMIDIRecordingSegment(Segment*)),
+ this, TQT_SLOT(slotNewMIDIRecordingSegment(Segment*)));
+ connect(doc, TQT_SIGNAL(newAudioRecordingSegment(Segment*)),
+ this, TQT_SLOT(slotNewAudioRecordingSegment(Segment*)));
+ // connect(doc, TQT_SIGNAL(recordMIDISegmentUpdated(Segment*, timeT)),
+ // this, TQT_SLOT(slotRecordMIDISegmentUpdated(Segment*, timeT)));
+ connect(doc, TQT_SIGNAL(stoppedAudioRecording()),
+ this, TQT_SLOT(slotStoppedRecording()));
+ connect(doc, TQT_SIGNAL(stoppedMIDIRecording()),
+ this, TQT_SLOT(slotStoppedRecording()));
+ connect(doc, TQT_SIGNAL(audioFileFinalized(Segment*)),
+ getModel(), TQT_SLOT(slotAudioFileFinalized(Segment*)));
}
CompositionModelImpl* cmi = dynamic_cast<CompositionModelImpl*>(model);
@@ -194,8 +194,8 @@ CompositionView::CompositionView(RosegardenGUIDoc* doc,
doc->getAudioPreviewThread().setEmptyQueueListener(this);
}
- m_segmentsDrawBuffer.setOptimization(QPixmap::BestOptim);
- m_artifactsDrawBuffer.setOptimization(QPixmap::BestOptim);
+ m_segmentsDrawBuffer.setOptimization(TQPixmap::BestOptim);
+ m_artifactsDrawBuffer.setOptimization(TQPixmap::BestOptim);
viewport()->setMouseTracking(true);
}
@@ -208,7 +208,7 @@ void CompositionView::endAudioPreviewGeneration()
}
}
-void CompositionView::setBackgroundPixmap(const QPixmap &m)
+void CompositionView::setBackgroundPixmap(const TQPixmap &m)
{
m_backgroundPixmap = m;
// viewport()->setErasePixmap(m_backgroundPixmap);
@@ -216,7 +216,7 @@ void CompositionView::setBackgroundPixmap(const QPixmap &m)
void CompositionView::initStepSize()
{
- QScrollBar* hsb = horizontalScrollBar();
+ TQScrollBar* hsb = horizontalScrollBar();
m_stepSize = hsb->lineStep();
}
@@ -265,7 +265,7 @@ void CompositionView::scrollLeft()
}
-void CompositionView::setSelectionRectPos(const QPoint& pos)
+void CompositionView::setSelectionRectPos(const TQPoint& pos)
{
m_selectionRect.setRect(pos.x(), pos.y(), 0, 0);
getModel()->setSelectionRect(m_selectionRect);
@@ -273,7 +273,7 @@ void CompositionView::setSelectionRectPos(const QPoint& pos)
void CompositionView::setSelectionRectSize(int w, int h)
{
- m_selectionRect.setSize(QSize(w, h));
+ m_selectionRect.setSize(TQSize(w, h));
getModel()->setSelectionRect(m_selectionRect);
}
@@ -303,7 +303,7 @@ void CompositionView::updateSelectionContents()
return ;
- QRect selectionRect = getModel()->getSelectionContentsRect();
+ TQRect selectionRect = getModel()->getSelectionContentsRect();
updateContents(selectionRect);
}
@@ -312,7 +312,7 @@ void CompositionView::slotContentsMoving(int x, int y)
// qDebug("contents moving : x=%d", x);
}
-void CompositionView::slotSetTool(const QString& toolName)
+void CompositionView::slotSetTool(const TQString& toolName)
{
RG_DEBUG << "CompositionView::slotSetTool(" << toolName << ")"
<< this << "\n";
@@ -327,7 +327,7 @@ void CompositionView::slotSetTool(const QString& toolName)
if (m_tool)
m_tool->ready();
else {
- KMessageBox::error(0, QString("CompositionView::slotSetTool() : unknown tool name %1").arg(toolName));
+ KMessageBox::error(0, TQString("CompositionView::slotSetTool() : unknown tool name %1").arg(toolName));
}
}
@@ -335,7 +335,7 @@ void CompositionView::slotSelectSegments(const SegmentSelection &segments)
{
RG_DEBUG << "CompositionView::slotSelectSegments\n";
- static QRect dummy;
+ static TQRect dummy;
getModel()->clearSelected();
@@ -383,13 +383,13 @@ void CompositionView::slotHideSplitLine()
m_splitLinePos.setY( -1);
}
-void CompositionView::slotExternalWheelEvent(QWheelEvent* e)
+void CompositionView::slotExternalWheelEvent(TQWheelEvent* e)
{
e->accept();
wheelEvent(e);
}
-CompositionItem CompositionView::getFirstItemAt(QPoint pos)
+CompositionItem CompositionView::getFirstItemAt(TQPoint pos)
{
CompositionModel::itemcontainer items = getModel()->getItemsAt(pos);
@@ -443,7 +443,7 @@ void CompositionView::slotUpdateSegmentsDrawBuffer()
updateContents();
}
-void CompositionView::slotUpdateSegmentsDrawBuffer(const QRect& rect)
+void CompositionView::slotUpdateSegmentsDrawBuffer(const TQRect& rect)
{
// RG_DEBUG << "CompositionView::slotUpdateSegmentsDrawBuffer() rect "
// << rect << " - valid : " << rect.isValid() << endl;
@@ -479,9 +479,9 @@ void CompositionView::slotStoppedRecording()
getModel()->clearRecordingItems();
}
-void CompositionView::resizeEvent(QResizeEvent* e)
+void CompositionView::resizeEvent(TQResizeEvent* e)
{
- QScrollView::resizeEvent(e);
+ TQScrollView::resizeEvent(e);
slotUpdateSize();
int w = std::max(m_segmentsDrawBuffer.width(), visibleWidth());
@@ -493,18 +493,18 @@ void CompositionView::resizeEvent(QResizeEvent* e)
// RG_DEBUG << "CompositionView::resizeEvent() : drawBuffer size = " << m_segmentsDrawBuffer.size() << endl;
}
-void CompositionView::viewportPaintEvent(QPaintEvent* e)
+void CompositionView::viewportPaintEvent(TQPaintEvent* e)
{
- QMemArray<QRect> rects = e->region().rects();
+ TQMemArray<TQRect> rects = e->region().rects();
for (unsigned int i = 0; i < rects.size(); ++i) {
viewportPaintRect(rects[i]);
}
}
-void CompositionView::viewportPaintRect(QRect r)
+void CompositionView::viewportPaintRect(TQRect r)
{
- QRect updateRect = r;
+ TQRect updateRect = r;
r &= viewport()->rect();
r.moveBy(contentsX(), contentsY());
@@ -520,7 +520,7 @@ void CompositionView::viewportPaintRect(QRect r)
if (changed || m_artifactsDrawBufferRefresh.isValid()) {
// r was modified by checkScrollAndRefreshDrawBuffer
- QRect copyRect(r | m_artifactsDrawBufferRefresh);
+ TQRect copyRect(r | m_artifactsDrawBufferRefresh);
copyRect.moveBy( -contentsX(), -contentsY());
// RG_DEBUG << "copying from segment to artifacts buffer: " << copyRect << endl;
@@ -534,7 +534,7 @@ void CompositionView::viewportPaintRect(QRect r)
if (m_artifactsDrawBufferRefresh.isValid()) {
refreshArtifactsDrawBuffer(m_artifactsDrawBufferRefresh);
- m_artifactsDrawBufferRefresh = QRect();
+ m_artifactsDrawBufferRefresh = TQRect();
}
if (scroll) {
@@ -549,17 +549,17 @@ void CompositionView::viewportPaintRect(QRect r)
// DEBUG
- // QPainter pdebug(viewport());
- // static QPen framePen(Qt::red, 1);
+ // TQPainter pdebug(viewport());
+ // static TQPen framePen(Qt::red, 1);
// pdebug.setPen(framePen);
// pdebug.drawRect(updateRect);
}
-bool CompositionView::checkScrollAndRefreshDrawBuffer(QRect &rect, bool& scroll)
+bool CompositionView::checkScrollAndRefreshDrawBuffer(TQRect &rect, bool& scroll)
{
bool all = false;
- QRect refreshRect = m_segmentsDrawBufferRefresh;
+ TQRect refreshRect = m_segmentsDrawBufferRefresh;
int w = visibleWidth(), h = visibleHeight();
int cx = contentsX(), cy = contentsY();
@@ -591,13 +591,13 @@ bool CompositionView::checkScrollAndRefreshDrawBuffer(QRect &rect, bool& scroll)
if (dx > -w && dx < w) {
- QPainter cp(&m_segmentsDrawBuffer);
+ TQPainter cp(&m_segmentsDrawBuffer);
cp.drawPixmap(dx, 0, m_segmentsDrawBuffer);
if (dx < 0) {
- refreshRect |= QRect(cx + w + dx, cy, -dx, h);
+ refreshRect |= TQRect(cx + w + dx, cy, -dx, h);
} else {
- refreshRect |= QRect(cx, cy, dx, h);
+ refreshRect |= TQRect(cx, cy, dx, h);
}
} else {
@@ -613,13 +613,13 @@ bool CompositionView::checkScrollAndRefreshDrawBuffer(QRect &rect, bool& scroll)
if (dy > -h && dy < h) {
- QPainter cp(&m_segmentsDrawBuffer);
+ TQPainter cp(&m_segmentsDrawBuffer);
cp.drawPixmap(0, dy, m_segmentsDrawBuffer);
if (dy < 0) {
- refreshRect |= QRect(cx, cy + h + dy, w, -dy);
+ refreshRect |= TQRect(cx, cy + h + dy, w, -dy);
} else {
- refreshRect |= QRect(cx, cy, w, dy);
+ refreshRect |= TQRect(cx, cy, w, dy);
}
} else {
@@ -640,7 +640,7 @@ bool CompositionView::checkScrollAndRefreshDrawBuffer(QRect &rect, bool& scroll)
if (needRefresh)
refreshSegmentsDrawBuffer(refreshRect);
- m_segmentsDrawBufferRefresh = QRect();
+ m_segmentsDrawBufferRefresh = TQRect();
m_lastBufferRefreshX = cx;
m_lastBufferRefreshY = cy;
@@ -650,17 +650,17 @@ bool CompositionView::checkScrollAndRefreshDrawBuffer(QRect &rect, bool& scroll)
return needRefresh;
}
-void CompositionView::refreshSegmentsDrawBuffer(const QRect& rect)
+void CompositionView::refreshSegmentsDrawBuffer(const TQRect& rect)
{
// Profiler profiler("CompositionView::refreshDrawBuffer", true);
// RG_DEBUG << "CompositionView::refreshSegmentsDrawBuffer() r = "
// << rect << endl;
- QPainter p(&m_segmentsDrawBuffer, viewport());
+ TQPainter p(&m_segmentsDrawBuffer, viewport());
p.translate( -contentsX(), -contentsY());
if (!m_backgroundPixmap.isNull()) {
- QPoint pp(rect.x() % m_backgroundPixmap.height(), rect.y() % m_backgroundPixmap.width());
+ TQPoint pp(rect.x() % m_backgroundPixmap.height(), rect.y() % m_backgroundPixmap.width());
p.drawTiledPixmap(rect, m_backgroundPixmap, pp);
} else {
p.eraseRect(rect);
@@ -669,29 +669,29 @@ void CompositionView::refreshSegmentsDrawBuffer(const QRect& rect)
drawArea(&p, rect);
// DEBUG - show what's updated
- // QPen framePen(Qt::red, 1);
+ // TQPen framePen(Qt::red, 1);
// p.setPen(framePen);
// p.drawRect(rect);
// m_segmentsDrawBufferNeedsRefresh = false;
}
-void CompositionView::refreshArtifactsDrawBuffer(const QRect& rect)
+void CompositionView::refreshArtifactsDrawBuffer(const TQRect& rect)
{
// RG_DEBUG << "CompositionView::refreshArtifactsDrawBuffer() r = "
// << rect << endl;
- QPainter p;
+ TQPainter p;
p.begin(&m_artifactsDrawBuffer, viewport());
p.translate( -contentsX(), -contentsY());
- // QRect r(contentsX(), contentsY(), m_artifactsDrawBuffer.width(), m_artifactsDrawBuffer.height());
+ // TQRect r(contentsX(), contentsY(), m_artifactsDrawBuffer.width(), m_artifactsDrawBuffer.height());
drawAreaArtifacts(&p, rect);
p.end();
// m_artifactsDrawBufferNeedsRefresh = false;
}
-void CompositionView::drawArea(QPainter *p, const QRect& clipRect)
+void CompositionView::drawArea(TQPainter *p, const TQRect& clipRect)
{
// Profiler profiler("CompositionView::drawArea", true);
@@ -705,7 +705,7 @@ void CompositionView::drawArea(QPainter *p, const QRect& clipRect)
if (!lineHeights.empty()) {
p->save();
- QColor light = m_trackDividerColor.light();
+ TQColor light = m_trackDividerColor.light();
p->setPen(light);
for (CompositionModel::heightlist::const_iterator hi = lineHeights.begin();
@@ -802,8 +802,8 @@ void CompositionView::drawArea(QPainter *p, const QRect& clipRect)
for (; interval.range.first != interval.range.second; ++interval.range.first) {
const PreviewRect& pr = *(interval.range.first);
- QColor defaultCol = CompositionColourCache::getInstance()->SegmentInternalPreview;
- QColor col = interval.color.isValid() ? interval.color : defaultCol;
+ TQColor defaultCol = CompositionColourCache::getInstance()->SegmentInternalPreview;
+ TQColor col = interval.color.isValid() ? interval.color : defaultCol;
p->setBrush(col);
p->setPen(col);
// RG_DEBUG << "CompositionView::drawArea : drawing preview rect at x = " << pr.x() << endl;
@@ -828,15 +828,15 @@ void CompositionView::drawArea(QPainter *p, const QRect& clipRect)
}
-void CompositionView::drawAreaAudioPreviews(QPainter * p, const QRect& clipRect)
+void CompositionView::drawAreaAudioPreviews(TQPainter * p, const TQRect& clipRect)
{
CompositionModel::AudioPreviewDrawData::const_iterator api = m_audioPreviewRects.begin();
CompositionModel::AudioPreviewDrawData::const_iterator apEnd = m_audioPreviewRects.end();
- QRect rectToFill, // rect to fill on canvas
+ TQRect rectToFill, // rect to fill on canvas
localRect; // the rect of the tile to draw on the canvas
- QPoint basePoint, // origin of segment rect
+ TQPoint basePoint, // origin of segment rect
drawBasePoint; // origin of rect to fill on canvas
- QRect r;
+ TQRect r;
for (; api != apEnd; ++api) {
rectToFill = api->rect;
basePoint = api->basePoint;
@@ -891,7 +891,7 @@ void CompositionView::drawAreaAudioPreviews(QPainter * p, const QRect& clipRect)
}
}
-void CompositionView::drawAreaArtifacts(QPainter * p, const QRect& clipRect)
+void CompositionView::drawAreaArtifacts(TQPainter * p, const TQRect& clipRect)
{
//
// Playback Pointer
@@ -938,10 +938,10 @@ void CompositionView::drawAreaArtifacts(QPainter * p, const QRect& clipRect)
}
}
-void CompositionView::drawGuides(QPainter * p, const QRect& /*clipRect*/)
+void CompositionView::drawGuides(TQPainter * p, const TQRect& /*clipRect*/)
{
// no need to check for clipping, these guides are meant to follow the mouse cursor
- QPoint guideOrig(m_topGuidePos, m_foreGuidePos);
+ TQPoint guideOrig(m_topGuidePos, m_foreGuidePos);
p->save();
p->setPen(m_guideColor);
@@ -950,15 +950,15 @@ void CompositionView::drawGuides(QPainter * p, const QRect& /*clipRect*/)
p->restore();
}
-void CompositionView::drawCompRect(const CompositionRect& r, QPainter *p, const QRect& clipRect,
+void CompositionView::drawCompRect(const CompositionRect& r, TQPainter *p, const TQRect& clipRect,
int intersectLvl, bool fill)
{
p->save();
- QBrush brush = r.getBrush();
+ TQBrush brush = r.getBrush();
if (r.isRepeating()) {
- QColor brushColor = brush.color();
+ TQColor brushColor = brush.color();
brush.setColor(brushColor.light(150));
}
@@ -975,7 +975,7 @@ void CompositionView::drawCompRect(const CompositionRect& r, QPainter *p, const
// draw 'start' rectangle with original brush
//
- QRect startRect = r;
+ TQRect startRect = r;
startRect.setWidth(repeatMarks[0] - r.x());
p->setBrush(r.getBrush());
drawRect(startRect, p, clipRect, r.isSelected(), intersectLvl, fill);
@@ -992,7 +992,7 @@ void CompositionView::drawCompRect(const CompositionRect& r, QPainter *p, const
break;
if (pos >= clipRect.left()) {
- QPoint p1(pos, r.y() + penWidth),
+ TQPoint p1(pos, r.y() + penWidth),
p2(pos, r.y() + r.height() - penWidth - 1);
// RG_DEBUG << "CompositionView::drawCompRect() : drawing repeat mark at "
@@ -1007,7 +1007,7 @@ void CompositionView::drawCompRect(const CompositionRect& r, QPainter *p, const
p->restore();
}
-void CompositionView::drawCompRectLabel(const CompositionRect& r, QPainter *p, const QRect& clipRect)
+void CompositionView::drawCompRectLabel(const CompositionRect& r, TQPainter *p, const TQRect& clipRect)
{
// draw segment label
//
@@ -1017,10 +1017,10 @@ void CompositionView::drawCompRectLabel(const CompositionRect& r, QPainter *p, c
p->save();
p->setPen(GUIPalette::getColour(GUIPalette::SegmentLabel));
p->setBrush(white);
- QRect textRect(r);
+ TQRect textRect(r);
textRect.setX(textRect.x() + 3);
- QString label = " " + r.getLabel() + " ";
- QRect textBoundingRect = p->boundingRect(textRect, Qt::AlignLeft | Qt::AlignVCenter, label);
+ TQString label = " " + r.getLabel() + " ";
+ TQRect textBoundingRect = p->boundingRect(textRect, Qt::AlignLeft | Qt::AlignVCenter, label);
p->drawRect(textBoundingRect & r);
p->drawText(textRect, Qt::AlignLeft | Qt::AlignVCenter, label);
p->restore();
@@ -1030,13 +1030,13 @@ void CompositionView::drawCompRectLabel(const CompositionRect& r, QPainter *p, c
p->save();
- QFont font;
+ TQFont font;
font.setPixelSize(r.height() / 2.2);
- font.setWeight(QFont::Bold);
+ font.setWeight(TQFont::Bold);
font.setItalic(false);
p->setFont(font);
- QRect labelRect = QRect
+ TQRect labelRect = QRect
(r.x(),
r.y() + ((r.height() - p->fontMetrics().height()) / 2) + 1,
r.width(),
@@ -1045,8 +1045,8 @@ void CompositionView::drawCompRectLabel(const CompositionRect& r, QPainter *p, c
int x = labelRect.x() + p->fontMetrics().width('x');
int y = labelRect.y();
- QBrush brush = r.getBrush();
- QColor surroundColour = brush.color().light(110);
+ TQBrush brush = r.getBrush();
+ TQColor surroundColour = brush.color().light(110);
int h, s, v;
surroundColour.hsv(&h, &s, &v);
@@ -1090,7 +1090,7 @@ void CompositionView::drawCompRectLabel(const CompositionRect& r, QPainter *p, c
#endif
}
-void CompositionView::drawRect(const QRect& r, QPainter *p, const QRect& clipRect,
+void CompositionView::drawRect(const TQRect& r, TQPainter *p, const TQRect& clipRect,
bool isSelected, int intersectLvl, bool fill)
{
// RG_DEBUG << "CompositionView::drawRect : intersectLvl = " << intersectLvl
@@ -1101,22 +1101,22 @@ void CompositionView::drawRect(const QRect& r, QPainter *p, const QRect& clipRec
p->save();
- QRect rect = r;
+ TQRect rect = r;
if (fill) {
if (isSelected) {
- QColor fillColor = p->brush().color();
+ TQColor fillColor = p->brush().color();
fillColor = fillColor.dark(200);
- QBrush b = p->brush();
+ TQBrush b = p->brush();
b.setColor(fillColor);
p->setBrush(b);
// RG_DEBUG << "CompositionView::drawRect : selected color : " << fillColor << endl;
}
if (intersectLvl > 0) {
- QColor fillColor = p->brush().color();
+ TQColor fillColor = p->brush().color();
fillColor = fillColor.dark((intersectLvl) * 105);
- QBrush b = p->brush();
+ TQBrush b = p->brush();
b.setColor(fillColor);
p->setBrush(b);
// RG_DEBUG << "CompositionView::drawRect : intersected color : " << fillColor << " isSelected : " << isSelected << endl;
@@ -1126,7 +1126,7 @@ void CompositionView::drawRect(const QRect& r, QPainter *p, const QRect& clipRec
}
// Paint using the small coordinates...
- QRect intersection = rect.intersect(clipRect);
+ TQRect intersection = rect.intersect(clipRect);
if (clipRect.contains(rect)) {
p->drawRect(rect);
@@ -1166,9 +1166,9 @@ void CompositionView::drawRect(const QRect& r, QPainter *p, const QRect& clipRec
p->restore();
}
-QColor CompositionView::mixBrushes(QBrush a, QBrush b)
+TQColor CompositionView::mixBrushes(TQBrush a, TQBrush b)
{
- QColor ac = a.color(), bc = b.color();
+ TQColor ac = a.color(), bc = b.color();
int aR = ac.red(), aG = ac.green(), aB = ac.blue(),
bR = bc.red(), bG = bc.green(), bB = ac.blue();
@@ -1179,7 +1179,7 @@ QColor CompositionView::mixBrushes(QBrush a, QBrush b)
}
void CompositionView::drawIntersections(const CompositionModel::rectcontainer& rects,
- QPainter * p, const QRect& clipRect)
+ TQPainter * p, const TQRect& clipRect)
{
if (! (rects.size() > 1))
return ;
@@ -1262,7 +1262,7 @@ void CompositionView::drawIntersections(const CompositionModel::rectcontainer& r
}
-void CompositionView::drawPointer(QPainter *p, const QRect& clipRect)
+void CompositionView::drawPointer(TQPainter *p, const TQRect& clipRect)
{
// RG_DEBUG << "CompositionView::drawPointer: clipRect "
// << clipRect.x() << "," << clipRect.y() << " " << clipRect.width()
@@ -1277,11 +1277,11 @@ void CompositionView::drawPointer(QPainter *p, const QRect& clipRect)
}
-void CompositionView::drawTextFloat(QPainter *p, const QRect& clipRect)
+void CompositionView::drawTextFloat(TQPainter *p, const TQRect& clipRect)
{
- QFontMetrics metrics(p->fontMetrics());
+ TQFontMetrics metrics(p->fontMetrics());
- QRect bound = p->boundingRect(0, 0, 300, metrics.height() + 6, AlignAuto, m_textFloatText);
+ TQRect bound = p->boundingRect(0, 0, 300, metrics.height() + 6, AlignAuto, m_textFloatText);
p->save();
@@ -1290,7 +1290,7 @@ void CompositionView::drawTextFloat(QPainter *p, const QRect& clipRect)
bound.setTop(bound.top() - 2);
bound.setBottom(bound.bottom() + 2);
- QPoint pos(m_textFloatPos);
+ TQPoint pos(m_textFloatPos);
if (pos.y() < 0 && getModel()) {
if (pos.y() + bound.height() < 0) {
pos.setY(pos.y() + getModel()->grid().getYSnap() * 3);
@@ -1316,7 +1316,7 @@ void CompositionView::drawTextFloat(QPainter *p, const QRect& clipRect)
p->restore();
}
-bool CompositionView::event(QEvent* e)
+bool CompositionView::event(TQEvent* e)
{
if (e->type() == AudioPreviewThread::AudioPreviewQueueEmpty) {
RG_DEBUG << "CompositionView::event - AudioPreviewQueueEmpty\n";
@@ -1328,7 +1328,7 @@ bool CompositionView::event(QEvent* e)
return RosegardenScrollView::event(e);
}
-void CompositionView::enterEvent(QEvent *e)
+void CompositionView::enterEvent(TQEvent *e)
{
kapp->config()->setGroup(GeneralOptionsConfigGroup);
if (!kapp->config()->readBoolEntry("toolcontexthelp", true)) return;
@@ -1337,13 +1337,13 @@ void CompositionView::enterEvent(QEvent *e)
m_contextHelpShown = true;
}
-void CompositionView::leaveEvent(QEvent *e)
+void CompositionView::leaveEvent(TQEvent *e)
{
emit showContextHelp("");
m_contextHelpShown = false;
}
-void CompositionView::slotToolHelpChanged(const QString &text)
+void CompositionView::slotToolHelpChanged(const TQString &text)
{
if (m_toolContextHelp == text) return;
m_toolContextHelp = text;
@@ -1354,7 +1354,7 @@ void CompositionView::slotToolHelpChanged(const QString &text)
if (m_contextHelpShown) emit showContextHelp(text);
}
-void CompositionView::contentsMousePressEvent(QMouseEvent* e)
+void CompositionView::contentsMousePressEvent(TQMouseEvent* e)
{
Qt::ButtonState bs = e->state();
slotSetSelectCopy((bs & Qt::ControlButton) != 0);
@@ -1385,7 +1385,7 @@ void CompositionView::contentsMousePressEvent(QMouseEvent* e)
}
}
-void CompositionView::contentsMouseReleaseEvent(QMouseEvent* e)
+void CompositionView::contentsMouseReleaseEvent(TQMouseEvent* e)
{
RG_DEBUG << "CompositionView::contentsMouseReleaseEvent()\n";
@@ -1399,7 +1399,7 @@ void CompositionView::contentsMouseReleaseEvent(QMouseEvent* e)
m_tool->handleMouseButtonRelease(e);
}
-void CompositionView::contentsMouseDoubleClickEvent(QMouseEvent* e)
+void CompositionView::contentsMouseDoubleClickEvent(TQMouseEvent* e)
{
m_currentItem = getFirstItemAt(e->pos());
@@ -1429,7 +1429,7 @@ void CompositionView::contentsMouseDoubleClickEvent(QMouseEvent* e)
}
}
-void CompositionView::contentsMouseMoveEvent(QMouseEvent* e)
+void CompositionView::contentsMouseMoveEvent(TQMouseEvent* e)
{
if (!m_tool)
return ;
@@ -1500,7 +1500,7 @@ void CompositionView::setPointerPos(int pos)
if (deltaW <= m_pointerPen.width() * 2) { // use one rect instead of two separate ones
- QRect updateRect
+ TQRect updateRect
(std::min(m_pointerPos, oldPos) - m_pointerPen.width(), 0,
deltaW + m_pointerPen.width() * 2, contentsHeight());
@@ -1509,11 +1509,11 @@ void CompositionView::setPointerPos(int pos)
} else {
slotArtifactsDrawBufferNeedsRefresh
- (QRect(m_pointerPos - m_pointerPen.width(), 0,
+ (TQRect(m_pointerPos - m_pointerPen.width(), 0,
m_pointerPen.width() * 2, contentsHeight()));
slotArtifactsDrawBufferNeedsRefresh
- (QRect(oldPos - m_pointerPen.width(), 0,
+ (TQRect(oldPos - m_pointerPen.width(), 0,
m_pointerPen.width() * 2, contentsHeight()));
}
}
@@ -1525,7 +1525,7 @@ void CompositionView::setGuidesPos(int x, int y)
slotArtifactsDrawBufferNeedsRefresh();
}
-void CompositionView::setGuidesPos(const QPoint& p)
+void CompositionView::setGuidesPos(const TQPoint& p)
{
m_topGuidePos = p.x();
m_foreGuidePos = p.y();
@@ -1538,20 +1538,20 @@ void CompositionView::setDrawGuides(bool d)
slotArtifactsDrawBufferNeedsRefresh();
}
-void CompositionView::setTmpRect(const QRect& r)
+void CompositionView::setTmpRect(const TQRect& r)
{
setTmpRect(r, m_tmpRectFill);
}
-void CompositionView::setTmpRect(const QRect& r, const QColor &c)
+void CompositionView::setTmpRect(const TQRect& r, const TQColor &c)
{
- QRect pRect = m_tmpRect;
+ TQRect pRect = m_tmpRect;
m_tmpRect = r;
m_tmpRectFill = c;
slotUpdateSegmentsDrawBuffer(m_tmpRect | pRect);
}
-void CompositionView::setTextFloat(int x, int y, const QString &text)
+void CompositionView::setTextFloat(int x, int y, const TQString &text)
{
m_textFloatPos.setX(x);
m_textFloatPos.setY(y);
@@ -1562,7 +1562,7 @@ void CompositionView::setTextFloat(int x, int y, const QString &text)
// most of the time when the floating text is drawn
// we want to update a larger part of the view
// so don't update here
- // QRect r = fontMetrics().boundingRect(x, y, 300, 40, AlignAuto, m_textFloatText);
+ // TQRect r = fontMetrics().boundingRect(x, y, 300, 40, AlignAuto, m_textFloatText);
// slotUpdateSegmentsDrawBuffer(r);
@@ -1584,7 +1584,7 @@ CompositionView::slotTextFloatTimeout()
{
hideTextFloat();
slotArtifactsDrawBufferNeedsRefresh();
- // rgapp->slotSetStatusMessage(QString::null);
+ // rgapp->slotSetStatusMessage(TQString::null);
}
}
diff --git a/src/gui/editors/segment/segmentcanvas/CompositionView.h b/src/gui/editors/segment/segmentcanvas/CompositionView.h
index ff0d440..c31cf96 100644
--- a/src/gui/editors/segment/segmentcanvas/CompositionView.h
+++ b/src/gui/editors/segment/segmentcanvas/CompositionView.h
@@ -30,23 +30,23 @@
#include "CompositionModel.h"
#include "CompositionItem.h"
#include "gui/general/RosegardenScrollView.h"
-#include <qbrush.h>
-#include <qcolor.h>
-#include <qpen.h>
-#include <qpixmap.h>
-#include <qpoint.h>
-#include <qrect.h>
-#include <qstring.h>
+#include <tqbrush.h>
+#include <tqcolor.h>
+#include <tqpen.h>
+#include <tqpixmap.h>
+#include <tqpoint.h>
+#include <tqrect.h>
+#include <tqstring.h>
#include "base/Event.h"
-class QWidget;
-class QWheelEvent;
-class QResizeEvent;
-class QPaintEvent;
-class QPainter;
-class QMouseEvent;
-class QEvent;
+class TQWidget;
+class TQWheelEvent;
+class TQResizeEvent;
+class TQPaintEvent;
+class TQPainter;
+class TQMouseEvent;
+class TQEvent;
namespace Rosegarden
@@ -66,31 +66,31 @@ class CompositionView : public RosegardenScrollView
Q_OBJECT
public:
CompositionView(RosegardenGUIDoc*, CompositionModel*,
- QWidget * parent=0, const char* name=0, WFlags f=0);
+ TQWidget * parent=0, const char* name=0, WFlags f=0);
void setPointerPos(int pos);
int getPointerPos() { return m_pointerPos; }
void setGuidesPos(int x, int y);
- void setGuidesPos(const QPoint& p);
+ void setGuidesPos(const TQPoint& p);
void setDrawGuides(bool d);
- QRect getSelectionRect() const { return m_selectionRect; }
- void setSelectionRectPos(const QPoint& pos);
+ TQRect getSelectionRect() const { return m_selectionRect; }
+ void setSelectionRectPos(const TQPoint& pos);
void setSelectionRectSize(int w, int h);
void setDrawSelectionRect(bool d);
SnapGrid& grid() { return m_model->grid(); }
- CompositionItem getFirstItemAt(QPoint pos);
+ CompositionItem getFirstItemAt(TQPoint pos);
SegmentToolBox* getToolBox() { return m_toolBox; }
CompositionModel* getModel() { return m_model; }
- void setTmpRect(const QRect& r);
- void setTmpRect(const QRect& r, const QColor &c);
- const QRect& getTmpRect() const { return m_tmpRect; }
+ void setTmpRect(const TQRect& r);
+ void setTmpRect(const TQRect& r, const TQColor &c);
+ const TQRect& getTmpRect() const { return m_tmpRect; }
/**
* Set the snap resolution of the grid to something suitable.
@@ -149,12 +149,12 @@ public:
* explicitly.
*
*/
- void setTextFloat(int x, int y, const QString &text);
+ void setTextFloat(int x, int y, const TQString &text);
void hideTextFloat() { m_drawTextFloat = false; }
void setShowSegmentLabels(bool b) { m_showSegmentLabels = b; }
- void setBackgroundPixmap(const QPixmap &m);
+ void setBackgroundPixmap(const TQPixmap &m);
void endAudioPreviewGeneration();
@@ -164,7 +164,7 @@ public slots:
void slotContentsMoving(int x, int y);
/// Set the current segment editing tool
- void slotSetTool(const QString& toolName);
+ void slotSetTool(const TQString& toolName);
// This method only operates if we're of the "Selector"
// tool type - it's called from the View to enable it
@@ -188,13 +188,13 @@ public slots:
void slotShowSplitLine(int x, int y);
void slotHideSplitLine();
- void slotExternalWheelEvent(QWheelEvent*);
+ void slotExternalWheelEvent(TQWheelEvent*);
// TextFloat timer
void slotTextFloatTimeout();
void slotUpdateSegmentsDrawBuffer();
- void slotUpdateSegmentsDrawBuffer(const QRect&);
+ void slotUpdateSegmentsDrawBuffer(const TQRect&);
void slotRefreshColourCache();
@@ -217,73 +217,73 @@ signals:
void setPointerPosition(timeT);
- void showContextHelp(const QString &);
+ void showContextHelp(const TQString &);
protected:
- virtual bool event(QEvent *);
+ virtual bool event(TQEvent *);
- virtual void contentsMousePressEvent(QMouseEvent*);
- virtual void contentsMouseReleaseEvent(QMouseEvent*);
- virtual void contentsMouseDoubleClickEvent(QMouseEvent*);
- virtual void contentsMouseMoveEvent(QMouseEvent*);
+ virtual void contentsMousePressEvent(TQMouseEvent*);
+ virtual void contentsMouseReleaseEvent(TQMouseEvent*);
+ virtual void contentsMouseDoubleClickEvent(TQMouseEvent*);
+ virtual void contentsMouseMoveEvent(TQMouseEvent*);
- virtual void viewportPaintEvent(QPaintEvent*);
- virtual void resizeEvent(QResizeEvent*);
+ virtual void viewportPaintEvent(TQPaintEvent*);
+ virtual void resizeEvent(TQResizeEvent*);
- virtual void enterEvent(QEvent *);
- virtual void leaveEvent(QEvent *);
+ virtual void enterEvent(TQEvent *);
+ virtual void leaveEvent(TQEvent *);
- virtual void viewportPaintRect(QRect);
+ virtual void viewportPaintRect(TQRect);
/**
* if something changed, returns true and sets rect accordingly
* sets 'scroll' if some scrolling occurred
*/
- bool checkScrollAndRefreshDrawBuffer(QRect &, bool& scroll);
- void refreshSegmentsDrawBuffer(const QRect&);
- void refreshArtifactsDrawBuffer(const QRect&);
- void drawArea(QPainter * p, const QRect& rect);
- void drawAreaAudioPreviews(QPainter * p, const QRect& rect);
- void drawAreaArtifacts(QPainter * p, const QRect& rect);
- void drawRect(const QRect& rect, QPainter * p, const QRect& clipRect,
+ bool checkScrollAndRefreshDrawBuffer(TQRect &, bool& scroll);
+ void refreshSegmentsDrawBuffer(const TQRect&);
+ void refreshArtifactsDrawBuffer(const TQRect&);
+ void drawArea(TQPainter * p, const TQRect& rect);
+ void drawAreaAudioPreviews(TQPainter * p, const TQRect& rect);
+ void drawAreaArtifacts(TQPainter * p, const TQRect& rect);
+ void drawRect(const TQRect& rect, TQPainter * p, const TQRect& clipRect,
bool isSelected = false, int intersectLvl = 0, bool fill = true);
- void drawCompRect(const CompositionRect& r, QPainter *p, const QRect& clipRect,
+ void drawCompRect(const CompositionRect& r, TQPainter *p, const TQRect& clipRect,
int intersectLvl = 0, bool fill = true);
- void drawCompRectLabel(const CompositionRect& r, QPainter *p, const QRect& clipRect);
- void drawIntersections(const CompositionModel::rectcontainer&, QPainter * p, const QRect& clipRect);
+ void drawCompRectLabel(const CompositionRect& r, TQPainter *p, const TQRect& clipRect);
+ void drawIntersections(const CompositionModel::rectcontainer&, TQPainter * p, const TQRect& clipRect);
- void drawPointer(QPainter * p, const QRect& clipRect);
- void drawGuides(QPainter * p, const QRect& clipRect);
- void drawTextFloat(QPainter * p, const QRect& clipRect);
+ void drawPointer(TQPainter * p, const TQRect& clipRect);
+ void drawGuides(TQPainter * p, const TQRect& clipRect);
+ void drawTextFloat(TQPainter * p, const TQRect& clipRect);
void initStepSize();
void releaseCurrentItem();
- static QColor mixBrushes(QBrush a, QBrush b);
+ static TQColor mixBrushes(TQBrush a, TQBrush b);
SegmentSelector* getSegmentSelectorTool();
protected slots:
void slotSegmentsDrawBufferNeedsRefresh() {
m_segmentsDrawBufferRefresh =
- QRect(contentsX(), contentsY(), visibleWidth(), visibleHeight());
+ TQRect(contentsX(), contentsY(), visibleWidth(), visibleHeight());
}
- void slotSegmentsDrawBufferNeedsRefresh(QRect r) {
+ void slotSegmentsDrawBufferNeedsRefresh(TQRect r) {
m_segmentsDrawBufferRefresh |=
- (QRect(contentsX(), contentsY(), visibleWidth(), visibleHeight())
+ (TQRect(contentsX(), contentsY(), visibleWidth(), visibleHeight())
& r);
}
void slotArtifactsDrawBufferNeedsRefresh() {
m_artifactsDrawBufferRefresh =
- QRect(contentsX(), contentsY(), visibleWidth(), visibleHeight());
+ TQRect(contentsX(), contentsY(), visibleWidth(), visibleHeight());
updateContents();
}
- void slotArtifactsDrawBufferNeedsRefresh(QRect r) {
+ void slotArtifactsDrawBufferNeedsRefresh(TQRect r) {
m_artifactsDrawBufferRefresh |=
- (QRect(contentsX(), contentsY(), visibleWidth(), visibleHeight())
+ (TQRect(contentsX(), contentsY(), visibleWidth(), visibleHeight())
& r);
updateContents(r);
}
@@ -293,12 +293,12 @@ protected slots:
slotArtifactsDrawBufferNeedsRefresh();
}
- void slotAllDrawBuffersNeedRefresh(QRect r) {
+ void slotAllDrawBuffersNeedRefresh(TQRect r) {
slotSegmentsDrawBufferNeedsRefresh(r);
slotArtifactsDrawBufferNeedsRefresh(r);
}
- void slotToolHelpChanged(const QString &);
+ void slotToolHelpChanged(const TQString &);
protected:
@@ -318,42 +318,42 @@ protected:
int m_minWidth;
int m_stepSize;
- QColor m_rectFill;
- QColor m_selectedRectFill;
+ TQColor m_rectFill;
+ TQColor m_selectedRectFill;
int m_pointerPos;
- QColor m_pointerColor;
+ TQColor m_pointerColor;
int m_pointerWidth;
- QPen m_pointerPen;
+ TQPen m_pointerPen;
- QRect m_tmpRect;
- QColor m_tmpRectFill;
- QPoint m_splitLinePos;
+ TQRect m_tmpRect;
+ TQColor m_tmpRectFill;
+ TQPoint m_splitLinePos;
- QColor m_trackDividerColor;
+ TQColor m_trackDividerColor;
bool m_drawGuides;
- QColor m_guideColor;
+ TQColor m_guideColor;
int m_topGuidePos;
int m_foreGuidePos;
bool m_drawSelectionRect;
- QRect m_selectionRect;
+ TQRect m_selectionRect;
bool m_drawTextFloat;
- QString m_textFloatText;
- QPoint m_textFloatPos;
+ TQString m_textFloatText;
+ TQPoint m_textFloatPos;
- QPixmap m_segmentsDrawBuffer;
- QPixmap m_artifactsDrawBuffer;
- QRect m_segmentsDrawBufferRefresh;
- QRect m_artifactsDrawBufferRefresh;
+ TQPixmap m_segmentsDrawBuffer;
+ TQPixmap m_artifactsDrawBuffer;
+ TQRect m_segmentsDrawBufferRefresh;
+ TQRect m_artifactsDrawBufferRefresh;
int m_lastBufferRefreshX;
int m_lastBufferRefreshY;
int m_lastPointerRefreshX;
- QPixmap m_backgroundPixmap;
+ TQPixmap m_backgroundPixmap;
- QString m_toolContextHelp;
+ TQString m_toolContextHelp;
bool m_contextHelpShown;
mutable CompositionModel::AudioPreviewDrawData m_audioPreviewRects;
diff --git a/src/gui/editors/segment/segmentcanvas/PreviewRect.cpp b/src/gui/editors/segment/segmentcanvas/PreviewRect.cpp
index fa09644..659a9de 100644
--- a/src/gui/editors/segment/segmentcanvas/PreviewRect.cpp
+++ b/src/gui/editors/segment/segmentcanvas/PreviewRect.cpp
@@ -25,8 +25,8 @@
#include "PreviewRect.h"
-#include <qcolor.h>
-#include <qrect.h>
+#include <tqcolor.h>
+#include <tqrect.h>
namespace Rosegarden
diff --git a/src/gui/editors/segment/segmentcanvas/PreviewRect.h b/src/gui/editors/segment/segmentcanvas/PreviewRect.h
index 59f3113..1e4bc76 100644
--- a/src/gui/editors/segment/segmentcanvas/PreviewRect.h
+++ b/src/gui/editors/segment/segmentcanvas/PreviewRect.h
@@ -26,8 +26,8 @@
#ifndef _RG_PREVIEWRECT_H_
#define _RG_PREVIEWRECT_H_
-#include <qcolor.h>
-#include <qrect.h>
+#include <tqcolor.h>
+#include <tqrect.h>
#include <vector>
@@ -38,22 +38,22 @@ namespace Rosegarden
-class PreviewRect : public QRect {
+class PreviewRect : public TQRect {
public:
PreviewRect(int left, int top, int width, int height) :
- QRect(left, top, width, height) {};
+ TQRect(left, top, width, height) {};
- PreviewRect(const QRect& r) :
- QRect(r) {};
+ PreviewRect(const TQRect& r) :
+ TQRect(r) {};
- const QColor& getColor() const { return m_color; }
- void setColor(QColor c) { m_color = c; }
+ const TQColor& getColor() const { return m_color; }
+ void setColor(TQColor c) { m_color = c; }
protected:
- QColor m_color;
+ TQColor m_color;
};
-typedef std::vector<QImage> PixmapArray;
+typedef std::vector<TQImage> PixmapArray;
diff --git a/src/gui/editors/segment/segmentcanvas/SegmentEraser.cpp b/src/gui/editors/segment/segmentcanvas/SegmentEraser.cpp
index 3d1e26f..f519c8a 100644
--- a/src/gui/editors/segment/segmentcanvas/SegmentEraser.cpp
+++ b/src/gui/editors/segment/segmentcanvas/SegmentEraser.cpp
@@ -34,8 +34,8 @@
#include "gui/general/RosegardenCanvasView.h"
#include "SegmentTool.h"
#include <kcommand.h>
-#include <qpoint.h>
-#include <qstring.h>
+#include <tqpoint.h>
+#include <tqstring.h>
#include <klocale.h>
@@ -54,12 +54,12 @@ void SegmentEraser::ready()
setBasicContextHelp();
}
-void SegmentEraser::handleMouseButtonPress(QMouseEvent *e)
+void SegmentEraser::handleMouseButtonPress(TQMouseEvent *e)
{
setCurrentItem(m_canvas->getFirstItemAt(e->pos()));
}
-void SegmentEraser::handleMouseButtonRelease(QMouseEvent*)
+void SegmentEraser::handleMouseButtonRelease(TQMouseEvent*)
{
if (m_currentItem) {
// no need to test the result, we know it's good (see handleMouseButtonPress)
@@ -71,7 +71,7 @@ void SegmentEraser::handleMouseButtonRelease(QMouseEvent*)
setCurrentItem(CompositionItem());
}
-int SegmentEraser::handleMouseMove(QMouseEvent*)
+int SegmentEraser::handleMouseMove(TQMouseEvent*)
{
setBasicContextHelp();
return RosegardenCanvasView::NoFollow;
@@ -82,7 +82,7 @@ void SegmentEraser::setBasicContextHelp()
setContextHelp(i18n("Click on a segment to delete it"));
}
-const QString SegmentEraser::ToolName = "segmenteraser";
+const TQString SegmentEraser::ToolName = "segmenteraser";
}
#include "SegmentEraser.moc"
diff --git a/src/gui/editors/segment/segmentcanvas/SegmentEraser.h b/src/gui/editors/segment/segmentcanvas/SegmentEraser.h
index f428c28..78165b9 100644
--- a/src/gui/editors/segment/segmentcanvas/SegmentEraser.h
+++ b/src/gui/editors/segment/segmentcanvas/SegmentEraser.h
@@ -27,10 +27,10 @@
#define _RG_SEGMENTERASER_H_
#include "SegmentTool.h"
-#include <qstring.h>
+#include <tqstring.h>
-class QMouseEvent;
+class TQMouseEvent;
namespace Rosegarden
@@ -50,11 +50,11 @@ public:
virtual void ready();
- virtual void handleMouseButtonPress(QMouseEvent*);
- virtual void handleMouseButtonRelease(QMouseEvent*);
- virtual int handleMouseMove(QMouseEvent*);
+ virtual void handleMouseButtonPress(TQMouseEvent*);
+ virtual void handleMouseButtonRelease(TQMouseEvent*);
+ virtual int handleMouseMove(TQMouseEvent*);
- static const QString ToolName;
+ static const TQString ToolName;
protected:
SegmentEraser(CompositionView*, RosegardenGUIDoc*);
diff --git a/src/gui/editors/segment/segmentcanvas/SegmentItemPreview.cpp b/src/gui/editors/segment/segmentcanvas/SegmentItemPreview.cpp
index f0c4598..3fb4e33 100644
--- a/src/gui/editors/segment/segmentcanvas/SegmentItemPreview.cpp
+++ b/src/gui/editors/segment/segmentcanvas/SegmentItemPreview.cpp
@@ -27,9 +27,9 @@
#include "base/RulerScale.h"
#include "base/Segment.h"
-#include <qpainter.h>
-#include <qrect.h>
-#include <qwmatrix.h>
+#include <tqpainter.h>
+#include <tqrect.h>
+#include <tqwmatrix.h>
namespace Rosegarden
diff --git a/src/gui/editors/segment/segmentcanvas/SegmentItemPreview.h b/src/gui/editors/segment/segmentcanvas/SegmentItemPreview.h
index e190a5c..d1bb9a7 100644
--- a/src/gui/editors/segment/segmentcanvas/SegmentItemPreview.h
+++ b/src/gui/editors/segment/segmentcanvas/SegmentItemPreview.h
@@ -26,11 +26,11 @@
#ifndef _RG_SEGMENTITEMPREVIEW_H_
#define _RG_SEGMENTITEMPREVIEW_H_
-#include <qrect.h>
+#include <tqrect.h>
-class QWMatrix;
-class QPainter;
+class TQWMatrix;
+class TQPainter;
namespace Rosegarden
@@ -54,7 +54,7 @@ public:
PreviewCurrent
};
- virtual void drawShape(QPainter&) = 0;
+ virtual void drawShape(TQPainter&) = 0;
PreviewState getPreviewState() const { return m_previewState; }
@@ -71,10 +71,10 @@ public:
*/
virtual void clearPreview() = 0;
- QRect rect();
+ TQRect rect();
protected:
- virtual void updatePreview(const QWMatrix &matrix) = 0;
+ virtual void updatePreview(const TQWMatrix &matrix) = 0;
//--------------- Data members ---------------------------------
diff --git a/src/gui/editors/segment/segmentcanvas/SegmentJoiner.cpp b/src/gui/editors/segment/segmentcanvas/SegmentJoiner.cpp
index 5129202..71a3ca3 100644
--- a/src/gui/editors/segment/segmentcanvas/SegmentJoiner.cpp
+++ b/src/gui/editors/segment/segmentcanvas/SegmentJoiner.cpp
@@ -32,8 +32,8 @@
#include "gui/general/RosegardenCanvasView.h"
#include "SegmentTool.h"
#include <kcommand.h>
-#include <qpoint.h>
-#include <qstring.h>
+#include <tqpoint.h>
+#include <tqstring.h>
#include <klocale.h>
@@ -50,24 +50,24 @@ SegmentJoiner::~SegmentJoiner()
{}
void
-SegmentJoiner::handleMouseButtonPress(QMouseEvent*)
+SegmentJoiner::handleMouseButtonPress(TQMouseEvent*)
{}
void
-SegmentJoiner::handleMouseButtonRelease(QMouseEvent*)
+SegmentJoiner::handleMouseButtonRelease(TQMouseEvent*)
{}
int
-SegmentJoiner::handleMouseMove(QMouseEvent*)
+SegmentJoiner::handleMouseMove(TQMouseEvent*)
{
return RosegardenCanvasView::NoFollow;
}
void
-SegmentJoiner::contentsMouseDoubleClickEvent(QMouseEvent*)
+SegmentJoiner::contentsMouseDoubleClickEvent(TQMouseEvent*)
{}
-const QString SegmentJoiner::ToolName = "segmentjoiner";
+const TQString SegmentJoiner::ToolName = "segmentjoiner";
}
#include "SegmentJoiner.moc"
diff --git a/src/gui/editors/segment/segmentcanvas/SegmentJoiner.h b/src/gui/editors/segment/segmentcanvas/SegmentJoiner.h
index 2c83a26..946edee 100644
--- a/src/gui/editors/segment/segmentcanvas/SegmentJoiner.h
+++ b/src/gui/editors/segment/segmentcanvas/SegmentJoiner.h
@@ -27,10 +27,10 @@
#define _RG_SEGMENTJOINER_H_
#include "SegmentTool.h"
-#include <qstring.h>
+#include <tqstring.h>
-class QMouseEvent;
+class TQMouseEvent;
namespace Rosegarden
@@ -50,14 +50,14 @@ public:
virtual ~SegmentJoiner();
- virtual void handleMouseButtonPress(QMouseEvent*);
- virtual void handleMouseButtonRelease(QMouseEvent*);
- virtual int handleMouseMove(QMouseEvent*);
+ virtual void handleMouseButtonPress(TQMouseEvent*);
+ virtual void handleMouseButtonRelease(TQMouseEvent*);
+ virtual int handleMouseMove(TQMouseEvent*);
// don't do double clicks
- virtual void contentsMouseDoubleClickEvent(QMouseEvent*);
+ virtual void contentsMouseDoubleClickEvent(TQMouseEvent*);
- static const QString ToolName;
+ static const TQString ToolName;
protected:
SegmentJoiner(CompositionView*, RosegardenGUIDoc*);
diff --git a/src/gui/editors/segment/segmentcanvas/SegmentMover.cpp b/src/gui/editors/segment/segmentcanvas/SegmentMover.cpp
index a3d2a59..bc621fe 100644
--- a/src/gui/editors/segment/segmentcanvas/SegmentMover.cpp
+++ b/src/gui/editors/segment/segmentcanvas/SegmentMover.cpp
@@ -43,11 +43,11 @@
#include "SegmentToolBox.h"
#include "SegmentSelector.h"
#include <kcommand.h>
-#include <qcursor.h>
-#include <qevent.h>
-#include <qpoint.h>
-#include <qrect.h>
-#include <qstring.h>
+#include <tqcursor.h>
+#include <tqevent.h>
+#include <tqpoint.h>
+#include <tqrect.h>
+#include <tqstring.h>
#include <klocale.h>
@@ -63,26 +63,26 @@ SegmentMover::SegmentMover(CompositionView *c, RosegardenGUIDoc *d)
void SegmentMover::ready()
{
m_canvas->viewport()->setCursor(Qt::sizeAllCursor);
- connect(m_canvas, SIGNAL(contentsMoving (int, int)),
- this, SLOT(slotCanvasScrolled(int, int)));
+ connect(m_canvas, TQT_SIGNAL(contentsMoving (int, int)),
+ this, TQT_SLOT(slotCanvasScrolled(int, int)));
setBasicContextHelp();
}
void SegmentMover::stow()
{
- disconnect(m_canvas, SIGNAL(contentsMoving (int, int)),
- this, SLOT(slotCanvasScrolled(int, int)));
+ disconnect(m_canvas, TQT_SIGNAL(contentsMoving (int, int)),
+ this, TQT_SLOT(slotCanvasScrolled(int, int)));
}
void SegmentMover::slotCanvasScrolled(int newX, int newY)
{
- QMouseEvent tmpEvent(QEvent::MouseMove,
- m_canvas->viewport()->mapFromGlobal(QCursor::pos()) + QPoint(newX, newY),
+ TQMouseEvent tmpEvent(TQEvent::MouseMove,
+ m_canvas->viewport()->mapFromGlobal(TQCursor::pos()) + TQPoint(newX, newY),
Qt::NoButton, Qt::NoButton);
handleMouseMove(&tmpEvent);
}
-void SegmentMover::handleMouseButtonPress(QMouseEvent *e)
+void SegmentMover::handleMouseButtonPress(TQMouseEvent *e)
{
CompositionItem item = m_canvas->getFirstItemAt(e->pos());
SegmentSelector* selector = dynamic_cast<SegmentSelector*>
@@ -141,7 +141,7 @@ void SegmentMover::handleMouseButtonPress(QMouseEvent *e)
}
-void SegmentMover::handleMouseButtonRelease(QMouseEvent *e)
+void SegmentMover::handleMouseButtonRelease(TQMouseEvent *e)
{
Composition &comp = m_doc->getComposition();
@@ -214,7 +214,7 @@ void SegmentMover::handleMouseButtonRelease(QMouseEvent *e)
setBasicContextHelp();
}
-int SegmentMover::handleMouseMove(QMouseEvent *e)
+int SegmentMover::handleMouseMove(TQMouseEvent *e)
{
m_canvas->setSnapGrain(true);
@@ -239,7 +239,7 @@ int SegmentMover::handleMouseMove(QMouseEvent *e)
CompositionModel::itemcontainer::iterator it;
int guideX = 0;
int guideY = 0;
- QRect updateRect;
+ TQRect updateRect;
for (it = changingItems.begin();
it != changingItems.end();
@@ -321,13 +321,13 @@ int SegmentMover::handleMouseMove(QMouseEvent *e)
timeT currentItemStartTime = m_canvas->grid().snapX(m_currentItem->rect().x());
RealTime time = comp.getElapsedRealTime(currentItemStartTime);
- QString ms;
+ TQString ms;
ms.sprintf("%03d", time.msec());
int bar, beat, fraction, remainder;
comp.getMusicalTimeForAbsoluteTime(currentItemStartTime, bar, beat, fraction, remainder);
- QString posString = QString("%1.%2s (%3, %4, %5)")
+ TQString posString = TQString("%1.%2s (%3, %4, %5)")
.arg(time.sec).arg(ms)
.arg(bar + 1).arg(beat).arg(fraction);
@@ -342,7 +342,7 @@ void SegmentMover::setBasicContextHelp()
setContextHelp(i18n("Click and drag to move a segment"));
}
-const QString SegmentMover::ToolName = "segmentmover";
+const TQString SegmentMover::ToolName = "segmentmover";
}
#include "SegmentMover.moc"
diff --git a/src/gui/editors/segment/segmentcanvas/SegmentMover.h b/src/gui/editors/segment/segmentcanvas/SegmentMover.h
index 776189e..580fff0 100644
--- a/src/gui/editors/segment/segmentcanvas/SegmentMover.h
+++ b/src/gui/editors/segment/segmentcanvas/SegmentMover.h
@@ -27,11 +27,11 @@
#define _RG_SEGMENTMOVER_H_
#include "SegmentTool.h"
-#include <qpoint.h>
-#include <qstring.h>
+#include <tqpoint.h>
+#include <tqstring.h>
-class QMouseEvent;
+class TQMouseEvent;
namespace Rosegarden
@@ -52,11 +52,11 @@ public:
virtual void ready();
virtual void stow();
- virtual void handleMouseButtonPress(QMouseEvent*);
- virtual void handleMouseButtonRelease(QMouseEvent*);
- virtual int handleMouseMove(QMouseEvent*);
+ virtual void handleMouseButtonPress(TQMouseEvent*);
+ virtual void handleMouseButtonRelease(TQMouseEvent*);
+ virtual int handleMouseMove(TQMouseEvent*);
- static const QString ToolName;
+ static const TQString ToolName;
protected slots:
void slotCanvasScrolled(int newX, int newY);
@@ -68,7 +68,7 @@ protected:
//--------------- Data members ---------------------------------
- QPoint m_clickPoint;
+ TQPoint m_clickPoint;
bool m_passedInertiaEdge;
};
diff --git a/src/gui/editors/segment/segmentcanvas/SegmentPencil.cpp b/src/gui/editors/segment/segmentcanvas/SegmentPencil.cpp
index 68ca020..60a74f4 100644
--- a/src/gui/editors/segment/segmentcanvas/SegmentPencil.cpp
+++ b/src/gui/editors/segment/segmentcanvas/SegmentPencil.cpp
@@ -42,11 +42,11 @@
#include "SegmentTool.h"
#include <kcommand.h>
#include <klocale.h>
-#include <qcursor.h>
-#include <qevent.h>
-#include <qpoint.h>
-#include <qrect.h>
-#include <qstring.h>
+#include <tqcursor.h>
+#include <tqevent.h>
+#include <tqpoint.h>
+#include <tqrect.h>
+#include <tqstring.h>
namespace Rosegarden
@@ -65,26 +65,26 @@ SegmentPencil::SegmentPencil(CompositionView *c, RosegardenGUIDoc *d)
void SegmentPencil::ready()
{
m_canvas->viewport()->setCursor(Qt::ibeamCursor);
- connect(m_canvas, SIGNAL(contentsMoving (int, int)),
- this, SLOT(slotCanvasScrolled(int, int)));
- setContextHelpFor(QPoint(0, 0));
+ connect(m_canvas, TQT_SIGNAL(contentsMoving (int, int)),
+ this, TQT_SLOT(slotCanvasScrolled(int, int)));
+ setContextHelpFor(TQPoint(0, 0));
}
void SegmentPencil::stow()
{
- disconnect(m_canvas, SIGNAL(contentsMoving (int, int)),
- this, SLOT(slotCanvasScrolled(int, int)));
+ disconnect(m_canvas, TQT_SIGNAL(contentsMoving (int, int)),
+ this, TQT_SLOT(slotCanvasScrolled(int, int)));
}
void SegmentPencil::slotCanvasScrolled(int newX, int newY)
{
- QMouseEvent tmpEvent(QEvent::MouseMove,
- m_canvas->viewport()->mapFromGlobal(QCursor::pos()) + QPoint(newX, newY),
+ TQMouseEvent tmpEvent(TQEvent::MouseMove,
+ m_canvas->viewport()->mapFromGlobal(TQCursor::pos()) + TQPoint(newX, newY),
Qt::NoButton, Qt::NoButton);
handleMouseMove(&tmpEvent);
}
-void SegmentPencil::handleMouseButtonPress(QMouseEvent *e)
+void SegmentPencil::handleMouseButtonPress(TQMouseEvent *e)
{
if (e->button() == RightButton)
return;
@@ -134,7 +134,7 @@ void SegmentPencil::handleMouseButtonPress(QMouseEvent *e)
.getMaxContemporaneousSegmentsOnTrack(trackId);
if (multiple < 1) multiple = 1;
- QRect tmpRect;
+ TQRect tmpRect;
tmpRect.setX(int(nearbyint(m_canvas->grid().getRulerScale()->getXForTime(time))));
tmpRect.setY(m_canvas->grid().getYBinCoordinate(trackPosition) + 1);
tmpRect.setHeight(m_canvas->grid().getYSnap() * multiple - 2);
@@ -151,7 +151,7 @@ void SegmentPencil::handleMouseButtonPress(QMouseEvent *e)
m_canvas->updateContents(tmpRect);
}
-void SegmentPencil::handleMouseButtonRelease(QMouseEvent* e)
+void SegmentPencil::handleMouseButtonRelease(TQMouseEvent* e)
{
if (e->button() == RightButton)
return ;
@@ -160,7 +160,7 @@ void SegmentPencil::handleMouseButtonRelease(QMouseEvent* e)
if (m_newRect) {
- QRect tmpRect = m_canvas->getTmpRect();
+ TQRect tmpRect = m_canvas->getTmpRect();
int trackPosition = m_canvas->grid().getYBin(tmpRect.y());
Track *track = m_doc->getComposition().getTrackByPosition(trackPosition);
@@ -205,7 +205,7 @@ void SegmentPencil::handleMouseButtonRelease(QMouseEvent* e)
m_canvas->getModel()->clearSelected();
m_canvas->getModel()->setSelected(item);
m_canvas->getModel()->signalSelection();
- m_canvas->setTmpRect(QRect());
+ m_canvas->setTmpRect(TQRect());
m_canvas->slotUpdateSegmentsDrawBuffer();
} else {
@@ -214,7 +214,7 @@ void SegmentPencil::handleMouseButtonRelease(QMouseEvent* e)
}
}
-int SegmentPencil::handleMouseMove(QMouseEvent *e)
+int SegmentPencil::handleMouseMove(TQMouseEvent *e)
{
if (!m_newRect) {
setContextHelpFor(e->pos());
@@ -227,8 +227,8 @@ int SegmentPencil::handleMouseMove(QMouseEvent *e)
clearContextHelp();
}
- QRect tmpRect = m_canvas->getTmpRect();
- QRect oldTmpRect = tmpRect;
+ TQRect tmpRect = m_canvas->getTmpRect();
+ TQRect oldTmpRect = tmpRect;
m_canvas->setSnapGrain(false);
@@ -271,7 +271,7 @@ int SegmentPencil::handleMouseMove(QMouseEvent *e)
return RosegardenCanvasView::FollowHorizontal;
}
-void SegmentPencil::setContextHelpFor(QPoint p)
+void SegmentPencil::setContextHelpFor(TQPoint p)
{
int trackPosition = m_canvas->grid().getYBin(p.y());
@@ -289,7 +289,7 @@ void SegmentPencil::setContextHelpFor(QPoint p)
setContextHelp(i18n("Click and drag to draw an empty segment. Control+Alt click and drag to draw in overlap mode."));
}
-const QString SegmentPencil::ToolName = "segmentpencil";
+const TQString SegmentPencil::ToolName = "segmentpencil";
}
#include "SegmentPencil.moc"
diff --git a/src/gui/editors/segment/segmentcanvas/SegmentPencil.h b/src/gui/editors/segment/segmentcanvas/SegmentPencil.h
index 8b55917..f283f15 100644
--- a/src/gui/editors/segment/segmentcanvas/SegmentPencil.h
+++ b/src/gui/editors/segment/segmentcanvas/SegmentPencil.h
@@ -28,11 +28,11 @@
#include "base/Track.h"
#include "SegmentTool.h"
-#include <qstring.h>
+#include <tqstring.h>
#include "base/Event.h"
-class QMouseEvent;
+class TQMouseEvent;
namespace Rosegarden
@@ -56,18 +56,18 @@ public:
virtual void ready();
virtual void stow();
- virtual void handleMouseButtonPress(QMouseEvent*);
- virtual void handleMouseButtonRelease(QMouseEvent*);
- virtual int handleMouseMove(QMouseEvent*);
+ virtual void handleMouseButtonPress(TQMouseEvent*);
+ virtual void handleMouseButtonRelease(TQMouseEvent*);
+ virtual int handleMouseMove(TQMouseEvent*);
- static const QString ToolName;
+ static const TQString ToolName;
protected slots:
void slotCanvasScrolled(int newX, int newY);
protected:
SegmentPencil(CompositionView*, RosegardenGUIDoc*);
- void setContextHelpFor(QPoint p);
+ void setContextHelpFor(TQPoint p);
//--------------- Data members ---------------------------------
diff --git a/src/gui/editors/segment/segmentcanvas/SegmentResizer.cpp b/src/gui/editors/segment/segmentcanvas/SegmentResizer.cpp
index 6ae7433..99241f1 100644
--- a/src/gui/editors/segment/segmentcanvas/SegmentResizer.cpp
+++ b/src/gui/editors/segment/segmentcanvas/SegmentResizer.cpp
@@ -49,11 +49,11 @@
#include "SegmentTool.h"
#include <kcommand.h>
#include <kmessagebox.h>
-#include <qcursor.h>
-#include <qevent.h>
-#include <qpoint.h>
-#include <qrect.h>
-#include <qstring.h>
+#include <tqcursor.h>
+#include <tqevent.h>
+#include <tqpoint.h>
+#include <tqrect.h>
+#include <tqstring.h>
namespace Rosegarden
@@ -70,26 +70,26 @@ SegmentResizer::SegmentResizer(CompositionView *c, RosegardenGUIDoc *d,
void SegmentResizer::ready()
{
m_canvas->viewport()->setCursor(Qt::sizeHorCursor);
- connect(m_canvas, SIGNAL(contentsMoving (int, int)),
- this, SLOT(slotCanvasScrolled(int, int)));
+ connect(m_canvas, TQT_SIGNAL(contentsMoving (int, int)),
+ this, TQT_SLOT(slotCanvasScrolled(int, int)));
setBasicContextHelp(false);
}
void SegmentResizer::stow()
{
- disconnect(m_canvas, SIGNAL(contentsMoving (int, int)),
- this, SLOT(slotCanvasScrolled(int, int)));
+ disconnect(m_canvas, TQT_SIGNAL(contentsMoving (int, int)),
+ this, TQT_SLOT(slotCanvasScrolled(int, int)));
}
void SegmentResizer::slotCanvasScrolled(int newX, int newY)
{
- QMouseEvent tmpEvent(QEvent::MouseMove,
- m_canvas->viewport()->mapFromGlobal(QCursor::pos()) + QPoint(newX, newY),
+ TQMouseEvent tmpEvent(TQEvent::MouseMove,
+ m_canvas->viewport()->mapFromGlobal(TQCursor::pos()) + TQPoint(newX, newY),
Qt::NoButton, Qt::NoButton);
handleMouseMove(&tmpEvent);
}
-void SegmentResizer::handleMouseButtonPress(QMouseEvent *e)
+void SegmentResizer::handleMouseButtonPress(TQMouseEvent *e)
{
RG_DEBUG << "SegmentResizer::handleMouseButtonPress" << endl;
m_canvas->getModel()->clearSelected();
@@ -112,7 +112,7 @@ void SegmentResizer::handleMouseButtonPress(QMouseEvent *e)
}
}
-void SegmentResizer::handleMouseButtonRelease(QMouseEvent *e)
+void SegmentResizer::handleMouseButtonRelease(TQMouseEvent *e)
{
RG_DEBUG << "SegmentResizer::handleMouseButtonRelease" << endl;
@@ -179,10 +179,10 @@ void SegmentResizer::handleMouseButtonRelease(QMouseEvent *e)
progressDlg.setLabel(i18n("Generating audio preview..."));
command->disconnectProgressDialog(&progressDlg);
- connect(&m_doc->getAudioFileManager(), SIGNAL(setProgress(int)),
- progressDlg.progressBar(), SLOT(setValue(int)));
- connect(&progressDlg, SIGNAL(cancelClicked()),
- &m_doc->getAudioFileManager(), SLOT(slotStopPreview()));
+ connect(&m_doc->getAudioFileManager(), TQT_SIGNAL(setProgress(int)),
+ progressDlg.progressBar(), TQT_SLOT(setValue(int)));
+ connect(&progressDlg, TQT_SIGNAL(cancelClicked()),
+ &m_doc->getAudioFileManager(), TQT_SLOT(slotStopPreview()));
int fid = command->getNewAudioFileId();
if (fid >= 0) {
@@ -239,7 +239,7 @@ void SegmentResizer::handleMouseButtonRelease(QMouseEvent *e)
setBasicContextHelp();
}
-int SegmentResizer::handleMouseMove(QMouseEvent *e)
+int SegmentResizer::handleMouseMove(TQMouseEvent *e)
{
// RG_DEBUG << "SegmentResizer::handleMouseMove" << endl;
@@ -278,7 +278,7 @@ int SegmentResizer::handleMouseMove(QMouseEvent *e)
}
*/
- QRect oldRect = m_currentItem->rect();
+ TQRect oldRect = m_currentItem->rect();
m_canvas->setSnapGrain(true);
@@ -364,7 +364,7 @@ int SegmentResizer::handleMouseMove(QMouseEvent *e)
return RosegardenCanvasView::FollowHorizontal;
}
-bool SegmentResizer::cursorIsCloseEnoughToEdge(const CompositionItem& p, const QPoint &coord,
+bool SegmentResizer::cursorIsCloseEnoughToEdge(const CompositionItem& p, const TQPoint &coord,
int edgeThreshold, bool &start)
{
if (abs(p->rect().x() + p->rect().width() - coord.x()) < edgeThreshold) {
@@ -387,7 +387,7 @@ void SegmentResizer::setBasicContextHelp(bool ctrlPressed)
}
}
-const QString SegmentResizer::ToolName = "segmentresizer";
+const TQString SegmentResizer::ToolName = "segmentresizer";
}
#include "SegmentResizer.moc"
diff --git a/src/gui/editors/segment/segmentcanvas/SegmentResizer.h b/src/gui/editors/segment/segmentcanvas/SegmentResizer.h
index 9d54573..7a0600d 100644
--- a/src/gui/editors/segment/segmentcanvas/SegmentResizer.h
+++ b/src/gui/editors/segment/segmentcanvas/SegmentResizer.h
@@ -27,11 +27,11 @@
#define _RG_SEGMENTRESIZER_H_
#include "SegmentTool.h"
-#include <qstring.h>
+#include <tqstring.h>
-class QPoint;
-class QMouseEvent;
+class TQPoint;
+class TQMouseEvent;
class CompositionItem;
@@ -57,16 +57,16 @@ public:
virtual void ready();
virtual void stow();
- virtual void handleMouseButtonPress(QMouseEvent*);
- virtual void handleMouseButtonRelease(QMouseEvent*);
- virtual int handleMouseMove(QMouseEvent*);
+ virtual void handleMouseButtonPress(TQMouseEvent*);
+ virtual void handleMouseButtonRelease(TQMouseEvent*);
+ virtual int handleMouseMove(TQMouseEvent*);
- static bool cursorIsCloseEnoughToEdge(const CompositionItem&, const QPoint&, int, bool &);
+ static bool cursorIsCloseEnoughToEdge(const CompositionItem&, const TQPoint&, int, bool &);
void setEdgeThreshold(int e) { m_edgeThreshold = e; }
int getEdgeThreshold() { return m_edgeThreshold; }
- static const QString ToolName;
+ static const TQString ToolName;
protected slots:
void slotCanvasScrolled(int newX, int newY);
diff --git a/src/gui/editors/segment/segmentcanvas/SegmentSelector.cpp b/src/gui/editors/segment/segmentcanvas/SegmentSelector.cpp
index 35ec639..d601c16 100644
--- a/src/gui/editors/segment/segmentcanvas/SegmentSelector.cpp
+++ b/src/gui/editors/segment/segmentcanvas/SegmentSelector.cpp
@@ -48,11 +48,11 @@
#include "SegmentToolBox.h"
#include <kapplication.h>
#include <kconfig.h>
-#include <qcursor.h>
-#include <qevent.h>
-#include <qpoint.h>
-#include <qrect.h>
-#include <qstring.h>
+#include <tqcursor.h>
+#include <tqevent.h>
+#include <tqpoint.h>
+#include <tqrect.h>
+#include <tqstring.h>
namespace Rosegarden
@@ -76,8 +76,8 @@ SegmentSelector::~SegmentSelector()
void SegmentSelector::ready()
{
m_canvas->viewport()->setCursor(Qt::arrowCursor);
- connect(m_canvas, SIGNAL(contentsMoving (int, int)),
- this, SLOT(slotCanvasScrolled(int, int)));
+ connect(m_canvas, TQT_SIGNAL(contentsMoving (int, int)),
+ this, TQT_SLOT(slotCanvasScrolled(int, int)));
setContextHelp(i18n("Click and drag to select segments"));
}
@@ -86,14 +86,14 @@ void SegmentSelector::stow()
void SegmentSelector::slotCanvasScrolled(int newX, int newY)
{
- QMouseEvent tmpEvent(QEvent::MouseMove,
- m_canvas->viewport()->mapFromGlobal(QCursor::pos()) + QPoint(newX, newY),
+ TQMouseEvent tmpEvent(TQEvent::MouseMove,
+ m_canvas->viewport()->mapFromGlobal(TQCursor::pos()) + TQPoint(newX, newY),
Qt::NoButton, Qt::NoButton);
handleMouseMove(&tmpEvent);
}
void
-SegmentSelector::handleMouseButtonPress(QMouseEvent *e)
+SegmentSelector::handleMouseButtonPress(TQMouseEvent *e)
{
RG_DEBUG << "SegmentSelector::handleMouseButtonPress\n";
m_buttonPressed = true;
@@ -205,7 +205,7 @@ SegmentSelector::handleMouseButtonPress(QMouseEvent *e)
}
void
-SegmentSelector::handleMouseButtonRelease(QMouseEvent *e)
+SegmentSelector::handleMouseButtonRelease(TQMouseEvent *e)
{
m_buttonPressed = false;
@@ -310,7 +310,7 @@ SegmentSelector::handleMouseButtonRelease(QMouseEvent *e)
}
int
-SegmentSelector::handleMouseMove(QMouseEvent *e)
+SegmentSelector::handleMouseMove(TQMouseEvent *e)
{
if (!m_buttonPressed) {
setContextHelpFor(e->pos(), (e->state() & Qt::ControlButton));
@@ -328,7 +328,7 @@ SegmentSelector::handleMouseMove(QMouseEvent *e)
// RG_DEBUG << "SegmentSelector::handleMouseMove: no current item\n";
// do a bounding box
- QRect selectionRect = m_canvas->getSelectionRect();
+ TQRect selectionRect = m_canvas->getSelectionRect();
m_canvas->setDrawSelectionRect(true);
@@ -459,13 +459,13 @@ SegmentSelector::handleMouseMove(QMouseEvent *e)
timeT currentItemStartTime = m_canvas->grid().snapX(m_currentItem->rect().x());
RealTime time = comp.getElapsedRealTime(currentItemStartTime);
- QString ms;
+ TQString ms;
ms.sprintf("%03d", time.msec());
int bar, beat, fraction, remainder;
comp.getMusicalTimeForAbsoluteTime(currentItemStartTime, bar, beat, fraction, remainder);
- QString posString = QString("%1.%2s (%3, %4, %5)")
+ TQString posString = TQString("%1.%2s (%3, %4, %5)")
.arg(time.sec).arg(ms)
.arg(bar + 1).arg(beat).arg(fraction);
@@ -479,7 +479,7 @@ SegmentSelector::handleMouseMove(QMouseEvent *e)
return RosegardenCanvasView::FollowHorizontal | RosegardenCanvasView::FollowVertical;
}
-void SegmentSelector::setContextHelpFor(QPoint p, bool ctrlPressed)
+void SegmentSelector::setContextHelpFor(TQPoint p, bool ctrlPressed)
{
kapp->config()->setGroup(GeneralOptionsConfigGroup);
if (!kapp->config()->readBoolEntry("toolcontexthelp", true)) return;
@@ -526,7 +526,7 @@ void SegmentSelector::setContextHelpFor(QPoint p, bool ctrlPressed)
}
}
-const QString SegmentSelector::ToolName = "segmentselector";
+const TQString SegmentSelector::ToolName = "segmentselector";
}
#include "SegmentSelector.moc"
diff --git a/src/gui/editors/segment/segmentcanvas/SegmentSelector.h b/src/gui/editors/segment/segmentcanvas/SegmentSelector.h
index a6d8d9c..3c602fa 100644
--- a/src/gui/editors/segment/segmentcanvas/SegmentSelector.h
+++ b/src/gui/editors/segment/segmentcanvas/SegmentSelector.h
@@ -27,11 +27,11 @@
#define _RG_SEGMENTSELECTOR_H_
#include "SegmentTool.h"
-#include <qpoint.h>
-#include <qstring.h>
+#include <tqpoint.h>
+#include <tqstring.h>
-class QMouseEvent;
+class TQMouseEvent;
namespace Rosegarden
@@ -55,9 +55,9 @@ public:
virtual void ready();
virtual void stow();
- virtual void handleMouseButtonPress(QMouseEvent*);
- virtual void handleMouseButtonRelease(QMouseEvent*);
- virtual int handleMouseMove(QMouseEvent*);
+ virtual void handleMouseButtonPress(TQMouseEvent*);
+ virtual void handleMouseButtonRelease(TQMouseEvent*);
+ virtual int handleMouseMove(TQMouseEvent*);
// These two alter the behaviour of the selection mode
//
@@ -77,7 +77,7 @@ public:
//
SegmentItemList* getSegmentItemList() { return &m_selectedItems; }
- static const QString ToolName;
+ static const TQString ToolName;
protected slots:
void slotCanvasScrolled(int newX, int newY);
@@ -85,7 +85,7 @@ protected slots:
protected:
SegmentSelector(CompositionView*, RosegardenGUIDoc*);
- void setContextHelpFor(QPoint p, bool ctrlPressed = false);
+ void setContextHelpFor(TQPoint p, bool ctrlPressed = false);
//--------------- Data members ---------------------------------
@@ -93,7 +93,7 @@ protected:
bool m_segmentAddMode;
bool m_segmentCopyMode;
- QPoint m_clickPoint;
+ TQPoint m_clickPoint;
bool m_segmentQuickCopyDone;
bool m_passedInertiaEdge;
bool m_buttonPressed;
diff --git a/src/gui/editors/segment/segmentcanvas/SegmentSplitter.cpp b/src/gui/editors/segment/segmentcanvas/SegmentSplitter.cpp
index 4fd48c3..1149cd9 100644
--- a/src/gui/editors/segment/segmentcanvas/SegmentSplitter.cpp
+++ b/src/gui/editors/segment/segmentcanvas/SegmentSplitter.cpp
@@ -37,9 +37,9 @@
#include "gui/general/RosegardenCanvasView.h"
#include "SegmentTool.h"
#include <kcommand.h>
-#include <qpoint.h>
-#include <qrect.h>
-#include <qstring.h>
+#include <tqpoint.h>
+#include <tqrect.h>
+#include <tqstring.h>
#include <klocale.h>
@@ -64,7 +64,7 @@ void SegmentSplitter::ready()
}
void
-SegmentSplitter::handleMouseButtonPress(QMouseEvent *e)
+SegmentSplitter::handleMouseButtonPress(TQMouseEvent *e)
{
// Remove cursor and replace with line on a SegmentItem
// at where the cut will be made
@@ -81,7 +81,7 @@ SegmentSplitter::handleMouseButtonPress(QMouseEvent *e)
}
void
-SegmentSplitter::handleMouseButtonRelease(QMouseEvent *e)
+SegmentSplitter::handleMouseButtonRelease(TQMouseEvent *e)
{
setBasicContextHelp();
@@ -111,7 +111,7 @@ SegmentSplitter::handleMouseButtonRelease(QMouseEvent *e)
}
int
-SegmentSplitter::handleMouseMove(QMouseEvent *e)
+SegmentSplitter::handleMouseMove(TQMouseEvent *e)
{
setBasicContextHelp();
@@ -130,7 +130,7 @@ SegmentSplitter::handleMouseMove(QMouseEvent *e)
}
void
-SegmentSplitter::drawSplitLine(QMouseEvent *e)
+SegmentSplitter::drawSplitLine(TQMouseEvent *e)
{
m_canvas->setSnapGrain(true);
@@ -146,7 +146,7 @@ SegmentSplitter::drawSplitLine(QMouseEvent *e)
m_canvas->slotShowSplitLine(x, y);
- QRect updateRect(std::max(0, std::min(x, m_prevX) - 5), y,
+ TQRect updateRect(std::max(0, std::min(x, m_prevX) - 5), y,
std::max(m_prevX, x) + 5, m_prevY + m_canvas->grid().getYSnap());
m_canvas->updateContents(updateRect);
m_prevX = x;
@@ -154,7 +154,7 @@ SegmentSplitter::drawSplitLine(QMouseEvent *e)
}
void
-SegmentSplitter::contentsMouseDoubleClickEvent(QMouseEvent*)
+SegmentSplitter::contentsMouseDoubleClickEvent(TQMouseEvent*)
{
// DO NOTHING
}
@@ -169,7 +169,7 @@ SegmentSplitter::setBasicContextHelp()
}
}
-const QString SegmentSplitter::ToolName = "segmentsplitter";
+const TQString SegmentSplitter::ToolName = "segmentsplitter";
}
#include "SegmentSplitter.moc"
diff --git a/src/gui/editors/segment/segmentcanvas/SegmentSplitter.h b/src/gui/editors/segment/segmentcanvas/SegmentSplitter.h
index 06201ec..3f21ece 100644
--- a/src/gui/editors/segment/segmentcanvas/SegmentSplitter.h
+++ b/src/gui/editors/segment/segmentcanvas/SegmentSplitter.h
@@ -27,11 +27,11 @@
#define _RG_SEGMENTSPLITTER_H_
#include "SegmentTool.h"
-#include <qstring.h>
+#include <tqstring.h>
#include "base/Event.h"
-class QMouseEvent;
+class TQMouseEvent;
namespace Rosegarden
@@ -54,21 +54,21 @@ public:
virtual void ready();
- virtual void handleMouseButtonPress(QMouseEvent*);
- virtual void handleMouseButtonRelease(QMouseEvent*);
- virtual int handleMouseMove(QMouseEvent*);
+ virtual void handleMouseButtonPress(TQMouseEvent*);
+ virtual void handleMouseButtonRelease(TQMouseEvent*);
+ virtual int handleMouseMove(TQMouseEvent*);
// don't do double clicks
- virtual void contentsMouseDoubleClickEvent(QMouseEvent*);
+ virtual void contentsMouseDoubleClickEvent(TQMouseEvent*);
- static const QString ToolName;
+ static const TQString ToolName;
protected:
SegmentSplitter(CompositionView*, RosegardenGUIDoc*);
void setBasicContextHelp();
- void drawSplitLine(QMouseEvent*);
+ void drawSplitLine(TQMouseEvent*);
void splitSegment(Segment *segment,
timeT &splitTime);
diff --git a/src/gui/editors/segment/segmentcanvas/SegmentTool.cpp b/src/gui/editors/segment/segmentcanvas/SegmentTool.cpp
index 9bd7e69..438cc51 100644
--- a/src/gui/editors/segment/segmentcanvas/SegmentTool.cpp
+++ b/src/gui/editors/segment/segmentcanvas/SegmentTool.cpp
@@ -34,8 +34,8 @@
#include "SegmentToolBox.h"
#include <kcommand.h>
#include <kmainwindow.h>
-#include <qpoint.h>
-#include <qpopupmenu.h>
+#include <tqpoint.h>
+#include <tqpopupmenu.h>
namespace Rosegarden
@@ -58,7 +58,7 @@ void SegmentTool::ready()
}
void
-SegmentTool::handleRightButtonPress(QMouseEvent *e)
+SegmentTool::handleRightButtonPress(TQMouseEvent *e)
{
if (m_currentItem) // mouse button is pressed for some tool
return ;
@@ -89,7 +89,7 @@ SegmentTool::createMenu()
dynamic_cast<RosegardenGUIApp*>(m_doc->parent());
if (app) {
- m_menu = static_cast<QPopupMenu*>
+ m_menu = static_cast<TQPopupMenu*>
//(app->factory()->container("segment_tool_menu", app));
(m_parentFactory->container("segment_tool_menu", app));
diff --git a/src/gui/editors/segment/segmentcanvas/SegmentTool.h b/src/gui/editors/segment/segmentcanvas/SegmentTool.h
index 90ed961..5b054a8 100644
--- a/src/gui/editors/segment/segmentcanvas/SegmentTool.h
+++ b/src/gui/editors/segment/segmentcanvas/SegmentTool.h
@@ -28,12 +28,12 @@
#include "gui/general/BaseTool.h"
#include "CompositionItem.h"
-#include <qpoint.h>
+#include <tqpoint.h>
#include <utility>
#include <vector>
-class QMouseEvent;
+class TQMouseEvent;
class KCommand;
@@ -53,7 +53,7 @@ class SegmentSelector;
// Allow the tools to share the Selector tool's selection
// through these.
//
-typedef std::pair<QPoint, CompositionItem> SegmentItemPair;
+typedef std::pair<TQPoint, CompositionItem> SegmentItemPair;
typedef std::vector<SegmentItemPair> SegmentItemList;
class SegmentTool : public BaseTool
@@ -70,10 +70,10 @@ public:
*/
virtual void ready();
- virtual void handleRightButtonPress(QMouseEvent*);
- virtual void handleMouseButtonPress(QMouseEvent*) = 0;
- virtual void handleMouseButtonRelease(QMouseEvent*) = 0;
- virtual int handleMouseMove(QMouseEvent*) = 0;
+ virtual void handleRightButtonPress(TQMouseEvent*);
+ virtual void handleMouseButtonPress(TQMouseEvent*) = 0;
+ virtual void handleMouseButtonRelease(TQMouseEvent*) = 0;
+ virtual int handleMouseMove(TQMouseEvent*) = 0;
void addCommandToHistory(KCommand *command);
@@ -95,7 +95,7 @@ protected:
CompositionView* m_canvas;
CompositionItem m_currentItem;
RosegardenGUIDoc* m_doc;
- QPoint m_origPos;
+ TQPoint m_origPos;
bool m_changeMade;
};
diff --git a/src/gui/editors/segment/segmentcanvas/SegmentToolBox.cpp b/src/gui/editors/segment/segmentcanvas/SegmentToolBox.cpp
index cb0dec9..5ce8a58 100644
--- a/src/gui/editors/segment/segmentcanvas/SegmentToolBox.cpp
+++ b/src/gui/editors/segment/segmentcanvas/SegmentToolBox.cpp
@@ -36,7 +36,7 @@
#include "SegmentPencil.h"
#include "SegmentResizer.h"
#include "SegmentSplitter.h"
-#include <qstring.h>
+#include <tqstring.h>
#include <kmessagebox.h>
namespace Rosegarden
@@ -48,11 +48,11 @@ SegmentToolBox::SegmentToolBox(CompositionView* parent, RosegardenGUIDoc* doc)
m_doc(doc)
{}
-SegmentTool* SegmentToolBox::createTool(const QString& toolName)
+SegmentTool* SegmentToolBox::createTool(const TQString& toolName)
{
SegmentTool* tool = 0;
- QString toolNamelc = toolName.lower();
+ TQString toolNamelc = toolName.lower();
if (toolNamelc == SegmentPencil::ToolName)
@@ -83,7 +83,7 @@ SegmentTool* SegmentToolBox::createTool(const QString& toolName)
tool = new SegmentJoiner(m_canvas, m_doc);
else {
- KMessageBox::error(0, QString("SegmentToolBox::createTool : unrecognised toolname %1 (%2)")
+ KMessageBox::error(0, TQString("SegmentToolBox::createTool : unrecognised toolname %1 (%2)")
.arg(toolName).arg(toolNamelc));
return 0;
}
@@ -93,7 +93,7 @@ SegmentTool* SegmentToolBox::createTool(const QString& toolName)
return tool;
}
-SegmentTool* SegmentToolBox::getTool(const QString& toolName)
+SegmentTool* SegmentToolBox::getTool(const TQString& toolName)
{
return dynamic_cast<SegmentTool*>(BaseToolBox::getTool(toolName));
}
diff --git a/src/gui/editors/segment/segmentcanvas/SegmentToolBox.h b/src/gui/editors/segment/segmentcanvas/SegmentToolBox.h
index 7a46fb6..2609708 100644
--- a/src/gui/editors/segment/segmentcanvas/SegmentToolBox.h
+++ b/src/gui/editors/segment/segmentcanvas/SegmentToolBox.h
@@ -30,7 +30,7 @@
#include "SegmentTool.h"
-class QString;
+class TQString;
namespace Rosegarden
@@ -46,10 +46,10 @@ class SegmentToolBox : public BaseToolBox
public:
SegmentToolBox(CompositionView* parent, RosegardenGUIDoc*);
- virtual SegmentTool* getTool(const QString& toolName);
+ virtual SegmentTool* getTool(const TQString& toolName);
protected:
- virtual SegmentTool* createTool(const QString& toolName);
+ virtual SegmentTool* createTool(const TQString& toolName);
//--------------- Data members ---------------------------------