From 11f31c37e5fa4889d9989f10272f44845449cb7b Mon Sep 17 00:00:00 2001 From: tpearson Date: Mon, 6 Sep 2010 20:59:29 +0000 Subject: Initial TQt conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/rosegarden@1172292 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- src/gui/editors/notation/NotePixmapFactory.h | 162 +++++++++++++-------------- 1 file changed, 81 insertions(+), 81 deletions(-) (limited to 'src/gui/editors/notation/NotePixmapFactory.h') 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 #include "NoteCharacter.h" #include -#include -#include -#include -#include +#include +#include +#include +#include #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 TextFontCache; + typedef std::map TextFontCache; mutable TextFontCache m_textFontCache; - static QPoint m_pointZero; + static TQPoint m_pointZero; }; -- cgit v1.2.1