diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-09-06 20:59:29 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-09-06 20:59:29 +0000 |
commit | 11f31c37e5fa4889d9989f10272f44845449cb7b (patch) | |
tree | 4383da04a76c497950d957fc6120b0fd0d9082c2 /src/gui/editors/notation | |
parent | 832eb69d571e8e518db45d0c0e6fbc0f00690209 (diff) | |
download | rosegarden-11f31c37e5fa4889d9989f10272f44845449cb7b.tar.gz rosegarden-11f31c37e5fa4889d9989f10272f44845449cb7b.zip |
Initial TQt conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/rosegarden@1172292 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/gui/editors/notation')
61 files changed, 1678 insertions, 1675 deletions
diff --git a/src/gui/editors/notation/ClefInserter.cpp b/src/gui/editors/notation/ClefInserter.cpp index f39327e..5e324a9 100644 --- a/src/gui/editors/notation/ClefInserter.cpp +++ b/src/gui/editors/notation/ClefInserter.cpp @@ -37,8 +37,8 @@ #include "NotationView.h" #include "NotePixmapFactory.h" #include <kaction.h> -#include <qiconset.h> -#include <qstring.h> +#include <tqiconset.h> +#include <tqstring.h> namespace Rosegarden @@ -48,21 +48,21 @@ ClefInserter::ClefInserter(NotationView* view) : NotationTool("ClefInserter", view), m_clef(Clef::Treble) { - QIconSet icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory:: + TQIconSet icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory:: makeToolbarPixmap("select"))); new KAction(i18n("Switch to Select Tool"), icon, 0, this, - SLOT(slotSelectSelected()), actionCollection(), + TQT_SLOT(slotSelectSelected()), actionCollection(), "select"); new KAction(i18n("Switch to Erase Tool"), "eraser", 0, this, - SLOT(slotEraseSelected()), actionCollection(), + TQT_SLOT(slotEraseSelected()), actionCollection(), "erase"); icon = QIconSet (NotePixmapFactory::toQPixmap(NotePixmapFactory:: makeToolbarPixmap("crotchet"))); new KAction(i18n("Switch to Inserting Notes"), icon, 0, this, - SLOT(slotNotesSelected()), actionCollection(), + TQT_SLOT(slotNotesSelected()), actionCollection(), "notes"); createMenu("clefinserter.rc"); @@ -97,7 +97,7 @@ void ClefInserter::setClef(std::string clefType) void ClefInserter::handleLeftButtonPress(timeT, int, int staffNo, - QMouseEvent* e, + TQMouseEvent* e, ViewElement*) { if (staffNo < 0) @@ -126,7 +126,7 @@ void ClefInserter::handleLeftButtonPress(timeT, m_nParentView->setSingleSelectedEvent(staffNo, event); } -const QString ClefInserter::ToolName = "clefinserter"; +const TQString ClefInserter::ToolName = "clefinserter"; } #include "ClefInserter.moc" diff --git a/src/gui/editors/notation/ClefInserter.h b/src/gui/editors/notation/ClefInserter.h index 460bfa5..427f885 100644 --- a/src/gui/editors/notation/ClefInserter.h +++ b/src/gui/editors/notation/ClefInserter.h @@ -28,11 +28,11 @@ #include "base/NotationTypes.h" #include "NotationTool.h" -#include <qstring.h> +#include <tqstring.h> #include "base/Event.h" -class QMouseEvent; +class TQMouseEvent; namespace Rosegarden @@ -59,9 +59,9 @@ public: virtual void handleLeftButtonPress(timeT, int height, int staffNo, - QMouseEvent*, + TQMouseEvent*, ViewElement* el); - static const QString ToolName; + static const TQString ToolName; protected slots: void slotNotesSelected(); diff --git a/src/gui/editors/notation/FontViewFrame.cpp b/src/gui/editors/notation/FontViewFrame.cpp index ab0498f..d2a668f 100644 --- a/src/gui/editors/notation/FontViewFrame.cpp +++ b/src/gui/editors/notation/FontViewFrame.cpp @@ -28,12 +28,12 @@ #include <klocale.h> #include <kmessagebox.h> -#include <qfontmetrics.h> -#include <qframe.h> -#include <qsize.h> -#include <qstring.h> -#include <qwidget.h> -#include <qpainter.h> +#include <tqfontmetrics.h> +#include <tqframe.h> +#include <tqsize.h> +#include <tqstring.h> +#include <tqwidget.h> +#include <tqpainter.h> #ifdef HAVE_XFT #include <ft2build.h> @@ -46,8 +46,8 @@ namespace Rosegarden { -FontViewFrame::FontViewFrame( int pixelSize, QWidget* parent, const char* name ) : - QFrame(parent, name), +FontViewFrame::FontViewFrame( int pixelSize, TQWidget* parent, const char* name ) : + TQFrame(parent, name), m_fontSize(pixelSize), m_tableFont(0) { @@ -63,7 +63,7 @@ FontViewFrame::~FontViewFrame() } void -FontViewFrame::setFont(QString font) +FontViewFrame::setFont(TQString font) { m_fontName = font; loadFont(); @@ -104,9 +104,9 @@ FontViewFrame::loadFont() FcChar8 *matchFamily; FcPatternGetString(match, FC_FAMILY, 0, &matchFamily); - if (QString((const char *)matchFamily).lower() != m_fontName.lower()) { + if (TQString((const char *)matchFamily).lower() != m_fontName.lower()) { KMessageBox::sorry(this, i18n("Warning: No good match for font name %1 (best is %2)"). - arg(m_fontName).arg(QString((const char *)matchFamily))); + arg(m_fontName).arg(TQString((const char *)matchFamily))); m_fontName = (const char *)matchFamily; } @@ -114,7 +114,7 @@ FontViewFrame::loadFont() if (!m_tableFont) { KMessageBox::error(this, i18n("Error: Unable to open best-match font %1"). - arg(QString((const char *)matchFamily))); + arg(TQString((const char *)matchFamily))); } #endif } @@ -125,46 +125,46 @@ void FontViewFrame::setGlyphs(bool glyphs) update(); } -QSize FontViewFrame::sizeHint() const +TQSize FontViewFrame::sizeHint() const { - return QSize(16 * m_fontSize * 3 / 2 + margin() + 2 * frameWidth(), + return TQSize(16 * m_fontSize * 3 / 2 + margin() + 2 * frameWidth(), 16 * m_fontSize * 3 / 2 + margin() + 2 * frameWidth()); } -QSize FontViewFrame::cellSize() const +TQSize FontViewFrame::cellSize() const { - QFontMetrics fm = fontMetrics(); - return QSize( fm.maxWidth(), fm.lineSpacing() + 1 ); + TQFontMetrics fm = fontMetrics(); + return TQSize( fm.maxWidth(), fm.lineSpacing() + 1 ); } -void FontViewFrame::paintEvent( QPaintEvent* e ) +void FontViewFrame::paintEvent( TQPaintEvent* e ) { #ifdef HAVE_XFT if (!m_tableFont) return ; - QFrame::paintEvent(e); - QPainter p(this); + TQFrame::paintEvent(e); + TQPainter p(this); int ll = 25; int ml = frameWidth() + margin() + ll + 1; int mt = frameWidth() + margin(); - QSize cell((width() - 16 - ml) / 17, (height() - 16 - mt) / 17); + TQSize cell((width() - 16 - ml) / 17, (height() - 16 - mt) / 17); if ( !cell.width() || !cell.height() ) return ; - QColor body(255, 255, 192); - QColor negative(255, 192, 192); - QColor positive(192, 192, 255); - QColor rnegative(255, 128, 128); - QColor rpositive(128, 128, 255); + TQColor body(255, 255, 192); + TQColor negative(255, 192, 192); + TQColor positive(192, 192, 255); + TQColor rnegative(255, 128, 128); + TQColor rpositive(128, 128, 255); Drawable drawable = (Drawable)handle(); XftDraw *draw = XftDrawCreate(x11AppDisplay(), drawable, (Visual *)x11Visual(), x11Colormap()); - QColor pen(Qt::black); + TQColor pen(Qt::black); XftColor col; col.color.red = pen.red () | pen.red() << 8; col.color.green = pen.green () | pen.green() << 8; @@ -185,18 +185,18 @@ void FontViewFrame::paintEvent( QPaintEvent* e ) if (j == 0) continue; p.setFont(kapp->font()); - QFontMetrics afm(kapp->font()); - QString s = QString("%1").arg(m_row * 256 + (j - 1) * 16); + TQFontMetrics afm(kapp->font()); + TQString s = TQString("%1").arg(m_row * 256 + (j - 1) * 16); p.drawText(x - afm.width(s), y, s); - p.setPen(QColor(190, 190, 255)); + p.setPen(TQColor(190, 190, 255)); p.drawLine(0, y, width(), y); p.setPen(Qt::black); continue; } else if (j == 0) { p.setFont(kapp->font()); - QString s = QString("%1").arg(i - 1); + TQString s = TQString("%1").arg(i - 1); p.drawText(x, y, s); - p.setPen(QColor(190, 190, 255)); + p.setPen(TQColor(190, 190, 255)); p.drawLine(x, 0, x, height()); p.setPen(Qt::black); continue; diff --git a/src/gui/editors/notation/FontViewFrame.h b/src/gui/editors/notation/FontViewFrame.h index 8a1a946..a344fc1 100644 --- a/src/gui/editors/notation/FontViewFrame.h +++ b/src/gui/editors/notation/FontViewFrame.h @@ -26,13 +26,13 @@ #ifndef _RG_FONTVIEWFRAME_H_ #define _RG_FONTVIEWFRAME_H_ -#include <qframe.h> -#include <qsize.h> -#include <qstring.h> +#include <tqframe.h> +#include <tqsize.h> +#include <tqstring.h> -class QWidget; -class QPaintEvent; +class TQWidget; +class TQPaintEvent; namespace Rosegarden @@ -45,24 +45,24 @@ class FontViewFrame : public QFrame Q_OBJECT public: - FontViewFrame(int pixelSize, QWidget *parent = 0, const char *name = 0); + FontViewFrame(int pixelSize, TQWidget *parent = 0, const char *name = 0); virtual ~FontViewFrame(); - QSize sizeHint() const; + TQSize sizeHint() const; bool hasRow(int row) const; public slots: - void setFont(QString name); + void setFont(TQString name); void setRow(int); void setGlyphs(bool glyphs); protected: - QSize cellSize() const; - void paintEvent( QPaintEvent* ); + TQSize cellSize() const; + void paintEvent( TQPaintEvent* ); void loadFont(); private: - QString m_fontName; + TQString m_fontName; int m_fontSize; void *m_tableFont; int m_row; diff --git a/src/gui/editors/notation/GuitarChordInserter.cpp b/src/gui/editors/notation/GuitarChordInserter.cpp index 2482b87..b4f6839 100644 --- a/src/gui/editors/notation/GuitarChordInserter.cpp +++ b/src/gui/editors/notation/GuitarChordInserter.cpp @@ -41,9 +41,9 @@ #include "NotationView.h" #include "NotePixmapFactory.h" #include <kaction.h> -#include <qdialog.h> -#include <qiconset.h> -#include <qstring.h> +#include <tqdialog.h> +#include <tqiconset.h> +#include <tqstring.h> namespace Rosegarden @@ -53,15 +53,15 @@ GuitarChordInserter::GuitarChordInserter(NotationView* view) : NotationTool("GuitarChordInserter", view), m_guitarChordSelector(0) { - QIconSet icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory:: + TQIconSet icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory:: makeToolbarPixmap("select"))); new KAction(i18n("Switch to Select Tool"), icon, 0, this, - SLOT(slotSelectSelected()), actionCollection(), + TQT_SLOT(slotSelectSelected()), actionCollection(), "select"); new KAction(i18n("Switch to Erase Tool"), "eraser", 0, this, - SLOT(slotEraseSelected()), actionCollection(), + TQT_SLOT(slotEraseSelected()), actionCollection(), "erase"); icon = QIconSet @@ -69,7 +69,7 @@ GuitarChordInserter::GuitarChordInserter(NotationView* view) makeToolbarPixmap("crotchet"))); new KAction(i18n("Switch to Inserting Notes"), icon, 0, this, - SLOT(slotNoteSelected()), actionCollection(), + TQT_SLOT(slotNoteSelected()), actionCollection(), "notes"); m_guitarChordSelector = new GuitarChordSelectorDialog(m_nParentView); @@ -96,7 +96,7 @@ void GuitarChordInserter::slotSelectSelected() void GuitarChordInserter::handleLeftButtonPress(timeT, int, int staffNo, - QMouseEvent* e, + TQMouseEvent* e, ViewElement *element) { NOTATION_DEBUG << "GuitarChordInserter::handleLeftButtonPress" << endl; @@ -119,7 +119,7 @@ bool GuitarChordInserter::processDialog( Staff* staff, { bool result = false; - if (m_guitarChordSelector->exec() == QDialog::Accepted) { + if (m_guitarChordSelector->exec() == TQDialog::Accepted) { Guitar::Chord chord = m_guitarChordSelector->getChord(); GuitarChordInsertionCommand *command = @@ -159,7 +159,7 @@ void GuitarChordInserter::handleSelectedGuitarChord (ViewElement* element, Staff } catch (Exception e) {} } -void GuitarChordInserter::createNewGuitarChord (ViewElement* element, Staff *staff, QMouseEvent* e) +void GuitarChordInserter::createNewGuitarChord (ViewElement* element, Staff *staff, TQMouseEvent* e) { NOTATION_DEBUG << "GuitarChordInserter::createNewGuitarChord" << endl; Event *clef = 0, *key = 0; @@ -179,7 +179,7 @@ void GuitarChordInserter::createNewGuitarChord (ViewElement* element, Staff *sta processDialog( staff, insertionTime ); } -const QString GuitarChordInserter::ToolName = "guitarchordinserter"; +const TQString GuitarChordInserter::ToolName = "guitarchordinserter"; } #include "GuitarChordInserter.moc" diff --git a/src/gui/editors/notation/GuitarChordInserter.h b/src/gui/editors/notation/GuitarChordInserter.h index 3bd5660..d66174b 100644 --- a/src/gui/editors/notation/GuitarChordInserter.h +++ b/src/gui/editors/notation/GuitarChordInserter.h @@ -27,11 +27,11 @@ #define _RG_GUITAR_CHORD_INSERTER_H_ #include "NotationTool.h" -#include <qstring.h> +#include <tqstring.h> #include "base/Event.h" -class QMouseEvent; +class TQMouseEvent; namespace Rosegarden @@ -56,17 +56,17 @@ public: virtual void handleLeftButtonPress(timeT t, int height, int staffNo, - QMouseEvent* e, + TQMouseEvent* e, ViewElement *element); /* virtual void handleMouseDoubleClick(timeT, int height, int staffNo, - QMouseEvent*, + TQMouseEvent*, ViewElement* el); */ - static const QString ToolName; + static const TQString ToolName; protected slots: void slotGuitarChordSelected(); @@ -84,7 +84,7 @@ private: void createNewGuitarChord (ViewElement* element, Staff *staff, - QMouseEvent* e); + TQMouseEvent* e); bool processDialog (Staff *staff, timeT& insertionTime); diff --git a/src/gui/editors/notation/HeadersGroup.cpp b/src/gui/editors/notation/HeadersGroup.cpp index c0a2de0..f7dcc82 100644 --- a/src/gui/editors/notation/HeadersGroup.cpp +++ b/src/gui/editors/notation/HeadersGroup.cpp @@ -27,10 +27,10 @@ #include <limits> -#include <qsize.h> -#include <qwidget.h> -#include <qvbox.h> -#include <qlabel.h> +#include <tqsize.h> +#include <tqwidget.h> +#include <tqvbox.h> +#include <tqlabel.h> #include "HeadersGroup.h" #include "TrackHeader.h" @@ -43,8 +43,8 @@ namespace Rosegarden HeadersGroup:: -HeadersGroup(QWidget *parent, NotationView * nv, Composition * comp) : - QVBox(parent), +HeadersGroup(TQWidget *parent, NotationView * nv, Composition * comp) : + TQVBox(parent), m_notationView(nv), m_composition(comp), m_usedHeight(0), @@ -83,7 +83,7 @@ void HeadersGroup::completeToHeight(int height) { if (height > m_usedHeight) { - if (!m_filler) m_filler = new QLabel(this); + if (!m_filler) m_filler = new TQLabel(this); m_filler->setFixedHeight(height - m_usedHeight); } } @@ -149,7 +149,7 @@ HeadersGroup::setCurrent(TrackId trackId) } void -HeadersGroup::resizeEvent(QResizeEvent * ev) +HeadersGroup::resizeEvent(TQResizeEvent * ev) { // Needed to avoid gray zone at the right of headers // when width is decreasing diff --git a/src/gui/editors/notation/HeadersGroup.h b/src/gui/editors/notation/HeadersGroup.h index 22d25da..b2a9edb 100644 --- a/src/gui/editors/notation/HeadersGroup.h +++ b/src/gui/editors/notation/HeadersGroup.h @@ -33,13 +33,13 @@ #include "base/Track.h" #include <vector> -#include <qsize.h> -#include <qwidget.h> -#include <qvbox.h> +#include <tqsize.h> +#include <tqwidget.h> +#include <tqvbox.h> -class QLabel; -class QResizeEvent; +class TQLabel; +class TQResizeEvent; namespace Rosegarden @@ -58,7 +58,7 @@ public: /** * Create an empty headers group */ - HeadersGroup(QWidget *parent, NotationView * nv, Composition * comp); + HeadersGroup(TQWidget *parent, NotationView * nv, Composition * comp); void removeAllHeaders(); @@ -123,7 +123,7 @@ signals : void headersResized(int newWidth); private: - void resizeEvent(QResizeEvent * ev); + void resizeEvent(TQResizeEvent * ev); NotationView * m_notationView; Composition * m_composition; @@ -132,7 +132,7 @@ private: TrackHeaderVector m_headers; int m_usedHeight; - QLabel * m_filler; + TQLabel * m_filler; int m_lastX; int m_lastWidth; diff --git a/src/gui/editors/notation/NotationCanvasView.cpp b/src/gui/editors/notation/NotationCanvasView.cpp index 55e63ac..fb7d2d9 100644 --- a/src/gui/editors/notation/NotationCanvasView.cpp +++ b/src/gui/editors/notation/NotationCanvasView.cpp @@ -34,22 +34,22 @@ #include "NotationElement.h" #include "NotationProperties.h" #include "NotationStaff.h" -#include <qcanvas.h> -#include <qcolor.h> -#include <qpainter.h> -#include <qpen.h> -#include <qpoint.h> -#include <qrect.h> -#include <qsize.h> -#include <qstring.h> -#include <qwidget.h> +#include <tqcanvas.h> +#include <tqcolor.h> +#include <tqpainter.h> +#include <tqpen.h> +#include <tqpoint.h> +#include <tqrect.h> +#include <tqsize.h> +#include <tqstring.h> +#include <tqwidget.h> namespace Rosegarden { NotationCanvasView::NotationCanvasView(const LinedStaffManager &staffmgr, - QCanvas *viewing, QWidget *parent, + TQCanvas *viewing, TQWidget *parent, const char *name, WFlags f) : RosegardenCanvasView(viewing, parent, name, f), m_linedStaffManager(staffmgr), @@ -74,11 +74,11 @@ NotationCanvasView::NotationCanvasView(const LinedStaffManager &staffmgr, m_vert1 = new QCanvasLineGroupable(viewing, m_heightMarker); m_vert1->setPoints(0, 0, 0, 8); - m_vert1->setPen(QPen(QColor(64, 64, 64), 1)); + m_vert1->setPen(TQPen(TQColor(64, 64, 64), 1)); m_vert2 = new QCanvasLineGroupable(viewing, m_heightMarker); m_vert2->setPoints(17, 0, 17, 8); - m_vert2->setPen(QPen(QColor(64, 64, 64), 1)); + m_vert2->setPen(TQPen(TQColor(64, 64, 64), 1)); m_heightMarker->hide(); } @@ -99,13 +99,13 @@ NotationCanvasView::setHeightTracking(bool t) } void -NotationCanvasView::contentsMouseReleaseEvent(QMouseEvent *e) +NotationCanvasView::contentsMouseReleaseEvent(TQMouseEvent *e) { emit mouseReleased(e); } void -NotationCanvasView::contentsMouseMoveEvent(QMouseEvent *e) +NotationCanvasView::contentsMouseMoveEvent(TQMouseEvent *e) { NotationStaff *prevStaff = m_currentStaff; int prevHeight = m_currentHeight; @@ -115,7 +115,7 @@ NotationCanvasView::contentsMouseMoveEvent(QMouseEvent *e) if (!m_currentStaff) { - emit hoveredOverNoteChanged(QString::null); + emit hoveredOverNoteChanged(TQString::null); if (prevStaff) { m_heightMarker->hide(); canvas()->update(); @@ -156,13 +156,13 @@ NotationCanvasView::contentsMouseMoveEvent(QMouseEvent *e) emit mouseMoved(e); } -void NotationCanvasView::contentsMousePressEvent(QMouseEvent *e) +void NotationCanvasView::contentsMousePressEvent(TQMouseEvent *e) { NOTATION_DEBUG << "NotationCanvasView::contentsMousePressEvent() - btn : " << e->button() << " - state : " << e->state() << endl; - QCanvasItemList itemList = canvas()->collisions(e->pos()); + TQCanvasItemList itemList = canvas()->collisions(e->pos()); // We don't want to use m_currentStaff/Height, because we want // to make sure the event happens at the point we clicked at @@ -172,7 +172,7 @@ void NotationCanvasView::contentsMousePressEvent(QMouseEvent *e) NotationStaff *staff = dynamic_cast<NotationStaff *> (m_linedStaffManager.getStaffForCanvasCoords(e->x(), e->y())); - QCanvasItemList::Iterator it; + TQCanvasItemList::Iterator it; NotationElement *clickedNote = 0; NotationElement *clickedVagueNote = 0; NotationElement *clickedNonNote = 0; @@ -197,7 +197,7 @@ void NotationCanvasView::contentsMousePressEvent(QMouseEvent *e) if (dynamic_cast<QCanvasNonElementSprite *>(*it)) { emit nonNotationItemPressed(e, *it); return ; - } else if (dynamic_cast<QCanvasText *>(*it)) { + } else if (dynamic_cast<TQCanvasText *>(*it)) { emit textItemPressed(e, *it); return ; } @@ -267,7 +267,7 @@ void NotationCanvasView::contentsMousePressEvent(QMouseEvent *e) handleMousePress(clickHeight, staffNo, e); } -void NotationCanvasView::contentsMouseDoubleClickEvent(QMouseEvent* e) +void NotationCanvasView::contentsMouseDoubleClickEvent(TQMouseEvent* e) { NOTATION_DEBUG << "NotationCanvasView::contentsMouseDoubleClickEvent()\n"; @@ -275,15 +275,15 @@ void NotationCanvasView::contentsMouseDoubleClickEvent(QMouseEvent* e) } void -NotationCanvasView::processActiveItems(QMouseEvent* e, - QCanvasItemList itemList) +NotationCanvasView::processActiveItems(TQMouseEvent* e, + TQCanvasItemList itemList) { - QCanvasItem* pressedItem = 0; - QCanvasItemList::Iterator it; + TQCanvasItem* pressedItem = 0; + TQCanvasItemList::Iterator it; for (it = itemList.begin(); it != itemList.end(); ++it) { - QCanvasItem *item = *it; + TQCanvasItem *item = *it; if (item->active() && !pressedItem) { NOTATION_DEBUG << "mousepress : got active item\n"; pressedItem = item; @@ -298,7 +298,7 @@ NotationCanvasView::processActiveItems(QMouseEvent* e, void NotationCanvasView::handleMousePress(int height, int staffNo, - QMouseEvent *e, + TQMouseEvent *e, NotationElement *el) { NOTATION_DEBUG << "NotationCanvasView::handleMousePress() at height " @@ -308,7 +308,7 @@ NotationCanvasView::handleMousePress(int height, } bool -NotationCanvasView::posIsTooFarFromStaff(const QPoint &pos) +NotationCanvasView::posIsTooFarFromStaff(const TQPoint &pos) { // return true if pos.y is more than m_staffLineThreshold away from // the last pos for which a collision was detected @@ -339,7 +339,7 @@ NotationCanvasView::getLegerLineCount(int height, bool &offset) } void -NotationCanvasView::setHeightMarkerHeight(QMouseEvent *e) +NotationCanvasView::setHeightMarkerHeight(TQMouseEvent *e) { NotationStaff *staff = dynamic_cast<NotationStaff *> (m_linedStaffManager.getStaffForCanvasCoords(e->x(), e->y())); @@ -381,7 +381,7 @@ NotationCanvasView::setHeightMarkerHeight(QMouseEvent *e) QCanvasLineGroupable *line = new QCanvasLineGroupable(canvas(), m_heightMarker); - line->setPen(QPen(QColor(64, 64, 64), 1)); + line->setPen(TQPen(TQColor(64, 64, 64), 1)); int y = (int)m_heightMarker->y() + (above ? -1 : 1) * (i * (spacing + 1)); @@ -403,20 +403,20 @@ NotationCanvasView::setHeightMarkerHeight(QMouseEvent *e) } NotationElement * -NotationCanvasView::getElementAtXCoord(QMouseEvent *e) // any old element +NotationCanvasView::getElementAtXCoord(TQMouseEvent *e) // any old element { - QRect threshold(e->pos(), QSize(4, 100)); //!!! + TQRect threshold(e->pos(), TQSize(4, 100)); //!!! threshold.moveCenter(e->pos()); - QCanvasItemList itemList = canvas()->collisions(threshold); + TQCanvasItemList itemList = canvas()->collisions(threshold); - QCanvasItemList::Iterator it; + TQCanvasItemList::Iterator it; QCanvasNotationSprite* sprite = 0; for (it = itemList.begin(); it != itemList.end(); ++it) { - QCanvasItem *item = *it; + TQCanvasItem *item = *it; if ((sprite = dynamic_cast<QCanvasNotationSprite*>(item))) { return & (sprite->getNotationElement()); @@ -427,7 +427,7 @@ NotationCanvasView::getElementAtXCoord(QMouseEvent *e) // any old element } void -NotationCanvasView::viewportPaintEvent(QPaintEvent *e) +NotationCanvasView::viewportPaintEvent(TQPaintEvent *e) { int cx(e->rect().x()), cy(e->rect().y()), @@ -435,7 +435,7 @@ NotationCanvasView::viewportPaintEvent(QPaintEvent *e) ch(e->rect().height())*/; // NOTATION_DEBUG << "NotationCanvasView::viewportPaintEvent: (" << cx << "," // << cy << ") size (" << cw << "x" << ch << ")" << endl; - QCanvasView::viewportPaintEvent(e); + TQCanvasView::viewportPaintEvent(e); cx += contentsX(); cy += contentsY(); @@ -445,14 +445,14 @@ NotationCanvasView::viewportPaintEvent(QPaintEvent *e) } void -NotationCanvasView::drawContents(QPainter *p, int cx, int cy, int cw, int ch) +NotationCanvasView::drawContents(TQPainter *p, int cx, int cy, int cw, int ch) { /* - m_lastRender = QRect(cx, cy, cw, ch); + m_lastRender = TQRect(cx, cy, cw, ch); NOTATION_DEBUG << "NotationCanvasView::drawContents: (" << cx << "," << cy << ") size (" << cw << "x" << ch << ")" << endl; */ - QCanvasView::drawContents(p, cx, cy, cw, ch); + TQCanvasView::drawContents(p, cx, cy, cw, ch); /* emit renderRequired(std::min(contentsX(), cx), std::max(contentsX() + visibleWidth(), cx + cw)); @@ -462,21 +462,21 @@ NotationCanvasView::drawContents(QPainter *p, int cx, int cy, int cw, int ch) void NotationCanvasView::slotRenderComplete() { - /* QPainter painter(viewport()); + /* TQPainter painter(viewport()); int cx(m_lastRender.x()), cy(m_lastRender.y()), cw(m_lastRender.width()), ch(m_lastRender.height()); NOTATION_DEBUG << "NotationCanvasView::slotRenderComplete: (" << cx << "," << cy << ") size (" << cw << "x" << ch << ")" << endl; - QCanvasView::drawContents(&painter, cx, cy, cw, ch); + TQCanvasView::drawContents(&painter, cx, cy, cw, ch); */ - QPaintEvent ev(m_lastRender); - QCanvasView::viewportPaintEvent(&ev); + TQPaintEvent ev(m_lastRender); + TQCanvasView::viewportPaintEvent(&ev); } void -NotationCanvasView::slotExternalWheelEvent(QWheelEvent* e) +NotationCanvasView::slotExternalWheelEvent(TQWheelEvent* e) { wheelEvent(e); } diff --git a/src/gui/editors/notation/NotationCanvasView.h b/src/gui/editors/notation/NotationCanvasView.h index 5c88fb0..3c26ded 100644 --- a/src/gui/editors/notation/NotationCanvasView.h +++ b/src/gui/editors/notation/NotationCanvasView.h @@ -27,20 +27,20 @@ #define _RG_NOTATIONCANVASVIEW_H_ #include "gui/general/RosegardenCanvasView.h" -#include <qrect.h> +#include <tqrect.h> #include <vector> -class QWidget; -class QString; -class QPoint; -class QPaintEvent; -class QPainter; -class QMouseEvent; +class TQWidget; +class TQString; +class TQPoint; +class TQPaintEvent; +class TQPainter; +class TQMouseEvent; class QCanvasLineGroupable; class QCanvasItemGroup; -class QCanvasItem; -class QCanvas; +class TQCanvasItem; +class TQCanvas; namespace Rosegarden @@ -69,7 +69,7 @@ class NotationCanvasView : public RosegardenCanvasView public: NotationCanvasView(const LinedStaffManager &staffmgr, - QCanvas *viewing, QWidget *parent=0, + TQCanvas *viewing, TQWidget *parent=0, const char *name=0, WFlags f=0); ~NotationCanvasView(); @@ -86,30 +86,30 @@ signals: * \a el points to the NotationElement which was clicked on, if any */ void itemPressed(int pitch, int staffNo, - QMouseEvent*, + TQMouseEvent*, NotationElement* el); /** - * Emitted when the user clicks on a QCanvasItem which is active + * Emitted when the user clicks on a TQCanvasItem which is active * * @see QCanvasItem#setActive */ - void activeItemPressed(QMouseEvent*, - QCanvasItem* item); + void activeItemPressed(TQMouseEvent*, + TQCanvasItem* item); /** - * Emitted when the user clicks on a QCanvasItem which is neither + * Emitted when the user clicks on a TQCanvasItem which is neither * active nor a notation element */ - void nonNotationItemPressed(QMouseEvent *, - QCanvasItem *); + void nonNotationItemPressed(TQMouseEvent *, + TQCanvasItem *); /** - * Emitted when the user clicks on a QCanvasItem which is a + * Emitted when the user clicks on a TQCanvasItem which is a * plain QCanvasText */ - void textItemPressed(QMouseEvent *, - QCanvasItem *); + void textItemPressed(TQMouseEvent *, + TQCanvasItem *); /** * Emitted when the mouse cursor moves to a different height @@ -117,7 +117,7 @@ signals: * * \a noteName contains the MIDI name of the corresponding note */ - void hoveredOverNoteChanged(const QString ¬eName); + void hoveredOverNoteChanged(const TQString ¬eName); /** * Emitted when the mouse cursor moves to a note which is at a @@ -131,12 +131,12 @@ signals: /** * Emitted when the mouse cursor moves (used by the selection tool) */ - void mouseMoved(QMouseEvent*); + void mouseMoved(TQMouseEvent*); /** * Emitted when the mouse button is released */ - void mouseReleased(QMouseEvent*); + void mouseReleased(TQMouseEvent*); /** * Emitted when a region is about to be drawn by the canvas view. @@ -148,48 +148,48 @@ signals: public slots: void slotRenderComplete(); - void slotExternalWheelEvent(QWheelEvent* e); + void slotExternalWheelEvent(TQWheelEvent* e); protected: - virtual void viewportPaintEvent(QPaintEvent *e); - virtual void drawContents(QPainter *p, int cx, int cy, int cw, int ch); + virtual void viewportPaintEvent(TQPaintEvent *e); + virtual void drawContents(TQPainter *p, int cx, int cy, int cw, int ch); const LinedStaffManager &m_linedStaffManager; /** * Callback for a mouse button press event in the canvas */ - virtual void contentsMousePressEvent(QMouseEvent*); + virtual void contentsMousePressEvent(TQMouseEvent*); /** * Callback for a mouse button release event in the canvas */ - virtual void contentsMouseReleaseEvent(QMouseEvent*); + virtual void contentsMouseReleaseEvent(TQMouseEvent*); /** * Callback for a mouse move event in the canvas */ - virtual void contentsMouseMoveEvent(QMouseEvent*); + virtual void contentsMouseMoveEvent(TQMouseEvent*); /** * Callback for a mouse double click event in the canvas */ - virtual void contentsMouseDoubleClickEvent(QMouseEvent*); + virtual void contentsMouseDoubleClickEvent(TQMouseEvent*); - void processActiveItems(QMouseEvent*, QCanvasItemList); + void processActiveItems(TQMouseEvent*, TQCanvasItemList); void handleMousePress(int height, int staffNo, - QMouseEvent*, + TQMouseEvent*, NotationElement* pressedNotationElement = 0); - bool posIsTooFarFromStaff(const QPoint &pos); + bool posIsTooFarFromStaff(const TQPoint &pos); int getLegerLineCount(int height, bool &offset); - void setHeightMarkerHeight(QMouseEvent *e); + void setHeightMarkerHeight(TQMouseEvent *e); - NotationElement *getElementAtXCoord(QMouseEvent *e); + NotationElement *getElementAtXCoord(TQMouseEvent *e); //--------------- Data members --------------------------------- @@ -208,7 +208,7 @@ protected: bool m_heightTracking; - QRect m_lastRender; + TQRect m_lastRender; }; diff --git a/src/gui/editors/notation/NotationElement.cpp b/src/gui/editors/notation/NotationElement.cpp index 7df1cd5..c23ebd6 100644 --- a/src/gui/editors/notation/NotationElement.cpp +++ b/src/gui/editors/notation/NotationElement.cpp @@ -32,7 +32,7 @@ #include "base/NotationTypes.h" #include "base/ViewElement.h" -#include <qcanvas.h> +#include <tqcanvas.h> namespace Rosegarden { @@ -118,7 +118,7 @@ NotationElement::isGrace() const } void -NotationElement::setCanvasItem(QCanvasItem *e, double canvasX, double canvasY) +NotationElement::setCanvasItem(TQCanvasItem *e, double canvasX, double canvasY) { removeCanvasItem(); m_recentlyRegenerated = true; @@ -127,7 +127,7 @@ NotationElement::setCanvasItem(QCanvasItem *e, double canvasX, double canvasY) } void -NotationElement::addCanvasItem(QCanvasItem *e, double canvasX, double canvasY) +NotationElement::addCanvasItem(TQCanvasItem *e, double canvasX, double canvasY) { if (!m_canvasItem) { std::cerr << "ERROR: Attempt to add extra canvas item to element without main canvas item:"; diff --git a/src/gui/editors/notation/NotationElement.h b/src/gui/editors/notation/NotationElement.h index c756641..2bb036f 100644 --- a/src/gui/editors/notation/NotationElement.h +++ b/src/gui/editors/notation/NotationElement.h @@ -32,7 +32,7 @@ #include "base/Event.h" -class QCanvasItem; +class TQCanvasItem; class ItemList; @@ -45,7 +45,7 @@ class Event; /** * The Notation H and V layout is performed on a * NotationElementList. Once this is done, each NotationElement is - * affected a QCanvasItem which is set at these coords. + * affected a TQCanvasItem which is set at these coords. * * @see NotationView#showElements() */ @@ -105,7 +105,7 @@ public: * * NOTE: The object takes ownership of its canvas item. */ - void setCanvasItem(QCanvasItem *e, double canvasX, double canvasY); + void setCanvasItem(TQCanvasItem *e, double canvasX, double canvasY); /** * Add an extra canvas item associated with this element, for @@ -115,7 +115,7 @@ public: * The element will take ownership of these canvas items and * delete them when it deletes the main canvas item. */ - void addCanvasItem(QCanvasItem *e, double canvasX, double canvasY); + void addCanvasItem(TQCanvasItem *e, double canvasX, double canvasY); /** * Remove the main canvas item and any additional ones. @@ -151,7 +151,7 @@ public: void setIsColliding(bool value) { m_isColliding = value; } /// Returns the associated canvas item - QCanvasItem* getCanvasItem() { return m_canvasItem; } + TQCanvasItem* getCanvasItem() { return m_canvasItem; } protected: //--------------- Data members --------------------------------- @@ -161,9 +161,9 @@ protected: bool m_recentlyRegenerated; bool m_isColliding; - QCanvasItem *m_canvasItem; + TQCanvasItem *m_canvasItem; - typedef std::vector<QCanvasItem *> ItemList; + typedef std::vector<TQCanvasItem *> ItemList; ItemList *m_extraItems; }; diff --git a/src/gui/editors/notation/NotationEraser.cpp b/src/gui/editors/notation/NotationEraser.cpp index 4124e44..856a622 100644 --- a/src/gui/editors/notation/NotationEraser.cpp +++ b/src/gui/editors/notation/NotationEraser.cpp @@ -36,8 +36,8 @@ #include "NotePixmapFactory.h" #include <kaction.h> #include <kconfig.h> -#include <qiconset.h> -#include <qstring.h> +#include <tqiconset.h> +#include <tqstring.h> namespace Rosegarden @@ -52,20 +52,20 @@ NotationEraser::NotationEraser(NotationView* view) m_collapseRest = config->readBoolEntry("collapse", false); new KToggleAction(i18n("Collapse rests after erase"), 0, this, - SLOT(slotToggleRestCollapse()), actionCollection(), + TQT_SLOT(slotToggleRestCollapse()), actionCollection(), "toggle_rest_collapse"); - QIconSet icon + TQIconSet icon (NotePixmapFactory::toQPixmap(NotePixmapFactory:: makeToolbarPixmap("crotchet"))); new KAction(i18n("Switch to Insert Tool"), icon, 0, this, - SLOT(slotInsertSelected()), actionCollection(), + TQT_SLOT(slotInsertSelected()), actionCollection(), "insert"); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory:: + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory:: makeToolbarPixmap("select"))); new KAction(i18n("Switch to Select Tool"), icon, 0, this, - SLOT(slotSelectSelected()), actionCollection(), + TQT_SLOT(slotSelectSelected()), actionCollection(), "select"); createMenu("notationeraser.rc"); @@ -80,7 +80,7 @@ void NotationEraser::ready() void NotationEraser::handleLeftButtonPress(timeT, int, int staffNo, - QMouseEvent*, + TQMouseEvent*, ViewElement* element) { if (!element || staffNo < 0) @@ -109,7 +109,7 @@ void NotationEraser::slotSelectSelected() m_parentView->actionCollection()->action("select")->activate(); } -const QString NotationEraser::ToolName = "notationeraser"; +const TQString NotationEraser::ToolName = "notationeraser"; } #include "NotationEraser.moc" diff --git a/src/gui/editors/notation/NotationEraser.h b/src/gui/editors/notation/NotationEraser.h index 9efdd13..b13ed89 100644 --- a/src/gui/editors/notation/NotationEraser.h +++ b/src/gui/editors/notation/NotationEraser.h @@ -27,11 +27,11 @@ #define _RG_NOTATIONERASER_H_ #include "NotationTool.h" -#include <qstring.h> +#include <tqstring.h> #include "base/Event.h" -class QMouseEvent; +class TQMouseEvent; namespace Rosegarden @@ -57,9 +57,9 @@ public: virtual void handleLeftButtonPress(timeT, int height, int staffNo, - QMouseEvent*, + TQMouseEvent*, ViewElement* el); - static const QString ToolName; + static const TQString ToolName; public slots: void slotToggleRestCollapse(); diff --git a/src/gui/editors/notation/NotationHLayout.cpp b/src/gui/editors/notation/NotationHLayout.cpp index 1b13765..4d891a6 100644 --- a/src/gui/editors/notation/NotationHLayout.cpp +++ b/src/gui/editors/notation/NotationHLayout.cpp @@ -47,7 +47,7 @@ #include "NotationStaff.h" #include "NotePixmapFactory.h" #include <kconfig.h> -#include <qobject.h> +#include <tqobject.h> #include <cmath> namespace Rosegarden @@ -58,7 +58,7 @@ using namespace BaseProperties; NotationHLayout::NotationHLayout(Composition *c, NotePixmapFactory *npf, const NotationProperties &properties, - QObject* parent, const char* name) : + TQObject* parent, const char* name) : ProgressReporter(parent, name), HorizontalLayoutEngine(c), m_totalWidth(0.), diff --git a/src/gui/editors/notation/NotationHLayout.h b/src/gui/editors/notation/NotationHLayout.h index 9d7366b..878dc17 100644 --- a/src/gui/editors/notation/NotationHLayout.h +++ b/src/gui/editors/notation/NotationHLayout.h @@ -36,7 +36,7 @@ class TieMap; -class QObject; +class TQObject; namespace Rosegarden @@ -68,7 +68,7 @@ public: NotationHLayout(Composition *c, NotePixmapFactory *npf, const NotationProperties &properties, - QObject* parent, const char* name = 0); + TQObject* parent, const char* name = 0); virtual ~NotationHLayout(); diff --git a/src/gui/editors/notation/NotationSelectionPaster.cpp b/src/gui/editors/notation/NotationSelectionPaster.cpp index 3b008f2..96d894c 100644 --- a/src/gui/editors/notation/NotationSelectionPaster.cpp +++ b/src/gui/editors/notation/NotationSelectionPaster.cpp @@ -55,7 +55,7 @@ NotationSelectionPaster::~NotationSelectionPaster() void NotationSelectionPaster::handleLeftButtonPress(timeT, int, int staffNo, - QMouseEvent* e, + TQMouseEvent* e, ViewElement*) { if (staffNo < 0) diff --git a/src/gui/editors/notation/NotationSelectionPaster.h b/src/gui/editors/notation/NotationSelectionPaster.h index e6a80dd..110ed6c 100644 --- a/src/gui/editors/notation/NotationSelectionPaster.h +++ b/src/gui/editors/notation/NotationSelectionPaster.h @@ -30,7 +30,7 @@ #include "base/Event.h" -class QMouseEvent; +class TQMouseEvent; namespace Rosegarden @@ -52,7 +52,7 @@ public: virtual void handleLeftButtonPress(timeT, int height, int staffNo, - QMouseEvent*, + TQMouseEvent*, ViewElement* el); protected: diff --git a/src/gui/editors/notation/NotationSelector.cpp b/src/gui/editors/notation/NotationSelector.cpp index 221fbe3..2a28545 100644 --- a/src/gui/editors/notation/NotationSelector.cpp +++ b/src/gui/editors/notation/NotationSelector.cpp @@ -49,11 +49,11 @@ #include "NotationView.h" #include "NotePixmapFactory.h" #include <kaction.h> -#include <qapplication.h> -#include <qiconset.h> -#include <qrect.h> -#include <qstring.h> -#include <qtimer.h> +#include <tqapplication.h> +#include <tqiconset.h> +#include <tqrect.h> +#include <tqstring.h> +#include <tqtimer.h> namespace Rosegarden @@ -71,68 +71,68 @@ NotationSelector::NotationSelector(NotationView* view) m_justSelectedBar(false), m_wholeStaffSelectionComplete(false) { - connect(m_parentView, SIGNAL(usedSelection()), - this, SLOT(slotHideSelection())); + connect(m_parentView, TQT_SIGNAL(usedSelection()), + this, TQT_SLOT(slotHideSelection())); - connect(this, SIGNAL(editElement(NotationStaff *, NotationElement *, bool)), - m_parentView, SLOT(slotEditElement(NotationStaff *, NotationElement *, bool))); + connect(this, TQT_SIGNAL(editElement(NotationStaff *, NotationElement *, bool)), + m_parentView, TQT_SLOT(slotEditElement(NotationStaff *, NotationElement *, bool))); - QIconSet icon + TQIconSet icon (NotePixmapFactory::toQPixmap(NotePixmapFactory:: makeToolbarPixmap("crotchet"))); new KToggleAction(i18n("Switch to Insert Tool"), icon, 0, this, - SLOT(slotInsertSelected()), actionCollection(), + TQT_SLOT(slotInsertSelected()), actionCollection(), "insert"); new KAction(i18n("Switch to Erase Tool"), "eraser", 0, this, - SLOT(slotEraseSelected()), actionCollection(), + TQT_SLOT(slotEraseSelected()), actionCollection(), "erase"); // (this crashed, and it might be superfluous with ^N anyway, so I'm // commenting it out, but leaving it here in case I change my mind about // fooling with it.) (DMM) // new KAction(i18n("Normalize Rests"), 0, 0, this, - // SLOT(slotCollapseRests()), actionCollection(), + // TQT_SLOT(slotCollapseRests()), actionCollection(), // "collapse_rests"); new KAction(i18n("Collapse Rests"), 0, 0, this, - SLOT(slotCollapseRestsHard()), actionCollection(), + TQT_SLOT(slotCollapseRestsHard()), actionCollection(), "collapse_rests_aggressively"); new KAction(i18n("Respell as Flat"), 0, 0, this, - SLOT(slotRespellFlat()), actionCollection(), + TQT_SLOT(slotRespellFlat()), actionCollection(), "respell_flat"); new KAction(i18n("Respell as Sharp"), 0, 0, this, - SLOT(slotRespellSharp()), actionCollection(), + TQT_SLOT(slotRespellSharp()), actionCollection(), "respell_sharp"); new KAction(i18n("Respell as Natural"), 0, 0, this, - SLOT(slotRespellNatural()), actionCollection(), + TQT_SLOT(slotRespellNatural()), actionCollection(), "respell_natural"); new KAction(i18n("Collapse Notes"), 0, 0, this, - SLOT(slotCollapseNotes()), actionCollection(), + TQT_SLOT(slotCollapseNotes()), actionCollection(), "collapse_notes"); new KAction(i18n("Interpret"), 0, 0, this, - SLOT(slotInterpret()), actionCollection(), + TQT_SLOT(slotInterpret()), actionCollection(), "interpret"); new KAction(i18n("Move to Staff Above"), 0, 0, this, - SLOT(slotStaffAbove()), actionCollection(), + TQT_SLOT(slotStaffAbove()), actionCollection(), "move_events_up_staff"); new KAction(i18n("Move to Staff Below"), 0, 0, this, - SLOT(slotStaffBelow()), actionCollection(), + TQT_SLOT(slotStaffBelow()), actionCollection(), "move_events_down_staff"); new KAction(i18n("Make Invisible"), 0, 0, this, - SLOT(slotMakeInvisible()), actionCollection(), + TQT_SLOT(slotMakeInvisible()), actionCollection(), "make_invisible"); new KAction(i18n("Make Visible"), 0, 0, this, - SLOT(slotMakeVisible()), actionCollection(), + TQT_SLOT(slotMakeVisible()), actionCollection(), "make_visible"); createMenu("notationselector.rc"); @@ -146,7 +146,7 @@ NotationSelector::~NotationSelector() void NotationSelector::handleLeftButtonPress(timeT t, int height, int staffNo, - QMouseEvent* e, + TQMouseEvent* e, ViewElement *element) { std::cerr << "NotationSelector::handleMousePress: time is " << t << ", staffNo is " @@ -194,7 +194,7 @@ void NotationSelector::handleLeftButtonPress(timeT t, void NotationSelector::handleRightButtonPress(timeT t, int height, int staffNo, - QMouseEvent* e, + TQMouseEvent* e, ViewElement *element) { std::cerr << "NotationSelector::handleRightButtonPress" << std::endl; @@ -228,7 +228,7 @@ void NotationSelector::slotClickTimeout() void NotationSelector::handleMouseDoubleClick(timeT, int, int staffNo, - QMouseEvent* e, + TQMouseEvent* e, ViewElement *element) { NOTATION_DEBUG << "NotationSelector::handleMouseDoubleClick" << endl; @@ -247,7 +247,7 @@ void NotationSelector::handleMouseDoubleClick(timeT, } else { - QRect rect = staff->getBarExtents(e->x(), e->y()); + TQRect rect = staff->getBarExtents(e->x(), e->y()); m_selectionRect->setX(rect.x() + 1); m_selectionRect->setY(rect.y()); @@ -257,8 +257,8 @@ void NotationSelector::handleMouseDoubleClick(timeT, m_updateRect = false; m_justSelectedBar = true; - QTimer::singleShot(QApplication::doubleClickInterval(), this, - SLOT(slotClickTimeout())); + TQTimer::singleShot(TQApplication::doubleClickInterval(), this, + TQT_SLOT(slotClickTimeout())); } return ; @@ -267,7 +267,7 @@ void NotationSelector::handleMouseDoubleClick(timeT, void NotationSelector::handleMouseTripleClick(timeT t, int height, int staffNo, - QMouseEvent* e, + TQMouseEvent* e, ViewElement *element) { if (!m_justSelectedBar) @@ -305,7 +305,7 @@ void NotationSelector::handleMouseTripleClick(timeT t, } int NotationSelector::handleMouseMove(timeT, int, - QMouseEvent* e) + TQMouseEvent* e) { if (!m_updateRect) return RosegardenCanvasView::NoFollow; @@ -345,7 +345,7 @@ int NotationSelector::handleMouseMove(timeT, int, return RosegardenCanvasView::FollowHorizontal | RosegardenCanvasView::FollowVertical; } -void NotationSelector::handleMouseRelease(timeT, int, QMouseEvent *e) +void NotationSelector::handleMouseRelease(timeT, int, TQMouseEvent *e) { NOTATION_DEBUG << "NotationSelector::handleMouseRelease" << endl; m_updateRect = false; @@ -706,7 +706,7 @@ void NotationSelector::dragFine(int x, int y, bool final) void NotationSelector::ready() { - m_selectionRect = new QCanvasRectangle(m_nParentView->canvas()); + m_selectionRect = new TQCanvasRectangle(m_nParentView->canvas()); m_selectionRect->hide(); m_selectionRect->setPen(GUIPalette::getColour(GUIPalette::SelectionRectangle)); @@ -834,10 +834,10 @@ EventSelection* NotationSelector::getSelection() m_selectionRect->height() > -3 && m_selectionRect->height() < 3) return 0; - QCanvasItemList itemList = m_selectionRect->collisions(false); - QCanvasItemList::Iterator it; + TQCanvasItemList itemList = m_selectionRect->collisions(false); + TQCanvasItemList::Iterator it; - QRect rect = m_selectionRect->rect().normalize(); + TQRect rect = m_selectionRect->rect().normalize(); QCanvasNotationSprite *sprite = 0; if (!m_selectedStaff) { @@ -951,7 +951,7 @@ EventSelection* NotationSelector::getSelection() } } -const QString NotationSelector::ToolName = "notationselector"; +const TQString NotationSelector::ToolName = "notationselector"; } #include "NotationSelector.moc" diff --git a/src/gui/editors/notation/NotationSelector.h b/src/gui/editors/notation/NotationSelector.h index 7266fd5..6f9494a 100644 --- a/src/gui/editors/notation/NotationSelector.h +++ b/src/gui/editors/notation/NotationSelector.h @@ -28,12 +28,12 @@ #include "NotationTool.h" #include "NotationElement.h" -#include <qstring.h> +#include <tqstring.h> #include "base/Event.h" -class QMouseEvent; -class QCanvasRectangle; +class TQMouseEvent; +class TQCanvasRectangle; class m_clickedElement; @@ -64,33 +64,33 @@ public: virtual void handleLeftButtonPress(timeT, int height, int staffNo, - QMouseEvent*, + TQMouseEvent*, ViewElement* el); virtual void handleRightButtonPress(timeT time, int height, int staffNo, - QMouseEvent*, + TQMouseEvent*, ViewElement*); virtual int handleMouseMove(timeT, int height, - QMouseEvent*); + TQMouseEvent*); virtual void handleMouseRelease(timeT time, int height, - QMouseEvent*); + TQMouseEvent*); virtual void handleMouseDoubleClick(timeT, int height, int staffNo, - QMouseEvent*, + TQMouseEvent*, ViewElement*); virtual void handleMouseTripleClick(timeT, int height, int staffNo, - QMouseEvent*, + TQMouseEvent*, ViewElement*); /** @@ -125,7 +125,7 @@ public: } } - static const QString ToolName; + static const TQString ToolName; signals: void editElement(NotationStaff *, NotationElement *, bool advanced); @@ -173,7 +173,7 @@ protected: //--------------- Data members --------------------------------- - QCanvasRectangle* m_selectionRect; + TQCanvasRectangle* m_selectionRect; bool m_updateRect; NotationStaff *m_selectedStaff; diff --git a/src/gui/editors/notation/NotationStaff.cpp b/src/gui/editors/notation/NotationStaff.cpp index c5219b4..717e418 100644 --- a/src/gui/editors/notation/NotationStaff.cpp +++ b/src/gui/editors/notation/NotationStaff.cpp @@ -64,16 +64,16 @@ #include "NoteStyleFactory.h" #include <kconfig.h> #include <kmessagebox.h> -#include <qcanvas.h> -#include <qpainter.h> -#include <qpoint.h> -#include <qrect.h> +#include <tqcanvas.h> +#include <tqpainter.h> +#include <tqpoint.h> +#include <tqrect.h> namespace Rosegarden { -NotationStaff::NotationStaff(QCanvas *canvas, Segment *segment, +NotationStaff::NotationStaff(TQCanvas *canvas, Segment *segment, SnapGrid *snapGrid, int id, NotationView *view, std::string fontName, int resolution) : @@ -148,7 +148,7 @@ NotationStaff::insertTimeSignature(double layoutX, return ; m_notePixmapFactory->setSelected(false); - QCanvasPixmap *pixmap = m_notePixmapFactory->makeTimeSigPixmap(timeSig); + TQCanvasPixmap *pixmap = m_notePixmapFactory->makeTimeSigPixmap(timeSig); QCanvasTimeSigSprite *sprite = new QCanvasTimeSigSprite(layoutX, pixmap, m_canvas); @@ -201,7 +201,7 @@ NotationStaff::insertRepeatedClefAndKey(double layoutX, int barNo) LinedStaffCoords coords = getCanvasCoordsForLayoutCoords(layoutX + dx, layoutY); - QCanvasPixmap *pixmap = m_notePixmapFactory->makeClefPixmap(clef); + TQCanvasPixmap *pixmap = m_notePixmapFactory->makeClefPixmap(clef); QCanvasNonElementSprite *sprite = new QCanvasNonElementSprite(pixmap, m_canvas); @@ -220,7 +220,7 @@ NotationStaff::insertRepeatedClefAndKey(double layoutX, int barNo) LinedStaffCoords coords = getCanvasCoordsForLayoutCoords(layoutX + dx, layoutY); - QCanvasPixmap *pixmap = m_notePixmapFactory->makeKeyPixmap(key, clef); + TQCanvasPixmap *pixmap = m_notePixmapFactory->makeKeyPixmap(key, clef); QCanvasNonElementSprite *sprite = new QCanvasNonElementSprite(pixmap, m_canvas); @@ -242,7 +242,7 @@ NotationStaff::insertRepeatedClefAndKey(double layoutX, int barNo) LinedStaffCoords coords = getCanvasCoordsForLayoutCoords(layoutX, layoutY); - QCanvasRectangle *rect = new QCanvasRectangle(coords.first, coords.second, + TQCanvasRectangle *rect = new TQCanvasRectangle(coords.first, coords.second, dx, h, m_canvas); rect->setPen(Qt::black); rect->setBrush(Qt::white); @@ -276,7 +276,7 @@ NotationStaff::drawStaffName() getSegment().getComposition()-> getTrackById(getSegment().getTrack())->getLabel(); - QCanvasPixmap *map = + TQCanvasPixmap *map = m_notePixmapFactory->makeTextPixmap (Text(m_staffNameText, Text::StaffName)); @@ -942,7 +942,7 @@ NotationStaff::renderSingleElement(ViewElementList::iterator &vli, try { - QCanvasPixmap *pixmap = 0; + TQCanvasPixmap *pixmap = 0; m_notePixmapFactory->setSelected(selected); m_notePixmapFactory->setShaded(invisible); @@ -1343,7 +1343,7 @@ NotationStaff::renderSingleElement(ViewElementList::iterator &vli, } double -NotationStaff::setPainterClipping(QPainter *painter, double lx, int ly, +NotationStaff::setPainterClipping(TQPainter *painter, double lx, int ly, double dx, double w, LinedStaffCoords &coords, FitPolicy policy) { @@ -1369,9 +1369,9 @@ NotationStaff::setPainterClipping(QPainter *painter, double lx, int ly, clipWidth += clipLeft; clipLeft = 0; } - QRect clip(clipLeft, coords.second - getRowSpacing() / 2, + TQRect clip(clipLeft, coords.second - getRowSpacing() / 2, clipWidth, getRowSpacing()); - painter->setClipRect(clip, QPainter::CoordPainter); + painter->setClipRect(clip, TQPainter::CoordPainter); coords.first -= dx; } if (fit) { @@ -1392,7 +1392,7 @@ NotationStaff::setPainterClipping(QPainter *painter, double lx, int ly, } void -NotationStaff::setPixmap(NotationElement *elt, QCanvasPixmap *pixmap, int z, +NotationStaff::setPixmap(NotationElement *elt, TQCanvasPixmap *pixmap, int z, FitPolicy policy) { double layoutX = elt->getLayoutX(); @@ -1408,7 +1408,7 @@ NotationStaff::setPixmap(NotationElement *elt, QCanvasPixmap *pixmap, int z, double canvasX = coords.first; int canvasY = coords.second; - QCanvasItem *item = 0; + TQCanvasItem *item = 0; if (m_pageMode == LinearMode || policy == PretendItFittedAllAlong) { @@ -1428,15 +1428,15 @@ NotationStaff::setPixmap(NotationElement *elt, QCanvasPixmap *pixmap, int z, // NOTATION_DEBUG << "splitting at " << (rightMargin-canvasX) << endl; - std::pair<QPixmap, QPixmap> split = + std::pair<TQPixmap, TQPixmap> split = PixmapFunctions::splitPixmap(*pixmap, int(rightMargin - canvasX)); - QCanvasPixmap *leftCanvasPixmap = new QCanvasPixmap - (split.first, QPoint(pixmap->offsetX(), pixmap->offsetY())); + TQCanvasPixmap *leftCanvasPixmap = new QCanvasPixmap + (split.first, TQPoint(pixmap->offsetX(), pixmap->offsetY())); - QCanvasPixmap *rightCanvasPixmap = new QCanvasPixmap - (split.second, QPoint(0, pixmap->offsetY())); + TQCanvasPixmap *rightCanvasPixmap = new QCanvasPixmap + (split.second, TQPoint(0, pixmap->offsetY())); item = new QCanvasNotationSprite(*elt, leftCanvasPixmap, m_canvas); item->setZ(z); @@ -1736,18 +1736,18 @@ NotationStaff::renderNote(ViewElementList::iterator &vli) // The normal on-screen case bool collision = false; - QCanvasItem * haloItem = 0; + TQCanvasItem * haloItem = 0; if (m_showCollisions) { collision = elt->isColliding(); if (collision) { // Make collision halo - QCanvasPixmap *haloPixmap = factory->makeNoteHaloPixmap(params); + TQCanvasPixmap *haloPixmap = factory->makeNoteHaloPixmap(params); haloItem = new QCanvasNotationSprite(*elt, haloPixmap, m_canvas); haloItem->setZ(-1); } } - QCanvasPixmap *pixmap = factory->makeNotePixmap(params); + TQCanvasPixmap *pixmap = factory->makeNotePixmap(params); int z = 0; if (factory->isSelected()) @@ -1991,7 +1991,7 @@ NotationStaff::markChanged(timeT from, timeT to, bool movedOnly) } void -NotationStaff::setPrintPainter(QPainter *painter) +NotationStaff::setPrintPainter(TQPainter *painter) { m_printPainter = painter; } diff --git a/src/gui/editors/notation/NotationStaff.h b/src/gui/editors/notation/NotationStaff.h index 4a0302c..f58e77d 100644 --- a/src/gui/editors/notation/NotationStaff.h +++ b/src/gui/editors/notation/NotationStaff.h @@ -38,10 +38,10 @@ #include "NotationElement.h" -class QPainter; -class QCanvasPixmap; -class QCanvasItem; -class QCanvas; +class TQPainter; +class TQCanvasPixmap; +class TQCanvasItem; +class TQCanvas; class LinedStaffCoords; @@ -82,7 +82,7 @@ public: * Creates a new NotationStaff for the specified Segment * \a id is the id of the staff in the NotationView */ - NotationStaff(QCanvas *, Segment *, SnapGrid *, + NotationStaff(TQCanvas *, Segment *, SnapGrid *, int id, NotationView *view, std::string fontName, int resolution); virtual ~NotationStaff(); @@ -210,7 +210,7 @@ public: * painter; those that can, will be rendered by renderPrintable() * instead. */ - virtual void setPrintPainter(QPainter *painter); + virtual void setPrintPainter(TQPainter *painter); /** * Render to the current print painter those elements that can be @@ -423,7 +423,7 @@ protected: * This function calls painter.save(), and the caller must call * painter.restore() after use. */ - virtual double setPainterClipping(QPainter *, double layoutX, int layoutY, + virtual double setPainterClipping(TQPainter *, double layoutX, int layoutY, double dx, double w, LinedStaffCoords &coords, FitPolicy policy); @@ -432,7 +432,7 @@ protected: * bits if it overruns the end of a row and set the bits * separately. */ - virtual void setPixmap(NotationElement *, QCanvasPixmap *, int z, + virtual void setPixmap(NotationElement *, TQCanvasPixmap *, int z, FitPolicy policy); bool isSelected(NotationElementList::iterator); @@ -440,7 +440,7 @@ protected: typedef std::set<QCanvasSimpleSprite *> SpriteSet; SpriteSet m_timeSigs; - typedef std::set<QCanvasItem *> ItemSet; + typedef std::set<TQCanvasItem *> ItemSet; ItemSet m_repeatedClefsAndKeys; typedef std::pair<int, Clef> ClefChange; @@ -471,7 +471,7 @@ protected: bool m_showCollisions; int m_keySigCancelMode; - QPainter *m_printPainter; + TQPainter *m_printPainter; enum BarStatus { UnRendered = 0, Rendered, Positioned }; typedef std::map<int, BarStatus> BarStatusMap; diff --git a/src/gui/editors/notation/NotationStrings.cpp b/src/gui/editors/notation/NotationStrings.cpp index 6f8defd..6065323 100644 --- a/src/gui/editors/notation/NotationStrings.cpp +++ b/src/gui/editors/notation/NotationStrings.cpp @@ -33,14 +33,14 @@ #include "base/NotationTypes.h" #include "gui/configuration/GeneralConfigurationPage.h" #include <kconfig.h> -#include <qstring.h> +#include <tqstring.h> namespace Rosegarden { QString -NotationStrings::addDots(QString s, int dots, +NotationStrings::addDots(TQString s, int dots, bool hyphenate, bool internationalize) { if (!dots) @@ -61,14 +61,14 @@ NotationStrings::addDots(QString s, int dots, } else { if (dots > 1) { if (hyphenate) - return QString("%1-dotted-%2").arg(dots).arg(s); + return TQString("%1-dotted-%2").arg(dots).arg(s); else - return QString("%1-dotted %2").arg(dots).arg(s); + return TQString("%1-dotted %2").arg(dots).arg(s); } else { if (hyphenate) - return QString("dotted-%1").arg(s); + return TQString("dotted-%1").arg(s); else - return QString("dotted %1").arg(s); + return TQString("dotted %1").arg(s); } } } @@ -79,13 +79,13 @@ NotationStrings::getNoteName(Note note, bool plural, bool triplet) Note::Type type = note.getNoteType(); int dots = note.getDots(); - static const QString names[] = { + static const TQString names[] = { i18n("sixty-fourth note"), i18n("thirty-second note"), i18n("sixteenth note"), i18n("eighth note"), i18n("quarter note"), i18n("half note"), i18n("whole note"), i18n("double whole note") }; - static const QString pluralnames[] = { + static const TQString pluralnames[] = { i18n("sixty-fourth notes"), i18n("thirty-second notes"), i18n("sixteenth notes"), i18n("eighth notes"), i18n("quarter notes"), i18n("half notes"), @@ -109,13 +109,13 @@ NotationStrings::getAmericanName(Note note, bool plural, bool triplet) Note::Type type = note.getNoteType(); int dots = note.getDots(); - static const QString names[] = { + static const TQString names[] = { "sixty-fourth note", "thirty-second note", "sixteenth note", "eighth note", "quarter note", "half note", "whole note", "double whole note" }; - static const QString pluralnames[] = { + static const TQString pluralnames[] = { "sixty-fourth notes", "thirty-second notes", "sixteenth notes", "eighth notes", "quarter notes", "half notes", @@ -123,11 +123,11 @@ NotationStrings::getAmericanName(Note note, bool plural, bool triplet) }; if (plural && triplet) { - return addDots(QString("%1 triplets").arg(names[type]), dots, false, false); + return addDots(TQString("%1 triplets").arg(names[type]), dots, false, false); } else if (plural) { return addDots(pluralnames[type], dots, false, false); } else if (triplet) { - return addDots(QString("%1 triplet").arg(names[type]), dots, false, false); + return addDots(TQString("%1 triplet").arg(names[type]), dots, false, false); } else { return addDots(names[type], dots, false, false); } @@ -139,12 +139,12 @@ NotationStrings::getShortNoteName(Note note, bool plural, bool triplet) Note::Type type = note.getNoteType(); int dots = note.getDots(); - static const QString names[] = { + static const TQString names[] = { i18n("64th"), i18n("32nd"), i18n("16th"), i18n("8th"), i18n("quarter"), i18n("half"), i18n("whole"), i18n("double whole") }; - static const QString pluralnames[] = { + static const TQString pluralnames[] = { i18n("64ths"), i18n("32nds"), i18n("16ths"), i18n("8ths"), i18n("quarters"), i18n("halves"), i18n("wholes"), i18n("double wholes") @@ -167,19 +167,19 @@ NotationStrings::getReferenceName(Note note, bool isRest) Note::Type type = note.getNoteType(); int dots = note.getDots(); - static const QString names[] = { + static const TQString names[] = { "hemidemisemi", "demisemi", "semiquaver", "quaver", "crotchet", "minim", "semibreve", "breve" }; - QString name(names[type]); + TQString name(names[type]); if (isRest) name = "rest-" + name; return addDots(name, dots, true, false); } Note -NotationStrings::getNoteForName(QString name) +NotationStrings::getNoteForName(TQString name) { std::string origName(qstrtostr(name)); int pos = name.find('-'); @@ -271,16 +271,16 @@ NotationStrings::makeNoteMenuLabel(timeT duration, timeT wholeNote = Note(Note::Semibreve).getDuration(); if ((wholeNote / duration) * duration == wholeNote) { - return QString("1/%1").arg(wholeNote / duration); + return TQString("1/%1").arg(wholeNote / duration); } else if ((duration / wholeNote) * wholeNote == duration) { - return QString("%1/1").arg(duration / wholeNote); + return TQString("%1/1").arg(duration / wholeNote); } else { return i18n("%1 ticks").arg(duration); plural = false; } } else { - QString noteName; + TQString noteName; switch (noteNameStyle) { diff --git a/src/gui/editors/notation/NotationStrings.h b/src/gui/editors/notation/NotationStrings.h index d79dff3..d058734 100644 --- a/src/gui/editors/notation/NotationStrings.h +++ b/src/gui/editors/notation/NotationStrings.h @@ -28,7 +28,7 @@ #include "base/Exception.h" #include "base/NotationTypes.h" -#include <qstring.h> +#include <tqstring.h> #include "base/Event.h" @@ -58,7 +58,7 @@ public: * region. Note that this includes English note names- set your * LC_LANG to en_GB. */ - static QString getNoteName(Note note, + static TQString getNoteName(Note note, bool plural = false, bool triplet = false); /** @@ -66,7 +66,7 @@ public: * useful if the user has specified that they'd prefer American * names to local names. */ - static QString getAmericanName(Note note, + static TQString getAmericanName(Note note, bool plural = false, bool triplet = false); /** @@ -76,7 +76,7 @@ public: * region. Note that this includes English note names- set your * LC_LANG to en_GB. */ - static QString getShortNoteName(Note note, + static TQString getShortNoteName(Note note, bool plural = false, bool triplet = false); @@ -85,7 +85,7 @@ public: * formal name used to name pixmap files and the like, so the exact * values of these strings are pretty sensitive. */ - static QString getReferenceName(Note note, bool isRest = false); + static TQString getReferenceName(Note note, bool isRest = false); typedef Exception MalformedNoteName; @@ -94,7 +94,7 @@ public: * reference name or an untranslated British, American or short name. * May throw MalformedNoteName. */ - static Note getNoteForName(QString name); + static Note getNoteForName(TQString name); /** * Construct a label to describe the given duration as a note name in @@ -102,7 +102,7 @@ public: * and returns a non-zero value in errorReturn if it was not an exact * match for the required duration. */ - static QString makeNoteMenuLabel(timeT duration, + static TQString makeNoteMenuLabel(timeT duration, bool brief, timeT &errorReturn, bool plural = false); @@ -111,7 +111,7 @@ private: /** * Return a string representing the dotted version of the input str. */ - static QString addDots(QString s, int dots, + static TQString addDots(TQString s, int dots, bool hyphenate, bool internationalize); }; diff --git a/src/gui/editors/notation/NotationTool.cpp b/src/gui/editors/notation/NotationTool.cpp index 8e82107..b187fbb 100644 --- a/src/gui/editors/notation/NotationTool.cpp +++ b/src/gui/editors/notation/NotationTool.cpp @@ -28,13 +28,13 @@ #include "gui/general/EditTool.h" #include "NotationView.h" -#include <qstring.h> +#include <tqstring.h> namespace Rosegarden { -NotationTool::NotationTool(const QString& menuName, NotationView* view) +NotationTool::NotationTool(const TQString& menuName, NotationView* view) : EditTool(menuName, view), m_nParentView(view) {} diff --git a/src/gui/editors/notation/NotationTool.h b/src/gui/editors/notation/NotationTool.h index ab1020a..da9f50d 100644 --- a/src/gui/editors/notation/NotationTool.h +++ b/src/gui/editors/notation/NotationTool.h @@ -29,7 +29,7 @@ #include "gui/general/EditTool.h" -class QString; +class TQString; namespace Rosegarden @@ -79,7 +79,7 @@ protected: * * \a menuName : the name of the menu defined in the XML rc file */ - NotationTool(const QString& menuName, NotationView*); + NotationTool(const TQString& menuName, NotationView*); //--------------- Data members --------------------------------- diff --git a/src/gui/editors/notation/NotationToolBox.cpp b/src/gui/editors/notation/NotationToolBox.cpp index 769bcaf..7632413 100644 --- a/src/gui/editors/notation/NotationToolBox.cpp +++ b/src/gui/editors/notation/NotationToolBox.cpp @@ -36,7 +36,7 @@ #include "NotationEraser.h" #include "NotationSelector.h" -#include <qstring.h> +#include <tqstring.h> #include <kmessagebox.h> namespace Rosegarden @@ -49,11 +49,11 @@ NotationToolBox::NotationToolBox(NotationView *parent) //m_tools.setAutoDelete(true); } -EditTool* NotationToolBox::createTool(const QString& toolName) +EditTool* NotationToolBox::createTool(const TQString& toolName) { NotationTool* tool = 0; - QString toolNamelc = toolName.lower(); + TQString toolNamelc = toolName.lower(); if (toolNamelc == NoteInserter::ToolName) @@ -88,7 +88,7 @@ EditTool* NotationToolBox::createTool(const QString& toolName) tool = new NotationSelector(m_nParentView); else { - KMessageBox::error(0, QString("NotationToolBox::createTool : unrecognised toolname %1 (%2)") + KMessageBox::error(0, TQString("NotationToolBox::createTool : unrecognised toolname %1 (%2)") .arg(toolName).arg(toolNamelc)); return 0; } diff --git a/src/gui/editors/notation/NotationToolBox.h b/src/gui/editors/notation/NotationToolBox.h index 48b1202..d6765e6 100644 --- a/src/gui/editors/notation/NotationToolBox.h +++ b/src/gui/editors/notation/NotationToolBox.h @@ -29,7 +29,7 @@ #include "gui/general/EditToolBox.h" -class QString; +class TQString; namespace Rosegarden @@ -51,7 +51,7 @@ public: NotationToolBox(NotationView* parent); protected: - virtual EditTool* createTool(const QString& toolName); + virtual EditTool* createTool(const TQString& toolName); //--------------- Data members --------------------------------- diff --git a/src/gui/editors/notation/NotationVLayout.cpp b/src/gui/editors/notation/NotationVLayout.cpp index c746a30..5be5532 100644 --- a/src/gui/editors/notation/NotationVLayout.cpp +++ b/src/gui/editors/notation/NotationVLayout.cpp @@ -42,9 +42,9 @@ #include "NotationStaff.h" #include "NotePixmapFactory.h" #include <kmessagebox.h> -#include <qobject.h> -#include <qstring.h> -#include <qwidget.h> +#include <tqobject.h> +#include <tqstring.h> +#include <tqwidget.h> namespace Rosegarden @@ -55,7 +55,7 @@ using namespace BaseProperties; NotationVLayout::NotationVLayout(Composition *c, NotePixmapFactory *npf, const NotationProperties &properties, - QObject* parent, const char* name) : + TQObject* parent, const char* name) : ProgressReporter(parent, name), m_composition(c), m_npf(npf), @@ -236,7 +236,7 @@ NotationVLayout::scanStaff(Staff &staffBase, timeT, timeT) if (!(*chord[j])->event()->get <Int> (m_properties.HEIGHT_ON_STAFF, height)) { - std::cerr << QString("ERROR: Event in chord at %1 has no HEIGHT_ON_STAFF property!\nThis is a bug (the program would previously have crashed by now)").arg((*chord[j])->getViewAbsoluteTime()) << std::endl; + std::cerr << TQString("ERROR: Event in chord at %1 has no HEIGHT_ON_STAFF property!\nThis is a bug (the program would previously have crashed by now)").arg((*chord[j])->getViewAbsoluteTime()) << std::endl; (*chord[j])->event()->dump(std::cerr); } h.push_back(height); @@ -490,7 +490,7 @@ NotationVLayout::positionSlur(NotationStaff &staff, if (!event->get <Int>(m_properties.HEIGHT_ON_STAFF, h)) { KMessageBox::sorry - ((QWidget *)parent(), i18n("Spanned note at %1 has no HEIGHT_ON_STAFF property!\nThis is a bug (the program would previously have crashed by now)").arg((*scooter)->getViewAbsoluteTime())); + ((TQWidget *)parent(), i18n("Spanned note at %1 has no HEIGHT_ON_STAFF property!\nThis is a bug (the program would previously have crashed by now)").arg((*scooter)->getViewAbsoluteTime())); event->dump(std::cerr); } diff --git a/src/gui/editors/notation/NotationVLayout.h b/src/gui/editors/notation/NotationVLayout.h index 83a16c1..2e718c7 100644 --- a/src/gui/editors/notation/NotationVLayout.h +++ b/src/gui/editors/notation/NotationVLayout.h @@ -36,7 +36,7 @@ class SlurList; -class QObject; +class TQObject; namespace Rosegarden @@ -63,7 +63,7 @@ class NotationVLayout : public ProgressReporter, public: NotationVLayout(Composition *c, NotePixmapFactory *npf, const NotationProperties &properties, - QObject* parent, const char* name = 0); + TQObject* parent, const char* name = 0); virtual ~NotationVLayout(); diff --git a/src/gui/editors/notation/NotationView.cpp b/src/gui/editors/notation/NotationView.cpp index 66cb4b3..b3db080 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 <qlayout.h> +#include <tqlayout.h> #include "misc/Debug.h" #include <kapplication.h> @@ -194,32 +194,32 @@ #include <ktempfile.h> #include <ktoolbar.h> #include <kxmlguiclient.h> -#include <qbrush.h> -#include <qcanvas.h> -#include <qcursor.h> -#include <qdialog.h> -#include <qevent.h> -#include <qfont.h> -#include <qfontmetrics.h> -#include <qhbox.h> -#include <qiconset.h> -#include <qlabel.h> -#include <qobject.h> -#include <qpaintdevicemetrics.h> -#include <qpainter.h> -#include <qpixmap.h> -#include <qpoint.h> -#include <qprinter.h> -#include <qrect.h> -#include <qregexp.h> -#include <qsize.h> -#include <qstring.h> -#include <qtimer.h> -#include <qwidget.h> -#include <qvalidator.h> +#include <tqbrush.h> +#include <tqcanvas.h> +#include <tqcursor.h> +#include <tqdialog.h> +#include <tqevent.h> +#include <tqfont.h> +#include <tqfontmetrics.h> +#include <tqhbox.h> +#include <tqiconset.h> +#include <tqlabel.h> +#include <tqobject.h> +#include <tqpaintdevicemetrics.h> +#include <tqpainter.h> +#include <tqpixmap.h> +#include <tqpoint.h> +#include <tqprinter.h> +#include <tqrect.h> +#include <tqregexp.h> +#include <tqsize.h> +#include <tqstring.h> +#include <tqtimer.h> +#include <tqwidget.h> +#include <tqvalidator.h> #include <algorithm> -#include <qpushbutton.h> -#include <qtooltip.h> +#include <tqpushbutton.h> +#include <tqtooltip.h> namespace Rosegarden @@ -229,17 +229,17 @@ class NoteActionData { public: NoteActionData(); - NoteActionData(const QString& _title, - QString _actionName, - QString _pixmapName, + NoteActionData(const TQString& _title, + TQString _actionName, + TQString _pixmapName, int _keycode, bool _rest, Note::Type _noteType, int _dots); - QString title; - QString actionName; - QString pixmapName; + TQString title; + TQString actionName; + TQString pixmapName; int keycode; bool rest; Note::Type noteType; @@ -257,9 +257,9 @@ NoteActionData::NoteActionData() { } -NoteActionData::NoteActionData(const QString& _title, - QString _actionName, - QString _pixmapName, +NoteActionData::NoteActionData(const TQString& _title, + TQString _actionName, + TQString _pixmapName, int _keycode, bool _rest, Note::Type _noteType, @@ -279,16 +279,16 @@ class NoteChangeActionData { public: NoteChangeActionData(); - NoteChangeActionData(const QString &_title, - QString _actionName, - QString _pixmapName, + NoteChangeActionData(const TQString &_title, + TQString _actionName, + TQString _pixmapName, int _keycode, bool _notationOnly, Note::Type _noteType); - QString title; - QString actionName; - QString pixmapName; + TQString title; + TQString actionName; + TQString pixmapName; int keycode; bool notationOnly; Note::Type noteType; @@ -304,9 +304,9 @@ NoteChangeActionData::NoteChangeActionData() { } -NoteChangeActionData::NoteChangeActionData(const QString& _title, - QString _actionName, - QString _pixmapName, +NoteChangeActionData::NoteChangeActionData(const TQString& _title, + TQString _actionName, + TQString _pixmapName, int _keycode, bool _notationOnly, Note::Type _noteType) @@ -328,8 +328,8 @@ public: actionName(0), keycode(0) { } - MarkActionData(const QString &_title, - QString _actionName, + MarkActionData(const TQString &_title, + TQString _actionName, int _keycode, Mark _mark) : title(_title), @@ -337,8 +337,8 @@ public: keycode(_keycode), mark(_mark) { } - QString title; - QString actionName; + TQString title; + TQString actionName; int keycode; Mark mark; }; @@ -346,7 +346,7 @@ public: NotationView::NotationView(RosegardenGUIDoc *doc, std::vector<Segment *> segments, - QWidget *parent, + TQWidget *parent, bool showProgressive) : EditView(doc, segments, 2, parent, "notationview"), m_properties(getViewLocalPropertyPrefix()), @@ -452,7 +452,7 @@ NotationView::NotationView(RosegardenGUIDoc *doc, setBackgroundMode(PaletteBase); - QCanvas *tCanvas = new QCanvas(this); + TQCanvas *tCanvas = new TQCanvas(this); tCanvas->resize(width() * 2, height() * 2); setCanvasView(new NotationCanvasView(*this, tCanvas, getCentralWidget())); @@ -498,28 +498,28 @@ NotationView::NotationView(RosegardenGUIDoc *doc, // HeadersGroup ctor must not be called before m_staffs initialization m_headersGroupView = new QDeferScrollView(getCentralWidget()); - QWidget * vport = m_headersGroupView->viewport(); + TQWidget * vport = m_headersGroupView->viewport(); m_headersGroup = new HeadersGroup(vport, this, &doc->getComposition()); - m_headersGroupView->setVScrollBarMode(QScrollView::AlwaysOff); - m_headersGroupView->setHScrollBarMode(QScrollView::AlwaysOff); + m_headersGroupView->setVScrollBarMode(TQScrollView::AlwaysOff); + m_headersGroupView->setHScrollBarMode(TQScrollView::AlwaysOff); m_headersGroupView->setFixedWidth(m_headersGroupView->contentsWidth()); 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 // right place - m_headersTopFrame = new QFrame(getCentralWidget()); - QGridLayout * headersTopGrid - = new QGridLayout(m_headersTopFrame, 2, 2); - QString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); - QCanvasPixmap pixmap(pixmapDir + "/misc/close.xpm"); - QPushButton * hideHeadersButton - = new QPushButton(m_headersTopFrame); + m_headersTopFrame = new TQFrame(getCentralWidget()); + TQGridLayout * headersTopGrid + = new TQGridLayout(m_headersTopFrame, 2, 2); + TQString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); + TQCanvasPixmap pixmap(pixmapDir + "/misc/close.xpm"); + TQPushButton * hideHeadersButton + = new TQPushButton(m_headersTopFrame); headersTopGrid->addWidget(hideHeadersButton, 1, 1, Qt::AlignRight | Qt::AlignBottom); - hideHeadersButton->setIconSet(QIconSet(pixmap)); + hideHeadersButton->setIconSet(TQIconSet(pixmap)); hideHeadersButton->setFlat(true); - QToolTip::add(hideHeadersButton, i18n("Close track headers")); + TQToolTip::add(hideHeadersButton, i18n("Close track headers")); headersTopGrid->setMargin(4); setTopStandardRuler(new StandardRuler(getDocument(), m_hlayout, m_leftGutter, 25, @@ -528,19 +528,19 @@ NotationView::NotationView(RosegardenGUIDoc *doc, m_topStandardRuler->getLoopRuler()->setBackgroundColor (GUIPalette::getColour(GUIPalette::InsertCursorRuler)); - connect(m_topStandardRuler->getLoopRuler(), SIGNAL(startMouseMove(int)), - m_canvasView, SLOT(startAutoScroll(int))); - connect(m_topStandardRuler->getLoopRuler(), SIGNAL(stopMouseMove()), - m_canvasView, SLOT(stopAutoScroll())); + connect(m_topStandardRuler->getLoopRuler(), TQT_SIGNAL(startMouseMove(int)), + m_canvasView, TQT_SLOT(startAutoScroll(int))); + connect(m_topStandardRuler->getLoopRuler(), TQT_SIGNAL(stopMouseMove()), + m_canvasView, TQT_SLOT(stopAutoScroll())); - connect(m_bottomStandardRuler->getLoopRuler(), SIGNAL(startMouseMove(int)), - m_canvasView, SLOT(startAutoScroll(int))); - connect(m_bottomStandardRuler->getLoopRuler(), SIGNAL(stopMouseMove()), - m_canvasView, SLOT(stopAutoScroll())); + connect(m_bottomStandardRuler->getLoopRuler(), TQT_SIGNAL(startMouseMove(int)), + m_canvasView, TQT_SLOT(startAutoScroll(int))); + connect(m_bottomStandardRuler->getLoopRuler(), TQT_SIGNAL(stopMouseMove()), + m_canvasView, TQT_SLOT(stopAutoScroll())); // Following connection have to be done before calling setPageMode()) - connect(m_headersGroup, SIGNAL(headersResized(int)), - this, SLOT(slotHeadersWidthChanged(int))); + connect(m_headersGroup, TQT_SIGNAL(headersResized(int)), + this, TQT_SLOT(slotHeadersWidthChanged(int))); // @@ -616,9 +616,9 @@ NotationView::NotationView(RosegardenGUIDoc *doc, // Connect signals // - QObject::connect - (getCanvasView(), SIGNAL(renderRequired(double, double)), - this, SLOT(slotCheckRendered(double, double))); + TQObject::connect + (getCanvasView(), TQT_SIGNAL(renderRequired(double, double)), + this, TQT_SLOT(slotCheckRendered(double, double))); m_topStandardRuler->connectRulerToDocPointer(doc); m_bottomStandardRuler->connectRulerToDocPointer(doc); @@ -626,104 +626,104 @@ NotationView::NotationView(RosegardenGUIDoc *doc, // Disconnect the default connection for this signal from the // top ruler, and connect our own instead - QObject::disconnect + TQObject::disconnect (m_topStandardRuler->getLoopRuler(), - SIGNAL(setPointerPosition(timeT)), 0, 0); + TQT_SIGNAL(setPointerPosition(timeT)), 0, 0); - QObject::connect + TQObject::connect (m_topStandardRuler->getLoopRuler(), - SIGNAL(setPointerPosition(timeT)), - this, SLOT(slotSetInsertCursorPosition(timeT))); + TQT_SIGNAL(setPointerPosition(timeT)), + this, TQT_SLOT(slotSetInsertCursorPosition(timeT))); - QObject::connect + TQObject::connect (m_topStandardRuler, - SIGNAL(dragPointerToPosition(timeT)), - this, SLOT(slotSetInsertCursorPosition(timeT))); + TQT_SIGNAL(dragPointerToPosition(timeT)), + this, TQT_SLOT(slotSetInsertCursorPosition(timeT))); - connect(m_bottomStandardRuler, SIGNAL(dragPointerToPosition(timeT)), - this, SLOT(slotSetPointerPosition(timeT))); + connect(m_bottomStandardRuler, TQT_SIGNAL(dragPointerToPosition(timeT)), + this, TQT_SLOT(slotSetPointerPosition(timeT))); - QObject::connect - (getCanvasView(), SIGNAL(itemPressed(int, int, QMouseEvent*, NotationElement*)), - this, SLOT (slotItemPressed(int, int, QMouseEvent*, NotationElement*))); + TQObject::connect + (getCanvasView(), TQT_SIGNAL(itemPressed(int, int, TQMouseEvent*, NotationElement*)), + this, TQT_SLOT (slotItemPressed(int, int, TQMouseEvent*, NotationElement*))); - QObject::connect - (getCanvasView(), SIGNAL(activeItemPressed(QMouseEvent*, QCanvasItem*)), - this, SLOT (slotActiveItemPressed(QMouseEvent*, QCanvasItem*))); + TQObject::connect + (getCanvasView(), TQT_SIGNAL(activeItemPressed(TQMouseEvent*, TQCanvasItem*)), + this, TQT_SLOT (slotActiveItemPressed(TQMouseEvent*, TQCanvasItem*))); - QObject::connect - (getCanvasView(), SIGNAL(nonNotationItemPressed(QMouseEvent*, QCanvasItem*)), - this, SLOT (slotNonNotationItemPressed(QMouseEvent*, QCanvasItem*))); + TQObject::connect + (getCanvasView(), TQT_SIGNAL(nonNotationItemPressed(TQMouseEvent*, TQCanvasItem*)), + this, TQT_SLOT (slotNonNotationItemPressed(TQMouseEvent*, TQCanvasItem*))); - QObject::connect - (getCanvasView(), SIGNAL(textItemPressed(QMouseEvent*, QCanvasItem*)), - this, SLOT (slotTextItemPressed(QMouseEvent*, QCanvasItem*))); + TQObject::connect + (getCanvasView(), TQT_SIGNAL(textItemPressed(TQMouseEvent*, TQCanvasItem*)), + this, TQT_SLOT (slotTextItemPressed(TQMouseEvent*, TQCanvasItem*))); - QObject::connect - (getCanvasView(), SIGNAL(mouseMoved(QMouseEvent*)), - this, SLOT (slotMouseMoved(QMouseEvent*))); + TQObject::connect + (getCanvasView(), TQT_SIGNAL(mouseMoved(TQMouseEvent*)), + this, TQT_SLOT (slotMouseMoved(TQMouseEvent*))); - QObject::connect - (getCanvasView(), SIGNAL(mouseReleased(QMouseEvent*)), - this, SLOT (slotMouseReleased(QMouseEvent*))); + TQObject::connect + (getCanvasView(), TQT_SIGNAL(mouseReleased(TQMouseEvent*)), + this, TQT_SLOT (slotMouseReleased(TQMouseEvent*))); - QObject::connect - (getCanvasView(), SIGNAL(hoveredOverNoteChanged(const QString&)), - this, SLOT (slotHoveredOverNoteChanged(const QString&))); + TQObject::connect + (getCanvasView(), TQT_SIGNAL(hoveredOverNoteChanged(const TQString&)), + this, TQT_SLOT (slotHoveredOverNoteChanged(const TQString&))); - QObject::connect - (getCanvasView(), SIGNAL(hoveredOverAbsoluteTimeChanged(unsigned int)), - this, SLOT (slotHoveredOverAbsoluteTimeChanged(unsigned int))); + TQObject::connect + (getCanvasView(), TQT_SIGNAL(hoveredOverAbsoluteTimeChanged(unsigned int)), + this, TQT_SLOT (slotHoveredOverAbsoluteTimeChanged(unsigned int))); - QObject::connect - (getCanvasView(), SIGNAL(zoomIn()), this, SLOT(slotZoomIn())); + TQObject::connect + (getCanvasView(), TQT_SIGNAL(zoomIn()), this, TQT_SLOT(slotZoomIn())); - QObject::connect - (getCanvasView(), SIGNAL(zoomOut()), this, SLOT(slotZoomOut())); + TQObject::connect + (getCanvasView(), TQT_SIGNAL(zoomOut()), this, TQT_SLOT(slotZoomOut())); - QObject::connect - (m_pannerDialog->scrollbox(), SIGNAL(valueChanged(const QPoint &)), - getCanvasView(), SLOT(slotSetScrollPos(const QPoint &))); + TQObject::connect + (m_pannerDialog->scrollbox(), TQT_SIGNAL(valueChanged(const TQPoint &)), + getCanvasView(), TQT_SLOT(slotSetScrollPos(const TQPoint &))); - QObject::connect - (getCanvasView()->horizontalScrollBar(), SIGNAL(valueChanged(int)), - m_pannerDialog->scrollbox(), SLOT(setViewX(int))); + TQObject::connect + (getCanvasView()->horizontalScrollBar(), TQT_SIGNAL(valueChanged(int)), + m_pannerDialog->scrollbox(), TQT_SLOT(setViewX(int))); - QObject::connect - (getCanvasView()->verticalScrollBar(), SIGNAL(valueChanged(int)), - m_pannerDialog->scrollbox(), SLOT(setViewY(int))); + TQObject::connect + (getCanvasView()->verticalScrollBar(), TQT_SIGNAL(valueChanged(int)), + m_pannerDialog->scrollbox(), TQT_SLOT(setViewY(int))); - QObject::connect - (doc, SIGNAL(pointerPositionChanged(timeT)), - this, SLOT(slotSetPointerPosition(timeT))); + TQObject::connect + (doc, TQT_SIGNAL(pointerPositionChanged(timeT)), + this, TQT_SLOT(slotSetPointerPosition(timeT))); // // Connect vertical scrollbars between canvas and notation header - QObject::connect - (getCanvasView()->verticalScrollBar(), SIGNAL(valueChanged(int)), - this, SLOT(slotVerticalScrollHeadersGroup(int))); + TQObject::connect + (getCanvasView()->verticalScrollBar(), TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(slotVerticalScrollHeadersGroup(int))); - QObject::connect - (getCanvasView()->verticalScrollBar(), SIGNAL(sliderMoved(int)), - this, SLOT(slotVerticalScrollHeadersGroup(int))); + TQObject::connect + (getCanvasView()->verticalScrollBar(), TQT_SIGNAL(sliderMoved(int)), + this, TQT_SLOT(slotVerticalScrollHeadersGroup(int))); - QObject::connect - (m_headersGroupView, SIGNAL(gotWheelEvent(QWheelEvent*)), - getCanvasView(), SLOT(slotExternalWheelEvent(QWheelEvent*))); + TQObject::connect + (m_headersGroupView, TQT_SIGNAL(gotWheelEvent(TQWheelEvent*)), + getCanvasView(), TQT_SLOT(slotExternalWheelEvent(TQWheelEvent*))); // Ensure notation header keeps the right bottom margin when user // toggles the canvas view bottom rulers - connect(getCanvasView(), SIGNAL(bottomWidgetHeightChanged(int)), - this, SLOT(slotCanvasBottomWidgetHeightChanged(int))); + connect(getCanvasView(), TQT_SIGNAL(bottomWidgetHeightChanged(int)), + this, TQT_SLOT(slotCanvasBottomWidgetHeightChanged(int))); // Signal canvas horizontal scroll to notation header - QObject::connect - (getCanvasView(), SIGNAL(contentsMoving(int, int)), - this, SLOT(slotUpdateHeaders(int, int))); + TQObject::connect + (getCanvasView(), TQT_SIGNAL(contentsMoving(int, int)), + this, TQT_SLOT(slotUpdateHeaders(int, int))); // Connect the close notation headers button - QObject::connect(hideHeadersButton, SIGNAL(clicked()), - this, SLOT(slotHideHeadersGroup())); + TQObject::connect(hideHeadersButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotHideHeadersGroup())); stateChanged("have_selection", KXMLGUIClient::StateReverse); stateChanged("have_notes_in_selection", KXMLGUIClient::StateReverse); @@ -764,17 +764,17 @@ NotationView::NotationView(RosegardenGUIDoc *doc, // getCanvasView()->repaintContents(); updateView(); - QObject::connect - (this, SIGNAL(renderComplete()), - getCanvasView(), SLOT(slotRenderComplete())); + TQObject::connect + (this, TQT_SIGNAL(renderComplete()), + getCanvasView(), TQT_SLOT(slotRenderComplete())); if (parent) { const TrackButtons * trackLabels = ((RosegardenGUIView*)parent)->getTrackEditor()->getTrackButtons(); - QObject::connect - (trackLabels, SIGNAL(nameChanged()), - this, SLOT(slotUpdateStaffName())); + TQObject::connect + (trackLabels, TQT_SIGNAL(nameChanged()), + this, TQT_SLOT(slotUpdateStaffName())); } setConfigDialogPageIndex(3); @@ -796,7 +796,7 @@ NotationView::NotationView(RosegardenGUIDoc *doc, NotationView::NotationView(RosegardenGUIDoc *doc, std::vector<Segment *> segments, - QWidget *parent, + TQWidget *parent, NotationView *referenceView) : EditView(doc, segments, 1, 0, "printview"), m_properties(getViewLocalPropertyPrefix()), @@ -889,7 +889,7 @@ NotationView::NotationView(RosegardenGUIDoc *doc, setBackgroundMode(PaletteBase); m_config->setGroup(NotationViewConfigGroup); - QCanvas *tCanvas = new QCanvas(this); + TQCanvas *tCanvas = new TQCanvas(this); tCanvas->resize(width() * 2, height() * 2); //!!! setCanvasView(new NotationCanvasView(*this, tCanvas, getCentralWidget())); @@ -1046,16 +1046,16 @@ void NotationView::positionStaffs() const Configuration &metadata = getDocument()->getComposition().getMetadata(); - QFont defaultFont(NotePixmapFactory::defaultSerifFontFamily); + TQFont defaultFont(NotePixmapFactory::defaultSerifFontFamily); m_config->setGroup(NotationViewConfigGroup); - QFont font = m_config->readFontEntry("textfont", &defaultFont); + TQFont font = m_config->readFontEntry("textfont", &defaultFont); font.setPixelSize(m_fontSize * 5); - QFontMetrics metrics(font); + TQFontMetrics metrics(font); if (metadata.has(CompositionMetadataKeys::Title)) { - QString title(strtoqstr(metadata.get<String> + TQString title(strtoqstr(metadata.get<String> (CompositionMetadataKeys::Title))); - m_title = new QCanvasText(title, font, canvas()); + m_title = new TQCanvasText(title, font, canvas()); m_title->setX(m_leftGutter + pageWidth / 2 - metrics.width(title) / 2); m_title->setY(20 + topMargin / 4 + metrics.ascent()); m_title->show(); @@ -1063,12 +1063,12 @@ void NotationView::positionStaffs() } font.setPixelSize(m_fontSize * 3); - metrics = QFontMetrics(font); + metrics = TQFontMetrics(font); if (metadata.has(CompositionMetadataKeys::Subtitle)) { - QString subtitle(strtoqstr(metadata.get<String> + TQString subtitle(strtoqstr(metadata.get<String> (CompositionMetadataKeys::Subtitle))); - m_subtitle = new QCanvasText(subtitle, font, canvas()); + m_subtitle = new TQCanvasText(subtitle, font, canvas()); m_subtitle->setX(m_leftGutter + pageWidth / 2 - metrics.width(subtitle) / 2); m_subtitle->setY(20 + titleHeight + metrics.ascent()); m_subtitle->show(); @@ -1076,9 +1076,9 @@ void NotationView::positionStaffs() } if (metadata.has(CompositionMetadataKeys::Composer)) { - QString composer(strtoqstr(metadata.get<String> + TQString composer(strtoqstr(metadata.get<String> (CompositionMetadataKeys::Composer))); - m_composer = new QCanvasText(composer, font, canvas()); + m_composer = new TQCanvasText(composer, font, canvas()); m_composer->setX(m_leftGutter + pageWidth - metrics.width(composer) - leftMargin); m_composer->setY(20 + titleHeight + metrics.ascent()); m_composer->show(); @@ -1086,12 +1086,12 @@ void NotationView::positionStaffs() } font.setPixelSize(m_fontSize * 2); - metrics = QFontMetrics(font); + metrics = TQFontMetrics(font); if (metadata.has(CompositionMetadataKeys::Copyright)) { - QString copyright(strtoqstr(metadata.get<String> + TQString copyright(strtoqstr(metadata.get<String> (CompositionMetadataKeys::Copyright))); - m_copyright = new QCanvasText(copyright, font, canvas()); + m_copyright = new TQCanvasText(copyright, font, canvas()); m_copyright->setX(m_leftGutter + leftMargin); m_copyright->setY(20 + pageHeight - topMargin - metrics.descent()); m_copyright->show(); @@ -1328,20 +1328,20 @@ void NotationView::positionPages() if (m_printMode) return ; - QPixmap background; - QPixmap deskBackground; + TQPixmap background; + TQPixmap deskBackground; bool haveBackground = false; m_config->setGroup(NotationViewConfigGroup); if (m_config->readBoolEntry("backgroundtextures", true)) { - QString pixmapDir = + TQString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); - if (background.load(QString("%1/misc/bg-paper-cream.xpm"). + if (background.load(TQString("%1/misc/bg-paper-cream.xpm"). arg(pixmapDir))) { haveBackground = true; } // we're happy to ignore errors from this one: - deskBackground.load(QString("%1/misc/bg-desktop.xpm").arg(pixmapDir)); + deskBackground.load(TQString("%1/misc/bg-desktop.xpm").arg(pixmapDir)); } int pageWidth = getPageWidth(); @@ -1378,9 +1378,9 @@ void NotationView::positionPages() getCanvasView()->setErasePixmap(background); } - QFont pageNumberFont; + TQFont pageNumberFont; pageNumberFont.setPixelSize(m_fontSize * 2); - QFontMetrics pageNumberMetrics(pageNumberFont); + TQFontMetrics pageNumberMetrics(pageNumberFont); for (int page = 0; page < maxPageCount; ++page) { @@ -1389,17 +1389,17 @@ void NotationView::positionPages() int w = pageWidth - leftMargin / 2; int h = pageHeight; - QString str = QString("%1").arg(page + 1); - QCanvasText *text = new QCanvasText(str, pageNumberFont, canvas()); + TQString str = TQString("%1").arg(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); text->setZ( -999); text->show(); m_pageNumbers.push_back(text); - QCanvasRectangle *rect = new QCanvasRectangle(x, y, w, h, canvas()); + TQCanvasRectangle *rect = new TQCanvasRectangle(x, y, w, h, canvas()); if (haveBackground) - rect->setBrush(QBrush(Qt::white, background)); + rect->setBrush(TQBrush(Qt::white, background)); rect->setPen(Qt::black); rect->setZ( -1000); rect->show(); @@ -1440,7 +1440,7 @@ void NotationView::setOneToolbar(const char *actionName, std::cerr << "WARNING: No such action as " << actionName << std::endl; return ; } - QWidget *toolbar = toolBar(toolbarName); + TQWidget *toolbar = toolBar(toolbarName); if (!toolbar) { std::cerr << "WARNING: No such toolbar as " << toolbarName << std::endl; return ; @@ -1493,16 +1493,16 @@ void NotationView::readOptions() void NotationView::setupActions() { - KStdAction::print(this, SLOT(slotFilePrint()), actionCollection()); - KStdAction::printPreview(this, SLOT(slotFilePrintPreview()), + KStdAction::print(this, TQT_SLOT(slotFilePrint()), actionCollection()); + KStdAction::printPreview(this, TQT_SLOT(slotFilePrintPreview()), actionCollection()); new KAction(i18n("Print &with LilyPond..."), 0, 0, this, - SLOT(slotPrintLilyPond()), actionCollection(), + TQT_SLOT(slotPrintLilyPond()), actionCollection(), "file_print_lilypond"); new KAction(i18n("Preview with Lil&yPond..."), 0, 0, this, - SLOT(slotPreviewLilyPond()), actionCollection(), + TQT_SLOT(slotPreviewLilyPond()), actionCollection(), "file_preview_lilypond"); EditViewBase::setupActions("notation.rc"); @@ -1522,11 +1522,11 @@ void NotationView::setupActions() for (std::vector<std::string>::iterator i = f.begin(); i != f.end(); ++i) { - QString fontQName(strtoqstr(*i)); + TQString fontQName(strtoqstr(*i)); KToggleAction *fontAction = new KToggleAction - (fontQName, 0, this, SLOT(slotChangeFontFromAction()), + (fontQName, 0, this, TQT_SLOT(slotChangeFontFromAction()), actionCollection(), "note_font_" + fontQName); fontAction->setChecked(*i == m_fontName); @@ -1543,7 +1543,7 @@ void NotationView::setupActions() m_showHeadersMenuEntry = new KAction(i18n("Show Track Headers"), 0, this, - SLOT(slotShowHeadersGroup()), + TQT_SLOT(slotShowHeadersGroup()), actionCollection(), "show_track_headers"); KActionMenu *spacingActionMenu = @@ -1557,9 +1557,9 @@ void NotationView::setupActions() KToggleAction *spacingAction = new KToggleAction - (QString("%1%").arg(*i), 0, this, - SLOT(slotChangeSpacingFromAction()), - actionCollection(), QString("spacing_%1").arg(*i)); + (TQString("%1%").arg(*i), 0, this, + TQT_SLOT(slotChangeSpacingFromAction()), + actionCollection(), TQString("spacing_%1").arg(*i)); spacingAction->setExclusiveGroup("spacing"); spacingAction->setChecked(*i == defaultSpacing); @@ -1577,15 +1577,15 @@ void NotationView::setupActions() for (std::vector<int>::iterator i = proportions.begin(); i != proportions.end(); ++i) { - QString name = QString("%1%").arg(*i); + TQString name = TQString("%1%").arg(*i); if (*i == 0) name = i18n("None"); KToggleAction *proportionAction = new KToggleAction (name, 0, this, - SLOT(slotChangeProportionFromAction()), - actionCollection(), QString("proportion_%1").arg(*i)); + TQT_SLOT(slotChangeProportionFromAction()), + actionCollection(), TQString("proportion_%1").arg(*i)); proportionAction->setExclusiveGroup("proportion"); proportionAction->setChecked(*i == defaultProportion); @@ -1603,11 +1603,11 @@ void NotationView::setupActions() for (std::vector<NoteStyleName>::iterator i = styles.begin(); i != styles.end(); ++i) { - QString styleQName(strtoqstr(*i)); + TQString styleQName(strtoqstr(*i)); KAction *styleAction = new KAction - (styleQName, 0, this, SLOT(slotSetStyleFromAction()), + (styleQName, 0, this, TQT_SLOT(slotSetStyleFromAction()), actionCollection(), "style_" + styleQName); styleActionMenu->insert(styleAction); @@ -1621,22 +1621,22 @@ void NotationView::setupActions() new KAction - (i18n("Insert Rest"), Key_P, this, SLOT(slotInsertRest()), - actionCollection(), QString("insert_rest")); + (i18n("Insert Rest"), Key_P, this, TQT_SLOT(slotInsertRest()), + actionCollection(), TQString("insert_rest")); new KAction (i18n("Switch from Note to Rest"), Key_T, this, - SLOT(slotSwitchFromNoteToRest()), - actionCollection(), QString("switch_from_note_to_rest")); + TQT_SLOT(slotSwitchFromNoteToRest()), + actionCollection(), TQString("switch_from_note_to_rest")); new KAction (i18n("Switch from Rest to Note"), Key_Y, this, - SLOT(slotSwitchFromRestToNote()), - actionCollection(), QString("switch_from_rest_to_note")); + TQT_SLOT(slotSwitchFromRestToNote()), + actionCollection(), TQString("switch_from_rest_to_note")); // setup Notes menu & toolbar - QIconSet icon; + TQIconSet icon; for (NoteActionDataMap::Iterator actionDataIter = m_noteActionDataMap->begin(); actionDataIter != m_noteActionDataMap->end(); @@ -1651,7 +1651,7 @@ void NotationView::setupActions() icon, noteActionData.keycode, this, - SLOT(slotNoteAction()), + TQT_SLOT(slotNoteAction()), actionCollection(), noteActionData.actionName); noteAction->setExclusiveGroup("notes"); @@ -1677,7 +1677,7 @@ void NotationView::setupActions() icon, data.keycode, this, - SLOT(slotNoteChangeAction()), + TQT_SLOT(slotNoteChangeAction()), actionCollection(), data.actionName); } @@ -1685,7 +1685,7 @@ void NotationView::setupActions() // // Accidentals // - static QString actionsAccidental[][4] = + static TQString actionsAccidental[][4] = { { i18n("No accidental"), "1slotNoAccidental()", "no_accidental", "accidental-none" }, { i18n("Follow previous accidental"), "1slotFollowAccidental()", "follow_accidental", "accidental-follow" }, @@ -1699,7 +1699,7 @@ void NotationView::setupActions() for (unsigned int i = 0; i < sizeof(actionsAccidental) / sizeof(actionsAccidental[0]); ++i) { - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap (actionsAccidental[i][3]))); noteAction = new KRadioAction(actionsAccidental[i][0], icon, 0, this, actionsAccidental[i][1], @@ -1713,49 +1713,49 @@ void NotationView::setupActions() // // Treble - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("clef-treble"))); + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("clef-treble"))); noteAction = new KRadioAction(i18n("&Treble Clef"), icon, 0, this, - SLOT(slotTrebleClef()), + TQT_SLOT(slotTrebleClef()), actionCollection(), "treble_clef"); noteAction->setExclusiveGroup("notes"); // Alto - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("clef-alto"))); + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("clef-alto"))); noteAction = new KRadioAction(i18n("&Alto Clef"), icon, 0, this, - SLOT(slotAltoClef()), + TQT_SLOT(slotAltoClef()), actionCollection(), "alto_clef"); noteAction->setExclusiveGroup("notes"); // Tenor - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("clef-tenor"))); + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("clef-tenor"))); noteAction = new KRadioAction(i18n("Te&nor Clef"), icon, 0, this, - SLOT(slotTenorClef()), + TQT_SLOT(slotTenorClef()), actionCollection(), "tenor_clef"); noteAction->setExclusiveGroup("notes"); // Bass - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("clef-bass"))); + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("clef-bass"))); noteAction = new KRadioAction(i18n("&Bass Clef"), icon, 0, this, - SLOT(slotBassClef()), + TQT_SLOT(slotBassClef()), actionCollection(), "bass_clef"); noteAction->setExclusiveGroup("notes"); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("text"))); + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("text"))); noteAction = new KRadioAction(i18n("&Text"), icon, Key_F8, this, - SLOT(slotText()), + TQT_SLOT(slotText()), actionCollection(), "text"); noteAction->setExclusiveGroup("notes"); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("guitarchord"))); + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("guitarchord"))); noteAction = new KRadioAction(i18n("&Guitar Chord"), icon, Key_F9, this, - SLOT(slotGuitarChord()), + TQT_SLOT(slotGuitarChord()), actionCollection(), "guitarchord"); noteAction->setExclusiveGroup("notes"); - /* icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("lilypond"))); + /* icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("lilypond"))); noteAction = new KRadioAction(i18n("Lil&ypond Directive"), icon, Key_F9, this, - SLOT(slotLilyPondDirective()), + TQT_SLOT(slotLilyPondDirective()), actionCollection(), "lilypond_directive"); noteAction->setExclusiveGroup("notes"); */ @@ -1764,53 +1764,53 @@ void NotationView::setupActions() // Edition tools (eraser, selector...) // noteAction = new KRadioAction(i18n("&Erase"), "eraser", Key_F4, - this, SLOT(slotEraseSelected()), + this, TQT_SLOT(slotEraseSelected()), actionCollection(), "erase"); noteAction->setExclusiveGroup("notes"); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("select"))); + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("select"))); noteAction = new KRadioAction(i18n("&Select and Edit"), icon, Key_F2, - this, SLOT(slotSelectSelected()), + this, TQT_SLOT(slotSelectSelected()), actionCollection(), "select"); noteAction->setExclusiveGroup("notes"); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("step_by_step"))); + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("step_by_step"))); new KToggleAction(i18n("Ste&p Recording"), icon, 0, this, - SLOT(slotToggleStepByStep()), actionCollection(), + TQT_SLOT(slotToggleStepByStep()), actionCollection(), "toggle_step_by_step"); // Edit menu new KAction(i18n("Select from Sta&rt"), 0, this, - SLOT(slotEditSelectFromStart()), actionCollection(), + TQT_SLOT(slotEditSelectFromStart()), actionCollection(), "select_from_start"); new KAction(i18n("Select to &End"), 0, this, - SLOT(slotEditSelectToEnd()), actionCollection(), + TQT_SLOT(slotEditSelectToEnd()), actionCollection(), "select_to_end"); new KAction(i18n("Select Whole St&aff"), Key_A + CTRL, this, - SLOT(slotEditSelectWholeStaff()), actionCollection(), + TQT_SLOT(slotEditSelectWholeStaff()), actionCollection(), "select_whole_staff"); new KAction(i18n("C&ut and Close"), CTRL + SHIFT + Key_X, this, - SLOT(slotEditCutAndClose()), actionCollection(), + TQT_SLOT(slotEditCutAndClose()), actionCollection(), "cut_and_close"); new KAction(i18n("Pa&ste..."), CTRL + SHIFT + Key_V, this, - SLOT(slotEditGeneralPaste()), actionCollection(), + TQT_SLOT(slotEditGeneralPaste()), actionCollection(), "general_paste"); new KAction(i18n("De&lete"), Key_Delete, this, - SLOT(slotEditDelete()), actionCollection(), + TQT_SLOT(slotEditDelete()), actionCollection(), "delete"); new KAction(i18n("Move to Staff Above"), 0, this, - SLOT(slotMoveEventsUpStaff()), actionCollection(), + TQT_SLOT(slotMoveEventsUpStaff()), actionCollection(), "move_events_up_staff"); new KAction(i18n("Move to Staff Below"), 0, this, - SLOT(slotMoveEventsDownStaff()), actionCollection(), + TQT_SLOT(slotMoveEventsDownStaff()), actionCollection(), "move_events_down_staff"); // @@ -1818,56 +1818,56 @@ void NotationView::setupActions() // int layoutMode = m_config->readNumEntry("layoutmode", 0); - QString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); + TQString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); - QCanvasPixmap pixmap(pixmapDir + "/toolbar/linear-layout.xpm"); - icon = QIconSet(pixmap); + TQCanvasPixmap pixmap(pixmapDir + "/toolbar/linear-layout.xpm"); + icon = TQIconSet(pixmap); KRadioAction *linearModeAction = new KRadioAction - (i18n("&Linear Layout"), icon, 0, this, SLOT(slotLinearMode()), + (i18n("&Linear Layout"), icon, 0, this, TQT_SLOT(slotLinearMode()), actionCollection(), "linear_mode"); linearModeAction->setExclusiveGroup("layoutMode"); if (layoutMode == 0) linearModeAction->setChecked(true); pixmap.load(pixmapDir + "/toolbar/continuous-page-mode.xpm"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); KRadioAction *continuousPageModeAction = new KRadioAction - (i18n("&Continuous Page Layout"), icon, 0, this, SLOT(slotContinuousPageMode()), + (i18n("&Continuous Page Layout"), icon, 0, this, TQT_SLOT(slotContinuousPageMode()), actionCollection(), "continuous_page_mode"); continuousPageModeAction->setExclusiveGroup("layoutMode"); if (layoutMode == 1) continuousPageModeAction->setChecked(true); pixmap.load(pixmapDir + "/toolbar/multi-page-mode.xpm"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); KRadioAction *multiPageModeAction = new KRadioAction - (i18n("&Multiple Page Layout"), icon, 0, this, SLOT(slotMultiPageMode()), + (i18n("&Multiple Page Layout"), icon, 0, this, TQT_SLOT(slotMultiPageMode()), actionCollection(), "multi_page_mode"); multiPageModeAction->setExclusiveGroup("layoutMode"); if (layoutMode == 2) multiPageModeAction->setChecked(true); new KToggleAction(i18n("Show Ch&ord Name Ruler"), 0, this, - SLOT(slotToggleChordsRuler()), + TQT_SLOT(slotToggleChordsRuler()), actionCollection(), "show_chords_ruler"); new KToggleAction(i18n("Show Ra&w Note Ruler"), 0, this, - SLOT(slotToggleRawNoteRuler()), + TQT_SLOT(slotToggleRawNoteRuler()), actionCollection(), "show_raw_note_ruler"); new KToggleAction(i18n("Show &Tempo Ruler"), 0, this, - SLOT(slotToggleTempoRuler()), + TQT_SLOT(slotToggleTempoRuler()), actionCollection(), "show_tempo_ruler"); new KToggleAction(i18n("Show &Annotations"), 0, this, - SLOT(slotToggleAnnotations()), + TQT_SLOT(slotToggleAnnotations()), actionCollection(), "show_annotations"); new KToggleAction(i18n("Show Lily&Pond Directives"), 0, this, - SLOT(slotToggleLilyPondDirectives()), + TQT_SLOT(slotToggleLilyPondDirectives()), actionCollection(), "show_lilypond_directives"); - new KAction(i18n("Open L&yric Editor"), 0, this, SLOT(slotEditLyrics()), + new KAction(i18n("Open L&yric Editor"), 0, this, TQT_SLOT(slotEditLyrics()), actionCollection(), "lyric_editor"); // @@ -1878,53 +1878,53 @@ void NotationView::setupActions() ("group-beam"))); new KAction(BeamCommand::getGlobalName(), icon, Key_B + CTRL, this, - SLOT(slotGroupBeam()), actionCollection(), "beam"); + TQT_SLOT(slotGroupBeam()), actionCollection(), "beam"); new KAction(AutoBeamCommand::getGlobalName(), 0, this, - SLOT(slotGroupAutoBeam()), actionCollection(), "auto_beam"); + TQT_SLOT(slotGroupAutoBeam()), actionCollection(), "auto_beam"); icon = QIconSet (NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap ("group-unbeam"))); new KAction(BreakCommand::getGlobalName(), icon, Key_U + CTRL, this, - SLOT(slotGroupBreak()), actionCollection(), "break_group"); + TQT_SLOT(slotGroupBreak()), actionCollection(), "break_group"); icon = QIconSet (NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap ("group-simple-tuplet"))); new KAction(TupletCommand::getGlobalName(true), icon, Key_R + CTRL, this, - SLOT(slotGroupSimpleTuplet()), actionCollection(), "simple_tuplet"); + TQT_SLOT(slotGroupSimpleTuplet()), actionCollection(), "simple_tuplet"); icon = QIconSet (NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap ("group-tuplet"))); new KAction(TupletCommand::getGlobalName(false), icon, Key_T + CTRL, this, - SLOT(slotGroupGeneralTuplet()), actionCollection(), "tuplet"); + TQT_SLOT(slotGroupGeneralTuplet()), actionCollection(), "tuplet"); new KAction(UnTupletCommand::getGlobalName(), 0, this, - SLOT(slotGroupUnTuplet()), actionCollection(), "break_tuplets"); + TQT_SLOT(slotGroupUnTuplet()), actionCollection(), "break_tuplets"); - icon = QIconSet(NotePixmapFactory::toQPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap (NotePixmapFactory::makeToolbarPixmap("triplet"))); (new KToggleAction(i18n("Trip&let Insert Mode"), icon, Key_G, - this, SLOT(slotUpdateInsertModeStatus()), + this, TQT_SLOT(slotUpdateInsertModeStatus()), actionCollection(), "triplet_mode"))-> setChecked(false); - icon = QIconSet(NotePixmapFactory::toQPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap (NotePixmapFactory::makeToolbarPixmap("chord"))); (new KToggleAction(i18n("C&hord Insert Mode"), icon, Key_H, - this, SLOT(slotUpdateInsertModeStatus()), + this, TQT_SLOT(slotUpdateInsertModeStatus()), actionCollection(), "chord_mode"))-> setChecked(false); - icon = QIconSet(NotePixmapFactory::toQPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap (NotePixmapFactory::makeToolbarPixmap("group-grace"))); (new KToggleAction(i18n("Grace Insert Mode"), icon, 0, - this, SLOT(slotUpdateInsertModeStatus()), + this, TQT_SLOT(slotUpdateInsertModeStatus()), actionCollection(), "grace_mode"))-> setChecked(false); /*!!! @@ -1933,10 +1933,10 @@ void NotationView::setupActions() ("group-grace"))); new KAction(GraceCommand::getGlobalName(), icon, 0, this, - SLOT(slotGroupGrace()), actionCollection(), "grace"); + TQT_SLOT(slotGroupGrace()), actionCollection(), "grace"); new KAction(UnGraceCommand::getGlobalName(), 0, this, - SLOT(slotGroupUnGrace()), actionCollection(), "ungrace"); + TQT_SLOT(slotGroupUnGrace()), actionCollection(), "ungrace"); */ icon = QIconSet (NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap @@ -1944,11 +1944,11 @@ void NotationView::setupActions() new KAction(AddIndicationCommand::getGlobalName (Indication::Slur), icon, Key_ParenRight, this, - SLOT(slotGroupSlur()), actionCollection(), "slur"); + TQT_SLOT(slotGroupSlur()), actionCollection(), "slur"); new KAction(AddIndicationCommand::getGlobalName (Indication::PhrasingSlur), 0, Key_ParenRight + CTRL, this, - SLOT(slotGroupPhrasingSlur()), actionCollection(), "phrasing_slur"); + TQT_SLOT(slotGroupPhrasingSlur()), actionCollection(), "phrasing_slur"); icon = QIconSet (NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap @@ -1956,7 +1956,7 @@ void NotationView::setupActions() new KAction(AddIndicationCommand::getGlobalName (Indication::Glissando), icon, 0, this, - SLOT(slotGroupGlissando()), actionCollection(), "glissando"); + TQT_SLOT(slotGroupGlissando()), actionCollection(), "glissando"); icon = QIconSet (NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap @@ -1964,7 +1964,7 @@ void NotationView::setupActions() new KAction(AddIndicationCommand::getGlobalName (Indication::Crescendo), icon, Key_Less, this, - SLOT(slotGroupCrescendo()), actionCollection(), "crescendo"); + TQT_SLOT(slotGroupCrescendo()), actionCollection(), "crescendo"); icon = QIconSet (NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap @@ -1972,11 +1972,11 @@ void NotationView::setupActions() new KAction(AddIndicationCommand::getGlobalName (Indication::Decrescendo), icon, Key_Greater, this, - SLOT(slotGroupDecrescendo()), actionCollection(), "decrescendo"); + TQT_SLOT(slotGroupDecrescendo()), actionCollection(), "decrescendo"); new KAction(AddIndicationCommand::getGlobalName (Indication::QuindicesimaUp), 0, 0, this, - SLOT(slotGroupOctave2Up()), actionCollection(), "octave_2up"); + TQT_SLOT(slotGroupOctave2Up()), actionCollection(), "octave_2up"); icon = QIconSet (NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap @@ -1984,33 +1984,33 @@ void NotationView::setupActions() new KAction(AddIndicationCommand::getGlobalName (Indication::OttavaUp), icon, 0, this, - SLOT(slotGroupOctaveUp()), actionCollection(), "octave_up"); + TQT_SLOT(slotGroupOctaveUp()), actionCollection(), "octave_up"); new KAction(AddIndicationCommand::getGlobalName (Indication::OttavaDown), 0, 0, this, - SLOT(slotGroupOctaveDown()), actionCollection(), "octave_down"); + TQT_SLOT(slotGroupOctaveDown()), actionCollection(), "octave_down"); new KAction(AddIndicationCommand::getGlobalName (Indication::QuindicesimaDown), 0, 0, this, - SLOT(slotGroupOctave2Down()), actionCollection(), "octave_2down"); + TQT_SLOT(slotGroupOctave2Down()), actionCollection(), "octave_2down"); icon = QIconSet (NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap ("group-chord"))); new KAction(MakeChordCommand::getGlobalName(), icon, 0, this, - SLOT(slotGroupMakeChord()), actionCollection(), "make_chord"); + TQT_SLOT(slotGroupMakeChord()), actionCollection(), "make_chord"); // setup Transforms menu new KAction(NormalizeRestsCommand::getGlobalName(), Key_N + CTRL, this, - SLOT(slotTransformsNormalizeRests()), actionCollection(), + TQT_SLOT(slotTransformsNormalizeRests()), actionCollection(), "normalize_rests"); new KAction(CollapseRestsCommand::getGlobalName(), 0, this, - SLOT(slotTransformsCollapseRests()), actionCollection(), + TQT_SLOT(slotTransformsCollapseRests()), actionCollection(), "collapse_rests_aggressively"); new KAction(CollapseNotesCommand::getGlobalName(), Key_Equal + CTRL, this, - SLOT(slotTransformsCollapseNotes()), actionCollection(), + TQT_SLOT(slotTransformsCollapseNotes()), actionCollection(), "collapse_notes"); icon = QIconSet @@ -2018,15 +2018,15 @@ void NotationView::setupActions() ("transforms-tie"))); new KAction(TieNotesCommand::getGlobalName(), icon, Key_AsciiTilde, this, - SLOT(slotTransformsTieNotes()), actionCollection(), + TQT_SLOT(slotTransformsTieNotes()), actionCollection(), "tie_notes"); new KAction(UntieNotesCommand::getGlobalName(), 0, this, - SLOT(slotTransformsUntieNotes()), actionCollection(), + TQT_SLOT(slotTransformsUntieNotes()), actionCollection(), "untie_notes"); new KAction(MakeNotesViableCommand::getGlobalName(), 0, this, - SLOT(slotTransformsMakeNotesViable()), actionCollection(), + TQT_SLOT(slotTransformsMakeNotesViable()), actionCollection(), "make_notes_viable"); icon = QIconSet @@ -2034,49 +2034,49 @@ void NotationView::setupActions() ("transforms-decounterpoint"))); new KAction(DeCounterpointCommand::getGlobalName(), icon, 0, this, - SLOT(slotTransformsDeCounterpoint()), actionCollection(), + TQT_SLOT(slotTransformsDeCounterpoint()), actionCollection(), "de_counterpoint"); new KAction(ChangeStemsCommand::getGlobalName(true), 0, Key_PageUp + CTRL, this, - SLOT(slotTransformsStemsUp()), actionCollection(), + TQT_SLOT(slotTransformsStemsUp()), actionCollection(), "stems_up"); new KAction(ChangeStemsCommand::getGlobalName(false), 0, Key_PageDown + CTRL, this, - SLOT(slotTransformsStemsDown()), actionCollection(), + TQT_SLOT(slotTransformsStemsDown()), actionCollection(), "stems_down"); new KAction(RestoreStemsCommand::getGlobalName(), 0, this, - SLOT(slotTransformsRestoreStems()), actionCollection(), + TQT_SLOT(slotTransformsRestoreStems()), actionCollection(), "restore_stems"); new KAction(ChangeSlurPositionCommand::getGlobalName(true), 0, this, - SLOT(slotTransformsSlursAbove()), actionCollection(), + TQT_SLOT(slotTransformsSlursAbove()), actionCollection(), "slurs_above"); new KAction(ChangeSlurPositionCommand::getGlobalName(false), 0, this, - SLOT(slotTransformsSlursBelow()), actionCollection(), + TQT_SLOT(slotTransformsSlursBelow()), actionCollection(), "slurs_below"); new KAction(RestoreSlursCommand::getGlobalName(), 0, this, - SLOT(slotTransformsRestoreSlurs()), actionCollection(), + TQT_SLOT(slotTransformsRestoreSlurs()), actionCollection(), "restore_slurs"); new KAction(ChangeTiePositionCommand::getGlobalName(true), 0, this, - SLOT(slotTransformsTiesAbove()), actionCollection(), + TQT_SLOT(slotTransformsTiesAbove()), actionCollection(), "ties_above"); new KAction(ChangeTiePositionCommand::getGlobalName(false), 0, this, - SLOT(slotTransformsTiesBelow()), actionCollection(), + TQT_SLOT(slotTransformsTiesBelow()), actionCollection(), "ties_below"); new KAction(RestoreTiesCommand::getGlobalName(), 0, this, - SLOT(slotTransformsRestoreTies()), actionCollection(), + TQT_SLOT(slotTransformsRestoreTies()), actionCollection(), "restore_ties"); icon = QIconSet @@ -2086,7 +2086,7 @@ void NotationView::setupActions() new KAction(RespellCommand::getGlobalName (RespellCommand::Set, Accidentals::DoubleFlat), icon, 0, this, - SLOT(slotRespellDoubleFlat()), actionCollection(), + TQT_SLOT(slotRespellDoubleFlat()), actionCollection(), "respell_doubleflat"); icon = QIconSet @@ -2096,7 +2096,7 @@ void NotationView::setupActions() new KAction(RespellCommand::getGlobalName (RespellCommand::Set, Accidentals::Flat), icon, 0, this, - SLOT(slotRespellFlat()), actionCollection(), + TQT_SLOT(slotRespellFlat()), actionCollection(), "respell_flat"); icon = QIconSet @@ -2106,7 +2106,7 @@ void NotationView::setupActions() new KAction(RespellCommand::getGlobalName (RespellCommand::Set, Accidentals::Natural), icon, 0, this, - SLOT(slotRespellNatural()), actionCollection(), + TQT_SLOT(slotRespellNatural()), actionCollection(), "respell_natural"); icon = QIconSet @@ -2116,7 +2116,7 @@ void NotationView::setupActions() new KAction(RespellCommand::getGlobalName (RespellCommand::Set, Accidentals::Sharp), icon, 0, this, - SLOT(slotRespellSharp()), actionCollection(), + TQT_SLOT(slotRespellSharp()), actionCollection(), "respell_sharp"); icon = QIconSet @@ -2126,35 +2126,35 @@ void NotationView::setupActions() new KAction(RespellCommand::getGlobalName (RespellCommand::Set, Accidentals::DoubleSharp), icon, 0, this, - SLOT(slotRespellDoubleSharp()), actionCollection(), + TQT_SLOT(slotRespellDoubleSharp()), actionCollection(), "respell_doublesharp"); new KAction(RespellCommand::getGlobalName (RespellCommand::Up, Accidentals::NoAccidental), Key_Up + CTRL + SHIFT, this, - SLOT(slotRespellUp()), actionCollection(), + TQT_SLOT(slotRespellUp()), actionCollection(), "respell_up"); new KAction(RespellCommand::getGlobalName (RespellCommand::Down, Accidentals::NoAccidental), Key_Down + CTRL + SHIFT, this, - SLOT(slotRespellDown()), actionCollection(), + TQT_SLOT(slotRespellDown()), actionCollection(), "respell_down"); new KAction(RespellCommand::getGlobalName (RespellCommand::Restore, Accidentals::NoAccidental), 0, this, - SLOT(slotRespellRestore()), actionCollection(), + TQT_SLOT(slotRespellRestore()), actionCollection(), "respell_restore"); new KAction(MakeAccidentalsCautionaryCommand::getGlobalName(true), 0, this, - SLOT(slotShowCautionary()), actionCollection(), + TQT_SLOT(slotShowCautionary()), actionCollection(), "show_cautionary"); new KAction(MakeAccidentalsCautionaryCommand::getGlobalName(false), 0, this, - SLOT(slotCancelCautionary()), actionCollection(), + TQT_SLOT(slotCancelCautionary()), actionCollection(), "cancel_cautionary"); icon = QIconSet @@ -2162,37 +2162,37 @@ void NotationView::setupActions() ("quantize"))); new KAction(EventQuantizeCommand::getGlobalName(), icon, Key_Equal, this, - SLOT(slotTransformsQuantize()), actionCollection(), + TQT_SLOT(slotTransformsQuantize()), actionCollection(), "quantize"); new KAction(FixNotationQuantizeCommand::getGlobalName(), 0, - this, SLOT(slotTransformsFixQuantization()), actionCollection(), + this, TQT_SLOT(slotTransformsFixQuantization()), actionCollection(), "fix_quantization"); new KAction(RemoveNotationQuantizeCommand::getGlobalName(), 0, - this, SLOT(slotTransformsRemoveQuantization()), actionCollection(), + this, TQT_SLOT(slotTransformsRemoveQuantization()), actionCollection(), "remove_quantization"); new KAction(InterpretCommand::getGlobalName(), 0, - this, SLOT(slotTransformsInterpret()), actionCollection(), + this, TQT_SLOT(slotTransformsInterpret()), actionCollection(), "interpret"); new KAction(i18n("&Dump selected events to stderr"), 0, this, - SLOT(slotDebugDump()), actionCollection(), "debug_dump"); + TQT_SLOT(slotDebugDump()), actionCollection(), "debug_dump"); for (MarkActionDataMap::Iterator i = m_markActionDataMap->begin(); i != m_markActionDataMap->end(); ++i) { const MarkActionData &markActionData = **i; - icon = QIconSet(NotePixmapFactory::toQPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap (NotePixmapFactory::makeMarkMenuPixmap(markActionData.mark))); new KAction(markActionData.title, icon, markActionData.keycode, this, - SLOT(slotAddMark()), + TQT_SLOT(slotAddMark()), actionCollection(), markActionData.actionName); } @@ -2202,97 +2202,97 @@ void NotationView::setupActions() ("text-mark"))); new KAction(AddTextMarkCommand::getGlobalName(), icon, 0, this, - SLOT(slotMarksAddTextMark()), actionCollection(), + TQT_SLOT(slotMarksAddTextMark()), actionCollection(), "add_text_mark"); new KAction(AddFingeringMarkCommand::getGlobalName("0"), 0, Key_0 + ALT, this, - SLOT(slotMarksAddFingeringMarkFromAction()), actionCollection(), + TQT_SLOT(slotMarksAddFingeringMarkFromAction()), actionCollection(), "add_fingering_0"); new KAction(AddFingeringMarkCommand::getGlobalName("1"), 0, Key_1 + ALT, this, - SLOT(slotMarksAddFingeringMarkFromAction()), actionCollection(), + TQT_SLOT(slotMarksAddFingeringMarkFromAction()), actionCollection(), "add_fingering_1"); new KAction(AddFingeringMarkCommand::getGlobalName("2"), 0, Key_2 + ALT, this, - SLOT(slotMarksAddFingeringMarkFromAction()), actionCollection(), + TQT_SLOT(slotMarksAddFingeringMarkFromAction()), actionCollection(), "add_fingering_2"); new KAction(AddFingeringMarkCommand::getGlobalName("3"), 0, Key_3 + ALT, this, - SLOT(slotMarksAddFingeringMarkFromAction()), actionCollection(), + TQT_SLOT(slotMarksAddFingeringMarkFromAction()), actionCollection(), "add_fingering_3"); new KAction(AddFingeringMarkCommand::getGlobalName("4"), 0, Key_4 + ALT, this, - SLOT(slotMarksAddFingeringMarkFromAction()), actionCollection(), + TQT_SLOT(slotMarksAddFingeringMarkFromAction()), actionCollection(), "add_fingering_4"); new KAction(AddFingeringMarkCommand::getGlobalName("5"), 0, Key_5 + ALT, this, - SLOT(slotMarksAddFingeringMarkFromAction()), actionCollection(), + TQT_SLOT(slotMarksAddFingeringMarkFromAction()), actionCollection(), "add_fingering_5"); new KAction(AddFingeringMarkCommand::getGlobalName("+"), 0, Key_9 + ALT, this, - SLOT(slotMarksAddFingeringMarkFromAction()), actionCollection(), + TQT_SLOT(slotMarksAddFingeringMarkFromAction()), actionCollection(), "add_fingering_plus"); new KAction(AddFingeringMarkCommand::getGlobalName(), 0, 0, this, - SLOT(slotMarksAddFingeringMark()), actionCollection(), + TQT_SLOT(slotMarksAddFingeringMark()), actionCollection(), "add_fingering_mark"); new KAction(RemoveMarksCommand::getGlobalName(), 0, this, - SLOT(slotMarksRemoveMarks()), actionCollection(), + TQT_SLOT(slotMarksRemoveMarks()), actionCollection(), "remove_marks"); new KAction(RemoveFingeringMarksCommand::getGlobalName(), 0, this, - SLOT(slotMarksRemoveFingeringMarks()), actionCollection(), + TQT_SLOT(slotMarksRemoveFingeringMarks()), actionCollection(), "remove_fingering_marks"); new KAction(i18n("Ma&ke Ornament..."), 0, this, - SLOT(slotMakeOrnament()), actionCollection(), + TQT_SLOT(slotMakeOrnament()), actionCollection(), "make_ornament"); new KAction(i18n("Trigger &Ornament..."), 0, this, - SLOT(slotUseOrnament()), actionCollection(), + TQT_SLOT(slotUseOrnament()), actionCollection(), "use_ornament"); new KAction(i18n("Remove Ornament..."), 0, this, - SLOT(slotRemoveOrnament()), actionCollection(), + TQT_SLOT(slotRemoveOrnament()), actionCollection(), "remove_ornament"); - static QString slashTitles[] = { + static TQString slashTitles[] = { i18n("&None"), "&1", "&2", "&3", "&4", "&5" }; for (int i = 0; i <= 5; ++i) { new KAction(slashTitles[i], 0, this, - SLOT(slotAddSlashes()), actionCollection(), - QString("slashes_%1").arg(i)); + TQT_SLOT(slotAddSlashes()), actionCollection(), + TQString("slashes_%1").arg(i)); } new KAction(ClefInsertionCommand::getGlobalName(), 0, this, - SLOT(slotEditAddClef()), actionCollection(), + TQT_SLOT(slotEditAddClef()), actionCollection(), "add_clef"); new KAction(KeyInsertionCommand::getGlobalName(), 0, this, - SLOT(slotEditAddKeySignature()), actionCollection(), + TQT_SLOT(slotEditAddKeySignature()), actionCollection(), "add_key_signature"); new KAction(SustainInsertionCommand::getGlobalName(true), 0, this, - SLOT(slotEditAddSustainDown()), actionCollection(), + TQT_SLOT(slotEditAddSustainDown()), actionCollection(), "add_sustain_down"); new KAction(SustainInsertionCommand::getGlobalName(false), 0, this, - SLOT(slotEditAddSustainUp()), actionCollection(), + TQT_SLOT(slotEditAddSustainUp()), actionCollection(), "add_sustain_up"); new KAction(TransposeCommand::getDiatonicGlobalName(false), 0, this, - SLOT(slotEditTranspose()), actionCollection(), + TQT_SLOT(slotEditTranspose()), actionCollection(), "transpose_segment"); new KAction(i18n("Convert Notation For..."), 0, this, - SLOT(slotEditSwitchPreset()), actionCollection(), + TQT_SLOT(slotEditSwitchPreset()), actionCollection(), "switch_preset"); // setup Settings menu - static QString actionsToolbars[][4] = + static TQString actionsToolbars[][4] = { { i18n("Show T&ools Toolbar"), "1slotToggleToolsToolBar()", "show_tools_toolbar", "palette-tools" }, { i18n("Show &Notes Toolbar"), "1slotToggleNotesToolBar()", "show_notes_toolbar", "palette-notes" }, @@ -2315,7 +2315,7 @@ void NotationView::setupActions() for (unsigned int i = 0; i < sizeof(actionsToolbars) / sizeof(actionsToolbars[0]); ++i) { - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap(actionsToolbars[i][3]))); + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap(actionsToolbars[i][3]))); new KToggleAction(actionsToolbars[i][0], icon, 0, this, actionsToolbars[i][1], @@ -2323,193 +2323,193 @@ void NotationView::setupActions() } new KAction(i18n("Cursor &Back"), 0, Key_Left, this, - SLOT(slotStepBackward()), actionCollection(), + TQT_SLOT(slotStepBackward()), actionCollection(), "cursor_back"); new KAction(i18n("Cursor &Forward"), 0, Key_Right, this, - SLOT(slotStepForward()), actionCollection(), + TQT_SLOT(slotStepForward()), actionCollection(), "cursor_forward"); new KAction(i18n("Cursor Ba&ck Bar"), 0, Key_Left + CTRL, this, - SLOT(slotJumpBackward()), actionCollection(), + TQT_SLOT(slotJumpBackward()), actionCollection(), "cursor_back_bar"); new KAction(i18n("Cursor For&ward Bar"), 0, Key_Right + CTRL, this, - SLOT(slotJumpForward()), actionCollection(), + TQT_SLOT(slotJumpForward()), actionCollection(), "cursor_forward_bar"); new KAction(i18n("Cursor Back and Se&lect"), SHIFT + Key_Left, this, - SLOT(slotExtendSelectionBackward()), actionCollection(), + TQT_SLOT(slotExtendSelectionBackward()), actionCollection(), "extend_selection_backward"); new KAction(i18n("Cursor Forward and &Select"), SHIFT + Key_Right, this, - SLOT(slotExtendSelectionForward()), actionCollection(), + TQT_SLOT(slotExtendSelectionForward()), actionCollection(), "extend_selection_forward"); new KAction(i18n("Cursor Back Bar and Select"), SHIFT + CTRL + Key_Left, this, - SLOT(slotExtendSelectionBackwardBar()), actionCollection(), + TQT_SLOT(slotExtendSelectionBackwardBar()), actionCollection(), "extend_selection_backward_bar"); new KAction(i18n("Cursor Forward Bar and Select"), SHIFT + CTRL + Key_Right, this, - SLOT(slotExtendSelectionForwardBar()), actionCollection(), + TQT_SLOT(slotExtendSelectionForwardBar()), actionCollection(), "extend_selection_forward_bar"); /*!!! not here yet new KAction(i18n("Move Selection Left"), Key_Minus, this, - SLOT(slotMoveSelectionLeft()), actionCollection(), + TQT_SLOT(slotMoveSelectionLeft()), actionCollection(), "move_selection_left"); */ new KAction(i18n("Cursor to St&art"), 0, /* #1025717: conflicting meanings for ctrl+a - dupe with Select All Key_A + CTRL, */ this, - SLOT(slotJumpToStart()), actionCollection(), + TQT_SLOT(slotJumpToStart()), actionCollection(), "cursor_start"); new KAction(i18n("Cursor to &End"), 0, Key_E + CTRL, this, - SLOT(slotJumpToEnd()), actionCollection(), + TQT_SLOT(slotJumpToEnd()), actionCollection(), "cursor_end"); new KAction(i18n("Cursor &Up Staff"), 0, Key_Up + SHIFT, this, - SLOT(slotCurrentStaffUp()), actionCollection(), + TQT_SLOT(slotCurrentStaffUp()), actionCollection(), "cursor_up_staff"); new KAction(i18n("Cursor &Down Staff"), 0, Key_Down + SHIFT, this, - SLOT(slotCurrentStaffDown()), actionCollection(), + TQT_SLOT(slotCurrentStaffDown()), actionCollection(), "cursor_down_staff"); new KAction(i18n("Cursor Pre&vious Segment"), 0, Key_Prior + ALT, this, - SLOT(slotCurrentSegmentPrior()), actionCollection(), + TQT_SLOT(slotCurrentSegmentPrior()), actionCollection(), "cursor_prior_segment"); new KAction(i18n("Cursor Ne&xt Segment"), 0, Key_Next + ALT, this, - SLOT(slotCurrentSegmentNext()), actionCollection(), + TQT_SLOT(slotCurrentSegmentNext()), actionCollection(), "cursor_next_segment"); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-cursor-to-pointer"))); new KAction(i18n("Cursor to &Playback Pointer"), icon, 0, this, - SLOT(slotJumpCursorToPlayback()), actionCollection(), + TQT_SLOT(slotJumpCursorToPlayback()), actionCollection(), "cursor_to_playback_pointer"); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-play"))); KAction *play = new KAction(i18n("&Play"), icon, Key_Enter, this, - SIGNAL(play()), actionCollection(), "play"); + TQT_SIGNAL(play()), actionCollection(), "play"); // Alternative shortcut for Play KShortcut playShortcut = play->shortcut(); playShortcut.append( KKey(Key_Return + CTRL) ); play->setShortcut(playShortcut); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-stop"))); new KAction(i18n("&Stop"), icon, Key_Insert, this, - SIGNAL(stop()), actionCollection(), "stop"); + TQT_SIGNAL(stop()), actionCollection(), "stop"); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-rewind"))); new KAction(i18n("Re&wind"), icon, Key_End, this, - SIGNAL(rewindPlayback()), actionCollection(), + TQT_SIGNAL(rewindPlayback()), actionCollection(), "playback_pointer_back_bar"); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-ffwd"))); new KAction(i18n("&Fast Forward"), icon, Key_PageDown, this, - SIGNAL(fastForwardPlayback()), actionCollection(), + TQT_SIGNAL(fastForwardPlayback()), actionCollection(), "playback_pointer_forward_bar"); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-rewind-end"))); new KAction(i18n("Rewind to &Beginning"), icon, 0, this, - SIGNAL(rewindPlaybackToBeginning()), actionCollection(), + TQT_SIGNAL(rewindPlaybackToBeginning()), actionCollection(), "playback_pointer_start"); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-ffwd-end"))); new KAction(i18n("Fast Forward to &End"), icon, 0, this, - SIGNAL(fastForwardPlaybackToEnd()), actionCollection(), + TQT_SIGNAL(fastForwardPlaybackToEnd()), actionCollection(), "playback_pointer_end"); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-pointer-to-cursor"))); new KAction(i18n("Playback Pointer to &Cursor"), icon, 0, this, - SLOT(slotJumpPlaybackToCursor()), actionCollection(), + TQT_SLOT(slotJumpPlaybackToCursor()), actionCollection(), "playback_pointer_to_cursor"); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-solo"))); new KToggleAction(i18n("&Solo"), icon, 0, this, - SLOT(slotToggleSolo()), actionCollection(), + TQT_SLOT(slotToggleSolo()), actionCollection(), "toggle_solo"); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-tracking"))); (new KToggleAction(i18n("Scro&ll to Follow Playback"), icon, Key_Pause, this, - SLOT(slotToggleTracking()), actionCollection(), + TQT_SLOT(slotToggleTracking()), actionCollection(), "toggle_tracking"))->setChecked(m_playTracking); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-panic"))); new KAction(i18n("Panic"), icon, Key_P + CTRL + ALT, this, - SIGNAL(panic()), actionCollection(), "panic"); + TQT_SIGNAL(panic()), actionCollection(), "panic"); new KAction(i18n("Set Loop to Selection"), Key_Semicolon + CTRL, this, - SLOT(slotPreviewSelection()), actionCollection(), + TQT_SLOT(slotPreviewSelection()), actionCollection(), "preview_selection"); new KAction(i18n("Clear L&oop"), Key_Colon + CTRL, this, - SLOT(slotClearLoop()), actionCollection(), + TQT_SLOT(slotClearLoop()), actionCollection(), "clear_loop"); new KAction(i18n("Clear Selection"), Key_Escape, this, - SLOT(slotClearSelection()), actionCollection(), + TQT_SLOT(slotClearSelection()), actionCollection(), "clear_selection"); - // QString pixmapDir = + // TQString pixmapDir = // KGlobal::dirs()->findResource("appdata", "pixmaps/"); - // icon = QIconSet(QCanvasPixmap(pixmapDir + "/toolbar/eventfilter.xpm")); + // icon = TQIconSet(TQCanvasPixmap(pixmapDir + "/toolbar/eventfilter.xpm")); new KAction(i18n("&Filter Selection"), "filter", Key_F + CTRL, this, - SLOT(slotFilterSelection()), actionCollection(), + TQT_SLOT(slotFilterSelection()), actionCollection(), "filter_selection"); new KAction(i18n("Push &Left"), 0, this, - SLOT(slotFinePositionLeft()), actionCollection(), + TQT_SLOT(slotFinePositionLeft()), actionCollection(), "fine_position_left"); new KAction(i18n("Push &Right"), 0, this, - SLOT(slotFinePositionRight()), actionCollection(), + TQT_SLOT(slotFinePositionRight()), actionCollection(), "fine_position_right"); new KAction(i18n("Push &Up"), 0, this, - SLOT(slotFinePositionUp()), actionCollection(), + TQT_SLOT(slotFinePositionUp()), actionCollection(), "fine_position_up"); new KAction(i18n("Push &Down"), 0, this, - SLOT(slotFinePositionDown()), actionCollection(), + TQT_SLOT(slotFinePositionDown()), actionCollection(), "fine_position_down"); new KAction(i18n("&Restore Positions"), 0, this, - SLOT(slotFinePositionRestore()), actionCollection(), + TQT_SLOT(slotFinePositionRestore()), actionCollection(), "fine_position_restore"); new KAction(i18n("Make &Invisible"), 0, this, - SLOT(slotMakeInvisible()), actionCollection(), + TQT_SLOT(slotMakeInvisible()), actionCollection(), "make_invisible"); new KAction(i18n("Make &Visible"), 0, this, - SLOT(slotMakeVisible()), actionCollection(), + TQT_SLOT(slotMakeVisible()), actionCollection(), "make_visible"); new KAction(i18n("Toggle Dot"), Key_Period, this, - SLOT(slotToggleDot()), actionCollection(), + TQT_SLOT(slotToggleDot()), actionCollection(), "toggle_dot"); new KAction(i18n("Add Dot"), Key_Period + CTRL, this, - SLOT(slotAddDot()), actionCollection(), + TQT_SLOT(slotAddDot()), actionCollection(), "add_dot"); new KAction(i18n("Add Dot"), Key_Period + CTRL + ALT, this, - SLOT(slotAddDotNotationOnly()), actionCollection(), + TQT_SLOT(slotAddDotNotationOnly()), actionCollection(), "add_notation_dot"); createGUI(getRCFileName(), false); @@ -2546,7 +2546,7 @@ NotationView::setupFontSizeMenu(std::string oldFontName) for (unsigned int i = 0; i < sizes.size(); ++i) { KAction *action = actionCollection()->action - (QString("note_font_size_%1").arg(sizes[i])); + (TQString("note_font_size_%1").arg(sizes[i])); m_fontSizeActionMenu->remove (action); @@ -2560,7 +2560,7 @@ NotationView::setupFontSizeMenu(std::string oldFontName) for (unsigned int i = 0; i < sizes.size(); ++i) { - QString actionName = QString("note_font_size_%1").arg(sizes[i]); + TQString actionName = TQString("note_font_size_%1").arg(sizes[i]); KToggleAction *sizeAction = dynamic_cast<KToggleAction *> (actionCollection()->action(actionName)); @@ -2569,7 +2569,7 @@ NotationView::setupFontSizeMenu(std::string oldFontName) sizeAction = new KToggleAction(i18n("1 pixel", "%n pixels", sizes[i]), 0, this, - SLOT(slotChangeFontSizeFromAction()), + TQT_SLOT(slotChangeFontSizeFromAction()), actionCollection(), actionName); } @@ -2616,7 +2616,7 @@ void NotationView::initLayoutToolbar() return ; } - new QLabel(i18n(" Font: "), layoutToolbar, "font label"); + new TQLabel(i18n(" Font: "), layoutToolbar, "font label"); // // font combo @@ -2633,7 +2633,7 @@ void NotationView::initLayoutToolbar() for (std::vector<std::string>::iterator i = f.begin(); i != f.end(); ++i) { - QString fontQName(strtoqstr(*i)); + TQString fontQName(strtoqstr(*i)); m_fontCombo->insertItem(fontQName); if (fontQName.lower() == strtoqstr(m_fontName).lower()) { @@ -2649,12 +2649,12 @@ void NotationView::initLayoutToolbar() m_fontName = NoteFontFactory::getDefaultFontName(); } - connect(m_fontCombo, SIGNAL(activated(const QString &)), - this, SLOT(slotChangeFont(const QString &))); + connect(m_fontCombo, TQT_SIGNAL(activated(const TQString &)), + this, TQT_SLOT(slotChangeFont(const TQString &))); - new QLabel(i18n(" Size: "), layoutToolbar, "size label"); + new TQLabel(i18n(" Size: "), layoutToolbar, "size label"); - QString value; + TQString value; // // font size combo @@ -2671,10 +2671,10 @@ void NotationView::initLayoutToolbar() value.setNum(m_fontSize); m_fontSizeCombo->setCurrentText(value); - connect(m_fontSizeCombo, SIGNAL(activated(const QString&)), - this, SLOT(slotChangeFontSizeFromStringValue(const QString&))); + connect(m_fontSizeCombo, TQT_SIGNAL(activated(const TQString&)), + this, TQT_SLOT(slotChangeFontSizeFromStringValue(const TQString&))); - new QLabel(i18n(" Spacing: "), layoutToolbar, "spacing label"); + new TQLabel(i18n(" Spacing: "), layoutToolbar, "spacing label"); // // spacing combo @@ -2694,29 +2694,29 @@ void NotationView::initLayoutToolbar() value += "%"; m_spacingCombo->setCurrentText(value); - connect(m_spacingCombo, SIGNAL(activated(const QString&)), - this, SLOT(slotChangeSpacingFromStringValue(const QString&))); + connect(m_spacingCombo, TQT_SIGNAL(activated(const TQString&)), + this, TQT_SLOT(slotChangeSpacingFromStringValue(const TQString&))); } void NotationView::initStatusBar() { KStatusBar* sb = statusBar(); - m_hoveredOverNoteName = new QLabel(sb); + m_hoveredOverNoteName = new TQLabel(sb); m_hoveredOverNoteName->setMinimumWidth(32); - m_hoveredOverAbsoluteTime = new QLabel(sb); + m_hoveredOverAbsoluteTime = new TQLabel(sb); m_hoveredOverAbsoluteTime->setMinimumWidth(160); sb->addWidget(m_hoveredOverAbsoluteTime); sb->addWidget(m_hoveredOverNoteName); - QHBox *hbox = new QHBox(sb); - m_currentNotePixmap = new QLabel(hbox); + TQHBox *hbox = new TQHBox(sb); + m_currentNotePixmap = new TQLabel(hbox); m_currentNotePixmap->setMinimumWidth(20); - m_insertModeLabel = new QLabel(hbox); - m_annotationsLabel = new QLabel(hbox); - m_lilyPondDirectivesLabel = new QLabel(hbox); + m_insertModeLabel = new TQLabel(hbox); + m_annotationsLabel = new TQLabel(hbox); + m_lilyPondDirectivesLabel = new TQLabel(hbox); sb->addWidget(hbox); sb->insertItem(KTmpStatusMsg::getDefaultMsg(), @@ -2724,7 +2724,7 @@ void NotationView::initStatusBar() sb->setItemAlignment(KTmpStatusMsg::getDefaultId(), AlignLeft | AlignVCenter); - m_selectionCounter = new QLabel(sb); + m_selectionCounter = new TQLabel(sb); sb->addWidget(m_selectionCounter); m_progressBar = new ProgressBar(100, true, sb); @@ -2732,12 +2732,12 @@ void NotationView::initStatusBar() sb->addWidget(m_progressBar); } -QSize NotationView::getViewSize() +TQSize NotationView::getViewSize() { return canvas()->size(); } -void NotationView::setViewSize(QSize s) +void NotationView::setViewSize(TQSize s) { canvas()->resize(s.width(), s.height()); @@ -2916,7 +2916,7 @@ NotationView::getHLayout() } void -NotationView::paintEvent(QPaintEvent *e) +NotationView::paintEvent(TQPaintEvent *e) { m_inPaintEvent = true; @@ -3534,18 +3534,18 @@ void NotationView::print(bool previewOnly) maxPageCount = pageCount; } - KPrinter printer(true, QPrinter::HighResolution); + KPrinter printer(true, TQPrinter::HighResolution); printer.setPageSelection(KPrinter::ApplicationSide); printer.setMinMax(1, maxPageCount + 1); if (previewOnly) printer.setPreviewOnly(true); - else if (!printer.setup((QWidget *)parent())) + else if (!printer.setup((TQWidget *)parent())) return ; - QPaintDeviceMetrics pdm(&printer); - QPainter printpainter(&printer); + TQPaintDeviceMetrics pdm(&printer); + TQPainter printpainter(&printer); // Ideally we should aim to retain the aspect ratio and to move the // staffs so as to be centred after scaling. But because we haven't @@ -3562,9 +3562,9 @@ void NotationView::print(bool previewOnly) // (double)pdm.height() / (double)(pageHeight - topMargin*2)); printpainter.translate( -leftMargin, -topMargin); - QValueList<int> pages = printer.pageList(); + TQValueList<int> pages = printer.pageList(); - for (QValueList<int>::Iterator pli = pages.begin(); + for (TQValueList<int>::Iterator pli = pages.begin(); pli != pages.end(); ) { // incremented just below int page = *pli - 1; @@ -3574,7 +3574,7 @@ void NotationView::print(bool previewOnly) NOTATION_DEBUG << "Printing page " << page << endl; - QRect pageRect(m_leftGutter + leftMargin + pageWidth * page, + TQRect pageRect(m_leftGutter + leftMargin + pageWidth * page, topMargin, pageWidth - leftMargin, pageHeight - topMargin); @@ -3604,10 +3604,10 @@ void NotationView::print(bool previewOnly) m_config->setGroup(NotationViewConfigGroup); - NOTATION_DEBUG << "NotationView::print: calling QCanvas::drawArea" << endl; + NOTATION_DEBUG << "NotationView::print: calling TQCanvas::drawArea" << endl; { - Profiler profiler("NotationView::print(QCanvas::drawArea)"); + Profiler profiler("NotationView::print(TQCanvas::drawArea)"); if (m_config->readBoolEntry("forcedoublebufferprinting", false)) { getCanvasView()->canvas()->drawArea(pageRect, &printpainter, true); @@ -3623,7 +3623,7 @@ void NotationView::print(bool previewOnly) } - NOTATION_DEBUG << "NotationView::print: QCanvas::drawArea done" << endl; + NOTATION_DEBUG << "NotationView::print: TQCanvas::drawArea done" << endl; for (size_t i = 0; i < m_staffs.size(); ++i) { @@ -3685,10 +3685,10 @@ NotationView::updateThumbnails(bool complete) } int thumbScale = 20; - QPixmap thumbnail(canvas()->width() / thumbScale, + TQPixmap thumbnail(canvas()->width() / thumbScale, canvas()->height() / thumbScale); thumbnail.fill(Qt::white); - QPainter thumbPainter(&thumbnail); + TQPainter thumbPainter(&thumbnail); if (complete) { @@ -3697,8 +3697,8 @@ NotationView::updateThumbnails(bool complete) thumbPainter.setBrush(Qt::white); /* - QCanvas *canvas = getCanvasView()->canvas(); - canvas->drawArea(QRect(0, 0, canvas->width(), canvas->height()), + TQCanvas *canvas = getCanvasView()->canvas(); + canvas->drawArea(TQRect(0, 0, canvas->width(), canvas->height()), &thumbPainter, false); */ // hide small texts, as we get a crash in Xft when trying to @@ -3719,12 +3719,12 @@ NotationView::updateThumbnails(bool complete) if (havePageNumber) m_pageNumbers[page]->hide(); - QRect pageRect(m_leftGutter + leftMargin * 2 + pageWidth * page, + TQRect pageRect(m_leftGutter + leftMargin * 2 + pageWidth * page, topMargin * 2, pageWidth - leftMargin*3, pageHeight - topMargin*3); - QCanvas *canvas = getCanvasView()->canvas(); + TQCanvas *canvas = getCanvasView()->canvas(); canvas->drawArea(pageRect, &thumbPainter, false); if (havePageNumber) @@ -3751,7 +3751,7 @@ NotationView::updateThumbnails(bool complete) int w = pageWidth - leftMargin / 2; int h = pageHeight; - QString str = QString("%1").arg(page + 1); + TQString str = TQString("%1").arg(page + 1); thumbPainter.drawRect(x / thumbScale, y / thumbScale, w / thumbScale, h / thumbScale); @@ -3927,7 +3927,7 @@ void NotationView::readjustCanvasSize() } // now get the EditView to do the biz - readjustViewSize(QSize(int(maxWidth), maxHeight), true); + readjustViewSize(TQSize(int(maxWidth), maxHeight), true); UPDATE_PROGRESS(2); @@ -3941,11 +3941,11 @@ void NotationView::readjustCanvasSize() m_pannerDialog->show(); m_pannerDialog->setPageSize - (QSize(canvas()->width(), + (TQSize(canvas()->width(), canvas()->height())); m_pannerDialog->scrollbox()->setViewSize - (QSize(getCanvasView()->width(), + (TQSize(getCanvasView()->width(), getCanvasView()->height())); } } @@ -3958,7 +3958,7 @@ void NotationView::readjustCanvasSize() void NotationView::slotNoteAction() { - const QObject* sigSender = sender(); + const TQObject* sigSender = sender(); NoteActionDataMap::Iterator noteAct = m_noteActionDataMap->find(sigSender->name()); @@ -3989,7 +3989,7 @@ void NotationView::slotLastNoteAction() void NotationView::slotAddMark() { - const QObject *s = sender(); + const TQObject *s = sender(); if (!m_currentEventSelection) return ; @@ -4003,7 +4003,7 @@ void NotationView::slotAddMark() void NotationView::slotNoteChangeAction() { - const QObject* sigSender = sender(); + const TQObject* sigSender = sender(); NoteChangeActionDataMap::Iterator noteAct = m_noteChangeActionDataMap->find(sigSender->name()); @@ -4034,20 +4034,20 @@ void NotationView::initActionDataMaps() if (dots && (type == Note::Longest)) continue; - QString refName + TQString refName (NotationStrings::getReferenceName(Note(type, dots), rest == 1)); - QString shortName(refName); - shortName.replace(QRegExp("-"), "_"); + TQString shortName(refName); + shortName.replace(TQRegExp("-"), "_"); - QString titleName + TQString titleName (NotationStrings::getNoteName(Note(type, dots))); titleName = titleName.left(1).upper() + titleName.right(titleName.length() - 1); if (rest) { - titleName.replace(QRegExp(i18n("note")), i18n("rest")); + titleName.replace(TQRegExp(i18n("note")), i18n("rest")); } int keycode = keys[type - Note::Shortest]; @@ -4069,14 +4069,14 @@ void NotationView::initActionDataMaps() for (int notationOnly = 0; notationOnly <= 1; ++notationOnly) { for (int type = Note::Longest; type >= Note::Shortest; --type) { - QString refName + TQString refName (NotationStrings::getReferenceName(Note(type, 0), false)); - QString shortName(QString("change_%1%2") + TQString shortName(TQString("change_%1%2") .arg(notationOnly ? "notation_" : "").arg(refName)); - shortName.replace(QRegExp("-"), "_"); + shortName.replace(TQRegExp("-"), "_"); - QString titleName + TQString titleName (NotationStrings::getNoteName(Note(type, 0))); titleName = titleName.left(1).upper() + @@ -4100,8 +4100,8 @@ void NotationView::initActionDataMaps() for (unsigned int i = 0; i < marks.size(); ++i) { Mark mark = marks[i]; - QString markName(strtoqstr(mark)); - QString actionName = QString("add_%1").arg(markName); + TQString markName(strtoqstr(mark)); + TQString actionName = TQString("add_%1").arg(markName); m_markActionDataMap->insert (actionName, new MarkActionData @@ -4116,24 +4116,24 @@ void NotationView::setupProgress(KProgress* bar) if (bar) { NOTATION_DEBUG << "NotationView::setupProgress(bar)\n"; - connect(m_hlayout, SIGNAL(setProgress(int)), - bar, SLOT(setValue(int))); + connect(m_hlayout, TQT_SIGNAL(setProgress(int)), + bar, TQT_SLOT(setValue(int))); - connect(m_hlayout, SIGNAL(incrementProgress(int)), - bar, SLOT(advance(int))); + connect(m_hlayout, TQT_SIGNAL(incrementProgress(int)), + bar, TQT_SLOT(advance(int))); - connect(this, SIGNAL(setProgress(int)), - bar, SLOT(setValue(int))); + connect(this, TQT_SIGNAL(setProgress(int)), + bar, TQT_SLOT(setValue(int))); - connect(this, SIGNAL(incrementProgress(int)), - bar, SLOT(advance(int))); + connect(this, TQT_SIGNAL(incrementProgress(int)), + bar, TQT_SLOT(advance(int))); for (unsigned int i = 0; i < m_staffs.size(); ++i) { - connect(m_staffs[i], SIGNAL(setProgress(int)), - bar, SLOT(setValue(int))); + connect(m_staffs[i], TQT_SIGNAL(setProgress(int)), + bar, TQT_SLOT(setValue(int))); - connect(m_staffs[i], SIGNAL(incrementProgress(int)), - bar, SLOT(advance(int))); + connect(m_staffs[i], TQT_SIGNAL(incrementProgress(int)), + bar, TQT_SLOT(advance(int))); } } @@ -4147,28 +4147,28 @@ void NotationView::setupProgress(ProgressDialog* dialog) if (dialog) { setupProgress(dialog->progressBar()); - connect(dialog, SIGNAL(cancelClicked()), - m_hlayout, SLOT(slotCancel())); + connect(dialog, TQT_SIGNAL(cancelClicked()), + m_hlayout, TQT_SLOT(slotCancel())); for (unsigned int i = 0; i < m_staffs.size(); ++i) { - connect(m_staffs[i], SIGNAL(setOperationName(QString)), - this, SLOT(slotSetOperationNameAndStatus(QString))); + connect(m_staffs[i], TQT_SIGNAL(setOperationName(TQString)), + this, TQT_SLOT(slotSetOperationNameAndStatus(TQString))); - connect(dialog, SIGNAL(cancelClicked()), - m_staffs[i], SLOT(slotCancel())); + connect(dialog, TQT_SIGNAL(cancelClicked()), + m_staffs[i], TQT_SLOT(slotCancel())); } - connect(this, SIGNAL(setOperationName(QString)), - dialog, SLOT(slotSetOperationName(QString))); + connect(this, TQT_SIGNAL(setOperationName(TQString)), + dialog, TQT_SLOT(slotSetOperationName(TQString))); m_progressDisplayer = PROGRESS_DIALOG; } } -void NotationView::slotSetOperationNameAndStatus(QString name) +void NotationView::slotSetOperationNameAndStatus(TQString name) { emit setOperationName(name); - statusBar()->changeItem(QString(" %1").arg(name), + statusBar()->changeItem(TQString(" %1").arg(name), KTmpStatusMsg::getDefaultId()); } @@ -4177,9 +4177,9 @@ void NotationView::disconnectProgress() NOTATION_DEBUG << "NotationView::disconnectProgress()" << endl; m_hlayout->disconnect(); - disconnect(SIGNAL(setProgress(int))); - disconnect(SIGNAL(incrementProgress(int))); - disconnect(SIGNAL(setOperationName(QString))); + disconnect(TQT_SIGNAL(setProgress(int))); + disconnect(TQT_SIGNAL(incrementProgress(int))); + disconnect(TQT_SIGNAL(setOperationName(TQString))); for (unsigned int i = 0; i < m_staffs.size(); ++i) { m_staffs[i]->disconnect(); @@ -4238,10 +4238,10 @@ NotationView::MarkActionDataMap* NotationView::m_markActionDataMap = 0; void NotationView::slotUpdateInsertModeStatus() { - QString tripletMessage = i18n("Triplet"); - QString chordMessage = i18n("Chord"); - QString graceMessage = i18n("Grace"); - QString message; + TQString tripletMessage = i18n("Triplet"); + TQString chordMessage = i18n("Chord"); + TQString graceMessage = i18n("Grace"); + TQString message; if (isInTripletMode()) { message = i18n("%1 %2").arg(message).arg(tripletMessage); @@ -4301,7 +4301,7 @@ NotationView::slotUpdateLilyPondDirectivesStatus() } void -NotationView::slotChangeSpacingFromStringValue(const QString& spacingT) +NotationView::slotChangeSpacingFromStringValue(const TQString& spacingT) { // spacingT has a '%' at the end // @@ -4312,8 +4312,8 @@ NotationView::slotChangeSpacingFromStringValue(const QString& spacingT) void NotationView::slotChangeSpacingFromAction() { - const QObject *s = sender(); - QString name = s->name(); + const TQObject *s = sender(); + TQString name = s->name(); if (name.left(8) == "spacing_") { int spacing = name.right(name.length() - 8).toInt(); @@ -4338,7 +4338,7 @@ NotationView::slotChangeSpacing(int spacing) // m_spacingSlider->setSize(spacing); KToggleAction *action = dynamic_cast<KToggleAction *> - (actionCollection()->action(QString("spacing_%1").arg(spacing))); + (actionCollection()->action(TQString("spacing_%1").arg(spacing))); if (action) action->setChecked(true); else { @@ -4372,8 +4372,8 @@ NotationView::slotChangeProportionFromIndex(int n) void NotationView::slotChangeProportionFromAction() { - const QObject *s = sender(); - QString name = s->name(); + const TQObject *s = sender(); + TQString name = s->name(); if (name.left(11) == "proportion_") { int proportion = name.right(name.length() - 11).toInt(); @@ -4396,7 +4396,7 @@ NotationView::slotChangeProportion(int proportion) // m_proportionSlider->setSize(proportion); KToggleAction *action = dynamic_cast<KToggleAction *> - (actionCollection()->action(QString("proportion_%1").arg(proportion))); + (actionCollection()->action(TQString("proportion_%1").arg(proportion))); if (action) action->setChecked(true); else { @@ -4421,8 +4421,8 @@ NotationView::slotChangeProportion(int proportion) void NotationView::slotChangeFontFromAction() { - const QObject *s = sender(); - QString name = s->name(); + const TQObject *s = sender(); + TQString name = s->name(); if (name.left(10) == "note_font_") { name = name.right(name.length() - 10); slotChangeFont(name); @@ -4435,8 +4435,8 @@ NotationView::slotChangeFontFromAction() void NotationView::slotChangeFontSizeFromAction() { - const QObject *s = sender(); - QString name = s->name(); + const TQObject *s = sender(); + TQString name = s->name(); if (name.left(15) == "note_font_size_") { name = name.right(name.length() - 15); @@ -4455,7 +4455,7 @@ NotationView::slotChangeFontSizeFromAction() } void -NotationView::slotChangeFont(const QString &newName) +NotationView::slotChangeFont(const TQString &newName) { NOTATION_DEBUG << "changeFont: " << newName << endl; slotChangeFont(std::string(newName.utf8())); @@ -4488,7 +4488,7 @@ NotationView::slotChangeFontSize(int newSize) } void -NotationView::slotChangeFontSizeFromStringValue(const QString& sizeT) +NotationView::slotChangeFontSizeFromStringValue(const TQString& sizeT) { int size = sizeT.toInt(); slotChangeFont(m_fontName, size); @@ -4566,7 +4566,7 @@ NotationView::slotChangeFont(std::string newName, int newSize) std::vector<int> sizes = NoteFontFactory::getScreenSizes(m_fontName); m_fontSizeCombo->clear(); - QString value; + TQString value; for (std::vector<int>::iterator i = sizes.begin(); i != sizes.end(); ++i) { value.setNum(*i); m_fontSizeCombo->insertItem(value); @@ -4619,7 +4619,7 @@ NotationView::slotFilePrint() SetWaitCursor waitCursor; NotationView printingView(getDocument(), m_segments, - (QWidget *)parent(), this); + (TQWidget *)parent(), this); if (!printingView.isOK()) { NOTATION_DEBUG << "Print : operation cancelled\n"; @@ -4636,7 +4636,7 @@ NotationView::slotFilePrintPreview() SetWaitCursor waitCursor; NotationView printingView(getDocument(), m_segments, - (QWidget *)parent(), this); + (TQWidget *)parent(), this); if (!printingView.isOK()) { NOTATION_DEBUG << "Print preview : operation cancelled\n"; @@ -4651,7 +4651,7 @@ std::map<KProcess *, KTempFile *> NotationView::m_lilyTempFileMap; void NotationView::slotPrintLilyPond() { KTmpStatusMsg msg(i18n("Printing LilyPond file..."), this); - KTempFile *file = new KTempFile(QString::null, ".ly"); + KTempFile *file = new KTempFile(TQString::null, ".ly"); file->setAutoDelete(true); if (!file->name()) { // CurrentProgressDialog::freeze(); @@ -4666,8 +4666,8 @@ void NotationView::slotPrintLilyPond() *proc << "--graphical"; *proc << "--print"; *proc << file->name(); - connect(proc, SIGNAL(processExited(KProcess *)), - this, SLOT(slotLilyPondViewProcessExited(KProcess *))); + connect(proc, TQT_SIGNAL(processExited(KProcess *)), + this, TQT_SLOT(slotLilyPondViewProcessExited(KProcess *))); m_lilyTempFileMap[proc] = file; proc->start(KProcess::NotifyOnExit); } @@ -4675,7 +4675,7 @@ void NotationView::slotPrintLilyPond() void NotationView::slotPreviewLilyPond() { KTmpStatusMsg msg(i18n("Previewing LilyPond file..."), this); - KTempFile *file = new KTempFile(QString::null, ".ly"); + KTempFile *file = new KTempFile(TQString::null, ".ly"); file->setAutoDelete(true); if (!file->name()) { // CurrentProgressDialog::freeze(); @@ -4690,8 +4690,8 @@ void NotationView::slotPreviewLilyPond() *proc << "--graphical"; *proc << "--pdf"; *proc << file->name(); - connect(proc, SIGNAL(processExited(KProcess *)), - this, SLOT(slotLilyPondViewProcessExited(KProcess *))); + connect(proc, TQT_SIGNAL(processExited(KProcess *)), + this, TQT_SLOT(slotLilyPondViewProcessExited(KProcess *))); m_lilyTempFileMap[proc] = file; proc->start(KProcess::NotifyOnExit); } @@ -4703,16 +4703,16 @@ void NotationView::slotLilyPondViewProcessExited(KProcess *p) delete p; } -bool NotationView::exportLilyPondFile(QString file, bool forPreview) +bool NotationView::exportLilyPondFile(TQString file, bool forPreview) { - QString caption = "", heading = ""; + TQString caption = "", heading = ""; if (forPreview) { caption = i18n("LilyPond Preview Options"); heading = i18n("LilyPond preview options"); } LilyPondOptionsDialog dialog(this, m_doc, caption, heading); - if (dialog.exec() != QDialog::Accepted) { + if (dialog.exec() != TQDialog::Accepted) { return false; } @@ -4720,13 +4720,13 @@ bool NotationView::exportLilyPondFile(QString file, bool forPreview) 100, this); - LilyPondExporter e(this, m_doc, std::string(QFile::encodeName(file))); + LilyPondExporter e(this, m_doc, std::string(TQFile::encodeName(file))); - connect(&e, SIGNAL(setProgress(int)), - progressDlg.progressBar(), SLOT(setValue(int))); + connect(&e, TQT_SIGNAL(setProgress(int)), + progressDlg.progressBar(), TQT_SLOT(setValue(int))); - connect(&e, SIGNAL(incrementProgress(int)), - progressDlg.progressBar(), SLOT(advance(int))); + connect(&e, TQT_SIGNAL(incrementProgress(int)), + progressDlg.progressBar(), TQT_SLOT(advance(int))); if (!e.write()) { // CurrentProgressDialog::freeze(); @@ -4776,7 +4776,7 @@ void NotationView::slotEditCutAndClose() getDocument()->getClipboard())); } -static const QString RESTRICTED_PASTE_FAILED_DESCRIPTION = i18n( +static const TQString RESTRICTED_PASTE_FAILED_DESCRIPTION = i18n( "The Restricted paste type requires enough empty " \ "space (containing only rests) at the paste position " \ "to hold all of the events to be pasted.\n" \ @@ -4855,7 +4855,7 @@ void NotationView::slotEditGeneralPaste() PasteNotationDialog dialog(this, defaultType); - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { PasteEventsCommand::PasteType type = dialog.getPasteType(); if (dialog.setAsDefault()) { @@ -5006,7 +5006,7 @@ void NotationView::slotFilterSelection() return ; EventFilterDialog dialog(this); - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { NOTATION_DEBUG << "slotFilterSelection- accepted" << endl; bool haveEvent = false; @@ -5150,7 +5150,7 @@ void NotationView::slotToggleTransportToolBar() toggleNamedToolBar("Transport Toolbar"); } -void NotationView::toggleNamedToolBar(const QString& toolBarName, bool* force) +void NotationView::toggleNamedToolBar(const TQString& toolBarName, bool* force) { KToolBar *namedToolBar = toolBar(toolBarName); @@ -5238,7 +5238,7 @@ void NotationView::slotGroupTuplet(bool simple) if (!simple) { TupletDialog dialog(this, unitType, duration); - if (dialog.exec() != QDialog::Accepted) + if (dialog.exec() != TQDialog::Accepted) return ; unit = Note(dialog.getUnitType()).getDuration(); tupled = dialog.getTupledCount(); @@ -5267,7 +5267,7 @@ void NotationView::slotGroupTuplet(bool simple) if (!simple) { TupletDialog dialog(this, unitType); - if (dialog.exec() != QDialog::Accepted) + if (dialog.exec() != TQDialog::Accepted) return ; unit = Note(dialog.getUnitType()).getDuration(); tupled = dialog.getTupledCount(); @@ -5350,7 +5350,7 @@ void NotationView::slotGroupOctave2Down() slotAddIndication(Indication::QuindicesimaDown, i18n("ottava")); } -void NotationView::slotAddIndication(std::string type, QString desc) +void NotationView::slotAddIndication(std::string type, TQString desc) { if (!m_currentEventSelection) return ; @@ -5565,8 +5565,8 @@ void NotationView::slotTransformsRemoveQuantization() void NotationView::slotSetStyleFromAction() { - const QObject *s = sender(); - QString name = s->name(); + const TQObject *s = sender(); + TQString name = s->name(); if (!m_currentEventSelection) return ; @@ -5588,8 +5588,8 @@ void NotationView::slotSetStyleFromAction() void NotationView::slotInsertNoteFromAction() { - const QObject *s = sender(); - QString name = s->name(); + const TQObject *s = sender(); + TQString name = s->name(); Segment &segment = m_staffs[m_currentStaff]->getSegment(); @@ -5663,7 +5663,7 @@ void NotationView::slotSwitchFromRestToNote() Note note(restInserter->getCurrentNote()); - QString actionName = NotationStrings::getReferenceName(note, false); + TQString actionName = NotationStrings::getReferenceName(note, false); actionName = actionName.replace("-", "_"); KRadioAction *action = dynamic_cast<KRadioAction *> @@ -5698,7 +5698,7 @@ void NotationView::slotSwitchFromNoteToRest() Note note(noteInserter->getCurrentNote()); - QString actionName = NotationStrings::getReferenceName(note, true); + TQString actionName = NotationStrings::getReferenceName(note, true); actionName = actionName.replace("-", "_"); KRadioAction *action = dynamic_cast<KRadioAction *> @@ -5865,7 +5865,7 @@ void NotationView::slotTransformsQuantize() QuantizeDialog dialog(this, true); - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { KTmpStatusMsg msg(i18n("Quantizing..."), this); addCommandToHistory(new EventQuantizeCommand (*m_currentEventSelection, @@ -5880,7 +5880,7 @@ void NotationView::slotTransformsInterpret() InterpretDialog dialog(this); - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { KTmpStatusMsg msg(i18n("Interpreting selection..."), this); addCommandToHistory(new InterpretCommand (*m_currentEventSelection, @@ -5915,11 +5915,11 @@ void NotationView::slotAddDotNotationOnly() void NotationView::slotAddSlashes() { - const QObject *s = sender(); + const TQObject *s = sender(); if (!m_currentEventSelection) return ; - QString name = s->name(); + TQString name = s->name(); int slashes = name.right(1).toInt(); addCommandToHistory(new AddSlashesCommand @@ -5931,7 +5931,7 @@ void NotationView::slotMarksAddTextMark() if (m_currentEventSelection) { bool pressedOK = false; - QString txt = KLineEditDlg::getText(i18n("Text: "), "", &pressedOK, this); + TQString txt = KLineEditDlg::getText(i18n("Text: "), "", &pressedOK, this); if (pressedOK) { addCommandToHistory(new AddTextMarkCommand @@ -5945,7 +5945,7 @@ void NotationView::slotMarksAddFingeringMark() if (m_currentEventSelection) { bool pressedOK = false; - QString txt = KLineEditDlg::getText(i18n("Fingering: "), "", &pressedOK, this); + TQString txt = KLineEditDlg::getText(i18n("Fingering: "), "", &pressedOK, this); if (pressedOK) { addCommandToHistory(new AddFingeringMarkCommand @@ -5956,12 +5956,12 @@ void NotationView::slotMarksAddFingeringMark() void NotationView::slotMarksAddFingeringMarkFromAction() { - const QObject *s = sender(); - QString name = s->name(); + const TQObject *s = sender(); + TQString name = s->name(); if (name.left(14) == "add_fingering_") { - QString fingering = name.right(name.length() - 14); + TQString fingering = name.right(name.length() - 14); if (fingering == "plus") fingering = "+"; @@ -6030,16 +6030,16 @@ NotationView::slotMakeOrnament() Track *track = segment.getComposition()->getTrackById(segment.getTrack()); - QString name; + TQString name; int barNo = segment.getComposition()->getBarNumber(absTime); if (track) { - name = QString(i18n("Ornament track %1 bar %2").arg(track->getPosition() + 1).arg(barNo + 1)); + name = TQString(i18n("Ornament track %1 bar %2").arg(track->getPosition() + 1).arg(barNo + 1)); } else { - name = QString(i18n("Ornament bar %1").arg(barNo + 1)); + name = TQString(i18n("Ornament bar %1").arg(barNo + 1)); } MakeOrnamentDialog dialog(this, name, basePitch); - if (dialog.exec() != QDialog::Accepted) + if (dialog.exec() != TQDialog::Accepted) return ; name = dialog.getName(); @@ -6076,7 +6076,7 @@ NotationView::slotUseOrnament() return ; UseOrnamentDialog dialog(this, &getDocument()->getComposition()); - if (dialog.exec() != QDialog::Accepted) + if (dialog.exec() != TQDialog::Accepted) return ; addCommandToHistory(new SetTriggerCommand(*m_currentEventSelection, @@ -6109,7 +6109,7 @@ void NotationView::slotEditAddClef() ClefDialog dialog(this, m_notePixmapFactory, lastClef); - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { ClefDialog::ConversionType conversion = dialog.getConversionType(); @@ -6144,7 +6144,7 @@ void NotationView::slotEditAddKeySignature() (this, m_notePixmapFactory, clef, key, true, true, i18n("Estimated key signature shown")); - if (dialog.exec() == QDialog::Accepted && + if (dialog.exec() == TQDialog::Accepted && dialog.isValid()) { KeySignatureDialog::ConversionType conversion = @@ -6251,7 +6251,7 @@ void NotationView::slotEditSwitchPreset() { PresetHandlerDialog dialog(this, true); - if (dialog.exec() != QDialog::Accepted) return; + if (dialog.exec() != TQDialog::Accepted) return; if (dialog.getConvertAllSegments()) { // get all segments for this track and convert them. @@ -6296,7 +6296,7 @@ void NotationView::slotEditElement(NotationStaff *staff, EventEditDialog dialog(this, *element->event(), true); - if (dialog.exec() == QDialog::Accepted && + if (dialog.exec() == TQDialog::Accepted && dialog.isModified()) { EventEditCommand *command = new EventEditCommand @@ -6313,7 +6313,7 @@ void NotationView::slotEditElement(NotationStaff *staff, ClefDialog dialog(this, m_notePixmapFactory, Clef(*element->event())); - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { ClefDialog::ConversionType conversion = dialog.getConversionType(); bool shouldChangeOctave = (conversion != ClefDialog::NoConversion); @@ -6338,7 +6338,7 @@ void NotationView::slotEditElement(NotationStaff *staff, (this, m_notePixmapFactory, clef, Rosegarden::Key(*element->event()), false, true); - if (dialog.exec() == QDialog::Accepted && + if (dialog.exec() == TQDialog::Accepted && dialog.isValid()) { KeySignatureDialog::ConversionType conversion = @@ -6365,7 +6365,7 @@ void NotationView::slotEditElement(NotationStaff *staff, try { TextEventDialog dialog (this, m_notePixmapFactory, Text(*element->event())); - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { TextInsertionCommand *command = new TextInsertionCommand (staff->getSegment(), element->event()->getAbsoluteTime(), @@ -6395,7 +6395,7 @@ void NotationView::slotEditElement(NotationStaff *staff, SimpleEventEditDialog dialog(this, getDocument(), *element->event(), false); - if (dialog.exec() == QDialog::Accepted && + if (dialog.exec() == TQDialog::Accepted && dialog.isModified()) { EventEditCommand *command = new EventEditCommand @@ -6835,7 +6835,7 @@ NotationView::doDeferredCursorMove() } } - QScrollBar* hbar = getCanvasView()->horizontalScrollBar(); + TQScrollBar* hbar = getCanvasView()->horizontalScrollBar(); hbar->setValue(int(hbar->value() - (m_deferredCursorScrollToX - ccx))); } @@ -7024,7 +7024,7 @@ void NotationView::slotEditLyrics() LyricEditDialog dialog(this, &segment); - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { KMacroCommand *macro = new KMacroCommand (SetLyricsCommand::getGlobalName()); @@ -7040,7 +7040,7 @@ void NotationView::slotEditLyrics() } void NotationView::slotItemPressed(int height, int staffNo, - QMouseEvent* e, + TQMouseEvent* e, NotationElement* el) { NOTATION_DEBUG << "NotationView::slotItemPressed(height = " @@ -7073,7 +7073,7 @@ void NotationView::slotItemPressed(int height, int staffNo, timeT unknownTime = 0; - if (e->type() == QEvent::MouseButtonDblClick) { + if (e->type() == TQEvent::MouseButtonDblClick) { m_tool->handleMouseDoubleClick(unknownTime, height, staffNo, e, el); } else { @@ -7083,9 +7083,9 @@ void NotationView::slotItemPressed(int height, int staffNo, } } -void NotationView::slotNonNotationItemPressed(QMouseEvent *e, QCanvasItem *it) +void NotationView::slotNonNotationItemPressed(TQMouseEvent *e, TQCanvasItem *it) { - if (e->type() != QEvent::MouseButtonDblClick) + if (e->type() != TQEvent::MouseButtonDblClick) return ; Staff *staff = getStaffForCanvasCoords(e->x(), e->y()); @@ -7101,10 +7101,10 @@ void NotationView::slotNonNotationItemPressed(QMouseEvent *e, QCanvasItem *it) getTrackById(staff->getSegment().getTrack())->getLabel(); bool ok = false; - QRegExpValidator validator(QRegExp(".*"), this); // empty is OK + TQRegExpValidator validator(TQRegExp(".*"), this); // empty is OK - QString newText = KLineEditDlg::getText(QString("Change staff name"), - QString("Enter new staff name"), + TQString newText = KLineEditDlg::getText(TQString("Change staff name"), + TQString("Enter new staff name"), strtoqstr(name), &ok, this, @@ -7126,9 +7126,9 @@ void NotationView::slotNonNotationItemPressed(QMouseEvent *e, QCanvasItem *it) } } -void NotationView::slotTextItemPressed(QMouseEvent *e, QCanvasItem *it) +void NotationView::slotTextItemPressed(TQMouseEvent *e, TQCanvasItem *it) { - if (e->type() != QEvent::MouseButtonDblClick) + if (e->type() != TQEvent::MouseButtonDblClick) return ; if (it == m_title) { @@ -7146,7 +7146,7 @@ void NotationView::slotTextItemPressed(QMouseEvent *e, QCanvasItem *it) positionStaffs(); } -void NotationView::slotMouseMoved(QMouseEvent *e) +void NotationView::slotMouseMoved(TQMouseEvent *e) { if (activeItem()) { activeItem()->handleMouseMove(e); @@ -7169,7 +7169,7 @@ void NotationView::slotMouseMoved(QMouseEvent *e) } } -void NotationView::slotMouseReleased(QMouseEvent *e) +void NotationView::slotMouseReleased(TQMouseEvent *e) { if (activeItem()) { activeItem()->handleMouseRelease(e); @@ -7181,9 +7181,9 @@ void NotationView::slotMouseReleased(QMouseEvent *e) } void -NotationView::slotHoveredOverNoteChanged(const QString ¬eName) +NotationView::slotHoveredOverNoteChanged(const TQString ¬eName) { - m_hoveredOverNoteName->setText(QString(" ") + noteName); + m_hoveredOverNoteName->setText(TQString(" ") + noteName); } void @@ -7198,19 +7198,19 @@ NotationView::slotHoveredOverAbsoluteTimeChanged(unsigned int time) getDocument()->getComposition().getMusicalTimeForAbsoluteTime (t, bar, beat, fraction, remainder); - // QString message; - // QString format("%ld (%ld.%03lds)"); + // TQString message; + // TQString format("%ld (%ld.%03lds)"); // format = i18n("Time: %1").arg(format); // message.sprintf(format, t, rt.sec, ms); - QString message = i18n("Time: %1 (%2.%3s)") - .arg(QString("%1-%2-%3-%4") - .arg(QString("%1").arg(bar + 1).rightJustify(3, '0')) - .arg(QString("%1").arg(beat).rightJustify(2, '0')) - .arg(QString("%1").arg(fraction).rightJustify(2, '0')) - .arg(QString("%1").arg(remainder).rightJustify(2, '0'))) + 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(QString("%1").arg(ms).rightJustify(3, '0')); + .arg(TQString("%1").arg(ms).rightJustify(3, '0')); m_hoveredOverAbsoluteTime->setText(message); } @@ -7374,7 +7374,7 @@ NotationView::slotToggleStepByStep() } void -NotationView::slotStepByStepTargetRequested(QObject *obj) +NotationView::slotStepByStepTargetRequested(TQObject *obj) { KToggleAction *action = dynamic_cast<KToggleAction *> (actionCollection()->action("toggle_step_by_step")); @@ -7414,8 +7414,8 @@ NotationView::slotCheckRendered(double cx0, double cx1) emit renderComplete(); if (m_renderTimer) delete m_renderTimer; - m_renderTimer = new QTimer(this); - connect(m_renderTimer, SIGNAL(timeout()), SLOT(slotRenderSomething())); + m_renderTimer = new TQTimer(this); + connect(m_renderTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotRenderSomething())); m_renderTimer->start(0, true); } @@ -7433,8 +7433,8 @@ NotationView::slotRenderSomething() clock_t now = clock(); long elapsed = ((now - lastWork) * 1000 / CLOCKS_PER_SEC); if (elapsed < 70) { - m_renderTimer = new QTimer(this); - connect(m_renderTimer, SIGNAL(timeout()), SLOT(slotRenderSomething())); + m_renderTimer = new TQTimer(this); + connect(m_renderTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotRenderSomething())); m_renderTimer->start(0, true); return ; } @@ -7444,8 +7444,8 @@ NotationView::slotRenderSomething() if (m_staffs[i]->doRenderWork(m_staffs[i]->getSegment().getStartTime(), m_staffs[i]->getSegment().getEndTime())) { - m_renderTimer = new QTimer(this); - connect(m_renderTimer, SIGNAL(timeout()), SLOT(slotRenderSomething())); + m_renderTimer = new TQTimer(this); + connect(m_renderTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotRenderSomething())); m_renderTimer->start(0, true); return ; } diff --git a/src/gui/editors/notation/NotationView.h b/src/gui/editors/notation/NotationView.h index 7678f8a..356960c 100644 --- a/src/gui/editors/notation/NotationView.h +++ b/src/gui/editors/notation/NotationView.h @@ -35,23 +35,23 @@ #include <string> #include <kprocess.h> #include <ktempfile.h> -#include <qmap.h> -#include <qsize.h> -#include <qstring.h> +#include <tqmap.h> +#include <tqsize.h> +#include <tqstring.h> #include <vector> #include "base/Event.h" #include "gui/general/ClefIndex.h" -class QWidget; -class QTimer; -class QPaintEvent; -class QObject; -class QMouseEvent; -class QLabel; -class QCursor; -class QCanvasItem; -class QCanvas; +class TQWidget; +class TQTimer; +class TQPaintEvent; +class TQObject; +class TQMouseEvent; +class TQLabel; +class TQCursor; +class TQCanvasItem; +class TQCanvas; class KProgress; class KComboBox; class KActionMenu; @@ -113,7 +113,7 @@ class NotationView : public EditView, public: explicit NotationView(RosegardenGUIDoc *doc, std::vector<Segment *> segments, - QWidget *parent, + TQWidget *parent, bool showProgressive); // update during initial render? /** @@ -124,7 +124,7 @@ public: */ explicit NotationView(RosegardenGUIDoc *doc, std::vector<Segment *> segments, - QWidget *parent, + TQWidget *parent, NotationView *referenceView); ~NotationView(); @@ -170,9 +170,9 @@ public: /// Return true if the staff at the specified index is the current one bool isCurrentStaff(int i); - QCanvas* canvas() { return getCanvasView()->canvas(); } + TQCanvas* canvas() { return getCanvasView()->canvas(); } - void setCanvasCursor(const QCursor &cursor) { + void setCanvasCursor(const TQCursor &cursor) { getCanvasView()->viewport()->setCursor(cursor); } @@ -358,7 +358,7 @@ public slots: /** * export a LilyPond file */ - bool exportLilyPondFile(QString url, bool forPreview = false); + bool exportLilyPondFile(TQString url, bool forPreview = false); /** * Export to a temporary file and process @@ -545,7 +545,7 @@ public slots: void slotGroupOctaveUp(); void slotGroupOctaveDown(); void slotGroupOctave2Down(); - void slotAddIndication(std::string type, QString cat); + void slotAddIndication(std::string type, TQString cat); /// transforms slots void slotTransformsNormalizeRests(); @@ -630,20 +630,20 @@ public slots: * Called when a mouse press occurred on a notation element * or somewhere on a staff */ - void slotItemPressed(int height, int staffNo, QMouseEvent*, NotationElement*); + void slotItemPressed(int height, int staffNo, TQMouseEvent*, NotationElement*); /** * Called when a mouse press occurred on a non-notation element */ - void slotNonNotationItemPressed(QMouseEvent *e, QCanvasItem *i); + void slotNonNotationItemPressed(TQMouseEvent *e, TQCanvasItem *i); /** * Called when a mouse press occurred on a QCanvasText */ - void slotTextItemPressed(QMouseEvent *e, QCanvasItem *i); + void slotTextItemPressed(TQMouseEvent *e, TQCanvasItem *i); - void slotMouseMoved(QMouseEvent*); - void slotMouseReleased(QMouseEvent*); + void slotMouseMoved(TQMouseEvent*); + void slotMouseReleased(TQMouseEvent*); /** * Called when the mouse cursor moves over a different height on @@ -651,7 +651,7 @@ public slots: * * @see NotationCanvasView#hoveredOverNoteChange() */ - void slotHoveredOverNoteChanged(const QString&); + void slotHoveredOverNoteChanged(const TQString&); /** * Called when the mouse cursor moves over a note which is at a @@ -755,7 +755,7 @@ public slots: void slotChangeFont(std::string newFont, int newSize); /// Changes the font of the staffs on the view - void slotChangeFont(const QString &newFont); + void slotChangeFont(const TQString &newFont); /// Changes the font size of the staffs on the view void slotChangeFontSize(int newSize); @@ -764,7 +764,7 @@ public slots: void slotChangeFontSizeFromAction(); /// Changes the font size of the staffs on the view to the nth size in the available size list - void slotChangeFontSizeFromStringValue(const QString&); + void slotChangeFontSizeFromStringValue(const TQString&); /// Changes to the next font size up void slotZoomIn(); @@ -776,7 +776,7 @@ public slots: void slotChangeSpacing(int newSpacing); /// Changes the hlayout spacing of the staffs on the view - void slotChangeSpacingFromStringValue(const QString&); + void slotChangeSpacingFromStringValue(const TQString&); /// Changes the hlayout spacing of the staffs on the view void slotChangeSpacingFromAction(); @@ -802,8 +802,8 @@ public slots: /// A timer set when a note-on event was received has elapsed void slotInsertableTimerElapsed(); - /// The given QObject has originated a step-by-step-editing request - void slotStepByStepTargetRequested(QObject *); + /// The given TQObject has originated a step-by-step-editing request + void slotStepByStepTargetRequested(TQObject *); /// Do on-demand rendering for a region. void slotCheckRendered(double cx0, double cx1); @@ -811,7 +811,7 @@ public slots: /// Do some background rendering work. void slotRenderSomething(); - void slotSetOperationNameAndStatus(QString); + void slotSetOperationNameAndStatus(TQString); // Update notation view based on track/staff name change void slotUpdateStaffName(); @@ -849,23 +849,23 @@ signals: /// progress Report void setProgress(int); void incrementProgress(int); - void setOperationName(QString); + void setOperationName(TQString); - void stepByStepTargetRequested(QObject *); + void stepByStepTargetRequested(TQObject *); void renderComplete(); void editTimeSignature(timeT); - void editMetadata(QString); + void editMetadata(TQString); void editTriggerSegment(int); - void staffLabelChanged(TrackId id, QString label); + void staffLabelChanged(TrackId id, TQString label); protected: - virtual void paintEvent(QPaintEvent* e); + virtual void paintEvent(TQPaintEvent* e); /** * init the action maps for notes, marks etc @@ -937,7 +937,7 @@ protected: * If \a force point to a bool, then the bool's value * is used to show/hide the toolbar. */ - void toggleNamedToolBar(const QString& toolBarName, bool* force = 0); + void toggleNamedToolBar(const TQString& toolBarName, bool* force = 0); /// Calls all the relevant preparse and layout methods virtual bool applyLayout(int staffNo = -1, @@ -957,13 +957,13 @@ protected: * Override from EditView * @see EditView#getViewSize */ - virtual QSize getViewSize(); + virtual TQSize getViewSize(); /** * Override from EditView * @see EditView#setViewSize */ - virtual void setViewSize(QSize); + virtual void setViewSize(TQSize); /** * Set the note pixmap factory @@ -1020,39 +1020,39 @@ protected: NotationProperties m_properties; /// Displayed in the status bar, shows number of events selected - QLabel *m_selectionCounter; + TQLabel *m_selectionCounter; /// Displayed in the status bar, shows insertion mode - QLabel *m_insertModeLabel; + TQLabel *m_insertModeLabel; /// Displayed in the status bar, shows when annotations are hidden - QLabel *m_annotationsLabel; + TQLabel *m_annotationsLabel; /// Displayed in the status bar, shows when LilyPond directives are hidden - QLabel *m_lilyPondDirectivesLabel; + TQLabel *m_lilyPondDirectivesLabel; /// Displayed in the status bar, shows progress of current operation ProgressBar *m_progressBar; /// Displayed in the status bar, holds the pixmap of the current note - QLabel* m_currentNotePixmap; + TQLabel* m_currentNotePixmap; /// Displayed in the status bar, shows the pitch the cursor is at - QLabel* m_hoveredOverNoteName; + TQLabel* m_hoveredOverNoteName; /// Displayed in the status bar, shows the absolute time the cursor is at - QLabel* m_hoveredOverAbsoluteTime; + TQLabel* m_hoveredOverAbsoluteTime; std::vector<NotationStaff*> m_staffs; int m_currentStaff; int m_lastFinishingStaff; - QCanvasItem *m_title; - QCanvasItem *m_subtitle; - QCanvasItem *m_composer; - QCanvasItem *m_copyright; - std::vector<QCanvasItem *> m_pages; - std::vector<QCanvasItem *> m_pageNumbers; + TQCanvasItem *m_title; + TQCanvasItem *m_subtitle; + TQCanvasItem *m_composer; + TQCanvasItem *m_copyright; + std::vector<TQCanvasItem *> m_pages; + std::vector<TQCanvasItem *> m_pageNumbers; timeT m_insertionTime; enum DeferredCursorMoveType { @@ -1064,7 +1064,7 @@ protected: DeferredCursorMoveType m_deferredCursorMove; double m_deferredCursorScrollToX; - QString m_lastNoteAction; + TQString m_lastNoteAction; std::string m_fontName; int m_fontSize; @@ -1077,20 +1077,20 @@ protected: NotationVLayout* m_vlayout; ChordNameRuler *m_chordNameRuler; - QWidget *m_tempoRuler; + TQWidget *m_tempoRuler; RawNoteRuler *m_rawNoteRuler; bool m_annotationsVisible; bool m_lilyPondDirectivesVisible; KAction* m_selectDefaultNote; - typedef QMap<QString, NoteActionData *> NoteActionDataMap; + typedef TQMap<TQString, NoteActionData *> NoteActionDataMap; static NoteActionDataMap* m_noteActionDataMap; - typedef QMap<QString, NoteChangeActionData *> NoteChangeActionDataMap; + typedef TQMap<TQString, NoteChangeActionData *> NoteChangeActionDataMap; static NoteChangeActionDataMap* m_noteChangeActionDataMap; - typedef QMap<QString, MarkActionData *> MarkActionDataMap; + typedef TQMap<TQString, MarkActionData *> MarkActionDataMap; static MarkActionDataMap *m_markActionDataMap; KComboBox *m_fontCombo; @@ -1098,7 +1098,7 @@ protected: KComboBox *m_spacingCombo; KActionMenu *m_fontSizeActionMenu; ScrollBoxDialog *m_pannerDialog; - QTimer *m_renderTimer; + TQTimer *m_renderTimer; bool m_playTracking; @@ -1119,7 +1119,7 @@ protected: int m_showHeadersGroup; QDeferScrollView * m_headersGroupView; HeadersGroup * m_headersGroup; - QFrame * m_headersTopFrame; + TQFrame * m_headersTopFrame; KAction * m_showHeadersMenuEntry; diff --git a/src/gui/editors/notation/NoteCharacter.cpp b/src/gui/editors/notation/NoteCharacter.cpp index fdcb578..2fcff18 100644 --- a/src/gui/editors/notation/NoteCharacter.cpp +++ b/src/gui/editors/notation/NoteCharacter.cpp @@ -25,11 +25,11 @@ #include "NoteCharacter.h" -#include <qpainter.h> -#include <qpixmap.h> -#include <qpoint.h> -#include <qcanvas.h> -#include <qbitmap.h> +#include <tqpainter.h> +#include <tqpixmap.h> +#include <tqpoint.h> +#include <tqcanvas.h> +#include <tqbitmap.h> namespace Rosegarden @@ -37,20 +37,20 @@ namespace Rosegarden NoteCharacter::NoteCharacter() : m_hotspot(0, 0), - m_pixmap(new QPixmap()), + m_pixmap(new TQPixmap()), m_rep(0) {} -NoteCharacter::NoteCharacter(QPixmap pixmap, - QPoint hotspot, NoteCharacterDrawRep *rep) : +NoteCharacter::NoteCharacter(TQPixmap pixmap, + TQPoint hotspot, NoteCharacterDrawRep *rep) : m_hotspot(hotspot), - m_pixmap(new QPixmap(pixmap)), + m_pixmap(new TQPixmap(pixmap)), m_rep(rep) {} NoteCharacter::NoteCharacter(const NoteCharacter &c) : m_hotspot(c.m_hotspot), - m_pixmap(new QPixmap(*c.m_pixmap)), + m_pixmap(new TQPixmap(*c.m_pixmap)), m_rep(c.m_rep) { // nothing else @@ -62,7 +62,7 @@ NoteCharacter::operator=(const NoteCharacter &c) if (&c == this) return * this; m_hotspot = c.m_hotspot; - m_pixmap = new QPixmap(*c.m_pixmap); + m_pixmap = new TQPixmap(*c.m_pixmap); m_rep = c.m_rep; return *this; } @@ -90,20 +90,20 @@ NoteCharacter::getHotspot() const return m_hotspot; } -QPixmap * +TQPixmap * NoteCharacter::getPixmap() const { return m_pixmap; } -QCanvasPixmap * +TQCanvasPixmap * NoteCharacter::getCanvasPixmap() const { - return new QCanvasPixmap(*m_pixmap, m_hotspot); + return new TQCanvasPixmap(*m_pixmap, m_hotspot); } void -NoteCharacter::draw(QPainter *painter, int x, int y) const +NoteCharacter::draw(TQPainter *painter, int x, int y) const { if (!m_rep) { @@ -114,7 +114,7 @@ NoteCharacter::draw(QPainter *painter, int x, int y) const NoteCharacterDrawRep a(m_rep->size()); for (unsigned int i = 0; i < m_rep->size(); ++i) { - QPoint p(m_rep->point(i)); + TQPoint p(m_rep->point(i)); a.setPoint(i, p.x() + x, p.y() + y); } @@ -123,10 +123,10 @@ NoteCharacter::draw(QPainter *painter, int x, int y) const } void -NoteCharacter::drawMask(QPainter *painter, int x, int y) const +NoteCharacter::drawMask(TQPainter *painter, int x, int y) const { - if (!m_rep && m_pixmap->mask()) { - painter->drawPixmap(x, y, *(m_pixmap->mask())); + if (!m_rep && m_pixmap->tqmask()) { + painter->drawPixmap(x, y, *(m_pixmap->tqmask())); } } diff --git a/src/gui/editors/notation/NoteCharacter.h b/src/gui/editors/notation/NoteCharacter.h index bc9359e..3b27e87 100644 --- a/src/gui/editors/notation/NoteCharacter.h +++ b/src/gui/editors/notation/NoteCharacter.h @@ -26,13 +26,13 @@ #ifndef _RG_NOTECHARACTER_H_ #define _RG_NOTECHARACTER_H_ -#include <qpixmap.h> -#include <qpoint.h> -#include <qpointarray.h> +#include <tqpixmap.h> +#include <tqpoint.h> +#include <tqpointarray.h> -class QPainter; -class QCanvasPixmap; +class TQPainter; +class TQCanvasPixmap; namespace Rosegarden { @@ -40,13 +40,13 @@ namespace Rosegarden class NoteCharacterDrawRep : public QPointArray { public: - NoteCharacterDrawRep(int size = 0) : QPointArray(size) { } + NoteCharacterDrawRep(int size = 0) : TQPointArray(size) { } }; /** * NoteCharacter knows how to draw a character from a font. It may be - * optimised for screen (using QPixmap underneath to produce + * optimised for screen (using TQPixmap underneath to produce * low-resolution colour or greyscale glyphs) or printer (using some * internal representation to draw in high-resolution monochrome on a * print device). You can use screen characters on a printer and vice @@ -67,20 +67,20 @@ public: int getWidth() const; int getHeight() const; - QPoint getHotspot() const; + TQPoint getHotspot() const; - QPixmap *getPixmap() const; - QCanvasPixmap *getCanvasPixmap() const; + TQPixmap *getPixmap() const; + TQCanvasPixmap *getCanvasPixmap() const; - void draw(QPainter *painter, int x, int y) const; - void drawMask(QPainter *painter, int x, int y) const; + void draw(TQPainter *painter, int x, int y) const; + void drawMask(TQPainter *painter, int x, int y) const; private: friend class NoteFont; - NoteCharacter(QPixmap pixmap, QPoint hotspot, NoteCharacterDrawRep *rep); + NoteCharacter(TQPixmap pixmap, TQPoint hotspot, NoteCharacterDrawRep *rep); - QPoint m_hotspot; - QPixmap *m_pixmap; // I own this + TQPoint m_hotspot; + TQPixmap *m_pixmap; // I own this NoteCharacterDrawRep *m_rep; // I don't own this, it's a reference to a static in the NoteFont }; diff --git a/src/gui/editors/notation/NoteFont.cpp b/src/gui/editors/notation/NoteFont.cpp index 95746c3..3a0ea18 100644 --- a/src/gui/editors/notation/NoteFont.cpp +++ b/src/gui/editors/notation/NoteFont.cpp @@ -32,14 +32,14 @@ #include "NoteCharacter.h" #include "NoteFontMap.h" #include "SystemFont.h" -#include <qbitmap.h> -#include <qgarray.h> -#include <qimage.h> -#include <qpainter.h> -#include <qpixmap.h> -#include <qpoint.h> -#include <qstring.h> -#include <qstringlist.h> +#include <tqbitmap.h> +#include <tqgarray.h> +#include <tqimage.h> +#include <tqpainter.h> +#include <tqpixmap.h> +#include <tqpoint.h> +#include <tqstring.h> +#include <tqstringlist.h> namespace Rosegarden @@ -48,7 +48,7 @@ namespace Rosegarden NoteFont::FontPixmapMap *NoteFont::m_fontPixmapMap = 0; NoteFont::DrawRepMap *NoteFont::m_drawRepMap = 0; -QPixmap *NoteFont::m_blankPixmap = 0; +TQPixmap *NoteFont::m_blankPixmap = 0; NoteFont::NoteFont(std::string fontName, int size) : @@ -66,7 +66,7 @@ NoteFont::NoteFont(std::string fontName, int size) : if (size > 0) { if (sizes.find(size) == sizes.end()) { - throw BadNoteFont(qstrtostr(QString("Font \"%1\" not available in size %2").arg(strtoqstr(fontName)).arg(size))); + throw BadNoteFont(qstrtostr(TQString("Font \"%1\" not available in size %2").arg(strtoqstr(fontName)).arg(size))); } else { m_size = size; } @@ -79,13 +79,13 @@ NoteFont::NoteFont(std::string fontName, int size) : } if (m_blankPixmap == 0) { - m_blankPixmap = new QPixmap(10, 10); - m_blankPixmap->setMask(QBitmap(10, 10, TRUE)); + m_blankPixmap = new TQPixmap(10, 10); + m_blankPixmap->setMask(TQBitmap(10, 10, TRUE)); } // Locate our font's pixmap map in the font map, create if necessary - std::string fontKey = qstrtostr(QString("__%1__%2__") + std::string fontKey = qstrtostr(TQString("__%1__%2__") .arg(strtoqstr(m_fontMap.getName())) .arg(m_size)); @@ -146,7 +146,7 @@ NoteFont::getLegerLineThickness(unsigned int &thickness) const } bool -NoteFont::lookup(CharName charName, bool inverted, QPixmap *&pixmap) const +NoteFont::lookup(CharName charName, bool inverted, TQPixmap *&pixmap) const { PixmapMap::iterator i = m_map->find(charName); if (i != m_map->end()) { @@ -167,7 +167,7 @@ NoteFont::lookup(CharName charName, bool inverted, QPixmap *&pixmap) const void NoteFont::add -(CharName charName, bool inverted, QPixmap *pixmap) const +(CharName charName, bool inverted, TQPixmap *pixmap) const { PixmapMap::iterator i = m_map->find(charName); if (i != m_map->end()) { @@ -188,7 +188,7 @@ NoteFont::add } NoteCharacterDrawRep * -NoteFont::lookupDrawRep(QPixmap *pixmap) const +NoteFont::lookupDrawRep(TQPixmap *pixmap) const { if (!m_drawRepMap) m_drawRepMap = new DrawRepMap(); @@ -199,7 +199,7 @@ NoteFont::lookupDrawRep(QPixmap *pixmap) const } else { - QImage image = pixmap->convertToImage(); + TQImage image = pixmap->convertToImage(); if (image.isNull()) return 0; @@ -220,7 +220,7 @@ NoteFont::lookupDrawRep(QPixmap *pixmap) const bool pixel = false; if (xi < image.width()) { - if (image.bitOrder() == QImage::LittleEndian) { + if (image.bitOrder() == TQImage::LittleEndian) { if (*(line + (xi >> 3)) & 1 << (xi & 7)) pixel = true; } else { @@ -231,7 +231,7 @@ NoteFont::lookupDrawRep(QPixmap *pixmap) const if (!pixel) { if (startx < xi) { - a->resize(a->size() + 2, QGArray::SpeedOptim); + a->resize(a->size() + 2, TQGArray::SpeedOptim); a->setPoint(a->size() - 2, startx, yi); a->setPoint(a->size() - 1, xi - 1, yi); } @@ -246,9 +246,9 @@ NoteFont::lookupDrawRep(QPixmap *pixmap) const } bool -NoteFont::getPixmap(CharName charName, QPixmap &pixmap, bool inverted) const +NoteFont::getPixmap(CharName charName, TQPixmap &pixmap, bool inverted) const { - QPixmap *found = 0; + TQPixmap *found = 0; bool ok = lookup(charName, inverted, found); if (ok) { if (found) { @@ -263,7 +263,7 @@ NoteFont::getPixmap(CharName charName, QPixmap &pixmap, bool inverted) const if (inverted && !m_fontMap.hasInversion(m_size, charName)) { if (!getPixmap(charName, pixmap, !inverted)) return false; - found = new QPixmap(PixmapFunctions::flipVertical(pixmap)); + found = new TQPixmap(PixmapFunctions::flipVertical(pixmap)); add(charName, inverted, found); pixmap = *found; return true; @@ -281,11 +281,11 @@ NoteFont::getPixmap(CharName charName, QPixmap &pixmap, bool inverted) const NOTATION_DEBUG << "NoteFont::getPixmap: Loading \"" << src << "\"" << endl; - found = new QPixmap(strtoqstr(src)); + found = new TQPixmap(strtoqstr(src)); if (!found->isNull()) { - if (found->mask() == 0) { + if (found->tqmask() == 0) { std::cerr << "NoteFont::getPixmap: Warning: No automatic mask " << "for character \"" << charName << "\"" << (inverted ? " (inverted)" : "") << " in font \"" @@ -332,7 +332,7 @@ NoteFont::getPixmap(CharName charName, QPixmap &pixmap, bool inverted) const if (!inverted && m_fontMap.hasInversion(m_size, charName)) { if (!getPixmap(charName, pixmap, !inverted)) return false; - found = new QPixmap(PixmapFunctions::flipVertical(pixmap)); + found = new TQPixmap(PixmapFunctions::flipVertical(pixmap)); add(charName, inverted, found); pixmap = *found; return true; @@ -351,7 +351,7 @@ NoteFont::getPixmap(CharName charName, QPixmap &pixmap, bool inverted) const m_fontMap.getStrategy(m_size, charName); bool success; - found = new QPixmap(systemFont->renderChar(charName, + found = new TQPixmap(systemFont->renderChar(charName, glyph, code + charBase, strategy, @@ -374,12 +374,12 @@ NoteFont::getPixmap(CharName charName, QPixmap &pixmap, bool inverted) const } bool -NoteFont::getColouredPixmap(CharName baseCharName, QPixmap &pixmap, +NoteFont::getColouredPixmap(CharName baseCharName, TQPixmap &pixmap, int hue, int minValue, bool inverted) const { CharName charName(getNameWithColour(baseCharName, hue)); - QPixmap *found = 0; + TQPixmap *found = 0; bool ok = lookup(charName, inverted, found); if (ok) { if (found) { @@ -391,7 +391,7 @@ NoteFont::getColouredPixmap(CharName baseCharName, QPixmap &pixmap, } } - QPixmap basePixmap; + TQPixmap basePixmap; ok = getPixmap(baseCharName, basePixmap, inverted); if (!ok) { @@ -408,12 +408,12 @@ NoteFont::getColouredPixmap(CharName baseCharName, QPixmap &pixmap, } bool -NoteFont::getShadedPixmap(CharName baseCharName, QPixmap &pixmap, +NoteFont::getShadedPixmap(CharName baseCharName, TQPixmap &pixmap, bool inverted) const { CharName charName(getNameShaded(baseCharName)); - QPixmap *found = 0; + TQPixmap *found = 0; bool ok = lookup(charName, inverted, found); if (ok) { if (found) { @@ -425,7 +425,7 @@ NoteFont::getShadedPixmap(CharName baseCharName, QPixmap &pixmap, } } - QPixmap basePixmap; + TQPixmap basePixmap; ok = getPixmap(baseCharName, basePixmap, inverted); if (!ok) { @@ -434,7 +434,7 @@ NoteFont::getShadedPixmap(CharName baseCharName, QPixmap &pixmap, return false; } - found = new QPixmap(PixmapFunctions::shadePixmap(basePixmap)); + found = new TQPixmap(PixmapFunctions::shadePixmap(basePixmap)); add(charName, inverted, found); pixmap = *found; return ok; @@ -443,19 +443,19 @@ NoteFont::getShadedPixmap(CharName baseCharName, QPixmap &pixmap, CharName NoteFont::getNameWithColour(CharName base, int hue) const { - return qstrtostr(QString("%1__%2").arg(hue).arg(strtoqstr(base))); + return qstrtostr(TQString("%1__%2").arg(hue).arg(strtoqstr(base))); } CharName NoteFont::getNameShaded(CharName base) const { - return qstrtostr(QString("shaded__%1").arg(strtoqstr(base))); + return qstrtostr(TQString("shaded__%1").arg(strtoqstr(base))); } bool NoteFont::getDimensions(CharName charName, int &x, int &y, bool inverted) const { - QPixmap pixmap; + TQPixmap pixmap; bool ok = getPixmap(charName, pixmap, inverted); x = pixmap.width(); y = pixmap.height(); @@ -502,7 +502,7 @@ NoteFont::getHotspot(CharName charName, bool inverted) const { int x, y; (void)getHotspot(charName, x, y, inverted); - return QPoint(x, y); + return TQPoint(x, y); } bool @@ -511,7 +511,7 @@ NoteFont::getCharacter(CharName charName, CharacterType type, bool inverted) { - QPixmap pixmap; + TQPixmap pixmap; if (!getPixmap(charName, pixmap, inverted)) return false; @@ -524,7 +524,7 @@ NoteFont::getCharacter(CharName charName, // Get the pointer direct from cache (depends on earlier call // to getPixmap to put it in the cache if available) - QPixmap *pmapptr = 0; + TQPixmap *pmapptr = 0; bool found = lookup(charName, inverted, pmapptr); NoteCharacterDrawRep *rep = 0; @@ -556,7 +556,7 @@ NoteFont::getCharacterColoured(CharName charName, CharacterType type, bool inverted) { - QPixmap pixmap; + TQPixmap pixmap; if (!getColouredPixmap(charName, pixmap, hue, minValue, inverted)) { return false; } @@ -572,7 +572,7 @@ NoteFont::getCharacterColoured(CharName charName, // Get the pointer direct from cache (depends on earlier call // to getPixmap to put it in the cache if available) - QPixmap *pmapptr = 0; + TQPixmap *pmapptr = 0; CharName cCharName(getNameWithColour(charName, hue)); bool found = lookup(cCharName, inverted, pmapptr); @@ -605,7 +605,7 @@ NoteFont::getCharacterShaded(CharName charName, CharacterType type, bool inverted) { - QPixmap pixmap; + TQPixmap pixmap; if (!getShadedPixmap(charName, pixmap, inverted)) { return false; } @@ -621,7 +621,7 @@ NoteFont::getCharacterShaded(CharName charName, // Get the pointer direct from cache (depends on earlier call // to getPixmap to put it in the cache if available) - QPixmap *pmapptr = 0; + TQPixmap *pmapptr = 0; CharName cCharName(getNameShaded(charName)); bool found = lookup(cCharName, inverted, pmapptr); diff --git a/src/gui/editors/notation/NoteFont.h b/src/gui/editors/notation/NoteFont.h index 81a3b19..5bdef07 100644 --- a/src/gui/editors/notation/NoteFont.h +++ b/src/gui/editors/notation/NoteFont.h @@ -32,12 +32,12 @@ #include "NoteFontMap.h" #include <set> #include <string> -#include <qpoint.h> +#include <tqpoint.h> #include <utility> #include "gui/editors/notation/NoteCharacterNames.h" -class QPixmap; +class TQPixmap; class PixmapMap; class NoteCharacterDrawRep; class FontPixmapMap; @@ -130,39 +130,39 @@ public: bool inverted = false) const; /// Ignores problems, returns centre-left of pixmap if necessary - QPoint getHotspot(CharName charName, bool inverted = false) const; + TQPoint getHotspot(CharName charName, bool inverted = false) const; private: /// Returns false + blank pixmap if it can't find the right one - bool getPixmap(CharName charName, QPixmap &pixmap, + bool getPixmap(CharName charName, TQPixmap &pixmap, bool inverted = false) const; /// Returns false + blank pixmap if it can't find the right one - bool getColouredPixmap(CharName charName, QPixmap &pixmap, + bool getColouredPixmap(CharName charName, TQPixmap &pixmap, int hue, int minValue, bool inverted = false) const; /// Returns false + blank pixmap if it can't find the right one - bool getShadedPixmap(CharName charName, QPixmap &pixmap, + bool getShadedPixmap(CharName charName, TQPixmap &pixmap, bool inverted = false) const; friend class NoteFontFactory; NoteFont(std::string fontName, int size = 0); std::set<int> getSizes() const { return m_fontMap.getSizes(); } - bool lookup(CharName charName, bool inverted, QPixmap *&pixmap) const; - void add(CharName charName, bool inverted, QPixmap *pixmap) const; + bool lookup(CharName charName, bool inverted, TQPixmap *&pixmap) const; + void add(CharName charName, bool inverted, TQPixmap *pixmap) const; - NoteCharacterDrawRep *lookupDrawRep(QPixmap *pixmap) const; + NoteCharacterDrawRep *lookupDrawRep(TQPixmap *pixmap) const; CharName getNameWithColour(CharName origName, int hue) const; CharName getNameShaded(CharName origName) const; - typedef std::pair<QPixmap *, QPixmap *> PixmapPair; + typedef std::pair<TQPixmap *, TQPixmap *> PixmapPair; typedef std::map<CharName, PixmapPair> PixmapMap; typedef std::map<std::string, PixmapMap *> FontPixmapMap; - typedef std::map<QPixmap *, NoteCharacterDrawRep *> DrawRepMap; + typedef std::map<TQPixmap *, NoteCharacterDrawRep *> DrawRepMap; //--------------- Data members --------------------------------- @@ -174,7 +174,7 @@ private: static FontPixmapMap *m_fontPixmapMap; static DrawRepMap *m_drawRepMap; - static QPixmap *m_blankPixmap; + static TQPixmap *m_blankPixmap; }; diff --git a/src/gui/editors/notation/NoteFontFactory.cpp b/src/gui/editors/notation/NoteFontFactory.cpp index 2decce4..80e0772 100644 --- a/src/gui/editors/notation/NoteFontFactory.cpp +++ b/src/gui/editors/notation/NoteFontFactory.cpp @@ -38,9 +38,9 @@ #include <kconfig.h> #include <kglobal.h> #include <kmessagebox.h> -#include <qdir.h> -#include <qstring.h> -#include <qstringlist.h> +#include <tqdir.h> +#include <tqstring.h> +#include <tqstringlist.h> #include <algorithm> @@ -60,31 +60,31 @@ NoteFontFactory::getFontNames(bool forceRescan) KConfig *config = kapp->config(); config->setGroup(NotationViewConfigGroup); - QString fontNameList = ""; + TQString fontNameList = ""; if (!forceRescan) { fontNameList = config->readEntry("notefontlist"); } NOTATION_DEBUG << "NoteFontFactory::getFontNames: read from cache: " << fontNameList << endl; - QStringList names = QStringList::split(",", fontNameList); + TQStringList names = TQStringList::split(",", fontNameList); if (names.empty()) { NOTATION_DEBUG << "NoteFontFactory::getFontNames: No names available, rescanning..." << endl; - QString mappingDir = + TQString mappingDir = KGlobal::dirs()->findResource("appdata", "fonts/mappings/"); - QDir dir(mappingDir); + TQDir dir(mappingDir); if (!dir.exists()) { std::cerr << "NoteFontFactory::getFontNames: mapping directory \"" << mappingDir << "\" not found" << std::endl; return m_fontNames; } - dir.setFilter(QDir::Files | QDir::Readable); - QStringList files = dir.entryList(); - for (QStringList::Iterator i = files.begin(); i != files.end(); ++i) { + dir.setFilter(TQDir::Files | TQDir::Readable); + TQStringList files = dir.entryList(); + for (TQStringList::Iterator i = files.begin(); i != files.end(); ++i) { if ((*i).length() > 4 && (*i).right(4).lower() == ".xml") { @@ -103,9 +103,9 @@ NoteFontFactory::getFontNames(bool forceRescan) } } - QString savedNames = ""; + TQString savedNames = ""; - for (QStringList::Iterator i = names.begin(); i != names.end(); ++i) { + for (TQStringList::Iterator i = names.begin(); i != names.end(); ++i) { m_fontNames.insert(qstrtostr(*i)); if (i != names.begin()) savedNames += ","; @@ -197,7 +197,7 @@ NoteFontFactory::getDefaultFontName() else if (fontNames.size() > 0) defaultFont = *fontNames.begin(); else { - QString message = i18n("Can't obtain a default font -- no fonts found"); + TQString message = i18n("Can't obtain a default font -- no fonts found"); KStartupLogo::hideIfStillThere(); KMessageBox::error(0, message); throw NoFontsAvailable(qstrtostr(message)); diff --git a/src/gui/editors/notation/NoteFontMap.cpp b/src/gui/editors/notation/NoteFontMap.cpp index e11c126..9640087 100644 --- a/src/gui/editors/notation/NoteFontMap.cpp +++ b/src/gui/editors/notation/NoteFontMap.cpp @@ -32,12 +32,12 @@ #include "base/Exception.h" #include "SystemFont.h" #include <kglobal.h> -#include <qfile.h> -#include <qfileinfo.h> -#include <qpixmap.h> -#include <qregexp.h> -#include <qstring.h> -#include <qstringlist.h> +#include <tqfile.h> +#include <tqfileinfo.h> +#include <tqpixmap.h> +#include <tqregexp.h> +#include <tqstring.h> +#include <tqstringlist.h> namespace Rosegarden @@ -54,23 +54,23 @@ NoteFontMap::NoteFontMap(std::string name) : { m_fontDirectory = KGlobal::dirs()->findResource("appdata", "fonts/"); - QString mapFileName; + TQString mapFileName; - QString mapFileMixedName = QString("%1/mappings/%2.xml") + TQString mapFileMixedName = TQString("%1/mappings/%2.xml") .arg(m_fontDirectory) .arg(strtoqstr(name)); - QFileInfo mapFileMixedInfo(mapFileMixedName); + TQFileInfo mapFileMixedInfo(mapFileMixedName); if (!mapFileMixedInfo.isReadable()) { - QString lowerName = strtoqstr(name).lower(); - lowerName.replace(QRegExp(" "), "_"); - QString mapFileLowerName = QString("%1/mappings/%2.xml") + TQString lowerName = strtoqstr(name).lower(); + lowerName.replace(TQRegExp(" "), "_"); + TQString mapFileLowerName = TQString("%1/mappings/%2.xml") .arg(m_fontDirectory) .arg(lowerName); - QFileInfo mapFileLowerInfo(mapFileLowerName); + TQFileInfo mapFileLowerInfo(mapFileLowerName); if (!mapFileLowerInfo.isReadable()) { if (mapFileLowerName != mapFileMixedName) { @@ -89,10 +89,10 @@ NoteFontMap::NoteFontMap(std::string name) : mapFileName = mapFileMixedName; } - QFile mapFile(mapFileName); + TQFile mapFile(mapFileName); - QXmlInputSource source(mapFile); - QXmlSimpleReader reader; + TQXmlInputSource source(mapFile); + TQXmlSimpleReader reader; reader.setContentHandler(this); reader.setErrorHandler(this); bool ok = reader.parse(source); @@ -112,7 +112,7 @@ NoteFontMap::~NoteFontMap() } bool -NoteFontMap::characters(QString &chars) +NoteFontMap::characters(TQString &chars) { if (!m_characterDestination) return true; @@ -131,11 +131,11 @@ NoteFontMap::toSize(int baseSize, double factor, bool limitAtOne) } bool -NoteFontMap::startElement(const QString &, const QString &, - const QString &qName, - const QXmlAttributes &attributes) +NoteFontMap::startElement(const TQString &, const TQString &, + const TQString &qName, + const TQXmlAttributes &attributes) { - QString lcName = qName.lower(); + TQString lcName = qName.lower(); m_characterDestination = 0; // The element names are actually unique within the whole file; @@ -144,7 +144,7 @@ NoteFontMap::startElement(const QString &, const QString &, if (lcName == "rosegarden-font-encoding") { - QString s; + TQString s; s = attributes.value("name"); if (s) { @@ -154,7 +154,7 @@ NoteFontMap::startElement(const QString &, const QString &, } else if (lcName == "font-information") { - QString s; + TQString s; s = attributes.value("origin"); if (s) @@ -185,7 +185,7 @@ NoteFontMap::startElement(const QString &, const QString &, } else if (lcName == "font-size") { - QString s = attributes.value("note-height"); + TQString s = attributes.value("note-height"); if (!s) { m_errorString = "note-height is a required attribute of font-size"; return false; @@ -247,7 +247,7 @@ NoteFontMap::startElement(const QString &, const QString &, double legerLineThickness = -1.0; double stemThickness = -1.0; - QString s; + TQString s; s = attributes.value("font-height"); if (s) @@ -334,7 +334,7 @@ NoteFontMap::startElement(const QString &, const QString &, } else if (lcName == "src-directory") { - QString d = attributes.value("name"); + TQString d = attributes.value("name"); if (!d) { m_errorString = "name is a required attribute of src-directory"; return false; @@ -346,7 +346,7 @@ NoteFontMap::startElement(const QString &, const QString &, int bn = 0, fn = 0; bool ok; - QString base = attributes.value("base"); + TQString base = attributes.value("base"); if (!base) { m_errorString = "base is a required attribute of codebase"; return false; @@ -354,12 +354,12 @@ NoteFontMap::startElement(const QString &, const QString &, bn = base.toInt(&ok); if (!ok || bn < 0) { m_errorString = - QString("invalid base attribute \"%1\" (must be integer >= 0)"). + TQString("invalid base attribute \"%1\" (must be integer >= 0)"). arg(base); return false; } - QString fontId = attributes.value("font-id"); + TQString fontId = attributes.value("font-id"); if (!fontId) { m_errorString = "font-id is a required attribute of codebase"; return false; @@ -367,7 +367,7 @@ NoteFontMap::startElement(const QString &, const QString &, fn = fontId.stripWhiteSpace().toInt(&ok); if (!ok || fn < 0) { m_errorString = - QString("invalid font-id attribute \"%1\" (must be integer >= 0)"). + TQString("invalid font-id attribute \"%1\" (must be integer >= 0)"). arg(fontId); return false; } @@ -376,16 +376,16 @@ NoteFontMap::startElement(const QString &, const QString &, } else if (lcName == "symbol") { - QString symbolName = attributes.value("name"); + TQString symbolName = attributes.value("name"); if (!symbolName) { m_errorString = "name is a required attribute of symbol"; return false; } SymbolData symbolData; - QString src = attributes.value("src"); - QString code = attributes.value("code"); - QString glyph = attributes.value("glyph"); + TQString src = attributes.value("src"); + TQString code = attributes.value("code"); + TQString glyph = attributes.value("glyph"); int icode = -1; bool ok = false; @@ -393,7 +393,7 @@ NoteFontMap::startElement(const QString &, const QString &, icode = code.stripWhiteSpace().toInt(&ok); if (!ok || icode < 0) { m_errorString = - QString("invalid code attribute \"%1\" (must be integer >= 0)"). + TQString("invalid code attribute \"%1\" (must be integer >= 0)"). arg(code); return false; } @@ -406,7 +406,7 @@ NoteFontMap::startElement(const QString &, const QString &, iglyph = glyph.stripWhiteSpace().toInt(&ok); if (!ok || iglyph < 0) { m_errorString = - QString("invalid glyph attribute \"%1\" (must be integer >= 0)"). + TQString("invalid glyph attribute \"%1\" (must be integer >= 0)"). arg(glyph); return false; } @@ -420,40 +420,40 @@ NoteFontMap::startElement(const QString &, const QString &, if (src) symbolData.setSrc(qstrtostr(src)); - QString inversionSrc = attributes.value("inversion-src"); + TQString inversionSrc = attributes.value("inversion-src"); if (inversionSrc) symbolData.setInversionSrc(qstrtostr(inversionSrc)); - QString inversionCode = attributes.value("inversion-code"); + TQString inversionCode = attributes.value("inversion-code"); if (inversionCode) { icode = inversionCode.stripWhiteSpace().toInt(&ok); if (!ok || icode < 0) { m_errorString = - QString("invalid inversion code attribute \"%1\" (must be integer >= 0)"). + TQString("invalid inversion code attribute \"%1\" (must be integer >= 0)"). arg(inversionCode); return false; } symbolData.setInversionCode(icode); } - QString inversionGlyph = attributes.value("inversion-glyph"); + TQString inversionGlyph = attributes.value("inversion-glyph"); if (inversionGlyph) { iglyph = inversionGlyph.stripWhiteSpace().toInt(&ok); if (!ok || iglyph < 0) { m_errorString = - QString("invalid inversion glyph attribute \"%1\" (must be integer >= 0)"). + TQString("invalid inversion glyph attribute \"%1\" (must be integer >= 0)"). arg(inversionGlyph); return false; } symbolData.setInversionGlyph(iglyph); } - QString fontId = attributes.value("font-id"); + TQString fontId = attributes.value("font-id"); if (fontId) { int n = fontId.stripWhiteSpace().toInt(&ok); if (!ok || n < 0) { m_errorString = - QString("invalid font-id attribute \"%1\" (must be integer >= 0)"). + TQString("invalid font-id attribute \"%1\" (must be integer >= 0)"). arg(fontId); return false; } @@ -466,7 +466,7 @@ NoteFontMap::startElement(const QString &, const QString &, } else if (lcName == "hotspot") { - QString s = attributes.value("name"); + TQString s = attributes.value("name"); if (!s) { m_errorString = "name is a required attribute of hotspot"; return false; @@ -480,7 +480,7 @@ NoteFontMap::startElement(const QString &, const QString &, return false; } - QString s = attributes.value("x"); + TQString s = attributes.value("x"); double x = -1.0; if (s) x = qstrtodouble(s); @@ -507,7 +507,7 @@ NoteFontMap::startElement(const QString &, const QString &, return false; } - QString s = attributes.value("x"); + TQString s = attributes.value("x"); int x = 0; if (s) x = s.toInt(); @@ -532,7 +532,7 @@ NoteFontMap::startElement(const QString &, const QString &, return false; } - QString s = attributes.value("note-height"); + TQString s = attributes.value("note-height"); if (!s) { m_errorString = "note-height is a required attribute of when"; return false; @@ -563,14 +563,14 @@ NoteFontMap::startElement(const QString &, const QString &, } else if (lcName == "font-requirement") { - QString id = attributes.value("font-id"); + TQString id = attributes.value("font-id"); int n = -1; bool ok = false; if (id) { n = id.stripWhiteSpace().toInt(&ok); if (!ok) { m_errorString = - QString("invalid font-id attribute \"%1\" (must be integer >= 0)"). + TQString("invalid font-id attribute \"%1\" (must be integer >= 0)"). arg(id); return false; } @@ -579,8 +579,8 @@ NoteFontMap::startElement(const QString &, const QString &, return false; } - QString name = attributes.value("name"); - QString names = attributes.value("names"); + TQString name = attributes.value("name"); + TQString names = attributes.value("names"); if (name) { if (names) { @@ -595,15 +595,15 @@ NoteFontMap::startElement(const QString &, const QString &, m_systemFontNames[n] = name; delete font; } else { - std::cerr << QString("Warning: Unable to load font \"%1\"").arg(name) << std::endl; + std::cerr << TQString("Warning: Unable to load font \"%1\"").arg(name) << std::endl; m_ok = false; } } else if (names) { bool have = false; - QStringList list = QStringList::split(",", names, false); - for (QStringList::Iterator i = list.begin(); i != list.end(); ++i) { + TQStringList list = TQStringList::split(",", names, false); + for (TQStringList::Iterator i = list.begin(); i != list.end(); ++i) { SystemFont *font = SystemFont::loadSystemFont (SystemFontSpec(*i, 12)); if (font) { @@ -614,7 +614,7 @@ NoteFontMap::startElement(const QString &, const QString &, } } if (!have) { - std::cerr << QString("Warning: Unable to load any of the fonts in \"%1\""). + std::cerr << TQString("Warning: Unable to load any of the fonts in \"%1\""). arg(names) << std::endl; m_ok = false; } @@ -624,7 +624,7 @@ NoteFontMap::startElement(const QString &, const QString &, return false; } - QString s = attributes.value("strategy").lower(); + TQString s = attributes.value("strategy").lower(); SystemFont::Strategy strategy = SystemFont::PreferGlyphs; if (s) { @@ -654,25 +654,25 @@ NoteFontMap::startElement(const QString &, const QString &, } bool -NoteFontMap::error(const QXmlParseException& exception) +NoteFontMap::error(const TQXmlParseException& exception) { - m_errorString = QString("%1 at line %2, column %3: %4") + m_errorString = TQString("%1 at line %2, column %3: %4") .arg(exception.message()) .arg(exception.lineNumber()) .arg(exception.columnNumber()) .arg(m_errorString); - return QXmlDefaultHandler::error(exception); + return TQXmlDefaultHandler::error(exception); } bool -NoteFontMap::fatalError(const QXmlParseException& exception) +NoteFontMap::fatalError(const TQXmlParseException& exception) { - m_errorString = QString("%1 at line %2, column %3: %4") + m_errorString = TQString("%1 at line %2, column %3: %4") .arg(exception.message()) .arg(exception.lineNumber()) .arg(exception.columnNumber()) .arg(m_errorString); - return QXmlDefaultHandler::fatalError(exception); + return TQXmlDefaultHandler::fatalError(exception); } std::set<int> @@ -704,23 +704,23 @@ NoteFontMap::getCharNames() const bool NoteFontMap::checkFile(int size, std::string &src) const { - QString pixmapFileMixedName = QString("%1/%2/%3/%4.xpm") + TQString pixmapFileMixedName = TQString("%1/%2/%3/%4.xpm") .arg(m_fontDirectory) .arg(strtoqstr(m_srcDirectory)) .arg(size) .arg(strtoqstr(src)); - QFileInfo pixmapFileMixedInfo(pixmapFileMixedName); + TQFileInfo pixmapFileMixedInfo(pixmapFileMixedName); if (!pixmapFileMixedInfo.isReadable()) { - QString pixmapFileLowerName = QString("%1/%2/%3/%4.xpm") + TQString pixmapFileLowerName = TQString("%1/%2/%3/%4.xpm") .arg(m_fontDirectory) .arg(strtoqstr(m_srcDirectory).lower()) .arg(size) .arg(strtoqstr(src)); - QFileInfo pixmapFileLowerInfo(pixmapFileLowerName); + TQFileInfo pixmapFileLowerInfo(pixmapFileLowerName); if (!pixmapFileLowerInfo.isReadable()) { if (pixmapFileMixedName != pixmapFileLowerName) { @@ -803,7 +803,7 @@ const SystemFontNameMap::const_iterator fni = m_systemFontNames.find(fontId); if (fontId < 0 || fni == m_systemFontNames.end()) return false; - QString fontName = fni->second; + TQString fontName = fni->second; CharBaseMap::const_iterator bi = m_bases.find(fontId); if (bi == m_bases.end()) @@ -994,7 +994,7 @@ NoteFontMap::HotspotData::getHotspot(int size, int width, int height, QStringList NoteFontMap::getSystemFontNames() const { - QStringList names; + TQStringList names; for (SystemFontNameMap::const_iterator i = m_systemFontNames.begin(); i != m_systemFontNames.end(); ++i) { names.append(i->second); diff --git a/src/gui/editors/notation/NoteFontMap.h b/src/gui/editors/notation/NoteFontMap.h index 119db76..52d87fa 100644 --- a/src/gui/editors/notation/NoteFontMap.h +++ b/src/gui/editors/notation/NoteFontMap.h @@ -31,15 +31,15 @@ #include <set> #include <string> #include "SystemFont.h" -#include <qstring.h> -#include <qstringlist.h> +#include <tqstring.h> +#include <tqstringlist.h> #include <utility> -#include <qxml.h> +#include <tqxml.h> #include "gui/editors/notation/NoteCharacterNames.h" -class QXmlParseException; -class QXmlAttributes; +class TQXmlParseException; +class TQXmlAttributes; namespace Rosegarden @@ -97,18 +97,18 @@ public: // Xml handler methods: virtual bool startElement - (const QString& namespaceURI, const QString& localName, - const QString& qName, const QXmlAttributes& atts); + (const TQString& namespaceURI, const TQString& localName, + const TQString& qName, const TQXmlAttributes& atts); - virtual bool characters(QString &); + virtual bool characters(TQString &); - bool error(const QXmlParseException& exception); - bool fatalError(const QXmlParseException& exception); + bool error(const TQXmlParseException& exception); + bool fatalError(const TQXmlParseException& exception); void dump() const; // Not for general use, but very handy for diagnostic display - QStringList getSystemFontNames() const; + TQStringList getSystemFontNames() const; // want this to be private, but need access from HotspotData static int toSize(int baseSize, double factor, bool limitAtOne); @@ -300,7 +300,7 @@ private: typedef std::map<int, SizeData> SizeDataMap; SizeDataMap m_sizes; - typedef std::map<int, QString> SystemFontNameMap; + typedef std::map<int, TQString> SystemFontNameMap; SystemFontNameMap m_systemFontNames; typedef std::map<int, SystemFont::Strategy> SystemFontStrategyMap; @@ -316,10 +316,10 @@ private: bool m_expectingCharacters; std::string *m_characterDestination; std::string m_hotspotCharName; - QString m_errorString; + TQString m_errorString; bool checkFile(int size, std::string &src) const; - QString m_fontDirectory; + TQString m_fontDirectory; bool m_ok; }; diff --git a/src/gui/editors/notation/NoteFontViewer.cpp b/src/gui/editors/notation/NoteFontViewer.cpp index 81f07e9..d3dc2a3 100644 --- a/src/gui/editors/notation/NoteFontViewer.cpp +++ b/src/gui/editors/notation/NoteFontViewer.cpp @@ -30,11 +30,11 @@ #include <kcombobox.h> #include <kdialogbase.h> #include <ktoolbar.h> -#include <qlabel.h> -#include <qstring.h> -#include <qstringlist.h> -#include <qvbox.h> -#include <qwidget.h> +#include <tqlabel.h> +#include <tqstring.h> +#include <tqstringlist.h> +#include <tqvbox.h> +#include <tqwidget.h> namespace Rosegarden @@ -50,7 +50,7 @@ NoteFontViewer::slotViewChanged(int i) for (int r = 0; r < 256; ++r) { if (m_frame->hasRow(r)) { - m_rows->insertItem(QString("%1").arg(r)); + m_rows->insertItem(TQString("%1").arg(r)); if (firstRow < 0) firstRow = r; } @@ -66,7 +66,7 @@ NoteFontViewer::slotViewChanged(int i) } void -NoteFontViewer::slotRowChanged(const QString &s) +NoteFontViewer::slotRowChanged(const TQString &s) { bool ok; int i = s.toInt(&ok); @@ -75,48 +75,48 @@ NoteFontViewer::slotRowChanged(const QString &s) } void -NoteFontViewer::slotFontChanged(const QString &s) +NoteFontViewer::slotFontChanged(const TQString &s) { m_frame->setFont(s); slotViewChanged(m_view->currentItem()); } -NoteFontViewer::NoteFontViewer(QWidget *parent, QString noteFontName, - QStringList fontNames, int pixelSize) : +NoteFontViewer::NoteFontViewer(TQWidget *parent, TQString noteFontName, + TQStringList fontNames, int pixelSize) : KDialogBase(parent, 0, true, i18n("Note Font Viewer: %1").arg(noteFontName), Close) { - QVBox *box = makeVBoxMainWidget(); + TQVBox *box = makeVBoxMainWidget(); KToolBar* controls = new KToolBar(box); controls->setMargin(3); - (void) new QLabel(i18n(" Component: "), controls); + (void) new TQLabel(i18n(" Component: "), controls); m_font = new KComboBox(controls); - for (QStringList::iterator i = fontNames.begin(); i != fontNames.end(); + for (TQStringList::iterator i = fontNames.begin(); i != fontNames.end(); ++i) { m_font->insertItem(*i); } - (void) new QLabel(i18n(" View: "), controls); + (void) new TQLabel(i18n(" View: "), controls); m_view = new KComboBox(controls); m_view->insertItem(i18n("Glyphs")); m_view->insertItem(i18n("Codes")); - (void) new QLabel(i18n(" Page: "), controls); + (void) new TQLabel(i18n(" Page: "), controls); m_rows = new KComboBox(controls); m_frame = new FontViewFrame(pixelSize, box); - connect(m_font, SIGNAL(activated(const QString &)), - this, SLOT(slotFontChanged(const QString &))); + connect(m_font, TQT_SIGNAL(activated(const TQString &)), + this, TQT_SLOT(slotFontChanged(const TQString &))); - connect(m_view, SIGNAL(activated(int)), - this, SLOT(slotViewChanged(int))); + connect(m_view, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotViewChanged(int))); - connect(m_rows, SIGNAL(activated(const QString &)), - this, SLOT(slotRowChanged(const QString &))); + connect(m_rows, TQT_SIGNAL(activated(const TQString &)), + this, TQT_SLOT(slotRowChanged(const TQString &))); slotFontChanged(m_font->currentText()); } diff --git a/src/gui/editors/notation/NoteFontViewer.h b/src/gui/editors/notation/NoteFontViewer.h index 31c8613..b31df03 100644 --- a/src/gui/editors/notation/NoteFontViewer.h +++ b/src/gui/editors/notation/NoteFontViewer.h @@ -27,11 +27,11 @@ #define _RG_NOTEFONTVIEWER_H_ #include <kdialogbase.h> -#include <qstring.h> -#include <qstringlist.h> +#include <tqstring.h> +#include <tqstringlist.h> -class QWidget; +class TQWidget; class KComboBox; @@ -46,13 +46,13 @@ class NoteFontViewer : public KDialogBase Q_OBJECT public: - NoteFontViewer(QWidget *parent, QString noteFontName, - QStringList systemFontNames, int pixelSize); + NoteFontViewer(TQWidget *parent, TQString noteFontName, + TQStringList systemFontNames, int pixelSize); protected slots: - void slotFontChanged(const QString &); + void slotFontChanged(const TQString &); void slotViewChanged(int); - void slotRowChanged(const QString &); + void slotRowChanged(const TQString &); private: KComboBox *m_font; diff --git a/src/gui/editors/notation/NoteInserter.cpp b/src/gui/editors/notation/NoteInserter.cpp index 66adafe..c2533e5 100644 --- a/src/gui/editors/notation/NoteInserter.cpp +++ b/src/gui/editors/notation/NoteInserter.cpp @@ -52,9 +52,9 @@ #include <kaction.h> #include <kcommand.h> #include <kconfig.h> -#include <qiconset.h> -#include <qregexp.h> -#include <qstring.h> +#include <tqiconset.h> +#include <tqregexp.h> +#include <tqstring.h> namespace Rosegarden @@ -69,7 +69,7 @@ NoteInserter::NoteInserter(NotationView* view) m_lastAccidental(Accidentals::NoAccidental), m_followAccidental(false) { - QIconSet icon; + TQIconSet icon; KConfig *config = kapp->config(); config->setGroup(NotationViewConfigGroup); @@ -80,7 +80,7 @@ NoteInserter::NoteInserter(NotationView* view) KToggleAction *autoBeamAction = new KToggleAction(i18n("Auto-Beam when appropriate"), 0, this, - SLOT(slotToggleAutoBeam()), actionCollection(), + TQT_SLOT(slotToggleAutoBeam()), actionCollection(), "toggle_auto_beam"); autoBeamAction->setChecked(m_autoBeam); @@ -101,33 +101,33 @@ NoteInserter::NoteInserter(NotationView* view) (NotePixmapFactory::toQPixmap(NotePixmapFactory:: makeToolbarPixmap("dotted-crotchet"))); new KToggleAction(i18n("Dotted note"), icon, 0, this, - SLOT(slotToggleDot()), actionCollection(), + TQT_SLOT(slotToggleDot()), actionCollection(), "toggle_dot"); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory:: + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory:: makeToolbarPixmap("select"))); new KAction(i18n("Switch to Select Tool"), icon, 0, this, - SLOT(slotSelectSelected()), actionCollection(), + TQT_SLOT(slotSelectSelected()), actionCollection(), "select"); new KAction(i18n("Switch to Erase Tool"), "eraser", 0, this, - SLOT(slotEraseSelected()), actionCollection(), + TQT_SLOT(slotEraseSelected()), actionCollection(), "erase"); icon = QIconSet (NotePixmapFactory::toQPixmap(NotePixmapFactory:: makeToolbarPixmap("rest-crotchet"))); new KAction(i18n("Switch to Inserting Rests"), icon, 0, this, - SLOT(slotRestsSelected()), actionCollection(), + TQT_SLOT(slotRestsSelected()), actionCollection(), "rests"); createMenu("noteinserter.rc"); - connect(m_parentView, SIGNAL(changeAccidental(Accidental, bool)), - this, SLOT(slotSetAccidental(Accidental, bool))); + connect(m_parentView, TQT_SIGNAL(changeAccidental(Accidental, bool)), + this, TQT_SLOT(slotSetAccidental(Accidental, bool))); } -NoteInserter::NoteInserter(const QString& menuName, NotationView* view) +NoteInserter::NoteInserter(const TQString& menuName, NotationView* view) : NotationTool(menuName, view), m_noteType(Note::Quaver), m_noteDots(0), @@ -137,8 +137,8 @@ NoteInserter::NoteInserter(const QString& menuName, NotationView* view) m_lastAccidental(Accidentals::NoAccidental), m_followAccidental(false) { - connect(m_parentView, SIGNAL(changeAccidental(Accidental, bool)), - this, SLOT(slotSetAccidental(Accidental, bool))); + connect(m_parentView, TQT_SIGNAL(changeAccidental(Accidental, bool)), + this, TQT_SLOT(slotSetAccidental(Accidental, bool))); } NoteInserter::~NoteInserter() @@ -155,7 +155,7 @@ void NoteInserter::handleLeftButtonPress(timeT, int, int staffNo, - QMouseEvent* e, + TQMouseEvent* e, ViewElement*) { if (staffNo < 0) @@ -166,7 +166,7 @@ NoteInserter::handleLeftButtonPress(timeT, int NoteInserter::handleMouseMove(timeT, int, - QMouseEvent *e) + TQMouseEvent *e) { if (m_clickHappened) { computeLocationAndPreview(e); @@ -178,7 +178,7 @@ NoteInserter::handleMouseMove(timeT, void NoteInserter::handleMouseRelease(timeT, int, - QMouseEvent *e) + TQMouseEvent *e) { if (!m_clickHappened) return ; @@ -262,7 +262,7 @@ NoteInserter::insertNote(Segment &segment, timeT insertionTime, } bool -NoteInserter::computeLocationAndPreview(QMouseEvent *e) +NoteInserter::computeLocationAndPreview(TQMouseEvent *e) { double x = e->x(); int y = (int)e->y(); @@ -660,8 +660,8 @@ void NoteInserter::slotToggleDot() { m_noteDots = (m_noteDots) ? 0 : 1; Note note(m_noteType, m_noteDots); - QString actionName(NotationStrings::getReferenceName(note)); - actionName.replace(QRegExp("-"), "_"); + TQString actionName(NotationStrings::getReferenceName(note)); + actionName.replace(TQRegExp("-"), "_"); KAction *action = m_parentView->actionCollection()->action(actionName); if (!action) { std::cerr << "WARNING: No such action as " << actionName << std::endl; @@ -688,8 +688,8 @@ void NoteInserter::slotSelectSelected() void NoteInserter::slotRestsSelected() { Note note(m_noteType, m_noteDots); - QString actionName(NotationStrings::getReferenceName(note, true)); - actionName.replace(QRegExp("-"), "_"); + TQString actionName(NotationStrings::getReferenceName(note, true)); + actionName.replace(TQRegExp("-"), "_"); KAction *action = m_parentView->actionCollection()->action(actionName); if (!action) { std::cerr << "WARNING: No such action as " << actionName << std::endl; @@ -716,7 +716,7 @@ const char* NoteInserter::m_actionsAccidental[][4] = "accidental-doubleflat" } }; -const QString NoteInserter::ToolName = "noteinserter"; +const TQString NoteInserter::ToolName = "noteinserter"; } #include "NoteInserter.moc" diff --git a/src/gui/editors/notation/NoteInserter.h b/src/gui/editors/notation/NoteInserter.h index cb46b38..a2467a1 100644 --- a/src/gui/editors/notation/NoteInserter.h +++ b/src/gui/editors/notation/NoteInserter.h @@ -30,11 +30,11 @@ #include "NotationTool.h" #include "NotationElement.h" #include "NoteStyle.h" -#include <qstring.h> +#include <tqstring.h> #include "base/Event.h" -class QMouseEvent; +class TQMouseEvent; namespace Rosegarden @@ -61,16 +61,16 @@ public: virtual void handleLeftButtonPress(timeT, int height, int staffNo, - QMouseEvent*, + TQMouseEvent*, ViewElement* el); virtual int handleMouseMove(timeT time, int height, - QMouseEvent*); + TQMouseEvent*); virtual void handleMouseRelease(timeT time, int height, - QMouseEvent*); + TQMouseEvent*); virtual void ready(); @@ -85,7 +85,7 @@ public: Accidental accidental, bool suppressPreview = false); - static const QString ToolName; + static const TQString ToolName; public slots: /// Set the type of note (quaver, breve...) which will be inserted @@ -101,7 +101,7 @@ protected: NoteInserter(NotationView*); /// this ctor is used by RestInserter - NoteInserter(const QString& menuName, NotationView*); + NoteInserter(const TQString& menuName, NotationView*); timeT getOffsetWithinRest(int staffNo, const NotationElementList::iterator&, @@ -115,7 +115,7 @@ protected: const Note &, int pitch, Accidental); - virtual bool computeLocationAndPreview(QMouseEvent *e); + virtual bool computeLocationAndPreview(TQMouseEvent *e); virtual void showPreview(); virtual void clearPreview(); diff --git a/src/gui/editors/notation/NotePixmapFactory.cpp b/src/gui/editors/notation/NotePixmapFactory.cpp index c2a99ee..b41ecae 100644 --- a/src/gui/editors/notation/NotePixmapFactory.cpp +++ b/src/gui/editors/notation/NotePixmapFactory.cpp @@ -56,20 +56,20 @@ #include "NoteStyle.h" #include <kglobal.h> #include <kmessagebox.h> -#include <qbitmap.h> -#include <qcolor.h> -#include <qfile.h> -#include <qfont.h> -#include <qfontmetrics.h> -#include <qimage.h> -#include <qpainter.h> -#include <qpen.h> -#include <qpixmap.h> -#include <qpointarray.h> -#include <qpoint.h> -#include <qrect.h> -#include <qstring.h> -#include <qwmatrix.h> +#include <tqbitmap.h> +#include <tqcolor.h> +#include <tqfile.h> +#include <tqfont.h> +#include <tqfontmetrics.h> +#include <tqimage.h> +#include <tqpainter.h> +#include <tqpen.h> +#include <tqpixmap.h> +#include <tqpointarray.h> +#include <tqpoint.h> +#include <tqrect.h> +#include <tqstring.h> +#include <tqwmatrix.h> namespace Rosegarden @@ -82,7 +82,7 @@ static clock_t makeNotesTime = 0; static int drawBeamsCount = 0; static int drawBeamsBeamCount = 0; -class NotePixmapCache : public std::map<CharName, QCanvasPixmap*> +class NotePixmapCache : public std::map<CharName, TQCanvasPixmap*> { // nothing to add -- just so we can predeclare it in the header }; @@ -94,23 +94,23 @@ const char* const NotePixmapFactory::defaultTimeSigFontFamily = "Bitstream Vera NotePixmapFactory::NotePixmapFactory(std::string fontName, int size) : m_selected(false), m_shaded(false), - m_tupletCountFont(defaultSerifFontFamily, 8, QFont::Bold), + m_tupletCountFont(defaultSerifFontFamily, 8, TQFont::Bold), m_tupletCountFontMetrics(m_tupletCountFont), - m_textMarkFont(defaultSerifFontFamily, 8, QFont::Bold, true), + m_textMarkFont(defaultSerifFontFamily, 8, TQFont::Bold, true), m_textMarkFontMetrics(m_textMarkFont), - m_fingeringFont(defaultSerifFontFamily, 8, QFont::Bold), + m_fingeringFont(defaultSerifFontFamily, 8, TQFont::Bold), m_fingeringFontMetrics(m_fingeringFont), - m_timeSigFont(defaultTimeSigFontFamily, 8, QFont::Bold), + m_timeSigFont(defaultTimeSigFontFamily, 8, TQFont::Bold), m_timeSigFontMetrics(m_timeSigFont), - m_bigTimeSigFont(defaultTimeSigFontFamily, 12, QFont::Normal), + m_bigTimeSigFont(defaultTimeSigFontFamily, 12, TQFont::Normal), m_bigTimeSigFontMetrics(m_bigTimeSigFont), - m_ottavaFont(defaultSerifFontFamily, 8, QFont::Normal, true), + m_ottavaFont(defaultSerifFontFamily, 8, TQFont::Normal, true), m_ottavaFontMetrics(m_ottavaFont), - m_clefOttavaFont(defaultSerifFontFamily, 8, QFont::Normal), + m_clefOttavaFont(defaultSerifFontFamily, 8, TQFont::Normal), m_clefOttavaFontMetrics(m_ottavaFont), - m_trackHeaderFont(defaultSansSerifFontFamily, 10, QFont::Normal), + m_trackHeaderFont(defaultSansSerifFontFamily, 10, TQFont::Normal), m_trackHeaderFontMetrics(m_trackHeaderFont), - m_trackHeaderBoldFont(defaultSansSerifFontFamily, 10, QFont::Bold), + m_trackHeaderBoldFont(defaultSansSerifFontFamily, 10, TQFont::Bold), m_trackHeaderBoldFontMetrics(m_trackHeaderBoldFont), m_generatedPixmap(0), m_generatedMask(0), @@ -136,13 +136,13 @@ NotePixmapFactory::NotePixmapFactory(const NotePixmapFactory &npf) : m_timeSigFontMetrics(m_timeSigFont), m_bigTimeSigFont(npf.m_bigTimeSigFont), m_bigTimeSigFontMetrics(m_bigTimeSigFont), - m_ottavaFont(defaultSerifFontFamily, 8, QFont::Normal, true), + m_ottavaFont(defaultSerifFontFamily, 8, TQFont::Normal, true), m_ottavaFontMetrics(m_ottavaFont), - m_clefOttavaFont(defaultSerifFontFamily, 8, QFont::Normal), + m_clefOttavaFont(defaultSerifFontFamily, 8, TQFont::Normal), m_clefOttavaFontMetrics(m_ottavaFont), - m_trackHeaderFont(defaultSansSerifFontFamily, 10, QFont::Normal), + m_trackHeaderFont(defaultSansSerifFontFamily, 10, TQFont::Normal), m_trackHeaderFontMetrics(m_trackHeaderFont), - m_trackHeaderBoldFont(defaultSansSerifFontFamily, 10, QFont::Bold), + m_trackHeaderBoldFont(defaultSansSerifFontFamily, 10, TQFont::Bold), m_trackHeaderBoldFontMetrics(m_trackHeaderBoldFont), m_generatedPixmap(0), m_generatedMask(0), @@ -162,23 +162,23 @@ NotePixmapFactory::operator=(const NotePixmapFactory &npf) m_selected = npf.m_selected; m_shaded = npf.m_shaded; m_timeSigFont = npf.m_timeSigFont; - m_timeSigFontMetrics = QFontMetrics(m_timeSigFont); + m_timeSigFontMetrics = TQFontMetrics(m_timeSigFont); m_bigTimeSigFont = npf.m_bigTimeSigFont; - m_bigTimeSigFontMetrics = QFontMetrics(m_bigTimeSigFont); + m_bigTimeSigFontMetrics = TQFontMetrics(m_bigTimeSigFont); m_tupletCountFont = npf.m_tupletCountFont; - m_tupletCountFontMetrics = QFontMetrics(m_tupletCountFont); + m_tupletCountFontMetrics = TQFontMetrics(m_tupletCountFont); m_textMarkFont = npf.m_textMarkFont; - m_textMarkFontMetrics = QFontMetrics(m_textMarkFont); + m_textMarkFontMetrics = TQFontMetrics(m_textMarkFont); m_fingeringFont = npf.m_fingeringFont; - m_fingeringFontMetrics = QFontMetrics(m_fingeringFont); + m_fingeringFontMetrics = TQFontMetrics(m_fingeringFont); m_ottavaFont = npf.m_ottavaFont; - m_ottavaFontMetrics = QFontMetrics(m_ottavaFont); + m_ottavaFontMetrics = TQFontMetrics(m_ottavaFont); m_clefOttavaFont = npf.m_clefOttavaFont; - m_clefOttavaFontMetrics = QFontMetrics(m_clefOttavaFont); + m_clefOttavaFontMetrics = TQFontMetrics(m_clefOttavaFont); m_trackHeaderFont = npf.m_trackHeaderFont; - m_trackHeaderFontMetrics = QFontMetrics(m_trackHeaderFont); + m_trackHeaderFontMetrics = TQFontMetrics(m_trackHeaderFont); m_trackHeaderBoldFont = npf.m_trackHeaderBoldFont; - m_trackHeaderBoldFontMetrics = QFontMetrics(m_trackHeaderBoldFont); + m_trackHeaderBoldFontMetrics = TQFontMetrics(m_trackHeaderBoldFont); init(npf.m_font->getName(), npf.m_font->getSize()); m_dottedRestCache->clear(); m_textFontCache.clear(); @@ -224,7 +224,7 @@ NotePixmapFactory::init(std::string fontName, int size) // Resize the fonts, because the original constructor used point // sizes only and we want pixels - QFont timeSigFont(defaultTimeSigFontFamily), + TQFont timeSigFont(defaultTimeSigFontFamily), textFont(defaultSerifFontFamily); KConfig* config = kapp->config(); config->setGroup(NotationViewConfigGroup); @@ -232,43 +232,43 @@ NotePixmapFactory::init(std::string fontName, int size) m_timeSigFont = config->readFontEntry("timesigfont", &timeSigFont); m_timeSigFont.setBold(true); m_timeSigFont.setPixelSize(size * 5 / 2); - m_timeSigFontMetrics = QFontMetrics(m_timeSigFont); + m_timeSigFontMetrics = TQFontMetrics(m_timeSigFont); m_bigTimeSigFont = config->readFontEntry("timesigfont", &timeSigFont); m_bigTimeSigFont.setPixelSize(size * 4 + 2); - m_bigTimeSigFontMetrics = QFontMetrics(m_bigTimeSigFont); + m_bigTimeSigFontMetrics = TQFontMetrics(m_bigTimeSigFont); m_tupletCountFont = config->readFontEntry("textfont", &textFont); m_tupletCountFont.setBold(true); m_tupletCountFont.setPixelSize(size * 2); - m_tupletCountFontMetrics = QFontMetrics(m_tupletCountFont); + m_tupletCountFontMetrics = TQFontMetrics(m_tupletCountFont); m_textMarkFont = config->readFontEntry("textfont", &textFont); m_textMarkFont.setBold(true); m_textMarkFont.setItalic(true); m_textMarkFont.setPixelSize(size * 2); - m_textMarkFontMetrics = QFontMetrics(m_textMarkFont); + m_textMarkFontMetrics = TQFontMetrics(m_textMarkFont); m_fingeringFont = config->readFontEntry("textfont", &textFont); m_fingeringFont.setBold(true); m_fingeringFont.setPixelSize(size * 5 / 3); - m_fingeringFontMetrics = QFontMetrics(m_fingeringFont); + m_fingeringFontMetrics = TQFontMetrics(m_fingeringFont); m_ottavaFont = config->readFontEntry("textfont", &textFont); m_ottavaFont.setPixelSize(size * 2); - m_ottavaFontMetrics = QFontMetrics(m_ottavaFont); + m_ottavaFontMetrics = TQFontMetrics(m_ottavaFont); m_clefOttavaFont = config->readFontEntry("textfont", &textFont); m_clefOttavaFont.setPixelSize(getLineSpacing() * 3 / 2); - m_clefOttavaFontMetrics = QFontMetrics(m_clefOttavaFont); + m_clefOttavaFontMetrics = TQFontMetrics(m_clefOttavaFont); m_trackHeaderFont = config->readFontEntry("sansfont", &m_trackHeaderFont); m_trackHeaderFont.setPixelSize(12); - m_trackHeaderFontMetrics = QFontMetrics(m_trackHeaderFont); + m_trackHeaderFontMetrics = TQFontMetrics(m_trackHeaderFont); m_trackHeaderBoldFont = m_trackHeaderFont; m_trackHeaderBoldFont.setBold(true); - m_trackHeaderBoldFontMetrics = QFontMetrics(m_trackHeaderBoldFont); + m_trackHeaderBoldFontMetrics = TQFontMetrics(m_trackHeaderBoldFont); } NotePixmapFactory::~NotePixmapFactory() @@ -290,9 +290,9 @@ NotePixmapFactory::getSize() const } QPixmap -NotePixmapFactory::toQPixmap(QCanvasPixmap* cp) +NotePixmapFactory::toQPixmap(TQCanvasPixmap* cp) { - QPixmap p = *cp; + TQPixmap p = *cp; delete cp; return p; } @@ -317,7 +317,7 @@ NotePixmapFactory::dumpStats(std::ostream &s) (void)s; // avoid warnings } -QCanvasPixmap* +TQCanvasPixmap* NotePixmapFactory::makeNotePixmap(const NotePixmapParameters ¶ms) { Profiler profiler("NotePixmapFactory::makeNotePixmap"); @@ -325,7 +325,7 @@ NotePixmapFactory::makeNotePixmap(const NotePixmapParameters ¶ms) drawNoteAux(params, 0, 0, 0); - QPoint hotspot(m_left, m_above + m_noteBodyHeight / 2); + TQPoint hotspot(m_left, m_above + m_noteBodyHeight / 2); //#define ROSE_DEBUG_NOTE_PIXMAP_FACTORY #ifdef ROSE_DEBUG_NOTE_PIXMAP_FACTORY @@ -354,7 +354,7 @@ NotePixmapFactory::makeNotePixmap(const NotePixmapParameters ¶ms) void NotePixmapFactory::drawNote(const NotePixmapParameters ¶ms, - QPainter &painter, int x, int y) + TQPainter &painter, int x, int y) { Profiler profiler("NotePixmapFactory::drawNote"); m_inPrinterMethod = true; @@ -364,7 +364,7 @@ NotePixmapFactory::drawNote(const NotePixmapParameters ¶ms, void NotePixmapFactory::drawNoteAux(const NotePixmapParameters ¶ms, - QPainter *painter, int x, int y) + TQPainter *painter, int x, int y) { NoteFont::CharacterType charType = m_inPrinterMethod ? NoteFont::Printer : NoteFont::Screen; @@ -471,7 +471,7 @@ NotePixmapFactory::drawNoteAux(const NotePixmapParameters ¶ms, } } - QPoint startPoint, endPoint; + TQPoint startPoint, endPoint; if (isStemmed && params.m_drawStem) { makeRoomForStemAndFlags(drawFlag ? flagCount : 0, stemLength, params, startPoint, endPoint); @@ -526,7 +526,7 @@ NotePixmapFactory::drawNoteAux(const NotePixmapParameters ¶ms, params.m_inRange ? PlainColour : OutRangeColour, inverted); - QPoint bodyLocation(m_left - m_borderX, + TQPoint bodyLocation(m_left - m_borderX, m_above - m_borderY + getStaffLineThickness() / 2); if (params.m_shifted) { if (params.m_stemGoesUp) { @@ -603,7 +603,7 @@ NotePixmapFactory::drawNoteAux(const NotePixmapParameters ¶ms, } -QCanvasPixmap* +TQCanvasPixmap* NotePixmapFactory::makeNoteHaloPixmap(const NotePixmapParameters ¶ms) { int nbh0 = getNoteBodyHeight(); @@ -614,19 +614,19 @@ NotePixmapFactory::makeNoteHaloPixmap(const NotePixmapParameters ¶ms) createPixmapAndMask(nbw + nbw0, nbh + nbh0); drawNoteHalo(0, 0, nbw + nbw0, nbh + nbh0); - return makeCanvasPixmap(QPoint(nbw0 / 2, nbh0)); + return makeCanvasPixmap(TQPoint(nbw0 / 2, nbh0)); } void NotePixmapFactory::drawNoteHalo(int x, int y, int w, int h) { - m_p->painter().setPen(QPen(QColor(GUIPalette::CollisionHaloHue, + m_p->painter().setPen(TQPen(TQColor(GUIPalette::CollisionHaloHue, GUIPalette::CollisionHaloSaturation, - 255, QColor::Hsv), 1)); - m_p->painter().setBrush(QColor(GUIPalette::CollisionHaloHue, + 255, TQColor::Hsv), 1)); + m_p->painter().setBrush(TQColor(GUIPalette::CollisionHaloHue, GUIPalette::CollisionHaloSaturation, - 255, QColor::Hsv)); + 255, TQColor::Hsv)); m_p->drawEllipse(x, y, w, h); } @@ -699,7 +699,7 @@ NotePixmapFactory::makeRoomForAccidental(Accidental a, NoteCharacter ac (m_font->getCharacter(m_style->getAccidentalCharName(a))); - QPoint ah(m_font->getHotspot(m_style->getAccidentalCharName(a))); + TQPoint ah(m_font->getHotspot(m_style->getAccidentalCharName(a))); m_left += ac.getWidth() + (m_noteBodyWidth / 4 - m_borderX); @@ -725,7 +725,7 @@ NotePixmapFactory::makeRoomForAccidental(Accidental a, NoteCharacter acSharp (m_font->getCharacter(m_style->getAccidentalCharName (Accidentals::Sharp))); - QPoint ahSharp + TQPoint ahSharp (m_font->getHotspot(m_style->getAccidentalCharName (Accidentals::Sharp))); step = std::max(step, acSharp.getWidth() - ahSharp.x()); @@ -753,7 +753,7 @@ NotePixmapFactory::drawAccidental(Accidental a, bool cautionary) NoteCharacter ac = getCharacter (m_style->getAccidentalCharName(a), PlainColour, false); - QPoint ah(m_font->getHotspot(m_style->getAccidentalCharName(a))); + TQPoint ah(m_font->getHotspot(m_style->getAccidentalCharName(a))); int ax = 0; @@ -792,8 +792,8 @@ NotePixmapFactory::makeRoomForMarks(bool isStemmed, } else { // Inefficient to do this here _and_ in drawMarks, but // text marks are not all that common - QString text = strtoqstr(Marks::getTextFromMark(*i)); - QRect bounds = m_textMarkFontMetrics.boundingRect(text); + TQString text = strtoqstr(Marks::getTextFromMark(*i)); + TQRect bounds = m_textMarkFontMetrics.boundingRect(text); height += bounds.height() + gap; if (bounds.width() > width) width = bounds.width(); @@ -836,8 +836,8 @@ NotePixmapFactory::makeRoomForMarks(bool isStemmed, } else { // Inefficient to do this here _and_ in drawMarks - QString text = strtoqstr(Marks::getFingeringFromMark(*i)); - QRect bounds = m_fingeringFontMetrics.boundingRect(text); + TQString text = strtoqstr(Marks::getFingeringFromMark(*i)); + TQRect bounds = m_fingeringFontMetrics.boundingRect(text); height += bounds.height() + gap + 3; if (bounds.width() > width) width = bounds.width(); @@ -888,8 +888,8 @@ NotePixmapFactory::drawMarks(bool isStemmed, } else { - QString text = strtoqstr(Marks::getTextFromMark(*i)); - QRect bounds = m_textMarkFontMetrics.boundingRect(text); + TQString text = strtoqstr(Marks::getTextFromMark(*i)); + TQRect bounds = m_textMarkFontMetrics.boundingRect(text); m_p->painter().setFont(m_textMarkFont); if (!m_inPrinterMethod) @@ -973,8 +973,8 @@ NotePixmapFactory::drawMarks(bool isStemmed, } } else { - QString text = strtoqstr(Marks::getFingeringFromMark(*i)); - QRect bounds = m_fingeringFontMetrics.boundingRect(text); + TQString text = strtoqstr(Marks::getFingeringFromMark(*i)); + TQRect bounds = m_fingeringFontMetrics.boundingRect(text); m_p->painter().setFont(m_fingeringFont); if (!m_inPrinterMethod) @@ -1107,7 +1107,7 @@ NotePixmapFactory::drawLegerLines(const NotePixmapParameters ¶ms) void NotePixmapFactory::makeRoomForStemAndFlags(int flagCount, int stemLength, const NotePixmapParameters ¶ms, - QPoint &s0, QPoint &s1) + TQPoint &s0, TQPoint &s1) { // The coordinates we set in s0 and s1 are relative to (m_above, m_left) @@ -1194,7 +1194,7 @@ NotePixmapFactory::makeRoomForStemAndFlags(int flagCount, int stemLength, void NotePixmapFactory::drawFlags(int flagCount, const NotePixmapParameters ¶ms, - const QPoint &, const QPoint &s1) + const TQPoint &, const TQPoint &s1) { if (flagCount < 1) return ; @@ -1219,7 +1219,7 @@ NotePixmapFactory::drawFlags(int flagCount, return ; } - QPoint hotspot = flagChar.getHotspot(); + TQPoint hotspot = flagChar.getHotspot(); NoteCharacter oneFlagChar; bool foundOne = @@ -1270,7 +1270,7 @@ NotePixmapFactory::drawFlags(int flagCount, } else { // the normal case - QPoint hotspot = flagChar.getHotspot(); + TQPoint hotspot = flagChar.getHotspot(); int y = m_above + s1.y(); if (!params.m_stemGoesUp) @@ -1282,7 +1282,7 @@ NotePixmapFactory::drawFlags(int flagCount, void NotePixmapFactory::drawStem(const NotePixmapParameters ¶ms, - const QPoint &s0, const QPoint &s1, + const TQPoint &s0, const TQPoint &s1, int shortening) { if (params.m_stemGoesUp) @@ -1336,7 +1336,7 @@ NotePixmapFactory::drawShallowLine(int x0, int y0, int x1, int y1, } } else { Profiler profiler("NotePixmapFactory::drawShallowLine(polygon)"); - QPointArray qp(4); + TQPointArray qp(4); qp.setPoint(0, x0, y0); qp.setPoint(1, x0, y0 + thickness); qp.setPoint(2, x1, y1 + thickness); @@ -1352,14 +1352,14 @@ NotePixmapFactory::drawShallowLine(int x0, int y0, int x1, int y1, int dv = y1 - y0; int dh = x1 - x0; - static std::vector<QColor> colours, selectedColours; + static std::vector<TQColor> colours, selectedColours; if (colours.size() == 0) { int h, s, v; - QColor c = GUIPalette::getColour(GUIPalette::SelectedElement); + TQColor c = GUIPalette::getColour(GUIPalette::SelectedElement); c.hsv(&h, &s, &v); for (int step = 0; step < 256; step += (step == 0 ? 63 : 64)) { - colours.push_back(QColor( -1, 0, step, QColor::Hsv)); - selectedColours.push_back(QColor(h, 255 - step, v, QColor::Hsv)); + colours.push_back(TQColor( -1, 0, step, TQColor::Hsv)); + selectedColours.push_back(TQColor(h, 255 - step, v, TQColor::Hsv)); } } @@ -1444,7 +1444,7 @@ NotePixmapFactory::drawShallowLine(int x0, int y0, int x1, int y1, } void -NotePixmapFactory::drawBeams(const QPoint &s1, +NotePixmapFactory::drawBeams(const TQPoint &s1, const NotePixmapParameters ¶ms, int beamCount) { @@ -1521,7 +1521,7 @@ NotePixmapFactory::drawBeams(const QPoint &s1, } void -NotePixmapFactory::drawSlashes(const QPoint &s0, +NotePixmapFactory::drawSlashes(const TQPoint &s0, const NotePixmapParameters ¶ms, int slashCount) { @@ -1587,9 +1587,9 @@ NotePixmapFactory::drawTuplingLine(const NotePixmapParameters ¶ms) int thickness = getStaffLineThickness() * 3 / 2; int countSpace = thickness * 2; - QString count; + TQString count; count.setNum(params.m_tupletCount); - QRect cr = m_tupletCountFontMetrics.boundingRect(count); + TQRect cr = m_tupletCountFontMetrics.boundingRect(count); int tlw = params.m_tuplingLineWidth; int indent = m_noteBodyWidth / 2; @@ -1722,7 +1722,7 @@ NotePixmapFactory::drawTie(bool above, int length, int shift) // We can't request a smooth slur here, because that always involves // creating a new pixmap - QPoint hotspot; + TQPoint hotspot; drawSlurAux(length, 0, above, false, true, false, hotspot, &m_p->painter(), x, @@ -1733,7 +1733,7 @@ NotePixmapFactory::drawTie(bool above, int length, int shift) #endif } -QCanvasPixmap* +TQCanvasPixmap* NotePixmapFactory::makeRestPixmap(const NotePixmapParameters ¶ms) { Profiler profiler("NotePixmapFactory::makeRestPixmap"); @@ -1759,19 +1759,19 @@ NotePixmapFactory::makeRestPixmap(const NotePixmapParameters ¶ms) NotePixmapCache::iterator ci(m_dottedRestCache->find(charName)); if (ci != m_dottedRestCache->end()) return new QCanvasPixmap - (*ci->second, QPoint(ci->second->offsetX(), + (*ci->second, TQPoint(ci->second->offsetX(), ci->second->offsetY())); else encache = true; } } - QPoint hotspot(m_font->getHotspot(charName)); + TQPoint hotspot(m_font->getHotspot(charName)); drawRestAux(params, hotspot, 0, 0, 0); - QCanvasPixmap* canvasMap = makeCanvasPixmap(hotspot); + TQCanvasPixmap* canvasMap = makeCanvasPixmap(hotspot); if (encache) { - m_dottedRestCache->insert(std::pair<CharName, QCanvasPixmap*> + m_dottedRestCache->insert(std::pair<CharName, TQCanvasPixmap*> (charName, new QCanvasPixmap (*canvasMap, hotspot))); } @@ -1780,18 +1780,18 @@ NotePixmapFactory::makeRestPixmap(const NotePixmapParameters ¶ms) void NotePixmapFactory::drawRest(const NotePixmapParameters ¶ms, - QPainter &painter, int x, int y) + TQPainter &painter, int x, int y) { Profiler profiler("NotePixmapFactory::drawRest"); m_inPrinterMethod = true; - QPoint hotspot; // unused + TQPoint hotspot; // unused drawRestAux(params, hotspot, &painter, x, y); m_inPrinterMethod = false; } void NotePixmapFactory::drawRestAux(const NotePixmapParameters ¶ms, - QPoint &hotspot, QPainter *painter, int x, int y) + TQPoint &hotspot, TQPainter *painter, int x, int y) { CharName charName(m_style->getRestCharName(params.m_noteType, params.m_restOutsideStave)); @@ -1862,7 +1862,7 @@ NotePixmapFactory::drawRestAux(const NotePixmapParameters ¶ms, } } -QCanvasPixmap* +TQCanvasPixmap* NotePixmapFactory::makeClefPixmap(const Clef &clef) { Profiler profiler("NotePixmapFactory::makeClefPixmap"); @@ -1880,8 +1880,8 @@ NotePixmapFactory::makeClefPixmap(const Clef &clef) else if (adjustedOctave < 8) adjustedOctave++; - QString text = QString("%1").arg(adjustedOctave); - QRect rect = m_clefOttavaFontMetrics.boundingRect(text); + TQString text = TQString("%1").arg(adjustedOctave); + TQRect rect = m_clefOttavaFontMetrics.boundingRect(text); createPixmapAndMask(plain.getWidth(), plain.getHeight() + rect.height()); @@ -1901,26 +1901,26 @@ NotePixmapFactory::makeClefPixmap(const Clef &clef) rect.height(), text); m_p->painter().setPen(Qt::black); - QPoint hotspot(plain.getHotspot()); + TQPoint hotspot(plain.getHotspot()); if (oct > 0) hotspot.setY(hotspot.y() + rect.height()); return makeCanvasPixmap(hotspot, true); } -QCanvasPixmap* +TQCanvasPixmap* NotePixmapFactory::makePedalDownPixmap() { return getCharacter(NoteCharacterNames::PEDAL_MARK, PlainColour, false) .getCanvasPixmap(); } -QCanvasPixmap* +TQCanvasPixmap* NotePixmapFactory::makePedalUpPixmap() { return getCharacter(NoteCharacterNames::PEDAL_UP_MARK, PlainColour, false) .getCanvasPixmap(); } -QCanvasPixmap* +TQCanvasPixmap* NotePixmapFactory::makeUnknownPixmap() { Profiler profiler("NotePixmapFactory::makeUnknownPixmap"); @@ -1928,26 +1928,26 @@ NotePixmapFactory::makeUnknownPixmap() .getCanvasPixmap(); } -QCanvasPixmap* +TQCanvasPixmap* NotePixmapFactory::makeToolbarPixmap(const char *name, bool menuSize) { - QString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); - QString fileBase = pixmapDir + "/toolbar/"; + TQString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); + TQString fileBase = pixmapDir + "/toolbar/"; if (menuSize) fileBase += "menu-"; fileBase += name; - if (QFile(fileBase + ".png").exists()) { - return new QCanvasPixmap(fileBase + ".png"); - } else if (QFile(fileBase + ".xpm").exists()) { - return new QCanvasPixmap(fileBase + ".xpm"); + if (TQFile(fileBase + ".png").exists()) { + return new TQCanvasPixmap(fileBase + ".png"); + } else if (TQFile(fileBase + ".xpm").exists()) { + return new TQCanvasPixmap(fileBase + ".xpm"); } else if (menuSize) { return makeToolbarPixmap(name, false); } else { // this will fail, but we don't want to return a null pointer - return new QCanvasPixmap(fileBase + ".png"); + return new TQCanvasPixmap(fileBase + ".png"); } } -QCanvasPixmap* +TQCanvasPixmap* NotePixmapFactory::makeNoteMenuPixmap(timeT duration, timeT &errorReturn) { @@ -1965,14 +1965,14 @@ NotePixmapFactory::makeNoteMenuPixmap(timeT duration, } } - QString noteName = NotationStrings::getReferenceName(nearestNote); + TQString noteName = NotationStrings::getReferenceName(nearestNote); if (triplet) noteName = "3-" + noteName; noteName = "menu-" + noteName; return makeToolbarPixmap(noteName); } -QCanvasPixmap * +TQCanvasPixmap * NotePixmapFactory::makeMarkMenuPixmap(Mark mark) { if (mark == Marks::Sforzando || @@ -1995,7 +1995,7 @@ NotePixmapFactory::makeMarkMenuPixmap(Mark mark) } } -QCanvasPixmap* +TQCanvasPixmap* NotePixmapFactory::makeKeyPixmap(const Key &key, const Clef &clef, Key previousKey) @@ -2090,10 +2090,10 @@ NotePixmapFactory::makeKeyPixmap(const Key &key, return makeCanvasPixmap(m_pointZero); } -QCanvasPixmap* +TQCanvasPixmap* NotePixmapFactory::makeClefDisplayPixmap(const Clef &clef) { - QCanvasPixmap* clefPixmap = makeClefPixmap(clef); + TQCanvasPixmap* clefPixmap = makeClefPixmap(clef); int lw = getLineSpacing(); int width = clefPixmap->width() + 6 * getNoteBodyWidth(); @@ -2115,7 +2115,7 @@ NotePixmapFactory::makeClefDisplayPixmap(const Clef &clef) return makeCanvasPixmap(m_pointZero); } -QCanvasPixmap* +TQCanvasPixmap* NotePixmapFactory::makeKeyDisplayPixmap(const Key &key, const Clef &clef) { std::vector<int> ah = key.getAccidentalHeights(clef); @@ -2124,9 +2124,9 @@ NotePixmapFactory::makeKeyDisplayPixmap(const Key &key, const Clef &clef) NoteCharacterNames::SHARP : NoteCharacterNames::FLAT); - QCanvasPixmap* clefPixmap = makeClefPixmap(clef); - QPixmap accidentalPixmap(*m_font->getCharacter(charName).getPixmap()); - QPoint hotspot(m_font->getHotspot(charName)); + TQCanvasPixmap* clefPixmap = makeClefPixmap(clef); + TQPixmap accidentalPixmap(*m_font->getCharacter(charName).getPixmap()); + TQPoint hotspot(m_font->getHotspot(charName)); int lw = getLineSpacing(); int delta = accidentalPixmap.width() - hotspot.x(); @@ -2176,7 +2176,7 @@ NotePixmapFactory::getClefAndKeyWidth(const Key &key, const Clef &clef) return width; } -QCanvasPixmap* +TQCanvasPixmap* NotePixmapFactory::makeTrackHeaderPixmap( int width, int height, TrackHeader *header) { @@ -2188,14 +2188,14 @@ NotePixmapFactory::makeTrackHeaderPixmap( int lw = getLineSpacing(); int h; - QColor colour; + TQColor colour; int maxDelta = getAccidentalWidth(Sharp); // Staff Y position inside the whole header int offset = (height - 10 * lw -1) / 2; // Draw staff lines - m_p->painter().setPen(QPen(Qt::black, getStaffLineThickness())); + m_p->painter().setPen(TQPen(Qt::black, getStaffLineThickness())); for (h = 0; h <= 8; h += 2) { int y = (lw * 3) + ((8 - h) * lw) / 2; m_p->drawLine(maxDelta/2, y + offset, m_generatedWidth - maxDelta/2, y + offset); @@ -2228,8 +2228,8 @@ NotePixmapFactory::makeTrackHeaderPixmap( else if (adjustedOctave < 8) adjustedOctave++; - QString text = QString("%1").arg(adjustedOctave); - QRect rect = m_clefOttavaFontMetrics.boundingRect(text); + TQString text = TQString("%1").arg(adjustedOctave); + TQRect rect = m_clefOttavaFontMetrics.boundingRect(text); m_p->painter().setPen(colour); @@ -2258,7 +2258,7 @@ NotePixmapFactory::makeTrackHeaderPixmap( NoteCharacter accident = m_font->getCharacterColoured(charName, hue, val, NoteFont::Screen, false); - QPoint hotspot(m_font->getHotspot(charName)); + TQPoint hotspot(m_font->getHotspot(charName)); int delta = accident.getWidth() - hotspot.x(); int x = clefChar.getWidth() + maxDelta; @@ -2275,14 +2275,14 @@ NotePixmapFactory::makeTrackHeaderPixmap( m_p->painter().setFont(m_trackHeaderFont); // m_p->maskPainter().setFont(m_trackHeaderFont); - QString text; - QString textLine; + TQString text; + TQString textLine; int charHeight = m_trackHeaderFontMetrics.height(); int charWidth = m_trackHeaderFontMetrics.maxWidth(); - const QString transposeText = header->getTransposeText(); - QRect bounds = m_trackHeaderBoldFontMetrics.boundingRect(transposeText); + const TQString transposeText = header->getTransposeText(); + TQRect bounds = m_trackHeaderBoldFontMetrics.boundingRect(transposeText); int transposeWidth = bounds.width(); @@ -2338,7 +2338,7 @@ NotePixmapFactory::makeTrackHeaderPixmap( int lowerTextY = m_generatedHeight - 4 // -4 : adjust - (numberOfTextLines - l) * getTrackHeaderTextLineSpacing(); - QString textLine = getOneLine(text, width - charWidth / 2); + TQString textLine = getOneLine(text, width - charWidth / 2); if (textLine.isEmpty()) break; if ((l == numberOfTextLines) && !text.isEmpty()) { @@ -2363,9 +2363,9 @@ NotePixmapFactory::getTrackHeaderNTL(int height) } int -NotePixmapFactory::getTrackHeaderTextWidth(QString str) +NotePixmapFactory::getTrackHeaderTextWidth(TQString str) { - QRect bounds = m_trackHeaderFontMetrics.boundingRect(str); + TQRect bounds = m_trackHeaderFontMetrics.boundingRect(str); return bounds.width(); } @@ -2377,17 +2377,17 @@ NotePixmapFactory::getTrackHeaderTextLineSpacing() } QString -NotePixmapFactory::getOneLine(QString &text, int width) +NotePixmapFactory::getOneLine(TQString &text, int width) { - QString str; + TQString str; int n; // Immediately stop if string is empty or only contains white spaces ... - if (text.stripWhiteSpace().isEmpty()) return QString(""); + if (text.stripWhiteSpace().isEmpty()) return TQString(""); // ... or if width is too small. if (width < m_trackHeaderFontMetrics.boundingRect(text.left(1)).width()) - return QString(""); + return TQString(""); // Get a first approx. string length int totalLength = text.length(); @@ -2399,7 +2399,7 @@ NotePixmapFactory::getOneLine(QString &text, int width) if (n == 0) { str = text; - text = QString(""); + text = TQString(""); } else { str = text.left(n); text.remove(0, n); @@ -2408,7 +2408,7 @@ NotePixmapFactory::getOneLine(QString &text, int width) return str; } -QCanvasPixmap* +TQCanvasPixmap* NotePixmapFactory::makePitchDisplayPixmap(int p, const Clef &clef, bool useSharps) { @@ -2418,7 +2418,7 @@ NotePixmapFactory::makePitchDisplayPixmap(int p, const Clef &clef, Accidental accidental(pitch.getAccidental(useSharps)); NotePixmapParameters params(Note::Crotchet, 0, accidental); - QCanvasPixmap* clefPixmap = makeClefPixmap(clef); + TQCanvasPixmap* clefPixmap = makeClefPixmap(clef); int lw = getLineSpacing(); int width = getClefWidth(Clef::Bass) + 10 * getNoteBodyWidth(); @@ -2438,7 +2438,7 @@ NotePixmapFactory::makePitchDisplayPixmap(int p, const Clef &clef, params.setIsOnLine(h % 2 == 0); params.setSelected(m_selected); - QCanvasPixmap *notePixmap = makeNotePixmap(params); + TQCanvasPixmap *notePixmap = makeNotePixmap(params); int pixmapHeight = lw * 12 + 1; int yoffset = lw * 3; @@ -2473,7 +2473,7 @@ NotePixmapFactory::makePitchDisplayPixmap(int p, const Clef &clef, return makeCanvasPixmap(m_pointZero); } -QCanvasPixmap* +TQCanvasPixmap* NotePixmapFactory::makePitchDisplayPixmap(int p, const Clef &clef, int octave, int step) { @@ -2483,7 +2483,7 @@ NotePixmapFactory::makePitchDisplayPixmap(int p, const Clef &clef, Accidental accidental = pitch.getDisplayAccidental(Key("C major")); NotePixmapParameters params(Note::Crotchet, 0, accidental); - QCanvasPixmap* clefPixmap = makeClefPixmap(clef); + TQCanvasPixmap* clefPixmap = makeClefPixmap(clef); int lw = getLineSpacing(); int width = getClefWidth(Clef::Bass) + 10 * getNoteBodyWidth(); @@ -2505,7 +2505,7 @@ NotePixmapFactory::makePitchDisplayPixmap(int p, const Clef &clef, params.setIsOnLine(h % 2 == 0); params.setSelected(m_selected); - QCanvasPixmap *notePixmap = makeNotePixmap(params); + TQCanvasPixmap *notePixmap = makeNotePixmap(params); int pixmapHeight = lw * 12 + 1; int yoffset = lw * 3; @@ -2540,17 +2540,17 @@ NotePixmapFactory::makePitchDisplayPixmap(int p, const Clef &clef, return makeCanvasPixmap(m_pointZero); } -QCanvasPixmap* +TQCanvasPixmap* NotePixmapFactory::makeHairpinPixmap(int length, bool isCrescendo) { Profiler profiler("NotePixmapFactory::makeHairpinPixmap"); drawHairpinAux(length, isCrescendo, 0, 0, 0); - return makeCanvasPixmap(QPoint(0, m_generatedHeight / 2)); + return makeCanvasPixmap(TQPoint(0, m_generatedHeight / 2)); } void NotePixmapFactory::drawHairpin(int length, bool isCrescendo, - QPainter &painter, int x, int y) + TQPainter &painter, int x, int y) { Profiler profiler("NotePixmapFactory::drawHairpin"); m_inPrinterMethod = true; @@ -2560,7 +2560,7 @@ NotePixmapFactory::drawHairpin(int length, bool isCrescendo, void NotePixmapFactory::drawHairpinAux(int length, bool isCrescendo, - QPainter *painter, int x, int y) + TQPainter *painter, int x, int y) { int nbh = getNoteBodyHeight(); int nbw = getNoteBodyWidth(); @@ -2610,7 +2610,7 @@ NotePixmapFactory::drawHairpinAux(int length, bool isCrescendo, } } -QCanvasPixmap* +TQCanvasPixmap* NotePixmapFactory::makeSlurPixmap(int length, int dy, bool above, bool phrasing) { Profiler profiler("NotePixmapFactory::makeSlurPixmap"); @@ -2619,7 +2619,7 @@ NotePixmapFactory::makeSlurPixmap(int length, int dy, bool above, bool phrasing) // sizing so that any horizontal part was rescaled down to exactly // 1 pixel wide instead of blurring bool smooth = m_font->isSmooth() && getNoteBodyHeight() > 5; - QPoint hotspot; + TQPoint hotspot; if (length < getNoteBodyWidth()*2) length = getNoteBodyWidth() * 2; drawSlurAux(length, dy, above, smooth, false, phrasing, hotspot, 0, 0, 0); @@ -2628,22 +2628,22 @@ NotePixmapFactory::makeSlurPixmap(int length, int dy, bool above, bool phrasing) if (smooth) { - QImage i = m_generatedPixmap->convertToImage(); + TQImage i = m_generatedPixmap->convertToImage(); if (i.depth() == 1) i = i.convertDepth(32); i = i.smoothScale(i.width() / 2, i.height() / 2); delete m_generatedPixmap; delete m_generatedMask; - QPixmap newPixmap(i); - QCanvasPixmap *p = new QCanvasPixmap(newPixmap, hotspot); + TQPixmap newPixmap(i); + TQCanvasPixmap *p = new TQCanvasPixmap(newPixmap, hotspot); p->setMask(PixmapFunctions::generateMask(newPixmap, Qt::white.rgb())); return p; } else { - QCanvasPixmap *p = new QCanvasPixmap(*m_generatedPixmap, hotspot); + TQCanvasPixmap *p = new TQCanvasPixmap(*m_generatedPixmap, hotspot); p->setMask(PixmapFunctions::generateMask(*m_generatedPixmap, Qt::white.rgb())); delete m_generatedPixmap; @@ -2654,10 +2654,10 @@ NotePixmapFactory::makeSlurPixmap(int length, int dy, bool above, bool phrasing) void NotePixmapFactory::drawSlur(int length, int dy, bool above, bool phrasing, - QPainter &painter, int x, int y) + TQPainter &painter, int x, int y) { Profiler profiler("NotePixmapFactory::drawSlur"); - QPoint hotspot; + TQPoint hotspot; m_inPrinterMethod = true; if (length < getNoteBodyWidth()*2) length = getNoteBodyWidth() * 2; @@ -2668,10 +2668,10 @@ NotePixmapFactory::drawSlur(int length, int dy, bool above, bool phrasing, void NotePixmapFactory::drawSlurAux(int length, int dy, bool above, bool smooth, bool flat, bool phrasing, - QPoint &hotspot, QPainter *painter, int x, int y) + TQPoint &hotspot, TQPainter *painter, int x, int y) { - QWMatrix::TransformationMode mode = QWMatrix::transformationMode(); - QWMatrix::setTransformationMode(QWMatrix::Points); + TQWMatrix::TransformationMode mode = TQWMatrix::transformationMode(); + TQWMatrix::setTransformationMode(TQWMatrix::Points); int thickness = getStaffLineThickness() * 2; if (phrasing) @@ -2707,7 +2707,7 @@ NotePixmapFactory::drawSlurAux(int length, int dy, bool above, my = -my; bool havePixmap = false; - QPoint topLeft, bottomRight; + TQPoint topLeft, bottomRight; if (smooth) thickness += 2; @@ -2717,31 +2717,31 @@ NotePixmapFactory::drawSlurAux(int length, int dy, bool above, Spline::PointList pl; if (!phrasing) { - pl.push_back(QPoint(length / 6, my)); - pl.push_back(QPoint(length - length / 6, my)); + pl.push_back(TQPoint(length / 6, my)); + pl.push_back(TQPoint(length - length / 6, my)); } else { - pl.push_back(QPoint(abs(my) / 4, my / 3)); - pl.push_back(QPoint(length / 6, my)); + pl.push_back(TQPoint(abs(my) / 4, my / 3)); + pl.push_back(TQPoint(length / 6, my)); if (theta > 1) { - pl.push_back(QPoint(length * 3 / 8, my * 3 / 2)); + pl.push_back(TQPoint(length * 3 / 8, my * 3 / 2)); } else if (theta < -1) { - pl.push_back(QPoint(length * 5 / 8, my * 3 / 2)); + pl.push_back(TQPoint(length * 5 / 8, my * 3 / 2)); } else { - pl.push_back(QPoint(length / 2, my * 4 / 3)); + pl.push_back(TQPoint(length / 2, my * 4 / 3)); } - pl.push_back(QPoint(length - length / 6, my)); - pl.push_back(QPoint(length - abs(my) / 4, my / 3)); + pl.push_back(TQPoint(length - length / 6, my)); + pl.push_back(TQPoint(length - abs(my) / 4, my / 3)); } Spline::PointList *polyPoints = Spline::calculate - (QPoint(0, y0), QPoint(length - 1, y0), pl, topLeft, bottomRight); + (TQPoint(0, y0), TQPoint(length - 1, y0), pl, topLeft, bottomRight); if (!havePixmap) { int width = bottomRight.x() - topLeft.x(); int height = bottomRight.y() - topLeft.y() + thickness - 1 + abs(dy); - hotspot = QPoint(0, -topLeft.y() + (dy < 0 ? -dy : 0)); + hotspot = TQPoint(0, -topLeft.y() + (dy < 0 ? -dy : 0)); // NOTATION_DEBUG << "slur: bottomRight (" << bottomRight.x() << "," << bottomRight.y() << "), topLeft (" << topLeft.x() << "," << topLeft.y() << "), width " << width << ", height " << height << ", hotspot (" << hotspot.x() << "," << hotspot.y() << "), dy " << dy << ", thickness " << thickness << endl; @@ -2773,7 +2773,7 @@ NotePixmapFactory::drawSlurAux(int length, int dy, bool above, smooth ? height*2 + thickness*2 : height + thickness, width, height); - QWMatrix m; + TQWMatrix m; if (smooth) m.translate(2 * hotspot.x(), 2 * hotspot.y()); else @@ -2800,7 +2800,7 @@ NotePixmapFactory::drawSlurAux(int length, int dy, bool above, } */ int ppc = polyPoints->size(); - QPointArray qp(ppc); + TQPointArray qp(ppc); for (int j = 0; j < ppc; ++j) { qp.setPoint(j, (*polyPoints)[j].x(), (*polyPoints)[j].y()); @@ -2838,7 +2838,7 @@ NotePixmapFactory::drawSlurAux(int length, int dy, bool above, m_p->painter().setPen(Qt::black); } - QWMatrix::setTransformationMode(mode); + TQWMatrix::setTransformationMode(mode); if (painter) { painter->restore(); @@ -2847,18 +2847,18 @@ NotePixmapFactory::drawSlurAux(int length, int dy, bool above, } } -QCanvasPixmap* +TQCanvasPixmap* NotePixmapFactory::makeOttavaPixmap(int length, int octavesUp) { Profiler profiler("NotePixmapFactory::makeOttavaPixmap"); m_inPrinterMethod = false; drawOttavaAux(length, octavesUp, 0, 0, 0); - return makeCanvasPixmap(QPoint(0, m_generatedHeight - 1)); + return makeCanvasPixmap(TQPoint(0, m_generatedHeight - 1)); } void NotePixmapFactory::drawOttava(int length, int octavesUp, - QPainter &painter, int x, int y) + TQPainter &painter, int x, int y) { Profiler profiler("NotePixmapFactory::drawOttava"); m_inPrinterMethod = true; @@ -2868,12 +2868,12 @@ NotePixmapFactory::drawOttava(int length, int octavesUp, void NotePixmapFactory::drawOttavaAux(int length, int octavesUp, - QPainter *painter, int x, int y) + TQPainter *painter, int x, int y) { int height = m_ottavaFontMetrics.height(); int backpedal = 0; - QString label; - QRect r; + TQString label; + TQRect r; if (octavesUp == 2 || octavesUp == -2) { label = "15ma "; @@ -2895,7 +2895,7 @@ NotePixmapFactory::drawOttavaAux(int length, int octavesUp, } int thickness = getStemThickness(); - QPen pen(Qt::black, thickness, Qt::DotLine); + TQPen pen(Qt::black, thickness, Qt::DotLine); if (m_selected) { m_p->painter().setPen(GUIPalette::getColour(GUIPalette::SelectedElement)); @@ -2931,9 +2931,9 @@ NotePixmapFactory::drawOttavaAux(int length, int octavesUp, m_p->drawLine(x1, y0, x1, y1); - m_p->painter().setPen(QPen()); + m_p->painter().setPen(TQPen()); if (!m_inPrinterMethod) - m_p->maskPainter().setPen(QPen()); + m_p->maskPainter().setPen(TQPen()); if (painter) { painter->restore(); @@ -2962,13 +2962,13 @@ NotePixmapFactory::drawBracket(int length, bool left, bool curly, int x, int y) if (left) moff = -moff; - QPoint topLeft, bottomRight; + TQPoint topLeft, bottomRight; for (int i = 0; i < thickness; ++i) { Spline::PointList pl; - pl.push_back(QPoint((int)moff, m1)); - pl.push_back(QPoint((int)moff, m2)); + pl.push_back(TQPoint((int)moff, m1)); + pl.push_back(TQPoint((int)moff, m2)); /* NOTATION_DEBUG << "bracket spline controls: " << moff << "," << m1 << ", " << moff << "," << m2 << "; end points " @@ -2976,10 +2976,10 @@ NotePixmapFactory::drawBracket(int length, bool left, bool curly, int x, int y) << endl; */ Spline::PointList *polyPoints = Spline::calculate - (QPoint(off0, 0), QPoint(off0, length - 1), pl, topLeft, bottomRight); + (TQPoint(off0, 0), TQPoint(off0, length - 1), pl, topLeft, bottomRight); int ppc = polyPoints->size(); - QPointArray qp(ppc); + TQPointArray qp(ppc); /* NOTATION_DEBUG << "bracket spline polypoints: " << endl; for (int j = 0; j < ppc; ++j) { @@ -3007,7 +3007,7 @@ NotePixmapFactory::drawBracket(int length, bool left, bool curly, int x, int y) } } -QCanvasPixmap* +TQCanvasPixmap* NotePixmapFactory::makeTimeSigPixmap(const TimeSignature& sig) { Profiler profiler("NotePixmapFactory::makeTimeSigPixmap"); @@ -3026,11 +3026,11 @@ NotePixmapFactory::makeTimeSigPixmap(const TimeSignature& sig) if (getCharacter(charName, character, PlainColour, false)) { createPixmapAndMask(character.getWidth(), character.getHeight()); m_p->drawNoteCharacter(0, 0, character); - return makeCanvasPixmap(QPoint(0, character.getHeight() / 2)); + return makeCanvasPixmap(TQPoint(0, character.getHeight() / 2)); } - QString c("c"); - QRect r = m_bigTimeSigFontMetrics.boundingRect(c); + TQString c("c"); + TQRect r = m_bigTimeSigFontMetrics.boundingRect(c); int dy = getLineSpacing() / 4; createPixmapAndMask(r.width(), r.height() + dy*2); @@ -3057,14 +3057,14 @@ NotePixmapFactory::makeTimeSigPixmap(const TimeSignature& sig) } m_p->painter().setPen(Qt::black); - return makeCanvasPixmap(QPoint(0, r.height() / 2 + dy)); + return makeCanvasPixmap(TQPoint(0, r.height() / 2 + dy)); } else { int numerator = sig.getNumerator(), denominator = sig.getDenominator(); - QString numS, denomS; + TQString numS, denomS; numS.setNum(numerator); denomS.setNum(denominator); @@ -3104,11 +3104,11 @@ NotePixmapFactory::makeTimeSigPixmap(const TimeSignature& sig) denominator /= 10; } - return makeCanvasPixmap(QPoint(0, height / 2)); + return makeCanvasPixmap(TQPoint(0, height / 2)); } - QRect numR = m_timeSigFontMetrics.boundingRect(numS); - QRect denomR = m_timeSigFontMetrics.boundingRect(denomS); + TQRect numR = m_timeSigFontMetrics.boundingRect(numS); + TQRect denomR = m_timeSigFontMetrics.boundingRect(denomS); int width = std::max(numR.width(), denomR.width()) + 2; int x; @@ -3132,7 +3132,7 @@ NotePixmapFactory::makeTimeSigPixmap(const TimeSignature& sig) m_p->painter().setPen(Qt::black); - return makeCanvasPixmap(QPoint(0, denomR.height() + + return makeCanvasPixmap(TQPoint(0, denomR.height() + (getNoteBodyHeight() / 4) - 1), true); } @@ -3142,7 +3142,7 @@ int NotePixmapFactory::getTimeSigWidth(const TimeSignature &sig) const { if (sig.isCommon()) { - QRect r(m_bigTimeSigFontMetrics.boundingRect("c")); + TQRect r(m_bigTimeSigFontMetrics.boundingRect("c")); return r.width() + 2; } else { @@ -3150,13 +3150,13 @@ int NotePixmapFactory::getTimeSigWidth(const TimeSignature &sig) const int numerator = sig.getNumerator(), denominator = sig.getDenominator(); - QString numS, denomS; + TQString numS, denomS; numS.setNum(numerator); denomS.setNum(denominator); - QRect numR = m_timeSigFontMetrics.boundingRect(numS); - QRect denomR = m_timeSigFontMetrics.boundingRect(denomS); + TQRect numR = m_timeSigFontMetrics.boundingRect(numS); + TQRect denomR = m_timeSigFontMetrics.boundingRect(denomS); int width = std::max(numR.width(), denomR.width()) + 2; return width; @@ -3189,7 +3189,7 @@ NotePixmapFactory::getTextFont(const Text &text) const * LilyPondDirective: Very small sans-serif, in a green box */ - int weight = QFont::Normal; + int weight = TQFont::Normal; bool italic = false; bool large = false; bool tiny = false; @@ -3199,7 +3199,7 @@ NotePixmapFactory::getTextFont(const Text &text) const type == Text::LocalTempo || type == Text::LocalDirection || type == Text::Chord) { - weight = QFont::Bold; + weight = TQFont::Bold; } if (type == Text::Dynamic || @@ -3221,18 +3221,18 @@ NotePixmapFactory::getTextFont(const Text &text) const KConfig* config = kapp->config(); - QFont textFont; + TQFont textFont; if (serif) { - textFont = QFont(defaultSerifFontFamily); + textFont = TQFont(defaultSerifFontFamily); textFont = config->readFontEntry("textfont", &textFont); } else { - textFont = QFont(defaultSansSerifFontFamily); + textFont = TQFont(defaultSansSerifFontFamily); textFont = config->readFontEntry("sansfont", &textFont); } - textFont.setStyleStrategy(QFont::StyleStrategy(QFont::PreferDefault | - QFont::PreferMatch)); + textFont.setStyleStrategy(TQFont::StyleStrategy(TQFont::PreferDefault | + TQFont::PreferMatch)); int size; if (large) @@ -3245,7 +3245,7 @@ NotePixmapFactory::getTextFont(const Text &text) const size = (getLineSpacing() * 3) / 2; textFont.setPixelSize(size); - textFont.setStyleHint(serif ? QFont::Serif : QFont::SansSerif); + textFont.setStyleHint(serif ? TQFont::Serif : TQFont::SansSerif); textFont.setWeight(weight); textFont.setItalic(italic); @@ -3260,7 +3260,7 @@ NotePixmapFactory::getTextFont(const Text &text) const return textFont; } -QCanvasPixmap* +TQCanvasPixmap* NotePixmapFactory::makeTextPixmap(const Text &text) { Profiler profiler("NotePixmapFactory::makeTextPixmap"); @@ -3273,10 +3273,10 @@ NotePixmapFactory::makeTextPixmap(const Text &text) } drawTextAux(text, 0, 0, 0); - return makeCanvasPixmap(QPoint(2, 2), true); + return makeCanvasPixmap(TQPoint(2, 2), true); } -QCanvasPixmap* +TQCanvasPixmap* NotePixmapFactory::makeGuitarChordPixmap(const Guitar::Fingering &fingering, int x, int y) @@ -3300,12 +3300,12 @@ NotePixmapFactory::makeGuitarChordPixmap(const Guitar::Fingering &fingering, Guitar::NoteSymbols ns(Guitar::Fingering::DEFAULT_NB_STRINGS, FingeringBox::DEFAULT_NB_DISPLAYED_FRETS); Guitar::NoteSymbols::drawFingeringPixmap(fingering, ns, &(m_p->painter())); - return makeCanvasPixmap(QPoint (x, y), true); + return makeCanvasPixmap(TQPoint (x, y), true); } void NotePixmapFactory::drawText(const Text &text, - QPainter &painter, int x, int y) + TQPainter &painter, int x, int y) { Profiler profiler("NotePixmapFactory::drawText"); @@ -3316,7 +3316,7 @@ NotePixmapFactory::drawText(const Text &text, if (type == Text::Annotation || type == Text::LilyPondDirective) { - QCanvasPixmap *map = makeAnnotationPixmap(text, (type == Text::LilyPondDirective)); + TQCanvasPixmap *map = makeAnnotationPixmap(text, (type == Text::LilyPondDirective)); painter.drawPixmap(x, y, *map); return ; } @@ -3328,11 +3328,11 @@ NotePixmapFactory::drawText(const Text &text, void NotePixmapFactory::drawTextAux(const Text &text, - QPainter *painter, int x, int y) + TQPainter *painter, int x, int y) { - QString s(strtoqstr(text.getText())); - QFont textFont(getTextFont(text)); - QFontMetrics textMetrics(textFont); + TQString s(strtoqstr(text.getText())); + TQFont textFont(getTextFont(text)); + TQFontMetrics textMetrics(textFont); int offset = 2; int width = textMetrics.width(s) + 2 * offset; @@ -3364,19 +3364,19 @@ NotePixmapFactory::drawTextAux(const Text &text, } } -QCanvasPixmap* +TQCanvasPixmap* NotePixmapFactory::makeAnnotationPixmap(const Text &text) { return makeAnnotationPixmap(text, false); } -QCanvasPixmap* +TQCanvasPixmap* NotePixmapFactory::makeAnnotationPixmap(const Text &text, const bool isLilyPondDirective) { - QString s(strtoqstr(text.getText())); + TQString s(strtoqstr(text.getText())); - QFont textFont(getTextFont(text)); - QFontMetrics textMetrics(textFont); + TQFont textFont(getTextFont(text)); + TQFontMetrics textMetrics(textFont); int annotationWidth = getLineSpacing() * 16; int annotationHeight = getLineSpacing() * 6; @@ -3385,7 +3385,7 @@ NotePixmapFactory::makeAnnotationPixmap(const Text &text, const bool isLilyPondD int bottomGap = getLineSpacing() / 3 + 1; int sideGap = getLineSpacing() / 4 + 1; - QRect r = textMetrics.boundingRect + TQRect r = textMetrics.boundingRect (0, 0, annotationWidth, annotationHeight, Qt::WordBreak, s); int pixmapWidth = r.width() + sideGap * 2; @@ -3411,18 +3411,18 @@ NotePixmapFactory::makeAnnotationPixmap(const Text &text, const bool isLilyPondD m_p->drawRect(0, 0, pixmapWidth, pixmapHeight); m_p->painter().setBrush(Qt::black); - m_p->painter().drawText(QRect(sideGap, topGap, + m_p->painter().drawText(TQRect(sideGap, topGap, annotationWidth + sideGap, pixmapHeight - bottomGap), Qt::WordBreak, s); /* unnecessary following the rectangle draw - m_pm.drawText(QRect(sideGap, topGap, + m_pm.drawText(TQRect(sideGap, topGap, annotationWidth + sideGap, annotationHeight + topGap), Qt::WordBreak, s); */ - return makeCanvasPixmap(QPoint(0, 0)); + return makeCanvasPixmap(TQPoint(0, 0)); } void @@ -3436,8 +3436,8 @@ NotePixmapFactory::createPixmapAndMask(int width, int height, m_generatedWidth = width; m_generatedHeight = height; - m_generatedPixmap = new QPixmap(width, height); - m_generatedMask = new QBitmap(maskWidth, maskHeight); + m_generatedPixmap = new TQPixmap(width, height); + m_generatedMask = new TQBitmap(maskWidth, maskHeight); static unsigned long total = 0; total += width * height; @@ -3456,12 +3456,12 @@ NotePixmapFactory::createPixmapAndMask(int width, int height, m_p->maskPainter().setBrush(Qt::white); } -QCanvasPixmap* -NotePixmapFactory::makeCanvasPixmap(QPoint hotspot, bool generateMask) +TQCanvasPixmap* +NotePixmapFactory::makeCanvasPixmap(TQPoint hotspot, bool generateMask) { m_p->end(); - QCanvasPixmap* p = new QCanvasPixmap(*m_generatedPixmap, hotspot); + TQCanvasPixmap* p = new TQCanvasPixmap(*m_generatedPixmap, hotspot); if (generateMask) { p->setMask(PixmapFunctions::generateMask(*p)); @@ -3682,7 +3682,7 @@ int NotePixmapFactory::getKeyWidth(const Key &key, int NotePixmapFactory::getTextWidth(const Text &text) const { - QFontMetrics metrics(getTextFont(text)); + TQFontMetrics metrics(getTextFont(text)); return metrics.boundingRect(strtoqstr(text.getText())).width() + 4; } diff --git a/src/gui/editors/notation/NotePixmapFactory.h b/src/gui/editors/notation/NotePixmapFactory.h index 14b4773..20d2ae6 100644 --- a/src/gui/editors/notation/NotePixmapFactory.h +++ b/src/gui/editors/notation/NotePixmapFactory.h @@ -29,17 +29,17 @@ #include <map> #include "NoteCharacter.h" #include <string> -#include <qfont.h> -#include <qfontmetrics.h> -#include <qpixmap.h> -#include <qpoint.h> +#include <tqfont.h> +#include <tqfontmetrics.h> +#include <tqpixmap.h> +#include <tqpoint.h> #include "base/Event.h" #include "gui/editors/notation/NoteCharacterNames.h" -class QPainter; -class QCanvasPixmap; -class QBitmap; +class TQPainter; +class TQCanvasPixmap; +class TQBitmap; namespace Rosegarden @@ -83,61 +83,61 @@ public: // Display methods -- create canvas pixmaps: - QCanvasPixmap* makeNotePixmap(const NotePixmapParameters ¶meters); - QCanvasPixmap* makeRestPixmap(const NotePixmapParameters ¶meters); - QCanvasPixmap* makeClefPixmap(const Clef &clef); - QCanvasPixmap* makeKeyPixmap(const Key &key, + TQCanvasPixmap* makeNotePixmap(const NotePixmapParameters ¶meters); + TQCanvasPixmap* makeRestPixmap(const NotePixmapParameters ¶meters); + TQCanvasPixmap* makeClefPixmap(const Clef &clef); + TQCanvasPixmap* makeKeyPixmap(const Key &key, const Clef &clef, Key previousKey = Key::DefaultKey); - QCanvasPixmap* makeTimeSigPixmap(const TimeSignature& sig); - QCanvasPixmap* makeHairpinPixmap(int length, bool isCrescendo); - QCanvasPixmap* makeSlurPixmap(int length, int dy, bool above, bool phrasing); - QCanvasPixmap* makeOttavaPixmap(int length, int octavesUp); - QCanvasPixmap* makePedalDownPixmap(); - QCanvasPixmap* makePedalUpPixmap(); - QCanvasPixmap* makeUnknownPixmap(); - QCanvasPixmap* makeTextPixmap(const Text &text); - QCanvasPixmap* makeGuitarChordPixmap(const Guitar::Fingering &fingering, + TQCanvasPixmap* makeTimeSigPixmap(const TimeSignature& sig); + TQCanvasPixmap* makeHairpinPixmap(int length, bool isCrescendo); + TQCanvasPixmap* makeSlurPixmap(int length, int dy, bool above, bool phrasing); + TQCanvasPixmap* makeOttavaPixmap(int length, int octavesUp); + TQCanvasPixmap* makePedalDownPixmap(); + TQCanvasPixmap* makePedalUpPixmap(); + TQCanvasPixmap* makeUnknownPixmap(); + TQCanvasPixmap* makeTextPixmap(const Text &text); + TQCanvasPixmap* makeGuitarChordPixmap(const Guitar::Fingering &fingering, int x, int y); - QCanvasPixmap* makeNoteHaloPixmap(const NotePixmapParameters ¶meters); + TQCanvasPixmap* makeNoteHaloPixmap(const NotePixmapParameters ¶meters); // Printing methods -- draw direct to a paint device: void drawNote(const NotePixmapParameters ¶meters, - QPainter &painter, int x, int y); + TQPainter &painter, int x, int y); void drawRest(const NotePixmapParameters ¶meters, - QPainter &painter, int x, int y); + TQPainter &painter, int x, int y); void drawHairpin(int length, bool isCrescendo, - QPainter &painter, int x, int y); + TQPainter &painter, int x, int y); void drawSlur(int length, int dy, bool above, bool phrasing, - QPainter &painter, int x, int y); + TQPainter &painter, int x, int y); void drawOttava(int length, int octavesUp, - QPainter &painter, int x, int y); + TQPainter &painter, int x, int y); void drawText(const Text &text, - QPainter &painter, int x, int y); + TQPainter &painter, int x, int y); // Other support methods for producing pixmaps for other contexts: - static QCanvasPixmap *makeToolbarPixmap(const char *name, + static TQCanvasPixmap *makeToolbarPixmap(const char *name, bool menuSize = false); - static QCanvasPixmap *makeNoteMenuPixmap(timeT duration, + static TQCanvasPixmap *makeNoteMenuPixmap(timeT duration, timeT &errorReturn); - static QCanvasPixmap *makeMarkMenuPixmap(Mark); + static TQCanvasPixmap *makeMarkMenuPixmap(Mark); - QCanvasPixmap* makePitchDisplayPixmap(int pitch, + TQCanvasPixmap* makePitchDisplayPixmap(int pitch, const Clef &clef, bool useSharps); - QCanvasPixmap* makePitchDisplayPixmap(int pitch, + TQCanvasPixmap* makePitchDisplayPixmap(int pitch, const Clef &clef, int octave, int step); - QCanvasPixmap* makeClefDisplayPixmap(const Clef &clef); - QCanvasPixmap* makeKeyDisplayPixmap(const Key &key, + TQCanvasPixmap* makeClefDisplayPixmap(const Clef &clef); + TQCanvasPixmap* makeKeyDisplayPixmap(const Key &key, const Clef &clef); - QCanvasPixmap* makeTrackHeaderPixmap(int width, int height, + TQCanvasPixmap* makeTrackHeaderPixmap(int width, int height, TrackHeader *header); // Bounding box and other geometry methods: @@ -183,7 +183,7 @@ public: /** * Returns the width of a text string written in a track header. */ - int getTrackHeaderTextWidth(QString str); + int getTrackHeaderTextWidth(TQString str); /** * Returns the spacing of a text lines written in a track header. @@ -195,19 +195,19 @@ public: * "width" (when written with m_trackHeaderFont) and removes it * from "text". */ - QString getOneLine(QString &text, int width); + TQString getOneLine(TQString &text, int width); /** * We need this function because as of Qt 3.1, QCanvasPixmap - * is no longer copyable by value, while QPixmap still is. + * is no longer copyable by value, while TQPixmap still is. * - * So all the makeXXPixmap are now returning QCanvasPixmap* - * instead of QCanvasPixmap, but we need an easy way to - * convert them to QPixmap, since we use them that + * So all the makeXXPixmap are now returning TQCanvasPixmap* + * instead of TQCanvasPixmap, but we need an easy way to + * convert them to TQPixmap, since we use them that * way quite often (to generate toolbar button icons for instance). */ - static QPixmap toQPixmap(QCanvasPixmap*); + static TQPixmap toQPixmap(TQCanvasPixmap*); static void dumpStats(std::ostream &); @@ -221,18 +221,18 @@ protected: void initMaybe() { if (!m_font) init("", -1); } void drawNoteAux(const NotePixmapParameters ¶meters, - QPainter *painter, int x, int y); - void drawRestAux(const NotePixmapParameters ¶meters, QPoint &hotspot, - QPainter *painter, int x, int y); + TQPainter *painter, int x, int y); + void drawRestAux(const NotePixmapParameters ¶meters, TQPoint &hotspot, + TQPainter *painter, int x, int y); void drawHairpinAux(int length, bool isCrescendo, - QPainter *painter, int x, int y); + TQPainter *painter, int x, int y); void drawSlurAux(int length, int dy, bool above, bool smooth, bool tie, bool phrasing, - QPoint &hotspot, - QPainter *painter, int x, int y); + TQPoint &hotspot, + TQPainter *painter, int x, int y); void drawOttavaAux(int length, int octavesUp, - QPainter *painter, int x, int y); + TQPainter *painter, int x, int y); void drawTextAux(const Text &text, - QPainter *painter, int x, int y); + TQPainter *painter, int x, int y); int getStemLength(const NotePixmapParameters &) const; @@ -247,18 +247,18 @@ protected: void makeRoomForStemAndFlags(int flagCount, int stemLength, const NotePixmapParameters ¶ms, - QPoint &startPoint, QPoint &endPoint); + TQPoint &startPoint, TQPoint &endPoint); void drawFlags(int flagCount, const NotePixmapParameters ¶ms, - const QPoint &startPoint, const QPoint &endPoint); + const TQPoint &startPoint, const TQPoint &endPoint); void drawStem(const NotePixmapParameters ¶ms, - const QPoint &startPoint, const QPoint &endPoint, + const TQPoint &startPoint, const TQPoint &endPoint, int shortening); void makeRoomForBeams(const NotePixmapParameters ¶ms); - void drawBeams(const QPoint &, const NotePixmapParameters ¶ms, + void drawBeams(const TQPoint &, const NotePixmapParameters ¶ms, int beamCount); - void drawSlashes(const QPoint &, const NotePixmapParameters ¶ms, + void drawSlashes(const TQPoint &, const NotePixmapParameters ¶ms, int slashCount); void makeRoomForTuplingLine(const NotePixmapParameters ¶ms); @@ -270,15 +270,15 @@ protected: void drawBracket(int length, bool left, bool curly, int x, int y); - QFont getTextFont(const Text &text) const; + TQFont getTextFont(const Text &text) const; - QCanvasPixmap* makeAnnotationPixmap(const Text &text); - QCanvasPixmap* makeAnnotationPixmap(const Text &text, const bool isLilyPondDirective); + TQCanvasPixmap* makeAnnotationPixmap(const Text &text); + TQCanvasPixmap* makeAnnotationPixmap(const Text &text, const bool isLilyPondDirective); void createPixmapAndMask(int width, int height, int maskWidth = -1, int maskHeight = -1); - QCanvasPixmap* makeCanvasPixmap(QPoint hotspot, bool generateMask = false); + TQCanvasPixmap* makeCanvasPixmap(TQPoint hotspot, bool generateMask = false); enum ColourType { PlainColour, @@ -307,35 +307,35 @@ protected: int m_left, m_right, m_above, m_below; int m_borderX, m_borderY; - QFont m_tupletCountFont; - QFontMetrics m_tupletCountFontMetrics; + TQFont m_tupletCountFont; + TQFontMetrics m_tupletCountFontMetrics; - QFont m_textMarkFont; - QFontMetrics m_textMarkFontMetrics; + TQFont m_textMarkFont; + TQFontMetrics m_textMarkFontMetrics; - QFont m_fingeringFont; - QFontMetrics m_fingeringFontMetrics; + TQFont m_fingeringFont; + TQFontMetrics m_fingeringFontMetrics; - QFont m_timeSigFont; - QFontMetrics m_timeSigFontMetrics; + TQFont m_timeSigFont; + TQFontMetrics m_timeSigFontMetrics; - QFont m_bigTimeSigFont; - QFontMetrics m_bigTimeSigFontMetrics; + TQFont m_bigTimeSigFont; + TQFontMetrics m_bigTimeSigFontMetrics; - QFont m_ottavaFont; - QFontMetrics m_ottavaFontMetrics; + TQFont m_ottavaFont; + TQFontMetrics m_ottavaFontMetrics; - QFont m_clefOttavaFont; - QFontMetrics m_clefOttavaFontMetrics; + TQFont m_clefOttavaFont; + TQFontMetrics m_clefOttavaFontMetrics; - QFont m_trackHeaderFont; - QFontMetrics m_trackHeaderFontMetrics; + TQFont m_trackHeaderFont; + TQFontMetrics m_trackHeaderFontMetrics; - QFont m_trackHeaderBoldFont; - QFontMetrics m_trackHeaderBoldFontMetrics; + TQFont m_trackHeaderBoldFont; + TQFontMetrics m_trackHeaderBoldFontMetrics; - QPixmap *m_generatedPixmap; - QBitmap *m_generatedMask; + TQPixmap *m_generatedPixmap; + TQBitmap *m_generatedMask; int m_generatedWidth; int m_generatedHeight; @@ -345,10 +345,10 @@ protected: mutable NotePixmapCache *m_dottedRestCache; - typedef std::map<const char *, QFont> TextFontCache; + typedef std::map<const char *, TQFont> TextFontCache; mutable TextFontCache m_textFontCache; - static QPoint m_pointZero; + static TQPoint m_pointZero; }; diff --git a/src/gui/editors/notation/NotePixmapPainter.h b/src/gui/editors/notation/NotePixmapPainter.h index ed9d541..ff8edae 100644 --- a/src/gui/editors/notation/NotePixmapPainter.h +++ b/src/gui/editors/notation/NotePixmapPainter.h @@ -26,7 +26,7 @@ #ifndef _RG_NOTEPIXMAPPAINTER_H_ #define _RG_NOTEPIXMAPPAINTER_H_ -#include <qpainter.h> +#include <tqpainter.h> namespace Rosegarden { @@ -40,12 +40,12 @@ public: NotePixmapPainter() : m_painter(&m_myPainter) { } - void beginExternal(QPainter *painter) { + void beginExternal(TQPainter *painter) { m_externalPainter = painter; m_useMask = false; - painter->setPen(QPen(Qt::black, 1, Qt::SolidLine, + painter->setPen(TQPen(Qt::black, 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin)); if (m_externalPainter) { @@ -55,7 +55,7 @@ public: } } - bool begin(QPaintDevice *device, QPaintDevice *mask = 0, bool unclipped = false) { + bool begin(TQPaintDevice *device, TQPaintDevice *mask = 0, bool unclipped = false) { m_externalPainter = 0; @@ -75,11 +75,11 @@ public: return m_painter->end(); } - QPainter &painter() { + TQPainter &painter() { return *m_painter; } - QPainter &maskPainter() { + TQPainter &maskPainter() { return m_maskPainter; } @@ -103,24 +103,24 @@ public: if (m_useMask) m_maskPainter.drawArc(x, y, w, h, a, alen); } - void drawPolygon(const QPointArray &a, bool winding = false, + void drawPolygon(const TQPointArray &a, bool winding = false, int index = 0, int n = -1) { m_painter->drawPolygon(a, winding, index, n); if (m_useMask) m_maskPainter.drawPolygon(a, winding, index, n); } - void drawPolyline(const QPointArray &a, int index = 0, int n = -1) { + void drawPolyline(const TQPointArray &a, int index = 0, int n = -1) { m_painter->drawPolyline(a, index, n); if (m_useMask) m_maskPainter.drawPolyline(a, index, n); } - void drawPixmap(int x, int y, const QPixmap &pm, + void drawPixmap(int x, int y, const TQPixmap &pm, int sx = 0, int sy = 0, int sw = -1, int sh = -1) { m_painter->drawPixmap(x, y, pm, sx, sy, sw, sh); if (m_useMask) m_maskPainter.drawPixmap(x, y, *(pm.mask()), sx, sy, sw, sh); } - void drawText(int x, int y, const QString &string) { + void drawText(int x, int y, const TQString &string) { m_painter->drawText(x, y, string); if (m_useMask) m_maskPainter.drawText(x, y, string); } @@ -137,10 +137,10 @@ public: private: bool m_useMask; - QPainter m_myPainter; - QPainter m_maskPainter; - QPainter *m_externalPainter; - QPainter *m_painter; + TQPainter m_myPainter; + TQPainter m_maskPainter; + TQPainter *m_externalPainter; + TQPainter *m_painter; }; } diff --git a/src/gui/editors/notation/NoteStyleFactory.cpp b/src/gui/editors/notation/NoteStyleFactory.cpp index d4a8be8..f585117 100644 --- a/src/gui/editors/notation/NoteStyleFactory.cpp +++ b/src/gui/editors/notation/NoteStyleFactory.cpp @@ -33,10 +33,10 @@ #include "NoteStyle.h" #include "NoteStyleFileReader.h" #include <kglobal.h> -#include <qdir.h> -#include <qfileinfo.h> -#include <qstring.h> -#include <qstringlist.h> +#include <tqdir.h> +#include <tqfileinfo.h> +#include <tqstring.h> +#include <tqstringlist.h> namespace Rosegarden @@ -49,21 +49,21 @@ NoteStyleFactory::getAvailableStyleNames() { std::vector<NoteStyleName> names; - QString styleDir = KGlobal::dirs()->findResource("appdata", "styles/"); - QDir dir(styleDir); + TQString styleDir = KGlobal::dirs()->findResource("appdata", "styles/"); + TQDir dir(styleDir); if (!dir.exists()) { std::cerr << "NoteStyle::getAvailableStyleNames: directory \"" << styleDir << "\" not found" << std::endl; return names; } - dir.setFilter(QDir::Files | QDir::Readable); - QStringList files = dir.entryList(); + dir.setFilter(TQDir::Files | TQDir::Readable); + TQStringList files = dir.entryList(); bool foundDefault = false; - for (QStringList::Iterator i = files.begin(); i != files.end(); ++i) { + for (TQStringList::Iterator i = files.begin(); i != files.end(); ++i) { if ((*i).length() > 4 && (*i).right(4) == ".xml") { - QFileInfo fileInfo(QString("%1/%2").arg(styleDir).arg(*i)); + TQFileInfo fileInfo(TQString("%1/%2").arg(styleDir).arg(*i)); if (fileInfo.exists() && fileInfo.isReadable()) { std::string styleName = qstrtostr((*i).left((*i).length() - 4)); if (styleName == DefaultStyle) diff --git a/src/gui/editors/notation/NoteStyleFileReader.cpp b/src/gui/editors/notation/NoteStyleFileReader.cpp index b3f3464..41da5ed 100644 --- a/src/gui/editors/notation/NoteStyleFileReader.cpp +++ b/src/gui/editors/notation/NoteStyleFileReader.cpp @@ -26,8 +26,8 @@ #include <string> #include "NoteStyle.h" -#include <qfileinfo.h> -#include <qdir.h> +#include <tqfileinfo.h> +#include <tqdir.h> #include <kglobal.h> #include <kstddirs.h> @@ -44,23 +44,23 @@ NoteStyleFileReader::NoteStyleFileReader(std::string name) : m_style(new NoteStyle(name)), m_haveNote(false) { - QString styleDirectory = + TQString styleDirectory = KGlobal::dirs()->findResource("appdata", "styles/"); - QString styleFileName = - QString("%1/%2.xml").arg(styleDirectory).arg(strtoqstr(name)); + TQString styleFileName = + TQString("%1/%2.xml").arg(styleDirectory).arg(strtoqstr(name)); - QFileInfo fileInfo(styleFileName); + TQFileInfo fileInfo(styleFileName); if (!fileInfo.isReadable()) { throw StyleFileReadFailed (qstrtostr(i18n("Can't open style file %1").arg(styleFileName))); } - QFile styleFile(styleFileName); + TQFile styleFile(styleFileName); - QXmlInputSource source(styleFile); - QXmlSimpleReader reader; + TQXmlInputSource source(styleFile); + TQXmlSimpleReader reader; reader.setContentHandler(this); reader.setErrorHandler(this); bool ok = reader.parse(source); @@ -72,22 +72,22 @@ NoteStyleFileReader::NoteStyleFileReader(std::string name) : } bool -NoteStyleFileReader::startElement(const QString &, const QString &, - const QString &qName, - const QXmlAttributes &attributes) +NoteStyleFileReader::startElement(const TQString &, const TQString &, + const TQString &qName, + const TQXmlAttributes &attributes) { - QString lcName = qName.lower(); + TQString lcName = qName.lower(); if (lcName == "rosegarden-note-style") { - QString s = attributes.value("base-style"); + TQString s = attributes.value("base-style"); if (s) m_style->setBaseStyle(qstrtostr(s)); } else if (lcName == "note") { m_haveNote = true; - QString s = attributes.value("type"); + TQString s = attributes.value("type"); if (!s) { m_errorString = i18n("type is a required attribute of note"); return false; @@ -120,9 +120,9 @@ NoteStyleFileReader::startElement(const QString &, const QString &, bool NoteStyleFileReader::setFromAttributes(Note::Type type, - const QXmlAttributes &attributes) + const TQXmlAttributes &attributes) { - QString s; + TQString s; bool haveShape = false; s = attributes.value("shape"); diff --git a/src/gui/editors/notation/NoteStyleFileReader.h b/src/gui/editors/notation/NoteStyleFileReader.h index d3dfbbe..8584ce8 100644 --- a/src/gui/editors/notation/NoteStyleFileReader.h +++ b/src/gui/editors/notation/NoteStyleFileReader.h @@ -25,7 +25,7 @@ #ifndef _RG_NOTESTYLEFILEREADER_H_ #define _RG_NOTESTYLEFILEREADER_H_ -#include <qxml.h> +#include <tqxml.h> #include "NoteStyle.h" @@ -43,13 +43,13 @@ public: // Xml handler methods: virtual bool startElement - (const QString& namespaceURI, const QString& localName, - const QString& qName, const QXmlAttributes& atts); + (const TQString& namespaceURI, const TQString& localName, + const TQString& qName, const TQXmlAttributes& atts); private: - bool setFromAttributes(Note::Type type, const QXmlAttributes &attributes); + bool setFromAttributes(Note::Type type, const TQXmlAttributes &attributes); - QString m_errorString; + TQString m_errorString; NoteStyle *m_style; bool m_haveNote; }; diff --git a/src/gui/editors/notation/RestInserter.cpp b/src/gui/editors/notation/RestInserter.cpp index 399cf2d..e9b6bdb 100644 --- a/src/gui/editors/notation/RestInserter.cpp +++ b/src/gui/editors/notation/RestInserter.cpp @@ -41,9 +41,9 @@ #include "NotePixmapFactory.h" #include <kaction.h> #include <kcommand.h> -#include <qiconset.h> -#include <qregexp.h> -#include <qstring.h> +#include <tqiconset.h> +#include <tqregexp.h> +#include <tqstring.h> namespace Rosegarden @@ -54,30 +54,30 @@ using namespace BaseProperties; RestInserter::RestInserter(NotationView* view) : NoteInserter("RestInserter", view) { - QIconSet icon; + TQIconSet icon; icon = QIconSet (NotePixmapFactory::toQPixmap(NotePixmapFactory:: makeToolbarPixmap("dotted-rest-crotchet"))); new KToggleAction(i18n("Dotted rest"), icon, 0, this, - SLOT(slotToggleDot()), actionCollection(), + TQT_SLOT(slotToggleDot()), actionCollection(), "toggle_dot"); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory:: + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory:: makeToolbarPixmap("select"))); new KAction(i18n("Switch to Select Tool"), icon, 0, this, - SLOT(slotSelectSelected()), actionCollection(), + TQT_SLOT(slotSelectSelected()), actionCollection(), "select"); new KAction(i18n("Switch to Erase Tool"), "eraser", 0, this, - SLOT(slotEraseSelected()), actionCollection(), + TQT_SLOT(slotEraseSelected()), actionCollection(), "erase"); icon = QIconSet (NotePixmapFactory::toQPixmap(NotePixmapFactory:: makeToolbarPixmap("crotchet"))); new KAction(i18n("Switch to Inserting Notes"), icon, 0, this, - SLOT(slotNotesSelected()), actionCollection(), + TQT_SLOT(slotNotesSelected()), actionCollection(), "notes"); createMenu("restinserter.rc"); @@ -126,8 +126,8 @@ void RestInserter::slotToggleDot() { m_noteDots = (m_noteDots) ? 0 : 1; Note note(m_noteType, m_noteDots); - QString actionName(NotationStrings::getReferenceName(note, true)); - actionName.replace(QRegExp("-"), "_"); + TQString actionName(NotationStrings::getReferenceName(note, true)); + actionName.replace(TQRegExp("-"), "_"); KAction *action = m_parentView->actionCollection()->action(actionName); if (!action) { std::cerr << "WARNING: No such action as " << actionName << std::endl; @@ -139,12 +139,12 @@ void RestInserter::slotToggleDot() void RestInserter::slotNotesSelected() { Note note(m_noteType, m_noteDots); - QString actionName(NotationStrings::getReferenceName(note)); - actionName.replace(QRegExp(" "), "_"); + TQString actionName(NotationStrings::getReferenceName(note)); + actionName.replace(TQRegExp(" "), "_"); m_parentView->actionCollection()->action(actionName)->activate(); } -const QString RestInserter::ToolName = "restinserter"; +const TQString RestInserter::ToolName = "restinserter"; } #include "RestInserter.moc" diff --git a/src/gui/editors/notation/RestInserter.h b/src/gui/editors/notation/RestInserter.h index 90239fb..94834d2 100644 --- a/src/gui/editors/notation/RestInserter.h +++ b/src/gui/editors/notation/RestInserter.h @@ -27,7 +27,7 @@ #define _RG_RESTINSERTER_H_ #include "NoteInserter.h" -#include <qstring.h> +#include <tqstring.h> #include "base/Event.h" @@ -53,7 +53,7 @@ class RestInserter : public NoteInserter public: - static const QString ToolName; + static const TQString ToolName; protected: RestInserter(NotationView*); diff --git a/src/gui/editors/notation/SystemFont.cpp b/src/gui/editors/notation/SystemFont.cpp index 71f0ce7..62b4280 100644 --- a/src/gui/editors/notation/SystemFont.cpp +++ b/src/gui/editors/notation/SystemFont.cpp @@ -22,6 +22,7 @@ COPYING included with this distribution for more information. */ +#include <tqevent.h> #include "SystemFont.h" #include "SystemFontQt.h" @@ -31,10 +32,10 @@ #include <kstddirs.h> #include "NoteFontMap.h" -#include <qfont.h> -#include <qfontinfo.h> -#include <qpixmap.h> -#include <qstring.h> +#include <tqfont.h> +#include <tqfontinfo.h> +#include <tqpixmap.h> +#include <tqstring.h> namespace Rosegarden @@ -43,13 +44,13 @@ namespace Rosegarden SystemFont * SystemFont::loadSystemFont(const SystemFontSpec &spec) { - QString name = spec.first; + TQString name = spec.first; int size = spec.second; NOTATION_DEBUG << "SystemFont::loadSystemFont: name is " << name << ", size " << size << endl; if (name == "DEFAULT") { - QFont font; + TQFont font; font.setPixelSize(size); return new SystemFontQt(font); } @@ -61,7 +62,7 @@ SystemFont::loadSystemFont(const SystemFontSpec &spec) FcChar8 *matchFamily; XftFont *xfont = 0; - Display *dpy = QPaintDevice::x11AppDisplay(); + Display *dpy = TQPaintDevice::x11AppDisplay(); static bool haveFcDirectory = false; if (!dpy) { @@ -70,7 +71,7 @@ SystemFont::loadSystemFont(const SystemFontSpec &spec) } if (!haveFcDirectory) { - QString fontDir = KGlobal::dirs()->findResource("appdata", "fonts/"); + TQString fontDir = KGlobal::dirs()->findResource("appdata", "fonts/"); if (!FcConfigAppFontAddDir(FcConfigGetCurrent(), (const FcChar8 *)fontDir.latin1())) { NOTATION_DEBUG << "SystemFont::loadSystemFont[Xft]: Failed to add font directory " << fontDir << " to fontconfig, continuing without it" << endl; @@ -90,7 +91,7 @@ SystemFont::loadSystemFont(const SystemFontSpec &spec) if (!match || result != FcResultMatch) { NOTATION_DEBUG << "SystemFont::loadSystemFont[Xft]: No match for font " << name << " (result is " << result - << "), falling back on QFont" << endl; + << "), falling back on TQFont" << endl; if (match) FcPatternDestroy(match); goto qfont; @@ -100,8 +101,8 @@ SystemFont::loadSystemFont(const SystemFontSpec &spec) NOTATION_DEBUG << "SystemFont::loadSystemFont[Xft]: match family is " << (char *)matchFamily << endl; - if (QString((char *)matchFamily).lower() != name.lower()) { - NOTATION_DEBUG << "SystemFont::loadSystemFont[Xft]: Wrong family returned, falling back on QFont" << endl; + if (TQString((char *)matchFamily).lower() != name.lower()) { + NOTATION_DEBUG << "SystemFont::loadSystemFont[Xft]: Wrong family returned, falling back on TQFont" << endl; FcPatternDestroy(match); goto qfont; } @@ -110,7 +111,7 @@ SystemFont::loadSystemFont(const SystemFontSpec &spec) if (!xfont) { FcPatternDestroy(match); NOTATION_DEBUG << "SystemFont::loadSystemFont[Xft]: Unable to load font " - << name << " via Xft, falling back on QFont" << endl; + << name << " via Xft, falling back on TQFont" << endl; goto qfont; } @@ -124,10 +125,10 @@ qfont: #endif - QFont qfont(name, size, QFont::Normal); + TQFont qfont(name, size, TQFont::Normal); qfont.setPixelSize(size); - QFontInfo info(qfont); + TQFontInfo info(qfont); NOTATION_DEBUG << "SystemFont::loadSystemFont[Qt]: have family " << info.family() << " (exactMatch " << info.exactMatch() << ")" << endl; @@ -135,7 +136,7 @@ qfont: // The Qt documentation says: // - // bool QFontInfo::exactMatch() const + // bool TQFontInfo::exactMatch() const // Returns TRUE if the matched window system font is exactly the // same as the one specified by the font; otherwise returns FALSE. // @@ -146,7 +147,7 @@ qfont: // "Fughetta [macromedia]", and exactMatch returns false. Just as // useless, but in a different way. - QString family = info.family().lower(); + TQString family = info.family().lower(); if (family == name.lower()) return new SystemFontQt(qfont); diff --git a/src/gui/editors/notation/SystemFont.h b/src/gui/editors/notation/SystemFont.h index 0acc2dd..a7ae521 100644 --- a/src/gui/editors/notation/SystemFont.h +++ b/src/gui/editors/notation/SystemFont.h @@ -26,7 +26,7 @@ #ifndef _RG_SYSTEMFONT_H_ #define _RG_SYSTEMFONT_H_ -#include <qpixmap.h> +#include <tqpixmap.h> #include "gui/editors/notation/NoteCharacterNames.h" @@ -36,7 +36,7 @@ class SystemFontSpec; namespace Rosegarden { -typedef std::pair<QString, int> SystemFontSpec; +typedef std::pair<TQString, int> SystemFontSpec; class SystemFont @@ -46,7 +46,7 @@ public: PreferGlyphs, PreferCodes, OnlyGlyphs, OnlyCodes }; - virtual QPixmap renderChar(CharName charName, + virtual TQPixmap renderChar(CharName charName, int glyph, int code, Strategy strategy, bool &success) = 0; diff --git a/src/gui/editors/notation/SystemFontQt.cpp b/src/gui/editors/notation/SystemFontQt.cpp index f9c99b1..ad969e8 100644 --- a/src/gui/editors/notation/SystemFontQt.cpp +++ b/src/gui/editors/notation/SystemFontQt.cpp @@ -27,10 +27,10 @@ #include "misc/Debug.h" #include "gui/general/PixmapFunctions.h" -#include <qfont.h> -#include <qfontmetrics.h> -#include <qpainter.h> -#include <qpixmap.h> +#include <tqfont.h> +#include <tqfontmetrics.h> +#include <tqpainter.h> +#include <tqpixmap.h> namespace Rosegarden { @@ -42,29 +42,29 @@ SystemFontQt::renderChar(CharName charName, int glyph, int code, if (strategy == OnlyGlyphs) { NOTATION_DEBUG << "SystemFontQt::renderChar: OnlyGlyphs strategy not supported by Qt renderer, can't render character " << charName.getName() << " (glyph " << glyph << ")" << endl; - return QPixmap(); + return TQPixmap(); } if (code < 0) { NOTATION_DEBUG << "SystemFontQt::renderChar: Can't render using Qt with only glyph value (" << glyph << ") for character " << charName.getName() << ", need a code point" << endl; - return QPixmap(); + return TQPixmap(); } - QFontMetrics metrics(m_font); - QChar qc(code); + TQFontMetrics metrics(m_font); + TQChar qc(code); - QPixmap map; - map = QPixmap(metrics.width(qc), metrics.height()); + TQPixmap map; + map = TQPixmap(metrics.width(qc), metrics.height()); map.fill(); - QPainter painter; + TQPainter painter; painter.begin(&map); painter.setFont(m_font); painter.setPen(Qt::black); NOTATION_DEBUG << "NoteFont: Drawing character code " << code << " for " << charName.getName() - << " using QFont" << endl; + << " using TQFont" << endl; painter.drawText(0, metrics.ascent(), qc); diff --git a/src/gui/editors/notation/SystemFontQt.h b/src/gui/editors/notation/SystemFontQt.h index ea8f5f2..a3698f9 100644 --- a/src/gui/editors/notation/SystemFontQt.h +++ b/src/gui/editors/notation/SystemFontQt.h @@ -22,26 +22,26 @@ COPYING included with this distribution for more information. */ -#ifndef _RG_SYSTEMFONTQT_H_ -#define _RG_SYSTEMFONTQT_H_ +#ifndef _RG_SYSTEMFONQT_H_ +#define _RG_SYSTEMFONQT_H_ #include "SystemFont.h" -#include <qfont.h> +#include <tqfont.h> namespace Rosegarden { class SystemFontQt : public SystemFont { public: - SystemFontQt(QFont &font) : m_font(font) { } + SystemFontQt(TQFont &font) : m_font(font) { } virtual ~SystemFontQt() { } - virtual QPixmap renderChar(CharName charName, int glyph, int code, + virtual TQPixmap renderChar(CharName charName, int glyph, int code, Strategy strategy, bool &success); private: - QFont m_font; + TQFont m_font; }; } diff --git a/src/gui/editors/notation/SystemFontXft.cpp b/src/gui/editors/notation/SystemFontXft.cpp index ce42f61..6388167 100644 --- a/src/gui/editors/notation/SystemFontXft.cpp +++ b/src/gui/editors/notation/SystemFontXft.cpp @@ -22,6 +22,8 @@ COPYING included with this distribution for more information. */ +#include <tqevent.h> + #include "SystemFontXft.h" #ifdef HAVE_XFT @@ -71,17 +73,17 @@ SystemFontXft::renderChar(CharName charName, int glyph, int code, if (glyph < 0 && code < 0) { NOTATION_DEBUG << "SystemFontXft::renderChar: Have neither glyph nor code point for character " << charName.getName() << ", can't render" << endl; - return QPixmap(); + return TQPixmap(); } if (code < 0 && strategy == OnlyCodes) { NOTATION_DEBUG << "SystemFontXft::renderChar: strategy is OnlyCodes but no code point provided for character " << charName.getName() << " (glyph is " << glyph << ")" << endl; - return QPixmap(); + return TQPixmap(); } if (glyph < 0 && strategy == OnlyGlyphs) { NOTATION_DEBUG << "SystemFontXft::renderChar: strategy is OnlyGlyphs but no glyph index provided for character " << charName.getName() << " (code is " << code << ")" << endl; - return QPixmap(); + return TQPixmap(); } XGlyphInfo extents; @@ -100,7 +102,7 @@ SystemFontXft::renderChar(CharName charName, int glyph, int code, NOTATION_DEBUG << "SystemFontXft::renderChar: zero extents for character " << charName.getName() << " (glyph " << glyph << ")" << endl; - return QPixmap(); + return TQPixmap(); } } else { FcChar32 char32(code); @@ -109,11 +111,11 @@ SystemFontXft::renderChar(CharName charName, int glyph, int code, NOTATION_DEBUG << "SystemFontXft::renderChar: zero extents for character " << charName.getName() << " (code " << code << ")" << endl; - return QPixmap(); + return TQPixmap(); } } - QPixmap map(extents.width, extents.height); + TQPixmap map(extents.width, extents.height); map.fill(); Drawable drawable = (Drawable)map.handle(); @@ -127,7 +129,7 @@ SystemFontXft::renderChar(CharName charName, int glyph, int code, (Visual *)map.x11Visual(), map.x11Colormap()); - QColor pen(Qt::black); + TQColor pen(Qt::black); XftColor col; col.color.red = pen.red () | pen.red() << 8; col.color.green = pen.green () | pen.green() << 8; diff --git a/src/gui/editors/notation/SystemFontXft.h b/src/gui/editors/notation/SystemFontXft.h index b1487c4..c522086 100644 --- a/src/gui/editors/notation/SystemFontXft.h +++ b/src/gui/editors/notation/SystemFontXft.h @@ -43,7 +43,7 @@ public: SystemFontXft(Display *dpy, XftFont *font) : m_dpy(dpy), m_font(font) { } virtual ~SystemFontXft() { if (m_font) XftFontClose(m_dpy, m_font); } - virtual QPixmap renderChar(CharName charName, int glyph, int code, + virtual TQPixmap renderChar(CharName charName, int glyph, int code, Strategy strategy, bool &success); private: diff --git a/src/gui/editors/notation/TextInserter.cpp b/src/gui/editors/notation/TextInserter.cpp index aa8e1ff..f862b88 100644 --- a/src/gui/editors/notation/TextInserter.cpp +++ b/src/gui/editors/notation/TextInserter.cpp @@ -40,9 +40,9 @@ #include "NotePixmapFactory.h" #include "NotationElement.h" #include <kaction.h> -#include <qdialog.h> -#include <qiconset.h> -#include <qstring.h> +#include <tqdialog.h> +#include <tqiconset.h> +#include <tqstring.h> namespace Rosegarden @@ -52,21 +52,21 @@ TextInserter::TextInserter(NotationView* view) : NotationTool("TextInserter", view), m_text("", Text::Dynamic) { - QIconSet icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory:: + TQIconSet icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory:: makeToolbarPixmap("select"))); new KAction(i18n("Switch to Select Tool"), icon, 0, this, - SLOT(slotSelectSelected()), actionCollection(), + TQT_SLOT(slotSelectSelected()), actionCollection(), "select"); new KAction(i18n("Switch to Erase Tool"), "eraser", 0, this, - SLOT(slotEraseSelected()), actionCollection(), + TQT_SLOT(slotEraseSelected()), actionCollection(), "erase"); icon = QIconSet (NotePixmapFactory::toQPixmap(NotePixmapFactory:: makeToolbarPixmap("crotchet"))); new KAction(i18n("Switch to Inserting Notes"), icon, 0, this, - SLOT(slotNotesSelected()), actionCollection(), + TQT_SLOT(slotNotesSelected()), actionCollection(), "notes"); createMenu("textinserter.rc"); @@ -96,7 +96,7 @@ void TextInserter::ready() void TextInserter::handleLeftButtonPress(timeT, int, int staffNo, - QMouseEvent* e, + TQMouseEvent* e, ViewElement *element) { if (staffNo < 0) @@ -137,7 +137,7 @@ void TextInserter::handleLeftButtonPress(timeT, TextEventDialog *dialog = new TextEventDialog (m_nParentView, m_nParentView->getNotePixmapFactory(), defaultText); - if (dialog->exec() == QDialog::Accepted) { + if (dialog->exec() == TQDialog::Accepted) { m_text = dialog->getText(); @@ -163,7 +163,7 @@ void TextInserter::handleLeftButtonPress(timeT, delete dialog; } -const QString TextInserter::ToolName = "textinserter"; +const TQString TextInserter::ToolName = "textinserter"; } #include "TextInserter.moc" diff --git a/src/gui/editors/notation/TextInserter.h b/src/gui/editors/notation/TextInserter.h index 3b4821b..f71ddc7 100644 --- a/src/gui/editors/notation/TextInserter.h +++ b/src/gui/editors/notation/TextInserter.h @@ -28,11 +28,11 @@ #include "base/NotationTypes.h" #include "NotationTool.h" -#include <qstring.h> +#include <tqstring.h> #include "base/Event.h" -class QMouseEvent; +class TQMouseEvent; namespace Rosegarden @@ -57,9 +57,9 @@ public: virtual void handleLeftButtonPress(timeT, int height, int staffNo, - QMouseEvent*, + TQMouseEvent*, ViewElement* el); - static const QString ToolName; + static const TQString ToolName; protected slots: void slotNotesSelected(); diff --git a/src/gui/editors/notation/TrackHeader.cpp b/src/gui/editors/notation/TrackHeader.cpp index 32fab2f..f2793ab 100644 --- a/src/gui/editors/notation/TrackHeader.cpp +++ b/src/gui/editors/notation/TrackHeader.cpp @@ -50,15 +50,15 @@ #include <kapplication.h> #include <klocale.h> -#include <qsize.h> -#include <qwidget.h> -#include <qhbox.h> -#include <qvbox.h> -#include <qpushbutton.h> -#include <qlabel.h> -#include <qframe.h> -#include <qstring.h> -#include <qtooltip.h> +#include <tqsize.h> +#include <tqwidget.h> +#include <tqhbox.h> +#include <tqvbox.h> +#include <tqpushbutton.h> +#include <tqlabel.h> +#include <tqframe.h> +#include <tqstring.h> +#include <tqtooltip.h> namespace Rosegarden @@ -75,22 +75,22 @@ const int TrackHeader::INCONSISTENT_TRANSPOSITIONS = 1 << 5; const int TrackHeader::BEFORE_FIRST_SEGMENT = 1 << 6; -TrackHeader::TrackHeader(QWidget *parent, TrackId trackId, int height, int ypos) : - QLabel(parent), +TrackHeader::TrackHeader(TQWidget *parent, TrackId trackId, int height, int ypos) : + TQLabel(parent), m_track(trackId), m_height(height), m_ypos(ypos), m_lastClef(Clef()), m_lastKey(Rosegarden::Key()), - m_lastLabel(QString("")), + m_lastLabel(TQString("")), m_lastTranspose(0), - m_lastUpperText(QString("")), + m_lastUpperText(TQString("")), m_neverUpdated(true), m_isCurrent(true), m_lastStatusPart(0), m_lastWidth(0), m_key(Rosegarden::Key()), - m_label(QString("")), + m_label(TQString("")), m_transpose(0), m_status(0), m_current(false) @@ -98,7 +98,7 @@ TrackHeader::TrackHeader(QWidget *parent, TrackId trackId, int height, int ypos) m_notationView = static_cast<HeadersGroup *>(parent)->getNotationView(); - setFrameStyle(QFrame::Box | QFrame::Plain); + setFrameStyle(TQFrame::Box | TQFrame::Plain); setCurrent(false); @@ -110,15 +110,15 @@ TrackHeader::TrackHeader(QWidget *parent, TrackId trackId, int height, int ypos) Track *track = comp->getTrackById(m_track); int trackPos = comp->getTrackPositionById(m_track); - QString toolTipText = QString(i18n("Track %1 : \"%2\"") + TQString toolTipText = TQString(i18n("Track %1 : \"%2\"") .arg(trackPos + 1) .arg(strtoqstr(track->getLabel()))); - QString preset = track->getPresetLabel(); - if (preset != QString("")) - toolTipText += QString(i18n("\nNotate for: %1").arg(preset)); + TQString preset = track->getPresetLabel(); + if (preset != TQString("")) + toolTipText += TQString(i18n("\nNotate for: %1").arg(preset)); - QString notationSize = i18n("normal"); + TQString notationSize = i18n("normal"); switch (track->getStaffSize()) { case StaffTypes::Small: notationSize = i18n("small"); @@ -128,7 +128,7 @@ TrackHeader::TrackHeader(QWidget *parent, TrackId trackId, int height, int ypos) break; } - QString bracketText = i18n("--"); + TQString bracketText = i18n("--"); switch (track->getStaffBracket()) { case Brackets::SquareOn: bracketText = "[-"; @@ -153,7 +153,7 @@ TrackHeader::TrackHeader(QWidget *parent, TrackId trackId, int height, int ypos) break; } - toolTipText += QString(i18n("\nSize: %1, Bracket: %2 ")) + toolTipText += TQString(i18n("\nSize: %1, Bracket: %2 ")) .arg(notationSize) .arg(bracketText); @@ -178,16 +178,16 @@ TrackHeader::TrackHeader(QWidget *parent, TrackId trackId, int height, int ypos) int transpose = (*i)->getTranspose(); if (transpose) { - QString transposeName; + TQString transposeName; transposeValueToName(transpose, transposeName); - toolTipText += QString(i18n("\nbars [%1-%2] in %3 (tr=%4) : \"%5\"")) + toolTipText += TQString(i18n("\nbars [%1-%2] in %3 (tr=%4) : \"%5\"")) .arg(barStart) .arg(barEnd) .arg(transposeName) .arg(transpose) .arg(strtoqstr((*i)->getLabel())); } else { - toolTipText += QString(i18n("\nbars [%1-%2] (tr=%3) : \"%4\"")) + toolTipText += TQString(i18n("\nbars [%1-%2] (tr=%3) : \"%4\"")) .arg(barStart) .arg(barEnd) .arg(transpose) @@ -195,7 +195,7 @@ TrackHeader::TrackHeader(QWidget *parent, TrackId trackId, int height, int ypos) } } - QToolTip::add(this, toolTipText); + TQToolTip::add(this, toolTipText); m_firstSeg = *segments.begin(); m_firstSegStartTime = m_firstSeg->getStartTime(); @@ -217,17 +217,17 @@ TrackHeader::setCurrent(bool current) if (current) { setLineWidth(2); setMargin(0); - setPaletteForegroundColor(QColor(0, 0, 255)); + setPaletteForegroundColor(TQColor(0, 0, 255)); } else { setLineWidth(1); setMargin(1); - setPaletteForegroundColor(QColor(0, 0, 0)); + setPaletteForegroundColor(TQColor(0, 0, 0)); } } } void -TrackHeader::transposeValueToName(int transpose, QString &transposeName) +TrackHeader::transposeValueToName(int transpose, TQString &transposeName) { /// TODO : Should be rewrited using methods from Pitch class @@ -268,7 +268,7 @@ TrackHeader::lookAtStaff(double x, int maxWidth) // inconsistency occurs. Clef clef, clef0; Rosegarden::Key key, key0, key1 = Rosegarden::Key("C major"); - QString label = QString(""), label0, label1 = QString(""); + TQString label = TQString(""), label0, label1 = TQString(""); int transpose = 0, transpose0, transpose1 = 0; int staff; @@ -346,14 +346,14 @@ TrackHeader::lookAtStaff(double x, int maxWidth) m_current = current; m_status = status; - QString noteName; + TQString noteName; transposeValueToName(m_transpose, noteName); - m_upperText = QString(i18n("%1: %2") + m_upperText = TQString(i18n("%1: %2") .arg(trackPos + 1) .arg(strtoqstr(track->getLabel()))); if (m_transpose) m_transposeText = i18n(" in %1").arg(noteName); - else m_transposeText = QString(""); + else m_transposeText = TQString(""); NotePixmapFactory * npf = m_notationView->getNotePixmapFactory(); int clefAndKeyWidth = npf->getClefAndKeyWidth(m_key, m_clef); @@ -411,7 +411,7 @@ TrackHeader::updateHeader(int width) m_lastUpperText = m_upperText; bool drawClef = true; - QColor clefColour; + TQColor clefColour; if (m_status & (SEGMENT_HERE | BEFORE_FIRST_SEGMENT)) { if (m_status & (INCONSISTENT_CLEFS | INCONSISTENT_KEYS)) clefColour = Qt::red; @@ -422,7 +422,7 @@ TrackHeader::updateHeader(int width) } NotePixmapFactory * npf = m_notationView->getNotePixmapFactory(); - QPixmap pmap = NotePixmapFactory::toQPixmap( + TQPixmap pmap = NotePixmapFactory::toQPixmap( npf->makeTrackHeaderPixmap(width, m_height, this)); setPixmap(pmap); diff --git a/src/gui/editors/notation/TrackHeader.h b/src/gui/editors/notation/TrackHeader.h index 0104430..1cb4f1e 100644 --- a/src/gui/editors/notation/TrackHeader.h +++ b/src/gui/editors/notation/TrackHeader.h @@ -33,13 +33,13 @@ #include "base/NotationTypes.h" #include "base/Track.h" -#include <qsize.h> -#include <qwidget.h> -#include <qlabel.h> +#include <tqsize.h> +#include <tqwidget.h> +#include <tqlabel.h> #include <set> -class QLabel; +class TQLabel; namespace Rosegarden @@ -59,7 +59,7 @@ public: * *parent is the parent widget, height the height of staff and * ypos is the staff y position on canvas. */ - TrackHeader(QWidget *parent, TrackId trackId, int height, int ypos); + TrackHeader(TQWidget *parent, TrackId trackId, int height, int ypos); /** * Draw a blue line around header when current is true @@ -119,18 +119,18 @@ public: /** * Return the text to write in the header top */ - QString getUpperText() { return m_upperText; } + TQString getUpperText() { return m_upperText; } /** * Return the transposition text * (to be written at the end of the upper text) */ - QString getTransposeText() { return m_transposeText; } + TQString getTransposeText() { return m_transposeText; } /** * Return the text to write in the header bottom */ - QString getLowerText() { return m_label; } + TQString getLowerText() { return m_label; } /** * Return true if two segments or more are superimposed and are @@ -165,7 +165,7 @@ private : * Convert the transpose value to the instrument tune and * return it in a printable string. */ - void transposeValueToName(int transpose, QString &transposeName); + void transposeValueToName(int transpose, TQString &transposeName); // Status bits @@ -184,9 +184,9 @@ private : Clef m_lastClef; Rosegarden::Key m_lastKey; - QString m_lastLabel; + TQString m_lastLabel; int m_lastTranspose; - QString m_lastUpperText; + TQString m_lastUpperText; bool m_neverUpdated; bool m_isCurrent; int m_lastStatusPart; @@ -194,13 +194,13 @@ private : Clef m_clef; Rosegarden::Key m_key; - QString m_label; + TQString m_label; int m_transpose; int m_status; bool m_current; - QString m_upperText; - QString m_transposeText; + TQString m_upperText; + TQString m_transposeText; int m_numberOfTextLines; // Used to sort the segments listed in the header toolTipText |