summaryrefslogtreecommitdiffstats
path: root/src/gui/editors/notation/NotationView.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <[email protected]>2011-12-16 09:57:35 -0600
committerTimothy Pearson <[email protected]>2011-12-16 09:57:35 -0600
commit6ca08e7a881c0c97f338e0085f75af04ec08ad04 (patch)
tree5462bef0f060df1c19e3fcb98250e5cfa24edc11 /src/gui/editors/notation/NotationView.cpp
parent4faf11eccc5f08d2aa0540157d6eff80b7cdb02a (diff)
downloadrosegarden-6ca08e7a881c0c97f338e0085f75af04ec08ad04.tar.gz
rosegarden-6ca08e7a881c0c97f338e0085f75af04ec08ad04.zip
Revert "Rename a number of old tq methods that are no longer tq specific"
This reverts commit 4faf11eccc5f08d2aa0540157d6eff80b7cdb02a.
Diffstat (limited to 'src/gui/editors/notation/NotationView.cpp')
-rw-r--r--src/gui/editors/notation/NotationView.cpp310
1 files changed, 155 insertions, 155 deletions
diff --git a/src/gui/editors/notation/NotationView.cpp b/src/gui/editors/notation/NotationView.cpp
index be96fdf..bd553ee 100644
--- a/src/gui/editors/notation/NotationView.cpp
+++ b/src/gui/editors/notation/NotationView.cpp
@@ -25,7 +25,7 @@
#include "NotationView.h"
#include <list>
-#include <layout.h>
+#include <tqlayout.h>
#include "misc/Debug.h"
#include <kapplication.h>
@@ -194,7 +194,7 @@
#include <ktempfile.h>
#include <ktoolbar.h>
#include <kxmlguiclient.h>
-#include <brush.h>
+#include <tqbrush.h>
#include <tqcanvas.h>
#include <tqcursor.h>
#include <tqdialog.h>
@@ -372,9 +372,9 @@ NotationView::NotationView(RosegardenGUIDoc *doc,
m_pageMode(LinedStaff::LinearMode),
m_leftGutter(20),
m_notePixmapFactory(new NotePixmapFactory(m_fontName, m_fontSize)),
- m_hlayout(new NotationHLayout(&doc->getComposition(), m_notePixmapFactory,
+ m_htqlayout(new NotationHLayout(&doc->getComposition(), m_notePixmapFactory,
m_properties, TQT_TQOBJECT(this))),
- m_vlayout(new NotationVLayout(&doc->getComposition(), m_notePixmapFactory,
+ m_vtqlayout(new NotationVLayout(&doc->getComposition(), m_notePixmapFactory,
m_properties, TQT_TQOBJECT(this))),
m_chordNameRuler(0),
m_tempoRuler(0),
@@ -409,7 +409,7 @@ NotationView::NotationView(RosegardenGUIDoc *doc,
// Initialise the display-related defaults that will be needed
- // by both the actions and the layout toolbar
+ // by both the actions and the tqlayout toolbar
m_config->setGroup(NotationViewConfigGroup);
@@ -435,15 +435,15 @@ NotationView::NotationView(RosegardenGUIDoc *doc,
NoteFontFactory::getDefaultSize(m_fontName));
int defaultSpacing = m_config->readNumEntry("spacing", 100);
- m_hlayout->setSpacing(defaultSpacing);
+ m_htqlayout->setSpacing(defaultSpacing);
int defaultProportion = m_config->readNumEntry("proportion", 60);
- m_hlayout->setProportion(defaultProportion);
+ m_htqlayout->setProportion(defaultProportion);
delete m_notePixmapFactory;
m_notePixmapFactory = new NotePixmapFactory(m_fontName, m_fontSize);
- m_hlayout->setNotePixmapFactory(m_notePixmapFactory);
- m_vlayout->setNotePixmapFactory(m_notePixmapFactory);
+ m_htqlayout->setNotePixmapFactory(m_notePixmapFactory);
+ m_vtqlayout->setNotePixmapFactory(m_notePixmapFactory);
setupActions();
// setupAddControlRulerMenu(); - too early for notation, moved to end of ctor.
@@ -460,19 +460,19 @@ NotationView::NotationView(RosegardenGUIDoc *doc,
updateViewCaption();
m_chordNameRuler = new ChordNameRuler
- (m_hlayout, doc, segments, m_leftGutter, 20, getCentralWidget());
+ (m_htqlayout, doc, segments, m_leftGutter, 20, getCentralWidget());
addRuler(m_chordNameRuler);
if (showProgressive)
m_chordNameRuler->show();
m_tempoRuler = new TempoRuler
- (m_hlayout, doc, this, m_leftGutter, 24, false, getCentralWidget());
+ (m_htqlayout, doc, this, m_leftGutter, 24, false, getCentralWidget());
addRuler(m_tempoRuler);
m_tempoRuler->hide();
static_cast<TempoRuler *>(m_tempoRuler)->connectSignals();
m_rawNoteRuler = new RawNoteRuler
- (m_hlayout, segments[0], m_leftGutter, 20, getCentralWidget());
+ (m_htqlayout, segments[0], m_leftGutter, 20, getCentralWidget());
addRuler(m_rawNoteRuler);
m_rawNoteRuler->show();
@@ -484,7 +484,7 @@ NotationView::NotationView(RosegardenGUIDoc *doc,
readOptions();
- setBottomStandardRuler(new StandardRuler(getDocument(), m_hlayout, m_leftGutter, 25,
+ setBottomStandardRuler(new StandardRuler(getDocument(), m_htqlayout, m_leftGutter, 25,
true, getBottomWidget()));
for (unsigned int i = 0; i < segments.size(); ++i)
@@ -506,7 +506,7 @@ NotationView::NotationView(RosegardenGUIDoc *doc,
m_canvasView->setLeftFixedWidget(m_headersGroupView);
// Add a close button just above the track headers.
- // The grid layout is only here to maintain the button in a
+ // The grid tqlayout is only here to maintain the button in a
// right place
m_headersTopFrame = new TQFrame(getCentralWidget());
TQGridLayout * headersTopGrid
@@ -522,7 +522,7 @@ NotationView::NotationView(RosegardenGUIDoc *doc,
TQToolTip::add(hideHeadersButton, i18n("Close track headers"));
headersTopGrid->setMargin(4);
setTopStandardRuler(new StandardRuler(getDocument(),
- m_hlayout, m_leftGutter, 25,
+ m_htqlayout, m_leftGutter, 25,
false, getCentralWidget()), m_headersTopFrame);
m_topStandardRuler->getLoopRuler()->setBackgroundColor
@@ -544,7 +544,7 @@ NotationView::NotationView(RosegardenGUIDoc *doc,
//
- // layout
+ // tqlayout
//
ProgressDialog* progressDlg = 0;
@@ -585,7 +585,7 @@ NotationView::NotationView(RosegardenGUIDoc *doc,
setPageMode(mode);
for (unsigned int i = 0; i < m_staffs.size(); ++i) {
- m_staffs[i]->getSegment().getRefreshStatus
+ m_staffs[i]->getSegment().getRefreshtqStatus
(m_segmentsRefreshStatusIds[i]).setNeedsRefresh(false);
}
@@ -594,7 +594,7 @@ NotationView::NotationView(RosegardenGUIDoc *doc,
} catch (ProgressReporter::Cancelled c)
{
// when cancelled, m_ok is false -- checked by calling method
- NOTATION_DEBUG << "NotationView ctor : layout Cancelled" << endl;
+ NOTATION_DEBUG << "NotationView ctor : tqlayout Cancelled" << endl;
}
NOTATION_DEBUG << "NotationView ctor : m_ok = " << m_ok << endl;
@@ -754,10 +754,10 @@ NotationView::NotationView(RosegardenGUIDoc *doc,
slotSetInsertCursorPosition(0);
slotSetPointerPosition(doc->getComposition().getPosition());
setCurrentSelection(0, false, true);
- slotUpdateInsertModeStatus();
- m_chordNameRuler->repaint();
- m_tempoRuler->repaint();
- m_rawNoteRuler->repaint();
+ slotUpdateInsertModetqStatus();
+ m_chordNameRuler->tqrepaint();
+ m_tempoRuler->tqrepaint();
+ m_rawNoteRuler->tqrepaint();
m_inhibitRefresh = false;
// slotCheckRendered(0, getCanvasView()->visibleWidth());
@@ -817,9 +817,9 @@ NotationView::NotationView(RosegardenGUIDoc *doc,
m_pageMode(LinedStaff::LinearMode),
m_leftGutter(0),
m_notePixmapFactory(new NotePixmapFactory(m_fontName, m_fontSize)),
- m_hlayout(new NotationHLayout(&doc->getComposition(), m_notePixmapFactory,
+ m_htqlayout(new NotationHLayout(&doc->getComposition(), m_notePixmapFactory,
m_properties, TQT_TQOBJECT(this))),
- m_vlayout(new NotationVLayout(&doc->getComposition(), m_notePixmapFactory,
+ m_vtqlayout(new NotationVLayout(&doc->getComposition(), m_notePixmapFactory,
m_properties, TQT_TQOBJECT(this))),
m_chordNameRuler(0),
m_tempoRuler(0),
@@ -850,7 +850,7 @@ NotationView::NotationView(RosegardenGUIDoc *doc,
// Initialise the display-related defaults that will be needed
- // by both the actions and the layout toolbar
+ // by both the actions and the tqlayout toolbar
m_config->setGroup(NotationViewConfigGroup);
@@ -871,20 +871,20 @@ NotationView::NotationView(RosegardenGUIDoc *doc,
if (referenceView)
{
- m_hlayout->setSpacing(referenceView->m_hlayout->getSpacing());
- m_hlayout->setProportion(referenceView->m_hlayout->getProportion());
+ m_htqlayout->setSpacing(referenceView->m_htqlayout->getSpacing());
+ m_htqlayout->setProportion(referenceView->m_htqlayout->getProportion());
} else
{
int defaultSpacing = m_config->readNumEntry("spacing", 100);
- m_hlayout->setSpacing(defaultSpacing);
+ m_htqlayout->setSpacing(defaultSpacing);
int defaultProportion = m_config->readNumEntry("proportion", 60);
- m_hlayout->setProportion(defaultProportion);
+ m_htqlayout->setProportion(defaultProportion);
}
delete m_notePixmapFactory;
m_notePixmapFactory = new NotePixmapFactory(m_fontName, m_fontSize);
- m_hlayout->setNotePixmapFactory(m_notePixmapFactory);
- m_vlayout->setNotePixmapFactory(m_notePixmapFactory);
+ m_htqlayout->setNotePixmapFactory(m_notePixmapFactory);
+ m_vtqlayout->setNotePixmapFactory(m_notePixmapFactory);
setBackgroundMode(PaletteBase);
m_config->setGroup(NotationViewConfigGroup);
@@ -930,7 +930,7 @@ NotationView::NotationView(RosegardenGUIDoc *doc,
setPageMode(LinedStaff::MultiPageMode); // also positions and renders the staffs!
for (unsigned int i = 0; i < m_staffs.size(); ++i) {
- m_staffs[i]->getSegment().getRefreshStatus
+ m_staffs[i]->getSegment().getRefreshtqStatus
(m_segmentsRefreshStatusIds[i]).setNeedsRefresh(false);
}
@@ -939,7 +939,7 @@ NotationView::NotationView(RosegardenGUIDoc *doc,
} catch (ProgressReporter::Cancelled c)
{
// when cancelled, m_ok is false -- checked by calling method
- NOTATION_DEBUG << "NotationView ctor : layout Cancelled" << endl;
+ NOTATION_DEBUG << "NotationView ctor : tqlayout Cancelled" << endl;
}
NOTATION_DEBUG << "NotationView ctor : m_ok = " << m_ok << endl;
@@ -1223,7 +1223,7 @@ void NotationView::positionStaffs()
}
}
- m_hlayout->setPageWidth(pageWidth - leftMargin * 2);
+ m_htqlayout->setPageWidth(pageWidth - leftMargin * 2);
int topGutter = 0;
@@ -1341,7 +1341,7 @@ void NotationView::positionPages()
haveBackground = true;
}
// we're happy to ignore errors from this one:
- deskBackground.load(TQString("%1/misc/bg-desktop.xpm").arg(pixmapDir));
+ deskBackground.load(TQString("%1/misc/bg-desktop.xpm").tqarg(pixmapDir));
}
int pageWidth = getPageWidth();
@@ -1365,14 +1365,14 @@ void NotationView::positionPages()
if (m_pageMode != LinedStaff::MultiPageMode) {
if (haveBackground) {
- canvas()->setBackgroundPixmap(background);
+ canvas()->tqsetBackgroundPixmap(background);
getCanvasView()->setBackgroundMode(TQt::FixedPixmap);
getCanvasView()->setPaletteBackgroundPixmap(background);
getCanvasView()->setErasePixmap(background);
}
} else {
if (haveBackground) {
- canvas()->setBackgroundPixmap(deskBackground);
+ canvas()->tqsetBackgroundPixmap(deskBackground);
getCanvasView()->setBackgroundMode(TQt::FixedPixmap);
getCanvasView()->setPaletteBackgroundPixmap(background);
getCanvasView()->setErasePixmap(background);
@@ -1389,7 +1389,7 @@ void NotationView::positionPages()
int w = pageWidth - leftMargin / 2;
int h = pageHeight;
- TQString str = TQString("%1").arg(page + 1);
+ TQString str = TQString("%1").tqarg(page + 1);
TQCanvasText *text = new TQCanvasText(str, pageNumberFont, canvas());
text->setX(m_leftGutter + pageWidth * page + pageWidth - pageNumberMetrics.width(str) - leftMargin);
text->setY(y + h - pageNumberMetrics.descent() - topMargin);
@@ -1482,13 +1482,13 @@ void NotationView::readOptions()
opt = m_config->readBoolEntry("Show Annotations", true);
m_annotationsVisible = opt;
getToggleAction("show_annotations")->setChecked(opt);
- slotUpdateAnnotationsStatus();
+ slotUpdateAnnotationstqStatus();
// slotToggleAnnotations();
opt = m_config->readBoolEntry("Show LilyPond Directives", true);
m_lilyPondDirectivesVisible = opt;
getToggleAction("show_lilypond_directives")->setChecked(opt);
- slotUpdateLilyPondDirectivesStatus();
+ slotUpdateLilyPondDirectivestqStatus();
}
void NotationView::setupActions()
@@ -1549,7 +1549,7 @@ void NotationView::setupActions()
KActionMenu *spacingActionMenu =
new KActionMenu(i18n("S&pacing"), TQT_TQOBJECT(this), "stretch_actionmenu");
- int defaultSpacing = m_hlayout->getSpacing();
+ int defaultSpacing = m_htqlayout->getSpacing();
std::vector<int> spacings = NotationHLayout::getAvailableSpacings();
for (std::vector<int>::iterator i = spacings.begin();
@@ -1557,9 +1557,9 @@ void NotationView::setupActions()
KToggleAction *spacingAction =
new KToggleAction
- (TQString("%1%").arg(*i), 0, TQT_TQOBJECT(this),
+ (TQString("%1%").tqarg(*i), 0, TQT_TQOBJECT(this),
TQT_SLOT(slotChangeSpacingFromAction()),
- actionCollection(), TQString("spacing_%1").arg(*i).ascii());
+ actionCollection(), TQString("spacing_%1").tqarg(*i).ascii());
spacingAction->setExclusiveGroup("spacing");
spacingAction->setChecked(*i == defaultSpacing);
@@ -1571,13 +1571,13 @@ void NotationView::setupActions()
KActionMenu *proportionActionMenu =
new KActionMenu(i18n("Du&ration Factor"), TQT_TQOBJECT(this), "proportion_actionmenu");
- int defaultProportion = m_hlayout->getProportion();
+ int defaultProportion = m_htqlayout->getProportion();
std::vector<int> proportions = NotationHLayout::getAvailableProportions();
for (std::vector<int>::iterator i = proportions.begin();
i != proportions.end(); ++i) {
- TQString name = TQString("%1%").arg(*i);
+ TQString name = TQString("%1%").tqarg(*i);
if (*i == 0)
name = i18n("None");
@@ -1585,7 +1585,7 @@ void NotationView::setupActions()
new KToggleAction
(name, 0, TQT_TQOBJECT(this),
TQT_SLOT(slotChangeProportionFromAction()),
- actionCollection(), TQString("proportion_%1").arg(*i).ascii());
+ actionCollection(), TQString("proportion_%1").tqarg(*i).ascii());
proportionAction->setExclusiveGroup("proportion");
proportionAction->setChecked(*i == defaultProportion);
@@ -1820,7 +1820,7 @@ void NotationView::setupActions()
TQString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/");
- TQCanvasPixmap pixmap(pixmapDir + "/toolbar/linear-layout.xpm");
+ TQCanvasPixmap pixmap(pixmapDir + "/toolbar/linear-tqlayout.xpm");
icon = TQIconSet(pixmap);
KRadioAction *linearModeAction = new KRadioAction
(i18n("&Linear Layout"), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotLinearMode()),
@@ -1910,21 +1910,21 @@ void NotationView::setupActions()
icon = TQIconSet(NotePixmapFactory::toTQPixmap
(NotePixmapFactory::makeToolbarPixmap("triplet")));
(new KToggleAction(i18n("Trip&let Insert Mode"), icon, Key_G,
- TQT_TQOBJECT(this), TQT_SLOT(slotUpdateInsertModeStatus()),
+ TQT_TQOBJECT(this), TQT_SLOT(slotUpdateInsertModetqStatus()),
actionCollection(), "triplet_mode"))->
setChecked(false);
icon = TQIconSet(NotePixmapFactory::toTQPixmap
(NotePixmapFactory::makeToolbarPixmap("chord")));
(new KToggleAction(i18n("C&hord Insert Mode"), icon, Key_H,
- TQT_TQOBJECT(this), TQT_SLOT(slotUpdateInsertModeStatus()),
+ TQT_TQOBJECT(this), TQT_SLOT(slotUpdateInsertModetqStatus()),
actionCollection(), "chord_mode"))->
setChecked(false);
icon = TQIconSet(NotePixmapFactory::toTQPixmap
(NotePixmapFactory::makeToolbarPixmap("group-grace")));
(new KToggleAction(i18n("Grace Insert Mode"), icon, 0,
- TQT_TQOBJECT(this), TQT_SLOT(slotUpdateInsertModeStatus()),
+ TQT_TQOBJECT(this), TQT_SLOT(slotUpdateInsertModetqStatus()),
actionCollection(), "grace_mode"))->
setChecked(false);
/*!!!
@@ -2263,7 +2263,7 @@ void NotationView::setupActions()
for (int i = 0; i <= 5; ++i) {
new KAction(slashTitles[i], 0, TQT_TQOBJECT(this),
TQT_SLOT(slotAddSlashes()), actionCollection(),
- TQString("slashes_%1").arg(i).ascii());
+ TQString("slashes_%1").tqarg(i).ascii());
}
new KAction(ClefInsertionCommand::getGlobalName(), 0, TQT_TQOBJECT(this),
@@ -2546,7 +2546,7 @@ NotationView::setupFontSizeMenu(std::string oldFontName)
for (unsigned int i = 0; i < sizes.size(); ++i) {
KAction *action =
actionCollection()->action
- (TQString("note_font_size_%1").arg(sizes[i]).ascii());
+ (TQString("note_font_size_%1").tqarg(sizes[i]).ascii());
m_fontSizeActionMenu->remove
(action);
@@ -2560,7 +2560,7 @@ NotationView::setupFontSizeMenu(std::string oldFontName)
for (unsigned int i = 0; i < sizes.size(); ++i) {
- TQString actionName = TQString("note_font_size_%1").arg(sizes[i]);
+ TQString actionName = TQString("note_font_size_%1").tqarg(sizes[i]);
KToggleAction *sizeAction = dynamic_cast<KToggleAction *>
(actionCollection()->action(actionName.ascii()));
@@ -2611,7 +2611,7 @@ void NotationView::initLayoutToolbar()
if (!layoutToolbar) {
std::cerr
- << "NotationView::initLayoutToolbar() : layout toolbar not found"
+ << "NotationView::initLayoutToolbar() : tqlayout toolbar not found"
<< std::endl;
return ;
}
@@ -2679,7 +2679,7 @@ void NotationView::initLayoutToolbar()
//
// spacing combo
//
- int defaultSpacing = m_hlayout->getSpacing();
+ int defaultSpacing = m_htqlayout->getSpacing();
std::vector<int> spacings = NotationHLayout::getAvailableSpacings();
m_spacingCombo = new KComboBox(layoutToolbar, "spacing combo");
@@ -2786,17 +2786,17 @@ NotationView::setPageMode(LinedStaff::PageMode pageMode)
int topMargin = 0, leftMargin = 0;
getPageMargins(leftMargin, topMargin);
- m_hlayout->setPageMode(pageMode != LinedStaff::LinearMode);
- m_hlayout->setPageWidth(pageWidth - leftMargin * 2);
+ m_htqlayout->setPageMode(pageMode != LinedStaff::LinearMode);
+ m_htqlayout->setPageWidth(pageWidth - leftMargin * 2);
- NOTATION_DEBUG << "NotationView::setPageMode: set layout's page width to "
+ NOTATION_DEBUG << "NotationView::setPageMode: set tqlayout's page width to "
<< (pageWidth - leftMargin * 2) << endl;
positionStaffs();
bool layoutApplied = applyLayout();
if (!layoutApplied)
- KMessageBox::sorry(0, "Couldn't apply layout");
+ KMessageBox::sorry(0, "Couldn't apply tqlayout");
else {
for (unsigned int i = 0; i < m_staffs.size(); ++i) {
m_staffs[i]->markChanged();
@@ -2894,7 +2894,7 @@ void
NotationView::scrollToTime(timeT t)
{
- double notationViewLayoutCoord = m_hlayout->getXForTime(t);
+ double notationViewLayoutCoord = m_htqlayout->getXForTime(t);
// Doesn't appear to matter which staff we use
//!!! actually it probably does matter, if they don't have the same extents
@@ -2912,7 +2912,7 @@ NotationView::scrollToTime(timeT t)
RulerScale*
NotationView::getHLayout()
{
- return m_hlayout;
+ return m_htqlayout;
}
void
@@ -2948,8 +2948,8 @@ NotationView::paintEvent(TQPaintEvent *e)
getPageMargins(leftMargin, topMargin);
if (m_pageMode == LinedStaff::ContinuousPageMode) {
- // relayout if the window width changes significantly in continuous page mode
- int diff = int(getPageWidth() - leftMargin * 2 - m_hlayout->getPageWidth());
+ // retqlayout if the window width changes significantly in continuous page mode
+ int diff = int(getPageWidth() - leftMargin * 2 - m_htqlayout->getPageWidth());
if (diff < -10 || diff > 10) {
setPageMode(m_pageMode);
refreshSegment(0, 0, 0);
@@ -2990,15 +2990,15 @@ NotationView::paintEvent(TQPaintEvent *e)
}
}
- slotSetOperationNameAndStatus(i18n(" Ready."));
+ slotSetOperationNameAndtqStatus(i18n(" Ready."));
}
bool NotationView::applyLayout(int staffNo, timeT startTime, timeT endTime)
{
- slotSetOperationNameAndStatus(i18n("Laying out score..."));
+ slotSetOperationNameAndtqStatus(i18n("Laying out score..."));
ProgressDialog::processEvents();
- m_hlayout->setStaffCount(m_staffs.size());
+ m_htqlayout->setStaffCount(m_staffs.size());
Profiler profiler("NotationView::applyLayout");
unsigned int i;
@@ -3008,20 +3008,20 @@ bool NotationView::applyLayout(int staffNo, timeT startTime, timeT endTime)
if (staffNo >= 0 && (int)i != staffNo)
continue;
- slotSetOperationNameAndStatus(i18n("Laying out staff %1...").arg(i + 1));
+ slotSetOperationNameAndtqStatus(i18n("Laying out staff %1...").tqarg(i + 1));
ProgressDialog::processEvents();
- m_hlayout->resetStaff(*m_staffs[i], startTime, endTime);
- m_vlayout->resetStaff(*m_staffs[i], startTime, endTime);
- m_hlayout->scanStaff(*m_staffs[i], startTime, endTime);
- m_vlayout->scanStaff(*m_staffs[i], startTime, endTime);
+ m_htqlayout->resetStaff(*m_staffs[i], startTime, endTime);
+ m_vtqlayout->resetStaff(*m_staffs[i], startTime, endTime);
+ m_htqlayout->scanStaff(*m_staffs[i], startTime, endTime);
+ m_vtqlayout->scanStaff(*m_staffs[i], startTime, endTime);
}
- slotSetOperationNameAndStatus(i18n("Reconciling staffs..."));
+ slotSetOperationNameAndtqStatus(i18n("Reconciling staffs..."));
ProgressDialog::processEvents();
- m_hlayout->finishLayout(startTime, endTime);
- m_vlayout->finishLayout(startTime, endTime);
+ m_htqlayout->finishLayout(startTime, endTime);
+ m_vtqlayout->finishLayout(startTime, endTime);
// find the last finishing staff for future use
@@ -3194,8 +3194,8 @@ void NotationView::setCurrentSelection(EventSelection* s, bool preview,
getLinedStaff(segment)->positionElements(std::min(startA, startB),
std::max(endA, endB));
} else {
- // mark refresh status and then request a repaint
- segment.getRefreshStatus
+ // mark refresh status and then request a tqrepaint
+ segment.getRefreshtqStatus
(m_segmentsRefreshStatusIds
[getLinedStaff(segment)->getId()]).
push(std::min(startA, startB), std::max(endA, endB));
@@ -3211,14 +3211,14 @@ void NotationView::setCurrentSelection(EventSelection* s, bool preview,
getLinedStaff(s->getSegment())->positionElements(startB, endB);
} else {
- // mark refresh status and then request a repaint
+ // mark refresh status and then request a tqrepaint
- oldSelection->getSegment().getRefreshStatus
+ oldSelection->getSegment().getRefreshtqStatus
(m_segmentsRefreshStatusIds
[getLinedStaff(oldSelection->getSegment())->getId()]).
push(startA, endA);
- s->getSegment().getRefreshStatus
+ s->getSegment().getRefreshtqStatus
(m_segmentsRefreshStatusIds
[getLinedStaff(s->getSegment())->getId()]).
push(startB, endB);
@@ -3349,10 +3349,10 @@ void NotationView::setNotePixmapFactory(NotePixmapFactory* f)
{
delete m_notePixmapFactory;
m_notePixmapFactory = f;
- if (m_hlayout)
- m_hlayout->setNotePixmapFactory(m_notePixmapFactory);
- if (m_vlayout)
- m_vlayout->setNotePixmapFactory(m_notePixmapFactory);
+ if (m_htqlayout)
+ m_htqlayout->setNotePixmapFactory(m_notePixmapFactory);
+ if (m_vtqlayout)
+ m_vtqlayout->setNotePixmapFactory(m_notePixmapFactory);
}
Segment *
@@ -3469,7 +3469,7 @@ NotationView::getStaffForCanvasCoords(int x, int y) const
LinedStaff::LinedStaffCoords coords =
s->getLayoutCoordsForCanvasCoords(x, y);
- timeT t = m_hlayout->getTimeForX(coords.first);
+ timeT t = m_htqlayout->getTimeForX(coords.first);
// In order to find the correct starting and ending bar of the segment,
// make infinitesimal shifts (+1 and -1) towards its center.
timeT t0 = getDocument()->getComposition().getBarStartForTime(m_staffs[m_currentStaff]->getSegment().getStartTime()+1);
@@ -3488,7 +3488,7 @@ NotationView::getStaffForCanvasCoords(int x, int y) const
LinedStaff::LinedStaffCoords coords =
s->getLayoutCoordsForCanvasCoords(x, y);
- timeT t = m_hlayout->getTimeForX(coords.first);
+ timeT t = m_htqlayout->getTimeForX(coords.first);
// In order to find the correct starting and ending bar of the segment,
// make infinitesimal shifts (+1 and -1) towards its center.
timeT t0 = getDocument()->getComposition().getBarStartForTime(m_staffs[i]->getSegment().getStartTime()+1);
@@ -3589,8 +3589,8 @@ void NotationView::print(bool previewOnly)
LinedStaff::LinedStaffCoords cc1 = staff->getLayoutCoordsForCanvasCoords
(pageRect.x() + pageRect.width(), pageRect.y() + pageRect.height());
- timeT t0 = m_hlayout->getTimeForX(cc0.first);
- timeT t1 = m_hlayout->getTimeForX(cc1.first);
+ timeT t0 = m_htqlayout->getTimeForX(cc0.first);
+ timeT t1 = m_htqlayout->getTimeForX(cc1.first);
m_staffs[i]->setPrintPainter(&printpainter);
m_staffs[i]->checkRendered(t0, t1);
@@ -3629,8 +3629,8 @@ void NotationView::print(bool previewOnly)
LinedStaff::LinedStaffCoords cc1 = staff->getLayoutCoordsForCanvasCoords
(pageRect.x() + pageRect.width(), pageRect.y() + pageRect.height());
- timeT t0 = m_hlayout->getTimeForX(cc0.first);
- timeT t1 = m_hlayout->getTimeForX(cc1.first);
+ timeT t0 = m_htqlayout->getTimeForX(cc0.first);
+ timeT t1 = m_htqlayout->getTimeForX(cc1.first);
m_staffs[i]->renderPrintable(t0, t1);
}
@@ -3745,7 +3745,7 @@ NotationView::updateThumbnails(bool complete)
int w = pageWidth - leftMargin / 2;
int h = pageHeight;
- TQString str = TQString("%1").arg(page + 1);
+ TQString str = TQString("%1").tqarg(page + 1);
thumbPainter.drawRect(x / thumbScale, y / thumbScale,
w / thumbScale, h / thumbScale);
@@ -3809,7 +3809,7 @@ void NotationView::refreshSegment(Segment *segment,
}
setMenuStates();
- slotSetOperationNameAndStatus(i18n(" Ready."));
+ slotSetOperationNameAndtqStatus(i18n(" Ready."));
NOTATION_DEBUG << "*** " << endl;
}
@@ -3876,7 +3876,7 @@ void NotationView::readjustCanvasSize()
double maxWidth = 0.0;
int maxHeight = 0;
- slotSetOperationNameAndStatus(i18n("Sizing and allocating canvas..."));
+ slotSetOperationNameAndtqStatus(i18n("Sizing and allocating canvas..."));
ProgressDialog::processEvents();
int progressTotal = m_staffs.size() + 2;
@@ -3886,7 +3886,7 @@ void NotationView::readjustCanvasSize()
LinedStaff &staff = *m_staffs[i];
- staff.sizeStaff(*m_hlayout);
+ staff.sizeStaff(*m_htqlayout);
UPDATE_PROGRESS(1);
if (staff.getTotalWidth() + staff.getX() > maxWidth) {
@@ -3944,7 +3944,7 @@ void NotationView::readjustCanvasSize()
}
}
- // Give a correct vertical alignment to track headers
+ // Give a correct vertical tqalignment to track headers
if ((m_pageMode == LinedStaff::LinearMode) && m_showHeadersGroup) {
m_headersGroupView->setContentsPos(0, getCanvasView()->contentsY());
}
@@ -4067,7 +4067,7 @@ void NotationView::initActionDataMaps()
(NotationStrings::getReferenceName(Note(type, 0), false));
TQString shortName(TQString("change_%1%2")
- .arg(notationOnly ? "notation_" : "").arg(refName));
+ .tqarg(notationOnly ? "notation_" : "").tqarg(refName));
shortName.replace(TQRegExp("-"), "_");
TQString titleName
@@ -4095,7 +4095,7 @@ void NotationView::initActionDataMaps()
Mark mark = marks[i];
TQString markName(strtoqstr(mark));
- TQString actionName = TQString("add_%1").arg(markName);
+ TQString actionName = TQString("add_%1").tqarg(markName);
m_markActionDataMap->insert
(actionName, new MarkActionData
@@ -4110,10 +4110,10 @@ void NotationView::setupProgress(KProgress* bar)
if (bar) {
NOTATION_DEBUG << "NotationView::setupProgress(bar)\n";
- connect(m_hlayout, TQT_SIGNAL(setProgress(int)),
+ connect(m_htqlayout, TQT_SIGNAL(setProgress(int)),
bar, TQT_SLOT(setValue(int)));
- connect(m_hlayout, TQT_SIGNAL(incrementProgress(int)),
+ connect(m_htqlayout, TQT_SIGNAL(incrementProgress(int)),
bar, TQT_SLOT(advance(int)));
connect(this, TQT_SIGNAL(setProgress(int)),
@@ -4142,11 +4142,11 @@ void NotationView::setupProgress(ProgressDialog* dialog)
setupProgress(dialog->progressBar());
connect(dialog, TQT_SIGNAL(cancelClicked()),
- m_hlayout, TQT_SLOT(slotCancel()));
+ m_htqlayout, TQT_SLOT(slotCancel()));
for (unsigned int i = 0; i < m_staffs.size(); ++i) {
connect(m_staffs[i], TQT_SIGNAL(setOperationName(TQString)),
- this, TQT_SLOT(slotSetOperationNameAndStatus(TQString)));
+ this, TQT_SLOT(slotSetOperationNameAndtqStatus(TQString)));
connect(dialog, TQT_SIGNAL(cancelClicked()),
m_staffs[i], TQT_SLOT(slotCancel()));
@@ -4159,10 +4159,10 @@ void NotationView::setupProgress(ProgressDialog* dialog)
}
-void NotationView::slotSetOperationNameAndStatus(TQString name)
+void NotationView::slotSetOperationNameAndtqStatus(TQString name)
{
emit setOperationName(name);
- statusBar()->changeItem(TQString(" %1").arg(name),
+ statusBar()->changeItem(TQString(" %1").tqarg(name),
KTmpStatusMsg::getDefaultId());
}
@@ -4170,7 +4170,7 @@ void NotationView::disconnectProgress()
{
NOTATION_DEBUG << "NotationView::disconnectProgress()" << endl;
- m_hlayout->disconnect();
+ m_htqlayout->disconnect();
disconnect(TQT_SIGNAL(setProgress(int)));
disconnect(TQT_SIGNAL(incrementProgress(int)));
disconnect(TQT_SIGNAL(setOperationName(TQString)));
@@ -4203,18 +4203,18 @@ void NotationView::updateViewCaption()
trackPosition = track->getPosition();
// std::cout << std::endl << std::endl << std::endl << "DEBUG TITLE BAR: " << getDocument()->getTitle() << std::endl << std::endl << std::endl;
setCaption(i18n("%1 - Segment Track #%2 - Notation")
- .arg(getDocument()->getTitle())
- .arg(trackPosition + 1));
+ .tqarg(getDocument()->getTitle())
+ .tqarg(trackPosition + 1));
} else if (m_segments.size() == getDocument()->getComposition().getNbSegments()) {
setCaption(i18n("%1 - All Segments - Notation")
- .arg(getDocument()->getTitle()));
+ .tqarg(getDocument()->getTitle()));
} else {
setCaption(i18n("%1 - Segment - Notation", "%1 - %n Segments - Notation", m_segments.size())
- .arg(getDocument()->getTitle()));
+ .tqarg(getDocument()->getTitle()));
}
}
@@ -4230,7 +4230,7 @@ NotationView::MarkActionDataMap* NotationView::m_markActionDataMap = 0;
void
-NotationView::slotUpdateInsertModeStatus()
+NotationView::slotUpdateInsertModetqStatus()
{
TQString tripletMessage = i18n("Triplet");
TQString chordMessage = i18n("Chord");
@@ -4238,22 +4238,22 @@ NotationView::slotUpdateInsertModeStatus()
TQString message;
if (isInTripletMode()) {
- message = i18n("%1 %2").arg(message).arg(tripletMessage);
+ message = i18n("%1 %2").tqarg(message).tqarg(tripletMessage);
}
if (isInChordMode()) {
- message = i18n("%1 %2").arg(message).arg(chordMessage);
+ message = i18n("%1 %2").tqarg(message).tqarg(chordMessage);
}
if (isInGraceMode()) {
- message = i18n("%1 %2").arg(message).arg(graceMessage);
+ message = i18n("%1 %2").tqarg(message).tqarg(graceMessage);
}
m_insertModeLabel->setText(message);
}
void
-NotationView::slotUpdateAnnotationsStatus()
+NotationView::slotUpdateAnnotationstqStatus()
{
if (!areAnnotationsVisible()) {
for (int i = 0; i < getStaffCount(); ++i) {
@@ -4273,7 +4273,7 @@ NotationView::slotUpdateAnnotationsStatus()
}
void
-NotationView::slotUpdateLilyPondDirectivesStatus()
+NotationView::slotUpdateLilyPondDirectivestqStatus()
{
if (!areLilyPondDirectivesVisible()) {
for (int i = 0; i < getStaffCount(); ++i) {
@@ -4317,22 +4317,22 @@ NotationView::slotChangeSpacingFromAction()
} else {
KMessageBox::sorry
- (this, i18n("Unknown spacing action %1").arg(name));
+ (this, i18n("Unknown spacing action %1").tqarg(name));
}
}
void
NotationView::slotChangeSpacing(int spacing)
{
- if (m_hlayout->getSpacing() == spacing)
+ if (m_htqlayout->getSpacing() == spacing)
return ;
- m_hlayout->setSpacing(spacing);
+ m_htqlayout->setSpacing(spacing);
// m_spacingSlider->setSize(spacing);
KToggleAction *action = dynamic_cast<KToggleAction *>
- (actionCollection()->action(TQString("spacing_%1").arg(spacing).ascii()));
+ (actionCollection()->action(TQString("spacing_%1").tqarg(spacing).ascii()));
if (action)
action->setChecked(true);
else {
@@ -4357,7 +4357,7 @@ NotationView::slotChangeSpacing(int spacing)
void
NotationView::slotChangeProportionFromIndex(int n)
{
- std::vector<int> proportions = m_hlayout->getAvailableProportions();
+ std::vector<int> proportions = m_htqlayout->getAvailableProportions();
if (n >= (int)proportions.size())
n = proportions.size() - 1;
slotChangeProportion(proportions[n]);
@@ -4375,22 +4375,22 @@ NotationView::slotChangeProportionFromAction()
} else {
KMessageBox::sorry
- (this, i18n("Unknown proportion action %1").arg(name));
+ (this, i18n("Unknown proportion action %1").tqarg(name));
}
}
void
NotationView::slotChangeProportion(int proportion)
{
- if (m_hlayout->getProportion() == proportion)
+ if (m_htqlayout->getProportion() == proportion)
return ;
- m_hlayout->setProportion(proportion);
+ m_htqlayout->setProportion(proportion);
// m_proportionSlider->setSize(proportion);
KToggleAction *action = dynamic_cast<KToggleAction *>
- (actionCollection()->action(TQString("proportion_%1").arg(proportion).ascii()));
+ (actionCollection()->action(TQString("proportion_%1").tqarg(proportion).ascii()));
if (action)
action->setChecked(true);
else {
@@ -4422,7 +4422,7 @@ NotationView::slotChangeFontFromAction()
slotChangeFont(name);
} else {
KMessageBox::sorry
- (this, i18n("Unknown font action %1").arg(name));
+ (this, i18n("Unknown font action %1").tqarg(name));
}
}
@@ -4440,11 +4440,11 @@ NotationView::slotChangeFontSizeFromAction()
slotChangeFont(m_fontName, size);
else {
KMessageBox::sorry
- (this, i18n("Unknown font size %1").arg(name));
+ (this, i18n("Unknown font size %1").tqarg(name));
}
} else {
KMessageBox::sorry
- (this, i18n("Unknown font size action %1").arg(name));
+ (this, i18n("Unknown font size action %1").tqarg(name));
}
}
@@ -4581,7 +4581,7 @@ NotationView::slotChangeFont(std::string newName, int newSize)
int topMargin = 0, leftMargin = 0;
getPageMargins(leftMargin, topMargin);
- m_hlayout->setPageWidth(pageWidth - leftMargin * 2);
+ m_htqlayout->setPageWidth(pageWidth - leftMargin * 2);
}
for (unsigned int i = 0; i < m_staffs.size(); ++i) {
@@ -4594,7 +4594,7 @@ NotationView::slotChangeFont(std::string newName, int newSize)
bool layoutApplied = applyLayout();
if (!layoutApplied)
- KMessageBox::sorry(0, "Couldn't apply layout");
+ KMessageBox::sorry(0, "Couldn't apply tqlayout");
else {
for (unsigned int i = 0; i < m_staffs.size(); ++i) {
m_staffs[i]->markChanged();
@@ -5357,7 +5357,7 @@ void NotationView::slotAddIndication(std::string type, TQString desc)
setSingleSelectedEvent(m_currentEventSelection->getSegment(),
command->getLastInsertedEvent());
} else {
- KMessageBox::sorry(this, i18n("Can't add overlapping %1 indications").arg(desc)); // TODO PLURAL - how many 'indications' ?
+ KMessageBox::sorry(this, i18n("Can't add overlapping %1 indications").tqarg(desc)); // TODO PLURAL - how many 'indications' ?
delete command;
}
}
@@ -5568,7 +5568,7 @@ void NotationView::slotSetStyleFromAction()
if (name.left(6) == "style_") {
name = name.right(name.length() - 6);
- KTmpStatusMsg msg(i18n("Changing to %1 style...").arg(name),
+ KTmpStatusMsg msg(i18n("Changing to %1 style...").tqarg(name),
this);
addCommandToHistory(new ChangeStyleCommand
@@ -5576,7 +5576,7 @@ void NotationView::slotSetStyleFromAction()
*m_currentEventSelection));
} else {
KMessageBox::sorry
- (this, i18n("Unknown style action %1").arg(name));
+ (this, i18n("Unknown style action %1").tqarg(name));
}
}
@@ -5608,7 +5608,7 @@ void NotationView::slotInsertNoteFromAction()
} catch (...) {
KMessageBox::sorry
- (this, i18n("Unknown note insert action %1").arg(name));
+ (this, i18n("Unknown note insert action %1").tqarg(name));
return ;
}
@@ -6027,9 +6027,9 @@ NotationView::slotMakeOrnament()
TQString name;
int barNo = segment.getComposition()->getBarNumber(absTime);
if (track) {
- name = TQString(i18n("Ornament track %1 bar %2").arg(track->getPosition() + 1).arg(barNo + 1));
+ name = TQString(i18n("Ornament track %1 bar %2").tqarg(track->getPosition() + 1).tqarg(barNo + 1));
} else {
- name = TQString(i18n("Ornament bar %1").arg(barNo + 1));
+ name = TQString(i18n("Ornament bar %1").tqarg(barNo + 1));
}
MakeOrnamentDialog dialog(this, name, basePitch);
@@ -6438,22 +6438,22 @@ NotationView::slotSetPointerPosition(timeT time, bool scroll)
for (unsigned int i = 0; i < m_staffs.size(); ++i) {
- double layoutX = m_hlayout->getXForTimeByEvent(time);
+ double layoutX = m_htqlayout->getXForTimeByEvent(time);
Segment &seg = m_staffs[i]->getSegment();
bool good = true;
- if (barNo >= m_hlayout->getLastVisibleBarOnStaff(*m_staffs[i])) {
+ if (barNo >= m_htqlayout->getLastVisibleBarOnStaff(*m_staffs[i])) {
if (seg.isRepeating() && time < seg.getRepeatEndTime()) {
timeT mappedTime =
seg.getStartTime() +
((time - seg.getStartTime()) %
(seg.getEndMarkerTime() - seg.getStartTime()));
- layoutX = m_hlayout->getXForTimeByEvent(mappedTime);
+ layoutX = m_htqlayout->getXForTimeByEvent(mappedTime);
} else {
good = false;
}
- } else if (barNo < m_hlayout->getFirstVisibleBarOnStaff(*m_staffs[i])) {
+ } else if (barNo < m_htqlayout->getFirstVisibleBarOnStaff(*m_staffs[i])) {
good = false;
}
@@ -6536,7 +6536,7 @@ NotationView::slotSetCurrentStaff(int staffNo)
m_chordNameRuler->setCurrentSegment(segment);
m_rawNoteRuler->setCurrentSegment(segment);
- m_rawNoteRuler->repaint();
+ m_rawNoteRuler->tqrepaint();
setControlRulersCurrentSegment();
updateView();
@@ -6750,7 +6750,7 @@ NotationView::doDeferredCursorMove()
t == segment.getEndTime() ||
t == segment.getBarStartForTime(t)) {
- staff->setInsertCursorPosition(*m_hlayout, t);
+ staff->setInsertCursorPosition(*m_htqlayout, t);
if (type == CursorMoveAndMakeVisible) {
double cx;
@@ -6976,21 +6976,21 @@ void NotationView::slotMultiPageMode()
void NotationView::slotToggleChordsRuler()
{
- if (m_hlayout->isPageMode())
+ if (m_htqlayout->isPageMode())
return ;
toggleWidget(m_chordNameRuler, "show_chords_ruler");
}
void NotationView::slotToggleRawNoteRuler()
{
- if (m_hlayout->isPageMode())
+ if (m_htqlayout->isPageMode())
return ;
toggleWidget(m_rawNoteRuler, "show_raw_note_ruler");
}
void NotationView::slotToggleTempoRuler()
{
- if (m_hlayout->isPageMode())
+ if (m_htqlayout->isPageMode())
return ;
toggleWidget(m_tempoRuler, "show_tempo_ruler");
}
@@ -6998,7 +6998,7 @@ void NotationView::slotToggleTempoRuler()
void NotationView::slotToggleAnnotations()
{
m_annotationsVisible = !m_annotationsVisible;
- slotUpdateAnnotationsStatus();
+ slotUpdateAnnotationstqStatus();
//!!! use refresh mechanism
refreshSegment(0, 0, 0);
}
@@ -7006,7 +7006,7 @@ void NotationView::slotToggleAnnotations()
void NotationView::slotToggleLilyPondDirectives()
{
m_lilyPondDirectivesVisible = !m_lilyPondDirectivesVisible;
- slotUpdateLilyPondDirectivesStatus();
+ slotUpdateLilyPondDirectivestqStatus();
//!!! use refresh mechanism
refreshSegment(0, 0, 0);
}
@@ -7116,7 +7116,7 @@ void NotationView::slotNonNotationItemPressed(TQMouseEvent *e, TQCanvasItem *it)
} else if (dynamic_cast<TQCanvasTimeSigSprite *>(it)) {
double layoutX = (dynamic_cast<TQCanvasTimeSigSprite *>(it))->getLayoutX();
- emit editTimeSignature(m_hlayout->getTimeForX(layoutX));
+ emit editTimeSignature(m_htqlayout->getTimeForX(layoutX));
}
}
@@ -7194,17 +7194,17 @@ NotationView::slotHoveredOverAbsoluteTimeChanged(unsigned int time)
// TQString message;
// TQString format("%ld (%ld.%03lds)");
- // format = i18n("Time: %1").arg(format);
+ // format = i18n("Time: %1").tqarg(format);
// message.sprintf(format, t, rt.sec, ms);
TQString message = i18n("Time: %1 (%2.%3s)")
- .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'));
+ .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'));
m_hoveredOverAbsoluteTime->setText(message);
}
@@ -7396,8 +7396,8 @@ NotationView::slotCheckRendered(double cx0, double cx1)
LinedStaff::LinedStaffCoords cc1 = staff->getLayoutCoordsForCanvasCoords
(cx1, staff->getTotalHeight() + staff->getY());
- timeT t0 = m_hlayout->getTimeForX(cc0.first);
- timeT t1 = m_hlayout->getTimeForX(cc1.first);
+ timeT t0 = m_htqlayout->getTimeForX(cc0.first);
+ timeT t1 = m_htqlayout->getTimeForX(cc1.first);
if (dynamic_cast<NotationStaff *>(staff)->checkRendered(t0, t1)) {
something = true; //!!!