summaryrefslogtreecommitdiffstats
path: root/src/gui/editors/matrix/MatrixView.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-15 15:33:46 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-15 15:33:46 -0600
commit4faf11eccc5f08d2aa0540157d6eff80b7cdb02a (patch)
tree19bc4d69423c21bcde8ac0cb6fcb11146ae19137 /src/gui/editors/matrix/MatrixView.cpp
parente6d6692eda797b10f322a83ffdcf23fca719709e (diff)
downloadrosegarden-4faf11eccc5f08d2aa0540157d6eff80b7cdb02a.tar.gz
rosegarden-4faf11eccc5f08d2aa0540157d6eff80b7cdb02a.zip
Rename a number of old tq methods that are no longer tq specific
Diffstat (limited to 'src/gui/editors/matrix/MatrixView.cpp')
-rw-r--r--src/gui/editors/matrix/MatrixView.cpp156
1 files changed, 78 insertions, 78 deletions
diff --git a/src/gui/editors/matrix/MatrixView.cpp b/src/gui/editors/matrix/MatrixView.cpp
index 195da46..78a24c4 100644
--- a/src/gui/editors/matrix/MatrixView.cpp
+++ b/src/gui/editors/matrix/MatrixView.cpp
@@ -116,7 +116,7 @@
#include <tqcanvas.h>
#include <tqcursor.h>
#include <tqdialog.h>
-#include <tqlayout.h>
+#include <layout.h>
#include <tqiconset.h>
#include <tqlabel.h>
#include <tqpixmap.h>
@@ -140,10 +140,10 @@ MatrixView::MatrixView(RosegardenGUIDoc *doc,
TQWidget *parent,
bool drumMode)
: EditView(doc, segments, 3, parent, "matrixview"),
- m_htqlayout(&doc->getComposition()),
- m_referenceRuler(new ZoomableMatrixHLayoutRulerScale(m_htqlayout)),
- m_vtqlayout(),
- m_snapGrid(new SnapGrid(&m_htqlayout)),
+ m_hlayout(&doc->getComposition()),
+ m_referenceRuler(new ZoomableMatrixHLayoutRulerScale(m_hlayout)),
+ m_vlayout(),
+ m_snapGrid(new SnapGrid(&m_hlayout)),
m_lastEndMarkerTime(0),
m_hoveredOverAbsoluteTime(0),
m_hoveredOverNoteName(0),
@@ -205,7 +205,7 @@ MatrixView::MatrixView(RosegardenGUIDoc *doc,
TQString backgroundPixmap = isDrumMode() ? "bg-paper-white.xpm" : "bg-matrix-lines.xpm";
if (background.load(TQString("%1/misc/%2").
arg(pixmapDir, backgroundPixmap))) {
- tCanvas->tqsetBackgroundPixmap(background);
+ tCanvas->setBackgroundPixmap(background);
}
}
@@ -430,29 +430,29 @@ MatrixView::MatrixView(RosegardenGUIDoc *doc,
(doc, TQT_SIGNAL(pointerPositionChanged(timeT)),
TQT_TQOBJECT(this), TQT_SLOT(slotSetPointerPosition(timeT)));
- MATRIX_DEBUG << "MatrixView : applying tqlayout\n";
+ MATRIX_DEBUG << "MatrixView : applying layout\n";
bool layoutApplied = applyLayout();
if (!layoutApplied)
- KMessageBox::sorry(0, i18n("Couldn't apply piano roll tqlayout"));
+ KMessageBox::sorry(0, i18n("Couldn't apply piano roll layout"));
else {
MATRIX_DEBUG << "MatrixView : rendering elements\n";
for (unsigned int i = 0; i < m_staffs.size(); ++i) {
m_staffs[i]->positionAllElements();
- m_staffs[i]->getSegment().getRefreshtqStatus
+ m_staffs[i]->getSegment().getRefreshStatus
(m_segmentsRefreshStatusIds[i]).setNeedsRefresh(false);
}
}
StandardRuler *topStandardRuler = new StandardRuler(getDocument(),
- &m_htqlayout, int(xorigin), 25,
+ &m_hlayout, int(xorigin), 25,
false, getCentralWidget());
topStandardRuler->setSnapGrid(m_snapGrid);
setTopStandardRuler(topStandardRuler);
StandardRuler *bottomStandardRuler = new StandardRuler(getDocument(),
- &m_htqlayout, 0, 25,
+ &m_hlayout, 0, 25,
true, getBottomWidget());
bottomStandardRuler->setSnapGrid(m_snapGrid);
setBottomStandardRuler(bottomStandardRuler);
@@ -667,7 +667,7 @@ void MatrixView::setupActions()
icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap("chord")));
(new KToggleAction(i18n("C&hord Insert Mode"), icon, Key_H,
- TQT_TQOBJECT(this), TQT_SLOT(slotUpdateInsertModetqStatus()),
+ TQT_TQOBJECT(this), TQT_SLOT(slotUpdateInsertModeStatus()),
actionCollection(), "chord_mode"))->
setChecked(false);
@@ -903,9 +903,9 @@ void MatrixView::setupActions()
else if (d == crotchetDuration) cut = Key_4;
else if (d == crotchetDuration * 2) cut = Key_2;
- TQString actionName = TQString("snap_%1").tqarg(int((crotchetDuration * 4) / d));
+ TQString actionName = TQString("snap_%1").arg(int((crotchetDuration * 4) / d));
if (d == (crotchetDuration * 3) / 2) actionName = "snap_3";
- new KAction(i18n("Snap to %1").tqarg(label), pixmap, cut, TQT_TQOBJECT(this),
+ new KAction(i18n("Snap to %1").arg(label), pixmap, cut, TQT_TQOBJECT(this),
TQT_SLOT(slotSetSnapFromAction()), actionCollection(),
actionName.ascii());
}
@@ -1032,20 +1032,20 @@ bool MatrixView::applyLayout(int staffNo,
{
Profiler profiler("MatrixView::applyLayout", true);
- m_htqlayout.reset();
- m_vtqlayout.reset();
+ m_hlayout.reset();
+ m_vlayout.reset();
for (unsigned int i = 0; i < m_staffs.size(); ++i) {
if (staffNo >= 0 && (int)i != staffNo)
continue;
- m_htqlayout.scanStaff(*m_staffs[i], startTime, endTime);
- m_vtqlayout.scanStaff(*m_staffs[i], startTime, endTime);
+ m_hlayout.scanStaff(*m_staffs[i], startTime, endTime);
+ m_vlayout.scanStaff(*m_staffs[i], startTime, endTime);
}
- m_htqlayout.finishLayout();
- m_vtqlayout.finishLayout();
+ m_hlayout.finishLayout();
+ m_vlayout.finishLayout();
if (m_staffs[0]->getSegment().getEndMarkerTime() != m_lastEndMarkerTime ||
m_lastEndMarkerTime == 0 ||
@@ -1099,7 +1099,7 @@ void MatrixView::setViewSize(TQSize s)
void MatrixView::repaintRulers()
{
for (unsigned int i = 0; i != m_propertyViewRulers.size(); i++)
- m_propertyViewRulers[i].first->tqrepaint();
+ m_propertyViewRulers[i].first->repaint();
}
void MatrixView::updateView()
@@ -1196,8 +1196,8 @@ void MatrixView::setCurrentSelection(EventSelection* s, bool preview,
getStaff(segment)->positionElements(std::min(startA, startB),
std::max(endA, endB));
} else {
- // mark refresh status and then request a tqrepaint
- segment.getRefreshtqStatus
+ // mark refresh status and then request a repaint
+ segment.getRefreshStatus
(m_segmentsRefreshStatusIds
[getStaff(segment)->getId()]).
push(std::min(startA, startB), std::max(endA, endB));
@@ -1213,14 +1213,14 @@ void MatrixView::setCurrentSelection(EventSelection* s, bool preview,
getStaff(s->getSegment())->positionElements(startB, endB);
} else {
- // mark refresh status and then request a tqrepaint
+ // mark refresh status and then request a repaint
- oldSelection->getSegment().getRefreshtqStatus
+ oldSelection->getSegment().getRefreshStatus
(m_segmentsRefreshStatusIds
[getStaff(oldSelection->getSegment())->getId()]).
push(startA, endA);
- s->getSegment().getRefreshtqStatus
+ s->getSegment().getRefreshStatus
(m_segmentsRefreshStatusIds
[getStaff(s->getSegment())->getId()]).
push(startB, endB);
@@ -1474,13 +1474,13 @@ MatrixView::slotHoveredOverNoteChanged(int evPitch,
long ms = rt.msec();
TQString msg = i18n("Note: %1 (%2.%3s)")
- .tqarg(TQString("%1-%2-%3-%4")
- .tqarg(TQString("%1").tqarg(bar + 1).rightJustify(3, '0'))
- .tqarg(TQString("%1").tqarg(beat).rightJustify(2, '0'))
- .tqarg(TQString("%1").tqarg(fraction).rightJustify(2, '0'))
- .tqarg(TQString("%1").tqarg(remainder).rightJustify(2, '0')))
- .tqarg(rt.sec)
- .tqarg(TQString("%1").tqarg(ms).rightJustify(3, '0'));
+ .arg(TQString("%1-%2-%3-%4")
+ .arg(TQString("%1").arg(bar + 1).rightJustify(3, '0'))
+ .arg(TQString("%1").arg(beat).rightJustify(2, '0'))
+ .arg(TQString("%1").arg(fraction).rightJustify(2, '0'))
+ .arg(TQString("%1").arg(remainder).rightJustify(2, '0')))
+ .arg(rt.sec)
+ .arg(TQString("%1").arg(ms).rightJustify(3, '0'));
m_hoveredOverAbsoluteTime->setText(msg);
}
@@ -1488,8 +1488,8 @@ MatrixView::slotHoveredOverNoteChanged(int evPitch,
m_haveHoveredOverNote = false;
m_hoveredOverNoteName->setText(i18n("%1 (%2)")
- .tqarg(label.getTQString())
- .tqarg(evPitch));
+ .arg(label.getTQString())
+ .arg(evPitch));
m_pitchRuler->drawHoverNote(evPitch);
}
@@ -1504,7 +1504,7 @@ MatrixView::slotHoveredOverKeyChanged(unsigned int y)
if (evPitch != m_previousEvPitch) {
MidiPitchLabel label(evPitch);
m_hoveredOverNoteName->setText(TQString("%1 (%2)").
- tqarg(label.getTQString()).tqarg(evPitch));
+ arg(label.getTQString()).arg(evPitch));
m_previousEvPitch = evPitch;
}
}
@@ -1529,13 +1529,13 @@ MatrixView::slotHoveredOverAbsoluteTimeChanged(unsigned int time)
// to support Unicode
TQString message = i18n("Time: %1 (%2.%3s)")
- .tqarg(TQString("%1-%2-%3-%4")
- .tqarg(TQString("%1").tqarg(bar + 1).rightJustify(3, '0'))
- .tqarg(TQString("%1").tqarg(beat).rightJustify(2, '0'))
- .tqarg(TQString("%1").tqarg(fraction).rightJustify(2, '0'))
- .tqarg(TQString("%1").tqarg(remainder).rightJustify(2, '0')))
- .tqarg(rt.sec)
- .tqarg(TQString("%1").tqarg(ms).rightJustify(3, '0'));
+ .arg(TQString("%1-%2-%3-%4")
+ .arg(TQString("%1").arg(bar + 1).rightJustify(3, '0'))
+ .arg(TQString("%1").arg(beat).rightJustify(2, '0'))
+ .arg(TQString("%1").arg(fraction).rightJustify(2, '0'))
+ .arg(TQString("%1").arg(remainder).rightJustify(2, '0')))
+ .arg(rt.sec)
+ .arg(TQString("%1").arg(ms).rightJustify(3, '0'));
m_hoveredOverAbsoluteTime->setText(message);
}
@@ -1552,7 +1552,7 @@ MatrixView::slotSetPointerPosition(timeT time, bool scroll)
Composition &comp = getDocument()->getComposition();
int barNo = comp.getBarNumber(time);
- if (barNo >= m_htqlayout.getLastVisibleBarOnStaff(*m_staffs[0])) {
+ if (barNo >= m_hlayout.getLastVisibleBarOnStaff(*m_staffs[0])) {
Segment &seg = m_staffs[0]->getSegment();
@@ -1561,20 +1561,20 @@ MatrixView::slotSetPointerPosition(timeT time, bool scroll)
seg.getStartTime() +
((time - seg.getStartTime()) %
(seg.getEndMarkerTime() - seg.getStartTime()));
- m_staffs[0]->setPointerPosition(m_htqlayout, time);
+ m_staffs[0]->setPointerPosition(m_hlayout, time);
} else {
m_staffs[0]->hidePointer();
scroll = false;
}
- } else if (barNo < m_htqlayout.getFirstVisibleBarOnStaff(*m_staffs[0])) {
+ } else if (barNo < m_hlayout.getFirstVisibleBarOnStaff(*m_staffs[0])) {
m_staffs[0]->hidePointer();
scroll = false;
} else {
- m_staffs[0]->setPointerPosition(m_htqlayout, time);
+ m_staffs[0]->setPointerPosition(m_hlayout, time);
}
if (scroll && !getCanvasView()->isAutoScrolling())
- getCanvasView()->slotScrollHoriz(static_cast<int>(getXbyWorldMatrix(m_htqlayout.getXForTime(time))));
+ getCanvasView()->slotScrollHoriz(static_cast<int>(getXbyWorldMatrix(m_hlayout.getXForTime(time))));
updateView();
}
@@ -1585,11 +1585,11 @@ MatrixView::slotSetInsertCursorPosition(timeT time, bool scroll)
//!!! For now. Probably unlike slotSetPointerPosition this one
// should snap to the nearest event or grid line.
- m_staffs[0]->setInsertCursorPosition(m_htqlayout, time);
+ m_staffs[0]->setInsertCursorPosition(m_hlayout, time);
if (scroll && !getCanvasView()->isAutoScrolling()) {
getCanvasView()->slotScrollHoriz
- (static_cast<int>(getXbyWorldMatrix(m_htqlayout.getXForTime(time))));
+ (static_cast<int>(getXbyWorldMatrix(m_hlayout.getXForTime(time))));
}
updateView();
@@ -1830,7 +1830,7 @@ void MatrixView::slotInsertNoteFromAction()
} catch (...) {
KMessageBox::sorry
- (this, i18n("Unknown note insert action %1").tqarg(name));
+ (this, i18n("Unknown note insert action %1").arg(name));
return ;
}
@@ -2052,7 +2052,7 @@ MatrixView::slotSetSnap(timeT t)
}
for (unsigned int i = 0; i < m_staffs.size(); ++i)
- m_staffs[i]->sizeStaff(m_htqlayout);
+ m_staffs[i]->sizeStaff(m_hlayout);
m_segments[0]->setSnapGridSize(t);
@@ -2161,7 +2161,7 @@ MatrixView::initActionsToolbar()
m_velocityCombo = new KComboBox(actionsToolbar);
for (int i = 0; i <= 127; ++i) {
- m_velocityCombo->insertItem(TQString("%1").tqarg(i));
+ m_velocityCombo->insertItem(TQString("%1").arg(i));
}
m_velocityCombo->setCurrentItem(100); //!!! associate with segment
@@ -2236,8 +2236,8 @@ MatrixView::slotChangeHorizontalZoom(int)
{
double zoomValue = m_hZoomSlider->getCurrentSize();
- // m_zoomLabel->setText(i18n("%1%").tqarg(zoomValue*100.0 * 2)); // GROSS HACK - see in matrixstaff.h - BREAKS MATRIX VIEW, see bug 1000595
- m_zoomLabel->setText(i18n("%1%").tqarg(zoomValue*100.0));
+ // m_zoomLabel->setText(i18n("%1%").arg(zoomValue*100.0 * 2)); // GROSS HACK - see in matrixstaff.h - BREAKS MATRIX VIEW, see bug 1000595
+ m_zoomLabel->setText(i18n("%1%").arg(zoomValue*100.0));
MATRIX_DEBUG << "MatrixView::slotChangeHorizontalZoom() : zoom factor = "
<< zoomValue << endl;
@@ -2245,9 +2245,9 @@ MatrixView::slotChangeHorizontalZoom(int)
m_referenceRuler->setHScaleFactor(zoomValue);
if (m_tempoRuler)
- m_tempoRuler->tqrepaint();
+ m_tempoRuler->repaint();
if (m_chordNameRuler)
- m_chordNameRuler->tqrepaint();
+ m_chordNameRuler->repaint();
// Set zoom matrix
//
@@ -2266,7 +2266,7 @@ MatrixView::slotChangeHorizontalZoom(int)
for (unsigned int i = 0; i < m_propertyViewRulers.size(); ++i) {
m_propertyViewRulers[i].first->setHScaleFactor(zoomValue);
- m_propertyViewRulers[i].first->tqrepaint();
+ m_propertyViewRulers[i].first->repaint();
}
if (m_topStandardRuler)
@@ -2314,7 +2314,7 @@ MatrixView::slotZoomOut()
void
MatrixView::scrollToTime(timeT t)
{
- double layoutCoord = m_htqlayout.getXForTime(t);
+ double layoutCoord = m_hlayout.getXForTime(t);
getCanvasView()->slotScrollHoriz(int(layoutCoord));
}
@@ -2366,7 +2366,7 @@ MatrixView::addPropertyViewRuler(const PropertyName &property)
int height = 20;
- PropertyViewRuler *newRuler = new PropertyViewRuler(&m_htqlayout,
+ PropertyViewRuler *newRuler = new PropertyViewRuler(&m_hlayout,
m_segments[0],
property,
xorigin,
@@ -2409,7 +2409,7 @@ MatrixView::removePropertyViewRuler(unsigned int number)
RulerScale*
MatrixView::getHLayout()
{
- return &m_htqlayout;
+ return &m_hlayout;
}
Staff*
@@ -2429,14 +2429,14 @@ timeT
MatrixView::getInsertionTime()
{
MatrixStaff *staff = m_staffs[0];
- return staff->getInsertCursorTime(m_htqlayout);
+ return staff->getInsertCursorTime(m_hlayout);
}
void
MatrixView::slotStepBackward()
{
timeT time(getInsertionTime());
- slotSetInsertCursorPosition(SnapGrid(&m_htqlayout).snapTime
+ slotSetInsertCursorPosition(SnapGrid(&m_hlayout).snapTime
(time - 1,
SnapGrid::SnapLeft));
}
@@ -2445,7 +2445,7 @@ void
MatrixView::slotStepForward()
{
timeT time(getInsertionTime());
- slotSetInsertCursorPosition(SnapGrid(&m_htqlayout).snapTime
+ slotSetInsertCursorPosition(SnapGrid(&m_hlayout).snapTime
(time + 1,
SnapGrid::SnapRight));
}
@@ -2553,7 +2553,7 @@ MatrixView::readjustCanvasSize()
MatrixStaff &staff = *m_staffs[i];
- staff.sizeStaff(m_htqlayout);
+ staff.sizeStaff(m_hlayout);
// if (staff.getTotalWidth() + staff.getX() > maxWidth) {
// maxWidth = staff.getTotalWidth() + staff.getX() + 1;
@@ -2721,23 +2721,23 @@ MatrixView::updateViewCaption()
trackPosition = track->getPosition();
setCaption(i18n("%1 - Segment Track #%2 - %3")
- .tqarg(getDocument()->getTitle())
- .tqarg(trackPosition + 1)
- .tqarg(view));
+ .arg(getDocument()->getTitle())
+ .arg(trackPosition + 1)
+ .arg(view));
} else if (m_segments.size() == getDocument()->getComposition().getNbSegments()) {
setCaption(i18n("%1 - All Segments - %2")
- .tqarg(getDocument()->getTitle())
- .tqarg(view));
+ .arg(getDocument()->getTitle())
+ .arg(view));
} else {
setCaption(i18n("%1 - 1 Segment - %2",
"%1 - %n Segments - %2",
m_segments.size())
- .tqarg(getDocument()->getTitle())
- .tqarg(view));
+ .arg(getDocument()->getTitle())
+ .arg(view));
}
}
@@ -2745,10 +2745,10 @@ int MatrixView::computePostLayoutWidth()
{
Segment *segment = m_segments[0];
Composition *composition = segment->getComposition();
- int endX = int(m_htqlayout.getXForTime
+ int endX = int(m_hlayout.getXForTime
(composition->getBarEndForTime
(segment->getEndMarkerTime())));
- int startX = int(m_htqlayout.getXForTime
+ int startX = int(m_hlayout.getXForTime
(composition->getBarStartForTime
(segment->getStartTime())));
@@ -2928,7 +2928,7 @@ MatrixView::slotToggleStepByStep()
}
void
-MatrixView::slotUpdateInsertModetqStatus()
+MatrixView::slotUpdateInsertModeStatus()
{
TQString message;
if (isInChordMode()) {
@@ -3044,17 +3044,17 @@ MatrixView::slotPercussionSetChanged(Instrument * newInstr)
m_pitchRuler = pitchRuler;
m_pianoView->addChild(m_pitchRuler);
m_pitchRuler->show();
- m_pianoView->setFixedWidth(pitchRuler->tqsizeHint().width());
+ m_pianoView->setFixedWidth(pitchRuler->sizeHint().width());
// Update matrix canvas
readjustCanvasSize();
bool layoutApplied = applyLayout();
if (!layoutApplied)
- KMessageBox::sorry(0, i18n("Couldn't apply piano roll tqlayout"));
+ KMessageBox::sorry(0, i18n("Couldn't apply piano roll layout"));
else {
MATRIX_DEBUG << "MatrixView : rendering elements\n";
m_staffs[0]->positionAllElements();
- m_staffs[0]->getSegment().getRefreshtqStatus
+ m_staffs[0]->getSegment().getRefreshStatus
(m_segmentsRefreshStatusIds[0]).setNeedsRefresh(false);
update();
}