diff options
Diffstat (limited to 'src/gui/general/LinedStaff.cpp')
-rw-r--r-- | src/gui/general/LinedStaff.cpp | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/src/gui/general/LinedStaff.cpp b/src/gui/general/LinedStaff.cpp index e2e5d12..5a4fbb6 100644 --- a/src/gui/general/LinedStaff.cpp +++ b/src/gui/general/LinedStaff.cpp @@ -36,13 +36,13 @@ #include "base/ViewElement.h" #include "GUIPalette.h" #include "BarLine.h" -#include <qcanvas.h> -#include <qcolor.h> -#include <qfont.h> -#include <qfontmetrics.h> -#include <qpen.h> -#include <qrect.h> -#include <qstring.h> +#include <tqcanvas.h> +#include <tqcolor.h> +#include <tqfont.h> +#include <tqfontmetrics.h> +#include <tqpen.h> +#include <tqrect.h> +#include <tqstring.h> #include <algorithm> @@ -54,7 +54,7 @@ namespace Rosegarden const int pointerWidth = 3; -LinedStaff::LinedStaff(QCanvas *canvas, Segment *segment, +LinedStaff::LinedStaff(TQCanvas *canvas, Segment *segment, SnapGrid *snapGrid, int id, int resolution, int lineThickness) : Staff(*segment), @@ -75,15 +75,15 @@ LinedStaff::LinedStaff(QCanvas *canvas, Segment *segment, m_startLayoutX(0), m_endLayoutX(0), m_current(false), - m_pointer(new QCanvasLine(canvas)), - m_insertCursor(new QCanvasLine(canvas)), + m_pointer(new TQCanvasLine(canvas)), + m_insertCursor(new TQCanvasLine(canvas)), m_insertCursorTime(segment->getStartTime()), m_insertCursorTimeValid(false) { initCursors(); } -LinedStaff::LinedStaff(QCanvas *canvas, Segment *segment, +LinedStaff::LinedStaff(TQCanvas *canvas, Segment *segment, SnapGrid *snapGrid, int id, int resolution, int lineThickness, double pageWidth, int rowsPerPage, int rowSpacing) : @@ -105,15 +105,15 @@ LinedStaff::LinedStaff(QCanvas *canvas, Segment *segment, m_startLayoutX(0), m_endLayoutX(0), m_current(false), - m_pointer(new QCanvasLine(canvas)), - m_insertCursor(new QCanvasLine(canvas)), + m_pointer(new TQCanvasLine(canvas)), + m_insertCursor(new TQCanvasLine(canvas)), m_insertCursorTime(segment->getStartTime()), m_insertCursorTimeValid(false) { initCursors(); } -LinedStaff::LinedStaff(QCanvas *canvas, Segment *segment, +LinedStaff::LinedStaff(TQCanvas *canvas, Segment *segment, SnapGrid *snapGrid, int id, int resolution, int lineThickness, PageMode pageMode, double pageWidth, int rowsPerPage, @@ -136,8 +136,8 @@ LinedStaff::LinedStaff(QCanvas *canvas, Segment *segment, m_startLayoutX(0), m_endLayoutX(0), m_current(false), - m_pointer(new QCanvasLine(canvas)), - m_insertCursor(new QCanvasLine(canvas)), + m_pointer(new TQCanvasLine(canvas)), + m_insertCursor(new TQCanvasLine(canvas)), m_insertCursorTime(segment->getStartTime()), m_insertCursorTimeValid(false) { @@ -156,7 +156,7 @@ LinedStaff::~LinedStaff() void LinedStaff::initCursors() { - QPen pen(GUIPalette::getColour(GUIPalette::Pointer)); + TQPen pen(GUIPalette::getColour(GUIPalette::Pointer)); pen.setWidth(pointerWidth); m_pointer->setPen(pen); @@ -455,7 +455,7 @@ LinedStaff::getBarExtents(double x, int y) const if (line->x() <= x) continue; - return QRect(int(m_barLines[i -1]->x()), + return TQRect(int(m_barLines[i -1]->x()), getCanvasYForTopOfStaff(barRow), int(line->x() - m_barLines[i - 1]->x()), getHeightOfRow()); @@ -463,7 +463,7 @@ LinedStaff::getBarExtents(double x, int y) const } // failure - return QRect(int(getX() + getMargin()), getCanvasYForTopOfStaff(), 4, getHeightOfRow()); + return TQRect(int(getX() + getMargin()), getCanvasYForTopOfStaff(), 4, getHeightOfRow()); } double @@ -779,12 +779,12 @@ LinedStaff::insertBar(double layoutX, double width, bool isCorrect, if (showBarNo) { - QFont font; + TQFont font; font.setPixelSize(m_resolution * 3 / 2); - QFontMetrics metrics(font); - QString text = QString("%1").arg(barNo + 1); + TQFontMetrics metrics(font); + TQString text = TQString("%1").arg(barNo + 1); - QCanvasItem *barNoText = new QCanvasText(text, font, m_canvas); + TQCanvasItem *barNoText = new TQCanvasText(text, font, m_canvas); barNoText->setX(x); barNoText->setY(y - metrics.height() - m_resolution * 2); barNoText->setZ( -1); @@ -796,7 +796,7 @@ LinedStaff::insertBar(double layoutX, double width, bool isCorrect, m_barNumbers.push_back(barNoText); } - QCanvasRectangle *rect = 0; + TQCanvasRectangle *rect = 0; if (showBeatLines()) { @@ -987,7 +987,7 @@ LinedStaff::resizeStaffLineRow(int row, double x, double length) level = 200; } - QColor lineColour(level, level, level); + TQColor lineColour(level, level, level); int h; @@ -1009,7 +1009,7 @@ LinedStaff::resizeStaffLineRow(int row, double x, double length) // rather arbitrary (dup in insertBar) int barThickness = m_resolution / 12 + 1; y = getCanvasYForTopLine(row); - QCanvasRectangle *line = new QCanvasRectangle + TQCanvasRectangle *line = new QCanvasRectangle (int(x + length), y, barThickness, m_connectingLineLength, m_canvas); line->setPen(GUIPalette::getColour(GUIPalette::StaffConnectingTerminatingLine)); line->setBrush(GUIPalette::getColour(GUIPalette::StaffConnectingTerminatingLine)); @@ -1041,18 +1041,18 @@ LinedStaff::resizeStaffLineRow(int row, double x, double length) // << x << "," << y << ") to (" << (x+length-1) // << "," << y << ")" << endl; - QCanvasItem *line; + TQCanvasItem *line; delete m_staffLines[row][lineIndex]; m_staffLines[row][lineIndex] = 0; if (m_lineThickness > 1) { - QCanvasRectangle *rline = new QCanvasRectangle + TQCanvasRectangle *rline = new QCanvasRectangle (int(x), y, int(length), m_lineThickness, m_canvas); rline->setPen(lineColour); rline->setBrush(lineColour); line = rline; } else { - QCanvasLine *lline = new QCanvasLine(m_canvas); + TQCanvasLine *lline = new TQCanvasLine(m_canvas); lline->setPoints(int(x), y, int(x + length), y); lline->setPen(lineColour); line = lline; |