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/AudioPreviewThread.h2
-rw-r--r--src/gui/editors/segment/segmentcanvas/AudioPreviewUpdater.cpp4
-rw-r--r--src/gui/editors/segment/segmentcanvas/AudioPreviewUpdater.h5
-rw-r--r--src/gui/editors/segment/segmentcanvas/CompositionItemHelper.cpp6
-rw-r--r--src/gui/editors/segment/segmentcanvas/CompositionItemImpl.cpp2
-rw-r--r--src/gui/editors/segment/segmentcanvas/CompositionModel.h1
-rw-r--r--src/gui/editors/segment/segmentcanvas/CompositionModelImpl.cpp10
-rw-r--r--src/gui/editors/segment/segmentcanvas/CompositionModelImpl.h1
-rw-r--r--src/gui/editors/segment/segmentcanvas/CompositionRect.cpp2
-rw-r--r--src/gui/editors/segment/segmentcanvas/CompositionRect.h2
-rw-r--r--src/gui/editors/segment/segmentcanvas/CompositionView.cpp72
-rw-r--r--src/gui/editors/segment/segmentcanvas/CompositionView.h3
-rw-r--r--src/gui/editors/segment/segmentcanvas/SegmentEraser.cpp2
-rw-r--r--src/gui/editors/segment/segmentcanvas/SegmentEraser.h1
-rw-r--r--src/gui/editors/segment/segmentcanvas/SegmentItemPreview.h4
-rw-r--r--src/gui/editors/segment/segmentcanvas/SegmentJoiner.h1
-rw-r--r--src/gui/editors/segment/segmentcanvas/SegmentMover.cpp6
-rw-r--r--src/gui/editors/segment/segmentcanvas/SegmentMover.h1
-rw-r--r--src/gui/editors/segment/segmentcanvas/SegmentPencil.cpp10
-rw-r--r--src/gui/editors/segment/segmentcanvas/SegmentPencil.h1
-rw-r--r--src/gui/editors/segment/segmentcanvas/SegmentResizer.cpp6
-rw-r--r--src/gui/editors/segment/segmentcanvas/SegmentResizer.h1
-rw-r--r--src/gui/editors/segment/segmentcanvas/SegmentSelector.cpp18
-rw-r--r--src/gui/editors/segment/segmentcanvas/SegmentSelector.h1
-rw-r--r--src/gui/editors/segment/segmentcanvas/SegmentSplitter.cpp10
-rw-r--r--src/gui/editors/segment/segmentcanvas/SegmentSplitter.h1
-rw-r--r--src/gui/editors/segment/segmentcanvas/SegmentTool.cpp8
-rw-r--r--src/gui/editors/segment/segmentcanvas/SegmentTool.h2
-rw-r--r--src/gui/editors/segment/segmentcanvas/SegmentToolBox.cpp8
-rw-r--r--src/gui/editors/segment/segmentcanvas/SegmentToolBox.h3
31 files changed, 108 insertions, 96 deletions
diff --git a/src/gui/editors/segment/segmentcanvas/AudioPreviewPainter.cpp b/src/gui/editors/segment/segmentcanvas/AudioPreviewPainter.cpp
index b0d3f3b..786e1a4 100644
--- a/src/gui/editors/segment/segmentcanvas/AudioPreviewPainter.cpp
+++ b/src/gui/editors/segment/segmentcanvas/AudioPreviewPainter.cpp
@@ -60,7 +60,7 @@ AudioPreviewPainter::AudioPreviewPainter(CompositionModelImpl& model,
m_image = TQImage(pixWidth, m_rect.height(), 8, 4);
m_image.setAlphaBuffer(true);
- m_penWidth = (std::max(1U, m_rect.getPen().width()) * 2);
+ m_penWidth = (std::max(1U, (uint)m_rect.getPen().width()) * 2);
m_halfRectHeight = m_model.grid().getYSnap()/2 - m_penWidth / 2 - 2;
}
@@ -276,7 +276,7 @@ void AudioPreviewPainter::paintPreviewImage()
m_segment->getStartTime()) -
m_model.grid().getRulerScale()->getXForTime(m_segment->getStartTime()));
- m_p.setPen(Qt::blue);
+ m_p.setPen(TQt::blue);
m_p.drawRect(0, m_apData->getSegmentRect().height() - 1, audioFadeInEnd, 1);
m_pb.drawRect(0, m_apData->getSegmentRect().height() - 1, audioFadeInEnd, 1);
}
@@ -291,15 +291,15 @@ void AudioPreviewPainter::finalizeCurrentSlice()
// RG_DEBUG << "AudioPreviewPainter::finalizeCurrentSlice : copying pixmap to image at " << m_sliceNb * tileWidth() << endl;
// transparent background
- m_image.setColor(0, qRgba(255, 255, 255, 0));
+ m_image.setColor(0, tqRgba(255, 255, 255, 0));
// foreground from computeSegmentPreviewColor
TQColor c = m_model.computeSegmentPreviewColor(m_segment);
- QRgb rgba = qRgba(c.red(), c.green(), c.blue(), 255);
+ TQRgb rgba = tqRgba(c.red(), c.green(), c.blue(), 255);
m_image.setColor(1, rgba);
// red for clipping
- m_image.setColor(2, qRgba(255, 0, 0, 255));
+ m_image.setColor(2, tqRgba(255, 0, 0, 255));
m_previewPixmaps.push_back(m_image.copy());
diff --git a/src/gui/editors/segment/segmentcanvas/AudioPreviewThread.h b/src/gui/editors/segment/segmentcanvas/AudioPreviewThread.h
index 0337346..2944b38 100644
--- a/src/gui/editors/segment/segmentcanvas/AudioPreviewThread.h
+++ b/src/gui/editors/segment/segmentcanvas/AudioPreviewThread.h
@@ -44,7 +44,7 @@ namespace Rosegarden
class AudioFileManager;
-class AudioPreviewThread : public QThread
+class AudioPreviewThread : public TQThread
{
public:
AudioPreviewThread(AudioFileManager *manager);
diff --git a/src/gui/editors/segment/segmentcanvas/AudioPreviewUpdater.cpp b/src/gui/editors/segment/segmentcanvas/AudioPreviewUpdater.cpp
index 182eb9b..1ae0acd 100644
--- a/src/gui/editors/segment/segmentcanvas/AudioPreviewUpdater.cpp
+++ b/src/gui/editors/segment/segmentcanvas/AudioPreviewUpdater.cpp
@@ -44,8 +44,8 @@ static int apuExtantCount = 0;
AudioPreviewUpdater::AudioPreviewUpdater(AudioPreviewThread &thread,
const Composition& c, const Segment* s,
const TQRect& r,
- CompositionModelImpl* parent)
- : TQObject(parent),
+ CompositionModelImpl* tqparent)
+ : TQObject(tqparent),
m_thread(thread),
m_composition(c),
m_segment(s),
diff --git a/src/gui/editors/segment/segmentcanvas/AudioPreviewUpdater.h b/src/gui/editors/segment/segmentcanvas/AudioPreviewUpdater.h
index 347ba16..047f9b2 100644
--- a/src/gui/editors/segment/segmentcanvas/AudioPreviewUpdater.h
+++ b/src/gui/editors/segment/segmentcanvas/AudioPreviewUpdater.h
@@ -43,16 +43,17 @@ class Composition;
class AudioPreviewThread;
-class AudioPreviewUpdater : public QObject
+class AudioPreviewUpdater : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
AudioPreviewUpdater(AudioPreviewThread &thread,
const Composition &composition,
const Segment *segment,
const TQRect &displayExtent,
- CompositionModelImpl *parent);
+ CompositionModelImpl *tqparent);
~AudioPreviewUpdater();
void update();
diff --git a/src/gui/editors/segment/segmentcanvas/CompositionItemHelper.cpp b/src/gui/editors/segment/segmentcanvas/CompositionItemHelper.cpp
index 9579ba2..fe4b926 100644
--- a/src/gui/editors/segment/segmentcanvas/CompositionItemHelper.cpp
+++ b/src/gui/editors/segment/segmentcanvas/CompositionItemHelper.cpp
@@ -60,12 +60,12 @@ timeT CompositionItemHelper::getEndTime(const CompositionItem& item, const Roseg
timeT t = 0;
if (item) {
- TQRect itemRect = item->rect();
+ TQRect tqitemRect = item->rect();
- t = std::max(grid.snapX(itemRect.x() + itemRect.width()), 0L);
+ t = std::max(grid.snapX(tqitemRect.x() + tqitemRect.width()), 0L);
// RG_DEBUG << "CompositionItemHelper::getEndTime() : rect width = "
-// << itemRect.width()
+// << tqitemRect.width()
// << " - item is repeating : " << item->isRepeating()
// << " - endTime = " << t
// << endl;
diff --git a/src/gui/editors/segment/segmentcanvas/CompositionItemImpl.cpp b/src/gui/editors/segment/segmentcanvas/CompositionItemImpl.cpp
index 12984a0..76cbe70 100644
--- a/src/gui/editors/segment/segmentcanvas/CompositionItemImpl.cpp
+++ b/src/gui/editors/segment/segmentcanvas/CompositionItemImpl.cpp
@@ -48,7 +48,7 @@ CompositionItemImpl::CompositionItemImpl(Segment& s, const CompositionRect& rect
TQRect CompositionItemImpl::rect() const
{
- TQRect res = m_rect;
+ TQRect res = static_cast<const TQRect&>(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/CompositionModel.h b/src/gui/editors/segment/segmentcanvas/CompositionModel.h
index 63412c0..1e4bd2f 100644
--- a/src/gui/editors/segment/segmentcanvas/CompositionModel.h
+++ b/src/gui/editors/segment/segmentcanvas/CompositionModel.h
@@ -56,6 +56,7 @@ typedef std::vector<TQImage> PixmapArray;
class CompositionModel : public TQObject, public CompositionObserver, public SegmentObserver
{
Q_OBJECT
+ TQ_OBJECT
public:
struct CompositionItemCompare {
diff --git a/src/gui/editors/segment/segmentcanvas/CompositionModelImpl.cpp b/src/gui/editors/segment/segmentcanvas/CompositionModelImpl.cpp
index 9627b16..388a4c1 100644
--- a/src/gui/editors/segment/segmentcanvas/CompositionModelImpl.cpp
+++ b/src/gui/editors/segment/segmentcanvas/CompositionModelImpl.cpp
@@ -231,7 +231,7 @@ void CompositionModelImpl::makeAudioPreviewRects(AudioPreviewDrawData* apRects,
TQPoint basePoint = segRect.topLeft();
- AudioPreviewDrawDataItem previewItem(previewImage, basePoint, segRect);
+ AudioPreviewDrawDataItem previewItem(previewImage, basePoint, static_cast<const TQRect&>(segRect));
if (getChangeType() == ChangeResizeFromStart) {
CompositionRect originalRect = computeSegmentRect(*segment);
@@ -476,7 +476,7 @@ void CompositionModelImpl::slotAudioPreviewComplete(AudioPreviewUpdater* apu)
TQRect updateRect;
if (apData) {
- RG_DEBUG << "CompositionModelImpl::slotAudioPreviewComplete(" << apu << "): apData contains " << apData->getValues().size() << " values already" << endl;
+ RG_DEBUG << "CompositionModelImpl::slotAudioPreviewComplete(" << apu << "): apData tqcontains " << apData->getValues().size() << " values already" << endl;
unsigned int channels = 0;
const std::vector<float> &values = apu->getComputedValues(channels);
if (channels > 0) {
@@ -501,7 +501,7 @@ TQRect CompositionModelImpl::postProcessAudioPreview(AudioPreviewData* apData, c
m_audioSegmentPreviewMap[segment] = previewPainter.getPreviewImage();
- return previewPainter.getSegmentRect();
+ return static_cast<const TQRect&>(previewPainter.getSegmentRect());
}
void CompositionModelImpl::slotInstrumentParametersChanged(InstrumentId id)
@@ -796,7 +796,7 @@ CompositionModel::itemcontainer CompositionModelImpl::getItemsAt(const TQPoint&
Segment* s = *i;
CompositionRect sr = computeSegmentRect(*s);
- if (sr.contains(point)) {
+ if (sr.tqcontains(point)) {
// RG_DEBUG << "CompositionModelImpl::getItemsAt() adding " << sr << " for segment " << s << endl;
CompositionItem item(new CompositionItemImpl(*s, sr));
unsigned int z = computeZForSegment(s);
@@ -1124,7 +1124,7 @@ CompositionRect CompositionModelImpl::computeSegmentRect(const Segment& s, bool
if (s.getType() == Segment::Audio) {
static TQRegExp re1("( *\\([^)]*\\))*$"); // (inserted) (copied) (etc)
static TQRegExp re2("\\.[^.]+$"); // filename suffix
- label.replace(re1, "").replace(re2, "");
+ label.tqreplace(re1, "").tqreplace(re2, "");
}
cr.setLabel(label);
diff --git a/src/gui/editors/segment/segmentcanvas/CompositionModelImpl.h b/src/gui/editors/segment/segmentcanvas/CompositionModelImpl.h
index 2d3fd64..f2998c3 100644
--- a/src/gui/editors/segment/segmentcanvas/CompositionModelImpl.h
+++ b/src/gui/editors/segment/segmentcanvas/CompositionModelImpl.h
@@ -62,6 +62,7 @@ class AudioPreviewThread;
class CompositionModelImpl : public CompositionModel
{
Q_OBJECT
+ TQ_OBJECT
public:
CompositionModelImpl(Composition& compo,
diff --git a/src/gui/editors/segment/segmentcanvas/CompositionRect.cpp b/src/gui/editors/segment/segmentcanvas/CompositionRect.cpp
index 9f867a5..ec4bef0 100644
--- a/src/gui/editors/segment/segmentcanvas/CompositionRect.cpp
+++ b/src/gui/editors/segment/segmentcanvas/CompositionRect.cpp
@@ -37,6 +37,6 @@
namespace Rosegarden
{
- const TQColor CompositionRect::DefaultPenColor = Qt::black;
+ const TQColor CompositionRect::DefaultPenColor = TQt::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 45c5f50..53dcc2e 100644
--- a/src/gui/editors/segment/segmentcanvas/CompositionRect.h
+++ b/src/gui/editors/segment/segmentcanvas/CompositionRect.h
@@ -41,7 +41,7 @@ class TQPoint;
namespace Rosegarden
{
-class CompositionRect : public QRect
+class CompositionRect : public TQRect
{
public:
typedef TQValueVector<int> repeatmarks;
diff --git a/src/gui/editors/segment/segmentcanvas/CompositionView.cpp b/src/gui/editors/segment/segmentcanvas/CompositionView.cpp
index 1ff0263..6faf230 100644
--- a/src/gui/editors/segment/segmentcanvas/CompositionView.cpp
+++ b/src/gui/editors/segment/segmentcanvas/CompositionView.cpp
@@ -88,12 +88,12 @@ protected:
CompositionView::CompositionView(RosegardenGUIDoc* doc,
CompositionModel* model,
- TQWidget * parent, const char * name, WFlags f)
+ TQWidget * tqparent, const char * name, WFlags f)
#if KDE_VERSION >= KDE_MAKE_VERSION(3,2,0)
- : RosegardenScrollView(parent, name, f | WNoAutoErase | WStaticContents),
+ : RosegardenScrollView(tqparent, name, f | WNoAutoErase | WStaticContents),
#else
:
- RosegardenScrollView(parent, name, f | WRepaintNoErase | WResizeNoErase | WStaticContents),
+ RosegardenScrollView(tqparent, name, f | WRepaintNoErase | WResizeNoErase | WStaticContents),
#endif
m_model(model),
m_currentItem(0),
@@ -191,7 +191,7 @@ CompositionView::CompositionView(RosegardenGUIDoc* doc,
}
if (doc) {
- doc->getAudioPreviewThread().setEmptyQueueListener(this);
+ doc->getAudioPreviewThread().setEmptyQueueListener(TQT_TQOBJECT(this));
}
m_segmentsDrawBuffer.setOptimization(TQPixmap::BestOptim);
@@ -227,7 +227,7 @@ void CompositionView::slotUpdateSize()
RulerScale *ruler = grid().getRulerScale();
- int minWidth = sizeHint().width();
+ int minWidth = tqsizeHint().width();
int computedWidth = int(nearbyint(ruler->getTotalWidth()));
int width = std::max(computedWidth, minWidth);
@@ -327,7 +327,7 @@ void CompositionView::slotSetTool(const TQString& toolName)
if (m_tool)
m_tool->ready();
else {
- KMessageBox::error(0, TQString("CompositionView::slotSetTool() : unknown tool name %1").arg(toolName));
+ KMessageBox::error(0, TQString("CompositionView::slotSetTool() : unknown tool name %1").tqarg(toolName));
}
}
@@ -495,7 +495,7 @@ void CompositionView::resizeEvent(TQResizeEvent* e)
void CompositionView::viewportPaintEvent(TQPaintEvent* e)
{
- TQMemArray<TQRect> rects = e->region().rects();
+ TQMemArray<TQRect> rects = TQRegion(e->region()).tqrects();
for (unsigned int i = 0; i < rects.size(); ++i) {
viewportPaintRect(rects[i]);
@@ -550,7 +550,7 @@ void CompositionView::viewportPaintRect(TQRect r)
// DEBUG
// TQPainter pdebug(viewport());
- // static TQPen framePen(Qt::red, 1);
+ // static TQPen framePen(TQt::red, 1);
// pdebug.setPen(framePen);
// pdebug.drawRect(updateRect);
@@ -669,7 +669,7 @@ void CompositionView::refreshSegmentsDrawBuffer(const TQRect& rect)
drawArea(&p, rect);
// DEBUG - show what's updated
- // TQPen framePen(Qt::red, 1);
+ // TQPen framePen(TQt::red, 1);
// p.setPen(framePen);
// p.drawRect(rect);
@@ -682,7 +682,7 @@ void CompositionView::refreshArtifactsDrawBuffer(const TQRect& rect)
// << rect << endl;
TQPainter p;
- p.begin(&m_artifactsDrawBuffer, viewport());
+ p.tqbegin(&m_artifactsDrawBuffer, viewport());
p.translate( -contentsX(), -contentsY());
// TQRect r(contentsX(), contentsY(), m_artifactsDrawBuffer.width(), m_artifactsDrawBuffer.height());
drawAreaArtifacts(&p, rect);
@@ -929,7 +929,7 @@ void CompositionView::drawAreaArtifacts(TQPainter * p, const TQRect& clipRect)
//
// Split line
//
- if (m_splitLinePos.x() > 0 && clipRect.contains(m_splitLinePos)) {
+ if (m_splitLinePos.x() > 0 && clipRect.tqcontains(m_splitLinePos)) {
p->save();
p->setPen(m_guideColor);
p->drawLine(m_splitLinePos.x(), m_splitLinePos.y(),
@@ -975,7 +975,7 @@ void CompositionView::drawCompRect(const CompositionRect& r, TQPainter *p, const
// draw 'start' rectangle with original brush
//
- TQRect startRect = r;
+ TQRect startRect = static_cast<const TQRect&>(r);
startRect.setWidth(repeatMarks[0] - r.x());
p->setBrush(r.getBrush());
drawRect(startRect, p, clipRect, r.isSelected(), intersectLvl, fill);
@@ -984,7 +984,7 @@ void CompositionView::drawCompRect(const CompositionRect& r, TQPainter *p, const
// now draw the 'repeat' marks
//
p->setPen(CompositionColourCache::getInstance()->RepeatSegmentBorder);
- int penWidth = std::max(r.getPen().width(), 1u);
+ int penWidth = std::max((uint)r.getPen().width(), 1u);
for (unsigned int i = 0; i < repeatMarks.size(); ++i) {
int pos = repeatMarks[i];
@@ -1020,9 +1020,9 @@ void CompositionView::drawCompRectLabel(const CompositionRect& r, TQPainter *p,
TQRect textRect(r);
textRect.setX(textRect.x() + 3);
TQString label = " " + r.getLabel() + " ";
- TQRect textBoundingRect = p->boundingRect(textRect, Qt::AlignLeft | Qt::AlignVCenter, label);
+ TQRect textBoundingRect = p->boundingRect(textRect, TQt::AlignLeft | TQt::AlignVCenter, label);
p->drawRect(textBoundingRect & r);
- p->drawText(textRect, Qt::AlignLeft | Qt::AlignVCenter, label);
+ p->drawText(textRect, TQt::AlignLeft | TQt::AlignVCenter, label);
p->restore();
}
#else
@@ -1036,7 +1036,7 @@ void CompositionView::drawCompRectLabel(const CompositionRect& r, TQPainter *p,
font.setItalic(false);
p->setFont(font);
- TQRect labelRect = QRect
+ TQRect labelRect = TQRect
(r.x(),
r.y() + ((r.height() - p->fontMetrics().height()) / 2) + 1,
r.width(),
@@ -1074,7 +1074,7 @@ void CompositionView::drawCompRectLabel(const CompositionRect& r, TQPainter *p,
labelRect.setY(wy);
p->drawText(labelRect,
- Qt::AlignLeft | Qt::AlignTop,
+ TQt::AlignLeft | TQt::AlignTop,
r.getLabel());
}
@@ -1084,7 +1084,7 @@ void CompositionView::drawCompRectLabel(const CompositionRect& r, TQPainter *p,
p->setPen(GUIPalette::getColour
(GUIPalette::SegmentLabel));
p->drawText(labelRect,
- Qt::AlignLeft | Qt::AlignVCenter, r.getLabel());
+ TQt::AlignLeft | TQt::AlignVCenter, r.getLabel());
p->restore();
}
#endif
@@ -1122,13 +1122,13 @@ void CompositionView::drawRect(const TQRect& r, TQPainter *p, const TQRect& clip
// RG_DEBUG << "CompositionView::drawRect : intersected color : " << fillColor << " isSelected : " << isSelected << endl;
}
} else {
- p->setBrush(Qt::NoBrush);
+ p->setBrush(TQt::NoBrush);
}
// Paint using the small coordinates...
TQRect intersection = rect.intersect(clipRect);
- if (clipRect.contains(rect)) {
+ if (clipRect.tqcontains(rect)) {
p->drawRect(rect);
} else {
// draw only what's necessary
@@ -1199,7 +1199,7 @@ void CompositionView::drawIntersections(const CompositionModel::rectcontainer& r
break;
for (; i != rects.end(); ++i) {
- CompositionRect ri = testRect.intersect(*i);
+ CompositionRect ri = TQT_TQRECT_OBJECT(testRect.intersect(*i));
if (!ri.isEmpty()) {
CompositionModel::rectcontainer::iterator t = std::find(intersections.begin(),
intersections.end(), ri);
@@ -1246,7 +1246,7 @@ void CompositionView::drawIntersections(const CompositionModel::rectcontainer& r
break;
for (; i != intersections.end(); ++i) {
- CompositionRect ri = testRect.intersect(*i);
+ CompositionRect ri = TQT_TQRECT_OBJECT(testRect.intersect(*i));
if (!ri.isEmpty() && ri != *i) {
CompositionModel::rectcontainer::iterator t = std::find(intersections2.begin(),
intersections2.end(), ri);
@@ -1356,15 +1356,15 @@ void CompositionView::slotToolHelpChanged(const TQString &text)
void CompositionView::contentsMousePressEvent(TQMouseEvent* e)
{
- Qt::ButtonState bs = e->state();
- slotSetSelectCopy((bs & Qt::ControlButton) != 0);
- slotSetSelectAdd((bs & Qt::ShiftButton) != 0);
- slotSetFineGrain((bs & Qt::ShiftButton) != 0);
- slotSetPencilOverExisting((bs & Qt::AltButton + Qt::ControlButton) != 0);
+ TQt::ButtonState bs = e->state();
+ slotSetSelectCopy((bs & TQt::ControlButton) != 0);
+ slotSetSelectAdd((bs & TQt::ShiftButton) != 0);
+ slotSetFineGrain((bs & TQt::ShiftButton) != 0);
+ slotSetPencilOverExisting((bs & TQt::AltButton + TQt::ControlButton) != 0);
switch (e->button()) {
- case LeftButton:
- case MidButton:
+ case Qt::LeftButton:
+ case Qt::MidButton:
startAutoScroll();
if (m_tool)
@@ -1373,7 +1373,7 @@ void CompositionView::contentsMousePressEvent(TQMouseEvent* e)
RG_DEBUG << "CompositionView::contentsMousePressEvent() :"
<< this << " no tool\n";
break;
- case RightButton:
+ case Qt::RightButton:
if (m_tool)
m_tool->handleRightButtonPress(e);
else
@@ -1394,8 +1394,8 @@ void CompositionView::contentsMouseReleaseEvent(TQMouseEvent* e)
if (!m_tool)
return ;
- if (e->button() == LeftButton ||
- e->button() == MidButton )
+ if (e->button() == Qt::LeftButton ||
+ e->button() == Qt::MidButton )
m_tool->handleMouseButtonRelease(e);
}
@@ -1434,9 +1434,9 @@ void CompositionView::contentsMouseMoveEvent(TQMouseEvent* e)
if (!m_tool)
return ;
- Qt::ButtonState bs = e->state();
- slotSetFineGrain((bs & Qt::ShiftButton) != 0);
- slotSetPencilOverExisting((bs & Qt::AltButton) != 0);
+ TQt::ButtonState bs = e->state();
+ slotSetFineGrain((bs & TQt::ShiftButton) != 0);
+ slotSetPencilOverExisting((bs & TQt::AltButton) != 0);
int follow = m_tool->handleMouseMove(e);
setScrollDirectionConstraint(follow);
@@ -1584,7 +1584,7 @@ CompositionView::slotTextFloatTimeout()
{
hideTextFloat();
slotArtifactsDrawBufferNeedsRefresh();
- // rgapp->slotSetStatusMessage(TQString::null);
+ // rgapp->slotSetStatusMessage(TQString());
}
}
diff --git a/src/gui/editors/segment/segmentcanvas/CompositionView.h b/src/gui/editors/segment/segmentcanvas/CompositionView.h
index c31cf96..12c5fb4 100644
--- a/src/gui/editors/segment/segmentcanvas/CompositionView.h
+++ b/src/gui/editors/segment/segmentcanvas/CompositionView.h
@@ -64,9 +64,10 @@ class CompositionRect;
class CompositionView : public RosegardenScrollView
{
Q_OBJECT
+ TQ_OBJECT
public:
CompositionView(RosegardenGUIDoc*, CompositionModel*,
- TQWidget * parent=0, const char* name=0, WFlags f=0);
+ TQWidget * tqparent=0, const char* name=0, WFlags f=0);
void setPointerPos(int pos);
int getPointerPos() { return m_pointerPos; }
diff --git a/src/gui/editors/segment/segmentcanvas/SegmentEraser.cpp b/src/gui/editors/segment/segmentcanvas/SegmentEraser.cpp
index f519c8a..3c4a7ae 100644
--- a/src/gui/editors/segment/segmentcanvas/SegmentEraser.cpp
+++ b/src/gui/editors/segment/segmentcanvas/SegmentEraser.cpp
@@ -50,7 +50,7 @@ SegmentEraser::SegmentEraser(CompositionView *c, RosegardenGUIDoc *d)
void SegmentEraser::ready()
{
- m_canvas->viewport()->setCursor(Qt::pointingHandCursor);
+ m_canvas->viewport()->setCursor(TQt::pointingHandCursor);
setBasicContextHelp();
}
diff --git a/src/gui/editors/segment/segmentcanvas/SegmentEraser.h b/src/gui/editors/segment/segmentcanvas/SegmentEraser.h
index 78165b9..e3bb6b5 100644
--- a/src/gui/editors/segment/segmentcanvas/SegmentEraser.h
+++ b/src/gui/editors/segment/segmentcanvas/SegmentEraser.h
@@ -43,6 +43,7 @@ class CompositionView;
class SegmentEraser : public SegmentTool
{
Q_OBJECT
+ TQ_OBJECT
friend class SegmentToolBox;
diff --git a/src/gui/editors/segment/segmentcanvas/SegmentItemPreview.h b/src/gui/editors/segment/segmentcanvas/SegmentItemPreview.h
index d1bb9a7..00d942e 100644
--- a/src/gui/editors/segment/segmentcanvas/SegmentItemPreview.h
+++ b/src/gui/editors/segment/segmentcanvas/SegmentItemPreview.h
@@ -44,7 +44,7 @@ class RulerScale;
class SegmentItemPreview
{
public:
- SegmentItemPreview(Segment& parent,
+ SegmentItemPreview(Segment& tqparent,
RulerScale* scale);
virtual ~SegmentItemPreview();
@@ -59,7 +59,7 @@ public:
PreviewState getPreviewState() const { return m_previewState; }
/**
- * Sets whether the preview shape shown in the segment needs
+ * Sets whether the preview tqshape shown in the segment needs
* to be refreshed
*/
void setPreviewCurrent(bool c)
diff --git a/src/gui/editors/segment/segmentcanvas/SegmentJoiner.h b/src/gui/editors/segment/segmentcanvas/SegmentJoiner.h
index 946edee..f2fd935 100644
--- a/src/gui/editors/segment/segmentcanvas/SegmentJoiner.h
+++ b/src/gui/editors/segment/segmentcanvas/SegmentJoiner.h
@@ -43,6 +43,7 @@ class CompositionView;
class SegmentJoiner : public SegmentTool
{
Q_OBJECT
+ TQ_OBJECT
friend class SegmentToolBox;
diff --git a/src/gui/editors/segment/segmentcanvas/SegmentMover.cpp b/src/gui/editors/segment/segmentcanvas/SegmentMover.cpp
index bc621fe..e2970ab 100644
--- a/src/gui/editors/segment/segmentcanvas/SegmentMover.cpp
+++ b/src/gui/editors/segment/segmentcanvas/SegmentMover.cpp
@@ -62,7 +62,7 @@ SegmentMover::SegmentMover(CompositionView *c, RosegardenGUIDoc *d)
void SegmentMover::ready()
{
- m_canvas->viewport()->setCursor(Qt::sizeAllCursor);
+ m_canvas->viewport()->setCursor(TQt::sizeAllCursor);
connect(m_canvas, TQT_SIGNAL(contentsMoving (int, int)),
this, TQT_SLOT(slotCanvasScrolled(int, int)));
setBasicContextHelp();
@@ -328,8 +328,8 @@ int SegmentMover::handleMouseMove(TQMouseEvent *e)
comp.getMusicalTimeForAbsoluteTime(currentItemStartTime, bar, beat, fraction, remainder);
TQString posString = TQString("%1.%2s (%3, %4, %5)")
- .arg(time.sec).arg(ms)
- .arg(bar + 1).arg(beat).arg(fraction);
+ .tqarg(time.sec).tqarg(ms)
+ .tqarg(bar + 1).tqarg(beat).tqarg(fraction);
m_canvas->setTextFloat(guideX + 10, guideY - 30, posString);
m_canvas->updateContents();
diff --git a/src/gui/editors/segment/segmentcanvas/SegmentMover.h b/src/gui/editors/segment/segmentcanvas/SegmentMover.h
index 580fff0..882647e 100644
--- a/src/gui/editors/segment/segmentcanvas/SegmentMover.h
+++ b/src/gui/editors/segment/segmentcanvas/SegmentMover.h
@@ -44,6 +44,7 @@ class CompositionView;
class SegmentMover : public SegmentTool
{
Q_OBJECT
+ TQ_OBJECT
friend class SegmentToolBox;
diff --git a/src/gui/editors/segment/segmentcanvas/SegmentPencil.cpp b/src/gui/editors/segment/segmentcanvas/SegmentPencil.cpp
index 60a74f4..8f4399c 100644
--- a/src/gui/editors/segment/segmentcanvas/SegmentPencil.cpp
+++ b/src/gui/editors/segment/segmentcanvas/SegmentPencil.cpp
@@ -64,7 +64,7 @@ SegmentPencil::SegmentPencil(CompositionView *c, RosegardenGUIDoc *d)
void SegmentPencil::ready()
{
- m_canvas->viewport()->setCursor(Qt::ibeamCursor);
+ m_canvas->viewport()->setCursor(TQt::ibeamCursor);
connect(m_canvas, TQT_SIGNAL(contentsMoving (int, int)),
this, TQT_SLOT(slotCanvasScrolled(int, int)));
setContextHelpFor(TQPoint(0, 0));
@@ -86,7 +86,7 @@ void SegmentPencil::slotCanvasScrolled(int newX, int newY)
void SegmentPencil::handleMouseButtonPress(TQMouseEvent *e)
{
- if (e->button() == RightButton)
+ if (e->button() == Qt::RightButton)
return;
// is user holding Ctrl+Alt? (ugly, but we are running short on available
@@ -153,7 +153,7 @@ void SegmentPencil::handleMouseButtonPress(TQMouseEvent *e)
void SegmentPencil::handleMouseButtonRelease(TQMouseEvent* e)
{
- if (e->button() == RightButton)
+ if (e->button() == Qt::RightButton)
return ;
setContextHelpFor(e->pos());
@@ -196,9 +196,9 @@ void SegmentPencil::handleMouseButtonRelease(TQMouseEvent* e)
segment->setLowestPlayable(track->getLowestPlayable());
segment->setHighestPlayable(track->getHighestPlayable());
- std::string label = qstrtostr(track->getPresetLabel());
+ std::string label = (track->getPresetLabel());
if (label != "") {
- segment->setLabel(qstrtostr(track->getPresetLabel()));
+ segment->setLabel((track->getPresetLabel()));
}
CompositionItem item = CompositionItemHelper::makeCompositionItem(segment);
diff --git a/src/gui/editors/segment/segmentcanvas/SegmentPencil.h b/src/gui/editors/segment/segmentcanvas/SegmentPencil.h
index f283f15..894babf 100644
--- a/src/gui/editors/segment/segmentcanvas/SegmentPencil.h
+++ b/src/gui/editors/segment/segmentcanvas/SegmentPencil.h
@@ -47,6 +47,7 @@ class CompositionView;
class SegmentPencil : public SegmentTool
{
Q_OBJECT
+ TQ_OBJECT
friend class SegmentToolBox;
friend class SegmentSelector;
diff --git a/src/gui/editors/segment/segmentcanvas/SegmentResizer.cpp b/src/gui/editors/segment/segmentcanvas/SegmentResizer.cpp
index 99241f1..4c4c884 100644
--- a/src/gui/editors/segment/segmentcanvas/SegmentResizer.cpp
+++ b/src/gui/editors/segment/segmentcanvas/SegmentResizer.cpp
@@ -69,7 +69,7 @@ SegmentResizer::SegmentResizer(CompositionView *c, RosegardenGUIDoc *d,
void SegmentResizer::ready()
{
- m_canvas->viewport()->setCursor(Qt::sizeHorCursor);
+ m_canvas->viewport()->setCursor(TQt::sizeHorCursor);
connect(m_canvas, TQT_SIGNAL(contentsMoving (int, int)),
this, TQT_SLOT(slotCanvasScrolled(int, int)));
setBasicContextHelp(false);
@@ -116,7 +116,7 @@ void SegmentResizer::handleMouseButtonRelease(TQMouseEvent *e)
{
RG_DEBUG << "SegmentResizer::handleMouseButtonRelease" << endl;
- bool rescale = (e->state() & Qt::ControlButton);
+ bool rescale = (e->state() & TQt::ControlButton);
if (m_currentItem) {
@@ -243,7 +243,7 @@ int SegmentResizer::handleMouseMove(TQMouseEvent *e)
{
// RG_DEBUG << "SegmentResizer::handleMouseMove" << endl;
- bool rescale = (e->state() & Qt::ControlButton);
+ bool rescale = (e->state() & TQt::ControlButton);
if (!m_currentItem) {
setBasicContextHelp(rescale);
diff --git a/src/gui/editors/segment/segmentcanvas/SegmentResizer.h b/src/gui/editors/segment/segmentcanvas/SegmentResizer.h
index 7a0600d..809dc34 100644
--- a/src/gui/editors/segment/segmentcanvas/SegmentResizer.h
+++ b/src/gui/editors/segment/segmentcanvas/SegmentResizer.h
@@ -48,6 +48,7 @@ class CompositionView;
class SegmentResizer : public SegmentTool
{
Q_OBJECT
+ TQ_OBJECT
friend class SegmentToolBox;
friend class SegmentSelector;
diff --git a/src/gui/editors/segment/segmentcanvas/SegmentSelector.cpp b/src/gui/editors/segment/segmentcanvas/SegmentSelector.cpp
index d601c16..964bc3b 100644
--- a/src/gui/editors/segment/segmentcanvas/SegmentSelector.cpp
+++ b/src/gui/editors/segment/segmentcanvas/SegmentSelector.cpp
@@ -75,7 +75,7 @@ SegmentSelector::~SegmentSelector()
void SegmentSelector::ready()
{
- m_canvas->viewport()->setCursor(Qt::arrowCursor);
+ m_canvas->viewport()->setCursor(TQt::arrowCursor);
connect(m_canvas, TQT_SIGNAL(contentsMoving (int, int)),
this, TQT_SLOT(slotCanvasScrolled(int, int)));
setContextHelp(i18n("Click and drag to select segments"));
@@ -174,8 +174,8 @@ SegmentSelector::handleMouseButtonPress(TQMouseEvent *e)
// Add on middle button or ctrl+left - bounding box on rest
//
- if (e->button() == MidButton ||
- (e->button() == LeftButton && (e->state() & Qt::ControlButton))) {
+ if (e->button() == Qt::MidButton ||
+ (e->button() == Qt::LeftButton && (e->state() & TQ_ControlButton))) {
m_dispatchTool = getToolBox()->getTool(SegmentPencil::ToolName);
@@ -217,7 +217,7 @@ SegmentSelector::handleMouseButtonRelease(TQMouseEvent *e)
if (m_dispatchTool) {
m_dispatchTool->handleMouseButtonRelease(e);
m_dispatchTool = 0;
- m_canvas->viewport()->setCursor(Qt::arrowCursor);
+ m_canvas->viewport()->setCursor(TQt::arrowCursor);
return ;
}
@@ -232,7 +232,7 @@ SegmentSelector::handleMouseButtonRelease(TQMouseEvent *e)
return ;
}
- m_canvas->viewport()->setCursor(Qt::arrowCursor);
+ m_canvas->viewport()->setCursor(TQt::arrowCursor);
Composition &comp = m_doc->getComposition();
@@ -313,7 +313,7 @@ int
SegmentSelector::handleMouseMove(TQMouseEvent *e)
{
if (!m_buttonPressed) {
- setContextHelpFor(e->pos(), (e->state() & Qt::ControlButton));
+ setContextHelpFor(e->pos(), (e->state() & TQt::ControlButton));
return RosegardenCanvasView::NoFollow;
}
@@ -352,7 +352,7 @@ SegmentSelector::handleMouseMove(TQMouseEvent *e)
return RosegardenCanvasView::FollowHorizontal | RosegardenCanvasView::FollowVertical;
}
- m_canvas->viewport()->setCursor(Qt::sizeAllCursor);
+ m_canvas->viewport()->setCursor(TQt::sizeAllCursor);
if (m_segmentCopyMode && !m_segmentQuickCopyDone) {
KMacroCommand *mcommand = new KMacroCommand
@@ -466,8 +466,8 @@ SegmentSelector::handleMouseMove(TQMouseEvent *e)
comp.getMusicalTimeForAbsoluteTime(currentItemStartTime, bar, beat, fraction, remainder);
TQString posString = TQString("%1.%2s (%3, %4, %5)")
- .arg(time.sec).arg(ms)
- .arg(bar + 1).arg(beat).arg(fraction);
+ .tqarg(time.sec).tqarg(ms)
+ .tqarg(bar + 1).tqarg(beat).tqarg(fraction);
m_canvas->setTextFloat(guideX + 10, guideY - 30, posString);
m_canvas->updateContents();
diff --git a/src/gui/editors/segment/segmentcanvas/SegmentSelector.h b/src/gui/editors/segment/segmentcanvas/SegmentSelector.h
index 3c602fa..db572d0 100644
--- a/src/gui/editors/segment/segmentcanvas/SegmentSelector.h
+++ b/src/gui/editors/segment/segmentcanvas/SegmentSelector.h
@@ -44,6 +44,7 @@ class CompositionView;
class SegmentSelector : public SegmentTool
{
Q_OBJECT
+ TQ_OBJECT
friend class SegmentToolBox;
friend class SegmentTool;
diff --git a/src/gui/editors/segment/segmentcanvas/SegmentSplitter.cpp b/src/gui/editors/segment/segmentcanvas/SegmentSplitter.cpp
index 1149cd9..d5fe45a 100644
--- a/src/gui/editors/segment/segmentcanvas/SegmentSplitter.cpp
+++ b/src/gui/editors/segment/segmentcanvas/SegmentSplitter.cpp
@@ -59,7 +59,7 @@ SegmentSplitter::~SegmentSplitter()
void SegmentSplitter::ready()
{
- m_canvas->viewport()->setCursor(Qt::splitHCursor);
+ m_canvas->viewport()->setCursor(TQt::splitHCursor);
setBasicContextHelp();
}
@@ -71,7 +71,7 @@ SegmentSplitter::handleMouseButtonPress(TQMouseEvent *e)
CompositionItem item = m_canvas->getFirstItemAt(e->pos());
if (item) {
- m_canvas->viewport()->setCursor(Qt::blankCursor);
+ m_canvas->viewport()->setCursor(TQt::blankCursor);
m_prevX = item->rect().x();
m_prevX = item->rect().y();
drawSplitLine(e);
@@ -106,7 +106,7 @@ SegmentSplitter::handleMouseButtonRelease(TQMouseEvent *e)
}
// Reinstate the cursor
- m_canvas->viewport()->setCursor(Qt::splitHCursor);
+ m_canvas->viewport()->setCursor(TQt::splitHCursor);
m_canvas->slotHideSplitLine();
}
@@ -118,12 +118,12 @@ SegmentSplitter::handleMouseMove(TQMouseEvent *e)
CompositionItem item = m_canvas->getFirstItemAt(e->pos());
if (item) {
-// m_canvas->viewport()->setCursor(Qt::blankCursor);
+// m_canvas->viewport()->setCursor(TQt::blankCursor);
drawSplitLine(e);
delete item;
return RosegardenCanvasView::FollowHorizontal;
} else {
- m_canvas->viewport()->setCursor(Qt::splitHCursor);
+ m_canvas->viewport()->setCursor(TQt::splitHCursor);
m_canvas->slotHideSplitLine();
return RosegardenCanvasView::NoFollow;
}
diff --git a/src/gui/editors/segment/segmentcanvas/SegmentSplitter.h b/src/gui/editors/segment/segmentcanvas/SegmentSplitter.h
index 3f21ece..a2fc1f6 100644
--- a/src/gui/editors/segment/segmentcanvas/SegmentSplitter.h
+++ b/src/gui/editors/segment/segmentcanvas/SegmentSplitter.h
@@ -45,6 +45,7 @@ class CompositionView;
class SegmentSplitter : public SegmentTool
{
Q_OBJECT
+ TQ_OBJECT
friend class SegmentToolBox;
diff --git a/src/gui/editors/segment/segmentcanvas/SegmentTool.cpp b/src/gui/editors/segment/segmentcanvas/SegmentTool.cpp
index 438cc51..b74cc9f 100644
--- a/src/gui/editors/segment/segmentcanvas/SegmentTool.cpp
+++ b/src/gui/editors/segment/segmentcanvas/SegmentTool.cpp
@@ -42,7 +42,7 @@ namespace Rosegarden
{
SegmentTool::SegmentTool(CompositionView* canvas, RosegardenGUIDoc *doc)
- : BaseTool("segment_tool_menu", dynamic_cast<KMainWindow*>(doc->parent())->factory(), canvas),
+ : BaseTool("segment_tool_menu", dynamic_cast<KMainWindow*>(doc->tqparent())->factory(), TQT_TQOBJECT(canvas)),
m_canvas(canvas),
m_doc(doc),
m_changeMade(false)
@@ -54,7 +54,7 @@ SegmentTool::~SegmentTool()
void SegmentTool::ready()
{
- m_canvas->viewport()->setCursor(Qt::arrowCursor);
+ m_canvas->viewport()->setCursor(TQt::arrowCursor);
}
void
@@ -86,12 +86,12 @@ SegmentTool::createMenu()
RG_DEBUG << "SegmentTool::createMenu()\n";
RosegardenGUIApp *app =
- dynamic_cast<RosegardenGUIApp*>(m_doc->parent());
+ dynamic_cast<RosegardenGUIApp*>(m_doc->tqparent());
if (app) {
m_menu = static_cast<TQPopupMenu*>
//(app->factory()->container("segment_tool_menu", app));
- (m_parentFactory->container("segment_tool_menu", app));
+ (m_tqparentFactory->container("segment_tool_menu", app));
if (!m_menu) {
RG_DEBUG << "SegmentTool::createMenu() failed\n";
diff --git a/src/gui/editors/segment/segmentcanvas/SegmentTool.h b/src/gui/editors/segment/segmentcanvas/SegmentTool.h
index 5b054a8..1b33ba3 100644
--- a/src/gui/editors/segment/segmentcanvas/SegmentTool.h
+++ b/src/gui/editors/segment/segmentcanvas/SegmentTool.h
@@ -64,7 +64,7 @@ public:
virtual ~SegmentTool();
/**
- * Is called by the parent View (EditView or SegmentCanvas) when
+ * Is called by the tqparent View (EditView or SegmentCanvas) when
* the tool is set as current.
* Add any setup here
*/
diff --git a/src/gui/editors/segment/segmentcanvas/SegmentToolBox.cpp b/src/gui/editors/segment/segmentcanvas/SegmentToolBox.cpp
index 5ce8a58..c0b4aeb 100644
--- a/src/gui/editors/segment/segmentcanvas/SegmentToolBox.cpp
+++ b/src/gui/editors/segment/segmentcanvas/SegmentToolBox.cpp
@@ -42,9 +42,9 @@
namespace Rosegarden
{
-SegmentToolBox::SegmentToolBox(CompositionView* parent, RosegardenGUIDoc* doc)
- : BaseToolBox(parent),
- m_canvas(parent),
+SegmentToolBox::SegmentToolBox(CompositionView* tqparent, RosegardenGUIDoc* doc)
+ : BaseToolBox(tqparent),
+ m_canvas(tqparent),
m_doc(doc)
{}
@@ -84,7 +84,7 @@ SegmentTool* SegmentToolBox::createTool(const TQString& toolName)
else {
KMessageBox::error(0, TQString("SegmentToolBox::createTool : unrecognised toolname %1 (%2)")
- .arg(toolName).arg(toolNamelc));
+ .tqarg(toolName).tqarg(toolNamelc));
return 0;
}
diff --git a/src/gui/editors/segment/segmentcanvas/SegmentToolBox.h b/src/gui/editors/segment/segmentcanvas/SegmentToolBox.h
index 2609708..c975e53 100644
--- a/src/gui/editors/segment/segmentcanvas/SegmentToolBox.h
+++ b/src/gui/editors/segment/segmentcanvas/SegmentToolBox.h
@@ -43,8 +43,9 @@ class CompositionView;
class SegmentToolBox : public BaseToolBox
{
Q_OBJECT
+ TQ_OBJECT
public:
- SegmentToolBox(CompositionView* parent, RosegardenGUIDoc*);
+ SegmentToolBox(CompositionView* tqparent, RosegardenGUIDoc*);
virtual SegmentTool* getTool(const TQString& toolName);