diff options
651 files changed, 6637 insertions, 6480 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 93e001f..f3b15e7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -93,8 +93,11 @@ IF(QT_FOUND) MESSAGE(STATUS "Found Qt3 (version ${qt_version_str})") #MESSAGE("QT_LIBRARIES: ${QT_LIBRARIES}") ELSE(QT_FOUND) - MESSAGE(FATAL_ERROR "Qt3 package not found") + MESSAGE(STATUS_ERROR "Qt3 package not found--assuming TQt4") + SET(QT_INCLUDE_DIR "/usr/include/qt4") ENDIF(QT_FOUND) +SET(QT_UIC_EXECUTABLE "/usr/bin/uic-tqt") +SET(QT_MOC_EXECUTABLE "/usr/bin/tmoc") IF(KDE3_FOUND) ADD_DEFINITIONS(${KDE3_DEFINITIONS}) #MESSAGE("KDE3PREFIX: ${KDE3PREFIX}") diff --git a/src/base/AnalysisTypes.cpp b/src/base/AnalysisTypes.cpp index b2d8727..a07fd96 100644 --- a/src/base/AnalysisTypes.cpp +++ b/src/base/AnalysisTypes.cpp @@ -109,7 +109,7 @@ AnalysisHelper::labelChords(CompositionTimeSliceAdapter &c, Segment &s, if ((*i)->isa(Note::EventType)) { int bass = 999; - int mask = 0; + int tqmask = 0; GlobalChord chord(c, i, quantizer); if (chord.size() == 0) continue; @@ -121,15 +121,15 @@ AnalysisHelper::labelChords(CompositionTimeSliceAdapter &c, Segment &s, assert(bass == 999); // should be in ascending order already bass = pitch; } - mask |= 1 << (pitch % 12); + tqmask |= 1 << (pitch % 12); } } i = chord.getFinalElement(); - if (mask == 0) continue; + if (tqmask == 0) continue; - ChordLabel ch(key, mask, bass); + ChordLabel ch(key, tqmask, bass); if (ch.isValid()) { @@ -154,15 +154,15 @@ ChordLabel::ChordLabel() checkMap(); } -ChordLabel::ChordLabel(Key key, int mask, int /* bass */) : +ChordLabel::ChordLabel(Key key, int tqmask, int /* bass */) : m_data() { checkMap(); // Look for a chord built on an unaltered scale step of the current key. - for (ChordMap::iterator i = m_chordMap.find(mask); - i != m_chordMap.end() && i->first==mask; ++i) + for (ChordMap::iterator i = m_chordMap.find(tqmask); + i != m_chordMap.end() && i->first==tqmask; ++i) { if (Pitch(i->second.m_rootPitch).isDiatonicInKey(key)) @@ -233,8 +233,8 @@ ChordLabel::checkMap() // What the basicChordMasks mean: each bit set in each one represents // a pitch class (pitch%12) in a chord. C major has three pitch // classes, C, E, and G natural; if you take the MIDI pitches - // of those notes modulo 12, you get 0, 4, and 7, so the mask for - // major triads is (1<<0)+(1<<4)+(1<<7). All the masks are for chords + // of those notes modulo 12, you get 0, 4, and 7, so the tqmask for + // major triads is (1<<0)+(1<<4)+(1<<7). All the tqmasks are for chords // built on C. const int basicChordMasks[8] = @@ -249,8 +249,8 @@ ChordLabel::checkMap() 1 + (1<<3) + (1<<6) + (1<<9) // diminished 7th }; - // Each mask is inserted into the map rotated twelve ways; each - // rotation is a mask you would get by transposing the chord + // Each tqmask is inserted into the map rotated twelve ways; each + // rotation is a tqmask you would get by transposing the chord // to have a new root (i.e., C, C#, D, D#, E, F...) for (int i = 0; i < 8; ++i) diff --git a/src/base/AnalysisTypes.h b/src/base/AnalysisTypes.h index d7eabad..df3a416 100644 --- a/src/base/AnalysisTypes.h +++ b/src/base/AnalysisTypes.h @@ -62,8 +62,8 @@ NoChord = "no-chord", /////////////////////////////////////////////////////////////////////////// /** - * ChordLabel names chords and identifies them from their masks. See - * ChordLabel::checkMap() for details on what the masks are and + * ChordLabel names chords and identifies them from their tqmasks. See + * ChordLabel::checkMap() for details on what the tqmasks are and * AnalysisHelper::labelChords() for an example. */ @@ -71,7 +71,7 @@ class ChordLabel { public: ChordLabel(); - ChordLabel(Key key, int mask, int bass); + ChordLabel(Key key, int tqmask, int bass); ChordLabel(ChordType type, int rootPitch, int inversion = 0) : m_data(type, rootPitch, inversion) { }; int rootPitch(); diff --git a/src/base/BaseProperties.cpp b/src/base/BaseProperties.cpp index adff519..be964ac 100644 --- a/src/base/BaseProperties.cpp +++ b/src/base/BaseProperties.cpp @@ -115,7 +115,7 @@ const PropertyName TRIGGER_SEGMENT_RETUNE = "triggersegmentretune"; const PropertyName TRIGGER_SEGMENT_ADJUST_TIMES = "triggersegmentadjusttimes"; const std::string TRIGGER_SEGMENT_ADJUST_NONE = "none"; -const std::string TRIGGER_SEGMENT_ADJUST_SQUISH = "squish"; +const std::string TRIGGER_SEGMENT_ADJUST_STQUISH = "squish"; const std::string TRIGGER_SEGMENT_ADJUST_SYNC_START = "syncstart"; const std::string TRIGGER_SEGMENT_ADJUST_SYNC_END = "syncend"; diff --git a/src/base/BaseProperties.h b/src/base/BaseProperties.h index f83b2f7..44cd477 100644 --- a/src/base/BaseProperties.h +++ b/src/base/BaseProperties.h @@ -62,7 +62,7 @@ extern const PropertyName TRIGGER_SEGMENT_RETUNE; extern const PropertyName TRIGGER_SEGMENT_ADJUST_TIMES; extern const std::string TRIGGER_SEGMENT_ADJUST_NONE; -extern const std::string TRIGGER_SEGMENT_ADJUST_SQUISH; +extern const std::string TRIGGER_SEGMENT_ADJUST_STQUISH; extern const std::string TRIGGER_SEGMENT_ADJUST_SYNC_START; extern const std::string TRIGGER_SEGMENT_ADJUST_SYNC_END; diff --git a/src/base/BasicQuantizer.h b/src/base/BasicQuantizer.h index 1a9a7b7..2f3ce9e 100644 --- a/src/base/BasicQuantizer.h +++ b/src/base/BasicQuantizer.h @@ -19,8 +19,8 @@ COPYING included with this distribution for more information. */ -#ifndef BASIC_QUANTIZER_H -#define BASIC_QUANTIZER_H +#ifndef BASIC_TQUANTIZER_H +#define BASIC_TQUANTIZER_H #include "Quantizer.h" diff --git a/src/base/Clipboard.h b/src/base/Clipboard.h index e205e33..9400698 100644 --- a/src/base/Clipboard.h +++ b/src/base/Clipboard.h @@ -35,7 +35,7 @@ class EventSelection; * editing operations. Conceptually it has two "modes", * single-segment and multiple-segment, although there's no particular * distinction behind the scenes. The Clipboard owns all the segments - * it contains -- they should always be deep copies, not aliases. + * it tqcontains -- they should always be deep copies, not aliases. */ class Clipboard diff --git a/src/base/ColourMap.h b/src/base/ColourMap.h index 973c1e0..1cb54dc 100644 --- a/src/base/ColourMap.h +++ b/src/base/ColourMap.h @@ -111,7 +111,7 @@ public: */ bool swapItems(unsigned int item_1, unsigned int item_2); -// void replace(ColourMap &input); +// void tqreplace(ColourMap &input); /** * This returns a const iterator pointing to m_map.begin() diff --git a/src/base/Composition.cpp b/src/base/Composition.cpp index cde3a8b..7c808e1 100644 --- a/src/base/Composition.cpp +++ b/src/base/Composition.cpp @@ -102,7 +102,7 @@ Composition::ReferenceSegment::getDuration() const } Composition::ReferenceSegment::iterator -Composition::ReferenceSegment::find(Event *e) +Composition::ReferenceSegment::tqfind(Event *e) { return std::lower_bound (begin(), end(), e, ReferenceSegmentEventCmp()); @@ -116,7 +116,7 @@ Composition::ReferenceSegment::insert(Event *e) m_eventType, e->getType(), __FILE__, __LINE__); } - iterator i = find(e); + iterator i = tqfind(e); if (i != end() && (*i)->getAbsoluteTime() == e->getAbsoluteTime()) { @@ -133,7 +133,7 @@ Composition::ReferenceSegment::insert(Event *e) void Composition::ReferenceSegment::erase(Event *e) { - iterator i = find(e); + iterator i = tqfind(e); if (i != end()) Impl::erase(i); } @@ -141,7 +141,7 @@ Composition::ReferenceSegment::iterator Composition::ReferenceSegment::findTime(timeT t) { Event dummy("dummy", t, 0, MIN_SUBORDERING); - return find(&dummy); + return tqfind(&dummy); } Composition::ReferenceSegment::iterator @@ -150,7 +150,7 @@ Composition::ReferenceSegment::findRealTime(RealTime t) Event dummy("dummy", 0, 0, MIN_SUBORDERING); dummy.set<Bool>(NoAbsoluteTimeProperty, true); setTempoTimestamp(&dummy, t); - return find(&dummy); + return tqfind(&dummy); } Composition::ReferenceSegment::iterator @@ -298,7 +298,7 @@ Composition::weakDetachSegment(Segment *segment) } bool -Composition::contains(const Segment *s) +Composition::tqcontains(const Segment *s) { iterator i = findSegment(s); return (i != end()); diff --git a/src/base/Composition.h b/src/base/Composition.h index 24865dd..5a1b0ac 100644 --- a/src/base/Composition.h +++ b/src/base/Composition.h @@ -254,7 +254,7 @@ public: /** * Test whether a Segment exists in this Composition. */ - bool contains(const Segment *); + bool tqcontains(const Segment *); /** * Return an iterator pointing at the given Segment, or end() @@ -437,7 +437,7 @@ public: } /** - * Return the starting and ending times of the bar that contains + * Return the starting and ending times of the bar that tqcontains * time t. * * Will happily return theoretical timings for bars before the @@ -770,7 +770,7 @@ public: ////// // - // QUANTIZERS + // TQUANTIZERS /** * Return a quantizer that quantizes to the our most basic @@ -799,8 +799,8 @@ public: return m_refreshStatusArray.getNewRefreshStatusId(); } - RefreshStatus& getRefreshStatus(unsigned int id) { - return m_refreshStatusArray.getRefreshStatus(id); + RefreshtqStatus& getRefreshtqStatus(unsigned int id) { + return m_refreshStatusArray.getRefreshtqStatus(id); } /// Set all refresh statuses to true @@ -906,7 +906,7 @@ protected: std::string getEventType() const { return m_eventType; } private: - iterator find(Event *e); + iterator tqfind(Event *e); std::string m_eventType; }; @@ -989,7 +989,7 @@ protected: bool m_playMetronome; bool m_recordMetronome; - RefreshStatusArray<RefreshStatus> m_refreshStatusArray; + RefreshStatusArray<RefreshtqStatus> m_refreshStatusArray; // User defined markers in the composition // diff --git a/src/base/Configuration.cpp b/src/base/Configuration.cpp index a3d836f..cf633c5 100644 --- a/src/base/Configuration.cpp +++ b/src/base/Configuration.cpp @@ -171,7 +171,7 @@ const PropertyName DocumentConfiguration::TransportMode = "transportmode DocumentConfiguration::DocumentConfiguration() { set<Int>(ZoomLevel, 0); - set<String>(TransportMode, ""); // apparently generates an exception if not initialized + set<String>(TransportMode, ""); // aptqparently generates an exception if not initialized } DocumentConfiguration::DocumentConfiguration(const DocumentConfiguration &conf): diff --git a/src/base/Equation.h b/src/base/Equation.h index 61377a5..668c321 100644 --- a/src/base/Equation.h +++ b/src/base/Equation.h @@ -20,8 +20,8 @@ COPYING included with this distribution for more information. */ -#ifndef _EQUATION_H_ -#define _EQUATION_H_ +#ifndef _ETQUATION_H_ +#define _ETQUATION_H_ namespace Rosegarden { diff --git a/src/base/Event.cpp b/src/base/Event.cpp index e63e51b..c5608b7 100644 --- a/src/base/Event.cpp +++ b/src/base/Event.cpp @@ -118,7 +118,7 @@ Event::EventData::setTime(const PropertyName &name, timeT t, timeT deft) } PropertyMap * -Event::find(const PropertyName &name, PropertyMap::iterator &i) +Event::tqfind(const PropertyName &name, PropertyMap::iterator &i) { PropertyMap *map = m_data->m_properties; @@ -142,7 +142,7 @@ Event::has(const PropertyName &name) const #endif PropertyMap::const_iterator i; - const PropertyMap *map = find(name, i); + const PropertyMap *map = tqfind(name, i); if (map) return true; else return false; } @@ -156,7 +156,7 @@ Event::unset(const PropertyName &name) unshare(); PropertyMap::iterator i; - PropertyMap *map = find(name, i); + PropertyMap *map = tqfind(name, i); if (map) { delete i->second; map->erase(i); @@ -169,7 +169,7 @@ Event::getPropertyType(const PropertyName &name) const // throw (NoData) { PropertyMap::const_iterator i; - const PropertyMap *map = find(name, i); + const PropertyMap *map = tqfind(name, i); if (map) { return i->second->getType(); } else { @@ -183,7 +183,7 @@ Event::getPropertyTypeAsString(const PropertyName &name) const // throw (NoData) { PropertyMap::const_iterator i; - const PropertyMap *map = find(name, i); + const PropertyMap *map = tqfind(name, i); if (map) { return i->second->getTypeName(); } else { @@ -197,7 +197,7 @@ Event::getAsString(const PropertyName &name) const // throw (NoData) { PropertyMap::const_iterator i; - const PropertyMap *map = find(name, i); + const PropertyMap *map = tqfind(name, i); if (map) { return i->second->unparse(); } else { diff --git a/src/base/Event.h b/src/base/Event.h index f236681..987929c 100644 --- a/src/base/Event.h +++ b/src/base/Event.h @@ -363,12 +363,12 @@ private: } // returned iterator (in i) only valid if return map value is non-zero - PropertyMap *find(const PropertyName &name, PropertyMap::iterator &i); + PropertyMap *tqfind(const PropertyName &name, PropertyMap::iterator &i); - const PropertyMap *find(const PropertyName &name, + const PropertyMap *tqfind(const PropertyName &name, PropertyMap::const_iterator &i) const { PropertyMap::iterator j; - PropertyMap *map = const_cast<Event *>(this)->find(name, j); + PropertyMap *map = const_cast<Event *>(this)->tqfind(name, j); i = j; return map; } @@ -400,7 +400,7 @@ Event::get(const PropertyName &name, typename PropertyDefn<P>::basic_type &val) #endif PropertyMap::const_iterator i; - const PropertyMap *map = find(name, i); + const PropertyMap *map = tqfind(name, i); if (map) { @@ -434,7 +434,7 @@ Event::get(const PropertyName &name) const #endif PropertyMap::const_iterator i; - const PropertyMap *map = find(name, i); + const PropertyMap *map = tqfind(name, i); if (map) { @@ -464,7 +464,7 @@ Event::isPersistent(const PropertyName &name) const // throw (NoData) { PropertyMap::const_iterator i; - const PropertyMap *map = find(name, i); + const PropertyMap *map = tqfind(name, i); if (map) { return (map == m_data->m_properties); @@ -481,7 +481,7 @@ Event::setPersistence(const PropertyName &name, bool persistent) { unshare(); PropertyMap::iterator i; - PropertyMap *map = find(name, i); + PropertyMap *map = tqfind(name, i); if (map) { insert(*i, persistent); @@ -506,7 +506,7 @@ Event::set(const PropertyName &name, typename PropertyDefn<P>::basic_type value, unshare(); PropertyMap::iterator i; - PropertyMap *map = find(name, i); + PropertyMap *map = tqfind(name, i); if (map) { bool persistentBefore = (map == m_data->m_properties); @@ -547,7 +547,7 @@ Event::setMaybe(const PropertyName &name, typename PropertyDefn<P>::basic_type v unshare(); PropertyMap::iterator i; - PropertyMap *map = find(name, i); + PropertyMap *map = tqfind(name, i); if (map) { if (map == m_data->m_properties) return; // persistent, so ignore it diff --git a/src/base/Instrument.h b/src/base/Instrument.h index 8c348f0..4665486 100644 --- a/src/base/Instrument.h +++ b/src/base/Instrument.h @@ -28,7 +28,7 @@ #include "XmlExportable.h" #include "MidiProgram.h" -// An Instrument connects a Track (which itself contains +// An Instrument connects a Track (which itself tqcontains // a list of Segments) to a device that can play that // Track. // @@ -220,7 +220,7 @@ public: // virtual std::string toXmlString(); - // Get and set the parent device + // Get and set the tqparent device // Device* getDevice() const { return m_device; } void setDevice(Device* dev) { m_device = dev; } @@ -263,7 +263,7 @@ private: Device *m_device; // Do we send at this intrument or do we leave these - // things up to the parent device and God? These are + // things up to the tqparent device and God? These are // directly relatable to GUI elements // bool m_sendBankSelect; diff --git a/src/base/LayoutEngine.h b/src/base/LayoutEngine.h index 179d119..2116013 100644 --- a/src/base/LayoutEngine.h +++ b/src/base/LayoutEngine.h @@ -31,7 +31,7 @@ class TimeSignature; /** - * Base classes for layout engines. The intention is that + * Base classes for tqlayout engines. The intention is that * different sorts of renderers (piano-roll, score etc) can be * implemented by simply plugging different implementations * of Staff and LayoutEngine into a single view class. @@ -58,9 +58,9 @@ public: timeT endTime = 0) = 0; /** - * Precomputes layout data for a single staff, updating any + * Precomputes tqlayout data for a single staff, updating any * internal data stores associated with that staff and updating - * any layout-related properties in the events on the staff's + * any tqlayout-related properties in the events on the staff's * segment. * * If startTime == endTime, act on the whole staff; otherwise only @@ -71,10 +71,10 @@ public: timeT endTime = 0) = 0; /** - * Computes any layout data that may depend on the results of + * Computes any tqlayout data that may depend on the results of * scanning more than one staff. This may mean doing most of - * the layout (likely for horizontal layout) or nothing at all - * (likely for vertical layout). + * the tqlayout (likely for horizontal tqlayout) or nothing at all + * (likely for vertical tqlayout). * * If startTime == endTime, act on the whole staff; otherwise only * the given section. @@ -82,7 +82,7 @@ public: virtual void finishLayout(timeT startTime = 0, timeT endTime = 0) = 0; - unsigned int getStatus() const { return m_status; } + unsigned int gettqStatus() const { return m_status; } protected: unsigned int m_status; @@ -97,9 +97,9 @@ public: virtual ~HorizontalLayoutEngine(); /** - * Sets a page width for the layout. + * Sets a page width for the tqlayout. * - * A layout implementation does not have to use this. Some might + * A tqlayout implementation does not have to use this. Some might * use it (for example) to ensure that bar lines fall precisely at * the right-hand margin of each page. The computed x-coordinates * will still require to be wrapped into lines by the staff or diff --git a/src/base/LegatoQuantizer.h b/src/base/LegatoQuantizer.h index 645da05..fee5360 100644 --- a/src/base/LegatoQuantizer.h +++ b/src/base/LegatoQuantizer.h @@ -19,8 +19,8 @@ COPYING included with this distribution for more information. */ -#ifndef LEGATO_QUANTIZER_H -#define LEGATO_QUANTIZER_H +#ifndef LEGATO_TQUANTIZER_H +#define LEGATO_TQUANTIZER_H #include "Quantizer.h" diff --git a/src/base/MidiProgram.h b/src/base/MidiProgram.h index e44f631..a5ab7a9 100644 --- a/src/base/MidiProgram.h +++ b/src/base/MidiProgram.h @@ -168,7 +168,7 @@ private: }; -// MidiFilter is a bitmask of MappedEvent::MappedEventType. +// MidiFilter is a bittqmask of MappedEvent::MappedEventType. // Look in sound/MappedEvent.h // typedef unsigned int MidiFilter; diff --git a/src/base/NotationQuantizer.cpp b/src/base/NotationQuantizer.cpp index 9e76a94..8f4b1e7 100644 --- a/src/base/NotationQuantizer.cpp +++ b/src/base/NotationQuantizer.cpp @@ -37,7 +37,7 @@ using std::cout; using std::cerr; using std::endl; -//#define DEBUG_NOTATION_QUANTIZER 1 +//#define DEBUG_NOTATION_TQUANTIZER 1 namespace Rosegarden { @@ -83,7 +83,7 @@ public: } virtual timeT getQuantizedAbsoluteTime(const Event *e) const { timeT t = m_impl->getProvisional((Event *)e, AbsoluteTimeValue); -#ifdef DEBUG_NOTATION_QUANTIZER +#ifdef DEBUG_NOTATION_TQUANTIZER cout << "ProvisionalQuantizer::getQuantizedAbsoluteTime: returning " << t << endl; #endif return t; @@ -295,7 +295,7 @@ NotationQuantizer::Impl::quantizeAbsoluteTime(Segment *s, Segment::iterator i) c long bestScore = 0; bool bestRight = false; -#ifdef DEBUG_NOTATION_QUANTIZER +#ifdef DEBUG_NOTATION_TQUANTIZER cout << "quantizeAbsoluteTime: t is " << t << ", d is " << d << endl; #endif @@ -321,7 +321,7 @@ NotationQuantizer::Impl::quantizeAbsoluteTime(Segment *s, Segment::iterator i) c } } -#ifdef DEBUG_NOTATION_QUANTIZER +#ifdef DEBUG_NOTATION_TQUANTIZER if (n != s->end() && n != nprime) { cout << "found n (distinct from nprime) at " << (*n)->getAbsoluteTime() << endl; } @@ -340,7 +340,7 @@ NotationQuantizer::Impl::quantizeAbsoluteTime(Segment *s, Segment::iterator i) c t, d, noteType, n, nprime, right); if (depth == 0 || score < bestScore) { -#ifdef DEBUG_NOTATION_QUANTIZER +#ifdef DEBUG_NOTATION_TQUANTIZER cout << " [*]"; #endif bestBase = base; @@ -348,13 +348,13 @@ NotationQuantizer::Impl::quantizeAbsoluteTime(Segment *s, Segment::iterator i) c bestRight = right; } -#ifdef DEBUG_NOTATION_QUANTIZER +#ifdef DEBUG_NOTATION_TQUANTIZER cout << endl; #endif } if (bestBase == -2) { -#ifdef DEBUG_NOTATION_QUANTIZER +#ifdef DEBUG_NOTATION_TQUANTIZER cout << "Quantizer::quantizeAbsoluteTime: weirdness: no snap found" << endl; #endif } else { @@ -373,7 +373,7 @@ NotationQuantizer::Impl::quantizeAbsoluteTime(Segment *s, Segment::iterator i) c t += sigTime; -#ifdef DEBUG_NOTATION_QUANTIZER +#ifdef DEBUG_NOTATION_TQUANTIZER cout << "snap base is " << bestBase << ", snapped to " << t << endl; #endif } @@ -457,7 +457,7 @@ NotationQuantizer::Impl::scoreAbsoluteTimeForBase(Segment *s, } } -#ifdef DEBUG_NOTATION_QUANTIZER +#ifdef DEBUG_NOTATION_TQUANTIZER cout << " depth/eff/dist/t/score/pen1/pen2/res: " << depth << "/" << effectiveDepth << "/" << distance << "/" << (right ? t + distance : t - distance) << "/" << score << "/" << penalty1 << "/" << penalty2 << "/" << (score * penalty1 * penalty2); if (right) cout << " -> "; else cout << " <- "; @@ -553,7 +553,7 @@ NotationQuantizer::Impl::quantizeDuration(Segment *s, Chord &c) const Profiler profiler("NotationQuantizer::Impl::quantizeDuration"); -#ifdef DEBUG_NOTATION_QUANTIZER +#ifdef DEBUG_NOTATION_TQUANTIZER cout << "quantizeDuration: chord has " << c.size() << " notes" << endl; #endif @@ -584,7 +584,7 @@ NotationQuantizer::Impl::quantizeDuration(Segment *s, Chord &c) const if ((**ci)->has(m_provisionalDuration) && (**ci)->has(BEAMED_GROUP_TUPLET_BASE)) { // dealt with already in tuplet code, we'd only mess it up here -#ifdef DEBUG_NOTATION_QUANTIZER +#ifdef DEBUG_NOTATION_TQUANTIZER cout << "not recalculating duration for tuplet" << endl; #endif continue; @@ -595,7 +595,7 @@ NotationQuantizer::Impl::quantizeDuration(Segment *s, Chord &c) const if (!m_contrapuntal) { // if not contrapuntal, give all notes in chord equal duration if (nonContrapuntalDuration > 0) { -#ifdef DEBUG_NOTATION_QUANTIZER +#ifdef DEBUG_NOTATION_TQUANTIZER cout << "setting duration trivially to " << nonContrapuntalDuration << endl; #endif setProvisional(**ci, DurationValue, nonContrapuntalDuration); @@ -613,7 +613,7 @@ NotationQuantizer::Impl::quantizeDuration(Segment *s, Chord &c) const timeT qt = getProvisional(**ci, AbsoluteTimeValue); -#ifdef DEBUG_NOTATION_QUANTIZER +#ifdef DEBUG_NOTATION_TQUANTIZER cout << "note at time " << (**ci)->getAbsoluteTime() << " (provisional time " << qt << ")" << endl; #endif @@ -626,7 +626,7 @@ NotationQuantizer::Impl::quantizeDuration(Segment *s, Chord &c) const base /= divisions[depth]; } -#ifdef DEBUG_NOTATION_QUANTIZER +#ifdef DEBUG_NOTATION_TQUANTIZER cout << "duration is " << ud << ", probably between " << bases.first << " and " << bases.second << endl; #endif @@ -645,7 +645,7 @@ NotationQuantizer::Impl::quantizeDuration(Segment *s, Chord &c) const qd = Note::getNearestNote(spaceAvailable).getDuration(); -#ifdef DEBUG_NOTATION_QUANTIZER +#ifdef DEBUG_NOTATION_TQUANTIZER cout << "non-contrapuntal segment, rounded duration down to " << qd << " (as only " << spaceAvailable << " available)" << endl; @@ -675,7 +675,7 @@ NotationQuantizer::Impl::quantizeDuration(Segment *s, Chord &c) const bases.second == absTimeBase) { if (nextNoteTime >= qt + bases.second) { -#ifdef DEBUG_NOTATION_QUANTIZER +#ifdef DEBUG_NOTATION_TQUANTIZER cout << "We rounded to " << qd << " but we're on " << absTimeBase << " absTimeBase" << " and the next base is " << bases.second @@ -699,14 +699,14 @@ NotationQuantizer::Impl::quantizeDuration(Segment *s, Chord &c) const if (note.getNoteType() < Note::Longest) { if (bases.second <= spaceAvailable) { -#ifdef DEBUG_NOTATION_QUANTIZER +#ifdef DEBUG_NOTATION_TQUANTIZER cout << "We rounded down to " << qd << " but have room for " << bases.second << ", rounding up again" << endl; #endif qd = bases.second; } else { -#ifdef DEBUG_NOTATION_QUANTIZER +#ifdef DEBUG_NOTATION_TQUANTIZER cout << "We rounded down to " << qd << "; can't fit " << bases.second << endl; #endif @@ -720,7 +720,7 @@ NotationQuantizer::Impl::quantizeDuration(Segment *s, Chord &c) const if (!m_contrapuntal) nonContrapuntalDuration = qd; } -#ifdef DEBUG_NOTATION_QUANTIZER +#ifdef DEBUG_NOTATION_TQUANTIZER cout << "totalFrac " << totalFrac << ", totalFracCount " << totalFracCount << ", avg " << (totalFracCount > 0 ? (totalFrac / totalFracCount) : 0) << endl; #endif } @@ -746,7 +746,7 @@ NotationQuantizer::Impl::scanTupletsInBar(Segment *s, if (depth >= 0) base /= divisions[depth]; if (base <= Note(Note::Semiquaver).getDuration()) break; -#ifdef DEBUG_NOTATION_QUANTIZER +#ifdef DEBUG_NOTATION_TQUANTIZER cout << "\nscanTupletsInBar: trying at depth " << depth << " (base " << base << ")" << endl; #endif @@ -766,7 +766,7 @@ NotationQuantizer::Impl::scanTupletsInBar(Segment *s, continue; } -#ifdef DEBUG_NOTATION_QUANTIZER +#ifdef DEBUG_NOTATION_TQUANTIZER cout << "scanTupletsInBar: testing " << tupletStart << "," << base << " at tuplet base " << tupletBase << endl; #endif @@ -786,7 +786,7 @@ NotationQuantizer::Impl::scanTupletsInBar(Segment *s, } if (jTime >= tupletEnd) { // nothing to make tuplets of -#ifdef DEBUG_NOTATION_QUANTIZER +#ifdef DEBUG_NOTATION_TQUANTIZER cout << "scanTupletsInBar: nothing here" << endl; #endif tupletStart = tupletEnd; @@ -827,14 +827,14 @@ NotationQuantizer::Impl::scanTupletsAt(Segment *s, if (!(*j)->isa(Note::EventType)) { ++j; continue; } -#ifdef DEBUG_NOTATION_QUANTIZER +#ifdef DEBUG_NOTATION_TQUANTIZER cout << "scanTupletsAt time " << jTime << " (unquantized " << (*j)->getAbsoluteTime() << "), found note" << endl; #endif // reject any group containing anything already a tuplet if ((*j)->has(BEAMED_GROUP_TUPLET_BASE)) { -#ifdef DEBUG_NOTATION_QUANTIZER +#ifdef DEBUG_NOTATION_TQUANTIZER cout << "already made tuplet here" << endl; #endif return; @@ -843,19 +843,19 @@ NotationQuantizer::Impl::scanTupletsAt(Segment *s, timeT originalBase; if (!(*j)->get<Int>(m_provisionalBase, originalBase)) { -#ifdef DEBUG_NOTATION_QUANTIZER +#ifdef DEBUG_NOTATION_TQUANTIZER cout << "some notes not provisionally quantized, no good" << endl; #endif return; } if (originalBase == base) { -#ifdef DEBUG_NOTATION_QUANTIZER +#ifdef DEBUG_NOTATION_TQUANTIZER cout << "accepting note at original base" << endl; #endif candidates.push_back(*j); } else if (((jTime - sigTime) % base) == 0) { -#ifdef DEBUG_NOTATION_QUANTIZER +#ifdef DEBUG_NOTATION_TQUANTIZER cout << "accepting note that happens to lie on original base" << endl; #endif candidates.push_back(*j); @@ -867,7 +867,7 @@ NotationQuantizer::Impl::scanTupletsAt(Segment *s, // any of the likelihood tests for tuplets. if (!isValidTupletAt(s, j, depth, base, sigTime, tupletBase)) { -#ifdef DEBUG_NOTATION_QUANTIZER +#ifdef DEBUG_NOTATION_TQUANTIZER cout << "no good" << endl; #endif return; @@ -883,13 +883,13 @@ NotationQuantizer::Impl::scanTupletsAt(Segment *s, // must have at least one note that is not already quantized to the // original base if (count < 1) { -#ifdef DEBUG_NOTATION_QUANTIZER +#ifdef DEBUG_NOTATION_TQUANTIZER cout << "scanTupletsAt: found no note not already quantized to " << base << endl; #endif return; } -#ifdef DEBUG_NOTATION_QUANTIZER +#ifdef DEBUG_NOTATION_TQUANTIZER cout << "scanTupletsAt: Tuplet group of duration " << base << " starting at " << tupletStart << endl; #endif @@ -970,7 +970,7 @@ NotationQuantizer::Impl::isValidTupletAt(Segment *s, timeT ud = m_q->getFromSource(*i, DurationValue); if (ud > (tupletBase * 5 / 4)) { -#ifdef DEBUG_NOTATION_QUANTIZER +#ifdef DEBUG_NOTATION_TQUANTIZER cout << "\nNotationQuantizer::isValidTupletAt: note too long at " << (*i)->getDuration() << " (tupletBase is " << tupletBase << ")" << endl; @@ -981,7 +981,7 @@ NotationQuantizer::Impl::isValidTupletAt(Segment *s, //!!! This bit is a cop-out. It means we reject anything that looks // like it's going to have rests in it. Bah. if (ud <= (tupletBase * 3 / 8)) { -#ifdef DEBUG_NOTATION_QUANTIZER +#ifdef DEBUG_NOTATION_TQUANTIZER cout << "\nNotationQuantizer::isValidTupletAt: note too short at " << (*i)->getDuration() << " (tupletBase is " << tupletBase << ")" << endl; @@ -1000,7 +1000,7 @@ NotationQuantizer::Impl::isValidTupletAt(Segment *s, bool dummy; long tupletScore = scoreAbsoluteTimeForBase (s, i, depth, tupletBase, sigTime, t, d, noteType, s->end(), s->end(), dummy); -#ifdef DEBUG_NOTATION_QUANTIZER +#ifdef DEBUG_NOTATION_TQUANTIZER cout << "\nNotationQuantizer::isValidTupletAt: score " << score << " vs tupletScore " << tupletScore << endl; #endif @@ -1027,7 +1027,7 @@ NotationQuantizer::Impl::quantizeRange(Segment *s, int events = 0, notes = 0, passes = 0; int setGood = 0, setBad = 0; -#ifdef DEBUG_NOTATION_QUANTIZER +#ifdef DEBUG_NOTATION_TQUANTIZER cout << "NotationQuantizer::Impl::quantizeRange: from time " << (from == s->end() ? -1 : (*from)->getAbsoluteTime()) << " to " @@ -1177,7 +1177,7 @@ NotationQuantizer::Impl::quantizeRange(Segment *s, (*i)->getDuration() == d) ++setBad; else ++setGood; -#ifdef DEBUG_NOTATION_QUANTIZER +#ifdef DEBUG_NOTATION_TQUANTIZER cout << "Setting to target at " << t << "," << d << endl; #endif diff --git a/src/base/NotationQuantizer.h b/src/base/NotationQuantizer.h index 87b0d72..02c1c59 100644 --- a/src/base/NotationQuantizer.h +++ b/src/base/NotationQuantizer.h @@ -19,8 +19,8 @@ COPYING included with this distribution for more information. */ -#ifndef NOTATION_QUANTIZER_H_ -#define NOTATION_QUANTIZER_H_ +#ifndef NOTATION_TQUANTIZER_H_ +#define NOTATION_TQUANTIZER_H_ #include "Quantizer.h" diff --git a/src/base/Quantizer.cpp b/src/base/Quantizer.cpp index c0e4d1b..7b90c61 100644 --- a/src/base/Quantizer.cpp +++ b/src/base/Quantizer.cpp @@ -37,7 +37,7 @@ using std::cout; using std::cerr; using std::endl; -//#define DEBUG_NOTATION_QUANTIZER 1 +//#define DEBUG_NOTATION_TQUANTIZER 1 namespace Rosegarden { @@ -366,7 +366,7 @@ Quantizer::setToTarget(Segment *s, Segment::iterator i, // that are already being referred to in ViewElementLists, // preventing us from locating them in the ViewElementLists // because their ordering would have silently changed -#ifdef DEBUG_NOTATION_QUANTIZER +#ifdef DEBUG_NOTATION_TQUANTIZER cout << "Quantizer: setting " << absTime << " to notation absolute time and " << duration << " to notation duration" << endl; @@ -404,7 +404,7 @@ Quantizer::setToTarget(Segment *s, Segment::iterator i, m_toInsert.push_back(e); } -#ifdef DEBUG_NOTATION_QUANTIZER +#ifdef DEBUG_NOTATION_TQUANTIZER cout << "m_toInsert.size() is now " << m_toInsert.size() << endl; #endif } @@ -464,7 +464,7 @@ Quantizer::insertNewEvents(Segment *s) const s->insert(m_toInsert[i]); } -#ifdef DEBUG_NOTATION_QUANTIZER +#ifdef DEBUG_NOTATION_TQUANTIZER cout << "Quantizer::insertNewEvents: sz is " << sz << ", minTime " << minTime << ", maxTime " << maxTime << endl; @@ -482,7 +482,7 @@ Quantizer::insertNewEvents(Segment *s) const } } -#ifdef DEBUG_NOTATION_QUANTIZER +#ifdef DEBUG_NOTATION_TQUANTIZER cout << "Quantizer: calling normalizeRests(" << minTime << ", " << maxTime << ")" << endl; #endif diff --git a/src/base/Quantizer.h b/src/base/Quantizer.h index 407b651..035299c 100644 --- a/src/base/Quantizer.h +++ b/src/base/Quantizer.h @@ -19,8 +19,8 @@ COPYING included with this distribution for more information. */ -#ifndef QUANTIZER_H -#define QUANTIZER_H +#ifndef TQUANTIZER_H +#define TQUANTIZER_H #include "Segment.h" #include "Event.h" diff --git a/src/base/RefreshStatus.h b/src/base/RefreshStatus.h index 4c39a18..f64a72c 100644 --- a/src/base/RefreshStatus.h +++ b/src/base/RefreshStatus.h @@ -26,10 +26,10 @@ namespace Rosegarden { -class RefreshStatus +class RefreshtqStatus { public: - RefreshStatus() : m_needsRefresh(true) {} + RefreshtqStatus() : m_needsRefresh(true) {} bool needsRefresh() { return m_needsRefresh; } void setNeedsRefresh(bool s) { m_needsRefresh = s; } @@ -44,7 +44,7 @@ class RefreshStatusArray public: unsigned int getNewRefreshStatusId(); size_t size() { return m_refreshStatuses.size(); } - RS& getRefreshStatus(unsigned int id) { return m_refreshStatuses[id]; } + RS& getRefreshtqStatus(unsigned int id) { return m_refreshStatuses[id]; } void updateRefreshStatuses(); protected: diff --git a/src/base/Segment.cpp b/src/base/Segment.cpp index 2f65acd..c8e3018 100644 --- a/src/base/Segment.cpp +++ b/src/base/Segment.cpp @@ -352,7 +352,7 @@ void Segment::updateRefreshStatuses(timeT startTime, timeT endTime) { for(unsigned int i = 0; i < m_refreshStatusArray.size(); ++i) - m_refreshStatusArray.getRefreshStatus(i).push(startTime, endTime); + m_refreshStatusArray.getRefreshtqStatus(i).push(startTime, endTime); } @@ -1269,7 +1269,7 @@ SegmentHelper::~SegmentHelper() { } void -SegmentRefreshStatus::push(timeT from, timeT to) +SegmentRefreshtqStatus::push(timeT from, timeT to) { if (!needsRefresh()) { // don't do anything subtle - just erase the old data diff --git a/src/base/Segment.h b/src/base/Segment.h index 564d118..ac6e092 100644 --- a/src/base/Segment.h +++ b/src/base/Segment.h @@ -37,10 +37,10 @@ namespace Rosegarden { -class SegmentRefreshStatus : public RefreshStatus +class SegmentRefreshtqStatus : public RefreshtqStatus { public: - SegmentRefreshStatus() : m_from(0), m_to(0) {} + SegmentRefreshtqStatus() : m_from(0), m_to(0) {} void push(timeT from, timeT to); @@ -283,7 +283,7 @@ public: ////// // - // QUANTIZATION + // TQUANTIZATION /** * Switch quantization on or off. @@ -616,8 +616,8 @@ public: return m_refreshStatusArray.getNewRefreshStatusId(); } - SegmentRefreshStatus &getRefreshStatus(unsigned int id) { - return m_refreshStatusArray.getRefreshStatus(id); + SegmentRefreshtqStatus &getRefreshtqStatus(unsigned int id) { + return m_refreshStatusArray.getRefreshtqStatus(id); } void updateRefreshStatuses(timeT startTime, timeT endTime); @@ -657,7 +657,7 @@ private: int m_highestPlayable; // suggestion for highest playable note (notation) int m_lowestPlayable; // suggestion for lowest playable note (notation) - RefreshStatusArray<SegmentRefreshStatus> m_refreshStatusArray; + RefreshStatusArray<SegmentRefreshtqStatus> m_refreshStatusArray; struct ClefKeyCmp { bool operator()(const Event *e1, const Event *e2) const; diff --git a/src/base/SegmentNotationHelper.cpp b/src/base/SegmentNotationHelper.cpp index a6c8ab8..c942cf4 100644 --- a/src/base/SegmentNotationHelper.cpp +++ b/src/base/SegmentNotationHelper.cpp @@ -953,7 +953,7 @@ SegmentNotationHelper::insertSomething(iterator i, int duration, if (needToSplit) { //!!! This is not quite right for rests. Because they - //replace (rather than chording with) any events already + //tqreplace (rather than chording with) any events already //present, they don't need to be split in the case where //their duration spans several note-events. Worry about //that later, I guess. We're actually getting enough @@ -1125,7 +1125,7 @@ SegmentNotationHelper::deleteNote(Event *e, bool collapseRest) // or start after this one starts but before it ends, then we go // for the delete-event-and-normalize-rests option. Otherwise // (the notationally simpler case) we go for the - // replace-note-by-rest option. We still lose in the case where + // tqreplace-note-by-rest option. We still lose in the case where // another note starts before this one, overlaps it, but then also // ends before it does -- but I think we can live with that. @@ -1767,7 +1767,7 @@ SegmentNotationHelper::removeRests(timeT time, timeT &duration, bool testOnly) segment().erase(from, to); // we must defer calling makeRestViable() until after erase, - // because it will invalidate 'to' + // because it will tqinvalidate 'to' // if (checkLastRest) makeRestViable(lastEvent); diff --git a/src/base/SegmentNotationHelper.h b/src/base/SegmentNotationHelper.h index 5094929..ed8abf1 100644 --- a/src/base/SegmentNotationHelper.h +++ b/src/base/SegmentNotationHelper.h @@ -188,7 +188,7 @@ public: * * @return iterator pointing at the last inserted event. Also * modifies from to point at the first split event (the original - * iterator would have been invalidated). + * iterator would have been tqinvalidated). */ iterator splitIntoTie(iterator &from, iterator to, timeT baseDuration); @@ -205,7 +205,7 @@ public: * * @return iterator pointing at the last inserted event. Also * modifies i to point at the first split event (the original - * iterator would have been invalidated). + * iterator would have been tqinvalidated). */ iterator splitIntoTie(iterator &i, timeT baseDuration); diff --git a/src/base/Selection.cpp b/src/base/Selection.cpp index 6e5ca2f..3402915 100644 --- a/src/base/Selection.cpp +++ b/src/base/Selection.cpp @@ -99,7 +99,7 @@ void EventSelection::addEvent(Event *e) timeT eventDuration = e->getDuration(); if (eventDuration == 0) eventDuration = 1; - if (contains(e)) return; + if (tqcontains(e)) return; if (e->getAbsoluteTime() < m_beginTime || !m_haveRealStartTime) { m_beginTime = e->getAbsoluteTime(); @@ -115,7 +115,7 @@ void EventSelection::addFromSelection(EventSelection *sel) { for (eventcontainer::iterator i = sel->getSegmentEvents().begin(); i != sel->getSegmentEvents().end(); ++i) { - if (!contains(*i)) addEvent(*i); + if (!tqcontains(*i)) addEvent(*i); } } @@ -134,7 +134,7 @@ void EventSelection::removeEvent(Event *e) } } -bool EventSelection::contains(Event *e) const +bool EventSelection::tqcontains(Event *e) const { std::pair<eventcontainer::const_iterator, eventcontainer::const_iterator> interval = m_segmentEvents.equal_range(e); @@ -148,7 +148,7 @@ bool EventSelection::contains(Event *e) const return false; } -bool EventSelection::contains(const std::string &type) const +bool EventSelection::tqcontains(const std::string &type) const { for (eventcontainer::const_iterator i = m_segmentEvents.begin(); i != m_segmentEvents.end(); ++i) { @@ -173,13 +173,13 @@ EventSelection::getRanges() const while (j != k) { - for (j = i; j != k && contains(*j); ++j); + for (j = i; j != k && tqcontains(*j); ++j); if (j != i) { ranges.push_back(RangeList::value_type(i, j)); } - for (i = j; i != k && !contains(*i); ++i); + for (i = j; i != k && !tqcontains(*i); ++i); j = i; } @@ -210,7 +210,7 @@ EventSelection::getRangeTimes() const void EventSelection::eventRemoved(const Segment *s, Event *e) { - if (s == &m_originalSegment /*&& contains(e)*/) { + if (s == &m_originalSegment /*&& tqcontains(e)*/) { removeEvent(e); } } diff --git a/src/base/Selection.h b/src/base/Selection.h index 93ce4b4..c0a3c7b 100644 --- a/src/base/Selection.h +++ b/src/base/Selection.h @@ -82,13 +82,13 @@ public: * Test whether a given Event (in the Segment) is part of * this selection. */ - bool contains(Event *e) const; + bool tqcontains(Event *e) const; /** * Return true if there are any events of the given type in * this selection. Slow. */ - bool contains(const std::string &eventType) const; + bool tqcontains(const std::string &eventType) const; /** * Return the time at which the first Event in the selection diff --git a/src/base/Sets.h b/src/base/Sets.h index 4fe14d1..9884207 100644 --- a/src/base/Sets.h +++ b/src/base/Sets.h @@ -103,7 +103,7 @@ public: Iterator getHighestNote() const { return m_highest; } Iterator getLowestNote() const { return m_lowest; } - virtual bool contains(const Iterator &) const = 0; + virtual bool tqcontains(const Iterator &) const = 0; /// Return the pointed-to element, in Event form (public to work around gcc-2.95 bug) static Event *getAsEvent(const Iterator &i); @@ -175,7 +175,7 @@ public: virtual int getMarkCountForChord() const; virtual std::vector<Mark> getMarksForChord() const; virtual std::vector<int> getPitches() const; - virtual bool contains(const Iterator &) const; + virtual bool tqcontains(const Iterator &) const; /** * Return an iterator pointing to the previous note before this @@ -622,7 +622,7 @@ GenericChord<Element, Container, singleStaff>::getPitches() const template <class Element, class Container, bool singleStaff> bool -GenericChord<Element, Container, singleStaff>::contains(const Iterator &itr) const +GenericChord<Element, Container, singleStaff>::tqcontains(const Iterator &itr) const { for (typename std::vector<typename Container::iterator>::const_iterator i = std::vector<typename Container::iterator>::begin(); diff --git a/src/base/TriggerSegment.cpp b/src/base/TriggerSegment.cpp index c4c29de..bcf6888 100644 --- a/src/base/TriggerSegment.cpp +++ b/src/base/TriggerSegment.cpp @@ -47,7 +47,7 @@ TriggerSegmentRec::TriggerSegmentRec(TriggerSegmentId id, m_defaultRetune(retune) { if (m_defaultTimeAdjust == "") { - m_defaultTimeAdjust = BaseProperties::TRIGGER_SEGMENT_ADJUST_SQUISH; + m_defaultTimeAdjust = BaseProperties::TRIGGER_SEGMENT_ADJUST_STQUISH; } calculateBases(); diff --git a/src/base/ViewElement.cpp b/src/base/ViewElement.cpp index 425bdc1..c62aef5 100644 --- a/src/base/ViewElement.cpp +++ b/src/base/ViewElement.cpp @@ -29,8 +29,8 @@ namespace Rosegarden extern const int MIN_SUBORDERING; ViewElement::ViewElement(Event *e) : - m_layoutX(0.0), - m_layoutY(0.0), + m_tqlayoutX(0.0), + m_tqlayoutY(0.0), m_event(e) { // nothing diff --git a/src/base/ViewElement.h b/src/base/ViewElement.h index 8cc3d09..f898e51 100644 --- a/src/base/ViewElement.h +++ b/src/base/ViewElement.h @@ -53,33 +53,33 @@ public: /** * Returns the X coordinate of the element, as computed by the - * layout. This is not the coordinate of the associated canvas + * tqlayout. This is not the coordinate of the associated canvas * item. * * @see getCanvasX() */ - virtual double getLayoutX() const { return m_layoutX; } + virtual double getLayoutX() const { return m_tqlayoutX; } /** * Returns the Y coordinate of the element, as computed by the - * layout. This is not the coordinate of the associated canvas + * tqlayout. This is not the coordinate of the associated canvas * item. * * @see getCanvasY() */ - virtual double getLayoutY() const { return m_layoutY; } + virtual double getLayoutY() const { return m_tqlayoutY; } /** - * Sets the X coordinate which was computed by the layout engine + * Sets the X coordinate which was computed by the tqlayout engine * @see getLayoutX() */ - virtual void setLayoutX(double x) { m_layoutX = x; } + virtual void setLayoutX(double x) { m_tqlayoutX = x; } /** - * Sets the Y coordinate which was computed by the layout engine + * Sets the Y coordinate which was computed by the tqlayout engine * @see getLayoutY() */ - virtual void setLayoutY(double y) { m_layoutY = y; } + virtual void setLayoutY(double y) { m_tqlayoutY = y; } void dump(std::ostream&) const; @@ -88,8 +88,8 @@ public: protected: ViewElement(Event *); - double m_layoutX; - double m_layoutY; + double m_tqlayoutX; + double m_tqlayoutY; Event *m_event; }; diff --git a/src/base/test/seq/complainer.c b/src/base/test/seq/complainer.c index afe0a7f..2f74eb7 100644 --- a/src/base/test/seq/complainer.c +++ b/src/base/test/seq/complainer.c @@ -12,7 +12,7 @@ callback(snd_seq_t *handle) do { if (snd_seq_event_input(handle, &ev) > 0) { - if (ev->type == SND_SEQ_EVENT_NOTEON) { + if (ev->type == SND_SETQ_EVENT_NOTEON) { struct timeval tv; static long last_usec = 0; @@ -40,7 +40,7 @@ main(int argc, char **argv) struct pollfd *pfd; struct sched_param param; - if (snd_seq_open(&handle, "hw", SND_SEQ_OPEN_DUPLEX, 0) < 0) { + if (snd_seq_open(&handle, "hw", SND_SETQ_OPEN_DUPLEX, 0) < 0) { fprintf(stderr, "failed to open ALSA sequencer interface\n"); return 1; } @@ -49,7 +49,7 @@ main(int argc, char **argv) if ((portid = snd_seq_create_simple_port (handle, "complainer", - SND_SEQ_PORT_CAP_WRITE | SND_SEQ_PORT_CAP_SUBS_WRITE, 0)) < 0) { + SND_SETQ_PORT_CAP_WRITE | SND_SETQ_PORT_CAP_SUBS_WRITE, 0)) < 0) { fprintf(stderr, "failed to create ALSA sequencer port\n"); return 1; } diff --git a/src/base/test/seq/generator.c b/src/base/test/seq/generator.c index 9f64d61..3b7ea72 100644 --- a/src/base/test/seq/generator.c +++ b/src/base/test/seq/generator.c @@ -23,7 +23,7 @@ main(int argc, char **argv) } target = atoi(argv[1]); - if (snd_seq_open(&handle, "hw", SND_SEQ_OPEN_DUPLEX, 0) < 0) { + if (snd_seq_open(&handle, "hw", SND_SETQ_OPEN_DUPLEX, 0) < 0) { fprintf(stderr, "failed to open ALSA sequencer interface\n"); return 1; } @@ -32,7 +32,7 @@ main(int argc, char **argv) if ((portid = snd_seq_create_simple_port (handle, "generator", - SND_SEQ_PORT_CAP_READ | SND_SEQ_PORT_CAP_SUBS_READ, 0)) < 0) { + SND_SETQ_PORT_CAP_READ | SND_SETQ_PORT_CAP_SUBS_READ, 0)) < 0) { fprintf(stderr, "failed to create ALSA sequencer port\n"); return 1; } diff --git a/src/base/test/seq/queue-timer-jack.c b/src/base/test/seq/queue-timer-jack.c index 2648e94..8a2cb55 100644 --- a/src/base/test/seq/queue-timer-jack.c +++ b/src/base/test/seq/queue-timer-jack.c @@ -63,7 +63,7 @@ main(int argc, char **argv) sample_rate = jack_get_sample_rate(jclient); - if (snd_seq_open(&handle, "hw", SND_SEQ_OPEN_DUPLEX, 0) < 0) { + if (snd_seq_open(&handle, "hw", SND_SETQ_OPEN_DUPLEX, 0) < 0) { fprintf(stderr, "failed to open ALSA sequencer interface\n"); return 1; } @@ -72,7 +72,7 @@ main(int argc, char **argv) if ((portid = snd_seq_create_simple_port (handle, "generator", - SND_SEQ_PORT_CAP_READ | SND_SEQ_PORT_CAP_SUBS_READ, 0)) < 0) { + SND_SETQ_PORT_CAP_READ | SND_SETQ_PORT_CAP_SUBS_READ, 0)) < 0) { fprintf(stderr, "failed to create ALSA sequencer port\n"); return 1; } diff --git a/src/base/test/seq/queue-timer.c b/src/base/test/seq/queue-timer.c index 2b7bac4..1d4ae30 100644 --- a/src/base/test/seq/queue-timer.c +++ b/src/base/test/seq/queue-timer.c @@ -32,7 +32,7 @@ main(int argc, char **argv) snd_seq_queue_timer_t *timer; snd_timer_id_t *timerid; - if (snd_seq_open(&handle, "hw", SND_SEQ_OPEN_DUPLEX, 0) < 0) { + if (snd_seq_open(&handle, "hw", SND_SETQ_OPEN_DUPLEX, 0) < 0) { fprintf(stderr, "failed to open ALSA sequencer interface\n"); return 1; } @@ -41,7 +41,7 @@ main(int argc, char **argv) if ((portid = snd_seq_create_simple_port (handle, "generator", - SND_SEQ_PORT_CAP_READ | SND_SEQ_PORT_CAP_SUBS_READ, 0)) < 0) { + SND_SETQ_PORT_CAP_READ | SND_SETQ_PORT_CAP_SUBS_READ, 0)) < 0) { fprintf(stderr, "failed to create ALSA sequencer port\n"); return 1; } diff --git a/src/commands/edit/CopyCommand.cpp b/src/commands/edit/CopyCommand.cpp index cd86359..34534db 100644 --- a/src/commands/edit/CopyCommand.cpp +++ b/src/commands/edit/CopyCommand.cpp @@ -57,11 +57,11 @@ CopyCommand::CopyCommand(SegmentSelection &selection, for (SegmentSelection::iterator i = selection.begin(); i != selection.end(); ++i) { TQString newLabel = strtoqstr((*i)->getLabel()); - if (newLabel.contains(i18n("(copied)"))) { + if (newLabel.tqcontains(i18n("(copied)"))) { m_sourceClipboard->newSegment(*i); } else { m_sourceClipboard->newSegment(*i)-> - setLabel(qstrtostr(i18n("%1 (copied)").arg(newLabel))); + setLabel(qstrtostr(i18n("%1 (copied)").tqarg(newLabel))); } } } diff --git a/src/commands/edit/EraseCommand.cpp b/src/commands/edit/EraseCommand.cpp index 246eb5f..3a3df26 100644 --- a/src/commands/edit/EraseCommand.cpp +++ b/src/commands/edit/EraseCommand.cpp @@ -38,7 +38,7 @@ namespace Rosegarden EraseCommand::EraseCommand(EventSelection &selection) : BasicSelectionCommand(getGlobalName(), selection, true), m_selection(&selection), - m_relayoutEndTime(getEndTime()) + m_retqlayoutEndTime(getEndTime()) { // nothing else } @@ -56,7 +56,7 @@ EraseCommand::modifySegment() if ((*i)->isa(Clef::EventType) || (*i)->isa(Key ::EventType)) { - m_relayoutEndTime = getSegment().getEndTime(); + m_retqlayoutEndTime = getSegment().getEndTime(); } // We used to do this by calling SegmentNotationHelper::deleteEvent @@ -78,9 +78,9 @@ EraseCommand::modifySegment() } timeT -EraseCommand::getRelayoutEndTime() +EraseCommand::getRetqlayoutEndTime() { - return m_relayoutEndTime; + return m_retqlayoutEndTime; } } diff --git a/src/commands/edit/EraseCommand.h b/src/commands/edit/EraseCommand.h index a662640..e54139b 100644 --- a/src/commands/edit/EraseCommand.h +++ b/src/commands/edit/EraseCommand.h @@ -49,14 +49,14 @@ public: static TQString getGlobalName() { return i18n("&Erase"); } - virtual timeT getRelayoutEndTime(); + virtual timeT getRetqlayoutEndTime(); protected: virtual void modifySegment(); private: EventSelection *m_selection;// only used on 1st execute (cf bruteForceRedo) - timeT m_relayoutEndTime; + timeT m_retqlayoutEndTime; }; diff --git a/src/commands/edit/EventQuantizeCommand.cpp b/src/commands/edit/EventQuantizeCommand.cpp index 95943ba..de033ef 100644 --- a/src/commands/edit/EventQuantizeCommand.cpp +++ b/src/commands/edit/EventQuantizeCommand.cpp @@ -106,7 +106,7 @@ EventQuantizeCommand::~EventQuantizeCommand() delete m_quantizer; } -QString +TQString EventQuantizeCommand::getGlobalName(Quantizer *quantizer) { if (quantizer) { diff --git a/src/commands/edit/EventQuantizeCommand.h b/src/commands/edit/EventQuantizeCommand.h index 0d50678..aa9dd58 100644 --- a/src/commands/edit/EventQuantizeCommand.h +++ b/src/commands/edit/EventQuantizeCommand.h @@ -23,8 +23,8 @@ COPYING included with this distribution for more information. */ -#ifndef _RG_EVENQUANTIZECOMMAND_H_ -#define _RG_EVENQUANTIZECOMMAND_H_ +#ifndef _RG_EVENTQUANTIZECOMMAND_H_ +#define _RG_EVENTQUANTIZECOMMAND_H_ #include "document/BasicCommand.h" #include <tqobject.h> @@ -45,6 +45,7 @@ class EventSelection; class EventQuantizeCommand : public TQObject, public BasicCommand { Q_OBJECT + TQ_OBJECT public: /// Quantizer must be on heap (EventQuantizeCommand dtor will delete) diff --git a/src/commands/edit/EventUnquantizeCommand.cpp b/src/commands/edit/EventUnquantizeCommand.cpp index 7e7ce58..3fe2eb2 100644 --- a/src/commands/edit/EventUnquantizeCommand.cpp +++ b/src/commands/edit/EventUnquantizeCommand.cpp @@ -67,7 +67,7 @@ EventUnquantizeCommand::~EventUnquantizeCommand() delete m_quantizer; } -QString +TQString EventUnquantizeCommand::getGlobalName(Quantizer *) { /*!!! diff --git a/src/commands/edit/EventUnquantizeCommand.h b/src/commands/edit/EventUnquantizeCommand.h index 4203726..9bb2718 100644 --- a/src/commands/edit/EventUnquantizeCommand.h +++ b/src/commands/edit/EventUnquantizeCommand.h @@ -23,8 +23,8 @@ COPYING included with this distribution for more information. */ -#ifndef _RG_EVENTUNQUANTIZECOMMAND_H_ -#define _RG_EVENTUNQUANTIZECOMMAND_H_ +#ifndef _RG_EVENTUNTQUANTIZECOMMAND_H_ +#define _RG_EVENTUNTQUANTIZECOMMAND_H_ #include "document/BasicCommand.h" #include <tqstring.h> diff --git a/src/commands/edit/MoveAcrossSegmentsCommand.cpp b/src/commands/edit/MoveAcrossSegmentsCommand.cpp index f0b954a..ed73360 100644 --- a/src/commands/edit/MoveAcrossSegmentsCommand.cpp +++ b/src/commands/edit/MoveAcrossSegmentsCommand.cpp @@ -67,7 +67,7 @@ MoveAcrossSegmentsCommand::~MoveAcrossSegmentsCommand() delete m_clipboard; } -QString +TQString MoveAcrossSegmentsCommand::getGlobalName() { return i18n("&Move Events to Other Segment"); diff --git a/src/commands/edit/MoveCommand.cpp b/src/commands/edit/MoveCommand.cpp index 58667fc..aa6b891 100644 --- a/src/commands/edit/MoveCommand.cpp +++ b/src/commands/edit/MoveCommand.cpp @@ -52,7 +52,7 @@ MoveCommand::MoveCommand(Segment &s, timeT delta, bool useNotationTimings, // nothing else } -QString +TQString MoveCommand::getGlobalName(timeT delta) { if (delta == 0) { diff --git a/src/commands/edit/PasteEventsCommand.cpp b/src/commands/edit/PasteEventsCommand.cpp index 2e2e458..9b84ee7 100644 --- a/src/commands/edit/PasteEventsCommand.cpp +++ b/src/commands/edit/PasteEventsCommand.cpp @@ -47,14 +47,14 @@ PasteEventsCommand::PasteEventsCommand(Segment &segment, PasteType pasteType) : BasicCommand(getGlobalName(), segment, pasteTime, getEffectiveEndTime(segment, clipboard, pasteTime)), - m_relayoutEndTime(getEndTime()), + m_retqlayoutEndTime(getEndTime()), m_clipboard(new Clipboard(*clipboard)), m_pasteType(pasteType), m_pastedEvents(segment) { if (pasteType != OpenAndPaste) { - // paste clef or key -> relayout to end + // paste clef or key -> retqlayout to end if (clipboard->isSingleSegment()) { @@ -62,7 +62,7 @@ PasteEventsCommand::PasteEventsCommand(Segment &segment, for (Segment::iterator i = s->begin(); i != s->end(); ++i) { if ((*i)->isa(Clef::EventType) || (*i)->isa(Key::EventType)) { - m_relayoutEndTime = s->getEndTime(); + m_retqlayoutEndTime = s->getEndTime(); break; } } @@ -76,7 +76,7 @@ PasteEventsCommand::PasteEventsCommand(Segment &segment, timeT pasteEndTime, PasteType pasteType) : BasicCommand(getGlobalName(), segment, pasteTime, pasteEndTime), - m_relayoutEndTime(getEndTime()), + m_retqlayoutEndTime(getEndTime()), m_clipboard(new Clipboard(*clipboard)), m_pasteType(pasteType), m_pastedEvents(segment) @@ -138,9 +138,9 @@ PasteEventsCommand::getEffectiveEndTime(Segment &segment, } timeT -PasteEventsCommand::getRelayoutEndTime() +PasteEventsCommand::getRetqlayoutEndTime() { - return m_relayoutEndTime; + return m_retqlayoutEndTime; } bool diff --git a/src/commands/edit/PasteEventsCommand.h b/src/commands/edit/PasteEventsCommand.h index 66aea6d..2817d84 100644 --- a/src/commands/edit/PasteEventsCommand.h +++ b/src/commands/edit/PasteEventsCommand.h @@ -60,7 +60,7 @@ public: static PasteTypeMap getPasteTypes(); // type, descrip /** - * Construct a Paste command from a clipboard that already contains + * Construct a Paste command from a clipboard that already tqcontains * the events to be pasted. */ PasteEventsCommand(Segment &segment, @@ -92,14 +92,14 @@ public: /// Determine whether this paste will succeed (without executing it yet) bool isPossible(); - virtual timeT getRelayoutEndTime(); + virtual timeT getRetqlayoutEndTime(); protected: virtual void modifySegment(); timeT getEffectiveEndTime(Segment &, Clipboard *, timeT); - timeT m_relayoutEndTime; + timeT m_retqlayoutEndTime; Clipboard *m_clipboard; PasteType m_pasteType; EventSelection m_pastedEvents; diff --git a/src/commands/edit/SetLyricsCommand.cpp b/src/commands/edit/SetLyricsCommand.cpp index cfee2bf..f10d746 100644 --- a/src/commands/edit/SetLyricsCommand.cpp +++ b/src/commands/edit/SetLyricsCommand.cpp @@ -106,7 +106,7 @@ SetLyricsCommand::execute() std::pair<timeT, timeT> barRange = comp->getBarRange(barNo++); TQString syllables = *bsi; - syllables.replace(TQRegExp("\\[\\d+\\] "), " "); + syllables.tqreplace(TQRegExp("\\[\\d+\\] "), " "); TQStringList syllableList = TQStringList::split(" ", syllables); // no empties i = m_segment->findTime(barRange.first); @@ -131,7 +131,7 @@ SetLyricsCommand::execute() } TQString syllable = *ssi; - syllable.replace(TQRegExp("~"), " "); + syllable.tqreplace(TQRegExp("~"), " "); syllable = syllable.simplifyWhiteSpace(); if (syllable == "") continue; diff --git a/src/commands/matrix/MatrixEraseCommand.cpp b/src/commands/matrix/MatrixEraseCommand.cpp index c35259e..3285e84 100644 --- a/src/commands/matrix/MatrixEraseCommand.cpp +++ b/src/commands/matrix/MatrixEraseCommand.cpp @@ -44,14 +44,14 @@ MatrixEraseCommand::MatrixEraseCommand(Segment &segment, event->getAbsoluteTime() + event->getDuration(), true), m_event(event), - m_relayoutEndTime(getEndTime()) + m_retqlayoutEndTime(getEndTime()) { // nothing } -timeT MatrixEraseCommand::getRelayoutEndTime() +timeT MatrixEraseCommand::getRetqlayoutEndTime() { - return m_relayoutEndTime; + return m_retqlayoutEndTime; } void MatrixEraseCommand::modifySegment() diff --git a/src/commands/matrix/MatrixEraseCommand.h b/src/commands/matrix/MatrixEraseCommand.h index 244c0f9..9e126a4 100644 --- a/src/commands/matrix/MatrixEraseCommand.h +++ b/src/commands/matrix/MatrixEraseCommand.h @@ -45,13 +45,13 @@ public: MatrixEraseCommand(Segment &segment, Event *event); - virtual timeT getRelayoutEndTime(); + virtual timeT getRetqlayoutEndTime(); protected: virtual void modifySegment(); Event *m_event; // only used on 1st execute (cf bruteForceRedo) - timeT m_relayoutEndTime; + timeT m_retqlayoutEndTime; }; //------------------------------ diff --git a/src/commands/notation/AddFingeringMarkCommand.cpp b/src/commands/notation/AddFingeringMarkCommand.cpp index e8031ff..49ec03c 100644 --- a/src/commands/notation/AddFingeringMarkCommand.cpp +++ b/src/commands/notation/AddFingeringMarkCommand.cpp @@ -38,7 +38,7 @@ namespace Rosegarden { -QString +TQString AddFingeringMarkCommand::getGlobalName(TQString fingering) { if (fingering == "") @@ -46,7 +46,7 @@ AddFingeringMarkCommand::getGlobalName(TQString fingering) else if (fingering == "0") return i18n("Add Fingering &0 (Thumb)"); else - return i18n("Add Fingering &%1").arg(fingering); + return i18n("Add Fingering &%1").tqarg(fingering); } void @@ -84,7 +84,7 @@ AddFingeringMarkCommand::modifySegment() for (Chord::iterator ci = chord.begin(); ci != chord.end(); ++ci) { - if (!m_selection->contains(**ci)) + if (!m_selection->tqcontains(**ci)) continue; if (attempt < 2 && @@ -104,7 +104,7 @@ AddFingeringMarkCommand::modifySegment() break; for (Chord::iterator ci = chord.begin(); ci != chord.end(); ++ci) { - if (m_selection->contains(**ci)) { + if (m_selection->tqcontains(**ci)) { Marks::removeMark (***ci, Marks::getFingeringMark(***ci)); diff --git a/src/commands/notation/AddIndicationCommand.cpp b/src/commands/notation/AddIndicationCommand.cpp index 73aceb6..fd24930 100644 --- a/src/commands/notation/AddIndicationCommand.cpp +++ b/src/commands/notation/AddIndicationCommand.cpp @@ -138,7 +138,7 @@ AddIndicationCommand::modifySegment() } } -QString +TQString AddIndicationCommand::getGlobalName(std::string indicationType) { if (indicationType == Indication::Slur) { @@ -164,7 +164,7 @@ AddIndicationCommand::getGlobalName(std::string indicationType) return i18n("Add &Glissando"); } - TQString n = i18n("Add &%1%2").arg((char)toupper(indicationType[0])).arg(strtoqstr(indicationType.substr(1))); + TQString n = i18n("Add &%1%2").tqarg((char)toupper(indicationType[0])).tqarg(strtoqstr(indicationType.substr(1))); return n; } diff --git a/src/commands/notation/AddIndicationCommand.h b/src/commands/notation/AddIndicationCommand.h index 396a488..1b31760 100644 --- a/src/commands/notation/AddIndicationCommand.h +++ b/src/commands/notation/AddIndicationCommand.h @@ -55,7 +55,7 @@ public: Event *getLastInsertedEvent() { return m_lastInsertedEvent; } - virtual timeT getRelayoutEndTime() { + virtual timeT getRetqlayoutEndTime() { return getStartTime() + m_indicationDuration; } diff --git a/src/commands/notation/AddMarkCommand.cpp b/src/commands/notation/AddMarkCommand.cpp index 0fa8268..5386eac 100644 --- a/src/commands/notation/AddMarkCommand.cpp +++ b/src/commands/notation/AddMarkCommand.cpp @@ -38,7 +38,7 @@ namespace Rosegarden using namespace BaseProperties; -QString +TQString AddMarkCommand::getGlobalName(Mark markType) { TQString m = strtoqstr(markType); @@ -81,12 +81,12 @@ AddMarkCommand::getGlobalName(Mark markType) else if (markType == Marks::MordentLongInverted) m = i18n("Lon&g Inverted Mordent"); else - m = i18n("&%1%2").arg(m[0].upper()).arg(m.right(m.length() - 1)); + m = i18n("&%1%2").tqarg(m[0].upper()).tqarg(m.right(m.length() - 1)); // FIXME: That last i18n has very little chance of working, unless // by some miracle the exact same string was translated elsewhere already // but we'll leave it as a warning - m = i18n("Add %1").arg(m); + m = i18n("Add %1").tqarg(m); return m; } diff --git a/src/commands/notation/ChangeStyleCommand.cpp b/src/commands/notation/ChangeStyleCommand.cpp index f4b3456..f6a3464 100644 --- a/src/commands/notation/ChangeStyleCommand.cpp +++ b/src/commands/notation/ChangeStyleCommand.cpp @@ -37,7 +37,7 @@ namespace Rosegarden { -QString +TQString ChangeStyleCommand::getGlobalName(NoteStyleName style) { return strtoqstr(style); diff --git a/src/commands/notation/ClefInsertionCommand.cpp b/src/commands/notation/ClefInsertionCommand.cpp index c2c5738..8752e8b 100644 --- a/src/commands/notation/ClefInsertionCommand.cpp +++ b/src/commands/notation/ClefInsertionCommand.cpp @@ -61,14 +61,14 @@ ClefInsertionCommand::~ClefInsertionCommand() // nothing } -QString +TQString ClefInsertionCommand::getGlobalName(Clef *) { /* doesn't handle octave offset -- leave it for now if (clef) { TQString name(strtoqstr(clef->getClefType())); name = name.left(1).upper() + name.right(name.length()-1); - return i18n("Change to %1 Cle&f...").arg(name); + return i18n("Change to %1 Cle&f...").tqarg(name); } else { */ return i18n("Add Cle&f Change..."); @@ -78,7 +78,7 @@ ClefInsertionCommand::getGlobalName(Clef *) } timeT -ClefInsertionCommand::getRelayoutEndTime() +ClefInsertionCommand::getRetqlayoutEndTime() { // Inserting a clef can change the y-coord of every subsequent note return getSegment().getEndTime(); diff --git a/src/commands/notation/ClefInsertionCommand.h b/src/commands/notation/ClefInsertionCommand.h index 9cacdfb..e3c91a5 100644 --- a/src/commands/notation/ClefInsertionCommand.h +++ b/src/commands/notation/ClefInsertionCommand.h @@ -52,7 +52,7 @@ public: virtual ~ClefInsertionCommand(); static TQString getGlobalName(Clef *clef = 0); - virtual timeT getRelayoutEndTime(); + virtual timeT getRetqlayoutEndTime(); Event *getLastInsertedEvent() { return m_lastInsertedEvent; } diff --git a/src/commands/notation/EraseEventCommand.cpp b/src/commands/notation/EraseEventCommand.cpp index e599079..a3479dd 100644 --- a/src/commands/notation/EraseEventCommand.cpp +++ b/src/commands/notation/EraseEventCommand.cpp @@ -47,7 +47,7 @@ EraseEventCommand::EraseEventCommand(Segment &segment, true), m_collapseRest(collapseRest), m_event(event), - m_relayoutEndTime(getEndTime()) + m_retqlayoutEndTime(getEndTime()) { // nothing } @@ -67,9 +67,9 @@ EraseEventCommand::makeName(std::string e) } timeT -EraseEventCommand::getRelayoutEndTime() +EraseEventCommand::getRetqlayoutEndTime() { - return m_relayoutEndTime; + return m_retqlayoutEndTime; } void @@ -80,7 +80,7 @@ EraseEventCommand::modifySegment() if (m_event->isa(Clef::EventType) || m_event->isa(Key ::EventType)) { - m_relayoutEndTime = helper.segment().getEndTime(); + m_retqlayoutEndTime = helper.segment().getEndTime(); } else if (m_event->isa(Indication::EventType)) { diff --git a/src/commands/notation/EraseEventCommand.h b/src/commands/notation/EraseEventCommand.h index 07043fa..4584e5f 100644 --- a/src/commands/notation/EraseEventCommand.h +++ b/src/commands/notation/EraseEventCommand.h @@ -48,7 +48,7 @@ public: bool collapseRest); virtual ~EraseEventCommand(); - virtual timeT getRelayoutEndTime(); + virtual timeT getRetqlayoutEndTime(); protected: virtual void modifySegment(); @@ -56,7 +56,7 @@ protected: bool m_collapseRest; Event *m_event; // only used on 1st execute (cf bruteForceRedo) - timeT m_relayoutEndTime; + timeT m_retqlayoutEndTime; std::string makeName(std::string); }; diff --git a/src/commands/notation/FixNotationQuantizeCommand.h b/src/commands/notation/FixNotationQuantizeCommand.h index 3a5d334..05ea393 100644 --- a/src/commands/notation/FixNotationQuantizeCommand.h +++ b/src/commands/notation/FixNotationQuantizeCommand.h @@ -23,8 +23,8 @@ COPYING included with this distribution for more information. */ -#ifndef _RG_ADJUSTMENUFIXNOTATIONQUANTIZECOMMAND_H_ -#define _RG_ADJUSTMENUFIXNOTATIONQUANTIZECOMMAND_H_ +#ifndef _RG_ADJUSTMENUFIXNOTATIONTQUANTIZECOMMAND_H_ +#define _RG_ADJUSTMENUFIXNOTATIONTQUANTIZECOMMAND_H_ #include "document/BasicSelectionCommand.h" #include <tqstring.h> diff --git a/src/commands/notation/InterpretCommand.cpp b/src/commands/notation/InterpretCommand.cpp index 6d1b18b..1652b2f 100644 --- a/src/commands/notation/InterpretCommand.cpp +++ b/src/commands/notation/InterpretCommand.cpp @@ -154,7 +154,7 @@ InterpretCommand::applyTextDynamics() } if (t >= startTime && - (*i)->isa(Note::EventType) && m_selection->contains(*i)) { + (*i)->isa(Note::EventType) && m_selection->tqcontains(*i)) { (*i)->set <Int>(VELOCITY, velocity); } diff --git a/src/commands/notation/InterpretCommand.h b/src/commands/notation/InterpretCommand.h index a50a0f7..445bc5c 100644 --- a/src/commands/notation/InterpretCommand.h +++ b/src/commands/notation/InterpretCommand.h @@ -48,7 +48,7 @@ class Event; class InterpretCommand : public BasicSelectionCommand { public: - // bit masks: pass an OR of these to the constructor + // bit tqmasks: pass an OR of these to the constructor static const int NoInterpretation; static const int GuessDirections; // allegro, rit, pause &c: kinda bogus static const int ApplyTextDynamics; // mp, ff diff --git a/src/commands/notation/KeyInsertionCommand.h b/src/commands/notation/KeyInsertionCommand.h index 1a03383..7adfd6b 100644 --- a/src/commands/notation/KeyInsertionCommand.h +++ b/src/commands/notation/KeyInsertionCommand.h @@ -62,7 +62,7 @@ public: static TQString getGlobalName(Key *key = 0) { if (key) { - return i18n("Change to &Key %1...").arg(strtoqstr(key->getName())); + return i18n("Change to &Key %1...").tqarg(strtoqstr(key->getName())); } else { return i18n("Add &Key Change..."); } diff --git a/src/commands/notation/MakeAccidentalsCautionaryCommand.cpp b/src/commands/notation/MakeAccidentalsCautionaryCommand.cpp index 73ebffb..611419f 100644 --- a/src/commands/notation/MakeAccidentalsCautionaryCommand.cpp +++ b/src/commands/notation/MakeAccidentalsCautionaryCommand.cpp @@ -36,7 +36,7 @@ namespace Rosegarden { -QString +TQString MakeAccidentalsCautionaryCommand::getGlobalName(bool cautionary) { if (cautionary) diff --git a/src/commands/notation/MultiKeyInsertionCommand.h b/src/commands/notation/MultiKeyInsertionCommand.h index 644e877..9683589 100644 --- a/src/commands/notation/MultiKeyInsertionCommand.h +++ b/src/commands/notation/MultiKeyInsertionCommand.h @@ -60,7 +60,7 @@ public: static TQString getGlobalName(Key *key = 0) { if (key) { - return i18n("Change all to &Key %1...").arg(strtoqstr(key->getName())); + return i18n("Change all to &Key %1...").tqarg(strtoqstr(key->getName())); } else { return i18n("Add &Key Change..."); } diff --git a/src/commands/notation/RemoveNotationQuantizeCommand.h b/src/commands/notation/RemoveNotationQuantizeCommand.h index 8fb3b53..3a5f946 100644 --- a/src/commands/notation/RemoveNotationQuantizeCommand.h +++ b/src/commands/notation/RemoveNotationQuantizeCommand.h @@ -23,8 +23,8 @@ COPYING included with this distribution for more information. */ -#ifndef _RG_ADJUSTMENUREMOVENOTATIONQUANTIZECOMMAND_H_ -#define _RG_ADJUSTMENUREMOVENOTATIONQUANTIZECOMMAND_H_ +#ifndef _RG_ADJUSTMENUREMOVENOTATIONTQUANTIZECOMMAND_H_ +#define _RG_ADJUSTMENUREMOVENOTATIONTQUANTIZECOMMAND_H_ #include "document/BasicSelectionCommand.h" #include <tqstring.h> diff --git a/src/commands/notation/RespellCommand.cpp b/src/commands/notation/RespellCommand.cpp index 6264a0e..81e635f 100644 --- a/src/commands/notation/RespellCommand.cpp +++ b/src/commands/notation/RespellCommand.cpp @@ -38,7 +38,7 @@ namespace Rosegarden using namespace BaseProperties; using namespace Accidentals; -QString +TQString RespellCommand::getGlobalName(Type type, Accidental accidental) { switch (type) { @@ -47,17 +47,17 @@ RespellCommand::getGlobalName(Type type, Accidental accidental) TQString s(i18n("Respell with %1")); //!!! should be in notationstrings: if (accidental == DoubleSharp) { - s = s.arg(i18n("Do&uble Sharp")); + s = s.tqarg(i18n("Do&uble Sharp")); } else if (accidental == Sharp) { - s = s.arg(i18n("&Sharp")); + s = s.tqarg(i18n("&Sharp")); } else if (accidental == Flat) { - s = s.arg(i18n("&Flat")); + s = s.tqarg(i18n("&Flat")); } else if (accidental == DoubleFlat) { - s = s.arg(i18n("Dou&ble Flat")); + s = s.tqarg(i18n("Dou&ble Flat")); } else if (accidental == Natural) { - s = s.arg(i18n("&Natural")); + s = s.tqarg(i18n("&Natural")); } else { - s = s.arg(i18n("N&one")); + s = s.tqarg(i18n("N&one")); } return s; } diff --git a/src/commands/notation/TieNotesCommand.cpp b/src/commands/notation/TieNotesCommand.cpp index ff7f3ab..e65865d 100644 --- a/src/commands/notation/TieNotesCommand.cpp +++ b/src/commands/notation/TieNotesCommand.cpp @@ -59,7 +59,7 @@ TieNotesCommand::modifySegment() Segment::iterator sj; while ((sj = helper.getNextAdjacentNote(si, true, false)) != segment.end()) { - if (!m_selection->contains(*sj)) + if (!m_selection->tqcontains(*sj)) break; (*si)->set<Bool>(TIED_FORWARD, true); (*si)->unset(TIE_IS_ABOVE); diff --git a/src/commands/segment/AudioSegmentSplitCommand.cpp b/src/commands/segment/AudioSegmentSplitCommand.cpp index 6657b7b..2f547db 100644 --- a/src/commands/segment/AudioSegmentSplitCommand.cpp +++ b/src/commands/segment/AudioSegmentSplitCommand.cpp @@ -101,7 +101,7 @@ AudioSegmentSplitCommand::execute() m_segmentLabel = m_segment->getLabel(); TQString newLabel = strtoqstr(m_segmentLabel); if (!newLabel.endsWith(i18n(" (split)"))) { - newLabel = i18n("%1 (split)").arg(newLabel); + newLabel = i18n("%1 (split)").tqarg(newLabel); } m_segment->setLabel(qstrtostr(newLabel)); m_newSegment->setLabel(m_segment->getLabel()); diff --git a/src/commands/segment/SegmentChangePlayableRangeCommand.cpp b/src/commands/segment/SegmentChangePlayableRangeCommand.cpp index 026e9e1..7590c78 100644 --- a/src/commands/segment/SegmentChangePlayableRangeCommand.cpp +++ b/src/commands/segment/SegmentChangePlayableRangeCommand.cpp @@ -63,14 +63,14 @@ SegmentChangePlayableRangeCommand::unexecute() m_segment->setHighestPlayable(m_oldHighestPlayableNote); } -QString +TQString SegmentChangePlayableRangeCommand::getGlobalName(int low, int high) { bool unit = false; // fake code to allow trunk/ to compile! if (!unit) { return "Undo change playable range"; } else { - return TQString("Change playable range to %1-%2").arg(low, high); + return TQString("Change playable range to %1-%2").tqarg(low, high); } } diff --git a/src/commands/segment/SegmentChangeQuantizationCommand.cpp b/src/commands/segment/SegmentChangeQuantizationCommand.cpp index e26c235..ceb021e 100644 --- a/src/commands/segment/SegmentChangeQuantizationCommand.cpp +++ b/src/commands/segment/SegmentChangeQuantizationCommand.cpp @@ -100,7 +100,7 @@ SegmentChangeQuantizationCommand::addSegment(Segment *s) m_records.push_back(rec); } -QString +TQString SegmentChangeQuantizationCommand::getGlobalName(timeT unit) { if (!unit) { @@ -108,7 +108,7 @@ SegmentChangeQuantizationCommand::getGlobalName(timeT unit) } else { timeT error = 0; TQString label = NotationStrings::makeNoteMenuLabel(unit, true, error); - return TQString("Quantize to %1").arg(label); + return TQString("Quantize to %1").tqarg(label); } } diff --git a/src/commands/segment/SegmentChangeQuantizationCommand.h b/src/commands/segment/SegmentChangeQuantizationCommand.h index 6c69728..032773e 100644 --- a/src/commands/segment/SegmentChangeQuantizationCommand.h +++ b/src/commands/segment/SegmentChangeQuantizationCommand.h @@ -23,8 +23,8 @@ COPYING included with this distribution for more information. */ -#ifndef _RG_SEGMENTCHANGEQUANTIZATIONCOMMAND_H_ -#define _RG_SEGMENTCHANGEQUANTIZATIONCOMMAND_H_ +#ifndef _RG_SEGMENTCHANGETQUANTIZATIONCOMMAND_H_ +#define _RG_SEGMENTCHANGETQUANTIZATIONCOMMAND_H_ #include <kcommand.h> #include <tqstring.h> diff --git a/src/commands/segment/SegmentChangeTransposeCommand.cpp b/src/commands/segment/SegmentChangeTransposeCommand.cpp index e7a8697..828f759 100644 --- a/src/commands/segment/SegmentChangeTransposeCommand.cpp +++ b/src/commands/segment/SegmentChangeTransposeCommand.cpp @@ -59,13 +59,13 @@ SegmentChangeTransposeCommand::unexecute() m_segment->setTranspose(m_oldUnit); } -QString +TQString SegmentChangeTransposeCommand::getGlobalName(int unit) { if (!unit) { return "Undo change transposition"; } else { - return TQString("Change transposition to %1").arg(unit); + return TQString("Change transposition to %1").tqarg(unit); } } diff --git a/src/commands/segment/SegmentQuickCopyCommand.h b/src/commands/segment/SegmentQuickCopyCommand.h index 7e97781..b078f8f 100644 --- a/src/commands/segment/SegmentQuickCopyCommand.h +++ b/src/commands/segment/SegmentQuickCopyCommand.h @@ -23,8 +23,8 @@ COPYING included with this distribution for more information. */ -#ifndef _RG_SEGMENQUICKCOPYCOMMAND_H_ -#define _RG_SEGMENQUICKCOPYCOMMAND_H_ +#ifndef _RG_SEGMENTQUICKCOPYCOMMAND_H_ +#define _RG_SEGMENTQUICKCOPYCOMMAND_H_ #include <kcommand.h> #include <tqstring.h> diff --git a/src/commands/segment/SegmentSplitCommand.cpp b/src/commands/segment/SegmentSplitCommand.cpp index 9fbcdf6..9d4b1af 100644 --- a/src/commands/segment/SegmentSplitCommand.cpp +++ b/src/commands/segment/SegmentSplitCommand.cpp @@ -133,10 +133,10 @@ SegmentSplitCommand::execute() m_segmentLabel = m_segment->getLabel(); TQString newLabel = strtoqstr(m_segmentLabel); if (!newLabel.endsWith(i18n(" (split)"))) { - newLabel = i18n("%1 (split)").arg(newLabel); + newLabel = i18n("%1 (split)").tqarg(newLabel); } - m_newSegmentA->setLabel(newLabel); - m_newSegmentB->setLabel(newLabel); + m_newSegmentA->setLabel(newLabel.ascii()); + m_newSegmentB->setLabel(newLabel.ascii()); m_newSegmentB->setColourIndex(m_segment->getColourIndex()); m_newSegmentB->setTranspose(m_segment->getTranspose()); diff --git a/src/commands/studio/CreateOrDeleteDeviceCommand.cpp b/src/commands/studio/CreateOrDeleteDeviceCommand.cpp index 3933483..c3f7d8e 100644 --- a/src/commands/studio/CreateOrDeleteDeviceCommand.cpp +++ b/src/commands/studio/CreateOrDeleteDeviceCommand.cpp @@ -84,7 +84,7 @@ CreateOrDeleteDeviceCommand::execute() if (!rgapp->sequencerCall("addDevice(int, unsigned int)", replyType, replyData, data)) { - SEQMAN_DEBUG << "CreateDeviceCommand::execute - " + SETQMAN_DEBUG << "CreateDeviceCommand::execute - " << "failure in sequencer addDevice" << endl; return ; } @@ -93,12 +93,12 @@ CreateOrDeleteDeviceCommand::execute() reply >> m_deviceId; if (m_deviceId == Device::NO_DEVICE) { - SEQMAN_DEBUG << "CreateDeviceCommand::execute - " + SETQMAN_DEBUG << "CreateDeviceCommand::execute - " << "sequencer addDevice failed" << endl; return ; } - SEQMAN_DEBUG << "CreateDeviceCommand::execute - " + SETQMAN_DEBUG << "CreateDeviceCommand::execute - " << " added device " << m_deviceId << endl; arg.device()->reset(); @@ -107,12 +107,12 @@ CreateOrDeleteDeviceCommand::execute() if (!rgapp->sequencerCall("setConnection(unsigned int, TQString)", replyType, replyData, data)) { - SEQMAN_DEBUG << "CreateDeviceCommand::execute - " + SETQMAN_DEBUG << "CreateDeviceCommand::execute - " << "failure in sequencer setConnection" << endl; return ; } - SEQMAN_DEBUG << "CreateDeviceCommand::execute - " + SETQMAN_DEBUG << "CreateDeviceCommand::execute - " << " reconnected device " << m_deviceId << " to " << m_connection << endl; @@ -143,12 +143,12 @@ CreateOrDeleteDeviceCommand::execute() if (!rgapp->sequencerCall("removeDevice(unsigned int)", replyType, replyData, data)) { - SEQMAN_DEBUG << "CreateDeviceCommand::execute - " + SETQMAN_DEBUG << "CreateDeviceCommand::execute - " << "failure in sequencer addDevice" << endl; return ; } - SEQMAN_DEBUG << "CreateDeviceCommand::unexecute - " + SETQMAN_DEBUG << "CreateDeviceCommand::unexecute - " << " removed device " << m_deviceId << endl; m_studio->removeDevice(m_deviceId); diff --git a/src/commands/studio/ReconnectDeviceCommand.cpp b/src/commands/studio/ReconnectDeviceCommand.cpp index 3d28185..b798a2c 100644 --- a/src/commands/studio/ReconnectDeviceCommand.cpp +++ b/src/commands/studio/ReconnectDeviceCommand.cpp @@ -56,12 +56,12 @@ ReconnectDeviceCommand::execute() if (!rgapp->sequencerCall("setConnection(unsigned int, TQString)", replyType, replyData, data)) { - SEQMAN_DEBUG << "ReconnectDeviceCommand::execute - " + SETQMAN_DEBUG << "ReconnectDeviceCommand::execute - " << "failure in sequencer setConnection" << endl; return ; } - SEQMAN_DEBUG << "ReconnectDeviceCommand::execute - " + SETQMAN_DEBUG << "ReconnectDeviceCommand::execute - " << " reconnected device " << m_deviceId << " to " << m_newConnection << endl; } @@ -84,12 +84,12 @@ ReconnectDeviceCommand::unexecute() if (!rgapp->sequencerCall("setConnection(unsigned int, TQString)", replyType, replyData, data)) { - SEQMAN_DEBUG << "ReconnectDeviceCommand::unexecute - " + SETQMAN_DEBUG << "ReconnectDeviceCommand::unexecute - " << "failure in sequencer setConnection" << endl; return ; } - SEQMAN_DEBUG << "ReconnectDeviceCommand::unexecute - " + SETQMAN_DEBUG << "ReconnectDeviceCommand::unexecute - " << " reconnected device " << m_deviceId << " to " << m_oldConnection << endl; } diff --git a/src/document/BasicCommand.cpp b/src/document/BasicCommand.cpp index b17d79d..31498e4 100644 --- a/src/document/BasicCommand.cpp +++ b/src/document/BasicCommand.cpp @@ -90,7 +90,7 @@ Rosegarden::Segment& BasicCommand::getSegment() return m_segment; } -Rosegarden::timeT BasicCommand::getRelayoutEndTime() +Rosegarden::timeT BasicCommand::getRetqlayoutEndTime() { return getEndTime(); } @@ -114,9 +114,9 @@ BasicCommand::execute() copyFrom(m_redoEvents); } - m_segment.updateRefreshStatuses(getStartTime(), getRelayoutEndTime()); + m_segment.updateRefreshStatuses(getStartTime(), getRetqlayoutEndTime()); RG_DEBUG << "BasicCommand(" << name() << "): updated refresh statuses " - << getStartTime() << " -> " << getRelayoutEndTime() << endl; + << getStartTime() << " -> " << getRetqlayoutEndTime() << endl; } void @@ -129,7 +129,7 @@ BasicCommand::unexecute() copyFrom(&m_savedEvents); - m_segment.updateRefreshStatuses(getStartTime(), getRelayoutEndTime()); + m_segment.updateRefreshStatuses(getStartTime(), getRetqlayoutEndTime()); } void diff --git a/src/document/BasicCommand.h b/src/document/BasicCommand.h index 1189547..bd88329 100644 --- a/src/document/BasicCommand.h +++ b/src/document/BasicCommand.h @@ -59,7 +59,7 @@ public: timeT getStartTime() { return m_startTime; } timeT getEndTime() { return m_endTime; } - virtual timeT getRelayoutEndTime(); + virtual timeT getRetqlayoutEndTime(); protected: /** diff --git a/src/document/MultiViewCommandHistory.cpp b/src/document/MultiViewCommandHistory.cpp index 58f0b55..04f1aa4 100644 --- a/src/document/MultiViewCommandHistory.cpp +++ b/src/document/MultiViewCommandHistory.cpp @@ -322,12 +322,12 @@ MultiViewCommandHistory::updateButton(bool undo, } else { action->setEnabled(true); TQString commandName = stack.top()->name(); - commandName.replace(TQRegExp("&"), ""); - commandName.replace(TQRegExp("\\.\\.\\.$"), ""); + commandName.tqreplace(TQRegExp("&"), ""); + commandName.tqreplace(TQRegExp("\\.\\.\\.$"), ""); if (undo) - text = i18n("Und&o %1").arg(commandName); + text = i18n("Und&o %1").tqarg(commandName); else - text = i18n("Re&do %1").arg(commandName); + text = i18n("Re&do %1").tqarg(commandName); action->setText(text); } } @@ -364,14 +364,14 @@ MultiViewCommandHistory::updateMenu(bool undo, stack.pop(); TQString commandName = command->name(); - commandName.replace(TQRegExp("&"), ""); - commandName.replace(TQRegExp("\\.\\.\\.$"), ""); + commandName.tqreplace(TQRegExp("&"), ""); + commandName.tqreplace(TQRegExp("\\.\\.\\.$"), ""); TQString text; if (undo) - text = i18n("Und&o %1").arg(commandName); + text = i18n("Und&o %1").tqarg(commandName); else - text = i18n("Re&do %1").arg(commandName); + text = i18n("Re&do %1").tqarg(commandName); menu->insertItem(text, j++); } diff --git a/src/document/MultiViewCommandHistory.h b/src/document/MultiViewCommandHistory.h index 469c2c9..e3c902e 100644 --- a/src/document/MultiViewCommandHistory.h +++ b/src/document/MultiViewCommandHistory.h @@ -53,9 +53,10 @@ namespace Rosegarden * data at once. */ -class MultiViewCommandHistory : public QObject +class MultiViewCommandHistory : public TQObject { Q_OBJECT + TQ_OBJECT public: MultiViewCommandHistory(); @@ -112,7 +113,7 @@ signals: * (whether by addCommand, undo or redo). * * It should be connected to the update() slot of widgets - * which need to repaint after a command + * which need to tqrepaint after a command */ void commandExecuted(); diff --git a/src/document/RoseXmlHandler.cpp b/src/document/RoseXmlHandler.cpp index bd1ad0e..fe99128 100644 --- a/src/document/RoseXmlHandler.cpp +++ b/src/document/RoseXmlHandler.cpp @@ -148,7 +148,7 @@ bool ConfigurationXmlSubHandler::characters(const TQString& chars) if (m_propertyType == "RealTime") { Rosegarden::RealTime rt; - int sepIdx = ch.find(','); + int sepIdx = ch.tqfind(','); rt.sec = ch.left(sepIdx).toInt(); rt.nsec = ch.mid(sepIdx + 1).toInt(); @@ -298,8 +298,8 @@ RoseXmlHandler::startElement(const TQString& namespaceURI, // dialog // if (isOperationCancelled()) { - // Ideally, we'd throw here, but at this point Qt is in the stack - // and Qt is very often compiled without exception support. + // Ideally, we'd throw here, but at this point TQt is in the stack + // and TQt is very often compiled without exception support. // m_cancelled = true; return false; @@ -439,7 +439,7 @@ RoseXmlHandler::startElement(const TQString& namespaceURI, int minor = sminor.toInt(); if (major > RosegardenGUIDoc::FILE_FORMAT_VERSION_MAJOR) { - m_errorString = i18n("This file was written by Rosegarden %1, and it uses\na different file format that cannot be read by this version.").arg(version); + m_errorString = i18n("This file was written by Rosegarden %1, and it uses\na different file format that cannot be read by this version.").tqarg(version); return false; } @@ -449,7 +449,7 @@ RoseXmlHandler::startElement(const TQString& namespaceURI, CurrentProgressDialog::freeze(); KStartupLogo::hideIfStillThere(); - KMessageBox::information(0, i18n("This file was written by Rosegarden %1, which is more recent than this version.\nThere may be some incompatibilities with the file format.").arg(version)); + KMessageBox::information(0, i18n("This file was written by Rosegarden %1, which is more recent than this version.\nThere may be some incompatibilities with the file format.").tqarg(version)); CurrentProgressDialog::thaw(); } @@ -755,7 +755,7 @@ RoseXmlHandler::startElement(const TQString& namespaceURI, TQString presetLabelStr = atts.value("defaultLabel"); if (labelStr) { - track->setPresetLabel(presetLabelStr); + track->setPresetLabel(presetLabelStr.ascii()); } TQString clefStr = atts.value("defaultClef"); @@ -1046,7 +1046,7 @@ RoseXmlHandler::startElement(const TQString& namespaceURI, do { - FileLocateDialog fL((RosegardenGUIApp *)m_doc->parent(), + FileLocateDialog fL((RosegardenGUIApp *)m_doc->tqparent(), file, TQString(getAudioFileManager().getAudioPath().c_str())); int result = fL.exec(); @@ -1740,7 +1740,7 @@ RoseXmlHandler::startElement(const TQString& namespaceURI, } else { m_plugin->setAssigned(true); m_plugin->setBypass(bypassed); - m_plugin->setIdentifier(plugin->getIdentifier().data()); + m_plugin->setIdentifier(plugin->getIdentifier().ascii()); // std::cerr << "set identifier to plugin at position " << position << std::endl; if (program != "") { m_plugin->setProgram(program); @@ -2190,7 +2190,7 @@ RoseXmlHandler::characters(const TQString& s) return true; } -QString +TQString RoseXmlHandler::errorString() { return m_errorString; @@ -2200,9 +2200,9 @@ bool RoseXmlHandler::error(const TQXmlParseException& exception) { m_errorString = TQString("%1 at line %2, column %3") - .arg(exception.message()) - .arg(exception.lineNumber()) - .arg(exception.columnNumber()); + .tqarg(exception.message()) + .tqarg(exception.lineNumber()) + .tqarg(exception.columnNumber()); return TQXmlDefaultHandler::error( exception ); } @@ -2210,9 +2210,9 @@ bool RoseXmlHandler::fatalError(const TQXmlParseException& exception) { m_errorString = TQString("%1 at line %2, column %3") - .arg(exception.message()) - .arg(exception.lineNumber()) - .arg(exception.columnNumber()); + .tqarg(exception.message()) + .tqarg(exception.lineNumber()) + .tqarg(exception.columnNumber()); return TQXmlDefaultHandler::fatalError( exception ); } @@ -2250,7 +2250,7 @@ RoseXmlHandler::addMIDIDevice(TQString name, bool createAtSequencer) arg << (unsigned int)MidiDevice::Play; if (!rgapp->sequencerCall("addDevice(int, unsigned int)", replyType, replyData, data)) { - SEQMAN_DEBUG << "RoseXmlHandler::addMIDIDevice - " + SETQMAN_DEBUG << "RoseXmlHandler::addMIDIDevice - " << "can't call sequencer addDevice" << endl; return ; } @@ -2259,18 +2259,18 @@ RoseXmlHandler::addMIDIDevice(TQString name, bool createAtSequencer) TQDataStream reply(replyData, IO_ReadOnly); reply >> deviceId; } else { - SEQMAN_DEBUG << "RoseXmlHandler::addMIDIDevice - " + SETQMAN_DEBUG << "RoseXmlHandler::addMIDIDevice - " << "got unknown returntype from addDevice()" << endl; return ; } if (deviceId == Device::NO_DEVICE) { - SEQMAN_DEBUG << "RoseXmlHandler::addMIDIDevice - " + SETQMAN_DEBUG << "RoseXmlHandler::addMIDIDevice - " << "sequencer addDevice failed" << endl; return ; } - SEQMAN_DEBUG << "RoseXmlHandler::addMIDIDevice - " + SETQMAN_DEBUG << "RoseXmlHandler::addMIDIDevice - " << " added device " << deviceId << endl; } else { @@ -2298,7 +2298,7 @@ RoseXmlHandler::addMIDIDevice(TQString name, bool createAtSequencer) void RoseXmlHandler::skipToNextPlayDevice() { - SEQMAN_DEBUG << "RoseXmlHandler::skipToNextPlayDevice; m_deviceRunningId is " << m_deviceRunningId << endl; + SETQMAN_DEBUG << "RoseXmlHandler::skipToNextPlayDevice; m_deviceRunningId is " << m_deviceRunningId << endl; for (DeviceList::iterator i = getStudio().getDevices()->begin(); i != getStudio().getDevices()->end(); ++i) { @@ -2310,7 +2310,7 @@ RoseXmlHandler::skipToNextPlayDevice() if (m_deviceRunningId == Device::NO_DEVICE || md->getId() > m_deviceRunningId) { - SEQMAN_DEBUG << "RoseXmlHandler::skipToNextPlayDevice: found next device: id " << md->getId() << endl; + SETQMAN_DEBUG << "RoseXmlHandler::skipToNextPlayDevice: found next device: id " << md->getId() << endl; m_device = md; m_deviceRunningId = md->getId(); @@ -2319,7 +2319,7 @@ RoseXmlHandler::skipToNextPlayDevice() } } - SEQMAN_DEBUG << "RoseXmlHandler::skipToNextPlayDevice: fresh out of devices" << endl; + SETQMAN_DEBUG << "RoseXmlHandler::skipToNextPlayDevice: fresh out of devices" << endl; m_device = 0; } @@ -2327,7 +2327,7 @@ RoseXmlHandler::skipToNextPlayDevice() void RoseXmlHandler::setMIDIDeviceConnection(TQString connection) { - SEQMAN_DEBUG << "RoseXmlHandler::setMIDIDeviceConnection(" << connection << ")" << endl; + SETQMAN_DEBUG << "RoseXmlHandler::setMIDIDeviceConnection(" << connection << ")" << endl; MidiDevice *md = dynamic_cast<MidiDevice *>(m_device); if (!md) @@ -2347,7 +2347,7 @@ RoseXmlHandler::setMIDIDeviceConnection(TQString connection) void RoseXmlHandler::setMIDIDeviceName(TQString name) { - SEQMAN_DEBUG << "RoseXmlHandler::setMIDIDeviceName(" << name << ")" << endl; + SETQMAN_DEBUG << "RoseXmlHandler::setMIDIDeviceName(" << name << ")" << endl; MidiDevice *md = dynamic_cast<MidiDevice *>(m_device); if (!md) diff --git a/src/document/RoseXmlHandler.h b/src/document/RoseXmlHandler.h index e93408f..86d7eb2 100644 --- a/src/document/RoseXmlHandler.h +++ b/src/document/RoseXmlHandler.h @@ -62,7 +62,7 @@ class AudioFileManager; /** * Handler for the Rosegarden XML format */ -class RoseXmlHandler : public ProgressReporter, public QXmlDefaultHandler +class RoseXmlHandler : public ProgressReporter, public TQXmlDefaultHandler { public: diff --git a/src/document/RosegardenGUIDoc.cpp b/src/document/RosegardenGUIDoc.cpp index 99cead1..a48907f 100644 --- a/src/document/RosegardenGUIDoc.cpp +++ b/src/document/RosegardenGUIDoc.cpp @@ -117,11 +117,11 @@ namespace Rosegarden using namespace BaseProperties; -RosegardenGUIDoc::RosegardenGUIDoc(TQWidget *parent, +RosegardenGUIDoc::RosegardenGUIDoc(TQWidget *tqparent, AudioPluginManager *pluginManager, bool skipAutoload, const char *name) - : TQObject(parent, name), + : TQObject(tqparent, name), m_modified(false), m_autoSaved(false), m_audioPreviewThread(&m_audioFileManager), @@ -229,7 +229,7 @@ void RosegardenGUIDoc::slotUpdateAllViews(RosegardenGUIView *sender) for (w = m_viewList.first(); w != 0; w = m_viewList.next()) { if (w != sender) - w->repaint(); + w->tqrepaint(); } } @@ -239,7 +239,7 @@ void RosegardenGUIDoc::setModified(bool m) RG_DEBUG << "RosegardenGUIDoc[" << this << "]::setModified(" << m << ")\n"; } -void RosegardenGUIDoc::clearModifiedStatus() +void RosegardenGUIDoc::clearModifiedtqStatus() { setModified(false); setAutoSaved(true); @@ -321,7 +321,7 @@ bool RosegardenGUIDoc::saveIfModified() return completed; - RosegardenGUIApp *win = (RosegardenGUIApp *)parent(); + RosegardenGUIApp *win = (RosegardenGUIApp *)tqparent(); int wantSave = KMessageBox::warningYesNoCancel (win, @@ -349,10 +349,10 @@ bool RosegardenGUIDoc::saveIfModified() if (!completed) { if (errMsg) { KMessageBox::error(0, i18n(TQString("Could not save document at %1\n(%2)") - .arg(getAbsFilePath()).arg(errMsg))); + .tqarg(getAbsFilePath()).tqarg(errMsg))); } else { KMessageBox::error(0, i18n(TQString("Could not save document at %1") - .arg(getAbsFilePath()))); + .tqarg(getAbsFilePath()))); } } } @@ -463,7 +463,7 @@ RosegardenGUIDoc::deleteOrphanedAudioFiles(bool documentWillNotBeSaved) if (!file.remove()) { std::cerr << "WARNING: Failed to remove orphaned derived audio file \"" << derivedOrphans[i] << std::endl; } - TQFile peakFile(TQString("%1.pk").arg(derivedOrphans[i])); + TQFile peakFile(TQString("%1.pk").tqarg(derivedOrphans[i])); peakFile.remove(); } @@ -523,10 +523,10 @@ RosegardenGUIDoc::deleteOrphanedAudioFiles(bool documentWillNotBeSaved) TQFile file(recordedOrphans[i]); if (!file.remove()) { KMessageBox::error(0, i18n("File %1 could not be deleted.") - .arg(recordedOrphans[i])); + .tqarg(recordedOrphans[i])); } - TQFile peakFile(TQString("%1.pk").arg(recordedOrphans[i])); + TQFile peakFile(TQString("%1.pk").tqarg(recordedOrphans[i])); peakFile.remove(); } } @@ -537,7 +537,7 @@ RosegardenGUIDoc::deleteOrphanedAudioFiles(bool documentWillNotBeSaved) void RosegardenGUIDoc::newDocument() { setModified(false); - setAbsFilePath(TQString::null); + setAbsFilePath(TQString()); setTitle(i18n("Untitled")); m_commandHistory->clear(); } @@ -577,14 +577,14 @@ bool RosegardenGUIDoc::openDocument(const TQString& filename, // Check if file readable with fileInfo ? if (!fileInfo.isReadable() || fileInfo.isDir()) { KStartupLogo::hideIfStillThere(); - TQString msg(i18n("Can't open file '%1'").arg(filename)); + TQString msg(i18n("Can't open file '%1'").tqarg(filename)); KMessageBox::sorry(0, msg); return false; } ProgressDialog progressDlg(i18n("Reading file..."), 100, - (TQWidget*)parent()); + (TQWidget*)tqparent()); connect(&progressDlg, TQT_SIGNAL(cancelClicked()), &m_audioFileManager, TQT_SLOT(slotStopPreview())); @@ -639,8 +639,8 @@ bool RosegardenGUIDoc::openDocument(const TQString& filename, if (!okay) { KStartupLogo::hideIfStillThere(); TQString msg(i18n("Error when parsing file '%1': \"%2\"") - .arg(filename) - .arg(errMsg)); + .tqarg(filename) + .tqarg(errMsg)); CurrentProgressDialog::freeze(); KMessageBox::sorry(0, msg); @@ -1152,7 +1152,7 @@ bool RosegardenGUIDoc::saveDocument(const TQString& filename, int status = temp.status(); if (status != 0) { - errMsg = i18n(TQString("Could not create temporary file in directory of '%1': %2").arg(filename).arg(strerror(status))); + errMsg = i18n(TQString("Could not create temporary file in directory of '%1': %2").tqarg(filename).tqarg(strerror(status))); return false; } @@ -1164,7 +1164,7 @@ bool RosegardenGUIDoc::saveDocument(const TQString& filename, if (!temp.close()) { status = temp.status(); errMsg = i18n(TQString("Failure in temporary file handling for file '%1': %2") - .arg(tempFileName).arg(strerror(status))); + .tqarg(tempFileName).tqarg(strerror(status))); return false; } @@ -1177,7 +1177,7 @@ bool RosegardenGUIDoc::saveDocument(const TQString& filename, TQDir dir(TQFileInfo(tempFileName).dir()); if (!dir.rename(tempFileName, filename)) { - errMsg = i18n(TQString("Failed to rename temporary output file '%1' to desired output file '%2'").arg(tempFileName).arg(filename)); + errMsg = i18n(TQString("Failed to rename temporary output file '%1' to desired output file '%2'").tqarg(tempFileName).tqarg(filename)); return false; } @@ -1198,7 +1198,7 @@ bool RosegardenGUIDoc::saveDocumentActual(const TQString& filename, if (!rc) { // do some error report - errMsg = i18n(TQString("Could not open file '%1' for writing").arg(filename)); + errMsg = i18n(TQString("Could not open file '%1' for writing").tqarg(filename)); delete fileCompressedDevice; return false; // couldn't open file } @@ -1224,7 +1224,7 @@ bool RosegardenGUIDoc::saveDocumentActual(const TQString& filename, progressDlg = new ProgressDialog(i18n("Saving file..."), 100, - (TQWidget*)parent()); + (TQWidget*)tqparent()); progress = progressDlg->progressBar(); progressDlg->setMinimumDuration(500); @@ -1232,7 +1232,7 @@ bool RosegardenGUIDoc::saveDocumentActual(const TQString& filename, } else { - progress = ((RosegardenGUIApp *)parent())->getProgressBar(); + progress = ((RosegardenGUIApp *)tqparent())->getProgressBar(); } // Send out Composition (this includes Tracks, Instruments, Tempo @@ -1281,13 +1281,13 @@ bool RosegardenGUIDoc::saveDocumentActual(const TQString& filename, m_composition.getTriggerSegments().begin(); ci != m_composition.getTriggerSegments().end(); ++ci) { - TQString triggerAtts = QString + TQString triggerAtts = TQString ("triggerid=\"%1\" triggerbasepitch=\"%2\" triggerbasevelocity=\"%3\" triggerretune=\"%4\" triggeradjusttimes=\"%5\" ") - .arg((*ci)->getId()) - .arg((*ci)->getBasePitch()) - .arg((*ci)->getBaseVelocity()) - .arg((*ci)->getDefaultRetune()) - .arg(strtoqstr((*ci)->getDefaultTimeAdjust())); + .tqarg((*ci)->getId()) + .tqarg((*ci)->getBasePitch()) + .tqarg((*ci)->getBaseVelocity()) + .tqarg((*ci)->getDefaultRetune()) + .tqarg(strtoqstr((*ci)->getDefaultTimeAdjust())); Segment *segment = (*ci)->getSegment(); saveSegment(outStream, segment, progress, totalEvents, eventCount, triggerAtts); @@ -1315,7 +1315,7 @@ bool RosegardenGUIDoc::saveDocumentActual(const TQString& filename, // check that all went ok // if (fileCompressedDevice->status() != IO_Ok) { - errMsg = i18n(TQString("Error while writing on '%1'").arg(filename)); + errMsg = i18n(TQString("Error while writing on '%1'").tqarg(filename)); delete fileCompressedDevice; return false; } @@ -1380,8 +1380,8 @@ void RosegardenGUIDoc::saveSegment(TQTextStream& outStream, Segment *segment, TQString time; outStream << TQString("<segment track=\"%1\" start=\"%2\" ") - .arg(segment->getTrack()) - .arg(segment->getStartTime()); + .tqarg(segment->getTrack()) + .tqarg(segment->getStartTime()); if (extraAttributes) outStream << extraAttributes << " "; @@ -1556,13 +1556,13 @@ void RosegardenGUIDoc::saveSegment(TQTextStream& outStream, Segment *segment, bool RosegardenGUIDoc::isSequencerRunning() { - RosegardenGUIApp* parentApp = dynamic_cast<RosegardenGUIApp*>(parent()); - if (!parentApp) { - RG_DEBUG << "RosegardenGUIDoc::isSequencerRunning() : parentApp == 0\n"; + RosegardenGUIApp* tqparentApp = dynamic_cast<RosegardenGUIApp*>(tqparent()); + if (!tqparentApp) { + RG_DEBUG << "RosegardenGUIDoc::isSequencerRunning() : tqparentApp == 0\n"; return false; } - return parentApp->isSequencerRunning(); + return tqparentApp->isSequencerRunning(); } bool @@ -1612,7 +1612,7 @@ RosegardenGUIDoc::xmlParse(TQString fileContents, TQString &errMsg, } else { if (getSequenceManager() && - !(getSequenceManager()->getSoundDriverStatus() & AUDIO_OK)) { + !(getSequenceManager()->getSoundDrivertqStatus() & AUDIO_OK)) { KStartupLogo::hideIfStillThere(); CurrentProgressDialog::freeze(); @@ -1662,7 +1662,7 @@ RosegardenGUIDoc::xmlParse(TQString fileContents, TQString &errMsg, KStartupLogo::hideIfStillThere(); CurrentProgressDialog::freeze(); - KMessageBox::information(0, i18n("<h3>Incorrect audio sample rate</h3><p>This composition contains audio files that were recorded or imported with the audio server running at a different sample rate (%1 Hz) from the current JACK server sample rate (%2 Hz).</p><p>Rosegarden will play this composition at the correct speed, but any audio files in it will probably sound awful.</p><p>Please consider re-starting the JACK server at the correct rate (%3 Hz) and re-loading this composition before you do any more work with it.</p>").arg(er).arg(sr).arg(er)); + KMessageBox::information(0, i18n("<h3>Incorrect audio sample rate</h3><p>This composition contains audio files that were recorded or imported with the audio server running at a different sample rate (%1 Hz) from the current JACK server sample rate (%2 Hz).</p><p>Rosegarden will play this composition at the correct speed, but any audio files in it will probably sound awful.</p><p>Please consider re-starting the JACK server at the correct rate (%3 Hz) and re-loading this composition before you do any more work with it.</p>").tqarg(er).tqarg(sr).tqarg(er)); CurrentProgressDialog::thaw(); shownWarning = true; @@ -1672,7 +1672,7 @@ RosegardenGUIDoc::xmlParse(TQString fileContents, TQString &errMsg, KStartupLogo::hideIfStillThere(); CurrentProgressDialog::freeze(); - KMessageBox::information(0, i18n("<h3>Inconsistent audio sample rates</h3><p>This composition contains audio files at more than one sample rate.</p><p>Rosegarden will play them at the correct speed, but any audio files that were recorded or imported at rates different from the current JACK server sample rate (%1 Hz) will probably sound awful.</p><p>Please see the audio file manager dialog for more details, and consider resampling any files that are at the wrong rate.</p>").arg(sr), + KMessageBox::information(0, i18n("<h3>Inconsistent audio sample rates</h3><p>This composition contains audio files at more than one sample rate.</p><p>Rosegarden will play them at the correct speed, but any audio files that were recorded or imported at rates different from the current JACK server sample rate (%1 Hz) will probably sound awful.</p><p>Please see the audio file manager dialog for more details, and consider resampling any files that are at the wrong rate.</p>").tqarg(sr), i18n("Inconsistent sample rates"), "file-load-inconsistent-samplerates"); @@ -1695,7 +1695,7 @@ RosegardenGUIDoc::xmlParse(TQString fileContents, TQString &errMsg, TQString type, soName, label; PluginIdentifier::parseIdentifier(ident, type, soName, label); TQString pluginFileName = TQFileInfo(soName).fileName(); - msg += i18n("<li>%1 (from %2)</li>").arg(label).arg(pluginFileName); + msg += i18n("<li>%1 (from %2)</li>").tqarg(label).tqarg(pluginFileName); } msg += "</ul>"; @@ -1834,7 +1834,7 @@ RosegardenGUIDoc::insertRecordedMidi(const MappedComposition &mC) // it's a note-off - //NoteOnMap::iterator mi = m_noteOnEvents.find((*i)->getPitch()); + //NoteOnMap::iterator mi = m_noteOnEvents.tqfind((*i)->getPitch()); PitchMap *pm = &m_noteOnEvents[device][channel]; PitchMap::iterator mi = pm->find(pitch); @@ -2247,7 +2247,7 @@ RosegardenGUIDoc::prepareAudio() TQByteArray data; TQDataStream streamOut(data, IO_WriteOnly); - // We have to pass the filename as a QString + // We have to pass the filename as a TQString // streamOut << TQString(strtoqstr((*it)->getFilename())); streamOut << (int)(*it)->getId(); @@ -2317,7 +2317,7 @@ RosegardenGUIDoc::syncDevices() } delete proc; - RosegardenGUIApp *app = (RosegardenGUIApp*)parent(); + RosegardenGUIApp *app = (RosegardenGUIApp*)tqparent(); app->slotSequencerExited(0); return ; } @@ -2557,7 +2557,7 @@ RosegardenGUIDoc::addRecordMIDISegment(TrackId tid) } else { label = track->getLabel(); } - label = qstrtostr(i18n("%1 (recorded)").arg(strtoqstr(label))); + label = qstrtostr(i18n("%1 (recorded)").tqarg(strtoqstr(label))); } recordMIDISegment->setLabel(label); @@ -2786,7 +2786,7 @@ RosegardenGUIDoc::finalizeAudioFile(InstrumentId iid) // Create a progress dialog // ProgressDialog *progressDlg = new ProgressDialog - (i18n("Generating audio preview..."), 100, (TQWidget*)parent()); + (i18n("Generating audio preview..."), 100, (TQWidget*)tqparent()); progressDlg->setAutoClose(false); progressDlg->setAutoReset(false); progressDlg->show(); @@ -2887,7 +2887,7 @@ RosegardenGUIDoc::updateAudioRecordLatency() m_audioRecordLatency = getAudioRecordLatency(); } -QStringList +TQStringList RosegardenGUIDoc::getTimers() { TQStringList list; @@ -2925,7 +2925,7 @@ RosegardenGUIDoc::getTimers() return list; } - if (replyType != "TQString") { + if (replyType != TQSTRING_OBJECT_NAME_STRING) { RG_DEBUG << "RosegardenGUIDoc::getTimers - " << "wrong reply type (" << replyType << ") from sequencer" << endl; return list; @@ -2941,7 +2941,7 @@ RosegardenGUIDoc::getTimers() return list; } -QString +TQString RosegardenGUIDoc::getCurrentTimer() { TQCString replyType; @@ -2953,7 +2953,7 @@ RosegardenGUIDoc::getCurrentTimer() return ""; } - if (replyType != "TQString") { + if (replyType != TQSTRING_OBJECT_NAME_STRING) { RG_DEBUG << "RosegardenGUIDoc::getCurrentTimer - " << "wrong reply type (" << replyType << ") from sequencer" << endl; return ""; @@ -3070,7 +3070,7 @@ RosegardenGUIDoc::clearAllPlugins() Clipboard* RosegardenGUIDoc::getClipboard() { - RosegardenGUIApp *app = (RosegardenGUIApp*)parent(); + RosegardenGUIApp *app = (RosegardenGUIApp*)tqparent(); return app->getClipboard(); } @@ -3102,13 +3102,13 @@ RosegardenGUIDoc::notifyAudioFileRemoval(AudioFileId id) if (m_audioFileManager.wasAudioFileRecentlyRecorded(id)) { file = m_audioFileManager.getAudioFile(id); - if (file) addOrphanedRecordedAudioFile(file->getFilename()); + if (file) addOrphanedRecordedAudioFile(file->getFilename().c_str()); return; } if (m_audioFileManager.wasAudioFileRecentlyDerived(id)) { file = m_audioFileManager.getAudioFile(id); - if (file) addOrphanedDerivedAudioFile(file->getFilename()); + if (file) addOrphanedDerivedAudioFile(file->getFilename().c_str()); return; } } diff --git a/src/document/RosegardenGUIDoc.h b/src/document/RosegardenGUIDoc.h index 46eb805..282e8c0 100644 --- a/src/document/RosegardenGUIDoc.h +++ b/src/document/RosegardenGUIDoc.h @@ -87,15 +87,16 @@ static const int MERGE_KEEP_NEW_TIMINGS = (1 << 3); * RosegardenGUIDoc owns the Composition in the document. */ -class RosegardenGUIDoc : public QObject +class RosegardenGUIDoc : public TQObject { Q_OBJECT + TQ_OBJECT public: /** * Constructor for the fileclass of the application */ - RosegardenGUIDoc(TQWidget *parent, + RosegardenGUIDoc(TQWidget *tqparent, AudioPluginManager *audioPluginManager = 0, bool skipAutoload = false, const char *name=0); @@ -146,7 +147,7 @@ protected: * action on the view connected to the document. * * this is just an accessor, other components should call - * slotDocumentModified() and clearModifiedStatus() instead of + * slotDocumentModified() and clearModifiedtqStatus() instead of * this method, which perform all the related housework. * */ @@ -163,7 +164,7 @@ public: * clears the 'modified' status of the document (sets it back to false). * */ - void clearModifiedStatus(); + void clearModifiedtqStatus(); /** * "save modified" - asks the user for saving if the document is @@ -425,7 +426,7 @@ public: // Get the sequence manager from the app // SequenceManager* getSequenceManager() - { return (dynamic_cast<RosegardenGUIApp*>(parent())) + { return (dynamic_cast<RosegardenGUIApp*>(tqparent())) ->getSequenceManager(); } //Obsolete: multitrack MIDI recording. plcl 06/2006. @@ -438,7 +439,7 @@ public: /** * return the list of the views currently connected to the document */ - QList<RosegardenGUIView>& getViewList() { return m_viewList; } + TQList<RosegardenGUIView>& getViewList() { return m_viewList; } bool isBeingDestroyed() { return m_beingDestroyed; } @@ -446,9 +447,9 @@ public: public slots: /** - * calls repaint() on all views connected to the document object + * calls tqrepaint() on all views connected to the document object * and is called by the view by which the document has been - * changed. As this view normally repaints itself, it is excluded + * changed. As this view normally tqrepaints itself, it is excluded * from the paintEvent. */ void slotUpdateAllViews(RosegardenGUIView *sender); @@ -574,7 +575,7 @@ protected: */ void saveSegment(TQTextStream&, Segment*, KProgress*, long totalNbOfEvents, long &count, - TQString extraAttributes = TQString::null); + TQString extraAttributes = TQString()); bool deleteOrphanedAudioFiles(bool documentWillNotBeSaved); @@ -616,12 +617,12 @@ protected: /** * the list of the views currently connected to the document */ - QList<RosegardenGUIView> m_viewList; + TQList<RosegardenGUIView> m_viewList; /** * the list of the edit views currently editing a part of this document */ - QList<EditViewBase> m_editViewList; + TQList<EditViewBase> m_editViewList; /** * the modified flag of the current document diff --git a/src/document/io/CsoundExporter.cpp b/src/document/io/CsoundExporter.cpp index 70f1e51..9316de6 100644 --- a/src/document/io/CsoundExporter.cpp +++ b/src/document/io/CsoundExporter.cpp @@ -40,10 +40,10 @@ namespace Rosegarden { -CsoundExporter::CsoundExporter(TQObject *parent, +CsoundExporter::CsoundExporter(TQObject *tqparent, Composition *composition, std::string fileName) : - ProgressReporter(parent, "csoundExporter"), + ProgressReporter(tqparent, "csoundExporter"), m_composition(composition), m_fileName(fileName) { diff --git a/src/document/io/CsoundExporter.h b/src/document/io/CsoundExporter.h index f179fb6..a2476e0 100644 --- a/src/document/io/CsoundExporter.h +++ b/src/document/io/CsoundExporter.h @@ -46,7 +46,7 @@ class Composition; class CsoundExporter : public ProgressReporter { public: - CsoundExporter(TQObject *parent, Composition *, std::string fileName); + CsoundExporter(TQObject *tqparent, Composition *, std::string fileName); ~CsoundExporter(); bool write(); diff --git a/src/document/io/HydrogenLoader.cpp b/src/document/io/HydrogenLoader.cpp index 984527d..4a4876c 100644 --- a/src/document/io/HydrogenLoader.cpp +++ b/src/document/io/HydrogenLoader.cpp @@ -41,8 +41,8 @@ namespace Rosegarden { HydrogenLoader::HydrogenLoader(Studio *studio, - TQObject *parent, const char *name): - ProgressReporter(parent, name), + TQObject *tqparent, const char *name): + ProgressReporter(tqparent, name), m_studio(studio) {} diff --git a/src/document/io/HydrogenLoader.h b/src/document/io/HydrogenLoader.h index bd3cffb..e4975ad 100644 --- a/src/document/io/HydrogenLoader.h +++ b/src/document/io/HydrogenLoader.h @@ -54,7 +54,7 @@ class HydrogenLoader : public ProgressReporter { public: HydrogenLoader(Studio *, - TQObject *parent = 0, const char *name = 0); + TQObject *tqparent = 0, const char *name = 0); /** * Load and parse the Hydrogen file \a fileName, and write it into the diff --git a/src/document/io/HydrogenXMLHandler.cpp b/src/document/io/HydrogenXMLHandler.cpp index 9854648..565fe6d 100644 --- a/src/document/io/HydrogenXMLHandler.cpp +++ b/src/document/io/HydrogenXMLHandler.cpp @@ -272,9 +272,9 @@ HydrogenXMLHandler::endElement(const TQString& /*namespaceURI*/, // whole bar unit segment. // m_segment->setEndMarkerTime(m_composition->getBarEnd(m_currentBar)); - TQString label = TQString("%1 - %2 %3 %4").arg(strtoqstr(m_patternName)) - .arg(strtoqstr(m_sequenceName)) - .arg(i18n(" imported from Hydrogen ")).arg(strtoqstr(m_version)); + TQString label = TQString("%1 - %2 %3 %4").tqarg(strtoqstr(m_patternName)) + .tqarg(strtoqstr(m_sequenceName)) + .tqarg(i18n(" imported from Hydrogen ")).tqarg(strtoqstr(m_version)); m_segment->setLabel(qstrtostr(label)); m_composition->addTrack(track); diff --git a/src/document/io/HydrogenXMLHandler.h b/src/document/io/HydrogenXMLHandler.h index e5ec4fe..f315824 100644 --- a/src/document/io/HydrogenXMLHandler.h +++ b/src/document/io/HydrogenXMLHandler.h @@ -45,7 +45,7 @@ class Segment; class Composition; -class HydrogenXMLHandler : public QXmlDefaultHandler +class HydrogenXMLHandler : public TQXmlDefaultHandler { public: HydrogenXMLHandler(Composition *comp, diff --git a/src/document/io/LilyPondExporter.cpp b/src/document/io/LilyPondExporter.cpp index cd29b60..f5e5ff9 100644 --- a/src/document/io/LilyPondExporter.cpp +++ b/src/document/io/LilyPondExporter.cpp @@ -85,26 +85,26 @@ using namespace BaseProperties; const PropertyName LilyPondExporter::SKIP_PROPERTY = "LilyPondExportSkipThisEvent"; -LilyPondExporter::LilyPondExporter(RosegardenGUIApp *parent, +LilyPondExporter::LilyPondExporter(RosegardenGUIApp *tqparent, RosegardenGUIDoc *doc, std::string fileName) : - ProgressReporter((TQObject *)parent, "lilypondExporter"), + ProgressReporter((TQObject *)tqparent, "lilypondExporter"), m_doc(doc), m_fileName(fileName), m_lastClefFound(Clef::Treble) { m_composition = &m_doc->getComposition(); m_studio = &m_doc->getStudio(); - m_view = ((RosegardenGUIApp *)parent)->getView(); + m_view = ((RosegardenGUIApp *)tqparent)->getView(); m_notationView = NULL; readConfigVariables(); } -LilyPondExporter::LilyPondExporter(NotationView *parent, +LilyPondExporter::LilyPondExporter(NotationView *tqparent, RosegardenGUIDoc *doc, std::string fileName) : - ProgressReporter((TQObject *)parent, "lilypondExporter"), + ProgressReporter((TQObject *)tqparent, "lilypondExporter"), m_doc(doc), m_fileName(fileName), m_lastClefFound(Clef::Treble) @@ -113,7 +113,7 @@ LilyPondExporter::LilyPondExporter(NotationView *parent, m_composition = &m_doc->getComposition(); m_studio = &m_doc->getStudio(); m_view = NULL; - m_notationView = ((NotationView *)parent); + m_notationView = ((NotationView *)tqparent); readConfigVariables(); } @@ -137,7 +137,7 @@ LilyPondExporter::readConfigVariables(void) m_exportBeams = cfg->readBoolEntry("lilyexportbeamings", false); m_exportStaffMerge = cfg->readBoolEntry("lilyexportstaffmerge", false); m_exportStaffGroup = cfg->readBoolEntry("lilyexportstaffbrackets", true); - m_lyricsHAlignment = cfg->readBoolEntry("lilylyricshalignment", LEFT_ALIGN); + m_lyricsHAlignment = cfg->readBoolEntry("lilylyricshtqalignment", LEFT_ALIGN); m_languageLevel = cfg->readUnsignedNumEntry("lilylanguage", LILYPOND_VERSION_2_6); m_exportMarkerMode = cfg->readUnsignedNumEntry("lilyexportmarkermode", EXPORT_NO_MARKERS ); @@ -351,15 +351,15 @@ LilyPondExporter::protectIllegalChars(std::string inStr) TQString tmpStr = strtoqstr(inStr); - tmpStr.replace(TQRegExp("&"), "\\&"); - tmpStr.replace(TQRegExp("\\^"), "\\^"); - tmpStr.replace(TQRegExp("%"), "\\%"); - tmpStr.replace(TQRegExp("<"), "\\<"); - tmpStr.replace(TQRegExp(">"), "\\>"); - tmpStr.replace(TQRegExp("\\["), ""); - tmpStr.replace(TQRegExp("\\]"), ""); - tmpStr.replace(TQRegExp("\\{"), ""); - tmpStr.replace(TQRegExp("\\}"), ""); + tmpStr.tqreplace(TQRegExp("&"), "\\&"); + tmpStr.tqreplace(TQRegExp("\\^"), "\\^"); + tmpStr.tqreplace(TQRegExp("%"), "\\%"); + tmpStr.tqreplace(TQRegExp("<"), "\\<"); + tmpStr.tqreplace(TQRegExp(">"), "\\>"); + tmpStr.tqreplace(TQRegExp("\\["), ""); + tmpStr.tqreplace(TQRegExp("\\]"), ""); + tmpStr.tqreplace(TQRegExp("\\{"), ""); + tmpStr.tqreplace(TQRegExp("\\}"), ""); // // LilyPond uses utf8 encoding. @@ -389,11 +389,11 @@ LilyPondExporter::write() TQString baseName = nfo.fileName(); // sed LilyPond-choking chars out of the filename proper - bool illegalFilename = (baseName.contains(' ') || baseName.contains("\\")); - baseName.replace(TQRegExp(" "), ""); - baseName.replace(TQRegExp("\\\\"), ""); - baseName.replace(TQRegExp("'"), ""); - baseName.replace(TQRegExp("\""), ""); + bool illegalFilename = (baseName.tqcontains(' ') || baseName.tqcontains("\\")); + baseName.tqreplace(TQRegExp(" "), ""); + baseName.tqreplace(TQRegExp("\\\\"), ""); + baseName.tqreplace(TQRegExp("'"), ""); + baseName.tqreplace(TQRegExp("\""), ""); // cat back together tmpName = dirName + '/' + baseName; @@ -402,7 +402,7 @@ LilyPondExporter::write() CurrentProgressDialog::freeze(); int reply = KMessageBox::warningContinueCancel( 0, i18n("LilyPond does not allow spaces or backslashes in filenames.\n\n" - "Would you like to use\n\n %1\n\n instead?").arg(baseName)); + "Would you like to use\n\n %1\n\n instead?").tqarg(baseName)); if (reply != KMessageBox::Continue) return false; } @@ -452,7 +452,7 @@ LilyPondExporter::write() // LilyPond \header block - // set indention level to make future changes to horizontal layout less + // set indention level to make future changes to horizontal tqlayout less // tedious, ++col to indent a new level, --col to de-indent int col = 0; @@ -583,7 +583,7 @@ LilyPondExporter::write() // bind staffs with or without staff group bracket str << indent(col) // indent << "<<" << " s4 " << ">>" << std::endl; - str << indent(col) << "\\layout { }" << std::endl; + str << indent(col) << "\\tqlayout { }" << std::endl; str << indent(--col) << "}" << std::endl; return true; } @@ -1181,7 +1181,7 @@ LilyPondExporter::write() text += " "; TQString syllable(strtoqstr(ssyllable)); - syllable.replace(TQRegExp("\\s+"), ""); + syllable.tqreplace(TQRegExp("\\s+"), ""); text += "\"" + syllable + "\""; haveLyric = true; } else if (verse > lastVerse) { @@ -1190,8 +1190,8 @@ LilyPondExporter::write() } } - text.replace( TQRegExp(" _+([^ ])") , " \\1" ); - text.replace( "\"_\"" , " " ); + text.tqreplace( TQRegExp(" _+([^ ])") , " \\1" ); + text.tqreplace( "\"_\"" , " " ); // Do not create empty context for lyrics. // Does this save some vertical space, as was written @@ -1202,17 +1202,17 @@ LilyPondExporter::write() str << indent(col) << "\\lyricsto \"" << voiceNumber.str() << "\"" << " \\new Lyrics \\lyricmode {" << std::endl; if (m_lyricsHAlignment == RIGHT_ALIGN) { - str << indent(++col) << "\\override LyricText #'self-alignment-X = #RIGHT" + str << indent(++col) << "\\override LyricText #'self-tqalignment-X = #RIGHT" << std::endl; } else if (m_lyricsHAlignment == CENTER_ALIGN) { - str << indent(++col) << "\\override LyricText #'self-alignment-X = #CENTER" + str << indent(++col) << "\\override LyricText #'self-tqalignment-X = #CENTER" << std::endl; } else { - str << indent(++col) << "\\override LyricText #'self-alignment-X = #LEFT" + str << indent(++col) << "\\override LyricText #'self-tqalignment-X = #LEFT" << std::endl; } str << indent(col) << "\\set ignoreMelismata = ##t" << std::endl; - str << indent(col) << text.utf8() << " " << std::endl; + str << indent(col) << text.utf8().data() << " " << std::endl; str << indent(col) << "\\unset ignoreMelismata" << std::endl; str << indent(--col) << "} % Lyrics " << (currentVerse+1) << std::endl; // close the Lyrics context @@ -1253,8 +1253,8 @@ LilyPondExporter::write() str << std::endl << indent(--col) << ">> % notes" << std::endl << std::endl; // indent- // str << std::endl << indent(col) << ">> % global wrapper" << std::endl; - // write \layout block - str << indent(col) << "\\layout { }" << std::endl; + // write \tqlayout block + str << indent(col) << "\\tqlayout { }" << std::endl; // write initial tempo in Midi block, if user wishes (added per user request... // makes debugging the .ly file easier because fewer "noisy" errors are @@ -1430,7 +1430,7 @@ LilyPondExporter::writeBar(Segment *s, writtenDuration += note.getDuration(); durationRatio = writeSkip(timeSignature, 0, note.getDuration(), true, str); durationRatioSum = fractionSum(durationRatioSum,durationRatio); - // str << qstrtostr(TQString(" %{ %1/%2 %} ").arg(durationRatio.first).arg(durationRatio.second)); // DEBUG + // str << qstrtostr(TQString(" %{ %1/%2 %} ").tqarg(durationRatio.first).tqarg(durationRatio.second)); // DEBUG } timeT prevDuration = -1; @@ -1496,7 +1496,7 @@ LilyPondExporter::writeBar(Segment *s, groupId = -1; groupType = ""; } else { - startGroupBeamingsStr += TQString("\\times %1/%2 { ").arg(numerator).arg(denominator); + startGroupBeamingsStr += TQString("\\times %1/%2 { ").tqarg(numerator).tqarg(denominator); tupletRatio = std::pair<int, int>(numerator, denominator); // Require explicit beamed groups, // fixes bug #1683205. @@ -1534,7 +1534,7 @@ LilyPondExporter::writeBar(Segment *s, // Test whether the next note is grace note or not. // The start or end of beamed grouping should be put in proper places. - str << endGroupBeamingsStr.utf8(); + str << endGroupBeamingsStr.utf8().data(); if ((*i)->has(IS_GRACE_NOTE) && (*i)->get<Bool>(IS_GRACE_NOTE)) { if (isGrace == 0) { isGrace = 1; @@ -1546,7 +1546,7 @@ LilyPondExporter::writeBar(Segment *s, // str << "%{ grace ends %} "; // DEBUG str << "} "; } - str << startGroupBeamingsStr.utf8(); + str << startGroupBeamingsStr.utf8().data(); timeT soundingDuration = -1; timeT duration = calculateDuration @@ -1688,7 +1688,7 @@ LilyPondExporter::writeBar(Segment *s, writtenDuration += soundingDuration; std::pair<int,int> ratio = fractionProduct(durationRatio,tupletRatio); durationRatioSum = fractionSum(durationRatioSum, ratio); - // str << qstrtostr(TQString(" %{ %1/%2 * %3/%4 = %5/%6 %} ").arg(durationRatio.first).arg(durationRatio.second).arg(tupletRatio.first).arg(tupletRatio.second).arg(ratio.first).arg(ratio.second)); // DEBUG + // str << qstrtostr(TQString(" %{ %1/%2 * %3/%4 = %5/%6 %} ").tqarg(durationRatio.first).tqarg(durationRatio.second).tqarg(tupletRatio.first).tqarg(tupletRatio.second).tqarg(ratio.first).tqarg(ratio.second)); // DEBUG std::vector<Mark> marks(chord.getMarksForChord()); // problem here: stem direction unavailable (it's a view-local property) @@ -1869,7 +1869,7 @@ LilyPondExporter::writeBar(Segment *s, writtenDuration += soundingDuration; std::pair<int,int> ratio = fractionProduct(durationRatio,tupletRatio); durationRatioSum = fractionSum(durationRatioSum, ratio); - // str << qstrtostr(TQString(" %{ %1/%2 * %3/%4 = %5/%6 %} ").arg(durationRatio.first).arg(durationRatio.second).arg(tupletRatio.first).arg(tupletRatio.second).arg(ratio.first).arg(ratio.second)); // DEBUG + // str << qstrtostr(TQString(" %{ %1/%2 * %3/%4 = %5/%6 %} ").tqarg(durationRatio.first).tqarg(durationRatio.second).tqarg(tupletRatio.first).tqarg(tupletRatio.second).tqarg(ratio.first).tqarg(ratio.second)); // DEBUG } else if ((*i)->isa(Clef::EventType)) { try { @@ -1992,16 +1992,16 @@ LilyPondExporter::writeBar(Segment *s, str << "c:" << barreStart << "-" << barreEnd << "-" << barreFret << ";"; } - if (fingering.getStringStatus( 6-stringNum ) == Guitar::Fingering::MUTED) { + if (fingering.getStringtqStatus( 6-stringNum ) == Guitar::Fingering::MUTED) { str << stringNum << "-x;"; - } else if (fingering.getStringStatus( 6-stringNum ) == Guitar::Fingering::OPEN) { + } else if (fingering.getStringtqStatus( 6-stringNum ) == Guitar::Fingering::OPEN) { str << stringNum << "-o;"; } else { - int stringStatus = fingering.getStringStatus(6-stringNum); + int stringtqStatus = fingering.getStringtqStatus(6-stringNum); if ((stringNum <= barreStart) && (stringNum >= barreEnd)) { str << stringNum << "-" << barreFret << ";"; } else { - str << stringNum << "-" << stringStatus << ";"; + str << stringNum << "-" << stringtqStatus << ";"; } } } diff --git a/src/document/io/LilyPondExporter.h b/src/document/io/LilyPondExporter.h index 6ba3a21..a106243 100644 --- a/src/document/io/LilyPondExporter.h +++ b/src/document/io/LilyPondExporter.h @@ -87,8 +87,8 @@ public: typedef std::multiset<Event*, Event::EventEndCmp> eventendlist; public: - LilyPondExporter(RosegardenGUIApp *parent, RosegardenGUIDoc *, std::string fileName); - LilyPondExporter(NotationView *parent, RosegardenGUIDoc *, std::string fileName); + LilyPondExporter(RosegardenGUIApp *tqparent, RosegardenGUIDoc *, std::string fileName); + LilyPondExporter(NotationView *tqparent, RosegardenGUIDoc *, std::string fileName); ~LilyPondExporter(); bool write(); @@ -129,7 +129,7 @@ protected: // compose an appropriate LilyPond representation for various Marks std::string composeLilyMark(std::string eventMark, bool stemUp); - // find/protect illegal characters in user-supplied strings + // tqfind/protect illegal characters in user-supplied strings std::string protectIllegalChars(std::string inStr); // return a string full of column tabs diff --git a/src/document/io/MupExporter.cpp b/src/document/io/MupExporter.cpp index 6207512..f17a8a3 100644 --- a/src/document/io/MupExporter.cpp +++ b/src/document/io/MupExporter.cpp @@ -45,10 +45,10 @@ namespace Rosegarden { using namespace BaseProperties; -MupExporter::MupExporter(TQObject *parent, +MupExporter::MupExporter(TQObject *tqparent, Composition *composition, string fileName) : - ProgressReporter(parent, "mupExporter"), + ProgressReporter(tqparent, "mupExporter"), m_composition(composition), m_fileName(fileName) { diff --git a/src/document/io/MupExporter.h b/src/document/io/MupExporter.h index 1ba8d5d..781080d 100644 --- a/src/document/io/MupExporter.h +++ b/src/document/io/MupExporter.h @@ -55,7 +55,7 @@ class Composition; class MupExporter : public ProgressReporter { public: - MupExporter(TQObject *parent, Composition *, std::string fileName); + MupExporter(TQObject *tqparent, Composition *, std::string fileName); ~MupExporter(); bool write(); diff --git a/src/document/io/MusicXmlExporter.cpp b/src/document/io/MusicXmlExporter.cpp index 365a792..febd911 100644 --- a/src/document/io/MusicXmlExporter.cpp +++ b/src/document/io/MusicXmlExporter.cpp @@ -46,10 +46,10 @@ namespace Rosegarden using namespace BaseProperties; -MusicXmlExporter::MusicXmlExporter(TQObject *parent, +MusicXmlExporter::MusicXmlExporter(TQObject *tqparent, RosegardenGUIDoc *doc, std::string fileName) : - ProgressReporter(parent, "musicXmlExporter"), + ProgressReporter(tqparent, "musicXmlExporter"), m_doc(doc), m_fileName(fileName) { diff --git a/src/document/io/MusicXmlExporter.h b/src/document/io/MusicXmlExporter.h index 7d8287d..f2da943 100644 --- a/src/document/io/MusicXmlExporter.h +++ b/src/document/io/MusicXmlExporter.h @@ -60,7 +60,7 @@ public: typedef std::multiset<Event*, Event::EventCmp> eventstartlist; typedef std::multiset<Event*, Event::EventEndCmp> eventendlist; public: - MusicXmlExporter(TQObject *parent, RosegardenGUIDoc *, std::string fileName); + MusicXmlExporter(TQObject *tqparent, RosegardenGUIDoc *, std::string fileName); ~MusicXmlExporter(); bool write(); diff --git a/src/document/io/RG21Loader.cpp b/src/document/io/RG21Loader.cpp index d5df36d..78950de 100644 --- a/src/document/io/RG21Loader.cpp +++ b/src/document/io/RG21Loader.cpp @@ -58,8 +58,8 @@ using namespace Accidentals; using namespace Marks; RG21Loader::RG21Loader(Studio *studio, - TQObject *parent, const char* name) - : ProgressReporter(parent, name), + TQObject *tqparent, const char* name) + : ProgressReporter(tqparent, name), m_stream(0), m_studio(studio), m_composition(0), @@ -69,7 +69,7 @@ RG21Loader::RG21Loader(Studio *studio, m_currentClef(Clef::Treble), m_currentInstrumentId(MidiInstrumentBase), m_inGroup(false), - m_tieStatus(0), + m_tietqStatus(0), m_nbStaves(0) {} @@ -106,8 +106,8 @@ bool RG21Loader::parseKey() } TQString keyName = TQString("%1 %2or") - .arg(keyBase) - .arg(m_tokens[3].lower()); + .tqarg(keyBase) + .tqarg(m_tokens[3].lower()); m_currentKey = Rosegarden::Key(qstrtostr(keyName)); Event *keyEvent = m_currentKey.getAsEvent(m_currentSegmentTime); @@ -173,10 +173,10 @@ bool RG21Loader::parseChordItem() noteEvent->set <Int>(PITCH, pitch); - if (m_tieStatus == 1) { + if (m_tietqStatus == 1) { noteEvent->set <Bool>(TIED_FORWARD, true); - } else if (m_tieStatus == 2) { + } else if (m_tietqStatus == 2) { noteEvent->set <Bool>(TIED_BACKWARD, true); } @@ -199,10 +199,10 @@ bool RG21Loader::parseChordItem() } m_currentSegmentTime += duration; - if (m_tieStatus == 2) - m_tieStatus = 0; - else if (m_tieStatus == 1) - m_tieStatus = 2; + if (m_tietqStatus == 2) + m_tietqStatus = 0; + else if (m_tietqStatus == 1) + m_tietqStatus = 2; return true; } @@ -348,13 +348,13 @@ bool RG21Loader::parseIndicationStart() if (indicationType == "tie") { - if (m_tieStatus != 0) { + if (m_tietqStatus != 0) { RG_DEBUG << "RG21Loader:: parseIndicationStart: WARNING: Found tie within " << "tie, ignoring" << endl; return true; } - // m_tieStatus = 1; + // m_tietqStatus = 1; Segment::iterator i = m_currentSegment->end(); if (i != m_currentSegment->begin()) { @@ -368,7 +368,7 @@ bool RG21Loader::parseIndicationStart() --i; } } - m_tieStatus = 2; + m_tietqStatus = 2; RG_DEBUG << "rg21io: Indication start: it's a tie" << endl; @@ -484,7 +484,7 @@ void RG21Loader::closeGroup() // To change the time of an event, we need to erase & // re-insert it. But erasure will delete the event, and - // if it's an indication event that will invalidate our + // if it's an indication event that will tqinvalidate our // indicationsExtant entry. Hence this unpleasantness: if ((*i)->isa(Indication::EventType)) { diff --git a/src/document/io/RG21Loader.h b/src/document/io/RG21Loader.h index 583367c..51e663b 100644 --- a/src/document/io/RG21Loader.h +++ b/src/document/io/RG21Loader.h @@ -58,7 +58,7 @@ class RG21Loader : public ProgressReporter { public: RG21Loader(Studio *, - TQObject *parent = 0, const char *name = 0); + TQObject *tqparent = 0, const char *name = 0); ~RG21Loader(); /** @@ -145,7 +145,7 @@ protected: int m_groupUntupledLength; int m_groupUntupledCount; - int m_tieStatus; // 0 -> none, 1 -> tie started, 2 -> seen one note + int m_tietqStatus; // 0 -> none, 1 -> tie started, 2 -> seen one note TQString m_currentLine; TQString m_currentStaffName; diff --git a/src/gui/application/LircClient.h b/src/gui/application/LircClient.h index 3f69ce1..2f8cc82 100644 --- a/src/gui/application/LircClient.h +++ b/src/gui/application/LircClient.h @@ -42,9 +42,10 @@ namespace Rosegarden -class LircClient : public QObject +class LircClient : public TQObject { Q_OBJECT + TQ_OBJECT public: LircClient(void); ~LircClient(); diff --git a/src/gui/application/LircCommander.h b/src/gui/application/LircCommander.h index 60d356f..eafbda9 100644 --- a/src/gui/application/LircCommander.h +++ b/src/gui/application/LircCommander.h @@ -43,9 +43,10 @@ class TrackButtons; class LircClient; -class LircCommander : public QObject +class LircCommander : public TQObject { Q_OBJECT + TQ_OBJECT public: LircCommander(LircClient *lirc, RosegardenGUIApp *rgGUIApp); diff --git a/src/gui/application/RosegardenApplication.cpp b/src/gui/application/RosegardenApplication.cpp index b6282c3..263397e 100644 --- a/src/gui/application/RosegardenApplication.cpp +++ b/src/gui/application/RosegardenApplication.cpp @@ -101,7 +101,7 @@ void RosegardenApplication::sfxLoadExited(KProcess *proc) config()->setGroup(configGroup); KMessageBox::error(mainWidget(), - i18n("Failed to load soundfont %1").arg(soundFontPath)); + i18n("Failed to load soundfont %1").tqarg(soundFontPath)); } else { RG_DEBUG << "RosegardenApplication::sfxLoadExited() : sfxload exited normally\n"; } @@ -114,7 +114,7 @@ void RosegardenApplication::slotSetStatusMessage(TQString msg) if (mainWindow) { if (msg.isEmpty()) msg = KTmpStatusMsg::getDefaultMsg(); - mainWindow->statusBar()->changeItem(TQString(" %1").arg(msg), KTmpStatusMsg::getDefaultId()); + mainWindow->statusBar()->changeItem(TQString(" %1").tqarg(msg), KTmpStatusMsg::getDefaultId()); } } @@ -127,7 +127,7 @@ RosegardenApplication::refreshGUI(int maxTime) maxTime); } -void RosegardenApplication::saveState(QSessionManager& sm) +void RosegardenApplication::saveState(TQSessionManager& sm) { emit aboutToSaveState(); KUniqueApplication::saveState(sm); diff --git a/src/gui/application/RosegardenApplication.h b/src/gui/application/RosegardenApplication.h index ff3b2ba..648ee9d 100644 --- a/src/gui/application/RosegardenApplication.h +++ b/src/gui/application/RosegardenApplication.h @@ -31,7 +31,7 @@ #include <tqstring.h> -class QSessionManager; +class TQSessionManager; class KProcess; @@ -49,6 +49,7 @@ namespace Rosegarden class RosegardenApplication : public KUniqueApplication { Q_OBJECT + TQ_OBJECT public: RosegardenApplication(): KUniqueApplication(), m_noSequencerMode(false) {} @@ -73,7 +74,7 @@ public: void setNoSequencerMode(bool m=true) { m_noSequencerMode = m; } bool noSequencerMode() { return m_noSequencerMode; } - virtual void saveState(QSessionManager&); + virtual void saveState(TQSessionManager&); signals: // connect this to RosegardenGUIApp diff --git a/src/gui/application/RosegardenDCOP.h b/src/gui/application/RosegardenDCOP.h index 2689945..e82edbf 100644 --- a/src/gui/application/RosegardenDCOP.h +++ b/src/gui/application/RosegardenDCOP.h @@ -43,8 +43,8 @@ typedef enum STARTING_TO_PLAY, STARTING_TO_RECORD, RECORDING_ARMED, // gui only state - QUIT -} TransportStatus; + TQUIT +} TransporttqStatus; #endif // _ROSEGARDEN_DCOP_H_ diff --git a/src/gui/application/RosegardenGUIApp.cpp b/src/gui/application/RosegardenGUIApp.cpp index 2d0e23a..f3f4d1b 100644 --- a/src/gui/application/RosegardenGUIApp.cpp +++ b/src/gui/application/RosegardenGUIApp.cpp @@ -287,7 +287,7 @@ RosegardenGUIApp::RosegardenGUIApp(bool useSequencer, if (startupStatusMessageReceiver) { - TQObject::connect(this, TQT_SIGNAL(startupStatusMessage(TQString)), + TQObject::connect(TQT_TQOBJECT(this), TQT_SIGNAL(startupStatusMessage(TQString)), startupStatusMessageReceiver, TQT_SLOT(slotShowStatusMessage(TQString))); } @@ -357,13 +357,13 @@ RosegardenGUIApp::RosegardenGUIApp(bool useSequencer, 20); // relation target/this (in percent) connect(m_dockLeft, TQT_SIGNAL(iMBeingClosed()), - this, TQT_SLOT(slotParametersClosed())); + TQT_TQOBJECT(this), TQT_SLOT(slotParametersClosed())); connect(m_dockLeft, TQT_SIGNAL(hasUndocked()), - this, TQT_SLOT(slotParametersClosed())); - // Apparently, hasUndocked() is emitted when the dock widget's + TQT_TQOBJECT(this), TQT_SLOT(slotParametersClosed())); + // Aptqparently, hasUndocked() is emitted when the dock widget's // 'close' button on the dock handle is clicked. connect(m_mainDockWidget, TQT_SIGNAL(docking(KDockWidget*, KDockWidget::DockPosition)), - this, TQT_SLOT(slotParametersDockedBack(KDockWidget*, KDockWidget::DockPosition))); + TQT_TQOBJECT(this), TQT_SLOT(slotParametersDockedBack(KDockWidget*, KDockWidget::DockPosition))); stateChanged("parametersbox_closed", KXMLGUIClient::StateReverse); @@ -437,7 +437,7 @@ RosegardenGUIApp::RosegardenGUIApp(bool useSequencer, // problems. This warning has to happen early, in case it // affects the ability to load plugins etc from a file on the // command line. - m_seqManager->checkSoundDriverStatus(true); + m_seqManager->checkSoundDrivertqStatus(true); } if (m_view) { @@ -445,7 +445,7 @@ RosegardenGUIApp::RosegardenGUIApp(bool useSequencer, m_view, TQT_SLOT(slotControllerDeviceEventReceived(MappedEvent *))); } - if (m_seqManager->getSoundDriverStatus() & AUDIO_OK) { + if (m_seqManager->getSoundDrivertqStatus() & AUDIO_OK) { slotStateChanged("got_audio", true); } else { slotStateChanged("got_audio", false); @@ -496,7 +496,7 @@ RosegardenGUIApp::RosegardenGUIApp(bool useSequencer, stateChanged("have_project_packager", KXMLGUIClient::StateReverse); stateChanged("have_lilypondview", KXMLGUIClient::StateReverse); - TQTimer::singleShot(1000, this, TQT_SLOT(slotTestStartupTester())); + TQTimer::singleShot(1000, TQT_TQOBJECT(this), TQT_SLOT(slotTestStartupTester())); } RosegardenGUIApp::~RosegardenGUIApp() @@ -541,101 +541,101 @@ void RosegardenGUIApp::setupActions() { // setup File menu // New Window ? - KStdAction::openNew (this, TQT_SLOT(slotFileNew()), actionCollection()); - KStdAction::open (this, TQT_SLOT(slotFileOpen()), actionCollection()); - m_fileRecent = KStdAction::openRecent(this, + KStdAction::openNew (TQT_TQOBJECT(this), TQT_SLOT(slotFileNew()), actionCollection()); + KStdAction::open (TQT_TQOBJECT(this), TQT_SLOT(slotFileOpen()), actionCollection()); + m_fileRecent = KStdAction::openRecent(TQT_TQOBJECT(this), TQT_SLOT(slotFileOpenRecent(const KURL&)), actionCollection()); - KStdAction::save (this, TQT_SLOT(slotFileSave()), actionCollection()); - KStdAction::saveAs(this, TQT_SLOT(slotFileSaveAs()), actionCollection()); - KStdAction::revert(this, TQT_SLOT(slotRevertToSaved()), actionCollection()); - KStdAction::close (this, TQT_SLOT(slotFileClose()), actionCollection()); - KStdAction::print (this, TQT_SLOT(slotFilePrint()), actionCollection()); - KStdAction::printPreview (this, TQT_SLOT(slotFilePrintPreview()), actionCollection()); - - new KAction(i18n("Import Rosegarden &Project file..."), 0, 0, this, + KStdAction::save (TQT_TQOBJECT(this), TQT_SLOT(slotFileSave()), actionCollection()); + KStdAction::saveAs(TQT_TQOBJECT(this), TQT_SLOT(slotFileSaveAs()), actionCollection()); + KStdAction::revert(TQT_TQOBJECT(this), TQT_SLOT(slotRevertToSaved()), actionCollection()); + KStdAction::close (TQT_TQOBJECT(this), TQT_SLOT(slotFileClose()), actionCollection()); + KStdAction::print (TQT_TQOBJECT(this), TQT_SLOT(slotFilePrint()), actionCollection()); + KStdAction::printPreview (TQT_TQOBJECT(this), TQT_SLOT(slotFilePrintPreview()), actionCollection()); + + new KAction(i18n("Import Rosegarden &Project file..."), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotImportProject()), actionCollection(), "file_import_project"); - new KAction(i18n("Import &MIDI file..."), 0, 0, this, + new KAction(i18n("Import &MIDI file..."), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotImportMIDI()), actionCollection(), "file_import_midi"); - new KAction(i18n("Import &Rosegarden 2.1 file..."), 0, 0, this, + new KAction(i18n("Import &Rosegarden 2.1 file..."), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotImportRG21()), actionCollection(), "file_import_rg21"); - new KAction(i18n("Import &Hydrogen file..."), 0, 0, this, + new KAction(i18n("Import &Hydrogen file..."), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotImportHydrogen()), actionCollection(), "file_import_hydrogen"); - new KAction(i18n("Merge &File..."), 0, 0, this, + new KAction(i18n("Merge &File..."), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotMerge()), actionCollection(), "file_merge"); - new KAction(i18n("Merge &MIDI file..."), 0, 0, this, + new KAction(i18n("Merge &MIDI file..."), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotMergeMIDI()), actionCollection(), "file_merge_midi"); - new KAction(i18n("Merge &Rosegarden 2.1 file..."), 0, 0, this, + new KAction(i18n("Merge &Rosegarden 2.1 file..."), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotMergeRG21()), actionCollection(), "file_merge_rg21"); - new KAction(i18n("Merge &Hydrogen file..."), 0, 0, this, + new KAction(i18n("Merge &Hydrogen file..."), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotMergeHydrogen()), actionCollection(), "file_merge_hydrogen"); - new KAction(i18n("Export Rosegarden &Project file..."), 0, 0, this, + new KAction(i18n("Export Rosegarden &Project file..."), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotExportProject()), actionCollection(), "file_export_project"); - new KAction(i18n("Export &MIDI file..."), 0, 0, this, + new KAction(i18n("Export &MIDI file..."), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotExportMIDI()), actionCollection(), "file_export_midi"); - new KAction(i18n("Export &LilyPond file..."), 0, 0, this, + new KAction(i18n("Export &LilyPond file..."), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotExportLilyPond()), actionCollection(), "file_export_lilypond"); - new KAction(i18n("Export Music&XML file..."), 0, 0, this, + new KAction(i18n("Export Music&XML file..."), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotExportMusicXml()), actionCollection(), "file_export_musicxml"); - new KAction(i18n("Export &Csound score file..."), 0, 0, this, + new KAction(i18n("Export &Csound score file..."), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotExportCsound()), actionCollection(), "file_export_csound"); - new KAction(i18n("Export M&up file..."), 0, 0, this, + new KAction(i18n("Export M&up file..."), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotExportMup()), actionCollection(), "file_export_mup"); - new KAction(i18n("Print &with LilyPond..."), 0, 0, this, + new KAction(i18n("Print &with LilyPond..."), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotPrintLilyPond()), actionCollection(), "file_print_lilypond"); - new KAction(i18n("Preview with Lil&yPond..."), 0, 0, this, + new KAction(i18n("Preview with Lil&yPond..."), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotPreviewLilyPond()), actionCollection(), "file_preview_lilypond"); - new KAction(i18n("Play&list"), 0, 0, this, + new KAction(i18n("Play&list"), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotPlayList()), actionCollection(), "file_show_playlist"); - KStdAction::quit (this, TQT_SLOT(slotQuit()), actionCollection()); + KStdAction::quit (TQT_TQOBJECT(this), TQT_SLOT(slotQuit()), actionCollection()); // help menu - new KAction(i18n("Rosegarden &Tutorial"), 0, 0, this, + new KAction(i18n("Rosegarden &Tutorial"), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotTutorial()), actionCollection(), "tutorial"); - new KAction(i18n("&Bug Reporting Guidelines"), 0, 0, this, + new KAction(i18n("&Bug Reporting Guidelines"), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotBugGuidelines()), actionCollection(), "guidelines"); // setup edit menu - KStdAction::cut (this, TQT_SLOT(slotEditCut()), actionCollection()); - KStdAction::copy (this, TQT_SLOT(slotEditCopy()), actionCollection()); - KStdAction::paste (this, TQT_SLOT(slotEditPaste()), actionCollection()); + KStdAction::cut (TQT_TQOBJECT(this), TQT_SLOT(slotEditCut()), actionCollection()); + KStdAction::copy (TQT_TQOBJECT(this), TQT_SLOT(slotEditCopy()), actionCollection()); + KStdAction::paste (TQT_TQOBJECT(this), TQT_SLOT(slotEditPaste()), actionCollection()); // // undo/redo actions are special in that they are connected to @@ -659,85 +659,85 @@ void RosegardenGUIApp::setupActions() // setup Settings menu // - m_viewToolBar = KStdAction::showToolbar (this, TQT_SLOT(slotToggleToolBar()), actionCollection(), + m_viewToolBar = KStdAction::showToolbar (TQT_TQOBJECT(this), TQT_SLOT(slotToggleToolBar()), actionCollection(), "show_stock_toolbar"); - m_viewToolsToolBar = new KToggleAction(i18n("Show T&ools Toolbar"), 0, this, + m_viewToolsToolBar = new KToggleAction(i18n("Show T&ools Toolbar"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotToggleToolsToolBar()), actionCollection(), "show_tools_toolbar"); - m_viewTracksToolBar = new KToggleAction(i18n("Show Trac&ks Toolbar"), 0, this, + m_viewTracksToolBar = new KToggleAction(i18n("Show Trac&ks Toolbar"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotToggleTracksToolBar()), actionCollection(), "show_tracks_toolbar"); - m_viewEditorsToolBar = new KToggleAction(i18n("Show &Editors Toolbar"), 0, this, + m_viewEditorsToolBar = new KToggleAction(i18n("Show &Editors Toolbar"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotToggleEditorsToolBar()), actionCollection(), "show_editors_toolbar"); - m_viewTransportToolBar = new KToggleAction(i18n("Show Trans&port Toolbar"), 0, this, + m_viewTransportToolBar = new KToggleAction(i18n("Show Trans&port Toolbar"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotToggleTransportToolBar()), actionCollection(), "show_transport_toolbar"); - m_viewZoomToolBar = new KToggleAction(i18n("Show &Zoom Toolbar"), 0, this, + m_viewZoomToolBar = new KToggleAction(i18n("Show &Zoom Toolbar"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotToggleZoomToolBar()), actionCollection(), "show_zoom_toolbar"); - m_viewStatusBar = KStdAction::showStatusbar(this, TQT_SLOT(slotToggleStatusBar()), + m_viewStatusBar = KStdAction::showStatusbar(TQT_TQOBJECT(this), TQT_SLOT(slotToggleStatusBar()), actionCollection(), "show_status_bar"); - m_viewTransport = new KToggleAction(i18n("Show Tra&nsport"), Key_T, this, + m_viewTransport = new KToggleAction(i18n("Show Tra&nsport"), Key_T, TQT_TQOBJECT(this), TQT_SLOT(slotToggleTransport()), actionCollection(), "show_transport"); - m_viewTrackLabels = new KToggleAction(i18n("Show Track &Labels"), 0, this, + m_viewTrackLabels = new KToggleAction(i18n("Show Track &Labels"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotToggleTrackLabels()), actionCollection(), "show_tracklabels"); - m_viewRulers = new KToggleAction(i18n("Show Playback Position R&uler"), 0, this, + m_viewRulers = new KToggleAction(i18n("Show Playback Position R&uler"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotToggleRulers()), actionCollection(), "show_rulers"); - m_viewTempoRuler = new KToggleAction(i18n("Show Te&mpo Ruler"), 0, this, + m_viewTempoRuler = new KToggleAction(i18n("Show Te&mpo Ruler"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotToggleTempoRuler()), actionCollection(), "show_tempo_ruler"); - m_viewChordNameRuler = new KToggleAction(i18n("Show Cho&rd Name Ruler"), 0, this, + m_viewChordNameRuler = new KToggleAction(i18n("Show Cho&rd Name Ruler"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotToggleChordNameRuler()), actionCollection(), "show_chord_name_ruler"); - m_viewPreviews = new KToggleAction(i18n("Show Segment Pre&views"), 0, this, + m_viewPreviews = new KToggleAction(i18n("Show Segment Pre&views"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotTogglePreviews()), actionCollection(), "show_previews"); - new KAction(i18n("Show Special &Parameters"), Key_P, this, + new KAction(i18n("Show Special &Parameters"), Key_P, TQT_TQOBJECT(this), TQT_SLOT(slotDockParametersBack()), actionCollection(), "show_inst_segment_parameters"); - KStdAction::tipOfDay( this, TQT_SLOT( slotShowTip() ), actionCollection() ); + KStdAction::tipOfDay( TQT_TQOBJECT(this), TQT_SLOT( slotShowTip() ), actionCollection() ); // Standard Actions // - KStdAction::saveOptions(this, + KStdAction::saveOptions(TQT_TQOBJECT(this), TQT_SLOT(slotSaveOptions()), actionCollection()); - KStdAction::preferences(this, + KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT(slotConfigure()), actionCollection()); - KStdAction::keyBindings(this, + KStdAction::keyBindings(TQT_TQOBJECT(this), TQT_SLOT(slotEditKeys()), actionCollection()); - KStdAction::configureToolbars(this, + KStdAction::configureToolbars(TQT_TQOBJECT(this), TQT_SLOT(slotEditToolbars()), actionCollection()); @@ -751,48 +751,48 @@ void RosegardenGUIApp::setupActions() // TODO : add some shortcuts here action = new KRadioAction(i18n("&Select and Edit"), icon, Key_F2, - this, TQT_SLOT(slotPointerSelected()), + TQT_TQOBJECT(this), TQT_SLOT(slotPointerSelected()), actionCollection(), "select"); action->setExclusiveGroup("segmenttools"); action = new KRadioAction(i18n("&Draw"), "pencil", Key_F3, - this, TQT_SLOT(slotDrawSelected()), + TQT_TQOBJECT(this), TQT_SLOT(slotDrawSelected()), actionCollection(), "draw"); action->setExclusiveGroup("segmenttools"); action = new KRadioAction(i18n("&Erase"), "eraser", Key_F4, - this, TQT_SLOT(slotEraseSelected()), + TQT_TQOBJECT(this), TQT_SLOT(slotEraseSelected()), actionCollection(), "erase"); action->setExclusiveGroup("segmenttools"); action = new KRadioAction(i18n("&Move"), "move", Key_F5, - this, TQT_SLOT(slotMoveSelected()), + TQT_TQOBJECT(this), TQT_SLOT(slotMoveSelected()), actionCollection(), "move"); action->setExclusiveGroup("segmenttools"); pixmap.load(pixmapDir + "/toolbar/resize.xpm"); icon = TQIconSet(pixmap); action = new KRadioAction(i18n("&Resize"), icon, Key_F6, - this, TQT_SLOT(slotResizeSelected()), + TQT_TQOBJECT(this), TQT_SLOT(slotResizeSelected()), actionCollection(), "resize"); action->setExclusiveGroup("segmenttools"); pixmap.load(pixmapDir + "/toolbar/split.xpm"); icon = TQIconSet(pixmap); action = new KRadioAction(i18n("&Split"), icon, Key_F7, - this, TQT_SLOT(slotSplitSelected()), + TQT_TQOBJECT(this), TQT_SLOT(slotSplitSelected()), actionCollection(), "split"); action->setExclusiveGroup("segmenttools"); pixmap.load(pixmapDir + "/toolbar/join.xpm"); icon = TQIconSet(pixmap); action = new KRadioAction(i18n("&Join"), icon, 0, - this, TQT_SLOT(slotJoinSelected()), + TQT_TQOBJECT(this), TQT_SLOT(slotJoinSelected()), actionCollection(), "join"); action->setExclusiveGroup("segmenttools"); - new KAction(i18n("&Harmonize"), 0, this, + new KAction(i18n("&Harmonize"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotHarmonizeSelection()), actionCollection(), "harmonize_selection"); @@ -800,40 +800,40 @@ void RosegardenGUIApp::setupActions() icon = TQIconSet(pixmap); new KAction(AddTimeSignatureCommand::getGlobalName(), icon, 0, - this, TQT_SLOT(slotEditTimeSignature()), + TQT_TQOBJECT(this), TQT_SLOT(slotEditTimeSignature()), actionCollection(), "add_time_signature"); - new KAction(i18n("Open Tempo and Time Signature Editor"), 0, this, + new KAction(i18n("Open Tempo and Time Signature Editor"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotEditTempos()), actionCollection(), "edit_tempos"); // // Edit menu // - new KAction(i18n("Cut Range"), Key_X + CTRL + SHIFT, this, + new KAction(i18n("Cut Range"), Key_X + CTRL + SHIFT, TQT_TQOBJECT(this), TQT_SLOT(slotCutRange()), actionCollection(), "cut_range"); - new KAction(i18n("Copy Range"), Key_C + CTRL + SHIFT, this, + new KAction(i18n("Copy Range"), Key_C + CTRL + SHIFT, TQT_TQOBJECT(this), TQT_SLOT(slotCopyRange()), actionCollection(), "copy_range"); - new KAction(i18n("Paste Range"), Key_V + CTRL + SHIFT, this, + new KAction(i18n("Paste Range"), Key_V + CTRL + SHIFT, TQT_TQOBJECT(this), TQT_SLOT(slotPasteRange()), actionCollection(), "paste_range"); /* - new KAction(i18n("Delete Range"), Key_Delete + SHIFT, this, + new KAction(i18n("Delete Range"), Key_Delete + SHIFT, TQT_TQOBJECT(this), TQT_SLOT(slotDeleteRange()), actionCollection(), "delete_range"); */ - new KAction(i18n("Insert Range..."), Key_Insert + SHIFT, this, + new KAction(i18n("Insert Range..."), Key_Insert + SHIFT, TQT_TQOBJECT(this), TQT_SLOT(slotInsertRange()), actionCollection(), "insert_range"); - new KAction(i18n("De&lete"), Key_Delete, this, + new KAction(i18n("De&lete"), Key_Delete, TQT_TQOBJECT(this), TQT_SLOT(slotDeleteSelectedSegments()), actionCollection(), "delete"); - new KAction(i18n("Select &All Segments"), Key_A + CTRL, this, + new KAction(i18n("Select &All Segments"), Key_A + CTRL, TQT_TQOBJECT(this), TQT_SLOT(slotSelectAll()), actionCollection(), "select_all"); @@ -841,19 +841,19 @@ void RosegardenGUIApp::setupActions() icon = TQIconSet(pixmap); new KAction(AddTempoChangeCommand::getGlobalName(), icon, 0, - this, TQT_SLOT(slotEditTempo()), + TQT_TQOBJECT(this), TQT_SLOT(slotEditTempo()), actionCollection(), "add_tempo"); new KAction(ChangeCompositionLengthCommand::getGlobalName(), 0, - this, TQT_SLOT(slotChangeCompositionLength()), + TQT_TQOBJECT(this), TQT_SLOT(slotChangeCompositionLength()), actionCollection(), "change_composition_length"); - new KAction(i18n("Edit Mar&kers..."), Key_K + CTRL, this, + new KAction(i18n("Edit Mar&kers..."), Key_K + CTRL, TQT_TQOBJECT(this), TQT_SLOT(slotEditMarkers()), actionCollection(), "edit_markers"); - new KAction(i18n("Edit Document P&roperties..."), 0, this, + new KAction(i18n("Edit Document P&roperties..."), 0, TQT_TQOBJECT(this), TQT_SLOT(slotEditDocumentProperties()), actionCollection(), "edit_doc_properties"); @@ -861,109 +861,109 @@ void RosegardenGUIApp::setupActions() // // Segments menu // - new KAction(i18n("Open in &Default Editor"), Key_Return, this, + new KAction(i18n("Open in &Default Editor"), Key_Return, TQT_TQOBJECT(this), TQT_SLOT(slotEdit()), actionCollection(), "edit_default"); pixmap.load(pixmapDir + "/toolbar/matrix.png"); icon = TQIconSet(pixmap); - new KAction(i18n("Open in Matri&x Editor"), icon, Key_M, this, + new KAction(i18n("Open in Matri&x Editor"), icon, Key_M, TQT_TQOBJECT(this), TQT_SLOT(slotEditInMatrix()), actionCollection(), "edit_matrix"); pixmap.load(pixmapDir + "/toolbar/matrix-percussion.png"); icon = TQIconSet(pixmap); - new KAction(i18n("Open in &Percussion Matrix Editor"), icon, Key_D, this, + new KAction(i18n("Open in &Percussion Matrix Editor"), icon, Key_D, TQT_TQOBJECT(this), TQT_SLOT(slotEditInPercussionMatrix()), actionCollection(), "edit_percussion_matrix"); pixmap.load(pixmapDir + "/toolbar/notation.png"); icon = TQIconSet(pixmap); - new KAction(i18n("Open in &Notation Editor"), icon, Key_N, this, + new KAction(i18n("Open in &Notation Editor"), icon, Key_N, TQT_TQOBJECT(this), TQT_SLOT(slotEditAsNotation()), actionCollection(), "edit_notation"); pixmap.load(pixmapDir + "/toolbar/eventlist.png"); icon = TQIconSet(pixmap); - new KAction(i18n("Open in &Event List Editor"), icon, Key_E, this, + new KAction(i18n("Open in &Event List Editor"), icon, Key_E, TQT_TQOBJECT(this), TQT_SLOT(slotEditInEventList()), actionCollection(), "edit_event_list"); pixmap.load(pixmapDir + "/toolbar/quantize.png"); icon = TQIconSet(pixmap); - new KAction(i18n("&Quantize..."), icon, Key_Equal, this, + new KAction(i18n("&Quantize..."), icon, Key_Equal, TQT_TQOBJECT(this), TQT_SLOT(slotQuantizeSelection()), actionCollection(), "quantize_selection"); new KAction(SegmentLabelCommand::getGlobalName(), 0, - this, TQT_SLOT(slotRelabelSegments()), + TQT_TQOBJECT(this), TQT_SLOT(slotRelabelSegments()), actionCollection(), "relabel_segment"); new KAction(SegmentTransposeCommand::getGlobalName(), 0, - this, TQT_SLOT(slotTransposeSegments()), + TQT_TQOBJECT(this), TQT_SLOT(slotTransposeSegments()), actionCollection(), "transpose"); - new KAction(i18n("Repeat Last Quantize"), Key_Plus, this, + new KAction(i18n("Repeat Last Quantize"), Key_Plus, TQT_TQOBJECT(this), TQT_SLOT(slotRepeatQuantizeSelection()), actionCollection(), "repeat_quantize"); - new KAction(SegmentRescaleCommand::getGlobalName(), 0, this, + new KAction(SegmentRescaleCommand::getGlobalName(), 0, TQT_TQOBJECT(this), TQT_SLOT(slotRescaleSelection()), actionCollection(), "rescale"); - new KAction(SegmentAutoSplitCommand::getGlobalName(), 0, this, + new KAction(SegmentAutoSplitCommand::getGlobalName(), 0, TQT_TQOBJECT(this), TQT_SLOT(slotAutoSplitSelection()), actionCollection(), "auto_split"); - new KAction(SegmentSplitByPitchCommand::getGlobalName(), 0, this, + new KAction(SegmentSplitByPitchCommand::getGlobalName(), 0, TQT_TQOBJECT(this), TQT_SLOT(slotSplitSelectionByPitch()), actionCollection(), "split_by_pitch"); - new KAction(SegmentSplitByRecordingSrcCommand::getGlobalName(), 0, this, + new KAction(SegmentSplitByRecordingSrcCommand::getGlobalName(), 0, TQT_TQOBJECT(this), TQT_SLOT(slotSplitSelectionByRecordedSrc()), actionCollection(), "split_by_recording"); - new KAction(i18n("Split at Time..."), 0, this, + new KAction(i18n("Split at Time..."), 0, TQT_TQOBJECT(this), TQT_SLOT(slotSplitSelectionAtTime()), actionCollection(), "split_at_time"); - new KAction(i18n("Jog &Left"), Key_Left + ALT, this, + new KAction(i18n("Jog &Left"), Key_Left + ALT, TQT_TQOBJECT(this), TQT_SLOT(slotJogLeft()), actionCollection(), "jog_left"); - new KAction(i18n("Jog &Right"), Key_Right + ALT, this, + new KAction(i18n("Jog &Right"), Key_Right + ALT, TQT_TQOBJECT(this), TQT_SLOT(slotJogRight()), actionCollection(), "jog_right"); - new KAction(i18n("Set Start Time..."), 0, this, + new KAction(i18n("Set Start Time..."), 0, TQT_TQOBJECT(this), TQT_SLOT(slotSetSegmentStartTimes()), actionCollection(), "set_segment_start"); - new KAction(i18n("Set Duration..."), 0, this, + new KAction(i18n("Set Duration..."), 0, TQT_TQOBJECT(this), TQT_SLOT(slotSetSegmentDurations()), actionCollection(), "set_segment_duration"); new KAction(SegmentJoinCommand::getGlobalName(), Key_J + CTRL, - this, TQT_SLOT(slotJoinSegments()), + TQT_TQOBJECT(this), TQT_SLOT(slotJoinSegments()), actionCollection(), "join_segments"); new KAction(i18n("Turn Re&peats into Copies"), 0, - this, TQT_SLOT(slotRepeatingSegments()), + TQT_TQOBJECT(this), TQT_SLOT(slotRepeatingSegments()), actionCollection(), "repeats_to_real_copies"); new KAction(i18n("Manage Tri&ggered Segments"), 0, - this, TQT_SLOT(slotManageTriggerSegments()), + TQT_TQOBJECT(this), TQT_SLOT(slotManageTriggerSegments()), actionCollection(), "manage_trigger_segments"); - new KAction(i18n("Set Tempos from &Beat Segment"), 0, this, + new KAction(i18n("Set Tempos from &Beat Segment"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotGrooveQuantize()), actionCollection(), "groove_quantize"); - new KAction(i18n("Set &Tempo to Audio Segment Duration"), 0, this, + new KAction(i18n("Set &Tempo to Audio Segment Duration"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotTempoToSegmentLength()), actionCollection(), "set_tempo_to_segment_length"); @@ -971,10 +971,10 @@ void RosegardenGUIApp::setupActions() icon = TQIconSet(pixmap); new KAction(i18n("Manage A&udio Files"), icon, Key_U + CTRL, - this, TQT_SLOT(slotAudioManager()), + TQT_TQOBJECT(this), TQT_SLOT(slotAudioManager()), actionCollection(), "audio_manager"); - m_viewSegmentLabels = new KToggleAction(i18n("Show Segment Labels"), 0, this, + m_viewSegmentLabels = new KToggleAction(i18n("Show Segment Labels"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotToggleSegmentLabels()), actionCollection(), "show_segment_labels"); @@ -984,64 +984,64 @@ void RosegardenGUIApp::setupActions() pixmap.load(pixmapDir + "/toolbar/add_tracks.png"); icon = TQIconSet(pixmap); new KAction(i18n("Add &Track"), icon, CTRL + Key_T, - this, TQT_SLOT(slotAddTrack()), + TQT_TQOBJECT(this), TQT_SLOT(slotAddTrack()), actionCollection(), "add_track"); new KAction(i18n("&Add Tracks..."), 0, - this, TQT_SLOT(slotAddTracks()), + TQT_TQOBJECT(this), TQT_SLOT(slotAddTracks()), actionCollection(), "add_tracks"); pixmap.load(pixmapDir + "/toolbar/delete_track.png"); icon = TQIconSet(pixmap); new KAction(i18n("D&elete Track"), icon, CTRL + Key_D, - this, TQT_SLOT(slotDeleteTrack()), + TQT_TQOBJECT(this), TQT_SLOT(slotDeleteTrack()), actionCollection(), "delete_track"); pixmap.load(pixmapDir + "/toolbar/move_track_down.png"); icon = TQIconSet(pixmap); new KAction(i18n("Move Track &Down"), icon, SHIFT + Key_Down, - this, TQT_SLOT(slotMoveTrackDown()), + TQT_TQOBJECT(this), TQT_SLOT(slotMoveTrackDown()), actionCollection(), "move_track_down"); pixmap.load(pixmapDir + "/toolbar/move_track_up.png"); icon = TQIconSet(pixmap); new KAction(i18n("Move Track &Up"), icon, SHIFT + Key_Up, - this, TQT_SLOT(slotMoveTrackUp()), + TQT_TQOBJECT(this), TQT_SLOT(slotMoveTrackUp()), actionCollection(), "move_track_up"); new KAction(i18n("Select &Next Track"), Key_Down, - this, TQT_SLOT(slotTrackDown()), + TQT_TQOBJECT(this), TQT_SLOT(slotTrackDown()), actionCollection(), "select_next_track"); new KAction(i18n("Select &Previous Track"), Key_Up, - this, TQT_SLOT(slotTrackUp()), + TQT_TQOBJECT(this), TQT_SLOT(slotTrackUp()), actionCollection(), "select_previous_track"); new KAction(i18n("Mute or Unmute Track"), Key_U, - this, TQT_SLOT(slotToggleMutedCurrentTrack()), + TQT_TQOBJECT(this), TQT_SLOT(slotToggleMutedCurrentTrack()), actionCollection(), "toggle_mute_track"); new KAction(i18n("Arm or Un-arm Track for Record"), Key_R, - this, TQT_SLOT(slotToggleRecordCurrentTrack()), + TQT_TQOBJECT(this), TQT_SLOT(slotToggleRecordCurrentTrack()), actionCollection(), "toggle_arm_track"); pixmap.load(pixmapDir + "/toolbar/mute-all.png"); icon = TQIconSet(pixmap); new KAction(i18n("&Mute all Tracks"), icon, 0, - this, TQT_SLOT(slotMuteAllTracks()), + TQT_TQOBJECT(this), TQT_SLOT(slotMuteAllTracks()), actionCollection(), "mute_all_tracks"); pixmap.load(pixmapDir + "/toolbar/un-mute-all.png"); icon = TQIconSet(pixmap); new KAction(i18n("&Unmute all Tracks"), icon, 0, - this, TQT_SLOT(slotUnmuteAllTracks()), + TQT_TQOBJECT(this), TQT_SLOT(slotUnmuteAllTracks()), actionCollection(), "unmute_all_tracks"); - new KAction(i18n("&Remap Instruments..."), 0, this, + new KAction(i18n("&Remap Instruments..."), 0, TQT_TQOBJECT(this), TQT_SLOT(slotRemapInstruments()), actionCollection(), "remap_instruments"); @@ -1050,78 +1050,78 @@ void RosegardenGUIApp::setupActions() // pixmap.load(pixmapDir + "/toolbar/mixer.png"); icon = TQIconSet(pixmap); - new KAction(i18n("&Audio Mixer"), icon, 0, this, + new KAction(i18n("&Audio Mixer"), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotOpenAudioMixer()), actionCollection(), "audio_mixer"); pixmap.load(pixmapDir + "/toolbar/midimixer.png"); icon = TQIconSet(pixmap); - new KAction(i18n("Midi Mi&xer"), icon, 0, this, + new KAction(i18n("Midi Mi&xer"), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotOpenMidiMixer()), actionCollection(), "midi_mixer"); pixmap.load(pixmapDir + "/toolbar/manage-midi-devices.xpm"); icon = TQIconSet(pixmap); - new KAction(i18n("Manage MIDI &Devices"), icon, 0, this, + new KAction(i18n("Manage MIDI &Devices"), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotManageMIDIDevices()), actionCollection(), "manage_devices"); pixmap.load(pixmapDir + "/toolbar/manage-synth-plugins.png"); icon = TQIconSet(pixmap); - new KAction(i18n("Manage S&ynth Plugins"), icon, 0, this, + new KAction(i18n("Manage S&ynth Plugins"), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotManageSynths()), actionCollection(), "manage_synths"); - new KAction(i18n("Modify MIDI &Filters"), "filter", 0, this, + new KAction(i18n("Modify MIDI &Filters"), "filter", 0, TQT_TQOBJECT(this), TQT_SLOT(slotModifyMIDIFilters()), actionCollection(), "modify_midi_filters"); - m_enableMIDIrouting = new KToggleAction(i18n("MIDI Thru Routing"), 0, this, + m_enableMIDIrouting = new KToggleAction(i18n("MIDI Thru Routing"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotEnableMIDIThruRouting()), actionCollection(), "enable_midi_routing"); pixmap.load(pixmapDir + "/toolbar/time-musical.png"); icon = TQIconSet(pixmap); - new KAction(i18n("Manage &Metronome"), 0, this, + new KAction(i18n("Manage &Metronome"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotManageMetronome()), actionCollection(), "manage_metronome"); - new KAction(i18n("&Save Current Document as Default Studio"), 0, this, + new KAction(i18n("&Save Current Document as Default Studio"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotSaveDefaultStudio()), actionCollection(), "save_default_studio"); - new KAction(i18n("&Import Default Studio"), 0, this, + new KAction(i18n("&Import Default Studio"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotImportDefaultStudio()), actionCollection(), "load_default_studio"); - new KAction(i18n("Im&port Studio from File..."), 0, this, + new KAction(i18n("Im&port Studio from File..."), 0, TQT_TQOBJECT(this), TQT_SLOT(slotImportStudio()), actionCollection(), "load_studio"); - new KAction(i18n("&Reset MIDI Network"), 0, this, + new KAction(i18n("&Reset MIDI Network"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotResetMidiNetwork()), actionCollection(), "reset_midi_network"); - m_setQuickMarkerAction = new KAction(i18n("Set Quick Marker at Playback Position"), 0, CTRL + Key_1, this, + m_setQuickMarkerAction = new KAction(i18n("Set Quick Marker at Playback Position"), 0, CTRL + Key_1, TQT_TQOBJECT(this), TQT_SLOT(slotSetQuickMarker()), actionCollection(), "set_quick_marker"); - m_jumpToQuickMarkerAction = new KAction(i18n("Jump to Quick Marker"), 0, Key_1, this, + m_jumpToQuickMarkerAction = new KAction(i18n("Jump to Quick Marker"), 0, Key_1, TQT_TQOBJECT(this), TQT_SLOT(slotJumpToQuickMarker()), actionCollection(), "jump_to_quick_marker"); // // Marker Ruler popup menu // -// new KAction(i18n("Insert Marker"), 0, 0, this, +// new KAction(i18n("Insert Marker"), 0, 0, TQT_TQOBJECT(this), // TQT_SLOT(slotInsertMarkerHere()), actionCollection(), // "insert_marker_here"); // -// new KAction(i18n("Insert Marker at Playback Position"), 0, 0, this, +// new KAction(i18n("Insert Marker at Playback Position"), 0, 0, TQT_TQOBJECT(this), // TQT_SLOT(slotInsertMarkerAtPointer()), actionCollection(), // "insert_marker_at_pointer"); // -// new KAction(i18n("Delete Marker"), 0, 0, this, +// new KAction(i18n("Delete Marker"), 0, 0, TQT_TQOBJECT(this), // TQT_SLOT(slotDeleteMarker()), actionCollection(), // "delete_marker"); @@ -1139,7 +1139,7 @@ void RosegardenGUIApp::setupActions() // pixmap.load(pixmapDir + "/toolbar/transport-play.png"); icon = TQIconSet(pixmap); - m_playTransport = new KAction(i18n("&Play"), icon, Key_Enter, this, + m_playTransport = new KAction(i18n("&Play"), icon, Key_Enter, TQT_TQOBJECT(this), TQT_SLOT(slotPlay()), actionCollection(), "play"); // Alternative shortcut for Play @@ -1150,7 +1150,7 @@ void RosegardenGUIApp::setupActions() pixmap.load(pixmapDir + "/toolbar/transport-stop.png"); icon = TQIconSet(pixmap); - m_stopTransport = new KAction(i18n("&Stop"), icon, Key_Insert, this, + m_stopTransport = new KAction(i18n("&Stop"), icon, Key_Insert, TQT_TQOBJECT(this), TQT_SLOT(slotStop()), actionCollection(), "stop"); m_stopTransport->setGroup(TransportDialogConfigGroup); @@ -1158,59 +1158,59 @@ void RosegardenGUIApp::setupActions() pixmap.load(pixmapDir + "/toolbar/transport-ffwd.png"); icon = TQIconSet(pixmap); m_ffwdTransport = new KAction(i18n("&Fast Forward"), icon, Key_PageDown, - this, + TQT_TQOBJECT(this), TQT_SLOT(slotFastforward()), actionCollection(), "fast_forward"); m_ffwdTransport->setGroup(TransportDialogConfigGroup); pixmap.load(pixmapDir + "/toolbar/transport-rewind.png"); icon = TQIconSet(pixmap); - m_rewindTransport = new KAction(i18n("Re&wind"), icon, Key_End, this, + m_rewindTransport = new KAction(i18n("Re&wind"), icon, Key_End, TQT_TQOBJECT(this), TQT_SLOT(slotRewind()), actionCollection(), "rewind"); m_rewindTransport->setGroup(TransportDialogConfigGroup); pixmap.load(pixmapDir + "/toolbar/transport-record.png"); icon = TQIconSet(pixmap); - m_recordTransport = new KAction(i18n("P&unch in Record"), icon, Key_Space, this, + m_recordTransport = new KAction(i18n("P&unch in Record"), icon, Key_Space, TQT_TQOBJECT(this), TQT_SLOT(slotToggleRecord()), actionCollection(), "recordtoggle"); m_recordTransport->setGroup(TransportDialogConfigGroup); pixmap.load(pixmapDir + "/toolbar/transport-record.png"); icon = TQIconSet(pixmap); - m_recordTransport = new KAction(i18n("&Record"), icon, 0, this, + m_recordTransport = new KAction(i18n("&Record"), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotRecord()), actionCollection(), "record"); m_recordTransport->setGroup(TransportDialogConfigGroup); pixmap.load(pixmapDir + "/toolbar/transport-rewind-end.png"); icon = TQIconSet(pixmap); - m_rewindEndTransport = new KAction(i18n("Rewind to &Beginning"), icon, 0, this, + m_rewindEndTransport = new KAction(i18n("Rewind to &Beginning"), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotRewindToBeginning()), actionCollection(), "rewindtobeginning"); m_rewindEndTransport->setGroup(TransportDialogConfigGroup); pixmap.load(pixmapDir + "/toolbar/transport-ffwd-end.png"); icon = TQIconSet(pixmap); - m_ffwdEndTransport = new KAction(i18n("Fast Forward to &End"), icon, 0, this, + m_ffwdEndTransport = new KAction(i18n("Fast Forward to &End"), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotFastForwardToEnd()), actionCollection(), "fastforwardtoend"); m_ffwdEndTransport->setGroup(TransportDialogConfigGroup); pixmap.load(pixmapDir + "/toolbar/transport-tracking.png"); icon = TQIconSet(pixmap); - (new KToggleAction(i18n("Scro&ll to Follow Playback"), icon, Key_Pause, this, + (new KToggleAction(i18n("Scro&ll to Follow Playback"), icon, Key_Pause, TQT_TQOBJECT(this), TQT_SLOT(slotToggleTracking()), actionCollection(), "toggle_tracking"))->setChecked(true); pixmap.load(pixmapDir + "/toolbar/transport-panic.png"); icon = TQIconSet(pixmap); - new KAction( i18n("Panic"), icon, Key_P + CTRL + ALT, this, TQT_SLOT(slotPanic()), + new KAction( i18n("Panic"), icon, Key_P + CTRL + ALT, TQT_TQOBJECT(this), TQT_SLOT(slotPanic()), actionCollection(), "panic"); // DEBUG FACILITY - new KAction(i18n("Segment Debug Dump "), 0, this, + new KAction(i18n("Segment Debug Dump "), 0, TQT_TQOBJECT(this), TQT_SLOT(slotDebugDump()), actionCollection(), "debug_dump_segments"); @@ -1228,7 +1228,7 @@ void RosegardenGUIApp::setupActions() if (setTrackInstrumentMenu) { connect(setTrackInstrumentMenu, TQT_SIGNAL(aboutToShow()), - this, TQT_SLOT(slotPopulateTrackInstrumentPopup())); + TQT_TQOBJECT(this), TQT_SLOT(slotPopulateTrackInstrumentPopup())); } else { RG_DEBUG << "RosegardenGUIApp::setupActions() : couldn't find set_track_instrument menu - check rosegardenui.rcn\n"; } @@ -1293,18 +1293,18 @@ void RosegardenGUIApp::initZoomToolbar() } // zoom labels - TQString minZoom = TQString("%1%").arg(factors[0] * 100.0); - TQString maxZoom = TQString("%1%").arg(factors[(sizeof(factors) / sizeof(factors[0])) - 1] * 100.0); + TQString minZoom = TQString("%1%").tqarg(factors[0] * 100.0); + TQString maxZoom = TQString("%1%").tqarg(factors[(sizeof(factors) / sizeof(factors[0])) - 1] * 100.0); m_zoomSlider = new ZoomSlider<double> - (zoomSizes, -1, TQSlider::Horizontal, zoomToolbar, "kde toolbar widget"); + (zoomSizes, -1, Qt::Horizontal, zoomToolbar, "kde toolbar widget"); m_zoomSlider->setTracking(true); - m_zoomSlider->setFocusPolicy(TQWidget::NoFocus); + m_zoomSlider->setFocusPolicy(TQ_NoFocus); m_zoomLabel = new TQLabel(minZoom, zoomToolbar, "kde toolbar widget"); m_zoomLabel->setIndent(10); connect(m_zoomSlider, TQT_SIGNAL(valueChanged(int)), - this, TQT_SLOT(slotChangeZoom(int))); + TQT_TQOBJECT(this), TQT_SLOT(slotChangeZoom(int))); // set initial zoom - we might want to make this a config option // m_zoomSlider->setToDefault(); @@ -1354,7 +1354,7 @@ void RosegardenGUIApp::initView() // Connect up this signal so that we can force tool mode // changes from the view connect(m_swapView, TQT_SIGNAL(activateTool(TQString)), - this, TQT_SLOT(slotActivateTool(TQString))); + TQT_TQOBJECT(this), TQT_SLOT(slotActivateTool(TQString))); connect(m_swapView, TQT_SIGNAL(segmentsSelected(const SegmentSelection &)), @@ -1415,10 +1415,10 @@ void RosegardenGUIApp::initView() m_view = m_swapView; connect(m_view, TQT_SIGNAL(stateChange(TQString, bool)), - this, TQT_SLOT (slotStateChanged(TQString, bool))); + TQT_TQOBJECT(this), TQT_SLOT (slotStateChanged(TQString, bool))); connect(m_view, TQT_SIGNAL(instrumentParametersChanged(InstrumentId)), - this, TQT_SIGNAL(instrumentParametersChanged(InstrumentId))); + TQT_TQOBJECT(this), TQT_SIGNAL(instrumentParametersChanged(InstrumentId))); // We only check for the SequenceManager to make sure // we're not on the first pass though - we don't want @@ -1594,13 +1594,13 @@ void RosegardenGUIApp::setDocument(RosegardenGUIDoc* newDocument) m_doc, TQT_SLOT(slotDocumentModified())); connect(m_doc, TQT_SIGNAL(pointerPositionChanged(timeT)), - this, TQT_SLOT(slotSetPointerPosition(timeT))); + TQT_TQOBJECT(this), TQT_SLOT(slotSetPointerPosition(timeT))); connect(m_doc, TQT_SIGNAL(documentModified(bool)), - this, TQT_SLOT(slotDocumentModified(bool))); + TQT_TQOBJECT(this), TQT_SLOT(slotDocumentModified(bool))); connect(m_doc, TQT_SIGNAL(loopChanged(timeT, timeT)), - this, TQT_SLOT(slotSetLoop(timeT, timeT))); + TQT_TQOBJECT(this), TQT_SLOT(slotSetLoop(timeT, timeT))); m_doc->getCommandHistory()->attachView(actionCollection()); @@ -1610,13 +1610,13 @@ void RosegardenGUIApp::setDocument(RosegardenGUIDoc* newDocument) TQT_SLOT(slotTestClipboard())); // connect and start the autosave timer - connect(m_autoSaveTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotAutoSave())); + connect(m_autoSaveTimer, TQT_SIGNAL(timeout()), TQT_TQOBJECT(this), TQT_SLOT(slotAutoSave())); m_autoSaveTimer->start(m_doc->getAutoSavePeriod() * 1000); // Connect the playback timer // - connect(m_playTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotUpdatePlaybackPosition())); - connect(m_stopTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotUpdateMonitoring())); + connect(m_playTimer, TQT_SIGNAL(timeout()), TQT_TQOBJECT(this), TQT_SLOT(slotUpdatePlaybackPosition())); + connect(m_stopTimer, TQT_SIGNAL(timeout()), TQT_TQOBJECT(this), TQT_SLOT(slotUpdateMonitoring())); // finally recreate the main view // @@ -1628,10 +1628,10 @@ void RosegardenGUIApp::setDocument(RosegardenGUIDoc* newDocument) } connect(m_doc, TQT_SIGNAL(devicesResyncd()), - this, TQT_SLOT(slotDocumentDevicesResyncd())); + TQT_TQOBJECT(this), TQT_SLOT(slotDocumentDevicesResyncd())); m_doc->syncDevices(); - m_doc->clearModifiedStatus(); + m_doc->clearModifiedtqStatus(); if (newDocument->getStudio().haveMidiDevices()) { stateChanged("got_midi_devices"); @@ -1658,7 +1658,7 @@ void RosegardenGUIApp::setDocument(RosegardenGUIDoc* newDocument) emit documentChanged(m_doc); - m_doc->clearModifiedStatus(); // because it's set as modified by the various + m_doc->clearModifiedtqStatus(); // because it's set as modified by the various // init operations // TODO: this sucks, have to sort it out somehow. @@ -1716,7 +1716,7 @@ RosegardenGUIApp::createDocument(TQString filePath, ImportType importType) if (!info.exists()) { // can happen with command-line arg, so... KStartupLogo::hideIfStillThere(); - KMessageBox::sorry(this, i18n("File \"%1\" does not exist").arg(filePath)); + KMessageBox::sorry(this, i18n("File \"%1\" does not exist").tqarg(filePath)); return 0; } @@ -1731,7 +1731,7 @@ RosegardenGUIApp::createDocument(TQString filePath, ImportType importType) if (!file.open(IO_ReadOnly)) { KStartupLogo::hideIfStillThere(); TQString errStr = - i18n("You do not have read permission for \"%1\"").arg(filePath); + i18n("You do not have read permission for \"%1\"").tqarg(filePath); KMessageBox::sorry(this, errStr); return 0; @@ -1739,7 +1739,7 @@ RosegardenGUIApp::createDocument(TQString filePath, ImportType importType) // Stop if playing // - if (m_seqManager && m_seqManager->getTransportStatus() == PLAYING) + if (m_seqManager && m_seqManager->getTransporttqStatus() == PLAYING) slotStop(); slotEnableTransport(false); @@ -1834,7 +1834,7 @@ RosegardenGUIApp::createDocumentFromRGFile(TQString filePath) newDoc->setAbsFilePath(info.absFilePath()); newDoc->setTitle(info.fileName()); } else { - newDoc->clearModifiedStatus(); + newDoc->clearModifiedtqStatus(); } } else { delete newDoc; @@ -1850,8 +1850,8 @@ void RosegardenGUIApp::slotSaveOptions() #ifdef SETTING_LOG_DEBUG - _settingLog(TQString("SETTING 2 : transport flap extended = %1").arg(getTransport()->isExpanded())); - _settingLog(TQString("SETTING 2 : show track labels = %1").arg(m_viewTrackLabels->isChecked())); + _settingLog(TQString("SETTING 2 : transport flap extended = %1").tqarg(getTransport()->isExpanded())); + _settingLog(TQString("SETTING 2 : show track labels = %1").tqarg(m_viewTrackLabels->isChecked())); #endif kapp->config()->setGroup(GeneralOptionsConfigGroup); @@ -1893,13 +1893,13 @@ void RosegardenGUIApp::setupFileDialogSpeedbar() unsigned int n = config->readUnsignedNumEntry("Number of Entries", 0); - config->writeEntry(TQString("Description_%1").arg(n), i18n("Example Files")); - config->writeEntry(TQString("IconGroup_%1").arg(n), 4); - config->writeEntry(TQString("Icon_%1").arg(n), "folder"); - config->writeEntry(TQString("URL_%1").arg(n), + config->writeEntry(TQString("Description_%1").tqarg(n), i18n("Example Files")); + config->writeEntry(TQString("IconGroup_%1").tqarg(n), 4); + config->writeEntry(TQString("Icon_%1").tqarg(n), "folder"); + config->writeEntry(TQString("URL_%1").tqarg(n), KGlobal::dirs()->findResource("appdata", "examples/")); - RG_DEBUG << "wrote url " << config->readEntry(TQString("URL_%1").arg(n)) << endl; + RG_DEBUG << "wrote url " << config->readEntry(TQString("URL_%1").tqarg(n)) << endl; config->writeEntry("Examples Set", true); config->writeEntry("Number of Entries", n + 1); @@ -1936,7 +1936,7 @@ void RosegardenGUIApp::readOptions() #ifdef SETTING_LOG_DEBUG - _settingLog(TQString("SETTING 3 : transport flap extended = %1").arg(opt)); + _settingLog(TQString("SETTING 3 : transport flap extended = %1").tqarg(opt)); #endif if (opt) @@ -1948,7 +1948,7 @@ void RosegardenGUIApp::readOptions() #ifdef SETTING_LOG_DEBUG - _settingLog(TQString("SETTING 3 : show track labels = %1").arg(opt)); + _settingLog(TQString("SETTING 3 : show track labels = %1").tqarg(opt)); #endif m_viewTrackLabels->setChecked(opt); @@ -2010,10 +2010,10 @@ void RosegardenGUIApp::saveGlobalProperties(KConfig *cfg) if (!res) { if (errMsg) KMessageBox::error(this, i18n(TQString("Could not save document at %1\nError was : %2") - .arg(tempname).arg(errMsg))); + .tqarg(tempname).tqarg(errMsg))); else KMessageBox::error(this, i18n(TQString("Could not save document at %1") - .arg(tempname))); + .tqarg(tempname))); } } } @@ -2061,8 +2061,8 @@ bool RosegardenGUIApp::queryClose() RG_DEBUG << "RosegardenGUIApp::queryClose" << endl; #ifdef SETTING_LOG_DEBUG - _settingLog(TQString("SETTING 1 : transport flap extended = %1").arg(getTransport()->isExpanded())); - _settingLog(TQString("SETTING 1 : show track labels = %1").arg(m_viewTrackLabels->isChecked())); + _settingLog(TQString("SETTING 1 : transport flap extended = %1").tqarg(getTransport()->isExpanded())); + _settingLog(TQString("SETTING 1 : show track labels = %1").tqarg(m_viewTrackLabels->isChecked())); #endif TQString errMsg; @@ -2078,7 +2078,7 @@ bool RosegardenGUIApp::queryClose() // disconnect(m_transport, TQT_SIGNAL(closed()), - this, TQT_SLOT(slotCloseTransport())); + TQT_TQOBJECT(this), TQT_SLOT(slotCloseTransport())); } */ @@ -2151,7 +2151,7 @@ void RosegardenGUIApp::openURL(const KURL& url) if (!url.isValid()) { TQString string; - string = i18n( "Malformed URL\n%1").arg(netFile); + string = i18n( "Malformed URL\n%1").tqarg(netFile); KMessageBox::sorry(this, string); return ; @@ -2160,7 +2160,7 @@ void RosegardenGUIApp::openURL(const KURL& url) TQString target, caption(url.path()); if (KIO::NetAccess::download(url, target, this) == false) { - KMessageBox::error(this, i18n("Cannot download file %1").arg(url.prettyURL())); + KMessageBox::error(this, i18n("Cannot download file %1").tqarg(url.prettyURL())); return ; } @@ -2192,7 +2192,7 @@ void RosegardenGUIApp::slotFileOpen() kapp->config()->setGroup("Recent Dirs"); TQString recentString = kapp->config()->readEntry("ROSEGARDEN", ""); kapp->config()->writeEntry - ("ROSEGARDEN", TQString("file:%1,%2").arg(examplesDir).arg(recentString)); + ("ROSEGARDEN", TQString("file:%1,%2").tqarg(examplesDir).tqarg(recentString)); } KURL url = KFileDialog::getOpenURL @@ -2226,7 +2226,7 @@ void RosegardenGUIApp::slotMerge() TQString target; if (KIO::NetAccess::download(url, target, this) == false) { - KMessageBox::error(this, i18n("Cannot download file %1").arg(url.prettyURL())); + KMessageBox::error(this, i18n("Cannot download file %1").tqarg(url.prettyURL())); return ; } @@ -2273,33 +2273,33 @@ void RosegardenGUIApp::slotFileSave() if (!res) { if (errMsg) KMessageBox::error(this, i18n(TQString("Could not save document at %1\nError was : %2") - .arg(docFilePath).arg(errMsg))); + .tqarg(docFilePath).tqarg(errMsg))); else KMessageBox::error(this, i18n(TQString("Could not save document at %1") - .arg(docFilePath))); + .tqarg(docFilePath))); } } } -QString +TQString RosegardenGUIApp::getValidWriteFile(TQString descriptiveExtension, TQString label) { // extract first extension listed in descriptiveExtension, for instance, // ".rg" from "*.rg|Rosegarden files", or ".mid" from "*.mid *.midi|MIDI Files" // - TQString extension = descriptiveExtension.left(descriptiveExtension.find('|')).mid(1).section(' ', 0, 0); + TQString extension = descriptiveExtension.left(descriptiveExtension.tqfind('|')).mid(1).section(' ', 0, 0); RG_DEBUG << "RosegardenGUIApp::getValidWriteFile() : extension = " << extension << endl; // It's too bad there isn't this functionality within // KFileDialog::getSaveFileName - KFileDialog saveFileDialog(":ROSEGARDEN", descriptiveExtension, this, label, true); + KFileDialog saveFileDialog(":ROSEGARDEN", descriptiveExtension,this, label, true); saveFileDialog.setOperationMode(KFileDialog::Saving); if (m_doc) { TQString saveFileName = m_doc->getAbsFilePath(); // Show filename without the old extension - int dotLoc = saveFileName.findRev('.'); + int dotLoc = saveFileName.tqfindRev('.'); if (dotLoc >= int(saveFileName.length() - 4)) { saveFileName = saveFileName.left(dotLoc); } @@ -2376,10 +2376,10 @@ bool RosegardenGUIApp::slotFileSaveAs() if (!res) { if (errMsg) KMessageBox::error(this, i18n(TQString("Could not save document at %1\nError was : %2") - .arg(newName).arg(errMsg))); + .tqarg(newName).tqarg(errMsg))); else KMessageBox::error(this, i18n(TQString("Could not save document at %1") - .arg(newName))); + .tqarg(newName))); } else { @@ -2764,7 +2764,7 @@ RosegardenGUIApp::testAudioPath(TQString op) } catch (AudioFileManager::BadAudioPathException) { if (KMessageBox::warningContinueCancel (this, - i18n("The audio file path does not exist or is not writable.\nYou must set the audio file path to a valid directory in Document Properties before %1.\nWould you like to set it now?").arg(op), + i18n("The audio file path does not exist or is not writable.\nYou must set the audio file path to a valid directory in Document Properties before %1.\nWould you like to set it now?").tqarg(op), i18n("Warning"), i18n("Set audio file path")) == KMessageBox::Continue) { slotOpenAudioPathSettings(); @@ -3105,7 +3105,7 @@ void RosegardenGUIApp::slotTempoToSegmentLength() slotTempoToSegmentLength(this); } -void RosegardenGUIApp::slotTempoToSegmentLength(TQWidget* parent) +void RosegardenGUIApp::slotTempoToSegmentLength(TQWidget* tqparent) { RG_DEBUG << "RosegardenGUIApp::slotTempoToSegmentLength" << endl; @@ -3134,8 +3134,8 @@ void RosegardenGUIApp::slotTempoToSegmentLength(TQWidget* parent) int beats = 0; - // Get user to tell us how many beats or bars the segment contains - BeatsBarsDialog dialog(parent); + // Get user to tell us how many beats or bars the segment tqcontains + BeatsBarsDialog dialog(tqparent); if (dialog.exec() == TQDialog::Accepted) { beats = dialog.getQuantity(); // beats (or bars) if (dialog.getMode() == 1) // bars (multiply by time sig) @@ -3714,7 +3714,7 @@ void RosegardenGUIApp::importProject(TQString filePath) if (!proc->normalExit() || proc->exitStatus()) { CurrentProgressDialog::freeze(); - KMessageBox::sorry(this, i18n("Failed to import project file \"%1\"").arg(filePath)); + KMessageBox::sorry(this, i18n("Failed to import project file \"%1\"").tqarg(filePath)); CurrentProgressDialog::thaw(); delete proc; return ; @@ -3723,8 +3723,8 @@ void RosegardenGUIApp::importProject(TQString filePath) delete proc; TQString rgFile = filePath; - rgFile.replace(TQRegExp(".rg.rgp$"), ".rg"); - rgFile.replace(TQRegExp(".rgp$"), ".rg"); + rgFile.tqreplace(TQRegExp(".rg.rgp$"), ".rg"); + rgFile.tqreplace(TQRegExp(".rgp$"), ".rg"); openURL(rgFile); } @@ -4236,7 +4236,7 @@ RosegardenGUIApp::slotUpdatePlaybackPosition() // std::cerr << "RosegardenGUIApp::slotUpdatePlaybackPosition: mapper timeT = " << elapsedTime << std::endl; - if (m_seqManager->getTransportStatus() == RECORDING) { + if (m_seqManager->getTransporttqStatus() == RECORDING) { MappedComposition mC; if (mapper->getRecordedEvents(mC) > 0) { @@ -4358,10 +4358,10 @@ void RosegardenGUIApp::slotSetPointerPosition(timeT t) // std::cerr << "RosegardenGUIApp::slotSetPointerPosition: t = " << t << std::endl; if (m_seqManager) { - if ( m_seqManager->getTransportStatus() == PLAYING || - m_seqManager->getTransportStatus() == RECORDING ) { + if ( m_seqManager->getTransporttqStatus() == PLAYING || + m_seqManager->getTransporttqStatus() == RECORDING ) { if (t > comp.getEndMarker()) { - if (m_seqManager->getTransportStatus() == PLAYING) { + if (m_seqManager->getTransporttqStatus() == PLAYING) { slotStop(); t = comp.getEndMarker(); @@ -4477,8 +4477,8 @@ void RosegardenGUIApp::slotDisplayBarTime(timeT t) void RosegardenGUIApp::slotRefreshTimeDisplay() { - if ( m_seqManager->getTransportStatus() == PLAYING || - m_seqManager->getTransportStatus() == RECORDING ) { + if ( m_seqManager->getTransporttqStatus() == PLAYING || + m_seqManager->getTransporttqStatus() == RECORDING ) { return ; // it'll be refreshed in a moment anyway } slotSetPointerPosition(m_doc->getComposition().getPosition()); @@ -4502,14 +4502,14 @@ void RosegardenGUIApp::slotTestStartupTester() if (!m_startupTester) { m_startupTester = new StartupTester(); connect(m_startupTester, TQT_SIGNAL(newerVersionAvailable(TQString)), - this, TQT_SLOT(slotNewerVersionAvailable(TQString))); + TQT_TQOBJECT(this), TQT_SLOT(slotNewerVersionAvailable(TQString))); m_startupTester->start(); - TQTimer::singleShot(100, this, TQT_SLOT(slotTestStartupTester())); + TQTimer::singleShot(100, TQT_TQOBJECT(this), TQT_SLOT(slotTestStartupTester())); return ; } if (!m_startupTester->isReady()) { - TQTimer::singleShot(100, this, TQT_SLOT(slotTestStartupTester())); + TQTimer::singleShot(100, TQT_TQOBJECT(this), TQT_SLOT(slotTestStartupTester())); return ; } @@ -4530,7 +4530,7 @@ void RosegardenGUIApp::slotTestStartupTester() } else { for (int i = 0; i < missing.count(); ++i) { // if (missingFeatures.count() > 1) { - allMissing.push_back(i18n("%1 - for project file support").arg(missing[i])); + allMissing.push_back(i18n("%1 - for project file support").tqarg(missing[i])); // } else { // allMissing.push_back(missing[i]); // } @@ -4551,7 +4551,7 @@ void RosegardenGUIApp::slotTestStartupTester() } else { for (int i = 0; i < missing.count(); ++i) { if (missingFeatures.count() > 1) { - allMissing.push_back(i18n("%1 - for LilyPond preview support").arg(missing[i])); + allMissing.push_back(i18n("%1 - for LilyPond preview support").tqarg(missing[i])); } else { allMissing.push_back(missing[i]); } @@ -4560,7 +4560,7 @@ void RosegardenGUIApp::slotTestStartupTester() } #ifdef HAVE_LIBJACK - if (m_seqManager && (m_seqManager->getSoundDriverStatus() & AUDIO_OK)) { + if (m_seqManager && (m_seqManager->getSoundDrivertqStatus() & AUDIO_OK)) { m_haveAudioImporter = m_startupTester->haveAudioFileImporter(&missing); @@ -4571,7 +4571,7 @@ void RosegardenGUIApp::slotTestStartupTester() } else { for (int i = 0; i < missing.count(); ++i) { if (missingFeatures.count() > 1) { - allMissing.push_back(i18n("%1 - for audio file import").arg(missing[i])); + allMissing.push_back(i18n("%1 - for audio file import").tqarg(missing[i])); } else { allMissing.push_back(missing[i]); } @@ -4585,13 +4585,13 @@ void RosegardenGUIApp::slotTestStartupTester() TQString message = i18n("<h3>Helper programs not found</h3><p>Rosegarden could not find one or more helper programs which it needs to provide some features. The following features will not be available:</p>"); message += i18n("<ul>"); for (int i = 0; i < missingFeatures.count(); ++i) { - message += i18n("<li>%1</li>").arg(missingFeatures[i]); + message += i18n("<li>%1</li>").tqarg(missingFeatures[i]); } message += i18n("</ul>"); message += i18n("<p>To fix this, you should install the following additional programs:</p>"); message += i18n("<ul>"); for (int i = 0; i < allMissing.count(); ++i) { - message += i18n("<li>%1</li>").arg(allMissing[i]); + message += i18n("<li>%1</li>").tqarg(allMissing[i]); } message += i18n("</ul>"); @@ -4623,7 +4623,7 @@ bool RosegardenGUIApp::launchSequencer(bool useExisting) if (isSequencerRunning()) { RG_DEBUG << "RosegardenGUIApp::launchSequencer() - sequencer already running - returning\n"; - if (m_seqManager) m_seqManager->checkSoundDriverStatus(false); + if (m_seqManager) m_seqManager->checkSoundDrivertqStatus(false); return true; } @@ -4639,7 +4639,7 @@ bool RosegardenGUIApp::launchSequencer(bool useExisting) << "existing DCOP registered sequencer found\n"; if (useExisting) { - if (m_seqManager) m_seqManager->checkSoundDriverStatus(false); + if (m_seqManager) m_seqManager->checkSoundDrivertqStatus(false); m_sequencerProcess = (KProcess*)SequencerExternal; return true; } @@ -4733,14 +4733,14 @@ bool RosegardenGUIApp::launchSequencer(bool useExisting) try { // if (m_seqManager) { // RG_DEBUG << "RosegardenGUIApp::launchSequencer : checking sound driver status\n"; - // m_seqManager->checkSoundDriverStatus(); + // m_seqManager->checkSoundDrivertqStatus(); // } stateChanged("sequencer_running"); slotEnableTransport(true); connect(m_sequencerProcess, TQT_SIGNAL(processExited(KProcess*)), - this, TQT_SLOT(slotSequencerExited(KProcess*))); + TQT_TQOBJECT(this), TQT_SLOT(slotSequencerExited(KProcess*))); } catch (Exception e) { m_sequencerProcess = 0; @@ -4864,15 +4864,15 @@ void RosegardenGUIApp::slotExportProject() return ; TQString rgFile = fileName; - rgFile.replace(TQRegExp(".rg.rgp$"), ".rg"); - rgFile.replace(TQRegExp(".rgp$"), ".rg"); + rgFile.tqreplace(TQRegExp(".rg.rgp$"), ".rg"); + rgFile.tqreplace(TQRegExp(".rgp$"), ".rg"); CurrentProgressDialog::freeze(); TQString errMsg; if (!m_doc->saveDocument(rgFile, errMsg, true)) { // pretend it's autosave - KMessageBox::sorry(this, i18n("Saving Rosegarden file to package failed: %1").arg(errMsg)); + KMessageBox::sorry(this, i18n("Saving Rosegarden file to package failed: %1").tqarg(errMsg)); CurrentProgressDialog::thaw(); return ; } @@ -4886,7 +4886,7 @@ void RosegardenGUIApp::slotExportProject() proc->start(KProcess::Block, KProcess::All); if (!proc->normalExit() || proc->exitStatus()) { - KMessageBox::sorry(this, i18n("Failed to export to project file \"%1\"").arg(fileName)); + KMessageBox::sorry(this, i18n("Failed to export to project file \"%1\"").tqarg(fileName)); CurrentProgressDialog::thaw(); delete proc; return ; @@ -4953,7 +4953,7 @@ void RosegardenGUIApp::exportCsoundFile(TQString file) 100, this); - CsoundExporter e(this, &m_doc->getComposition(), std::string(TQFile::encodeName(file))); + CsoundExporter e(TQT_TQOBJECT(this), &m_doc->getComposition(), std::string(TQFile::encodeName(file))); connect(&e, TQT_SIGNAL(setProgress(int)), progressDlg.progressBar(), TQT_SLOT(setValue(int))); @@ -4986,7 +4986,7 @@ void RosegardenGUIApp::exportMupFile(TQString file) 100, this); - MupExporter e(this, &m_doc->getComposition(), std::string(TQFile::encodeName(file))); + MupExporter e(TQT_TQOBJECT(this), &m_doc->getComposition(), std::string(TQFile::encodeName(file))); connect(&e, TQT_SIGNAL(setProgress(int)), progressDlg.progressBar(), TQT_SLOT(setValue(int))); @@ -5021,7 +5021,7 @@ std::map<KProcess *, KTempFile *> RosegardenGUIApp::m_lilyTempFileMap; void RosegardenGUIApp::slotPrintLilyPond() { KTmpStatusMsg msg(i18n("Printing LilyPond file..."), this); - KTempFile *file = new KTempFile(TQString::null, ".ly"); + KTempFile *file = new KTempFile(TQString(), ".ly"); file->setAutoDelete(true); if (!file->name()) { CurrentProgressDialog::freeze(); @@ -5037,7 +5037,7 @@ void RosegardenGUIApp::slotPrintLilyPond() *proc << "--print"; *proc << file->name(); connect(proc, TQT_SIGNAL(processExited(KProcess *)), - this, TQT_SLOT(slotLilyPondViewProcessExited(KProcess *))); + TQT_TQOBJECT(this), TQT_SLOT(slotLilyPondViewProcessExited(KProcess *))); m_lilyTempFileMap[proc] = file; proc->start(KProcess::NotifyOnExit); } @@ -5045,7 +5045,7 @@ void RosegardenGUIApp::slotPrintLilyPond() void RosegardenGUIApp::slotPreviewLilyPond() { KTmpStatusMsg msg(i18n("Previewing LilyPond file..."), this); - KTempFile *file = new KTempFile(TQString::null, ".ly"); + KTempFile *file = new KTempFile(TQString(), ".ly"); file->setAutoDelete(true); if (!file->name()) { CurrentProgressDialog::freeze(); @@ -5061,7 +5061,7 @@ void RosegardenGUIApp::slotPreviewLilyPond() *proc << "--pdf"; *proc << file->name(); connect(proc, TQT_SIGNAL(processExited(KProcess *)), - this, TQT_SLOT(slotLilyPondViewProcessExited(KProcess *))); + TQT_TQOBJECT(this), TQT_SLOT(slotLilyPondViewProcessExited(KProcess *))); m_lilyTempFileMap[proc] = file; proc->start(KProcess::NotifyOnExit); } @@ -5127,7 +5127,7 @@ void RosegardenGUIApp::exportMusicXmlFile(TQString file) 100, this); - MusicXmlExporter e(this, m_doc, std::string(TQFile::encodeName(file))); + MusicXmlExporter e(TQT_TQOBJECT(this), m_doc, std::string(TQFile::encodeName(file))); connect(&e, TQT_SIGNAL(setProgress(int)), progressDlg.progressBar(), TQT_SLOT(setValue(int))); @@ -5168,9 +5168,9 @@ RosegardenGUIApp::slotToggleMetronome() { Composition &comp = m_doc->getComposition(); - if (m_seqManager->getTransportStatus() == STARTING_TO_RECORD || - m_seqManager->getTransportStatus() == RECORDING || - m_seqManager->getTransportStatus() == RECORDING_ARMED) { + if (m_seqManager->getTransporttqStatus() == STARTING_TO_RECORD || + m_seqManager->getTransporttqStatus() == RECORDING || + m_seqManager->getTransporttqStatus() == RECORDING_ARMED) { if (comp.useRecordMetronome()) comp.setRecordMetronome(false); else @@ -5192,7 +5192,7 @@ RosegardenGUIApp::slotRewindToBeginning() { // ignore requests if recording // - if (m_seqManager->getTransportStatus() == RECORDING) + if (m_seqManager->getTransporttqStatus() == RECORDING) return ; m_seqManager->rewindToBeginning(); @@ -5203,7 +5203,7 @@ RosegardenGUIApp::slotFastForwardToEnd() { // ignore requests if recording // - if (m_seqManager->getTransportStatus() == RECORDING) + if (m_seqManager->getTransporttqStatus() == RECORDING) return ; m_seqManager->fastForwardToEnd(); @@ -5213,18 +5213,18 @@ void RosegardenGUIApp::slotSetPlayPosition(timeT time) { RG_DEBUG << "RosegardenGUIApp::slotSetPlayPosition(" << time << ")" << endl; - if (m_seqManager->getTransportStatus() == RECORDING) + if (m_seqManager->getTransporttqStatus() == RECORDING) return ; m_doc->slotSetPointerPosition(time); - if (m_seqManager->getTransportStatus() == PLAYING) + if (m_seqManager->getTransporttqStatus() == PLAYING) return ; slotPlay(); } -void RosegardenGUIApp::notifySequencerStatus(int status) +void RosegardenGUIApp::notifySequencertqStatus(int status) { stateChanged("not_playing", (status == PLAYING || @@ -5232,7 +5232,7 @@ void RosegardenGUIApp::notifySequencerStatus(int status) KXMLGUIClient::StateReverse : KXMLGUIClient::StateNoReverse); if (m_seqManager) - m_seqManager->setTransportStatus((TransportStatus) status); + m_seqManager->setTransporttqStatus((TransporttqStatus) status); } void RosegardenGUIApp::processAsynchronousMidi(const MappedComposition &mC) @@ -5261,10 +5261,10 @@ RosegardenGUIApp::slotRecord() return ; } - if (m_seqManager->getTransportStatus() == RECORDING) { + if (m_seqManager->getTransporttqStatus() == RECORDING) { slotStop(); return ; - } else if (m_seqManager->getTransportStatus() == PLAYING) { + } else if (m_seqManager->getTransporttqStatus() == PLAYING) { slotToggleRecord(); return ; } @@ -5309,7 +5309,7 @@ RosegardenGUIApp::slotRecord() m_seqManager->getCountdownDialog()->getAccelerators()); connect(m_seqManager->getCountdownDialog(), TQT_SIGNAL(stopped()), - this, TQT_SLOT(slotStop())); + TQT_TQOBJECT(this), TQT_SLOT(slotStop())); // Start the playback timer - this fetches the current sequencer position &c // @@ -5398,7 +5398,7 @@ void RosegardenGUIApp::slotPlay() // slotRecord ensures we don't toggle the recording state in // SequenceManager) // - if (m_seqManager->getTransportStatus() == RECORDING_ARMED) { + if (m_seqManager->getTransporttqStatus() == RECORDING_ARMED) { slotRecord(); return ; } @@ -5434,7 +5434,7 @@ void RosegardenGUIApp::slotPlay() m_playTimer->stop(); m_stopTimer->start(100); } catch (Exception e) { - KMessageBox::error(this, e.getMessage()); + KMessageBox::error(this, e.getMessage().c_str()); m_playTimer->stop(); m_stopTimer->start(100); } @@ -5460,9 +5460,9 @@ void RosegardenGUIApp::slotStop() if (m_seqManager && m_seqManager->getCountdownDialog()) { disconnect(m_seqManager->getCountdownDialog(), TQT_SIGNAL(stopped()), - this, TQT_SLOT(slotStop())); + TQT_TQOBJECT(this), TQT_SLOT(slotStop())); disconnect(m_seqManager->getCountdownDialog(), TQT_SIGNAL(completed()), - this, TQT_SLOT(slotStop())); + TQT_TQOBJECT(this), TQT_SLOT(slotStop())); } try { @@ -5481,7 +5481,7 @@ void RosegardenGUIApp::slotRewind() { // ignore requests if recording // - if (m_seqManager->getTransportStatus() == RECORDING) + if (m_seqManager->getTransporttqStatus() == RECORDING) return ; if (m_seqManager) m_seqManager->rewind(); @@ -5491,7 +5491,7 @@ void RosegardenGUIApp::slotFastforward() { // ignore requests if recording // - if (m_seqManager->getTransportStatus() == RECORDING) + if (m_seqManager->getTransporttqStatus() == RECORDING) return ; if (m_seqManager) @@ -5646,9 +5646,9 @@ void RosegardenGUIApp::slotConfigure() new ConfigureDialog(m_doc, kapp->config(), this); connect(configDlg, TQT_SIGNAL(updateAutoSaveInterval(unsigned int)), - this, TQT_SLOT(slotUpdateAutoSaveInterval(unsigned int))); + TQT_TQOBJECT(this), TQT_SLOT(slotUpdateAutoSaveInterval(unsigned int))); connect(configDlg, TQT_SIGNAL(updateSidebarStyle(unsigned int)), - this, TQT_SLOT(slotUpdateSidebarStyle(unsigned int))); + TQT_TQOBJECT(this), TQT_SLOT(slotUpdateSidebarStyle(unsigned int))); configDlg->show(); } @@ -5705,16 +5705,16 @@ void RosegardenGUIApp::slotEditTempo(timeT atTime) slotEditTempo(this, atTime); } -void RosegardenGUIApp::slotEditTempo(TQWidget *parent) +void RosegardenGUIApp::slotEditTempo(TQWidget *tqparent) { - slotEditTempo(parent, m_doc->getComposition().getPosition()); + slotEditTempo(tqparent, m_doc->getComposition().getPosition()); } -void RosegardenGUIApp::slotEditTempo(TQWidget *parent, timeT atTime) +void RosegardenGUIApp::slotEditTempo(TQWidget *tqparent, timeT atTime) { RG_DEBUG << "RosegardenGUIApp::slotEditTempo\n"; - TempoDialog tempoDialog(parent, m_doc); + TempoDialog tempoDialog(tqparent, m_doc); connect(&tempoDialog, TQT_SIGNAL(changeTempo(timeT, @@ -5740,19 +5740,19 @@ void RosegardenGUIApp::slotEditTimeSignature(timeT atTime) slotEditTimeSignature(this, atTime); } -void RosegardenGUIApp::slotEditTimeSignature(TQWidget *parent) +void RosegardenGUIApp::slotEditTimeSignature(TQWidget *tqparent) { - slotEditTimeSignature(parent, m_doc->getComposition().getPosition()); + slotEditTimeSignature(tqparent, m_doc->getComposition().getPosition()); } -void RosegardenGUIApp::slotEditTimeSignature(TQWidget *parent, +void RosegardenGUIApp::slotEditTimeSignature(TQWidget *tqparent, timeT time) { Composition &composition(m_doc->getComposition()); TimeSignature sig = composition.getTimeSignatureAt(time); - TimeSignatureDialog dialog(parent, &composition, time, sig); + TimeSignatureDialog dialog(tqparent, &composition, time, sig); if (dialog.exec() == TQDialog::Accepted) { @@ -5775,9 +5775,9 @@ void RosegardenGUIApp::slotEditTransportTime() slotEditTransportTime(this); } -void RosegardenGUIApp::slotEditTransportTime(TQWidget *parent) +void RosegardenGUIApp::slotEditTransportTime(TQWidget *tqparent) { - TimeDialog dialog(parent, i18n("Move playback pointer to time"), + TimeDialog dialog(tqparent, i18n("Move playback pointer to time"), &m_doc->getComposition(), m_doc->getComposition().getPosition(), true); @@ -5790,13 +5790,13 @@ void RosegardenGUIApp::slotChangeZoom(int) { double duration44 = TimeSignature(4, 4).getBarDuration(); double value = double(m_zoomSlider->getCurrentSize()); - m_zoomLabel->setText(i18n("%1%").arg(duration44 / value)); + m_zoomLabel->setText(i18n("%1%").tqarg(duration44 / value)); RG_DEBUG << "RosegardenGUIApp::slotChangeZoom : zoom size = " << m_zoomSlider->getCurrentSize() << endl; // initZoomToolbar sets the zoom value. With some old versions of - // Qt3.0, this can cause slotChangeZoom() to be called while the + // TQt3.0, this can cause slotChangeZoom() to be called while the // view hasn't been initialized yet, so we need to check it's not // null // @@ -5858,7 +5858,7 @@ RosegardenGUIApp::slotChangeTempo(timeT time, timeT prevTime = comp.getTempoChange(index).first; KMacroCommand *macro = - new KMacroCommand(i18n("Replace Tempo Change at %1").arg(time)); + new KMacroCommand(i18n("Replace Tempo Change at %1").tqarg(time)); macro->addCommand(new RemoveTempoChangeCommand(&comp, index)); macro->addCommand(new AddTempoChangeCommand(&comp, prevTime, value, @@ -5946,8 +5946,8 @@ RosegardenGUIApp::slotAddMarker(timeT time) AddMarkerCommand *command = new AddMarkerCommand(&m_doc->getComposition(), time, - i18n("new marker"), - i18n("no description")); + i18n("new marker").ascii(), + i18n("no description").ascii()); m_doc->getCommandHistory()->addCommand(command); } @@ -6129,7 +6129,7 @@ RosegardenGUIApp::setCursor(const TQCursor& cursor) m_dockLeft->setCursor(cursor); } -QString +TQString RosegardenGUIApp::createNewAudioFile() { AudioFile *aF = 0; @@ -6177,7 +6177,7 @@ RosegardenGUIApp::createRecordAudioFiles(const TQValueVector<InstrumentId> &reco return qv; } -QString +TQString RosegardenGUIApp::getAudioFilePath() { return TQString(m_doc->getAudioFileManager().getAudioPath().c_str()); @@ -6271,7 +6271,7 @@ RosegardenGUIApp::slotAudioManager() TQT_SLOT(slotPropagateSegmentSelection(const SegmentSelection&))); // and from us to dialog - connect(this, TQT_SIGNAL(segmentsSelected(const SegmentSelection&)), + connect(TQT_TQOBJECT(this), TQT_SIGNAL(segmentsSelected(const SegmentSelection&)), m_audioManagerDialog, TQT_SLOT(slotSegmentSelection(const SegmentSelection&))); @@ -6304,11 +6304,11 @@ RosegardenGUIApp::slotAudioManager() // And that it goes away when the current document is changing // - connect(this, TQT_SIGNAL(documentAboutToChange()), + connect(TQT_TQOBJECT(this), TQT_SIGNAL(documentAboutToChange()), m_audioManagerDialog, TQT_SLOT(close())); - m_audioManagerDialog->setAudioSubsystemStatus( - m_seqManager->getSoundDriverStatus() & AUDIO_OK); + m_audioManagerDialog->setAudioSubsystemtqStatus( + m_seqManager->getSoundDrivertqStatus() & AUDIO_OK); plugAccelerators(m_audioManagerDialog, m_audioManagerDialog->getAccelerators()); @@ -6350,7 +6350,7 @@ RosegardenGUIApp::slotAddAudioFile(unsigned int id) TQByteArray data; TQDataStream streamOut(data, IO_WriteOnly); - // We have to pass the filename as a QString + // We have to pass the filename as a TQString // streamOut << TQString(strtoqstr(aF->getFilename())); streamOut << (int)aF->getId(); @@ -6360,7 +6360,7 @@ RosegardenGUIApp::slotAddAudioFile(unsigned int id) int result; streamIn >> result; if (!result) { - KMessageBox::error(this, i18n("Sequencer failed to add audio file %1").arg(aF->getFilename().c_str())); + KMessageBox::error(this, i18n("Sequencer failed to add audio file %1").tqarg(aF->getFilename().c_str())); } } } @@ -6385,7 +6385,7 @@ RosegardenGUIApp::slotDeleteAudioFile(unsigned int id) int result; streamIn >> result; if (!result) { - KMessageBox::error(this, i18n("Sequencer failed to remove audio file id %1").arg(id)); + KMessageBox::error(this, i18n("Sequencer failed to remove audio file id %1").tqarg(id)); } } } @@ -6523,9 +6523,9 @@ RosegardenGUIApp::slotManageMIDIDevices() m_deviceManager = new DeviceManagerDialog(this, m_doc); connect(m_deviceManager, TQT_SIGNAL(closing()), - this, TQT_SLOT(slotDeviceManagerClosed())); + TQT_TQOBJECT(this), TQT_SLOT(slotDeviceManagerClosed())); - connect(this, TQT_SIGNAL(documentAboutToChange()), + connect(TQT_TQOBJECT(this), TQT_SIGNAL(documentAboutToChange()), m_deviceManager, TQT_SLOT(close())); // Cheating way of updating the track/instrument list @@ -6534,10 +6534,10 @@ RosegardenGUIApp::slotManageMIDIDevices() m_view, TQT_SLOT(slotSynchroniseWithComposition())); connect(m_deviceManager, TQT_SIGNAL(editBanks(DeviceId)), - this, TQT_SLOT(slotEditBanks(DeviceId))); + TQT_TQOBJECT(this), TQT_SLOT(slotEditBanks(DeviceId))); connect(m_deviceManager, TQT_SIGNAL(editControllers(DeviceId)), - this, TQT_SLOT(slotEditControlParameters(DeviceId))); + TQT_TQOBJECT(this), TQT_SLOT(slotEditControlParameters(DeviceId))); if (m_midiMixer) { connect(m_deviceManager, TQT_SIGNAL(deviceNamesChanged()), @@ -6566,9 +6566,9 @@ RosegardenGUIApp::slotManageSynths() ); connect(m_synthManager, TQT_SIGNAL(closing()), - this, TQT_SLOT(slotSynthPluginManagerClosed())); + TQT_TQOBJECT(this), TQT_SLOT(slotSynthPluginManagerClosed())); - connect(this, TQT_SIGNAL(documentAboutToChange()), + connect(TQT_TQOBJECT(this), TQT_SIGNAL(documentAboutToChange()), m_synthManager, TQT_SLOT(close())); connect(m_synthManager, @@ -6608,10 +6608,10 @@ RosegardenGUIApp::slotOpenAudioMixer() m_audioMixer, TQT_SLOT(slotControllerDeviceEventReceived(MappedEvent *, const void *))); connect(m_audioMixer, TQT_SIGNAL(closing()), - this, TQT_SLOT(slotAudioMixerClosed())); + TQT_TQOBJECT(this), TQT_SLOT(slotAudioMixerClosed())); connect(m_audioMixer, TQT_SIGNAL(selectPlugin(TQWidget *, InstrumentId, int)), - this, TQT_SLOT(slotShowPluginDialog(TQWidget *, InstrumentId, int))); + TQT_TQOBJECT(this), TQT_SLOT(slotShowPluginDialog(TQWidget *, InstrumentId, int))); connect(this, TQT_SIGNAL(pluginSelected(InstrumentId, int, int)), @@ -6623,28 +6623,28 @@ RosegardenGUIApp::slotOpenAudioMixer() m_audioMixer, TQT_SLOT(slotPluginBypassed(InstrumentId, int, bool))); - connect(this, TQT_SIGNAL(documentAboutToChange()), + connect(TQT_TQOBJECT(this), TQT_SIGNAL(documentAboutToChange()), m_audioMixer, TQT_SLOT(close())); connect(m_view, TQT_SIGNAL(checkTrackAssignments()), m_audioMixer, TQT_SLOT(slotTrackAssignmentsChanged())); connect(m_audioMixer, TQT_SIGNAL(play()), - this, TQT_SLOT(slotPlay())); + TQT_TQOBJECT(this), TQT_SLOT(slotPlay())); connect(m_audioMixer, TQT_SIGNAL(stop()), - this, TQT_SLOT(slotStop())); + TQT_TQOBJECT(this), TQT_SLOT(slotStop())); connect(m_audioMixer, TQT_SIGNAL(fastForwardPlayback()), - this, TQT_SLOT(slotFastforward())); + TQT_TQOBJECT(this), TQT_SLOT(slotFastforward())); connect(m_audioMixer, TQT_SIGNAL(rewindPlayback()), - this, TQT_SLOT(slotRewind())); + TQT_TQOBJECT(this), TQT_SLOT(slotRewind())); connect(m_audioMixer, TQT_SIGNAL(fastForwardPlaybackToEnd()), - this, TQT_SLOT(slotFastForwardToEnd())); + TQT_TQOBJECT(this), TQT_SLOT(slotFastForwardToEnd())); connect(m_audioMixer, TQT_SIGNAL(rewindPlaybackToBeginning()), - this, TQT_SLOT(slotRewindToBeginning())); + TQT_TQOBJECT(this), TQT_SLOT(slotRewindToBeginning())); connect(m_audioMixer, TQT_SIGNAL(record()), - this, TQT_SLOT(slotRecord())); + TQT_TQOBJECT(this), TQT_SLOT(slotRecord())); connect(m_audioMixer, TQT_SIGNAL(panic()), - this, TQT_SLOT(slotPanic())); + TQT_TQOBJECT(this), TQT_SLOT(slotPanic())); connect(m_audioMixer, TQT_SIGNAL(instrumentParametersChanged(InstrumentId)), @@ -6687,27 +6687,27 @@ RosegardenGUIApp::slotOpenMidiMixer() m_midiMixer, TQT_SLOT(slotControllerDeviceEventReceived(MappedEvent *, const void *))); connect(m_midiMixer, TQT_SIGNAL(closing()), - this, TQT_SLOT(slotMidiMixerClosed())); + TQT_TQOBJECT(this), TQT_SLOT(slotMidiMixerClosed())); - connect(this, TQT_SIGNAL(documentAboutToChange()), + connect(TQT_TQOBJECT(this), TQT_SIGNAL(documentAboutToChange()), m_midiMixer, TQT_SLOT(close())); connect(m_midiMixer, TQT_SIGNAL(play()), - this, TQT_SLOT(slotPlay())); + TQT_TQOBJECT(this), TQT_SLOT(slotPlay())); connect(m_midiMixer, TQT_SIGNAL(stop()), - this, TQT_SLOT(slotStop())); + TQT_TQOBJECT(this), TQT_SLOT(slotStop())); connect(m_midiMixer, TQT_SIGNAL(fastForwardPlayback()), - this, TQT_SLOT(slotFastforward())); + TQT_TQOBJECT(this), TQT_SLOT(slotFastforward())); connect(m_midiMixer, TQT_SIGNAL(rewindPlayback()), - this, TQT_SLOT(slotRewind())); + TQT_TQOBJECT(this), TQT_SLOT(slotRewind())); connect(m_midiMixer, TQT_SIGNAL(fastForwardPlaybackToEnd()), - this, TQT_SLOT(slotFastForwardToEnd())); + TQT_TQOBJECT(this), TQT_SLOT(slotFastForwardToEnd())); connect(m_midiMixer, TQT_SIGNAL(rewindPlaybackToBeginning()), - this, TQT_SLOT(slotRewindToBeginning())); + TQT_TQOBJECT(this), TQT_SLOT(slotRewindToBeginning())); connect(m_midiMixer, TQT_SIGNAL(record()), - this, TQT_SLOT(slotRecord())); + TQT_TQOBJECT(this), TQT_SLOT(slotRecord())); connect(m_midiMixer, TQT_SIGNAL(panic()), - this, TQT_SLOT(slotPanic())); + TQT_TQOBJECT(this), TQT_SLOT(slotPanic())); connect(m_midiMixer, TQT_SIGNAL(instrumentParametersChanged(InstrumentId)), @@ -6747,7 +6747,7 @@ RosegardenGUIApp::slotEditControlParameters(DeviceId device) connect(controlEditor, TQT_SIGNAL(closing()), TQT_SLOT(slotControlEditorClosed())); - connect(this, TQT_SIGNAL(documentAboutToChange()), + connect(TQT_TQOBJECT(this), TQT_SIGNAL(documentAboutToChange()), controlEditor, TQT_SLOT(close())); connect(m_doc, TQT_SIGNAL(devicesResyncd()), @@ -6777,9 +6777,9 @@ RosegardenGUIApp::slotEditBanks(DeviceId device) m_bankEditor = new BankEditorDialog(this, m_doc, device); connect(m_bankEditor, TQT_SIGNAL(closing()), - this, TQT_SLOT(slotBankEditorClosed())); + TQT_TQOBJECT(this), TQT_SLOT(slotBankEditorClosed())); - connect(this, TQT_SIGNAL(documentAboutToChange()), + connect(TQT_TQOBJECT(this), TQT_SIGNAL(documentAboutToChange()), m_bankEditor, TQT_SLOT(slotFileClose())); // Cheating way of updating the track/instrument list @@ -6879,7 +6879,7 @@ RosegardenGUIApp::slotEditTempos(timeT t) tempoT, TempoDialog::TempoDialogAction))); - connect(m_tempoView, TQT_SIGNAL(saveFile()), this, TQT_SLOT(slotFileSave())); + connect(m_tempoView, TQT_SIGNAL(saveFile()), TQT_TQOBJECT(this), TQT_SLOT(slotFileSave())); plugAccelerators(m_tempoView, m_tempoView->getAccelerators()); @@ -6897,14 +6897,14 @@ RosegardenGUIApp::slotTempoViewClosed() void RosegardenGUIApp::slotControlEditorClosed() { - const TQObject *s = sender(); + const TQObject *s = TQT_TQOBJECT_CONST(const_cast<const TQT_BASE_OBJECT_NAME*>(sender())); RG_DEBUG << "RosegardenGUIApp::slotControlEditorClosed" << endl; for (std::set <ControlEditorDialog *>::iterator i = m_controlEditors.begin(); i != m_controlEditors.end(); ++i) { - if (*i == s) { + if (TQT_BASE_OBJECT(*i) == TQT_BASE_OBJECT_CONST(s)) { m_controlEditors.erase(i); RG_DEBUG << "removed control editor dialog, have " << m_controlEditors.size() << " left" << endl; return ; @@ -6915,12 +6915,12 @@ RosegardenGUIApp::slotControlEditorClosed() } void -RosegardenGUIApp::slotShowPluginDialog(TQWidget *parent, +RosegardenGUIApp::slotShowPluginDialog(TQWidget *tqparent, InstrumentId instrumentId, int index) { - if (!parent) - parent = this; + if (!tqparent) + tqparent = this; int key = (index << 16) + instrumentId; @@ -6954,7 +6954,7 @@ RosegardenGUIApp::slotShowPluginDialog(TQWidget *parent, // Create the plugin dialog // AudioPluginDialog *dialog = - new AudioPluginDialog(parent, + new AudioPluginDialog(tqparent, m_doc->getPluginManager(), #ifdef HAVE_LIBLO m_pluginGUIManager, @@ -7015,7 +7015,7 @@ RosegardenGUIApp::slotShowPluginDialog(TQWidget *parent, this, TQT_SLOT(slotPluginDialogDestroyed(InstrumentId, int))); - connect(this, TQT_SIGNAL(documentAboutToChange()), dialog, TQT_SLOT(close())); + connect(TQT_TQOBJECT(this), TQT_SIGNAL(documentAboutToChange()), dialog, TQT_SLOT(close())); m_pluginDialogs[key] = dialog; m_pluginDialogs[key]->show(); @@ -7028,9 +7028,9 @@ void RosegardenGUIApp::slotPluginSelected(InstrumentId instrumentId, int index, int plugin) { - const TQObject *s = sender(); + const TQObject *s = TQT_TQOBJECT_CONST(const_cast<const TQT_BASE_OBJECT_NAME*>(sender())); - bool fromSynthMgr = (s == m_synthManager); + bool fromSynthMgr = (TQT_BASE_OBJECT_CONST(s) == TQT_BASE_OBJECT(m_synthManager)); // It's assumed that ports etc will already have been set up on // the AudioPluginInstance before this is invoked. @@ -7753,10 +7753,10 @@ RosegardenGUIApp::slotSaveDefaultStudio() if (!res) { if (errMsg) KMessageBox::error(this, i18n(TQString("Could not auto-save document at %1\nError was : %2") - .arg(autoloadFile).arg(errMsg))); + .tqarg(autoloadFile).tqarg(errMsg))); else KMessageBox::error(this, i18n(TQString("Could not auto-save document at %1") - .arg(autoloadFile))); + .tqarg(autoloadFile))); } } @@ -7808,7 +7808,7 @@ RosegardenGUIApp::slotImportStudio() TQString target; if (KIO::NetAccess::download(url, target, this) == false) { KMessageBox::error(this, i18n("Cannot download file %1") - .arg(url.prettyURL())); + .tqarg(url.prettyURL())); return ; } @@ -7942,8 +7942,8 @@ void RosegardenGUIApp::slotAutoSave() { if (!m_seqManager || - m_seqManager->getTransportStatus() == PLAYING || - m_seqManager->getTransportStatus() == RECORDING) + m_seqManager->getTransporttqStatus() == PLAYING || + m_seqManager->getTransporttqStatus() == RECORDING) return ; KConfig* config = kapp->config(); @@ -8012,11 +8012,11 @@ RosegardenGUIApp::awaitDialogClearance() while (haveDialog) { - const TQObjectList *c = children(); - if (!c) return; + const TQObjectList c = childrenListObject(); + if (c.isEmpty()) return; haveDialog = false; - for (TQObjectList::const_iterator i = c->begin(); i != c->end(); ++i) { + for (TQObjectList::const_iterator i = c.begin(); i != c.end(); ++i) { TQDialog *dialog = dynamic_cast<TQDialog *>(*i); if (dialog && dialog->isVisible()) { haveDialog = true; @@ -8044,7 +8044,7 @@ RosegardenGUIApp::slotNewerVersionAvailable(TQString v) (this, i18n("<h3>Newer version available</h3><p>A newer version of Rosegarden may be available.<br>Please consult the <a href=\"http://www.rosegardenmusic.com/getting/\">Rosegarden website</a> for more information.</p>"), i18n("Newer version available"), - TQString("version-%1-available-show").arg(v), + TQString("version-%1-available-show").tqarg(v), KMessageBox::AllowLink); CurrentProgressDialog::thaw(); } diff --git a/src/gui/application/RosegardenGUIApp.cpp.orig b/src/gui/application/RosegardenGUIApp.cpp.orig index 889f4f7..d3508eb 100644 --- a/src/gui/application/RosegardenGUIApp.cpp.orig +++ b/src/gui/application/RosegardenGUIApp.cpp.orig @@ -360,7 +360,7 @@ RosegardenGUIApp::RosegardenGUIApp(bool useSequencer, this, TQT_SLOT(slotParametersClosed())); connect(m_dockLeft, TQT_SIGNAL(hasUndocked()), this, TQT_SLOT(slotParametersClosed())); - // Apparently, hasUndocked() is emitted when the dock widget's + // Aptqparently, hasUndocked() is emitted when the dock widget's // 'close' button on the dock handle is clicked. connect(m_mainDockWidget, TQT_SIGNAL(docking(KDockWidget*, KDockWidget::DockPosition)), this, TQT_SLOT(slotParametersDockedBack(KDockWidget*, KDockWidget::DockPosition))); @@ -437,7 +437,7 @@ RosegardenGUIApp::RosegardenGUIApp(bool useSequencer, // problems. This warning has to happen early, in case it // affects the ability to load plugins etc from a file on the // command line. - m_seqManager->checkSoundDriverStatus(true); + m_seqManager->checkSoundDrivertqStatus(true); } if (m_view) { @@ -445,7 +445,7 @@ RosegardenGUIApp::RosegardenGUIApp(bool useSequencer, m_view, TQT_SLOT(slotControllerDeviceEventReceived(MappedEvent *))); } - if (m_seqManager->getSoundDriverStatus() & AUDIO_OK) { + if (m_seqManager->getSoundDrivertqStatus() & AUDIO_OK) { slotStateChanged("got_audio", true); } else { slotStateChanged("got_audio", false); @@ -1293,8 +1293,8 @@ void RosegardenGUIApp::initZoomToolbar() } // zoom labels - TQString minZoom = TQString("%1%").arg(factors[0] * 100.0); - TQString maxZoom = TQString("%1%").arg(factors[(sizeof(factors) / sizeof(factors[0])) - 1] * 100.0); + TQString minZoom = TQString("%1%").tqarg(factors[0] * 100.0); + TQString maxZoom = TQString("%1%").tqarg(factors[(sizeof(factors) / sizeof(factors[0])) - 1] * 100.0); m_zoomSlider = new ZoomSlider<double> (zoomSizes, -1, TQSlider::Horizontal, zoomToolbar, "kde toolbar widget"); @@ -1631,7 +1631,7 @@ void RosegardenGUIApp::setDocument(RosegardenGUIDoc* newDocument) this, TQT_SLOT(slotDocumentDevicesResyncd())); m_doc->syncDevices(); - m_doc->clearModifiedStatus(); + m_doc->clearModifiedtqStatus(); if (newDocument->getStudio().haveMidiDevices()) { stateChanged("got_midi_devices"); @@ -1658,7 +1658,7 @@ void RosegardenGUIApp::setDocument(RosegardenGUIDoc* newDocument) emit documentChanged(m_doc); - m_doc->clearModifiedStatus(); // because it's set as modified by the various + m_doc->clearModifiedtqStatus(); // because it's set as modified by the various // init operations // TODO: this sucks, have to sort it out somehow. @@ -1716,7 +1716,7 @@ RosegardenGUIApp::createDocument(TQString filePath, ImportType importType) if (!info.exists()) { // can happen with command-line arg, so... KStartupLogo::hideIfStillThere(); - KMessageBox::sorry(this, i18n("File \"%1\" does not exist").arg(filePath)); + KMessageBox::sorry(this, i18n("File \"%1\" does not exist").tqarg(filePath)); return 0; } @@ -1731,7 +1731,7 @@ RosegardenGUIApp::createDocument(TQString filePath, ImportType importType) if (!file.open(IO_ReadOnly)) { KStartupLogo::hideIfStillThere(); TQString errStr = - i18n("You do not have read permission for \"%1\"").arg(filePath); + i18n("You do not have read permission for \"%1\"").tqarg(filePath); KMessageBox::sorry(this, errStr); return 0; @@ -1739,7 +1739,7 @@ RosegardenGUIApp::createDocument(TQString filePath, ImportType importType) // Stop if playing // - if (m_seqManager && m_seqManager->getTransportStatus() == PLAYING) + if (m_seqManager && m_seqManager->getTransporttqStatus() == PLAYING) slotStop(); slotEnableTransport(false); @@ -1834,7 +1834,7 @@ RosegardenGUIApp::createDocumentFromRGFile(TQString filePath) newDoc->setAbsFilePath(info.absFilePath()); newDoc->setTitle(info.fileName()); } else { - newDoc->clearModifiedStatus(); + newDoc->clearModifiedtqStatus(); } } else { delete newDoc; @@ -1850,8 +1850,8 @@ void RosegardenGUIApp::slotSaveOptions() #ifdef SETTING_LOG_DEBUG - _settingLog(TQString("SETTING 2 : transport flap extended = %1").arg(getTransport()->isExpanded())); - _settingLog(TQString("SETTING 2 : show track labels = %1").arg(m_viewTrackLabels->isChecked())); + _settingLog(TQString("SETTING 2 : transport flap extended = %1").tqarg(getTransport()->isExpanded())); + _settingLog(TQString("SETTING 2 : show track labels = %1").tqarg(m_viewTrackLabels->isChecked())); #endif kapp->config()->setGroup(GeneralOptionsConfigGroup); @@ -1893,13 +1893,13 @@ void RosegardenGUIApp::setupFileDialogSpeedbar() unsigned int n = config->readUnsignedNumEntry("Number of Entries", 0); - config->writeEntry(TQString("Description_%1").arg(n), i18n("Example Files")); - config->writeEntry(TQString("IconGroup_%1").arg(n), 4); - config->writeEntry(TQString("Icon_%1").arg(n), "folder"); - config->writeEntry(TQString("URL_%1").arg(n), + config->writeEntry(TQString("Description_%1").tqarg(n), i18n("Example Files")); + config->writeEntry(TQString("IconGroup_%1").tqarg(n), 4); + config->writeEntry(TQString("Icon_%1").tqarg(n), "folder"); + config->writeEntry(TQString("URL_%1").tqarg(n), KGlobal::dirs()->findResource("appdata", "examples/")); - RG_DEBUG << "wrote url " << config->readEntry(TQString("URL_%1").arg(n)) << endl; + RG_DEBUG << "wrote url " << config->readEntry(TQString("URL_%1").tqarg(n)) << endl; config->writeEntry("Examples Set", true); config->writeEntry("Number of Entries", n + 1); @@ -1936,7 +1936,7 @@ void RosegardenGUIApp::readOptions() #ifdef SETTING_LOG_DEBUG - _settingLog(TQString("SETTING 3 : transport flap extended = %1").arg(opt)); + _settingLog(TQString("SETTING 3 : transport flap extended = %1").tqarg(opt)); #endif if (opt) @@ -1948,7 +1948,7 @@ void RosegardenGUIApp::readOptions() #ifdef SETTING_LOG_DEBUG - _settingLog(TQString("SETTING 3 : show track labels = %1").arg(opt)); + _settingLog(TQString("SETTING 3 : show track labels = %1").tqarg(opt)); #endif m_viewTrackLabels->setChecked(opt); @@ -2010,10 +2010,10 @@ void RosegardenGUIApp::saveGlobalProperties(KConfig *cfg) if (!res) { if (errMsg) KMessageBox::error(this, i18n(TQString("Could not save document at %1\nError was : %2") - .arg(tempname).arg(errMsg))); + .tqarg(tempname).tqarg(errMsg))); else KMessageBox::error(this, i18n(TQString("Could not save document at %1") - .arg(tempname))); + .tqarg(tempname))); } } } @@ -2061,8 +2061,8 @@ bool RosegardenGUIApp::queryClose() RG_DEBUG << "RosegardenGUIApp::queryClose" << endl; #ifdef SETTING_LOG_DEBUG - _settingLog(TQString("SETTING 1 : transport flap extended = %1").arg(getTransport()->isExpanded())); - _settingLog(TQString("SETTING 1 : show track labels = %1").arg(m_viewTrackLabels->isChecked())); + _settingLog(TQString("SETTING 1 : transport flap extended = %1").tqarg(getTransport()->isExpanded())); + _settingLog(TQString("SETTING 1 : show track labels = %1").tqarg(m_viewTrackLabels->isChecked())); #endif TQString errMsg; @@ -2151,7 +2151,7 @@ void RosegardenGUIApp::openURL(const KURL& url) if (!url.isValid()) { TQString string; - string = i18n( "Malformed URL\n%1").arg(netFile); + string = i18n( "Malformed URL\n%1").tqarg(netFile); KMessageBox::sorry(this, string); return ; @@ -2160,7 +2160,7 @@ void RosegardenGUIApp::openURL(const KURL& url) TQString target, caption(url.path()); if (KIO::NetAccess::download(url, target, this) == false) { - KMessageBox::error(this, i18n("Cannot download file %1").arg(url.prettyURL())); + KMessageBox::error(this, i18n("Cannot download file %1").tqarg(url.prettyURL())); return ; } @@ -2192,7 +2192,7 @@ void RosegardenGUIApp::slotFileOpen() kapp->config()->setGroup("Recent Dirs"); TQString recentString = kapp->config()->readEntry("ROSEGARDEN", ""); kapp->config()->writeEntry - ("ROSEGARDEN", TQString("file:%1,%2").arg(examplesDir).arg(recentString)); + ("ROSEGARDEN", TQString("file:%1,%2").tqarg(examplesDir).tqarg(recentString)); } KURL url = KFileDialog::getOpenURL @@ -2226,7 +2226,7 @@ void RosegardenGUIApp::slotMerge() TQString target; if (KIO::NetAccess::download(url, target, this) == false) { - KMessageBox::error(this, i18n("Cannot download file %1").arg(url.prettyURL())); + KMessageBox::error(this, i18n("Cannot download file %1").tqarg(url.prettyURL())); return ; } @@ -2273,22 +2273,22 @@ void RosegardenGUIApp::slotFileSave() if (!res) { if (errMsg) KMessageBox::error(this, i18n(TQString("Could not save document at %1\nError was : %2") - .arg(docFilePath).arg(errMsg))); + .tqarg(docFilePath).tqarg(errMsg))); else KMessageBox::error(this, i18n(TQString("Could not save document at %1") - .arg(docFilePath))); + .tqarg(docFilePath))); } } } -QString +TQString RosegardenGUIApp::getValidWriteFile(TQString descriptiveExtension, TQString label) { // extract first extension listed in descriptiveExtension, for instance, // ".rg" from "*.rg|Rosegarden files", or ".mid" from "*.mid *.midi|MIDI Files" // - TQString extension = descriptiveExtension.left(descriptiveExtension.find('|')).mid(1).section(' ', 0, 0); + TQString extension = descriptiveExtension.left(descriptiveExtension.tqfind('|')).mid(1).section(' ', 0, 0); RG_DEBUG << "RosegardenGUIApp::getValidWriteFile() : extension = " << extension << endl; @@ -2299,7 +2299,7 @@ RosegardenGUIApp::getValidWriteFile(TQString descriptiveExtension, if (m_doc) { TQString saveFileName = m_doc->getAbsFilePath(); // Show filename without the old extension - int dotLoc = saveFileName.findRev('.'); + int dotLoc = saveFileName.tqfindRev('.'); if (dotLoc >= int(saveFileName.length() - 4)) { saveFileName = saveFileName.left(dotLoc); } @@ -2376,10 +2376,10 @@ bool RosegardenGUIApp::slotFileSaveAs() if (!res) { if (errMsg) KMessageBox::error(this, i18n(TQString("Could not save document at %1\nError was : %2") - .arg(newName).arg(errMsg))); + .tqarg(newName).tqarg(errMsg))); else KMessageBox::error(this, i18n(TQString("Could not save document at %1") - .arg(newName))); + .tqarg(newName))); } else { @@ -2764,7 +2764,7 @@ RosegardenGUIApp::testAudioPath(TQString op) } catch (AudioFileManager::BadAudioPathException) { if (KMessageBox::warningContinueCancel (this, - i18n("The audio file path does not exist or is not writable.\nYou must set the audio file path to a valid directory in Document Properties before %1.\nWould you like to set it now?").arg(op), + i18n("The audio file path does not exist or is not writable.\nYou must set the audio file path to a valid directory in Document Properties before %1.\nWould you like to set it now?").tqarg(op), i18n("Warning"), i18n("Set audio file path")) == KMessageBox::Continue) { slotOpenAudioPathSettings(); @@ -3105,7 +3105,7 @@ void RosegardenGUIApp::slotTempoToSegmentLength() slotTempoToSegmentLength(this); } -void RosegardenGUIApp::slotTempoToSegmentLength(TQWidget* parent) +void RosegardenGUIApp::slotTempoToSegmentLength(TQWidget* tqparent) { RG_DEBUG << "RosegardenGUIApp::slotTempoToSegmentLength" << endl; @@ -3134,8 +3134,8 @@ void RosegardenGUIApp::slotTempoToSegmentLength(TQWidget* parent) int beats = 0; - // Get user to tell us how many beats or bars the segment contains - BeatsBarsDialog dialog(parent); + // Get user to tell us how many beats or bars the segment tqcontains + BeatsBarsDialog dialog(tqparent); if (dialog.exec() == TQDialog::Accepted) { beats = dialog.getQuantity(); // beats (or bars) if (dialog.getMode() == 1) // bars (multiply by time sig) @@ -3714,7 +3714,7 @@ void RosegardenGUIApp::importProject(TQString filePath) if (!proc->normalExit() || proc->exitStatus()) { CurrentProgressDialog::freeze(); - KMessageBox::sorry(this, i18n("Failed to import project file \"%1\"").arg(filePath)); + KMessageBox::sorry(this, i18n("Failed to import project file \"%1\"").tqarg(filePath)); CurrentProgressDialog::thaw(); delete proc; return ; @@ -3723,8 +3723,8 @@ void RosegardenGUIApp::importProject(TQString filePath) delete proc; TQString rgFile = filePath; - rgFile.replace(TQRegExp(".rg.rgp$"), ".rg"); - rgFile.replace(TQRegExp(".rgp$"), ".rg"); + rgFile.tqreplace(TQRegExp(".rg.rgp$"), ".rg"); + rgFile.tqreplace(TQRegExp(".rgp$"), ".rg"); openURL(rgFile); } @@ -4236,7 +4236,7 @@ RosegardenGUIApp::slotUpdatePlaybackPosition() // std::cerr << "RosegardenGUIApp::slotUpdatePlaybackPosition: mapper timeT = " << elapsedTime << std::endl; - if (m_seqManager->getTransportStatus() == RECORDING) { + if (m_seqManager->getTransporttqStatus() == RECORDING) { MappedComposition mC; if (mapper->getRecordedEvents(mC) > 0) { @@ -4358,10 +4358,10 @@ void RosegardenGUIApp::slotSetPointerPosition(timeT t) // std::cerr << "RosegardenGUIApp::slotSetPointerPosition: t = " << t << std::endl; if (m_seqManager) { - if ( m_seqManager->getTransportStatus() == PLAYING || - m_seqManager->getTransportStatus() == RECORDING ) { + if ( m_seqManager->getTransporttqStatus() == PLAYING || + m_seqManager->getTransporttqStatus() == RECORDING ) { if (t > comp.getEndMarker()) { - if (m_seqManager->getTransportStatus() == PLAYING) { + if (m_seqManager->getTransporttqStatus() == PLAYING) { slotStop(); t = comp.getEndMarker(); @@ -4477,8 +4477,8 @@ void RosegardenGUIApp::slotDisplayBarTime(timeT t) void RosegardenGUIApp::slotRefreshTimeDisplay() { - if ( m_seqManager->getTransportStatus() == PLAYING || - m_seqManager->getTransportStatus() == RECORDING ) { + if ( m_seqManager->getTransporttqStatus() == PLAYING || + m_seqManager->getTransporttqStatus() == RECORDING ) { return ; // it'll be refreshed in a moment anyway } slotSetPointerPosition(m_doc->getComposition().getPosition()); @@ -4530,7 +4530,7 @@ void RosegardenGUIApp::slotTestStartupTester() } else { for (int i = 0; i < missing.count(); ++i) { // if (missingFeatures.count() > 1) { - allMissing.push_back(i18n("%1 - for project file support").arg(missing[i])); + allMissing.push_back(i18n("%1 - for project file support").tqarg(missing[i])); // } else { // allMissing.push_back(missing[i]); // } @@ -4551,7 +4551,7 @@ void RosegardenGUIApp::slotTestStartupTester() } else { for (int i = 0; i < missing.count(); ++i) { if (missingFeatures.count() > 1) { - allMissing.push_back(i18n("%1 - for LilyPond preview support").arg(missing[i])); + allMissing.push_back(i18n("%1 - for LilyPond preview support").tqarg(missing[i])); } else { allMissing.push_back(missing[i]); } @@ -4560,7 +4560,7 @@ void RosegardenGUIApp::slotTestStartupTester() } #ifdef HAVE_LIBJACK - if (m_seqManager && (m_seqManager->getSoundDriverStatus() & AUDIO_OK)) { + if (m_seqManager && (m_seqManager->getSoundDrivertqStatus() & AUDIO_OK)) { m_haveAudioImporter = m_startupTester->haveAudioFileImporter(&missing); @@ -4571,7 +4571,7 @@ void RosegardenGUIApp::slotTestStartupTester() } else { for (int i = 0; i < missing.count(); ++i) { if (missingFeatures.count() > 1) { - allMissing.push_back(i18n("%1 - for audio file import").arg(missing[i])); + allMissing.push_back(i18n("%1 - for audio file import").tqarg(missing[i])); } else { allMissing.push_back(missing[i]); } @@ -4585,13 +4585,13 @@ void RosegardenGUIApp::slotTestStartupTester() TQString message = i18n("<h3>Helper programs not found</h3><p>Rosegarden could not find one or more helper programs which it needs to provide some features. The following features will not be available:</p>"); message += i18n("<ul>"); for (int i = 0; i < missingFeatures.count(); ++i) { - message += i18n("<li>%1</li>").arg(missingFeatures[i]); + message += i18n("<li>%1</li>").tqarg(missingFeatures[i]); } message += i18n("</ul>"); message += i18n("<p>To fix this, you should install the following additional programs:</p>"); message += i18n("<ul>"); for (int i = 0; i < allMissing.count(); ++i) { - message += i18n("<li>%1</li>").arg(allMissing[i]); + message += i18n("<li>%1</li>").tqarg(allMissing[i]); } message += i18n("</ul>"); @@ -4623,7 +4623,7 @@ bool RosegardenGUIApp::launchSequencer(bool useExisting) if (isSequencerRunning()) { RG_DEBUG << "RosegardenGUIApp::launchSequencer() - sequencer already running - returning\n"; - if (m_seqManager) m_seqManager->checkSoundDriverStatus(false); + if (m_seqManager) m_seqManager->checkSoundDrivertqStatus(false); return true; } @@ -4639,7 +4639,7 @@ bool RosegardenGUIApp::launchSequencer(bool useExisting) << "existing DCOP registered sequencer found\n"; if (useExisting) { - if (m_seqManager) m_seqManager->checkSoundDriverStatus(false); + if (m_seqManager) m_seqManager->checkSoundDrivertqStatus(false); m_sequencerProcess = (KProcess*)SequencerExternal; return true; } @@ -4733,7 +4733,7 @@ bool RosegardenGUIApp::launchSequencer(bool useExisting) try { // if (m_seqManager) { // RG_DEBUG << "RosegardenGUIApp::launchSequencer : checking sound driver status\n"; - // m_seqManager->checkSoundDriverStatus(); + // m_seqManager->checkSoundDrivertqStatus(); // } stateChanged("sequencer_running"); @@ -4864,15 +4864,15 @@ void RosegardenGUIApp::slotExportProject() return ; TQString rgFile = fileName; - rgFile.replace(TQRegExp(".rg.rgp$"), ".rg"); - rgFile.replace(TQRegExp(".rgp$"), ".rg"); + rgFile.tqreplace(TQRegExp(".rg.rgp$"), ".rg"); + rgFile.tqreplace(TQRegExp(".rgp$"), ".rg"); CurrentProgressDialog::freeze(); TQString errMsg; if (!m_doc->saveDocument(rgFile, errMsg, true)) { // pretend it's autosave - KMessageBox::sorry(this, i18n("Saving Rosegarden file to package failed: %1").arg(errMsg)); + KMessageBox::sorry(this, i18n("Saving Rosegarden file to package failed: %1").tqarg(errMsg)); CurrentProgressDialog::thaw(); return ; } @@ -4886,7 +4886,7 @@ void RosegardenGUIApp::slotExportProject() proc->start(KProcess::Block, KProcess::All); if (!proc->normalExit() || proc->exitStatus()) { - KMessageBox::sorry(this, i18n("Failed to export to project file \"%1\"").arg(fileName)); + KMessageBox::sorry(this, i18n("Failed to export to project file \"%1\"").tqarg(fileName)); CurrentProgressDialog::thaw(); delete proc; return ; @@ -5021,7 +5021,7 @@ std::map<KProcess *, KTempFile *> RosegardenGUIApp::m_lilyTempFileMap; void RosegardenGUIApp::slotPrintLilyPond() { KTmpStatusMsg msg(i18n("Printing LilyPond file..."), this); - KTempFile *file = new KTempFile(TQString::null, ".ly"); + KTempFile *file = new KTempFile(TQString(), ".ly"); file->setAutoDelete(true); if (!file->name()) { CurrentProgressDialog::freeze(); @@ -5045,7 +5045,7 @@ void RosegardenGUIApp::slotPrintLilyPond() void RosegardenGUIApp::slotPreviewLilyPond() { KTmpStatusMsg msg(i18n("Previewing LilyPond file..."), this); - KTempFile *file = new KTempFile(TQString::null, ".ly"); + KTempFile *file = new KTempFile(TQString(), ".ly"); file->setAutoDelete(true); if (!file->name()) { CurrentProgressDialog::freeze(); @@ -5168,9 +5168,9 @@ RosegardenGUIApp::slotToggleMetronome() { Composition &comp = m_doc->getComposition(); - if (m_seqManager->getTransportStatus() == STARTING_TO_RECORD || - m_seqManager->getTransportStatus() == RECORDING || - m_seqManager->getTransportStatus() == RECORDING_ARMED) { + if (m_seqManager->getTransporttqStatus() == STARTING_TO_RECORD || + m_seqManager->getTransporttqStatus() == RECORDING || + m_seqManager->getTransporttqStatus() == RECORDING_ARMED) { if (comp.useRecordMetronome()) comp.setRecordMetronome(false); else @@ -5192,7 +5192,7 @@ RosegardenGUIApp::slotRewindToBeginning() { // ignore requests if recording // - if (m_seqManager->getTransportStatus() == RECORDING) + if (m_seqManager->getTransporttqStatus() == RECORDING) return ; m_seqManager->rewindToBeginning(); @@ -5203,7 +5203,7 @@ RosegardenGUIApp::slotFastForwardToEnd() { // ignore requests if recording // - if (m_seqManager->getTransportStatus() == RECORDING) + if (m_seqManager->getTransporttqStatus() == RECORDING) return ; m_seqManager->fastForwardToEnd(); @@ -5213,18 +5213,18 @@ void RosegardenGUIApp::slotSetPlayPosition(timeT time) { RG_DEBUG << "RosegardenGUIApp::slotSetPlayPosition(" << time << ")" << endl; - if (m_seqManager->getTransportStatus() == RECORDING) + if (m_seqManager->getTransporttqStatus() == RECORDING) return ; m_doc->slotSetPointerPosition(time); - if (m_seqManager->getTransportStatus() == PLAYING) + if (m_seqManager->getTransporttqStatus() == PLAYING) return ; slotPlay(); } -void RosegardenGUIApp::notifySequencerStatus(int status) +void RosegardenGUIApp::notifySequencertqStatus(int status) { stateChanged("not_playing", (status == PLAYING || @@ -5232,7 +5232,7 @@ void RosegardenGUIApp::notifySequencerStatus(int status) KXMLGUIClient::StateReverse : KXMLGUIClient::StateNoReverse); if (m_seqManager) - m_seqManager->setTransportStatus((TransportStatus) status); + m_seqManager->setTransporttqStatus((TransporttqStatus) status); } void RosegardenGUIApp::processAsynchronousMidi(const MappedComposition &mC) @@ -5261,10 +5261,10 @@ RosegardenGUIApp::slotRecord() return ; } - if (m_seqManager->getTransportStatus() == RECORDING) { + if (m_seqManager->getTransporttqStatus() == RECORDING) { slotStop(); return ; - } else if (m_seqManager->getTransportStatus() == PLAYING) { + } else if (m_seqManager->getTransporttqStatus() == PLAYING) { slotToggleRecord(); return ; } @@ -5398,7 +5398,7 @@ void RosegardenGUIApp::slotPlay() // slotRecord ensures we don't toggle the recording state in // SequenceManager) // - if (m_seqManager->getTransportStatus() == RECORDING_ARMED) { + if (m_seqManager->getTransporttqStatus() == RECORDING_ARMED) { slotRecord(); return ; } @@ -5481,7 +5481,7 @@ void RosegardenGUIApp::slotRewind() { // ignore requests if recording // - if (m_seqManager->getTransportStatus() == RECORDING) + if (m_seqManager->getTransporttqStatus() == RECORDING) return ; if (m_seqManager) m_seqManager->rewind(); @@ -5491,7 +5491,7 @@ void RosegardenGUIApp::slotFastforward() { // ignore requests if recording // - if (m_seqManager->getTransportStatus() == RECORDING) + if (m_seqManager->getTransporttqStatus() == RECORDING) return ; if (m_seqManager) @@ -5705,16 +5705,16 @@ void RosegardenGUIApp::slotEditTempo(timeT atTime) slotEditTempo(this, atTime); } -void RosegardenGUIApp::slotEditTempo(TQWidget *parent) +void RosegardenGUIApp::slotEditTempo(TQWidget *tqparent) { - slotEditTempo(parent, m_doc->getComposition().getPosition()); + slotEditTempo(tqparent, m_doc->getComposition().getPosition()); } -void RosegardenGUIApp::slotEditTempo(TQWidget *parent, timeT atTime) +void RosegardenGUIApp::slotEditTempo(TQWidget *tqparent, timeT atTime) { RG_DEBUG << "RosegardenGUIApp::slotEditTempo\n"; - TempoDialog tempoDialog(parent, m_doc); + TempoDialog tempoDialog(tqparent, m_doc); connect(&tempoDialog, TQT_SIGNAL(changeTempo(timeT, @@ -5740,19 +5740,19 @@ void RosegardenGUIApp::slotEditTimeSignature(timeT atTime) slotEditTimeSignature(this, atTime); } -void RosegardenGUIApp::slotEditTimeSignature(TQWidget *parent) +void RosegardenGUIApp::slotEditTimeSignature(TQWidget *tqparent) { - slotEditTimeSignature(parent, m_doc->getComposition().getPosition()); + slotEditTimeSignature(tqparent, m_doc->getComposition().getPosition()); } -void RosegardenGUIApp::slotEditTimeSignature(TQWidget *parent, +void RosegardenGUIApp::slotEditTimeSignature(TQWidget *tqparent, timeT time) { Composition &composition(m_doc->getComposition()); TimeSignature sig = composition.getTimeSignatureAt(time); - TimeSignatureDialog dialog(parent, &composition, time, sig); + TimeSignatureDialog dialog(tqparent, &composition, time, sig); if (dialog.exec() == TQDialog::Accepted) { @@ -5775,9 +5775,9 @@ void RosegardenGUIApp::slotEditTransportTime() slotEditTransportTime(this); } -void RosegardenGUIApp::slotEditTransportTime(TQWidget *parent) +void RosegardenGUIApp::slotEditTransportTime(TQWidget *tqparent) { - TimeDialog dialog(parent, i18n("Move playback pointer to time"), + TimeDialog dialog(tqparent, i18n("Move playback pointer to time"), &m_doc->getComposition(), m_doc->getComposition().getPosition(), true); @@ -5790,13 +5790,13 @@ void RosegardenGUIApp::slotChangeZoom(int) { double duration44 = TimeSignature(4, 4).getBarDuration(); double value = double(m_zoomSlider->getCurrentSize()); - m_zoomLabel->setText(i18n("%1%").arg(duration44 / value)); + m_zoomLabel->setText(i18n("%1%").tqarg(duration44 / value)); RG_DEBUG << "RosegardenGUIApp::slotChangeZoom : zoom size = " << m_zoomSlider->getCurrentSize() << endl; // initZoomToolbar sets the zoom value. With some old versions of - // Qt3.0, this can cause slotChangeZoom() to be called while the + // TQt3.0, this can cause slotChangeZoom() to be called while the // view hasn't been initialized yet, so we need to check it's not // null // @@ -5858,7 +5858,7 @@ RosegardenGUIApp::slotChangeTempo(timeT time, timeT prevTime = comp.getTempoChange(index).first; KMacroCommand *macro = - new KMacroCommand(i18n("Replace Tempo Change at %1").arg(time)); + new KMacroCommand(i18n("Replace Tempo Change at %1").tqarg(time)); macro->addCommand(new RemoveTempoChangeCommand(&comp, index)); macro->addCommand(new AddTempoChangeCommand(&comp, prevTime, value, @@ -6129,7 +6129,7 @@ RosegardenGUIApp::setCursor(const TQCursor& cursor) m_dockLeft->setCursor(cursor); } -QString +TQString RosegardenGUIApp::createNewAudioFile() { AudioFile *aF = 0; @@ -6177,7 +6177,7 @@ RosegardenGUIApp::createRecordAudioFiles(const TQValueVector<InstrumentId> &reco return qv; } -QString +TQString RosegardenGUIApp::getAudioFilePath() { return TQString(m_doc->getAudioFileManager().getAudioPath().c_str()); @@ -6307,8 +6307,8 @@ RosegardenGUIApp::slotAudioManager() connect(this, TQT_SIGNAL(documentAboutToChange()), m_audioManagerDialog, TQT_SLOT(close())); - m_audioManagerDialog->setAudioSubsystemStatus( - m_seqManager->getSoundDriverStatus() & AUDIO_OK); + m_audioManagerDialog->setAudioSubsystemtqStatus( + m_seqManager->getSoundDrivertqStatus() & AUDIO_OK); plugAccelerators(m_audioManagerDialog, m_audioManagerDialog->getAccelerators()); @@ -6350,7 +6350,7 @@ RosegardenGUIApp::slotAddAudioFile(unsigned int id) TQByteArray data; TQDataStream streamOut(data, IO_WriteOnly); - // We have to pass the filename as a QString + // We have to pass the filename as a TQString // streamOut << TQString(strtoqstr(aF->getFilename())); streamOut << (int)aF->getId(); @@ -6360,7 +6360,7 @@ RosegardenGUIApp::slotAddAudioFile(unsigned int id) int result; streamIn >> result; if (!result) { - KMessageBox::error(this, i18n("Sequencer failed to add audio file %1").arg(aF->getFilename().c_str())); + KMessageBox::error(this, i18n("Sequencer failed to add audio file %1").tqarg(aF->getFilename().c_str())); } } } @@ -6385,7 +6385,7 @@ RosegardenGUIApp::slotDeleteAudioFile(unsigned int id) int result; streamIn >> result; if (!result) { - KMessageBox::error(this, i18n("Sequencer failed to remove audio file id %1").arg(id)); + KMessageBox::error(this, i18n("Sequencer failed to remove audio file id %1").tqarg(id)); } } } @@ -6915,12 +6915,12 @@ RosegardenGUIApp::slotControlEditorClosed() } void -RosegardenGUIApp::slotShowPluginDialog(TQWidget *parent, +RosegardenGUIApp::slotShowPluginDialog(TQWidget *tqparent, InstrumentId instrumentId, int index) { - if (!parent) - parent = this; + if (!tqparent) + tqparent = this; int key = (index << 16) + instrumentId; @@ -6954,7 +6954,7 @@ RosegardenGUIApp::slotShowPluginDialog(TQWidget *parent, // Create the plugin dialog // AudioPluginDialog *dialog = - new AudioPluginDialog(parent, + new AudioPluginDialog(tqparent, m_doc->getPluginManager(), #ifdef HAVE_LIBLO m_pluginGUIManager, @@ -7723,10 +7723,10 @@ RosegardenGUIApp::slotSaveDefaultStudio() if (!res) { if (errMsg) KMessageBox::error(this, i18n(TQString("Could not auto-save document at %1\nError was : %2") - .arg(autoloadFile).arg(errMsg))); + .tqarg(autoloadFile).tqarg(errMsg))); else KMessageBox::error(this, i18n(TQString("Could not auto-save document at %1") - .arg(autoloadFile))); + .tqarg(autoloadFile))); } } @@ -7778,7 +7778,7 @@ RosegardenGUIApp::slotImportStudio() TQString target; if (KIO::NetAccess::download(url, target, this) == false) { KMessageBox::error(this, i18n("Cannot download file %1") - .arg(url.prettyURL())); + .tqarg(url.prettyURL())); return ; } @@ -7912,8 +7912,8 @@ void RosegardenGUIApp::slotAutoSave() { if (!m_seqManager || - m_seqManager->getTransportStatus() == PLAYING || - m_seqManager->getTransportStatus() == RECORDING) + m_seqManager->getTransporttqStatus() == PLAYING || + m_seqManager->getTransporttqStatus() == RECORDING) return ; KConfig* config = kapp->config(); @@ -7982,7 +7982,7 @@ RosegardenGUIApp::awaitDialogClearance() while (haveDialog) { - const TQObjectList *c = children(); + const TQObjectList *c = tqchildren(); if (!c) return; haveDialog = false; @@ -8014,7 +8014,7 @@ RosegardenGUIApp::slotNewerVersionAvailable(TQString v) (this, i18n("<h3>Newer version available</h3><p>A newer version of Rosegarden may be available.<br>Please consult the <a href=\"http://www.rosegardenmusic.com/getting/\">Rosegarden website</a> for more information.</p>"), i18n("Newer version available"), - TQString("version-%1-available-show").arg(v), + TQString("version-%1-available-show").tqarg(v), KMessageBox::AllowLink); CurrentProgressDialog::thaw(); } diff --git a/src/gui/application/RosegardenGUIApp.h b/src/gui/application/RosegardenGUIApp.h index 8ae0eaa..3221ded 100644 --- a/src/gui/application/RosegardenGUIApp.h +++ b/src/gui/application/RosegardenGUIApp.h @@ -110,6 +110,7 @@ class AudioManagerDialog; class RosegardenGUIApp : public KDockMainWindow, virtual public RosegardenIface { Q_OBJECT + TQ_OBJECT friend class RosegardenGUIView; @@ -279,7 +280,7 @@ public: /** * Set the sequencer status - pass through DCOP as an int */ - virtual void notifySequencerStatus(int status); + virtual void notifySequencertqStatus(int status); /** * Handle some random incoming MIDI events. @@ -323,7 +324,7 @@ public: void plugAccelerators(TQWidget *widget, TQAccel *accel); /** - * Override from QWidget + * Override from TQWidget * Toolbars and docks need special treatment */ virtual void setCursor(const TQCursor&); @@ -812,7 +813,7 @@ public slots: * Tempo to Segment length */ void slotTempoToSegmentLength(); - void slotTempoToSegmentLength(TQWidget* parent); + void slotTempoToSegmentLength(TQWidget* tqparent); /** * toggle segment labels @@ -855,22 +856,22 @@ public slots: */ void slotEditTempo(); void slotEditTempo(timeT atTime); - void slotEditTempo(TQWidget *parent); - void slotEditTempo(TQWidget *parent, timeT atTime); + void slotEditTempo(TQWidget *tqparent); + void slotEditTempo(TQWidget *tqparent, timeT atTime); /** * Edit the time signature - called from a Transport signal */ void slotEditTimeSignature(); void slotEditTimeSignature(timeT atTime); - void slotEditTimeSignature(TQWidget *parent); - void slotEditTimeSignature(TQWidget *parent, timeT atTime); + void slotEditTimeSignature(TQWidget *tqparent); + void slotEditTimeSignature(TQWidget *tqparent, timeT atTime); /** * Edit the playback pointer position - called from a Transport signal */ void slotEditTransportTime(); - void slotEditTransportTime(TQWidget *parent); + void slotEditTransportTime(TQWidget *tqparent); /** * Change the length of the composition @@ -1239,7 +1240,7 @@ public slots: /** * save general Options like all bar positions and status as well - * as the geometry and the recent file list to the configuration + * as the tqgeometry and the recent file list to the configuration * file */ void slotSaveOptions(); @@ -1464,7 +1465,7 @@ public slots: * Create a plugin dialog for a given instrument and slot, or * raise an exising one. */ - void slotShowPluginDialog(TQWidget *parent, + void slotShowPluginDialog(TQWidget *tqparent, InstrumentId instrument, int index); diff --git a/src/gui/application/RosegardenGUIView.cpp b/src/gui/application/RosegardenGUIView.cpp index 9eb7969..e336c2e 100644 --- a/src/gui/application/RosegardenGUIView.cpp +++ b/src/gui/application/RosegardenGUIView.cpp @@ -98,7 +98,7 @@ namespace Rosegarden // Use this to define the basic unit of the main TQCanvas size. // -// This apparently arbitrary figure is what we think is an +// This aptqparently arbitrary figure is what we think is an // appropriate width in pixels for a 4/4 bar. Beware of making it // too narrow, as shorter bars will be proportionally smaller -- // the visual difference between 2/4 and 4/4 is perhaps greater @@ -118,9 +118,9 @@ RosegardenGUIView::RosegardenGUIView(bool showTrackLabels, SegmentParameterBox* segmentParameterBox, InstrumentParameterBox* instrumentParameterBox, TrackParameterBox* trackParameterBox, - TQWidget *parent, + TQWidget *tqparent, const char* /*name*/) - : TQVBox(parent), + : TQVBox(tqparent), m_rulerScale(0), m_trackEditor(0), m_segmentParameterBox(segmentParameterBox), @@ -174,7 +174,7 @@ RosegardenGUIView::RosegardenGUIView(bool showTrackLabels, connect(m_trackEditor, TQT_SIGNAL(droppedDocument(TQString)), - parent, + tqparent, TQT_SLOT(slotOpenDroppedURL(TQString))); connect(m_trackEditor, @@ -870,7 +870,7 @@ void RosegardenGUIView::slotEditSegmentAudio(Segment *segment) } // wait cursor - TQApplication::setOverrideCursor(TQCursor(Qt::waitCursor)); + TQApplication::setOverrideCursor(TQCursor(TQt::waitCursor)); // Prepare the process // @@ -907,19 +907,19 @@ void RosegardenGUIView::setZoomSize(double size) m_trackEditor->getSegmentCanvas()->slotUpdateSegmentsDrawBuffer(); if (m_trackEditor->getTempoRuler()) { - m_trackEditor->getTempoRuler()->repaint(); + m_trackEditor->getTempoRuler()->tqrepaint(); } if (m_trackEditor->getChordNameRuler()) { - m_trackEditor->getChordNameRuler()->repaint(); + m_trackEditor->getChordNameRuler()->tqrepaint(); } if (m_trackEditor->getTopStandardRuler()) { - m_trackEditor->getTopStandardRuler()->repaint(); + m_trackEditor->getTopStandardRuler()->tqrepaint(); } if (m_trackEditor->getBottomStandardRuler()) { - m_trackEditor->getBottomStandardRuler()->repaint(); + m_trackEditor->getBottomStandardRuler()->tqrepaint(); } } @@ -1196,7 +1196,7 @@ RosegardenGUIView::updateMeters(SequencerMapper *mapper) bool toSet = false; if (states[instrumentId] == newState && - (getDocument()->getSequenceManager()->getTransportStatus() + (getDocument()->getSequenceManager()->getTransporttqStatus() != STOPPED)) { if (info.level != 0 || info.levelRight != 0) { @@ -1212,7 +1212,7 @@ RosegardenGUIView::updateMeters(SequencerMapper *mapper) if (recStates[instrumentId] == newState && instrument->getType() == Instrument::Audio && - (getDocument()->getSequenceManager()->getTransportStatus() + (getDocument()->getSequenceManager()->getTransporttqStatus() != PLAYING)) { if (recInfo.level != 0 || recInfo.levelRight != 0) { @@ -1238,7 +1238,7 @@ RosegardenGUIView::updateMeters(SequencerMapper *mapper) if (info.level == 0) continue; - if (getDocument()->getSequenceManager()->getTransportStatus() + if (getDocument()->getSequenceManager()->getTransporttqStatus() != STOPPED) { // The information in 'info' is specific for this instrument, not @@ -2028,7 +2028,7 @@ RosegardenGUIView::createEventView(std::vector<Segment *> segmentsToEdit) // create keyboard accelerators on view // - RosegardenGUIApp *par = dynamic_cast<RosegardenGUIApp*>(parent()); + RosegardenGUIApp *par = dynamic_cast<RosegardenGUIApp*>(tqparent()); if (par) { par->plugAccelerators(eventView, eventView->getAccelerators()); diff --git a/src/gui/application/RosegardenGUIView.h b/src/gui/application/RosegardenGUIView.h index 1c2e3b1..44bf12b 100644 --- a/src/gui/application/RosegardenGUIView.h +++ b/src/gui/application/RosegardenGUIView.h @@ -74,9 +74,10 @@ class LevelInfo; * @author Source Framework Automatically Generated by KDevelop, (c) The KDevelop Team. * @version KDevelop version 0.4 code generation */ -class RosegardenGUIView : public QVBox +class RosegardenGUIView : public TQVBox { Q_OBJECT + TQ_OBJECT public: /**p @@ -86,7 +87,7 @@ public: SegmentParameterBox*, InstrumentParameterBox*, TrackParameterBox*, - TQWidget *parent = 0, + TQWidget *tqparent = 0, const char *name=0); /** @@ -97,7 +98,7 @@ public: /** * returns a pointer to the document connected to the view * instance. Mind that this method requires a RosegardenGUIApp - * instance as a parent widget to get to the window document + * instance as a tqparent widget to get to the window document * pointer by calling the RosegardenGUIApp::getDocument() method. * * @see RosegardenGUIApp#getDocument diff --git a/src/gui/application/RosegardenIface.h b/src/gui/application/RosegardenIface.h index 046033c..04ab1a2 100644 --- a/src/gui/application/RosegardenIface.h +++ b/src/gui/application/RosegardenIface.h @@ -86,7 +86,7 @@ k_dcop: // Sequencer updates GUI with status // - virtual void notifySequencerStatus(int status) = 0; + virtual void notifySequencertqStatus(int status) = 0; // Used to map unexpected (async) MIDI events to the user interface. // We can show these on the Transport or on a MIDI Mixer. diff --git a/src/gui/application/SetWaitCursor.cpp b/src/gui/application/SetWaitCursor.cpp index 9d4472d..19ef147 100644 --- a/src/gui/application/SetWaitCursor.cpp +++ b/src/gui/application/SetWaitCursor.cpp @@ -79,7 +79,7 @@ SetWaitCursor::~SetWaitCursor() m_guiApp->setCursor(m_saveCursor); if (viewport) { - if (currentSegmentCanvasCursor.shape() == KCursor::waitCursor().shape()) { + if (currentSegmentCanvasCursor.tqshape() == KCursor::waitCursor().tqshape()) { viewport->setCursor(m_saveSegmentCanvasCursor); } else { viewport->setCursor(currentSegmentCanvasCursor); // because m_guiApp->setCursor() has replaced it diff --git a/src/gui/application/StartupTester.cpp b/src/gui/application/StartupTester.cpp index 5e1813d..0c3eb90 100644 --- a/src/gui/application/StartupTester.cpp +++ b/src/gui/application/StartupTester.cpp @@ -147,7 +147,7 @@ StartupTester::isReady() void StartupTester::stdoutReceived(KProcess *, char *buffer, int len) { - m_stdoutBuffer += TQString::fromLatin1(buffer, len); + m_stdoutBuffer += TQString::tqfromLatin1(buffer, len); } void diff --git a/src/gui/application/StartupTester.h b/src/gui/application/StartupTester.h index 1249cbd..5579eaf 100644 --- a/src/gui/application/StartupTester.h +++ b/src/gui/application/StartupTester.h @@ -37,9 +37,10 @@ class KProcess; namespace Rosegarden { -class StartupTester : public TQObject, public QThread +class StartupTester : public TQObject, public TQThread { Q_OBJECT + TQ_OBJECT public: StartupTester(); diff --git a/src/gui/application/main.cpp b/src/gui/application/main.cpp index 8ee67e3..8c5a5a9 100644 --- a/src/gui/application/main.cpp +++ b/src/gui/application/main.cpp @@ -66,7 +66,7 @@ structures, of which the primary ones are Event, Segment, Track, Instrument and Composition. It also contains a selection of utility and helper classes of a kind that is not specific to any particular GUI. Everything here is part of the Rosegarden namespace, and there -are no dependencies on KDE or Qt (although it uses the STL heavily). +are no dependencies on KDE or TQt (although it uses the STL heavily). The keyword for the basic structures in use is "flexibility". Our Event objects can be extended arbitrarily for the convenience of GUI @@ -98,7 +98,7 @@ disastrous side-effects. automatically ordered by their absolute time. It's the usual container for Events. A Segment has a starting time that can be changed, and a duration that is based solely on the end time of - the last Event it contains. Note that in order to facilitate + the last Event it tqcontains. Note that in order to facilitate musical notation editing, we explicitly store silences as series of rest Events; thus a Segment really should contain no gaps between its Events. (This isn't checked anywhere and nothing will @@ -153,7 +153,7 @@ The base directory also contains various music-related helper classes: The NotationTypes classes also define important constants for the names of common properties in Events. For example, the Note class contains Note::EventType, which is the type of a note Event, and - Note::EventRestType, the type of a rest Event; and Key contains + Note::EventRestType, the type of a rest Event; and Key tqcontains Key::EventType, the type of a key change Event, KeyPropertyName, the name of the property that defines the key change, and a set of the valid strings for key changes. @@ -183,7 +183,7 @@ The base directory also contains various music-related helper classes: \section gui GUI -The GUI directory builds into a KDE/Qt application. Like most KDE +The GUI directory builds into a KDE/TQt application. Like most KDE applications, it follows a document/view model. The document (class RosegardenGUIDoc, which wraps a Composition) can have several views (class RosegardenGUIView), although at the moment only a single one is @@ -246,9 +246,9 @@ and Events (our basic music element). To help lift the ambiguity, and time this corresponds to, that kind of stuff. (In the Notation and Matrix views, the LinedStaff calculates mappings between coordinates and staff lines: the former is especially - complicated because of its support for page layout.)\n + complicated because of its support for page tqlayout.)\n -# The canvas view transmits this kind of info as a signal, which is - connected to a slot in the parent EditView. + connected to a slot in the tqparent EditView. -# The EditView delegates action to the current tool.\n -# The tool performs the actual job (inserting or deleting a note, etc...). @@ -260,11 +260,11 @@ which "wraps" the complexity into simple calls and performs all the hidden tasks. The EditView also maintains (obviously) its visual appearance with the -layout classes, applying them when appropriate. +tqlayout classes, applying them when appropriate. \section sequencer Sequencer -The sequencer directory also builds into a KDE/Qt application, but one +The sequencer directory also builds into a KDE/TQt application, but one which doesn't have a gui. The Sequencer can be started automatically by the main Rosegarden GUI or manually if testing - it's sometimes more convenient to do the latter as the Sequencer needs to be connected @@ -324,7 +324,7 @@ static KCmdLineOptions options[] = // ----------------------------------------------------------------- -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 #include <X11/Xlib.h> #include <X11/Xutil.h> #include <X11/Xatom.h> @@ -379,7 +379,7 @@ void testInstalledVersion() " 2. The upgrade was installed in a non-standard directory,\n" " and an old version was found in a standard directory. If so,\n" " you will need to add the correct directory to your KDEDIRS\n" - " environment variable before you can run it.").arg(VERSION).arg(installedVersion), + " environment variable before you can run it.").tqarg(VERSION).tqarg(installedVersion), i18n("Installation problem")); } else { @@ -531,8 +531,8 @@ int main(int argc, char *argv[]) startupSize = TQSize((desktopRect.width() * 4) / 5, (desktopRect.height() * 4) / 5); } - TQString widthKey = TQString("Width %1").arg(totalRect.width()); - TQString heightKey = TQString("Height %1").arg(totalRect.height()); + TQString widthKey = TQString("Width %1").tqarg(totalRect.width()); + TQString heightKey = TQString("Height %1").tqarg(totalRect.height()); windowWidth = config->readUnsignedNumEntry (widthKey, startupSize.width()); windowHeight = config->readUnsignedNumEntry @@ -595,7 +595,7 @@ int main(int argc, char *argv[]) rosegardengui = new RosegardenGUIApp(!app.noSequencerMode(), args->isSet("existingsequencer"), - startLogo); + TQT_TQOBJECT(startLogo)); rosegardengui->setIsFirstRun(newVersion); @@ -676,7 +676,7 @@ int main(int argc, char *argv[]) } -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 XSetErrorHandler( _x_errhandler ); #endif @@ -722,13 +722,13 @@ int main(int argc, char *argv[]) TQVBox *mw = dialog->makeVBoxMainWidget(); TQHBox *hb = new TQHBox(mw); TQLabel *image = new TQLabel(hb); - image->setAlignment(Qt::AlignTop); + image->tqsetAlignment(TQt::AlignTop); TQString iconFile = locate("appdata", "pixmaps/misc/welcome-icon.png"); if (iconFile) { image->setPixmap(TQPixmap(iconFile)); } TQLabel *label = new TQLabel(hb); - label->setText(i18n("<h2>Welcome to Rosegarden!</h2><p>Welcome to the Rosegarden audio and MIDI sequencer and musical notation editor.</p><ul><li>If you have not already done so, you may wish to install some DSSI synth plugins, or a separate synth program such as QSynth. Rosegarden does not synthesize sounds from MIDI on its own, so without these you will hear nothing.</li><br><br><li>Rosegarden uses the JACK audio server for recording and playback of audio, and for playback from DSSI synth plugins. These features will only be available if the JACK server is running.</li><br><br><li>Rosegarden has comprehensive documentation: see the Help menu for the handbook, tutorials, and other information!</li></ul><p>Rosegarden was brought to you by a team of volunteers across the world. To learn more, go to <a href=\"http://www.rosegardenmusic.com/\">http://www.rosegardenmusic.com/</a>.</p>")); + label->setText(i18n("<h2>Welcome to Rosegarden!</h2><p>Welcome to the Rosegarden audio and MIDI sequencer and musical notation editor.</p><ul><li>If you have not already done so, you may wish to install some DSSI synth plugins, or a separate synth program such as TQSynth. Rosegarden does not synthesize sounds from MIDI on its own, so without these you will hear nothing.</li><br><br><li>Rosegarden uses the JACK audio server for recording and playback of audio, and for playback from DSSI synth plugins. These features will only be available if the JACK server is running.</li><br><br><li>Rosegarden has comprehensive documentation: see the Help menu for the handbook, tutorials, and other information!</li></ul><p>Rosegarden was brought to you by a team of volunteers across the world. To learn more, go to <a href=\"http://www.rosegardenmusic.com/\">http://www.rosegardenmusic.com/</a>.</p>")); dialog->showButtonOK(true); rosegardengui->awaitDialogClearance(); dialog->exec(); diff --git a/src/gui/configuration/AudioConfigurationPage.cpp b/src/gui/configuration/AudioConfigurationPage.cpp index 6361576..38b675a 100644 --- a/src/gui/configuration/AudioConfigurationPage.cpp +++ b/src/gui/configuration/AudioConfigurationPage.cpp @@ -67,9 +67,9 @@ namespace Rosegarden AudioConfigurationPage::AudioConfigurationPage( RosegardenGUIDoc *doc, KConfig *cfg, - TQWidget *parent, + TQWidget *tqparent, const char *name): - TabbedConfigurationPage(cfg, parent, name), + TabbedConfigurationPage(cfg, tqparent, name), m_externalAudioEditorPath(0) { // set the document in the super class @@ -78,7 +78,7 @@ AudioConfigurationPage::AudioConfigurationPage( m_cfg->setGroup(SequencerOptionsConfigGroup); TQFrame *frame = new TQFrame(m_tabWidget); - TQGridLayout *layout = new TQGridLayout(frame, 7, 2, 10, 5); + TQGridLayout *tqlayout = new TQGridLayout(frame, 7, 2, 10, 5); TQLabel *label = 0; @@ -86,17 +86,17 @@ AudioConfigurationPage::AudioConfigurationPage( m_cfg->setGroup(GeneralOptionsConfigGroup); - layout->setRowSpacing(row, 15); + tqlayout->setRowSpacing(row, 15); ++row; - layout->addWidget(new TQLabel(i18n("Audio preview scale"), + tqlayout->addWidget(new TQLabel(i18n("Audio preview scale"), frame), row, 0); m_previewStyle = new KComboBox(frame); m_previewStyle->insertItem(i18n("Linear - easier to see loud peaks")); m_previewStyle->insertItem(i18n("Meter scaling - easier to see quiet activity")); m_previewStyle->setCurrentItem(m_cfg->readUnsignedNumEntry("audiopreviewstyle", 1)); - layout->addMultiCellWidget(m_previewStyle, row, row, 1, 2); + tqlayout->addMultiCellWidget(m_previewStyle, row, row, 1, 2); ++row; #ifdef HAVE_LIBJACK @@ -107,14 +107,14 @@ AudioConfigurationPage::AudioConfigurationPage( m_audioRecFormat->insertItem(i18n("16-bit PCM WAV format (smaller files)")); m_audioRecFormat->insertItem(i18n("32-bit float WAV format (higher quality)")); m_audioRecFormat->setCurrentItem(m_cfg->readUnsignedNumEntry("audiorecordfileformat", 1)); - layout->addWidget(label, row, 0); - layout->addMultiCellWidget(m_audioRecFormat, row, row, 1, 2); + tqlayout->addWidget(label, row, 0); + tqlayout->addMultiCellWidget(m_audioRecFormat, row, row, 1, 2); ++row; #endif m_cfg->setGroup(GeneralOptionsConfigGroup); - layout->addWidget(new TQLabel(i18n("External audio editor"), frame), + tqlayout->addWidget(new TQLabel(i18n("External audio editor"), frame), row, 0); TQString defaultAudioEditor = getBestAvailableAudioEditor(); @@ -131,18 +131,18 @@ AudioConfigurationPage::AudioConfigurationPage( m_externalAudioEditorPath = new TQLineEdit(externalAudioEditor, frame); // m_externalAudioEditorPath->setMinimumWidth(150); - layout->addWidget(m_externalAudioEditorPath, row, 1); + tqlayout->addWidget(m_externalAudioEditorPath, row, 1); TQPushButton *changePathButton = new TQPushButton(i18n("Choose..."), frame); - layout->addWidget(changePathButton, row, 2); + tqlayout->addWidget(changePathButton, row, 2); connect(changePathButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotFileDialog())); ++row; m_cfg->setGroup(SequencerOptionsConfigGroup); - layout->addWidget(new TQLabel(i18n("Create JACK outputs"), frame), + tqlayout->addWidget(new TQLabel(i18n("Create JACK outputs"), frame), row, 0); // ++row; @@ -150,20 +150,20 @@ AudioConfigurationPage::AudioConfigurationPage( m_createFaderOuts = new TQCheckBox(i18n("for individual audio instruments"), frame); m_createFaderOuts->setChecked(m_cfg->readBoolEntry("audiofaderouts", false)); -// layout->addWidget(label, row, 0, Qt::AlignRight); - layout->addWidget(m_createFaderOuts, row, 1); +// tqlayout->addWidget(label, row, 0, TQt::AlignRight); + tqlayout->addWidget(m_createFaderOuts, row, 1); ++row; m_createSubmasterOuts = new TQCheckBox(i18n("for submasters"), frame); m_createSubmasterOuts->setChecked(m_cfg->readBoolEntry("audiosubmasterouts", false)); -// layout->addWidget(label, row, 0, Qt::AlignRight); - layout->addWidget(m_createSubmasterOuts, row, 1); +// tqlayout->addWidget(label, row, 0, TQt::AlignRight); + tqlayout->addWidget(m_createSubmasterOuts, row, 1); ++row; #endif - layout->setRowStretch(row, 10); + tqlayout->setRowStretch(row, 10); addTab(frame, i18n("General")); @@ -174,17 +174,17 @@ AudioConfigurationPage::AudioConfigurationPage( #ifdef OFFER_JACK_START_OPTION frame = new TQFrame(m_tabWidget); - layout = new TQGridLayout(frame, 8, 4, 10, 5); + tqlayout = new TQGridLayout(frame, 8, 4, 10, 5); row = 0; - layout->setRowSpacing(row, 15); + tqlayout->setRowSpacing(row, 15); ++row; label = new TQLabel(i18n("Rosegarden can start the JACK audio daemon (jackd) for you automatically if it isn't already running when Rosegarden starts.\n\nThis is recommended for beginners and those who use Rosegarden as their main audio application, but it might not be to the liking of advanced users.\n\nIf you want to start JACK automatically, make sure the command includes a full path where necessary as well as any command-line arguments you want to use.\n\nFor example: /usr/local/bin/jackd -d alsa -d hw -r44100 -p 2048 -n 2\n\n"), frame); - label->setAlignment(Qt::WordBreak); + label->tqsetAlignment(TQt::WordBreak); - layout->addMultiCellWidget(label, row, row, 0, 3); + tqlayout->addMultiCellWidget(label, row, row, 0, 3); ++row; // JACK control things @@ -193,12 +193,12 @@ AudioConfigurationPage::AudioConfigurationPage( m_startJack = new TQCheckBox(frame); m_startJack->setChecked(startJack); - layout->addWidget(new TQLabel(i18n("Start JACK when Rosegarden starts"), frame), 2, 0); + tqlayout->addWidget(new TQLabel(i18n("Start JACK when Rosegarden starts"), frame), 2, 0); - layout->addWidget(m_startJack, row, 1); + tqlayout->addWidget(m_startJack, row, 1); ++row; - layout->addWidget(new TQLabel(i18n("JACK command"), frame), + tqlayout->addWidget(new TQLabel(i18n("JACK command"), frame), row, 0); TQString jackPath = m_cfg->readEntry("jackcommand", @@ -206,10 +206,10 @@ AudioConfigurationPage::AudioConfigurationPage( "/usr/bin/qjackctl -s"); m_jackPath = new TQLineEdit(jackPath, frame); - layout->addMultiCellWidget(m_jackPath, row, row, 1, 3); + tqlayout->addMultiCellWidget(m_jackPath, row, row, 1, 3); ++row; - layout->setRowStretch(row, 10); + tqlayout->setRowStretch(row, 10); addTab(frame, i18n("JACK Startup")); @@ -221,7 +221,7 @@ AudioConfigurationPage::AudioConfigurationPage( void AudioConfigurationPage::slotFileDialog() { - TQString path = KFileDialog::getOpenFileName(TQString::null, TQString::null, this, i18n("External audio editor path")); + TQString path = KFileDialog::getOpenFileName(TQString(), TQString(), this, i18n("External audio editor path")); m_externalAudioEditorPath->setText(path); } @@ -259,7 +259,7 @@ AudioConfigurationPage::apply() if (extpath != "") { TQFileInfo info(extpath); if (!info.exists() || !info.isExecutable()) { - KMessageBox::error(0, i18n("External audio editor \"%1\" not found or not executable").arg(extpath)); + KMessageBox::error(0, i18n("External audio editor \"%1\" not found or not executable").tqarg(extpath)); m_cfg->writeEntry("externalaudioeditor", ""); } else { m_cfg->writeEntry("externalaudioeditor", externalAudioEditor); @@ -269,7 +269,7 @@ AudioConfigurationPage::apply() } } -QString +TQString AudioConfigurationPage::getBestAvailableAudioEditor() { static TQString result = ""; @@ -306,7 +306,7 @@ AudioConfigurationPage::getBestAvailableAudioEditor() if (fi.exists() && fi.isExecutable()) { if (n == "rezound") { - result = TQString("%1 --audio-method=jack").arg(fp); + result = TQString("%1 --audio-method=jack").tqarg(fp); } else { result = fp; } diff --git a/src/gui/configuration/AudioConfigurationPage.h b/src/gui/configuration/AudioConfigurationPage.h index 2b678aa..b5bd5f0 100644 --- a/src/gui/configuration/AudioConfigurationPage.h +++ b/src/gui/configuration/AudioConfigurationPage.h @@ -50,10 +50,11 @@ class RosegardenGUIDoc; class AudioConfigurationPage : public TabbedConfigurationPage { Q_OBJECT + TQ_OBJECT public: AudioConfigurationPage(RosegardenGUIDoc *doc, KConfig *cfg, - TQWidget *parent=0, + TQWidget *tqparent=0, const char *name=0); virtual void apply(); diff --git a/src/gui/configuration/AudioPropertiesPage.cpp b/src/gui/configuration/AudioPropertiesPage.cpp index 9d0191e..85dc0b4 100644 --- a/src/gui/configuration/AudioPropertiesPage.cpp +++ b/src/gui/configuration/AudioPropertiesPage.cpp @@ -52,35 +52,35 @@ namespace Rosegarden { AudioPropertiesPage::AudioPropertiesPage(RosegardenGUIDoc *doc, - TQWidget *parent, + TQWidget *tqparent, const char *name) - : TabbedConfigurationPage(doc, parent, name) + : TabbedConfigurationPage(doc, tqparent, name) { AudioFileManager &afm = doc->getAudioFileManager(); TQFrame *frame = new TQFrame(m_tabWidget); - TQGridLayout *layout = new TQGridLayout(frame, 4, 3, 10, 5); - layout->addWidget(new TQLabel(i18n("Audio file path:"), frame), 0, 0); + TQGridLayout *tqlayout = new TQGridLayout(frame, 4, 3, 10, 5); + tqlayout->addWidget(new TQLabel(i18n("Audio file path:"), frame), 0, 0); m_path = new TQLabel(TQString(afm.getAudioPath().c_str()), frame); - layout->addWidget(m_path, 0, 1); + tqlayout->addWidget(m_path, 0, 1); m_changePathButton = new TQPushButton(i18n("Choose..."), frame); - layout->addWidget(m_changePathButton, 0, 2); + tqlayout->addWidget(m_changePathButton, 0, 2); m_diskSpace = new TQLabel(frame); - layout->addWidget(new TQLabel(i18n("Disk space remaining:"), frame), 1, 0); - layout->addWidget(m_diskSpace, 1, 1); + tqlayout->addWidget(new TQLabel(i18n("Disk space remaining:"), frame), 1, 0); + tqlayout->addWidget(m_diskSpace, 1, 1); m_minutesAtStereo = new TQLabel(frame); - layout->addWidget( + tqlayout->addWidget( new TQLabel(i18n("Equivalent minutes of 16-bit stereo:"), frame), 2, 0); - layout->addWidget(m_minutesAtStereo, 2, 1, AlignCenter); + tqlayout->addWidget(m_minutesAtStereo, 2, 1, AlignCenter); - layout->setRowStretch(3, 2); + tqlayout->setRowStretch(3, 2); calculateStats(); @@ -111,9 +111,9 @@ AudioPropertiesPage::slotFoundMountPoint(const TQString&, unsigned long kBAvail ) { m_diskSpace->setText(i18n("%1 out of %2 (%3% used)") - .arg(KIO::convertSizeFromKB(kBAvail)) - .arg(KIO::convertSizeFromKB(kBSize)) - .arg( 100 - (int)(100.0 * kBAvail / kBSize) )); + .tqarg(KIO::convertSizeFromKB(kBAvail)) + .tqarg(KIO::convertSizeFromKB(kBSize)) + .tqarg( 100 - (int)(100.0 * kBAvail / kBSize) )); AudioPluginManager *apm = m_doc->getPluginManager(); @@ -140,9 +140,9 @@ AudioPropertiesPage::slotFoundMountPoint(const TQString&, minsStr.sprintf("%8.1f", stereoMins); m_minutesAtStereo-> - setText(TQString("%1 %2 %3Hz").arg(minsStr) - .arg(i18n("minutes at")) - .arg(sampleRate)); + setText(TQString("%1 %2 %3Hz").tqarg(minsStr) + .tqarg(i18n("minutes at")) + .tqarg(sampleRate)); } void @@ -151,7 +151,7 @@ AudioPropertiesPage::slotFileDialog() AudioFileManager &afm = m_doc->getAudioFileManager(); KFileDialog *fileDialog = new KFileDialog(TQString(afm.getAudioPath().c_str()), - TQString::null, + TQString(), this, "file dialog", true); fileDialog->setMode(KFile::Directory); diff --git a/src/gui/configuration/AudioPropertiesPage.h b/src/gui/configuration/AudioPropertiesPage.h index 0c9d15f..3ddb83f 100644 --- a/src/gui/configuration/AudioPropertiesPage.h +++ b/src/gui/configuration/AudioPropertiesPage.h @@ -50,9 +50,10 @@ class RosegardenGUIDoc; class AudioPropertiesPage : public TabbedConfigurationPage { Q_OBJECT + TQ_OBJECT public: AudioPropertiesPage(RosegardenGUIDoc *doc, - TQWidget *parent=0, const char *name=0); + TQWidget *tqparent=0, const char *name=0); virtual void apply(); static TQString iconLabel() { return i18n("Audio"); } diff --git a/src/gui/configuration/ColourConfigurationPage.cpp b/src/gui/configuration/ColourConfigurationPage.cpp index 975e00d..5ef9321 100644 --- a/src/gui/configuration/ColourConfigurationPage.cpp +++ b/src/gui/configuration/ColourConfigurationPage.cpp @@ -52,12 +52,12 @@ namespace Rosegarden { ColourConfigurationPage::ColourConfigurationPage(RosegardenGUIDoc *doc, - TQWidget *parent, + TQWidget *tqparent, const char *name) - : TabbedConfigurationPage(doc, parent, name) + : TabbedConfigurationPage(doc, tqparent, name) { TQFrame *frame = new TQFrame(m_tabWidget); - TQGridLayout *layout = new TQGridLayout(frame, 2, 2, + TQGridLayout *tqlayout = new TQGridLayout(frame, 2, 2, 10, 5); m_map = m_doc->getComposition().getSegmentColourMap(); @@ -65,15 +65,15 @@ ColourConfigurationPage::ColourConfigurationPage(RosegardenGUIDoc *doc, m_colourtable = new ColourTable(frame, m_map, m_listmap); m_colourtable->setFixedHeight(280); - layout->addMultiCellWidget(m_colourtable, 0, 0, 0, 1); + tqlayout->addMultiCellWidget(m_colourtable, 0, 0, 0, 1); TQPushButton* addColourButton = new TQPushButton(i18n("Add New Color"), frame); - layout->addWidget(addColourButton, 1, 0, Qt::AlignHCenter); + tqlayout->addWidget(addColourButton, 1, 0, TQt::AlignHCenter); TQPushButton* deleteColourButton = new TQPushButton(i18n("Delete Color"), frame); - layout->addWidget(deleteColourButton, 1, 1, Qt::AlignHCenter); + tqlayout->addWidget(deleteColourButton, 1, 1, TQt::AlignHCenter); connect(addColourButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotAddNew())); diff --git a/src/gui/configuration/ColourConfigurationPage.h b/src/gui/configuration/ColourConfigurationPage.h index 2d3353d..f6c8bfd 100644 --- a/src/gui/configuration/ColourConfigurationPage.h +++ b/src/gui/configuration/ColourConfigurationPage.h @@ -50,9 +50,10 @@ class RosegardenGUIDoc; class ColourConfigurationPage : public TabbedConfigurationPage { Q_OBJECT + TQ_OBJECT public: ColourConfigurationPage(RosegardenGUIDoc *doc, - TQWidget *parent=0, const char *name=0); + TQWidget *tqparent=0, const char *name=0); virtual void apply(); void populate_table(); diff --git a/src/gui/configuration/ConfigurationPage.h b/src/gui/configuration/ConfigurationPage.h index d05296a..cfc4f18 100644 --- a/src/gui/configuration/ConfigurationPage.h +++ b/src/gui/configuration/ConfigurationPage.h @@ -45,22 +45,23 @@ class RosegardenGUIDoc; * This class borrowed from KMail * (c) 2000 The KMail Development Team */ -class ConfigurationPage : public QWidget +class ConfigurationPage : public TQWidget { Q_OBJECT + TQ_OBJECT public: ConfigurationPage(RosegardenGUIDoc *doc, - TQWidget *parent=0, const char *name=0) - : TQWidget(parent, name), m_doc(doc), m_cfg(0), m_pageIndex(0) {} + TQWidget *tqparent=0, const char *name=0) + : TQWidget(tqparent, name), m_doc(doc), m_cfg(0), m_pageIndex(0) {} ConfigurationPage(KConfig *cfg, - TQWidget *parent=0, const char *name=0) - : TQWidget(parent, name), m_doc(0), m_cfg(cfg), m_pageIndex(0) {} + TQWidget *tqparent=0, const char *name=0) + : TQWidget(tqparent, name), m_doc(0), m_cfg(cfg), m_pageIndex(0) {} ConfigurationPage(RosegardenGUIDoc *doc, KConfig *cfg, - TQWidget *parent=0, const char *name=0) - : TQWidget(parent, name), m_doc(doc), m_cfg(cfg), m_pageIndex(0) {} + TQWidget *tqparent=0, const char *name=0) + : TQWidget(tqparent, name), m_doc(doc), m_cfg(cfg), m_pageIndex(0) {} virtual ~ConfigurationPage() {}; diff --git a/src/gui/configuration/DocumentMetaConfigurationPage.cpp b/src/gui/configuration/DocumentMetaConfigurationPage.cpp index b6479cc..35e614d 100644 --- a/src/gui/configuration/DocumentMetaConfigurationPage.cpp +++ b/src/gui/configuration/DocumentMetaConfigurationPage.cpp @@ -65,18 +65,18 @@ static TQString durationToString(Rosegarden::Composition &comp, Rosegarden::RealTime rt) { return i18n("%1 minutes %2.%3%4 seconds (%5 units, %6 measures)") // TODO - PLURAL - .arg(rt.sec / 60).arg(rt.sec % 60) - .arg(rt.msec() / 100).arg((rt.msec() / 10) % 10) - .arg(duration).arg(comp.getBarNumber(absTime + duration) - + .tqarg(rt.sec / 60).tqarg(rt.sec % 60) + .tqarg(rt.msec() / 100).tqarg((rt.msec() / 10) % 10) + .tqarg(duration).tqarg(comp.getBarNumber(absTime + duration) - comp.getBarNumber(absTime)); } -class SegmentDataItem : public QTableItem +class SegmentDataItem : public TQTableItem { public: SegmentDataItem(TQTable *t, TQString s) : TQTableItem(t, TQTableItem::Never, s) { } - virtual int alignment() const { return Qt::AlignCenter; } + virtual int tqalignment() const { return TQt::AlignCenter; } virtual TQString key() const { @@ -96,7 +96,7 @@ public: TQString s(text()); if (s[0].digitValue() >= 0) { - return TQString("%1%2").arg(s.length()).arg(s); + return TQString("%1%2").tqarg(s.length()).tqarg(s); } else { return s; } @@ -104,9 +104,9 @@ public: }; DocumentMetaConfigurationPage::DocumentMetaConfigurationPage(RosegardenGUIDoc *doc, - TQWidget *parent, + TQWidget *tqparent, const char *name) : - TabbedConfigurationPage(doc, parent, name) + TabbedConfigurationPage(doc, tqparent, name) { m_headersPage = new HeadersConfigurationPage(this, doc); addTab(m_headersPage, i18n("Headers")); @@ -126,42 +126,42 @@ DocumentMetaConfigurationPage::DocumentMetaConfigurationPage(RosegardenGUIDoc *d } TQFrame *frame = new TQFrame(m_tabWidget); - TQGridLayout *layout = new TQGridLayout(frame, + TQGridLayout *tqlayout = new TQGridLayout(frame, 6, 2, 10, 5); - layout->addWidget(new TQLabel(i18n("Filename:"), frame), 0, 0); - layout->addWidget(new TQLabel(doc->getTitle(), frame), 0, 1); + tqlayout->addWidget(new TQLabel(i18n("Filename:"), frame), 0, 0); + tqlayout->addWidget(new TQLabel(doc->getTitle(), frame), 0, 1); - layout->addWidget(new TQLabel(i18n("Formal duration (to end marker):"), frame), 1, 0); + tqlayout->addWidget(new TQLabel(i18n("Formal duration (to end marker):"), frame), 1, 0); timeT d = comp.getEndMarker(); RealTime rtd = comp.getElapsedRealTime(d); - layout->addWidget(new TQLabel(durationToString(comp, 0, d, rtd), frame), 1, 1); + tqlayout->addWidget(new TQLabel(durationToString(comp, 0, d, rtd), frame), 1, 1); - layout->addWidget(new TQLabel(i18n("Playing duration:"), frame), 2, 0); + tqlayout->addWidget(new TQLabel(i18n("Playing duration:"), frame), 2, 0); d = comp.getDuration(); rtd = comp.getElapsedRealTime(d); - layout->addWidget(new TQLabel(durationToString(comp, 0, d, rtd), frame), 2, 1); + tqlayout->addWidget(new TQLabel(durationToString(comp, 0, d, rtd), frame), 2, 1); - layout->addWidget(new TQLabel(i18n("Tracks:"), frame), 3, 0); - layout->addWidget(new TQLabel(i18n("%1 used, %2 total") - .arg(usedTracks.size()) - .arg(comp.getNbTracks()), + tqlayout->addWidget(new TQLabel(i18n("Tracks:"), frame), 3, 0); + tqlayout->addWidget(new TQLabel(i18n("%1 used, %2 total") + .tqarg(usedTracks.size()) + .tqarg(comp.getNbTracks()), frame), 3, 1); - layout->addWidget(new TQLabel(i18n("Segments:"), frame), 4, 0); - layout->addWidget(new TQLabel(i18n("%1 MIDI, %2 audio, %3 total") - .arg(internalSegments) - .arg(audioSegments) - .arg(internalSegments + audioSegments), + tqlayout->addWidget(new TQLabel(i18n("Segments:"), frame), 4, 0); + tqlayout->addWidget(new TQLabel(i18n("%1 MIDI, %2 audio, %3 total") + .tqarg(internalSegments) + .tqarg(audioSegments) + .tqarg(internalSegments + audioSegments), frame), 4, 1); - layout->setRowStretch(5, 2); + tqlayout->setRowStretch(5, 2); addTab(frame, i18n("Statistics")); frame = new TQFrame(m_tabWidget); - layout = new TQGridLayout(frame, 1, 1, 10, 5); + tqlayout = new TQGridLayout(frame, 1, 1, 10, 5); TQTable *table = new TQTable(1, 11, frame, "Segment Table"); table->setSelectionMode(TQTable::NoSelection); @@ -205,7 +205,7 @@ DocumentMetaConfigurationPage::DocumentMetaConfigurationPage(RosegardenGUIDoc *d table->setItem(i, 1, new SegmentDataItem (table, - TQString("%1").arg(s->getTrack() + 1))); + TQString("%1").tqarg(s->getTrack() + 1))); TQPixmap colourPixmap(16, 16); Colour colour = @@ -219,11 +219,11 @@ DocumentMetaConfigurationPage::DocumentMetaConfigurationPage(RosegardenGUIDoc *d table->setItem(i, 3, new SegmentDataItem (table, - TQString("%1").arg(s->getStartTime()))); + TQString("%1").tqarg(s->getStartTime()))); table->setItem(i, 4, new SegmentDataItem (table, - TQString("%1").arg(s->getEndMarkerTime() - + TQString("%1").tqarg(s->getEndMarkerTime() - s->getStartTime()))); std::set<long> notesOn; @@ -254,11 +254,11 @@ DocumentMetaConfigurationPage::DocumentMetaConfigurationPage(RosegardenGUIDoc *d table->setItem(i, 5, new SegmentDataItem (table, - TQString("%1").arg(events))); + TQString("%1").tqarg(events))); table->setItem(i, 6, new SegmentDataItem (table, - TQString("%1").arg(maxPoly))); + TQString("%1").tqarg(maxPoly))); table->setItem(i, 7, new SegmentDataItem (table, @@ -280,16 +280,16 @@ DocumentMetaConfigurationPage::DocumentMetaConfigurationPage(RosegardenGUIDoc *d table->setItem(i, 9, new SegmentDataItem (table, - TQString("%1").arg(s->getTranspose()))); + TQString("%1").tqarg(s->getTranspose()))); if (s->getDelay() != 0) { if (s->getRealTimeDelay() != RealTime::zeroTime) { table->setItem(i, 10, new SegmentDataItem (table, TQString("%1 + %2 ms") - .arg(NotationStrings::makeNoteMenuLabel + .tqarg(NotationStrings::makeNoteMenuLabel (s->getDelay(), true, discard, false)) - .arg(s->getRealTimeDelay().sec * 1000 + + .tqarg(s->getRealTimeDelay().sec * 1000 + s->getRealTimeDelay().msec()))); } else { table->setItem(i, 10, new SegmentDataItem @@ -301,7 +301,7 @@ DocumentMetaConfigurationPage::DocumentMetaConfigurationPage(RosegardenGUIDoc *d table->setItem(i, 10, new SegmentDataItem (table, TQString("%2 ms") - .arg(s->getRealTimeDelay().sec * 1000 + + .tqarg(s->getRealTimeDelay().sec * 1000 + s->getRealTimeDelay().msec()))); } else { table->setItem(i, 10, new SegmentDataItem @@ -312,7 +312,7 @@ DocumentMetaConfigurationPage::DocumentMetaConfigurationPage(RosegardenGUIDoc *d ++i; } - layout->addWidget(table, 0, 0); + tqlayout->addWidget(table, 0, 0); addTab(frame, i18n("Segment Summary")); diff --git a/src/gui/configuration/DocumentMetaConfigurationPage.h b/src/gui/configuration/DocumentMetaConfigurationPage.h index 7a18bf6..7fa375a 100644 --- a/src/gui/configuration/DocumentMetaConfigurationPage.h +++ b/src/gui/configuration/DocumentMetaConfigurationPage.h @@ -49,9 +49,10 @@ class HeadersConfigurationPage; class DocumentMetaConfigurationPage : public TabbedConfigurationPage { Q_OBJECT + TQ_OBJECT public: DocumentMetaConfigurationPage(RosegardenGUIDoc *doc, - TQWidget *parent = 0, const char *name = 0); + TQWidget *tqparent = 0, const char *name = 0); virtual void apply(); static TQString iconLabel() { return i18n("About"); } diff --git a/src/gui/configuration/GeneralConfigurationPage.cpp b/src/gui/configuration/GeneralConfigurationPage.cpp index d6c850e..763f077 100644 --- a/src/gui/configuration/GeneralConfigurationPage.cpp +++ b/src/gui/configuration/GeneralConfigurationPage.cpp @@ -59,8 +59,8 @@ namespace Rosegarden GeneralConfigurationPage::GeneralConfigurationPage(RosegardenGUIDoc *doc, KConfig *cfg, - TQWidget *parent, const char *name) - : TabbedConfigurationPage(cfg, parent, name), + TQWidget *tqparent, const char *name) + : TabbedConfigurationPage(cfg, tqparent, name), m_doc(doc), m_client(0), m_countIn(0), @@ -69,7 +69,7 @@ GeneralConfigurationPage::GeneralConfigurationPage(RosegardenGUIDoc *doc, m_cfg->setGroup(GeneralOptionsConfigGroup); TQFrame *frame; - TQGridLayout *layout; + TQGridLayout *tqlayout; TQLabel *label = 0; int row = 0; @@ -77,14 +77,14 @@ GeneralConfigurationPage::GeneralConfigurationPage(RosegardenGUIDoc *doc, // "Behavior" tab // frame = new TQFrame(m_tabWidget); - layout = new TQGridLayout(frame, + tqlayout = new TQGridLayout(frame, 6, 2, // nbrow, nbcol 10, 5); - layout->setRowSpacing(row, 15); + tqlayout->setRowSpacing(row, 15); ++row; - layout->addWidget(new TQLabel(i18n("Double-click opens segment in"), + tqlayout->addWidget(new TQLabel(i18n("Double-click opens segment in"), frame), row, 0); m_client = new KComboBox(frame); @@ -93,20 +93,20 @@ GeneralConfigurationPage::GeneralConfigurationPage(RosegardenGUIDoc *doc, m_client->insertItem(i18n("Event List editor")); m_client->setCurrentItem(m_cfg->readUnsignedNumEntry("doubleclickclient", NotationView)); - layout->addMultiCellWidget(m_client, row, row, 1, 2); + tqlayout->addMultiCellWidget(m_client, row, row, 1, 2); ++row; - layout->addWidget(new TQLabel(i18n("Number of count-in measures when recording"), + tqlayout->addWidget(new TQLabel(i18n("Number of count-in measures when recording"), frame), row, 0); m_countIn = new TQSpinBox(frame); m_countIn->setValue(m_cfg->readUnsignedNumEntry("countinbars", 0)); m_countIn->setMaxValue(10); m_countIn->setMinValue(0); - layout->addMultiCellWidget(m_countIn, row, row, 1, 2); + tqlayout->addMultiCellWidget(m_countIn, row, row, 1, 2); ++row; - layout->addWidget(new TQLabel(i18n("Auto-save interval"), frame), row, 0); + tqlayout->addWidget(new TQLabel(i18n("Auto-save interval"), frame), row, 0); m_autoSave = new KComboBox(frame); m_autoSave->insertItem(i18n("Every 30 seconds")); @@ -129,7 +129,7 @@ GeneralConfigurationPage::GeneralConfigurationPage(RosegardenGUIDoc *doc, m_autoSave->setCurrentItem(3); } - layout->addMultiCellWidget(m_autoSave, row, row, 1, 2); + tqlayout->addMultiCellWidget(m_autoSave, row, row, 1, 2); ++row; // JACK Transport @@ -138,10 +138,10 @@ GeneralConfigurationPage::GeneralConfigurationPage(RosegardenGUIDoc *doc, m_cfg->setGroup(SequencerOptionsConfigGroup); label = new TQLabel(i18n("Use JACK transport"), frame); - layout->addWidget(label, row, 0); + tqlayout->addWidget(label, row, 0); m_jackTransport = new TQCheckBox(frame); - layout->addMultiCellWidget(m_jackTransport, row, row, 1, 2); + tqlayout->addMultiCellWidget(m_jackTransport, row, row, 1, 2); // m_jackTransport->insertItem(i18n("Ignore JACK transport")); // m_jackTransport->insertItem(i18n("Sync")); @@ -165,16 +165,16 @@ GeneralConfigurationPage::GeneralConfigurationPage(RosegardenGUIDoc *doc, m_cfg->setGroup(GeneralOptionsConfigGroup); #endif - layout->setRowSpacing(row, 20); + tqlayout->setRowSpacing(row, 20); ++row; - layout->addWidget(new TQLabel(i18n("Sequencer status"), frame), row, 0); + tqlayout->addWidget(new TQLabel(i18n("Sequencer status"), frame), row, 0); TQString status(i18n("Unknown")); SequenceManager *mgr = doc->getSequenceManager(); if (mgr) { - int driverStatus = mgr->getSoundDriverStatus() & (AUDIO_OK | MIDI_OK); - switch (driverStatus) { + int drivertqStatus = mgr->getSoundDrivertqStatus() & (AUDIO_OK | MIDI_OK); + switch (drivertqStatus) { case AUDIO_OK: status = i18n("No MIDI, audio OK"); break; @@ -190,16 +190,16 @@ GeneralConfigurationPage::GeneralConfigurationPage(RosegardenGUIDoc *doc, } } - layout->addWidget(new TQLabel(status, frame), row, 1); + tqlayout->addWidget(new TQLabel(status, frame), row, 1); TQPushButton *showStatusButton = new TQPushButton(i18n("Details..."), frame); TQObject::connect(showStatusButton, TQT_SIGNAL(clicked()), - this, TQT_SLOT(slotShowStatus())); - layout->addWidget(showStatusButton, row, 2, Qt::AlignRight); + this, TQT_SLOT(slotShowtqStatus())); + tqlayout->addWidget(showStatusButton, row, 2, TQt::AlignRight); ++row; - layout->setRowStretch(row, 10); + tqlayout->setRowStretch(row, 10); addTab(frame, i18n("Behavior")); @@ -207,16 +207,16 @@ GeneralConfigurationPage::GeneralConfigurationPage(RosegardenGUIDoc *doc, // "Appearance" tab // frame = new TQFrame(m_tabWidget); - layout = new TQGridLayout(frame, - 7, 4, // nbrow, nbcol -- one extra row improves layout + tqlayout = new TQGridLayout(frame, + 7, 4, // nbrow, nbcol -- one extra row improves tqlayout 10, 5); row = 0; - layout->setRowSpacing(row, 15); + tqlayout->setRowSpacing(row, 15); ++row; - layout->addWidget(new TQLabel(i18n("Side-bar parameter box layout"), + tqlayout->addWidget(new TQLabel(i18n("Side-bar parameter box tqlayout"), frame), row, 0); m_sidebarStyle = new KComboBox(frame); @@ -227,38 +227,38 @@ GeneralConfigurationPage::GeneralConfigurationPage(RosegardenGUIDoc *doc, m_sidebarStyle->setCurrentItem(m_cfg->readUnsignedNumEntry("sidebarstyle", 0)); - layout->addMultiCellWidget(m_sidebarStyle, row, row, 1, 3); + tqlayout->addMultiCellWidget(m_sidebarStyle, row, row, 1, 3); ++row; - layout->addWidget(new TQLabel(i18n("Note name style"), + tqlayout->addWidget(new TQLabel(i18n("Note name style"), frame), row, 0); m_nameStyle = new KComboBox(frame); m_nameStyle->insertItem(i18n("Always use US names (e.g. quarter, 8th)")); m_nameStyle->insertItem(i18n("Localized (where available)")); m_nameStyle->setCurrentItem(m_cfg->readUnsignedNumEntry("notenamestyle", Local)); - layout->addMultiCellWidget(m_nameStyle, row, row, 1, 3); + tqlayout->addMultiCellWidget(m_nameStyle, row, row, 1, 3); ++row; /* - layout->addWidget(new TQLabel(i18n("Show tool context help in status bar"), frame), row, 0); + tqlayout->addWidget(new TQLabel(i18n("Show tool context help in status bar"), frame), row, 0); m_toolContextHelp = new TQCheckBox(frame); - layout->addWidget(m_toolContextHelp, row, 1); + tqlayout->addWidget(m_toolContextHelp, row, 1); m_toolContextHelp->setChecked(m_cfg->readBoolEntry ("toolcontexthelp", true)); ++row; */ - layout->addWidget(new TQLabel(i18n("Show textured background on"), frame), row, 0); + tqlayout->addWidget(new TQLabel(i18n("Show textured background on"), frame), row, 0); m_backgroundTextures = new TQCheckBox(i18n("Main window"), frame); - layout->addWidget(m_backgroundTextures, row, 1); + tqlayout->addWidget(m_backgroundTextures, row, 1); m_matrixBackgroundTextures = new TQCheckBox(i18n("Matrix"), frame); - layout->addWidget(m_matrixBackgroundTextures, row, 2); + tqlayout->addWidget(m_matrixBackgroundTextures, row, 2); m_notationBackgroundTextures = new TQCheckBox(i18n("Notation"), frame); - layout->addWidget(m_notationBackgroundTextures, row, 3); + tqlayout->addWidget(m_notationBackgroundTextures, row, 3); m_backgroundTextures->setChecked(m_cfg->readBoolEntry ("backgroundtextures", true)); @@ -272,24 +272,24 @@ GeneralConfigurationPage::GeneralConfigurationPage(RosegardenGUIDoc *doc, m_cfg->setGroup(GeneralOptionsConfigGroup); ++row; - layout->addWidget(new TQLabel(i18n("Use bundled Klearlook theme"), frame), row, 0); + tqlayout->addWidget(new TQLabel(i18n("Use bundled Klearlook theme"), frame), row, 0); m_globalStyle = new KComboBox(frame); m_globalStyle->insertItem(i18n("Never")); m_globalStyle->insertItem(i18n("When not running under KDE")); m_globalStyle->insertItem(i18n("Always")); m_globalStyle->setCurrentItem(m_cfg->readUnsignedNumEntry("Install Own Theme", 1)); - layout->addMultiCellWidget(m_globalStyle, row, row, 1, 3); + tqlayout->addMultiCellWidget(m_globalStyle, row, row, 1, 3); ++row; - layout->setRowStretch(row, 10); + tqlayout->setRowStretch(row, 10); addTab(frame, i18n("Presentation")); } void -GeneralConfigurationPage::slotShowStatus() +GeneralConfigurationPage::slotShowtqStatus() { ShowSequencerStatusDialog dialog(this); dialog.exec(); diff --git a/src/gui/configuration/GeneralConfigurationPage.h b/src/gui/configuration/GeneralConfigurationPage.h index 0c6b74c..a51d079 100644 --- a/src/gui/configuration/GeneralConfigurationPage.h +++ b/src/gui/configuration/GeneralConfigurationPage.h @@ -54,6 +54,7 @@ class RosegardenGUIDoc; class GeneralConfigurationPage : public TabbedConfigurationPage { Q_OBJECT + TQ_OBJECT public: enum DoubleClickClient @@ -71,7 +72,7 @@ public: GeneralConfigurationPage(RosegardenGUIDoc *doc, KConfig *cfg, - TQWidget *parent=0, const char *name=0); + TQWidget *tqparent=0, const char *name=0); virtual void apply(); @@ -84,7 +85,7 @@ signals: void updateSidebarStyle(unsigned int); protected slots: - void slotShowStatus(); + void slotShowtqStatus(); protected: int getCountInSpin() { return m_countIn->value(); } diff --git a/src/gui/configuration/HeadersConfigurationPage.cpp b/src/gui/configuration/HeadersConfigurationPage.cpp index 54ec010..919d75f 100644 --- a/src/gui/configuration/HeadersConfigurationPage.cpp +++ b/src/gui/configuration/HeadersConfigurationPage.cpp @@ -50,20 +50,20 @@ namespace Rosegarden { -HeadersConfigurationPage::HeadersConfigurationPage(TQWidget *parent, +HeadersConfigurationPage::HeadersConfigurationPage(TQWidget *tqparent, RosegardenGUIDoc *doc) : - TQVBox(parent), + TQVBox(tqparent), m_doc(doc) { // // LilyPond export: Printable headers // - TQGroupBox *headersBox = new QGroupBox - (1, Horizontal, + TQGroupBox *headersBox = new TQGroupBox + (1, Qt::Horizontal, i18n("Printable headers"), this); TQFrame *frameHeaders = new TQFrame(headersBox); - TQGridLayout *layoutHeaders = new TQGridLayout(frameHeaders, 10, 6, 10, 5); + TQGridLayout *tqlayoutHeaders = new TQGridLayout(frameHeaders, 10, 6, 10, 5); // grab user headers from metadata Configuration metadata = (&m_doc->getComposition())->getMetadata(); @@ -141,9 +141,9 @@ HeadersConfigurationPage::HeadersConfigurationPage(TQWidget *parent, } // editHeader->setReadOnly( true ); - editHeader->setAlignment( (col == 0 ? Qt::AlignLeft : (col >= 3 ? Qt::AlignRight : Qt::AlignCenter) )); + editHeader->tqsetAlignment( (col == 0 ? TQt::AlignLeft : (col >= 3 ? TQt::AlignRight : TQt::AlignCenter) )); - layoutHeaders->addMultiCellWidget(editHeader, row, row, col, col+(width-1) ); + tqlayoutHeaders->addMultiCellWidget(editHeader, row, row, col, col+(width-1) ); // // ToolTips @@ -153,8 +153,8 @@ HeadersConfigurationPage::HeadersConfigurationPage(TQWidget *parent, shown.insert(key); } TQLabel *separator = new TQLabel(i18n("The composition comes here."), frameHeaders); - separator->setAlignment( Qt::AlignCenter ); - layoutHeaders->addMultiCellWidget(separator, 7, 7, 1, 4 ); + separator->tqsetAlignment( TQt::AlignCenter ); + tqlayoutHeaders->addMultiCellWidget(separator, 7, 7, 1, 4 ); // // LilyPond export: Non-printable headers @@ -177,7 +177,7 @@ HeadersConfigurationPage::HeadersConfigurationPage(TQWidget *parent, otherHeadersBox->setFont(font); otherHeadersBox->setWidget(frameOtherHeaders); - TQGridLayout *layoutOtherHeaders = new TQGridLayout(frameOtherHeaders, 2, 2, 10, 5); + TQGridLayout *tqlayoutOtherHeaders = new TQGridLayout(frameOtherHeaders, 2, 2, 10, 5); m_metadata = new KListView(frameOtherHeaders); m_metadata->addColumn(i18n("Name")); @@ -208,15 +208,15 @@ HeadersConfigurationPage::HeadersConfigurationPage(TQWidget *parent, shown.insert(names[i]); } - layoutOtherHeaders->addMultiCellWidget(m_metadata, 0, 0, 0, 1); + tqlayoutOtherHeaders->addMultiCellWidget(m_metadata, 0, 0, 0, 1); TQPushButton* addPropButton = new TQPushButton(i18n("Add New Property"), frameOtherHeaders); - layoutOtherHeaders->addWidget(addPropButton, 1, 0, Qt::AlignHCenter); + tqlayoutOtherHeaders->addWidget(addPropButton, 1, 0, TQt::AlignHCenter); TQPushButton* deletePropButton = new TQPushButton(i18n("Delete Property"), frameOtherHeaders); - layoutOtherHeaders->addWidget(deletePropButton, 1, 1, Qt::AlignHCenter); + tqlayoutOtherHeaders->addWidget(deletePropButton, 1, 1, TQt::AlignHCenter); connect(addPropButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotAddNewProperty())); @@ -233,9 +233,9 @@ HeadersConfigurationPage::slotAddNewProperty() while (1) { propertyName = - (i > 0 ? i18n("{new property %1}").arg(i) : i18n("{new property}")); + (i > 0 ? i18n("{new property %1}").tqarg(i) : i18n("{new property}")); if (!m_doc->getComposition().getMetadata().has(qstrtostr(propertyName)) && - m_metadata->findItem(qstrtostr(propertyName),0) == 0) + m_metadata->tqfindItem(propertyName,0) == 0) break; ++i; } diff --git a/src/gui/configuration/HeadersConfigurationPage.h b/src/gui/configuration/HeadersConfigurationPage.h index 496bb92..4b90b0e 100644 --- a/src/gui/configuration/HeadersConfigurationPage.h +++ b/src/gui/configuration/HeadersConfigurationPage.h @@ -38,12 +38,13 @@ namespace Rosegarden class RosegardenGUIDoc; -class HeadersConfigurationPage : public QVBox +class HeadersConfigurationPage : public TQVBox { Q_OBJECT + TQ_OBJECT public: - HeadersConfigurationPage(TQWidget *parent = 0, + HeadersConfigurationPage(TQWidget *tqparent = 0, RosegardenGUIDoc *doc = 0); public slots: diff --git a/src/gui/configuration/LatencyConfigurationPage.cpp b/src/gui/configuration/LatencyConfigurationPage.cpp index 4ac9390..489bcaf 100644 --- a/src/gui/configuration/LatencyConfigurationPage.cpp +++ b/src/gui/configuration/LatencyConfigurationPage.cpp @@ -45,9 +45,9 @@ namespace Rosegarden LatencyConfigurationPage::LatencyConfigurationPage(RosegardenGUIDoc *doc, KConfig *cfg, - TQWidget *parent, + TQWidget *tqparent, const char *name) - : TabbedConfigurationPage(doc, cfg, parent, name) + : TabbedConfigurationPage(doc, cfg, tqparent, name) { // Configuration &config = doc->getConfiguration(); m_cfg->setGroup(LatencyOptionsConfigGroup); @@ -56,19 +56,19 @@ LatencyConfigurationPage::LatencyConfigurationPage(RosegardenGUIDoc *doc, #ifdef HAVE_LIBJACK frame = new TQFrame(m_tabWidget, i18n("JACK latency")); - layout = new TQGridLayout(frame, 6, 5, 10, 10); + tqlayout = new TQGridLayout(frame, 6, 5, 10, 10); - layout->addMultiCellWidget(new TQLabel(i18n("Use the \"Fetch JACK latencies\" button to discover the latency values set at\nthe sequencer. It's recommended that you use the returned values but it's also\npossible to override them manually using the sliders. Note that if you change\nyour JACK server parameters you should always fetch the latency values again.\nThe latency values will be stored by Rosegarden for use next time."), frame), + tqlayout->addMultiCellWidget(new TQLabel(i18n("Use the \"Fetch JACK latencies\" button to discover the latency values set at\nthe sequencer. It's recommended that you use the returned values but it's also\npossible to override them manually using the sliders. Note that if you change\nyour JACK server parameters you should always fetch the latency values again.\nThe latency values will be stored by Rosegarden for use next time."), frame), 0, 0, 0, 3); - layout->addWidget(new TQLabel(i18n("JACK playback latency (in ms)"), frame), 1, 0); - layout->addWidget(new TQLabel(i18n("JACK record latency (in ms)"), frame), 3, 0); + tqlayout->addWidget(new TQLabel(i18n("JACK playback latency (in ms)"), frame), 1, 0); + tqlayout->addWidget(new TQLabel(i18n("JACK record latency (in ms)"), frame), 3, 0); m_fetchLatencyValues = new TQPushButton(i18n("Fetch JACK latencies"), frame); - layout->addWidget(m_fetchLatencyValues, 1, 3); + tqlayout->addWidget(m_fetchLatencyValues, 1, 3); connect(m_fetchLatencyValues, TQT_SIGNAL(released()), TQT_SLOT(slotFetchLatencyValues())); @@ -80,19 +80,19 @@ LatencyConfigurationPage::LatencyConfigurationPage(RosegardenGUIDoc *doc, m_jackPlayback = new TQSlider(Horizontal, frame); m_jackPlayback->setTickmarks(TQSlider::Below); - layout->addMultiCellWidget(m_jackPlayback, 3, 3, 2, 3); + tqlayout->addMultiCellWidget(m_jackPlayback, 3, 3, 2, 3); - TQLabel *jackPlaybackLabel = new TQLabel(TQString("%1").arg(jackPlaybackValue), + TQLabel *jackPlaybackLabel = new TQLabel(TQString("%1").tqarg(jackPlaybackValue), frame); - layout->addWidget(jackPlaybackLabel, 2, 2, Qt::AlignHCenter); + tqlayout->addWidget(jackPlaybackLabel, 2, 2, TQt::AlignHCenter); connect(m_jackPlayback, TQT_SIGNAL(valueChanged(int)), jackPlaybackLabel, TQT_SLOT(setNum(int))); m_jackPlayback->setMinValue(0); - layout->addWidget(new TQLabel("0", frame), 3, 1, Qt::AlignRight); + tqlayout->addWidget(new TQLabel("0", frame), 3, 1, TQt::AlignRight); m_jackPlayback->setMaxValue(500); - layout->addWidget(new TQLabel("500", frame), 3, 4, Qt::AlignLeft); + tqlayout->addWidget(new TQLabel("500", frame), 3, 4, TQt::AlignLeft); m_jackPlayback->setValue(jackPlaybackValue); @@ -103,20 +103,20 @@ LatencyConfigurationPage::LatencyConfigurationPage(RosegardenGUIDoc *doc, m_jackRecord = new TQSlider(Horizontal, frame); m_jackRecord->setTickmarks(TQSlider::Below); - layout->addMultiCellWidget(m_jackRecord, 5, 5, 2, 3); + tqlayout->addMultiCellWidget(m_jackRecord, 5, 5, 2, 3); - TQLabel *jackRecordLabel = new TQLabel(TQString("%1").arg(jackRecordValue), + TQLabel *jackRecordLabel = new TQLabel(TQString("%1").tqarg(jackRecordValue), frame); - layout->addWidget(jackRecordLabel, 4, 2, Qt::AlignHCenter); + tqlayout->addWidget(jackRecordLabel, 4, 2, TQt::AlignHCenter); connect(m_jackRecord, TQT_SIGNAL(valueChanged(int)), jackRecordLabel, TQT_SLOT(setNum(int))); m_jackRecord->setMinValue(0); - layout->addWidget(new TQLabel("0", frame), 5, 1, Qt::AlignRight); + tqlayout->addWidget(new TQLabel("0", frame), 5, 1, TQt::AlignRight); m_jackRecord->setMaxValue(500); m_jackRecord->setValue(jackRecordValue); - layout->addWidget(new TQLabel("500", frame), 5, 4, Qt::AlignLeft); + tqlayout->addWidget(new TQLabel("500", frame), 5, 4, TQt::AlignLeft); addTab(frame, i18n("JACK Latency")); #endif // HAVE_LIBJACK diff --git a/src/gui/configuration/LatencyConfigurationPage.h b/src/gui/configuration/LatencyConfigurationPage.h index 7512214..efd7687 100644 --- a/src/gui/configuration/LatencyConfigurationPage.h +++ b/src/gui/configuration/LatencyConfigurationPage.h @@ -51,11 +51,12 @@ class RosegardenGUIDoc; class LatencyConfigurationPage : public TabbedConfigurationPage { Q_OBJECT + TQ_OBJECT public: LatencyConfigurationPage(RosegardenGUIDoc *doc, KConfig *cfg, - TQWidget *parent=0, const char *name=0); + TQWidget *tqparent=0, const char *name=0); virtual void apply(); diff --git a/src/gui/configuration/MIDIConfigurationPage.cpp b/src/gui/configuration/MIDIConfigurationPage.cpp index 80ccf6b..8a22e62 100644 --- a/src/gui/configuration/MIDIConfigurationPage.cpp +++ b/src/gui/configuration/MIDIConfigurationPage.cpp @@ -67,9 +67,9 @@ namespace Rosegarden MIDIConfigurationPage::MIDIConfigurationPage( RosegardenGUIDoc *doc, KConfig *cfg, - TQWidget *parent, + TQWidget *tqparent, const char *name): - TabbedConfigurationPage(cfg, parent, name), + TabbedConfigurationPage(cfg, tqparent, name), m_midiPitchOctave(0) { // set the document in the super class @@ -78,38 +78,38 @@ MIDIConfigurationPage::MIDIConfigurationPage( // ---------------- General tab ------------------ // TQFrame *frame = new TQFrame(m_tabWidget); - TQGridLayout *layout = new TQGridLayout(frame, 9, 4, 10, 5); + TQGridLayout *tqlayout = new TQGridLayout(frame, 9, 4, 10, 5); int row = 0; - layout->setRowSpacing(row, 15); + tqlayout->setRowSpacing(row, 15); ++row; TQLabel *label = 0; m_cfg->setGroup(GeneralOptionsConfigGroup); - layout->addMultiCellWidget(new TQLabel(i18n("Base octave number for MIDI pitch display"), + tqlayout->addMultiCellWidget(new TQLabel(i18n("Base octave number for MIDI pitch display"), frame), row, row, 0, 1); m_midiPitchOctave = new TQSpinBox(frame); m_midiPitchOctave->setMaxValue(10); m_midiPitchOctave->setMinValue( -10); m_midiPitchOctave->setValue(m_cfg->readNumEntry("midipitchoctave", -2)); - layout->addMultiCellWidget(m_midiPitchOctave, row, row, 2, 3); + tqlayout->addMultiCellWidget(m_midiPitchOctave, row, row, 2, 3); ++row; - layout->setRowSpacing(row, 20); + tqlayout->setRowSpacing(row, 20); ++row; m_cfg->setGroup(GeneralOptionsConfigGroup); - layout->addMultiCellWidget(new TQLabel(i18n("Always use default studio when loading files"), + tqlayout->addMultiCellWidget(new TQLabel(i18n("Always use default studio when loading files"), frame), row, row, 0, 1); m_studio = new TQCheckBox(frame); m_studio->setChecked(m_cfg->readBoolEntry("alwaysusedefaultstudio", false)); - layout->addWidget(m_studio, row, 2); + tqlayout->addWidget(m_studio, row, 2); ++row; // Send Controllers @@ -121,14 +121,14 @@ MIDIConfigurationPage::MIDIConfigurationPage( TQString controllerTip = i18n("Rosegarden can send all MIDI Controllers (Pan, Reverb etc) to all MIDI devices every\ntime you hit play if you so wish. Please note that this option will usually incur a\ndelay at the start of playback due to the amount of data being transmitted."); TQToolTip::add (label, controllerTip); - layout->addMultiCellWidget(label, row, row, 0, 1); + tqlayout->addMultiCellWidget(label, row, row, 0, 1); m_sendControllersAtPlay = new TQCheckBox(frame); bool sendControllers = m_cfg->readBoolEntry("alwayssendcontrollers", false); m_sendControllersAtPlay->setChecked(sendControllers); TQToolTip::add (m_sendControllersAtPlay, controllerTip); - layout->addWidget(m_sendControllersAtPlay, row, 2); + tqlayout->addWidget(m_sendControllersAtPlay, row, 2); ++row; // Timer selection @@ -136,10 +136,10 @@ MIDIConfigurationPage::MIDIConfigurationPage( m_cfg->setGroup(SequencerOptionsConfigGroup); label = new TQLabel(i18n("Sequencer timing source"), frame); - layout->addMultiCellWidget(label, row, row, 0, 1); + tqlayout->addMultiCellWidget(label, row, row, 0, 1); m_timer = new KComboBox(frame); - layout->addMultiCellWidget(m_timer, row, row, 2, 3); + tqlayout->addMultiCellWidget(m_timer, row, row, 2, 3); TQStringList timers = m_doc->getTimers(); m_origTimer = m_doc->getCurrentTimer(); @@ -153,7 +153,7 @@ MIDIConfigurationPage::MIDIConfigurationPage( ++row; - layout->setRowSpacing(row, 20); + tqlayout->setRowSpacing(row, 20); ++row; m_cfg->setGroup(SequencerOptionsConfigGroup); @@ -163,25 +163,25 @@ MIDIConfigurationPage::MIDIConfigurationPage( TQLabel* lbl = new TQLabel(i18n("Load SoundFont to SoundBlaster card at startup"), frame); TQString tooltip = i18n("Check this box to enable soundfont loading on EMU10K-based cards when Rosegarden is launched"); TQToolTip::add(lbl, tooltip); - layout->addMultiCellWidget(lbl, row, row, 0, 1); + tqlayout->addMultiCellWidget(lbl, row, row, 0, 1); m_sfxLoadEnabled = new TQCheckBox(frame); - layout->addWidget(m_sfxLoadEnabled, row, 2); + tqlayout->addWidget(m_sfxLoadEnabled, row, 2); TQToolTip::add(m_sfxLoadEnabled, tooltip); ++row; - layout->addWidget(new TQLabel(i18n("Path to 'asfxload' or 'sfxload' command"), frame), row, 0); + tqlayout->addWidget(new TQLabel(i18n("Path to 'asfxload' or 'sfxload' command"), frame), row, 0); m_sfxLoadPath = new TQLineEdit(m_cfg->readEntry("sfxloadpath", "/bin/sfxload"), frame); - layout->addMultiCellWidget(m_sfxLoadPath, row, row, 1, 2); + tqlayout->addMultiCellWidget(m_sfxLoadPath, row, row, 1, 2); m_sfxLoadChoose = new TQPushButton("Choose...", frame); - layout->addWidget(m_sfxLoadChoose, row, 3); + tqlayout->addWidget(m_sfxLoadChoose, row, 3); ++row; - layout->addWidget(new TQLabel(i18n("SoundFont"), frame), row, 0); + tqlayout->addWidget(new TQLabel(i18n("SoundFont"), frame), row, 0); m_soundFontPath = new TQLineEdit(m_cfg->readEntry("soundfontpath", ""), frame); - layout->addMultiCellWidget(m_soundFontPath, row, row, 1, 2); + tqlayout->addMultiCellWidget(m_soundFontPath, row, row, 1, 2); m_soundFontChoose = new TQPushButton("Choose...", frame); - layout->addWidget(m_soundFontChoose, row, 3); + tqlayout->addWidget(m_soundFontChoose, row, 3); ++row; bool sfxLoadEnabled = m_cfg->readBoolEntry("sfxloadenabled", false); @@ -202,7 +202,7 @@ MIDIConfigurationPage::MIDIConfigurationPage( connect(m_soundFontChoose, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotSoundFontChoose())); - layout->setRowStretch(row, 10); + tqlayout->setRowStretch(row, 10); addTab(frame, i18n("General")); @@ -211,19 +211,19 @@ MIDIConfigurationPage::MIDIConfigurationPage( // -------------- Synchronisation tab ----------------- // frame = new TQFrame(m_tabWidget); - layout = new TQGridLayout(frame, 7, 2, 10, 5); + tqlayout = new TQGridLayout(frame, 7, 2, 10, 5); row = 0; - layout->setRowSpacing(row, 15); + tqlayout->setRowSpacing(row, 15); ++row; // MIDI Clock and System Realtime Messages // label = new TQLabel(i18n("MIDI Clock and System messages"), frame); - layout->addWidget(label, row, 0); + tqlayout->addWidget(label, row, 0); m_midiSync = new KComboBox(frame); - layout->addWidget(m_midiSync, row, 1); + tqlayout->addWidget(m_midiSync, row, 1); m_midiSync->insertItem(i18n("Off")); m_midiSync->insertItem(i18n("Send MIDI Clock, Start and Stop")); @@ -239,10 +239,10 @@ MIDIConfigurationPage::MIDIConfigurationPage( // MMC Transport // label = new TQLabel(i18n("MIDI Machine Control mode"), frame); - layout->addWidget(label, row, 0); + tqlayout->addWidget(label, row, 0); m_mmcTransport = new KComboBox(frame); - layout->addWidget(m_mmcTransport, row, 1); //, Qt::AlignHCenter); + tqlayout->addWidget(m_mmcTransport, row, 1); //, TQt::AlignHCenter); m_mmcTransport->insertItem(i18n("Off")); m_mmcTransport->insertItem(i18n("MMC Master")); @@ -258,10 +258,10 @@ MIDIConfigurationPage::MIDIConfigurationPage( // MTC transport // label = new TQLabel(i18n("MIDI Time Code mode"), frame); - layout->addWidget(label, row, 0); + tqlayout->addWidget(label, row, 0); m_mtcTransport = new KComboBox(frame); - layout->addWidget(m_mtcTransport, row, 1); + tqlayout->addWidget(m_mtcTransport, row, 1); m_mtcTransport->insertItem(i18n("Off")); m_mtcTransport->insertItem(i18n("MTC Master")); @@ -276,18 +276,18 @@ MIDIConfigurationPage::MIDIConfigurationPage( TQHBox *hbox = new TQHBox(frame); hbox->setSpacing(5); - layout->addMultiCellWidget(hbox, row, row, 0, 1); + tqlayout->addMultiCellWidget(hbox, row, row, 0, 1); label = new TQLabel(i18n("Automatically connect sync output to all devices in use"), hbox); -// layout->addWidget(label, row, 0); +// tqlayout->addWidget(label, row, 0); m_midiSyncAuto = new TQCheckBox(hbox); -// layout->addWidget(m_midiSyncAuto, row, 1); +// tqlayout->addWidget(m_midiSyncAuto, row, 1); m_midiSyncAuto->setChecked(m_cfg->readBoolEntry("midisyncautoconnect", false)); ++row; - layout->setRowStretch(row, 10); + tqlayout->setRowStretch(row, 10); addTab(frame, i18n("MIDI Sync")); } @@ -305,7 +305,7 @@ MIDIConfigurationPage::slotSoundFontToggled(bool isChecked) void MIDIConfigurationPage::slotSfxLoadPathChoose() { - TQString path = KFileDialog::getOpenFileName(":SFXLOAD", TQString::null, this, i18n("sfxload path")); + TQString path = KFileDialog::getOpenFileName(":SFXLOAD", TQString(), this, i18n("sfxload path")); m_sfxLoadPath->setText(path); } diff --git a/src/gui/configuration/MIDIConfigurationPage.h b/src/gui/configuration/MIDIConfigurationPage.h index 43a29d9..f3b953f 100644 --- a/src/gui/configuration/MIDIConfigurationPage.h +++ b/src/gui/configuration/MIDIConfigurationPage.h @@ -51,10 +51,11 @@ class RosegardenGUIDoc; class MIDIConfigurationPage : public TabbedConfigurationPage { Q_OBJECT + TQ_OBJECT public: MIDIConfigurationPage(RosegardenGUIDoc *doc, KConfig *cfg, - TQWidget *parent=0, + TQWidget *tqparent=0, const char *name=0); virtual void apply(); diff --git a/src/gui/configuration/MatrixConfigurationPage.cpp b/src/gui/configuration/MatrixConfigurationPage.cpp index c996922..db4eb85 100644 --- a/src/gui/configuration/MatrixConfigurationPage.cpp +++ b/src/gui/configuration/MatrixConfigurationPage.cpp @@ -43,18 +43,18 @@ namespace Rosegarden { MatrixConfigurationPage::MatrixConfigurationPage(KConfig *cfg, - TQWidget *parent, + TQWidget *tqparent, const char *name) : - TabbedConfigurationPage(cfg, parent, name) + TabbedConfigurationPage(cfg, tqparent, name) { m_cfg->setGroup(MatrixViewConfigGroup); TQFrame *frame = new TQFrame(m_tabWidget); - TQGridLayout *layout = new TQGridLayout(frame, + TQGridLayout *tqlayout = new TQGridLayout(frame, 4, 2, // nbrow, nbcol 10, 5); - layout->addWidget(new TQLabel("Nothing here yet", frame), 0, 0); + tqlayout->addWidget(new TQLabel("Nothing here yet", frame), 0, 0); addTab(frame, i18n("General")); } diff --git a/src/gui/configuration/MatrixConfigurationPage.h b/src/gui/configuration/MatrixConfigurationPage.h index 19e2104..849fc16 100644 --- a/src/gui/configuration/MatrixConfigurationPage.h +++ b/src/gui/configuration/MatrixConfigurationPage.h @@ -46,10 +46,11 @@ namespace Rosegarden class MatrixConfigurationPage : public TabbedConfigurationPage { Q_OBJECT + TQ_OBJECT public: MatrixConfigurationPage(KConfig *cfg, - TQWidget *parent = 0, const char *name=0); + TQWidget *tqparent = 0, const char *name=0); virtual void apply(); diff --git a/src/gui/configuration/NotationConfigurationPage.cpp b/src/gui/configuration/NotationConfigurationPage.cpp index c059cd9..c0b6f18 100644 --- a/src/gui/configuration/NotationConfigurationPage.cpp +++ b/src/gui/configuration/NotationConfigurationPage.cpp @@ -67,38 +67,38 @@ namespace Rosegarden { NotationConfigurationPage::NotationConfigurationPage(KConfig *cfg, - TQWidget *parent, + TQWidget *tqparent, const char *name) : - TabbedConfigurationPage(cfg, parent, name) + TabbedConfigurationPage(cfg, tqparent, name) { m_cfg->setGroup(NotationViewConfigGroup); TQFrame *frame; - TQGridLayout *layout; + TQGridLayout *tqlayout; frame = new TQFrame(m_tabWidget); - layout = new TQGridLayout(frame, 9, 3, 10, 5); + tqlayout = new TQGridLayout(frame, 9, 3, 10, 5); int row = 0; - layout->setRowSpacing(row, 15); + tqlayout->setRowSpacing(row, 15); ++row; - layout->addWidget(new TQLabel(i18n("Default layout mode"), frame), row, 0); + tqlayout->addWidget(new TQLabel(i18n("Default tqlayout mode"), frame), row, 0); - m_layoutMode = new KComboBox(frame); - m_layoutMode->setEditable(false); - m_layoutMode->insertItem(i18n("Linear layout")); - m_layoutMode->insertItem(i18n("Continuous page layout")); - m_layoutMode->insertItem(i18n("Multiple page layout")); - int defaultLayoutMode = m_cfg->readNumEntry("layoutmode", 0); + m_tqlayoutMode = new KComboBox(frame); + m_tqlayoutMode->setEditable(false); + m_tqlayoutMode->insertItem(i18n("Linear tqlayout")); + m_tqlayoutMode->insertItem(i18n("Continuous page tqlayout")); + m_tqlayoutMode->insertItem(i18n("Multiple page tqlayout")); + int defaultLayoutMode = m_cfg->readNumEntry("tqlayoutmode", 0); if (defaultLayoutMode >= 0 && defaultLayoutMode <= 2) { - m_layoutMode->setCurrentItem(defaultLayoutMode); + m_tqlayoutMode->setCurrentItem(defaultLayoutMode); } - layout->addMultiCellWidget(m_layoutMode, row, row, 1, 2); + tqlayout->addMultiCellWidget(m_tqlayoutMode, row, row, 1, 2); ++row; - layout->addWidget(new TQLabel(i18n("Default spacing"), frame), row, 0); + tqlayout->addWidget(new TQLabel(i18n("Default spacing"), frame), row, 0); m_spacing = new KComboBox(frame); m_spacing->setEditable(false); @@ -111,18 +111,18 @@ NotationConfigurationPage::NotationConfigurationPage(KConfig *cfg, TQString text("%1 %"); if (*i == 100) text = "%1 % (normal)"; - m_spacing->insertItem(text.arg(*i)); + m_spacing->insertItem(text.tqarg(*i)); if (*i == defaultSpacing) { m_spacing->setCurrentItem(m_spacing->count() - 1); } } - layout->addMultiCellWidget(m_spacing, row, row, 1, 2); + tqlayout->addMultiCellWidget(m_spacing, row, row, 1, 2); ++row; - layout->addWidget(new TQLabel(i18n("Default duration factor"), frame), row, 0); + tqlayout->addWidget(new TQLabel(i18n("Default duration factor"), frame), row, 0); m_proportion = new KComboBox(frame); m_proportion->setEditable(false); @@ -132,7 +132,7 @@ NotationConfigurationPage::NotationConfigurationPage(KConfig *cfg, for (std::vector<int>::iterator i = s.begin(); i != s.end(); ++i) { - TQString text = TQString("%1 %").arg(*i); + TQString text = TQString("%1 %").tqarg(*i); if (*i == 40) text = "40 % (normal)"; else if (*i == 0) @@ -146,10 +146,10 @@ NotationConfigurationPage::NotationConfigurationPage(KConfig *cfg, } } - layout->addMultiCellWidget(m_proportion, row, row, 1, 2); + tqlayout->addMultiCellWidget(m_proportion, row, row, 1, 2); ++row; - layout->addWidget(new TQLabel(i18n("Show track headers (linear layout only)"), + tqlayout->addWidget(new TQLabel(i18n("Show track headers (linear tqlayout only)"), frame), row, 0); m_showTrackHeaders = new KComboBox(frame); @@ -167,76 +167,76 @@ NotationConfigurationPage::NotationConfigurationPage(KConfig *cfg, "\"When needed\" means \"when staves are too many to all fit" " in the current window\""))); - layout->addMultiCellWidget(m_showTrackHeaders, row, row, 1, 2); + tqlayout->addMultiCellWidget(m_showTrackHeaders, row, row, 1, 2); ++row; - layout->setRowSpacing(row, 20); + tqlayout->setRowSpacing(row, 20); ++row; - layout->addMultiCellWidget - (new QLabel + tqlayout->addMultiCellWidget + (new TQLabel (i18n("Show non-notation events as question marks"), frame), row, row, 0, 1); m_showUnknowns = new TQCheckBox(frame); bool defaultShowUnknowns = m_cfg->readBoolEntry("showunknowns", false); m_showUnknowns->setChecked(defaultShowUnknowns); - layout->addWidget(m_showUnknowns, row, 2); + tqlayout->addWidget(m_showUnknowns, row, 2); ++row; - layout->addMultiCellWidget - (new QLabel + tqlayout->addMultiCellWidget + (new TQLabel (i18n("Show notation-quantized notes in a different color"), frame), row, row, 0, 1); m_colourQuantize = new TQCheckBox(frame); bool defaultColourQuantize = m_cfg->readBoolEntry("colourquantize", false); m_colourQuantize->setChecked(defaultColourQuantize); - layout->addWidget(m_colourQuantize, row, 2); + tqlayout->addWidget(m_colourQuantize, row, 2); ++row; - layout->addMultiCellWidget - (new QLabel + tqlayout->addMultiCellWidget + (new TQLabel (i18n("Show \"invisible\" events in grey"), frame), row, row, 0, 1); m_showInvisibles = new TQCheckBox(frame); bool defaultShowInvisibles = m_cfg->readBoolEntry("showinvisibles", true); m_showInvisibles->setChecked(defaultShowInvisibles); - layout->addWidget(m_showInvisibles, row, 2); + tqlayout->addWidget(m_showInvisibles, row, 2); ++row; - layout->addMultiCellWidget - (new QLabel + tqlayout->addMultiCellWidget + (new TQLabel (i18n("Show notes outside suggested playable range in red"), frame), row, row, 0, 1); m_showRanges = new TQCheckBox(frame); bool defaultShowRanges = m_cfg->readBoolEntry("showranges", true); m_showRanges->setChecked(defaultShowRanges); - layout->addWidget(m_showRanges, row, 2); + tqlayout->addWidget(m_showRanges, row, 2); ++row; - layout->addMultiCellWidget - (new QLabel + tqlayout->addMultiCellWidget + (new TQLabel (i18n("Highlight superimposed notes with a halo effect"), frame), row, row, 0, 1); m_showCollisions = new TQCheckBox(frame); bool defaultShowCollisions = m_cfg->readBoolEntry("showcollisions", true); m_showCollisions->setChecked(defaultShowCollisions); - layout->addWidget(m_showCollisions, row, 2); + tqlayout->addWidget(m_showCollisions, row, 2); ++row; - layout->setRowSpacing(row, 20); + tqlayout->setRowSpacing(row, 20); ++row; - layout->addMultiCellWidget - (new QLabel + tqlayout->addMultiCellWidget + (new TQLabel (i18n("When recording MIDI, split-and-tie long notes at barlines"), frame), row, row, 0, 1); m_splitAndTie = new TQCheckBox(frame); bool defaultSplitAndTie = m_cfg->readBoolEntry("quantizemakeviable", false); m_splitAndTie->setChecked(defaultSplitAndTie); - layout->addWidget(m_splitAndTie, row, 2); + tqlayout->addWidget(m_splitAndTie, row, 2); ++row; - layout->setRowStretch(row, 10); + tqlayout->setRowStretch(row, 10); addTab(frame, i18n("Layout")); @@ -244,18 +244,18 @@ NotationConfigurationPage::NotationConfigurationPage(KConfig *cfg, frame = new TQFrame(m_tabWidget); - layout = new TQGridLayout(frame, 6, 3, 10, 5); + tqlayout = new TQGridLayout(frame, 6, 3, 10, 5); row = 0; - layout->setRowSpacing(row, 15); + tqlayout->setRowSpacing(row, 15); ++row; - layout->addMultiCellWidget + tqlayout->addMultiCellWidget (new TQLabel(i18n("Default note style for new notes"), frame), row, row, 0, 1); - layout->setColStretch(2, 10); + tqlayout->setColStretch(2, 10); m_noteStyle = new KComboBox(frame); m_noteStyle->setEditable(false); @@ -269,21 +269,21 @@ NotationConfigurationPage::NotationConfigurationPage(KConfig *cfg, for (std::vector<NoteStyleName>::iterator i = styles.begin(); i != styles.end(); ++i) { - TQString styleQName(strtoqstr(*i)); - m_untranslatedNoteStyle.append(styleQName); - m_noteStyle->insertItem(i18n(styleQName.utf8())); - if (styleQName == defaultStyle) { + TQString styleTQName(strtoqstr(*i)); + m_untranslatedNoteStyle.append(styleTQName); + m_noteStyle->insertItem(i18n(styleTQName.utf8())); + if (styleTQName == defaultStyle) { m_noteStyle->setCurrentItem(m_noteStyle->count() - 1); } } - layout->addWidget(m_noteStyle, row, 2); + tqlayout->addWidget(m_noteStyle, row, 2); ++row; - layout->setRowSpacing(row, 20); + tqlayout->setRowSpacing(row, 20); ++row; - layout->addWidget + tqlayout->addWidget (new TQLabel(i18n("When inserting notes..."), frame), row, 0); int defaultInsertType = m_cfg->readNumEntry("inserttype", 0); @@ -295,36 +295,36 @@ NotationConfigurationPage::NotationConfigurationPage(KConfig *cfg, m_insertType->insertItem(i18n("Ignore existing durations")); m_insertType->setCurrentItem(defaultInsertType); - layout->addMultiCellWidget(m_insertType, row, row, 1, 2); + tqlayout->addMultiCellWidget(m_insertType, row, row, 1, 2); ++row; bool autoBeam = m_cfg->readBoolEntry("autobeam", true); - layout->addMultiCellWidget - (new QLabel + tqlayout->addMultiCellWidget + (new TQLabel (i18n("Auto-beam on insert when appropriate"), frame), row, row, 0, 1); m_autoBeam = new TQCheckBox(frame); m_autoBeam->setChecked(autoBeam); - layout->addMultiCellWidget(m_autoBeam, row, row, 2, 2); + tqlayout->addMultiCellWidget(m_autoBeam, row, row, 2, 2); ++row; bool collapse = m_cfg->readBoolEntry("collapse", false); - layout->addMultiCellWidget - (new QLabel + tqlayout->addMultiCellWidget + (new TQLabel (i18n("Collapse rests after erase"), frame), row, row, 0, 1); m_collapseRests = new TQCheckBox(frame); m_collapseRests->setChecked(collapse); - layout->addMultiCellWidget(m_collapseRests, row, row, 2, 2); + tqlayout->addMultiCellWidget(m_collapseRests, row, row, 2, 2); ++row; - layout->setRowSpacing(row, 20); + tqlayout->setRowSpacing(row, 20); ++row; - layout->addWidget + tqlayout->addWidget (new TQLabel(i18n("Default paste type"), frame), row, 0); m_pasteType = new KComboBox(frame); @@ -342,24 +342,24 @@ NotationConfigurationPage::NotationConfigurationPage(KConfig *cfg, } m_pasteType->setCurrentItem(defaultPasteType); - layout->addMultiCellWidget(m_pasteType, row, row, 1, 2); + tqlayout->addMultiCellWidget(m_pasteType, row, row, 1, 2); ++row; - layout->setRowStretch(row, 10); + tqlayout->setRowStretch(row, 10); addTab(frame, i18n("Editing")); frame = new TQFrame(m_tabWidget); - layout = new TQGridLayout(frame, 4, 2, 10, 5); + tqlayout = new TQGridLayout(frame, 4, 2, 10, 5); row = 0; - layout->setRowSpacing(row, 15); + tqlayout->setRowSpacing(row, 15); ++row; - layout->addWidget(new TQLabel(i18n("Accidentals in one octave..."), frame), row, 0); + tqlayout->addWidget(new TQLabel(i18n("Accidentals in one octave..."), frame), row, 0); m_accOctavePolicy = new KComboBox(frame); m_accOctavePolicy->insertItem(i18n("Affect only that octave")); m_accOctavePolicy->insertItem(i18n("Require cautionaries in other octaves")); @@ -368,10 +368,10 @@ NotationConfigurationPage::NotationConfigurationPage(KConfig *cfg, if (accOctaveMode >= 0 && accOctaveMode < 3) { m_accOctavePolicy->setCurrentItem(accOctaveMode); } - layout->addWidget(m_accOctavePolicy, row, 1); + tqlayout->addWidget(m_accOctavePolicy, row, 1); ++row; - layout->addWidget(new TQLabel(i18n("Accidentals in one bar..."), frame), row, 0); + tqlayout->addWidget(new TQLabel(i18n("Accidentals in one bar..."), frame), row, 0); m_accBarPolicy = new KComboBox(frame); m_accBarPolicy->insertItem(i18n("Affect only that bar")); m_accBarPolicy->insertItem(i18n("Require cautionary resets in following bar")); @@ -380,10 +380,10 @@ NotationConfigurationPage::NotationConfigurationPage(KConfig *cfg, if (accBarMode >= 0 && accBarMode < 3) { m_accBarPolicy->setCurrentItem(accBarMode); } - layout->addWidget(m_accBarPolicy, row, 1); + tqlayout->addWidget(m_accBarPolicy, row, 1); ++row; - layout->addWidget(new TQLabel(i18n("Key signature cancellation style"), frame), row, 0); + tqlayout->addWidget(new TQLabel(i18n("Key signature cancellation style"), frame), row, 0); m_keySigCancelMode = new KComboBox(frame); m_keySigCancelMode->insertItem(i18n("Cancel only when entering C major or A minor")); m_keySigCancelMode->insertItem(i18n("Cancel whenever removing sharps or flats")); @@ -392,10 +392,10 @@ NotationConfigurationPage::NotationConfigurationPage(KConfig *cfg, if (cancelMode >= 0 && cancelMode < 3) { m_keySigCancelMode->setCurrentItem(cancelMode); } - layout->addWidget(m_keySigCancelMode, row, 1); + tqlayout->addWidget(m_keySigCancelMode, row, 1); ++row; - layout->setRowStretch(row, 10); + tqlayout->setRowStretch(row, 10); addTab(frame, i18n("Accidentals")); @@ -431,25 +431,25 @@ NotationConfigurationPage::NotationConfigurationPage(KConfig *cfg, // TQFrame *mainFrame = new TQFrame(m_tabWidget); frame = new TQFrame(m_tabWidget); - layout = new TQGridLayout(frame, 2, 4, 10, 5); + tqlayout = new TQGridLayout(frame, 2, 4, 10, 5); // frame = new TQFrame(noteFontBox); -// layout = new TQGridLayout(frame, 5, 2, 10, 5); +// tqlayout = new TQGridLayout(frame, 5, 2, 10, 5); m_viewButton = 0; - layout->addWidget(new TQLabel(i18n("Notation font"), frame), 0, 0); + tqlayout->addWidget(new TQLabel(i18n("Notation font"), frame), 0, 0); m_font = new KComboBox(frame); #ifdef HAVE_XFT m_viewButton = new TQPushButton(i18n("View"), frame); - layout->addMultiCellWidget(m_font, row, row, 1, 2); - layout->addWidget(m_viewButton, row, 3); + tqlayout->addMultiCellWidget(m_font, row, row, 1, 2); + tqlayout->addWidget(m_viewButton, row, 3); TQObject::connect(m_viewButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotViewButtonPressed())); #else - layout->addMultiCellWidget(m_font, row, row, 1, 3); + tqlayout->addMultiCellWidget(m_font, row, row, 1, 3); #endif m_font->setEditable(false); TQObject::connect(m_font, TQT_SIGNAL(activated(int)), @@ -481,11 +481,11 @@ NotationConfigurationPage::NotationConfigurationPage(KConfig *cfg, subLayout->addWidget(typeLabel, 3, 0); m_fontOriginLabel = new TQLabel(subFrame); - m_fontOriginLabel->setAlignment(Qt::WordBreak); + m_fontOriginLabel->tqsetAlignment(TQt::WordBreak); m_fontOriginLabel->setFont(font); // m_fontOriginLabel->setFixedWidth(250); m_fontCopyrightLabel = new TQLabel(subFrame); - m_fontCopyrightLabel->setAlignment(Qt::WordBreak); + m_fontCopyrightLabel->tqsetAlignment(TQt::WordBreak); m_fontCopyrightLabel->setFont(font); // m_fontCopyrightLabel->setFixedWidth(250); m_fontMappedByLabel = new TQLabel(subFrame); @@ -499,70 +499,70 @@ NotationConfigurationPage::NotationConfigurationPage(KConfig *cfg, subLayout->setColStretch(1, 10); - layout->addMultiCellWidget(subFrame, + tqlayout->addMultiCellWidget(subFrame, row, row, 0, 3); ++row; - layout->addMultiCellWidget + tqlayout->addMultiCellWidget (new TQLabel(i18n("Font size for single-staff views"), frame), row, row, 0, 1); m_singleStaffSize = new KComboBox(frame); m_singleStaffSize->setEditable(false); - layout->addMultiCellWidget(m_singleStaffSize, row, row, 2, 2); + tqlayout->addMultiCellWidget(m_singleStaffSize, row, row, 2, 2); ++row; - layout->addMultiCellWidget + tqlayout->addMultiCellWidget (new TQLabel(i18n("Font size for multi-staff views"), frame), row, row, 0, 1); m_multiStaffSize = new KComboBox(frame); m_multiStaffSize->setEditable(false); - layout->addMultiCellWidget(m_multiStaffSize, row, row, 2, 2); + tqlayout->addMultiCellWidget(m_multiStaffSize, row, row, 2, 2); ++row; - layout->addMultiCellWidget + tqlayout->addMultiCellWidget (new TQLabel(i18n("Font size for printing (pt)"), frame), row, row, 0, 1); m_printingSize = new KComboBox(frame); m_printingSize->setEditable(false); - layout->addMultiCellWidget(m_printingSize, row, row, 2, 2); + tqlayout->addMultiCellWidget(m_printingSize, row, row, 2, 2); ++row; slotPopulateFontCombo(false); - layout->setRowSpacing(row, 15); + tqlayout->setRowSpacing(row, 15); ++row; TQFont defaultTextFont(NotePixmapFactory::defaultSerifFontFamily), defaultSansFont(NotePixmapFactory::defaultSansSerifFontFamily), defaultTimeSigFont(NotePixmapFactory::defaultTimeSigFontFamily); - layout->addWidget + tqlayout->addWidget (new TQLabel(i18n("Text font"), frame), row, 0); m_textFont = new KFontRequester(frame); TQFont textFont = m_cfg->readFontEntry("textfont", &defaultTextFont); m_textFont->setFont(textFont); - layout->addMultiCellWidget(m_textFont, row, row, 1, 3); + tqlayout->addMultiCellWidget(m_textFont, row, row, 1, 3); ++row; - layout->addWidget + tqlayout->addWidget (new TQLabel(i18n("Sans-serif font"), frame), row, 0); m_sansFont = new KFontRequester(frame); TQFont sansFont = m_cfg->readFontEntry("sansfont", &defaultSansFont); m_sansFont->setFont(sansFont); - layout->addMultiCellWidget(m_sansFont, row, row, 1, 3); + tqlayout->addMultiCellWidget(m_sansFont, row, row, 1, 3); ++row; /*!!! No -- not much point in having the time sig font here: it's only * used if the time sig characters are not found in the notation font, * and our default notation font has all the characters we need - layout->addWidget + tqlayout->addWidget (new TQLabel(i18n("Time Signature font"), frame), row, 0); m_timeSigFont = new KFontRequester(frame); TQFont timeSigFont = m_cfg->readFontEntry("timesigfont", &defaultTimeSigFont); m_timeSigFont->setFont(timeSigFont); - layout->addMultiCellWidget(m_timeSigFont, row, row, 1, 3); + tqlayout->addMultiCellWidget(m_timeSigFont, row, row, 1, 3); ++row; */ @@ -646,7 +646,7 @@ NotationConfigurationPage::slotFontComboChanged(int index) int printpt = m_cfg->readUnsignedNumEntry("printingnotesize", 5); for (int i = 2; i < 16; ++i) { - m_printingSize->insertItem(TQString("%1").arg(i)); + m_printingSize->insertItem(TQString("%1").tqarg(i)); if (i == printpt) { m_printingSize->setCurrentItem(m_printingSize->count() - 1); } @@ -661,10 +661,10 @@ NotationConfigurationPage::slotFontComboChanged(int index) m_fontMappedByLabel->setText(i18n(strtoqstr(map.getMappedBy()))); if (map.isSmooth()) { m_fontTypeLabel->setText( - i18n("%1 (smooth)").arg(i18n(strtoqstr(map.getType())))); + i18n("%1 (smooth)").tqarg(i18n(strtoqstr(map.getType())))); } else { m_fontTypeLabel->setText( - i18n("%1 (jaggy)").arg(i18n(strtoqstr(map.getType())))); + i18n("%1 (jaggy)").tqarg(i18n(strtoqstr(map.getType())))); } if (m_viewButton) { m_viewButton->setEnabled(map.getSystemFontNames().count() > 0); @@ -683,7 +683,7 @@ NotationConfigurationPage::populateSizeCombo(TQComboBox *combo, combo->clear(); for (std::vector<int>::iterator i = sizes.begin(); i != sizes.end(); ++i) { - combo->insertItem(TQString("%1").arg(*i)); + combo->insertItem(TQString("%1").tqarg(*i)); if (*i == defaultSize) combo->setCurrentItem(combo->count() - 1); } @@ -715,7 +715,7 @@ NotationConfigurationPage::apply() s = NotationHLayout::getAvailableProportions(); m_cfg->writeEntry("proportion", s[m_proportion->currentItem()]); - m_cfg->writeEntry("layoutmode", m_layoutMode->currentItem()); + m_cfg->writeEntry("tqlayoutmode", m_tqlayoutMode->currentItem()); m_cfg->writeEntry("colourquantize", m_colourQuantize->isChecked()); m_cfg->writeEntry("showunknowns", m_showUnknowns->isChecked()); m_cfg->writeEntry("showinvisibles", m_showInvisibles->isChecked()); diff --git a/src/gui/configuration/NotationConfigurationPage.h b/src/gui/configuration/NotationConfigurationPage.h index c7a777a..a9b6b63 100644 --- a/src/gui/configuration/NotationConfigurationPage.h +++ b/src/gui/configuration/NotationConfigurationPage.h @@ -54,10 +54,11 @@ class QuantizeParameters; class NotationConfigurationPage : public TabbedConfigurationPage { Q_OBJECT + TQ_OBJECT public: NotationConfigurationPage(KConfig *cfg, - TQWidget *parent = 0, const char *name=0); + TQWidget *tqparent = 0, const char *name=0); virtual void apply(); @@ -86,7 +87,7 @@ protected: TQLabel *m_fontCopyrightLabel; TQLabel *m_fontMappedByLabel; TQLabel *m_fontTypeLabel; - TQComboBox *m_layoutMode; + TQComboBox *m_tqlayoutMode; TQComboBox *m_spacing; TQComboBox *m_proportion; TQCheckBox *m_colourQuantize; diff --git a/src/gui/configuration/TabbedConfigurationPage.cpp b/src/gui/configuration/TabbedConfigurationPage.cpp index ae64894..de1f58b 100644 --- a/src/gui/configuration/TabbedConfigurationPage.cpp +++ b/src/gui/configuration/TabbedConfigurationPage.cpp @@ -39,26 +39,26 @@ namespace Rosegarden { TabbedConfigurationPage::TabbedConfigurationPage(RosegardenGUIDoc *doc, - TQWidget *parent, + TQWidget *tqparent, const char *name) - : ConfigurationPage(doc, parent, name) + : ConfigurationPage(doc, tqparent, name) { init(); } TabbedConfigurationPage::TabbedConfigurationPage(KConfig *cfg, - TQWidget *parent, + TQWidget *tqparent, const char *name) - : ConfigurationPage(cfg, parent, name) + : ConfigurationPage(cfg, tqparent, name) { init(); } TabbedConfigurationPage::TabbedConfigurationPage(RosegardenGUIDoc *doc, KConfig *cfg, - TQWidget *parent, + TQWidget *tqparent, const char *name) - : ConfigurationPage(doc, cfg, parent, name) + : ConfigurationPage(doc, cfg, tqparent, name) { init(); } diff --git a/src/gui/configuration/TabbedConfigurationPage.h b/src/gui/configuration/TabbedConfigurationPage.h index afe4520..a542b55 100644 --- a/src/gui/configuration/TabbedConfigurationPage.h +++ b/src/gui/configuration/TabbedConfigurationPage.h @@ -48,17 +48,18 @@ class RosegardenGUIDoc; class TabbedConfigurationPage : public ConfigurationPage { Q_OBJECT + TQ_OBJECT public: TabbedConfigurationPage(RosegardenGUIDoc *doc, - TQWidget *parent=0, const char *name=0); + TQWidget *tqparent=0, const char *name=0); TabbedConfigurationPage(KConfig *cfg, - TQWidget *parent=0, const char *name=0); + TQWidget *tqparent=0, const char *name=0); TabbedConfigurationPage(RosegardenGUIDoc *doc, KConfig *cfg, - TQWidget *parent=0, const char *name=0); + TQWidget *tqparent=0, const char *name=0); static TQString iconName() { return "misc"; } diff --git a/src/gui/dialogs/AddTracksDialog.cpp b/src/gui/dialogs/AddTracksDialog.cpp index 498e010..529174c 100644 --- a/src/gui/dialogs/AddTracksDialog.cpp +++ b/src/gui/dialogs/AddTracksDialog.cpp @@ -42,8 +42,8 @@ namespace Rosegarden { -AddTracksDialog::AddTracksDialog(TQWidget *parent, int currentTrack) : - KDialogBase(parent, 0, true, i18n("Add Tracks"), +AddTracksDialog::AddTracksDialog(TQWidget *tqparent, int currentTrack) : + KDialogBase(tqparent, 0, true, i18n("Add Tracks"), Ok | Cancel), m_currentTrack(currentTrack) { diff --git a/src/gui/dialogs/AddTracksDialog.h b/src/gui/dialogs/AddTracksDialog.h index 495acfa..9de3165 100644 --- a/src/gui/dialogs/AddTracksDialog.h +++ b/src/gui/dialogs/AddTracksDialog.h @@ -37,9 +37,10 @@ namespace Rosegarden class AddTracksDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - AddTracksDialog(TQWidget *parent, int currentTrack = -1); + AddTracksDialog(TQWidget *tqparent, int currentTrack = -1); int getTracks(); int getInsertPosition(); diff --git a/src/gui/dialogs/AudioManagerDialog.cpp b/src/gui/dialogs/AudioManagerDialog.cpp index a5c326c..e283126 100644 --- a/src/gui/dialogs/AudioManagerDialog.cpp +++ b/src/gui/dialogs/AudioManagerDialog.cpp @@ -93,9 +93,9 @@ const int AudioManagerDialog::m_maxPreviewWidth = 100; const int AudioManagerDialog::m_previewHeight = 30; const char* const AudioManagerDialog::m_listViewLayoutName = "AudioManagerDialog Layout"; -AudioManagerDialog::AudioManagerDialog(TQWidget *parent, +AudioManagerDialog::AudioManagerDialog(TQWidget *tqparent, RosegardenGUIDoc *doc): - KMainWindow(parent, "audioManagerDialog"), + KMainWindow(tqparent, "audioManagerDialog"), m_doc(doc), m_playingAudioFile(0), m_audioPlayingDialog(0), @@ -129,47 +129,47 @@ AudioManagerDialog::AudioManagerDialog(TQWidget *parent, TQString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); TQIconSet icon(TQPixmap(pixmapDir + "/toolbar/transport-play.xpm")); - new KAction(i18n("&Add Audio File..."), "fileopen", 0, this, + new KAction(i18n("&Add Audio File..."), "fileopen", 0, TQT_TQOBJECT(this), TQT_SLOT(slotAdd()), actionCollection(), "add_audio"); - new KAction(i18n("&Unload Audio File"), "editdelete", 0, this, + new KAction(i18n("&Unload Audio File"), "editdelete", 0, TQT_TQOBJECT(this), TQT_SLOT(slotRemove()), actionCollection(), "remove_audio"); icon = TQIconSet(TQPixmap(pixmapDir + "/toolbar/transport-play.xpm")); - new KAction(i18n("&Play Preview"), icon, 0, this, + new KAction(i18n("&Play Preview"), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotPlayPreview()), actionCollection(), "preview_audio"); /*!!! Not actually implemented -- this never worked right! - new KAction(i18n("Re&label"), 0, 0, this, + new KAction(i18n("Re&label"), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotRename()), actionCollection(), "rename_audio"); */ icon = TQIconSet(TQPixmap(pixmapDir + "/toolbar/insert_audio_into_track.xpm")); new KAction(i18n("&Insert into Selected Audio Track"), - icon, 0, this, TQT_SLOT(slotInsert()), + icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotInsert()), actionCollection(), "insert_audio"); - new KAction(i18n("Unload &all Audio Files"), 0, 0, this, + new KAction(i18n("Unload &all Audio Files"), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotRemoveAll()), actionCollection(), "remove_all_audio"); - new KAction(i18n("Unload all &Unused Audio Files"), 0, 0, this, + new KAction(i18n("Unload all &Unused Audio Files"), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotRemoveAllUnused()), actionCollection(), "remove_all_unused_audio"); - new KAction(i18n("&Delete Unused Audio Files..."), 0, 0, this, + new KAction(i18n("&Delete Unused Audio Files..."), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotDeleteUnused()), actionCollection(), "delete_unused_audio"); - new KAction(i18n("&Export Audio File..."), "fileexport", 0, this, + new KAction(i18n("&Export Audio File..."), "fileexport", 0, TQT_TQOBJECT(this), TQT_SLOT(slotExportAudio()), actionCollection(), "export_audio"); /* new KAction(i18n("Distribute Audio on &MIDI"), - 0, 0, this, + 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotDistributeOnMidiSegment()), actionCollection(), "distribute_audio"); @@ -184,11 +184,11 @@ AudioManagerDialog::AudioManagerDialog(TQWidget *parent, m_fileList->addColumn(i18n("Resolution")); // 5 m_fileList->addColumn(i18n("File")); // 6 - m_fileList->setColumnAlignment(1, Qt::AlignHCenter); - m_fileList->setColumnAlignment(2, Qt::AlignHCenter); - m_fileList->setColumnAlignment(3, Qt::AlignHCenter); - m_fileList->setColumnAlignment(4, Qt::AlignHCenter); - m_fileList->setColumnAlignment(5, Qt::AlignHCenter); + m_fileList->setColumnAlignment(1, TQt::AlignHCenter); + m_fileList->setColumnAlignment(2, TQt::AlignHCenter); + m_fileList->setColumnAlignment(3, TQt::AlignHCenter); + m_fileList->setColumnAlignment(4, TQt::AlignHCenter); + m_fileList->setColumnAlignment(5, TQt::AlignHCenter); m_fileList->restoreLayout(kapp->config(), m_listViewLayoutName); @@ -230,7 +230,7 @@ AudioManagerDialog::AudioManagerDialog(TQWidget *parent, connect(m_playTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotCancelPlayingAudio())); - KStdAction::close(this, + KStdAction::close(TQT_TQOBJECT(this), TQT_SLOT(slotClose()), actionCollection()); @@ -326,7 +326,7 @@ AudioManagerDialog::slotPopulateFileList() } catch (Exception e) { audioPixmap->fill(); // white TQPainter p(audioPixmap); - p.setPen(Qt::black); + p.setPen(TQt::black); p.drawText(10, m_previewHeight / 2, TQString("<no preview>")); } @@ -343,7 +343,7 @@ AudioManagerDialog::slotPopulateFileList() // length = (*it)->getLength(); msecs.sprintf("%03d", length.nsec / 1000000); - item->setText(1, TQString("%1.%2s").arg(length.sec).arg(msecs)); + item->setText(1, TQString("%1.%2s").tqarg(length.sec).tqarg(msecs)); // set start time and duration item->setStartTime(RealTime::zeroTime); @@ -361,11 +361,11 @@ AudioManagerDialog::slotPopulateFileList() // Resolution // - item->setText(5, TQString("%1 bits").arg((*it)->getBitsPerSample())); + item->setText(5, TQString("%1 bits").tqarg((*it)->getBitsPerSample())); // Channels // - item->setText(4, TQString("%1").arg((*it)->getChannels())); + item->setText(4, TQString("%1").tqarg((*it)->getChannels())); // Sample rate // @@ -384,7 +384,7 @@ AudioManagerDialog::slotPopulateFileList() findSelection = false; } - // Add children + // Add tqchildren // for (iit = segments.begin(); iit != segments.end(); iit++) { if ((*iit)->getAudioFileId() == (*it)->getId()) { @@ -404,8 +404,8 @@ AudioManagerDialog::slotPopulateFileList() // msecs.sprintf("%03d", segmentDuration.nsec / 1000000); childItem->setText(1, TQString("%1.%2s") - .arg(segmentDuration.sec) - .arg(msecs)); + .tqarg(segmentDuration.sec) + .tqarg(msecs)); try { m_doc->getAudioFileManager(). @@ -433,7 +433,7 @@ AudioManagerDialog::slotPopulateFileList() foundSelection = true; } - // Add children + // Add tqchildren } } } @@ -493,7 +493,7 @@ AudioManagerDialog::slotExportAudio() // Check for a dot extension and append ".wav" if not found // - if (saveFile.contains(".") == 0) + if (saveFile.tqcontains(".") == 0) saveFile += ".wav"; ProgressDialog progressDlg(i18n("Exporting audio file..."), @@ -558,10 +558,10 @@ AudioManagerDialog::slotRemove() if (newItem == 0) newItem = item->itemAbove(); - // Or the parent + // Or the tqparent // if (newItem == 0) - newItem = item->parent(); + newItem = item->tqparent(); // Get the id and segment of the next item so that we can // match against it @@ -607,7 +607,7 @@ AudioManagerDialog::slotRemove() if (haveSegments) { TQString question = i18n("This will unload audio file \"%1\" and remove all associated segments. Are you sure?") - .arg(TQString(audioFile->getFilename().c_str())); + .tqarg(TQString(audioFile->getFilename().c_str())); // Ask the question int reply = KMessageBox::warningContinueCancel(this, question); @@ -885,7 +885,7 @@ AudioManagerDialog::slotDeleteUnused() std::cerr << i << ": " << names[i] << std::endl; TQFile file(names[i]); if (!file.remove()) { - KMessageBox::error(this, i18n("File %1 could not be deleted.").arg(names[i])); + KMessageBox::error(this, i18n("File %1 could not be deleted.").tqarg(names[i])); } else { if (nameMap.find(names[i]) != nameMap.end()) { m_doc->getAudioFileManager().removeFile(nameMap[names[i]]); @@ -894,7 +894,7 @@ AudioManagerDialog::slotDeleteUnused() std::cerr << "WARNING: Audio file name " << names[i] << " not in name map" << std::endl; } - TQFile peakFile(TQString("%1.pk").arg(names[i])); + TQFile peakFile(TQString("%1.pk").tqarg(names[i])); peakFile.remove(); } } @@ -1179,7 +1179,7 @@ AudioManagerDialog::slotClose() } void -AudioManagerDialog::setAudioSubsystemStatus(bool ok) +AudioManagerDialog::setAudioSubsystemtqStatus(bool ok) { // We can do something more fancy in the future but for the moment // this will suffice. @@ -1222,7 +1222,7 @@ AudioManagerDialog::slotDistributeOnMidiSegment() //Composition &comp = m_doc->getComposition(); - QList<RosegardenGUIView>& viewList = m_doc->getViewList(); + TQList<RosegardenGUIView>& viewList = m_doc->getViewList(); RosegardenGUIView *w = 0; SegmentSelection selection; diff --git a/src/gui/dialogs/AudioManagerDialog.h b/src/gui/dialogs/AudioManagerDialog.h index eae07c0..e78eff1 100644 --- a/src/gui/dialogs/AudioManagerDialog.h +++ b/src/gui/dialogs/AudioManagerDialog.h @@ -59,9 +59,10 @@ class AudioFile; class AudioManagerDialog : public KMainWindow { Q_OBJECT + TQ_OBJECT public: - AudioManagerDialog(TQWidget *parent, + AudioManagerDialog(TQWidget *tqparent, RosegardenGUIDoc *doc); ~AudioManagerDialog(); @@ -87,7 +88,7 @@ public: // Can we playback audio currently? // - void setAudioSubsystemStatus(bool ok); + void setAudioSubsystemtqStatus(bool ok); // Return the accelerator object // diff --git a/src/gui/dialogs/AudioPlayingDialog.cpp b/src/gui/dialogs/AudioPlayingDialog.cpp index 524278e..3f94c4d 100644 --- a/src/gui/dialogs/AudioPlayingDialog.cpp +++ b/src/gui/dialogs/AudioPlayingDialog.cpp @@ -36,15 +36,15 @@ namespace Rosegarden { -AudioPlayingDialog::AudioPlayingDialog(TQWidget *parent, +AudioPlayingDialog::AudioPlayingDialog(TQWidget *tqparent, const TQString &name): - KDialogBase(parent, 0, true, + KDialogBase(tqparent, 0, true, i18n("Playing audio file"), Cancel) { TQHBox *w = makeHBoxMainWidget(); TQLabel *label = new - TQLabel(i18n("Playing audio file \"%1\"").arg(name), w); + TQLabel(i18n("Playing audio file \"%1\"").tqarg(name), w); label->setMinimumHeight(80); diff --git a/src/gui/dialogs/AudioPlayingDialog.h b/src/gui/dialogs/AudioPlayingDialog.h index 5cdfaba..928eedd 100644 --- a/src/gui/dialogs/AudioPlayingDialog.h +++ b/src/gui/dialogs/AudioPlayingDialog.h @@ -42,9 +42,10 @@ namespace Rosegarden class AudioPlayingDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - AudioPlayingDialog(TQWidget *parent, const TQString &label); + AudioPlayingDialog(TQWidget *tqparent, const TQString &label); signals: diff --git a/src/gui/dialogs/AudioPluginDialog.cpp b/src/gui/dialogs/AudioPluginDialog.cpp index 16e4500..d6d7fce 100644 --- a/src/gui/dialogs/AudioPluginDialog.cpp +++ b/src/gui/dialogs/AudioPluginDialog.cpp @@ -60,14 +60,14 @@ namespace Rosegarden { -AudioPluginDialog::AudioPluginDialog(TQWidget *parent, +AudioPluginDialog::AudioPluginDialog(TQWidget *tqparent, AudioPluginManager *aPM, #ifdef HAVE_LIBLO AudioPluginOSCGUIManager *aGM, #endif PluginContainer *pluginContainer, int index): - KDialogBase(parent, "", false, i18n("Audio Plugin"), + KDialogBase(tqparent, "", false, i18n("Audio Plugin"), #ifdef HAVE_LIBLO Close | Details | Help), #else @@ -86,7 +86,7 @@ AudioPluginDialog::AudioPluginDialog(TQWidget *parent, { setHelp("studio-plugins"); - setSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, + tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed)); #ifdef HAVE_LIBLO @@ -96,8 +96,8 @@ AudioPluginDialog::AudioPluginDialog(TQWidget *parent, TQVBox *vbox = makeVBoxMainWidget(); - TQGroupBox *pluginSelectionBox = new QGroupBox - (1, Horizontal, i18n("Plugin"), vbox); + TQGroupBox *pluginSelectionBox = new TQGroupBox + (1, Qt::Horizontal, i18n("Plugin"), vbox); makePluginParamsBox(vbox, 0, 10); @@ -125,12 +125,12 @@ AudioPluginDialog::AudioPluginDialog(TQWidget *parent, m_insOuts = new TQLabel(i18n("<ports>"), h); - m_insOuts->setAlignment(AlignRight); + m_insOuts->tqsetAlignment(AlignRight); TQToolTip::add (m_insOuts, i18n("Input and output port counts.")); m_pluginId = new TQLabel(i18n("<id>"), h); - m_pluginId->setAlignment(AlignRight); + m_pluginId->tqsetAlignment(AlignRight); TQToolTip::add (m_pluginId, i18n("Unique ID of plugin.")); @@ -330,10 +330,10 @@ AudioPluginDialog::populatePluginList() } void -AudioPluginDialog::makePluginParamsBox(TQWidget *parent, int portCount, +AudioPluginDialog::makePluginParamsBox(TQWidget *tqparent, int portCount, int tooManyPorts) { - m_pluginParamsBox = new TQFrame(parent); + m_pluginParamsBox = new TQFrame(tqparent); int columns = 2; if (portCount > tooManyPorts) { @@ -383,7 +383,7 @@ AudioPluginDialog::slotPluginSelected(int i) TQString caption = strtoqstr(m_pluginContainer->getName()) + - TQString(" [ %1 ] - ").arg(m_index + 1); + TQString(" [ %1 ] - ").tqarg(m_index + 1); if (number == 0) { setCaption(caption + i18n("<no plugin>")); @@ -402,7 +402,7 @@ AudioPluginDialog::slotPluginSelected(int i) // Destroy old param widgets // - TQWidget* parent = dynamic_cast<TQWidget*>(m_pluginParamsBox->parent()); + TQWidget* tqparent = dynamic_cast<TQWidget*>(m_pluginParamsBox->tqparent()); delete m_pluginParamsBox; m_pluginWidgets.clear(); // The widgets are deleted with the parameter box @@ -418,7 +418,7 @@ AudioPluginDialog::slotPluginSelected(int i) } int tooManyPorts = 96; - makePluginParamsBox(parent, portCount, tooManyPorts); + makePluginParamsBox(tqparent, portCount, tooManyPorts); bool showBounds = (portCount <= 48); if (portCount > tooManyPorts) { @@ -426,7 +426,7 @@ AudioPluginDialog::slotPluginSelected(int i) m_gridLayout->addMultiCellWidget( new TQLabel(i18n("This plugin has too many controls to edit here."), m_pluginParamsBox), - 1, 1, 0, m_gridLayout->numCols() - 1, Qt::AlignCenter); + 1, 1, 0, m_gridLayout->numCols() - 1, TQt::AlignCenter); } AudioPluginInstance *inst = m_pluginContainer->getPlugin(m_index); @@ -435,7 +435,7 @@ AudioPluginDialog::slotPluginSelected(int i) if (plugin) { setCaption(caption + plugin->getName()); - m_pluginId->setText(i18n("Id: %1").arg(plugin->getUniqueId())); + m_pluginId->setText(i18n("Id: %1").tqarg(plugin->getUniqueId())); TQString pluginInfo = plugin->getAuthor() + TQString("\n") + plugin->getCopyright(); @@ -446,7 +446,7 @@ AudioPluginDialog::slotPluginSelected(int i) TQToolTip::add (m_pluginList, pluginInfo); - std::string identifier = plugin->getIdentifier().data(); + std::string identifier = plugin->getIdentifier().ascii(); // Only clear ports &c if this method is accessed by user // action (after the constructor) @@ -491,10 +491,10 @@ AudioPluginDialog::slotPluginSelected(int i) else if (ins == 2 && outs == 2) m_insOuts->setText(i18n("stereo")); else - m_insOuts->setText(i18n("%1 in, %2 out").arg(ins).arg(outs)); + m_insOuts->setText(i18n("%1 in, %2 out").tqarg(ins).tqarg(outs)); TQString shortName(plugin->getName()); - int parenIdx = shortName.find(" ("); + int parenIdx = shortName.tqfind(" ("); if (parenIdx > 0) { shortName = shortName.left(parenIdx); if (shortName == "Null") @@ -503,7 +503,7 @@ AudioPluginDialog::slotPluginSelected(int i) } adjustSize(); - setFixedSize(minimumSizeHint()); + setFixedSize(tqminimumSizeHint()); // tell the sequencer emit pluginSelected(m_containerId, m_index, number - 1); @@ -521,10 +521,10 @@ AudioPluginDialog::slotPluginSelected(int i) m_programCombo->setSizeLimit(20); m_programCombo->insertItem(i18n("<none selected>")); m_gridLayout->addMultiCellWidget(m_programLabel, - 0, 0, 0, 0, Qt::AlignRight); + 0, 0, 0, 0, TQt::AlignRight); m_gridLayout->addMultiCellWidget(m_programCombo, 0, 0, 1, m_gridLayout->numCols() - 1, - Qt::AlignLeft); + TQt::AlignLeft); connect(m_programCombo, TQT_SIGNAL(activated(const TQString &)), this, TQT_SLOT(slotPluginProgramChanged(const TQString &))); @@ -579,7 +579,7 @@ AudioPluginDialog::slotPluginSelected(int i) } -QStringList +TQStringList AudioPluginDialog::getProgramsForInstance(AudioPluginInstance *inst, int ¤t) { TQStringList list; @@ -604,7 +604,7 @@ AudioPluginDialog::getProgramsForInstance(AudioPluginInstance *inst, int ¤ void AudioPluginDialog::slotPluginPortChanged(float value) { - const TQObject* object = sender(); + const TQObject* object = TQT_TQOBJECT_CONST(const_cast<const TQT_BASE_OBJECT_NAME*>(sender())); const PluginControl* control = dynamic_cast<const PluginControl*>(object); @@ -707,10 +707,10 @@ AudioPluginDialog::updatePluginProgramList() m_programCombo->setSizeLimit(20); m_programCombo->insertItem(i18n("<none selected>")); m_gridLayout->addMultiCellWidget(m_programLabel, - 0, 0, 0, 0, Qt::AlignRight); + 0, 0, 0, 0, TQt::AlignRight); m_gridLayout->addMultiCellWidget(m_programCombo, 0, 0, 1, m_gridLayout->numCols() - 1, - Qt::AlignLeft); + TQt::AlignLeft); m_programCombo->clear(); m_programCombo->insertItem(i18n("<none selected>")); diff --git a/src/gui/dialogs/AudioPluginDialog.h b/src/gui/dialogs/AudioPluginDialog.h index 5ff5dc4..9ea1e2c 100644 --- a/src/gui/dialogs/AudioPluginDialog.h +++ b/src/gui/dialogs/AudioPluginDialog.h @@ -58,9 +58,10 @@ class AudioPluginInstance; class AudioPluginDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - AudioPluginDialog(TQWidget *parent, + AudioPluginDialog(TQWidget *tqparent, AudioPluginManager *aPM, #ifdef HAVE_LIBLO AudioPluginOSCGUIManager *aGM, diff --git a/src/gui/dialogs/AudioSplitDialog.cpp b/src/gui/dialogs/AudioSplitDialog.cpp index b7a1b67..2c1e4ec 100644 --- a/src/gui/dialogs/AudioSplitDialog.cpp +++ b/src/gui/dialogs/AudioSplitDialog.cpp @@ -50,10 +50,10 @@ namespace Rosegarden { -AudioSplitDialog::AudioSplitDialog(TQWidget *parent, +AudioSplitDialog::AudioSplitDialog(TQWidget *tqparent, Segment *segment, RosegardenGUIDoc *doc): - KDialogBase(parent, 0, true, + KDialogBase(tqparent, 0, true, i18n("Autosplit Audio Segment"), Ok | Cancel), m_doc(doc), m_segment(segment), @@ -70,7 +70,7 @@ AudioSplitDialog::AudioSplitDialog(TQWidget *parent, new TQLabel(i18n("AutoSplit Segment \"") + strtoqstr(m_segment->getLabel()) + TQString("\""), w); - m_canvas = new TQCanvas(w); + m_canvas = new TQCanvas(TQT_TQOBJECT(w)); m_canvas->resize(m_canvasWidth, m_canvasHeight); m_canvasView = new TQCanvasView(m_canvas, w); m_canvasView->setFixedWidth(m_canvasWidth); @@ -120,7 +120,7 @@ AudioSplitDialog::drawPreview() rect->setZ(1); rect->setPen(kapp->palette().color(TQPalette::Active, TQColorGroup::Dark)); rect->setBrush(kapp->palette().color(TQPalette::Active, TQColorGroup::Base)); - rect->setVisible(true); + rect->tqsetVisible(true); // Get preview in vector form // @@ -143,7 +143,7 @@ AudioSplitDialog::drawPreview() text->setX(30); text->setY(30); text->setZ(4); - text->setVisible(true); + text->tqsetVisible(true); m_canvas->update(); return ; } @@ -192,7 +192,7 @@ AudioSplitDialog::drawPreview() palette().color(TQPalette::Active, TQColorGroup::Shadow)); line->setBrush(kapp-> palette().color(TQPalette::Active, TQColorGroup::Shadow)); - line->setVisible(true); + line->tqsetVisible(true); } @@ -205,15 +205,15 @@ AudioSplitDialog::drawPreview() rect->setPen(kapp->palette().color(TQPalette::Active, TQColorGroup::Shadow)); rect->setBrush(kapp->palette().color(TQPalette::Active, TQColorGroup::Shadow)); rect->setZ(4); - rect->setVisible(true); + rect->tqsetVisible(true); // Start time // char msecs[100]; sprintf(msecs, "%03d", m_segment->getAudioStartTime().msec()); TQString startText = TQString("%1.%2s") - .arg(m_segment->getAudioStartTime().sec) - .arg(msecs); + .tqarg(m_segment->getAudioStartTime().sec) + .tqarg(msecs); TQCanvasText *text = new TQCanvasText(m_canvas); text->setColor( kapp->palette().color(TQPalette::Active, TQColorGroup::Shadow)); @@ -221,7 +221,7 @@ AudioSplitDialog::drawPreview() text->setX(startX - 20); text->setY(m_canvasHeight / 2 - m_previewHeight / 2 - 35); text->setZ(3); - text->setVisible(true); + text->tqsetVisible(true); rect = new TQCanvasRectangle(m_canvas); rect->setX(startX - 1); @@ -229,14 +229,14 @@ AudioSplitDialog::drawPreview() rect->setSize(1, m_previewHeight + 28); rect->setPen(kapp->palette().color(TQPalette::Active, TQColorGroup::Shadow)); rect->setZ(3); - rect->setVisible(true); + rect->tqsetVisible(true); // End time // sprintf(msecs, "%03d", m_segment->getAudioEndTime().msec()); TQString endText = TQString("%1.%2s") - .arg(m_segment->getAudioEndTime().sec) - .arg(msecs); + .tqarg(m_segment->getAudioEndTime().sec) + .tqarg(msecs); text = new TQCanvasText(m_canvas); text->setColor( kapp->palette().color(TQPalette::Active, TQColorGroup::Shadow)); @@ -244,7 +244,7 @@ AudioSplitDialog::drawPreview() text->setX(startX + m_previewWidth - 20); text->setY(m_canvasHeight / 2 - m_previewHeight / 2 - 35); text->setZ(3); - text->setVisible(true); + text->tqsetVisible(true); rect = new TQCanvasRectangle(m_canvas); rect->setX(startX + m_previewWidth - 1); @@ -252,7 +252,7 @@ AudioSplitDialog::drawPreview() rect->setSize(1, m_previewHeight + 28); rect->setPen(kapp->palette().color(TQPalette::Active, TQColorGroup::Shadow)); rect->setZ(3); - rect->setVisible(true); + rect->tqsetVisible(true); m_canvas->update(); } @@ -303,7 +303,7 @@ AudioSplitDialog::drawSplits(int threshold) palette().color(TQPalette::Active, TQColorGroup::Mid)); rect->setBrush(kapp-> palette().color(TQPalette::Active, TQColorGroup::Mid)); - rect->setVisible(true); + rect->tqsetVisible(true); tempRects.push_back(rect); } @@ -315,7 +315,7 @@ AudioSplitDialog::drawSplits(int threshold) // clear any previous preview boxes // for (pIt = m_previewBoxes.begin(); pIt != m_previewBoxes.end(); pIt++) { - //(*pIt)->setVisible(false); + //(*pIt)->tqsetVisible(false); delete (*pIt); } m_previewBoxes.erase(m_previewBoxes.begin(), m_previewBoxes.end()); diff --git a/src/gui/dialogs/AudioSplitDialog.h b/src/gui/dialogs/AudioSplitDialog.h index 0d1febf..b4d1cae 100644 --- a/src/gui/dialogs/AudioSplitDialog.h +++ b/src/gui/dialogs/AudioSplitDialog.h @@ -47,8 +47,9 @@ class RosegardenGUIDoc; class AudioSplitDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - AudioSplitDialog(TQWidget *parent, + AudioSplitDialog(TQWidget *tqparent, Segment *segment, RosegardenGUIDoc *doc); diff --git a/src/gui/dialogs/BeatsBarsDialog.cpp b/src/gui/dialogs/BeatsBarsDialog.cpp index 8f765a7..6495682 100644 --- a/src/gui/dialogs/BeatsBarsDialog.cpp +++ b/src/gui/dialogs/BeatsBarsDialog.cpp @@ -40,26 +40,26 @@ namespace Rosegarden { -BeatsBarsDialog::BeatsBarsDialog(TQWidget* parent) : - KDialogBase(parent, 0, true, i18n("Audio Segment Duration"), +BeatsBarsDialog::BeatsBarsDialog(TQWidget* tqparent) : + KDialogBase(tqparent, 0, true, i18n("Audio Segment Duration"), Ok | Cancel, Ok) { TQHBox *hbox = makeHBoxMainWidget(); - TQGroupBox *gbox = new TQGroupBox(1, Horizontal, - i18n("The selected audio segment contains:"), hbox); + TQGroupBox *gbox = new TQGroupBox(1, Qt::Horizontal, + i18n("The selected audio segment tqcontains:"), hbox); TQFrame *frame = new TQFrame(gbox); - TQGridLayout *layout = new TQGridLayout(frame, 1, 2, 5, 5); + TQGridLayout *tqlayout = new TQGridLayout(frame, 1, 2, 5, 5); m_spinBox = new TQSpinBox(1, INT_MAX, 1, frame, "glee"); - layout->addWidget(m_spinBox, 0, 0); + tqlayout->addWidget(m_spinBox, 0, 0); m_comboBox = new KComboBox(false, frame); m_comboBox->insertItem(i18n("beat(s)")); m_comboBox->insertItem(i18n("bar(s)")); m_comboBox->setCurrentItem(0); - layout->addWidget(m_comboBox, 0, 1); + tqlayout->addWidget(m_comboBox, 0, 1); } } diff --git a/src/gui/dialogs/BeatsBarsDialog.h b/src/gui/dialogs/BeatsBarsDialog.h index 658a4fb..11c0810 100644 --- a/src/gui/dialogs/BeatsBarsDialog.h +++ b/src/gui/dialogs/BeatsBarsDialog.h @@ -43,10 +43,11 @@ namespace Rosegarden class BeatsBarsDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: BeatsBarsDialog(); - BeatsBarsDialog(TQWidget *parent); + BeatsBarsDialog(TQWidget *tqparent); int getQuantity() { return m_spinBox->value(); } int getMode() { return m_comboBox->currentItem(); } diff --git a/src/gui/dialogs/ClefDialog.cpp b/src/gui/dialogs/ClefDialog.cpp index bfb2ee1..588e768 100644 --- a/src/gui/dialogs/ClefDialog.cpp +++ b/src/gui/dialogs/ClefDialog.cpp @@ -46,11 +46,11 @@ namespace Rosegarden { -ClefDialog::ClefDialog(TQWidget *parent, +ClefDialog::ClefDialog(TQWidget *tqparent, NotePixmapFactory *npf, Clef defaultClef, bool showConversionOptions) : - KDialogBase(parent, 0, true, i18n("Clef"), Ok | Cancel | Help), + KDialogBase(tqparent, 0, true, i18n("Clef"), Ok | Cancel | Help), m_notePixmapFactory(npf), m_clef(defaultClef) { @@ -58,11 +58,11 @@ ClefDialog::ClefDialog(TQWidget *parent, TQVBox *vbox = makeVBoxMainWidget(); - TQGroupBox *clefFrame = new QGroupBox - (1, Horizontal, i18n("Clef"), vbox); + TQGroupBox *clefFrame = new TQGroupBox + (1, Qt::Horizontal, i18n("Clef"), vbox); - TQButtonGroup *conversionFrame = new QButtonGroup - (1, Horizontal, i18n("Existing notes following clef change"), vbox); + TQButtonGroup *conversionFrame = new TQButtonGroup + (1, Qt::Horizontal, i18n("Existing notes following clef change"), vbox); TQHBox *clefBox = new TQHBox(clefFrame); @@ -77,7 +77,7 @@ ClefDialog::ClefDialog(TQWidget *parent, (m_octaveUp, i18n("Up an Octave")); m_clefLabel = new TQLabel(i18n("Clef"), clefLabelBox); - m_clefLabel->setAlignment(AlignVCenter | AlignHCenter); + m_clefLabel->tqsetAlignment(AlignVCenter | AlignHCenter); m_octaveDown = new BigArrowButton(clefLabelBox, Qt::DownArrow); TQToolTip::add @@ -88,20 +88,20 @@ ClefDialog::ClefDialog(TQWidget *parent, (clefUp, i18n("Higher clef")); m_clefNameLabel = new TQLabel(i18n("Clef"), clefLabelBox); - m_clefNameLabel->setAlignment(AlignVCenter | AlignHCenter); + m_clefNameLabel->tqsetAlignment(AlignVCenter | AlignHCenter); if (showConversionOptions) { m_noConversionButton = - new QRadioButton + new TQRadioButton (i18n("Maintain current pitches"), conversionFrame); m_changeOctaveButton = - new QRadioButton + new TQRadioButton (i18n("Transpose into appropriate octave"), conversionFrame); m_transposeButton = 0; //!!! why aren't we offering this option? does it not work? too difficult to describe? // m_transposeButton = - // new QRadioButton + // new TQRadioButton // (i18n("Maintain current positions on the staff"), conversionFrame); m_changeOctaveButton->setChecked(true); } else { @@ -219,7 +219,7 @@ ClefDialog::slotOctaveDown() void ClefDialog::redrawClefPixmap() { - TQPixmap pmap = NotePixmapFactory::toQPixmap + TQPixmap pmap = NotePixmapFactory::toTQPixmap (m_notePixmapFactory->makeClefDisplayPixmap(m_clef)); m_clefLabel->setPixmap(pmap); @@ -246,25 +246,25 @@ ClefDialog::redrawClefPixmap() std::string type = m_clef.getClefType(); if (type == Clef::Treble) - name = name.arg(i18n("Treble")); + name = name.tqarg(i18n("Treble")); else if (type == Clef::French) - name = name.arg(i18n("French violin")); + name = name.tqarg(i18n("French violin")); else if (type == Clef::Soprano) - name = name.arg(i18n("Soprano")); + name = name.tqarg(i18n("Soprano")); else if (type == Clef::Mezzosoprano) - name = name.arg(i18n("Mezzo-soprano")); + name = name.tqarg(i18n("Mezzo-soprano")); else if (type == Clef::Alto) - name = name.arg(i18n("Alto")); + name = name.tqarg(i18n("Alto")); else if (type == Clef::Tenor) - name = name.arg(i18n("Tenor")); + name = name.tqarg(i18n("Tenor")); else if (type == Clef::Baritone) - name = name.arg(i18n("C-baritone")); + name = name.tqarg(i18n("C-baritone")); else if (type == Clef::Varbaritone) - name = name.arg(i18n("F-baritone")); + name = name.tqarg(i18n("F-baritone")); else if (type == Clef::Bass) - name = name.arg(i18n("Bass")); + name = name.tqarg(i18n("Bass")); else if (type == Clef::Subbass) - name = name.arg(i18n("Sub-bass")); + name = name.tqarg(i18n("Sub-bass")); m_clefNameLabel->setText(name); } diff --git a/src/gui/dialogs/ClefDialog.h b/src/gui/dialogs/ClefDialog.h index 634e4b9..a88158f 100644 --- a/src/gui/dialogs/ClefDialog.h +++ b/src/gui/dialogs/ClefDialog.h @@ -45,6 +45,7 @@ class NotePixmapFactory; class ClefDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: enum ConversionType { @@ -53,7 +54,7 @@ public: Transpose, }; - ClefDialog(TQWidget *parent, + ClefDialog(TQWidget *tqparent, NotePixmapFactory *npf, Clef defaultClef, bool showConversionOptions = true); diff --git a/src/gui/dialogs/CompositionLengthDialog.cpp b/src/gui/dialogs/CompositionLengthDialog.cpp index 85d2530..fb5fc21 100644 --- a/src/gui/dialogs/CompositionLengthDialog.cpp +++ b/src/gui/dialogs/CompositionLengthDialog.cpp @@ -39,9 +39,9 @@ namespace Rosegarden { CompositionLengthDialog::CompositionLengthDialog( - TQWidget *parent, + TQWidget *tqparent, Composition *composition): - KDialogBase(parent, 0, true, i18n("Change Composition Length"), + KDialogBase(tqparent, 0, true, i18n("Change Composition Length"), Ok | Cancel), m_composition(composition) { diff --git a/src/gui/dialogs/CompositionLengthDialog.h b/src/gui/dialogs/CompositionLengthDialog.h index 373bf73..03235d5 100644 --- a/src/gui/dialogs/CompositionLengthDialog.h +++ b/src/gui/dialogs/CompositionLengthDialog.h @@ -43,8 +43,9 @@ class Composition; class CompositionLengthDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - CompositionLengthDialog(TQWidget *parent, + CompositionLengthDialog(TQWidget *tqparent, Composition *composition); timeT getStartMarker(); diff --git a/src/gui/dialogs/ConfigureDialog.cpp b/src/gui/dialogs/ConfigureDialog.cpp index 2ba63c0..a10a985 100644 --- a/src/gui/dialogs/ConfigureDialog.cpp +++ b/src/gui/dialogs/ConfigureDialog.cpp @@ -54,16 +54,16 @@ static TQPixmap loadIcon(const char *name) return TQPixmap(fileBase + ".xpm"); } TQPixmap pmap = KGlobal::instance()->iconLoader() - ->loadIcon(TQString::fromLatin1(name), KIcon::NoGroup, KIcon::SizeMedium); + ->loadIcon(TQString::tqfromLatin1(name), KIcon::NoGroup, KIcon::SizeMedium); return pmap; } ConfigureDialog::ConfigureDialog(RosegardenGUIDoc *doc, KConfig* cfg, - TQWidget *parent, + TQWidget *tqparent, const char *name) - : ConfigureDialogBase(parent, i18n("Configure Rosegarden"), name) + : ConfigureDialogBase(tqparent, i18n("Configure Rosegarden"), name) { TQWidget *pageWidget = 0; TQVBoxLayout *vlay = 0; diff --git a/src/gui/dialogs/ConfigureDialog.h b/src/gui/dialogs/ConfigureDialog.h index 7b63ffd..ee004a0 100644 --- a/src/gui/dialogs/ConfigureDialog.h +++ b/src/gui/dialogs/ConfigureDialog.h @@ -42,10 +42,11 @@ class RosegardenGUIDoc; class ConfigureDialog : public ConfigureDialogBase { Q_OBJECT + TQ_OBJECT public: ConfigureDialog(RosegardenGUIDoc *doc, KConfig* cfg, - TQWidget *parent=0, + TQWidget *tqparent=0, const char *name=0); signals: void updateAutoSaveInterval(unsigned int); diff --git a/src/gui/dialogs/ConfigureDialogBase.cpp b/src/gui/dialogs/ConfigureDialogBase.cpp index 017e6a6..65c4856 100644 --- a/src/gui/dialogs/ConfigureDialogBase.cpp +++ b/src/gui/dialogs/ConfigureDialogBase.cpp @@ -35,11 +35,11 @@ namespace Rosegarden { -ConfigureDialogBase::ConfigureDialogBase(TQWidget *parent, +ConfigureDialogBase::ConfigureDialogBase(TQWidget *tqparent, TQString label, const char *name): KDialogBase(IconList, label ? label : i18n("Configure"), Help | Apply | Ok | Cancel, - Ok, parent, name, true) // modal + Ok, tqparent, name, true) // modal { setWFlags(WDestructiveClose); } diff --git a/src/gui/dialogs/ConfigureDialogBase.h b/src/gui/dialogs/ConfigureDialogBase.h index dc02a9c..90ac259 100644 --- a/src/gui/dialogs/ConfigureDialogBase.h +++ b/src/gui/dialogs/ConfigureDialogBase.h @@ -43,8 +43,9 @@ class ConfigurationPage; class ConfigureDialogBase : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - ConfigureDialogBase(TQWidget *parent=0, + ConfigureDialogBase(TQWidget *tqparent=0, TQString label = 0, const char *name=0); virtual ~ConfigureDialogBase(); diff --git a/src/gui/dialogs/CountdownBar.cpp b/src/gui/dialogs/CountdownBar.cpp index 8d4d0b8..98eb9ac 100644 --- a/src/gui/dialogs/CountdownBar.cpp +++ b/src/gui/dialogs/CountdownBar.cpp @@ -34,11 +34,11 @@ namespace Rosegarden { -CountdownBar::CountdownBar(TQWidget *parent, int width, int height): - TQFrame(parent), m_width(width), m_height(height), m_position(0) +CountdownBar::CountdownBar(TQWidget *tqparent, int width, int height): + TQFrame(tqparent), m_width(width), m_height(height), m_position(0) { resize(m_width, m_height); - repaint(); + tqrepaint(); } void @@ -61,7 +61,7 @@ void CountdownBar::setPosition(int position) { m_position = position; - repaint(); + tqrepaint(); } } diff --git a/src/gui/dialogs/CountdownBar.h b/src/gui/dialogs/CountdownBar.h index edb17e3..3337b29 100644 --- a/src/gui/dialogs/CountdownBar.h +++ b/src/gui/dialogs/CountdownBar.h @@ -38,11 +38,12 @@ namespace Rosegarden -class CountdownBar : public QFrame +class CountdownBar : public TQFrame { Q_OBJECT + TQ_OBJECT public: - CountdownBar(TQWidget *parent, int width, int height); + CountdownBar(TQWidget *tqparent, int width, int height); void setPosition(int position); protected: diff --git a/src/gui/dialogs/CountdownDialog.cpp b/src/gui/dialogs/CountdownDialog.cpp index 537bc2b..31b3bef 100644 --- a/src/gui/dialogs/CountdownDialog.cpp +++ b/src/gui/dialogs/CountdownDialog.cpp @@ -41,21 +41,21 @@ namespace Rosegarden { -CountdownDialog::CountdownDialog(TQWidget *parent, int seconds): - TQDialog(parent, "", false, WStyle_StaysOnTop | WStyle_DialogBorder), +CountdownDialog::CountdownDialog(TQWidget *tqparent, int seconds): + TQDialog(tqparent, "", false, WStyle_StaysOnTop | WStyle_DialogBorder), m_pastEndMode(false), m_totalTime(seconds), m_progressBarWidth(150), m_progressBarHeight(15) { - TQBoxLayout *layout = new TQBoxLayout(this, TQBoxLayout::TopToBottom, 10, 14); + TQBoxLayout *tqlayout = new TQBoxLayout(this, TQBoxLayout::TopToBottom, 10, 14); setCaption(i18n("Recording...")); TQHBox *hBox = new TQHBox(this); m_label = new TQLabel(hBox); m_time = new TQLabel(hBox); - layout->addWidget(hBox, 0, AlignCenter); + tqlayout->addWidget(hBox, 0, AlignCenter); m_label->setText(i18n("Recording time remaining: ")); m_progressBar = @@ -68,8 +68,8 @@ CountdownDialog::CountdownDialog(TQWidget *parent, int seconds): m_stopButton = new TQPushButton(i18n("Stop"), this); m_stopButton->setFixedWidth(60); - layout->addWidget(m_progressBar, 0, AlignCenter); - layout->addWidget(m_stopButton, 0, AlignRight); + tqlayout->addWidget(m_progressBar, 0, AlignCenter); + tqlayout->addWidget(m_stopButton, 0, AlignRight); connect (m_stopButton, TQT_SIGNAL(released()), this, TQT_SIGNAL(stopped())); @@ -112,10 +112,10 @@ CountdownDialog::setElapsedTime(int elapsedSeconds) if (seconds < 3600) // less than an hour { - m_time->setText(TQString("%1:%2").arg(m).arg(s)); + m_time->setText(TQString("%1:%2").tqarg(m).tqarg(s)); } else if (seconds < 86400) // less than a day { - m_time->setText(TQString("%1:%2:%3").arg(h).arg(m).arg(s)); + m_time->setText(TQString("%1:%2:%3").tqarg(h).tqarg(m).tqarg(s)); } else { m_time->setText(i18n("Just how big is your hard disk?")); } diff --git a/src/gui/dialogs/CountdownDialog.h b/src/gui/dialogs/CountdownDialog.h index fdba289..c4c793d 100644 --- a/src/gui/dialogs/CountdownDialog.h +++ b/src/gui/dialogs/CountdownDialog.h @@ -46,9 +46,10 @@ class CountdownBar; class CountdownDialog : public TQDialog // KDialogBase { Q_OBJECT + TQ_OBJECT public: - CountdownDialog(TQWidget *parent, int seconds = 300); + CountdownDialog(TQWidget *tqparent, int seconds = 300); void setLabel(const TQString &label); void setElapsedTime(int seconds); diff --git a/src/gui/dialogs/DocumentConfigureDialog.cpp b/src/gui/dialogs/DocumentConfigureDialog.cpp index d959a5c..50d06ee 100644 --- a/src/gui/dialogs/DocumentConfigureDialog.cpp +++ b/src/gui/dialogs/DocumentConfigureDialog.cpp @@ -53,15 +53,15 @@ static TQPixmap loadIcon(const char *name) } TQPixmap pmap = KGlobal::instance()->iconLoader() - ->loadIcon(TQString::fromLatin1(name), KIcon::NoGroup, KIcon::SizeMedium); + ->loadIcon(TQString::tqfromLatin1(name), KIcon::NoGroup, KIcon::SizeMedium); return pmap; } DocumentConfigureDialog::DocumentConfigureDialog(RosegardenGUIDoc *doc, - TQWidget *parent, + TQWidget *tqparent, const char *name) - : ConfigureDialogBase(parent, i18n("Document Properties"), name) + : ConfigureDialogBase(tqparent, i18n("Document Properties"), name) { TQWidget *pageWidget = 0; TQVBoxLayout *vlay = 0; @@ -100,7 +100,7 @@ DocumentConfigureDialog::DocumentConfigureDialog(RosegardenGUIDoc *doc, page->setPageIndex(pageIndex(pageWidget)); m_configurationPages.push_back(page); - resize(minimumSize()); + resize(tqminimumSize()); } void diff --git a/src/gui/dialogs/DocumentConfigureDialog.h b/src/gui/dialogs/DocumentConfigureDialog.h index 08f9283..1ed0b70 100644 --- a/src/gui/dialogs/DocumentConfigureDialog.h +++ b/src/gui/dialogs/DocumentConfigureDialog.h @@ -42,7 +42,7 @@ class DocumentConfigureDialog : public ConfigureDialogBase { public: DocumentConfigureDialog(RosegardenGUIDoc *doc, - TQWidget *parent=0, + TQWidget *tqparent=0, const char *name=0); void showAudioPage(); diff --git a/src/gui/dialogs/EventEditDialog.cpp b/src/gui/dialogs/EventEditDialog.cpp index 6446246..fc73f51 100644 --- a/src/gui/dialogs/EventEditDialog.cpp +++ b/src/gui/dialogs/EventEditDialog.cpp @@ -57,10 +57,10 @@ namespace Rosegarden { -EventEditDialog::EventEditDialog(TQWidget *parent, +EventEditDialog::EventEditDialog(TQWidget *tqparent, const Event &event, bool editable) : - KDialogBase(parent, 0, true, i18n(editable ? "Advanced Event Edit" : "Advanced Event Viewer"), + KDialogBase(tqparent, 0, true, i18n(editable ? "Advanced Event Edit" : "Advanced Event Viewer"), (editable ? (Ok | Cancel) : Ok)), m_durationDisplay(0), m_durationDisplayAux(0), @@ -77,10 +77,10 @@ EventEditDialog::EventEditDialog(TQWidget *parent, { TQVBox *vbox = makeVBoxMainWidget(); - TQGroupBox *intrinsicBox = new QGroupBox - (1, Horizontal, i18n("Intrinsics"), vbox); + TQGroupBox *intrinsicBox = new TQGroupBox + (1, Qt::Horizontal, i18n("Intrinsics"), vbox); - TQGrid *intrinsicGrid = new TQGrid(4, TQGrid::Horizontal, intrinsicBox); + TQGrid *intrinsicGrid = new TQGrid(4, Qt::Horizontal, intrinsicBox); new TQLabel(i18n("Event type: "), intrinsicGrid); new TQLabel("", intrinsicGrid); @@ -91,7 +91,7 @@ EventEditDialog::EventEditDialog(TQWidget *parent, new TQLabel(i18n("Absolute time: "), intrinsicGrid); new TQLabel("", intrinsicGrid); new TQLabel("", intrinsicGrid); - TQSpinBox *absoluteTime = new QSpinBox + TQSpinBox *absoluteTime = new TQSpinBox (INT_MIN, INT_MAX, Note(Note::Shortest).getDuration(), intrinsicGrid); absoluteTime->setValue(event.getAbsoluteTime()); TQObject::connect(absoluteTime, TQT_SIGNAL(valueChanged(int)), @@ -104,7 +104,7 @@ EventEditDialog::EventEditDialog(TQWidget *parent, m_durationDisplayAux = new TQLabel("(note)", intrinsicGrid); m_durationDisplayAux->setMinimumWidth(20); - TQSpinBox *duration = new QSpinBox + TQSpinBox *duration = new TQSpinBox (0, INT_MAX, Note(Note::Shortest).getDuration(), intrinsicGrid); duration->setValue(event.getDuration()); TQObject::connect(duration, TQT_SIGNAL(valueChanged(int)), @@ -121,9 +121,9 @@ EventEditDialog::EventEditDialog(TQWidget *parent, this, TQT_SLOT(slotSubOrderingChanged(int))); slotSubOrderingChanged(event.getSubOrdering()); - TQGroupBox *persistentBox = new QGroupBox - (1, Horizontal, i18n("Persistent properties"), vbox); - m_persistentGrid = new TQGrid(4, TQGrid::Horizontal, persistentBox); + TQGroupBox *persistentBox = new TQGroupBox + (1, Qt::Horizontal, i18n("Persistent properties"), vbox); + m_persistentGrid = new TQGrid(4, Qt::Horizontal, persistentBox); TQLabel *label = new TQLabel(i18n("Name"), m_persistentGrid); TQFont font(label->font()); @@ -151,8 +151,8 @@ EventEditDialog::EventEditDialog(TQWidget *parent, m_nonPersistentGrid = 0; } else { - TQGroupBox *nonPersistentBox = new QGroupBox - (1, Horizontal, i18n("Non-persistent properties"), vbox); + TQGroupBox *nonPersistentBox = new TQGroupBox + (1, Qt::Horizontal, i18n("Non-persistent properties"), vbox); new TQLabel(i18n("These are cached values, lost if the event is modified."), nonPersistentBox); @@ -160,8 +160,8 @@ EventEditDialog::EventEditDialog(TQWidget *parent, //m_nonPersistentView->setHScrollBarMode(TQScrollView::AlwaysOff); m_nonPersistentView->setResizePolicy(TQScrollView::AutoOneFit); - m_nonPersistentGrid = new QGrid - (4, TQGrid::Horizontal, m_nonPersistentView->viewport()); + m_nonPersistentGrid = new TQGrid + (4, Qt::Horizontal, m_nonPersistentView->viewport()); m_nonPersistentView->addChild(m_nonPersistentGrid); m_nonPersistentGrid->setSpacing(4); @@ -212,7 +212,7 @@ EventEditDialog::addPersistentProperty(const PropertyName &name) min = 0; max = 127; } - TQSpinBox *spinBox = new QSpinBox + TQSpinBox *spinBox = new TQSpinBox (min, max, 1, m_persistentGrid, strtoqstr(name)); spinBox->setValue(m_originalEvent.get<Int>(name)); TQObject::connect(spinBox, TQT_SIGNAL(valueChanged(int)), @@ -227,7 +227,7 @@ case UInt: { min = 0; max = 65535; } - TQSpinBox *spinBox = new QSpinBox + TQSpinBox *spinBox = new TQSpinBox (min, max, 1, m_persistentGrid, strtoqstr(name)); spinBox->setValue(m_originalEvent.get<UInt>(name)); TQObject::connect(spinBox, TQT_SIGNAL(valueChanged(int)), @@ -242,7 +242,7 @@ case UInt: { // seconds // - TQSpinBox *spinBox = new QSpinBox + TQSpinBox *spinBox = new TQSpinBox (INT_MIN, INT_MAX, 1, hbox, strtoqstr(name) + "%sec"); spinBox->setValue(realTime.sec); @@ -252,7 +252,7 @@ case UInt: { // nseconds // - spinBox = new QSpinBox + spinBox = new TQSpinBox (INT_MIN, INT_MAX, 1, hbox, strtoqstr(name) + "%nsec"); spinBox->setValue(realTime.nsec); @@ -264,7 +264,7 @@ case UInt: { } case Bool: { - TQCheckBox *checkBox = new QCheckBox + TQCheckBox *checkBox = new TQCheckBox ("", m_persistentGrid, strtoqstr(name)); checkBox->setChecked(m_originalEvent.get<Bool>(name)); TQObject::connect(checkBox, TQT_SIGNAL(activated()), @@ -274,7 +274,7 @@ case UInt: { } case String: { - TQLineEdit *lineEdit = new QLineEdit + TQLineEdit *lineEdit = new TQLineEdit (strtoqstr(m_originalEvent.get<String>(name)), m_persistentGrid, strtoqstr(name)); @@ -325,7 +325,7 @@ EventEditDialog::slotDurationChanged(int value) { timeT error = 0; m_durationDisplay->setPixmap - (NotePixmapFactory::toQPixmap(m_notePixmapFactory.makeNoteMenuPixmap(timeT(value), error))); + (NotePixmapFactory::toTQPixmap(m_notePixmapFactory.makeNoteMenuPixmap(timeT(value), error))); if (error >= value / 2) { m_durationDisplayAux->setText("++ "); @@ -356,7 +356,7 @@ EventEditDialog::slotSubOrderingChanged(int value) void EventEditDialog::slotIntPropertyChanged(int value) { - const TQObject *s = sender(); + const TQObject *s = TQT_TQOBJECT_CONST(const_cast<const TQT_BASE_OBJECT_NAME*>(sender())); const TQSpinBox *spinBox = dynamic_cast<const TQSpinBox *>(s); if (!spinBox) return ; @@ -369,7 +369,7 @@ EventEditDialog::slotIntPropertyChanged(int value) void EventEditDialog::slotRealTimePropertyChanged(int value) { - const TQObject *s = sender(); + const TQObject *s = TQT_TQOBJECT_CONST(const_cast<const TQT_BASE_OBJECT_NAME*>(sender())); const TQSpinBox *spinBox = dynamic_cast<const TQSpinBox *>(s); if (!spinBox) return ; @@ -393,7 +393,7 @@ EventEditDialog::slotRealTimePropertyChanged(int value) void EventEditDialog::slotBoolPropertyChanged() { - const TQObject *s = sender(); + const TQObject *s = TQT_TQOBJECT_CONST(const_cast<const TQT_BASE_OBJECT_NAME*>(sender())); const TQCheckBox *checkBox = dynamic_cast<const TQCheckBox *>(s); if (!checkBox) return ; @@ -408,7 +408,7 @@ EventEditDialog::slotBoolPropertyChanged() void EventEditDialog::slotStringPropertyChanged(const TQString &value) { - const TQObject *s = sender(); + const TQObject *s = TQT_TQOBJECT_CONST(const_cast<const TQT_BASE_OBJECT_NAME*>(sender())); const TQLineEdit *lineEdit = dynamic_cast<const TQLineEdit *>(s); if (!lineEdit) return ; @@ -421,7 +421,7 @@ EventEditDialog::slotStringPropertyChanged(const TQString &value) void EventEditDialog::slotPropertyDeleted() { - const TQObject *s = sender(); + const TQObject *s = TQT_TQOBJECT_CONST(const_cast<const TQT_BASE_OBJECT_NAME*>(sender())); const TQPushButton *pushButton = dynamic_cast<const TQPushButton *>(s); if (!pushButton) return ; @@ -453,7 +453,7 @@ EventEditDialog::slotPropertyDeleted() void EventEditDialog::slotPropertyMadePersistent() { - const TQObject *s = sender(); + const TQObject *s = TQT_TQOBJECT_CONST(const_cast<const TQT_BASE_OBJECT_NAME*>(sender())); const TQPushButton *pushButton = dynamic_cast<const TQPushButton *>(s); if (!pushButton) return ; diff --git a/src/gui/dialogs/EventEditDialog.h b/src/gui/dialogs/EventEditDialog.h index 15f83ac..7593c79 100644 --- a/src/gui/dialogs/EventEditDialog.h +++ b/src/gui/dialogs/EventEditDialog.h @@ -48,6 +48,7 @@ class PropertyName; class EventEditDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: /** @@ -57,7 +58,7 @@ public: * the resulting edited version can subsequently be queried * through getEvent(). */ - EventEditDialog(TQWidget *parent, + EventEditDialog(TQWidget *tqparent, const Event &event, bool editable = true); diff --git a/src/gui/dialogs/EventFilterDialog.cpp b/src/gui/dialogs/EventFilterDialog.cpp index d2763a6..0f13ad3 100644 --- a/src/gui/dialogs/EventFilterDialog.cpp +++ b/src/gui/dialogs/EventFilterDialog.cpp @@ -61,8 +61,8 @@ namespace Rosegarden { -EventFilterDialog::EventFilterDialog(TQWidget* parent) - : KDialogBase(parent, "eventfilerdialog", true, i18n("Event Filter"), Ok | Cancel, Ok), +EventFilterDialog::EventFilterDialog(TQWidget* tqparent) + : KDialogBase(tqparent, "eventfilerdialog", true, i18n("Event Filter"), Ok | Cancel, Ok), m_standardQuantizations(BasicQuantizer::getStandardQuantizations()) { cfg = kapp->config(); @@ -134,7 +134,7 @@ EventFilterDialog::initDialog() TQT_SLOT(slotPitchFromChanged(int))); m_pitchFromChooserButton = new TQPushButton(i18n("edit"), noteFrame); - m_pitchFromChooserButton->setSizePolicy(TQSizePolicy((TQSizePolicy::SizeType)0, + m_pitchFromChooserButton->tqsetSizePolicy(TQSizePolicy((TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, m_pitchFromChooserButton-> sizePolicy().hasHeightForWidth())); TQToolTip::add @@ -218,14 +218,14 @@ EventFilterDialog::initDialog() void EventFilterDialog::populateDurationCombos() { - TQPixmap noMap = NotePixmapFactory::toQPixmap + TQPixmap noMap = NotePixmapFactory::toTQPixmap (NotePixmapFactory::makeToolbarPixmap("menu-no-note")); for (unsigned int i = 0; i < m_standardQuantizations.size(); ++i) { timeT time = m_standardQuantizations[i]; timeT error = 0; TQString label = NotationStrings::makeNoteMenuLabel(time, true, error); - TQPixmap pmap = NotePixmapFactory::toQPixmap + TQPixmap pmap = NotePixmapFactory::toTQPixmap (NotePixmapFactory::makeNoteMenuPixmap(time, error)); m_noteDurationFromComboBox->insertItem(error ? noMap : pmap, label); m_noteDurationToComboBox ->insertItem(error ? noMap : pmap, label); diff --git a/src/gui/dialogs/EventFilterDialog.h b/src/gui/dialogs/EventFilterDialog.h index 207f6e5..c07fa58 100644 --- a/src/gui/dialogs/EventFilterDialog.h +++ b/src/gui/dialogs/EventFilterDialog.h @@ -59,10 +59,11 @@ class Event; class EventFilterDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - EventFilterDialog(TQWidget* parent); + EventFilterDialog(TQWidget* tqparent); ~EventFilterDialog(); KConfig *cfg; @@ -142,7 +143,7 @@ protected slots: private: //---------[ data members ]----------------------------- - TQGridLayout* layout; + TQGridLayout* tqlayout; TQComboBox* m_noteDurationFromComboBox; TQComboBox* m_noteDurationIncludeComboBox; diff --git a/src/gui/dialogs/EventParameterDialog.cpp b/src/gui/dialogs/EventParameterDialog.cpp index 98abb44..6443f48 100644 --- a/src/gui/dialogs/EventParameterDialog.cpp +++ b/src/gui/dialogs/EventParameterDialog.cpp @@ -42,11 +42,11 @@ namespace Rosegarden { EventParameterDialog::EventParameterDialog( - TQWidget *parent, + TQWidget *tqparent, const TQString &name, const PropertyName &property, int startValue): - KDialogBase(parent, 0, true, name, Ok | Cancel), + KDialogBase(tqparent, 0, true, name, Ok | Cancel), m_property(property) { TQVBox *vBox = makeVBoxMainWidget(); @@ -63,23 +63,23 @@ EventParameterDialog::EventParameterDialog( // create options // 0 flat - text = i18n("Flat - set %1 to value").arg(strtoqstr(property)); + text = i18n("Flat - set %1 to value").tqarg(strtoqstr(property)); m_patternCombo->insertItem(text); // 1 alternating - text = i18n("Alternating - set %1 to max and min on alternate events").arg(strtoqstr(property)); + text = i18n("Alternating - set %1 to max and min on alternate events").tqarg(strtoqstr(property)); m_patternCombo->insertItem(text); // 2 crescendo - text = i18n("Crescendo - set %1 rising from min to max").arg(strtoqstr(property)); + text = i18n("Crescendo - set %1 rising from min to max").tqarg(strtoqstr(property)); m_patternCombo->insertItem(text); // 3 diminuendo - text = i18n("Diminuendo - set %1 falling from max to min").arg(strtoqstr(property)); + text = i18n("Diminuendo - set %1 falling from max to min").tqarg(strtoqstr(property)); m_patternCombo->insertItem(text); // 4 ringing - text = i18n("Ringing - set %1 alternating from max to min with both dying to zero").arg(strtoqstr(property)); + text = i18n("Ringing - set %1 alternating from max to min with both dying to zero").tqarg(strtoqstr(property)); m_patternCombo->insertItem(text); connect(m_patternCombo, TQT_SIGNAL(activated(int)), @@ -94,8 +94,8 @@ EventParameterDialog::EventParameterDialog( m_value2Combo = new KComboBox(value2Box); for (unsigned int i = 0; i < 128; i++) { - m_value1Combo->insertItem(TQString("%1").arg(i)); - m_value2Combo->insertItem(TQString("%1").arg(i)); + m_value1Combo->insertItem(TQString("%1").tqarg(i)); + m_value2Combo->insertItem(TQString("%1").tqarg(i)); } m_value1Combo->setCurrentItem(127); diff --git a/src/gui/dialogs/EventParameterDialog.h b/src/gui/dialogs/EventParameterDialog.h index 848e44d..cfc71a9 100644 --- a/src/gui/dialogs/EventParameterDialog.h +++ b/src/gui/dialogs/EventParameterDialog.h @@ -44,9 +44,10 @@ namespace Rosegarden class EventParameterDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - EventParameterDialog(TQWidget *parent, + EventParameterDialog(TQWidget *tqparent, const TQString &name, // name const PropertyName &property, // property int startValue); // start diff --git a/src/gui/dialogs/ExportDeviceDialog.cpp b/src/gui/dialogs/ExportDeviceDialog.cpp index 348a5b8..34260c7 100644 --- a/src/gui/dialogs/ExportDeviceDialog.cpp +++ b/src/gui/dialogs/ExportDeviceDialog.cpp @@ -38,8 +38,8 @@ namespace Rosegarden { -ExportDeviceDialog::ExportDeviceDialog(TQWidget *parent, TQString deviceName) : - KDialogBase(parent, "exportdevicedialog", true, i18n("Export Devices..."), +ExportDeviceDialog::ExportDeviceDialog(TQWidget *tqparent, TQString deviceName) : + KDialogBase(tqparent, "exportdevicedialog", true, i18n("Export Devices..."), Ok | Cancel, Ok) { TQVBox *vbox = makeVBoxMainWidget(); @@ -48,7 +48,7 @@ ExportDeviceDialog::ExportDeviceDialog(TQWidget *parent, TQString deviceName) : vbox); m_exportAll = new TQRadioButton(i18n("Export all devices"), bg); m_exportOne = new TQRadioButton(i18n("Export selected device only"), bg); - new TQLabel(i18n(" (\"%1\")").arg(deviceName), bg); + new TQLabel(i18n(" (\"%1\")").tqarg(deviceName), bg); m_exportOne->setChecked(true); } diff --git a/src/gui/dialogs/ExportDeviceDialog.h b/src/gui/dialogs/ExportDeviceDialog.h index 0b092bc..4526ba2 100644 --- a/src/gui/dialogs/ExportDeviceDialog.h +++ b/src/gui/dialogs/ExportDeviceDialog.h @@ -44,7 +44,7 @@ class ExportDeviceDialog : public KDialogBase public: enum ExportType { ExportOne, ExportAll }; - ExportDeviceDialog(TQWidget *parent, TQString deviceName); + ExportDeviceDialog(TQWidget *tqparent, TQString deviceName); ExportType getExportType(); diff --git a/src/gui/dialogs/FileLocateDialog.cpp b/src/gui/dialogs/FileLocateDialog.cpp index 5b2a370..6a40742 100644 --- a/src/gui/dialogs/FileLocateDialog.cpp +++ b/src/gui/dialogs/FileLocateDialog.cpp @@ -39,10 +39,10 @@ namespace Rosegarden { -FileLocateDialog::FileLocateDialog(TQWidget *parent, +FileLocateDialog::FileLocateDialog(TQWidget *tqparent, const TQString &file, const TQString & /*path*/): - KDialogBase(parent, 0, true, + KDialogBase(tqparent, 0, true, i18n("Locate audio file"), User1 | User2 | User3, Ok, @@ -55,10 +55,10 @@ FileLocateDialog::FileLocateDialog(TQWidget *parent, TQHBox *w = makeHBoxMainWidget(); TQString label = i18n("Can't find file \"%1\".\n" - "Would you like to try and locate this file or skip it?").arg(m_file); + "Would you like to try and locate this file or skip it?").tqarg(m_file); TQLabel *labelW = new TQLabel(label, w); - labelW->setAlignment(Qt::AlignCenter); + labelW->tqsetAlignment(TQt::AlignCenter); labelW->setMinimumHeight(60); } @@ -69,8 +69,8 @@ FileLocateDialog::slotUser3() m_file = KFileDialog::getOpenFileName (":WAVS", i18n("%1|Requested file (%2)\n*.wav|WAV files (*.wav)") - .arg(TQFileInfo(m_file).fileName()) - .arg(TQFileInfo(m_file).fileName()), + .tqarg(TQFileInfo(m_file).fileName()) + .tqarg(TQFileInfo(m_file).fileName()), this, i18n("Select an Audio File")); RG_DEBUG << "FileLocateDialog::slotUser3() : m_file = " << m_file << endl; diff --git a/src/gui/dialogs/FileLocateDialog.h b/src/gui/dialogs/FileLocateDialog.h index a9e3220..7f36591 100644 --- a/src/gui/dialogs/FileLocateDialog.h +++ b/src/gui/dialogs/FileLocateDialog.h @@ -41,9 +41,10 @@ namespace Rosegarden class FileLocateDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - FileLocateDialog(TQWidget *parent, + FileLocateDialog(TQWidget *tqparent, const TQString &file, const TQString &path); diff --git a/src/gui/dialogs/FileMergeDialog.cpp b/src/gui/dialogs/FileMergeDialog.cpp index d7d48cf..7d378e6 100644 --- a/src/gui/dialogs/FileMergeDialog.cpp +++ b/src/gui/dialogs/FileMergeDialog.cpp @@ -40,10 +40,10 @@ namespace Rosegarden { -FileMergeDialog::FileMergeDialog(TQWidget *parent, +FileMergeDialog::FileMergeDialog(TQWidget *tqparent, TQString /*fileName*/, bool timingsDiffer) : - KDialogBase(parent, 0, true, i18n("Merge File"), Ok | Cancel | Help) + KDialogBase(tqparent, 0, true, i18n("Merge File"), Ok | Cancel | Help) { setHelp("file-merge"); diff --git a/src/gui/dialogs/FileMergeDialog.h b/src/gui/dialogs/FileMergeDialog.h index 33a8638..5675f59 100644 --- a/src/gui/dialogs/FileMergeDialog.h +++ b/src/gui/dialogs/FileMergeDialog.h @@ -43,9 +43,10 @@ namespace Rosegarden class FileMergeDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - FileMergeDialog(TQWidget *parent, TQString fileName, bool timingsDiffer); + FileMergeDialog(TQWidget *tqparent, TQString fileName, bool timingsDiffer); int getMergeOptions(); diff --git a/src/gui/dialogs/FloatEdit.cpp b/src/gui/dialogs/FloatEdit.cpp index a4b9788..db2dc43 100644 --- a/src/gui/dialogs/FloatEdit.cpp +++ b/src/gui/dialogs/FloatEdit.cpp @@ -37,17 +37,17 @@ namespace Rosegarden { -FloatEdit::FloatEdit(TQWidget *parent, +FloatEdit::FloatEdit(TQWidget *tqparent, const TQString &title, const TQString &text, float min, float max, float value, float step): - KDialogBase(parent, "rosegardenFloatEdit", true, title, Ok | Cancel, Ok) + KDialogBase(tqparent, "rosegardenFloatEdit", true, title, Ok | Cancel, Ok) { TQVBox *vbox = makeVBoxMainWidget(); - TQGroupBox *groupBox = new TQGroupBox(1, Horizontal, text, vbox); + TQGroupBox *groupBox = new TQGroupBox(1, Qt::Horizontal, text, vbox); TQVBox *inVbox = new TQVBox(groupBox); // Calculate decimal points according to the step size @@ -59,7 +59,7 @@ FloatEdit::FloatEdit(TQWidget *parent, //std::cout << "CAL DP = " << calDP << ", dps = " << dps << std::endl; m_spin = new HSpinBox(inVbox, value, 1, min, max, dps); - new TQLabel(TQString("(min: %1, max: %2)").arg(min).arg(max), inVbox); + new TQLabel(TQString("(min: %1, max: %2)").tqarg(min).tqarg(max), inVbox); } float diff --git a/src/gui/dialogs/FloatEdit.h b/src/gui/dialogs/FloatEdit.h index dc5a060..4c7ca20 100644 --- a/src/gui/dialogs/FloatEdit.h +++ b/src/gui/dialogs/FloatEdit.h @@ -43,9 +43,10 @@ class HSpinBox; class FloatEdit : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - FloatEdit(TQWidget *parent, + FloatEdit(TQWidget *tqparent, const TQString &title, const TQString &text, float min, diff --git a/src/gui/dialogs/IdentifyTextCodecDialog.cpp b/src/gui/dialogs/IdentifyTextCodecDialog.cpp index c07d887..f8deb14 100644 --- a/src/gui/dialogs/IdentifyTextCodecDialog.cpp +++ b/src/gui/dialogs/IdentifyTextCodecDialog.cpp @@ -41,9 +41,9 @@ namespace Rosegarden { -IdentifyTextCodecDialog::IdentifyTextCodecDialog(TQWidget *parent, +IdentifyTextCodecDialog::IdentifyTextCodecDialog(TQWidget *tqparent, std::string text) : - KDialogBase(parent, 0, true, i18n("Choose Text Encoding"), Ok), + KDialogBase(tqparent, 0, true, i18n("Choose Text Encoding"), Ok), m_text(text) { TQVBox *vbox = makeVBoxMainWidget(); @@ -120,7 +120,7 @@ IdentifyTextCodecDialog::IdentifyTextCodecDialog(TQWidget *parent, } if (description != "") { - description = i18n("%1 (%2)").arg(strtoqstr(name)).arg(description); + description = i18n("%1 (%2)").tqarg(strtoqstr(name)).tqarg(description); } else { description = strtoqstr(name); } @@ -144,7 +144,7 @@ IdentifyTextCodecDialog::IdentifyTextCodecDialog(TQWidget *parent, TQFont font; font.setStyleHint(TQFont::TypeWriter); m_example->setFont(font); - m_example->setPaletteForegroundColor(Qt::blue); + m_example->setPaletteForegroundColor(TQt::blue); std::cerr << "calling slotCodecSelected(" << current << ")" << std::endl; if (current < 0) current = 0; codecs->setCurrentItem(current); diff --git a/src/gui/dialogs/IdentifyTextCodecDialog.h b/src/gui/dialogs/IdentifyTextCodecDialog.h index 8b71be4..1d32f79 100644 --- a/src/gui/dialogs/IdentifyTextCodecDialog.h +++ b/src/gui/dialogs/IdentifyTextCodecDialog.h @@ -43,9 +43,10 @@ namespace Rosegarden class IdentifyTextCodecDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - IdentifyTextCodecDialog(TQWidget *parent, std::string text); + IdentifyTextCodecDialog(TQWidget *tqparent, std::string text); std::string getCodec() const { return m_codec; } diff --git a/src/gui/dialogs/ImportDeviceDialog.cpp b/src/gui/dialogs/ImportDeviceDialog.cpp index cde1cac..53f98bc 100644 --- a/src/gui/dialogs/ImportDeviceDialog.cpp +++ b/src/gui/dialogs/ImportDeviceDialog.cpp @@ -54,8 +54,8 @@ namespace Rosegarden { -ImportDeviceDialog::ImportDeviceDialog(TQWidget *parent, KURL url) : - KDialogBase(parent, "importdevicedialog", true, +ImportDeviceDialog::ImportDeviceDialog(TQWidget *tqparent, KURL url) : + KDialogBase(tqparent, "importdevicedialog", true, i18n("Import from Device..."), Ok | Cancel, Ok), m_url(url), @@ -84,26 +84,26 @@ ImportDeviceDialog::doImport() TQString target; if (KIO::NetAccess::download(m_url, target) == false) { - KMessageBox::error(this, i18n("Cannot download file %1").arg(m_url.prettyURL())); + KMessageBox::error(this, i18n("Cannot download file %1").tqarg(m_url.prettyURL())); return false; } bool fileRead = false; - if (SF2PatchExtractor::isSF2File(target.data())) { + if (SF2PatchExtractor::isSF2File(target.ascii())) { fileRead = importFromSF2(target); } else { fileRead = importFromRG(target); } if (!fileRead) { KMessageBox::error - (this, i18n("Cannot open file %1").arg(m_url.prettyURL())); + (this, i18n("Cannot open file %1").tqarg(m_url.prettyURL())); reject(); close(); return false; } if (m_devices.size() == 0) { KMessageBox::sorry - (this, i18n("No devices found in file %1").arg(m_url.prettyURL())); + (this, i18n("No devices found in file %1").tqarg(m_url.prettyURL())); reject(); close(); return false; @@ -137,7 +137,7 @@ ImportDeviceDialog::doImport() if ((*i)->getName() != "") { showRenameOption = true; } else { - (*i)->setName(qstrtostr(i18n("Device %1").arg(count))); + (*i)->setName(qstrtostr(i18n("Device %1").tqarg(count))); } if (m_devices.size() > 1) { m_deviceCombo->insertItem(strtoqstr((*i)->getName())); @@ -149,7 +149,7 @@ ImportDeviceDialog::doImport() TQHBox *optionsBox = new TQHBox(mainFrame); - TQGroupBox *gb = new TQGroupBox(1, Horizontal, i18n("Options"), + TQGroupBox *gb = new TQGroupBox(1, Qt::Horizontal, i18n("Options"), optionsBox); m_importBanks = new TQCheckBox(i18n("Import banks"), gb); @@ -340,7 +340,7 @@ ImportDeviceDialog::importFromSF2(TQString filename) { SF2PatchExtractor::Device sf2device; try { - sf2device = SF2PatchExtractor::read(filename.data()); + sf2device = SF2PatchExtractor::read(filename.ascii()); // These exceptions shouldn't happen -- the isSF2File call before this // one should have weeded them out @@ -364,7 +364,7 @@ ImportDeviceDialog::importFromSF2(TQString filename) MidiBank bank (msb == 1, msb, lsb, - qstrtostr(i18n("Bank %1:%2").arg(msb).arg(lsb))); + qstrtostr(i18n("Bank %1:%2").tqarg(msb).tqarg(lsb))); banks.push_back(bank); diff --git a/src/gui/dialogs/ImportDeviceDialog.h b/src/gui/dialogs/ImportDeviceDialog.h index 122e640..e376f1c 100644 --- a/src/gui/dialogs/ImportDeviceDialog.h +++ b/src/gui/dialogs/ImportDeviceDialog.h @@ -55,9 +55,10 @@ class RosegardenGUIDoc; class ImportDeviceDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - ImportDeviceDialog(TQWidget *parent, KURL url); + ImportDeviceDialog(TQWidget *tqparent, KURL url); virtual ~ImportDeviceDialog(); bool doImport(); diff --git a/src/gui/dialogs/InterpretDialog.cpp b/src/gui/dialogs/InterpretDialog.cpp index 3510d1a..75889c6 100644 --- a/src/gui/dialogs/InterpretDialog.cpp +++ b/src/gui/dialogs/InterpretDialog.cpp @@ -40,24 +40,24 @@ namespace Rosegarden { -InterpretDialog::InterpretDialog(TQWidget *parent) : - KDialogBase(parent, 0, true, i18n("Interpret"), Ok | Cancel | Help) +InterpretDialog::InterpretDialog(TQWidget *tqparent) : + KDialogBase(tqparent, 0, true, i18n("Interpret"), Ok | Cancel | Help) { setHelp("nv-interpret"); TQVBox *vbox = makeVBoxMainWidget(); - TQGroupBox *groupBox = new QGroupBox - (1, Horizontal, i18n("Interpretations to apply"), vbox); + TQGroupBox *groupBox = new TQGroupBox + (1, Qt::Horizontal, i18n("Interpretations to apply"), vbox); - m_applyTextDynamics = new QCheckBox + m_applyTextDynamics = new TQCheckBox (i18n("Apply text dynamics (p, mf, ff etc)"), groupBox); - m_applyHairpins = new QCheckBox + m_applyHairpins = new TQCheckBox (i18n("Apply hairpin dynamics"), groupBox); - m_stressBeats = new QCheckBox + m_stressBeats = new TQCheckBox (i18n("Stress beats"), groupBox); - m_articulate = new QCheckBox + m_articulate = new TQCheckBox (i18n("Articulate slurs, staccato, tenuto etc"), groupBox); - m_allInterpretations = new QCheckBox + m_allInterpretations = new TQCheckBox (i18n("All available interpretations"), groupBox); KConfig *config = kapp->config(); diff --git a/src/gui/dialogs/InterpretDialog.h b/src/gui/dialogs/InterpretDialog.h index 9859259..db5f0ac 100644 --- a/src/gui/dialogs/InterpretDialog.h +++ b/src/gui/dialogs/InterpretDialog.h @@ -41,8 +41,9 @@ namespace Rosegarden class InterpretDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - InterpretDialog(TQWidget *parent); + InterpretDialog(TQWidget *tqparent); // an OR from InterpretCommand's constants int getInterpretations(); diff --git a/src/gui/dialogs/IntervalDialog.cpp b/src/gui/dialogs/IntervalDialog.cpp index da8e4dc..be238d3 100644 --- a/src/gui/dialogs/IntervalDialog.cpp +++ b/src/gui/dialogs/IntervalDialog.cpp @@ -48,8 +48,8 @@ namespace Rosegarden { -IntervalDialog::IntervalDialog(TQWidget *parent, bool askChangeKey, bool askTransposeSegmentBack) : - KDialogBase(parent, 0, true, i18n("Specify Interval"), Ok | Cancel ) +IntervalDialog::IntervalDialog(TQWidget *tqparent, bool askChangeKey, bool askTransposeSegmentBack) : + KDialogBase(tqparent, 0, true, i18n("Specify Interval"), Ok | Cancel ) { TQVBox *vBox = makeVBoxMainWidget(); @@ -61,19 +61,19 @@ IntervalDialog::IntervalDialog(TQWidget *parent, bool askChangeKey, bool askTran intervalChromatic = 0; intervalDiatonic = 0; - //m_intervalPitchLabel = new TQLabel( i18n("Pitch: %1").arg(intervalChromatic), hBox); - //m_intervalOctavesLabel = new TQLabel( i18n("Octaves: %1").arg(intervalDiatonic / 7), hBox); - //m_intervalStepsLabel = new TQLabel( i18n("Steps: %1").arg(intervalDiatonic % 7), hBox); + //m_intervalPitchLabel = new TQLabel( i18n("Pitch: %1").tqarg(intervalChromatic), hBox); + //m_intervalOctavesLabel = new TQLabel( i18n("Octaves: %1").tqarg(intervalDiatonic / 7), hBox); + //m_intervalStepsLabel = new TQLabel( i18n("Steps: %1").tqarg(intervalDiatonic % 7), hBox); m_intervalLabel = new TQLabel( i18n("a perfect unison"), vBox); - m_intervalLabel->setAlignment(Qt::AlignCenter); + m_intervalLabel->tqsetAlignment(TQt::AlignCenter); TQFont font(m_intervalLabel->font()); font.setItalic(true); m_intervalLabel->setFont(font); if (askChangeKey) { - TQButtonGroup *affectKeyGroup = new TQButtonGroup(1, Horizontal, i18n("Effect on Key"), vBox); + TQButtonGroup *affectKeyGroup = new TQButtonGroup(1, Qt::Horizontal, i18n("Effect on Key"), vBox); m_transposeWithinKey = new TQRadioButton(i18n("Transpose within key"), affectKeyGroup); m_transposeWithinKey->setChecked(true); m_transposeChangingKey = new TQRadioButton(i18n("Change key for selection"), affectKeyGroup); @@ -138,7 +138,7 @@ IntervalDialog::getChromaticDistance() return getOctaveDistance() * 12 + getStepDistanceChromatic() + getAccidentalCorrectionChromatic(); } -QString +TQString IntervalDialog::getIntervalName(int intervalDiatonic, int intervalChromatic) { // displayInterval: an intervalDiatonic of -3 will yield a displayInterval of 3 and @@ -205,7 +205,7 @@ IntervalDialog::getIntervalName(int intervalDiatonic, int intervalChromatic) else if (deviation == 0) textIntervalDeviated += i18n("a perfect"); else - textIntervalDeviated += i18n("an (unknown, %1)").arg(deviation); + textIntervalDeviated += i18n("an (unknown, %1)").tqarg(deviation); break; // Then the major/minor: case 1: // second @@ -233,7 +233,7 @@ IntervalDialog::getIntervalName(int intervalDiatonic, int intervalChromatic) else if (deviation == 0) textIntervalDeviated += i18n("a perfect"); else - textIntervalDeviated += i18n("an (unknown, %1)").arg(deviation); + textIntervalDeviated += i18n("an (unknown, %1)").tqarg(deviation); break; default: textIntervalDeviated += i18n("an (unknown)"); @@ -245,35 +245,35 @@ IntervalDialog::getIntervalName(int intervalDiatonic, int intervalChromatic) // "1 octave and a diminished octave" is better than // "2 octaves and a diminished unison" if (octaves > 0) { - textInterval += i18n("%1 octave").arg(textIntervalDeviated); + textInterval += i18n("%1 octave").tqarg(textIntervalDeviated); octaves--; } else if (octaves < 0) { - textInterval += i18n("%1 octave").arg(textIntervalDeviated); + textInterval += i18n("%1 octave").tqarg(textIntervalDeviated); octaves++; } else { - textInterval += i18n("%1 unison").arg(textIntervalDeviated); + textInterval += i18n("%1 unison").tqarg(textIntervalDeviated); } break; case 1: - textInterval += i18n("%1 second").arg(textIntervalDeviated); + textInterval += i18n("%1 second").tqarg(textIntervalDeviated); break; case 2: - textInterval += i18n("%1 third").arg(textIntervalDeviated); + textInterval += i18n("%1 third").tqarg(textIntervalDeviated); break; case 3: - textInterval += i18n("%1 fourth").arg(textIntervalDeviated); + textInterval += i18n("%1 fourth").tqarg(textIntervalDeviated); break; case 4: - textInterval += i18n("%1 fifth").arg(textIntervalDeviated); + textInterval += i18n("%1 fifth").tqarg(textIntervalDeviated); break; case 5: - textInterval += i18n("%1 sixth").arg(textIntervalDeviated); + textInterval += i18n("%1 sixth").tqarg(textIntervalDeviated); break; case 6: - textInterval += i18n("%1 seventh").arg(textIntervalDeviated); + textInterval += i18n("%1 seventh").tqarg(textIntervalDeviated); break; default: - textInterval += i18n("%1").arg(textIntervalDeviated); + textInterval += i18n("%1").tqarg(textIntervalDeviated); } } @@ -285,14 +285,14 @@ IntervalDialog::getIntervalName(int intervalDiatonic, int intervalChromatic) if (showStep) { return i18n("up 1 octave and %1", "up %n octaves and %1", - octaves).arg(textInterval); + octaves).tqarg(textInterval); } else { return i18n("up 1 octave", "up %n octaves", octaves); } } else { - return i18n("up %1").arg(textInterval); + return i18n("up %1").tqarg(textInterval); } } else @@ -301,14 +301,14 @@ IntervalDialog::getIntervalName(int intervalDiatonic, int intervalChromatic) if (showStep) { return i18n("down 1 octave and %1", "down %n octaves and %1", - octaves).arg(textInterval); + octaves).tqarg(textInterval); } else { return i18n("down 1 octave", "down %n octaves", octaves); } } else { - return i18n("down %1").arg(textInterval); + return i18n("down %1").tqarg(textInterval); } } } else { diff --git a/src/gui/dialogs/IntervalDialog.h b/src/gui/dialogs/IntervalDialog.h index f08326b..d464731 100644 --- a/src/gui/dialogs/IntervalDialog.h +++ b/src/gui/dialogs/IntervalDialog.h @@ -47,8 +47,9 @@ class RosegardenGUIDoc; class IntervalDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - IntervalDialog(TQWidget *parent, bool askChangeKey = false, bool askTransposeSegmentBack = false); + IntervalDialog(TQWidget *tqparent, bool askChangeKey = false, bool askTransposeSegmentBack = false); // Distance in semitones int getChromaticDistance(); diff --git a/src/gui/dialogs/KeySignatureDialog.cpp b/src/gui/dialogs/KeySignatureDialog.cpp index f47d71a..a649cc8 100644 --- a/src/gui/dialogs/KeySignatureDialog.cpp +++ b/src/gui/dialogs/KeySignatureDialog.cpp @@ -49,14 +49,14 @@ namespace Rosegarden { -KeySignatureDialog::KeySignatureDialog(TQWidget *parent, +KeySignatureDialog::KeySignatureDialog(TQWidget *tqparent, NotePixmapFactory *npf, Clef clef, Rosegarden::Key defaultKey, bool showApplyToAll, bool showConversionOptions, TQString explanatoryText) : - KDialogBase(parent, 0, true, i18n("Key Change"), Ok | Cancel | Help), + KDialogBase(tqparent, 0, true, i18n("Key Change"), Ok | Cancel | Help), m_notePixmapFactory(npf), m_key(defaultKey), m_clef(clef), @@ -73,17 +73,17 @@ KeySignatureDialog::KeySignatureDialog(TQWidget *parent, TQHBox *keyBox = 0; TQHBox *nameBox = 0; - TQGroupBox *keyFrame = new QGroupBox - (1, Horizontal, i18n("Key signature"), vbox); + TQGroupBox *keyFrame = new TQGroupBox + (1, Qt::Horizontal, i18n("Key signature"), vbox); - TQGroupBox *transposeFrame = new QButtonGroup - (1, Horizontal, i18n("Key transposition"), vbox); + TQGroupBox *transposeFrame = new TQButtonGroup + (1, Qt::Horizontal, i18n("Key transposition"), vbox); - TQGroupBox *buttonFrame = new QButtonGroup - (1, Horizontal, i18n("Scope"), vbox); + TQGroupBox *buttonFrame = new TQButtonGroup + (1, Qt::Horizontal, i18n("Scope"), vbox); - TQButtonGroup *conversionFrame = new QButtonGroup - (1, Horizontal, i18n("Existing notes following key change"), vbox); + TQButtonGroup *conversionFrame = new TQButtonGroup + (1, Qt::Horizontal, i18n("Existing notes following key change"), vbox); keyBox = new TQHBox(keyFrame); nameBox = new TQHBox(keyFrame); @@ -98,7 +98,7 @@ KeySignatureDialog::KeySignatureDialog(TQWidget *parent, (keyDown, i18n("Flatten")); m_keyLabel = new TQLabel(i18n("Key"), keyBox); - m_keyLabel->setAlignment(AlignVCenter | AlignHCenter); + m_keyLabel->tqsetAlignment(AlignVCenter | AlignHCenter); BigArrowButton *keyUp = new BigArrowButton(keyBox, Qt::RightArrow); TQToolTip::add @@ -148,13 +148,13 @@ KeySignatureDialog::KeySignatureDialog(TQWidget *parent, if (showConversionOptions) { m_noConversionButton = - new QRadioButton + new TQRadioButton (i18n("Maintain current pitches"), conversionFrame); m_convertButton = - new QRadioButton + new TQRadioButton (i18n("Maintain current accidentals"), conversionFrame); m_transposeButton = - new QRadioButton + new TQRadioButton (i18n("Transpose into this key"), conversionFrame); m_noConversionButton->setChecked(true); } else { @@ -290,7 +290,7 @@ KeySignatureDialog::regenerateKeyCombo() i != keys.end(); ++i) { TQString name(strtoqstr(i->getName())); - int space = name.find(' '); + int space = name.tqfind(' '); if (space > 0) name = name.left(space); @@ -325,7 +325,7 @@ KeySignatureDialog::redrawKeyPixmap() { if (m_valid) { TQPixmap pmap = - NotePixmapFactory::toQPixmap(m_notePixmapFactory->makeKeyDisplayPixmap(m_key, m_clef)); + NotePixmapFactory::toTQPixmap(m_notePixmapFactory->makeKeyDisplayPixmap(m_key, m_clef)); m_keyLabel->setPixmap(pmap); } else { m_keyLabel->setText(i18n("No such key")); diff --git a/src/gui/dialogs/KeySignatureDialog.h b/src/gui/dialogs/KeySignatureDialog.h index 2047ee7..96448d1 100644 --- a/src/gui/dialogs/KeySignatureDialog.h +++ b/src/gui/dialogs/KeySignatureDialog.h @@ -49,6 +49,7 @@ class NotePixmapFactory; class KeySignatureDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: enum ConversionType { @@ -57,7 +58,7 @@ public: Transpose }; - KeySignatureDialog(TQWidget *parent, + KeySignatureDialog(TQWidget *tqparent, NotePixmapFactory *npf, Clef clef, Rosegarden::Key defaultKey = diff --git a/src/gui/dialogs/LilyPondOptionsDialog.cpp b/src/gui/dialogs/LilyPondOptionsDialog.cpp index 6af8f86..9fc183e 100644 --- a/src/gui/dialogs/LilyPondOptionsDialog.cpp +++ b/src/gui/dialogs/LilyPondOptionsDialog.cpp @@ -54,11 +54,11 @@ namespace Rosegarden { -LilyPondOptionsDialog::LilyPondOptionsDialog(TQWidget *parent, +LilyPondOptionsDialog::LilyPondOptionsDialog(TQWidget *tqparent, RosegardenGUIDoc *doc, TQString windowCaption, TQString heading) : - KDialogBase(parent, 0, true, + KDialogBase(tqparent, 0, true, (windowCaption = "" ? i18n("LilyPond Export/Preview") : windowCaption), Apply | Ok | Cancel), m_doc(doc) @@ -101,27 +101,27 @@ LilyPondOptionsDialog::LilyPondOptionsDialog(TQWidget *parent, // LilyPond export: Basic options // - TQGroupBox *basicOptionsBox = new QGroupBox - (1, Horizontal, + TQGroupBox *basicOptionsBox = new TQGroupBox + (1, Qt::Horizontal, i18n("Basic options"), generalFrame); generalGrid->addWidget(basicOptionsBox, 0, 0); TQFrame *frameBasic = new TQFrame(basicOptionsBox); - TQGridLayout *layoutBasic = new TQGridLayout(frameBasic, 3, 2, 10, 5); + TQGridLayout *tqlayoutBasic = new TQGridLayout(frameBasic, 3, 2, 10, 5); - layoutBasic->addWidget(new TQLabel( + tqlayoutBasic->addWidget(new TQLabel( i18n("Compatibility level"), frameBasic), 0, 0); m_lilyLanguage = new KComboBox(frameBasic); // See also setDefaultLilyPondVersion below - m_lilyLanguage->insertItem(i18n("LilyPond %1").arg("2.6")); - m_lilyLanguage->insertItem(i18n("LilyPond %1").arg("2.8")); - m_lilyLanguage->insertItem(i18n("LilyPond %1").arg("2.10")); - m_lilyLanguage->insertItem(i18n("LilyPond %1").arg("2.12")); + m_lilyLanguage->insertItem(i18n("LilyPond %1").tqarg("2.6")); + m_lilyLanguage->insertItem(i18n("LilyPond %1").tqarg("2.8")); + m_lilyLanguage->insertItem(i18n("LilyPond %1").tqarg("2.10")); + m_lilyLanguage->insertItem(i18n("LilyPond %1").tqarg("2.12")); m_lilyLanguage->setCurrentItem(config->readUnsignedNumEntry("lilylanguage", 0)); - layoutBasic->addWidget(m_lilyLanguage, 0, 1); + tqlayoutBasic->addWidget(m_lilyLanguage, 0, 1); - layoutBasic->addWidget(new TQLabel( + tqlayoutBasic->addWidget(new TQLabel( i18n("Paper size"), frameBasic), 1, 0); TQHBoxLayout *hboxPaper = new TQHBoxLayout( frameBasic ); @@ -146,33 +146,33 @@ LilyPondOptionsDialog::LilyPondOptionsDialog(TQWidget *parent, hboxPaper->addWidget( m_lilyPaperSize ); hboxPaper->addWidget( new TQLabel( " ", frameBasic ) ); // fixed-size spacer hboxPaper->addWidget( m_lilyPaperLandscape ); - layoutBasic->addLayout(hboxPaper, 1, 1); + tqlayoutBasic->addLayout(hboxPaper, 1, 1); - layoutBasic->addWidget(new TQLabel( + tqlayoutBasic->addWidget(new TQLabel( i18n("Font size"), frameBasic), 2, 0); m_lilyFontSize = new KComboBox(frameBasic); int sizes[] = { 11, 13, 16, 19, 20, 23, 26 }; for (int i = 0; i < sizeof(sizes)/sizeof(sizes[0]); ++i) { - m_lilyFontSize->insertItem(i18n("%1 pt").arg(sizes[i])); + m_lilyFontSize->insertItem(i18n("%1 pt").tqarg(sizes[i])); } m_lilyFontSize->setCurrentItem(config->readUnsignedNumEntry ("lilyfontsize", 4)); - layoutBasic->addWidget(m_lilyFontSize, 2, 1); + tqlayoutBasic->addWidget(m_lilyFontSize, 2, 1); // // LilyPond export: Staff level options // - TQGroupBox *staffOptionsBox = new QGroupBox - (1, Horizontal, + TQGroupBox *staffOptionsBox = new TQGroupBox + (1, Qt::Horizontal, i18n("Staff level options"), generalFrame); generalGrid->addWidget(staffOptionsBox, 1, 0); TQFrame *frameStaff = new TQFrame(staffOptionsBox); - TQGridLayout *layoutStaff = new TQGridLayout(frameStaff, 2, 2, 10, 5); + TQGridLayout *tqlayoutStaff = new TQGridLayout(frameStaff, 2, 2, 10, 5); - layoutStaff->addWidget(new TQLabel( + tqlayoutStaff->addWidget(new TQLabel( i18n("Export content"), frameStaff), 0, 0); m_lilyExportSelection = new KComboBox(frameStaff); @@ -182,24 +182,24 @@ LilyPondOptionsDialog::LilyPondOptionsDialog(TQWidget *parent, m_lilyExportSelection->insertItem(i18n("Selected segments")); m_lilyExportSelection->setCurrentItem(config->readUnsignedNumEntry("lilyexportselection", 1)); - layoutStaff->addWidget(m_lilyExportSelection, 0, 1); + tqlayoutStaff->addWidget(m_lilyExportSelection, 0, 1); m_lilyExportStaffMerge = new TQCheckBox( i18n("Merge tracks that have the same name"), frameStaff); m_lilyExportStaffMerge->setChecked(config->readBoolEntry("lilyexportstaffmerge", false)); - layoutStaff->addMultiCellWidget(m_lilyExportStaffMerge, 1, 1, 0, 1); + tqlayoutStaff->addMultiCellWidget(m_lilyExportStaffMerge, 1, 1, 0, 1); // // LilyPond export: Notation options // - TQGroupBox *notationOptionsBox = new QGroupBox - (1, Horizontal, + TQGroupBox *notationOptionsBox = new TQGroupBox + (1, Qt::Horizontal, i18n("Notation options"), generalFrame); generalGrid->addWidget(notationOptionsBox, 2, 0); TQFrame *frameNotation = new TQFrame(notationOptionsBox); - TQGridLayout *layoutNotation = new TQGridLayout(frameNotation, 4, 2, 10, 5); + TQGridLayout *tqlayoutNotation = new TQGridLayout(frameNotation, 4, 2, 10, 5); m_lilyTempoMarks = new KComboBox( frameNotation ); m_lilyTempoMarks->insertItem(i18n("None")); @@ -207,9 +207,9 @@ LilyPondOptionsDialog::LilyPondOptionsDialog(TQWidget *parent, m_lilyTempoMarks->insertItem(i18n("All")); m_lilyTempoMarks->setCurrentItem(config->readUnsignedNumEntry("lilyexporttempomarks", 0)); - layoutNotation->addWidget( new TQLabel( + tqlayoutNotation->addWidget( new TQLabel( i18n("Export tempo marks "), frameNotation), 0, 0 ); - layoutNotation->addWidget(m_lilyTempoMarks, 0, 1); + tqlayoutNotation->addWidget(m_lilyTempoMarks, 0, 1); m_lilyExportLyrics = new TQCheckBox( i18n("Export lyrics"), frameNotation); @@ -219,19 +219,19 @@ LilyPondOptionsDialog::LilyPondOptionsDialog(TQWidget *parent, // fixed, no "- - -" lyrics are generated for an empty lyrics // default again into lyrics - HJJ m_lilyExportLyrics->setChecked(config->readBoolEntry("lilyexportlyrics", true)); - layoutNotation->addMultiCellWidget(m_lilyExportLyrics, 1, 1, 0, 1); + tqlayoutNotation->addMultiCellWidget(m_lilyExportLyrics, 1, 1, 0, 1); m_lilyExportBeams = new TQCheckBox( i18n("Export beamings"), frameNotation); m_lilyExportBeams->setChecked(config->readBoolEntry("lilyexportbeamings", false)); - layoutNotation->addMultiCellWidget(m_lilyExportBeams, 2, 2, 0, 1); + tqlayoutNotation->addMultiCellWidget(m_lilyExportBeams, 2, 2, 0, 1); // recycle this for a new option to ignore the track brackets (so it is less // obnoxious to print single parts where brackets are in place) m_lilyExportStaffGroup = new TQCheckBox( i18n("Export track staff brackets"), frameNotation); m_lilyExportStaffGroup->setChecked(config->readBoolEntry("lilyexportstaffbrackets", true)); - layoutNotation->addMultiCellWidget(m_lilyExportStaffGroup, 3, 3, 0, 1); + tqlayoutNotation->addMultiCellWidget(m_lilyExportStaffGroup, 3, 3, 0, 1); generalGrid->setRowStretch(4, 10); @@ -239,46 +239,46 @@ LilyPondOptionsDialog::LilyPondOptionsDialog(TQWidget *parent, // LilyPond export: Advanced options // - TQGroupBox *advancedLayoutOptionsBox = new QGroupBox - (1, Horizontal, + TQGroupBox *advancedLayoutOptionsBox = new TQGroupBox + (1, Qt::Horizontal, i18n("Layout options"), advancedFrame); advancedGrid->addWidget(advancedLayoutOptionsBox, 0, 0); TQFrame *frameAdvancedLayout = new TQFrame(advancedLayoutOptionsBox); - TQGridLayout *layoutAdvancedLayout = new TQGridLayout(frameAdvancedLayout, 2, 2, 10, 5); + TQGridLayout *tqlayoutAdvancedLayout = new TQGridLayout(frameAdvancedLayout, 2, 2, 10, 5); m_lilyLyricsHAlignment = new KComboBox( frameAdvancedLayout ); m_lilyLyricsHAlignment->insertItem(i18n("Left")); m_lilyLyricsHAlignment->insertItem(i18n("Center")); m_lilyLyricsHAlignment->insertItem(i18n("Right")); - m_lilyLyricsHAlignment->setCurrentItem(config->readUnsignedNumEntry("lilylyricshalignment", 0)); + m_lilyLyricsHAlignment->setCurrentItem(config->readUnsignedNumEntry("lilylyricshtqalignment", 0)); - layoutAdvancedLayout->addWidget(new TQLabel( - i18n("Lyrics alignment"), frameAdvancedLayout), 0, 0); - layoutAdvancedLayout->addWidget(m_lilyLyricsHAlignment, 0, 1); + tqlayoutAdvancedLayout->addWidget(new TQLabel( + i18n("Lyrics tqalignment"), frameAdvancedLayout), 0, 0); + tqlayoutAdvancedLayout->addWidget(m_lilyLyricsHAlignment, 0, 1); m_lilyRaggedBottom = new TQCheckBox( i18n("Ragged bottom (systems will not be spread vertically across the page)"), frameAdvancedLayout); m_lilyRaggedBottom->setChecked(config->readBoolEntry("lilyraggedbottom", false)); - layoutAdvancedLayout->addMultiCellWidget(m_lilyRaggedBottom, 1, 2, 0, 1); + tqlayoutAdvancedLayout->addMultiCellWidget(m_lilyRaggedBottom, 1, 2, 0, 1); - TQGroupBox *miscOptionsBox = new QGroupBox - (1, Horizontal, + TQGroupBox *miscOptionsBox = new TQGroupBox + (1, Qt::Horizontal, i18n("Miscellaneous options"), advancedFrame); advancedGrid->addWidget(miscOptionsBox, 1, 0); TQFrame *frameMisc = new TQFrame(miscOptionsBox); - TQGridLayout *layoutMisc = new TQGridLayout(frameMisc, 2, 2, 10, 5); + TQGridLayout *tqlayoutMisc = new TQGridLayout(frameMisc, 2, 2, 10, 5); m_lilyExportPointAndClick = new TQCheckBox( i18n("Enable \"point and click\" debugging"), frameMisc); m_lilyExportPointAndClick->setChecked(config->readBoolEntry("lilyexportpointandclick", false)); - layoutMisc->addMultiCellWidget(m_lilyExportPointAndClick, 0, 0, 0, 1); + tqlayoutMisc->addMultiCellWidget(m_lilyExportPointAndClick, 0, 0, 0, 1); m_lilyExportMidi = new TQCheckBox( i18n("Export \\midi block"), frameMisc); m_lilyExportMidi->setChecked(config->readBoolEntry("lilyexportmidi", false)); - layoutMisc->addMultiCellWidget(m_lilyExportMidi, 1, 1, 0, 1); + tqlayoutMisc->addMultiCellWidget(m_lilyExportMidi, 1, 1, 0, 1); m_lilyMarkerMode = new KComboBox(frameMisc); m_lilyMarkerMode->insertItem(i18n("No markers")); @@ -286,13 +286,13 @@ LilyPondOptionsDialog::LilyPondOptionsDialog(TQWidget *parent, m_lilyMarkerMode->insertItem(i18n("Marker text")); m_lilyMarkerMode->setCurrentItem(config->readUnsignedNumEntry("lilyexportmarkermode", 0)); - layoutMisc->addWidget( new TQLabel( + tqlayoutMisc->addWidget( new TQLabel( i18n("Export markers"), frameMisc),2, 0 ); - layoutMisc->addWidget(m_lilyMarkerMode, 2, 1); + tqlayoutMisc->addWidget(m_lilyMarkerMode, 2, 1); advancedGrid->setRowStretch(2, 10); - resize(minimumSize()); + resize(tqminimumSize()); } void @@ -314,7 +314,7 @@ LilyPondOptionsDialog::slotApply() config->writeEntry("lilyexportbeamings", m_lilyExportBeams->isChecked()); config->writeEntry("lilyexportstaffmerge", m_lilyExportStaffMerge->isChecked()); config->writeEntry("lilyexportstaffbrackets", m_lilyExportStaffGroup->isChecked()); - config->writeEntry("lilylyricshalignment", m_lilyLyricsHAlignment->currentItem()); + config->writeEntry("lilylyricshtqalignment", m_lilyLyricsHAlignment->currentItem()); config->writeEntry("lilyexportmarkermode", m_lilyMarkerMode->currentItem()); m_headersPage->apply(); } diff --git a/src/gui/dialogs/LilyPondOptionsDialog.h b/src/gui/dialogs/LilyPondOptionsDialog.h index 9071818..e0272ca 100644 --- a/src/gui/dialogs/LilyPondOptionsDialog.h +++ b/src/gui/dialogs/LilyPondOptionsDialog.h @@ -45,9 +45,10 @@ class HeadersConfigurationPage; class LilyPondOptionsDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - LilyPondOptionsDialog(TQWidget *parent, + LilyPondOptionsDialog(TQWidget *tqparent, RosegardenGUIDoc *doc, TQString windowCaption = "", TQString heading = ""); diff --git a/src/gui/dialogs/LyricEditDialog.cpp b/src/gui/dialogs/LyricEditDialog.cpp index 691f046..faae635 100644 --- a/src/gui/dialogs/LyricEditDialog.cpp +++ b/src/gui/dialogs/LyricEditDialog.cpp @@ -48,9 +48,9 @@ namespace Rosegarden { -LyricEditDialog::LyricEditDialog(TQWidget *parent, +LyricEditDialog::LyricEditDialog(TQWidget *tqparent, Segment *segment) : - KDialogBase(parent, 0, true, i18n("Edit Lyrics"), Ok | Cancel | Help), + KDialogBase(tqparent, 0, true, i18n("Edit Lyrics"), Ok | Cancel | Help), m_segment(segment), m_verseCount(0) { @@ -58,8 +58,8 @@ LyricEditDialog::LyricEditDialog(TQWidget *parent, TQVBox *vbox = makeVBoxMainWidget(); - TQGroupBox *groupBox = new QGroupBox - (1, Horizontal, i18n("Lyrics for this segment"), vbox); + TQGroupBox *groupBox = new TQGroupBox + (1, Qt::Horizontal, i18n("Lyrics for this segment"), vbox); TQHBox *hbox = new TQHBox(groupBox); hbox->setSpacing(5); @@ -73,7 +73,7 @@ LyricEditDialog::LyricEditDialog(TQWidget *parent, hbox->setStretchFactor(f, 10); m_textEdit = new TQTextEdit(groupBox); - m_textEdit->setTextFormat(Qt::PlainText); + m_textEdit->setTextFormat(TQt::PlainText); m_textEdit->setMinimumWidth(300); m_textEdit->setMinimumHeight(200); @@ -81,7 +81,7 @@ LyricEditDialog::LyricEditDialog(TQWidget *parent, unparse(); for (int i = 0; i < m_verseCount; ++i) { - m_verseNumber->insertItem(i18n("Verse %1").arg(i + 1)); + m_verseNumber->insertItem(i18n("Verse %1").tqarg(i + 1)); } m_currentVerse = 0; if (m_verseCount == 12) m_verseAddButton->setEnabled(false); @@ -103,7 +103,7 @@ LyricEditDialog::slotAddVerse() NOTATION_DEBUG << "LyricEditDialog::slotAddVerse" << endl; m_verseCount++; m_texts.push_back(m_skeleton); - m_verseNumber->insertItem(i18n("Verse %1").arg(m_verseCount)); + m_verseNumber->insertItem(i18n("Verse %1").tqarg(m_verseCount)); m_verseNumber->setCurrentItem(m_verseCount - 1); slotVerseNumberChanged(m_verseCount - 1); if (m_verseCount == 12) m_verseAddButton->setEnabled(false); @@ -148,7 +148,7 @@ LyricEditDialog::unparse() int lastBarNo = comp->getBarNumber(lastTime); std::map<int, bool> haveLyric; - TQString fragment = TQString("[%1] ").arg(lastBarNo + 1); + TQString fragment = TQString("[%1] ").tqarg(lastBarNo + 1); m_skeleton = fragment; m_texts.clear(); @@ -192,7 +192,7 @@ LyricEditDialog::unparse() ++lastBarNo; } - fragment += TQString("\n[%1] ").arg(myBarNo + 1); + fragment += TQString("\n[%1] ").tqarg(myBarNo + 1); m_skeleton += fragment; for (size_t v = 0; v < m_verseCount; ++v) m_texts[v] += fragment; @@ -219,7 +219,7 @@ LyricEditDialog::unparse() (*i)->get<Int>(Text::LyricVersePropertyName, verse); TQString syllable(strtoqstr(ssyllable)); - syllable.replace(TQRegExp("\\s+"), "~"); + syllable.tqreplace(TQRegExp("\\s+"), "~"); m_texts[verse] += " " + syllable; haveLyric[verse] = true; @@ -239,7 +239,7 @@ LyricEditDialog::getVerseCount() const return m_verseCount; } -QString +TQString LyricEditDialog::getLyricData(int verse) const { if (verse == m_verseNumber->currentItem()) { diff --git a/src/gui/dialogs/LyricEditDialog.h b/src/gui/dialogs/LyricEditDialog.h index 6f51e24..fe46882 100644 --- a/src/gui/dialogs/LyricEditDialog.h +++ b/src/gui/dialogs/LyricEditDialog.h @@ -46,9 +46,10 @@ class Segment; class LyricEditDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - LyricEditDialog(TQWidget *parent, Segment *segment); + LyricEditDialog(TQWidget *tqparent, Segment *segment); int getVerseCount() const; TQString getLyricData(int verse) const; diff --git a/src/gui/dialogs/MakeOrnamentDialog.cpp b/src/gui/dialogs/MakeOrnamentDialog.cpp index 3dfbddb..e403a7d 100644 --- a/src/gui/dialogs/MakeOrnamentDialog.cpp +++ b/src/gui/dialogs/MakeOrnamentDialog.cpp @@ -40,13 +40,13 @@ namespace Rosegarden { -MakeOrnamentDialog::MakeOrnamentDialog(TQWidget *parent, TQString defaultName, +MakeOrnamentDialog::MakeOrnamentDialog(TQWidget *tqparent, TQString defaultName, int defaultBasePitch) : - KDialogBase(parent, "makeornamentdialog", true, i18n("Make Ornament"), + KDialogBase(tqparent, "makeornamentdialog", true, i18n("Make Ornament"), Ok | Cancel, Ok) { TQVBox *vbox = makeVBoxMainWidget(); - TQGroupBox *nameBox = new TQGroupBox(2, Vertical, i18n("Name"), vbox); + TQGroupBox *nameBox = new TQGroupBox(2, Qt::Vertical, i18n("Name"), vbox); new TQLabel(i18n("The name is used to identify both the ornament\nand the triggered segment that stores\nthe ornament's notes."), nameBox); @@ -57,7 +57,7 @@ MakeOrnamentDialog::MakeOrnamentDialog(TQWidget *parent, TQString defaultName, m_pitch = new PitchChooser(i18n("Base pitch"), vbox, defaultBasePitch); } -QString +TQString MakeOrnamentDialog::getName() const { return m_name->text(); diff --git a/src/gui/dialogs/MakeOrnamentDialog.h b/src/gui/dialogs/MakeOrnamentDialog.h index 0a4a00d..4396c18 100644 --- a/src/gui/dialogs/MakeOrnamentDialog.h +++ b/src/gui/dialogs/MakeOrnamentDialog.h @@ -43,9 +43,10 @@ class PitchChooser; class MakeOrnamentDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - MakeOrnamentDialog(TQWidget *parent, TQString defaultName, int defaultBasePitch); + MakeOrnamentDialog(TQWidget *tqparent, TQString defaultName, int defaultBasePitch); TQString getName() const; int getBasePitch() const; diff --git a/src/gui/dialogs/ManageMetronomeDialog.cpp b/src/gui/dialogs/ManageMetronomeDialog.cpp index 0b51e26..64b99f7 100644 --- a/src/gui/dialogs/ManageMetronomeDialog.cpp +++ b/src/gui/dialogs/ManageMetronomeDialog.cpp @@ -58,9 +58,9 @@ namespace Rosegarden { -ManageMetronomeDialog::ManageMetronomeDialog(TQWidget *parent, +ManageMetronomeDialog::ManageMetronomeDialog(TQWidget *tqparent, RosegardenGUIDoc *doc) : - KDialogBase(parent, 0, true, i18n("Metronome"), Ok | Apply | Close | Help), + KDialogBase(tqparent, 0, true, i18n("Metronome"), Ok | Apply | Close | Help), m_doc(doc) { setHelp("studio-metronome"); @@ -73,15 +73,15 @@ ManageMetronomeDialog::ManageMetronomeDialog(TQWidget *parent, TQVBox *vbox = new TQVBox(hbox); - TQGroupBox *deviceBox = new QGroupBox - (1, Horizontal, i18n("Metronome Instrument"), vbox); + TQGroupBox *deviceBox = new TQGroupBox + (1, Qt::Horizontal, i18n("Metronome Instrument"), vbox); TQFrame *frame = new TQFrame(deviceBox); - TQGridLayout *layout = new TQGridLayout(frame, 2, 2, 10, 5); + TQGridLayout *tqlayout = new TQGridLayout(frame, 2, 2, 10, 5); - layout->addWidget(new TQLabel(i18n("Device"), frame), 0, 0); + tqlayout->addWidget(new TQLabel(i18n("Device"), frame), 0, 0); m_metronomeDevice = new KComboBox(frame); - layout->addWidget(m_metronomeDevice, 0, 1); + tqlayout->addWidget(m_metronomeDevice, 0, 1); DeviceList *devices = doc->getStudio().getDevices(); DeviceListConstIterator it; @@ -108,47 +108,47 @@ ManageMetronomeDialog::ManageMetronomeDialog(TQWidget *parent, } } - layout->addWidget(new TQLabel(i18n("Instrument"), frame), 1, 0); + tqlayout->addWidget(new TQLabel(i18n("Instrument"), frame), 1, 0); m_metronomeInstrument = new KComboBox(frame); connect(m_metronomeInstrument, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotSetModified())); connect(m_metronomeInstrument, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotInstrumentChanged(int))); - layout->addWidget(m_metronomeInstrument, 1, 1); + tqlayout->addWidget(m_metronomeInstrument, 1, 1); - TQGroupBox *beatBox = new QGroupBox - (1, Horizontal, i18n("Beats"), vbox); + TQGroupBox *beatBox = new TQGroupBox + (1, Qt::Horizontal, i18n("Beats"), vbox); frame = new TQFrame(beatBox); - layout = new TQGridLayout(frame, 4, 2, 10, 5); + tqlayout = new TQGridLayout(frame, 4, 2, 10, 5); - layout->addWidget(new TQLabel(i18n("Resolution"), frame), 0, 0); + tqlayout->addWidget(new TQLabel(i18n("Resolution"), frame), 0, 0); m_metronomeResolution = new KComboBox(frame); m_metronomeResolution->insertItem(i18n("None")); m_metronomeResolution->insertItem(i18n("Bars only")); m_metronomeResolution->insertItem(i18n("Bars and beats")); m_metronomeResolution->insertItem(i18n("Bars, beats, and divisions")); connect(m_metronomeResolution, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotResolutionChanged(int))); - layout->addWidget(m_metronomeResolution, 0, 1); + tqlayout->addWidget(m_metronomeResolution, 0, 1); - layout->addWidget(new TQLabel(i18n("Bar velocity"), frame), 1, 0); + tqlayout->addWidget(new TQLabel(i18n("Bar velocity"), frame), 1, 0); m_metronomeBarVely = new TQSpinBox(frame); m_metronomeBarVely->setMinValue(0); m_metronomeBarVely->setMaxValue(127); connect(m_metronomeBarVely, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotSetModified())); - layout->addWidget(m_metronomeBarVely, 1, 1); + tqlayout->addWidget(m_metronomeBarVely, 1, 1); - layout->addWidget(new TQLabel(i18n("Beat velocity"), frame), 2, 0); + tqlayout->addWidget(new TQLabel(i18n("Beat velocity"), frame), 2, 0); m_metronomeBeatVely = new TQSpinBox(frame); m_metronomeBeatVely->setMinValue(0); m_metronomeBeatVely->setMaxValue(127); connect(m_metronomeBeatVely, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotSetModified())); - layout->addWidget(m_metronomeBeatVely, 2, 1); + tqlayout->addWidget(m_metronomeBeatVely, 2, 1); - layout->addWidget(new TQLabel(i18n("Sub-beat velocity"), frame), 3, 0); + tqlayout->addWidget(new TQLabel(i18n("Sub-beat velocity"), frame), 3, 0); m_metronomeSubBeatVely = new TQSpinBox(frame); m_metronomeSubBeatVely->setMinValue(0); m_metronomeSubBeatVely->setMaxValue(127); connect(m_metronomeSubBeatVely, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotSetModified())); - layout->addWidget(m_metronomeSubBeatVely, 3, 1); + tqlayout->addWidget(m_metronomeSubBeatVely, 3, 1); vbox = new TQVBox(hbox); @@ -162,8 +162,8 @@ ManageMetronomeDialog::ManageMetronomeDialog(TQWidget *parent, m_metronomePitchSelector->insertItem(i18n("for Sub-beat")); connect(m_metronomePitchSelector, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotPitchSelectorChanged(int))); - TQGroupBox *enableBox = new QGroupBox - (1, Horizontal, i18n("Metronome Activated"), vbox); + TQGroupBox *enableBox = new TQGroupBox + (1, Qt::Horizontal, i18n("Metronome Activated"), vbox); m_playEnabled = new TQCheckBox(i18n("Playing"), enableBox); m_recordEnabled = new TQCheckBox(i18n("Recording"), enableBox); connect(m_playEnabled, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotSetModified())); @@ -261,7 +261,7 @@ ManageMetronomeDialog::populate(int deviceIndex) } } - // if (used) iname = i18n("%1 [used]").arg(iname); + // if (used) iname = i18n("%1 [used]").tqarg(iname); m_metronomeInstrument->insertItem(iname); diff --git a/src/gui/dialogs/ManageMetronomeDialog.h b/src/gui/dialogs/ManageMetronomeDialog.h index 240c0b8..fbb28f6 100644 --- a/src/gui/dialogs/ManageMetronomeDialog.h +++ b/src/gui/dialogs/ManageMetronomeDialog.h @@ -47,9 +47,10 @@ class InstrumentParameterBox; class ManageMetronomeDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - ManageMetronomeDialog(TQWidget *parent, RosegardenGUIDoc *doc); + ManageMetronomeDialog(TQWidget *tqparent, RosegardenGUIDoc *doc); void setModified(bool value); diff --git a/src/gui/dialogs/MarkerModifyDialog.cpp b/src/gui/dialogs/MarkerModifyDialog.cpp index 9303b67..c1eefab 100644 --- a/src/gui/dialogs/MarkerModifyDialog.cpp +++ b/src/gui/dialogs/MarkerModifyDialog.cpp @@ -45,20 +45,20 @@ namespace Rosegarden { -MarkerModifyDialog::MarkerModifyDialog(TQWidget *parent, +MarkerModifyDialog::MarkerModifyDialog(TQWidget *tqparent, Composition *composition, int time, const TQString &name, const TQString &des): - KDialogBase(parent, 0, true, i18n("Edit Marker"), Ok | Cancel) + KDialogBase(tqparent, 0, true, i18n("Edit Marker"), Ok | Cancel) { initialise(composition, time, name, des); } -MarkerModifyDialog::MarkerModifyDialog(TQWidget *parent, +MarkerModifyDialog::MarkerModifyDialog(TQWidget *tqparent, Composition *composition, Marker *marker) : - KDialogBase(parent, 0, true, i18n("Edit Marker"), Ok | Cancel) + KDialogBase(tqparent, 0, true, i18n("Edit Marker"), Ok | Cancel) { initialise(composition, marker->getTime(), strtoqstr(marker->getName()), @@ -80,9 +80,9 @@ MarkerModifyDialog::initialise(Composition *composition, /*!!! - layout->addWidget(new TQLabel(i18n("Absolute Time:"), frame), 0, 0); + tqlayout->addWidget(new TQLabel(i18n("Absolute Time:"), frame), 0, 0); m_timeEdit = new TQSpinBox(frame); - layout->addWidget(m_timeEdit, 0, 1); + tqlayout->addWidget(m_timeEdit, 0, 1); m_timeEdit->setMinValue(INT_MIN); m_timeEdit->setMaxValue(INT_MAX); @@ -90,20 +90,20 @@ MarkerModifyDialog::initialise(Composition *composition, Note(Note::Shortest).getDuration()); m_timeEdit->setValue(time); */ - TQGroupBox *groupBox = new QGroupBox - (1, Horizontal, i18n("Marker Properties"), vbox); + TQGroupBox *groupBox = new TQGroupBox + (1, Qt::Horizontal, i18n("Marker Properties"), vbox); TQFrame *frame = new TQFrame(groupBox); - TQGridLayout *layout = new TQGridLayout(frame, 2, 2, 5, 5); + TQGridLayout *tqlayout = new TQGridLayout(frame, 2, 2, 5, 5); - layout->addWidget(new TQLabel(i18n("Text:"), frame), 0, 0); + tqlayout->addWidget(new TQLabel(i18n("Text:"), frame), 0, 0); m_nameEdit = new TQLineEdit(name, frame); - layout->addWidget(m_nameEdit, 0, 1); + tqlayout->addWidget(m_nameEdit, 0, 1); - layout->addWidget(new TQLabel(i18n("Description:"), frame), 1, 0); + tqlayout->addWidget(new TQLabel(i18n("Description:"), frame), 1, 0); m_desEdit = new TQLineEdit(des, frame); - layout->addWidget(m_desEdit, 1, 1); + tqlayout->addWidget(m_desEdit, 1, 1); m_nameEdit->selectAll(); m_nameEdit->setFocus(); diff --git a/src/gui/dialogs/MarkerModifyDialog.h b/src/gui/dialogs/MarkerModifyDialog.h index da4894b..2da55ca 100644 --- a/src/gui/dialogs/MarkerModifyDialog.h +++ b/src/gui/dialogs/MarkerModifyDialog.h @@ -45,14 +45,15 @@ class Composition; class MarkerModifyDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - MarkerModifyDialog(TQWidget *parent, + MarkerModifyDialog(TQWidget *tqparent, Composition *composition, int time, const TQString &name, const TQString &des); - MarkerModifyDialog(TQWidget *parent, + MarkerModifyDialog(TQWidget *tqparent, Composition *composition, Marker *marker); diff --git a/src/gui/dialogs/PasteNotationDialog.cpp b/src/gui/dialogs/PasteNotationDialog.cpp index cea3b87..8ea23b0 100644 --- a/src/gui/dialogs/PasteNotationDialog.cpp +++ b/src/gui/dialogs/PasteNotationDialog.cpp @@ -39,17 +39,17 @@ namespace Rosegarden { -PasteNotationDialog::PasteNotationDialog(TQWidget *parent, +PasteNotationDialog::PasteNotationDialog(TQWidget *tqparent, PasteEventsCommand::PasteType defaultType) : - KDialogBase(parent, 0, true, i18n("Paste"), Ok | Cancel | Help ), + KDialogBase(tqparent, 0, true, i18n("Paste"), Ok | Cancel | Help ), m_defaultType(defaultType) { setHelp("nv-paste-types"); TQVBox *vbox = makeVBoxMainWidget(); - TQButtonGroup *pasteTypeGroup = new QButtonGroup - (1, Horizontal, i18n("Paste type"), vbox); + TQButtonGroup *pasteTypeGroup = new TQButtonGroup + (1, Qt::Horizontal, i18n("Paste type"), vbox); PasteEventsCommand::PasteTypeMap pasteTypes = PasteEventsCommand::getPasteTypes(); @@ -65,10 +65,10 @@ PasteNotationDialog::PasteNotationDialog(TQWidget *parent, m_pasteTypeButtons.push_back(button); } - TQButtonGroup *setAsDefaultGroup = new QButtonGroup - (1, Horizontal, i18n("Options"), vbox); + TQButtonGroup *setAsDefaultGroup = new TQButtonGroup + (1, Qt::Horizontal, i18n("Options"), vbox); - m_setAsDefaultButton = new QCheckBox + m_setAsDefaultButton = new TQCheckBox (i18n("Make this the default paste type"), setAsDefaultGroup); m_setAsDefaultButton->setChecked(true); } diff --git a/src/gui/dialogs/PasteNotationDialog.h b/src/gui/dialogs/PasteNotationDialog.h index bff6d7e..d604d0e 100644 --- a/src/gui/dialogs/PasteNotationDialog.h +++ b/src/gui/dialogs/PasteNotationDialog.h @@ -44,9 +44,10 @@ namespace Rosegarden class PasteNotationDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - PasteNotationDialog(TQWidget *parent, + PasteNotationDialog(TQWidget *tqparent, PasteEventsCommand::PasteType defaultType); PasteEventsCommand::PasteType getPasteType() const; diff --git a/src/gui/dialogs/PitchDialog.cpp b/src/gui/dialogs/PitchDialog.cpp index c484142..169ff21 100644 --- a/src/gui/dialogs/PitchDialog.cpp +++ b/src/gui/dialogs/PitchDialog.cpp @@ -36,8 +36,8 @@ namespace Rosegarden { -PitchDialog::PitchDialog(TQWidget *parent, TQString title, int defaultPitch) : - KDialogBase(parent, 0, true, title, User1 | Ok) +PitchDialog::PitchDialog(TQWidget *tqparent, TQString title, int defaultPitch) : + KDialogBase(tqparent, 0, true, title, User1 | Ok) { TQVBox *vbox = makeVBoxMainWidget(); m_pitchChooser = new PitchChooser(title, vbox, defaultPitch); diff --git a/src/gui/dialogs/PitchDialog.h b/src/gui/dialogs/PitchDialog.h index 8a4cce7..dd228bf 100644 --- a/src/gui/dialogs/PitchDialog.h +++ b/src/gui/dialogs/PitchDialog.h @@ -42,8 +42,9 @@ class PitchChooser; class PitchDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - PitchDialog(TQWidget *parent, TQString title, int defaultPitch = 60); + PitchDialog(TQWidget *tqparent, TQString title, int defaultPitch = 60); int getPitch() const; diff --git a/src/gui/dialogs/PitchPickerDialog.cpp b/src/gui/dialogs/PitchPickerDialog.cpp index dddc2a3..737726c 100644 --- a/src/gui/dialogs/PitchPickerDialog.cpp +++ b/src/gui/dialogs/PitchPickerDialog.cpp @@ -36,17 +36,17 @@ namespace Rosegarden { -PitchPickerDialog::PitchPickerDialog(TQWidget *parent, int initialPitch, TQString text) : - KDialogBase(parent, 0, true, i18n("Pitch Selector"), Ok | Cancel) +PitchPickerDialog::PitchPickerDialog(TQWidget *tqparent, int initialPitch, TQString text) : + KDialogBase(tqparent, 0, true, i18n("Pitch Selector"), Ok | Cancel) { TQVBox *vBox = makeVBoxMainWidget(); TQFrame *frame = new TQFrame(vBox); - TQGridLayout *layout = new TQGridLayout(frame, 4, 3, 10, 5); + TQGridLayout *tqlayout = new TQGridLayout(frame, 4, 3, 10, 5); m_pitch = new PitchChooser(text, frame, initialPitch); - layout->addMultiCellWidget(m_pitch, 0, 0, 0, 2, Qt::AlignHCenter); + tqlayout->addMultiCellWidget(m_pitch, 0, 0, 0, 2, TQt::AlignHCenter); } PitchPickerDialog::~PitchPickerDialog() diff --git a/src/gui/dialogs/PitchPickerDialog.h b/src/gui/dialogs/PitchPickerDialog.h index 25fc28f..23125c9 100644 --- a/src/gui/dialogs/PitchPickerDialog.h +++ b/src/gui/dialogs/PitchPickerDialog.h @@ -39,10 +39,11 @@ namespace Rosegarden class PitchPickerDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - PitchPickerDialog(TQWidget* parent, int initialPitch, TQString text); + PitchPickerDialog(TQWidget* tqparent, int initialPitch, TQString text); ~PitchPickerDialog(); int getPitch() { return m_pitch->getPitch(); } diff --git a/src/gui/dialogs/QuantizeDialog.cpp b/src/gui/dialogs/QuantizeDialog.cpp index 87d7f79..d893b1c 100644 --- a/src/gui/dialogs/QuantizeDialog.cpp +++ b/src/gui/dialogs/QuantizeDialog.cpp @@ -36,8 +36,8 @@ namespace Rosegarden { -QuantizeDialog::QuantizeDialog(TQWidget *parent, bool inNotation) : - KDialogBase(parent, 0, true, i18n("Quantize"), Ok | Cancel | Details | Help) +QuantizeDialog::QuantizeDialog(TQWidget *tqparent, bool inNotation) : + KDialogBase(tqparent, 0, true, i18n("Quantize"), Ok | Cancel | Details | Help) { setHelp("quantization"); diff --git a/src/gui/dialogs/QuantizeDialog.h b/src/gui/dialogs/QuantizeDialog.h index fa6f07e..1be603a 100644 --- a/src/gui/dialogs/QuantizeDialog.h +++ b/src/gui/dialogs/QuantizeDialog.h @@ -23,8 +23,8 @@ COPYING included with this distribution for more information. */ -#ifndef _RG_QUANTIZEDIALOG_H_ -#define _RG_QUANTIZEDIALOG_H_ +#ifndef _RG_TQUANTIZEDIALOG_H_ +#define _RG_TQUANTIZEDIALOG_H_ #include <kdialogbase.h> @@ -42,9 +42,10 @@ class QuantizeParameters; class QuantizeDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - QuantizeDialog(TQWidget *parent, bool inNotation = false); + QuantizeDialog(TQWidget *tqparent, bool inNotation = false); /// Returned quantizer object is on heap -- caller must delete Quantizer *getQuantizer() const; diff --git a/src/gui/dialogs/RescaleDialog.cpp b/src/gui/dialogs/RescaleDialog.cpp index f47cafb..fdf5755 100644 --- a/src/gui/dialogs/RescaleDialog.cpp +++ b/src/gui/dialogs/RescaleDialog.cpp @@ -42,13 +42,13 @@ namespace Rosegarden { -RescaleDialog::RescaleDialog(TQWidget *parent, +RescaleDialog::RescaleDialog(TQWidget *tqparent, Composition *composition, timeT startTime, timeT originalDuration, bool showCloseGapOption, bool constrainToCompositionDuration) : - KDialogBase(parent, 0, true, i18n("Rescale"), User1 | Ok | Cancel) + KDialogBase(tqparent, 0, true, i18n("Rescale"), User1 | Ok | Cancel) { TQVBox *vbox = makeVBoxMainWidget(); @@ -58,7 +58,7 @@ RescaleDialog::RescaleDialog(TQWidget *parent, constrainToCompositionDuration); if (showCloseGapOption) { - TQGroupBox *optionBox = new TQGroupBox(1, Horizontal, i18n("Options"), vbox); + TQGroupBox *optionBox = new TQGroupBox(1, Qt::Horizontal, i18n("Options"), vbox); m_closeGap = new TQCheckBox(i18n("Adjust times of following events accordingly"), optionBox); KConfig *config = kapp->config(); diff --git a/src/gui/dialogs/RescaleDialog.h b/src/gui/dialogs/RescaleDialog.h index dedf1a1..0e6d285 100644 --- a/src/gui/dialogs/RescaleDialog.h +++ b/src/gui/dialogs/RescaleDialog.h @@ -44,9 +44,10 @@ class Composition; class RescaleDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - RescaleDialog(TQWidget *parent, + RescaleDialog(TQWidget *tqparent, Composition *composition, // for TimeWidget calculations timeT startTime, timeT originalDuration, diff --git a/src/gui/dialogs/ShowSequencerStatusDialog.cpp b/src/gui/dialogs/ShowSequencerStatusDialog.cpp index 240adfe..7afccf4 100644 --- a/src/gui/dialogs/ShowSequencerStatusDialog.cpp +++ b/src/gui/dialogs/ShowSequencerStatusDialog.cpp @@ -40,14 +40,14 @@ namespace Rosegarden { -ShowSequencerStatusDialog::ShowSequencerStatusDialog(TQWidget *parent) : - KDialogBase(parent, 0, true, i18n("Sequencer status"), Close) +ShowSequencerStatusDialog::ShowSequencerStatusDialog(TQWidget *tqparent) : + KDialogBase(tqparent, 0, true, i18n("Sequencer status"), Close) { TQVBox *vbox = makeVBoxMainWidget(); new TQLabel(i18n("Sequencer status:"), vbox); - TQString status(i18n("Status not available.")); + TQString status(i18n("tqStatus not available.")); TQCString replyType; TQByteArray replyData; @@ -67,7 +67,7 @@ ShowSequencerStatusDialog::ShowSequencerStatusDialog(TQWidget *parent) : } TQTextEdit *text = new TQTextEdit(vbox); - text->setTextFormat(Qt::PlainText); + text->setTextFormat(TQt::PlainText); text->setReadOnly(true); text->setMinimumWidth(500); text->setMinimumHeight(200); diff --git a/src/gui/dialogs/ShowSequencerStatusDialog.h b/src/gui/dialogs/ShowSequencerStatusDialog.h index 9b7ad41..ce66740 100644 --- a/src/gui/dialogs/ShowSequencerStatusDialog.h +++ b/src/gui/dialogs/ShowSequencerStatusDialog.h @@ -40,8 +40,9 @@ namespace Rosegarden class ShowSequencerStatusDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - ShowSequencerStatusDialog(TQWidget *parent); + ShowSequencerStatusDialog(TQWidget *tqparent); }; diff --git a/src/gui/dialogs/SimpleEventEditDialog.cpp b/src/gui/dialogs/SimpleEventEditDialog.cpp index 152748a..98e4c4e 100644 --- a/src/gui/dialogs/SimpleEventEditDialog.cpp +++ b/src/gui/dialogs/SimpleEventEditDialog.cpp @@ -56,11 +56,11 @@ namespace Rosegarden { -SimpleEventEditDialog::SimpleEventEditDialog(TQWidget *parent, +SimpleEventEditDialog::SimpleEventEditDialog(TQWidget *tqparent, RosegardenGUIDoc *doc, const Event &event, bool inserting) : - KDialogBase(parent, 0, true, + KDialogBase(tqparent, 0, true, i18n(inserting ? "Insert Event" : "Edit Event"), Ok | Cancel), m_event(event), m_doc(doc), @@ -71,21 +71,21 @@ SimpleEventEditDialog::SimpleEventEditDialog(TQWidget *parent, { TQVBox *vbox = makeVBoxMainWidget(); - TQGroupBox *groupBox = new QGroupBox - (1, Horizontal, i18n("Event Properties"), vbox); + TQGroupBox *groupBox = new TQGroupBox + (1, Qt::Horizontal, i18n("Event Properties"), vbox); TQFrame *frame = new TQFrame(groupBox); - TQGridLayout *layout = new TQGridLayout(frame, 7, 3, 5, 5); + TQGridLayout *tqlayout = new TQGridLayout(frame, 7, 3, 5, 5); - layout->addWidget(new TQLabel(i18n("Event type:"), frame), 0, 0); + tqlayout->addWidget(new TQLabel(i18n("Event type:"), frame), 0, 0); if (inserting) { m_typeLabel = 0; m_typeCombo = new KComboBox(frame); - layout->addWidget(m_typeCombo, 0, 1); + tqlayout->addWidget(m_typeCombo, 0, 1); m_typeCombo->insertItem(strtoqstr(Note::EventType)); m_typeCombo->insertItem(strtoqstr(Controller::EventType)); @@ -111,15 +111,15 @@ SimpleEventEditDialog::SimpleEventEditDialog(TQWidget *parent, m_typeCombo = 0; m_typeLabel = new TQLabel(frame); - layout->addWidget(m_typeLabel, 0, 1); + tqlayout->addWidget(m_typeLabel, 0, 1); } m_timeLabel = new TQLabel(i18n("Absolute time:"), frame); - layout->addWidget(m_timeLabel, 1, 0); + tqlayout->addWidget(m_timeLabel, 1, 0); m_timeSpinBox = new TQSpinBox(INT_MIN, INT_MAX, Note(Note::Shortest).getDuration(), frame); m_timeEditButton = new TQPushButton("edit", frame); - layout->addWidget(m_timeSpinBox, 1, 1); - layout->addWidget(m_timeEditButton, 1, 2); + tqlayout->addWidget(m_timeSpinBox, 1, 1); + tqlayout->addWidget(m_timeEditButton, 1, 2); connect(m_timeSpinBox, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotAbsoluteTimeChanged(int))); @@ -127,11 +127,11 @@ SimpleEventEditDialog::SimpleEventEditDialog(TQWidget *parent, TQT_SLOT(slotEditAbsoluteTime())); m_durationLabel = new TQLabel(i18n("Duration:"), frame); - layout->addWidget(m_durationLabel, 2, 0); + tqlayout->addWidget(m_durationLabel, 2, 0); m_durationSpinBox = new TQSpinBox(0, INT_MAX, Note(Note::Shortest).getDuration(), frame); m_durationEditButton = new TQPushButton("edit", frame); - layout->addWidget(m_durationSpinBox, 2, 1); - layout->addWidget(m_durationEditButton, 2, 2); + tqlayout->addWidget(m_durationSpinBox, 2, 1); + tqlayout->addWidget(m_durationEditButton, 2, 2); connect(m_durationSpinBox, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotDurationChanged(int))); @@ -139,11 +139,11 @@ SimpleEventEditDialog::SimpleEventEditDialog(TQWidget *parent, TQT_SLOT(slotEditDuration())); m_pitchLabel = new TQLabel(i18n("Pitch:"), frame); - layout->addWidget(m_pitchLabel, 3, 0); + tqlayout->addWidget(m_pitchLabel, 3, 0); m_pitchSpinBox = new TQSpinBox(frame); m_pitchEditButton = new TQPushButton("edit", frame); - layout->addWidget(m_pitchSpinBox, 3, 1); - layout->addWidget(m_pitchEditButton, 3, 2); + tqlayout->addWidget(m_pitchSpinBox, 3, 1); + tqlayout->addWidget(m_pitchEditButton, 3, 2); connect(m_pitchSpinBox, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotPitchChanged(int))); @@ -155,15 +155,15 @@ SimpleEventEditDialog::SimpleEventEditDialog(TQWidget *parent, m_controllerLabel = new TQLabel(i18n("Controller name:"), frame); m_controllerLabelValue = new TQLabel(i18n("<none>"), frame); - m_controllerLabelValue->setAlignment(TQLabel::AlignRight); + m_controllerLabelValue->tqsetAlignment(TQLabel::AlignRight); - layout->addWidget(m_controllerLabel, 4, 0); - layout->addWidget(m_controllerLabelValue, 4, 1); + tqlayout->addWidget(m_controllerLabel, 4, 0); + tqlayout->addWidget(m_controllerLabelValue, 4, 1); m_velocityLabel = new TQLabel(i18n("Velocity:"), frame); - layout->addWidget(m_velocityLabel, 5, 0); + tqlayout->addWidget(m_velocityLabel, 5, 0); m_velocitySpinBox = new TQSpinBox(frame); - layout->addWidget(m_velocitySpinBox, 5, 1); + tqlayout->addWidget(m_velocitySpinBox, 5, 1); connect(m_velocitySpinBox, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotVelocityChanged(int))); @@ -172,14 +172,14 @@ SimpleEventEditDialog::SimpleEventEditDialog(TQWidget *parent, m_velocitySpinBox->setMaxValue(MidiMaxValue); m_metaLabel = new TQLabel(i18n("Meta string:"), frame); - layout->addWidget(m_metaLabel, 6, 0); + tqlayout->addWidget(m_metaLabel, 6, 0); m_metaEdit = new TQLineEdit(frame); - layout->addWidget(m_metaEdit, 6, 1); + tqlayout->addWidget(m_metaEdit, 6, 1); m_sysexLoadButton = new TQPushButton(i18n("Load data"), frame); - layout->addWidget(m_sysexLoadButton, 6, 2); + tqlayout->addWidget(m_sysexLoadButton, 6, 2); m_sysexSaveButton = new TQPushButton(i18n("Save data"), frame); - layout->addWidget(m_sysexSaveButton, 4, 2); + tqlayout->addWidget(m_sysexSaveButton, 4, 2); connect(m_metaEdit, TQT_SIGNAL(textChanged(const TQString &)), TQT_SLOT(slotMetaChanged(const TQString &))); @@ -188,26 +188,26 @@ SimpleEventEditDialog::SimpleEventEditDialog(TQWidget *parent, connect(m_sysexSaveButton, TQT_SIGNAL(released()), TQT_SLOT(slotSysexSave())); - m_notationGroupBox = new QGroupBox - (1, Horizontal, i18n("Notation Properties"), vbox); + m_notationGroupBox = new TQGroupBox + (1, Qt::Horizontal, i18n("Notation Properties"), vbox); frame = new TQFrame(m_notationGroupBox); - layout = new TQGridLayout(frame, 3, 3, 5, 5); + tqlayout = new TQGridLayout(frame, 3, 3, 5, 5); m_lockNotationValues = new TQCheckBox(i18n("Lock to changes in performed values"), frame); - layout->addMultiCellWidget(m_lockNotationValues, 0, 0, 0, 2); + tqlayout->addMultiCellWidget(m_lockNotationValues, 0, 0, 0, 2); m_lockNotationValues->setChecked(true); connect(m_lockNotationValues, TQT_SIGNAL(released()), TQT_SLOT(slotLockNotationChanged())); m_notationTimeLabel = new TQLabel(i18n("Notation time:"), frame); - layout->addWidget(m_notationTimeLabel, 1, 0); + tqlayout->addWidget(m_notationTimeLabel, 1, 0); m_notationTimeSpinBox = new TQSpinBox(INT_MIN, INT_MAX, Note(Note::Shortest).getDuration(), frame); m_notationTimeEditButton = new TQPushButton("edit", frame); - layout->addWidget(m_notationTimeSpinBox, 1, 1); - layout->addWidget(m_notationTimeEditButton, 1, 2); + tqlayout->addWidget(m_notationTimeSpinBox, 1, 1); + tqlayout->addWidget(m_notationTimeEditButton, 1, 2); connect(m_notationTimeSpinBox, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotNotationAbsoluteTimeChanged(int))); @@ -215,11 +215,11 @@ SimpleEventEditDialog::SimpleEventEditDialog(TQWidget *parent, TQT_SLOT(slotEditNotationAbsoluteTime())); m_notationDurationLabel = new TQLabel(i18n("Notation duration:"), frame); - layout->addWidget(m_notationDurationLabel, 2, 0); + tqlayout->addWidget(m_notationDurationLabel, 2, 0); m_notationDurationSpinBox = new TQSpinBox(0, INT_MAX, Note(Note::Shortest).getDuration(), frame); m_notationDurationEditButton = new TQPushButton("edit", frame); - layout->addWidget(m_notationDurationSpinBox, 2, 1); - layout->addWidget(m_notationDurationEditButton, 2, 2); + tqlayout->addWidget(m_notationDurationSpinBox, 2, 1); + tqlayout->addWidget(m_notationDurationEditButton, 2, 2); connect(m_notationDurationSpinBox, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotNotationDurationChanged(int))); diff --git a/src/gui/dialogs/SimpleEventEditDialog.h b/src/gui/dialogs/SimpleEventEditDialog.h index dcb1c60..5f709e7 100644 --- a/src/gui/dialogs/SimpleEventEditDialog.h +++ b/src/gui/dialogs/SimpleEventEditDialog.h @@ -51,8 +51,9 @@ class RosegardenGUIDoc; class SimpleEventEditDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - SimpleEventEditDialog(TQWidget *parent, + SimpleEventEditDialog(TQWidget *tqparent, RosegardenGUIDoc *doc, const Event &event, bool inserting = false); // inserting or editing diff --git a/src/gui/dialogs/SplitByPitchDialog.cpp b/src/gui/dialogs/SplitByPitchDialog.cpp index 9ff3772..94d34f5 100644 --- a/src/gui/dialogs/SplitByPitchDialog.cpp +++ b/src/gui/dialogs/SplitByPitchDialog.cpp @@ -42,34 +42,34 @@ namespace Rosegarden { -SplitByPitchDialog::SplitByPitchDialog(TQWidget *parent) : - KDialogBase(parent, 0, true, i18n("Split by Pitch"), Ok | Cancel) +SplitByPitchDialog::SplitByPitchDialog(TQWidget *tqparent) : + KDialogBase(tqparent, 0, true, i18n("Split by Pitch"), Ok | Cancel) { TQVBox *vBox = makeVBoxMainWidget(); TQFrame *frame = new TQFrame(vBox); - TQGridLayout *layout = new TQGridLayout(frame, 4, 3, 10, 5); + TQGridLayout *tqlayout = new TQGridLayout(frame, 4, 3, 10, 5); m_pitch = new PitchChooser(i18n("Starting split pitch"), frame, 60); - layout->addMultiCellWidget(m_pitch, 0, 0, 0, 2, Qt::AlignHCenter); + tqlayout->addMultiCellWidget(m_pitch, 0, 0, 0, 2, TQt::AlignHCenter); m_range = new TQCheckBox(i18n("Range up and down to follow music"), frame); - layout->addMultiCellWidget(m_range, + tqlayout->addMultiCellWidget(m_range, 1, 1, // fromRow, toRow 0, 2 // fromCol, toCol ); m_duplicate = new TQCheckBox(i18n("Duplicate non-note events"), frame); - layout->addMultiCellWidget(m_duplicate, 2, 2, 0, 2); + tqlayout->addMultiCellWidget(m_duplicate, 2, 2, 0, 2); - layout->addWidget(new TQLabel(i18n("Clef handling:"), frame), 3, 0); + tqlayout->addWidget(new TQLabel(i18n("Clef handling:"), frame), 3, 0); m_clefs = new KComboBox(frame); m_clefs->insertItem(i18n("Leave clefs alone")); m_clefs->insertItem(i18n("Guess new clefs")); m_clefs->insertItem(i18n("Use treble and bass clefs")); - layout->addMultiCellWidget(m_clefs, 3, 3, 1, 2); + tqlayout->addMultiCellWidget(m_clefs, 3, 3, 1, 2); m_range->setChecked(true); m_duplicate->setChecked(true); diff --git a/src/gui/dialogs/SplitByPitchDialog.h b/src/gui/dialogs/SplitByPitchDialog.h index ada2c24..def9f01 100644 --- a/src/gui/dialogs/SplitByPitchDialog.h +++ b/src/gui/dialogs/SplitByPitchDialog.h @@ -43,8 +43,9 @@ class PitchChooser; class SplitByPitchDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - SplitByPitchDialog(TQWidget *parent); + SplitByPitchDialog(TQWidget *tqparent); int getPitch(); diff --git a/src/gui/dialogs/SplitByRecordingSrcDialog.cpp b/src/gui/dialogs/SplitByRecordingSrcDialog.cpp index 91b8629..bd3331b 100644 --- a/src/gui/dialogs/SplitByRecordingSrcDialog.cpp +++ b/src/gui/dialogs/SplitByRecordingSrcDialog.cpp @@ -44,31 +44,31 @@ namespace Rosegarden { -SplitByRecordingSrcDialog::SplitByRecordingSrcDialog(TQWidget *parent, RosegardenGUIDoc *doc) : - KDialogBase(parent, 0, true, i18n("Split by Recording Source"), Ok | Cancel ) +SplitByRecordingSrcDialog::SplitByRecordingSrcDialog(TQWidget *tqparent, RosegardenGUIDoc *doc) : + KDialogBase(tqparent, 0, true, i18n("Split by Recording Source"), Ok | Cancel ) { TQVBox *vBox = makeVBoxMainWidget(); - TQGroupBox *groupBox = new QGroupBox - (1, Horizontal, i18n("Recording Source"), vBox); + TQGroupBox *groupBox = new TQGroupBox + (1, Qt::Horizontal, i18n("Recording Source"), vBox); TQFrame *frame = new TQFrame(groupBox); - TQGridLayout *layout = new TQGridLayout(frame, 2, 2, 10, 5); + TQGridLayout *tqlayout = new TQGridLayout(frame, 2, 2, 10, 5); - layout->addWidget(new TQLabel( i18n("Channel:"), frame ), 0, 0); + tqlayout->addWidget(new TQLabel( i18n("Channel:"), frame ), 0, 0); m_channel = new KComboBox( frame ); m_channel->setSizeLimit( 17 ); - layout->addWidget(m_channel, 0, 1); + tqlayout->addWidget(m_channel, 0, 1); TQSpacerItem *spacer = new TQSpacerItem( 1, 1, TQSizePolicy::Expanding, TQSizePolicy::Minimum ); - layout->addItem( spacer, 0, 2 ); + tqlayout->addItem( spacer, 0, 2 ); m_channel->insertItem(i18n("any")); for (int i = 1; i < 17; ++i) { m_channel->insertItem(TQString::number(i)); } - layout->addWidget(new TQLabel( i18n("Device:"), frame ), 1, 0); + tqlayout->addWidget(new TQLabel( i18n("Device:"), frame ), 1, 0); m_device = new KComboBox( frame ); - layout->addMultiCellWidget( m_device, 1, 1, 1, 2 ); + tqlayout->addMultiCellWidget( m_device, 1, 1, 1, 2 ); m_deviceIds.clear(); m_deviceIds.push_back( -1); diff --git a/src/gui/dialogs/SplitByRecordingSrcDialog.h b/src/gui/dialogs/SplitByRecordingSrcDialog.h index 851c3f9..dcf3080 100644 --- a/src/gui/dialogs/SplitByRecordingSrcDialog.h +++ b/src/gui/dialogs/SplitByRecordingSrcDialog.h @@ -44,8 +44,9 @@ class RosegardenGUIDoc; class SplitByRecordingSrcDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - SplitByRecordingSrcDialog(TQWidget *parent, RosegardenGUIDoc *doc); + SplitByRecordingSrcDialog(TQWidget *tqparent, RosegardenGUIDoc *doc); int getChannel(); int getDevice(); diff --git a/src/gui/dialogs/TempoDialog.cpp b/src/gui/dialogs/TempoDialog.cpp index 1edab6b..6d2c716 100644 --- a/src/gui/dialogs/TempoDialog.cpp +++ b/src/gui/dialogs/TempoDialog.cpp @@ -51,30 +51,30 @@ namespace Rosegarden { -TempoDialog::TempoDialog(TQWidget *parent, RosegardenGUIDoc *doc, +TempoDialog::TempoDialog(TQWidget *tqparent, RosegardenGUIDoc *doc, bool timeEditable): - KDialogBase(parent, 0, true, i18n("Insert Tempo Change"), Ok | Cancel | Help), + KDialogBase(tqparent, 0, true, i18n("Insert Tempo Change"), Ok | Cancel | Help), m_doc(doc), m_tempoTime(0) { setHelp("tempo"); TQVBox *vbox = makeVBoxMainWidget(); - TQGroupBox *groupBox = new TQGroupBox(1, Horizontal, i18n("Tempo"), vbox); + TQGroupBox *groupBox = new TQGroupBox(1, Qt::Horizontal, i18n("Tempo"), vbox); TQFrame *frame = new TQFrame(groupBox); - TQGridLayout *layout = new TQGridLayout(frame, 4, 3, 5, 5); + TQGridLayout *tqlayout = new TQGridLayout(frame, 4, 3, 5, 5); // Set tempo - layout->addWidget(new TQLabel(i18n("New tempo:"), frame), 0, 1); + tqlayout->addWidget(new TQLabel(i18n("New tempo:"), frame), 0, 1); m_tempoValueSpinBox = new HSpinBox(frame, 0, 100000, 0.0, 1000.0, 5); - layout->addWidget(m_tempoValueSpinBox, 0, 2); + tqlayout->addWidget(m_tempoValueSpinBox, 0, 2); connect(m_tempoValueSpinBox, TQT_SIGNAL(valueChanged(const TQString &)), TQT_SLOT(slotTempoChanged(const TQString &))); m_tempoTap= new TQPushButton(i18n("Tap"), frame); - layout->addWidget(m_tempoTap, 0, 3); + tqlayout->addWidget(m_tempoTap, 0, 3); connect(m_tempoTap, TQT_SIGNAL(clicked()), TQT_SLOT(slotTapClicked())); @@ -85,13 +85,13 @@ TempoDialog::TempoDialog(TQWidget *parent, RosegardenGUIDoc *doc, // m_tempoTargetCheckBox = new TQCheckBox(i18n("Ramping to:"), frame); m_tempoTargetSpinBox = new HSpinBox(frame, 0, 100000, 0.0, 1000.0, 5); - // layout->addMultiCellWidget(m_tempoTargetCheckBox, 1, 1, 0, 1, AlignRight); - // layout->addWidget(m_tempoTargetSpinBox, 1, 2); + // tqlayout->addMultiCellWidget(m_tempoTargetCheckBox, 1, 1, 0, 1, AlignRight); + // tqlayout->addWidget(m_tempoTargetSpinBox, 1, 2); - layout->addMultiCellWidget(m_tempoConstant, 1, 1, 1, 2); - layout->addMultiCellWidget(m_tempoRampToNext, 2, 2, 1, 2); - layout->addWidget(m_tempoRampToTarget, 3, 1); - layout->addWidget(m_tempoTargetSpinBox, 3, 2); + tqlayout->addMultiCellWidget(m_tempoConstant, 1, 1, 1, 2); + tqlayout->addMultiCellWidget(m_tempoRampToNext, 2, 2, 1, 2); + tqlayout->addWidget(m_tempoRampToTarget, 3, 1); + tqlayout->addWidget(m_tempoTargetSpinBox, 3, 2); // connect(m_tempoTargetCheckBox, TQT_SIGNAL(clicked()), // TQT_SLOT(slotTargetCheckBoxClicked())); @@ -105,13 +105,13 @@ TempoDialog::TempoDialog(TQWidget *parent, RosegardenGUIDoc *doc, TQT_SLOT(slotTargetChanged(const TQString &))); m_tempoBeatLabel = new TQLabel(frame); - layout->addWidget(m_tempoBeatLabel, 0, 4); + tqlayout->addWidget(m_tempoBeatLabel, 0, 4); m_tempoBeat = new TQLabel(frame); - layout->addWidget(m_tempoBeat, 0, 5); + tqlayout->addWidget(m_tempoBeat, 0, 5); m_tempoBeatsPerMinute = new TQLabel(frame); - layout->addWidget(m_tempoBeatsPerMinute, 0, 6); + tqlayout->addWidget(m_tempoBeatsPerMinute, 0, 6); m_timeEditor = 0; @@ -124,7 +124,7 @@ TempoDialog::TempoDialog(TQWidget *parent, RosegardenGUIDoc *doc, } // Scope Box - TQButtonGroup *scopeGroup = new TQButtonGroup(1, Horizontal, + TQButtonGroup *scopeGroup = new TQButtonGroup(1, Qt::Horizontal, i18n("Scope"), vbox); // new TQLabel(scopeBox); @@ -150,25 +150,25 @@ TempoDialog::TempoDialog(TQWidget *parent, RosegardenGUIDoc *doc, TQVBox *changeWhereVBox = new TQVBox(changeWhereBox); changeWhereBox->setStretchFactor(changeWhereVBox, 20); - m_tempoChangeHere = new QRadioButton + m_tempoChangeHere = new TQRadioButton (i18n("Apply this tempo from here onwards"), changeWhereVBox); - m_tempoChangeBefore = new QRadioButton + m_tempoChangeBefore = new TQRadioButton (i18n("Replace the last tempo change"), changeWhereVBox); m_tempoChangeBeforeAt = new TQLabel(changeWhereVBox); m_tempoChangeBeforeAt->hide(); - m_tempoChangeStartOfBar = new QRadioButton + m_tempoChangeStartOfBar = new TQRadioButton (i18n("Apply this tempo from the start of this bar"), changeWhereVBox); - m_tempoChangeGlobal = new QRadioButton + m_tempoChangeGlobal = new TQRadioButton (i18n("Apply this tempo to the whole composition"), changeWhereVBox); TQHBox *optionHBox = new TQHBox(changeWhereVBox); new TQLabel(" ", optionHBox); - m_defaultBox = new QCheckBox + m_defaultBox = new TQCheckBox (i18n("Also make this the default tempo"), optionHBox); spare = new TQLabel(optionHBox); optionHBox->setStretchFactor(spare, 20); @@ -253,17 +253,17 @@ TempoDialog::populateTempo() RealTime tempoTime = comp.getElapsedRealTime(m_tempoTime); TQString milliSeconds; milliSeconds.sprintf("%03d", tempoTime.msec()); - m_tempoTimeLabel->setText(i18n("%1.%2 s,").arg(tempoTime.sec) - .arg(milliSeconds)); + m_tempoTimeLabel->setText(i18n("%1.%2 s,").tqarg(tempoTime.sec) + .tqarg(milliSeconds)); int barNo = comp.getBarNumber(m_tempoTime); if (comp.getBarStart(barNo) == m_tempoTime) { m_tempoBarLabel->setText - (i18n("at the start of measure %1.").arg(barNo + 1)); + (i18n("at the start of measure %1.").tqarg(barNo + 1)); m_tempoChangeStartOfBar->setEnabled(false); } else { m_tempoBarLabel->setText( - i18n("in the middle of measure %1.").arg(barNo + 1)); + i18n("in the middle of measure %1.").tqarg(barNo + 1)); m_tempoChangeStartOfBar->setEnabled(true); } @@ -282,8 +282,8 @@ TempoDialog::populateTempo() lastms.sprintf("%03d", lastRT.msec()); int lastBar = comp.getBarNumber(lastTempoTime); m_tempoChangeBeforeAt->setText - (i18n(" (at %1.%2 s, in measure %3)").arg(lastRT.sec) - .arg(lastms).arg(lastBar + 1)); + (i18n(" (at %1.%2 s, in measure %3)").tqarg(lastRT.sec) + .tqarg(lastms).tqarg(lastBar + 1)); m_tempoChangeBeforeAt->show(); m_tempoChangeBefore->setEnabled(true); @@ -334,11 +334,11 @@ TempoDialog::updateBeatLabels(double qpm) m_tempoBeatLabel->setText(" "); timeT error = 0; - m_tempoBeat->setPixmap(NotePixmapFactory::toQPixmap + m_tempoBeat->setPixmap(NotePixmapFactory::toTQPixmap (NotePixmapFactory::makeNoteMenuPixmap(beat, error))); m_tempoBeat->setMaximumWidth(25); if (error) - m_tempoBeat->setPixmap(NotePixmapFactory::toQPixmap + m_tempoBeat->setPixmap(NotePixmapFactory::toTQPixmap (NotePixmapFactory::makeToolbarPixmap ("menu-no-note"))); diff --git a/src/gui/dialogs/TempoDialog.h b/src/gui/dialogs/TempoDialog.h index db26ce7..0131d32 100644 --- a/src/gui/dialogs/TempoDialog.h +++ b/src/gui/dialogs/TempoDialog.h @@ -51,6 +51,7 @@ class HSpinBox; class TempoDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: enum TempoDialogAction { AddTempo, @@ -60,7 +61,7 @@ public: GlobalTempoWithDefault }; - TempoDialog(TQWidget *parent, RosegardenGUIDoc *doc, + TempoDialog(TQWidget *tqparent, RosegardenGUIDoc *doc, bool timeEditable = false); ~TempoDialog(); diff --git a/src/gui/dialogs/TextEventDialog.cpp b/src/gui/dialogs/TextEventDialog.cpp index ef02fbd..756edf0 100644 --- a/src/gui/dialogs/TextEventDialog.cpp +++ b/src/gui/dialogs/TextEventDialog.cpp @@ -50,11 +50,11 @@ namespace Rosegarden { -TextEventDialog::TextEventDialog(TQWidget *parent, +TextEventDialog::TextEventDialog(TQWidget *tqparent, NotePixmapFactory *npf, Text defaultText, int maxLength) : - KDialogBase(parent, 0, true, i18n("Text"), Ok | Cancel | Help), + KDialogBase(tqparent, 0, true, i18n("Text"), Ok | Cancel | Help), m_notePixmapFactory(npf), m_styles(Text::getUserStyles()) /*, //m_directives(Text::getLilyPondDirectives()) */ @@ -62,12 +62,12 @@ TextEventDialog::TextEventDialog(TQWidget *parent, setHelp("nv-text"); TQVBox *vbox = makeVBoxMainWidget(); - TQGroupBox *entryBox = new QGroupBox - (1, Horizontal, i18n("Specification"), vbox); - TQGroupBox *exampleBox = new QGroupBox - (1, Horizontal, i18n("Preview"), vbox); + TQGroupBox *entryBox = new TQGroupBox + (1, Qt::Horizontal, i18n("Specification"), vbox); + TQGroupBox *exampleBox = new TQGroupBox + (1, Qt::Horizontal, i18n("Preview"), vbox); - TQGrid *entryGrid = new TQGrid(2, TQGrid::Horizontal, entryBox); + TQGrid *entryGrid = new TQGrid(2, Qt::Horizontal, entryBox); new TQLabel(i18n("Text: "), entryGrid); m_text = new TQLineEdit(entryGrid); @@ -261,20 +261,20 @@ TextEventDialog::TextEventDialog(TQWidget *parent, // not i18nable, because the directive exporter currently depends on the // textual contents of these strings, not some more abstract associated // type label - m_lilyPondDirectiveCombo->insertItem(Text::Segno); - m_lilyPondDirectiveCombo->insertItem(Text::Coda); - m_lilyPondDirectiveCombo->insertItem(Text::Alternate1); - m_lilyPondDirectiveCombo->insertItem(Text::Alternate2); - m_lilyPondDirectiveCombo->insertItem(Text::BarDouble); - m_lilyPondDirectiveCombo->insertItem(Text::BarEnd); - m_lilyPondDirectiveCombo->insertItem(Text::BarDot); - m_lilyPondDirectiveCombo->insertItem(Text::Gliss); - m_lilyPondDirectiveCombo->insertItem(Text::Arpeggio); - // m_lilyPondDirectiveCombo->insertItem(Text::ArpeggioUp); - // m_lilyPondDirectiveCombo->insertItem(Text::ArpeggioDn); - m_lilyPondDirectiveCombo->insertItem(Text::Tiny); - m_lilyPondDirectiveCombo->insertItem(Text::Small); - m_lilyPondDirectiveCombo->insertItem(Text::NormalSize); + m_lilyPondDirectiveCombo->insertItem(Text::Segno.c_str()); + m_lilyPondDirectiveCombo->insertItem(Text::Coda.c_str()); + m_lilyPondDirectiveCombo->insertItem(Text::Alternate1.c_str()); + m_lilyPondDirectiveCombo->insertItem(Text::Alternate2.c_str()); + m_lilyPondDirectiveCombo->insertItem(Text::BarDouble.c_str()); + m_lilyPondDirectiveCombo->insertItem(Text::BarEnd.c_str()); + m_lilyPondDirectiveCombo->insertItem(Text::BarDot.c_str()); + m_lilyPondDirectiveCombo->insertItem(Text::Gliss.c_str()); + m_lilyPondDirectiveCombo->insertItem(Text::Arpeggio.c_str()); + // m_lilyPondDirectiveCombo->insertItem(Text::ArpeggioUp.c_str()); + // m_lilyPondDirectiveCombo->insertItem(Text::ArpeggioDn.c_str()); + m_lilyPondDirectiveCombo->insertItem(Text::Tiny.c_str()); + m_lilyPondDirectiveCombo->insertItem(Text::Small.c_str()); + m_lilyPondDirectiveCombo->insertItem(Text::NormalSize.c_str()); TQVBox *exampleVBox = new TQVBox(exampleBox); @@ -282,18 +282,18 @@ TextEventDialog::TextEventDialog(TQWidget *parent, int mapWidth = 200; TQPixmap map(mapWidth, ls * 5 + 1); - TQBitmap mask(mapWidth, ls * 5 + 1); + TQBitmap tqmask(mapWidth, ls * 5 + 1); map.fill(); - mask.fill(Qt::color0); + tqmask.fill(TQt::color0); TQPainter p, pm; p.begin(&map); - pm.begin(&mask); + pm.begin(&tqmask); - p.setPen(Qt::black); - pm.setPen(Qt::white); + p.setPen(TQt::black); + pm.setPen(TQt::white); for (int i = 0; i < 5; ++i) { @@ -304,7 +304,7 @@ TextEventDialog::TextEventDialog(TQWidget *parent, p.end(); pm.end(); - map.setMask(mask); + map.setMask(tqmask); m_staffAboveLabel = new TQLabel("staff", exampleVBox); m_staffAboveLabel->setPixmap(map); @@ -392,7 +392,7 @@ TextEventDialog::slotTextChanged(const TQString &qtext) Text rtext(text, type); m_textExampleLabel->setPixmap - (NotePixmapFactory::toQPixmap(m_notePixmapFactory->makeTextPixmap(rtext))); + (NotePixmapFactory::toTQPixmap(m_notePixmapFactory->makeTextPixmap(rtext))); } void @@ -409,7 +409,7 @@ TextEventDialog::slotTypeChanged(const TQString &) Text rtext(text, type); m_textExampleLabel->setPixmap - (NotePixmapFactory::toQPixmap(m_notePixmapFactory->makeTextPixmap(rtext))); + (NotePixmapFactory::toTQPixmap(m_notePixmapFactory->makeTextPixmap(rtext))); // // swap widgets in and out, depending on the current text type @@ -417,7 +417,7 @@ TextEventDialog::slotTypeChanged(const TQString &) if (type == Text::Dynamic) { m_dynamicShortcutLabel->show(); m_dynamicShortcutCombo->show(); - slotDynamicShortcutChanged(text); + slotDynamicShortcutChanged(text.c_str()); } else { m_dynamicShortcutLabel->hide(); m_dynamicShortcutCombo->hide(); @@ -426,7 +426,7 @@ TextEventDialog::slotTypeChanged(const TQString &) if (type == Text::Direction) { m_directionShortcutLabel->show(); m_directionShortcutCombo->show(); - slotDirectionShortcutChanged(text); + slotDirectionShortcutChanged(text.c_str()); } else { m_directionShortcutLabel->hide(); m_directionShortcutCombo->hide(); @@ -435,7 +435,7 @@ TextEventDialog::slotTypeChanged(const TQString &) if (type == Text::LocalDirection) { m_localDirectionShortcutLabel->show(); m_localDirectionShortcutCombo->show(); - slotLocalDirectionShortcutChanged(text); + slotLocalDirectionShortcutChanged(text.c_str()); } else { m_localDirectionShortcutLabel->hide(); m_localDirectionShortcutCombo->hide(); @@ -444,7 +444,7 @@ TextEventDialog::slotTypeChanged(const TQString &) if (type == Text::Tempo) { m_tempoShortcutLabel->show(); m_tempoShortcutCombo->show(); - slotTempoShortcutChanged(text); + slotTempoShortcutChanged(text.c_str()); } else { m_tempoShortcutLabel->hide(); m_tempoShortcutCombo->hide(); @@ -453,7 +453,7 @@ TextEventDialog::slotTypeChanged(const TQString &) if (type == Text::LocalTempo) { m_localTempoShortcutLabel->show(); m_localTempoShortcutCombo->show(); - slotLocalTempoShortcutChanged(text); + slotLocalTempoShortcutChanged(text.c_str()); } else { m_localTempoShortcutLabel->hide(); m_localTempoShortcutCombo->hide(); @@ -478,7 +478,7 @@ TextEventDialog::slotTypeChanged(const TQString &) m_staffBelowLabel->show(); m_text->setReadOnly(true); m_text->setEnabled(false); - slotLilyPondDirectiveChanged(text); + slotLilyPondDirectiveChanged(text.c_str()); } else { m_lilyPondDirectiveCombo->hide(); m_directiveLabel->hide(); @@ -537,7 +537,7 @@ void TextEventDialog::slotDynamicShortcutChanged(const TQString &text) { if (text == "" || text == "Sample") { - m_text->setText(strtoqstr(m_dynamicShortcutCombo->currentText())); + m_text->setText((m_dynamicShortcutCombo->currentText())); } else { m_text->setText(text); } @@ -547,7 +547,7 @@ void TextEventDialog::slotDirectionShortcutChanged(const TQString &text) { if (text == "" || text == "Sample") { - m_text->setText(strtoqstr(m_directionShortcutCombo->currentText())); + m_text->setText((m_directionShortcutCombo->currentText())); } else { m_text->setText(text); } @@ -557,7 +557,7 @@ void TextEventDialog::slotLocalDirectionShortcutChanged(const TQString &text) { if (text == "" || text == "Sample") { - m_text->setText(strtoqstr(m_localDirectionShortcutCombo->currentText())); + m_text->setText((m_localDirectionShortcutCombo->currentText())); } else { m_text->setText(text); } @@ -567,7 +567,7 @@ void TextEventDialog::slotTempoShortcutChanged(const TQString &text) { if (text == "" || text == "Sample") { - m_text->setText(strtoqstr(m_tempoShortcutCombo->currentText())); + m_text->setText((m_tempoShortcutCombo->currentText())); } else { m_text->setText(text); } @@ -577,7 +577,7 @@ void TextEventDialog::slotLocalTempoShortcutChanged(const TQString &text) { if (text == "" || text == "Sample") { - m_text->setText(strtoqstr(m_localTempoShortcutCombo->currentText())); + m_text->setText((m_localTempoShortcutCombo->currentText())); } else { m_text->setText(text); } @@ -586,7 +586,7 @@ TextEventDialog::slotLocalTempoShortcutChanged(const TQString &text) void TextEventDialog::slotLilyPondDirectiveChanged(const TQString &) { - m_text->setText(strtoqstr(m_lilyPondDirectiveCombo->currentText())); + m_text->setText((m_lilyPondDirectiveCombo->currentText())); } } diff --git a/src/gui/dialogs/TextEventDialog.h b/src/gui/dialogs/TextEventDialog.h index d74fb00..fa8419c 100644 --- a/src/gui/dialogs/TextEventDialog.h +++ b/src/gui/dialogs/TextEventDialog.h @@ -48,12 +48,13 @@ class NotePixmapFactory; class TextEventDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - TextEventDialog(TQWidget *parent, + TextEventDialog(TQWidget *tqparent, NotePixmapFactory *npf, Text defaultText, - int maxLength = -1); // for Qt default + int maxLength = -1); // for TQt default Text getText() const; diff --git a/src/gui/dialogs/TimeDialog.cpp b/src/gui/dialogs/TimeDialog.cpp index d4eb4b6..3dc78e3 100644 --- a/src/gui/dialogs/TimeDialog.cpp +++ b/src/gui/dialogs/TimeDialog.cpp @@ -37,11 +37,11 @@ namespace Rosegarden { -TimeDialog::TimeDialog(TQWidget *parent, TQString title, +TimeDialog::TimeDialog(TQWidget *tqparent, TQString title, Composition *composition, timeT defaultTime, bool constrainToCompositionDuration) : - KDialogBase(parent, 0, true, title, User1 | Ok | Cancel) + KDialogBase(tqparent, 0, true, title, User1 | Ok | Cancel) { TQVBox *vbox = makeVBoxMainWidget(); m_timeWidget = new TimeWidget @@ -53,12 +53,12 @@ TimeDialog::TimeDialog(TQWidget *parent, TQString title, m_timeWidget, TQT_SLOT(slotResetToDefault())); } -TimeDialog::TimeDialog(TQWidget *parent, TQString title, +TimeDialog::TimeDialog(TQWidget *tqparent, TQString title, Composition *composition, timeT startTime, timeT defaultTime, bool constrainToCompositionDuration) : - KDialogBase(parent, 0, true, title, User1 | Ok | Cancel) + KDialogBase(tqparent, 0, true, title, User1 | Ok | Cancel) { TQVBox *vbox = makeVBoxMainWidget(); m_timeWidget = new TimeWidget diff --git a/src/gui/dialogs/TimeDialog.h b/src/gui/dialogs/TimeDialog.h index d418234..ec246d3 100644 --- a/src/gui/dialogs/TimeDialog.h +++ b/src/gui/dialogs/TimeDialog.h @@ -44,13 +44,14 @@ class Composition; class TimeDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: /// for absolute times - TimeDialog(TQWidget *parent, TQString title, Composition *composition, + TimeDialog(TQWidget *tqparent, TQString title, Composition *composition, timeT defaultTime, bool constrainToCompositionDuration); /// for durations - TimeDialog(TQWidget *parent, TQString title, Composition *composition, + TimeDialog(TQWidget *tqparent, TQString title, Composition *composition, timeT startTime, timeT defaultDuration, bool constrainToCompositionDuration); diff --git a/src/gui/dialogs/TimeSignatureDialog.cpp b/src/gui/dialogs/TimeSignatureDialog.cpp index 1e0dca8..99d4830 100644 --- a/src/gui/dialogs/TimeSignatureDialog.cpp +++ b/src/gui/dialogs/TimeSignatureDialog.cpp @@ -50,13 +50,13 @@ namespace Rosegarden { -TimeSignatureDialog::TimeSignatureDialog(TQWidget *parent, +TimeSignatureDialog::TimeSignatureDialog(TQWidget *tqparent, Composition *composition, timeT insertionTime, TimeSignature sig, bool timeEditable, TQString explanatoryText) : - KDialogBase(parent, 0, true, i18n("Time Signature"), Ok | Cancel | Help), + KDialogBase(tqparent, 0, true, i18n("Time Signature"), Ok | Cancel | Help), m_composition(composition), m_timeSignature(sig), m_time(insertionTime), @@ -78,8 +78,8 @@ TimeSignatureDialog::TimeSignatureDialog(TQWidget *parent, } TQVBox *vbox = makeVBoxMainWidget(); - TQGroupBox *groupBox = new QGroupBox - (1, Horizontal, i18n("Time signature"), vbox); + TQGroupBox *groupBox = new TQGroupBox + (1, Qt::Horizontal, i18n("Time signature"), vbox); TQHBox *numBox = new TQHBox(groupBox); TQHBox *denomBox = new TQHBox(groupBox); @@ -91,13 +91,13 @@ TimeSignatureDialog::TimeSignatureDialog(TQWidget *parent, BigArrowButton *numDown = new BigArrowButton(numBox, Qt::LeftArrow); BigArrowButton *denomDown = new BigArrowButton(denomBox, Qt::LeftArrow); - m_numLabel = new QLabel - (TQString("%1").arg(m_timeSignature.getNumerator()), numBox); - m_denomLabel = new QLabel - (TQString("%1").arg(m_timeSignature.getDenominator()), denomBox); + m_numLabel = new TQLabel + (TQString("%1").tqarg(m_timeSignature.getNumerator()), numBox); + m_denomLabel = new TQLabel + (TQString("%1").tqarg(m_timeSignature.getDenominator()), denomBox); - m_numLabel->setAlignment(AlignHCenter | AlignVCenter); - m_denomLabel->setAlignment(AlignHCenter | AlignVCenter); + m_numLabel->tqsetAlignment(AlignHCenter | AlignVCenter); + m_denomLabel->tqsetAlignment(AlignHCenter | AlignVCenter); m_numLabel->setFont(*timeSigFont); m_denomLabel->setFont(*timeSigFont); @@ -126,7 +126,7 @@ TimeSignatureDialog::TimeSignatureDialog(TQWidget *parent, m_timeEditor = 0; - groupBox = new TQButtonGroup(1, Horizontal, i18n("Scope"), vbox); + groupBox = new TQButtonGroup(1, Qt::Horizontal, i18n("Scope"), vbox); int barNo = composition->getBarNumber(m_time); bool atStartOfBar = (m_time == composition->getBarStart(barNo)); @@ -137,57 +137,57 @@ TimeSignatureDialog::TimeSignatureDialog(TQWidget *parent, if (barNo != 0 || !atStartOfBar) { if (atStartOfBar) { - scopeText = QString + scopeText = TQString (i18n("Insertion point is at start of measure %1.")) - .arg(barNo + 1); + .tqarg(barNo + 1); } else { - scopeText = QString + scopeText = TQString (i18n("Insertion point is in the middle of measure %1.")) - .arg(barNo + 1); + .tqarg(barNo + 1); } } else { - scopeText = QString + scopeText = TQString (i18n("Insertion point is at start of composition.")); } new TQLabel(scopeText, groupBox); - m_asGivenButton = new QRadioButton - (i18n("Start measure %1 here").arg(barNo + 2), groupBox); + m_asGivenButton = new TQRadioButton + (i18n("Start measure %1 here").tqarg(barNo + 2), groupBox); if (!atStartOfBar) { - m_startOfBarButton = new QRadioButton + m_startOfBarButton = new TQRadioButton (i18n("Change time from start of measure %1") - .arg(barNo + 1), groupBox); + .tqarg(barNo + 1), groupBox); m_startOfBarButton->setChecked(true); } else { m_asGivenButton->setChecked(true); } } else { new TQLabel(i18n("Time change will take effect at the start of measure %1.") - .arg(barNo + 1), groupBox); + .tqarg(barNo + 1), groupBox); } } - groupBox = new TQGroupBox(1, Horizontal, i18n("Options"), vbox); + groupBox = new TQGroupBox(1, Qt::Horizontal, i18n("Options"), vbox); KConfig *config = kapp->config(); config->setGroup(GeneralOptionsConfigGroup); - m_hideSignatureButton = new QCheckBox + m_hideSignatureButton = new TQCheckBox (i18n("Hide the time signature"), groupBox); m_hideSignatureButton->setChecked (config->readBoolEntry("timesigdialogmakehidden", false)); - m_hideBarsButton = new QCheckBox + m_hideBarsButton = new TQCheckBox (i18n("Hide the affected bar lines"), groupBox); m_hideBarsButton->setChecked (config->readBoolEntry("timesigdialogmakehiddenbars", false)); - m_commonTimeButton = new QCheckBox + m_commonTimeButton = new TQCheckBox (i18n("Show as common time"), groupBox); m_commonTimeButton->setChecked (config->readBoolEntry("timesigdialogshowcommon", true)); - m_normalizeRestsButton = new QCheckBox + m_normalizeRestsButton = new TQCheckBox (i18n("Correct the durations of following measures"), groupBox); m_normalizeRestsButton->setChecked (config->readBoolEntry("timesigdialognormalize", true)); @@ -231,7 +231,7 @@ TimeSignatureDialog::slotNumDown() int n = m_timeSignature.getNumerator(); if (--n >= 1) { m_timeSignature = TimeSignature(n, m_timeSignature.getDenominator()); - m_numLabel->setText(TQString("%1").arg(n)); + m_numLabel->setText(TQString("%1").tqarg(n)); } slotUpdateCommonTimeButton(); } @@ -242,7 +242,7 @@ TimeSignatureDialog::slotNumUp() int n = m_timeSignature.getNumerator(); if (++n <= 99) { m_timeSignature = TimeSignature(n, m_timeSignature.getDenominator()); - m_numLabel->setText(TQString("%1").arg(n)); + m_numLabel->setText(TQString("%1").tqarg(n)); } slotUpdateCommonTimeButton(); } @@ -253,7 +253,7 @@ TimeSignatureDialog::slotDenomDown() int n = m_timeSignature.getDenominator(); if ((n /= 2) >= 1) { m_timeSignature = TimeSignature(m_timeSignature.getNumerator(), n); - m_denomLabel->setText(TQString("%1").arg(n)); + m_denomLabel->setText(TQString("%1").tqarg(n)); } slotUpdateCommonTimeButton(); } @@ -264,7 +264,7 @@ TimeSignatureDialog::slotDenomUp() int n = m_timeSignature.getDenominator(); if ((n *= 2) <= 64) { m_timeSignature = TimeSignature(m_timeSignature.getNumerator(), n); - m_denomLabel->setText(TQString("%1").arg(n)); + m_denomLabel->setText(TQString("%1").tqarg(n)); } slotUpdateCommonTimeButton(); } diff --git a/src/gui/dialogs/TimeSignatureDialog.h b/src/gui/dialogs/TimeSignatureDialog.h index 5326f71..fd97c69 100644 --- a/src/gui/dialogs/TimeSignatureDialog.h +++ b/src/gui/dialogs/TimeSignatureDialog.h @@ -48,9 +48,10 @@ class Composition; class TimeSignatureDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - TimeSignatureDialog(TQWidget *parent, + TimeSignatureDialog(TQWidget *tqparent, Composition *composition, timeT insertionTime, TimeSignature defaultSig = diff --git a/src/gui/dialogs/TransportDialog.cpp b/src/gui/dialogs/TransportDialog.cpp index a632469..85d311b 100644 --- a/src/gui/dialogs/TransportDialog.cpp +++ b/src/gui/dialogs/TransportDialog.cpp @@ -57,10 +57,10 @@ namespace Rosegarden { -TransportDialog::TransportDialog(TQWidget *parent, +TransportDialog::TransportDialog(TQWidget *tqparent, const char *name, WFlags flags): - TQWidget(parent, name, WType_TopLevel | WStyle_DialogBorder | WStyle_Minimize | WStyle_SysMenu | WDestructiveClose), + TQWidget(tqparent, name, WType_TopLevel | WStyle_DialogBorder | WStyle_Minimize | WStyle_SysMenu | WDestructiveClose), m_transport(0), m_lastTenHours(0), m_lastUnitHours(0), @@ -95,22 +95,22 @@ TransportDialog::TransportDialog(TQWidget *parent, // set the LCD frame background to black // - m_transport->LCDBoxFrame->setBackgroundColor(Qt::black); + m_transport->LCDBoxFrame->setBackgroundColor(TQt::black); // set all the pixmap backgrounds to black to avoid // flickering when we update // - m_transport->TenThousandthsPixmap->setBackgroundColor(Qt::black); - m_transport->ThousandthsPixmap->setBackgroundColor(Qt::black); - m_transport->HundredthsPixmap->setBackgroundColor(Qt::black); - m_transport->TenthsPixmap->setBackgroundColor(Qt::black); - m_transport->UnitSecondsPixmap->setBackgroundColor(Qt::black); - m_transport->TenSecondsPixmap->setBackgroundColor(Qt::black); - m_transport->UnitMinutesPixmap->setBackgroundColor(Qt::black); - m_transport->TenMinutesPixmap->setBackgroundColor(Qt::black); - m_transport->UnitHoursPixmap->setBackgroundColor(Qt::black); - m_transport->TenHoursPixmap->setBackgroundColor(Qt::black); - m_transport->NegativePixmap->setBackgroundColor(Qt::black); + m_transport->TenThousandthsPixmap->setBackgroundColor(TQt::black); + m_transport->ThousandthsPixmap->setBackgroundColor(TQt::black); + m_transport->HundredthsPixmap->setBackgroundColor(TQt::black); + m_transport->TenthsPixmap->setBackgroundColor(TQt::black); + m_transport->UnitSecondsPixmap->setBackgroundColor(TQt::black); + m_transport->TenSecondsPixmap->setBackgroundColor(TQt::black); + m_transport->UnitMinutesPixmap->setBackgroundColor(TQt::black); + m_transport->TenMinutesPixmap->setBackgroundColor(TQt::black); + m_transport->UnitHoursPixmap->setBackgroundColor(TQt::black); + m_transport->TenHoursPixmap->setBackgroundColor(TQt::black); + m_transport->NegativePixmap->setBackgroundColor(TQt::black); // unset the negative sign to begin with m_transport->NegativePixmap->clear(); @@ -206,10 +206,10 @@ TransportDialog::TransportDialog(TQWidget *parent, pal.setColor(TQColorGroup::Foreground, TQColor(192, 216, 255)); m_transport->TempoDisplay->setPalette(pal); - m_transport->TempoDisplay->setAlignment(int(TQLabel::AlignVCenter | TQLabel::AlignRight)); + m_transport->TempoDisplay->tqsetAlignment(int(TQLabel::AlignVCenter | TQLabel::AlignRight)); m_transport->TimeSigDisplay->setPalette(pal); - m_transport->TimeSigDisplay->setAlignment(int(TQLabel::AlignVCenter | TQLabel::AlignRight)); + m_transport->TimeSigDisplay->tqsetAlignment(int(TQLabel::AlignVCenter | TQLabel::AlignRight)); TQFont localFont(m_transport->OutDisplay->font() ); localFont.setFamily( "lucida" ); @@ -344,7 +344,7 @@ TransportDialog::loadPixmaps() TQString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); for (int i = 0; i < 10; i++) { - fileName = TQString("%1/transport/led-%2.xpm").arg(pixmapDir).arg(i); + fileName = TQString("%1/transport/led-%2.xpm").tqarg(pixmapDir).tqarg(i); if (!m_lcdList[i].load(fileName)) { std::cerr << "TransportDialog - failed to load pixmap \"" << fileName << "\"" << std::endl; @@ -353,7 +353,7 @@ TransportDialog::loadPixmaps() // Load the "negative" sign pixmap // - fileName = TQString("%1/transport/led--.xpm").arg(pixmapDir); + fileName = TQString("%1/transport/led--.xpm").tqarg(pixmapDir); m_lcdNegative.load(fileName); } @@ -479,7 +479,7 @@ TransportDialog::displayTime() case FrameMode: m_clearMetronomeTimer->stop(); - m_transport->TimeDisplayLabel->setText(TQString("%1").arg(m_sampleRate)); + m_transport->TimeDisplayLabel->setText(TQString("%1").tqarg(m_sampleRate)); m_transport->TimeDisplayLabel->show(); break; } @@ -727,9 +727,9 @@ TransportDialog::displayBarTime(int bar, int beat, int unit) if (m_currentMode == BarMetronomeMode && unit < 2) { if (beat == 1) { - slotSetBackground(Qt::red); + slotSetBackground(TQt::red); } else { - slotSetBackground(Qt::cyan); + slotSetBackground(TQt::cyan); } } else { slotResetBackground(); @@ -916,8 +916,8 @@ TransportDialog::setMidiInLabel(const MappedEvent *mE) MidiPitchLabel mPL(mE->getPitch()); m_transport->InDisplay->setText - (mPL.getQString() + - TQString(" %1").arg(mE->getVelocity())); + (mPL.getTQString() + + TQString(" %1").tqarg(mE->getVelocity())); } break; @@ -976,8 +976,8 @@ TransportDialog::setMidiOutLabel(const MappedEvent *mE) { MidiPitchLabel mPL(mE->getPitch()); m_transport->OutDisplay->setText - (mPL.getQString() + - TQString(" %1").arg(mE->getVelocity())); + (mPL.getTQString() + + TQString(" %1").tqarg(mE->getVelocity())); } break; @@ -1133,8 +1133,8 @@ TransportDialog::slotSetBackground(TQColor c) /* this is a bit more thorough, but too slow and flickery: - const TQObjectList *children = m_transport->LCDBoxFrame->tqchildren(); - TQObjectListIt it(*children); + const TQObjectList *tqchildren = m_transport->LCDBoxFrame->tqchildren(); + TQObjectListIt it(*tqchildren); TQObject *obj; while ((obj = it.current()) != 0) { diff --git a/src/gui/dialogs/TransportDialog.h b/src/gui/dialogs/TransportDialog.h index 48de68c..46eb1a9 100644 --- a/src/gui/dialogs/TransportDialog.h +++ b/src/gui/dialogs/TransportDialog.h @@ -48,14 +48,15 @@ class RealTime; class MappedEvent; -class TransportDialog : public QWidget +class TransportDialog : public TQWidget { Q_OBJECT + TQ_OBJECT public: - TransportDialog(TQWidget *parent=0, + TransportDialog(TQWidget *tqparent=0, const char *name=0, - WFlags flags = /*Qt::WStyle_StaysOnTop |*/ - Qt::WStyle_NormalBorder); + WFlags flags = /*TQt::WStyle_StaysOnTop |*/ + TQt::WStyle_NormalBorder); ~TransportDialog(); enum TimeDisplayMode { RealMode, SMPTEMode, BarMode, BarMetronomeMode, FrameMode }; @@ -113,7 +114,7 @@ protected: public slots: - // These two slots are activated by QTimers + // These two slots are activated by TQTimers // void slotClearMidiInLabel(); void slotClearMidiOutLabel(); diff --git a/src/gui/dialogs/TriggerSegmentDialog.cpp b/src/gui/dialogs/TriggerSegmentDialog.cpp index 85035df..1e92c95 100644 --- a/src/gui/dialogs/TriggerSegmentDialog.cpp +++ b/src/gui/dialogs/TriggerSegmentDialog.cpp @@ -47,36 +47,36 @@ namespace Rosegarden { -TriggerSegmentDialog::TriggerSegmentDialog(TQWidget *parent, +TriggerSegmentDialog::TriggerSegmentDialog(TQWidget *tqparent, Composition *composition) : - KDialogBase(parent, "triggersegmentdialog", true, i18n("Trigger Segment"), + KDialogBase(tqparent, "triggersegmentdialog", true, i18n("Trigger Segment"), Ok | Cancel, Ok), m_composition(composition) { TQVBox *vbox = makeVBoxMainWidget(); TQFrame *frame = new TQFrame(vbox); - TQGridLayout *layout = new TQGridLayout(frame, 3, 2, 5, 5); + TQGridLayout *tqlayout = new TQGridLayout(frame, 3, 2, 5, 5); TQLabel *label = new TQLabel(i18n("Trigger segment: "), frame); - layout->addWidget(label, 0, 0); + tqlayout->addWidget(label, 0, 0); m_segment = new KComboBox(frame); - layout->addWidget(m_segment, 0, 1); + tqlayout->addWidget(m_segment, 0, 1); int n = 1; for (Composition::triggersegmentcontaineriterator i = m_composition->getTriggerSegments().begin(); i != m_composition->getTriggerSegments().end(); ++i) { m_segment->insertItem - (TQString("%1. %2").arg(n++).arg(strtoqstr((*i)->getSegment()->getLabel()))); + (TQString("%1. %2").tqarg(n++).tqarg(strtoqstr((*i)->getSegment()->getLabel()))); } label = new TQLabel(i18n("Perform with timing: "), frame); - layout->addWidget(label, 1, 0); + tqlayout->addWidget(label, 1, 0); m_adjustTime = new KComboBox(frame); - layout->addWidget(m_adjustTime, 1, 1); + tqlayout->addWidget(m_adjustTime, 1, 1); m_adjustTime->insertItem(i18n("As stored")); m_adjustTime->insertItem(i18n("Truncate if longer than note")); @@ -86,7 +86,7 @@ TriggerSegmentDialog::TriggerSegmentDialog(TQWidget *parent, m_retune = new TQCheckBox(i18n("Adjust pitch to note"), frame); m_retune->setChecked(true); - layout->addWidget(m_retune, 2, 1); + tqlayout->addWidget(m_retune, 2, 1); setupFromConfig(); } @@ -101,7 +101,7 @@ TriggerSegmentDialog::setupFromConfig() std::string timing = qstrtostr (config->readEntry ("triggersegmenttiming", - strtoqstr(BaseProperties::TRIGGER_SEGMENT_ADJUST_SQUISH))); + strtoqstr(BaseProperties::TRIGGER_SEGMENT_ADJUST_STQUISH))); bool retune = config->readBoolEntry("triggersegmentretune", true); if (seg >= 0 && seg < m_segment->count()) @@ -109,7 +109,7 @@ TriggerSegmentDialog::setupFromConfig() if (timing == BaseProperties::TRIGGER_SEGMENT_ADJUST_NONE) { m_adjustTime->setCurrentItem(0); - } else if (timing == BaseProperties::TRIGGER_SEGMENT_ADJUST_SQUISH) { + } else if (timing == BaseProperties::TRIGGER_SEGMENT_ADJUST_STQUISH) { m_adjustTime->setCurrentItem(3); } else if (timing == BaseProperties::TRIGGER_SEGMENT_ADJUST_SYNC_START) { m_adjustTime->setCurrentItem(1); @@ -157,7 +157,7 @@ TriggerSegmentDialog::getTimeAdjust() const case 2: return BaseProperties::TRIGGER_SEGMENT_ADJUST_SYNC_END; case 3: - return BaseProperties::TRIGGER_SEGMENT_ADJUST_SQUISH; + return BaseProperties::TRIGGER_SEGMENT_ADJUST_STQUISH; default: return BaseProperties::TRIGGER_SEGMENT_ADJUST_NONE; diff --git a/src/gui/dialogs/TriggerSegmentDialog.h b/src/gui/dialogs/TriggerSegmentDialog.h index c71f34c..5dac0bb 100644 --- a/src/gui/dialogs/TriggerSegmentDialog.h +++ b/src/gui/dialogs/TriggerSegmentDialog.h @@ -45,9 +45,10 @@ class Composition; class TriggerSegmentDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - TriggerSegmentDialog(TQWidget *parent, Composition *); + TriggerSegmentDialog(TQWidget *tqparent, Composition *); TriggerSegmentId getId() const; bool getRetune() const; diff --git a/src/gui/dialogs/TupletDialog.cpp b/src/gui/dialogs/TupletDialog.cpp index a785097..aaa50da 100644 --- a/src/gui/dialogs/TupletDialog.cpp +++ b/src/gui/dialogs/TupletDialog.cpp @@ -46,16 +46,16 @@ namespace Rosegarden { -TupletDialog::TupletDialog(TQWidget *parent, Note::Type defaultUnitType, +TupletDialog::TupletDialog(TQWidget *tqparent, Note::Type defaultUnitType, timeT maxDuration) : - KDialogBase(parent, 0, true, i18n("Tuplet"), Ok | Cancel | Help), + KDialogBase(tqparent, 0, true, i18n("Tuplet"), Ok | Cancel | Help), m_maxDuration(maxDuration) { setHelp("nv-tuplets"); TQVBox *vbox = makeVBoxMainWidget(); - TQGroupBox *timingBox = new QGroupBox - (1, Horizontal, i18n("New timing for tuplet group"), vbox); + TQGroupBox *timingBox = new TQGroupBox + (1, Qt::Horizontal, i18n("New timing for tuplet group"), vbox); if (m_maxDuration > 0) { @@ -87,7 +87,7 @@ TupletDialog::TupletDialog(TQWidget *parent, Note::Type defaultUnitType, if (maxDuration > 0 && (2 * duration > maxDuration)) break; timeT e; // error factor, ignore - m_unitCombo->insertItem(NotePixmapFactory::toQPixmap + m_unitCombo->insertItem(NotePixmapFactory::toTQPixmap (NotePixmapFactory::makeNoteMenuPixmap(duration, e)), NotationStrings::makeNoteMenuLabel(duration, false, e, true)); if (defaultUnitType == t) { @@ -100,7 +100,7 @@ TupletDialog::TupletDialog(TQWidget *parent, Note::Type defaultUnitType, m_tupledCombo = new KComboBox(timingFrame); timingLayout->addWidget(m_tupledCombo, 1, 1); - m_hasTimingAlready = new QCheckBox + m_hasTimingAlready = new TQCheckBox (i18n("Timing is already correct: update display only"), timingFrame); m_hasTimingAlready->setChecked(false); timingLayout->addMultiCellWidget(m_hasTimingAlready, 2, 2, 0, 2); @@ -110,17 +110,17 @@ TupletDialog::TupletDialog(TQWidget *parent, Note::Type defaultUnitType, updateUntupledCombo(); updateTupledCombo(); - m_timingDisplayBox = new QGroupBox - (1, Horizontal, i18n("Timing calculations"), vbox); + m_timingDisplayBox = new TQGroupBox + (1, Qt::Horizontal, i18n("Timing calculations"), vbox); - TQGrid *timingDisplayGrid = new TQGrid(3, TQGrid::Horizontal, m_timingDisplayBox); + TQGrid *timingDisplayGrid = new TQGrid(3, Qt::Horizontal, m_timingDisplayBox); if (maxDuration > 0) { new TQLabel(i18n("Selected region:"), timingDisplayGrid); new TQLabel("", timingDisplayGrid); m_selectionDurationDisplay = new TQLabel("x", timingDisplayGrid); - m_selectionDurationDisplay->setAlignment(int(TQLabel::AlignVCenter | + m_selectionDurationDisplay->tqsetAlignment(int(TQLabel::AlignVCenter | TQLabel::AlignRight)); } else { m_selectionDurationDisplay = 0; @@ -129,28 +129,28 @@ TupletDialog::TupletDialog(TQWidget *parent, Note::Type defaultUnitType, new TQLabel(i18n("Group with current timing:"), timingDisplayGrid); m_untupledDurationCalculationDisplay = new TQLabel("x", timingDisplayGrid); m_untupledDurationDisplay = new TQLabel("x", timingDisplayGrid); - m_untupledDurationDisplay->setAlignment(int(TQLabel::AlignVCenter | + m_untupledDurationDisplay->tqsetAlignment(int(TQLabel::AlignVCenter | TQLabel::AlignRight)); new TQLabel(i18n("Group with new timing:"), timingDisplayGrid); m_tupledDurationCalculationDisplay = new TQLabel("x", timingDisplayGrid); m_tupledDurationDisplay = new TQLabel("x", timingDisplayGrid); - m_tupledDurationDisplay->setAlignment(int(TQLabel::AlignVCenter | + m_tupledDurationDisplay->tqsetAlignment(int(TQLabel::AlignVCenter | TQLabel::AlignRight)); new TQLabel(i18n("Gap created by timing change:"), timingDisplayGrid); m_newGapDurationCalculationDisplay = new TQLabel("x", timingDisplayGrid); m_newGapDurationDisplay = new TQLabel("x", timingDisplayGrid); - m_newGapDurationDisplay->setAlignment(int(TQLabel::AlignVCenter | + m_newGapDurationDisplay->tqsetAlignment(int(TQLabel::AlignVCenter | TQLabel::AlignRight)); if (maxDuration > 0) { new TQLabel(i18n("Unchanged at end of selection:"), timingDisplayGrid); - m_unchangedDurationCalculationDisplay = new QLabel + m_unchangedDurationCalculationDisplay = new TQLabel ("x", timingDisplayGrid); m_unchangedDurationDisplay = new TQLabel("x", timingDisplayGrid); - m_unchangedDurationDisplay->setAlignment(int(TQLabel::AlignVCenter | + m_unchangedDurationDisplay->tqsetAlignment(int(TQLabel::AlignVCenter | TQLabel::AlignRight)); } else { @@ -238,7 +238,7 @@ TupletDialog::updateUntupledCombo() TQString previousText = m_untupledCombo->currentText(); if (previousText.toInt() == 0) { if (maxValue < 3) - previousText = TQString("%1").arg(maxValue); + previousText = TQString("%1").tqarg(maxValue); else previousText = "3"; } @@ -247,7 +247,7 @@ TupletDialog::updateUntupledCombo() bool setText = false; for (int i = 1; i <= maxValue; ++i) { - TQString text = TQString("%1").arg(i); + TQString text = TQString("%1").tqarg(i); m_untupledCombo->insertItem(text); if (m_hasTimingAlready->isChecked()) { if (i == (m_maxDuration * 3) / (Note(getUnitType()).getDuration()*2)) { @@ -278,7 +278,7 @@ TupletDialog::updateTupledCombo() if (previousText.toInt() == 0 || previousText.toInt() > untupled) { if (untupled < 2) - previousText = TQString("%1").arg(untupled); + previousText = TQString("%1").tqarg(untupled); else previousText = "2"; } @@ -286,7 +286,7 @@ TupletDialog::updateTupledCombo() m_tupledCombo->clear(); for (int i = 1; i < untupled; ++i) { - TQString text = TQString("%1").arg(i); + TQString text = TQString("%1").tqarg(i); m_tupledCombo->insertItem(text); if (m_hasTimingAlready->isChecked()) { if (i == m_maxDuration / Note(getUnitType()).getDuration()) { @@ -310,33 +310,33 @@ TupletDialog::updateTimingDisplays() timeT tupledDuration = unitDuration * tupledCount; if (m_selectionDurationDisplay) { - m_selectionDurationDisplay->setText(TQString("%1").arg(m_maxDuration)); + m_selectionDurationDisplay->setText(TQString("%1").tqarg(m_maxDuration)); } m_untupledDurationCalculationDisplay->setText - (TQString(" %1 x %2 = ").arg(untupledCount).arg(unitDuration)); + (TQString(" %1 x %2 = ").tqarg(untupledCount).tqarg(unitDuration)); m_untupledDurationDisplay->setText - (TQString("%1").arg(untupledDuration)); + (TQString("%1").tqarg(untupledDuration)); m_tupledDurationCalculationDisplay->setText - (TQString(" %1 x %2 = ").arg(tupledCount).arg(unitDuration)); + (TQString(" %1 x %2 = ").tqarg(tupledCount).tqarg(unitDuration)); m_tupledDurationDisplay->setText - (TQString("%1").arg(tupledDuration)); + (TQString("%1").tqarg(tupledDuration)); m_newGapDurationCalculationDisplay->setText - (TQString(" %1 - %2 = ").arg(untupledDuration).arg(tupledDuration)); + (TQString(" %1 - %2 = ").tqarg(untupledDuration).tqarg(tupledDuration)); m_newGapDurationDisplay->setText - (TQString("%1").arg(untupledDuration - tupledDuration)); + (TQString("%1").tqarg(untupledDuration - tupledDuration)); if (m_selectionDurationDisplay && m_unchangedDurationDisplay) { if (m_maxDuration != untupledDuration) { m_unchangedDurationCalculationDisplay->setText - (TQString(" %1 - %2 = ").arg(m_maxDuration).arg(untupledDuration)); + (TQString(" %1 - %2 = ").tqarg(m_maxDuration).tqarg(untupledDuration)); } else { m_unchangedDurationCalculationDisplay->setText(""); } m_unchangedDurationDisplay->setText - (TQString("%1").arg(m_maxDuration - untupledDuration)); + (TQString("%1").tqarg(m_maxDuration - untupledDuration)); } } diff --git a/src/gui/dialogs/TupletDialog.h b/src/gui/dialogs/TupletDialog.h index ae57ca9..6ee424a 100644 --- a/src/gui/dialogs/TupletDialog.h +++ b/src/gui/dialogs/TupletDialog.h @@ -47,9 +47,10 @@ namespace Rosegarden class TupletDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - TupletDialog(TQWidget *parent, + TupletDialog(TQWidget *tqparent, Note::Type defaultUnitType, timeT maxDuration = 0); diff --git a/src/gui/dialogs/UnusedAudioSelectionDialog.cpp b/src/gui/dialogs/UnusedAudioSelectionDialog.cpp index b15fe07..c55a634 100644 --- a/src/gui/dialogs/UnusedAudioSelectionDialog.cpp +++ b/src/gui/dialogs/UnusedAudioSelectionDialog.cpp @@ -39,11 +39,11 @@ namespace Rosegarden { -UnusedAudioSelectionDialog::UnusedAudioSelectionDialog(TQWidget *parent, +UnusedAudioSelectionDialog::UnusedAudioSelectionDialog(TQWidget *tqparent, TQString introductoryText, std::vector<TQString> fileNames, bool offerCancel) : - KDialogBase(parent, 0, true, i18n("Select Unused Audio Files"), (offerCancel ? (Ok | Cancel) : Ok)) + KDialogBase(tqparent, 0, true, i18n("Select Unused Audio Files"), (offerCancel ? (Ok | Cancel) : Ok)) { TQVBox *vbox = makeVBoxMainWidget(); new TQLabel(introductoryText, vbox); @@ -60,8 +60,8 @@ UnusedAudioSelectionDialog::UnusedAudioSelectionDialog(TQWidget *parent, TQString fileSize = i18n(" (not found) "); TQString fileDate; if (info.exists()) { - fileSize = TQString(" %1 ").arg(info.size()); - fileDate = TQString(" %1 ").arg(info.lastModified().toString()); + fileSize = TQString(" %1 ").tqarg(info.size()); + fileDate = TQString(" %1 ").tqarg(info.lastModified().toString()); } TQListViewItem *item = new KListViewItem (m_listView, fileName, fileSize, fileDate); diff --git a/src/gui/dialogs/UseOrnamentDialog.cpp b/src/gui/dialogs/UseOrnamentDialog.cpp index b644a08..d5f7895 100644 --- a/src/gui/dialogs/UseOrnamentDialog.cpp +++ b/src/gui/dialogs/UseOrnamentDialog.cpp @@ -51,25 +51,25 @@ namespace Rosegarden { -UseOrnamentDialog::UseOrnamentDialog(TQWidget *parent, +UseOrnamentDialog::UseOrnamentDialog(TQWidget *tqparent, Composition *composition) : - KDialogBase(parent, "useornamentdialog", true, i18n("Use Ornament"), + KDialogBase(tqparent, "useornamentdialog", true, i18n("Use Ornament"), Ok | Cancel, Ok), m_composition(composition) { TQVBox *vbox = makeVBoxMainWidget(); TQLabel *label; - TQGroupBox *notationBox = new TQGroupBox(1, Horizontal, i18n("Notation"), vbox); + TQGroupBox *notationBox = new TQGroupBox(1, Qt::Horizontal, i18n("Notation"), vbox); TQFrame *frame = new TQFrame(notationBox); - TQGridLayout *layout = new TQGridLayout(frame, 4, 1, 5, 5); + TQGridLayout *tqlayout = new TQGridLayout(frame, 4, 1, 5, 5); label = new TQLabel(i18n("Display as: "), frame); - layout->addWidget(label, 0, 0); + tqlayout->addWidget(label, 0, 0); m_mark = new KComboBox(frame); - layout->addWidget(m_mark, 0, 1); + tqlayout->addWidget(m_mark, 0, 1); m_marks.push_back(Marks::Trill); m_marks.push_back(Marks::LongTrill); @@ -87,7 +87,7 @@ UseOrnamentDialog::UseOrnamentDialog(TQWidget *parent, }; for (size_t i = 0; i < m_marks.size(); ++i) { - m_mark->insertItem(NotePixmapFactory::toQPixmap + m_mark->insertItem(NotePixmapFactory::toTQPixmap (NotePixmapFactory::makeMarkMenuPixmap(m_marks[i])), markLabels[i]); } @@ -96,35 +96,35 @@ UseOrnamentDialog::UseOrnamentDialog(TQWidget *parent, connect(m_mark, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotMarkChanged(int))); m_textLabel = new TQLabel(i18n(" Text: "), frame); - layout->addWidget(m_textLabel, 0, 2); + tqlayout->addWidget(m_textLabel, 0, 2); m_text = new TQLineEdit(frame); - layout->addWidget(m_text, 0, 3); + tqlayout->addWidget(m_text, 0, 3); - TQGroupBox *performBox = new TQGroupBox(1, Horizontal, i18n("Performance"), vbox); + TQGroupBox *performBox = new TQGroupBox(1, Qt::Horizontal, i18n("Performance"), vbox); frame = new TQFrame(performBox); - layout = new TQGridLayout(frame, 3, 2, 5, 5); + tqlayout = new TQGridLayout(frame, 3, 2, 5, 5); label = new TQLabel(i18n("Perform using triggered segment: "), frame); - layout->addWidget(label, 0, 0); + tqlayout->addWidget(label, 0, 0); m_ornament = new KComboBox(frame); - layout->addWidget(m_ornament, 0, 1); + tqlayout->addWidget(m_ornament, 0, 1); int n = 1; for (Composition::triggersegmentcontaineriterator i = m_composition->getTriggerSegments().begin(); i != m_composition->getTriggerSegments().end(); ++i) { m_ornament->insertItem - (TQString("%1. %2").arg(n++).arg(strtoqstr((*i)->getSegment()->getLabel()))); + (TQString("%1. %2").tqarg(n++).tqarg(strtoqstr((*i)->getSegment()->getLabel()))); } label = new TQLabel(i18n("Perform with timing: "), frame); - layout->addWidget(label, 1, 0); + tqlayout->addWidget(label, 1, 0); m_adjustTime = new KComboBox(frame); - layout->addWidget(m_adjustTime, 1, 1); + tqlayout->addWidget(m_adjustTime, 1, 1); m_adjustTime->insertItem(i18n("As stored")); m_adjustTime->insertItem(i18n("Truncate if longer than note")); @@ -134,7 +134,7 @@ UseOrnamentDialog::UseOrnamentDialog(TQWidget *parent, m_retune = new TQCheckBox(i18n("Adjust pitch to note"), frame); m_retune->setChecked(true); - layout->addWidget(m_retune, 2, 1); + tqlayout->addWidget(m_retune, 2, 1); setupFromConfig(); } @@ -150,7 +150,7 @@ UseOrnamentDialog::setupFromConfig() std::string timing = qstrtostr (config->readEntry ("useornamenttiming", - strtoqstr(BaseProperties::TRIGGER_SEGMENT_ADJUST_SQUISH))); + strtoqstr(BaseProperties::TRIGGER_SEGMENT_ADJUST_STQUISH))); bool retune = config->readBoolEntry("useornamentretune", true); size_t i = 0; @@ -172,7 +172,7 @@ UseOrnamentDialog::setupFromConfig() if (timing == BaseProperties::TRIGGER_SEGMENT_ADJUST_NONE) { m_adjustTime->setCurrentItem(0); - } else if (timing == BaseProperties::TRIGGER_SEGMENT_ADJUST_SQUISH) { + } else if (timing == BaseProperties::TRIGGER_SEGMENT_ADJUST_STQUISH) { m_adjustTime->setCurrentItem(3); } else if (timing == BaseProperties::TRIGGER_SEGMENT_ADJUST_SYNC_START) { m_adjustTime->setCurrentItem(1); @@ -229,7 +229,7 @@ UseOrnamentDialog::getTimeAdjust() const case 2: return BaseProperties::TRIGGER_SEGMENT_ADJUST_SYNC_END; case 3: - return BaseProperties::TRIGGER_SEGMENT_ADJUST_SQUISH; + return BaseProperties::TRIGGER_SEGMENT_ADJUST_STQUISH; default: return BaseProperties::TRIGGER_SEGMENT_ADJUST_NONE; diff --git a/src/gui/dialogs/UseOrnamentDialog.h b/src/gui/dialogs/UseOrnamentDialog.h index 17e82b9..bbab171 100644 --- a/src/gui/dialogs/UseOrnamentDialog.h +++ b/src/gui/dialogs/UseOrnamentDialog.h @@ -49,9 +49,10 @@ class Composition; class UseOrnamentDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - UseOrnamentDialog(TQWidget *parent, Composition *); + UseOrnamentDialog(TQWidget *tqparent, Composition *); TriggerSegmentId getId() const; Mark getMark() const; diff --git a/src/gui/editors/eventlist/EventView.cpp b/src/gui/editors/eventlist/EventView.cpp index cdf73cc..0d9b9c5 100644 --- a/src/gui/editors/eventlist/EventView.cpp +++ b/src/gui/editors/eventlist/EventView.cpp @@ -97,8 +97,8 @@ EventView::m_lastSetEventFilter = -1; EventView::EventView(RosegardenGUIDoc *doc, std::vector<Segment *> segments, - TQWidget *parent): - EditViewBase(doc, segments, 2, parent, "eventview"), + TQWidget *tqparent): + EditViewBase(doc, segments, 2, tqparent, "eventview"), m_eventFilter(Note | Text | SystemExclusive | Controller | ProgramChange | PitchBend | Indication | Other), m_menu(0) @@ -126,7 +126,7 @@ EventView::EventView(RosegardenGUIDoc *doc, // define some note filtering buttons in a group // m_filterGroup = - new TQButtonGroup(1, Horizontal, i18n("Event filters"), getCentralWidget()); + new TQButtonGroup(1, Qt::Horizontal, i18n("Event filters"), getCentralWidget()); m_noteCheckBox = new TQCheckBox(i18n("Note"), m_filterGroup); m_programCheckBox = new TQCheckBox(i18n("Program Change"), m_filterGroup); @@ -157,44 +157,44 @@ EventView::EventView(RosegardenGUIDoc *doc, TriggerSegmentRec *rec = segments[0]->getComposition()->getTriggerSegmentRec(id); - TQGroupBox *groupBox = new QGroupBox - (1, Horizontal, i18n("Triggered Segment Properties"), getCentralWidget()); + TQGroupBox *groupBox = new TQGroupBox + (1, Qt::Horizontal, i18n("Triggered Segment Properties"), getCentralWidget()); TQFrame *frame = new TQFrame(groupBox); - TQGridLayout *layout = new TQGridLayout(frame, 5, 3, 5, 5); + TQGridLayout *tqlayout = new TQGridLayout(frame, 5, 3, 5, 5); - layout->addWidget(new TQLabel(i18n("Label: "), frame), 0, 0); + tqlayout->addWidget(new TQLabel(i18n("Label: "), frame), 0, 0); TQString label = strtoqstr(segments[0]->getLabel()); if (label == "") label = i18n("<no label>"); m_triggerName = new TQLabel(label, frame); - layout->addWidget(m_triggerName, 0, 1); + tqlayout->addWidget(m_triggerName, 0, 1); TQPushButton *editButton = new TQPushButton(i18n("edit"), frame); - layout->addWidget(editButton, 0, 2); - connect(editButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotEditTriggerName())); + tqlayout->addWidget(editButton, 0, 2); + connect(editButton, TQT_SIGNAL(clicked()), TQT_TQOBJECT(this), TQT_SLOT(slotEditTriggerName())); - layout->addWidget(new TQLabel(i18n("Base pitch: "), frame), 1, 0); - m_triggerPitch = new TQLabel(TQString("%1").arg(rec->getBasePitch()), frame); - layout->addWidget(m_triggerPitch, 1, 1); + tqlayout->addWidget(new TQLabel(i18n("Base pitch: "), frame), 1, 0); + m_triggerPitch = new TQLabel(TQString("%1").tqarg(rec->getBasePitch()), frame); + tqlayout->addWidget(m_triggerPitch, 1, 1); editButton = new TQPushButton(i18n("edit"), frame); - layout->addWidget(editButton, 1, 2); - connect(editButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotEditTriggerPitch())); + tqlayout->addWidget(editButton, 1, 2); + connect(editButton, TQT_SIGNAL(clicked()), TQT_TQOBJECT(this), TQT_SLOT(slotEditTriggerPitch())); - layout->addWidget(new TQLabel(i18n("Base velocity: "), frame), 2, 0); - m_triggerVelocity = new TQLabel(TQString("%1").arg(rec->getBaseVelocity()), frame); - layout->addWidget(m_triggerVelocity, 2, 1); + tqlayout->addWidget(new TQLabel(i18n("Base velocity: "), frame), 2, 0); + m_triggerVelocity = new TQLabel(TQString("%1").tqarg(rec->getBaseVelocity()), frame); + tqlayout->addWidget(m_triggerVelocity, 2, 1); editButton = new TQPushButton(i18n("edit"), frame); - layout->addWidget(editButton, 2, 2); - connect(editButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotEditTriggerVelocity())); + tqlayout->addWidget(editButton, 2, 2); + connect(editButton, TQT_SIGNAL(clicked()), TQT_TQOBJECT(this), TQT_SLOT(slotEditTriggerVelocity())); /*!!! Comment out these two options, which are not yet used anywhere else -- intended for use with library ornaments, not yet implemented - layout->addWidget(new TQLabel(i18n("Default timing: "), frame), 3, 0); + tqlayout->addWidget(new TQLabel(i18n("Default timing: "), frame), 3, 0); KComboBox *adjust = new KComboBox(frame); - layout->addMultiCellWidget(adjust, 3, 3, 1, 2); + tqlayout->addMultiCellWidget(adjust, 3, 3, 1, 2); adjust->insertItem(i18n("As stored")); adjust->insertItem(i18n("Truncate if longer than note")); adjust->insertItem(i18n("End at same time as note")); @@ -203,7 +203,7 @@ EventView::EventView(RosegardenGUIDoc *doc, std::string timing = rec->getDefaultTimeAdjust(); if (timing == BaseProperties::TRIGGER_SEGMENT_ADJUST_NONE) { adjust->setCurrentItem(0); - } else if (timing == BaseProperties::TRIGGER_SEGMENT_ADJUST_SQUISH) { + } else if (timing == BaseProperties::TRIGGER_SEGMENT_ADJUST_STQUISH) { adjust->setCurrentItem(3); } else if (timing == BaseProperties::TRIGGER_SEGMENT_ADJUST_SYNC_START) { adjust->setCurrentItem(1); @@ -211,12 +211,12 @@ EventView::EventView(RosegardenGUIDoc *doc, adjust->setCurrentItem(2); } - connect(adjust, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotTriggerTimeAdjustChanged(int))); + connect(adjust, TQT_SIGNAL(activated(int)), TQT_TQOBJECT(this), TQT_SLOT(slotTriggerTimeAdjustChanged(int))); TQCheckBox *retune = new TQCheckBox(i18n("Adjust pitch to trigger note by default"), frame); retune->setChecked(rec->getDefaultRetune()); - connect(retune, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotTriggerRetuneChanged())); - layout->addMultiCellWidget(retune, 4, 4, 1, 2); + connect(retune, TQT_SIGNAL(clicked()), TQT_TQOBJECT(this), TQT_SLOT(slotTriggerRetuneChanged())); + tqlayout->addMultiCellWidget(retune, 4, 4, 1, 2); */ @@ -387,7 +387,7 @@ EventView::applyLayout(int /*staffNo*/) int p = (*it)->get <Int>(BaseProperties::PITCH); pitchStr = TQString("%1 %2 ") - .arg(p).arg(MidiPitchLabel(p).getQString()); + .tqarg(p).tqarg(MidiPitchLabel(p).getTQString()); } else if ((*it)->isa(Note::EventType)) { pitchStr = "<not set>"; } @@ -601,7 +601,7 @@ EventView::makeInitialSelection(timeT time) } } -QString +TQString EventView::makeTimeString(timeT time, int timeMode) { switch (timeMode) { @@ -613,31 +613,31 @@ EventView::makeTimeString(timeT time, int timeMode) (time, bar, beat, fraction, remainder); ++bar; return TQString("%1%2%3-%4%5-%6%7-%8%9 ") - .arg(bar / 100) - .arg((bar % 100) / 10) - .arg(bar % 10) - .arg(beat / 10) - .arg(beat % 10) - .arg(fraction / 10) - .arg(fraction % 10) - .arg(remainder / 10) - .arg(remainder % 10); + .tqarg(bar / 100) + .tqarg((bar % 100) / 10) + .tqarg(bar % 10) + .tqarg(beat / 10) + .tqarg(beat % 10) + .tqarg(fraction / 10) + .tqarg(fraction % 10) + .tqarg(remainder / 10) + .tqarg(remainder % 10); } case 1: // real time { RealTime rt = getDocument()->getComposition().getElapsedRealTime(time); - // return TQString("%1 ").arg(rt.toString().c_str()); - return TQString("%1 ").arg(rt.toText().c_str()); + // return TQString("%1 ").tqarg(rt.toString().c_str()); + return TQString("%1 ").tqarg(rt.toText().c_str()); } default: - return TQString("%1 ").arg(time); + return TQString("%1 ").tqarg(time); } } -QString +TQString EventView::makeDurationString(timeT time, timeT duration, int timeMode) { @@ -649,15 +649,15 @@ EventView::makeDurationString(timeT time, getDocument()->getComposition().getMusicalTimeForDuration (time, duration, bar, beat, fraction, remainder); return TQString("%1%2%3-%4%5-%6%7-%8%9 ") - .arg(bar / 100) - .arg((bar % 100) / 10) - .arg(bar % 10) - .arg(beat / 10) - .arg(beat % 10) - .arg(fraction / 10) - .arg(fraction % 10) - .arg(remainder / 10) - .arg(remainder % 10); + .tqarg(bar / 100) + .tqarg((bar % 100) / 10) + .tqarg(bar % 10) + .tqarg(beat / 10) + .tqarg(beat % 10) + .tqarg(fraction / 10) + .tqarg(fraction % 10) + .tqarg(remainder / 10) + .tqarg(remainder % 10); } case 1: // real time @@ -665,12 +665,12 @@ EventView::makeDurationString(timeT time, RealTime rt = getDocument()->getComposition().getRealTimeDifference (time, time + duration); - // return TQString("%1 ").arg(rt.toString().c_str()); - return TQString("%1 ").arg(rt.toText().c_str()); + // return TQString("%1 ").tqarg(rt.toString().c_str()); + return TQString("%1 ").tqarg(rt.toText().c_str()); } default: - return TQString("%1 ").arg(duration); + return TQString("%1 ").tqarg(duration); } } @@ -719,7 +719,7 @@ EventView::slotEditTriggerPitch() if (dlg->exec() == TQDialog::Accepted) { addCommandToHistory(new SetTriggerSegmentBasePitchCommand (&getDocument()->getComposition(), id, dlg->getPitch())); - m_triggerPitch->setText(TQString("%1").arg(dlg->getPitch())); + m_triggerPitch->setText(TQString("%1").tqarg(dlg->getPitch())); } } @@ -737,14 +737,14 @@ EventView::slotEditTriggerVelocity() if (dlg->exec() == TQDialog::Accepted) { addCommandToHistory(new SetTriggerSegmentBaseVelocityCommand (&getDocument()->getComposition(), id, dlg->getVelocity())); - m_triggerVelocity->setText(TQString("%1").arg(dlg->getVelocity())); + m_triggerVelocity->setText(TQString("%1").tqarg(dlg->getVelocity())); } } void EventView::slotTriggerTimeAdjustChanged(int option) { - std::string adjust = BaseProperties::TRIGGER_SEGMENT_ADJUST_SQUISH; + std::string adjust = BaseProperties::TRIGGER_SEGMENT_ADJUST_STQUISH; switch (option) { @@ -758,7 +758,7 @@ EventView::slotTriggerTimeAdjustChanged(int option) adjust = BaseProperties::TRIGGER_SEGMENT_ADJUST_SYNC_END; break; case 3: - adjust = BaseProperties::TRIGGER_SEGMENT_ADJUST_SQUISH; + adjust = BaseProperties::TRIGGER_SEGMENT_ADJUST_STQUISH; break; default: @@ -1120,41 +1120,41 @@ EventView::setupActions() TQString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); TQIconSet icon(TQPixmap(pixmapDir + "/toolbar/event-insert.png")); - new KAction(i18n("&Insert Event"), icon, Key_I, this, + new KAction(i18n("&Insert Event"), icon, Key_I, TQT_TQOBJECT(this), TQT_SLOT(slotEditInsert()), actionCollection(), "insert"); TQCanvasPixmap pixmap(pixmapDir + "/toolbar/event-delete.png"); icon = TQIconSet(pixmap); - new KAction(i18n("&Delete Event"), icon, Key_Delete, this, + new KAction(i18n("&Delete Event"), icon, Key_Delete, TQT_TQOBJECT(this), TQT_SLOT(slotEditDelete()), actionCollection(), "delete"); pixmap.load(pixmapDir + "/toolbar/event-edit.png"); icon = TQIconSet(pixmap); - new KAction(i18n("&Edit Event"), icon, Key_E, this, + new KAction(i18n("&Edit Event"), icon, Key_E, TQT_TQOBJECT(this), TQT_SLOT(slotEditEvent()), actionCollection(), "edit_simple"); pixmap.load(pixmapDir + "/toolbar/event-edit-advanced.png"); icon = TQIconSet(pixmap); - new KAction(i18n("&Advanced Event Editor"), icon, Key_A, this, + new KAction(i18n("&Advanced Event Editor"), icon, Key_A, TQT_TQOBJECT(this), TQT_SLOT(slotEditEventAdvanced()), actionCollection(), "edit_advanced"); // icon = TQIconSet(TQCanvasPixmap(pixmapDir + "/toolbar/eventfilter.xpm")); - new KAction(i18n("&Filter Selection"), "filter", Key_F, this, + new KAction(i18n("&Filter Selection"), "filter", Key_F, TQT_TQOBJECT(this), TQT_SLOT(slotFilterSelection()), actionCollection(), "filter_selection"); - new KAction(i18n("Select &All"), Key_A + CTRL, this, + new KAction(i18n("Select &All"), Key_A + CTRL, TQT_TQOBJECT(this), TQT_SLOT(slotSelectAll()), actionCollection(), "select_all"); - new KAction(i18n("Clear Selection"), Key_Escape, this, + new KAction(i18n("Clear Selection"), Key_Escape, TQT_TQOBJECT(this), TQT_SLOT(slotClearSelection()), actionCollection(), "clear_selection"); @@ -1166,7 +1166,7 @@ EventView::setupActions() pixmap.load(pixmapDir + "/toolbar/time-musical.png"); icon = TQIconSet(pixmap); - action = new KRadioAction(i18n("&Musical Times"), icon, 0, this, + action = new KRadioAction(i18n("&Musical Times"), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotMusicalTime()), actionCollection(), "time_musical"); action->setExclusiveGroup("timeMode"); @@ -1176,7 +1176,7 @@ EventView::setupActions() pixmap.load(pixmapDir + "/toolbar/time-real.png"); icon = TQIconSet(pixmap); - action = new KRadioAction(i18n("&Real Times"), icon, 0, this, + action = new KRadioAction(i18n("&Real Times"), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotRealTime()), actionCollection(), "time_real"); action->setExclusiveGroup("timeMode"); @@ -1186,7 +1186,7 @@ EventView::setupActions() pixmap.load(pixmapDir + "/toolbar/time-raw.png"); icon = TQIconSet(pixmap); - action = new KRadioAction(i18n("Ra&w Times"), icon, 0, this, + action = new KRadioAction(i18n("Ra&w Times"), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotRawTime()), actionCollection(), "time_raw"); action->setExclusiveGroup("timeMode"); @@ -1230,7 +1230,7 @@ EventView::initStatusBar() //sb->addWidget(m_selectionCounter); } -QSize +TQSize EventView::getViewSize() { return m_eventList->size(); @@ -1271,7 +1271,7 @@ EventView::getCurrentSegment() void EventView::slotModifyFilter(int button) { - TQCheckBox *checkBox = dynamic_cast<TQCheckBox*>(m_filterGroup->find(button)); + TQCheckBox *checkBox = dynamic_cast<TQCheckBox*>(m_filterGroup->tqfind(button)); if (checkBox == 0) return ; @@ -1575,8 +1575,8 @@ EventView::updateViewCaption() if (m_isTriggerSegment) { setCaption(i18n("%1 - Triggered Segment: %2") - .arg(getDocument()->getTitle()) - .arg(strtoqstr(m_segments[0]->getLabel()))); + .tqarg(getDocument()->getTitle()) + .tqarg(strtoqstr(m_segments[0]->getLabel()))); } else if (m_segments.size() == 1) { @@ -1590,14 +1590,14 @@ EventView::updateViewCaption() trackPosition = track->getPosition(); setCaption(i18n("%1 - Segment Track #%2 - Event List") - .arg(getDocument()->getTitle()) - .arg(trackPosition + 1)); + .tqarg(getDocument()->getTitle()) + .tqarg(trackPosition + 1)); } else { setCaption(i18n("%1 - %2 Segments - Event List") - .arg(getDocument()->getTitle()) - .arg(m_segments.size())); + .tqarg(getDocument()->getTitle()) + .tqarg(m_segments.size())); } } diff --git a/src/gui/editors/eventlist/EventView.h b/src/gui/editors/eventlist/EventView.h index fc4719a..b4f03c9 100644 --- a/src/gui/editors/eventlist/EventView.h +++ b/src/gui/editors/eventlist/EventView.h @@ -58,6 +58,7 @@ class Event; class EventView : public EditViewBase, public SegmentObserver { Q_OBJECT + TQ_OBJECT // Event filters // @@ -80,7 +81,7 @@ class EventView : public EditViewBase, public SegmentObserver public: EventView(RosegardenGUIDoc *doc, std::vector<Segment *> segments, - TQWidget *parent); + TQWidget *tqparent); virtual ~EventView(); diff --git a/src/gui/editors/eventlist/EventViewItem.h b/src/gui/editors/eventlist/EventViewItem.h index a94e29f..f5b47bb 100644 --- a/src/gui/editors/eventlist/EventViewItem.h +++ b/src/gui/editors/eventlist/EventViewItem.h @@ -41,44 +41,44 @@ class EventViewItem : public KListViewItem public: EventViewItem(Rosegarden::Segment *segment, Rosegarden::Event *event, - KListView *parent) : - KListViewItem(parent), + KListView *tqparent) : + KListViewItem(tqparent), m_segment(segment), m_event(event) {;} EventViewItem(Rosegarden::Segment *segment, Rosegarden::Event *event, - KListViewItem *parent) : - KListViewItem(parent), + KListViewItem *tqparent) : + KListViewItem(tqparent), m_segment(segment), m_event(event) {;} EventViewItem(Rosegarden::Segment *segment, Rosegarden::Event *event, - TQListView *parent, TQString label1, - TQString label2 = TQString::null, - TQString label3 = TQString::null, - TQString label4 = TQString::null, - TQString label5 = TQString::null, - TQString label6 = TQString::null, - TQString label7 = TQString::null, - TQString label8 = TQString::null) : - KListViewItem(parent, label1, label2, label3, label4, + TQListView *tqparent, TQString label1, + TQString label2 = TQString(), + TQString label3 = TQString(), + TQString label4 = TQString(), + TQString label5 = TQString(), + TQString label6 = TQString(), + TQString label7 = TQString(), + TQString label8 = TQString()) : + KListViewItem(tqparent, label1, label2, label3, label4, label5, label6, label7, label8), m_segment(segment), m_event(event) {;} EventViewItem(Rosegarden::Segment *segment, Rosegarden::Event *event, - KListViewItem *parent, TQString label1, - TQString label2 = TQString::null, - TQString label3 = TQString::null, - TQString label4 = TQString::null, - TQString label5 = TQString::null, - TQString label6 = TQString::null, - TQString label7 = TQString::null, - TQString label8 = TQString::null) : - KListViewItem(parent, label1, label2, label3, label4, + KListViewItem *tqparent, TQString label1, + TQString label2 = TQString(), + TQString label3 = TQString(), + TQString label4 = TQString(), + TQString label5 = TQString(), + TQString label6 = TQString(), + TQString label7 = TQString(), + TQString label8 = TQString()) : + KListViewItem(tqparent, label1, label2, label3, label4, label5, label6, label7, label8), m_segment(segment), m_event(event) {;} diff --git a/src/gui/editors/eventlist/TrivialVelocityDialog.cpp b/src/gui/editors/eventlist/TrivialVelocityDialog.cpp index 6b9f748..08a4d22 100644 --- a/src/gui/editors/eventlist/TrivialVelocityDialog.cpp +++ b/src/gui/editors/eventlist/TrivialVelocityDialog.cpp @@ -30,8 +30,8 @@ namespace Rosegarden { -TrivialVelocityDialog::TrivialVelocityDialog(TQWidget *parent, TQString label, int deft) : - KDialogBase(parent, 0, true, label, Ok | Cancel) +TrivialVelocityDialog::TrivialVelocityDialog(TQWidget *tqparent, TQString label, int deft) : + KDialogBase(tqparent, 0, true, label, Ok | Cancel) { TQHBox *hbox = makeHBoxMainWidget(); new TQLabel(label, hbox); diff --git a/src/gui/editors/eventlist/TrivialVelocityDialog.h b/src/gui/editors/eventlist/TrivialVelocityDialog.h index c164110..cadb1e1 100644 --- a/src/gui/editors/eventlist/TrivialVelocityDialog.h +++ b/src/gui/editors/eventlist/TrivialVelocityDialog.h @@ -35,7 +35,7 @@ namespace Rosegarden { class TrivialVelocityDialog : public KDialogBase { public: - TrivialVelocityDialog(TQWidget *parent, TQString label, int deft); + TrivialVelocityDialog(TQWidget *tqparent, TQString label, int deft); int getVelocity(); diff --git a/src/gui/editors/guitar/Chord.cpp b/src/gui/editors/guitar/Chord.cpp index c697e96..33c137c 100644 --- a/src/gui/editors/guitar/Chord.cpp +++ b/src/gui/editors/guitar/Chord.cpp @@ -50,7 +50,7 @@ Chord::Chord(const TQString& root, const TQString& ext) m_isUserChord(false) { if (m_ext.isEmpty()) - m_ext = TQString::null; + m_ext = TQString(); } Chord::Chord(const Event& e) @@ -61,19 +61,19 @@ Chord::Chord(const Event& e) ok = e.get<String>(RootPropertyName, f); if (ok) - m_root = f; + m_root = f.c_str(); ok = e.get<String>(ExtPropertyName, f); if (ok) { if (f.length() == 0) - m_ext = TQString::null; + m_ext = TQString(); else - m_ext = f; + m_ext = f.c_str(); } ok = e.get<String>(FingeringPropertyName, f); if (ok) { - TQString qf(f); + TQString qf(f.c_str()); TQString errString; Fingering fingering = Fingering::parseFingering(qf, errString); @@ -84,8 +84,8 @@ Chord::Chord(const Event& e) Event* Chord::getAsEvent(timeT absoluteTime) const { Event *e = new Event(EventType, absoluteTime, 0, EventSubOrdering); - e->set<String>(RootPropertyName, m_root); - e->set<String>(ExtPropertyName, m_ext); + e->set<String>(RootPropertyName, m_root.ascii()); + e->set<String>(ExtPropertyName, m_ext.ascii()); e->set<String>(FingeringPropertyName, getFingering().toString()); return e; } diff --git a/src/gui/editors/guitar/Chord.h b/src/gui/editors/guitar/Chord.h index f519c9c..0b6bc59 100644 --- a/src/gui/editors/guitar/Chord.h +++ b/src/gui/editors/guitar/Chord.h @@ -53,7 +53,7 @@ public: static const PropertyName FingeringPropertyName; Chord(); - Chord(const TQString& root, const TQString& ext = TQString::null); + Chord(const TQString& root, const TQString& ext = TQString()); Chord(const Event&); Event* getAsEvent(timeT absoluteTime) const; @@ -68,9 +68,9 @@ public: void setRoot(TQString r) { m_root = r; } TQString getExt() const { return m_ext; } - void setExt(TQString r) { m_ext = r.isEmpty() ? TQString::null : r; } + void setExt(TQString r) { m_ext = r.isEmpty() ? TQString() : r; } - bool hasAltBass() const { return m_ext.contains(ALT_BASS_REGEXP); } + bool hasAltBass() const { return m_ext.tqcontains(ALT_BASS_REGEXP); } Fingering getFingering() const { return m_fingering; } void setFingering(Fingering f) { m_fingering = f; } diff --git a/src/gui/editors/guitar/ChordMap.cpp b/src/gui/editors/guitar/ChordMap.cpp index 207a336..64ea463 100644 --- a/src/gui/editors/guitar/ChordMap.cpp +++ b/src/gui/editors/guitar/ChordMap.cpp @@ -71,7 +71,7 @@ ChordMap::getChords(const TQString& root, const TQString& ext) const return res; } -QStringList +TQStringList ChordMap::getRootList() const { static TQStringList rootNotes; @@ -95,7 +95,7 @@ ChordMap::getRootList() const return rootNotes; } -QStringList +TQStringList ChordMap::getExtList(const TQString& root) const { TQStringList extList; @@ -192,7 +192,7 @@ bool ChordMap::saveDocument(const TQString& filename, bool userChordsOnly, TQStr outStream << ">\n"; } - outStream << "<fingering>" << chord.getFingering().toString() << "</fingering>\n"; + outStream << "<fingering>" << chord.getFingering().toString().c_str() << "</fingering>\n"; } if (!m_map.empty()) @@ -201,7 +201,7 @@ bool ChordMap::saveDocument(const TQString& filename, bool userChordsOnly, TQStr outStream << "</chords>\n"; outStream << "</rosegarden-chord-data>\n"; - return outStream.device()->status() == IO_Ok; + return outStream.tqdevice()->status() == IO_Ok; } int ChordMap::FILE_FORMAT_VERSION_MAJOR = 1; diff --git a/src/gui/editors/guitar/ChordXmlHandler.cpp b/src/gui/editors/guitar/ChordXmlHandler.cpp index 6802485..d2f71b4 100644 --- a/src/gui/editors/guitar/ChordXmlHandler.cpp +++ b/src/gui/editors/guitar/ChordXmlHandler.cpp @@ -134,9 +134,9 @@ bool ChordXmlHandler::error(const TQXmlParseException& exception) { m_errorString = TQString("%1 at line %2, column %3") - .arg(exception.message()) - .arg(exception.lineNumber()) - .arg(exception.columnNumber()); + .tqarg(exception.message()) + .tqarg(exception.lineNumber()) + .tqarg(exception.columnNumber()); return TQXmlDefaultHandler::error( exception ); } @@ -144,9 +144,9 @@ bool ChordXmlHandler::fatalError(const TQXmlParseException& exception) { m_errorString = TQString("%1 at line %2, column %3") - .arg(exception.message()) - .arg(exception.lineNumber()) - .arg(exception.columnNumber()); + .tqarg(exception.message()) + .tqarg(exception.lineNumber()) + .tqarg(exception.columnNumber()); return TQXmlDefaultHandler::fatalError( exception ); } diff --git a/src/gui/editors/guitar/ChordXmlHandler.h b/src/gui/editors/guitar/ChordXmlHandler.h index f9c2e8b..910e9e8 100644 --- a/src/gui/editors/guitar/ChordXmlHandler.h +++ b/src/gui/editors/guitar/ChordXmlHandler.h @@ -36,7 +36,7 @@ namespace Rosegarden { -class ChordXmlHandler : public ProgressReporter, public QXmlDefaultHandler +class ChordXmlHandler : public ProgressReporter, public TQXmlDefaultHandler { public: ChordXmlHandler(Guitar::ChordMap&); diff --git a/src/gui/editors/guitar/Fingering.cpp b/src/gui/editors/guitar/Fingering.cpp index 59459e9..7e5ecc4 100644 --- a/src/gui/editors/guitar/Fingering.cpp +++ b/src/gui/editors/guitar/Fingering.cpp @@ -69,24 +69,24 @@ Fingering::getStartFret() const bool Fingering::hasBarre() const { - int lastStringStatus = m_strings[getNbStrings() - 1]; + int lastStringtqStatus = m_strings[getNbStrings() - 1]; - return ((m_strings[0] > OPEN && m_strings[0] == lastStringStatus) || - (m_strings[1] > OPEN && m_strings[1] == lastStringStatus) || - (m_strings[2] > OPEN && m_strings[2] == lastStringStatus)); + return ((m_strings[0] > OPEN && m_strings[0] == lastStringtqStatus) || + (m_strings[1] > OPEN && m_strings[1] == lastStringtqStatus) || + (m_strings[2] > OPEN && m_strings[2] == lastStringtqStatus)); } Fingering::Barre Fingering::getBarre() const { - int lastStringStatus = m_strings[getNbStrings() - 1]; + int lastStringtqStatus = m_strings[getNbStrings() - 1]; Barre res; - res.fret = lastStringStatus; + res.fret = lastStringtqStatus; for(unsigned int i = 0; i < 3; ++i) { - if (m_strings[i] > OPEN && m_strings[i] == lastStringStatus) + if (m_strings[i] > OPEN && m_strings[i] == lastStringtqStatus) res.start = i; break; } @@ -115,7 +115,7 @@ Fingering::parseFingering(const TQString& ch, TQString& errorString) // NOTATION_DEBUG << "Fingering::parseFingering : '" << t << "' = MUTED\n"; fingering[idx] = MUTED; } else { - errorString = i18n("couldn't parse fingering '%1' in '%2'").arg(t).arg(ch); + errorString = i18n("couldn't parse fingering '%1' in '%2'").tqarg(t).tqarg(ch); } } @@ -140,8 +140,8 @@ std::string Fingering::toString() const bool operator<(const Fingering& a, const Fingering& b) { for(unsigned int i = 0; i < Fingering::DEFAULT_NB_STRINGS; ++i) { - if (a.getStringStatus(i) != b.getStringStatus(i)) { - return a.getStringStatus(i) < b.getStringStatus(i); + if (a.getStringtqStatus(i) != b.getStringtqStatus(i)) { + return a.getStringtqStatus(i) < b.getStringtqStatus(i); } } return false; diff --git a/src/gui/editors/guitar/Fingering.h b/src/gui/editors/guitar/Fingering.h index 32693dd..b413d3b 100644 --- a/src/gui/editors/guitar/Fingering.h +++ b/src/gui/editors/guitar/Fingering.h @@ -60,8 +60,8 @@ public: * returns the fret number on which the string is pressed, or one of MUTED and OPEN * */ - int getStringStatus(int stringNb) const { return m_strings[stringNb]; } - void setStringStatus(int stringNb, int status) { m_strings[stringNb] = status; } + int getStringtqStatus(int stringNb) const { return m_strings[stringNb]; } + void setStringtqStatus(int stringNb, int status) { m_strings[stringNb] = status; } unsigned int getStartFret() const; unsigned int getNbStrings() const { return m_strings.size(); } diff --git a/src/gui/editors/guitar/FingeringBox.cpp b/src/gui/editors/guitar/FingeringBox.cpp index 6695a66..7677b85 100644 --- a/src/gui/editors/guitar/FingeringBox.cpp +++ b/src/gui/editors/guitar/FingeringBox.cpp @@ -31,8 +31,8 @@ namespace Rosegarden { -FingeringBox::FingeringBox(unsigned int nbFrets, unsigned int nbStrings, bool editable, TQWidget *parent, const char* name) - : TQFrame(parent, name), +FingeringBox::FingeringBox(unsigned int nbFrets, unsigned int nbStrings, bool editable, TQWidget *tqparent, const char* name) + : TQFrame(tqparent, name), m_nbFretsDisplayed(nbFrets), m_startFret(1), m_nbStrings(nbStrings), @@ -44,8 +44,8 @@ FingeringBox::FingeringBox(unsigned int nbFrets, unsigned int nbStrings, bool ed init(); } -FingeringBox::FingeringBox(bool editable, TQWidget *parent, const char* name) - : TQFrame(parent, name), +FingeringBox::FingeringBox(bool editable, TQWidget *tqparent, const char* name) + : TQFrame(tqparent, name), m_nbFretsDisplayed(DEFAULT_NB_DISPLAYED_FRETS), m_startFret(1), m_nbStrings(Guitar::Fingering::DEFAULT_NB_STRINGS), @@ -123,11 +123,11 @@ FingeringBox::drawContents(TQPainter* p) // DEBUG // p->save(); -// p->setPen(Qt::red); +// p->setPen(TQt::red); // unsigned int topBorderY = m_noteSymbols.getTopBorder(maximumHeight()); // p->drawLine(0, topBorderY, 20, topBorderY); // p->drawRect(m_r1); -// p->setPen(Qt::blue); +// p->setPen(TQt::blue); // p->drawRect(m_r2); // p->restore(); } @@ -183,7 +183,7 @@ FingeringBox::mousePressEvent(TQMouseEvent *event) if (!m_editable) return; - if((event->button() == LeftButton) && m_editable) { + if((event->button() == Qt::LeftButton) && m_editable) { // Find string position m_press_string_num = getStringNumber(event->pos()); @@ -219,16 +219,16 @@ FingeringBox::processMouseRelease(unsigned int release_string_num, if(m_press_fret_num == 0) { - int stringStatus = m_fingering.getStringStatus(m_press_string_num); + int stringtqStatus = m_fingering.getStringtqStatus(m_press_string_num); - if (stringStatus == Guitar::Fingering::OPEN) + if (stringtqStatus == Guitar::Fingering::OPEN) aVal = Guitar::Fingering::MUTED; - else if (stringStatus > Guitar::Fingering::OPEN) + else if (stringtqStatus > Guitar::Fingering::OPEN) aVal = Guitar::Fingering::OPEN; } - m_fingering.setStringStatus(m_press_string_num, aVal); + m_fingering.setStringtqStatus(m_press_string_num, aVal); update(); } diff --git a/src/gui/editors/guitar/FingeringBox.h b/src/gui/editors/guitar/FingeringBox.h index aa76e52..06b8500 100644 --- a/src/gui/editors/guitar/FingeringBox.h +++ b/src/gui/editors/guitar/FingeringBox.h @@ -37,14 +37,14 @@ namespace Rosegarden class Fingering; -class FingeringBox : public QFrame +class FingeringBox : public TQFrame { static const unsigned int IMG_WIDTH = 200; static const unsigned int IMG_HEIGHT = 200; public: - FingeringBox(unsigned int nbFrets, unsigned int nbStrings, bool editable, TQWidget *parent, const char* name = 0); - FingeringBox(bool editable, TQWidget *parent, const char* name = 0); + FingeringBox(unsigned int nbFrets, unsigned int nbStrings, bool editable, TQWidget *tqparent, const char* name = 0); + FingeringBox(bool editable, TQWidget *tqparent, const char* name = 0); void setStartFret(unsigned int f) { m_startFret = f; update(); } unsigned int getStartFret() const { return m_startFret; } diff --git a/src/gui/editors/guitar/FingeringListBoxItem.cpp b/src/gui/editors/guitar/FingeringListBoxItem.cpp index aeb8fcd..64b7f10 100644 --- a/src/gui/editors/guitar/FingeringListBoxItem.cpp +++ b/src/gui/editors/guitar/FingeringListBoxItem.cpp @@ -27,8 +27,8 @@ namespace Rosegarden { -FingeringListBoxItem::FingeringListBoxItem(const Guitar::Chord& chord, TQListBox* parent, TQPixmap pixmap, TQString fingeringString) - : TQListBoxPixmap(parent, pixmap, fingeringString), +FingeringListBoxItem::FingeringListBoxItem(const Guitar::Chord& chord, TQListBox* tqparent, TQPixmap pixmap, TQString fingeringString) + : TQListBoxPixmap(tqparent, pixmap, fingeringString), m_chord(chord) { } diff --git a/src/gui/editors/guitar/FingeringListBoxItem.h b/src/gui/editors/guitar/FingeringListBoxItem.h index 8b0a81a..f900056 100644 --- a/src/gui/editors/guitar/FingeringListBoxItem.h +++ b/src/gui/editors/guitar/FingeringListBoxItem.h @@ -31,10 +31,10 @@ namespace Rosegarden { -class FingeringListBoxItem : public QListBoxPixmap +class FingeringListBoxItem : public TQListBoxPixmap { public: - FingeringListBoxItem(const Guitar::Chord& chord, TQListBox* parent, TQPixmap pixmap, TQString fingeringString); + FingeringListBoxItem(const Guitar::Chord& chord, TQListBox* tqparent, TQPixmap pixmap, TQString fingeringString); const Guitar::Chord& getChord() { return m_chord; } protected: diff --git a/src/gui/editors/guitar/GuitarChordEditorDialog.cpp b/src/gui/editors/guitar/GuitarChordEditorDialog.cpp index 8a4fb3e..57df4d6 100644 --- a/src/gui/editors/guitar/GuitarChordEditorDialog.cpp +++ b/src/gui/editors/guitar/GuitarChordEditorDialog.cpp @@ -39,8 +39,8 @@ namespace Rosegarden { -GuitarChordEditorDialog::GuitarChordEditorDialog(Guitar::Chord& chord, const Guitar::ChordMap& chordMap, TQWidget *parent) - : KDialogBase(parent, "GuitarChordEditor", true, i18n("Guitar Chord Editor"), Ok|Cancel), +GuitarChordEditorDialog::GuitarChordEditorDialog(Guitar::Chord& chord, const Guitar::ChordMap& chordMap, TQWidget *tqparent) + : KDialogBase(tqparent, "GuitarChordEditor", true, i18n("Guitar Chord Editor"), Ok|Cancel), m_chord(chord), m_chordMap(chordMap) { @@ -75,13 +75,13 @@ GuitarChordEditorDialog::GuitarChordEditorDialog(Guitar::Chord& chord, const Gui TQStringList rootList = m_chordMap.getRootList(); if (rootList.count() > 0) { m_rootNotesList->insertStringList(rootList); - m_rootNotesList->setCurrentItem(rootList.findIndex(m_chord.getRoot())); + m_rootNotesList->setCurrentItem(rootList.tqfindIndex(m_chord.getRoot())); } TQStringList extList = m_chordMap.getExtList(m_chord.getRoot()); if (extList.count() > 0) { m_ext->insertStringList(extList); - m_ext->setCurrentItem(extList.findIndex(m_chord.getExt())); + m_ext->setCurrentItem(extList.tqfindIndex(m_chord.getExt())); } } diff --git a/src/gui/editors/guitar/GuitarChordEditorDialog.h b/src/gui/editors/guitar/GuitarChordEditorDialog.h index f26fcd3..2b286ee 100644 --- a/src/gui/editors/guitar/GuitarChordEditorDialog.h +++ b/src/gui/editors/guitar/GuitarChordEditorDialog.h @@ -42,9 +42,10 @@ class FingeringBox; class GuitarChordEditorDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - GuitarChordEditorDialog(Guitar::Chord&, const Guitar::ChordMap& chordMap, TQWidget *parent=0); + GuitarChordEditorDialog(Guitar::Chord&, const Guitar::ChordMap& chordMap, TQWidget *tqparent=0); protected slots: void slotStartFretChanged(int); diff --git a/src/gui/editors/guitar/GuitarChordSelectorDialog.cpp b/src/gui/editors/guitar/GuitarChordSelectorDialog.cpp index 5430098..0f9ea8d 100644 --- a/src/gui/editors/guitar/GuitarChordSelectorDialog.cpp +++ b/src/gui/editors/guitar/GuitarChordSelectorDialog.cpp @@ -41,8 +41,8 @@ namespace Rosegarden { -GuitarChordSelectorDialog::GuitarChordSelectorDialog(TQWidget *parent) - : KDialogBase(parent, "GuitarChordSelector", true, i18n("Guitar Chord Selector"), Ok|Cancel) +GuitarChordSelectorDialog::GuitarChordSelectorDialog(TQWidget *tqparent) + : KDialogBase(tqparent, "GuitarChordSelector", true, i18n("Guitar Chord Selector"), Ok|Cancel) { TQWidget *page = new TQWidget(this); setMainWidget(page); @@ -214,12 +214,12 @@ GuitarChordSelectorDialog::slotNewFingering() m_chordMap.insert(newChord); // populate lists // - if (!m_rootNotesList->findItem(newChord.getRoot(), Qt::ExactMatch)) { + if (!m_rootNotesList->tqfindItem(newChord.getRoot(), TQt::ExactMatch)) { m_rootNotesList->insertItem(newChord.getRoot()); m_rootNotesList->sort(); } - if (!m_chordExtList->findItem(newChord.getExt(), Qt::ExactMatch)) { + if (!m_chordExtList->tqfindItem(newChord.getExt(), TQt::ExactMatch)) { m_chordExtList->insertItem(newChord.getExt()); m_chordExtList->sort(); } @@ -280,7 +280,7 @@ GuitarChordSelectorDialog::setChord(const Guitar::Chord& chord) // select the chord's root // m_rootNotesList->setCurrentItem(0); - TQListBoxItem* correspondingRoot = m_rootNotesList->findItem(chord.getRoot(), Qt::ExactMatch); + TQListBoxItem* correspondingRoot = m_rootNotesList->tqfindItem(chord.getRoot(), TQt::ExactMatch); if (correspondingRoot) m_rootNotesList->setSelected(correspondingRoot, true); @@ -303,7 +303,7 @@ GuitarChordSelectorDialog::setChord(const Guitar::Chord& chord) chordExt = ""; m_chordExtList->setSelected(0, true); } else { - TQListBoxItem* correspondingExt = m_chordExtList->findItem(chordExt, Qt::ExactMatch); + TQListBoxItem* correspondingExt = m_chordExtList->tqfindItem(chordExt, TQt::ExactMatch); if (correspondingExt) m_chordExtList->setSelected(correspondingExt, true); } @@ -321,7 +321,7 @@ GuitarChordSelectorDialog::populateFingerings(const Guitar::ChordMap::chordarray for(Guitar::ChordMap::chordarray::const_iterator i = chords.begin(); i != chords.end(); ++i) { const Guitar::Chord& chord = *i; - TQString fingeringString = chord.getFingering().toString(); + TQString fingeringString = chord.getFingering().toString().c_str(); NOTATION_DEBUG << "GuitarChordSelectorDialog::populateFingerings " << chord << endl; TQPixmap fingeringPixmap = getFingeringPixmap(chord.getFingering()); FingeringListBoxItem *item = new FingeringListBoxItem(chord, m_fingeringsList, fingeringPixmap, fingeringString); @@ -334,7 +334,7 @@ GuitarChordSelectorDialog::populateFingerings(const Guitar::ChordMap::chordarray } -QPixmap +TQPixmap GuitarChordSelectorDialog::getFingeringPixmap(const Guitar::Fingering& fingering) const { TQPixmap pixmap(FINGERING_PIXMAP_WIDTH, FINGERING_PIXMAP_HEIGHT); @@ -416,7 +416,7 @@ GuitarChordSelectorDialog::parseChordFile(const TQString& chordFileName) TQFile chordFile(chordFileName); bool ok = chordFile.open(IO_ReadOnly); if (!ok) - KMessageBox::error(0, i18n("couldn't open file '%1'").arg(handler.errorString())); + KMessageBox::error(0, i18n("couldn't open file '%1'").tqarg(handler.errorString())); TQXmlInputSource source(chordFile); TQXmlSimpleReader reader; @@ -425,7 +425,7 @@ GuitarChordSelectorDialog::parseChordFile(const TQString& chordFileName) NOTATION_DEBUG << "GuitarChordSelectorDialog::parseChordFile() parsing " << chordFileName << endl; reader.parse(source); if (!ok) - KMessageBox::error(0, i18n("couldn't parse chord dictionnary : %1").arg(handler.errorString())); + KMessageBox::error(0, i18n("couldn't parse chord dictionnary : %1").tqarg(handler.errorString())); } diff --git a/src/gui/editors/guitar/GuitarChordSelectorDialog.h b/src/gui/editors/guitar/GuitarChordSelectorDialog.h index 17b1eff..b6ddea1 100644 --- a/src/gui/editors/guitar/GuitarChordSelectorDialog.h +++ b/src/gui/editors/guitar/GuitarChordSelectorDialog.h @@ -46,11 +46,12 @@ class FingeringBox; class GuitarChordSelectorDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT enum { COMPLEXITY_BEGINNER, COMPLEXITY_COMMON, COMPLEXITY_ALL }; public: - GuitarChordSelectorDialog(TQWidget *parent=0); + GuitarChordSelectorDialog(TQWidget *tqparent=0); void init(); diff --git a/src/gui/editors/guitar/NoteSymbols.cpp b/src/gui/editors/guitar/NoteSymbols.cpp index b7ed8f4..1d09299 100644 --- a/src/gui/editors/guitar/NoteSymbols.cpp +++ b/src/gui/editors/guitar/NoteSymbols.cpp @@ -101,7 +101,7 @@ NoteSymbols::drawOpenSymbol ( TQPainter* p, //std::cout << "NoteSymbols::drawOpenSymbol - drawing Open symbol at string #" << position //<< std::endl; - p->setBrush( TQBrush(p->brush().color(), Qt::NoBrush) ); + p->setBrush( TQBrush(p->brush().color(), TQt::NoBrush) ); p->drawEllipse( x_pos.first - ( radius / 2 ), y_pos - ( radius / 2 ), radius, @@ -124,10 +124,10 @@ NoteSymbols::drawNoteSymbol ( TQPainter* p, if (transient) { radius = static_cast<unsigned int>( columnWidth /* * 0.9 */ ); - p->setBrush( TQBrush(p->brush().color(), Qt::NoBrush) ); + p->setBrush( TQBrush(p->brush().color(), TQt::NoBrush) ); } else { radius = static_cast<unsigned int>( columnWidth * 0.7 ); - p->setBrush( TQBrush(p->brush().color(), Qt::SolidPattern) ); + p->setBrush( TQBrush(p->brush().color(), TQt::SolidPattern) ); } int x = x_pos.first - ( radius / 2 ), @@ -143,7 +143,7 @@ NoteSymbols::drawNoteSymbol ( TQPainter* p, radius ); // p->save(); -// p->setPen(Qt::red); +// p->setPen(TQt::red); // p->drawRect( x, y, radius, radius ); // p->restore(); } diff --git a/src/gui/editors/matrix/MatrixCanvasView.cpp b/src/gui/editors/matrix/MatrixCanvasView.cpp index f97ceaf..5782164 100644 --- a/src/gui/editors/matrix/MatrixCanvasView.cpp +++ b/src/gui/editors/matrix/MatrixCanvasView.cpp @@ -45,9 +45,9 @@ namespace Rosegarden MatrixCanvasView::MatrixCanvasView(MatrixStaff& staff, SnapGrid *snapGrid, bool drumMode, - TQCanvas *viewing, TQWidget *parent, + TQCanvas *viewing, TQWidget *tqparent, const char *name, WFlags f) - : RosegardenCanvasView(viewing, parent, name, f), + : RosegardenCanvasView(viewing, tqparent, name, f), m_staff(staff), m_snapGrid(snapGrid), m_drumMode(drumMode), @@ -55,7 +55,7 @@ MatrixCanvasView::MatrixCanvasView(MatrixStaff& staff, m_previousEvPitch(0), m_mouseWasPressed(false), m_ignoreClick(false), - m_smoothModifier(Qt::ShiftButton), + m_smoothModifier(TQt::ShiftButton), m_lastSnap(SnapGrid::SnapToBeat), m_isSnapTemporary(false) { @@ -130,7 +130,7 @@ void MatrixCanvasView::contentsMousePressEvent(TQMouseEvent* e) // TQCanvas::collisions() can be a bit optimistic and report // items which are close to the point but not actually under it. // So a little sanity check helps. - if (!rect.contains(p, true)) continue; + if (!rect.tqcontains(p, true)) continue; mel = &(mRect->getMatrixElement()); // std::cerr << "MatrixCanvasView::contentsMousePressEvent: collision with an existing matrix element" << std::endl; @@ -198,7 +198,7 @@ void MatrixCanvasView::contentsMouseMoveEvent(TQMouseEvent* e) QCanvasMatrixRectangle *mRect = 0; if ((mRect = dynamic_cast<QCanvasMatrixRectangle*>(item))) { - if (!mRect->rect().contains(p, true)) + if (!mRect->rect().tqcontains(p, true)) continue; mel = &(mRect->getMatrixElement()); MATRIX_DEBUG << "have element" << endl; @@ -268,7 +268,7 @@ void MatrixCanvasView::slotExternalWheelEvent(TQWheelEvent* e) void MatrixCanvasView::updateGridSnap(TQMouseEvent *e) { - Qt::ButtonState bs = e->state(); + TQt::ButtonState bs = e->state(); // MATRIX_DEBUG << "MatrixCanvasView::updateGridSnap : bs = " // << bs << " - sm = " << getSmoothModifier() << ", is temporary " << m_isSnapTemporary << ", saved is " << m_lastSnap << endl; diff --git a/src/gui/editors/matrix/MatrixCanvasView.h b/src/gui/editors/matrix/MatrixCanvasView.h index 694856e..5391f9f 100644 --- a/src/gui/editors/matrix/MatrixCanvasView.h +++ b/src/gui/editors/matrix/MatrixCanvasView.h @@ -48,25 +48,26 @@ class MatrixElement; class MatrixCanvasView : public RosegardenCanvasView { Q_OBJECT + TQ_OBJECT public: MatrixCanvasView(MatrixStaff&, SnapGrid *, bool drumMode, TQCanvas *viewing, - TQWidget *parent=0, const char *name=0, WFlags f=0); + TQWidget *tqparent=0, const char *name=0, WFlags f=0); ~MatrixCanvasView(); - void setSmoothModifier(Qt::ButtonState s) { m_smoothModifier = s; } - Qt::ButtonState getSmoothModifier() { return m_smoothModifier; } + void setSmoothModifier(TQt::ButtonState s) { m_smoothModifier = s; } + TQt::ButtonState getSmoothModifier() { return m_smoothModifier; } signals: /** * Emitted when the user clicks on a TQCanvasItem which is active * - * @see QCanvasItem#setActive + * @see TQCanvasItem#setActive */ void activeItemPressed(TQMouseEvent*, TQCanvasItem* item); @@ -150,7 +151,7 @@ protected: bool m_mouseWasPressed; bool m_ignoreClick; - Qt::ButtonState m_smoothModifier; + TQt::ButtonState m_smoothModifier; timeT m_lastSnap; bool m_isSnapTemporary; }; diff --git a/src/gui/editors/matrix/MatrixElement.cpp b/src/gui/editors/matrix/MatrixElement.cpp index c706c87..b60b63f 100644 --- a/src/gui/editors/matrix/MatrixElement.cpp +++ b/src/gui/editors/matrix/MatrixElement.cpp @@ -87,7 +87,7 @@ void MatrixElement::drawOverlapRectangles() if (m_overlapRectangles) removeOverlapRectangles(); TQRect elRect = m_canvasRect->rect(); - QCanvasItemList + TQCanvasItemList itemList = m_canvasRect->canvas()->collisions(elRect); TQCanvasItemList::Iterator it; MatrixElement* mel = 0; @@ -120,7 +120,7 @@ void MatrixElement::drawOverlapRectangles() void MatrixElement::redrawOverlaps(TQRect rect) { - QCanvasItemList + TQCanvasItemList itemList = m_canvasRect->canvas()->collisions(rect); TQCanvasItemList::Iterator it; MatrixElement* mel = 0; diff --git a/src/gui/editors/matrix/MatrixEraser.cpp b/src/gui/editors/matrix/MatrixEraser.cpp index 226c4a8..a5f261a 100644 --- a/src/gui/editors/matrix/MatrixEraser.cpp +++ b/src/gui/editors/matrix/MatrixEraser.cpp @@ -43,8 +43,8 @@ namespace Rosegarden { -MatrixEraser::MatrixEraser(MatrixView* parent) - : MatrixTool("MatrixEraser", parent), +MatrixEraser::MatrixEraser(MatrixView* tqparent) + : MatrixTool("MatrixEraser", tqparent), m_currentStaff(0) { TQString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); @@ -96,7 +96,7 @@ void MatrixEraser::handleLeftButtonPress(timeT, void MatrixEraser::ready() { - m_mParentView->setCanvasCursor(Qt::pointingHandCursor); + m_mParentView->setCanvasCursor(TQt::pointingHandCursor); setBasicContextHelp(); } diff --git a/src/gui/editors/matrix/MatrixHLayout.cpp b/src/gui/editors/matrix/MatrixHLayout.cpp index 99b89c2..f4615fa 100644 --- a/src/gui/editors/matrix/MatrixHLayout.cpp +++ b/src/gui/editors/matrix/MatrixHLayout.cpp @@ -61,7 +61,7 @@ void MatrixHLayout::scanStaff(Staff &staffBase, { Profiler profiler("MatrixHLayout::scanStaff", true); - // The Matrix layout is not currently designed to be able to lay + // The Matrix tqlayout is not currently designed to be able to lay // out more than one staff, because we have no requirement to show // more than one at once in the Matrix view. To make it work for // multiple staffs should be straightforward; we just need to bear @@ -88,7 +88,7 @@ void MatrixHLayout::scanStaff(Staff &staffBase, } // Do this in two parts: bar lines separately from elements. - // (We don't need to do all that stuff notationhlayout has to do, + // (We don't need to do all that stuff notationhtqlayout has to do, // scanning the notes bar-by-bar; we can just place the bar lines // in the theoretically-correct places and do the same with the // notes quite independently.) diff --git a/src/gui/editors/matrix/MatrixHLayout.h b/src/gui/editors/matrix/MatrixHLayout.h index 76f1b31..291d618 100644 --- a/src/gui/editors/matrix/MatrixHLayout.h +++ b/src/gui/editors/matrix/MatrixHLayout.h @@ -62,7 +62,7 @@ public: timeT = 0); /** - * Returns the total length of all elements once layout is done. + * Returns the total length of all elements once tqlayout is done. * This is the x-coord of the end of the last element on the * longest staff */ @@ -84,9 +84,9 @@ public: virtual double getBarPosition(int barNo) const; /** - * Precomputes layout data for a single staff, updating any + * Precomputes tqlayout data for a single staff, updating any * internal data stores associated with that staff and updating - * any layout-related properties in the events on the staff's + * any tqlayout-related properties in the events on the staff's * segment. */ virtual void scanStaff(Staff&, @@ -94,10 +94,10 @@ public: timeT = 0); /** - * Computes any layout data that may depend on the results of + * Computes any tqlayout data that may depend on the results of * scanning more than one staff. This may mean doing most of - * the layout (likely for horizontal layout) or nothing at all - * (likely for vertical layout). + * the tqlayout (likely for horizontal tqlayout) or nothing at all + * (likely for vertical tqlayout). */ virtual void finishLayout(timeT = 0, timeT = 0); @@ -118,7 +118,7 @@ protected: // pair of has-time-sig and time-sig typedef std::pair<bool, TimeSignature> TimeSigData; - // pair of layout-x and time-signature if there is one + // pair of tqlayout-x and time-signature if there is one typedef std::pair<double, TimeSigData> BarData; typedef FastVector<BarData> BarDataList; BarDataList m_barData; @@ -133,7 +133,7 @@ protected: */ class ZoomableMatrixHLayoutRulerScale : public RulerScale, public HZoomable { public: - ZoomableMatrixHLayoutRulerScale(MatrixHLayout& layout) : RulerScale(layout.getComposition()), m_referenceHLayout(layout) {}; + ZoomableMatrixHLayoutRulerScale(MatrixHLayout& tqlayout) : RulerScale(tqlayout.getComposition()), m_referenceHLayout(tqlayout) {}; virtual double getBarPosition(int n) const { return m_referenceHLayout.getBarPosition(n) * getHScaleFactor(); } virtual double getXForTime(timeT time) const { return m_referenceHLayout.getXForTime(time) * getHScaleFactor(); } diff --git a/src/gui/editors/matrix/MatrixMover.cpp b/src/gui/editors/matrix/MatrixMover.cpp index adf558d..0b84537 100644 --- a/src/gui/editors/matrix/MatrixMover.cpp +++ b/src/gui/editors/matrix/MatrixMover.cpp @@ -54,8 +54,8 @@ namespace Rosegarden { -MatrixMover::MatrixMover(MatrixView* parent) : - MatrixTool("MatrixMover", parent), +MatrixMover::MatrixMover(MatrixView* tqparent) : + MatrixTool("MatrixMover", tqparent), m_currentElement(0), m_currentStaff(0), m_lastPlayedPitch(-1) @@ -101,7 +101,7 @@ void MatrixMover::handleLeftButtonPress(timeT time, MATRIX_DEBUG << "MatrixMover::handleLeftButtonPress() : time = " << time << ", el = " << el << endl; if (!el) return; - m_quickCopy = (e->state() & Qt::ControlButton); + m_quickCopy = (e->state() & TQt::ControlButton); if (!m_duplicateElements.empty()) { for (size_t i = 0; i < m_duplicateElements.size(); ++i) { @@ -123,16 +123,16 @@ void MatrixMover::handleLeftButtonPress(timeT time, if (selection) { EventSelection *newSelection; - if ((e->state() & Qt::ShiftButton) || - selection->contains(m_currentElement->event())) + if ((e->state() & TQt::ShiftButton) || + selection->tqcontains(m_currentElement->event())) newSelection = new EventSelection(*selection); else newSelection = new EventSelection(m_currentStaff->getSegment()); // if the selection already contains the event, remove it from the // selection if shift is pressed - if (selection->contains(m_currentElement->event())){ - if (e->state() & Qt::ShiftButton) + if (selection->tqcontains(m_currentElement->event())){ + if (e->state() & TQt::ShiftButton) newSelection->removeEvent(m_currentElement->event()); } else { newSelection->addEvent(m_currentElement->event()); @@ -207,7 +207,7 @@ int MatrixMover::handleMouseMove(timeT newTime, << newTime << endl; if (e) { - setBasicContextHelp(e->state() & Qt::ControlButton); + setBasicContextHelp(e->state() & TQt::ControlButton); } if (!m_currentElement || !m_currentStaff) @@ -420,17 +420,17 @@ void MatrixMover::handleMouseRelease(timeT newTime, void MatrixMover::ready() { - connect(m_parentView->getCanvasView(), TQT_SIGNAL(contentsMoving (int, int)), + connect(m_tqparentView->getCanvasView(), TQT_SIGNAL(contentsMoving (int, int)), this, TQT_SLOT(slotMatrixScrolled(int, int))); connect(this, TQT_SIGNAL(hoveredOverNoteChanged(int, bool, timeT)), m_mParentView, TQT_SLOT(slotHoveredOverNoteChanged(int, bool, timeT))); - m_mParentView->setCanvasCursor(Qt::sizeAllCursor); + m_mParentView->setCanvasCursor(TQt::sizeAllCursor); setBasicContextHelp(); } void MatrixMover::stow() { - disconnect(m_parentView->getCanvasView(), TQT_SIGNAL(contentsMoving (int, int)), + disconnect(m_tqparentView->getCanvasView(), TQT_SIGNAL(contentsMoving (int, int)), this, TQT_SLOT(slotMatrixScrolled(int, int))); disconnect(this, TQT_SIGNAL(hoveredOverNoteChanged(int, bool, timeT)), m_mParentView, TQT_SLOT(slotHoveredOverNoteChanged(int, bool, timeT))); @@ -441,8 +441,8 @@ void MatrixMover::slotMatrixScrolled(int newX, int newY) if (!m_currentElement) return ; - TQPoint newP1(newX, newY), oldP1(m_parentView->getCanvasView()->contentsX(), - m_parentView->getCanvasView()->contentsY()); + TQPoint newP1(newX, newY), oldP1(m_tqparentView->getCanvasView()->contentsX(), + m_tqparentView->getCanvasView()->contentsY()); TQPoint offset = newP1 - oldP1; diff --git a/src/gui/editors/matrix/MatrixMover.h b/src/gui/editors/matrix/MatrixMover.h index 258b465..9886bdd 100644 --- a/src/gui/editors/matrix/MatrixMover.h +++ b/src/gui/editors/matrix/MatrixMover.h @@ -47,6 +47,7 @@ class Event; class MatrixMover : public MatrixTool { Q_OBJECT + TQ_OBJECT friend class MatrixToolBox; diff --git a/src/gui/editors/matrix/MatrixPainter.cpp b/src/gui/editors/matrix/MatrixPainter.cpp index 11bbc0b..7616de6 100644 --- a/src/gui/editors/matrix/MatrixPainter.cpp +++ b/src/gui/editors/matrix/MatrixPainter.cpp @@ -53,8 +53,8 @@ namespace Rosegarden { -MatrixPainter::MatrixPainter(MatrixView* parent) - : MatrixTool("MatrixPainter", parent), +MatrixPainter::MatrixPainter(MatrixView* tqparent) + : MatrixTool("MatrixPainter", tqparent), m_currentElement(0), m_currentStaff(0) { @@ -83,8 +83,8 @@ MatrixPainter::MatrixPainter(MatrixView* parent) createMenu("matrixpainter.rc"); } -MatrixPainter::MatrixPainter(TQString name, MatrixView* parent) - : MatrixTool(name, parent), +MatrixPainter::MatrixPainter(TQString name, MatrixView* tqparent) + : MatrixTool(name, tqparent), m_currentElement(0), m_currentStaff(0) {} @@ -320,17 +320,17 @@ void MatrixPainter::handleMouseRelease(timeT endTime, void MatrixPainter::ready() { - connect(m_parentView->getCanvasView(), TQT_SIGNAL(contentsMoving (int, int)), + connect(m_tqparentView->getCanvasView(), TQT_SIGNAL(contentsMoving (int, int)), this, TQT_SLOT(slotMatrixScrolled(int, int))); - m_mParentView->setCanvasCursor(Qt::crossCursor); + m_mParentView->setCanvasCursor(TQt::crossCursor); setBasicContextHelp(); } void MatrixPainter::stow() { - disconnect(m_parentView->getCanvasView(), TQT_SIGNAL(contentsMoving (int, int)), + disconnect(m_tqparentView->getCanvasView(), TQT_SIGNAL(contentsMoving (int, int)), this, TQT_SLOT(slotMatrixScrolled(int, int))); } @@ -339,8 +339,8 @@ void MatrixPainter::slotMatrixScrolled(int newX, int newY) if (!m_currentElement) return ; - TQPoint newP1(newX, newY), oldP1(m_parentView->getCanvasView()->contentsX(), - m_parentView->getCanvasView()->contentsY()); + TQPoint newP1(newX, newY), oldP1(m_tqparentView->getCanvasView()->contentsX(), + m_tqparentView->getCanvasView()->contentsY()); TQPoint offset = newP1 - oldP1; diff --git a/src/gui/editors/matrix/MatrixPainter.h b/src/gui/editors/matrix/MatrixPainter.h index e04cda9..f7e8e6f 100644 --- a/src/gui/editors/matrix/MatrixPainter.h +++ b/src/gui/editors/matrix/MatrixPainter.h @@ -47,6 +47,7 @@ class Event; class MatrixPainter : public MatrixTool { Q_OBJECT + TQ_OBJECT friend class MatrixToolBox; diff --git a/src/gui/editors/matrix/MatrixParameterBox.cpp b/src/gui/editors/matrix/MatrixParameterBox.cpp index 75228c3..cd4a743 100644 --- a/src/gui/editors/matrix/MatrixParameterBox.cpp +++ b/src/gui/editors/matrix/MatrixParameterBox.cpp @@ -42,8 +42,8 @@ namespace Rosegarden { MatrixParameterBox::MatrixParameterBox(RosegardenGUIDoc *doc, - TQWidget *parent, const char* name): - TQFrame(parent, name), + TQWidget *tqparent, const char* name): + TQFrame(tqparent, name), m_quantizations(BasicQuantizer::getStandardQuantizations()), m_doc(doc) { diff --git a/src/gui/editors/matrix/MatrixParameterBox.h b/src/gui/editors/matrix/MatrixParameterBox.h index 036571b..d67269a 100644 --- a/src/gui/editors/matrix/MatrixParameterBox.h +++ b/src/gui/editors/matrix/MatrixParameterBox.h @@ -44,12 +44,13 @@ class Instrument; class EventSelection; -class MatrixParameterBox : public QFrame +class MatrixParameterBox : public TQFrame { Q_OBJECT + TQ_OBJECT public: - MatrixParameterBox(RosegardenGUIDoc *doc=0, TQWidget *parent=0, const char* name=0); + MatrixParameterBox(RosegardenGUIDoc *doc=0, TQWidget *tqparent=0, const char* name=0); ~MatrixParameterBox(); void initBox(); diff --git a/src/gui/editors/matrix/MatrixResizer.cpp b/src/gui/editors/matrix/MatrixResizer.cpp index fce4306..fc3af58 100644 --- a/src/gui/editors/matrix/MatrixResizer.cpp +++ b/src/gui/editors/matrix/MatrixResizer.cpp @@ -51,8 +51,8 @@ namespace Rosegarden { -MatrixResizer::MatrixResizer(MatrixView* parent) - : MatrixTool("MatrixResizer", parent), +MatrixResizer::MatrixResizer(MatrixView* tqparent) + : MatrixTool("MatrixResizer", tqparent), m_currentElement(0), m_currentStaff(0) { @@ -110,8 +110,8 @@ void MatrixResizer::handleLeftButtonPress(timeT, if (selection) { EventSelection *newSelection; - if ((e->state() & Qt::ShiftButton) || - selection->contains(m_currentElement->event())) + if ((e->state() & TQt::ShiftButton) || + selection->tqcontains(m_currentElement->event())) newSelection = new EventSelection(*selection); else newSelection = new EventSelection(m_currentStaff->getSegment()); @@ -289,27 +289,27 @@ void MatrixResizer::handleMouseRelease(timeT newTime, void MatrixResizer::ready() { - connect(m_parentView->getCanvasView(), TQT_SIGNAL(contentsMoving (int, int)), + connect(m_tqparentView->getCanvasView(), TQT_SIGNAL(contentsMoving (int, int)), this, TQT_SLOT(slotMatrixScrolled(int, int))); - m_mParentView->setCanvasCursor(Qt::sizeHorCursor); + m_mParentView->setCanvasCursor(TQt::sizeHorCursor); setBasicContextHelp(); } void MatrixResizer::stow() { - disconnect(m_parentView->getCanvasView(), TQT_SIGNAL(contentsMoving (int, int)), + disconnect(m_tqparentView->getCanvasView(), TQT_SIGNAL(contentsMoving (int, int)), this, TQT_SLOT(slotMatrixScrolled(int, int))); } void MatrixResizer::slotMatrixScrolled(int newX, int newY) { - TQPoint newP1(newX, newY), oldP1(m_parentView->getCanvasView()->contentsX(), - m_parentView->getCanvasView()->contentsY()); + TQPoint newP1(newX, newY), oldP1(m_tqparentView->getCanvasView()->contentsX(), + m_tqparentView->getCanvasView()->contentsY()); TQPoint p(newX, newY); if (newP1.x() > oldP1.x()) { - p.setX(newX + m_parentView->getCanvasView()->visibleWidth()); + p.setX(newX + m_tqparentView->getCanvasView()->visibleWidth()); } p = m_mParentView->inverseMapPoint(p); diff --git a/src/gui/editors/matrix/MatrixResizer.h b/src/gui/editors/matrix/MatrixResizer.h index f851fba..cbbf8cc 100644 --- a/src/gui/editors/matrix/MatrixResizer.h +++ b/src/gui/editors/matrix/MatrixResizer.h @@ -47,6 +47,7 @@ class Event; class MatrixResizer : public MatrixTool { Q_OBJECT + TQ_OBJECT friend class MatrixToolBox; diff --git a/src/gui/editors/matrix/MatrixSelector.cpp b/src/gui/editors/matrix/MatrixSelector.cpp index ef553a5..3109aec 100644 --- a/src/gui/editors/matrix/MatrixSelector.cpp +++ b/src/gui/editors/matrix/MatrixSelector.cpp @@ -71,7 +71,7 @@ MatrixSelector::MatrixSelector(MatrixView* view) m_matrixView(view), m_selectionToMerge(0) { - connect(m_parentView, TQT_SIGNAL(usedSelection()), + connect(m_tqparentView, TQT_SIGNAL(usedSelection()), this, TQT_SLOT(slotHideSelection())); new KAction(i18n("Switch to Draw Tool"), "pencil", 0, this, @@ -133,7 +133,7 @@ void MatrixSelector::handleLeftButtonPress(timeT time, // delete m_selectionToMerge; // you can safely delete 0, you know? const EventSelection *selectionToMerge = 0; - if (e->state() & Qt::ShiftButton) + if (e->state() & TQt::ShiftButton) selectionToMerge = m_mParentView->getCurrentSelection(); m_selectionToMerge = @@ -153,10 +153,10 @@ void MatrixSelector::handleLeftButtonPress(timeT time, resizeStart = x + width - 10; if (p.x() > resizeStart) { - m_dispatchTool = m_parentView-> + m_dispatchTool = m_tqparentView-> getToolBox()->getTool(MatrixResizer::ToolName); } else { - m_dispatchTool = m_parentView-> + m_dispatchTool = m_tqparentView-> getToolBox()->getTool(MatrixMover::ToolName); } @@ -169,7 +169,7 @@ void MatrixSelector::handleLeftButtonPress(timeT time, element); return ; - } else if (e->state() & Qt::ControlButton) { + } else if (e->state() & TQt::ControlButton) { handleMidButtonPress(time, height, staffNo, e, element); return; @@ -214,7 +214,7 @@ void MatrixSelector::handleLeftButtonPress(timeT time, } } - //m_parentView->setCursorPosition(p.x()); + //m_tqparentView->setCursorPosition(p.x()); } void MatrixSelector::handleMidButtonPress(timeT time, @@ -229,7 +229,7 @@ void MatrixSelector::handleMidButtonPress(timeT time, if (dynamic_cast<MatrixElement*>(element)) return ; - m_dispatchTool = m_parentView-> + m_dispatchTool = m_tqparentView-> getToolBox()->getTool(MatrixPainter::ToolName); m_dispatchTool->ready(); @@ -375,7 +375,7 @@ int MatrixSelector::handleMouseMove(timeT time, int height, int w = int(p.x() - m_selectionRect->x()); int h = int(p.y() - m_selectionRect->y()); - // Qt rectangle dimensions appear to be 1-based + // TQt rectangle dimensions appear to be 1-based if (w > 0) ++w; else @@ -443,11 +443,11 @@ void MatrixSelector::ready() m_selectionRect->hide(); m_selectionRect->setPen(TQPen(GUIPalette::getColour(GUIPalette::SelectionRectangle), 2)); - m_mParentView->setCanvasCursor(Qt::arrowCursor); + m_mParentView->setCanvasCursor(TQt::arrowCursor); //m_mParentView->setPositionTracking(false); } - connect(m_parentView->getCanvasView(), TQT_SIGNAL(contentsMoving (int, int)), + connect(m_tqparentView->getCanvasView(), TQT_SIGNAL(contentsMoving (int, int)), this, TQT_SLOT(slotMatrixScrolled(int, int))); setContextHelp(i18n("Click and drag to select; middle-click and drag to draw new note")); @@ -461,7 +461,7 @@ void MatrixSelector::stow() m_mParentView->canvas()->update(); } - disconnect(m_parentView->getCanvasView(), TQT_SIGNAL(contentsMoving (int, int)), + disconnect(m_tqparentView->getCanvasView(), TQT_SIGNAL(contentsMoving (int, int)), this, TQT_SLOT(slotMatrixScrolled(int, int))); } @@ -478,13 +478,13 @@ void MatrixSelector::slotHideSelection() void MatrixSelector::slotMatrixScrolled(int newX, int newY) { if (m_updateRect) { - int offsetX = newX - m_parentView->getCanvasView()->contentsX(); - int offsetY = newY - m_parentView->getCanvasView()->contentsY(); + int offsetX = newX - m_tqparentView->getCanvasView()->contentsX(); + int offsetY = newY - m_tqparentView->getCanvasView()->contentsY(); int w = int(m_selectionRect->width() + offsetX); int h = int(m_selectionRect->height() + offsetY); - // Qt rectangle dimensions appear to be 1-based + // TQt rectangle dimensions appear to be 1-based if (w > 0) ++w; else @@ -576,7 +576,7 @@ void MatrixSelector::setContextHelpFor(TQPoint p, bool ctrlPressed) } if ((mRect = dynamic_cast<QCanvasMatrixRectangle*>(item))) { - if (! mRect->rect().contains(p, true)) continue; + if (! mRect->rect().tqcontains(p, true)) continue; mel = &(mRect->getMatrixElement()); break; } diff --git a/src/gui/editors/matrix/MatrixSelector.h b/src/gui/editors/matrix/MatrixSelector.h index caa9e4f..1e8a741 100644 --- a/src/gui/editors/matrix/MatrixSelector.h +++ b/src/gui/editors/matrix/MatrixSelector.h @@ -50,6 +50,7 @@ class EditTool; class MatrixSelector : public MatrixTool { Q_OBJECT + TQ_OBJECT friend class MatrixToolBox; @@ -97,7 +98,7 @@ public: /** * Create the selection rect * - * We need this because MatrixView deletes all QCanvasItems + * We need this because MatrixView deletes all TQCanvasItems * along with it. This happens before the MatrixSelector is * deleted, so we can't delete the selection rect in * ~MatrixSelector because that leads to double deletion. diff --git a/src/gui/editors/matrix/MatrixStaff.cpp b/src/gui/editors/matrix/MatrixStaff.cpp index 55491d0..847c6f9 100644 --- a/src/gui/editors/matrix/MatrixStaff.cpp +++ b/src/gui/editors/matrix/MatrixStaff.cpp @@ -166,10 +166,10 @@ void MatrixStaff::positionElement(ViewElement* vel) // EventSelection *selection = m_view->getCurrentSelection(); - if (selection && selection->contains(el->event())) + if (selection && selection->tqcontains(el->event())) el->setColour(GUIPalette::getColour(GUIPalette::SelectedElement)); else if (el->event()->has(BaseProperties::TRIGGER_SEGMENT_ID)) - el->setColour(Qt::gray); + el->setColour(TQt::gray); else el->setColour(DefaultVelocityColour::getInstance()->getColour(velocity)); diff --git a/src/gui/editors/matrix/MatrixTool.cpp b/src/gui/editors/matrix/MatrixTool.cpp index a478aa3..a0bb68f 100644 --- a/src/gui/editors/matrix/MatrixTool.cpp +++ b/src/gui/editors/matrix/MatrixTool.cpp @@ -34,39 +34,39 @@ namespace Rosegarden { -MatrixTool::MatrixTool(const TQString& menuName, MatrixView* parent) - : EditTool(menuName, parent), - m_mParentView(parent) +MatrixTool::MatrixTool(const TQString& menuName, MatrixView* tqparent) + : EditTool(menuName, tqparent), + m_mParentView(tqparent) {} void MatrixTool::slotSelectSelected() { - m_parentView->actionCollection()->action("select")->activate(); + m_tqparentView->actionCollection()->action("select")->activate(); } void MatrixTool::slotMoveSelected() { - m_parentView->actionCollection()->action("move")->activate(); + m_tqparentView->actionCollection()->action("move")->activate(); } void MatrixTool::slotEraseSelected() { - m_parentView->actionCollection()->action("erase")->activate(); + m_tqparentView->actionCollection()->action("erase")->activate(); } void MatrixTool::slotResizeSelected() { - m_parentView->actionCollection()->action("resize")->activate(); + m_tqparentView->actionCollection()->action("resize")->activate(); } void MatrixTool::slotDrawSelected() { - m_parentView->actionCollection()->action("draw")->activate(); + m_tqparentView->actionCollection()->action("draw")->activate(); } const SnapGrid & diff --git a/src/gui/editors/matrix/MatrixTool.h b/src/gui/editors/matrix/MatrixTool.h index 9972176..fb45920 100644 --- a/src/gui/editors/matrix/MatrixTool.h +++ b/src/gui/editors/matrix/MatrixTool.h @@ -44,6 +44,7 @@ class SnapGrid; class MatrixTool : public EditTool { Q_OBJECT + TQ_OBJECT public: // virtual void ready(); diff --git a/src/gui/editors/matrix/MatrixToolBox.cpp b/src/gui/editors/matrix/MatrixToolBox.cpp index dab9632..e38abf1 100644 --- a/src/gui/editors/matrix/MatrixToolBox.cpp +++ b/src/gui/editors/matrix/MatrixToolBox.cpp @@ -40,9 +40,9 @@ namespace Rosegarden { -MatrixToolBox::MatrixToolBox(MatrixView* parent) - : EditToolBox(parent), - m_mParentView(parent) +MatrixToolBox::MatrixToolBox(MatrixView* tqparent) + : EditToolBox(tqparent), + m_mParentView(tqparent) {} EditTool* MatrixToolBox::createTool(const TQString& toolName) @@ -73,7 +73,7 @@ EditTool* MatrixToolBox::createTool(const TQString& toolName) else { KMessageBox::error(0, TQString("MatrixToolBox::createTool : unrecognised toolname %1 (%2)") - .arg(toolName).arg(toolNamelc)); + .tqarg(toolName).tqarg(toolNamelc)); return 0; } diff --git a/src/gui/editors/matrix/MatrixToolBox.h b/src/gui/editors/matrix/MatrixToolBox.h index 4f28c57..b997405 100644 --- a/src/gui/editors/matrix/MatrixToolBox.h +++ b/src/gui/editors/matrix/MatrixToolBox.h @@ -42,8 +42,9 @@ class MatrixStaff; class MatrixToolBox : public EditToolBox { Q_OBJECT + TQ_OBJECT public: - MatrixToolBox(MatrixView* parent); + MatrixToolBox(MatrixView* tqparent); protected: diff --git a/src/gui/editors/matrix/MatrixVLayout.h b/src/gui/editors/matrix/MatrixVLayout.h index a33e0d1..538e598 100644 --- a/src/gui/editors/matrix/MatrixVLayout.h +++ b/src/gui/editors/matrix/MatrixVLayout.h @@ -58,9 +58,9 @@ public: timeT = 0); /** - * Precomputes layout data for a single staff, updating any + * Precomputes tqlayout data for a single staff, updating any * internal data stores associated with that staff and updating - * any layout-related properties in the events on the staff's + * any tqlayout-related properties in the events on the staff's * segment. */ virtual void scanStaff(Staff &staff, @@ -68,10 +68,10 @@ public: timeT = 0); /** - * Computes any layout data that may depend on the results of + * Computes any tqlayout data that may depend on the results of * scanning more than one staff. This may mean doing most of - * the layout (likely for horizontal layout) or nothing at all - * (likely for vertical layout). + * the tqlayout (likely for horizontal tqlayout) or nothing at all + * (likely for vertical tqlayout). */ virtual void finishLayout(timeT = 0, timeT = 0); diff --git a/src/gui/editors/matrix/MatrixView.cpp b/src/gui/editors/matrix/MatrixView.cpp index 66c1b0d..424b98e 100644 --- a/src/gui/editors/matrix/MatrixView.cpp +++ b/src/gui/editors/matrix/MatrixView.cpp @@ -137,13 +137,13 @@ static double xorigin = 0.0; MatrixView::MatrixView(RosegardenGUIDoc *doc, std::vector<Segment *> segments, - TQWidget *parent, + TQWidget *tqparent, bool drumMode) - : EditView(doc, segments, 3, parent, "matrixview"), - m_hlayout(&doc->getComposition()), - m_referenceRuler(new ZoomableMatrixHLayoutRulerScale(m_hlayout)), - m_vlayout(), - m_snapGrid(new SnapGrid(&m_hlayout)), + : EditView(doc, segments, 3, tqparent, "matrixview"), + m_htqlayout(&doc->getComposition()), + m_referenceRuler(new ZoomableMatrixHLayoutRulerScale(m_htqlayout)), + m_vtqlayout(), + m_snapGrid(new SnapGrid(&m_htqlayout)), m_lastEndMarkerTime(0), m_hoveredOverAbsoluteTime(0), m_hoveredOverNoteName(0), @@ -176,13 +176,13 @@ MatrixView::MatrixView(RosegardenGUIDoc *doc, 20); // relation target/this (in percent) connect(m_dockLeft, TQT_SIGNAL(iMBeingClosed()), - this, TQT_SLOT(slotParametersClosed())); + TQT_TQOBJECT(this), TQT_SLOT(slotParametersClosed())); connect(m_dockLeft, TQT_SIGNAL(hasUndocked()), - this, TQT_SLOT(slotParametersClosed())); - // Apparently, hasUndocked() is emitted when the dock widget's + TQT_TQOBJECT(this), TQT_SLOT(slotParametersClosed())); + // Aptqparently, hasUndocked() is emitted when the dock widget's // 'close' button on the dock handle is clicked. connect(m_mainDockWidget, TQT_SIGNAL(docking(KDockWidget*, KDockWidget::DockPosition)), - this, TQT_SLOT(slotParametersDockedBack(KDockWidget*, KDockWidget::DockPosition))); + TQT_TQOBJECT(this), TQT_SLOT(slotParametersDockedBack(KDockWidget*, KDockWidget::DockPosition))); Composition &comp = doc->getComposition(); @@ -191,9 +191,9 @@ MatrixView::MatrixView(RosegardenGUIDoc *doc, initStatusBar(); connect(m_toolBox, TQT_SIGNAL(showContextHelp(const TQString &)), - this, TQT_SLOT(slotToolHelpChanged(const TQString &))); + TQT_TQOBJECT(this), TQT_SLOT(slotToolHelpChanged(const TQString &))); - TQCanvas *tCanvas = new TQCanvas(this); + TQCanvas *tCanvas = new TQCanvas(TQT_TQOBJECT(this)); m_config->setGroup(MatrixViewConfigGroup); if (m_config->readBoolEntry("backgroundtextures-1.6-plus", true)) { @@ -205,7 +205,7 @@ MatrixView::MatrixView(RosegardenGUIDoc *doc, TQString backgroundPixmap = isDrumMode() ? "bg-paper-white.xpm" : "bg-matrix-lines.xpm"; if (background.load(TQString("%1/misc/%2"). arg(pixmapDir, backgroundPixmap))) { - tCanvas->setBackgroundPixmap(background); + tCanvas->tqsetBackgroundPixmap(background); } } @@ -301,7 +301,7 @@ MatrixView::MatrixView(RosegardenGUIDoc *doc, TQT_SIGNAL(showPluginGUI(InstrumentId, int)), app, TQT_SLOT(slotShowPluginGUI(InstrumentId, int))); - connect(parent, // RosegardenGUIView + connect(tqparent, // RosegardenGUIView TQT_SIGNAL(checkTrackAssignments()), this, TQT_SLOT(slotCheckTrackAssignments())); @@ -353,13 +353,13 @@ MatrixView::MatrixView(RosegardenGUIDoc *doc, // Connect vertical scrollbars between matrix and piano // connect(m_canvasView->verticalScrollBar(), TQT_SIGNAL(valueChanged(int)), - this, TQT_SLOT(slotVerticalScrollPianoKeyboard(int))); + TQT_TQOBJECT(this), TQT_SLOT(slotVerticalScrollPianoKeyboard(int))); connect(m_canvasView->verticalScrollBar(), TQT_SIGNAL(sliderMoved(int)), - this, TQT_SLOT(slotVerticalScrollPianoKeyboard(int))); + TQT_TQOBJECT(this), TQT_SLOT(slotVerticalScrollPianoKeyboard(int))); - connect(m_canvasView, TQT_SIGNAL(zoomIn()), this, TQT_SLOT(slotZoomIn())); - connect(m_canvasView, TQT_SIGNAL(zoomOut()), this, TQT_SLOT(slotZoomOut())); + connect(m_canvasView, TQT_SIGNAL(zoomIn()), TQT_TQOBJECT(this), TQT_SLOT(slotZoomIn())); + connect(m_canvasView, TQT_SIGNAL(zoomOut()), TQT_TQOBJECT(this), TQT_SLOT(slotZoomOut())); connect(m_pianoView, TQT_SIGNAL(gotWheelEvent(TQWheelEvent*)), m_canvasView, TQT_SLOT(slotExternalWheelEvent(TQWheelEvent*))); @@ -368,13 +368,13 @@ MatrixView::MatrixView(RosegardenGUIDoc *doc, // the canvas view rulers // connect(m_canvasView, TQT_SIGNAL(bottomWidgetHeightChanged(int)), - this, TQT_SLOT(slotCanvasBottomWidgetHeightChanged(int))); + TQT_TQOBJECT(this), TQT_SLOT(slotCanvasBottomWidgetHeightChanged(int))); connect(m_canvasView, TQT_SIGNAL(mouseEntered()), - this, TQT_SLOT(slotMouseEnteredCanvasView())); + TQT_TQOBJECT(this), TQT_SLOT(slotMouseEnteredCanvasView())); connect(m_canvasView, TQT_SIGNAL(mouseLeft()), - this, TQT_SLOT(slotMouseLeftCanvasView())); + TQT_TQOBJECT(this), TQT_SLOT(slotMouseLeftCanvasView())); /* TQObject::connect @@ -404,55 +404,55 @@ MatrixView::MatrixView(RosegardenGUIDoc *doc, TQObject::connect (getCanvasView(), TQT_SIGNAL(hoveredOverNoteChanged(int, bool, timeT)), - this, TQT_SLOT(slotHoveredOverNoteChanged(int, bool, timeT))); + TQT_TQOBJECT(this), TQT_SLOT(slotHoveredOverNoteChanged(int, bool, timeT))); TQObject::connect (m_pitchRuler, TQT_SIGNAL(hoveredOverKeyChanged(unsigned int)), - this, TQT_SLOT (slotHoveredOverKeyChanged(unsigned int))); + TQT_TQOBJECT(this), TQT_SLOT (slotHoveredOverKeyChanged(unsigned int))); TQObject::connect (m_pitchRuler, TQT_SIGNAL(keyPressed(unsigned int, bool)), - this, TQT_SLOT (slotKeyPressed(unsigned int, bool))); + TQT_TQOBJECT(this), TQT_SLOT (slotKeyPressed(unsigned int, bool))); TQObject::connect (m_pitchRuler, TQT_SIGNAL(keySelected(unsigned int, bool)), - this, TQT_SLOT (slotKeySelected(unsigned int, bool))); + TQT_TQOBJECT(this), TQT_SLOT (slotKeySelected(unsigned int, bool))); TQObject::connect (m_pitchRuler, TQT_SIGNAL(keyReleased(unsigned int, bool)), - this, TQT_SLOT (slotKeyReleased(unsigned int, bool))); + TQT_TQOBJECT(this), TQT_SLOT (slotKeyReleased(unsigned int, bool))); TQObject::connect (getCanvasView(), TQT_SIGNAL(hoveredOverAbsoluteTimeChanged(unsigned int)), - this, TQT_SLOT (slotHoveredOverAbsoluteTimeChanged(unsigned int))); + TQT_TQOBJECT(this), TQT_SLOT (slotHoveredOverAbsoluteTimeChanged(unsigned int))); TQObject::connect (doc, TQT_SIGNAL(pointerPositionChanged(timeT)), - this, TQT_SLOT(slotSetPointerPosition(timeT))); + TQT_TQOBJECT(this), TQT_SLOT(slotSetPointerPosition(timeT))); - MATRIX_DEBUG << "MatrixView : applying layout\n"; + MATRIX_DEBUG << "MatrixView : applying tqlayout\n"; - bool layoutApplied = applyLayout(); - if (!layoutApplied) - KMessageBox::sorry(0, i18n("Couldn't apply piano roll layout")); + bool tqlayoutApplied = applyLayout(); + if (!tqlayoutApplied) + KMessageBox::sorry(0, i18n("Couldn't apply piano roll tqlayout")); else { MATRIX_DEBUG << "MatrixView : rendering elements\n"; for (unsigned int i = 0; i < m_staffs.size(); ++i) { m_staffs[i]->positionAllElements(); - m_staffs[i]->getSegment().getRefreshStatus + m_staffs[i]->getSegment().getRefreshtqStatus (m_segmentsRefreshStatusIds[i]).setNeedsRefresh(false); } } StandardRuler *topStandardRuler = new StandardRuler(getDocument(), - &m_hlayout, int(xorigin), 25, + &m_htqlayout, int(xorigin), 25, false, getCentralWidget()); topStandardRuler->setSnapGrid(m_snapGrid); setTopStandardRuler(topStandardRuler); StandardRuler *bottomStandardRuler = new StandardRuler(getDocument(), - &m_hlayout, 0, 25, + &m_htqlayout, 0, 25, true, getBottomWidget()); bottomStandardRuler->setSnapGrid(m_snapGrid); setBottomStandardRuler(bottomStandardRuler); @@ -470,12 +470,12 @@ MatrixView::MatrixView(RosegardenGUIDoc *doc, TQObject::connect (topStandardRuler->getLoopRuler(), TQT_SIGNAL(setPointerPosition(timeT)), - this, TQT_SLOT(slotSetInsertCursorPosition(timeT))); + TQT_TQOBJECT(this), TQT_SLOT(slotSetInsertCursorPosition(timeT))); TQObject::connect (topStandardRuler, TQT_SIGNAL(dragPointerToPosition(timeT)), - this, TQT_SLOT(slotSetInsertCursorPosition(timeT))); + TQT_TQOBJECT(this), TQT_SLOT(slotSetInsertCursorPosition(timeT))); topStandardRuler->getLoopRuler()->setBackgroundColor (GUIPalette::getColour(GUIPalette::InsertCursorRuler)); @@ -490,7 +490,7 @@ MatrixView::MatrixView(RosegardenGUIDoc *doc, connect(bottomStandardRuler->getLoopRuler(), TQT_SIGNAL(stopMouseMove()), m_canvasView, TQT_SLOT(stopAutoScroll())); connect(m_bottomStandardRuler, TQT_SIGNAL(dragPointerToPosition(timeT)), - this, TQT_SLOT(slotSetPointerPosition(timeT))); + TQT_TQOBJECT(this), TQT_SLOT(slotSetPointerPosition(timeT))); // Force height for the moment // @@ -571,7 +571,7 @@ MatrixView::~MatrixView() // ~TQCanvasView so we can't do anything about it). This calls // TQCanvasView::updateContentsSize(), which in turn updates the // view's scrollbars, hence calling TQScrollBar::setValue(), and - // sending the QSCrollbar::valueChanged() signal. But we have a + // sending the TQSCrollbar::valueChanged() signal. But we have a // slot connected to that signal // (MatrixView::slotVerticalScrollPianoKeyboard), which scrolls // the pianoView. However at this stage the pianoView has already @@ -639,219 +639,219 @@ void MatrixView::setupActions() TQIconSet icon(TQPixmap(pixmapDir + "/toolbar/select.xpm")); toolAction = new KRadioAction(i18n("&Select and Edit"), icon, Key_F2, - this, TQT_SLOT(slotSelectSelected()), + TQT_TQOBJECT(this), TQT_SLOT(slotSelectSelected()), actionCollection(), "select"); toolAction->setExclusiveGroup("tools"); toolAction = new KRadioAction(i18n("&Draw"), "pencil", Key_F3, - this, TQT_SLOT(slotPaintSelected()), + TQT_TQOBJECT(this), TQT_SLOT(slotPaintSelected()), actionCollection(), "draw"); toolAction->setExclusiveGroup("tools"); toolAction = new KRadioAction(i18n("&Erase"), "eraser", Key_F4, - this, TQT_SLOT(slotEraseSelected()), + TQT_TQOBJECT(this), TQT_SLOT(slotEraseSelected()), actionCollection(), "erase"); toolAction->setExclusiveGroup("tools"); toolAction = new KRadioAction(i18n("&Move"), "move", Key_F5, - this, TQT_SLOT(slotMoveSelected()), + TQT_TQOBJECT(this), TQT_SLOT(slotMoveSelected()), actionCollection(), "move"); toolAction->setExclusiveGroup("tools"); TQCanvasPixmap pixmap(pixmapDir + "/toolbar/resize.xpm"); icon = TQIconSet(pixmap); toolAction = new KRadioAction(i18n("Resi&ze"), icon, Key_F6, - this, TQT_SLOT(slotResizeSelected()), + TQT_TQOBJECT(this), TQT_SLOT(slotResizeSelected()), actionCollection(), "resize"); toolAction->setExclusiveGroup("tools"); - icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("chord"))); + icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap("chord"))); (new KToggleAction(i18n("C&hord Insert Mode"), icon, Key_H, - this, TQT_SLOT(slotUpdateInsertModeStatus()), + TQT_TQOBJECT(this), TQT_SLOT(slotUpdateInsertModetqStatus()), actionCollection(), "chord_mode"))-> setChecked(false); pixmap.load(pixmapDir + "/toolbar/step_by_step.xpm"); icon = TQIconSet(pixmap); - new KToggleAction(i18n("Ste&p Recording"), icon, 0, this, + new KToggleAction(i18n("Ste&p Recording"), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotToggleStepByStep()), actionCollection(), "toggle_step_by_step"); pixmap.load(pixmapDir + "/toolbar/quantize.png"); icon = TQIconSet(pixmap); - new KAction(EventQuantizeCommand::getGlobalName(), icon, Key_Equal, this, + new KAction(EventQuantizeCommand::getGlobalName(), icon, Key_Equal, TQT_TQOBJECT(this), TQT_SLOT(slotTransformsQuantize()), actionCollection(), "quantize"); - new KAction(i18n("Repeat Last Quantize"), Key_Plus, this, + new KAction(i18n("Repeat Last Quantize"), Key_Plus, TQT_TQOBJECT(this), TQT_SLOT(slotTransformsRepeatQuantize()), actionCollection(), "repeat_quantize"); - new KAction(CollapseNotesCommand::getGlobalName(), Key_Equal + CTRL, this, + new KAction(CollapseNotesCommand::getGlobalName(), Key_Equal + CTRL, TQT_TQOBJECT(this), TQT_SLOT(slotTransformsCollapseNotes()), actionCollection(), "collapse_notes"); - new KAction(i18n("&Legato"), Key_Minus, this, + new KAction(i18n("&Legato"), Key_Minus, TQT_TQOBJECT(this), TQT_SLOT(slotTransformsLegato()), actionCollection(), "legatoize"); new KAction(ChangeVelocityCommand::getGlobalName(10), 0, - Key_Up + SHIFT, this, + Key_Up + SHIFT, TQT_TQOBJECT(this), TQT_SLOT(slotVelocityUp()), actionCollection(), "velocity_up"); new KAction(ChangeVelocityCommand::getGlobalName( -10), 0, - Key_Down + SHIFT, this, + Key_Down + SHIFT, TQT_TQOBJECT(this), TQT_SLOT(slotVelocityDown()), actionCollection(), "velocity_down"); - new KAction(i18n("Set to Current Velocity"), 0, this, + new KAction(i18n("Set to Current Velocity"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotSetVelocitiesToCurrent()), actionCollection(), "set_to_current_velocity"); - new KAction(i18n("Set Event &Velocities..."), 0, this, + new KAction(i18n("Set Event &Velocities..."), 0, TQT_TQOBJECT(this), TQT_SLOT(slotSetVelocities()), actionCollection(), "set_velocities"); - new KAction(i18n("Trigger Se&gment..."), 0, this, + new KAction(i18n("Trigger Se&gment..."), 0, TQT_TQOBJECT(this), TQT_SLOT(slotTriggerSegment()), actionCollection(), "trigger_segment"); - new KAction(i18n("Remove Triggers..."), 0, this, + new KAction(i18n("Remove Triggers..."), 0, TQT_TQOBJECT(this), TQT_SLOT(slotRemoveTriggers()), actionCollection(), "remove_trigger"); - new KAction(i18n("Select &All"), Key_A + CTRL, this, + new KAction(i18n("Select &All"), Key_A + CTRL, TQT_TQOBJECT(this), TQT_SLOT(slotSelectAll()), actionCollection(), "select_all"); - new KAction(i18n("&Delete"), Key_Delete, this, + new KAction(i18n("&Delete"), Key_Delete, TQT_TQOBJECT(this), TQT_SLOT(slotEditDelete()), actionCollection(), "delete"); - new KAction(i18n("Cursor &Back"), 0, Key_Left, this, + new KAction(i18n("Cursor &Back"), 0, Key_Left, TQT_TQOBJECT(this), TQT_SLOT(slotStepBackward()), actionCollection(), "cursor_back"); - new KAction(i18n("Cursor &Forward"), 0, Key_Right, this, + new KAction(i18n("Cursor &Forward"), 0, Key_Right, TQT_TQOBJECT(this), TQT_SLOT(slotStepForward()), actionCollection(), "cursor_forward"); - new KAction(i18n("Cursor Ba&ck Bar"), 0, Key_Left + CTRL, this, + new KAction(i18n("Cursor Ba&ck Bar"), 0, Key_Left + CTRL, TQT_TQOBJECT(this), TQT_SLOT(slotJumpBackward()), actionCollection(), "cursor_back_bar"); - new KAction(i18n("Cursor For&ward Bar"), 0, Key_Right + CTRL, this, + new KAction(i18n("Cursor For&ward Bar"), 0, Key_Right + CTRL, TQT_TQOBJECT(this), TQT_SLOT(slotJumpForward()), actionCollection(), "cursor_forward_bar"); - new KAction(i18n("Cursor Back and Se&lect"), SHIFT + Key_Left, this, + new KAction(i18n("Cursor Back and Se&lect"), SHIFT + Key_Left, TQT_TQOBJECT(this), TQT_SLOT(slotExtendSelectionBackward()), actionCollection(), "extend_selection_backward"); - new KAction(i18n("Cursor Forward and &Select"), SHIFT + Key_Right, this, + new KAction(i18n("Cursor Forward and &Select"), SHIFT + Key_Right, TQT_TQOBJECT(this), TQT_SLOT(slotExtendSelectionForward()), actionCollection(), "extend_selection_forward"); - new KAction(i18n("Cursor Back Bar and Select"), SHIFT + CTRL + Key_Left, this, + new KAction(i18n("Cursor Back Bar and Select"), SHIFT + CTRL + Key_Left, TQT_TQOBJECT(this), TQT_SLOT(slotExtendSelectionBackwardBar()), actionCollection(), "extend_selection_backward_bar"); - new KAction(i18n("Cursor Forward Bar and Select"), SHIFT + CTRL + Key_Right, this, + new KAction(i18n("Cursor Forward Bar and Select"), SHIFT + CTRL + Key_Right, TQT_TQOBJECT(this), TQT_SLOT(slotExtendSelectionForwardBar()), actionCollection(), "extend_selection_forward_bar"); new KAction(i18n("Cursor to St&art"), 0, /* #1025717: conflicting meanings for ctrl+a - dupe with Select All - Key_A + CTRL, */ this, + Key_A + CTRL, */ TQT_TQOBJECT(this), TQT_SLOT(slotJumpToStart()), actionCollection(), "cursor_start"); - new KAction(i18n("Cursor to &End"), 0, Key_E + CTRL, this, + new KAction(i18n("Cursor to &End"), 0, Key_E + CTRL, TQT_TQOBJECT(this), TQT_SLOT(slotJumpToEnd()), actionCollection(), "cursor_end"); - icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-cursor-to-pointer"))); - new KAction(i18n("Cursor to &Playback Pointer"), icon, 0, this, + new KAction(i18n("Cursor to &Playback Pointer"), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotJumpCursorToPlayback()), actionCollection(), "cursor_to_playback_pointer"); - icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-play"))); - KAction *play = new KAction(i18n("&Play"), icon, Key_Enter, this, + KAction *play = new KAction(i18n("&Play"), icon, Key_Enter, TQT_TQOBJECT(this), TQT_SIGNAL(play()), actionCollection(), "play"); // Alternative shortcut for Play KShortcut playShortcut = play->shortcut(); playShortcut.append( KKey(Key_Return + CTRL) ); play->setShortcut(playShortcut); - icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-stop"))); - new KAction(i18n("&Stop"), icon, Key_Insert, this, + new KAction(i18n("&Stop"), icon, Key_Insert, TQT_TQOBJECT(this), TQT_SIGNAL(stop()), actionCollection(), "stop"); - icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-rewind"))); - new KAction(i18n("Re&wind"), icon, Key_End, this, + new KAction(i18n("Re&wind"), icon, Key_End, TQT_TQOBJECT(this), TQT_SIGNAL(rewindPlayback()), actionCollection(), "playback_pointer_back_bar"); - icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-ffwd"))); - new KAction(i18n("&Fast Forward"), icon, Key_PageDown, this, + new KAction(i18n("&Fast Forward"), icon, Key_PageDown, TQT_TQOBJECT(this), TQT_SIGNAL(fastForwardPlayback()), actionCollection(), "playback_pointer_forward_bar"); - icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-rewind-end"))); - new KAction(i18n("Rewind to &Beginning"), icon, 0, this, + new KAction(i18n("Rewind to &Beginning"), icon, 0, TQT_TQOBJECT(this), TQT_SIGNAL(rewindPlaybackToBeginning()), actionCollection(), "playback_pointer_start"); - icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-ffwd-end"))); - new KAction(i18n("Fast Forward to &End"), icon, 0, this, + new KAction(i18n("Fast Forward to &End"), icon, 0, TQT_TQOBJECT(this), TQT_SIGNAL(fastForwardPlaybackToEnd()), actionCollection(), "playback_pointer_end"); - icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-pointer-to-cursor"))); - new KAction(i18n("Playback Pointer to &Cursor"), icon, 0, this, + new KAction(i18n("Playback Pointer to &Cursor"), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotJumpPlaybackToCursor()), actionCollection(), "playback_pointer_to_cursor"); - icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-solo"))); - new KToggleAction(i18n("&Solo"), icon, 0, this, + new KToggleAction(i18n("&Solo"), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotToggleSolo()), actionCollection(), "toggle_solo"); - icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-tracking"))); - (new KToggleAction(i18n("Scro&ll to Follow Playback"), icon, Key_Pause, this, + (new KToggleAction(i18n("Scro&ll to Follow Playback"), icon, Key_Pause, TQT_TQOBJECT(this), TQT_SLOT(slotToggleTracking()), actionCollection(), "toggle_tracking"))->setChecked(m_playTracking); - icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-panic"))); - new KAction(i18n("Panic"), icon, Key_P + CTRL + ALT, this, + new KAction(i18n("Panic"), icon, Key_P + CTRL + ALT, TQT_TQOBJECT(this), TQT_SIGNAL(panic()), actionCollection(), "panic"); - new KAction(i18n("Set Loop to Selection"), Key_Semicolon + CTRL, this, + new KAction(i18n("Set Loop to Selection"), Key_Semicolon + CTRL, TQT_TQOBJECT(this), TQT_SLOT(slotPreviewSelection()), actionCollection(), "preview_selection"); - new KAction(i18n("Clear L&oop"), Key_Colon + CTRL, this, + new KAction(i18n("Clear L&oop"), Key_Colon + CTRL, TQT_TQOBJECT(this), TQT_SLOT(slotClearLoop()), actionCollection(), "clear_loop"); - new KAction(i18n("Clear Selection"), Key_Escape, this, + new KAction(i18n("Clear Selection"), Key_Escape, TQT_TQOBJECT(this), TQT_SLOT(slotClearSelection()), actionCollection(), "clear_selection"); // icon = TQIconSet(TQCanvasPixmap(pixmapDir + "/toolbar/eventfilter.xpm")); - new KAction(i18n("&Filter Selection"), "filter", Key_F + CTRL, this, + new KAction(i18n("&Filter Selection"), "filter", Key_F + CTRL, TQT_TQOBJECT(this), TQT_SLOT(slotFilterSelection()), actionCollection(), "filter_selection"); @@ -876,23 +876,23 @@ void MatrixView::setupActions() timeT d = m_snapValues[i]; if (d == SnapGrid::NoSnap) { - new KAction(i18n("&No Snap"), 0, this, + new KAction(i18n("&No Snap"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotSetSnapFromAction()), actionCollection(), "snap_none"); } else if (d == SnapGrid::SnapToUnit) { } else if (d == SnapGrid::SnapToBeat) { - new KAction(i18n("Snap to Bea&t"), Key_1, this, + new KAction(i18n("Snap to Bea&t"), Key_1, TQT_TQOBJECT(this), TQT_SLOT(slotSetSnapFromAction()), actionCollection(), "snap_beat"); } else if (d == SnapGrid::SnapToBar) { - new KAction(i18n("Snap to &Bar"), Key_5, this, + new KAction(i18n("Snap to &Bar"), Key_5, TQT_TQOBJECT(this), TQT_SLOT(slotSetSnapFromAction()), actionCollection(), "snap_bar"); } else { timeT err = 0; TQString label = NotationStrings::makeNoteMenuLabel(d, true, err); - TQPixmap pixmap = NotePixmapFactory::toQPixmap + TQPixmap pixmap = NotePixmapFactory::toTQPixmap (NotePixmapFactory::makeNoteMenuPixmap(d, err)); KShortcut cut = 0; @@ -903,9 +903,9 @@ void MatrixView::setupActions() else if (d == crotchetDuration) cut = Key_4; else if (d == crotchetDuration * 2) cut = Key_2; - TQString actionName = TQString("snap_%1").arg(int((crotchetDuration * 4) / d)); + TQString actionName = TQString("snap_%1").tqarg(int((crotchetDuration * 4) / d)); if (d == (crotchetDuration * 3) / 2) actionName = "snap_3"; - new KAction(i18n("Snap to %1").arg(label), pixmap, cut, this, + new KAction(i18n("Snap to %1").tqarg(label), pixmap, cut, TQT_TQOBJECT(this), TQT_SLOT(slotSetSnapFromAction()), actionCollection(), actionName); } @@ -914,16 +914,16 @@ void MatrixView::setupActions() // // Settings menu // - new KAction(i18n("Show Instrument Parameters"), 0, this, + new KAction(i18n("Show Instrument Parameters"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotDockParametersBack()), actionCollection(), "show_inst_parameters"); - new KToggleAction(i18n("Show Ch&ord Name Ruler"), 0, this, + new KToggleAction(i18n("Show Ch&ord Name Ruler"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotToggleChordsRuler()), actionCollection(), "show_chords_ruler"); - new KToggleAction(i18n("Show &Tempo Ruler"), 0, this, + new KToggleAction(i18n("Show &Tempo Ruler"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotToggleTempoRuler()), actionCollection(), "show_tempo_ruler"); @@ -1032,20 +1032,20 @@ bool MatrixView::applyLayout(int staffNo, { Profiler profiler("MatrixView::applyLayout", true); - m_hlayout.reset(); - m_vlayout.reset(); + m_htqlayout.reset(); + m_vtqlayout.reset(); for (unsigned int i = 0; i < m_staffs.size(); ++i) { if (staffNo >= 0 && (int)i != staffNo) continue; - m_hlayout.scanStaff(*m_staffs[i], startTime, endTime); - m_vlayout.scanStaff(*m_staffs[i], startTime, endTime); + m_htqlayout.scanStaff(*m_staffs[i], startTime, endTime); + m_vtqlayout.scanStaff(*m_staffs[i], startTime, endTime); } - m_hlayout.finishLayout(); - m_vlayout.finishLayout(); + m_htqlayout.finishLayout(); + m_vtqlayout.finishLayout(); if (m_staffs[0]->getSegment().getEndMarkerTime() != m_lastEndMarkerTime || m_lastEndMarkerTime == 0 || @@ -1078,7 +1078,7 @@ void MatrixView::refreshSegment(Segment *segment, } m_staffs[0]->positionElements(startTime, endTime); - repaintRulers(); + tqrepaintRulers(); } TQSize MatrixView::getViewSize() @@ -1096,10 +1096,10 @@ void MatrixView::setViewSize(TQSize s) MATRIX_DEBUG << "MatrixView::setViewSize() contentsWidth = " << getCanvasView()->contentsWidth() << endl; } -void MatrixView::repaintRulers() +void MatrixView::tqrepaintRulers() { for (unsigned int i = 0; i != m_propertyViewRulers.size(); i++) - m_propertyViewRulers[i].first->repaint(); + m_propertyViewRulers[i].first->tqrepaint(); } void MatrixView::updateView() @@ -1156,7 +1156,7 @@ void MatrixView::setCurrentSelection(EventSelection* s, bool preview, i != s->getSegmentEvents().end(); ++i) { if (oldSelection && oldSelection->getSegment() == s->getSegment() - && oldSelection->contains(*i)) + && oldSelection->tqcontains(*i)) continue; foundNewEvent = true; @@ -1196,8 +1196,8 @@ void MatrixView::setCurrentSelection(EventSelection* s, bool preview, getStaff(segment)->positionElements(std::min(startA, startB), std::max(endA, endB)); } else { - // mark refresh status and then request a repaint - segment.getRefreshStatus + // mark refresh status and then request a tqrepaint + segment.getRefreshtqStatus (m_segmentsRefreshStatusIds [getStaff(segment)->getId()]). push(std::min(startA, startB), std::max(endA, endB)); @@ -1213,14 +1213,14 @@ void MatrixView::setCurrentSelection(EventSelection* s, bool preview, getStaff(s->getSegment())->positionElements(startB, endB); } else { - // mark refresh status and then request a repaint + // mark refresh status and then request a tqrepaint - oldSelection->getSegment().getRefreshStatus + oldSelection->getSegment().getRefreshtqStatus (m_segmentsRefreshStatusIds [getStaff(oldSelection->getSegment())->getId()]). push(startA, endA); - s->getSegment().getRefreshStatus + s->getSegment().getRefreshtqStatus (m_segmentsRefreshStatusIds [getStaff(s->getSegment())->getId()]). push(startB, endB); @@ -1254,11 +1254,11 @@ void MatrixView::setCurrentSelection(EventSelection* s, bool preview, if (s) { stateChanged("have_selection", KXMLGUIClient::StateNoReverse); - if (s->contains(Note::EventType)) { + if (s->tqcontains(Note::EventType)) { stateChanged("have_notes_in_selection", KXMLGUIClient::StateNoReverse); } - if (s->contains(Note::EventRestType)) { + if (s->tqcontains(Note::EventRestType)) { stateChanged("have_rests_in_selection", KXMLGUIClient::StateNoReverse); } @@ -1315,10 +1315,10 @@ void MatrixView::slotSelectSelected() EditTool* selector = m_toolBox->getTool(MatrixSelector::ToolName); connect(selector, TQT_SIGNAL(gotSelection()), - this, TQT_SLOT(slotNewSelection())); + TQT_TQOBJECT(this), TQT_SLOT(slotNewSelection())); connect(selector, TQT_SIGNAL(editTriggerSegment(int)), - this, TQT_SIGNAL(editTriggerSegment(int))); + TQT_TQOBJECT(this), TQT_SIGNAL(editTriggerSegment(int))); setTool(selector); } @@ -1398,7 +1398,7 @@ void MatrixView::slotMousePressed(timeT time, int pitch, m_tool->handleMousePress(time, pitch, 0, e, el); - if (e->button() != RightButton) { + if (e->button() != Qt::RightButton) { getCanvasView()->startAutoScroll(); } @@ -1474,13 +1474,13 @@ MatrixView::slotHoveredOverNoteChanged(int evPitch, long ms = rt.msec(); TQString msg = i18n("Note: %1 (%2.%3s)") - .arg(TQString("%1-%2-%3-%4") - .arg(TQString("%1").arg(bar + 1).rightJustify(3, '0')) - .arg(TQString("%1").arg(beat).rightJustify(2, '0')) - .arg(TQString("%1").arg(fraction).rightJustify(2, '0')) - .arg(TQString("%1").arg(remainder).rightJustify(2, '0'))) - .arg(rt.sec) - .arg(TQString("%1").arg(ms).rightJustify(3, '0')); + .tqarg(TQString("%1-%2-%3-%4") + .tqarg(TQString("%1").tqarg(bar + 1).rightJustify(3, '0')) + .tqarg(TQString("%1").tqarg(beat).rightJustify(2, '0')) + .tqarg(TQString("%1").tqarg(fraction).rightJustify(2, '0')) + .tqarg(TQString("%1").tqarg(remainder).rightJustify(2, '0'))) + .tqarg(rt.sec) + .tqarg(TQString("%1").tqarg(ms).rightJustify(3, '0')); m_hoveredOverAbsoluteTime->setText(msg); } @@ -1488,8 +1488,8 @@ MatrixView::slotHoveredOverNoteChanged(int evPitch, m_haveHoveredOverNote = false; m_hoveredOverNoteName->setText(i18n("%1 (%2)") - .arg(label.getQString()) - .arg(evPitch)); + .tqarg(label.getTQString()) + .tqarg(evPitch)); m_pitchRuler->drawHoverNote(evPitch); } @@ -1504,7 +1504,7 @@ MatrixView::slotHoveredOverKeyChanged(unsigned int y) if (evPitch != m_previousEvPitch) { MidiPitchLabel label(evPitch); m_hoveredOverNoteName->setText(TQString("%1 (%2)"). - arg(label.getQString()).arg(evPitch)); + tqarg(label.getTQString()).tqarg(evPitch)); m_previousEvPitch = evPitch; } } @@ -1529,13 +1529,13 @@ MatrixView::slotHoveredOverAbsoluteTimeChanged(unsigned int time) // to support Unicode TQString message = i18n("Time: %1 (%2.%3s)") - .arg(TQString("%1-%2-%3-%4") - .arg(TQString("%1").arg(bar + 1).rightJustify(3, '0')) - .arg(TQString("%1").arg(beat).rightJustify(2, '0')) - .arg(TQString("%1").arg(fraction).rightJustify(2, '0')) - .arg(TQString("%1").arg(remainder).rightJustify(2, '0'))) - .arg(rt.sec) - .arg(TQString("%1").arg(ms).rightJustify(3, '0')); + .tqarg(TQString("%1-%2-%3-%4") + .tqarg(TQString("%1").tqarg(bar + 1).rightJustify(3, '0')) + .tqarg(TQString("%1").tqarg(beat).rightJustify(2, '0')) + .tqarg(TQString("%1").tqarg(fraction).rightJustify(2, '0')) + .tqarg(TQString("%1").tqarg(remainder).rightJustify(2, '0'))) + .tqarg(rt.sec) + .tqarg(TQString("%1").tqarg(ms).rightJustify(3, '0')); m_hoveredOverAbsoluteTime->setText(message); } @@ -1552,7 +1552,7 @@ MatrixView::slotSetPointerPosition(timeT time, bool scroll) Composition &comp = getDocument()->getComposition(); int barNo = comp.getBarNumber(time); - if (barNo >= m_hlayout.getLastVisibleBarOnStaff(*m_staffs[0])) { + if (barNo >= m_htqlayout.getLastVisibleBarOnStaff(*m_staffs[0])) { Segment &seg = m_staffs[0]->getSegment(); @@ -1561,20 +1561,20 @@ MatrixView::slotSetPointerPosition(timeT time, bool scroll) seg.getStartTime() + ((time - seg.getStartTime()) % (seg.getEndMarkerTime() - seg.getStartTime())); - m_staffs[0]->setPointerPosition(m_hlayout, time); + m_staffs[0]->setPointerPosition(m_htqlayout, time); } else { m_staffs[0]->hidePointer(); scroll = false; } - } else if (barNo < m_hlayout.getFirstVisibleBarOnStaff(*m_staffs[0])) { + } else if (barNo < m_htqlayout.getFirstVisibleBarOnStaff(*m_staffs[0])) { m_staffs[0]->hidePointer(); scroll = false; } else { - m_staffs[0]->setPointerPosition(m_hlayout, time); + m_staffs[0]->setPointerPosition(m_htqlayout, time); } if (scroll && !getCanvasView()->isAutoScrolling()) - getCanvasView()->slotScrollHoriz(static_cast<int>(getXbyWorldMatrix(m_hlayout.getXForTime(time)))); + getCanvasView()->slotScrollHoriz(static_cast<int>(getXbyWorldMatrix(m_htqlayout.getXForTime(time)))); updateView(); } @@ -1585,11 +1585,11 @@ MatrixView::slotSetInsertCursorPosition(timeT time, bool scroll) //!!! For now. Probably unlike slotSetPointerPosition this one // should snap to the nearest event or grid line. - m_staffs[0]->setInsertCursorPosition(m_hlayout, time); + m_staffs[0]->setInsertCursorPosition(m_htqlayout, time); if (scroll && !getCanvasView()->isAutoScrolling()) { getCanvasView()->slotScrollHoriz - (static_cast<int>(getXbyWorldMatrix(m_hlayout.getXForTime(time)))); + (static_cast<int>(getXbyWorldMatrix(m_htqlayout.getXForTime(time)))); } updateView(); @@ -1810,7 +1810,7 @@ void MatrixView::slotVerticalScrollPianoKeyboard(int y) void MatrixView::slotInsertNoteFromAction() { - const TQObject *s = sender(); + const TQObject *s = TQT_TQOBJECT_CONST(const_cast<const TQT_BASE_OBJECT_NAME*>(sender())); TQString name = s->name(); Segment &segment = *getCurrentSegment(); @@ -1830,7 +1830,7 @@ void MatrixView::slotInsertNoteFromAction() } catch (...) { KMessageBox::sorry - (this, i18n("Unknown note insert action %1").arg(name)); + (this, i18n("Unknown note insert action %1").tqarg(name)); return ; } @@ -2017,7 +2017,7 @@ MatrixView::slotSetSnapFromIndex(int s) void MatrixView::slotSetSnapFromAction() { - const TQObject *s = sender(); + const TQObject *s = TQT_TQOBJECT_CONST(const_cast<const TQT_BASE_OBJECT_NAME*>(sender())); TQString name = s->name(); if (name.left(5) == "snap_") { @@ -2052,7 +2052,7 @@ MatrixView::slotSetSnap(timeT t) } for (unsigned int i = 0; i < m_staffs.size(); ++i) - m_staffs[i]->sizeStaff(m_hlayout); + m_staffs[i]->sizeStaff(m_htqlayout); m_segments[0]->setSnapGridSize(t); @@ -2120,7 +2120,7 @@ MatrixView::initActionsToolbar() TQLabel *sLabel = new TQLabel(i18n(" Grid: "), actionsToolbar, "kde toolbar widget"); sLabel->setIndent(10); - TQPixmap noMap = NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("menu-no-note")); + TQPixmap noMap = NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap("menu-no-note")); m_snapGridCombo = new KComboBox(actionsToolbar); @@ -2139,7 +2139,7 @@ MatrixView::initActionsToolbar() } else { timeT err = 0; TQString label = NotationStrings::makeNoteMenuLabel(d, true, err); - TQPixmap pixmap = NotePixmapFactory::toQPixmap + TQPixmap pixmap = NotePixmapFactory::toTQPixmap (NotePixmapFactory::makeNoteMenuPixmap(d, err)); m_snapGridCombo->insertItem((err ? noMap : pixmap), label); } @@ -2150,7 +2150,7 @@ MatrixView::initActionsToolbar() } connect(m_snapGridCombo, TQT_SIGNAL(activated(int)), - this, TQT_SLOT(slotSetSnapFromIndex(int))); + TQT_TQOBJECT(this), TQT_SLOT(slotSetSnapFromIndex(int))); // Velocity combo. Not a spin box, because the spin box is too // slow to use unless we make it typeable into, and then it takes @@ -2161,7 +2161,7 @@ MatrixView::initActionsToolbar() m_velocityCombo = new KComboBox(actionsToolbar); for (int i = 0; i <= 127; ++i) { - m_velocityCombo->insertItem(TQString("%1").arg(i)); + m_velocityCombo->insertItem(TQString("%1").tqarg(i)); } m_velocityCombo->setCurrentItem(100); //!!! associate with segment @@ -2177,14 +2177,14 @@ MatrixView::initActionsToolbar() timeT time = m_quantizations[i]; timeT error = 0; TQString label = NotationStrings::makeNoteMenuLabel(time, true, error); - TQPixmap pmap = NotePixmapFactory::toQPixmap(NotePixmapFactory::makeNoteMenuPixmap(time, error)); + TQPixmap pmap = NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeNoteMenuPixmap(time, error)); m_quantizeCombo->insertItem(error ? noMap : pmap, label); } m_quantizeCombo->insertItem(noMap, i18n("Off")); connect(m_quantizeCombo, TQT_SIGNAL(activated(int)), - this, TQT_SLOT(slotQuantizeSelection(int))); + TQT_TQOBJECT(this), TQT_SLOT(slotQuantizeSelection(int))); } void @@ -2217,9 +2217,9 @@ MatrixView::initZoomToolbar() } m_hZoomSlider = new ZoomSlider<double> - (zoomSizes, -1, TQSlider::Horizontal, zoomToolbar, "kde toolbar widget"); + (zoomSizes, -1, Qt::Horizontal, zoomToolbar, "kde toolbar widget"); m_hZoomSlider->setTracking(true); - m_hZoomSlider->setFocusPolicy(TQWidget::NoFocus); + m_hZoomSlider->setFocusPolicy(TQ_NoFocus); m_zoomLabel = new TQLabel(zoomToolbar, "kde toolbar widget"); m_zoomLabel->setIndent(10); @@ -2236,8 +2236,8 @@ MatrixView::slotChangeHorizontalZoom(int) { double zoomValue = m_hZoomSlider->getCurrentSize(); - // m_zoomLabel->setText(i18n("%1%").arg(zoomValue*100.0 * 2)); // GROSS HACK - see in matrixstaff.h - BREAKS MATRIX VIEW, see bug 1000595 - m_zoomLabel->setText(i18n("%1%").arg(zoomValue*100.0)); + // m_zoomLabel->setText(i18n("%1%").tqarg(zoomValue*100.0 * 2)); // GROSS HACK - see in matrixstaff.h - BREAKS MATRIX VIEW, see bug 1000595 + m_zoomLabel->setText(i18n("%1%").tqarg(zoomValue*100.0)); MATRIX_DEBUG << "MatrixView::slotChangeHorizontalZoom() : zoom factor = " << zoomValue << endl; @@ -2245,9 +2245,9 @@ MatrixView::slotChangeHorizontalZoom(int) m_referenceRuler->setHScaleFactor(zoomValue); if (m_tempoRuler) - m_tempoRuler->repaint(); + m_tempoRuler->tqrepaint(); if (m_chordNameRuler) - m_chordNameRuler->repaint(); + m_chordNameRuler->tqrepaint(); // Set zoom matrix // @@ -2266,7 +2266,7 @@ MatrixView::slotChangeHorizontalZoom(int) for (unsigned int i = 0; i < m_propertyViewRulers.size(); ++i) { m_propertyViewRulers[i].first->setHScaleFactor(zoomValue); - m_propertyViewRulers[i].first->repaint(); + m_propertyViewRulers[i].first->tqrepaint(); } if (m_topStandardRuler) @@ -2314,8 +2314,8 @@ MatrixView::slotZoomOut() void MatrixView::scrollToTime(timeT t) { - double layoutCoord = m_hlayout.getXForTime(t); - getCanvasView()->slotScrollHoriz(int(layoutCoord)); + double tqlayoutCoord = m_htqlayout.getXForTime(t); + getCanvasView()->slotScrollHoriz(int(tqlayoutCoord)); } int @@ -2366,7 +2366,7 @@ MatrixView::addPropertyViewRuler(const PropertyName &property) int height = 20; - PropertyViewRuler *newRuler = new PropertyViewRuler(&m_hlayout, + PropertyViewRuler *newRuler = new PropertyViewRuler(&m_htqlayout, m_segments[0], property, xorigin, @@ -2409,7 +2409,7 @@ MatrixView::removePropertyViewRuler(unsigned int number) RulerScale* MatrixView::getHLayout() { - return &m_hlayout; + return &m_htqlayout; } Staff* @@ -2429,14 +2429,14 @@ timeT MatrixView::getInsertionTime() { MatrixStaff *staff = m_staffs[0]; - return staff->getInsertCursorTime(m_hlayout); + return staff->getInsertCursorTime(m_htqlayout); } void MatrixView::slotStepBackward() { timeT time(getInsertionTime()); - slotSetInsertCursorPosition(SnapGrid(&m_hlayout).snapTime + slotSetInsertCursorPosition(SnapGrid(&m_htqlayout).snapTime (time - 1, SnapGrid::SnapLeft)); } @@ -2445,7 +2445,7 @@ void MatrixView::slotStepForward() { timeT time(getInsertionTime()); - slotSetInsertCursorPosition(SnapGrid(&m_hlayout).snapTime + slotSetInsertCursorPosition(SnapGrid(&m_htqlayout).snapTime (time + 1, SnapGrid::SnapRight)); } @@ -2553,7 +2553,7 @@ MatrixView::readjustCanvasSize() MatrixStaff &staff = *m_staffs[i]; - staff.sizeStaff(m_hlayout); + staff.sizeStaff(m_htqlayout); // if (staff.getTotalWidth() + staff.getX() > maxWidth) { // maxWidth = staff.getTotalWidth() + staff.getX() + 1; @@ -2574,7 +2574,7 @@ MatrixView::readjustCanvasSize() // now get the EditView to do the biz readjustViewSize(TQSize(newWidth, maxHeight), true); - repaintRulers(); + tqrepaintRulers(); } void MatrixView::slotVelocityUp() @@ -2721,23 +2721,23 @@ MatrixView::updateViewCaption() trackPosition = track->getPosition(); setCaption(i18n("%1 - Segment Track #%2 - %3") - .arg(getDocument()->getTitle()) - .arg(trackPosition + 1) - .arg(view)); + .tqarg(getDocument()->getTitle()) + .tqarg(trackPosition + 1) + .tqarg(view)); } else if (m_segments.size() == getDocument()->getComposition().getNbSegments()) { setCaption(i18n("%1 - All Segments - %2") - .arg(getDocument()->getTitle()) - .arg(view)); + .tqarg(getDocument()->getTitle()) + .tqarg(view)); } else { setCaption(i18n("%1 - 1 Segment - %2", "%1 - %n Segments - %2", m_segments.size()) - .arg(getDocument()->getTitle()) - .arg(view)); + .tqarg(getDocument()->getTitle()) + .tqarg(view)); } } @@ -2745,10 +2745,10 @@ int MatrixView::computePostLayoutWidth() { Segment *segment = m_segments[0]; Composition *composition = segment->getComposition(); - int endX = int(m_hlayout.getXForTime + int endX = int(m_htqlayout.getXForTime (composition->getBarEndForTime (segment->getEndMarkerTime()))); - int startX = int(m_hlayout.getXForTime + int startX = int(m_htqlayout.getXForTime (composition->getBarStartForTime (segment->getStartTime()))); @@ -2921,14 +2921,14 @@ MatrixView::slotToggleStepByStep() return ; } if (action->isChecked()) { // after toggling, that is - emit stepByStepTargetRequested(this); + emit stepByStepTargetRequested(TQT_TQOBJECT(this)); } else { emit stepByStepTargetRequested(0); } } void -MatrixView::slotUpdateInsertModeStatus() +MatrixView::slotUpdateInsertModetqStatus() { TQString message; if (isInChordMode()) { @@ -2948,7 +2948,7 @@ MatrixView::slotStepByStepTargetRequested(TQObject *obj) MATRIX_DEBUG << "WARNING: No toggle_step_by_step action" << endl; return ; } - action->setChecked(obj == this); + action->setChecked(TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(this)); } void @@ -3026,35 +3026,35 @@ MatrixView::slotPercussionSetChanged(Instrument * newInstr) TQObject::connect (pitchRuler, TQT_SIGNAL(hoveredOverKeyChanged(unsigned int)), - this, TQT_SLOT (slotHoveredOverKeyChanged(unsigned int))); + TQT_TQOBJECT(this), TQT_SLOT (slotHoveredOverKeyChanged(unsigned int))); TQObject::connect (pitchRuler, TQT_SIGNAL(keyPressed(unsigned int, bool)), - this, TQT_SLOT (slotKeyPressed(unsigned int, bool))); + TQT_TQOBJECT(this), TQT_SLOT (slotKeyPressed(unsigned int, bool))); TQObject::connect (pitchRuler, TQT_SIGNAL(keySelected(unsigned int, bool)), - this, TQT_SLOT (slotKeySelected(unsigned int, bool))); + TQT_TQOBJECT(this), TQT_SLOT (slotKeySelected(unsigned int, bool))); TQObject::connect (pitchRuler, TQT_SIGNAL(keyReleased(unsigned int, bool)), - this, TQT_SLOT (slotKeyReleased(unsigned int, bool))); + TQT_TQOBJECT(this), TQT_SLOT (slotKeyReleased(unsigned int, bool))); // Replace the old pitchruler widget m_pitchRuler = pitchRuler; m_pianoView->addChild(m_pitchRuler); m_pitchRuler->show(); - m_pianoView->setFixedWidth(pitchRuler->sizeHint().width()); + m_pianoView->setFixedWidth(pitchRuler->tqsizeHint().width()); // Update matrix canvas readjustCanvasSize(); - bool layoutApplied = applyLayout(); - if (!layoutApplied) - KMessageBox::sorry(0, i18n("Couldn't apply piano roll layout")); + bool tqlayoutApplied = applyLayout(); + if (!tqlayoutApplied) + KMessageBox::sorry(0, i18n("Couldn't apply piano roll tqlayout")); else { MATRIX_DEBUG << "MatrixView : rendering elements\n"; m_staffs[0]->positionAllElements(); - m_staffs[0]->getSegment().getRefreshStatus + m_staffs[0]->getSegment().getRefreshtqStatus (m_segmentsRefreshStatusIds[0]).setNeedsRefresh(false); update(); } diff --git a/src/gui/editors/matrix/MatrixView.h b/src/gui/editors/matrix/MatrixView.h index 0951c8c..d65b86a 100644 --- a/src/gui/editors/matrix/MatrixView.h +++ b/src/gui/editors/matrix/MatrixView.h @@ -82,13 +82,14 @@ class LevelInfo; class MatrixView : public EditView { Q_OBJECT + TQ_OBJECT friend class MatrixSelector; public: MatrixView(RosegardenGUIDoc *doc, std::vector<Segment *> segments, - TQWidget *parent, bool drumMode); + TQWidget *tqparent, bool drumMode); virtual ~MatrixView(); @@ -189,7 +190,7 @@ public: * Adjust an X coord by world matrix */ double getXbyWorldMatrix(double value) - { return m_canvasView->worldMatrix().m11() * value; } + { return m_canvasView->tqworldMatrix().m11() * value; } double getXbyInverseWorldMatrix(double value) { return m_canvasView->inverseWorldMatrix().m11() * value; } @@ -200,7 +201,7 @@ public: * Repaint the control rulers * */ - void repaintRulers(); + void tqrepaintRulers(); /* * Readjust the canvas size @@ -291,7 +292,7 @@ public slots: void slotToggleStepByStep(); /// status stuff - void slotUpdateInsertModeStatus(); + void slotUpdateInsertModetqStatus(); /// transforms void slotTransformsQuantize(); @@ -519,7 +520,7 @@ protected: /** * save general Options like all bar positions and status as well - * as the geometry and the recent file list to the configuration + * as the tqgeometry and the recent file list to the configuration * file */ virtual void slotSaveOptions(); @@ -593,13 +594,13 @@ protected: std::vector<MatrixStaff*> m_staffs; - MatrixHLayout m_hlayout; - MatrixVLayout m_vlayout; + MatrixHLayout m_htqlayout; + MatrixVLayout m_vtqlayout; SnapGrid *m_snapGrid; timeT m_lastEndMarkerTime; - // Status bar elements + // tqStatus bar elements TQLabel* m_hoveredOverAbsoluteTime; TQLabel* m_hoveredOverNoteName; TQLabel *m_selectionCounter; @@ -668,12 +669,13 @@ protected: }; // Commented this out - was a MatrixView inner class, but we get a warning -// that Q_OBJECT can't be used in an inner class - gl +// that TQ_OBJECT can't be used in an inner class - gl // -// class NoteSender : public QObject +// class NoteSender : public TQObject // { // Q_OBJECT +// TQ_OBJECT // public: // NoteSender(int i, int p) : m_insid(i), m_pitch(p) { } diff --git a/src/gui/editors/matrix/PianoKeyboard.cpp b/src/gui/editors/matrix/PianoKeyboard.cpp index 47f8413..e61cdc6 100644 --- a/src/gui/editors/matrix/PianoKeyboard.cpp +++ b/src/gui/editors/matrix/PianoKeyboard.cpp @@ -46,8 +46,8 @@ namespace Rosegarden const unsigned int _smallWhiteKeyHeight = 14; const unsigned int _whiteKeyHeight = 18; -PianoKeyboard::PianoKeyboard(TQWidget *parent, int keys) - : PitchRuler(parent), +PianoKeyboard::PianoKeyboard(TQWidget *tqparent, int keys) + : PitchRuler(tqparent), m_keySize(48, 18), m_blackKeySize(24, 8), m_nbKeys(keys), @@ -65,13 +65,13 @@ PianoKeyboard::PianoKeyboard(TQWidget *parent, int keys) setMouseTracking(true); } -TQSize PianoKeyboard::sizeHint() const +TQSize PianoKeyboard::tqsizeHint() const { return TQSize(m_keySize.width(), m_keySize.height() * m_nbKeys); } -TQSize PianoKeyboard::minimumSizeHint() const +TQSize PianoKeyboard::tqminimumSizeHint() const { return m_keySize; } @@ -151,10 +151,10 @@ void PianoKeyboard::paintEvent(TQPaintEvent*) MidiPitchLabel label(pitch); paint.drawText(m_blackKeySize.width(), m_labelKeyPos[i], - label.getQString()); + label.getTQString()); } - paint.setBrush(colorGroup().foreground()); + paint.setBrush(tqcolorGroup().foreground()); for (unsigned int i = 0; i < m_blackKeyPos.size(); ++i) paint.drawRect(0, m_blackKeyPos[i], @@ -249,7 +249,7 @@ void PianoKeyboard::mouseMoveEvent(TQMouseEvent* e) // // RWB (20040220) // - MatrixView *matrixView = dynamic_cast<MatrixView*>(topLevelWidget()); + MatrixView *matrixView = dynamic_cast<MatrixView*>(tqtopLevelWidget()); if (matrixView) { MatrixStaff *staff = matrixView->getStaff(0); @@ -272,11 +272,11 @@ void PianoKeyboard::mouseMoveEvent(TQMouseEvent* e) void PianoKeyboard::mousePressEvent(TQMouseEvent *e) { - Qt::ButtonState bs = e->state(); + TQt::ButtonState bs = e->state(); - if (e->button() == LeftButton) { + if (e->button() == Qt::LeftButton) { m_mouseDown = true; - m_selecting = (bs & Qt::ShiftButton); + m_selecting = (bs & TQt::ShiftButton); m_lastKeyPressed = e->y(); if (m_selecting) @@ -288,7 +288,7 @@ void PianoKeyboard::mousePressEvent(TQMouseEvent *e) void PianoKeyboard::mouseReleaseEvent(TQMouseEvent *e) { - if (e->button() == LeftButton) { + if (e->button() == Qt::LeftButton) { m_mouseDown = false; m_selecting = false; emit keyReleased(e->y(), false); diff --git a/src/gui/editors/matrix/PianoKeyboard.h b/src/gui/editors/matrix/PianoKeyboard.h index 82c2be6..c8c09e8 100644 --- a/src/gui/editors/matrix/PianoKeyboard.h +++ b/src/gui/editors/matrix/PianoKeyboard.h @@ -45,11 +45,12 @@ namespace Rosegarden class PianoKeyboard : public PitchRuler { Q_OBJECT + TQ_OBJECT public: - PianoKeyboard(TQWidget *parent, int keys = 88); + PianoKeyboard(TQWidget *tqparent, int keys = 88); - virtual TQSize sizeHint() const; - virtual TQSize minimumSizeHint() const; + virtual TQSize tqsizeHint() const; + virtual TQSize tqminimumSizeHint() const; /* * We want to be able to call this from the matrix view diff --git a/src/gui/editors/matrix/QCanvasMatrixDiamond.cpp b/src/gui/editors/matrix/QCanvasMatrixDiamond.cpp index 128d3f9..d8d7b06 100644 --- a/src/gui/editors/matrix/QCanvasMatrixDiamond.cpp +++ b/src/gui/editors/matrix/QCanvasMatrixDiamond.cpp @@ -52,7 +52,7 @@ TQPointArray QCanvasMatrixDiamond::areaPoints() const int pw = (pen().width() + 1) / 2; if ( pw < 1 ) pw = 1; - if ( pen() == NoPen ) + if ( pen() == Qt::NoPen ) pw = 0; pa[0] = TQPoint((int)x() - height() / 2 - pw, (int)y() - pw); pa[1] = pa[0] + TQPoint(height() + pw * 2, 0); @@ -68,7 +68,7 @@ void QCanvasMatrixDiamond::drawShape(TQPainter & p) TQPointArray pa(4); int q = height() / 2 + 2; - TQPoint mapPos = p.worldMatrix().map(TQPoint(int(x()), int(y()))); + TQPoint mapPos = p.tqworldMatrix().map(TQPoint(int(x()), int(y()))); pa[0] = TQPoint(mapPos.x(), mapPos.y() - 3); pa[1] = TQPoint(mapPos.x() + q, mapPos.y() - 3 + q); diff --git a/src/gui/editors/matrix/QCanvasMatrixDiamond.h b/src/gui/editors/matrix/QCanvasMatrixDiamond.h index 547d7f1..8b736e7 100644 --- a/src/gui/editors/matrix/QCanvasMatrixDiamond.h +++ b/src/gui/editors/matrix/QCanvasMatrixDiamond.h @@ -23,8 +23,8 @@ COPYING included with this distribution for more information. */ -#ifndef _RG_QCANVASMATRIXDIAMOND_H_ -#define _RG_QCANVASMATRIXDIAMOND_H_ +#ifndef _RG_TQCANVASMATRIXDIAMOND_H_ +#define _RG_TQCANVASMATRIXDIAMOND_H_ #include "QCanvasMatrixRectangle.h" #include <tqpointarray.h> @@ -41,7 +41,7 @@ class MatrixElement; /** - * A TQCanvas diamond shape referencing a MatrixElement + * A TQCanvas diamond tqshape referencing a MatrixElement */ class QCanvasMatrixDiamond : public QCanvasMatrixRectangle { diff --git a/src/gui/editors/matrix/QCanvasMatrixRectangle.h b/src/gui/editors/matrix/QCanvasMatrixRectangle.h index 6ef7ed8..12c209d 100644 --- a/src/gui/editors/matrix/QCanvasMatrixRectangle.h +++ b/src/gui/editors/matrix/QCanvasMatrixRectangle.h @@ -23,8 +23,8 @@ COPYING included with this distribution for more information. */ -#ifndef _RG_QCANVASMATRIXRECTANGLE_H_ -#define _RG_QCANVASMATRIXRECTANGLE_H_ +#ifndef _RG_TQCANVASMATRIXRECTANGLE_H_ +#define _RG_TQCANVASMATRIXRECTANGLE_H_ #include <tqcanvas.h> @@ -38,7 +38,7 @@ class MatrixElement; /** * A TQCanvasRectangle referencing a MatrixElement */ -class QCanvasMatrixRectangle : public QCanvasRectangle +class QCanvasMatrixRectangle : public TQCanvasRectangle { public: QCanvasMatrixRectangle(MatrixElement&, TQCanvas*); diff --git a/src/gui/editors/notation/ClefInserter.cpp b/src/gui/editors/notation/ClefInserter.cpp index 5e324a9..8392aa5 100644 --- a/src/gui/editors/notation/ClefInserter.cpp +++ b/src/gui/editors/notation/ClefInserter.cpp @@ -48,7 +48,7 @@ ClefInserter::ClefInserter(NotationView* view) : NotationTool("ClefInserter", view), m_clef(Clef::Treble) { - TQIconSet icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory:: + TQIconSet icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory:: makeToolbarPixmap("select"))); new KAction(i18n("Switch to Select Tool"), icon, 0, this, TQT_SLOT(slotSelectSelected()), actionCollection(), @@ -58,8 +58,8 @@ ClefInserter::ClefInserter(NotationView* view) TQT_SLOT(slotEraseSelected()), actionCollection(), "erase"); - icon = QIconSet - (NotePixmapFactory::toQPixmap(NotePixmapFactory:: + icon = TQIconSet + (NotePixmapFactory::toTQPixmap(NotePixmapFactory:: makeToolbarPixmap("crotchet"))); new KAction(i18n("Switch to Inserting Notes"), icon, 0, this, TQT_SLOT(slotNotesSelected()), actionCollection(), @@ -75,17 +75,17 @@ void ClefInserter::slotNotesSelected() void ClefInserter::slotEraseSelected() { - m_parentView->actionCollection()->action("erase")->activate(); + m_tqparentView->actionCollection()->action("erase")->activate(); } void ClefInserter::slotSelectSelected() { - m_parentView->actionCollection()->action("select")->activate(); + m_tqparentView->actionCollection()->action("select")->activate(); } void ClefInserter::ready() { - m_nParentView->setCanvasCursor(Qt::crossCursor); + m_nParentView->setCanvasCursor(TQt::crossCursor); m_nParentView->setHeightTracking(false); } diff --git a/src/gui/editors/notation/ClefInserter.h b/src/gui/editors/notation/ClefInserter.h index 427f885..adab546 100644 --- a/src/gui/editors/notation/ClefInserter.h +++ b/src/gui/editors/notation/ClefInserter.h @@ -48,6 +48,7 @@ class NotationView; class ClefInserter : public NotationTool { Q_OBJECT + TQ_OBJECT friend class NotationToolBox; diff --git a/src/gui/editors/notation/FontViewFrame.cpp b/src/gui/editors/notation/FontViewFrame.cpp index d2a668f..5bfdee1 100644 --- a/src/gui/editors/notation/FontViewFrame.cpp +++ b/src/gui/editors/notation/FontViewFrame.cpp @@ -46,8 +46,8 @@ namespace Rosegarden { -FontViewFrame::FontViewFrame( int pixelSize, TQWidget* parent, const char* name ) : - TQFrame(parent, name), +FontViewFrame::FontViewFrame( int pixelSize, TQWidget* tqparent, const char* name ) : + TQFrame(tqparent, name), m_fontSize(pixelSize), m_tableFont(0) { @@ -75,7 +75,7 @@ FontViewFrame::loadFont() { #ifdef HAVE_XFT if (m_tableFont) { - XftFontClose(x11AppDisplay(), (XftFont *)m_tableFont); + XftFontClose(TQT_TQPAINTDEVICE(this)->x11AppDisplay(), (XftFont *)m_tableFont); } m_tableFont = 0; @@ -97,7 +97,7 @@ FontViewFrame::loadFont() FcPatternDestroy(pattern); if (!match || result != FcResultMatch) { - KMessageBox::error(this, i18n("Error: Unable to match font name %1").arg(m_fontName)); + KMessageBox::error(this, i18n("Error: Unable to match font name %1").tqarg(m_fontName)); return ; } @@ -106,11 +106,11 @@ FontViewFrame::loadFont() 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(TQString((const char *)matchFamily))); + tqarg(m_fontName).tqarg(TQString((const char *)matchFamily))); m_fontName = (const char *)matchFamily; } - m_tableFont = XftFontOpenPattern(x11AppDisplay(), match); + m_tableFont = XftFontOpenPattern(TQT_TQPAINTDEVICE(this)->x11AppDisplay(), match); if (!m_tableFont) { KMessageBox::error(this, i18n("Error: Unable to open best-match font %1"). @@ -125,7 +125,7 @@ void FontViewFrame::setGlyphs(bool glyphs) update(); } -TQSize FontViewFrame::sizeHint() const +TQSize FontViewFrame::tqsizeHint() const { return TQSize(16 * m_fontSize * 3 / 2 + margin() + 2 * frameWidth(), 16 * m_fontSize * 3 / 2 + margin() + 2 * frameWidth()); @@ -161,10 +161,10 @@ void FontViewFrame::paintEvent( TQPaintEvent* e ) TQColor rpositive(128, 128, 255); Drawable drawable = (Drawable)handle(); - XftDraw *draw = XftDrawCreate(x11AppDisplay(), drawable, - (Visual *)x11Visual(), x11Colormap()); + XftDraw *draw = XftDrawCreate(TQT_TQPAINTDEVICE(this)->x11AppDisplay(), drawable, + (Visual *)TQT_TQPAINTDEVICE(this)->x11Visual(), TQT_TQPAINTDEVICE(this)->x11Colormap()); - TQColor pen(Qt::black); + TQColor pen(TQt::black); XftColor col; col.color.red = pen.red () | pen.red() << 8; col.color.green = pen.green () | pen.green() << 8; @@ -186,19 +186,19 @@ void FontViewFrame::paintEvent( TQPaintEvent* e ) continue; p.setFont(kapp->font()); TQFontMetrics afm(kapp->font()); - TQString s = TQString("%1").arg(m_row * 256 + (j - 1) * 16); + TQString s = TQString("%1").tqarg(m_row * 256 + (j - 1) * 16); p.drawText(x - afm.width(s), y, s); p.setPen(TQColor(190, 190, 255)); p.drawLine(0, y, width(), y); - p.setPen(Qt::black); + p.setPen(TQt::black); continue; } else if (j == 0) { p.setFont(kapp->font()); - TQString s = TQString("%1").arg(i - 1); + TQString s = TQString("%1").tqarg(i - 1); p.drawText(x, y, s); p.setPen(TQColor(190, 190, 255)); p.drawLine(x, 0, x, height()); - p.setPen(Qt::black); + p.setPen(TQt::black); continue; } @@ -209,7 +209,7 @@ void FontViewFrame::paintEvent( TQPaintEvent* e ) XftDrawGlyphs(draw, &col, (XftFont *)m_tableFont, x, y, &ui, 1); } else { FcChar32 ch = m_row * 256 + (j - 1) * 16 + i - 1; - if (XftCharExists(x11AppDisplay(), (XftFont *)m_tableFont, ch)) { + if (XftCharExists(TQT_TQPAINTDEVICE(this)->x11AppDisplay(), (XftFont *)m_tableFont, ch)) { XftDrawString32(draw, &col, (XftFont *)m_tableFont, x, y, &ch, 1); } } @@ -233,7 +233,7 @@ FontViewFrame::hasRow(int r) const for (int c = 0; c < 256; ++c) { FcChar32 ch = r * 256 + c; - if (XftCharExists(x11AppDisplay(), (XftFont *)m_tableFont, ch)) { + if (XftCharExists(TQT_TQPAINTDEVICE_CONST(this)->x11AppDisplay(), (XftFont *)m_tableFont, ch)) { return true; } } diff --git a/src/gui/editors/notation/FontViewFrame.h b/src/gui/editors/notation/FontViewFrame.h index a344fc1..524e393 100644 --- a/src/gui/editors/notation/FontViewFrame.h +++ b/src/gui/editors/notation/FontViewFrame.h @@ -40,15 +40,16 @@ namespace Rosegarden -class FontViewFrame : public QFrame +class FontViewFrame : public TQFrame { Q_OBJECT + TQ_OBJECT public: - FontViewFrame(int pixelSize, TQWidget *parent = 0, const char *name = 0); + FontViewFrame(int pixelSize, TQWidget *tqparent = 0, const char *name = 0); virtual ~FontViewFrame(); - TQSize sizeHint() const; + TQSize tqsizeHint() const; bool hasRow(int row) const; public slots: diff --git a/src/gui/editors/notation/GuitarChordInserter.cpp b/src/gui/editors/notation/GuitarChordInserter.cpp index b4f6839..f47f2c9 100644 --- a/src/gui/editors/notation/GuitarChordInserter.cpp +++ b/src/gui/editors/notation/GuitarChordInserter.cpp @@ -53,7 +53,7 @@ GuitarChordInserter::GuitarChordInserter(NotationView* view) : NotationTool("GuitarChordInserter", view), m_guitarChordSelector(0) { - TQIconSet icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory:: + TQIconSet icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory:: makeToolbarPixmap("select"))); new KAction(i18n("Switch to Select Tool"), icon, 0, this, @@ -64,8 +64,8 @@ GuitarChordInserter::GuitarChordInserter(NotationView* view) TQT_SLOT(slotEraseSelected()), actionCollection(), "erase"); - icon = QIconSet - (NotePixmapFactory::toQPixmap(NotePixmapFactory:: + icon = TQIconSet + (NotePixmapFactory::toTQPixmap(NotePixmapFactory:: makeToolbarPixmap("crotchet"))); new KAction(i18n("Switch to Inserting Notes"), icon, 0, this, @@ -85,12 +85,12 @@ void GuitarChordInserter::slotGuitarChordSelected() void GuitarChordInserter::slotEraseSelected() { - m_parentView->actionCollection()->action("erase")->activate(); + m_tqparentView->actionCollection()->action("erase")->activate(); } void GuitarChordInserter::slotSelectSelected() { - m_parentView->actionCollection()->action("select")->activate(); + m_tqparentView->actionCollection()->action("select")->activate(); } void GuitarChordInserter::handleLeftButtonPress(timeT, diff --git a/src/gui/editors/notation/GuitarChordInserter.h b/src/gui/editors/notation/GuitarChordInserter.h index d66174b..166f179 100644 --- a/src/gui/editors/notation/GuitarChordInserter.h +++ b/src/gui/editors/notation/GuitarChordInserter.h @@ -48,6 +48,7 @@ class GuitarChordSelectorDialog; class GuitarChordInserter : public NotationTool { Q_OBJECT + TQ_OBJECT friend class NotationToolBox; diff --git a/src/gui/editors/notation/HeadersGroup.cpp b/src/gui/editors/notation/HeadersGroup.cpp index f7dcc82..b08ed1c 100644 --- a/src/gui/editors/notation/HeadersGroup.cpp +++ b/src/gui/editors/notation/HeadersGroup.cpp @@ -43,8 +43,8 @@ namespace Rosegarden HeadersGroup:: -HeadersGroup(TQWidget *parent, NotationView * nv, Composition * comp) : - TQVBox(parent), +HeadersGroup(TQWidget *tqparent, NotationView * nv, Composition * comp) : + TQVBox(tqparent), m_notationView(nv), m_composition(comp), m_usedHeight(0), diff --git a/src/gui/editors/notation/HeadersGroup.h b/src/gui/editors/notation/HeadersGroup.h index b2a9edb..a995646 100644 --- a/src/gui/editors/notation/HeadersGroup.h +++ b/src/gui/editors/notation/HeadersGroup.h @@ -51,14 +51,15 @@ class Composition; class TrackHeader; -class HeadersGroup : public QVBox +class HeadersGroup : public TQVBox { Q_OBJECT + TQ_OBJECT public: /** * Create an empty headers group */ - HeadersGroup(TQWidget *parent, NotationView * nv, Composition * comp); + HeadersGroup(TQWidget *tqparent, NotationView * nv, Composition * comp); void removeAllHeaders(); diff --git a/src/gui/editors/notation/NotationCanvasView.cpp b/src/gui/editors/notation/NotationCanvasView.cpp index fb7d2d9..40c2d59 100644 --- a/src/gui/editors/notation/NotationCanvasView.cpp +++ b/src/gui/editors/notation/NotationCanvasView.cpp @@ -49,9 +49,9 @@ namespace Rosegarden { NotationCanvasView::NotationCanvasView(const LinedStaffManager &staffmgr, - TQCanvas *viewing, TQWidget *parent, + TQCanvas *viewing, TQWidget *tqparent, const char *name, WFlags f) : - RosegardenCanvasView(viewing, parent, name, f), + RosegardenCanvasView(viewing, tqparent, name, f), m_linedStaffManager(staffmgr), m_lastYPosNearStaff(0), m_currentStaff(0), @@ -70,13 +70,13 @@ NotationCanvasView::NotationCanvasView(const LinedStaffManager &staffmgr, viewport()->setMouseTracking(true); - m_heightMarker = new QCanvasItemGroup(viewing); + m_heightMarker = new TQCanvasItemGroup(viewing); - m_vert1 = new QCanvasLineGroupable(viewing, m_heightMarker); + m_vert1 = new TQCanvasLineGroupable(viewing, m_heightMarker); m_vert1->setPoints(0, 0, 0, 8); m_vert1->setPen(TQPen(TQColor(64, 64, 64), 1)); - m_vert2 = new QCanvasLineGroupable(viewing, m_heightMarker); + m_vert2 = new TQCanvasLineGroupable(viewing, m_heightMarker); m_vert2->setPoints(17, 0, 17, 8); m_vert2->setPen(TQPen(TQColor(64, 64, 64), 1)); @@ -115,7 +115,7 @@ NotationCanvasView::contentsMouseMoveEvent(TQMouseEvent *e) if (!m_currentStaff) { - emit hoveredOverNoteChanged(TQString::null); + emit hoveredOverNoteChanged(TQString()); if (prevStaff) { m_heightMarker->hide(); canvas()->update(); @@ -191,10 +191,10 @@ void NotationCanvasView::contentsMousePressEvent(TQMouseEvent *e) return ; } - QCanvasNotationSprite *sprite = - dynamic_cast<QCanvasNotationSprite*>(*it); + TQCanvasNotationSprite *sprite = + dynamic_cast<TQCanvasNotationSprite*>(*it); if (!sprite) { - if (dynamic_cast<QCanvasNonElementSprite *>(*it)) { + if (dynamic_cast<TQCanvasNonElementSprite *>(*it)) { emit nonNotationItemPressed(e, *it); return ; } else if (dynamic_cast<TQCanvasText *>(*it)) { @@ -378,8 +378,8 @@ NotationCanvasView::setHeightMarkerHeight(TQMouseEvent *e) for (i = 0; i < legerLineCount; ++i) { - QCanvasLineGroupable *line = - new QCanvasLineGroupable(canvas(), m_heightMarker); + TQCanvasLineGroupable *line = + new TQCanvasLineGroupable(canvas(), m_heightMarker); line->setPen(TQPen(TQColor(64, 64, 64), 1)); @@ -411,14 +411,14 @@ NotationCanvasView::getElementAtXCoord(TQMouseEvent *e) // any old element TQCanvasItemList itemList = canvas()->collisions(threshold); TQCanvasItemList::Iterator it; - QCanvasNotationSprite* sprite = 0; + TQCanvasNotationSprite* sprite = 0; for (it = itemList.begin(); it != itemList.end(); ++it) { TQCanvasItem *item = *it; - if ((sprite = dynamic_cast<QCanvasNotationSprite*>(item))) { + if ((sprite = dynamic_cast<TQCanvasNotationSprite*>(item))) { return & (sprite->getNotationElement()); } } diff --git a/src/gui/editors/notation/NotationCanvasView.h b/src/gui/editors/notation/NotationCanvasView.h index 3c26ded..e327de8 100644 --- a/src/gui/editors/notation/NotationCanvasView.h +++ b/src/gui/editors/notation/NotationCanvasView.h @@ -37,8 +37,8 @@ class TQPoint; class TQPaintEvent; class TQPainter; class TQMouseEvent; -class QCanvasLineGroupable; -class QCanvasItemGroup; +class TQCanvasLineGroupable; +class TQCanvasItemGroup; class TQCanvasItem; class TQCanvas; @@ -66,10 +66,11 @@ class LinedStaffManager; class NotationCanvasView : public RosegardenCanvasView { Q_OBJECT + TQ_OBJECT public: NotationCanvasView(const LinedStaffManager &staffmgr, - TQCanvas *viewing, TQWidget *parent=0, + TQCanvas *viewing, TQWidget *tqparent=0, const char *name=0, WFlags f=0); ~NotationCanvasView(); @@ -92,7 +93,7 @@ signals: /** * Emitted when the user clicks on a TQCanvasItem which is active * - * @see QCanvasItem#setActive + * @see TQCanvasItem#setActive */ void activeItemPressed(TQMouseEvent*, TQCanvasItem* item); @@ -106,7 +107,7 @@ signals: /** * Emitted when the user clicks on a TQCanvasItem which is a - * plain QCanvasText + * plain TQCanvasText */ void textItemPressed(TQMouseEvent *, TQCanvasItem *); @@ -200,10 +201,10 @@ protected: NotationStaff *m_currentStaff; int m_currentHeight; - QCanvasItemGroup *m_heightMarker; - QCanvasLineGroupable *m_vert1; - QCanvasLineGroupable *m_vert2; - std::vector<QCanvasLineGroupable *> m_legerLines; + TQCanvasItemGroup *m_heightMarker; + TQCanvasLineGroupable *m_vert1; + TQCanvasLineGroupable *m_vert2; + std::vector<TQCanvasLineGroupable *> m_legerLines; bool m_legerLineOffset; bool m_heightTracking; diff --git a/src/gui/editors/notation/NotationChord.cpp b/src/gui/editors/notation/NotationChord.cpp index 7b0a263..297cee7 100644 --- a/src/gui/editors/notation/NotationChord.cpp +++ b/src/gui/editors/notation/NotationChord.cpp @@ -110,7 +110,7 @@ NotationChord::hasStemUp() const NotationRules rules; // believe anything found in any of the notes, if in a persistent - // property or a property apparently set by the beaming algorithm + // property or a property aptqparently set by the beaming algorithm Iterator i(getInitialNote()); diff --git a/src/gui/editors/notation/NotationElement.h b/src/gui/editors/notation/NotationElement.h index 2bb036f..6dfad3d 100644 --- a/src/gui/editors/notation/NotationElement.h +++ b/src/gui/editors/notation/NotationElement.h @@ -43,7 +43,7 @@ class Event; /** - * The Notation H and V layout is performed on a + * The Notation H and V tqlayout is performed on a * NotationElementList. Once this is done, each NotationElement is * affected a TQCanvasItem which is set at these coords. * @@ -82,7 +82,7 @@ public: * Sets the X coordinate and width of the space "underneath" * this element, i.e. the extents within which a mouse click * or some such might be considered to be interested in this - * element as opposed to any other. These are layout coords + * element as opposed to any other. These are tqlayout coords */ void setLayoutAirspace(double x, double width) { m_airX = x; m_airWidth = width; diff --git a/src/gui/editors/notation/NotationEraser.cpp b/src/gui/editors/notation/NotationEraser.cpp index 856a622..d9d5f3a 100644 --- a/src/gui/editors/notation/NotationEraser.cpp +++ b/src/gui/editors/notation/NotationEraser.cpp @@ -56,13 +56,13 @@ NotationEraser::NotationEraser(NotationView* view) "toggle_rest_collapse"); TQIconSet icon - (NotePixmapFactory::toQPixmap(NotePixmapFactory:: + (NotePixmapFactory::toTQPixmap(NotePixmapFactory:: makeToolbarPixmap("crotchet"))); new KAction(i18n("Switch to Insert Tool"), icon, 0, this, TQT_SLOT(slotInsertSelected()), actionCollection(), "insert"); - icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory:: + icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory:: makeToolbarPixmap("select"))); new KAction(i18n("Switch to Select Tool"), icon, 0, this, TQT_SLOT(slotSelectSelected()), actionCollection(), @@ -73,7 +73,7 @@ NotationEraser::NotationEraser(NotationView* view) void NotationEraser::ready() { - m_nParentView->setCanvasCursor(Qt::pointingHandCursor); + m_nParentView->setCanvasCursor(TQt::pointingHandCursor); m_nParentView->setHeightTracking(false); } @@ -106,7 +106,7 @@ void NotationEraser::slotInsertSelected() void NotationEraser::slotSelectSelected() { - m_parentView->actionCollection()->action("select")->activate(); + m_tqparentView->actionCollection()->action("select")->activate(); } const TQString NotationEraser::ToolName = "notationeraser"; diff --git a/src/gui/editors/notation/NotationEraser.h b/src/gui/editors/notation/NotationEraser.h index b13ed89..d87f21f 100644 --- a/src/gui/editors/notation/NotationEraser.h +++ b/src/gui/editors/notation/NotationEraser.h @@ -47,6 +47,7 @@ class NotationView; class NotationEraser : public NotationTool { Q_OBJECT + TQ_OBJECT friend class NotationToolBox; diff --git a/src/gui/editors/notation/NotationGroup.cpp b/src/gui/editors/notation/NotationGroup.cpp index 78525d9..caa7256 100644 --- a/src/gui/editors/notation/NotationGroup.cpp +++ b/src/gui/editors/notation/NotationGroup.cpp @@ -185,7 +185,7 @@ NotationGroup::sample(const NELIterator &i, bool goingForwards) } bool -NotationGroup::contains(const NELIterator &i) const +NotationGroup::tqcontains(const NELIterator &i) const { NELIterator j(getInitialElement()), k( getFinalElement()); diff --git a/src/gui/editors/notation/NotationGroup.h b/src/gui/editors/notation/NotationGroup.h index c7b1134..ed1b7c2 100644 --- a/src/gui/editors/notation/NotationGroup.h +++ b/src/gui/editors/notation/NotationGroup.h @@ -73,13 +73,13 @@ public: /** * Writes the BEAMED, BEAM_ABOVE, and STEM_UP properties into the - * notes in the group, as appropriate. Does not require layout x + * notes in the group, as appropriate. Does not require tqlayout x * coordinates to have been set. */ void applyStemProperties(); /** - * Writes beam data into each note in the group. Notes' layout x + * Writes beam data into each note in the group. Notes' tqlayout x * coordinates must already have been set. Does not require * applyStemProperties to have already been called. */ @@ -87,12 +87,12 @@ public: /** * Writes tupling line data into each note in the group. Notes' - * layout x coordinates must already have been set. Does nothing + * tqlayout x coordinates must already have been set. Does nothing * if this is not a tupled group. */ void applyTuplingLine(NotationStaff &); - virtual bool contains(const NELIterator &) const; + virtual bool tqcontains(const NELIterator &) const; virtual bool sample(const NELIterator &i, bool goingForwards); diff --git a/src/gui/editors/notation/NotationHLayout.cpp b/src/gui/editors/notation/NotationHLayout.cpp index 4d891a6..20b7469 100644 --- a/src/gui/editors/notation/NotationHLayout.cpp +++ b/src/gui/editors/notation/NotationHLayout.cpp @@ -58,8 +58,8 @@ using namespace BaseProperties; NotationHLayout::NotationHLayout(Composition *c, NotePixmapFactory *npf, const NotationProperties &properties, - TQObject* parent, const char* name) : - ProgressReporter(parent, name), + TQObject* tqparent, const char* name) : + ProgressReporter(tqparent, name), HorizontalLayoutEngine(c), m_totalWidth(0.), m_pageMode(false), @@ -324,7 +324,7 @@ NotationHLayout::scanStaff(Staff &staff, timeT startTime, timeT endTime) setBarBasicData(staff, barNo, from, barCorrect, timeSignature, newTimeSig); BarDataList::iterator bdli(barList.find(barNo)); - bdli->second.layoutData.needsLayout = true; + bdli->second.tqlayoutData.needsLayout = true; ChunkList &chunks = bdli->second.chunks; chunks.clear(); @@ -655,10 +655,10 @@ NotationHLayout::scanChord(NotationElementList *notes, extraWidth += e; } - float layoutExtra = 0; + float tqlayoutExtra = 0; if (chord.hasNoteHeadShifted()) { if (chord.hasStemUp()) { - layoutExtra += npf->getNoteBodyWidth(); + tqlayoutExtra += npf->getNoteBodyWidth(); } else { extraWidth = std::max(extraWidth, float(npf->getNoteBodyWidth())); } @@ -686,13 +686,13 @@ NotationHLayout::scanChord(NotationElementList *notes, if (grace) { chunks.push_back(Chunk(d, chord.getSubOrdering(), - extraWidth + layoutExtra + extraWidth + tqlayoutExtra + getLayoutWidth(**myLongest, npf, key) - npf->getNoteBodyWidth(), // tighten up 0)); } else { chunks.push_back(Chunk(d, 0, extraWidth, - std::max(layoutExtra + + std::max(tqlayoutExtra + getLayoutWidth(**myLongest, npf, key), lyricWidth))); lyricWidth = 0; @@ -847,7 +847,7 @@ NotationHLayout::preSquishBar(int barNo) bdli->second.sizeData.reconciledWidth = bdli->second.sizeData.idealWidth; - bdli->second.layoutData.needsLayout = true; + bdli->second.tqlayoutData.needsLayout = true; } } } @@ -987,7 +987,7 @@ NotationHLayout::reconcileBarsLinear() double diff = maxWidth - bd.reconciledWidth; if (diff < -0.1 || diff > 0.1) { NOTATION_DEBUG << "(So needsLayout becomes true)" << endl; - bdli->second.layoutData.needsLayout = true; + bdli->second.tqlayoutData.needsLayout = true; } bd.reconciledWidth = maxWidth; } @@ -1181,7 +1181,7 @@ NotationHLayout::reconcileBarsPage() BarData::SizeData &bd(bdli->second.sizeData); double diff = maxWidth - bd.reconciledWidth; if (diff < -0.1 || diff > 0.1) { - bdli->second.layoutData.needsLayout = true; + bdli->second.tqlayoutData.needsLayout = true; } bd.reconciledWidth = maxWidth; } @@ -1230,15 +1230,15 @@ NotationHLayout::finishLayout(timeT startTime, timeT endTime) m_timePerProgressIncrement = timeCovered / (100 / m_barData.size()); - layout(i, startTime, endTime); + tqlayout(i, startTime, endTime); ++staffNo; } } void -NotationHLayout::layout(BarDataMap::iterator i, timeT startTime, timeT endTime) +NotationHLayout::tqlayout(BarDataMap::iterator i, timeT startTime, timeT endTime) { - Profiler profiler("NotationHLayout::layout"); + Profiler profiler("NotationHLayout::tqlayout"); Staff &staff = *(i->first); NotationElementList *notes = staff.getViewElementList(); @@ -1247,11 +1247,11 @@ NotationHLayout::layout(BarDataMap::iterator i, timeT startTime, timeT endTime) bool isFullLayout = (startTime == endTime); - // these two are for partial layouts: + // these two are for partial tqlayouts: // bool haveSimpleOffset = false; // double simpleOffset = 0; - NOTATION_DEBUG << "NotationHLayout::layout: full layout " << isFullLayout << ", times " << startTime << "->" << endTime << endl; + NOTATION_DEBUG << "NotationHLayout::tqlayout: full tqlayout " << isFullLayout << ", times " << startTime << "->" << endTime << endl; double x = 0, barX = 0; TieMap tieMap; @@ -1287,7 +1287,7 @@ NotationHLayout::layout(BarDataMap::iterator i, timeT startTime, timeT endTime) NotationElementList::iterator from = bdi->second.basicData.start; NotationElementList::iterator to; - NOTATION_DEBUG << "NotationHLayout::layout(): starting bar " << barNo << ", x = " << barX << ", width = " << bdi->second.sizeData.idealWidth << ", time = " << (from == notes->end() ? -1 : (*from)->getViewAbsoluteTime()) << endl; + NOTATION_DEBUG << "NotationHLayout::tqlayout(): starting bar " << barNo << ", x = " << barX << ", width = " << bdi->second.sizeData.idealWidth << ", time = " << (from == notes->end() ? -1 : (*from)->getViewAbsoluteTime()) << endl; BarDataList::iterator nbdi(bdi); if (++nbdi == barList.end()) { @@ -1303,27 +1303,27 @@ NotationHLayout::layout(BarDataMap::iterator i, timeT startTime, timeT endTime) NOTATION_DEBUG << "Start is to" << endl; } - if (!bdi->second.layoutData.needsLayout) { + if (!bdi->second.tqlayoutData.needsLayout) { - double offset = barX - bdi->second.layoutData.x; + double offset = barX - bdi->second.tqlayoutData.x; - NOTATION_DEBUG << "NotationHLayout::layout(): bar " << barNo << " has needsLayout false and offset of " << offset << endl; + NOTATION_DEBUG << "NotationHLayout::tqlayout(): bar " << barNo << " has needsLayout false and offset of " << offset << endl; if (offset > -0.1 && offset < 0.1) { - NOTATION_DEBUG << "NotationHLayout::layout(): no offset, ignoring" << endl; + NOTATION_DEBUG << "NotationHLayout::tqlayout(): no offset, ignoring" << endl; continue; } - bdi->second.layoutData.x += offset; + bdi->second.tqlayoutData.x += offset; if (bdi->second.basicData.newTimeSig) - bdi->second.layoutData.timeSigX += (int)offset; + bdi->second.tqlayoutData.timeSigX += (int)offset; for (NotationElementList::iterator it = from; it != to && it != notes->end(); ++it) { NotationElement* nel = static_cast<NotationElement*>(*it); - NOTATION_DEBUG << "NotationHLayout::layout(): shifting element's x to " << ((*it)->getLayoutX() + offset) << " (was " << (*it)->getLayoutX() << ")" << endl; + NOTATION_DEBUG << "NotationHLayout::tqlayout(): shifting element's x to " << ((*it)->getLayoutX() + offset) << " (was " << (*it)->getLayoutX() << ")" << endl; nel->setLayoutX((*it)->getLayoutX() + offset); double airX, airWidth; nel->getLayoutAirspace(airX, airWidth); @@ -1333,7 +1333,7 @@ NotationHLayout::layout(BarDataMap::iterator i, timeT startTime, timeT endTime) continue; } - bdi->second.layoutData.x = barX; + bdi->second.tqlayoutData.x = barX; // x = barX + getPostBarMargin(); bool timeSigToPlace = false; @@ -1342,7 +1342,7 @@ NotationHLayout::layout(BarDataMap::iterator i, timeT startTime, timeT endTime) timeSigToPlace = !bdi->second.basicData.timeSignature.isHidden(); } if (timeSigToPlace) { - NOTATION_DEBUG << "NotationHLayout::layout(): there's a time sig in this bar" << endl; + NOTATION_DEBUG << "NotationHLayout::tqlayout(): there's a time sig in this bar" << endl; } bool repeatClefAndKey = false; @@ -1350,7 +1350,7 @@ NotationHLayout::layout(BarDataMap::iterator i, timeT startTime, timeT endTime) repeatClefAndKey = true; } if (repeatClefAndKey) { - NOTATION_DEBUG << "NotationHLayout::layout(): need to repeat clef & key in this bar" << endl; + NOTATION_DEBUG << "NotationHLayout::tqlayout(): need to repeat clef & key in this bar" << endl; } double barInset = notationStaff.getBarInset(barNo, repeatClefAndKey); @@ -1446,9 +1446,9 @@ NotationHLayout::layout(BarDataMap::iterator i, timeT startTime, timeT endTime) } // NOTATION_DEBUG << "Placing timesig at " << (x - fixed) << endl; -// bdi->second.layoutData.timeSigX = (int)(x - fixed); +// bdi->second.tqlayoutData.timeSigX = (int)(x - fixed); NOTATION_DEBUG << "Placing timesig at " << sigx << " (would previously have been " << int(x-fixed) << "?)" << endl; - bdi->second.layoutData.timeSigX = (int)sigx; + bdi->second.tqlayoutData.timeSigX = (int)sigx; double shift = getFixedItemSpacing() + m_npf->getTimeSigWidth(timeSignature); offset += shift; @@ -1467,7 +1467,7 @@ NotationHLayout::layout(BarDataMap::iterator i, timeT startTime, timeT endTime) } } - NOTATION_DEBUG << "NotationHLayout::layout(): setting element's x to " << x << " (was " << el->getLayoutX() << ")" << endl; + NOTATION_DEBUG << "NotationHLayout::tqlayout(): setting element's x to " << x << " (was " << el->getLayoutX() << ")" << endl; double displacedX = 0.0; long dxRaw = 0; @@ -1571,7 +1571,7 @@ NotationHLayout::layout(BarDataMap::iterator i, timeT startTime, timeT endTime) // no other events in this bar, so we never managed to place it x = barX + offset; NOTATION_DEBUG << "Placing timesig reluctantly at " << x << endl; - bdi->second.layoutData.timeSigX = (int)(x); + bdi->second.tqlayoutData.timeSigX = (int)(x); timeSigToPlace = false; } @@ -1583,7 +1583,7 @@ NotationHLayout::layout(BarDataMap::iterator i, timeT startTime, timeT endTime) } m_groupsExtant.clear(); - bdi->second.layoutData.needsLayout = false; + bdi->second.tqlayoutData.needsLayout = false; } } @@ -1653,7 +1653,7 @@ NotationHLayout::getSpacingDuration(Staff &staff, if (d > 0 && (*i)->event()->getDuration() == 0) return d; // grace note NotationElementList::iterator j(i), e(staff.getViewElementList()->end()); - while (j != e && (chord.contains(j) || (*j)->getViewDuration() == 0)) + while (j != e && (chord.tqcontains(j) || (*j)->getViewDuration() == 0)) ++j; if (j != e) { @@ -1692,7 +1692,7 @@ NotationHLayout::positionChord(Staff &staff, barEndsInChord = true; // #704958 (multiple tuplet spanners created when entering - // triplet chord) -- layout() updates the beamed group data + // triplet chord) -- tqlayout() updates the beamed group data // for non-notes, but we have to do it for notes so as to // ensure every note in the chord is accounted for sampleGroupElement(staff, clef, key, citr); @@ -2024,7 +2024,7 @@ bool NotationHLayout::getTimeSignaturePosition(Staff &staff, BarDataList::iterator bdli(bdl.find(i)); if (bdli != bdl.end()) { timeSig = bdli->second.basicData.timeSignature; - timeSigX = (double)(bdli->second.layoutData.timeSigX); + timeSigX = (double)(bdli->second.tqlayoutData.timeSigX); return bdli->second.basicData.newTimeSig; } else return 0; diff --git a/src/gui/editors/notation/NotationHLayout.h b/src/gui/editors/notation/NotationHLayout.h index 878dc17..59a666b 100644 --- a/src/gui/editors/notation/NotationHLayout.h +++ b/src/gui/editors/notation/NotationHLayout.h @@ -56,7 +56,7 @@ class AccidentalTable; /** - * Horizontal notation layout + * Horizontal notation tqlayout * * computes the X coordinates of notation elements */ @@ -68,7 +68,7 @@ public: NotationHLayout(Composition *c, NotePixmapFactory *npf, const NotationProperties &properties, - TQObject* parent, const char* name = 0); + TQObject* tqparent, const char* name = 0); virtual ~NotationHLayout(); @@ -77,9 +77,9 @@ public: } /** - * Precomputes layout data for a single staff. The resulting data + * Precomputes tqlayout data for a single staff. The resulting data * is stored in the BarDataMap, keyed from the staff reference; - * the entire map is then used by reconcileBars() and layout(). + * the entire map is then used by reconcileBars() and tqlayout(). * The map should be cleared (by calling reset()) before a full * set of staffs is preparsed. */ @@ -167,7 +167,7 @@ public: static std::vector<int> getAvailableProportions(); /** - * Returns the total length of all elements once layout is done + * Returns the total length of all elements once tqlayout is done * This is the x-coord of the end of the last element on the longest * staff, plus the space allocated to that element */ @@ -211,7 +211,7 @@ public: * Returns the X coord corresponding to the given time value. * This RulerScale method works by interpolating between bar lines * (the inverse of the way getTimeForX works), and should be used - * for any rulers associated with the layout. + * for any rulers associated with the tqlayout. */ virtual double getXForTime(timeT time) const; @@ -286,12 +286,12 @@ protected: } sizeData; struct LayoutData - { // slots either assumed, or only known at layout time + { // slots either assumed, or only known at tqlayout time bool needsLayout; double x; // coordinate for display of barline int timeSigX; - } layoutData; + } tqlayoutData; BarData(NotationElementList::iterator i, bool correct, TimeSignature timeSig, bool newTimeSig) { @@ -304,9 +304,9 @@ protected: sizeData.fixedWidth = 0; sizeData.clefKeyWidth = 0; sizeData.actualDuration = 0; - layoutData.needsLayout = true; - layoutData.x = -1; - layoutData.timeSigX = -1; + tqlayoutData.needsLayout = true; + tqlayoutData.x = -1; + tqlayoutData.timeSigX = -1; } }; @@ -360,7 +360,7 @@ protected: /// Tries to harmonize the bar positions for all the staves (page mode) void reconcileBarsPage(); - void layout(BarDataMap::iterator, + void tqlayout(BarDataMap::iterator, timeT startTime, timeT endTime); diff --git a/src/gui/editors/notation/NotationSelectionPaster.cpp b/src/gui/editors/notation/NotationSelectionPaster.cpp index 96d894c..b1f8d4b 100644 --- a/src/gui/editors/notation/NotationSelectionPaster.cpp +++ b/src/gui/editors/notation/NotationSelectionPaster.cpp @@ -46,7 +46,7 @@ NotationSelectionPaster::NotationSelectionPaster(EventSelection& es, : NotationTool("NotationPaster", view), m_selection(es) { - m_nParentView->setCanvasCursor(Qt::crossCursor); + m_nParentView->setCanvasCursor(TQt::crossCursor); } NotationSelectionPaster::~NotationSelectionPaster() @@ -75,14 +75,14 @@ void NotationSelectionPaster::handleLeftButtonPress(timeT, Segment& segment = staff->getSegment(); PasteEventsCommand *command = new PasteEventsCommand - (segment, m_parentView->getDocument()->getClipboard(), time, + (segment, m_tqparentView->getDocument()->getClipboard(), time, PasteEventsCommand::Restricted); if (!command->isPossible()) { - m_parentView->slotStatusHelpMsg(i18n("Couldn't paste at this point")); + m_tqparentView->slotStatusHelpMsg(i18n("Couldn't paste at this point")); } else { - m_parentView->addCommandToHistory(command); - m_parentView->slotStatusHelpMsg(i18n("Ready.")); + m_tqparentView->addCommandToHistory(command); + m_tqparentView->slotStatusHelpMsg(i18n("Ready.")); } } diff --git a/src/gui/editors/notation/NotationSelector.cpp b/src/gui/editors/notation/NotationSelector.cpp index 2a28545..3b5eda2 100644 --- a/src/gui/editors/notation/NotationSelector.cpp +++ b/src/gui/editors/notation/NotationSelector.cpp @@ -71,14 +71,14 @@ NotationSelector::NotationSelector(NotationView* view) m_justSelectedBar(false), m_wholeStaffSelectionComplete(false) { - connect(m_parentView, TQT_SIGNAL(usedSelection()), + connect(m_tqparentView, TQT_SIGNAL(usedSelection()), this, TQT_SLOT(slotHideSelection())); connect(this, TQT_SIGNAL(editElement(NotationStaff *, NotationElement *, bool)), - m_parentView, TQT_SLOT(slotEditElement(NotationStaff *, NotationElement *, bool))); + m_tqparentView, TQT_SLOT(slotEditElement(NotationStaff *, NotationElement *, bool))); TQIconSet icon - (NotePixmapFactory::toQPixmap(NotePixmapFactory:: + (NotePixmapFactory::toTQPixmap(NotePixmapFactory:: makeToolbarPixmap("crotchet"))); new KToggleAction(i18n("Switch to Insert Tool"), icon, 0, this, TQT_SLOT(slotInsertSelected()), actionCollection(), @@ -188,7 +188,7 @@ void NotationSelector::handleLeftButtonPress(timeT t, m_updateRect = true; m_startedFineDrag = false; - //m_parentView->setCursorPosition(p.x()); + //m_tqparentView->setCursorPosition(p.x()); } void NotationSelector::handleRightButtonPress(timeT t, @@ -327,7 +327,7 @@ int NotationSelector::handleMouseMove(timeT, int, } else { - // Qt rectangle dimensions appear to be 1-based + // TQt rectangle dimensions appear to be 1-based if (w > 0) ++w; else @@ -375,7 +375,7 @@ void NotationSelector::handleMouseRelease(timeT, int, TQMouseEvent *e) // if the event was already part of the selection, we want to // remove it - if (m_selectionToMerge->contains(m_clickedElement->event())) { + if (m_selectionToMerge->tqcontains(m_clickedElement->event())) { m_selectionToMerge->removeEvent(m_clickedElement->event()); } else { m_selectionToMerge->addEvent(m_clickedElement->event()); @@ -431,7 +431,7 @@ void NotationSelector::drag(int x, int y, bool final) return ; EventSelection *selection = m_nParentView->getCurrentSelection(); - if (!selection || !selection->contains(m_clickedElement->event())) { + if (!selection || !selection->tqcontains(m_clickedElement->event())) { selection = new EventSelection(m_selectedStaff->getSegment()); selection->addEvent(m_clickedElement->event()); } @@ -460,7 +460,7 @@ void NotationSelector::drag(int x, int y, bool final) ::Rosegarden::Key key; timeT dragTime = clickedTime; - double layoutX = m_clickedElement->getLayoutX(); + double tqlayoutX = m_clickedElement->getLayoutX(); timeT duration = m_clickedElement->getViewDuration(); NotationElementList::iterator itr = @@ -470,7 +470,7 @@ void NotationSelector::drag(int x, int y, bool final) NotationElement *elt = dynamic_cast<NotationElement *>(*itr); dragTime = elt->getViewAbsoluteTime(); - layoutX = elt->getLayoutX(); + tqlayoutX = elt->getLayoutX(); if (elt->isRest() && duration > 0 && elt->getCanvasItem()) { @@ -490,7 +490,7 @@ void NotationSelector::drag(int x, int y, bool final) part = parts - 1; dragTime += part * restDuration / parts; - layoutX += part * restWidth / parts + + tqlayoutX += part * restWidth / parts + (restX - elt->getCanvasX()); } } @@ -532,7 +532,7 @@ void NotationSelector::drag(int x, int y, bool final) m_clickedElement->isNote()) { m_nParentView->showPreviewNote(targetStaff->getId(), - layoutX, pitch, height, + tqlayoutX, pitch, height, Note::getNearestNote(duration), m_clickedElement->isGrace()); m_lastDragPitch = pitch; @@ -614,7 +614,7 @@ void NotationSelector::dragFine(int x, int y, bool final) EventSelection *selection = m_nParentView->getCurrentSelection(); if (!selection) selection = new EventSelection(m_selectedStaff->getSegment()); - if (!selection->contains(m_clickedElement->event())) + if (!selection->tqcontains(m_clickedElement->event())) selection->addEvent(m_clickedElement->event()); m_nParentView->setCurrentSelection(selection); @@ -711,7 +711,7 @@ void NotationSelector::ready() m_selectionRect->hide(); m_selectionRect->setPen(GUIPalette::getColour(GUIPalette::SelectionRectangle)); - m_nParentView->setCanvasCursor(Qt::arrowCursor); + m_nParentView->setCanvasCursor(TQt::arrowCursor); m_nParentView->setHeightTracking(false); } @@ -738,57 +738,57 @@ void NotationSelector::slotInsertSelected() void NotationSelector::slotEraseSelected() { - m_parentView->actionCollection()->action("erase")->activate(); + m_tqparentView->actionCollection()->action("erase")->activate(); } void NotationSelector::slotCollapseRestsHard() { - m_parentView->actionCollection()->action("collapse_rests_aggressively")->activate(); + m_tqparentView->actionCollection()->action("collapse_rests_aggressively")->activate(); } void NotationSelector::slotRespellFlat() { - m_parentView->actionCollection()->action("respell_flat")->activate(); + m_tqparentView->actionCollection()->action("respell_flat")->activate(); } void NotationSelector::slotRespellSharp() { - m_parentView->actionCollection()->action("respell_sharp")->activate(); + m_tqparentView->actionCollection()->action("respell_sharp")->activate(); } void NotationSelector::slotRespellNatural() { - m_parentView->actionCollection()->action("respell_natural")->activate(); + m_tqparentView->actionCollection()->action("respell_natural")->activate(); } void NotationSelector::slotCollapseNotes() { - m_parentView->actionCollection()->action("collapse_notes")->activate(); + m_tqparentView->actionCollection()->action("collapse_notes")->activate(); } void NotationSelector::slotInterpret() { - m_parentView->actionCollection()->action("interpret")->activate(); + m_tqparentView->actionCollection()->action("interpret")->activate(); } void NotationSelector::slotStaffAbove() { - m_parentView->actionCollection()->action("move_events_up_staff")->activate(); + m_tqparentView->actionCollection()->action("move_events_up_staff")->activate(); } void NotationSelector::slotStaffBelow() { - m_parentView->actionCollection()->action("move_events_down_staff")->activate(); + m_tqparentView->actionCollection()->action("move_events_down_staff")->activate(); } void NotationSelector::slotMakeInvisible() { - m_parentView->actionCollection()->action("make_invisible")->activate(); + m_tqparentView->actionCollection()->action("make_invisible")->activate(); } void NotationSelector::slotMakeVisible() { - m_parentView->actionCollection()->action("make_visible")->activate(); + m_tqparentView->actionCollection()->action("make_visible")->activate(); } void NotationSelector::setViewCurrentSelection(bool preview) @@ -838,7 +838,7 @@ EventSelection* NotationSelector::getSelection() TQCanvasItemList::Iterator it; TQRect rect = m_selectionRect->rect().normalize(); - QCanvasNotationSprite *sprite = 0; + TQCanvasNotationSprite *sprite = 0; if (!m_selectedStaff) { @@ -850,7 +850,7 @@ EventSelection* NotationSelector::getSelection() for (it = itemList.begin(); it != itemList.end(); ++it) { - if ((sprite = dynamic_cast<QCanvasNotationSprite*>(*it))) { + if ((sprite = dynamic_cast<TQCanvasNotationSprite*>(*it))) { NotationElement &el = sprite->getNotationElement(); @@ -870,11 +870,11 @@ EventSelection* NotationSelector::getSelection() x += nbw; } - if (!rect.contains(x, int((*it)->y()), true)) { + if (!rect.tqcontains(x, int((*it)->y()), true)) { // #988217 (Notation: Special column of pixels // prevents sweep selection) -- for notes, test // again with centred x-coord - if (!el.isNote() || !rect.contains(x + nbw/2, int((*it)->y()), true)) { + if (!el.isNote() || !rect.tqcontains(x + nbw/2, int((*it)->y()), true)) { continue; } } @@ -906,7 +906,7 @@ EventSelection* NotationSelector::getSelection() for (it = itemList.begin(); it != itemList.end(); ++it) { - if ((sprite = dynamic_cast<QCanvasNotationSprite*>(*it))) { + if ((sprite = dynamic_cast<TQCanvasNotationSprite*>(*it))) { NotationElement &el = sprite->getNotationElement(); @@ -925,11 +925,11 @@ EventSelection* NotationSelector::getSelection() // check if the element's rect // is actually included in the selection rect. // - if (!rect.contains(x, int((*it)->y()), true)) { + if (!rect.tqcontains(x, int((*it)->y()), true)) { // #988217 (Notation: Special column of pixels // prevents sweep selection) -- for notes, test again // with centred x-coord - if (!el.isNote() || !rect.contains(x + nbw/2, int((*it)->y()), true)) { + if (!el.isNote() || !rect.tqcontains(x + nbw/2, int((*it)->y()), true)) { continue; } } diff --git a/src/gui/editors/notation/NotationSelector.h b/src/gui/editors/notation/NotationSelector.h index 6f9494a..f865cb7 100644 --- a/src/gui/editors/notation/NotationSelector.h +++ b/src/gui/editors/notation/NotationSelector.h @@ -54,6 +54,7 @@ class Event; class NotationSelector : public NotationTool { Q_OBJECT + TQ_OBJECT friend class NotationToolBox; @@ -96,7 +97,7 @@ public: /** * Create the selection rect * - * We need this because NotationView deletes all QCanvasItems + * We need this because NotationView deletes all TQCanvasItems * along with it. This happens before the NotationSelector is * deleted, so we can't delete the selection rect in * ~NotationSelector because that leads to double deletion. @@ -159,7 +160,7 @@ protected: NotationSelector(NotationView*); /** - * Set the current selection on the parent NotationView + * Set the current selection on the tqparent NotationView */ void setViewCurrentSelection(bool preview); diff --git a/src/gui/editors/notation/NotationStaff.cpp b/src/gui/editors/notation/NotationStaff.cpp index 717e418..1b875f3 100644 --- a/src/gui/editors/notation/NotationStaff.cpp +++ b/src/gui/editors/notation/NotationStaff.cpp @@ -141,7 +141,7 @@ NotationStaff::changeFont(std::string fontName, int size) } void -NotationStaff::insertTimeSignature(double layoutX, +NotationStaff::insertTimeSignature(double tqlayoutX, const TimeSignature &timeSig) { if (timeSig.isHidden()) @@ -149,11 +149,11 @@ NotationStaff::insertTimeSignature(double layoutX, m_notePixmapFactory->setSelected(false); TQCanvasPixmap *pixmap = m_notePixmapFactory->makeTimeSigPixmap(timeSig); - QCanvasTimeSigSprite *sprite = - new QCanvasTimeSigSprite(layoutX, pixmap, m_canvas); + TQCanvasTimeSigSprite *sprite = + new TQCanvasTimeSigSprite(tqlayoutX, pixmap, m_canvas); LinedStaffCoords sigCoords = - getCanvasCoordsForLayoutCoords(layoutX, getLayoutYForHeight(4)); + getCanvasCoordsForLayoutCoords(tqlayoutX, getLayoutYForHeight(4)); sprite->move(sigCoords.first, (double)sigCoords.second); sprite->show(); @@ -174,7 +174,7 @@ NotationStaff::deleteTimeSignatures() } void -NotationStaff::insertRepeatedClefAndKey(double layoutX, int barNo) +NotationStaff::insertRepeatedClefAndKey(double tqlayoutX, int barNo) { bool needClef = false, needKey = false; timeT t; @@ -196,15 +196,15 @@ NotationStaff::insertRepeatedClefAndKey(double layoutX, int barNo) if (needClef) { - int layoutY = getLayoutYForHeight(clef.getAxisHeight()); + int tqlayoutY = getLayoutYForHeight(clef.getAxisHeight()); LinedStaffCoords coords = - getCanvasCoordsForLayoutCoords(layoutX + dx, layoutY); + getCanvasCoordsForLayoutCoords(tqlayoutX + dx, tqlayoutY); TQCanvasPixmap *pixmap = m_notePixmapFactory->makeClefPixmap(clef); - QCanvasNonElementSprite *sprite = - new QCanvasNonElementSprite(pixmap, m_canvas); + TQCanvasNonElementSprite *sprite = + new TQCanvasNonElementSprite(pixmap, m_canvas); sprite->move(coords.first, coords.second); sprite->show(); @@ -215,15 +215,15 @@ NotationStaff::insertRepeatedClefAndKey(double layoutX, int barNo) if (needKey) { - int layoutY = getLayoutYForHeight(12); + int tqlayoutY = getLayoutYForHeight(12); LinedStaffCoords coords = - getCanvasCoordsForLayoutCoords(layoutX + dx, layoutY); + getCanvasCoordsForLayoutCoords(tqlayoutX + dx, tqlayoutY); TQCanvasPixmap *pixmap = m_notePixmapFactory->makeKeyPixmap(key, clef); - QCanvasNonElementSprite *sprite = - new QCanvasNonElementSprite(pixmap, m_canvas); + TQCanvasNonElementSprite *sprite = + new TQCanvasNonElementSprite(pixmap, m_canvas); sprite->move(coords.first, coords.second); sprite->show(); @@ -236,16 +236,16 @@ NotationStaff::insertRepeatedClefAndKey(double layoutX, int barNo) if (m_notationView->isInPrintMode() && (needClef || needKey)) { - int layoutY = getLayoutYForHeight(14); - int h = getLayoutYForHeight(-8) - layoutY; + int tqlayoutY = getLayoutYForHeight(14); + int h = getLayoutYForHeight(-8) - tqlayoutY; LinedStaffCoords coords = - getCanvasCoordsForLayoutCoords(layoutX, layoutY); + getCanvasCoordsForLayoutCoords(tqlayoutX, tqlayoutY); TQCanvasRectangle *rect = new TQCanvasRectangle(coords.first, coords.second, dx, h, m_canvas); - rect->setPen(Qt::black); - rect->setBrush(Qt::white); + rect->setPen(TQt::black); + rect->setBrush(TQt::white); rect->setZ(1); rect->show(); @@ -282,8 +282,8 @@ NotationStaff::drawStaffName() m_staffName = new QCanvasStaffNameSprite(map, m_canvas); - int layoutY = getLayoutYForHeight(3); - LinedStaffCoords coords = getCanvasCoordsForLayoutCoords(0, layoutY); + int tqlayoutY = getLayoutYForHeight(3); + LinedStaffCoords coords = getCanvasCoordsForLayoutCoords(0, tqlayoutY); m_staffName->move(getX() + getMargin() + m_notePixmapFactory->getNoteBodyWidth(), coords.second - map->height() / 2); m_staffName->show(); @@ -300,9 +300,9 @@ NotationStaff::isStaffNameUpToDate() timeT NotationStaff::getTimeAtCanvasCoords(double cx, int cy) const { - LinedStaffCoords layoutCoords = getLayoutCoordsForCanvasCoords(cx, cy); + LinedStaffCoords tqlayoutCoords = getLayoutCoordsForCanvasCoords(cx, cy); RulerScale * rs = m_notationView->getHLayout(); - return rs->getTimeForX(layoutCoords.first); + return rs->getTimeForX(tqlayoutCoords.first); } void @@ -310,17 +310,17 @@ NotationStaff::getClefAndKeyAtCanvasCoords(double cx, int cy, Clef &clef, ::Rosegarden::Key &key) const { - LinedStaffCoords layoutCoords = getLayoutCoordsForCanvasCoords(cx, cy); + LinedStaffCoords tqlayoutCoords = getLayoutCoordsForCanvasCoords(cx, cy); int i; for (i = 0; i < m_clefChanges.size(); ++i) { - if (m_clefChanges[i].first > layoutCoords.first) + if (m_clefChanges[i].first > tqlayoutCoords.first) break; clef = m_clefChanges[i].second; } for (i = 0; i < m_keyChanges.size(); ++i) { - if (m_keyChanges[i].first > layoutCoords.first) + if (m_keyChanges[i].first > tqlayoutCoords.first) break; key = m_keyChanges[i].second; } @@ -379,7 +379,7 @@ NotationStaff::getClosestElementToLayoutX(double x, return notes->end(); } - NOTATION_DEBUG << "NotationStaff::getClosestElementToLayoutX: found element at layout " << (*result)->getLayoutX() << " - we're at layout " << x << endl; + NOTATION_DEBUG << "NotationStaff::getClosestElementToLayoutX: found element at tqlayout " << (*result)->getLayoutX() << " - we're at tqlayout " << x << endl; PRINT_ELAPSED("NotationStaff::getClosestElementToLayoutX"); @@ -449,7 +449,7 @@ NotationStaff::renderElements(NotationElementList::iterator from, // NOTATION_DEBUG << "NotationStaff " << this << "::renderElements()" << endl; Profiler profiler("NotationStaff::renderElements"); - emit setOperationName(i18n("Rendering staff %1...").arg(getId() + 1)); + emit setOperationName(i18n("Rendering staff %1...").tqarg(getId() + 1)); emit setProgress(0); throwIfCancelled(); @@ -512,7 +512,7 @@ NotationStaff::renderPrintable(timeT from, timeT to) Profiler profiler("NotationStaff::renderElements"); - emit setOperationName(i18n("Rendering notes on staff %1...").arg(getId() + 1)); + emit setOperationName(i18n("Rendering notes on staff %1...").tqarg(getId() + 1)); emit setProgress(0); throwIfCancelled(); @@ -580,7 +580,7 @@ NotationStaff::positionElements(timeT from, timeT to) if (to < startTime) to = startTime; if (to == from) return; - emit setOperationName(i18n("Positioning staff %1...").arg(getId() + 1)); + emit setOperationName(i18n("Positioning staff %1...").tqarg(getId() + 1)); emit setProgress(0); throwIfCancelled(); @@ -1395,15 +1395,15 @@ void NotationStaff::setPixmap(NotationElement *elt, TQCanvasPixmap *pixmap, int z, FitPolicy policy) { - double layoutX = elt->getLayoutX(); - int layoutY = (int)elt->getLayoutY(); + double tqlayoutX = elt->getLayoutX(); + int tqlayoutY = (int)elt->getLayoutY(); elt->removeCanvasItem(); while (1) { LinedStaffCoords coords = - getCanvasCoordsForLayoutCoords(layoutX, layoutY); + getCanvasCoordsForLayoutCoords(tqlayoutX, tqlayoutY); double canvasX = coords.first; int canvasY = coords.second; @@ -1412,11 +1412,11 @@ NotationStaff::setPixmap(NotationElement *elt, TQCanvasPixmap *pixmap, int z, if (m_pageMode == LinearMode || policy == PretendItFittedAllAlong) { - item = new QCanvasNotationSprite(*elt, pixmap, m_canvas); + item = new TQCanvasNotationSprite(*elt, pixmap, m_canvas); } else { - int row = getRowForLayoutX(layoutX); + int row = getRowForLayoutX(tqlayoutX); double rightMargin = getCanvasXForRightOfRow(row); double extent = canvasX + pixmap->width(); @@ -1432,13 +1432,13 @@ NotationStaff::setPixmap(NotationElement *elt, TQCanvasPixmap *pixmap, int z, PixmapFunctions::splitPixmap(*pixmap, int(rightMargin - canvasX)); - TQCanvasPixmap *leftCanvasPixmap = new QCanvasPixmap + TQCanvasPixmap *leftCanvasPixmap = new TQCanvasPixmap (split.first, TQPoint(pixmap->offsetX(), pixmap->offsetY())); - TQCanvasPixmap *rightCanvasPixmap = new QCanvasPixmap + TQCanvasPixmap *rightCanvasPixmap = new TQCanvasPixmap (split.second, TQPoint(0, pixmap->offsetY())); - item = new QCanvasNotationSprite(*elt, leftCanvasPixmap, m_canvas); + item = new TQCanvasNotationSprite(*elt, leftCanvasPixmap, m_canvas); item->setZ(z); if (elt->getCanvasItem()) { @@ -1452,19 +1452,19 @@ NotationStaff::setPixmap(NotationElement *elt, TQCanvasPixmap *pixmap, int z, delete pixmap; pixmap = rightCanvasPixmap; - layoutX += rightMargin - canvasX + 0.01; // ensure flip to next row + tqlayoutX += rightMargin - canvasX + 0.01; // ensure flip to next row continue; } else { // policy == MoveBackToFit - item = new QCanvasNotationSprite(*elt, pixmap, m_canvas); + item = new TQCanvasNotationSprite(*elt, pixmap, m_canvas); elt->setLayoutX(elt->getLayoutX() - (extent - rightMargin)); - coords = getCanvasCoordsForLayoutCoords(layoutX, layoutY); + coords = getCanvasCoordsForLayoutCoords(tqlayoutX, tqlayoutY); canvasX = coords.first; } } else { - item = new QCanvasNotationSprite(*elt, pixmap, m_canvas); + item = new TQCanvasNotationSprite(*elt, pixmap, m_canvas); } } @@ -1742,7 +1742,7 @@ NotationStaff::renderNote(ViewElementList::iterator &vli) if (collision) { // Make collision halo TQCanvasPixmap *haloPixmap = factory->makeNoteHaloPixmap(params); - haloItem = new QCanvasNotationSprite(*elt, haloPixmap, m_canvas); + haloItem = new TQCanvasNotationSprite(*elt, haloPixmap, m_canvas); haloItem->setZ(-1); } } @@ -1819,11 +1819,11 @@ NotationStaff::isSelected(NotationElementList::iterator it) { const EventSelection *selection = m_notationView->getCurrentSelection(); - return selection && selection->contains((*it)->event()); + return selection && selection->tqcontains((*it)->event()); } void -NotationStaff::showPreviewNote(double layoutX, int heightOnStaff, +NotationStaff::showPreviewNote(double tqlayoutX, int heightOnStaff, const Note ¬e, bool grace) { NotePixmapFactory *npf = m_notePixmapFactory; @@ -1851,8 +1851,8 @@ NotationStaff::showPreviewNote(double layoutX, int heightOnStaff, m_previewSprite = new QCanvasSimpleSprite (npf->makeNotePixmap(params), m_canvas); - int layoutY = getLayoutYForHeight(heightOnStaff); - LinedStaffCoords coords = getCanvasCoordsForLayoutCoords(layoutX, layoutY); + int tqlayoutY = getLayoutYForHeight(heightOnStaff); + LinedStaffCoords coords = getCanvasCoordsForLayoutCoords(tqlayoutX, tqlayoutY); m_previewSprite->move(coords.first, (double)coords.second); m_previewSprite->setZ(4); diff --git a/src/gui/editors/notation/NotationStaff.h b/src/gui/editors/notation/NotationStaff.h index f58e77d..b941ac0 100644 --- a/src/gui/editors/notation/NotationStaff.h +++ b/src/gui/editors/notation/NotationStaff.h @@ -136,14 +136,14 @@ public: /** * Assign suitable coordinates to the elements on the staff, - * based entirely on the layout X and Y coordinates they were - * given by the horizontal and vertical layout processes. + * based entirely on the tqlayout X and Y coordinates they were + * given by the horizontal and vertical tqlayout processes. * * This is necessary because the sprites that are being positioned - * may have been created either after the layout process completed + * may have been created either after the tqlayout process completed * (by renderElements) or before (by the previous renderElements * call, if the sprites are unchanged but have moved) -- so - * neither the layout nor renderElements can authoritatively set + * neither the tqlayout nor renderElements can authoritatively set * their final positions. * * This method also updates the selected-ness of any elements it @@ -197,7 +197,7 @@ public: * elements). Pass movedOnly as true to indicate that elements * have not changed but only been repositioned, for example as a * consequence of a modification on another staff that caused a - * relayout. + * retqlayout. */ virtual void markChanged(timeT from = 0, timeT to = 0, @@ -223,7 +223,7 @@ public: /** * Insert time signature at x-coordinate \a x. */ - virtual void insertTimeSignature(double layoutX, + virtual void insertTimeSignature(double tqlayoutX, const TimeSignature &timeSig); /** @@ -234,7 +234,7 @@ public: /** * Insert repeated clef and key at start of new line, at x-coordinate \a x. */ - virtual void insertRepeatedClefAndKey(double layoutX, int barNo); + virtual void insertRepeatedClefAndKey(double tqlayoutX, int barNo); /** * Delete all repeated clefs and keys. @@ -270,7 +270,7 @@ public: Accidentals::NoAccidental) const; /** - * Find the NotationElement whose layout x-coord is closest to x, + * Find the NotationElement whose tqlayout x-coord is closest to x, * without regard to its y-coord. * * If notesAndRestsOnly is true, will return the closest note @@ -289,7 +289,7 @@ public: int proximityThreshold = 10); /** - * Find the NotationElement "under" the given layout x-coord, + * Find the NotationElement "under" the given tqlayout x-coord, * without regard to its y-coord. * * Also returns the clef and key in force at the given coordinates. @@ -301,7 +301,7 @@ public: * Draw a note on the staff to show an insert position prior to * an insert. */ - virtual void showPreviewNote(double layoutX, int heightOnStaff, + virtual void showPreviewNote(double tqlayoutX, int heightOnStaff, const Note ¬e, bool grace); /** @@ -396,7 +396,7 @@ protected: * Returns true if the item at the given iterator appears to have * moved horizontally without the spacing around it changing. * - * In practice, calculates the offset between the intended layout + * In practice, calculates the offset between the intended tqlayout * and current canvas coordinates of the item at the given * iterator, and returns true if this offset is equal to those of * all other following iterators at the same time as well as the @@ -412,7 +412,7 @@ protected: /** * Prepare a painter to draw an object of logical width w at - * layout-x coord x, starting at offset dx into the object, by + * tqlayout-x coord x, starting at offset dx into the object, by * setting the painter's clipping so as to crop the object at the * right edge of the row if it would otherwise overrun. The * return value is the amount of the object visible on this row @@ -423,7 +423,7 @@ protected: * This function calls painter.save(), and the caller must call * painter.restore() after use. */ - virtual double setPainterClipping(TQPainter *, double layoutX, int layoutY, + virtual double setPainterClipping(TQPainter *, double tqlayoutX, int tqlayoutY, double dx, double w, LinedStaffCoords &coords, FitPolicy policy); @@ -473,8 +473,8 @@ protected: TQPainter *m_printPainter; - enum BarStatus { UnRendered = 0, Rendered, Positioned }; - typedef std::map<int, BarStatus> BarStatusMap; + enum BartqStatus { UnRendered = 0, Rendered, Positioned }; + typedef std::map<int, BartqStatus> BarStatusMap; BarStatusMap m_status; std::pair<int, int> m_lastRenderCheck; bool m_ready; diff --git a/src/gui/editors/notation/NotationStrings.cpp b/src/gui/editors/notation/NotationStrings.cpp index 6065323..0c73bbc 100644 --- a/src/gui/editors/notation/NotationStrings.cpp +++ b/src/gui/editors/notation/NotationStrings.cpp @@ -39,7 +39,7 @@ namespace Rosegarden { -QString +TQString NotationStrings::addDots(TQString s, int dots, bool hyphenate, bool internationalize) { @@ -49,31 +49,31 @@ NotationStrings::addDots(TQString s, int dots, if (internationalize) { if (dots > 1) { if (hyphenate) - return i18n("%1-dotted-%2").arg(dots).arg(s); + return i18n("%1-dotted-%2").tqarg(dots).tqarg(s); else - return i18n("%1-dotted %2").arg(dots).arg(s); + return i18n("%1-dotted %2").tqarg(dots).tqarg(s); } else { if (hyphenate) - return i18n("dotted-%1").arg(s); + return i18n("dotted-%1").tqarg(s); else - return i18n("dotted %1").arg(s); + return i18n("dotted %1").tqarg(s); } } else { if (dots > 1) { if (hyphenate) - return TQString("%1-dotted-%2").arg(dots).arg(s); + return TQString("%1-dotted-%2").tqarg(dots).tqarg(s); else - return TQString("%1-dotted %2").arg(dots).arg(s); + return TQString("%1-dotted %2").tqarg(dots).tqarg(s); } else { if (hyphenate) - return TQString("dotted-%1").arg(s); + return TQString("dotted-%1").tqarg(s); else - return TQString("dotted %1").arg(s); + return TQString("dotted %1").tqarg(s); } } } -QString +TQString NotationStrings::getNoteName(Note note, bool plural, bool triplet) { Note::Type type = note.getNoteType(); @@ -93,17 +93,17 @@ NotationStrings::getNoteName(Note note, bool plural, bool triplet) }; if (plural && triplet) { - return addDots(i18n("%1 triplets").arg(names[type]), dots, false, true); // TODO PLURAL - this is broken because it assumes there's only 1 plural form + return addDots(i18n("%1 triplets").tqarg(names[type]), dots, false, true); // TODO PLURAL - this is broken because it assumes there's only 1 plural form } else if (plural) { return addDots(pluralnames[type], dots, false, true); } else if (triplet) { - return addDots(i18n("%1 triplet").arg(names[type]), dots, false, true); + return addDots(i18n("%1 triplet").tqarg(names[type]), dots, false, true); } else { return addDots(names[type], dots, false, true); } } -QString +TQString NotationStrings::getAmericanName(Note note, bool plural, bool triplet) { Note::Type type = note.getNoteType(); @@ -123,17 +123,17 @@ NotationStrings::getAmericanName(Note note, bool plural, bool triplet) }; if (plural && triplet) { - return addDots(TQString("%1 triplets").arg(names[type]), dots, false, false); + return addDots(TQString("%1 triplets").tqarg(names[type]), dots, false, false); } else if (plural) { return addDots(pluralnames[type], dots, false, false); } else if (triplet) { - return addDots(TQString("%1 triplet").arg(names[type]), dots, false, false); + return addDots(TQString("%1 triplet").tqarg(names[type]), dots, false, false); } else { return addDots(names[type], dots, false, false); } } -QString +TQString NotationStrings::getShortNoteName(Note note, bool plural, bool triplet) { Note::Type type = note.getNoteType(); @@ -151,17 +151,17 @@ NotationStrings::getShortNoteName(Note note, bool plural, bool triplet) }; if (plural && triplet) { - return addDots(i18n("%1 triplets").arg(names[type]), dots, false, true); // TODO - this is broken because it assumes there's only 1 plural form + return addDots(i18n("%1 triplets").tqarg(names[type]), dots, false, true); // TODO - this is broken because it assumes there's only 1 plural form } else if (plural) { return addDots(pluralnames[type], dots, false, true); } else if (triplet) { - return addDots(i18n("%1 triplet").arg(names[type]), dots, false, true); + return addDots(i18n("%1 triplet").tqarg(names[type]), dots, false, true); } else { return addDots(names[type], dots, false, true); } } -QString +TQString NotationStrings::getReferenceName(Note note, bool isRest) { Note::Type type = note.getNoteType(); @@ -182,7 +182,7 @@ Note NotationStrings::getNoteForName(TQString name) { std::string origName(qstrtostr(name)); - int pos = name.find('-'); + int pos = name.tqfind('-'); int dots = 0; if (pos > 0 && pos < 6 && pos < int(name.length()) - 1) { @@ -236,7 +236,7 @@ NotationStrings::getNoteForName(TQString name) throw MalformedNoteName("Can't parse note name \"" + origName + "\""); } -QString +TQString NotationStrings::makeNoteMenuLabel(timeT duration, bool brief, timeT &errorReturn, @@ -271,11 +271,11 @@ NotationStrings::makeNoteMenuLabel(timeT duration, timeT wholeNote = Note(Note::Semibreve).getDuration(); if ((wholeNote / duration) * duration == wholeNote) { - return TQString("1/%1").arg(wholeNote / duration); + return TQString("1/%1").tqarg(wholeNote / duration); } else if ((duration / wholeNote) * wholeNote == duration) { - return TQString("%1/1").arg(duration / wholeNote); + return TQString("%1/1").tqarg(duration / wholeNote); } else { - return i18n("%1 ticks").arg(duration); + return i18n("%1 ticks").tqarg(duration); plural = false; } diff --git a/src/gui/editors/notation/NotationTool.cpp b/src/gui/editors/notation/NotationTool.cpp index b187fbb..6d32782 100644 --- a/src/gui/editors/notation/NotationTool.cpp +++ b/src/gui/editors/notation/NotationTool.cpp @@ -44,13 +44,13 @@ NotationTool::~NotationTool() NOTATION_DEBUG << "NotationTool::~NotationTool()" << endl; // delete m_menu; - // m_parentView->factory()->removeClient(this); + // m_tqparentView->factory()->removeClient(this); // m_instance = 0; } void NotationTool::ready() { - m_nParentView->setCanvasCursor(Qt::arrowCursor); + m_nParentView->setCanvasCursor(TQt::arrowCursor); m_nParentView->setHeightTracking(false); } diff --git a/src/gui/editors/notation/NotationToolBox.cpp b/src/gui/editors/notation/NotationToolBox.cpp index 7632413..d3511fb 100644 --- a/src/gui/editors/notation/NotationToolBox.cpp +++ b/src/gui/editors/notation/NotationToolBox.cpp @@ -42,9 +42,9 @@ namespace Rosegarden { -NotationToolBox::NotationToolBox(NotationView *parent) - : EditToolBox(parent), - m_nParentView(parent) +NotationToolBox::NotationToolBox(NotationView *tqparent) + : EditToolBox(tqparent), + m_nParentView(tqparent) { //m_tools.setAutoDelete(true); } @@ -89,7 +89,7 @@ EditTool* NotationToolBox::createTool(const TQString& toolName) else { KMessageBox::error(0, TQString("NotationToolBox::createTool : unrecognised toolname %1 (%2)") - .arg(toolName).arg(toolNamelc)); + .tqarg(toolName).tqarg(toolNamelc)); return 0; } diff --git a/src/gui/editors/notation/NotationToolBox.h b/src/gui/editors/notation/NotationToolBox.h index d6765e6..5c15b2b 100644 --- a/src/gui/editors/notation/NotationToolBox.h +++ b/src/gui/editors/notation/NotationToolBox.h @@ -47,8 +47,9 @@ class EditTool; class NotationToolBox : public EditToolBox { Q_OBJECT + TQ_OBJECT public: - NotationToolBox(NotationView* parent); + NotationToolBox(NotationView* tqparent); protected: virtual EditTool* createTool(const TQString& toolName); diff --git a/src/gui/editors/notation/NotationVLayout.cpp b/src/gui/editors/notation/NotationVLayout.cpp index 5be5532..12979ea 100644 --- a/src/gui/editors/notation/NotationVLayout.cpp +++ b/src/gui/editors/notation/NotationVLayout.cpp @@ -55,8 +55,8 @@ using namespace BaseProperties; NotationVLayout::NotationVLayout(Composition *c, NotePixmapFactory *npf, const NotationProperties &properties, - TQObject* parent, const char* name) : - ProgressReporter(parent, name), + TQObject* tqparent, const char* name) : + ProgressReporter(tqparent, name), m_composition(c), m_npf(npf), m_notationQuantizer(c->getNotationQuantizer()), @@ -236,7 +236,7 @@ NotationVLayout::scanStaff(Staff &staffBase, timeT, timeT) if (!(*chord[j])->event()->get <Int> (m_properties.HEIGHT_ON_STAFF, height)) { - 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; + 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)").tqarg((*chord[j])->getViewAbsoluteTime()) << std::endl; (*chord[j])->event()->dump(std::cerr); } h.push_back(height); @@ -249,7 +249,7 @@ NotationVLayout::scanStaff(Staff &staffBase, timeT, timeT) bool hasShifted = chord.hasNoteHeadShifted(); - double y0 = -1E50; // A very unlikely Y layout value + double y0 = -1E50; // A very unlikely Y tqlayout value for (unsigned int j = 0; j < chord.size(); ++j) { @@ -269,7 +269,7 @@ NotationVLayout::scanStaff(Staff &staffBase, timeT, timeT) // These calculations and assignments are pretty much final // if the chord is not in a beamed group, but if it is then // they will be reworked by NotationGroup::applyBeam, which - // is called from NotationHLayout::layout, which is called + // is called from NotationHLayout::tqlayout, which is called // after this. Any inaccuracies here for beamed groups // should be stamped out there. @@ -342,7 +342,7 @@ NotationVLayout::scanStaff(Staff &staffBase, timeT, timeT) // Not optimal, as we can end up scanning the chord // multiple times (we'll return to it after scanning the // contained note). [We can't just iterate over all - // elements within the chord (as we can in hlayout) + // elements within the chord (as we can in htqlayout) // because we need them in height order.] i = chord.getFirstElementNotInChord(); @@ -490,7 +490,7 @@ NotationVLayout::positionSlur(NotationStaff &staff, if (!event->get <Int>(m_properties.HEIGHT_ON_STAFF, h)) { KMessageBox::sorry - ((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())); + ((TQWidget *)tqparent(), i18n("Spanned note at %1 has no HEIGHT_ON_STAFF property!\nThis is a bug (the program would previously have crashed by now)").tqarg((*scooter)->getViewAbsoluteTime())); event->dump(std::cerr); } diff --git a/src/gui/editors/notation/NotationVLayout.h b/src/gui/editors/notation/NotationVLayout.h index 2e718c7..afddb0b 100644 --- a/src/gui/editors/notation/NotationVLayout.h +++ b/src/gui/editors/notation/NotationVLayout.h @@ -52,7 +52,7 @@ class Composition; /** - * Vertical notation layout + * Vertical notation tqlayout * * computes the Y coordinate of notation elements */ @@ -63,7 +63,7 @@ class NotationVLayout : public ProgressReporter, public: NotationVLayout(Composition *c, NotePixmapFactory *npf, const NotationProperties &properties, - TQObject* parent, const char* name = 0); + TQObject* tqparent, const char* name = 0); virtual ~NotationVLayout(); @@ -91,9 +91,9 @@ public: timeT = 0); /** - * Do any layout dependent on more than one staff. As it - * happens, we have none, but we do have some layout that - * depends on the final results from the horizontal layout + * Do any tqlayout dependent on more than one staff. As it + * happens, we have none, but we do have some tqlayout that + * depends on the final results from the horizontal tqlayout * (for slurs), so we should do that here */ virtual void finishLayout(timeT = 0, diff --git a/src/gui/editors/notation/NotationView.cpp b/src/gui/editors/notation/NotationView.cpp index b3db080..4d16fb7 100644 --- a/src/gui/editors/notation/NotationView.cpp +++ b/src/gui/editors/notation/NotationView.cpp @@ -346,9 +346,9 @@ public: NotationView::NotationView(RosegardenGUIDoc *doc, std::vector<Segment *> segments, - TQWidget *parent, + TQWidget *tqparent, bool showProgressive) : - EditView(doc, segments, 2, parent, "notationview"), + EditView(doc, segments, 2, tqparent, "notationview"), m_properties(getViewLocalPropertyPrefix()), m_selectionCounter(0), m_insertModeLabel(0), @@ -372,10 +372,10 @@ NotationView::NotationView(RosegardenGUIDoc *doc, m_pageMode(LinedStaff::LinearMode), m_leftGutter(20), m_notePixmapFactory(new NotePixmapFactory(m_fontName, m_fontSize)), - m_hlayout(new NotationHLayout(&doc->getComposition(), m_notePixmapFactory, - m_properties, this)), - m_vlayout(new NotationVLayout(&doc->getComposition(), m_notePixmapFactory, - m_properties, this)), + m_htqlayout(new NotationHLayout(&doc->getComposition(), m_notePixmapFactory, + m_properties, TQT_TQOBJECT(this))), + m_vtqlayout(new NotationVLayout(&doc->getComposition(), m_notePixmapFactory, + m_properties, TQT_TQOBJECT(this))), m_chordNameRuler(0), m_tempoRuler(0), m_rawNoteRuler(0), @@ -409,7 +409,7 @@ NotationView::NotationView(RosegardenGUIDoc *doc, // Initialise the display-related defaults that will be needed - // by both the actions and the layout toolbar + // by both the actions and the tqlayout toolbar m_config->setGroup(NotationViewConfigGroup); @@ -435,15 +435,15 @@ NotationView::NotationView(RosegardenGUIDoc *doc, NoteFontFactory::getDefaultSize(m_fontName)); int defaultSpacing = m_config->readNumEntry("spacing", 100); - m_hlayout->setSpacing(defaultSpacing); + m_htqlayout->setSpacing(defaultSpacing); int defaultProportion = m_config->readNumEntry("proportion", 60); - m_hlayout->setProportion(defaultProportion); + m_htqlayout->setProportion(defaultProportion); delete m_notePixmapFactory; m_notePixmapFactory = new NotePixmapFactory(m_fontName, m_fontSize); - m_hlayout->setNotePixmapFactory(m_notePixmapFactory); - m_vlayout->setNotePixmapFactory(m_notePixmapFactory); + m_htqlayout->setNotePixmapFactory(m_notePixmapFactory); + m_vtqlayout->setNotePixmapFactory(m_notePixmapFactory); setupActions(); // setupAddControlRulerMenu(); - too early for notation, moved to end of ctor. @@ -452,7 +452,7 @@ NotationView::NotationView(RosegardenGUIDoc *doc, setBackgroundMode(PaletteBase); - TQCanvas *tCanvas = new TQCanvas(this); + TQCanvas *tCanvas = new TQCanvas(TQT_TQOBJECT(this)); tCanvas->resize(width() * 2, height() * 2); setCanvasView(new NotationCanvasView(*this, tCanvas, getCentralWidget())); @@ -460,19 +460,19 @@ NotationView::NotationView(RosegardenGUIDoc *doc, updateViewCaption(); m_chordNameRuler = new ChordNameRuler - (m_hlayout, doc, segments, m_leftGutter, 20, getCentralWidget()); + (m_htqlayout, doc, segments, m_leftGutter, 20, getCentralWidget()); addRuler(m_chordNameRuler); if (showProgressive) m_chordNameRuler->show(); m_tempoRuler = new TempoRuler - (m_hlayout, doc, this, m_leftGutter, 24, false, getCentralWidget()); + (m_htqlayout, doc, this, m_leftGutter, 24, false, getCentralWidget()); addRuler(m_tempoRuler); m_tempoRuler->hide(); static_cast<TempoRuler *>(m_tempoRuler)->connectSignals(); m_rawNoteRuler = new RawNoteRuler - (m_hlayout, segments[0], m_leftGutter, 20, getCentralWidget()); + (m_htqlayout, segments[0], m_leftGutter, 20, getCentralWidget()); addRuler(m_rawNoteRuler); m_rawNoteRuler->show(); @@ -484,7 +484,7 @@ NotationView::NotationView(RosegardenGUIDoc *doc, readOptions(); - setBottomStandardRuler(new StandardRuler(getDocument(), m_hlayout, m_leftGutter, 25, + setBottomStandardRuler(new StandardRuler(getDocument(), m_htqlayout, m_leftGutter, 25, true, getBottomWidget())); for (unsigned int i = 0; i < segments.size(); ++i) @@ -506,7 +506,7 @@ NotationView::NotationView(RosegardenGUIDoc *doc, m_canvasView->setLeftFixedWidget(m_headersGroupView); // Add a close button just above the track headers. - // The grid layout is only here to maintain the button in a + // The grid tqlayout is only here to maintain the button in a // right place m_headersTopFrame = new TQFrame(getCentralWidget()); TQGridLayout * headersTopGrid @@ -516,13 +516,13 @@ NotationView::NotationView(RosegardenGUIDoc *doc, TQPushButton * hideHeadersButton = new TQPushButton(m_headersTopFrame); headersTopGrid->addWidget(hideHeadersButton, 1, 1, - Qt::AlignRight | Qt::AlignBottom); + TQt::AlignRight | TQt::AlignBottom); hideHeadersButton->setIconSet(TQIconSet(pixmap)); hideHeadersButton->setFlat(true); TQToolTip::add(hideHeadersButton, i18n("Close track headers")); headersTopGrid->setMargin(4); setTopStandardRuler(new StandardRuler(getDocument(), - m_hlayout, m_leftGutter, 25, + m_htqlayout, m_leftGutter, 25, false, getCentralWidget()), m_headersTopFrame); m_topStandardRuler->getLoopRuler()->setBackgroundColor @@ -544,7 +544,7 @@ NotationView::NotationView(RosegardenGUIDoc *doc, // - // layout + // tqlayout // ProgressDialog* progressDlg = 0; @@ -571,21 +571,21 @@ NotationView::NotationView(RosegardenGUIDoc *doc, m_staffs[0]->setCurrent(true); m_config->setGroup(NotationViewConfigGroup); - int layoutMode = m_config->readNumEntry("layoutmode", 0); + int tqlayoutMode = m_config->readNumEntry("tqlayoutmode", 0); try { LinedStaff::PageMode mode = LinedStaff::LinearMode; - if (layoutMode == 1) + if (tqlayoutMode == 1) mode = LinedStaff::ContinuousPageMode; - else if (layoutMode == 2) + else if (tqlayoutMode == 2) mode = LinedStaff::MultiPageMode; setPageMode(mode); for (unsigned int i = 0; i < m_staffs.size(); ++i) { - m_staffs[i]->getSegment().getRefreshStatus + m_staffs[i]->getSegment().getRefreshtqStatus (m_segmentsRefreshStatusIds[i]).setNeedsRefresh(false); } @@ -594,7 +594,7 @@ NotationView::NotationView(RosegardenGUIDoc *doc, } catch (ProgressReporter::Cancelled c) { // when cancelled, m_ok is false -- checked by calling method - NOTATION_DEBUG << "NotationView ctor : layout Cancelled" << endl; + NOTATION_DEBUG << "NotationView ctor : tqlayout Cancelled" << endl; } NOTATION_DEBUG << "NotationView ctor : m_ok = " << m_ok << endl; @@ -676,10 +676,10 @@ NotationView::NotationView(RosegardenGUIDoc *doc, this, TQT_SLOT (slotHoveredOverAbsoluteTimeChanged(unsigned int))); TQObject::connect - (getCanvasView(), TQT_SIGNAL(zoomIn()), this, TQT_SLOT(slotZoomIn())); + (getCanvasView(), TQT_SIGNAL(zoomIn()), TQT_TQOBJECT(this), TQT_SLOT(slotZoomIn())); TQObject::connect - (getCanvasView(), TQT_SIGNAL(zoomOut()), this, TQT_SLOT(slotZoomOut())); + (getCanvasView(), TQT_SIGNAL(zoomOut()), TQT_TQOBJECT(this), TQT_SLOT(slotZoomOut())); TQObject::connect (m_pannerDialog->scrollbox(), TQT_SIGNAL(valueChanged(const TQPoint &)), @@ -754,24 +754,24 @@ NotationView::NotationView(RosegardenGUIDoc *doc, slotSetInsertCursorPosition(0); slotSetPointerPosition(doc->getComposition().getPosition()); setCurrentSelection(0, false, true); - slotUpdateInsertModeStatus(); - m_chordNameRuler->repaint(); - m_tempoRuler->repaint(); - m_rawNoteRuler->repaint(); + slotUpdateInsertModetqStatus(); + m_chordNameRuler->tqrepaint(); + m_tempoRuler->tqrepaint(); + m_rawNoteRuler->tqrepaint(); m_inhibitRefresh = false; // slotCheckRendered(0, getCanvasView()->visibleWidth()); - // getCanvasView()->repaintContents(); + // getCanvasView()->tqrepaintContents(); updateView(); TQObject::connect (this, TQT_SIGNAL(renderComplete()), getCanvasView(), TQT_SLOT(slotRenderComplete())); - if (parent) + if (tqparent) { const TrackButtons * trackLabels = - ((RosegardenGUIView*)parent)->getTrackEditor()->getTrackButtons(); + ((RosegardenGUIView*)tqparent)->getTrackEditor()->getTrackButtons(); TQObject::connect (trackLabels, TQT_SIGNAL(nameChanged()), this, TQT_SLOT(slotUpdateStaffName())); @@ -796,7 +796,7 @@ NotationView::NotationView(RosegardenGUIDoc *doc, NotationView::NotationView(RosegardenGUIDoc *doc, std::vector<Segment *> segments, - TQWidget *parent, + TQWidget *tqparent, NotationView *referenceView) : EditView(doc, segments, 1, 0, "printview"), m_properties(getViewLocalPropertyPrefix()), @@ -817,10 +817,10 @@ NotationView::NotationView(RosegardenGUIDoc *doc, m_pageMode(LinedStaff::LinearMode), m_leftGutter(0), m_notePixmapFactory(new NotePixmapFactory(m_fontName, m_fontSize)), - m_hlayout(new NotationHLayout(&doc->getComposition(), m_notePixmapFactory, - m_properties, this)), - m_vlayout(new NotationVLayout(&doc->getComposition(), m_notePixmapFactory, - m_properties, this)), + m_htqlayout(new NotationHLayout(&doc->getComposition(), m_notePixmapFactory, + m_properties, TQT_TQOBJECT(this))), + m_vtqlayout(new NotationVLayout(&doc->getComposition(), m_notePixmapFactory, + m_properties, TQT_TQOBJECT(this))), m_chordNameRuler(0), m_tempoRuler(0), m_rawNoteRuler(0), @@ -850,7 +850,7 @@ NotationView::NotationView(RosegardenGUIDoc *doc, // Initialise the display-related defaults that will be needed - // by both the actions and the layout toolbar + // by both the actions and the tqlayout toolbar m_config->setGroup(NotationViewConfigGroup); @@ -871,25 +871,25 @@ NotationView::NotationView(RosegardenGUIDoc *doc, if (referenceView) { - m_hlayout->setSpacing(referenceView->m_hlayout->getSpacing()); - m_hlayout->setProportion(referenceView->m_hlayout->getProportion()); + m_htqlayout->setSpacing(referenceView->m_htqlayout->getSpacing()); + m_htqlayout->setProportion(referenceView->m_htqlayout->getProportion()); } else { int defaultSpacing = m_config->readNumEntry("spacing", 100); - m_hlayout->setSpacing(defaultSpacing); + m_htqlayout->setSpacing(defaultSpacing); int defaultProportion = m_config->readNumEntry("proportion", 60); - m_hlayout->setProportion(defaultProportion); + m_htqlayout->setProportion(defaultProportion); } delete m_notePixmapFactory; m_notePixmapFactory = new NotePixmapFactory(m_fontName, m_fontSize); - m_hlayout->setNotePixmapFactory(m_notePixmapFactory); - m_vlayout->setNotePixmapFactory(m_notePixmapFactory); + m_htqlayout->setNotePixmapFactory(m_notePixmapFactory); + m_vtqlayout->setNotePixmapFactory(m_notePixmapFactory); setBackgroundMode(PaletteBase); m_config->setGroup(NotationViewConfigGroup); - TQCanvas *tCanvas = new TQCanvas(this); + TQCanvas *tCanvas = new TQCanvas(TQT_TQOBJECT(this)); tCanvas->resize(width() * 2, height() * 2); //!!! setCanvasView(new NotationCanvasView(*this, tCanvas, getCentralWidget())); @@ -907,7 +907,7 @@ NotationView::NotationView(RosegardenGUIDoc *doc, ProgressDialog* progressDlg = 0; - if (parent) + if (tqparent) { ProgressDialog::processEvents(); @@ -915,7 +915,7 @@ NotationView::NotationView(RosegardenGUIDoc *doc, NOTATION_DEBUG << "NotationView : setting up progress dialog" << endl; progressDlg = new ProgressDialog(i18n("Preparing to print..."), - 100, parent); + 100, tqparent); progressDlg->setAutoClose(false); progressDlg->setAutoReset(true); progressDlg->setMinimumDuration(1000); @@ -930,7 +930,7 @@ NotationView::NotationView(RosegardenGUIDoc *doc, setPageMode(LinedStaff::MultiPageMode); // also positions and renders the staffs! for (unsigned int i = 0; i < m_staffs.size(); ++i) { - m_staffs[i]->getSegment().getRefreshStatus + m_staffs[i]->getSegment().getRefreshtqStatus (m_segmentsRefreshStatusIds[i]).setNeedsRefresh(false); } @@ -939,7 +939,7 @@ NotationView::NotationView(RosegardenGUIDoc *doc, } catch (ProgressReporter::Cancelled c) { // when cancelled, m_ok is false -- checked by calling method - NOTATION_DEBUG << "NotationView ctor : layout Cancelled" << endl; + NOTATION_DEBUG << "NotationView ctor : tqlayout Cancelled" << endl; } NOTATION_DEBUG << "NotationView ctor : m_ok = " << m_ok << endl; @@ -1223,7 +1223,7 @@ void NotationView::positionStaffs() } } - m_hlayout->setPageWidth(pageWidth - leftMargin * 2); + m_htqlayout->setPageWidth(pageWidth - leftMargin * 2); int topGutter = 0; @@ -1341,7 +1341,7 @@ void NotationView::positionPages() haveBackground = true; } // we're happy to ignore errors from this one: - deskBackground.load(TQString("%1/misc/bg-desktop.xpm").arg(pixmapDir)); + deskBackground.load(TQString("%1/misc/bg-desktop.xpm").tqarg(pixmapDir)); } int pageWidth = getPageWidth(); @@ -1365,15 +1365,15 @@ void NotationView::positionPages() if (m_pageMode != LinedStaff::MultiPageMode) { if (haveBackground) { - canvas()->setBackgroundPixmap(background); - getCanvasView()->setBackgroundMode(Qt::FixedPixmap); + canvas()->tqsetBackgroundPixmap(background); + getCanvasView()->setBackgroundMode(TQt::FixedPixmap); getCanvasView()->setPaletteBackgroundPixmap(background); getCanvasView()->setErasePixmap(background); } } else { if (haveBackground) { - canvas()->setBackgroundPixmap(deskBackground); - getCanvasView()->setBackgroundMode(Qt::FixedPixmap); + canvas()->tqsetBackgroundPixmap(deskBackground); + getCanvasView()->setBackgroundMode(TQt::FixedPixmap); getCanvasView()->setPaletteBackgroundPixmap(background); getCanvasView()->setErasePixmap(background); } @@ -1389,7 +1389,7 @@ void NotationView::positionPages() int w = pageWidth - leftMargin / 2; int h = pageHeight; - TQString str = TQString("%1").arg(page + 1); + TQString str = TQString("%1").tqarg(page + 1); TQCanvasText *text = new TQCanvasText(str, pageNumberFont, canvas()); text->setX(m_leftGutter + pageWidth * page + pageWidth - pageNumberMetrics.width(str) - leftMargin); text->setY(y + h - pageNumberMetrics.descent() - topMargin); @@ -1399,8 +1399,8 @@ void NotationView::positionPages() TQCanvasRectangle *rect = new TQCanvasRectangle(x, y, w, h, canvas()); if (haveBackground) - rect->setBrush(TQBrush(Qt::white, background)); - rect->setPen(Qt::black); + rect->setBrush(TQBrush(TQt::white, background)); + rect->setPen(TQt::black); rect->setZ( -1000); rect->show(); m_pages.push_back(rect); @@ -1458,7 +1458,7 @@ void NotationView::readOptions() setOneToolbar("show_clefs_toolbar", "Clefs Toolbar"); setOneToolbar("show_group_toolbar", "Group Toolbar"); setOneToolbar("show_marks_toolbar", "Marks Toolbar"); - setOneToolbar("show_layout_toolbar", "Layout Toolbar"); + setOneToolbar("show_tqlayout_toolbar", "Layout Toolbar"); setOneToolbar("show_transport_toolbar", "Transport Toolbar"); setOneToolbar("show_accidentals_toolbar", "Accidentals Toolbar"); setOneToolbar("show_meta_toolbar", "Meta Toolbar"); @@ -1482,26 +1482,26 @@ void NotationView::readOptions() opt = m_config->readBoolEntry("Show Annotations", true); m_annotationsVisible = opt; getToggleAction("show_annotations")->setChecked(opt); - slotUpdateAnnotationsStatus(); + slotUpdateAnnotationstqStatus(); // slotToggleAnnotations(); opt = m_config->readBoolEntry("Show LilyPond Directives", true); m_lilyPondDirectivesVisible = opt; getToggleAction("show_lilypond_directives")->setChecked(opt); - slotUpdateLilyPondDirectivesStatus(); + slotUpdateLilyPondDirectivestqStatus(); } void NotationView::setupActions() { - KStdAction::print(this, TQT_SLOT(slotFilePrint()), actionCollection()); - KStdAction::printPreview(this, TQT_SLOT(slotFilePrintPreview()), + KStdAction::print(TQT_TQOBJECT(this), TQT_SLOT(slotFilePrint()), actionCollection()); + KStdAction::printPreview(TQT_TQOBJECT(this), TQT_SLOT(slotFilePrintPreview()), actionCollection()); - new KAction(i18n("Print &with LilyPond..."), 0, 0, this, + new KAction(i18n("Print &with LilyPond..."), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotPrintLilyPond()), actionCollection(), "file_print_lilypond"); - new KAction(i18n("Preview with Lil&yPond..."), 0, 0, this, + new KAction(i18n("Preview with Lil&yPond..."), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotPreviewLilyPond()), actionCollection(), "file_preview_lilypond"); @@ -1513,7 +1513,7 @@ void NotationView::setupActions() // View menu stuff KActionMenu *fontActionMenu = - new KActionMenu(i18n("Note &Font"), this, "note_font_actionmenu"); + new KActionMenu(i18n("Note &Font"), TQT_TQOBJECT(this), "note_font_actionmenu"); std::set <std::string> fs(NoteFontFactory::getFontNames()); @@ -1522,12 +1522,12 @@ void NotationView::setupActions() for (std::vector<std::string>::iterator i = f.begin(); i != f.end(); ++i) { - TQString fontQName(strtoqstr(*i)); + TQString fontTQName(strtoqstr(*i)); KToggleAction *fontAction = new KToggleAction - (fontQName, 0, this, TQT_SLOT(slotChangeFontFromAction()), - actionCollection(), "note_font_" + fontQName); + (fontTQName, 0, TQT_TQOBJECT(this), TQT_SLOT(slotChangeFontFromAction()), + actionCollection(), "note_font_" + fontTQName); fontAction->setChecked(*i == m_fontName); fontActionMenu->insert(fontAction); @@ -1536,20 +1536,20 @@ void NotationView::setupActions() actionCollection()->insert(fontActionMenu); m_fontSizeActionMenu = - new KActionMenu(i18n("Si&ze"), this, "note_font_size_actionmenu"); + new KActionMenu(i18n("Si&ze"), TQT_TQOBJECT(this), "note_font_size_actionmenu"); setupFontSizeMenu(); actionCollection()->insert(m_fontSizeActionMenu); m_showHeadersMenuEntry - = new KAction(i18n("Show Track Headers"), 0, this, + = new KAction(i18n("Show Track Headers"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotShowHeadersGroup()), actionCollection(), "show_track_headers"); KActionMenu *spacingActionMenu = - new KActionMenu(i18n("S&pacing"), this, "stretch_actionmenu"); + new KActionMenu(i18n("S&pacing"), TQT_TQOBJECT(this), "stretch_actionmenu"); - int defaultSpacing = m_hlayout->getSpacing(); + int defaultSpacing = m_htqlayout->getSpacing(); std::vector<int> spacings = NotationHLayout::getAvailableSpacings(); for (std::vector<int>::iterator i = spacings.begin(); @@ -1557,9 +1557,9 @@ void NotationView::setupActions() KToggleAction *spacingAction = new KToggleAction - (TQString("%1%").arg(*i), 0, this, + (TQString("%1%").tqarg(*i), 0, TQT_TQOBJECT(this), TQT_SLOT(slotChangeSpacingFromAction()), - actionCollection(), TQString("spacing_%1").arg(*i)); + actionCollection(), TQString("spacing_%1").tqarg(*i)); spacingAction->setExclusiveGroup("spacing"); spacingAction->setChecked(*i == defaultSpacing); @@ -1569,23 +1569,23 @@ void NotationView::setupActions() actionCollection()->insert(spacingActionMenu); KActionMenu *proportionActionMenu = - new KActionMenu(i18n("Du&ration Factor"), this, "proportion_actionmenu"); + new KActionMenu(i18n("Du&ration Factor"), TQT_TQOBJECT(this), "proportion_actionmenu"); - int defaultProportion = m_hlayout->getProportion(); + int defaultProportion = m_htqlayout->getProportion(); std::vector<int> proportions = NotationHLayout::getAvailableProportions(); for (std::vector<int>::iterator i = proportions.begin(); i != proportions.end(); ++i) { - TQString name = TQString("%1%").arg(*i); + TQString name = TQString("%1%").tqarg(*i); if (*i == 0) name = i18n("None"); KToggleAction *proportionAction = new KToggleAction - (name, 0, this, + (name, 0, TQT_TQOBJECT(this), TQT_SLOT(slotChangeProportionFromAction()), - actionCollection(), TQString("proportion_%1").arg(*i)); + actionCollection(), TQString("proportion_%1").tqarg(*i)); proportionAction->setExclusiveGroup("proportion"); proportionAction->setChecked(*i == defaultProportion); @@ -1595,7 +1595,7 @@ void NotationView::setupActions() actionCollection()->insert(proportionActionMenu); KActionMenu *styleActionMenu = - new KActionMenu(i18n("Note &Style"), this, "note_style_actionmenu"); + new KActionMenu(i18n("Note &Style"), TQT_TQOBJECT(this), "note_style_actionmenu"); std::vector<NoteStyleName> styles (NoteStyleFactory::getAvailableStyleNames()); @@ -1603,12 +1603,12 @@ void NotationView::setupActions() for (std::vector<NoteStyleName>::iterator i = styles.begin(); i != styles.end(); ++i) { - TQString styleQName(strtoqstr(*i)); + TQString styleTQName(strtoqstr(*i)); KAction *styleAction = new KAction - (styleQName, 0, this, TQT_SLOT(slotSetStyleFromAction()), - actionCollection(), "style_" + styleQName); + (styleTQName, 0, TQT_TQOBJECT(this), TQT_SLOT(slotSetStyleFromAction()), + actionCollection(), "style_" + styleTQName); styleActionMenu->insert(styleAction); } @@ -1616,21 +1616,21 @@ void NotationView::setupActions() actionCollection()->insert(styleActionMenu); KActionMenu *ornamentActionMenu = - new KActionMenu(i18n("Use Ornament"), this, "ornament_actionmenu"); + new KActionMenu(i18n("Use Ornament"), TQT_TQOBJECT(this), "ornament_actionmenu"); new KAction - (i18n("Insert Rest"), Key_P, this, TQT_SLOT(slotInsertRest()), + (i18n("Insert Rest"), Key_P, TQT_TQOBJECT(this), TQT_SLOT(slotInsertRest()), actionCollection(), TQString("insert_rest")); new KAction - (i18n("Switch from Note to Rest"), Key_T, this, + (i18n("Switch from Note to Rest"), Key_T, TQT_TQOBJECT(this), TQT_SLOT(slotSwitchFromNoteToRest()), actionCollection(), TQString("switch_from_note_to_rest")); new KAction - (i18n("Switch from Rest to Note"), Key_Y, this, + (i18n("Switch from Rest to Note"), Key_Y, TQT_TQOBJECT(this), TQT_SLOT(slotSwitchFromRestToNote()), actionCollection(), TQString("switch_from_rest_to_note")); @@ -1644,13 +1644,13 @@ void NotationView::setupActions() NoteActionData noteActionData = **actionDataIter; - icon = QIconSet - (NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet + (NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap (noteActionData.pixmapName))); noteAction = new KRadioAction(noteActionData.title, icon, noteActionData.keycode, - this, + TQT_TQOBJECT(this), TQT_SLOT(slotNoteAction()), actionCollection(), noteActionData.actionName); @@ -1669,14 +1669,14 @@ void NotationView::setupActions() NoteChangeActionData data = **actionDataIter; - icon = QIconSet - (NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet + (NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap (data.pixmapName))); KAction *action = new KAction(data.title, icon, data.keycode, - this, + TQT_TQOBJECT(this), TQT_SLOT(slotNoteChangeAction()), actionCollection(), data.actionName); @@ -1699,9 +1699,9 @@ void NotationView::setupActions() for (unsigned int i = 0; i < sizeof(actionsAccidental) / sizeof(actionsAccidental[0]); ++i) { - icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap (actionsAccidental[i][3]))); - noteAction = new KRadioAction(actionsAccidental[i][0], icon, 0, this, + noteAction = new KRadioAction(actionsAccidental[i][0], icon, 0, TQT_TQOBJECT(this), actionsAccidental[i][1], actionCollection(), actionsAccidental[i][2]); noteAction->setExclusiveGroup("accidentals"); @@ -1713,48 +1713,48 @@ void NotationView::setupActions() // // Treble - icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("clef-treble"))); - noteAction = new KRadioAction(i18n("&Treble Clef"), icon, 0, this, + icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap("clef-treble"))); + noteAction = new KRadioAction(i18n("&Treble Clef"), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotTrebleClef()), actionCollection(), "treble_clef"); noteAction->setExclusiveGroup("notes"); // Alto - icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("clef-alto"))); - noteAction = new KRadioAction(i18n("&Alto Clef"), icon, 0, this, + icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap("clef-alto"))); + noteAction = new KRadioAction(i18n("&Alto Clef"), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotAltoClef()), actionCollection(), "alto_clef"); noteAction->setExclusiveGroup("notes"); // Tenor - icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("clef-tenor"))); - noteAction = new KRadioAction(i18n("Te&nor Clef"), icon, 0, this, + icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap("clef-tenor"))); + noteAction = new KRadioAction(i18n("Te&nor Clef"), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotTenorClef()), actionCollection(), "tenor_clef"); noteAction->setExclusiveGroup("notes"); // Bass - icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("clef-bass"))); - noteAction = new KRadioAction(i18n("&Bass Clef"), icon, 0, this, + icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap("clef-bass"))); + noteAction = new KRadioAction(i18n("&Bass Clef"), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotBassClef()), actionCollection(), "bass_clef"); noteAction->setExclusiveGroup("notes"); - icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("text"))); - noteAction = new KRadioAction(i18n("&Text"), icon, Key_F8, this, + icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap("text"))); + noteAction = new KRadioAction(i18n("&Text"), icon, Key_F8, TQT_TQOBJECT(this), TQT_SLOT(slotText()), actionCollection(), "text"); noteAction->setExclusiveGroup("notes"); - icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("guitarchord"))); - noteAction = new KRadioAction(i18n("&Guitar Chord"), icon, Key_F9, this, + icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap("guitarchord"))); + noteAction = new KRadioAction(i18n("&Guitar Chord"), icon, Key_F9, TQT_TQOBJECT(this), TQT_SLOT(slotGuitarChord()), actionCollection(), "guitarchord"); noteAction->setExclusiveGroup("notes"); - /* icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("lilypond"))); - noteAction = new KRadioAction(i18n("Lil&ypond Directive"), icon, Key_F9, this, + /* icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap("lilypond"))); + noteAction = new KRadioAction(i18n("Lil&ypond Directive"), icon, Key_F9, TQT_TQOBJECT(this), TQT_SLOT(slotLilyPondDirective()), actionCollection(), "lilypond_directive"); noteAction->setExclusiveGroup("notes"); */ @@ -1764,420 +1764,420 @@ void NotationView::setupActions() // Edition tools (eraser, selector...) // noteAction = new KRadioAction(i18n("&Erase"), "eraser", Key_F4, - this, TQT_SLOT(slotEraseSelected()), + TQT_TQOBJECT(this), TQT_SLOT(slotEraseSelected()), actionCollection(), "erase"); noteAction->setExclusiveGroup("notes"); - icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("select"))); + icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap("select"))); noteAction = new KRadioAction(i18n("&Select and Edit"), icon, Key_F2, - this, TQT_SLOT(slotSelectSelected()), + TQT_TQOBJECT(this), TQT_SLOT(slotSelectSelected()), actionCollection(), "select"); noteAction->setExclusiveGroup("notes"); - icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("step_by_step"))); - new KToggleAction(i18n("Ste&p Recording"), icon, 0, this, + icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap("step_by_step"))); + new KToggleAction(i18n("Ste&p Recording"), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotToggleStepByStep()), actionCollection(), "toggle_step_by_step"); // Edit menu - new KAction(i18n("Select from Sta&rt"), 0, this, + new KAction(i18n("Select from Sta&rt"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotEditSelectFromStart()), actionCollection(), "select_from_start"); - new KAction(i18n("Select to &End"), 0, this, + new KAction(i18n("Select to &End"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotEditSelectToEnd()), actionCollection(), "select_to_end"); - new KAction(i18n("Select Whole St&aff"), Key_A + CTRL, this, + new KAction(i18n("Select Whole St&aff"), Key_A + CTRL, TQT_TQOBJECT(this), TQT_SLOT(slotEditSelectWholeStaff()), actionCollection(), "select_whole_staff"); - new KAction(i18n("C&ut and Close"), CTRL + SHIFT + Key_X, this, + new KAction(i18n("C&ut and Close"), CTRL + SHIFT + Key_X, TQT_TQOBJECT(this), TQT_SLOT(slotEditCutAndClose()), actionCollection(), "cut_and_close"); - new KAction(i18n("Pa&ste..."), CTRL + SHIFT + Key_V, this, + new KAction(i18n("Pa&ste..."), CTRL + SHIFT + Key_V, TQT_TQOBJECT(this), TQT_SLOT(slotEditGeneralPaste()), actionCollection(), "general_paste"); - new KAction(i18n("De&lete"), Key_Delete, this, + new KAction(i18n("De&lete"), Key_Delete, TQT_TQOBJECT(this), TQT_SLOT(slotEditDelete()), actionCollection(), "delete"); - new KAction(i18n("Move to Staff Above"), 0, this, + new KAction(i18n("Move to Staff Above"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotMoveEventsUpStaff()), actionCollection(), "move_events_up_staff"); - new KAction(i18n("Move to Staff Below"), 0, this, + new KAction(i18n("Move to Staff Below"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotMoveEventsDownStaff()), actionCollection(), "move_events_down_staff"); // // Settings menu // - int layoutMode = m_config->readNumEntry("layoutmode", 0); + int tqlayoutMode = m_config->readNumEntry("tqlayoutmode", 0); TQString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); - TQCanvasPixmap pixmap(pixmapDir + "/toolbar/linear-layout.xpm"); + TQCanvasPixmap pixmap(pixmapDir + "/toolbar/linear-tqlayout.xpm"); icon = TQIconSet(pixmap); KRadioAction *linearModeAction = new KRadioAction - (i18n("&Linear Layout"), icon, 0, this, TQT_SLOT(slotLinearMode()), + (i18n("&Linear Layout"), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotLinearMode()), actionCollection(), "linear_mode"); - linearModeAction->setExclusiveGroup("layoutMode"); - if (layoutMode == 0) + linearModeAction->setExclusiveGroup("tqlayoutMode"); + if (tqlayoutMode == 0) linearModeAction->setChecked(true); pixmap.load(pixmapDir + "/toolbar/continuous-page-mode.xpm"); icon = TQIconSet(pixmap); KRadioAction *continuousPageModeAction = new KRadioAction - (i18n("&Continuous Page Layout"), icon, 0, this, TQT_SLOT(slotContinuousPageMode()), + (i18n("&Continuous Page Layout"), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotContinuousPageMode()), actionCollection(), "continuous_page_mode"); - continuousPageModeAction->setExclusiveGroup("layoutMode"); - if (layoutMode == 1) + continuousPageModeAction->setExclusiveGroup("tqlayoutMode"); + if (tqlayoutMode == 1) continuousPageModeAction->setChecked(true); pixmap.load(pixmapDir + "/toolbar/multi-page-mode.xpm"); icon = TQIconSet(pixmap); KRadioAction *multiPageModeAction = new KRadioAction - (i18n("&Multiple Page Layout"), icon, 0, this, TQT_SLOT(slotMultiPageMode()), + (i18n("&Multiple Page Layout"), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotMultiPageMode()), actionCollection(), "multi_page_mode"); - multiPageModeAction->setExclusiveGroup("layoutMode"); - if (layoutMode == 2) + multiPageModeAction->setExclusiveGroup("tqlayoutMode"); + if (tqlayoutMode == 2) multiPageModeAction->setChecked(true); - new KToggleAction(i18n("Show Ch&ord Name Ruler"), 0, this, + new KToggleAction(i18n("Show Ch&ord Name Ruler"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotToggleChordsRuler()), actionCollection(), "show_chords_ruler"); - new KToggleAction(i18n("Show Ra&w Note Ruler"), 0, this, + new KToggleAction(i18n("Show Ra&w Note Ruler"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotToggleRawNoteRuler()), actionCollection(), "show_raw_note_ruler"); - new KToggleAction(i18n("Show &Tempo Ruler"), 0, this, + new KToggleAction(i18n("Show &Tempo Ruler"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotToggleTempoRuler()), actionCollection(), "show_tempo_ruler"); - new KToggleAction(i18n("Show &Annotations"), 0, this, + new KToggleAction(i18n("Show &Annotations"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotToggleAnnotations()), actionCollection(), "show_annotations"); - new KToggleAction(i18n("Show Lily&Pond Directives"), 0, this, + new KToggleAction(i18n("Show Lily&Pond Directives"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotToggleLilyPondDirectives()), actionCollection(), "show_lilypond_directives"); - new KAction(i18n("Open L&yric Editor"), 0, this, TQT_SLOT(slotEditLyrics()), + new KAction(i18n("Open L&yric Editor"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotEditLyrics()), actionCollection(), "lyric_editor"); // // Group menu // - icon = QIconSet - (NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet + (NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("group-beam"))); - new KAction(BeamCommand::getGlobalName(), icon, Key_B + CTRL, this, + new KAction(BeamCommand::getGlobalName(), icon, Key_B + CTRL, TQT_TQOBJECT(this), TQT_SLOT(slotGroupBeam()), actionCollection(), "beam"); - new KAction(AutoBeamCommand::getGlobalName(), 0, this, + new KAction(AutoBeamCommand::getGlobalName(), 0, TQT_TQOBJECT(this), TQT_SLOT(slotGroupAutoBeam()), actionCollection(), "auto_beam"); - icon = QIconSet - (NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet + (NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("group-unbeam"))); - new KAction(BreakCommand::getGlobalName(), icon, Key_U + CTRL, this, + new KAction(BreakCommand::getGlobalName(), icon, Key_U + CTRL, TQT_TQOBJECT(this), TQT_SLOT(slotGroupBreak()), actionCollection(), "break_group"); - icon = QIconSet - (NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet + (NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("group-simple-tuplet"))); - new KAction(TupletCommand::getGlobalName(true), icon, Key_R + CTRL, this, + new KAction(TupletCommand::getGlobalName(true), icon, Key_R + CTRL, TQT_TQOBJECT(this), TQT_SLOT(slotGroupSimpleTuplet()), actionCollection(), "simple_tuplet"); - icon = QIconSet - (NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet + (NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("group-tuplet"))); - new KAction(TupletCommand::getGlobalName(false), icon, Key_T + CTRL, this, + new KAction(TupletCommand::getGlobalName(false), icon, Key_T + CTRL, TQT_TQOBJECT(this), TQT_SLOT(slotGroupGeneralTuplet()), actionCollection(), "tuplet"); - new KAction(UnTupletCommand::getGlobalName(), 0, this, + new KAction(UnTupletCommand::getGlobalName(), 0, TQT_TQOBJECT(this), TQT_SLOT(slotGroupUnTuplet()), actionCollection(), "break_tuplets"); - icon = TQIconSet(NotePixmapFactory::toQPixmap + icon = TQIconSet(NotePixmapFactory::toTQPixmap (NotePixmapFactory::makeToolbarPixmap("triplet"))); (new KToggleAction(i18n("Trip&let Insert Mode"), icon, Key_G, - this, TQT_SLOT(slotUpdateInsertModeStatus()), + TQT_TQOBJECT(this), TQT_SLOT(slotUpdateInsertModetqStatus()), actionCollection(), "triplet_mode"))-> setChecked(false); - icon = TQIconSet(NotePixmapFactory::toQPixmap + icon = TQIconSet(NotePixmapFactory::toTQPixmap (NotePixmapFactory::makeToolbarPixmap("chord"))); (new KToggleAction(i18n("C&hord Insert Mode"), icon, Key_H, - this, TQT_SLOT(slotUpdateInsertModeStatus()), + TQT_TQOBJECT(this), TQT_SLOT(slotUpdateInsertModetqStatus()), actionCollection(), "chord_mode"))-> setChecked(false); - icon = TQIconSet(NotePixmapFactory::toQPixmap + icon = TQIconSet(NotePixmapFactory::toTQPixmap (NotePixmapFactory::makeToolbarPixmap("group-grace"))); (new KToggleAction(i18n("Grace Insert Mode"), icon, 0, - this, TQT_SLOT(slotUpdateInsertModeStatus()), + TQT_TQOBJECT(this), TQT_SLOT(slotUpdateInsertModetqStatus()), actionCollection(), "grace_mode"))-> setChecked(false); /*!!! - icon = QIconSet - (NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet + (NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("group-grace"))); - new KAction(GraceCommand::getGlobalName(), icon, 0, this, + new KAction(GraceCommand::getGlobalName(), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotGroupGrace()), actionCollection(), "grace"); - new KAction(UnGraceCommand::getGlobalName(), 0, this, + new KAction(UnGraceCommand::getGlobalName(), 0, TQT_TQOBJECT(this), TQT_SLOT(slotGroupUnGrace()), actionCollection(), "ungrace"); */ - icon = QIconSet - (NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet + (NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("group-slur"))); new KAction(AddIndicationCommand::getGlobalName - (Indication::Slur), icon, Key_ParenRight, this, + (Indication::Slur), icon, Key_ParenRight, TQT_TQOBJECT(this), TQT_SLOT(slotGroupSlur()), actionCollection(), "slur"); new KAction(AddIndicationCommand::getGlobalName - (Indication::PhrasingSlur), 0, Key_ParenRight + CTRL, this, + (Indication::PhrasingSlur), 0, Key_ParenRight + CTRL, TQT_TQOBJECT(this), TQT_SLOT(slotGroupPhrasingSlur()), actionCollection(), "phrasing_slur"); - icon = QIconSet - (NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet + (NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("group-glissando"))); new KAction(AddIndicationCommand::getGlobalName - (Indication::Glissando), icon, 0, this, + (Indication::Glissando), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotGroupGlissando()), actionCollection(), "glissando"); - icon = QIconSet - (NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet + (NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("group-crescendo"))); new KAction(AddIndicationCommand::getGlobalName - (Indication::Crescendo), icon, Key_Less, this, + (Indication::Crescendo), icon, Key_Less, TQT_TQOBJECT(this), TQT_SLOT(slotGroupCrescendo()), actionCollection(), "crescendo"); - icon = QIconSet - (NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet + (NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("group-decrescendo"))); new KAction(AddIndicationCommand::getGlobalName - (Indication::Decrescendo), icon, Key_Greater, this, + (Indication::Decrescendo), icon, Key_Greater, TQT_TQOBJECT(this), TQT_SLOT(slotGroupDecrescendo()), actionCollection(), "decrescendo"); new KAction(AddIndicationCommand::getGlobalName - (Indication::QuindicesimaUp), 0, 0, this, + (Indication::QuindicesimaUp), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotGroupOctave2Up()), actionCollection(), "octave_2up"); - icon = QIconSet - (NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet + (NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("group-ottava"))); new KAction(AddIndicationCommand::getGlobalName - (Indication::OttavaUp), icon, 0, this, + (Indication::OttavaUp), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotGroupOctaveUp()), actionCollection(), "octave_up"); new KAction(AddIndicationCommand::getGlobalName - (Indication::OttavaDown), 0, 0, this, + (Indication::OttavaDown), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotGroupOctaveDown()), actionCollection(), "octave_down"); new KAction(AddIndicationCommand::getGlobalName - (Indication::QuindicesimaDown), 0, 0, this, + (Indication::QuindicesimaDown), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotGroupOctave2Down()), actionCollection(), "octave_2down"); - icon = QIconSet - (NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet + (NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("group-chord"))); - new KAction(MakeChordCommand::getGlobalName(), icon, 0, this, + new KAction(MakeChordCommand::getGlobalName(), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotGroupMakeChord()), actionCollection(), "make_chord"); // setup Transforms menu - new KAction(NormalizeRestsCommand::getGlobalName(), Key_N + CTRL, this, + new KAction(NormalizeRestsCommand::getGlobalName(), Key_N + CTRL, TQT_TQOBJECT(this), TQT_SLOT(slotTransformsNormalizeRests()), actionCollection(), "normalize_rests"); - new KAction(CollapseRestsCommand::getGlobalName(), 0, this, + new KAction(CollapseRestsCommand::getGlobalName(), 0, TQT_TQOBJECT(this), TQT_SLOT(slotTransformsCollapseRests()), actionCollection(), "collapse_rests_aggressively"); - new KAction(CollapseNotesCommand::getGlobalName(), Key_Equal + CTRL, this, + new KAction(CollapseNotesCommand::getGlobalName(), Key_Equal + CTRL, TQT_TQOBJECT(this), TQT_SLOT(slotTransformsCollapseNotes()), actionCollection(), "collapse_notes"); - icon = QIconSet - (NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet + (NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("transforms-tie"))); - new KAction(TieNotesCommand::getGlobalName(), icon, Key_AsciiTilde, this, + new KAction(TieNotesCommand::getGlobalName(), icon, Key_AsciiTilde, TQT_TQOBJECT(this), TQT_SLOT(slotTransformsTieNotes()), actionCollection(), "tie_notes"); - new KAction(UntieNotesCommand::getGlobalName(), 0, this, + new KAction(UntieNotesCommand::getGlobalName(), 0, TQT_TQOBJECT(this), TQT_SLOT(slotTransformsUntieNotes()), actionCollection(), "untie_notes"); - new KAction(MakeNotesViableCommand::getGlobalName(), 0, this, + new KAction(MakeNotesViableCommand::getGlobalName(), 0, TQT_TQOBJECT(this), TQT_SLOT(slotTransformsMakeNotesViable()), actionCollection(), "make_notes_viable"); - icon = QIconSet - (NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet + (NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("transforms-decounterpoint"))); - new KAction(DeCounterpointCommand::getGlobalName(), icon, 0, this, + new KAction(DeCounterpointCommand::getGlobalName(), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotTransformsDeCounterpoint()), actionCollection(), "de_counterpoint"); new KAction(ChangeStemsCommand::getGlobalName(true), - 0, Key_PageUp + CTRL, this, + 0, Key_PageUp + CTRL, TQT_TQOBJECT(this), TQT_SLOT(slotTransformsStemsUp()), actionCollection(), "stems_up"); new KAction(ChangeStemsCommand::getGlobalName(false), - 0, Key_PageDown + CTRL, this, + 0, Key_PageDown + CTRL, TQT_TQOBJECT(this), TQT_SLOT(slotTransformsStemsDown()), actionCollection(), "stems_down"); - new KAction(RestoreStemsCommand::getGlobalName(), 0, this, + new KAction(RestoreStemsCommand::getGlobalName(), 0, TQT_TQOBJECT(this), TQT_SLOT(slotTransformsRestoreStems()), actionCollection(), "restore_stems"); new KAction(ChangeSlurPositionCommand::getGlobalName(true), - 0, this, + 0, TQT_TQOBJECT(this), TQT_SLOT(slotTransformsSlursAbove()), actionCollection(), "slurs_above"); new KAction(ChangeSlurPositionCommand::getGlobalName(false), - 0, this, + 0, TQT_TQOBJECT(this), TQT_SLOT(slotTransformsSlursBelow()), actionCollection(), "slurs_below"); - new KAction(RestoreSlursCommand::getGlobalName(), 0, this, + new KAction(RestoreSlursCommand::getGlobalName(), 0, TQT_TQOBJECT(this), TQT_SLOT(slotTransformsRestoreSlurs()), actionCollection(), "restore_slurs"); new KAction(ChangeTiePositionCommand::getGlobalName(true), - 0, this, + 0, TQT_TQOBJECT(this), TQT_SLOT(slotTransformsTiesAbove()), actionCollection(), "ties_above"); new KAction(ChangeTiePositionCommand::getGlobalName(false), - 0, this, + 0, TQT_TQOBJECT(this), TQT_SLOT(slotTransformsTiesBelow()), actionCollection(), "ties_below"); - new KAction(RestoreTiesCommand::getGlobalName(), 0, this, + new KAction(RestoreTiesCommand::getGlobalName(), 0, TQT_TQOBJECT(this), TQT_SLOT(slotTransformsRestoreTies()), actionCollection(), "restore_ties"); - icon = QIconSet - (NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet + (NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("accmenu-doubleflat"))); new KAction(RespellCommand::getGlobalName (RespellCommand::Set, Accidentals::DoubleFlat), - icon, 0, this, + icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotRespellDoubleFlat()), actionCollection(), "respell_doubleflat"); - icon = QIconSet - (NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet + (NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("accmenu-flat"))); new KAction(RespellCommand::getGlobalName (RespellCommand::Set, Accidentals::Flat), - icon, 0, this, + icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotRespellFlat()), actionCollection(), "respell_flat"); - icon = QIconSet - (NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet + (NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("accmenu-natural"))); new KAction(RespellCommand::getGlobalName (RespellCommand::Set, Accidentals::Natural), - icon, 0, this, + icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotRespellNatural()), actionCollection(), "respell_natural"); - icon = QIconSet - (NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet + (NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("accmenu-sharp"))); new KAction(RespellCommand::getGlobalName (RespellCommand::Set, Accidentals::Sharp), - icon, 0, this, + icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotRespellSharp()), actionCollection(), "respell_sharp"); - icon = QIconSet - (NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet + (NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("accmenu-doublesharp"))); new KAction(RespellCommand::getGlobalName (RespellCommand::Set, Accidentals::DoubleSharp), - icon, 0, this, + icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotRespellDoubleSharp()), actionCollection(), "respell_doublesharp"); new KAction(RespellCommand::getGlobalName (RespellCommand::Up, Accidentals::NoAccidental), - Key_Up + CTRL + SHIFT, this, + Key_Up + CTRL + SHIFT, TQT_TQOBJECT(this), TQT_SLOT(slotRespellUp()), actionCollection(), "respell_up"); new KAction(RespellCommand::getGlobalName (RespellCommand::Down, Accidentals::NoAccidental), - Key_Down + CTRL + SHIFT, this, + Key_Down + CTRL + SHIFT, TQT_TQOBJECT(this), TQT_SLOT(slotRespellDown()), actionCollection(), "respell_down"); new KAction(RespellCommand::getGlobalName (RespellCommand::Restore, Accidentals::NoAccidental), - 0, this, + 0, TQT_TQOBJECT(this), TQT_SLOT(slotRespellRestore()), actionCollection(), "respell_restore"); new KAction(MakeAccidentalsCautionaryCommand::getGlobalName(true), - 0, this, + 0, TQT_TQOBJECT(this), TQT_SLOT(slotShowCautionary()), actionCollection(), "show_cautionary"); new KAction(MakeAccidentalsCautionaryCommand::getGlobalName(false), - 0, this, + 0, TQT_TQOBJECT(this), TQT_SLOT(slotCancelCautionary()), actionCollection(), "cancel_cautionary"); - icon = QIconSet - (NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet + (NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("quantize"))); - new KAction(EventQuantizeCommand::getGlobalName(), icon, Key_Equal, this, + new KAction(EventQuantizeCommand::getGlobalName(), icon, Key_Equal, TQT_TQOBJECT(this), TQT_SLOT(slotTransformsQuantize()), actionCollection(), "quantize"); new KAction(FixNotationQuantizeCommand::getGlobalName(), 0, - this, TQT_SLOT(slotTransformsFixQuantization()), actionCollection(), + TQT_TQOBJECT(this), TQT_SLOT(slotTransformsFixQuantization()), actionCollection(), "fix_quantization"); new KAction(RemoveNotationQuantizeCommand::getGlobalName(), 0, - this, TQT_SLOT(slotTransformsRemoveQuantization()), actionCollection(), + TQT_TQOBJECT(this), TQT_SLOT(slotTransformsRemoveQuantization()), actionCollection(), "remove_quantization"); new KAction(InterpretCommand::getGlobalName(), 0, - this, TQT_SLOT(slotTransformsInterpret()), actionCollection(), + TQT_TQOBJECT(this), TQT_SLOT(slotTransformsInterpret()), actionCollection(), "interpret"); - new KAction(i18n("&Dump selected events to stderr"), 0, this, + new KAction(i18n("&Dump selected events to stderr"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotDebugDump()), actionCollection(), "debug_dump"); for (MarkActionDataMap::Iterator i = m_markActionDataMap->begin(); @@ -2185,75 +2185,75 @@ void NotationView::setupActions() const MarkActionData &markActionData = **i; - icon = TQIconSet(NotePixmapFactory::toQPixmap + icon = TQIconSet(NotePixmapFactory::toTQPixmap (NotePixmapFactory::makeMarkMenuPixmap(markActionData.mark))); new KAction(markActionData.title, icon, markActionData.keycode, - this, + TQT_TQOBJECT(this), TQT_SLOT(slotAddMark()), actionCollection(), markActionData.actionName); } - icon = QIconSet - (NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet + (NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("text-mark"))); - new KAction(AddTextMarkCommand::getGlobalName(), icon, 0, this, + new KAction(AddTextMarkCommand::getGlobalName(), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotMarksAddTextMark()), actionCollection(), "add_text_mark"); - new KAction(AddFingeringMarkCommand::getGlobalName("0"), 0, Key_0 + ALT, this, + new KAction(AddFingeringMarkCommand::getGlobalName("0"), 0, Key_0 + ALT, TQT_TQOBJECT(this), TQT_SLOT(slotMarksAddFingeringMarkFromAction()), actionCollection(), "add_fingering_0"); - new KAction(AddFingeringMarkCommand::getGlobalName("1"), 0, Key_1 + ALT, this, + new KAction(AddFingeringMarkCommand::getGlobalName("1"), 0, Key_1 + ALT, TQT_TQOBJECT(this), TQT_SLOT(slotMarksAddFingeringMarkFromAction()), actionCollection(), "add_fingering_1"); - new KAction(AddFingeringMarkCommand::getGlobalName("2"), 0, Key_2 + ALT, this, + new KAction(AddFingeringMarkCommand::getGlobalName("2"), 0, Key_2 + ALT, TQT_TQOBJECT(this), TQT_SLOT(slotMarksAddFingeringMarkFromAction()), actionCollection(), "add_fingering_2"); - new KAction(AddFingeringMarkCommand::getGlobalName("3"), 0, Key_3 + ALT, this, + new KAction(AddFingeringMarkCommand::getGlobalName("3"), 0, Key_3 + ALT, TQT_TQOBJECT(this), TQT_SLOT(slotMarksAddFingeringMarkFromAction()), actionCollection(), "add_fingering_3"); - new KAction(AddFingeringMarkCommand::getGlobalName("4"), 0, Key_4 + ALT, this, + new KAction(AddFingeringMarkCommand::getGlobalName("4"), 0, Key_4 + ALT, TQT_TQOBJECT(this), TQT_SLOT(slotMarksAddFingeringMarkFromAction()), actionCollection(), "add_fingering_4"); - new KAction(AddFingeringMarkCommand::getGlobalName("5"), 0, Key_5 + ALT, this, + new KAction(AddFingeringMarkCommand::getGlobalName("5"), 0, Key_5 + ALT, TQT_TQOBJECT(this), TQT_SLOT(slotMarksAddFingeringMarkFromAction()), actionCollection(), "add_fingering_5"); - new KAction(AddFingeringMarkCommand::getGlobalName("+"), 0, Key_9 + ALT, this, + new KAction(AddFingeringMarkCommand::getGlobalName("+"), 0, Key_9 + ALT, TQT_TQOBJECT(this), TQT_SLOT(slotMarksAddFingeringMarkFromAction()), actionCollection(), "add_fingering_plus"); - new KAction(AddFingeringMarkCommand::getGlobalName(), 0, 0, this, + new KAction(AddFingeringMarkCommand::getGlobalName(), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotMarksAddFingeringMark()), actionCollection(), "add_fingering_mark"); - new KAction(RemoveMarksCommand::getGlobalName(), 0, this, + new KAction(RemoveMarksCommand::getGlobalName(), 0, TQT_TQOBJECT(this), TQT_SLOT(slotMarksRemoveMarks()), actionCollection(), "remove_marks"); - new KAction(RemoveFingeringMarksCommand::getGlobalName(), 0, this, + new KAction(RemoveFingeringMarksCommand::getGlobalName(), 0, TQT_TQOBJECT(this), TQT_SLOT(slotMarksRemoveFingeringMarks()), actionCollection(), "remove_fingering_marks"); - new KAction(i18n("Ma&ke Ornament..."), 0, this, + new KAction(i18n("Ma&ke Ornament..."), 0, TQT_TQOBJECT(this), TQT_SLOT(slotMakeOrnament()), actionCollection(), "make_ornament"); - new KAction(i18n("Trigger &Ornament..."), 0, this, + new KAction(i18n("Trigger &Ornament..."), 0, TQT_TQOBJECT(this), TQT_SLOT(slotUseOrnament()), actionCollection(), "use_ornament"); - new KAction(i18n("Remove Ornament..."), 0, this, + new KAction(i18n("Remove Ornament..."), 0, TQT_TQOBJECT(this), TQT_SLOT(slotRemoveOrnament()), actionCollection(), "remove_ornament"); @@ -2261,32 +2261,32 @@ void NotationView::setupActions() i18n("&None"), "&1", "&2", "&3", "&4", "&5" }; for (int i = 0; i <= 5; ++i) { - new KAction(slashTitles[i], 0, this, + new KAction(slashTitles[i], 0, TQT_TQOBJECT(this), TQT_SLOT(slotAddSlashes()), actionCollection(), - TQString("slashes_%1").arg(i)); + TQString("slashes_%1").tqarg(i)); } - new KAction(ClefInsertionCommand::getGlobalName(), 0, this, + new KAction(ClefInsertionCommand::getGlobalName(), 0, TQT_TQOBJECT(this), TQT_SLOT(slotEditAddClef()), actionCollection(), "add_clef"); - new KAction(KeyInsertionCommand::getGlobalName(), 0, this, + new KAction(KeyInsertionCommand::getGlobalName(), 0, TQT_TQOBJECT(this), TQT_SLOT(slotEditAddKeySignature()), actionCollection(), "add_key_signature"); - new KAction(SustainInsertionCommand::getGlobalName(true), 0, this, + new KAction(SustainInsertionCommand::getGlobalName(true), 0, TQT_TQOBJECT(this), TQT_SLOT(slotEditAddSustainDown()), actionCollection(), "add_sustain_down"); - new KAction(SustainInsertionCommand::getGlobalName(false), 0, this, + new KAction(SustainInsertionCommand::getGlobalName(false), 0, TQT_TQOBJECT(this), TQT_SLOT(slotEditAddSustainUp()), actionCollection(), "add_sustain_up"); - new KAction(TransposeCommand::getDiatonicGlobalName(false), 0, this, + new KAction(TransposeCommand::getDiatonicGlobalName(false), 0, TQT_TQOBJECT(this), TQT_SLOT(slotEditTranspose()), actionCollection(), "transpose_segment"); - new KAction(i18n("Convert Notation For..."), 0, this, + new KAction(i18n("Convert Notation For..."), 0, TQT_TQOBJECT(this), TQT_SLOT(slotEditSwitchPreset()), actionCollection(), "switch_preset"); @@ -2304,7 +2304,7 @@ void NotationView::setupActions() "palette-marks" }, { i18n("Show &Group Toolbar"), "1slotToggleGroupToolBar()", "show_group_toolbar", "palette-group" }, - { i18n("Show &Layout Toolbar"), "1slotToggleLayoutToolBar()", "show_layout_toolbar", + { i18n("Show &Layout Toolbar"), "1slotToggleLayoutToolBar()", "show_tqlayout_toolbar", "palette-font" }, { i18n("Show Trans&port Toolbar"), "1slotToggleTransportToolBar()", "show_transport_toolbar", "palette-transport" }, @@ -2315,200 +2315,200 @@ void NotationView::setupActions() for (unsigned int i = 0; i < sizeof(actionsToolbars) / sizeof(actionsToolbars[0]); ++i) { - icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap(actionsToolbars[i][3]))); + icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap(actionsToolbars[i][3]))); new KToggleAction(actionsToolbars[i][0], icon, 0, - this, actionsToolbars[i][1], + TQT_TQOBJECT(this), actionsToolbars[i][1], actionCollection(), actionsToolbars[i][2]); } - new KAction(i18n("Cursor &Back"), 0, Key_Left, this, + new KAction(i18n("Cursor &Back"), 0, Key_Left, TQT_TQOBJECT(this), TQT_SLOT(slotStepBackward()), actionCollection(), "cursor_back"); - new KAction(i18n("Cursor &Forward"), 0, Key_Right, this, + new KAction(i18n("Cursor &Forward"), 0, Key_Right, TQT_TQOBJECT(this), TQT_SLOT(slotStepForward()), actionCollection(), "cursor_forward"); - new KAction(i18n("Cursor Ba&ck Bar"), 0, Key_Left + CTRL, this, + new KAction(i18n("Cursor Ba&ck Bar"), 0, Key_Left + CTRL, TQT_TQOBJECT(this), TQT_SLOT(slotJumpBackward()), actionCollection(), "cursor_back_bar"); - new KAction(i18n("Cursor For&ward Bar"), 0, Key_Right + CTRL, this, + new KAction(i18n("Cursor For&ward Bar"), 0, Key_Right + CTRL, TQT_TQOBJECT(this), TQT_SLOT(slotJumpForward()), actionCollection(), "cursor_forward_bar"); - new KAction(i18n("Cursor Back and Se&lect"), SHIFT + Key_Left, this, + new KAction(i18n("Cursor Back and Se&lect"), SHIFT + Key_Left, TQT_TQOBJECT(this), TQT_SLOT(slotExtendSelectionBackward()), actionCollection(), "extend_selection_backward"); - new KAction(i18n("Cursor Forward and &Select"), SHIFT + Key_Right, this, + new KAction(i18n("Cursor Forward and &Select"), SHIFT + Key_Right, TQT_TQOBJECT(this), TQT_SLOT(slotExtendSelectionForward()), actionCollection(), "extend_selection_forward"); - new KAction(i18n("Cursor Back Bar and Select"), SHIFT + CTRL + Key_Left, this, + new KAction(i18n("Cursor Back Bar and Select"), SHIFT + CTRL + Key_Left, TQT_TQOBJECT(this), TQT_SLOT(slotExtendSelectionBackwardBar()), actionCollection(), "extend_selection_backward_bar"); - new KAction(i18n("Cursor Forward Bar and Select"), SHIFT + CTRL + Key_Right, this, + new KAction(i18n("Cursor Forward Bar and Select"), SHIFT + CTRL + Key_Right, TQT_TQOBJECT(this), TQT_SLOT(slotExtendSelectionForwardBar()), actionCollection(), "extend_selection_forward_bar"); /*!!! not here yet - new KAction(i18n("Move Selection Left"), Key_Minus, this, + new KAction(i18n("Move Selection Left"), Key_Minus, TQT_TQOBJECT(this), 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, + Key_A + CTRL, */ TQT_TQOBJECT(this), TQT_SLOT(slotJumpToStart()), actionCollection(), "cursor_start"); - new KAction(i18n("Cursor to &End"), 0, Key_E + CTRL, this, + new KAction(i18n("Cursor to &End"), 0, Key_E + CTRL, TQT_TQOBJECT(this), TQT_SLOT(slotJumpToEnd()), actionCollection(), "cursor_end"); - new KAction(i18n("Cursor &Up Staff"), 0, Key_Up + SHIFT, this, + new KAction(i18n("Cursor &Up Staff"), 0, Key_Up + SHIFT, TQT_TQOBJECT(this), TQT_SLOT(slotCurrentStaffUp()), actionCollection(), "cursor_up_staff"); - new KAction(i18n("Cursor &Down Staff"), 0, Key_Down + SHIFT, this, + new KAction(i18n("Cursor &Down Staff"), 0, Key_Down + SHIFT, TQT_TQOBJECT(this), TQT_SLOT(slotCurrentStaffDown()), actionCollection(), "cursor_down_staff"); - new KAction(i18n("Cursor Pre&vious Segment"), 0, Key_Prior + ALT, this, + new KAction(i18n("Cursor Pre&vious Segment"), 0, Key_Prior + ALT, TQT_TQOBJECT(this), TQT_SLOT(slotCurrentSegmentPrior()), actionCollection(), "cursor_prior_segment"); - new KAction(i18n("Cursor Ne&xt Segment"), 0, Key_Next + ALT, this, + new KAction(i18n("Cursor Ne&xt Segment"), 0, Key_Next + ALT, TQT_TQOBJECT(this), TQT_SLOT(slotCurrentSegmentNext()), actionCollection(), "cursor_next_segment"); - icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-cursor-to-pointer"))); - new KAction(i18n("Cursor to &Playback Pointer"), icon, 0, this, + new KAction(i18n("Cursor to &Playback Pointer"), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotJumpCursorToPlayback()), actionCollection(), "cursor_to_playback_pointer"); - icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-play"))); - KAction *play = new KAction(i18n("&Play"), icon, Key_Enter, this, + KAction *play = new KAction(i18n("&Play"), icon, Key_Enter, TQT_TQOBJECT(this), TQT_SIGNAL(play()), actionCollection(), "play"); // Alternative shortcut for Play KShortcut playShortcut = play->shortcut(); playShortcut.append( KKey(Key_Return + CTRL) ); play->setShortcut(playShortcut); - icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-stop"))); - new KAction(i18n("&Stop"), icon, Key_Insert, this, + new KAction(i18n("&Stop"), icon, Key_Insert, TQT_TQOBJECT(this), TQT_SIGNAL(stop()), actionCollection(), "stop"); - icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-rewind"))); - new KAction(i18n("Re&wind"), icon, Key_End, this, + new KAction(i18n("Re&wind"), icon, Key_End, TQT_TQOBJECT(this), TQT_SIGNAL(rewindPlayback()), actionCollection(), "playback_pointer_back_bar"); - icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-ffwd"))); - new KAction(i18n("&Fast Forward"), icon, Key_PageDown, this, + new KAction(i18n("&Fast Forward"), icon, Key_PageDown, TQT_TQOBJECT(this), TQT_SIGNAL(fastForwardPlayback()), actionCollection(), "playback_pointer_forward_bar"); - icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-rewind-end"))); - new KAction(i18n("Rewind to &Beginning"), icon, 0, this, + new KAction(i18n("Rewind to &Beginning"), icon, 0, TQT_TQOBJECT(this), TQT_SIGNAL(rewindPlaybackToBeginning()), actionCollection(), "playback_pointer_start"); - icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-ffwd-end"))); - new KAction(i18n("Fast Forward to &End"), icon, 0, this, + new KAction(i18n("Fast Forward to &End"), icon, 0, TQT_TQOBJECT(this), TQT_SIGNAL(fastForwardPlaybackToEnd()), actionCollection(), "playback_pointer_end"); - icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-pointer-to-cursor"))); - new KAction(i18n("Playback Pointer to &Cursor"), icon, 0, this, + new KAction(i18n("Playback Pointer to &Cursor"), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotJumpPlaybackToCursor()), actionCollection(), "playback_pointer_to_cursor"); - icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-solo"))); - new KToggleAction(i18n("&Solo"), icon, 0, this, + new KToggleAction(i18n("&Solo"), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotToggleSolo()), actionCollection(), "toggle_solo"); - icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-tracking"))); - (new KToggleAction(i18n("Scro&ll to Follow Playback"), icon, Key_Pause, this, + (new KToggleAction(i18n("Scro&ll to Follow Playback"), icon, Key_Pause, TQT_TQOBJECT(this), TQT_SLOT(slotToggleTracking()), actionCollection(), "toggle_tracking"))->setChecked(m_playTracking); - icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-panic"))); - new KAction(i18n("Panic"), icon, Key_P + CTRL + ALT, this, + new KAction(i18n("Panic"), icon, Key_P + CTRL + ALT, TQT_TQOBJECT(this), TQT_SIGNAL(panic()), actionCollection(), "panic"); - new KAction(i18n("Set Loop to Selection"), Key_Semicolon + CTRL, this, + new KAction(i18n("Set Loop to Selection"), Key_Semicolon + CTRL, TQT_TQOBJECT(this), TQT_SLOT(slotPreviewSelection()), actionCollection(), "preview_selection"); - new KAction(i18n("Clear L&oop"), Key_Colon + CTRL, this, + new KAction(i18n("Clear L&oop"), Key_Colon + CTRL, TQT_TQOBJECT(this), TQT_SLOT(slotClearLoop()), actionCollection(), "clear_loop"); - new KAction(i18n("Clear Selection"), Key_Escape, this, + new KAction(i18n("Clear Selection"), Key_Escape, TQT_TQOBJECT(this), TQT_SLOT(slotClearSelection()), actionCollection(), "clear_selection"); // TQString pixmapDir = // KGlobal::dirs()->findResource("appdata", "pixmaps/"); // icon = TQIconSet(TQCanvasPixmap(pixmapDir + "/toolbar/eventfilter.xpm")); - new KAction(i18n("&Filter Selection"), "filter", Key_F + CTRL, this, + new KAction(i18n("&Filter Selection"), "filter", Key_F + CTRL, TQT_TQOBJECT(this), TQT_SLOT(slotFilterSelection()), actionCollection(), "filter_selection"); - new KAction(i18n("Push &Left"), 0, this, + new KAction(i18n("Push &Left"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotFinePositionLeft()), actionCollection(), "fine_position_left"); - new KAction(i18n("Push &Right"), 0, this, + new KAction(i18n("Push &Right"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotFinePositionRight()), actionCollection(), "fine_position_right"); - new KAction(i18n("Push &Up"), 0, this, + new KAction(i18n("Push &Up"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotFinePositionUp()), actionCollection(), "fine_position_up"); - new KAction(i18n("Push &Down"), 0, this, + new KAction(i18n("Push &Down"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotFinePositionDown()), actionCollection(), "fine_position_down"); - new KAction(i18n("&Restore Positions"), 0, this, + new KAction(i18n("&Restore Positions"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotFinePositionRestore()), actionCollection(), "fine_position_restore"); - new KAction(i18n("Make &Invisible"), 0, this, + new KAction(i18n("Make &Invisible"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotMakeInvisible()), actionCollection(), "make_invisible"); - new KAction(i18n("Make &Visible"), 0, this, + new KAction(i18n("Make &Visible"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotMakeVisible()), actionCollection(), "make_visible"); - new KAction(i18n("Toggle Dot"), Key_Period, this, + new KAction(i18n("Toggle Dot"), Key_Period, TQT_TQOBJECT(this), TQT_SLOT(slotToggleDot()), actionCollection(), "toggle_dot"); - new KAction(i18n("Add Dot"), Key_Period + CTRL, this, + new KAction(i18n("Add Dot"), Key_Period + CTRL, TQT_TQOBJECT(this), TQT_SLOT(slotAddDot()), actionCollection(), "add_dot"); - new KAction(i18n("Add Dot"), Key_Period + CTRL + ALT, this, + new KAction(i18n("Add Dot"), Key_Period + CTRL + ALT, TQT_TQOBJECT(this), TQT_SLOT(slotAddDotNotationOnly()), actionCollection(), "add_notation_dot"); @@ -2546,7 +2546,7 @@ NotationView::setupFontSizeMenu(std::string oldFontName) for (unsigned int i = 0; i < sizes.size(); ++i) { KAction *action = actionCollection()->action - (TQString("note_font_size_%1").arg(sizes[i])); + (TQString("note_font_size_%1").tqarg(sizes[i])); m_fontSizeActionMenu->remove (action); @@ -2560,7 +2560,7 @@ NotationView::setupFontSizeMenu(std::string oldFontName) for (unsigned int i = 0; i < sizes.size(); ++i) { - TQString actionName = TQString("note_font_size_%1").arg(sizes[i]); + TQString actionName = TQString("note_font_size_%1").tqarg(sizes[i]); KToggleAction *sizeAction = dynamic_cast<KToggleAction *> (actionCollection()->action(actionName)); @@ -2568,7 +2568,7 @@ NotationView::setupFontSizeMenu(std::string oldFontName) if (!sizeAction) { sizeAction = new KToggleAction(i18n("1 pixel", "%n pixels", sizes[i]), - 0, this, + 0, TQT_TQOBJECT(this), TQT_SLOT(slotChangeFontSizeFromAction()), actionCollection(), actionName); } @@ -2607,21 +2607,21 @@ bool NotationView::isCurrentStaff(int i) void NotationView::initLayoutToolbar() { - KToolBar *layoutToolbar = toolBar("Layout Toolbar"); + KToolBar *tqlayoutToolbar = toolBar("Layout Toolbar"); - if (!layoutToolbar) { + if (!tqlayoutToolbar) { std::cerr - << "NotationView::initLayoutToolbar() : layout toolbar not found" + << "NotationView::initLayoutToolbar() : tqlayout toolbar not found" << std::endl; return ; } - new TQLabel(i18n(" Font: "), layoutToolbar, "font label"); + new TQLabel(i18n(" Font: "), tqlayoutToolbar, "font label"); // // font combo // - m_fontCombo = new KComboBox(layoutToolbar); + m_fontCombo = new KComboBox(tqlayoutToolbar); m_fontCombo->setEditable(false); std::set @@ -2633,10 +2633,10 @@ void NotationView::initLayoutToolbar() for (std::vector<std::string>::iterator i = f.begin(); i != f.end(); ++i) { - TQString fontQName(strtoqstr(*i)); + TQString fontTQName(strtoqstr(*i)); - m_fontCombo->insertItem(fontQName); - if (fontQName.lower() == strtoqstr(m_fontName).lower()) { + m_fontCombo->insertItem(fontTQName); + if (fontTQName.lower() == strtoqstr(m_fontName).lower()) { m_fontCombo->setCurrentItem(m_fontCombo->count() - 1); foundFont = true; } @@ -2652,7 +2652,7 @@ void NotationView::initLayoutToolbar() connect(m_fontCombo, TQT_SIGNAL(activated(const TQString &)), this, TQT_SLOT(slotChangeFont(const TQString &))); - new TQLabel(i18n(" Size: "), layoutToolbar, "size label"); + new TQLabel(i18n(" Size: "), tqlayoutToolbar, "size label"); TQString value; @@ -2660,7 +2660,7 @@ void NotationView::initLayoutToolbar() // font size combo // std::vector<int> sizes = NoteFontFactory::getScreenSizes(m_fontName); - m_fontSizeCombo = new KComboBox(layoutToolbar, "font size combo"); + m_fontSizeCombo = new KComboBox(tqlayoutToolbar, "font size combo"); for (std::vector<int>::iterator i = sizes.begin(); i != sizes.end(); ++i) { @@ -2674,15 +2674,15 @@ void NotationView::initLayoutToolbar() connect(m_fontSizeCombo, TQT_SIGNAL(activated(const TQString&)), this, TQT_SLOT(slotChangeFontSizeFromStringValue(const TQString&))); - new TQLabel(i18n(" Spacing: "), layoutToolbar, "spacing label"); + new TQLabel(i18n(" Spacing: "), tqlayoutToolbar, "spacing label"); // // spacing combo // - int defaultSpacing = m_hlayout->getSpacing(); + int defaultSpacing = m_htqlayout->getSpacing(); std::vector<int> spacings = NotationHLayout::getAvailableSpacings(); - m_spacingCombo = new KComboBox(layoutToolbar, "spacing combo"); + m_spacingCombo = new KComboBox(tqlayoutToolbar, "spacing combo"); for (std::vector<int>::iterator i = spacings.begin(); i != spacings.end(); ++i) { value.setNum(*i); @@ -2786,17 +2786,17 @@ NotationView::setPageMode(LinedStaff::PageMode pageMode) int topMargin = 0, leftMargin = 0; getPageMargins(leftMargin, topMargin); - m_hlayout->setPageMode(pageMode != LinedStaff::LinearMode); - m_hlayout->setPageWidth(pageWidth - leftMargin * 2); + m_htqlayout->setPageMode(pageMode != LinedStaff::LinearMode); + m_htqlayout->setPageWidth(pageWidth - leftMargin * 2); - NOTATION_DEBUG << "NotationView::setPageMode: set layout's page width to " + NOTATION_DEBUG << "NotationView::setPageMode: set tqlayout's page width to " << (pageWidth - leftMargin * 2) << endl; positionStaffs(); - bool layoutApplied = applyLayout(); - if (!layoutApplied) - KMessageBox::sorry(0, "Couldn't apply layout"); + bool tqlayoutApplied = applyLayout(); + if (!tqlayoutApplied) + KMessageBox::sorry(0, "Couldn't apply tqlayout"); else { for (unsigned int i = 0; i < m_staffs.size(); ++i) { m_staffs[i]->markChanged(); @@ -2894,7 +2894,7 @@ void NotationView::scrollToTime(timeT t) { - double notationViewLayoutCoord = m_hlayout->getXForTime(t); + double notationViewLayoutCoord = m_htqlayout->getXForTime(t); // Doesn't appear to matter which staff we use //!!! actually it probably does matter, if they don't have the same extents @@ -2912,7 +2912,7 @@ NotationView::scrollToTime(timeT t) RulerScale* NotationView::getHLayout() { - return m_hlayout; + return m_htqlayout; } void @@ -2948,8 +2948,8 @@ NotationView::paintEvent(TQPaintEvent *e) getPageMargins(leftMargin, topMargin); if (m_pageMode == LinedStaff::ContinuousPageMode) { - // relayout if the window width changes significantly in continuous page mode - int diff = int(getPageWidth() - leftMargin * 2 - m_hlayout->getPageWidth()); + // retqlayout if the window width changes significantly in continuous page mode + int diff = int(getPageWidth() - leftMargin * 2 - m_htqlayout->getPageWidth()); if (diff < -10 || diff > 10) { setPageMode(m_pageMode); refreshSegment(0, 0, 0); @@ -2990,15 +2990,15 @@ NotationView::paintEvent(TQPaintEvent *e) } } - slotSetOperationNameAndStatus(i18n(" Ready.")); + slotSetOperationNameAndtqStatus(i18n(" Ready.")); } bool NotationView::applyLayout(int staffNo, timeT startTime, timeT endTime) { - slotSetOperationNameAndStatus(i18n("Laying out score...")); + slotSetOperationNameAndtqStatus(i18n("Laying out score...")); ProgressDialog::processEvents(); - m_hlayout->setStaffCount(m_staffs.size()); + m_htqlayout->setStaffCount(m_staffs.size()); Profiler profiler("NotationView::applyLayout"); unsigned int i; @@ -3008,20 +3008,20 @@ bool NotationView::applyLayout(int staffNo, timeT startTime, timeT endTime) if (staffNo >= 0 && (int)i != staffNo) continue; - slotSetOperationNameAndStatus(i18n("Laying out staff %1...").arg(i + 1)); + slotSetOperationNameAndtqStatus(i18n("Laying out staff %1...").tqarg(i + 1)); ProgressDialog::processEvents(); - m_hlayout->resetStaff(*m_staffs[i], startTime, endTime); - m_vlayout->resetStaff(*m_staffs[i], startTime, endTime); - m_hlayout->scanStaff(*m_staffs[i], startTime, endTime); - m_vlayout->scanStaff(*m_staffs[i], startTime, endTime); + m_htqlayout->resetStaff(*m_staffs[i], startTime, endTime); + m_vtqlayout->resetStaff(*m_staffs[i], startTime, endTime); + m_htqlayout->scanStaff(*m_staffs[i], startTime, endTime); + m_vtqlayout->scanStaff(*m_staffs[i], startTime, endTime); } - slotSetOperationNameAndStatus(i18n("Reconciling staffs...")); + slotSetOperationNameAndtqStatus(i18n("Reconciling staffs...")); ProgressDialog::processEvents(); - m_hlayout->finishLayout(startTime, endTime); - m_vlayout->finishLayout(startTime, endTime); + m_htqlayout->finishLayout(startTime, endTime); + m_vtqlayout->finishLayout(startTime, endTime); // find the last finishing staff for future use @@ -3083,7 +3083,7 @@ void NotationView::setCurrentSelectedNote(const char *pixmapName, setTool(inserter); m_currentNotePixmap->setPixmap - (NotePixmapFactory::toQPixmap + (NotePixmapFactory::toTQPixmap (NotePixmapFactory::makeToolbarPixmap(pixmapName, true))); emit changeCurrentNote(rest, n); @@ -3147,7 +3147,7 @@ void NotationView::setCurrentSelection(EventSelection* s, bool preview, i != s->getSegmentEvents().end(); ++i) { if (oldSelection && oldSelection->getSegment() == s->getSegment() - && oldSelection->contains(*i)) + && oldSelection->tqcontains(*i)) continue; foundNewEvent = true; @@ -3194,8 +3194,8 @@ void NotationView::setCurrentSelection(EventSelection* s, bool preview, getLinedStaff(segment)->positionElements(std::min(startA, startB), std::max(endA, endB)); } else { - // mark refresh status and then request a repaint - segment.getRefreshStatus + // mark refresh status and then request a tqrepaint + segment.getRefreshtqStatus (m_segmentsRefreshStatusIds [getLinedStaff(segment)->getId()]). push(std::min(startA, startB), std::max(endA, endB)); @@ -3211,14 +3211,14 @@ void NotationView::setCurrentSelection(EventSelection* s, bool preview, getLinedStaff(s->getSegment())->positionElements(startB, endB); } else { - // mark refresh status and then request a repaint + // mark refresh status and then request a tqrepaint - oldSelection->getSegment().getRefreshStatus + oldSelection->getSegment().getRefreshtqStatus (m_segmentsRefreshStatusIds [getLinedStaff(oldSelection->getSegment())->getId()]). push(startA, endA); - s->getSegment().getRefreshStatus + s->getSegment().getRefreshtqStatus (m_segmentsRefreshStatusIds [getLinedStaff(s->getSegment())->getId()]). push(startB, endB); @@ -3329,12 +3329,12 @@ void NotationView::playNote(Segment &s, int pitch, int velocity) StudioControl::sendMappedEvent(mE); } -void NotationView::showPreviewNote(int staffNo, double layoutX, +void NotationView::showPreviewNote(int staffNo, double tqlayoutX, int pitch, int height, const Note ¬e, bool grace, int velocity) { - m_staffs[staffNo]->showPreviewNote(layoutX, height, note, grace); + m_staffs[staffNo]->showPreviewNote(tqlayoutX, height, note, grace); playNote(m_staffs[staffNo]->getSegment(), pitch, velocity); } @@ -3349,10 +3349,10 @@ void NotationView::setNotePixmapFactory(NotePixmapFactory* f) { delete m_notePixmapFactory; m_notePixmapFactory = f; - if (m_hlayout) - m_hlayout->setNotePixmapFactory(m_notePixmapFactory); - if (m_vlayout) - m_vlayout->setNotePixmapFactory(m_notePixmapFactory); + if (m_htqlayout) + m_htqlayout->setNotePixmapFactory(m_notePixmapFactory); + if (m_vtqlayout) + m_vtqlayout->setNotePixmapFactory(m_notePixmapFactory); } Segment * @@ -3446,10 +3446,10 @@ NotationView::getInsertionTime(Clef &clef, // the segment but the staff has a more efficient lookup LinedStaff *staff = m_staffs[m_currentStaff]; - double layoutX = staff->getLayoutXOfInsertCursor(); - if (layoutX < 0) layoutX = 0; + double tqlayoutX = staff->getLayoutXOfInsertCursor(); + if (tqlayoutX < 0) tqlayoutX = 0; Event *clefEvt = 0, *keyEvt = 0; - (void)staff->getElementUnderLayoutX(layoutX, clefEvt, keyEvt); + (void)staff->getElementUnderLayoutX(tqlayoutX, clefEvt, keyEvt); if (clefEvt) clef = Clef(*clefEvt); else clef = Clef(); @@ -3469,7 +3469,7 @@ NotationView::getStaffForCanvasCoords(int x, int y) const LinedStaff::LinedStaffCoords coords = s->getLayoutCoordsForCanvasCoords(x, y); - timeT t = m_hlayout->getTimeForX(coords.first); + timeT t = m_htqlayout->getTimeForX(coords.first); // In order to find the correct starting and ending bar of the segment, // make infinitesimal shifts (+1 and -1) towards its center. timeT t0 = getDocument()->getComposition().getBarStartForTime(m_staffs[m_currentStaff]->getSegment().getStartTime()+1); @@ -3488,7 +3488,7 @@ NotationView::getStaffForCanvasCoords(int x, int y) const LinedStaff::LinedStaffCoords coords = s->getLayoutCoordsForCanvasCoords(x, y); - timeT t = m_hlayout->getTimeForX(coords.first); + timeT t = m_htqlayout->getTimeForX(coords.first); // In order to find the correct starting and ending bar of the segment, // make infinitesimal shifts (+1 and -1) towards its center. timeT t0 = getDocument()->getComposition().getBarStartForTime(m_staffs[i]->getSegment().getStartTime()+1); @@ -3541,7 +3541,7 @@ void NotationView::print(bool previewOnly) if (previewOnly) printer.setPreviewOnly(true); - else if (!printer.setup((TQWidget *)parent())) + else if (!printer.setup((TQWidget *)tqparent())) return ; TQPaintDeviceMetrics pdm(&printer); @@ -3589,8 +3589,8 @@ void NotationView::print(bool previewOnly) LinedStaff::LinedStaffCoords cc1 = staff->getLayoutCoordsForCanvasCoords (pageRect.x() + pageRect.width(), pageRect.y() + pageRect.height()); - timeT t0 = m_hlayout->getTimeForX(cc0.first); - timeT t1 = m_hlayout->getTimeForX(cc1.first); + timeT t0 = m_htqlayout->getTimeForX(cc0.first); + timeT t1 = m_htqlayout->getTimeForX(cc1.first); m_staffs[i]->setPrintPainter(&printpainter); m_staffs[i]->checkRendered(t0, t1); @@ -3599,7 +3599,7 @@ void NotationView::print(bool previewOnly) // Supplying doublebuffer==true to this method appears to // slow down printing considerably but without it we get // all sorts of horrible artifacts (possibly related to - // mishandling of pixmap masks?) in qt-3.0. Let's permit + // mishandling of pixmap tqmasks?) in qt-3.0. Let's permit // it as a "hidden" option. m_config->setGroup(NotationViewConfigGroup); @@ -3612,13 +3612,7 @@ void NotationView::print(bool previewOnly) if (m_config->readBoolEntry("forcedoublebufferprinting", false)) { getCanvasView()->canvas()->drawArea(pageRect, &printpainter, true); } else { -#if QT_VERSION >= 0x030100 getCanvasView()->canvas()->drawArea(pageRect, &printpainter, false); -#else - - getCanvasView()->canvas()->drawArea(pageRect, &printpainter, true); -#endif - } } @@ -3635,8 +3629,8 @@ void NotationView::print(bool previewOnly) LinedStaff::LinedStaffCoords cc1 = staff->getLayoutCoordsForCanvasCoords (pageRect.x() + pageRect.width(), pageRect.y() + pageRect.height()); - timeT t0 = m_hlayout->getTimeForX(cc0.first); - timeT t1 = m_hlayout->getTimeForX(cc1.first); + timeT t0 = m_htqlayout->getTimeForX(cc0.first); + timeT t1 = m_htqlayout->getTimeForX(cc1.first); m_staffs[i]->renderPrintable(t0, t1); } @@ -3687,14 +3681,14 @@ NotationView::updateThumbnails(bool complete) int thumbScale = 20; TQPixmap thumbnail(canvas()->width() / thumbScale, canvas()->height() / thumbScale); - thumbnail.fill(Qt::white); + thumbnail.fill(TQt::white); TQPainter thumbPainter(&thumbnail); if (complete) { thumbPainter.scale(1.0 / double(thumbScale), 1.0 / double(thumbScale)); - thumbPainter.setPen(Qt::black); - thumbPainter.setBrush(Qt::white); + thumbPainter.setPen(TQt::black); + thumbPainter.setBrush(TQt::white); /* TQCanvas *canvas = getCanvasView()->canvas(); @@ -3742,7 +3736,7 @@ NotationView::updateThumbnails(bool complete) } else { - thumbPainter.setPen(Qt::black); + thumbPainter.setPen(TQt::black); for (int page = 0; page < maxPageCount; ++page) { @@ -3751,7 +3745,7 @@ NotationView::updateThumbnails(bool complete) int w = pageWidth - leftMargin / 2; int h = pageHeight; - TQString str = TQString("%1").arg(page + 1); + TQString str = TQString("%1").tqarg(page + 1); thumbPainter.drawRect(x / thumbScale, y / thumbScale, w / thumbScale, h / thumbScale); @@ -3815,7 +3809,7 @@ void NotationView::refreshSegment(Segment *segment, } setMenuStates(); - slotSetOperationNameAndStatus(i18n(" Ready.")); + slotSetOperationNameAndtqStatus(i18n(" Ready.")); NOTATION_DEBUG << "*** " << endl; } @@ -3835,12 +3829,12 @@ void NotationView::setMenuStates() NOTATION_DEBUG << "NotationView::setMenuStates: Have selection; it's " << m_currentEventSelection << " covering range from " << m_currentEventSelection->getStartTime() << " to " << m_currentEventSelection->getEndTime() << " (" << m_currentEventSelection->getSegmentEvents().size() << " events)" << endl; stateChanged("have_selection", KXMLGUIClient::StateNoReverse); - if (m_currentEventSelection->contains + if (m_currentEventSelection->tqcontains (Note::EventType)) { stateChanged("have_notes_in_selection", KXMLGUIClient::StateNoReverse); } - if (m_currentEventSelection->contains + if (m_currentEventSelection->tqcontains (Note::EventRestType)) { stateChanged("have_rests_in_selection", KXMLGUIClient::StateNoReverse); @@ -3882,7 +3876,7 @@ void NotationView::readjustCanvasSize() double maxWidth = 0.0; int maxHeight = 0; - slotSetOperationNameAndStatus(i18n("Sizing and allocating canvas...")); + slotSetOperationNameAndtqStatus(i18n("Sizing and allocating canvas...")); ProgressDialog::processEvents(); int progressTotal = m_staffs.size() + 2; @@ -3892,7 +3886,7 @@ void NotationView::readjustCanvasSize() LinedStaff &staff = *m_staffs[i]; - staff.sizeStaff(*m_hlayout); + staff.sizeStaff(*m_htqlayout); UPDATE_PROGRESS(1); if (staff.getTotalWidth() + staff.getX() > maxWidth) { @@ -3950,7 +3944,7 @@ void NotationView::readjustCanvasSize() } } - // Give a correct vertical alignment to track headers + // Give a correct vertical tqalignment to track headers if ((m_pageMode == LinedStaff::LinearMode) && m_showHeadersGroup) { m_headersGroupView->setContentsPos(0, getCanvasView()->contentsY()); } @@ -3958,10 +3952,10 @@ void NotationView::readjustCanvasSize() void NotationView::slotNoteAction() { - const TQObject* sigSender = sender(); + const TQObject* sigSender = TQT_TQOBJECT_CONST(const_cast<const TQT_BASE_OBJECT_NAME*>(sender())); NoteActionDataMap::Iterator noteAct = - m_noteActionDataMap->find(sigSender->name()); + m_noteActionDataMap->tqfind(sigSender->name()); if (noteAct != m_noteActionDataMap->end()) { m_lastNoteAction = sigSender->name(); @@ -3989,11 +3983,11 @@ void NotationView::slotLastNoteAction() void NotationView::slotAddMark() { - const TQObject *s = sender(); + const TQObject *s = TQT_TQOBJECT_CONST(const_cast<const TQT_BASE_OBJECT_NAME*>(sender())); if (!m_currentEventSelection) return ; - MarkActionDataMap::Iterator i = m_markActionDataMap->find(s->name()); + MarkActionDataMap::Iterator i = m_markActionDataMap->tqfind(s->name()); if (i != m_markActionDataMap->end()) { addCommandToHistory(new AddMarkCommand @@ -4003,10 +3997,10 @@ void NotationView::slotAddMark() void NotationView::slotNoteChangeAction() { - const TQObject* sigSender = sender(); + const TQObject* sigSender = TQT_TQOBJECT_CONST(const_cast<const TQT_BASE_OBJECT_NAME*>(sender())); NoteChangeActionDataMap::Iterator noteAct = - m_noteChangeActionDataMap->find(sigSender->name()); + m_noteChangeActionDataMap->tqfind(sigSender->name()); if (noteAct != m_noteChangeActionDataMap->end()) { slotSetNoteDurations((**noteAct).noteType, (**noteAct).notationOnly); @@ -4038,7 +4032,7 @@ void NotationView::initActionDataMaps() (NotationStrings::getReferenceName(Note(type, dots), rest == 1)); TQString shortName(refName); - shortName.replace(TQRegExp("-"), "_"); + shortName.tqreplace(TQRegExp("-"), "_"); TQString titleName (NotationStrings::getNoteName(Note(type, dots))); @@ -4047,7 +4041,7 @@ void NotationView::initActionDataMaps() titleName.right(titleName.length() - 1); if (rest) { - titleName.replace(TQRegExp(i18n("note")), i18n("rest")); + titleName.tqreplace(TQRegExp(i18n("note")), i18n("rest")); } int keycode = keys[type - Note::Shortest]; @@ -4073,8 +4067,8 @@ void NotationView::initActionDataMaps() (NotationStrings::getReferenceName(Note(type, 0), false)); TQString shortName(TQString("change_%1%2") - .arg(notationOnly ? "notation_" : "").arg(refName)); - shortName.replace(TQRegExp("-"), "_"); + .tqarg(notationOnly ? "notation_" : "").tqarg(refName)); + shortName.tqreplace(TQRegExp("-"), "_"); TQString titleName (NotationStrings::getNoteName(Note(type, 0))); @@ -4101,7 +4095,7 @@ void NotationView::initActionDataMaps() Mark mark = marks[i]; TQString markName(strtoqstr(mark)); - TQString actionName = TQString("add_%1").arg(markName); + TQString actionName = TQString("add_%1").tqarg(markName); m_markActionDataMap->insert (actionName, new MarkActionData @@ -4116,10 +4110,10 @@ void NotationView::setupProgress(KProgress* bar) if (bar) { NOTATION_DEBUG << "NotationView::setupProgress(bar)\n"; - connect(m_hlayout, TQT_SIGNAL(setProgress(int)), + connect(m_htqlayout, TQT_SIGNAL(setProgress(int)), bar, TQT_SLOT(setValue(int))); - connect(m_hlayout, TQT_SIGNAL(incrementProgress(int)), + connect(m_htqlayout, TQT_SIGNAL(incrementProgress(int)), bar, TQT_SLOT(advance(int))); connect(this, TQT_SIGNAL(setProgress(int)), @@ -4148,11 +4142,11 @@ void NotationView::setupProgress(ProgressDialog* dialog) setupProgress(dialog->progressBar()); connect(dialog, TQT_SIGNAL(cancelClicked()), - m_hlayout, TQT_SLOT(slotCancel())); + m_htqlayout, TQT_SLOT(slotCancel())); for (unsigned int i = 0; i < m_staffs.size(); ++i) { connect(m_staffs[i], TQT_SIGNAL(setOperationName(TQString)), - this, TQT_SLOT(slotSetOperationNameAndStatus(TQString))); + this, TQT_SLOT(slotSetOperationNameAndtqStatus(TQString))); connect(dialog, TQT_SIGNAL(cancelClicked()), m_staffs[i], TQT_SLOT(slotCancel())); @@ -4165,10 +4159,10 @@ void NotationView::setupProgress(ProgressDialog* dialog) } -void NotationView::slotSetOperationNameAndStatus(TQString name) +void NotationView::slotSetOperationNameAndtqStatus(TQString name) { emit setOperationName(name); - statusBar()->changeItem(TQString(" %1").arg(name), + statusBar()->changeItem(TQString(" %1").tqarg(name), KTmpStatusMsg::getDefaultId()); } @@ -4176,7 +4170,7 @@ void NotationView::disconnectProgress() { NOTATION_DEBUG << "NotationView::disconnectProgress()" << endl; - m_hlayout->disconnect(); + m_htqlayout->disconnect(); disconnect(TQT_SIGNAL(setProgress(int))); disconnect(TQT_SIGNAL(incrementProgress(int))); disconnect(TQT_SIGNAL(setOperationName(TQString))); @@ -4209,18 +4203,18 @@ void NotationView::updateViewCaption() trackPosition = track->getPosition(); // std::cout << std::endl << std::endl << std::endl << "DEBUG TITLE BAR: " << getDocument()->getTitle() << std::endl << std::endl << std::endl; setCaption(i18n("%1 - Segment Track #%2 - Notation") - .arg(getDocument()->getTitle()) - .arg(trackPosition + 1)); + .tqarg(getDocument()->getTitle()) + .tqarg(trackPosition + 1)); } else if (m_segments.size() == getDocument()->getComposition().getNbSegments()) { setCaption(i18n("%1 - All Segments - Notation") - .arg(getDocument()->getTitle())); + .tqarg(getDocument()->getTitle())); } else { setCaption(i18n("%1 - Segment - Notation", "%1 - %n Segments - Notation", m_segments.size()) - .arg(getDocument()->getTitle())); + .tqarg(getDocument()->getTitle())); } } @@ -4236,7 +4230,7 @@ NotationView::MarkActionDataMap* NotationView::m_markActionDataMap = 0; void -NotationView::slotUpdateInsertModeStatus() +NotationView::slotUpdateInsertModetqStatus() { TQString tripletMessage = i18n("Triplet"); TQString chordMessage = i18n("Chord"); @@ -4244,22 +4238,22 @@ NotationView::slotUpdateInsertModeStatus() TQString message; if (isInTripletMode()) { - message = i18n("%1 %2").arg(message).arg(tripletMessage); + message = i18n("%1 %2").tqarg(message).tqarg(tripletMessage); } if (isInChordMode()) { - message = i18n("%1 %2").arg(message).arg(chordMessage); + message = i18n("%1 %2").tqarg(message).tqarg(chordMessage); } if (isInGraceMode()) { - message = i18n("%1 %2").arg(message).arg(graceMessage); + message = i18n("%1 %2").tqarg(message).tqarg(graceMessage); } m_insertModeLabel->setText(message); } void -NotationView::slotUpdateAnnotationsStatus() +NotationView::slotUpdateAnnotationstqStatus() { if (!areAnnotationsVisible()) { for (int i = 0; i < getStaffCount(); ++i) { @@ -4279,7 +4273,7 @@ NotationView::slotUpdateAnnotationsStatus() } void -NotationView::slotUpdateLilyPondDirectivesStatus() +NotationView::slotUpdateLilyPondDirectivestqStatus() { if (!areLilyPondDirectivesVisible()) { for (int i = 0; i < getStaffCount(); ++i) { @@ -4312,7 +4306,7 @@ NotationView::slotChangeSpacingFromStringValue(const TQString& spacingT) void NotationView::slotChangeSpacingFromAction() { - const TQObject *s = sender(); + const TQObject *s = TQT_TQOBJECT_CONST(const_cast<const TQT_BASE_OBJECT_NAME*>(sender())); TQString name = s->name(); if (name.left(8) == "spacing_") { @@ -4323,22 +4317,22 @@ NotationView::slotChangeSpacingFromAction() } else { KMessageBox::sorry - (this, i18n("Unknown spacing action %1").arg(name)); + (this, i18n("Unknown spacing action %1").tqarg(name)); } } void NotationView::slotChangeSpacing(int spacing) { - if (m_hlayout->getSpacing() == spacing) + if (m_htqlayout->getSpacing() == spacing) return ; - m_hlayout->setSpacing(spacing); + m_htqlayout->setSpacing(spacing); // m_spacingSlider->setSize(spacing); KToggleAction *action = dynamic_cast<KToggleAction *> - (actionCollection()->action(TQString("spacing_%1").arg(spacing))); + (actionCollection()->action(TQString("spacing_%1").tqarg(spacing))); if (action) action->setChecked(true); else { @@ -4363,7 +4357,7 @@ NotationView::slotChangeSpacing(int spacing) void NotationView::slotChangeProportionFromIndex(int n) { - std::vector<int> proportions = m_hlayout->getAvailableProportions(); + std::vector<int> proportions = m_htqlayout->getAvailableProportions(); if (n >= (int)proportions.size()) n = proportions.size() - 1; slotChangeProportion(proportions[n]); @@ -4372,7 +4366,7 @@ NotationView::slotChangeProportionFromIndex(int n) void NotationView::slotChangeProportionFromAction() { - const TQObject *s = sender(); + const TQObject *s = TQT_TQOBJECT_CONST(const_cast<const TQT_BASE_OBJECT_NAME*>(sender())); TQString name = s->name(); if (name.left(11) == "proportion_") { @@ -4381,22 +4375,22 @@ NotationView::slotChangeProportionFromAction() } else { KMessageBox::sorry - (this, i18n("Unknown proportion action %1").arg(name)); + (this, i18n("Unknown proportion action %1").tqarg(name)); } } void NotationView::slotChangeProportion(int proportion) { - if (m_hlayout->getProportion() == proportion) + if (m_htqlayout->getProportion() == proportion) return ; - m_hlayout->setProportion(proportion); + m_htqlayout->setProportion(proportion); // m_proportionSlider->setSize(proportion); KToggleAction *action = dynamic_cast<KToggleAction *> - (actionCollection()->action(TQString("proportion_%1").arg(proportion))); + (actionCollection()->action(TQString("proportion_%1").tqarg(proportion))); if (action) action->setChecked(true); else { @@ -4421,21 +4415,21 @@ NotationView::slotChangeProportion(int proportion) void NotationView::slotChangeFontFromAction() { - const TQObject *s = sender(); + const TQObject *s = TQT_TQOBJECT_CONST(const_cast<const TQT_BASE_OBJECT_NAME*>(sender())); TQString name = s->name(); if (name.left(10) == "note_font_") { name = name.right(name.length() - 10); slotChangeFont(name); } else { KMessageBox::sorry - (this, i18n("Unknown font action %1").arg(name)); + (this, i18n("Unknown font action %1").tqarg(name)); } } void NotationView::slotChangeFontSizeFromAction() { - const TQObject *s = sender(); + const TQObject *s = TQT_TQOBJECT_CONST(const_cast<const TQT_BASE_OBJECT_NAME*>(sender())); TQString name = s->name(); if (name.left(15) == "note_font_size_") { @@ -4446,11 +4440,11 @@ NotationView::slotChangeFontSizeFromAction() slotChangeFont(m_fontName, size); else { KMessageBox::sorry - (this, i18n("Unknown font size %1").arg(name)); + (this, i18n("Unknown font size %1").tqarg(name)); } } else { KMessageBox::sorry - (this, i18n("Unknown font size action %1").arg(name)); + (this, i18n("Unknown font size action %1").tqarg(name)); } } @@ -4587,7 +4581,7 @@ NotationView::slotChangeFont(std::string newName, int newSize) int topMargin = 0, leftMargin = 0; getPageMargins(leftMargin, topMargin); - m_hlayout->setPageWidth(pageWidth - leftMargin * 2); + m_htqlayout->setPageWidth(pageWidth - leftMargin * 2); } for (unsigned int i = 0; i < m_staffs.size(); ++i) { @@ -4598,9 +4592,9 @@ NotationView::slotChangeFont(std::string newName, int newSize) positionStaffs(); - bool layoutApplied = applyLayout(); - if (!layoutApplied) - KMessageBox::sorry(0, "Couldn't apply layout"); + bool tqlayoutApplied = applyLayout(); + if (!tqlayoutApplied) + KMessageBox::sorry(0, "Couldn't apply tqlayout"); else { for (unsigned int i = 0; i < m_staffs.size(); ++i) { m_staffs[i]->markChanged(); @@ -4619,7 +4613,7 @@ NotationView::slotFilePrint() SetWaitCursor waitCursor; NotationView printingView(getDocument(), m_segments, - (TQWidget *)parent(), this); + (TQWidget *)tqparent(), this); if (!printingView.isOK()) { NOTATION_DEBUG << "Print : operation cancelled\n"; @@ -4636,7 +4630,7 @@ NotationView::slotFilePrintPreview() SetWaitCursor waitCursor; NotationView printingView(getDocument(), m_segments, - (TQWidget *)parent(), this); + (TQWidget *)tqparent(), this); if (!printingView.isOK()) { NOTATION_DEBUG << "Print preview : operation cancelled\n"; @@ -4651,7 +4645,7 @@ std::map<KProcess *, KTempFile *> NotationView::m_lilyTempFileMap; void NotationView::slotPrintLilyPond() { KTmpStatusMsg msg(i18n("Printing LilyPond file..."), this); - KTempFile *file = new KTempFile(TQString::null, ".ly"); + KTempFile *file = new KTempFile(TQString(), ".ly"); file->setAutoDelete(true); if (!file->name()) { // CurrentProgressDialog::freeze(); @@ -4675,7 +4669,7 @@ void NotationView::slotPrintLilyPond() void NotationView::slotPreviewLilyPond() { KTmpStatusMsg msg(i18n("Previewing LilyPond file..."), this); - KTempFile *file = new KTempFile(TQString::null, ".ly"); + KTempFile *file = new KTempFile(TQString(), ".ly"); file->setAutoDelete(true); if (!file->name()) { // CurrentProgressDialog::freeze(); @@ -5363,7 +5357,7 @@ void NotationView::slotAddIndication(std::string type, TQString desc) setSingleSelectedEvent(m_currentEventSelection->getSegment(), command->getLastInsertedEvent()); } else { - KMessageBox::sorry(this, i18n("Can't add overlapping %1 indications").arg(desc)); // TODO PLURAL - how many 'indications' ? + KMessageBox::sorry(this, i18n("Can't add overlapping %1 indications").tqarg(desc)); // TODO PLURAL - how many 'indications' ? delete command; } } @@ -5565,7 +5559,7 @@ void NotationView::slotTransformsRemoveQuantization() void NotationView::slotSetStyleFromAction() { - const TQObject *s = sender(); + const TQObject *s = TQT_TQOBJECT_CONST(const_cast<const TQT_BASE_OBJECT_NAME*>(sender())); TQString name = s->name(); if (!m_currentEventSelection) @@ -5574,7 +5568,7 @@ void NotationView::slotSetStyleFromAction() if (name.left(6) == "style_") { name = name.right(name.length() - 6); - KTmpStatusMsg msg(i18n("Changing to %1 style...").arg(name), + KTmpStatusMsg msg(i18n("Changing to %1 style...").tqarg(name), this); addCommandToHistory(new ChangeStyleCommand @@ -5582,13 +5576,13 @@ void NotationView::slotSetStyleFromAction() *m_currentEventSelection)); } else { KMessageBox::sorry - (this, i18n("Unknown style action %1").arg(name)); + (this, i18n("Unknown style action %1").tqarg(name)); } } void NotationView::slotInsertNoteFromAction() { - const TQObject *s = sender(); + const TQObject *s = TQT_TQOBJECT_CONST(const_cast<const TQT_BASE_OBJECT_NAME*>(sender())); TQString name = s->name(); Segment &segment = m_staffs[m_currentStaff]->getSegment(); @@ -5614,7 +5608,7 @@ void NotationView::slotInsertNoteFromAction() } catch (...) { KMessageBox::sorry - (this, i18n("Unknown note insert action %1").arg(name)); + (this, i18n("Unknown note insert action %1").tqarg(name)); return ; } @@ -5664,7 +5658,7 @@ void NotationView::slotSwitchFromRestToNote() Note note(restInserter->getCurrentNote()); TQString actionName = NotationStrings::getReferenceName(note, false); - actionName = actionName.replace("-", "_"); + actionName = actionName.tqreplace("-", "_"); KRadioAction *action = dynamic_cast<KRadioAction *> (actionCollection()->action(actionName)); @@ -5699,7 +5693,7 @@ void NotationView::slotSwitchFromNoteToRest() Note note(noteInserter->getCurrentNote()); TQString actionName = NotationStrings::getReferenceName(note, true); - actionName = actionName.replace("-", "_"); + actionName = actionName.tqreplace("-", "_"); KRadioAction *action = dynamic_cast<KRadioAction *> (actionCollection()->action(actionName)); @@ -5915,7 +5909,7 @@ void NotationView::slotAddDotNotationOnly() void NotationView::slotAddSlashes() { - const TQObject *s = sender(); + const TQObject *s = TQT_TQOBJECT_CONST(const_cast<const TQT_BASE_OBJECT_NAME*>(sender())); if (!m_currentEventSelection) return ; @@ -5956,7 +5950,7 @@ void NotationView::slotMarksAddFingeringMark() void NotationView::slotMarksAddFingeringMarkFromAction() { - const TQObject *s = sender(); + const TQObject *s = TQT_TQOBJECT_CONST(const_cast<const TQT_BASE_OBJECT_NAME*>(sender())); TQString name = s->name(); if (name.left(14) == "add_fingering_") { @@ -6033,9 +6027,9 @@ NotationView::slotMakeOrnament() TQString name; int barNo = segment.getComposition()->getBarNumber(absTime); if (track) { - name = TQString(i18n("Ornament track %1 bar %2").arg(track->getPosition() + 1).arg(barNo + 1)); + name = TQString(i18n("Ornament track %1 bar %2").tqarg(track->getPosition() + 1).tqarg(barNo + 1)); } else { - name = TQString(i18n("Ornament bar %1").arg(barNo + 1)); + name = TQString(i18n("Ornament bar %1").tqarg(barNo + 1)); } MakeOrnamentDialog dialog(this, name, basePitch); @@ -6061,7 +6055,7 @@ NotationView::slotMakeOrnament() style->getName(), getDocument()->getComposition().getNextTriggerSegmentId(), true, - BaseProperties::TRIGGER_SEGMENT_ADJUST_SQUISH, + BaseProperties::TRIGGER_SEGMENT_ADJUST_STQUISH, Marks::NoMark)); //!!! addCommandToHistory(command); @@ -6266,7 +6260,7 @@ void NotationView::slotEditSwitchPreset() // wrong, or just mildly wrong, but I'm betting somebody will tell me // about it if this was inappropriate Track *track = comp.getTrackById(selectedTrack); - track->setPresetLabel(dialog.getName()); + track->setPresetLabel(dialog.getName().ascii()); track->setClef(dialog.getClef()); track->setTranspose(dialog.getTranspose()); track->setLowestPlayable(dialog.getLowRange()); @@ -6444,22 +6438,22 @@ NotationView::slotSetPointerPosition(timeT time, bool scroll) for (unsigned int i = 0; i < m_staffs.size(); ++i) { - double layoutX = m_hlayout->getXForTimeByEvent(time); + double tqlayoutX = m_htqlayout->getXForTimeByEvent(time); Segment &seg = m_staffs[i]->getSegment(); bool good = true; - if (barNo >= m_hlayout->getLastVisibleBarOnStaff(*m_staffs[i])) { + if (barNo >= m_htqlayout->getLastVisibleBarOnStaff(*m_staffs[i])) { if (seg.isRepeating() && time < seg.getRepeatEndTime()) { timeT mappedTime = seg.getStartTime() + ((time - seg.getStartTime()) % (seg.getEndMarkerTime() - seg.getStartTime())); - layoutX = m_hlayout->getXForTimeByEvent(mappedTime); + tqlayoutX = m_htqlayout->getXForTimeByEvent(mappedTime); } else { good = false; } - } else if (barNo < m_hlayout->getFirstVisibleBarOnStaff(*m_staffs[i])) { + } else if (barNo < m_htqlayout->getFirstVisibleBarOnStaff(*m_staffs[i])) { good = false; } @@ -6469,7 +6463,7 @@ NotationView::slotSetPointerPosition(timeT time, bool scroll) } else { - m_staffs[i]->setPointerPosition(layoutX); + m_staffs[i]->setPointerPosition(tqlayoutX); int cy; m_staffs[i]->getPointerPosition(cx, cy); @@ -6542,7 +6536,7 @@ NotationView::slotSetCurrentStaff(int staffNo) m_chordNameRuler->setCurrentSegment(segment); m_rawNoteRuler->setCurrentSegment(segment); - m_rawNoteRuler->repaint(); + m_rawNoteRuler->tqrepaint(); setControlRulersCurrentSegment(); updateView(); @@ -6756,7 +6750,7 @@ NotationView::doDeferredCursorMove() t == segment.getEndTime() || t == segment.getBarStartForTime(t)) { - staff->setInsertCursorPosition(*m_hlayout, t); + staff->setInsertCursorPosition(*m_htqlayout, t); if (type == CursorMoveAndMakeVisible) { double cx; @@ -6898,7 +6892,7 @@ void NotationView::slotDoubleFlat() void NotationView::slotTrebleClef() { m_currentNotePixmap->setPixmap - (NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("clef-treble"))); + (NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap("clef-treble"))); setTool(m_toolBox->getTool(ClefInserter::ToolName)); dynamic_cast<ClefInserter*>(m_tool)->setClef(Clef::Treble); @@ -6908,7 +6902,7 @@ void NotationView::slotTrebleClef() void NotationView::slotAltoClef() { m_currentNotePixmap->setPixmap - (NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("clef-alto"))); + (NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap("clef-alto"))); setTool(m_toolBox->getTool(ClefInserter::ToolName)); dynamic_cast<ClefInserter*>(m_tool)->setClef(Clef::Alto); @@ -6918,7 +6912,7 @@ void NotationView::slotAltoClef() void NotationView::slotTenorClef() { m_currentNotePixmap->setPixmap - (NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("clef-tenor"))); + (NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap("clef-tenor"))); setTool(m_toolBox->getTool(ClefInserter::ToolName)); dynamic_cast<ClefInserter*>(m_tool)->setClef(Clef::Tenor); @@ -6928,7 +6922,7 @@ void NotationView::slotTenorClef() void NotationView::slotBassClef() { m_currentNotePixmap->setPixmap - (NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("clef-bass"))); + (NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap("clef-bass"))); setTool(m_toolBox->getTool(ClefInserter::ToolName)); dynamic_cast<ClefInserter*>(m_tool)->setClef(Clef::Bass); @@ -6938,7 +6932,7 @@ void NotationView::slotBassClef() void NotationView::slotText() { m_currentNotePixmap->setPixmap - (NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("text"))); + (NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap("text"))); setTool(m_toolBox->getTool(TextInserter::ToolName)); setMenuStates(); } @@ -6946,7 +6940,7 @@ void NotationView::slotText() void NotationView::slotGuitarChord() { m_currentNotePixmap->setPixmap - (NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("guitarchord"))); + (NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap("guitarchord"))); setTool(m_toolBox->getTool(GuitarChordInserter::ToolName)); setMenuStates(); } @@ -6982,21 +6976,21 @@ void NotationView::slotMultiPageMode() void NotationView::slotToggleChordsRuler() { - if (m_hlayout->isPageMode()) + if (m_htqlayout->isPageMode()) return ; toggleWidget(m_chordNameRuler, "show_chords_ruler"); } void NotationView::slotToggleRawNoteRuler() { - if (m_hlayout->isPageMode()) + if (m_htqlayout->isPageMode()) return ; toggleWidget(m_rawNoteRuler, "show_raw_note_ruler"); } void NotationView::slotToggleTempoRuler() { - if (m_hlayout->isPageMode()) + if (m_htqlayout->isPageMode()) return ; toggleWidget(m_tempoRuler, "show_tempo_ruler"); } @@ -7004,7 +6998,7 @@ void NotationView::slotToggleTempoRuler() void NotationView::slotToggleAnnotations() { m_annotationsVisible = !m_annotationsVisible; - slotUpdateAnnotationsStatus(); + slotUpdateAnnotationstqStatus(); //!!! use refresh mechanism refreshSegment(0, 0, 0); } @@ -7012,7 +7006,7 @@ void NotationView::slotToggleAnnotations() void NotationView::slotToggleLilyPondDirectives() { m_lilyPondDirectivesVisible = !m_lilyPondDirectivesVisible; - slotUpdateLilyPondDirectivesStatus(); + slotUpdateLilyPondDirectivestqStatus(); //!!! use refresh mechanism refreshSegment(0, 0, 0); } @@ -7101,7 +7095,7 @@ void NotationView::slotNonNotationItemPressed(TQMouseEvent *e, TQCanvasItem *it) getTrackById(staff->getSegment().getTrack())->getLabel(); bool ok = false; - TQRegExpValidator validator(TQRegExp(".*"), this); // empty is OK + TQRegExpValidator validator(TQRegExp(".*"), TQT_TQOBJECT(this)); // empty is OK TQString newText = KLineEditDlg::getText(TQString("Change staff name"), TQString("Enter new staff name"), @@ -7119,10 +7113,10 @@ void NotationView::slotNonNotationItemPressed(TQMouseEvent *e, TQCanvasItem *it) emit staffLabelChanged(staff->getSegment().getTrack(), newText); } - } else if (dynamic_cast<QCanvasTimeSigSprite *>(it)) { + } else if (dynamic_cast<TQCanvasTimeSigSprite *>(it)) { - double layoutX = (dynamic_cast<QCanvasTimeSigSprite *>(it))->getLayoutX(); - emit editTimeSignature(m_hlayout->getTimeForX(layoutX)); + double tqlayoutX = (dynamic_cast<TQCanvasTimeSigSprite *>(it))->getLayoutX(); + emit editTimeSignature(m_htqlayout->getTimeForX(tqlayoutX)); } } @@ -7200,17 +7194,17 @@ NotationView::slotHoveredOverAbsoluteTimeChanged(unsigned int time) // TQString message; // TQString format("%ld (%ld.%03lds)"); - // format = i18n("Time: %1").arg(format); + // format = i18n("Time: %1").tqarg(format); // message.sprintf(format, t, rt.sec, ms); TQString message = i18n("Time: %1 (%2.%3s)") - .arg(TQString("%1-%2-%3-%4") - .arg(TQString("%1").arg(bar + 1).rightJustify(3, '0')) - .arg(TQString("%1").arg(beat).rightJustify(2, '0')) - .arg(TQString("%1").arg(fraction).rightJustify(2, '0')) - .arg(TQString("%1").arg(remainder).rightJustify(2, '0'))) - .arg(rt.sec) - .arg(TQString("%1").arg(ms).rightJustify(3, '0')); + .tqarg(TQString("%1-%2-%3-%4") + .tqarg(TQString("%1").tqarg(bar + 1).rightJustify(3, '0')) + .tqarg(TQString("%1").tqarg(beat).rightJustify(2, '0')) + .tqarg(TQString("%1").tqarg(fraction).rightJustify(2, '0')) + .tqarg(TQString("%1").tqarg(remainder).rightJustify(2, '0'))) + .tqarg(rt.sec) + .tqarg(TQString("%1").tqarg(ms).rightJustify(3, '0')); m_hoveredOverAbsoluteTime->setText(message); } @@ -7367,7 +7361,7 @@ NotationView::slotToggleStepByStep() return ; } if (action->isChecked()) { // after toggling, that is - emit stepByStepTargetRequested(this); + emit stepByStepTargetRequested(TQT_TQOBJECT(this)); } else { emit stepByStepTargetRequested(0); } @@ -7382,7 +7376,7 @@ NotationView::slotStepByStepTargetRequested(TQObject *obj) NOTATION_DEBUG << "WARNING: No toggle_step_by_step action" << endl; return ; } - action->setChecked(obj == this); + action->setChecked(TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(this)); } void @@ -7402,8 +7396,8 @@ NotationView::slotCheckRendered(double cx0, double cx1) LinedStaff::LinedStaffCoords cc1 = staff->getLayoutCoordsForCanvasCoords (cx1, staff->getTotalHeight() + staff->getY()); - timeT t0 = m_hlayout->getTimeForX(cc0.first); - timeT t1 = m_hlayout->getTimeForX(cc1.first); + timeT t0 = m_htqlayout->getTimeForX(cc0.first); + timeT t1 = m_htqlayout->getTimeForX(cc1.first); if (dynamic_cast<NotationStaff *>(staff)->checkRendered(t0, t1)) { something = true; //!!! diff --git a/src/gui/editors/notation/NotationView.h b/src/gui/editors/notation/NotationView.h index 356960c..1288b04 100644 --- a/src/gui/editors/notation/NotationView.h +++ b/src/gui/editors/notation/NotationView.h @@ -109,22 +109,23 @@ class NotationView : public EditView, friend class LilyPondExporter; Q_OBJECT + TQ_OBJECT public: explicit NotationView(RosegardenGUIDoc *doc, std::vector<Segment *> segments, - TQWidget *parent, + TQWidget *tqparent, bool showProgressive); // update during initial render? /** - * Constructor for printing only. If parent is provided, a + * Constructor for printing only. If tqparent is provided, a * progress dialog will be shown -- otherwise not. If another * NotationView is provided, the fonts and other settings used * for printing will be taken from that view. */ explicit NotationView(RosegardenGUIDoc *doc, std::vector<Segment *> segments, - TQWidget *parent, + TQWidget *tqparent, NotationView *referenceView); ~NotationView(); @@ -261,7 +262,7 @@ public: * the pitch for performance, so the two need not correspond (e.g. * under ottava there may be octave differences). */ - void showPreviewNote(int staffNo, double layoutX, + void showPreviewNote(int staffNo, double tqlayoutX, int pitch, int height, const Note ¬e, bool grace, @@ -273,13 +274,13 @@ public: /// Sound the given note void playNote(Segment &segment, int pitch, int velocity = -1); - /// Switches between page- and linear- layout modes + /// Switches between page- and linear- tqlayout modes void setPageMode(LinedStaff::PageMode mode); - /// Returns the page width according to the layout mode (page/linear) + /// Returns the page width according to the tqlayout mode (page/linear) int getPageWidth(); - /// Returns the page height according to the layout mode (page/linear) + /// Returns the page height according to the tqlayout mode (page/linear) int getPageHeight(); /// Returns the margins within the page (zero if not in MultiPageMode) @@ -309,7 +310,7 @@ public: /** * Render segments on printing painter. This uses the current - * font size and layout, rather than the optimal ones for the + * font size and tqlayout, rather than the optimal ones for the * printer configuration (notation editing is not quite WYSIWYG, * and we may be in a non-page mode). * @@ -445,7 +446,7 @@ public slots: void slotToggleGroupToolBar(); /** - * toggles the layout toolbar + * toggles the tqlayout toolbar */ void slotToggleLayoutToolBar(); @@ -493,9 +494,9 @@ public slots: void slotToggleStepByStep(); /// status stuff - void slotUpdateInsertModeStatus(); - void slotUpdateAnnotationsStatus(); - void slotUpdateLilyPondDirectivesStatus(); + void slotUpdateInsertModetqStatus(); + void slotUpdateAnnotationstqStatus(); + void slotUpdateLilyPondDirectivestqStatus(); /// edit menu void slotPreviewSelection(); @@ -638,7 +639,7 @@ public slots: void slotNonNotationItemPressed(TQMouseEvent *e, TQCanvasItem *i); /** - * Called when a mouse press occurred on a QCanvasText + * Called when a mouse press occurred on a TQCanvasText */ void slotTextItemPressed(TQMouseEvent *e, TQCanvasItem *i); @@ -772,22 +773,22 @@ public slots: /// Changes to the next font size down void slotZoomOut(); - /// Changes the hlayout spacing of the staffs on the view + /// Changes the htqlayout spacing of the staffs on the view void slotChangeSpacing(int newSpacing); - /// Changes the hlayout spacing of the staffs on the view + /// Changes the htqlayout spacing of the staffs on the view void slotChangeSpacingFromStringValue(const TQString&); - /// Changes the hlayout spacing of the staffs on the view + /// Changes the htqlayout spacing of the staffs on the view void slotChangeSpacingFromAction(); - /// Changes the hlayout proportion of the staffs on the view + /// Changes the htqlayout proportion of the staffs on the view void slotChangeProportion(int newProportion); - /// Changes the hlayout proportion of the staffs on the view + /// Changes the htqlayout proportion of the staffs on the view void slotChangeProportionFromIndex(int newProportionIndex); - /// Changes the hlayout proportion of the staffs on the view + /// Changes the htqlayout proportion of the staffs on the view void slotChangeProportionFromAction(); /// Note-on received asynchronously -- consider step-by-step editing @@ -811,7 +812,7 @@ public slots: /// Do some background rendering work. void slotRenderSomething(); - void slotSetOperationNameAndStatus(TQString); + void slotSetOperationNameAndtqStatus(TQString); // Update notation view based on track/staff name change void slotUpdateStaffName(); @@ -875,7 +876,7 @@ protected: protected slots: /** * save general Options like all bar positions and status as well - * as the geometry and the recent file list to the configuration + * as the tqgeometry and the recent file list to the configuration * file */ virtual void slotSaveOptions(); @@ -911,13 +912,13 @@ protected: virtual void initStatusBar(); /** - * Place the staffs at the correct x & y coordinates (before layout) + * Place the staffs at the correct x & y coordinates (before tqlayout) */ void positionStaffs(); /** * Place the page pixmaps (if any) at the correct x & y - * coordinates (after layout) + * coordinates (after tqlayout) */ void positionPages(); @@ -928,7 +929,7 @@ protected: void updateThumbnails(bool complete); /** - * setup the layout/font toolbar + * setup the tqlayout/font toolbar */ void initLayoutToolbar(); @@ -939,15 +940,15 @@ protected: */ void toggleNamedToolBar(const TQString& toolBarName, bool* force = 0); - /// Calls all the relevant preparse and layout methods + /// Calls all the relevant preparse and tqlayout methods virtual bool applyLayout(int staffNo = -1, timeT startTime = 0, timeT endTime = 0); /** - * Readjust the size of the canvas after a layout + * Readjust the size of the canvas after a tqlayout * - * Checks the total width computed by the horizontal layout + * Checks the total width computed by the horizontal tqlayout * * @see NotationHLayout#getTotalWidth() */ @@ -1073,8 +1074,8 @@ protected: NotePixmapFactory *m_notePixmapFactory; - NotationHLayout* m_hlayout; - NotationVLayout* m_vlayout; + NotationHLayout* m_htqlayout; + NotationVLayout* m_vtqlayout; ChordNameRuler *m_chordNameRuler; TQWidget *m_tempoRuler; diff --git a/src/gui/editors/notation/NoteCharacter.cpp b/src/gui/editors/notation/NoteCharacter.cpp index 2fcff18..e3beed2 100644 --- a/src/gui/editors/notation/NoteCharacter.cpp +++ b/src/gui/editors/notation/NoteCharacter.cpp @@ -84,7 +84,7 @@ NoteCharacter::getHeight() const return m_pixmap->height(); } -QPoint +TQPoint NoteCharacter::getHotspot() const { return m_hotspot; diff --git a/src/gui/editors/notation/NoteCharacter.h b/src/gui/editors/notation/NoteCharacter.h index 3b27e87..b5f3b84 100644 --- a/src/gui/editors/notation/NoteCharacter.h +++ b/src/gui/editors/notation/NoteCharacter.h @@ -37,7 +37,7 @@ class TQCanvasPixmap; namespace Rosegarden { -class NoteCharacterDrawRep : public QPointArray +class NoteCharacterDrawRep : public TQPointArray { public: NoteCharacterDrawRep(int size = 0) : TQPointArray(size) { } diff --git a/src/gui/editors/notation/NoteCharacterNames.cpp b/src/gui/editors/notation/NoteCharacterNames.cpp index bcd450c..fb4f96e 100644 --- a/src/gui/editors/notation/NoteCharacterNames.cpp +++ b/src/gui/editors/notation/NoteCharacterNames.cpp @@ -45,8 +45,8 @@ const CharName SEMIBREVIS_WHITE = "MUSICAL SYMBOL SEMIBREVIS WHITE"; const CharName SEMIBREVIS_BLACK = "MUSICAL SYMBOL SEMIBREVIS BLACK"; const CharName TRIANGLE_NOTEHEAD_UP_WHITE = "MUSICAL SYMBOL TRIANGLE NOTEHEAD UP WHITE"; const CharName TRIANGLE_NOTEHEAD_UP_BLACK = "MUSICAL SYMBOL TRIANGLE NOTEHEAD UP BLACK"; -const CharName SQUARE_NOTEHEAD_WHITE = "MUSICAL SYMBOL SQUARE NOTEHEAD WHITE"; -const CharName SQUARE_NOTEHEAD_BLACK = "MUSICAL SYMBOL SQUARE NOTEHEAD BLACK"; +const CharName STQUARE_NOTEHEAD_WHITE = "MUSICAL SYMBOL STQUARE NOTEHEAD WHITE"; +const CharName STQUARE_NOTEHEAD_BLACK = "MUSICAL SYMBOL STQUARE NOTEHEAD BLACK"; // These two names are not valid Unicode names. They describe flags // that should be used to compose multi-flag notes, rather than used @@ -70,7 +70,7 @@ const CharName WHOLE_REST = "MUSICAL SYMBOL WHOLE REST"; // Unicode-4 glyph 1D13 const CharName WHOLE_REST_ON_STAFF = "MUSICAL SYMBOL WHOLE REST ON STAFF"; const CharName HALF_REST = "MUSICAL SYMBOL HALF REST"; // Unicode-4 glyph 1D13C const CharName HALF_REST_ON_STAFF = "MUSICAL SYMBOL HALF REST ON STAFF"; -const CharName QUARTER_REST = "MUSICAL SYMBOL QUARTER REST"; +const CharName TQUARTER_REST = "MUSICAL SYMBOL TQUARTER REST"; const CharName EIGHTH_REST = "MUSICAL SYMBOL EIGHTH REST"; const CharName SIXTEENTH_REST = "MUSICAL SYMBOL SIXTEENTH REST"; const CharName THIRTY_SECOND_REST = "MUSICAL SYMBOL THIRTY-SECOND REST"; diff --git a/src/gui/editors/notation/NoteCharacterNames.h b/src/gui/editors/notation/NoteCharacterNames.h index 9022ecd..be062df 100644 --- a/src/gui/editors/notation/NoteCharacterNames.h +++ b/src/gui/editors/notation/NoteCharacterNames.h @@ -49,8 +49,8 @@ extern const CharName SEMIBREVIS_WHITE; extern const CharName SEMIBREVIS_BLACK; extern const CharName TRIANGLE_NOTEHEAD_UP_WHITE; extern const CharName TRIANGLE_NOTEHEAD_UP_BLACK; -extern const CharName SQUARE_NOTEHEAD_WHITE; -extern const CharName SQUARE_NOTEHEAD_BLACK; +extern const CharName STQUARE_NOTEHEAD_WHITE; +extern const CharName STQUARE_NOTEHEAD_BLACK; extern const CharName FLAG_PARTIAL; extern const CharName FLAG_PARTIAL_FINAL; @@ -66,7 +66,7 @@ extern const CharName WHOLE_REST; extern const CharName WHOLE_REST_ON_STAFF; extern const CharName HALF_REST; extern const CharName HALF_REST_ON_STAFF; -extern const CharName QUARTER_REST; +extern const CharName TQUARTER_REST; extern const CharName EIGHTH_REST; extern const CharName SIXTEENTH_REST; extern const CharName THIRTY_SECOND_REST; diff --git a/src/gui/editors/notation/NoteFont.cpp b/src/gui/editors/notation/NoteFont.cpp index 3a0ea18..e494169 100644 --- a/src/gui/editors/notation/NoteFont.cpp +++ b/src/gui/editors/notation/NoteFont.cpp @@ -66,7 +66,7 @@ NoteFont::NoteFont(std::string fontName, int size) : if (size > 0) { if (sizes.find(size) == sizes.end()) { - throw BadNoteFont(qstrtostr(TQString("Font \"%1\" not available in size %2").arg(strtoqstr(fontName)).arg(size))); + throw BadNoteFont(qstrtostr(TQString("Font \"%1\" not available in size %2").tqarg(strtoqstr(fontName)).tqarg(size))); } else { m_size = size; } @@ -86,8 +86,8 @@ NoteFont::NoteFont(std::string fontName, int size) : // Locate our font's pixmap map in the font map, create if necessary std::string fontKey = qstrtostr(TQString("__%1__%2__") - .arg(strtoqstr(m_fontMap.getName())) - .arg(m_size)); + .tqarg(strtoqstr(m_fontMap.getName())) + .tqarg(m_size)); FontPixmapMap::iterator i = m_fontPixmapMap->find(fontKey); if (i == m_fontPixmapMap->end()) { @@ -231,7 +231,8 @@ NoteFont::lookupDrawRep(TQPixmap *pixmap) const if (!pixel) { if (startx < xi) { - a->resize(a->size() + 2, TQGArray::SpeedOptim); + //a->resize(a->size() + 2, TQGArray::SpeedOptim); + a->resize(a->size() + 2); a->setPoint(a->size() - 2, startx, yi); a->setPoint(a->size() - 1, xi - 1, yi); } @@ -286,7 +287,7 @@ NoteFont::getPixmap(CharName charName, TQPixmap &pixmap, bool inverted) const if (!found->isNull()) { if (found->tqmask() == 0) { - std::cerr << "NoteFont::getPixmap: Warning: No automatic mask " + std::cerr << "NoteFont::getPixmap: Warning: No automatic tqmask " << "for character \"" << charName << "\"" << (inverted ? " (inverted)" : "") << " in font \"" << m_fontMap.getName() << "-" << m_size @@ -400,7 +401,7 @@ NoteFont::getColouredPixmap(CharName baseCharName, TQPixmap &pixmap, return false; } - found = new QPixmap + found = new TQPixmap (PixmapFunctions::colourPixmap(basePixmap, hue, minValue)); add(charName, inverted, found); pixmap = *found; @@ -443,13 +444,13 @@ NoteFont::getShadedPixmap(CharName baseCharName, TQPixmap &pixmap, CharName NoteFont::getNameWithColour(CharName base, int hue) const { - return qstrtostr(TQString("%1__%2").arg(hue).arg(strtoqstr(base))); + return qstrtostr(TQString("%1__%2").tqarg(hue).tqarg(strtoqstr(base))); } CharName NoteFont::getNameShaded(CharName base) const { - return qstrtostr(TQString("shaded__%1").arg(strtoqstr(base))); + return qstrtostr(TQString("shaded__%1").tqarg(strtoqstr(base))); } bool @@ -497,7 +498,7 @@ NoteFont::getHotspot(CharName charName, int &x, int &y, bool inverted) const return ok; } -QPoint +TQPoint NoteFont::getHotspot(CharName charName, bool inverted) const { int x, y; diff --git a/src/gui/editors/notation/NoteFontMap.cpp b/src/gui/editors/notation/NoteFontMap.cpp index 9640087..3a77411 100644 --- a/src/gui/editors/notation/NoteFontMap.cpp +++ b/src/gui/editors/notation/NoteFontMap.cpp @@ -57,18 +57,18 @@ NoteFontMap::NoteFontMap(std::string name) : TQString mapFileName; TQString mapFileMixedName = TQString("%1/mappings/%2.xml") - .arg(m_fontDirectory) - .arg(strtoqstr(name)); + .tqarg(m_fontDirectory) + .tqarg(strtoqstr(name)); TQFileInfo mapFileMixedInfo(mapFileMixedName); if (!mapFileMixedInfo.isReadable()) { TQString lowerName = strtoqstr(name).lower(); - lowerName.replace(TQRegExp(" "), "_"); + lowerName.tqreplace(TQRegExp(" "), "_"); TQString mapFileLowerName = TQString("%1/mappings/%2.xml") - .arg(m_fontDirectory) - .arg(lowerName); + .tqarg(m_fontDirectory) + .tqarg(lowerName); TQFileInfo mapFileLowerInfo(mapFileLowerName); @@ -76,11 +76,11 @@ NoteFontMap::NoteFontMap(std::string name) : if (mapFileLowerName != mapFileMixedName) { throw MappingFileReadFailed (qstrtostr(i18n("Can't open font mapping file %1 or %2"). - arg(mapFileMixedName).arg(mapFileLowerName))); + tqarg(mapFileMixedName).tqarg(mapFileLowerName))); } else { throw MappingFileReadFailed (qstrtostr(i18n("Can't open font mapping file %1"). - arg(mapFileMixedName))); + tqarg(mapFileMixedName))); } } else { mapFileName = mapFileLowerName; @@ -287,14 +287,14 @@ NoteFontMap::startElement(const TQString &, const TQString &, fontId = s.toInt(); //!!! need to be able to calculate max size -- checkFont needs - //to take a size argument; unfortunately Qt doesn't seem to be + //to take a size argument; unfortunately TQt doesn't seem to be //able to report to us when a scalable font was loaded in the //wrong size, so large sizes might be significantly inaccurate //as it just stops scaling up any further at somewhere around //120px. We could test whether the metric for the black //notehead is noticeably smaller than the notehead should be, //and reject if so? [update -- no, that doesn't work either, - //Qt just returns the correct metric even if drawing the + //TQt just returns the correct metric even if drawing the //incorrect size] for (int sz = 1; sz <= 30; sz += (sz == 1 ? 1 : 2)) { @@ -595,7 +595,7 @@ NoteFontMap::startElement(const TQString &, const TQString &, m_systemFontNames[n] = name; delete font; } else { - std::cerr << TQString("Warning: Unable to load font \"%1\"").arg(name) << std::endl; + std::cerr << TQString("Warning: Unable to load font \"%1\"").tqarg(name) << std::endl; m_ok = false; } @@ -615,7 +615,7 @@ NoteFontMap::startElement(const TQString &, const TQString &, } if (!have) { std::cerr << TQString("Warning: Unable to load any of the fonts in \"%1\""). - arg(names) << std::endl; + tqarg(names) << std::endl; m_ok = false; } @@ -657,10 +657,10 @@ bool NoteFontMap::error(const TQXmlParseException& exception) { m_errorString = TQString("%1 at line %2, column %3: %4") - .arg(exception.message()) - .arg(exception.lineNumber()) - .arg(exception.columnNumber()) - .arg(m_errorString); + .tqarg(exception.message()) + .tqarg(exception.lineNumber()) + .tqarg(exception.columnNumber()) + .tqarg(m_errorString); return TQXmlDefaultHandler::error(exception); } @@ -668,10 +668,10 @@ bool NoteFontMap::fatalError(const TQXmlParseException& exception) { m_errorString = TQString("%1 at line %2, column %3: %4") - .arg(exception.message()) - .arg(exception.lineNumber()) - .arg(exception.columnNumber()) - .arg(m_errorString); + .tqarg(exception.message()) + .tqarg(exception.lineNumber()) + .tqarg(exception.columnNumber()) + .tqarg(m_errorString); return TQXmlDefaultHandler::fatalError(exception); } @@ -705,20 +705,20 @@ bool NoteFontMap::checkFile(int size, std::string &src) const { TQString pixmapFileMixedName = TQString("%1/%2/%3/%4.xpm") - .arg(m_fontDirectory) - .arg(strtoqstr(m_srcDirectory)) - .arg(size) - .arg(strtoqstr(src)); + .tqarg(m_fontDirectory) + .tqarg(strtoqstr(m_srcDirectory)) + .tqarg(size) + .tqarg(strtoqstr(src)); TQFileInfo pixmapFileMixedInfo(pixmapFileMixedName); if (!pixmapFileMixedInfo.isReadable()) { TQString pixmapFileLowerName = TQString("%1/%2/%3/%4.xpm") - .arg(m_fontDirectory) - .arg(strtoqstr(m_srcDirectory).lower()) - .arg(size) - .arg(strtoqstr(src)); + .tqarg(m_fontDirectory) + .tqarg(strtoqstr(m_srcDirectory).lower()) + .tqarg(size) + .tqarg(strtoqstr(src)); TQFileInfo pixmapFileLowerInfo(pixmapFileLowerName); @@ -991,7 +991,7 @@ NoteFontMap::HotspotData::getHotspot(int size, int width, int height, return true; } -QStringList +TQStringList NoteFontMap::getSystemFontNames() const { TQStringList names; diff --git a/src/gui/editors/notation/NoteFontMap.h b/src/gui/editors/notation/NoteFontMap.h index 52d87fa..9dac3f1 100644 --- a/src/gui/editors/notation/NoteFontMap.h +++ b/src/gui/editors/notation/NoteFontMap.h @@ -47,7 +47,7 @@ namespace Rosegarden -class NoteFontMap : public QXmlDefaultHandler +class NoteFontMap : public TQXmlDefaultHandler { public: typedef Exception MappingFileReadFailed; diff --git a/src/gui/editors/notation/NoteFontViewer.cpp b/src/gui/editors/notation/NoteFontViewer.cpp index d3dc2a3..918c7ac 100644 --- a/src/gui/editors/notation/NoteFontViewer.cpp +++ b/src/gui/editors/notation/NoteFontViewer.cpp @@ -50,7 +50,7 @@ NoteFontViewer::slotViewChanged(int i) for (int r = 0; r < 256; ++r) { if (m_frame->hasRow(r)) { - m_rows->insertItem(TQString("%1").arg(r)); + m_rows->insertItem(TQString("%1").tqarg(r)); if (firstRow < 0) firstRow = r; } @@ -81,10 +81,10 @@ NoteFontViewer::slotFontChanged(const TQString &s) slotViewChanged(m_view->currentItem()); } -NoteFontViewer::NoteFontViewer(TQWidget *parent, TQString noteFontName, +NoteFontViewer::NoteFontViewer(TQWidget *tqparent, TQString noteFontName, TQStringList fontNames, int pixelSize) : - KDialogBase(parent, 0, true, - i18n("Note Font Viewer: %1").arg(noteFontName), Close) + KDialogBase(tqparent, 0, true, + i18n("Note Font Viewer: %1").tqarg(noteFontName), Close) { TQVBox *box = makeVBoxMainWidget(); KToolBar* controls = new KToolBar(box); diff --git a/src/gui/editors/notation/NoteFontViewer.h b/src/gui/editors/notation/NoteFontViewer.h index b31df03..17b41a7 100644 --- a/src/gui/editors/notation/NoteFontViewer.h +++ b/src/gui/editors/notation/NoteFontViewer.h @@ -44,9 +44,10 @@ class FontViewFrame; class NoteFontViewer : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - NoteFontViewer(TQWidget *parent, TQString noteFontName, + NoteFontViewer(TQWidget *tqparent, TQString noteFontName, TQStringList systemFontNames, int pixelSize); protected slots: diff --git a/src/gui/editors/notation/NoteInserter.cpp b/src/gui/editors/notation/NoteInserter.cpp index c2533e5..7827761 100644 --- a/src/gui/editors/notation/NoteInserter.cpp +++ b/src/gui/editors/notation/NoteInserter.cpp @@ -86,8 +86,8 @@ NoteInserter::NoteInserter(NotationView* view) for (unsigned int i = 0; i < 6; ++i) { - icon = QIconSet - (NotePixmapFactory::toQPixmap(NotePixmapFactory:: + icon = TQIconSet + (NotePixmapFactory::toTQPixmap(NotePixmapFactory:: makeToolbarPixmap(m_actionsAccidental[i][3]))); KRadioAction* noteAction = new KRadioAction(i18n(m_actionsAccidental[i][0]), icon, 0, this, @@ -97,14 +97,14 @@ NoteInserter::NoteInserter(NotationView* view) noteAction->setExclusiveGroup("accidentals"); } - icon = QIconSet - (NotePixmapFactory::toQPixmap(NotePixmapFactory:: + icon = TQIconSet + (NotePixmapFactory::toTQPixmap(NotePixmapFactory:: makeToolbarPixmap("dotted-crotchet"))); new KToggleAction(i18n("Dotted note"), icon, 0, this, TQT_SLOT(slotToggleDot()), actionCollection(), "toggle_dot"); - icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory:: + icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory:: makeToolbarPixmap("select"))); new KAction(i18n("Switch to Select Tool"), icon, 0, this, TQT_SLOT(slotSelectSelected()), actionCollection(), @@ -114,8 +114,8 @@ NoteInserter::NoteInserter(NotationView* view) TQT_SLOT(slotEraseSelected()), actionCollection(), "erase"); - icon = QIconSet - (NotePixmapFactory::toQPixmap(NotePixmapFactory:: + icon = TQIconSet + (NotePixmapFactory::toTQPixmap(NotePixmapFactory:: makeToolbarPixmap("rest-crotchet"))); new KAction(i18n("Switch to Inserting Rests"), icon, 0, this, TQT_SLOT(slotRestsSelected()), actionCollection(), @@ -123,7 +123,7 @@ NoteInserter::NoteInserter(NotationView* view) createMenu("noteinserter.rc"); - connect(m_parentView, TQT_SIGNAL(changeAccidental(Accidental, bool)), + connect(m_tqparentView, TQT_SIGNAL(changeAccidental(Accidental, bool)), this, TQT_SLOT(slotSetAccidental(Accidental, bool))); } @@ -137,7 +137,7 @@ NoteInserter::NoteInserter(const TQString& menuName, NotationView* view) m_lastAccidental(Accidentals::NoAccidental), m_followAccidental(false) { - connect(m_parentView, TQT_SIGNAL(changeAccidental(Accidental, bool)), + connect(m_tqparentView, TQT_SIGNAL(changeAccidental(Accidental, bool)), this, TQT_SLOT(slotSetAccidental(Accidental, bool))); } @@ -147,7 +147,7 @@ NoteInserter::~NoteInserter() void NoteInserter::ready() { m_clickHappened = false; - m_nParentView->setCanvasCursor(Qt::crossCursor); + m_nParentView->setCanvasCursor(TQt::crossCursor); m_nParentView->setHeightTracking(true); } @@ -623,37 +623,37 @@ void NoteInserter::slotSetAccidental(Accidental accidental, void NoteInserter::slotNoAccidental() { - m_parentView->actionCollection()->action("no_accidental")->activate(); + m_tqparentView->actionCollection()->action("no_accidental")->activate(); } void NoteInserter::slotFollowAccidental() { - m_parentView->actionCollection()->action("follow_accidental")->activate(); + m_tqparentView->actionCollection()->action("follow_accidental")->activate(); } void NoteInserter::slotSharp() { - m_parentView->actionCollection()->action("sharp_accidental")->activate(); + m_tqparentView->actionCollection()->action("sharp_accidental")->activate(); } void NoteInserter::slotFlat() { - m_parentView->actionCollection()->action("flat_accidental")->activate(); + m_tqparentView->actionCollection()->action("flat_accidental")->activate(); } void NoteInserter::slotNatural() { - m_parentView->actionCollection()->action("natural_accidental")->activate(); + m_tqparentView->actionCollection()->action("natural_accidental")->activate(); } void NoteInserter::slotDoubleSharp() { - m_parentView->actionCollection()->action("double_sharp_accidental")->activate(); + m_tqparentView->actionCollection()->action("double_sharp_accidental")->activate(); } void NoteInserter::slotDoubleFlat() { - m_parentView->actionCollection()->action("double_flat_accidental")->activate(); + m_tqparentView->actionCollection()->action("double_flat_accidental")->activate(); } void NoteInserter::slotToggleDot() @@ -661,8 +661,8 @@ void NoteInserter::slotToggleDot() m_noteDots = (m_noteDots) ? 0 : 1; Note note(m_noteType, m_noteDots); TQString actionName(NotationStrings::getReferenceName(note)); - actionName.replace(TQRegExp("-"), "_"); - KAction *action = m_parentView->actionCollection()->action(actionName); + actionName.tqreplace(TQRegExp("-"), "_"); + KAction *action = m_tqparentView->actionCollection()->action(actionName); if (!action) { std::cerr << "WARNING: No such action as " << actionName << std::endl; } else { @@ -677,20 +677,20 @@ void NoteInserter::slotToggleAutoBeam() void NoteInserter::slotEraseSelected() { - m_parentView->actionCollection()->action("erase")->activate(); + m_tqparentView->actionCollection()->action("erase")->activate(); } void NoteInserter::slotSelectSelected() { - m_parentView->actionCollection()->action("select")->activate(); + m_tqparentView->actionCollection()->action("select")->activate(); } void NoteInserter::slotRestsSelected() { Note note(m_noteType, m_noteDots); TQString actionName(NotationStrings::getReferenceName(note, true)); - actionName.replace(TQRegExp("-"), "_"); - KAction *action = m_parentView->actionCollection()->action(actionName); + actionName.tqreplace(TQRegExp("-"), "_"); + KAction *action = m_tqparentView->actionCollection()->action(actionName); if (!action) { std::cerr << "WARNING: No such action as " << actionName << std::endl; } else { diff --git a/src/gui/editors/notation/NoteInserter.h b/src/gui/editors/notation/NoteInserter.h index a2467a1..81f035d 100644 --- a/src/gui/editors/notation/NoteInserter.h +++ b/src/gui/editors/notation/NoteInserter.h @@ -52,6 +52,7 @@ class Event; class NoteInserter : public NotationTool { Q_OBJECT + TQ_OBJECT friend class NotationToolBox; diff --git a/src/gui/editors/notation/NotePixmapFactory.cpp b/src/gui/editors/notation/NotePixmapFactory.cpp index b41ecae..e02e14e 100644 --- a/src/gui/editors/notation/NotePixmapFactory.cpp +++ b/src/gui/editors/notation/NotePixmapFactory.cpp @@ -289,8 +289,8 @@ NotePixmapFactory::getSize() const return m_font->getSize(); } -QPixmap -NotePixmapFactory::toQPixmap(TQCanvasPixmap* cp) +TQPixmap +NotePixmapFactory::toTQPixmap(TQCanvasPixmap* cp) { TQPixmap p = *cp; delete cp; @@ -330,8 +330,8 @@ NotePixmapFactory::makeNotePixmap(const NotePixmapParameters ¶ms) //#define ROSE_DEBUG_NOTE_PIXMAP_FACTORY #ifdef ROSE_DEBUG_NOTE_PIXMAP_FACTORY - m_p->painter().setPen(Qt::red); - m_p->painter().setBrush(Qt::red); + m_p->painter().setPen(TQt::red); + m_p->painter().setBrush(TQt::red); m_p->drawLine(0, 0, 0, m_generatedHeight - 1); m_p->drawLine(m_generatedWidth - 1, 0, @@ -570,7 +570,7 @@ NotePixmapFactory::drawNoteAux(const NotePixmapParameters ¶ms, if (m_selected) m_p->painter().setPen(GUIPalette::getColour(GUIPalette::SelectedElement)); else - m_p->painter().setPen(Qt::black); + m_p->painter().setPen(TQt::black); // If we draw stems after beams, instead of beams after stems, // beam anti-aliasing won't damage stems but we have to shorten the @@ -893,7 +893,7 @@ NotePixmapFactory::drawMarks(bool isStemmed, m_p->painter().setFont(m_textMarkFont); if (!m_inPrinterMethod) - m_p->maskPainter().setFont(m_textMarkFont); + m_p->tqmaskPainter().setFont(m_textMarkFont); int x = m_left + m_noteBodyWidth / 2 - bounds.width() / 2; int y = (normalMarksAreAbove ? @@ -923,7 +923,7 @@ NotePixmapFactory::drawMarks(bool isStemmed, if (m_selected) m_p->painter().setPen(GUIPalette::getColour(GUIPalette::SelectedElement)); else - m_p->painter().setPen(Qt::black); + m_p->painter().setPen(TQt::black); if (!Marks::isFingeringMark(*i)) { int x = m_left + m_noteBodyWidth / 2; @@ -978,7 +978,7 @@ NotePixmapFactory::drawMarks(bool isStemmed, m_p->painter().setFont(m_fingeringFont); if (!m_inPrinterMethod) - m_p->maskPainter().setFont(m_fingeringFont); + m_p->tqmaskPainter().setFont(m_fingeringFont); int x = m_left + m_noteBodyWidth / 2 - bounds.width() / 2; int y = m_above - dy - 3; @@ -1025,7 +1025,7 @@ NotePixmapFactory::drawLegerLines(const NotePixmapParameters ¶ms) if (m_selected) m_p->painter().setPen(GUIPalette::getColour(GUIPalette::SelectedElement)); else - m_p->painter().setPen(Qt::black); + m_p->painter().setPen(TQt::black); } x0 = m_left - m_noteBodyWidth / 5 - 1; x1 = m_left + m_noteBodyWidth + m_noteBodyWidth / 5 /* + 1 */; @@ -1257,11 +1257,11 @@ NotePixmapFactory::drawFlags(int flagCount, y, *flagChar.getPixmap()); - m_p->begin(m_generatedPixmap, m_generatedMask); + m_p->begin(TQT_TQPAINTDEVICE(m_generatedPixmap), TQT_TQPAINTDEVICE(m_generatedMask)); } else { - // No problem with mask here + // No problem with tqmask here m_p->drawNoteCharacter(m_left + s1.x() - hotspot.x(), y, flagChar); @@ -1328,7 +1328,7 @@ NotePixmapFactory::drawShallowLine(int x0, int y0, int x1, int y1, if (m_selected) m_p->painter().setBrush(GUIPalette::getColour(GUIPalette::SelectedElement)); else - m_p->painter().setBrush(Qt::black); + m_p->painter().setBrush(TQt::black); } if (thickness < 4) { for (int i = 0; i < thickness; ++i) { @@ -1400,7 +1400,7 @@ NotePixmapFactory::drawShallowLine(int x0, int y0, int x1, int y1, << ", g = " << g << ", dg1 = " << dg1 << ", dg2 = " << dg2 << ", seg = " << segment << ", q = " << quartile << endl; */ - // I don't know enough about Qt to be sure of this, but I + // I don't know enough about TQt to be sure of this, but I // suspect this may be some of the most inefficient code ever // written: @@ -1419,7 +1419,7 @@ NotePixmapFactory::drawShallowLine(int x0, int y0, int x1, int y1, if (m_selected) { m_p->painter().setPen(GUIPalette::getColour(GUIPalette::SelectedElement)); } else { - m_p->painter().setPen(Qt::black); + m_p->painter().setPen(TQt::black); } } @@ -1440,7 +1440,7 @@ NotePixmapFactory::drawShallowLine(int x0, int y0, int x1, int y1, ++cx; } - m_p->painter().setPen(Qt::black); + m_p->painter().setPen(TQt::black); } void @@ -1630,7 +1630,7 @@ NotePixmapFactory::drawTuplingLine(const NotePixmapParameters ¶ms) m_p->painter().setFont(m_tupletCountFont); if (!m_inPrinterMethod) - m_p->maskPainter().setFont(m_tupletCountFont); + m_p->tqmaskPainter().setFont(m_tupletCountFont); int textX = endX + countSpace; int textY = endY + cr.height() / 2; @@ -1758,7 +1758,7 @@ NotePixmapFactory::makeRestPixmap(const NotePixmapParameters ¶ms) } else { NotePixmapCache::iterator ci(m_dottedRestCache->find(charName)); if (ci != m_dottedRestCache->end()) - return new QCanvasPixmap + return new TQCanvasPixmap (*ci->second, TQPoint(ci->second->offsetX(), ci->second->offsetY())); else @@ -1772,7 +1772,7 @@ NotePixmapFactory::makeRestPixmap(const NotePixmapParameters ¶ms) TQCanvasPixmap* canvasMap = makeCanvasPixmap(hotspot); if (encache) { m_dottedRestCache->insert(std::pair<CharName, TQCanvasPixmap*> - (charName, new QCanvasPixmap + (charName, new TQCanvasPixmap (*canvasMap, hotspot))); } return canvasMap; @@ -1880,7 +1880,7 @@ NotePixmapFactory::makeClefPixmap(const Clef &clef) else if (adjustedOctave < 8) adjustedOctave++; - TQString text = TQString("%1").arg(adjustedOctave); + TQString text = TQString("%1").tqarg(adjustedOctave); TQRect rect = m_clefOttavaFontMetrics.boundingRect(text); createPixmapAndMask(plain.getWidth(), @@ -1894,13 +1894,13 @@ NotePixmapFactory::makeClefPixmap(const Clef &clef) m_p->painter().setFont(m_clefOttavaFont); if (!m_inPrinterMethod) - m_p->maskPainter().setFont(m_clefOttavaFont); + m_p->tqmaskPainter().setFont(m_clefOttavaFont); m_p->drawText(plain.getWidth() / 2 - rect.width() / 2, oct < 0 ? plain.getHeight() + rect.height() - 1 : rect.height(), text); - m_p->painter().setPen(Qt::black); + m_p->painter().setPen(TQt::black); TQPoint hotspot(plain.getHotspot()); if (oct > 0) hotspot.setY(hotspot.y() + rect.height()); return makeCanvasPixmap(hotspot, true); @@ -2195,7 +2195,7 @@ NotePixmapFactory::makeTrackHeaderPixmap( int offset = (height - 10 * lw -1) / 2; // Draw staff lines - m_p->painter().setPen(TQPen(Qt::black, getStaffLineThickness())); + m_p->painter().setPen(TQPen(TQt::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); @@ -2204,7 +2204,7 @@ NotePixmapFactory::makeTrackHeaderPixmap( if (header->isAClefToDraw()) { const Clef &clef = header->getClef(); // TODO : use colours from GUIPalette - colour = header->isClefInconsistent() ? Qt::red : Qt::black; + colour = header->isClefInconsistent() ? TQt::red : TQt::black; int hue, sat, val; colour.getHsv(&hue, &sat, &val); @@ -2228,13 +2228,13 @@ NotePixmapFactory::makeTrackHeaderPixmap( else if (adjustedOctave < 8) adjustedOctave++; - TQString text = TQString("%1").arg(adjustedOctave); + TQString text = TQString("%1").tqarg(adjustedOctave); TQRect rect = m_clefOttavaFontMetrics.boundingRect(text); m_p->painter().setPen(colour); m_p->painter().setFont(m_clefOttavaFont); - // m_p->maskPainter().setFont(m_clefOttavaFont); + // m_p->tqmaskPainter().setFont(m_clefOttavaFont); int xpos = maxDelta + clefChar.getWidth() / 2 - rect.width() / 2; int ypos = y - clefChar.getHotspot().y() + offset + (oct < 0 ? clefChar.getHeight() + rect.height() - 1 : - rect.height() / 3); @@ -2242,7 +2242,7 @@ NotePixmapFactory::makeTrackHeaderPixmap( } // TODO : use colours from GUIPalette - colour = header->isKeyInconsistent() ? Qt::red : Qt::black; + colour = header->isKeyInconsistent() ? TQt::red : TQt::black; // Draw the key signature if any @@ -2273,7 +2273,7 @@ NotePixmapFactory::makeTrackHeaderPixmap( } m_p->painter().setFont(m_trackHeaderFont); - // m_p->maskPainter().setFont(m_trackHeaderFont); + // m_p->tqmaskPainter().setFont(m_trackHeaderFont); TQString text; TQString textLine; @@ -2288,7 +2288,7 @@ NotePixmapFactory::makeTrackHeaderPixmap( // Write upper text (track name and track label) - m_p->painter().setPen(Qt::black); + m_p->painter().setPen(TQt::black); text = header->getUpperText(); int numberOfTextLines = header->getNumberOfTextLines(); @@ -2300,7 +2300,7 @@ NotePixmapFactory::makeTrackHeaderPixmap( if (!text.isEmpty()) { // String too long : cut it and replace last character by dots int len = textLine.length(); - if (len > 1) textLine.replace(len - 1, 1, i18n("...")); + if (len > 1) textLine.tqreplace(len - 1, 1, i18n("...")); } } else { textLine = getOneLine(text, width - charWidth / 2); @@ -2313,9 +2313,9 @@ NotePixmapFactory::makeTrackHeaderPixmap( // Write transposition text // TODO : use colours from GUIPalette - colour = header->isTransposeInconsistent() ? Qt::red : Qt::black; + colour = header->isTransposeInconsistent() ? TQt::red : TQt::black; m_p->painter().setFont(m_trackHeaderBoldFont); - // m_p->maskPainter().setFont(m_trackHeaderBoldFont); + // m_p->tqmaskPainter().setFont(m_trackHeaderBoldFont); m_p->painter().setPen(colour); m_p->drawText(width - transposeWidth - charWidth / 4, @@ -2327,9 +2327,9 @@ NotePixmapFactory::makeTrackHeaderPixmap( // Write lower text (segment label) // TODO : use colours from GUIPalette - colour = header->isLabelInconsistent() ? Qt::red : Qt::black; + colour = header->isLabelInconsistent() ? TQt::red : TQt::black; m_p->painter().setFont(m_trackHeaderFont); - // m_p->maskPainter().setFont(m_trackHeaderFont); + // m_p->tqmaskPainter().setFont(m_trackHeaderFont); m_p->painter().setPen(colour); text = header->getLowerText(); @@ -2344,7 +2344,7 @@ NotePixmapFactory::makeTrackHeaderPixmap( if ((l == numberOfTextLines) && !text.isEmpty()) { // String too long : cut it and replace last character by dots int len = textLine.length(); - if (len > 1) textLine.replace(len - 1, 1, i18n("...")); + if (len > 1) textLine.tqreplace(len - 1, 1, i18n("...")); } m_p->drawText(charWidth / 4, lowerTextY, textLine); @@ -2376,7 +2376,7 @@ NotePixmapFactory::getTrackHeaderTextLineSpacing() return m_trackHeaderFont.pixelSize() * 3 / 2; } -QString +TQString NotePixmapFactory::getOneLine(TQString &text, int width) { TQString str; @@ -2603,7 +2603,7 @@ NotePixmapFactory::drawHairpinAux(int length, bool isCrescendo, right, height / 2 - 1, thickness, smooth); } - m_p->painter().setPen(Qt::black); + m_p->painter().setPen(TQt::black); if (painter) { painter->restore(); @@ -2638,14 +2638,14 @@ NotePixmapFactory::makeSlurPixmap(int length, int dy, bool above, bool phrasing) TQPixmap newPixmap(i); TQCanvasPixmap *p = new TQCanvasPixmap(newPixmap, hotspot); p->setMask(PixmapFunctions::generateMask(newPixmap, - Qt::white.rgb())); + TQt::white.rgb())); return p; } else { TQCanvasPixmap *p = new TQCanvasPixmap(*m_generatedPixmap, hotspot); p->setMask(PixmapFunctions::generateMask(*m_generatedPixmap, - Qt::white.rgb())); + TQt::white.rgb())); delete m_generatedPixmap; delete m_generatedMask; return p; @@ -2759,12 +2759,12 @@ NotePixmapFactory::drawSlurAux(int length, int dy, bool above, painter->rotate(theta); } else { m_p->painter().save(); - m_p->maskPainter().save(); + m_p->tqmaskPainter().save(); m_p->painter().translate(x, y); - m_p->maskPainter().translate(x, y); + m_p->tqmaskPainter().translate(x, y); if (rotate) { m_p->painter().rotate(theta); - m_p->maskPainter().rotate(theta); + m_p->tqmaskPainter().rotate(theta); } } @@ -2780,13 +2780,13 @@ NotePixmapFactory::drawSlurAux(int length, int dy, bool above, m.translate(hotspot.x(), hotspot.y()); m.rotate(theta); m_p->painter().setWorldMatrix(m); - m_p->maskPainter().setWorldMatrix(m); + m_p->tqmaskPainter().setWorldMatrix(m); } if (m_selected) m_p->painter().setPen(GUIPalette::getColour(GUIPalette::SelectedElement)); else if (m_shaded) { - m_p->painter().setPen(Qt::gray); + m_p->painter().setPen(TQt::gray); } havePixmap = true; } @@ -2835,7 +2835,7 @@ NotePixmapFactory::drawSlurAux(int length, int dy, bool above, } if (m_selected) { - m_p->painter().setPen(Qt::black); + m_p->painter().setPen(TQt::black); } TQWMatrix::setTransformationMode(mode); @@ -2843,7 +2843,7 @@ NotePixmapFactory::drawSlurAux(int length, int dy, bool above, if (painter) { painter->restore(); if (!m_inPrinterMethod) - m_p->maskPainter().restore(); + m_p->tqmaskPainter().restore(); } } @@ -2890,29 +2890,29 @@ NotePixmapFactory::drawOttavaAux(int length, int octavesUp, m_p->beginExternal(painter); painter->translate(x - backpedal, y - height); } else { - NOTATION_DEBUG << "NotePixmapFactory::drawOttavaAux: making pixmap and mask " << width << "x" << height << endl; + NOTATION_DEBUG << "NotePixmapFactory::drawOttavaAux: making pixmap and tqmask " << width << "x" << height << endl; createPixmapAndMask(width, height); } int thickness = getStemThickness(); - TQPen pen(Qt::black, thickness, Qt::DotLine); + TQPen pen(TQt::black, thickness, TQt::DotLine); if (m_selected) { m_p->painter().setPen(GUIPalette::getColour(GUIPalette::SelectedElement)); pen.setColor(GUIPalette::getColour(GUIPalette::SelectedElement)); } else if (m_shaded) { - m_p->painter().setPen(Qt::gray); - pen.setColor(Qt::gray); + m_p->painter().setPen(TQt::gray); + pen.setColor(TQt::gray); } m_p->painter().setFont(m_ottavaFont); if (!m_inPrinterMethod) - m_p->maskPainter().setFont(m_ottavaFont); + m_p->tqmaskPainter().setFont(m_ottavaFont); m_p->drawText(0, m_ottavaFontMetrics.ascent(), label); m_p->painter().setPen(pen); - // if (!m_inPrinterMethod) m_p->maskPainter().setPen(pen); + // if (!m_inPrinterMethod) m_p->tqmaskPainter().setPen(pen); int x0 = m_ottavaFontMetrics.width(label) + thickness; int x1 = width - thickness; @@ -2925,7 +2925,7 @@ NotePixmapFactory::drawOttavaAux(int length, int octavesUp, pen.setStyle(Qt::SolidLine); m_p->painter().setPen(pen); - // if (!m_inPrinterMethod) m_p->maskPainter().setPen(pen); + // if (!m_inPrinterMethod) m_p->tqmaskPainter().setPen(pen); NOTATION_DEBUG << "NotePixmapFactory::drawOttavaAux: drawing " << x1 << "," << y0 << " to " << x1 << "," << y1 << ", thickness " << thickness << endl; @@ -2933,7 +2933,7 @@ NotePixmapFactory::drawOttavaAux(int length, int octavesUp, m_p->painter().setPen(TQPen()); if (!m_inPrinterMethod) - m_p->maskPainter().setPen(TQPen()); + m_p->tqmaskPainter().setPen(TQPen()); if (painter) { painter->restore(); @@ -3038,12 +3038,12 @@ NotePixmapFactory::makeTimeSigPixmap(const TimeSignature& sig) if (m_selected) { m_p->painter().setPen(GUIPalette::getColour(GUIPalette::SelectedElement)); } else if (m_shaded) { - m_p->painter().setPen(Qt::gray); + m_p->painter().setPen(TQt::gray); } m_p->painter().setFont(m_bigTimeSigFont); if (!m_inPrinterMethod) - m_p->maskPainter().setFont(m_bigTimeSigFont); + m_p->tqmaskPainter().setFont(m_bigTimeSigFont); m_p->drawText(0, r.height() + dy, c); @@ -3056,7 +3056,7 @@ NotePixmapFactory::makeTimeSigPixmap(const TimeSignature& sig) } } - m_p->painter().setPen(Qt::black); + m_p->painter().setPen(TQt::black); return makeCanvasPixmap(TQPoint(0, r.height() / 2 + dy)); } else { @@ -3117,12 +3117,12 @@ NotePixmapFactory::makeTimeSigPixmap(const TimeSignature& sig) if (m_selected) { m_p->painter().setPen(GUIPalette::getColour(GUIPalette::SelectedElement)); } else if (m_shaded) { - m_p->painter().setPen(Qt::gray); + m_p->painter().setPen(TQt::gray); } m_p->painter().setFont(m_timeSigFont); if (!m_inPrinterMethod) - m_p->maskPainter().setFont(m_timeSigFont); + m_p->tqmaskPainter().setFont(m_timeSigFont); x = (width - numR.width()) / 2 - 1; m_p->drawText(x, denomR.height(), numS); @@ -3130,7 +3130,7 @@ NotePixmapFactory::makeTimeSigPixmap(const TimeSignature& sig) x = (width - denomR.width()) / 2 - 1; m_p->drawText(x, denomR.height() * 2 + (getNoteBodyHeight() / 2) - 1, denomS); - m_p->painter().setPen(Qt::black); + m_p->painter().setPen(TQt::black); return makeCanvasPixmap(TQPoint(0, denomR.height() + (getNoteBodyHeight() / 4) - 1), @@ -3163,7 +3163,7 @@ int NotePixmapFactory::getTimeSigWidth(const TimeSignature &sig) const } } -QFont +TQFont NotePixmapFactory::getTextFont(const Text &text) const { std::string type(text.getTextType()); @@ -3253,7 +3253,7 @@ NotePixmapFactory::getTextFont(const Text &text) const << " for type " << type << endl; NOTATION_DEBUG << "NotePixmapFactory::getTextFont: returning font '" - << textFont.toString() << "' for type " << type.c_str() + << TQString(textFont.toString()).ascii() << "' for type " << type.c_str() << " text : " << text.getText().c_str() << endl; m_textFontCache[type.c_str()] = textFont; @@ -3293,8 +3293,8 @@ NotePixmapFactory::makeGuitarChordPixmap(const Guitar::Fingering &fingering, m_p->painter().setPen(GUIPalette::getColour(GUIPalette::SelectedElement)); m_p->painter().setBrush(GUIPalette::getColour(GUIPalette::SelectedElement)); } else { - m_p->painter().setPen(Qt::black); - m_p->painter().setBrush(Qt::black); + m_p->painter().setPen(TQt::black); + m_p->painter().setBrush(TQt::black); } Guitar::NoteSymbols ns(Guitar::Fingering::DEFAULT_NB_STRINGS, FingeringBox::DEFAULT_NB_DISPLAYED_FRETS); @@ -3349,15 +3349,15 @@ NotePixmapFactory::drawTextAux(const Text &text, if (m_selected) m_p->painter().setPen(GUIPalette::getColour(GUIPalette::SelectedElement)); else if (m_shaded) - m_p->painter().setPen(Qt::gray); + m_p->painter().setPen(TQt::gray); m_p->painter().setFont(textFont); if (!m_inPrinterMethod) - m_p->maskPainter().setFont(textFont); + m_p->tqmaskPainter().setFont(textFont); m_p->drawText(offset, textMetrics.ascent() + offset, s); - m_p->painter().setPen(Qt::black); + m_p->painter().setPen(TQt::black); if (painter) { painter->restore(); @@ -3386,7 +3386,7 @@ NotePixmapFactory::makeAnnotationPixmap(const Text &text, const bool isLilyPondD int sideGap = getLineSpacing() / 4 + 1; TQRect r = textMetrics.boundingRect - (0, 0, annotationWidth, annotationHeight, Qt::WordBreak, s); + (0, 0, annotationWidth, annotationHeight, TQt::WordBreak, s); int pixmapWidth = r.width() + sideGap * 2; int pixmapHeight = r.height() + topGap + bottomGap; @@ -3396,11 +3396,11 @@ NotePixmapFactory::makeAnnotationPixmap(const Text &text, const bool isLilyPondD if (m_selected) m_p->painter().setPen(GUIPalette::getColour(GUIPalette::SelectedElement)); else if (m_shaded) - m_p->painter().setPen(Qt::gray); + m_p->painter().setPen(TQt::gray); m_p->painter().setFont(textFont); if (!m_inPrinterMethod) - m_p->maskPainter().setFont(textFont); + m_p->tqmaskPainter().setFont(textFont); if (isLilyPondDirective) { m_p->painter().setBrush(GUIPalette::getColour(GUIPalette::TextLilyPondDirectiveBackground)); @@ -3410,16 +3410,16 @@ NotePixmapFactory::makeAnnotationPixmap(const Text &text, const bool isLilyPondD m_p->drawRect(0, 0, pixmapWidth, pixmapHeight); - m_p->painter().setBrush(Qt::black); + m_p->painter().setBrush(TQt::black); m_p->painter().drawText(TQRect(sideGap, topGap, annotationWidth + sideGap, pixmapHeight - bottomGap), - Qt::WordBreak, s); + TQt::WordBreak, s); /* unnecessary following the rectangle draw m_pm.drawText(TQRect(sideGap, topGap, annotationWidth + sideGap, annotationHeight + topGap), - Qt::WordBreak, s); + TQt::WordBreak, s); */ return makeCanvasPixmap(TQPoint(0, 0)); @@ -3427,33 +3427,33 @@ NotePixmapFactory::makeAnnotationPixmap(const Text &text, const bool isLilyPondD void NotePixmapFactory::createPixmapAndMask(int width, int height, - int maskWidth, int maskHeight) + int tqmaskWidth, int tqmaskHeight) { - if (maskWidth < 0) - maskWidth = width; - if (maskHeight < 0) - maskHeight = height; + if (tqmaskWidth < 0) + tqmaskWidth = width; + if (tqmaskHeight < 0) + tqmaskHeight = height; m_generatedWidth = width; m_generatedHeight = height; m_generatedPixmap = new TQPixmap(width, height); - m_generatedMask = new TQBitmap(maskWidth, maskHeight); + m_generatedMask = new TQBitmap(tqmaskWidth, tqmaskHeight); static unsigned long total = 0; total += width * height; // NOTATION_DEBUG << "createPixmapAndMask: " << width << "x" << height << " (" << (width*height) << " px, " << total << " total)" << endl; - // clear up pixmap and mask + // clear up pixmap and tqmask m_generatedPixmap->fill(); - m_generatedMask->fill(Qt::color0); + m_generatedMask->fill(TQt::color0); // initiate painting - m_p->begin(m_generatedPixmap, m_generatedMask); + m_p->begin(TQT_TQPAINTDEVICE(m_generatedPixmap), TQT_TQPAINTDEVICE(m_generatedMask)); - m_p->painter().setPen(Qt::black); - m_p->painter().setBrush(Qt::black); - m_p->maskPainter().setPen(Qt::white); - m_p->maskPainter().setBrush(Qt::white); + m_p->painter().setPen(TQt::black); + m_p->painter().setBrush(TQt::black); + m_p->tqmaskPainter().setPen(TQt::white); + m_p->tqmaskPainter().setBrush(TQt::white); } TQCanvasPixmap* @@ -3538,7 +3538,7 @@ NotePixmapFactory::getCharacter(CharName name, NoteCharacter &ch, return m_font->getCharacter(name, ch, charType, inverted); } -QPoint +TQPoint NotePixmapFactory::m_pointZero; diff --git a/src/gui/editors/notation/NotePixmapFactory.h b/src/gui/editors/notation/NotePixmapFactory.h index 20d2ae6..cfc93dc 100644 --- a/src/gui/editors/notation/NotePixmapFactory.h +++ b/src/gui/editors/notation/NotePixmapFactory.h @@ -58,7 +58,7 @@ class Clef; class TrackHeader; /** - * Generates QCanvasPixmaps for various notation items. + * Generates TQCanvasPixmaps for various notation items. */ class NotePixmapFactory @@ -140,7 +140,7 @@ public: TQCanvasPixmap* makeTrackHeaderPixmap(int width, int height, TrackHeader *header); - // Bounding box and other geometry methods: + // Bounding box and other tqgeometry methods: int getNoteBodyWidth (Note::Type = Note::Crotchet) const; @@ -199,7 +199,7 @@ public: /** - * We need this function because as of Qt 3.1, QCanvasPixmap + * We need this function because as of TQt 3.1, TQCanvasPixmap * is no longer copyable by value, while TQPixmap still is. * * So all the makeXXPixmap are now returning TQCanvasPixmap* @@ -207,7 +207,7 @@ public: * convert them to TQPixmap, since we use them that * way quite often (to generate toolbar button icons for instance). */ - static TQPixmap toQPixmap(TQCanvasPixmap*); + static TQPixmap toTQPixmap(TQCanvasPixmap*); static void dumpStats(std::ostream &); @@ -276,8 +276,8 @@ protected: TQCanvasPixmap* makeAnnotationPixmap(const Text &text, const bool isLilyPondDirective); void createPixmapAndMask(int width, int height, - int maskWidth = -1, - int maskHeight = -1); + int tqmaskWidth = -1, + int tqmaskHeight = -1); TQCanvasPixmap* makeCanvasPixmap(TQPoint hotspot, bool generateMask = false); enum ColourType { diff --git a/src/gui/editors/notation/NotePixmapPainter.h b/src/gui/editors/notation/NotePixmapPainter.h index ff8edae..51918ec 100644 --- a/src/gui/editors/notation/NotePixmapPainter.h +++ b/src/gui/editors/notation/NotePixmapPainter.h @@ -33,7 +33,7 @@ namespace Rosegarden { class NotePixmapPainter { // Just a trivial class that instructs two painters to do the - // same thing (one for the pixmap, one for the mask). We only + // same thing (one for the pixmap, one for the tqmask). We only // duplicate those methods we actually use in NotePixmapFactory public: @@ -55,23 +55,23 @@ public: } } - bool begin(TQPaintDevice *device, TQPaintDevice *mask = 0, bool unclipped = false) { + bool begin(TQPaintDevice *device, TQPaintDevice *tqmask = 0, bool unclipped = false) { m_externalPainter = 0; - if (mask) { + if (tqmask) { m_useMask = true; - m_maskPainter.begin(mask, unclipped); + m_tqmaskPainter.tqbegin(tqmask, unclipped); } else { m_useMask = false; } m_painter = &m_myPainter; - return m_painter->begin(device, unclipped); + return m_painter->tqbegin(device, unclipped); } bool end() { - if (m_useMask) m_maskPainter.end(); + if (m_useMask) m_tqmaskPainter.end(); return m_painter->end(); } @@ -79,66 +79,66 @@ public: return *m_painter; } - TQPainter &maskPainter() { - return m_maskPainter; + TQPainter &tqmaskPainter() { + return m_tqmaskPainter; } void drawPoint(int x, int y) { m_painter->drawPoint(x, y); - if (m_useMask) m_maskPainter.drawPoint(x, y); + if (m_useMask) m_tqmaskPainter.drawPoint(x, y); } void drawLine(int x1, int y1, int x2, int y2) { m_painter->drawLine(x1, y1, x2, y2); - if (m_useMask) m_maskPainter.drawLine(x1, y1, x2, y2); + if (m_useMask) m_tqmaskPainter.drawLine(x1, y1, x2, y2); } void drawRect(int x, int y, int w, int h) { m_painter->drawRect(x, y, w, h); - if (m_useMask) m_maskPainter.drawRect(x, y, w, h); + if (m_useMask) m_tqmaskPainter.drawRect(x, y, w, h); } void drawArc(int x, int y, int w, int h, int a, int alen) { m_painter->drawArc(x, y, w, h, a, alen); - if (m_useMask) m_maskPainter.drawArc(x, y, w, h, a, alen); + if (m_useMask) m_tqmaskPainter.drawArc(x, y, w, h, a, alen); } 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); + m_painter->tqdrawPolygon(a, winding, index, n); + if (m_useMask) m_tqmaskPainter.tqdrawPolygon(a, winding, index, n); } 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); + m_painter->tqdrawPolyline(a, index, n); + if (m_useMask) m_tqmaskPainter.tqdrawPolyline(a, index, n); } 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); + m_painter->tqdrawPixmap(x, y, pm, sx, sy, sw, sh); + if (m_useMask) m_tqmaskPainter.tqdrawPixmap(x, y, *(pm.tqmask()), sx, sy, sw, sh); } void drawText(int x, int y, const TQString &string) { m_painter->drawText(x, y, string); - if (m_useMask) m_maskPainter.drawText(x, y, string); + if (m_useMask) m_tqmaskPainter.drawText(x, y, string); } void drawNoteCharacter(int x, int y, const NoteCharacter &character) { character.draw(m_painter, x, y); - if (m_useMask) character.drawMask(&m_maskPainter, x, y); + if (m_useMask) character.drawMask(&m_tqmaskPainter, x, y); } void drawEllipse(int x, int y, int w, int h) { m_painter->drawEllipse(x, y, w, h); - if (m_useMask) m_maskPainter.drawEllipse(x, y, w, h); + if (m_useMask) m_tqmaskPainter.drawEllipse(x, y, w, h); } private: bool m_useMask; TQPainter m_myPainter; - TQPainter m_maskPainter; + TQPainter m_tqmaskPainter; TQPainter *m_externalPainter; TQPainter *m_painter; }; diff --git a/src/gui/editors/notation/NoteStyle.cpp b/src/gui/editors/notation/NoteStyle.cpp index 0b3332d..00ce956 100644 --- a/src/gui/editors/notation/NoteStyle.cpp +++ b/src/gui/editors/notation/NoteStyle.cpp @@ -70,12 +70,12 @@ NoteStyle::getShape(Note::Type type) if (m_baseStyle) return m_baseStyle->getShape(type); std::cerr - << "WARNING: NoteStyle::getShape: No shape defined for note type " + << "WARNING: NoteStyle::getShape: No tqshape defined for note type " << type << ", defaulting to AngledOval" << std::endl; return AngledOval; } - return i->second.shape; + return i->second.tqshape; } bool @@ -183,57 +183,57 @@ NoteStyle::getNoteHeadCharName(Note::Type type) CharName name = NoteCharacterNames::UNKNOWN; bool inverted = false; - if (desc.shape == AngledOval) { + if (desc.tqshape == AngledOval) { name = desc.filled ? NoteCharacterNames::NOTEHEAD_BLACK : NoteCharacterNames::VOID_NOTEHEAD; - } else if (desc.shape == LevelOval) { + } else if (desc.tqshape == LevelOval) { if (desc.filled) { std::cerr << "WARNING: NoteStyle::getNoteHeadCharName: No filled level oval head" << std::endl; } name = NoteCharacterNames::WHOLE_NOTE; - } else if (desc.shape == Breve) { + } else if (desc.tqshape == Breve) { if (desc.filled) { std::cerr << "WARNING: NoteStyle::getNoteHeadCharName: No filled breve head" << std::endl; } name = NoteCharacterNames::BREVE; - } else if (desc.shape == Cross) { + } else if (desc.tqshape == Cross) { name = desc.filled ? NoteCharacterNames::X_NOTEHEAD : NoteCharacterNames::CIRCLE_X_NOTEHEAD; - } else if (desc.shape == TriangleUp) { + } else if (desc.tqshape == TriangleUp) { name = desc.filled ? NoteCharacterNames::TRIANGLE_NOTEHEAD_UP_BLACK : NoteCharacterNames::TRIANGLE_NOTEHEAD_UP_WHITE; - } else if (desc.shape == TriangleDown) { + } else if (desc.tqshape == TriangleDown) { name = desc.filled ? NoteCharacterNames::TRIANGLE_NOTEHEAD_UP_BLACK : NoteCharacterNames::TRIANGLE_NOTEHEAD_UP_WHITE; inverted = true; - } else if (desc.shape == Diamond) { + } else if (desc.tqshape == Diamond) { name = desc.filled ? NoteCharacterNames::SEMIBREVIS_BLACK : NoteCharacterNames::SEMIBREVIS_WHITE; - } else if (desc.shape == Rectangle) { + } else if (desc.tqshape == Rectangle) { - name = desc.filled ? NoteCharacterNames::SQUARE_NOTEHEAD_BLACK - : NoteCharacterNames::SQUARE_NOTEHEAD_WHITE; + name = desc.filled ? NoteCharacterNames::STQUARE_NOTEHEAD_BLACK + : NoteCharacterNames::STQUARE_NOTEHEAD_WHITE; - } else if (desc.shape == Number) { + } else if (desc.tqshape == Number) { std::cerr << "WARNING: NoteStyle::getNoteHeadCharName: Number not yet implemented" << std::endl; name = NoteCharacterNames::UNKNOWN; //!!! - } else if (desc.shape == CustomCharName) { + } else if (desc.tqshape == CustomCharName) { name = desc.charName; @@ -327,7 +327,7 @@ NoteStyle::getRestCharName(Note::Type type, bool restOutsideStave) case Note::Quaver: return NoteCharacterNames::EIGHTH_REST; case Note::Crotchet: - return NoteCharacterNames::QUARTER_REST; + return NoteCharacterNames::TQUARTER_REST; case Note::Minim: return restOutsideStave ? NoteCharacterNames::HALF_REST @@ -433,10 +433,10 @@ NoteStyle::checkDescription(Note::Type note) } void -NoteStyle::setShape(Note::Type note, NoteHeadShape shape) +NoteStyle::setShape(Note::Type note, NoteHeadShape tqshape) { checkDescription(note); - m_notes[note].shape = shape; + m_notes[note].tqshape = tqshape; } void diff --git a/src/gui/editors/notation/NoteStyle.h b/src/gui/editors/notation/NoteStyle.h index 3959e01..4431c16 100644 --- a/src/gui/editors/notation/NoteStyle.h +++ b/src/gui/editors/notation/NoteStyle.h @@ -99,8 +99,8 @@ public: protected: struct NoteDescription { - NoteHeadShape shape; // if CustomCharName, use charName - CharName charName; // only used if shape == CustomCharName + NoteHeadShape tqshape; // if CustomCharName, use charName + CharName charName; // only used if tqshape == CustomCharName bool filled; bool stem; int flags; @@ -109,14 +109,14 @@ protected: VFixPoint vfix; NoteDescription() : - shape(AngledOval), charName(NoteCharacterNames::UNKNOWN), + tqshape(AngledOval), charName(NoteCharacterNames::UNKNOWN), filled(true), stem(true), flags(0), slashes(0), hfix(Normal), vfix(Middle) { } - NoteDescription(NoteHeadShape _shape, CharName _charName, + NoteDescription(NoteHeadShape _tqshape, CharName _charName, bool _filled, bool _stem, int _flags, int _slashes, HFixPoint _hfix, VFixPoint _vfix) : - shape(_shape), charName(_charName), + tqshape(_tqshape), charName(_charName), filled(_filled), stem(_stem), flags(_flags), slashes(_slashes), hfix(_hfix), vfix(_vfix) { } }; diff --git a/src/gui/editors/notation/NoteStyleFactory.cpp b/src/gui/editors/notation/NoteStyleFactory.cpp index f585117..d394e8b 100644 --- a/src/gui/editors/notation/NoteStyleFactory.cpp +++ b/src/gui/editors/notation/NoteStyleFactory.cpp @@ -63,7 +63,7 @@ NoteStyleFactory::getAvailableStyleNames() for (TQStringList::Iterator i = files.begin(); i != files.end(); ++i) { if ((*i).length() > 4 && (*i).right(4) == ".xml") { - TQFileInfo fileInfo(TQString("%1/%2").arg(styleDir).arg(*i)); + TQFileInfo fileInfo(TQString("%1/%2").tqarg(styleDir).tqarg(*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 41da5ed..b7e04ef 100644 --- a/src/gui/editors/notation/NoteStyleFileReader.cpp +++ b/src/gui/editors/notation/NoteStyleFileReader.cpp @@ -48,13 +48,13 @@ NoteStyleFileReader::NoteStyleFileReader(std::string name) : KGlobal::dirs()->findResource("appdata", "styles/"); TQString styleFileName = - TQString("%1/%2.xml").arg(styleDirectory).arg(strtoqstr(name)); + TQString("%1/%2.xml").tqarg(styleDirectory).tqarg(strtoqstr(name)); TQFileInfo fileInfo(styleFileName); if (!fileInfo.isReadable()) { throw StyleFileReadFailed - (qstrtostr(i18n("Can't open style file %1").arg(styleFileName))); + (qstrtostr(i18n("Can't open style file %1").tqarg(styleFileName))); } TQFile styleFile(styleFileName); @@ -98,7 +98,7 @@ NoteStyleFileReader::startElement(const TQString &, const TQString &, if (!setFromAttributes(type, attributes)) return false; } catch (NotationStrings::MalformedNoteName n) { - m_errorString = i18n("Unrecognised note name %1").arg(s); + m_errorString = i18n("Unrecognised note name %1").tqarg(s); return false; } @@ -125,7 +125,7 @@ NoteStyleFileReader::setFromAttributes(Note::Type type, TQString s; bool haveShape = false; - s = attributes.value("shape"); + s = attributes.value("tqshape"); if (s) { m_style->setShape(type, qstrtostr(s.lower())); haveShape = true; @@ -134,7 +134,7 @@ NoteStyleFileReader::setFromAttributes(Note::Type type, s = attributes.value("charname"); if (s) { if (haveShape) { - m_errorString = i18n("global and note elements may have shape " + m_errorString = i18n("global and note elements may have tqshape " "or charname attribute, but not both"); return false; } diff --git a/src/gui/editors/notation/NoteStyleFileReader.h b/src/gui/editors/notation/NoteStyleFileReader.h index 8584ce8..d44c832 100644 --- a/src/gui/editors/notation/NoteStyleFileReader.h +++ b/src/gui/editors/notation/NoteStyleFileReader.h @@ -31,7 +31,7 @@ namespace Rosegarden { -class NoteStyleFileReader : public QXmlDefaultHandler +class NoteStyleFileReader : public TQXmlDefaultHandler { public: NoteStyleFileReader(NoteStyleName name); diff --git a/src/gui/editors/notation/RestInserter.cpp b/src/gui/editors/notation/RestInserter.cpp index e9b6bdb..faef304 100644 --- a/src/gui/editors/notation/RestInserter.cpp +++ b/src/gui/editors/notation/RestInserter.cpp @@ -56,14 +56,14 @@ RestInserter::RestInserter(NotationView* view) { TQIconSet icon; - icon = QIconSet - (NotePixmapFactory::toQPixmap(NotePixmapFactory:: + icon = TQIconSet + (NotePixmapFactory::toTQPixmap(NotePixmapFactory:: makeToolbarPixmap("dotted-rest-crotchet"))); new KToggleAction(i18n("Dotted rest"), icon, 0, this, TQT_SLOT(slotToggleDot()), actionCollection(), "toggle_dot"); - icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory:: + icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory:: makeToolbarPixmap("select"))); new KAction(i18n("Switch to Select Tool"), icon, 0, this, TQT_SLOT(slotSelectSelected()), actionCollection(), @@ -73,8 +73,8 @@ RestInserter::RestInserter(NotationView* view) TQT_SLOT(slotEraseSelected()), actionCollection(), "erase"); - icon = QIconSet - (NotePixmapFactory::toQPixmap(NotePixmapFactory:: + icon = TQIconSet + (NotePixmapFactory::toTQPixmap(NotePixmapFactory:: makeToolbarPixmap("crotchet"))); new KAction(i18n("Switch to Inserting Notes"), icon, 0, this, TQT_SLOT(slotNotesSelected()), actionCollection(), @@ -127,8 +127,8 @@ void RestInserter::slotToggleDot() m_noteDots = (m_noteDots) ? 0 : 1; Note note(m_noteType, m_noteDots); TQString actionName(NotationStrings::getReferenceName(note, true)); - actionName.replace(TQRegExp("-"), "_"); - KAction *action = m_parentView->actionCollection()->action(actionName); + actionName.tqreplace(TQRegExp("-"), "_"); + KAction *action = m_tqparentView->actionCollection()->action(actionName); if (!action) { std::cerr << "WARNING: No such action as " << actionName << std::endl; } else { @@ -140,8 +140,8 @@ void RestInserter::slotNotesSelected() { Note note(m_noteType, m_noteDots); TQString actionName(NotationStrings::getReferenceName(note)); - actionName.replace(TQRegExp(" "), "_"); - m_parentView->actionCollection()->action(actionName)->activate(); + actionName.tqreplace(TQRegExp(" "), "_"); + m_tqparentView->actionCollection()->action(actionName)->activate(); } const TQString RestInserter::ToolName = "restinserter"; diff --git a/src/gui/editors/notation/RestInserter.h b/src/gui/editors/notation/RestInserter.h index 94834d2..3cac3d3 100644 --- a/src/gui/editors/notation/RestInserter.h +++ b/src/gui/editors/notation/RestInserter.h @@ -48,6 +48,7 @@ class Event; class RestInserter : public NoteInserter { Q_OBJECT + TQ_OBJECT friend class NotationToolBox; diff --git a/src/gui/editors/notation/SystemFont.cpp b/src/gui/editors/notation/SystemFont.cpp index 62b4280..77d3341 100644 --- a/src/gui/editors/notation/SystemFont.cpp +++ b/src/gui/editors/notation/SystemFont.cpp @@ -130,11 +130,11 @@ qfont: TQFontInfo info(qfont); - NOTATION_DEBUG << "SystemFont::loadSystemFont[Qt]: have family " << info.family() << " (exactMatch " << info.exactMatch() << ")" << endl; + NOTATION_DEBUG << "SystemFont::loadSystemFont[TQt]: have family " << TQString(info.family()).ascii() << " (exactMatch " << info.exactMatch() << ")" << endl; // return info.exactMatch(); - // The Qt documentation says: + // The TQt documentation says: // // bool TQFontInfo::exactMatch() const // Returns TRUE if the matched window system font is exactly the @@ -143,23 +143,23 @@ qfont: // My arse. I specify "feta", I get "Verdana", and exactMatch // returns true. Uh huh. // - // UPDATE: in newer versions of Qt, I specify "fughetta", I get + // UPDATE: in newer versions of TQt, I specify "fughetta", I get // "Fughetta [macromedia]", and exactMatch returns false. Just as // useless, but in a different way. - TQString family = info.family().lower(); + TQString family = TQString(info.family()).lower(); if (family == name.lower()) return new SystemFontQt(qfont); else { - int bracket = family.find(" ["); + int bracket = family.tqfind(" ["); if (bracket > 1) family = family.left(bracket); if (family == name.lower()) return new SystemFontQt(qfont); } - NOTATION_DEBUG << "SystemFont::loadSystemFont[Qt]: Wrong family returned, failing" << endl; + NOTATION_DEBUG << "SystemFont::loadSystemFont[TQt]: Wrong family returned, failing" << endl; return 0; } diff --git a/src/gui/editors/notation/SystemFontQt.cpp b/src/gui/editors/notation/SystemFontQt.cpp index ad969e8..5d90632 100644 --- a/src/gui/editors/notation/SystemFontQt.cpp +++ b/src/gui/editors/notation/SystemFontQt.cpp @@ -34,19 +34,19 @@ namespace Rosegarden { -QPixmap +TQPixmap SystemFontQt::renderChar(CharName charName, int glyph, int code, Strategy strategy, bool &success) { success = false; if (strategy == OnlyGlyphs) { - NOTATION_DEBUG << "SystemFontQt::renderChar: OnlyGlyphs strategy not supported by Qt renderer, can't render character " << charName.getName() << " (glyph " << glyph << ")" << endl; + NOTATION_DEBUG << "SystemFontQt::renderChar: OnlyGlyphs strategy not supported by TQt renderer, can't render character " << charName.getName() << " (glyph " << glyph << ")" << endl; 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; + NOTATION_DEBUG << "SystemFontQt::renderChar: Can't render using TQt with only glyph value (" << glyph << ") for character " << charName.getName() << ", need a code point" << endl; return TQPixmap(); } @@ -60,16 +60,16 @@ SystemFontQt::renderChar(CharName charName, int glyph, int code, TQPainter painter; painter.begin(&map); painter.setFont(m_font); - painter.setPen(Qt::black); + painter.setPen(TQt::black); NOTATION_DEBUG << "NoteFont: Drawing character code " << code << " for " << charName.getName() << " using TQFont" << endl; - painter.drawText(0, metrics.ascent(), qc); + painter.drawText(0, metrics.ascent(), TQString(qc)); painter.end(); - map.setMask(PixmapFunctions::generateMask(map, Qt::white.rgb())); + map.setMask(PixmapFunctions::generateMask(map, TQt::white.rgb())); success = true; return map; diff --git a/src/gui/editors/notation/SystemFontQt.h b/src/gui/editors/notation/SystemFontQt.h index a3698f9..d7dff7f 100644 --- a/src/gui/editors/notation/SystemFontQt.h +++ b/src/gui/editors/notation/SystemFontQt.h @@ -22,8 +22,8 @@ COPYING included with this distribution for more information. */ -#ifndef _RG_SYSTEMFONQT_H_ -#define _RG_SYSTEMFONQT_H_ +#ifndef _RG_SYSTEMFONTQT_H_ +#define _RG_SYSTEMFONTQT_H_ #include "SystemFont.h" diff --git a/src/gui/editors/notation/SystemFontXft.cpp b/src/gui/editors/notation/SystemFontXft.cpp index 6388167..75f9406 100644 --- a/src/gui/editors/notation/SystemFontXft.cpp +++ b/src/gui/editors/notation/SystemFontXft.cpp @@ -65,7 +65,7 @@ staticCubicTo(FT_Vector *control1, FT_Vector *control2, FT_Vector *to, void *) */ -QPixmap +TQPixmap SystemFontXft::renderChar(CharName charName, int glyph, int code, Strategy strategy, bool &success) { @@ -120,7 +120,7 @@ SystemFontXft::renderChar(CharName charName, int glyph, int code, Drawable drawable = (Drawable)map.handle(); if (!drawable) { - std::cerr << "ERROR: SystemFontXft::renderChar: No drawable in QPixmap!" << std::endl; + std::cerr << "ERROR: SystemFontXft::renderChar: No drawable in TQPixmap!" << std::endl; return map; } @@ -129,7 +129,7 @@ SystemFontXft::renderChar(CharName charName, int glyph, int code, (Visual *)map.x11Visual(), map.x11Colormap()); - TQColor pen(Qt::black); + TQColor pen(TQt::black); XftColor col; col.color.red = pen.red () | pen.red() << 8; col.color.green = pen.green () | pen.green() << 8; @@ -153,7 +153,7 @@ SystemFontXft::renderChar(CharName charName, int glyph, int code, XftDrawDestroy(draw); - map.setMask(PixmapFunctions::generateMask(map, Qt::white.rgb())); + map.setMask(PixmapFunctions::generateMask(map, TQt::white.rgb())); success = true; diff --git a/src/gui/editors/notation/TextInserter.cpp b/src/gui/editors/notation/TextInserter.cpp index f862b88..6b5f595 100644 --- a/src/gui/editors/notation/TextInserter.cpp +++ b/src/gui/editors/notation/TextInserter.cpp @@ -52,7 +52,7 @@ TextInserter::TextInserter(NotationView* view) : NotationTool("TextInserter", view), m_text("", Text::Dynamic) { - TQIconSet icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory:: + TQIconSet icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory:: makeToolbarPixmap("select"))); new KAction(i18n("Switch to Select Tool"), icon, 0, this, TQT_SLOT(slotSelectSelected()), actionCollection(), @@ -62,8 +62,8 @@ TextInserter::TextInserter(NotationView* view) TQT_SLOT(slotEraseSelected()), actionCollection(), "erase"); - icon = QIconSet - (NotePixmapFactory::toQPixmap(NotePixmapFactory:: + icon = TQIconSet + (NotePixmapFactory::toTQPixmap(NotePixmapFactory:: makeToolbarPixmap("crotchet"))); new KAction(i18n("Switch to Inserting Notes"), icon, 0, this, TQT_SLOT(slotNotesSelected()), actionCollection(), @@ -79,17 +79,17 @@ void TextInserter::slotNotesSelected() void TextInserter::slotEraseSelected() { - m_parentView->actionCollection()->action("erase")->activate(); + m_tqparentView->actionCollection()->action("erase")->activate(); } void TextInserter::slotSelectSelected() { - m_parentView->actionCollection()->action("select")->activate(); + m_tqparentView->actionCollection()->action("select")->activate(); } void TextInserter::ready() { - m_nParentView->setCanvasCursor(Qt::crossCursor); + m_nParentView->setCanvasCursor(TQt::crossCursor); m_nParentView->setHeightTracking(false); } diff --git a/src/gui/editors/notation/TextInserter.h b/src/gui/editors/notation/TextInserter.h index f71ddc7..b00c4ae 100644 --- a/src/gui/editors/notation/TextInserter.h +++ b/src/gui/editors/notation/TextInserter.h @@ -48,6 +48,7 @@ class NotationView; class TextInserter : public NotationTool { Q_OBJECT + TQ_OBJECT friend class NotationToolBox; diff --git a/src/gui/editors/notation/TrackHeader.cpp b/src/gui/editors/notation/TrackHeader.cpp index f2793ab..de5bf5f 100644 --- a/src/gui/editors/notation/TrackHeader.cpp +++ b/src/gui/editors/notation/TrackHeader.cpp @@ -65,7 +65,7 @@ namespace Rosegarden { -// Status bits +// tqStatus bits const int TrackHeader::SEGMENT_HERE = 1 << 0; const int TrackHeader::SUPERIMPOSED_SEGMENTS = 1 << 1; const int TrackHeader::INCONSISTENT_CLEFS = 1 << 2; @@ -75,8 +75,8 @@ const int TrackHeader::INCONSISTENT_TRANSPOSITIONS = 1 << 5; const int TrackHeader::BEFORE_FIRST_SEGMENT = 1 << 6; -TrackHeader::TrackHeader(TQWidget *parent, TrackId trackId, int height, int ypos) : - TQLabel(parent), +TrackHeader::TrackHeader(TQWidget *tqparent, TrackId trackId, int height, int ypos) : + TQLabel(tqparent), m_track(trackId), m_height(height), m_ypos(ypos), @@ -96,7 +96,7 @@ TrackHeader::TrackHeader(TQWidget *parent, TrackId trackId, int height, int ypos m_current(false) { - m_notationView = static_cast<HeadersGroup *>(parent)->getNotationView(); + m_notationView = static_cast<HeadersGroup *>(tqparent)->getNotationView(); setFrameStyle(TQFrame::Box | TQFrame::Plain); setCurrent(false); @@ -106,17 +106,17 @@ TrackHeader::TrackHeader(TQWidget *parent, TrackId trackId, int height, int ypos // Tooltip text creation Composition *comp = - static_cast<HeadersGroup *>(parent)->getComposition(); + static_cast<HeadersGroup *>(tqparent)->getComposition(); Track *track = comp->getTrackById(m_track); int trackPos = comp->getTrackPositionById(m_track); TQString toolTipText = TQString(i18n("Track %1 : \"%2\"") - .arg(trackPos + 1) - .arg(strtoqstr(track->getLabel()))); + .tqarg(trackPos + 1) + .tqarg(strtoqstr(track->getLabel()))); - TQString preset = track->getPresetLabel(); + TQString preset = track->getPresetLabel().c_str(); if (preset != TQString("")) - toolTipText += TQString(i18n("\nNotate for: %1").arg(preset)); + toolTipText += TQString(i18n("\nNotate for: %1").tqarg(preset)); TQString notationSize = i18n("normal"); switch (track->getStaffSize()) { @@ -154,8 +154,8 @@ TrackHeader::TrackHeader(TQWidget *parent, TrackId trackId, int height, int ypos } toolTipText += TQString(i18n("\nSize: %1, Bracket: %2 ")) - .arg(notationSize) - .arg(bracketText); + .tqarg(notationSize) + .tqarg(bracketText); // Sort segments by position on the track SortedSegments segments; @@ -181,17 +181,17 @@ TrackHeader::TrackHeader(TQWidget *parent, TrackId trackId, int height, int ypos TQString transposeName; transposeValueToName(transpose, transposeName); toolTipText += TQString(i18n("\nbars [%1-%2] in %3 (tr=%4) : \"%5\"")) - .arg(barStart) - .arg(barEnd) - .arg(transposeName) - .arg(transpose) - .arg(strtoqstr((*i)->getLabel())); + .tqarg(barStart) + .tqarg(barEnd) + .tqarg(transposeName) + .tqarg(transpose) + .tqarg(strtoqstr((*i)->getLabel())); } else { toolTipText += TQString(i18n("\nbars [%1-%2] (tr=%3) : \"%4\"")) - .arg(barStart) - .arg(barEnd) - .arg(transpose) - .arg(strtoqstr((*i)->getLabel())); + .tqarg(barStart) + .tqarg(barEnd) + .tqarg(transpose) + .tqarg(strtoqstr((*i)->getLabel())); } } @@ -274,7 +274,7 @@ TrackHeader::lookAtStaff(double x, int maxWidth) int staff; Composition *comp = - static_cast<HeadersGroup *>(parent())->getComposition(); + static_cast<HeadersGroup *>(TQT_TQWIDGET(tqparent()))->getComposition(); Track *track = comp->getTrackById(m_track); int trackPos = comp->getTrackPositionById(m_track); @@ -350,9 +350,9 @@ TrackHeader::lookAtStaff(double x, int maxWidth) transposeValueToName(m_transpose, noteName); m_upperText = TQString(i18n("%1: %2") - .arg(trackPos + 1) - .arg(strtoqstr(track->getLabel()))); - if (m_transpose) m_transposeText = i18n(" in %1").arg(noteName); + .tqarg(trackPos + 1) + .tqarg(strtoqstr(track->getLabel()))); + if (m_transpose) m_transposeText = i18n(" in %1").tqarg(noteName); else m_transposeText = TQString(""); NotePixmapFactory * npf = m_notationView->getNotePixmapFactory(); @@ -414,15 +414,15 @@ TrackHeader::updateHeader(int width) TQColor clefColour; if (m_status & (SEGMENT_HERE | BEFORE_FIRST_SEGMENT)) { if (m_status & (INCONSISTENT_CLEFS | INCONSISTENT_KEYS)) - clefColour = Qt::red; + clefColour = TQt::red; else - clefColour = Qt::black; + clefColour = TQt::black; } else { drawClef = false; } NotePixmapFactory * npf = m_notationView->getNotePixmapFactory(); - TQPixmap pmap = NotePixmapFactory::toQPixmap( + TQPixmap pmap = NotePixmapFactory::toTQPixmap( 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 1cb4f1e..0b8a0a6 100644 --- a/src/gui/editors/notation/TrackHeader.h +++ b/src/gui/editors/notation/TrackHeader.h @@ -50,16 +50,17 @@ class NotationView; class ColourMap; class Segment; -class TrackHeader : public QLabel +class TrackHeader : public TQLabel { Q_OBJECT + TQ_OBJECT public: /** * Create a new track header for track of id trackId. - * *parent is the parent widget, height the height of staff and + * *tqparent is the tqparent widget, height the height of staff and * ypos is the staff y position on canvas. */ - TrackHeader(TQWidget *parent, TrackId trackId, int height, int ypos); + TrackHeader(TQWidget *tqparent, TrackId trackId, int height, int ypos); /** * Draw a blue line around header when current is true @@ -168,7 +169,7 @@ private : void transposeValueToName(int transpose, TQString &transposeName); - // Status bits + // tqStatus bits static const int SEGMENT_HERE; static const int SUPERIMPOSED_SEGMENTS; static const int INCONSISTENT_CLEFS; diff --git a/src/gui/editors/parameters/AudioInstrumentParameterPanel.cpp b/src/gui/editors/parameters/AudioInstrumentParameterPanel.cpp index bfa61a8..d7bf79a 100644 --- a/src/gui/editors/parameters/AudioInstrumentParameterPanel.cpp +++ b/src/gui/editors/parameters/AudioInstrumentParameterPanel.cpp @@ -115,7 +115,7 @@ AudioInstrumentParameterPanel::slotPluginSelected(InstrumentId instrumentId, << ", index = " << index << ", plugin = " << plugin << endl; - TQColor pluginBackgroundColour = Qt::black; + TQColor pluginBackgroundColour = TQt::black; bool bypassed = false; TQPushButton *button = 0; @@ -179,7 +179,7 @@ AudioInstrumentParameterPanel::slotPluginBypassed(InstrumentId instrumentId, AudioPluginInstance *inst = m_selectedInstrument->getPlugin(pluginIndex); - TQColor backgroundColour = Qt::black; // default background colour + TQColor backgroundColour = TQt::black; // default background colour if (inst && inst->isAssigned()) { AudioPlugin *pluginClass @@ -203,7 +203,7 @@ AudioInstrumentParameterPanel::setButtonColour( RG_DEBUG << "AudioInstrumentParameterPanel::setButtonColour " << "pluginIndex = " << pluginIndex << ", bypassState = " << bypassState - << ", rgb = " << colour.name() << endl; + << ", rgb = " << TQString(colour.name()).ascii() << endl; TQPushButton *button = 0; @@ -225,7 +225,7 @@ AudioInstrumentParameterPanel::setButtonColour( button-> setPaletteBackgroundColor(kapp->palette(). color(TQPalette::Active, TQColorGroup::ButtonText)); - } else if (colour == Qt::black) { + } else if (colour == TQt::black) { button-> setPaletteForegroundColor(kapp->palette(). color(TQPalette::Active, TQColorGroup::ButtonText)); @@ -235,15 +235,15 @@ AudioInstrumentParameterPanel::setButtonColour( color(TQPalette::Active, TQColorGroup::Button)); } else { button-> - setPaletteForegroundColor(Qt::white); + setPaletteForegroundColor(TQt::white); button-> setPaletteBackgroundColor(colour); } } -AudioInstrumentParameterPanel::AudioInstrumentParameterPanel(RosegardenGUIDoc* doc, TQWidget* parent) - : InstrumentParameterPanel(doc, parent), +AudioInstrumentParameterPanel::AudioInstrumentParameterPanel(RosegardenGUIDoc* doc, TQWidget* tqparent) + : InstrumentParameterPanel(doc, tqparent), m_audioFader(new AudioFaderBox(this)) { TQGridLayout *gridLayout = new TQGridLayout(this, 3, 2, 5, 5); @@ -382,7 +382,7 @@ AudioInstrumentParameterPanel::setupForInstrument(Instrument* instrument) button->setText(noneText); TQToolTip::add (button, noneText); - setButtonColour(index, inst ? inst->isBypassed() : false, Qt::black); + setButtonColour(index, inst ? inst->isBypassed() : false, TQt::black); } } diff --git a/src/gui/editors/parameters/AudioInstrumentParameterPanel.h b/src/gui/editors/parameters/AudioInstrumentParameterPanel.h index 87da334..a9ff117 100644 --- a/src/gui/editors/parameters/AudioInstrumentParameterPanel.h +++ b/src/gui/editors/parameters/AudioInstrumentParameterPanel.h @@ -47,8 +47,9 @@ class AudioFaderBox; class AudioInstrumentParameterPanel : public InstrumentParameterPanel { Q_OBJECT + TQ_OBJECT public: - AudioInstrumentParameterPanel(RosegardenGUIDoc* doc, TQWidget* parent); + AudioInstrumentParameterPanel(RosegardenGUIDoc* doc, TQWidget* tqparent); virtual void setupForInstrument(Instrument*); diff --git a/src/gui/editors/parameters/InstrumentParameterBox.cpp b/src/gui/editors/parameters/InstrumentParameterBox.cpp index 1d5b99d..610f9ed 100644 --- a/src/gui/editors/parameters/InstrumentParameterBox.cpp +++ b/src/gui/editors/parameters/InstrumentParameterBox.cpp @@ -49,10 +49,10 @@ namespace Rosegarden { InstrumentParameterBox::InstrumentParameterBox(RosegardenGUIDoc *doc, - TQWidget *parent) + TQWidget *tqparent) : RosegardenParameterBox(i18n("Instrument"), i18n("Instrument Parameters"), - parent), + tqparent), m_widgetStack(new TQWidgetStack(this)), m_noInstrumentParameters(new TQVBox(this)), m_midiInstrumentParameters(new MIDIInstrumentParameterPanel(doc, this)), @@ -66,16 +66,16 @@ InstrumentParameterBox::InstrumentParameterBox(RosegardenGUIDoc *doc, m_midiInstrumentParameters->setFont(m_font); m_audioInstrumentParameters->setFont(m_font); - bool contains = false; + bool tqcontains = false; std::vector<InstrumentParameterBox*>::iterator it = instrumentParamBoxes.begin(); for (; it != instrumentParamBoxes.end(); it++) if ((*it) == this) - contains = true; + tqcontains = true; - if (!contains) + if (!tqcontains) instrumentParamBoxes.push_back(this); m_widgetStack->addWidget(m_midiInstrumentParameters); @@ -122,8 +122,8 @@ InstrumentParameterBox::InstrumentParameterBox(RosegardenGUIDoc *doc, // Layout the groups left to right. - TQBoxLayout* layout = new TQVBoxLayout(this); - layout->addWidget(m_widgetStack); + TQBoxLayout* tqlayout = new TQVBoxLayout(this); + tqlayout->addWidget(m_widgetStack); } @@ -149,7 +149,7 @@ InstrumentParameterBox::getSelectedInstrument() return m_doc->getStudio().getInstrumentById(m_selectedInstrument); } -QString +TQString InstrumentParameterBox::getPreviousBox(RosegardenParameterArea::Arrangement arrangement) const { return i18n("Track"); diff --git a/src/gui/editors/parameters/InstrumentParameterBox.h b/src/gui/editors/parameters/InstrumentParameterBox.h index cc36351..cb50d7a 100644 --- a/src/gui/editors/parameters/InstrumentParameterBox.h +++ b/src/gui/editors/parameters/InstrumentParameterBox.h @@ -53,10 +53,11 @@ class AudioInstrumentParameterPanel; class InstrumentParameterBox : public RosegardenParameterBox { Q_OBJECT + TQ_OBJECT public: InstrumentParameterBox(RosegardenGUIDoc *doc, - TQWidget *parent = 0); + TQWidget *tqparent = 0); ~InstrumentParameterBox(); void useInstrument(Instrument *instrument); diff --git a/src/gui/editors/parameters/InstrumentParameterPanel.cpp b/src/gui/editors/parameters/InstrumentParameterPanel.cpp index a47a8a8..d0f45d4 100644 --- a/src/gui/editors/parameters/InstrumentParameterPanel.cpp +++ b/src/gui/editors/parameters/InstrumentParameterPanel.cpp @@ -38,8 +38,8 @@ namespace Rosegarden { InstrumentParameterPanel::InstrumentParameterPanel(RosegardenGUIDoc *doc, - TQWidget* parent) - : TQFrame(parent), + TQWidget* tqparent) + : TQFrame(tqparent), m_instrumentLabel(new KSqueezedTextLabel(this)), m_selectedInstrument(0), m_doc(doc) @@ -48,7 +48,7 @@ InstrumentParameterPanel::InstrumentParameterPanel(RosegardenGUIDoc *doc, int width25 = metrics.width("1234567890123456789012345"); m_instrumentLabel->setFixedWidth(width25); - m_instrumentLabel->setAlignment(Qt::AlignCenter); + m_instrumentLabel->tqsetAlignment(TQt::AlignCenter); } void diff --git a/src/gui/editors/parameters/InstrumentParameterPanel.h b/src/gui/editors/parameters/InstrumentParameterPanel.h index 717ffd2..42ceee5 100644 --- a/src/gui/editors/parameters/InstrumentParameterPanel.h +++ b/src/gui/editors/parameters/InstrumentParameterPanel.h @@ -47,11 +47,12 @@ typedef std::vector<std::pair<int, RotaryPair> > RotaryMap; //////////////////////////////////////////////////////////////////////// -class InstrumentParameterPanel : public QFrame +class InstrumentParameterPanel : public TQFrame { Q_OBJECT + TQ_OBJECT public: - InstrumentParameterPanel(RosegardenGUIDoc *doc, TQWidget* parent); + InstrumentParameterPanel(RosegardenGUIDoc *doc, TQWidget* tqparent); virtual ~InstrumentParameterPanel() {}; diff --git a/src/gui/editors/parameters/MIDIInstrumentParameterPanel.cpp b/src/gui/editors/parameters/MIDIInstrumentParameterPanel.cpp index 61a9256..37ea57c 100644 --- a/src/gui/editors/parameters/MIDIInstrumentParameterPanel.cpp +++ b/src/gui/editors/parameters/MIDIInstrumentParameterPanel.cpp @@ -60,10 +60,10 @@ namespace Rosegarden { -MIDIInstrumentParameterPanel::MIDIInstrumentParameterPanel(RosegardenGUIDoc *doc, TQWidget* parent): - InstrumentParameterPanel(doc, parent), +MIDIInstrumentParameterPanel::MIDIInstrumentParameterPanel(RosegardenGUIDoc *doc, TQWidget* tqparent): + InstrumentParameterPanel(doc, tqparent), m_rotaryFrame(0), - m_rotaryMapper(new TQSignalMapper(this)) + m_rotaryMapper(new TQSignalMapper(TQT_TQOBJECT(this))) { m_mainGrid = new TQGridLayout(this, 10, 3, 2, 1); @@ -98,7 +98,7 @@ MIDIInstrumentParameterPanel::MIDIInstrumentParameterPanel(RosegardenGUIDoc *doc m_variationValue->setMinimumWidth(width22); m_connectionLabel->setFixedWidth(width25); - m_connectionLabel->setAlignment(Qt::AlignCenter); + m_connectionLabel->tqsetAlignment(TQt::AlignCenter); // Configure the empty final row to accomodate any extra vertical space. @@ -131,7 +131,7 @@ MIDIInstrumentParameterPanel::MIDIInstrumentParameterPanel(RosegardenGUIDoc *doc // Populate channel lists // for (int i = 0; i < 16; i++) { - m_channelValue->insertItem(TQString("%1").arg(i + 1)); + m_channelValue->insertItem(TQString("%1").tqarg(i + 1)); } m_channelValue->setSizeLimit(16); @@ -212,13 +212,13 @@ MIDIInstrumentParameterPanel::setupForInstrument(Instrument *instrument) // TQString connection(strtoqstr(md->getConnection())); if (connection == "") { - m_connectionLabel->setText(i18n("[ %1 ]").arg(i18n("No connection"))); + m_connectionLabel->setText(i18n("[ %1 ]").tqarg(i18n("No connection"))); } else { // remove trailing "(duplex)", "(read only)", "(write only)" etc - connection.replace(TQRegExp("\\s*\\([^)0-9]+\\)\\s*$"), ""); + connection.tqreplace(TQRegExp("\\s*\\([^)0-9]+\\)\\s*$"), ""); - TQString text = i18n("[ %1 ]").arg(connection); + TQString text = i18n("[ %1 ]").tqarg(connection); /*TQString origText(text); TQFontMetrics metrics(m_connectionLabel->fontMetrics()); @@ -293,7 +293,7 @@ MIDIInstrumentParameterPanel::setupControllers(MidiDevice *md) { if (!m_rotaryFrame) { m_rotaryFrame = new TQFrame(this); - m_mainGrid->addMultiCellWidget(m_rotaryFrame, 8, 8, 0, 2, Qt::AlignHCenter); + m_mainGrid->addMultiCellWidget(m_rotaryFrame, 8, 8, 0, 2, TQt::AlignHCenter); m_rotaryGrid = new TQGridLayout(m_rotaryFrame, 10, 3, 8, 1); m_rotaryGrid->addItem(new TQSpacerItem(10, 4), 0, 1); } @@ -321,7 +321,7 @@ MIDIInstrumentParameterPanel::setupControllers(MidiDevice *md) // Get the knob colour - only if the colour is non-default (>0) // - TQColor knobColour = Qt::black; // special case for Rotary + TQColor knobColour = TQt::black; // special case for Rotary if (it->getColourIndex() > 0) { Colour c = comp.getGeneralColourMap().getColourByIndex @@ -361,7 +361,7 @@ MIDIInstrumentParameterPanel::setupControllers(MidiDevice *md) redraw = 0; } if (redraw == 2) { - rotary->repaint(); + rotary->tqrepaint(); } // Update the controller name that is associated with @@ -425,7 +425,7 @@ MIDIInstrumentParameterPanel::setupControllers(MidiDevice *md) // Add signal mapping // - m_rotaryMapper->setMapping(rotary, + m_rotaryMapper->setMapping(TQT_TQOBJECT(rotary), int(it->getControllerValue())); count++; @@ -641,8 +641,8 @@ MIDIInstrumentParameterPanel::populateProgramList() std::string programName = programs[i].getName(); if (programName != "") { m_programValue->insertItem(TQString("%1. %2") - .arg(programs[i].getProgram() + 1) - .arg(strtoqstr(programName))); + .tqarg(programs[i].getProgram() + 1) + .tqarg(strtoqstr(programName))); if (m_selectedInstrument->getProgram() == programs[i]) { currentProgram = m_programs.size(); } @@ -763,8 +763,8 @@ MIDIInstrumentParameterPanel::populateVariationList() strtoqstr(programName)); */ m_variationValue->insertItem(TQString("%1. %2") - .arg(variations[i] + 1) - .arg(strtoqstr(programName))); + .tqarg(variations[i] + 1) + .tqarg(strtoqstr(programName))); if (m_selectedInstrument->getProgram() == program) { currentVariation = m_variations.size(); } @@ -787,7 +787,7 @@ MIDIInstrumentParameterPanel::populateVariationList() } } else { - //!!! seem to have problems here -- the grid layout doesn't + //!!! seem to have problems here -- the grid tqlayout doesn't //like us adding stuff in the middle so if we go from 1 //visible row (say program) to 2 (program + variation) the //second one overlaps the control knobs @@ -1164,7 +1164,7 @@ MIDIInstrumentParameterPanel::showAdditionalControls(bool showThem) m_instrumentLabel->setShown(showThem); int index = 0; for (RotaryMap::iterator it = m_rotaries.begin(); it != m_rotaries.end(); ++it) { - it->second.first->parentWidget()->setShown(showThem || (index < 8)); + it->second.first->tqparentWidget()->setShown(showThem || (index < 8)); //it->second.first->setShown(showThem || (index < 8)); //it->second.second->setShown(showThem || (index < 8)); index++; diff --git a/src/gui/editors/parameters/MIDIInstrumentParameterPanel.h b/src/gui/editors/parameters/MIDIInstrumentParameterPanel.h index 22c0ba1..635c009 100644 --- a/src/gui/editors/parameters/MIDIInstrumentParameterPanel.h +++ b/src/gui/editors/parameters/MIDIInstrumentParameterPanel.h @@ -52,9 +52,10 @@ class Instrument; class MIDIInstrumentParameterPanel : public InstrumentParameterPanel { Q_OBJECT + TQ_OBJECT public: - MIDIInstrumentParameterPanel(RosegardenGUIDoc *doc, TQWidget* parent); + MIDIInstrumentParameterPanel(RosegardenGUIDoc *doc, TQWidget* tqparent); void setupControllers(MidiDevice *); // setup ControlParameters on box diff --git a/src/gui/editors/parameters/RosegardenParameterArea.cpp b/src/gui/editors/parameters/RosegardenParameterArea.cpp index 8790122..1fc924e 100644 --- a/src/gui/editors/parameters/RosegardenParameterArea.cpp +++ b/src/gui/editors/parameters/RosegardenParameterArea.cpp @@ -46,11 +46,11 @@ namespace Rosegarden { -RosegardenParameterArea::RosegardenParameterArea(TQWidget *parent, +RosegardenParameterArea::RosegardenParameterArea(TQWidget *tqparent, const char *name, WFlags f) - : TQWidgetStack(parent, name, f), + : TQWidgetStack(tqparent, name, f), m_style(RosegardenParameterArea::CLASSIC_STYLE), - m_scrollView(new TQScrollView(this, 0, Qt::WStaticContents)), + m_scrollView(new TQScrollView(this, 0, TQt::WStaticContents)), m_classic(new TQVBox(m_scrollView->viewport())), m_tabBox(new KTabWidget(this)), m_active(0), @@ -86,15 +86,15 @@ void RosegardenParameterArea::addRosegardenParameterBox( m_parameterBoxes.push_back(b); m_scrollView->setMinimumWidth(std::max(m_scrollView->minimumWidth(), - b->sizeHint().width()) + 8); + b->tqsizeHint().width()) + 8); - // Create a titled group box for the parameter box, parented by the - // classic layout widget, so that it can be used to provide a title + // Create a titled group box for the parameter box, tqparented by the + // classic tqlayout widget, so that it can be used to provide a title // and outline, in classic mode. Add this container to an array that // parallels the above array of parameter boxes. TQVGroupBox *box = new TQVGroupBox(b->getLongLabel(), m_classic); - box->layout()->setMargin( 4 ); // about half the default value + box->tqlayout()->setMargin( 4 ); // about half the default value TQFont f; f.setBold( true ); box->setFont( f ); @@ -204,7 +204,7 @@ void RosegardenParameterArea::moveWidget(TQWidget *old_container, m_tabBox->removePage(box); } - // Reparent the parameter box, and perform any container-specific + // Retqparent the parameter box, and perform any container-specific // configuration. if (new_container == m_classic) { diff --git a/src/gui/editors/parameters/RosegardenParameterArea.h b/src/gui/editors/parameters/RosegardenParameterArea.h index 7af178a..1000017 100644 --- a/src/gui/editors/parameters/RosegardenParameterArea.h +++ b/src/gui/editors/parameters/RosegardenParameterArea.h @@ -49,14 +49,15 @@ class RosegardenParameterBox; * A widget that arranges a set of Rosegarden parameter-box widgets * within a frame, in a dynamically configurable manner. */ -class RosegardenParameterArea : public QWidgetStack +class RosegardenParameterArea : public TQWidgetStack { Q_OBJECT + TQ_OBJECT public: // Create the parameter display area. - RosegardenParameterArea(TQWidget *parent=0, const char *name=0, WFlags f=0); + RosegardenParameterArea(TQWidget *tqparent=0, const char *name=0, WFlags f=0); // Add a rosegarden parameter box to the list that are to be displayed. @@ -71,13 +72,13 @@ public: TAB_BOX_STYLE // A horizontal list of tabs, displaying one box at a time. }; - // Redisplay the widgets with a different layout style. + // Redisplay the widgets with a different tqlayout style. void setArrangement(Arrangement style); protected: private: - Arrangement m_style; // The current layout style. + Arrangement m_style; // The current tqlayout style. // The list of parameter box widgets that are being displayed by this // widget. diff --git a/src/gui/editors/parameters/RosegardenParameterBox.cpp b/src/gui/editors/parameters/RosegardenParameterBox.cpp index dbefda0..b52d65c 100644 --- a/src/gui/editors/parameters/RosegardenParameterBox.cpp +++ b/src/gui/editors/parameters/RosegardenParameterBox.cpp @@ -41,9 +41,9 @@ namespace Rosegarden RosegardenParameterBox::RosegardenParameterBox(const TQString &shortLabel, const TQString &longLabel, - TQWidget *parent, + TQWidget *tqparent, const char *name) : - TQFrame(parent, name), + TQFrame(tqparent, name), m_shortLabel(shortLabel), m_longLabel(longLabel), m_mode(LANDSCAPE_MODE) diff --git a/src/gui/editors/parameters/RosegardenParameterBox.h b/src/gui/editors/parameters/RosegardenParameterBox.h index 629245f..c75f875 100644 --- a/src/gui/editors/parameters/RosegardenParameterBox.h +++ b/src/gui/editors/parameters/RosegardenParameterBox.h @@ -43,18 +43,19 @@ namespace Rosegarden /** * A flat TQFrame, in which a group of parameters can be laid out. - * Virtual method functions are defined for for requesting a layout + * Virtual method functions are defined for for requesting a tqlayout * style, and returning the single-word to use for labelling the * box. */ -class RosegardenParameterBox : public QFrame +class RosegardenParameterBox : public TQFrame { Q_OBJECT + TQ_OBJECT public: RosegardenParameterBox(const TQString &shortLabel, // e.g. i18n("Track") const TQString &longLabel, // e.g. i18n("Track Parameters") - TQWidget *parent = 0, + TQWidget *tqparent = 0, const char *name = 0); // Ask for a one-word string that can be used to label the widget. @@ -71,11 +72,11 @@ public: protected: void init(); - // List the layout styles that may be requested via a call to setStyle(). + // List the tqlayout styles that may be requested via a call to setStyle(). enum LayoutMode { - LANDSCAPE_MODE, // Optimize the layout for a tall and narrow parent. - PORTRAIT_MODE // Optimize the layout for a short and wide parent. + LANDSCAPE_MODE, // Optimize the tqlayout for a tall and narrow tqparent. + PORTRAIT_MODE // Optimize the tqlayout for a short and wide tqparent. }; void setLayoutMode(LayoutMode mode); @@ -83,7 +84,7 @@ protected: TQFont m_font; TQString m_shortLabel; // The string that containers can use for labelling and identification TQString m_longLabel; // The full title - LayoutMode m_mode; // The current layout mode. + LayoutMode m_mode; // The current tqlayout mode. }; diff --git a/src/gui/editors/parameters/SegmentParameterBox.cpp b/src/gui/editors/parameters/SegmentParameterBox.cpp index 23fce12..8e35960 100644 --- a/src/gui/editors/parameters/SegmentParameterBox.cpp +++ b/src/gui/editors/parameters/SegmentParameterBox.cpp @@ -84,10 +84,10 @@ namespace Rosegarden { SegmentParameterBox::SegmentParameterBox(RosegardenGUIDoc* doc, - TQWidget *parent) + TQWidget *tqparent) : RosegardenParameterBox(i18n("Segment"), i18n("Segment Parameters"), - parent), + tqparent), m_highestPlayable(127), m_lowestPlayable(0), m_standardQuantizations(BasicQuantizer::getStandardQuantizations()), @@ -315,14 +315,14 @@ SegmentParameterBox::initBox() // populate the quantize combo // - TQPixmap noMap = NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("menu-no-note")); + TQPixmap noMap = NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap("menu-no-note")); for (unsigned int i = 0; i < m_standardQuantizations.size(); ++i) { timeT time = m_standardQuantizations[i]; timeT error = 0; TQString label = NotationStrings::makeNoteMenuLabel(time, true, error); - TQPixmap pmap = NotePixmapFactory::toQPixmap(NotePixmapFactory::makeNoteMenuPixmap(time, error)); + TQPixmap pmap = NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeNoteMenuPixmap(time, error)); m_quantizeValue->insertItem(error ? noMap : pmap, label); } m_quantizeValue->insertItem(noMap, i18n("Off")); @@ -333,7 +333,7 @@ SegmentParameterBox::initBox() // populate the transpose combo // for (int i = -m_transposeRange; i < m_transposeRange + 1; i++) { - m_transposeValue->insertItem(noMap, TQString("%1").arg(i)); + m_transposeValue->insertItem(noMap, TQString("%1").tqarg(i)); if (i == 0) m_transposeValue->setCurrentItem(m_transposeValue->count() - 1); } @@ -356,14 +356,14 @@ SegmentParameterBox::initBox() // timeT error = 0; TQString label = NotationStrings::makeNoteMenuLabel(time, true, error); - TQPixmap pmap = NotePixmapFactory::toQPixmap(NotePixmapFactory::makeNoteMenuPixmap(time, error)); + TQPixmap pmap = NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeNoteMenuPixmap(time, error)); m_delayValue->insertItem((error ? noMap : pmap), label); } for (int i = 0; i < 10; i++) { int rtd = (i < 5 ? ((i + 1) * 10) : ((i - 3) * 50)); m_realTimeDelays.push_back(rtd); - m_delayValue->insertItem(i18n("%1 ms").arg(rtd)); + m_delayValue->insertItem(i18n("%1 ms").tqarg(rtd)); } // set delay blank initially @@ -662,11 +662,11 @@ SegmentParameterBox::populateBoxFromSegments() m_quantizeValue->setEnabled(quantized != NotApplicable); switch (transposed) { - // setCurrentItem works with QStrings + // setCurrentItem works with TQStrings // 2nd arg of "true" means "add if necessary" case All: m_transposeValue-> - setCurrentItem(TQString("%1").arg(transposeLevel), true); + setCurrentItem(TQString("%1").tqarg(transposeLevel), true); break; case Some: @@ -694,7 +694,7 @@ SegmentParameterBox::populateBoxFromSegments() } else if (delayLevel < 0) { - m_delayValue->setCurrentItem(i18n("%1 ms").arg( -delayLevel), + m_delayValue->setCurrentItem(i18n("%1 ms").tqarg( -delayLevel), true); } @@ -1019,8 +1019,8 @@ SegmentParameterBox::updateHighLow() //!!! FIXME this code is broken, and needs to be fixed after the fashion of //the TPB, but I'm not bothering with that at this time, because they are //going to be hidden for 1.3 anyway -// m_highButton->setText(TQString("&High: %1%2").arg(highest.getNoteName(key)).arg(highest.getOctave(base))); -// m_lowButton->setText(TQString("&Low: %1%2").arg(lowest.getNoteName(key)).arg(lowest.getOctave(base))); +// m_highButton->setText(TQString("&High: %1%2").tqarg(highest.getNoteName(key)).tqarg(highest.getOctave(base))); +// m_lowButton->setText(TQString("&Low: %1%2").tqarg(lowest.getNoteName(key)).tqarg(lowest.getOctave(base))); } void @@ -1200,7 +1200,7 @@ SegmentParameterBox::showAdditionalControls(bool showThem) m_rangeLabel->setShown(showThem); */ } -QString +TQString SegmentParameterBox::getPreviousBox(RosegardenParameterArea::Arrangement arrangement) const { if (arrangement == RosegardenParameterArea::CLASSIC_STYLE) { diff --git a/src/gui/editors/parameters/SegmentParameterBox.h b/src/gui/editors/parameters/SegmentParameterBox.h index 0a7a266..b67a8f1 100644 --- a/src/gui/editors/parameters/SegmentParameterBox.h +++ b/src/gui/editors/parameters/SegmentParameterBox.h @@ -60,6 +60,7 @@ class SegmentParameterBox : public RosegardenParameterBox, public CompositionObserver { Q_OBJECT + TQ_OBJECT public: @@ -72,7 +73,7 @@ public: } Tristate; SegmentParameterBox(RosegardenGUIDoc *doc, - TQWidget *parent=0); + TQWidget *tqparent=0); ~SegmentParameterBox(); // Use Segments to update GUI parameters diff --git a/src/gui/editors/parameters/TrackParameterBox.cpp b/src/gui/editors/parameters/TrackParameterBox.cpp index 3ddfa69..a2a29c4 100644 --- a/src/gui/editors/parameters/TrackParameterBox.cpp +++ b/src/gui/editors/parameters/TrackParameterBox.cpp @@ -88,10 +88,10 @@ namespace Rosegarden { TrackParameterBox::TrackParameterBox( RosegardenGUIDoc *doc, - TQWidget *parent) + TQWidget *tqparent) : RosegardenParameterBox(i18n("Track"), i18n("Track Parameters"), - parent), + tqparent), m_doc(doc), m_highestPlayable(127), m_lowestPlayable(0), @@ -128,7 +128,7 @@ TrackParameterBox::TrackParameterBox( RosegardenGUIDoc *doc, // track label // m_trackLabel = new KSqueezedTextLabel(i18n("<untitled>"), this); - m_trackLabel->setAlignment(Qt::AlignCenter); + m_trackLabel->tqsetAlignment(TQt::AlignCenter); //mainLayout->addMultiCellWidget(m_trackLabel, 0, 0, 0, 5, AlignCenter); mainLayout->addWidget(m_trackLabel, 0, 0); @@ -311,7 +311,7 @@ TrackParameterBox::TrackParameterBox( RosegardenGUIDoc *doc, int transposeRange = 48; for (int i = -transposeRange; i < transposeRange + 1; i++) { - m_defTranspose->insertItem(TQString("%1").arg(i)); + m_defTranspose->insertItem(TQString("%1").tqarg(i)); if (i == 0) m_defTranspose->setCurrentItem(m_defTranspose->count() - 1); } @@ -453,7 +453,7 @@ TrackParameterBox::populatePlaybackDeviceList() DeviceId devId = device->getId(); if ((*it)->getType() == Instrument::SoftSynth) { - iname.replace("Synth plugin ", ""); + iname.tqreplace("Synth plugin ", ""); pname = ""; AudioPluginInstance *plugin = (*it)->getPlugin (Instrument::SYNTH_PLUGIN_POSITION); @@ -468,7 +468,7 @@ TrackParameterBox::populatePlaybackDeviceList() pname = strtoqstr(plugin->getDistinctiveConfigurationText()); } if (pname != "") { - pname = TQString("%1: %2").arg(label).arg(pname); + pname = TQString("%1: %2").tqarg(label).tqarg(pname); } else { pname = label; } @@ -527,12 +527,12 @@ TrackParameterBox::populateRecordingDeviceList() m_recChannel->setEnabled(false); // hide these for audio instruments - m_defaultsGroup->parentWidget()->setShown(false); + m_defaultsGroup->tqparentWidget()->setShown(false); } else { // InstrumentType::Midi and InstrumentType::SoftSynth // show these if not audio instrument - m_defaultsGroup->parentWidget()->setShown(true); + m_defaultsGroup->tqparentWidget()->setShown(true); m_recDeviceIds.push_back(Device::ALL_DEVICES); m_recDevice->insertItem(i18n("All")); @@ -547,7 +547,7 @@ TrackParameterBox::populateRecordingDeviceList() && dev->isRecording()) { TQString connection = strtoqstr(dev->getConnection()); // remove trailing "(duplex)", "(read only)", "(write only)" etc - connection.replace(TQRegExp("\\s*\\([^)0-9]+\\)\\s*$"), ""); + connection.tqreplace(TQRegExp("\\s*\\([^)0-9]+\\)\\s*$"), ""); m_recDevice->insertItem(connection); m_recDeviceIds.push_back(dev->getId()); } @@ -601,10 +601,10 @@ TrackParameterBox::updateHighLow() bool useSharps = true; bool includeOctave = true; -// m_highButton->setText(i18n("High: %1").arg(highest.getAsString(useSharps, includeOctave, base))); -// m_lowButton->setText(i18n("Low: %1").arg(lowest.getAsString(useSharps, includeOctave, base))); - m_highButton->setText(TQString("%1").arg(highest.getAsString(useSharps, includeOctave, base))); - m_lowButton->setText(TQString("%1").arg(lowest.getAsString(useSharps, includeOctave, base))); +// m_highButton->setText(i18n("High: %1").tqarg(highest.getAsString(useSharps, includeOctave, base))); +// m_lowButton->setText(i18n("Low: %1").tqarg(lowest.getAsString(useSharps, includeOctave, base))); + m_highButton->setText(TQString("%1").tqarg(highest.getAsString(useSharps, includeOctave, base).c_str())); + m_lowButton->setText(TQString("%1").tqarg(lowest.getAsString(useSharps, includeOctave, base).c_str())); m_presetLbl->setEnabled(false); } @@ -624,13 +624,13 @@ TrackParameterBox::slotUpdateControls(int /*dummy*/) return ; m_defClef->setCurrentItem(trk->getClef()); - m_defTranspose->setCurrentItem(TQString("%1").arg(trk->getTranspose()), true); + m_defTranspose->setCurrentItem(TQString("%1").tqarg(trk->getTranspose()), true); m_defColor->setCurrentItem(trk->getColor()); m_highestPlayable = trk->getHighestPlayable(); m_lowestPlayable = trk->getLowestPlayable(); updateHighLow(); // set this down here because updateHighLow just disabled the label - m_presetLbl->setText(trk->getPresetLabel()); + m_presetLbl->setText(trk->getPresetLabel().c_str()); m_presetLbl->setEnabled(true); m_staffSizeCombo->setCurrentItem(trk->getStaffSize()); @@ -657,13 +657,13 @@ TrackParameterBox::slotSelectedTrackNameChanged() RG_DEBUG << "TrackParameterBox::sotSelectedTrackNameChanged()\n"; Composition &comp = m_doc->getComposition(); Track *trk = comp.getTrackById(m_selectedTrackId); - TQString m_trackName = trk->getLabel(); + TQString m_trackName = trk->getLabel().c_str(); if (m_trackName.isEmpty()) m_trackName = i18n("<untitled>"); else m_trackName.truncate(20); int trackNum = trk->getPosition() + 1; - m_trackLabel->setText(i18n("[ Track %1 - %2 ]").arg(trackNum).arg(m_trackName)); + m_trackLabel->setText(i18n("[ Track %1 - %2 ]").tqarg(trackNum).tqarg(m_trackName)); } void @@ -792,7 +792,7 @@ TrackParameterBox::slotInstrumentLabelChanged(InstrumentId id, TQString label) void TrackParameterBox::showAdditionalControls(bool showThem) { - // m_defaultsGroup->parentWidget()->setShown(showThem); + // m_defaultsGroup->tqparentWidget()->setShown(showThem); } void @@ -952,7 +952,7 @@ TrackParameterBox::slotPresetPressed() try { if (dialog.exec() == TQDialog::Accepted) { m_presetLbl->setText(dialog.getName()); - trk->setPresetLabel(dialog.getName()); + trk->setPresetLabel(dialog.getName().ascii()); if (dialog.getConvertAllSegments()) { SegmentSyncCommand* command = new SegmentSyncCommand( comp.getSegments(), comp.getSelectedTrack(), @@ -1008,7 +1008,7 @@ TrackParameterBox::slotStaffBracketChanged(int index) trk->setStaffBracket(index); } -QString +TQString TrackParameterBox::getPreviousBox(RosegardenParameterArea::Arrangement arrangement) const { if (arrangement == RosegardenParameterArea::CLASSIC_STYLE) { diff --git a/src/gui/editors/parameters/TrackParameterBox.h b/src/gui/editors/parameters/TrackParameterBox.h index 696e3f7..3d55201 100644 --- a/src/gui/editors/parameters/TrackParameterBox.h +++ b/src/gui/editors/parameters/TrackParameterBox.h @@ -57,10 +57,11 @@ class RosegardenGUIDoc; class TrackParameterBox : public RosegardenParameterBox { Q_OBJECT + TQ_OBJECT public: TrackParameterBox( RosegardenGUIDoc *doc, - TQWidget *parent=0); + TQWidget *tqparent=0); ~TrackParameterBox(); void setDocument( RosegardenGUIDoc *doc ); diff --git a/src/gui/editors/segment/ControlEditorDialog.cpp b/src/gui/editors/segment/ControlEditorDialog.cpp index 5fb1fa1..48d0f0a 100644 --- a/src/gui/editors/segment/ControlEditorDialog.cpp +++ b/src/gui/editors/segment/ControlEditorDialog.cpp @@ -72,10 +72,10 @@ namespace Rosegarden const TQString notShowing(i18n("<not showing>")); -ControlEditorDialog::ControlEditorDialog(TQWidget *parent, +ControlEditorDialog::ControlEditorDialog(TQWidget *tqparent, RosegardenGUIDoc *doc, DeviceId device): - KMainWindow(parent, "controleditordialog"), + KMainWindow(tqparent, "controleditordialog"), m_studio(&doc->getStudio()), m_doc(doc), m_device(device), @@ -96,7 +96,7 @@ ControlEditorDialog::ControlEditorDialog(TQWidget *parent, // spacing hack! new TQLabel("", mainFrame); - new TQLabel(i18n(" Control Events for %1 (device %2)").arg(deviceName). + new TQLabel(i18n(" Control Events for %1 (device %2)").tqarg(deviceName). arg(device), mainFrame); new TQLabel("", mainFrame); @@ -111,20 +111,20 @@ ControlEditorDialog::ControlEditorDialog(TQWidget *parent, m_listView->addColumn(i18n("Color ")); m_listView->addColumn(i18n("Position on instrument panel")); - m_listView->setColumnAlignment(0, Qt::AlignLeft); + m_listView->setColumnAlignment(0, TQt::AlignLeft); // Align remaining columns centrally for (int i = 1; i < 9; ++i) - m_listView->setColumnAlignment(i, Qt::AlignHCenter); + m_listView->setColumnAlignment(i, TQt::AlignHCenter); m_listView->restoreLayout(kapp->config(), ControlEditorConfigGroup); TQFrame* btnBox = new TQFrame(mainFrame); - btnBox->setSizePolicy( + btnBox->tqsetSizePolicy( TQSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed)); - TQHBoxLayout* layout = new TQHBoxLayout(btnBox, 4, 10); + TQHBoxLayout* tqlayout = new TQHBoxLayout(btnBox, 4, 10); m_addButton = new TQPushButton(i18n("Add"), btnBox); m_deleteButton = new TQPushButton(i18n("Delete"), btnBox); @@ -143,13 +143,13 @@ ControlEditorDialog::ControlEditorDialog(TQWidget *parent, (m_closeButton, i18n("Close the Control Parameter editor")); - layout->addStretch(10); - layout->addWidget(m_addButton); - layout->addWidget(m_deleteButton); - layout->addSpacing(30); + tqlayout->addStretch(10); + tqlayout->addWidget(m_addButton); + tqlayout->addWidget(m_deleteButton); + tqlayout->addSpacing(30); - layout->addWidget(m_closeButton); - layout->addSpacing(5); + tqlayout->addWidget(m_closeButton); + tqlayout->addSpacing(5); connect(m_addButton, TQT_SIGNAL(released()), TQT_SLOT(slotAdd())); @@ -220,7 +220,7 @@ ControlEditorDialog::slotUpdate() if (colour == "") colour = i18n("<default>"); - TQString position = TQString("%1").arg(it->getIPBPosition()); + TQString position = TQString("%1").tqarg(it->getIPBPosition()); if (position.toInt() == -1) position = notShowing; @@ -235,9 +235,9 @@ ControlEditorDialog::slotUpdate() strtoqstr(it->getType()), TQString("-"), strtoqstr(it->getDescription()), - TQString("%1").arg(it->getMin()), - TQString("%1").arg(it->getMax()), - TQString("%1").arg(it->getDefault()), + TQString("%1").tqarg(it->getMin()), + TQString("%1").tqarg(it->getMax()), + TQString("%1").tqarg(it->getDefault()), colour, position); } else { @@ -247,9 +247,9 @@ ControlEditorDialog::slotUpdate() strtoqstr(it->getType()), value, strtoqstr(it->getDescription()), - TQString("%1").arg(it->getMin()), - TQString("%1").arg(it->getMax()), - TQString("%1").arg(it->getDefault()), + TQString("%1").tqarg(it->getMin()), + TQString("%1").tqarg(it->getMax()), + TQString("%1").tqarg(it->getDefault()), colour, position); } @@ -337,7 +337,7 @@ ControlEditorDialog::slotClose() void ControlEditorDialog::setupActions() { - KAction* close = KStdAction::close(this, + KAction* close = KStdAction::close(TQT_TQOBJECT(this), TQT_SLOT(slotClose()), actionCollection()); diff --git a/src/gui/editors/segment/ControlEditorDialog.h b/src/gui/editors/segment/ControlEditorDialog.h index 369a9b1..e9722e5 100644 --- a/src/gui/editors/segment/ControlEditorDialog.h +++ b/src/gui/editors/segment/ControlEditorDialog.h @@ -50,9 +50,10 @@ class MultiViewCommandHistory; class ControlEditorDialog : public KMainWindow { Q_OBJECT + TQ_OBJECT public: - ControlEditorDialog(TQWidget *parent, + ControlEditorDialog(TQWidget *tqparent, RosegardenGUIDoc *doc, DeviceId device); diff --git a/src/gui/editors/segment/ControlParameterEditDialog.cpp b/src/gui/editors/segment/ControlParameterEditDialog.cpp index 1f4e9fd..47f01db 100644 --- a/src/gui/editors/segment/ControlParameterEditDialog.cpp +++ b/src/gui/editors/segment/ControlParameterEditDialog.cpp @@ -55,10 +55,10 @@ namespace Rosegarden const TQString notShowing(i18n("<not showing>")); ControlParameterEditDialog::ControlParameterEditDialog( - TQWidget *parent, + TQWidget *tqparent, ControlParameter *control, RosegardenGUIDoc *doc): - KDialogBase(parent, 0, true, + KDialogBase(tqparent, 0, true, i18n("Edit Control Parameter"), Ok | Cancel), m_doc(doc), m_control(control) @@ -67,52 +67,52 @@ ControlParameterEditDialog::ControlParameterEditDialog( TQVBox *vbox = makeVBoxMainWidget(); - TQGroupBox *groupBox = new QGroupBox - (1, Horizontal, i18n("Control Event Properties"), vbox); + TQGroupBox *groupBox = new TQGroupBox + (1, Qt::Horizontal, i18n("Control Event Properties"), vbox); TQFrame *frame = new TQFrame(groupBox); - TQGridLayout *layout = new TQGridLayout(frame, 4, 3, 10, 5); + TQGridLayout *tqlayout = new TQGridLayout(frame, 4, 3, 10, 5); - layout->addWidget(new TQLabel(i18n("Name:"), frame), 0, 0); + tqlayout->addWidget(new TQLabel(i18n("Name:"), frame), 0, 0); m_nameEdit = new TQLineEdit(frame); - layout->addWidget(m_nameEdit, 0, 1); + tqlayout->addWidget(m_nameEdit, 0, 1); - layout->addWidget(new TQLabel(i18n("Type:"), frame), 1, 0); + tqlayout->addWidget(new TQLabel(i18n("Type:"), frame), 1, 0); m_typeCombo = new KComboBox(frame); - layout->addMultiCellWidget(m_typeCombo, 1, 1, 1, 2); + tqlayout->addMultiCellWidget(m_typeCombo, 1, 1, 1, 2); - layout->addWidget(new TQLabel(i18n("Description:"), frame), 2, 0); + tqlayout->addWidget(new TQLabel(i18n("Description:"), frame), 2, 0); m_description = new TQLineEdit(frame); - layout->addMultiCellWidget(m_description, 2, 2, 1, 2); + tqlayout->addMultiCellWidget(m_description, 2, 2, 1, 2); // hex value alongside decimal value m_hexValue = new TQLabel(frame); - layout->addWidget(m_hexValue, 3, 1); + tqlayout->addWidget(m_hexValue, 3, 1); - layout->addWidget(new TQLabel(i18n("Control Event value:"), frame), 3, 0); + tqlayout->addWidget(new TQLabel(i18n("Control Event value:"), frame), 3, 0); m_controllerBox = new TQSpinBox(frame); - layout->addWidget(m_controllerBox, 3, 2); + tqlayout->addWidget(m_controllerBox, 3, 2); - layout->addWidget(new TQLabel(i18n("Minimum value:"), frame), 4, 0); + tqlayout->addWidget(new TQLabel(i18n("Minimum value:"), frame), 4, 0); m_minBox = new TQSpinBox(frame); - layout->addMultiCellWidget(m_minBox, 4, 4, 1, 2); + tqlayout->addMultiCellWidget(m_minBox, 4, 4, 1, 2); - layout->addWidget(new TQLabel(i18n("Maximum value:"), frame), 5, 0); + tqlayout->addWidget(new TQLabel(i18n("Maximum value:"), frame), 5, 0); m_maxBox = new TQSpinBox(frame); - layout->addMultiCellWidget(m_maxBox, 5, 5, 1, 2); + tqlayout->addMultiCellWidget(m_maxBox, 5, 5, 1, 2); - layout->addWidget(new TQLabel(i18n("Default value:"), frame), 6, 0); + tqlayout->addWidget(new TQLabel(i18n("Default value:"), frame), 6, 0); m_defaultBox = new TQSpinBox(frame); - layout->addMultiCellWidget(m_defaultBox, 6, 6, 1, 2); + tqlayout->addMultiCellWidget(m_defaultBox, 6, 6, 1, 2); - layout->addWidget(new TQLabel(i18n("Color:"), frame), 7, 0); + tqlayout->addWidget(new TQLabel(i18n("Color:"), frame), 7, 0); m_colourCombo = new KComboBox(frame); - layout->addMultiCellWidget(m_colourCombo, 7, 7, 1, 2); + tqlayout->addMultiCellWidget(m_colourCombo, 7, 7, 1, 2); - layout->addWidget(new TQLabel(i18n("Instrument Parameter Box position:"), frame), 8, 0); + tqlayout->addWidget(new TQLabel(i18n("Instrument Parameter Box position:"), frame), 8, 0); m_ipbPosition = new KComboBox(frame); - layout->addMultiCellWidget(m_ipbPosition, 8, 8, 1, 2); + tqlayout->addMultiCellWidget(m_ipbPosition, 8, 8, 1, 2); connect(m_nameEdit, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(slotNameChanged(const TQString&))); @@ -182,7 +182,7 @@ ControlParameterEditDialog::ControlParameterEditDialog( // m_ipbPosition->insertItem(notShowing); for (unsigned int i = 0; i < 32; i++) - m_ipbPosition->insertItem(TQString("%1").arg(i)); + m_ipbPosition->insertItem(TQString("%1").tqarg(i)); if (m_control->getType() == Controller::EventType) m_typeCombo->setCurrentItem(0); diff --git a/src/gui/editors/segment/ControlParameterEditDialog.h b/src/gui/editors/segment/ControlParameterEditDialog.h index 1c6bc01..289dc68 100644 --- a/src/gui/editors/segment/ControlParameterEditDialog.h +++ b/src/gui/editors/segment/ControlParameterEditDialog.h @@ -47,8 +47,9 @@ class RosegardenGUIDoc; class ControlParameterEditDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - ControlParameterEditDialog(TQWidget *parent, + ControlParameterEditDialog(TQWidget *tqparent, ControlParameter *control, RosegardenGUIDoc *doc); diff --git a/src/gui/editors/segment/ControlParameterItem.h b/src/gui/editors/segment/ControlParameterItem.h index 7be91b3..e64b1d3 100644 --- a/src/gui/editors/segment/ControlParameterItem.h +++ b/src/gui/editors/segment/ControlParameterItem.h @@ -38,7 +38,7 @@ class ControlParameterItem : public KListViewItem { public: ControlParameterItem(int id, - TQListView *parent, + TQListView *tqparent, TQString str1, TQString str2, TQString str3, @@ -48,7 +48,7 @@ public: TQString str7, TQString str8, TQString str9): - KListViewItem(parent, str1, str2, str3, str4, str5, str6, str7, str8), + KListViewItem(tqparent, str1, str2, str3, str4, str5, str6, str7, str8), m_id(id) { setText(8, str9); } int getId() const { return m_id; } diff --git a/src/gui/editors/segment/MarkerEditor.cpp b/src/gui/editors/segment/MarkerEditor.cpp index d9df8a2..dffe446 100644 --- a/src/gui/editors/segment/MarkerEditor.cpp +++ b/src/gui/editors/segment/MarkerEditor.cpp @@ -71,9 +71,9 @@ namespace Rosegarden { -MarkerEditor::MarkerEditor(TQWidget *parent, +MarkerEditor::MarkerEditor(TQWidget *tqparent, RosegardenGUIDoc *doc): - KMainWindow(parent, "markereditordialog"), + KMainWindow(tqparent, "markereditordialog"), m_doc(doc), m_modified(false) { @@ -89,9 +89,9 @@ MarkerEditor::MarkerEditor(TQWidget *parent, // Align centrally for (int i = 0; i < 3; ++i) - m_listView->setColumnAlignment(i, Qt::AlignHCenter); + m_listView->setColumnAlignment(i, TQt::AlignHCenter); - TQGroupBox *posGroup = new TQGroupBox(2, Horizontal, + TQGroupBox *posGroup = new TQGroupBox(2, Qt::Horizontal, i18n("Pointer position"), mainFrame); new TQLabel(i18n("Absolute time:"), posGroup); @@ -105,10 +105,10 @@ MarkerEditor::MarkerEditor(TQWidget *parent, TQFrame* btnBox = new TQFrame(mainFrame); - btnBox->setSizePolicy( + btnBox->tqsetSizePolicy( TQSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed)); - TQHBoxLayout* layout = new TQHBoxLayout(btnBox, 4, 10); + TQHBoxLayout* tqlayout = new TQHBoxLayout(btnBox, 4, 10); m_addButton = new TQPushButton(i18n("Add"), btnBox); m_deleteButton = new TQPushButton(i18n("Delete"), btnBox); @@ -132,14 +132,14 @@ MarkerEditor::MarkerEditor(TQWidget *parent, (m_closeButton, i18n("Close the Marker Editor")); - layout->addStretch(10); - layout->addWidget(m_addButton); - layout->addWidget(m_deleteButton); - layout->addWidget(m_deleteAllButton); - layout->addSpacing(30); + tqlayout->addStretch(10); + tqlayout->addWidget(m_addButton); + tqlayout->addWidget(m_deleteButton); + tqlayout->addWidget(m_deleteAllButton); + tqlayout->addSpacing(30); - layout->addWidget(m_closeButton); - layout->addSpacing(5); + tqlayout->addWidget(m_closeButton); + tqlayout->addSpacing(5); connect(m_addButton, TQT_SIGNAL(released()), TQT_SLOT(slotAdd())); @@ -182,7 +182,7 @@ void MarkerEditor::updatePosition() { timeT pos = m_doc->getComposition().getPosition(); - m_absoluteTime->setText(TQString("%1").arg(pos)); + m_absoluteTime->setText(TQString("%1").tqarg(pos)); RealTime rT = m_doc->getComposition().getElapsedRealTime(pos); long hours = rT.sec / (60 * 60); @@ -192,9 +192,9 @@ MarkerEditor::updatePosition() TQString realTime, secsStr; if (hours) - realTime += TQString("%1h ").arg(hours); + realTime += TQString("%1h ").tqarg(hours); if (mins) - realTime += TQString("%1m ").arg(mins); + realTime += TQString("%1m ").tqarg(mins); secsStr.sprintf("%ld.%03lds", secs, msecs); realTime += secsStr; @@ -203,7 +203,7 @@ MarkerEditor::updatePosition() m_realTime->setText(realTime); TQString barTime = - TQString("%1").arg(m_doc->getComposition().getBarNumber(pos) + 1); + TQString("%1").tqarg(m_doc->getComposition().getBarNumber(pos) + 1); // again only update if needed if (m_barTime->text() != barTime) @@ -367,7 +367,7 @@ MarkerEditor::slotClose() void MarkerEditor::setupActions() { - KAction* close = KStdAction::close(this, + KAction* close = KStdAction::close(TQT_TQOBJECT(this), TQT_SLOT(slotClose()), actionCollection()); @@ -396,7 +396,7 @@ MarkerEditor::setupActions() TQCanvasPixmap pixmap(pixmapDir + "/toolbar/time-musical.png"); TQIconSet icon(pixmap); - action = new KRadioAction(i18n("&Musical Times"), icon, 0, this, + action = new KRadioAction(i18n("&Musical Times"), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotMusicalTime()), actionCollection(), "time_musical"); action->setExclusiveGroup("timeMode"); @@ -406,7 +406,7 @@ MarkerEditor::setupActions() pixmap.load(pixmapDir + "/toolbar/time-real.png"); icon = TQIconSet(pixmap); - action = new KRadioAction(i18n("&Real Times"), icon, 0, this, + action = new KRadioAction(i18n("&Real Times"), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotRealTime()), actionCollection(), "time_real"); action->setExclusiveGroup("timeMode"); @@ -416,7 +416,7 @@ MarkerEditor::setupActions() pixmap.load(pixmapDir + "/toolbar/time-raw.png"); icon = TQIconSet(pixmap); - action = new KRadioAction(i18n("Ra&w Times"), icon, 0, this, + action = new KRadioAction(i18n("Ra&w Times"), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotRawTime()), actionCollection(), "time_raw"); action->setExclusiveGroup("timeMode"); @@ -530,7 +530,7 @@ MarkerEditor::slotItemClicked(TQListViewItem *item) } } -QString +TQString MarkerEditor::makeTimeString(timeT time, int timeMode) { switch (timeMode) { @@ -542,27 +542,27 @@ MarkerEditor::makeTimeString(timeT time, int timeMode) (time, bar, beat, fraction, remainder); ++bar; return TQString("%1%2%3-%4%5-%6%7-%8%9 ") - .arg(bar / 100) - .arg((bar % 100) / 10) - .arg(bar % 10) - .arg(beat / 10) - .arg(beat % 10) - .arg(fraction / 10) - .arg(fraction % 10) - .arg(remainder / 10) - .arg(remainder % 10); + .tqarg(bar / 100) + .tqarg((bar % 100) / 10) + .tqarg(bar % 10) + .tqarg(beat / 10) + .tqarg(beat % 10) + .tqarg(fraction / 10) + .tqarg(fraction % 10) + .tqarg(remainder / 10) + .tqarg(remainder % 10); } case 1: // real time { RealTime rt = m_doc->getComposition().getElapsedRealTime(time); - // return TQString("%1 ").arg(rt.toString().c_str()); - return TQString("%1 ").arg(rt.toText().c_str()); + // return TQString("%1 ").tqarg(rt.toString().c_str()); + return TQString("%1 ").tqarg(rt.toText().c_str()); } default: - return TQString("%1 ").arg(time); + return TQString("%1 ").tqarg(time); } } diff --git a/src/gui/editors/segment/MarkerEditor.h b/src/gui/editors/segment/MarkerEditor.h index 8d6de0e..c5a1973 100644 --- a/src/gui/editors/segment/MarkerEditor.h +++ b/src/gui/editors/segment/MarkerEditor.h @@ -51,9 +51,10 @@ class MultiViewCommandHistory; class MarkerEditor : public KMainWindow { Q_OBJECT + TQ_OBJECT public: - MarkerEditor(TQWidget *parent, + MarkerEditor(TQWidget *tqparent, RosegardenGUIDoc *doc); ~MarkerEditor(); diff --git a/src/gui/editors/segment/MarkerEditorViewItem.h b/src/gui/editors/segment/MarkerEditorViewItem.h index 9852202..03320aa 100644 --- a/src/gui/editors/segment/MarkerEditorViewItem.h +++ b/src/gui/editors/segment/MarkerEditorViewItem.h @@ -35,16 +35,16 @@ namespace Rosegarden { class MarkerEditorViewItem : public KListViewItem { public: - MarkerEditorViewItem(TQListView * parent, int id, + MarkerEditorViewItem(TQListView * tqparent, int id, TQString label1, - TQString label2 = TQString::null, - TQString label3 = TQString::null, - TQString label4 = TQString::null, - TQString label5 = TQString::null, - TQString label6 = TQString::null, - TQString label7 = TQString::null, - TQString label8 = TQString::null): - KListViewItem(parent, label1, label2, label3, label4, + TQString label2 = TQString(), + TQString label3 = TQString(), + TQString label4 = TQString(), + TQString label5 = TQString(), + TQString label6 = TQString(), + TQString label7 = TQString(), + TQString label8 = TQString()): + KListViewItem(tqparent, label1, label2, label3, label4, label5, label6, label7, label8), m_rawTime(0), m_fake(false), m_id(id) { ; } diff --git a/src/gui/editors/segment/PlayList.cpp b/src/gui/editors/segment/PlayList.cpp index da56edc..c0154ec 100644 --- a/src/gui/editors/segment/PlayList.cpp +++ b/src/gui/editors/segment/PlayList.cpp @@ -47,8 +47,8 @@ namespace Rosegarden { -PlayList::PlayList(TQWidget *parent, const char *name) - : TQVBox(parent, name), +PlayList::PlayList(TQWidget *tqparent, const char *name) + : TQVBox(tqparent, name), m_listView(new PlayListView(this)), m_buttonBar(new TQFrame(this)), m_barLayout(new TQHBoxLayout(m_buttonBar)), diff --git a/src/gui/editors/segment/PlayList.h b/src/gui/editors/segment/PlayList.h index 8c04553..606eecd 100644 --- a/src/gui/editors/segment/PlayList.h +++ b/src/gui/editors/segment/PlayList.h @@ -43,12 +43,13 @@ namespace Rosegarden class PlayListView; -class PlayList : public QVBox +class PlayList : public TQVBox { Q_OBJECT + TQ_OBJECT public: - PlayList(TQWidget *parent = 0, const char *name = 0); + PlayList(TQWidget *tqparent = 0, const char *name = 0); ~PlayList(); PlayListView* getListView() { return m_listView; } diff --git a/src/gui/editors/segment/PlayListDialog.cpp b/src/gui/editors/segment/PlayListDialog.cpp index b519b6e..74c386b 100644 --- a/src/gui/editors/segment/PlayListDialog.cpp +++ b/src/gui/editors/segment/PlayListDialog.cpp @@ -36,8 +36,8 @@ namespace Rosegarden { PlayListDialog::PlayListDialog(TQString caption, - TQWidget* parent, const char* name) - : KDialogBase(parent, name, false, caption, + TQWidget* tqparent, const char* name) + : KDialogBase(tqparent, name, false, caption, KDialogBase::Close, // standard buttons KDialogBase::Close, // default button true), diff --git a/src/gui/editors/segment/PlayListDialog.h b/src/gui/editors/segment/PlayListDialog.h index 5130ee3..69956dd 100644 --- a/src/gui/editors/segment/PlayListDialog.h +++ b/src/gui/editors/segment/PlayListDialog.h @@ -43,9 +43,10 @@ class PlayList; class PlayListDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - PlayListDialog(TQString caption, TQWidget* parent = 0, const char* name = 0); + PlayListDialog(TQString caption, TQWidget* tqparent = 0, const char* name = 0); PlayList* getPlayList() { return m_playList; } diff --git a/src/gui/editors/segment/PlayListView.cpp b/src/gui/editors/segment/PlayListView.cpp index ff4d1c8..e83e5e6 100644 --- a/src/gui/editors/segment/PlayListView.cpp +++ b/src/gui/editors/segment/PlayListView.cpp @@ -29,8 +29,8 @@ namespace Rosegarden { -PlayListView::PlayListView(TQWidget *parent, const char *name) - : KListView(parent, name) +PlayListView::PlayListView(TQWidget *tqparent, const char *name) + : KListView(tqparent, name) { addColumn(i18n("Title")); addColumn(i18n("File name")); diff --git a/src/gui/editors/segment/PlayListView.h b/src/gui/editors/segment/PlayListView.h index 43390d0..b21551e 100644 --- a/src/gui/editors/segment/PlayListView.h +++ b/src/gui/editors/segment/PlayListView.h @@ -32,7 +32,7 @@ namespace Rosegarden { class PlayListView : public KListView { public: - PlayListView(TQWidget *parent=0, const char *name=0); + PlayListView(TQWidget *tqparent=0, const char *name=0); TQListViewItem* previousSibling(TQListViewItem*); diff --git a/src/gui/editors/segment/PlayListViewItem.cpp b/src/gui/editors/segment/PlayListViewItem.cpp index ab0c25c..12d60b8 100644 --- a/src/gui/editors/segment/PlayListViewItem.cpp +++ b/src/gui/editors/segment/PlayListViewItem.cpp @@ -26,14 +26,14 @@ namespace Rosegarden { -PlayListViewItem::PlayListViewItem(KListView* parent, KURL kurl) - : KListViewItem(parent, kurl.fileName(), kurl.prettyURL()), +PlayListViewItem::PlayListViewItem(KListView* tqparent, KURL kurl) + : KListViewItem(tqparent, kurl.fileName(), kurl.prettyURL()), m_kurl(kurl) { } -PlayListViewItem::PlayListViewItem(KListView* parent, TQListViewItem* after, KURL kurl) - : KListViewItem(parent, after, kurl.fileName(), kurl.prettyURL()), +PlayListViewItem::PlayListViewItem(KListView* tqparent, TQListViewItem* after, KURL kurl) + : KListViewItem(tqparent, after, kurl.fileName(), kurl.prettyURL()), m_kurl(kurl) { } diff --git a/src/gui/editors/segment/PlayListViewItem.h b/src/gui/editors/segment/PlayListViewItem.h index a622682..aa39bb8 100644 --- a/src/gui/editors/segment/PlayListViewItem.h +++ b/src/gui/editors/segment/PlayListViewItem.h @@ -33,8 +33,8 @@ namespace Rosegarden { class PlayListViewItem : public KListViewItem { public: - PlayListViewItem(KListView* parent, KURL); - PlayListViewItem(KListView* parent, TQListViewItem*, KURL); + PlayListViewItem(KListView* tqparent, KURL); + PlayListViewItem(KListView* tqparent, TQListViewItem*, KURL); const KURL& getURL() { return m_kurl; } diff --git a/src/gui/editors/segment/TrackButtons.cpp b/src/gui/editors/segment/TrackButtons.cpp index 39e19d2..fba7327 100644 --- a/src/gui/editors/segment/TrackButtons.cpp +++ b/src/gui/editors/segment/TrackButtons.cpp @@ -72,16 +72,16 @@ TrackButtons::TrackButtons(RosegardenGUIDoc* doc, unsigned int trackLabelWidth, bool showTrackLabels, int overallHeight, - TQWidget* parent, + TQWidget* tqparent, const char* name, WFlags f) - : TQFrame(parent, name, f), + : TQFrame(tqparent, name, f), m_doc(doc), - m_layout(new TQVBoxLayout(this)), - m_recordSigMapper(new TQSignalMapper(this)), - m_muteSigMapper(new TQSignalMapper(this)), - m_clickedSigMapper(new TQSignalMapper(this)), - m_instListSigMapper(new TQSignalMapper(this)), + m_tqlayout(new TQVBoxLayout(this)), + m_recordSigMapper(new TQSignalMapper(TQT_TQOBJECT(this))), + m_muteSigMapper(new TQSignalMapper(TQT_TQOBJECT(this))), + m_clickedSigMapper(new TQSignalMapper(TQT_TQOBJECT(this))), + m_instListSigMapper(new TQSignalMapper(TQT_TQOBJECT(this))), m_tracks(doc->getComposition().getNbTracks()), m_offset(4), m_cellSize(trackCellHeight), @@ -100,13 +100,13 @@ TrackButtons::TrackButtons(RosegardenGUIDoc* doc, // Set the spacing between vertical elements // - m_layout->setSpacing(m_borderGap); + m_tqlayout->setSpacing(m_borderGap); // Now draw the buttons and labels and meters // makeButtons(); - m_layout->addStretch(20); + m_tqlayout->addStretch(20); connect(m_recordSigMapper, TQT_SIGNAL(mapped(int)), this, TQT_SLOT(slotToggleRecordTrack(int))); @@ -152,7 +152,7 @@ TrackButtons::makeButtons() TQFrame *trackHBox = makeButton(track->getId()); if (trackHBox) { - m_layout->addWidget(trackHBox); + m_tqlayout->addWidget(trackHBox); m_trackHBoxes.push_back(trackHBox); } } @@ -194,7 +194,7 @@ TrackButtons::populateButtons() // reset track tokens m_trackLabels[i]->setId(track->getId()); - setButtonMapping(m_trackLabels[i], track->getId()); + setButtonMapping(TQT_TQOBJECT(m_trackLabels[i]), track->getId()); m_trackLabels[i]->setPosition(i); } @@ -297,7 +297,7 @@ TrackButtons::slotUpdateTracks() if (trackHBox) { trackHBox->show(); - m_layout->insertWidget(i, trackHBox); + m_tqlayout->insertWidget(i, trackHBox); m_trackHBoxes.push_back(trackHBox); } } else @@ -359,7 +359,7 @@ TrackButtons::slotUpdateTracks() // RG_DEBUG << "TrackButtons::slotUpdateTracks - set button mapping at pos " // << i << " to track id " << track->getId() << endl; - setButtonMapping(m_trackLabels[i], track->getId()); + setButtonMapping(TQT_TQOBJECT(m_trackLabels[i]), track->getId()); } } m_tracks = newNbTracks; @@ -647,17 +647,17 @@ TrackButtons::populateInstrumentPopup(Instrument *thisTrackInstr, TQPopupMenu* i KGlobal::dirs()->findResource("appdata", "pixmaps/"); connectedPixmap.load - (TQString("%1/misc/connected.xpm").arg(pixmapDir)); + (TQString("%1/misc/connected.xpm").tqarg(pixmapDir)); connectedUsedPixmap.load - (TQString("%1/misc/connected-used.xpm").arg(pixmapDir)); + (TQString("%1/misc/connected-used.xpm").tqarg(pixmapDir)); connectedSelectedPixmap.load - (TQString("%1/misc/connected-selected.xpm").arg(pixmapDir)); + (TQString("%1/misc/connected-selected.xpm").tqarg(pixmapDir)); unconnectedPixmap.load - (TQString("%1/misc/unconnected.xpm").arg(pixmapDir)); + (TQString("%1/misc/unconnected.xpm").tqarg(pixmapDir)); unconnectedUsedPixmap.load - (TQString("%1/misc/unconnected-used.xpm").arg(pixmapDir)); + (TQString("%1/misc/unconnected-used.xpm").tqarg(pixmapDir)); unconnectedSelectedPixmap.load - (TQString("%1/misc/unconnected-selected.xpm").arg(pixmapDir)); + (TQString("%1/misc/unconnected-selected.xpm").tqarg(pixmapDir)); havePixmaps = true; } @@ -706,7 +706,7 @@ TrackButtons::populateInstrumentPopup(Instrument *thisTrackInstr, TQPopupMenu* i pname = strtoqstr(plugin->getDistinctiveConfigurationText()); } if (pname != "") { - pname = TQString("%1: %2").arg(label).arg(pname); + pname = TQString("%1: %2").tqarg(label).tqarg(pname); } else { pname = label; } @@ -1021,7 +1021,7 @@ TQFrame* TrackButtons::makeButton(Rosegarden::TrackId trackId) // Create a horizontal box for each track // trackHBox = new TQFrame(this); - TQHBoxLayout *hblayout = new TQHBoxLayout(trackHBox); + TQHBoxLayout *hbtqlayout = new TQHBoxLayout(trackHBox); trackHBox->setMinimumSize(labelWidth, m_cellSize * multiple - m_borderGap); trackHBox->setFixedHeight(m_cellSize * multiple - m_borderGap); @@ -1033,7 +1033,7 @@ TQFrame* TrackButtons::makeButton(Rosegarden::TrackId trackId) trackHBox->setFrameShadow(Raised); // Insert a little gap - hblayout->addSpacing(vuSpacing); + hbtqlayout->addSpacing(vuSpacing); // Create a VU meter vuMeter = new TrackVUMeter(trackHBox, @@ -1044,10 +1044,10 @@ TQFrame* TrackButtons::makeButton(Rosegarden::TrackId trackId) m_trackMeters.push_back(vuMeter); - hblayout->addWidget(vuMeter); + hbtqlayout->addWidget(vuMeter); // Create another little gap - hblayout->addSpacing(vuSpacing); + hbtqlayout->addSpacing(vuSpacing); // // 'mute' and 'record' leds @@ -1056,12 +1056,12 @@ TQFrame* TrackButtons::makeButton(Rosegarden::TrackId trackId) mute = new KLedButton(Rosegarden::GUIPalette::getColour (Rosegarden::GUIPalette::MuteTrackLED), trackHBox); TQToolTip::add(mute, i18n("Mute track")); - hblayout->addWidget(mute); + hbtqlayout->addWidget(mute); record = new KLedButton(Rosegarden::GUIPalette::getColour (Rosegarden::GUIPalette::RecordMIDITrackLED), trackHBox); TQToolTip::add(record, i18n("Record on this track")); - hblayout->addWidget(record); + hbtqlayout->addWidget(record); record->setLook(KLed::Sunken); mute->setLook(KLed::Sunken); @@ -1072,8 +1072,8 @@ TQFrame* TrackButtons::makeButton(Rosegarden::TrackId trackId) m_recordSigMapper, TQT_SLOT(map())); connect(mute, TQT_SIGNAL(stateChanged(bool)), m_muteSigMapper, TQT_SLOT(map())); - m_recordSigMapper->setMapping(record, track->getPosition()); - m_muteSigMapper->setMapping(mute, track->getPosition()); + m_recordSigMapper->setMapping(TQT_TQOBJECT(record), track->getPosition()); + m_muteSigMapper->setMapping(TQT_TQOBJECT(mute), track->getPosition()); // Store the KLedButton // @@ -1084,8 +1084,8 @@ TQFrame* TrackButtons::makeButton(Rosegarden::TrackId trackId) // Track label // trackLabel = new TrackLabel(trackId, track->getPosition(), trackHBox); - hblayout->addWidget(trackLabel); - hblayout->addSpacing(vuSpacing); + hbtqlayout->addWidget(trackLabel); + hbtqlayout->addSpacing(vuSpacing); if (track->getLabel() == std::string("")) { Rosegarden::Instrument *ins = @@ -1111,7 +1111,7 @@ TQFrame* TrackButtons::makeButton(Rosegarden::TrackId trackId) m_trackLabels.push_back(trackLabel); // Connect it - setButtonMapping(trackLabel, trackId); + setButtonMapping(TQT_TQOBJECT(trackLabel), trackId); connect(trackLabel, TQT_SIGNAL(changeToInstrumentList()), m_instListSigMapper, TQT_SLOT(map())); diff --git a/src/gui/editors/segment/TrackButtons.h b/src/gui/editors/segment/TrackButtons.h index 7f2b5dd..050c564 100644 --- a/src/gui/editors/segment/TrackButtons.h +++ b/src/gui/editors/segment/TrackButtons.h @@ -51,9 +51,10 @@ class KLedButton; class Instrument; -class TrackButtons : public QFrame +class TrackButtons : public TQFrame { Q_OBJECT + TQ_OBJECT public: TrackButtons(RosegardenGUIDoc* doc, @@ -61,7 +62,7 @@ public: unsigned int trackLabelWidth, bool showTrackLabels, int overallHeight, - TQWidget* parent = 0, + TQWidget* tqparent = 0, const char* name = 0, WFlags f=0); @@ -185,7 +186,7 @@ protected: RosegardenGUIDoc *m_doc; - TQVBoxLayout *m_layout; + TQVBoxLayout *m_tqlayout; std::vector<KLedButton *> m_muteLeds; std::vector<KLedButton *> m_recordLeds; diff --git a/src/gui/editors/segment/TrackEditor.cpp b/src/gui/editors/segment/TrackEditor.cpp index 9eeb21b..7381790 100644 --- a/src/gui/editors/segment/TrackEditor.cpp +++ b/src/gui/editors/segment/TrackEditor.cpp @@ -87,10 +87,10 @@ TrackEditor::TrackEditor(RosegardenGUIDoc* doc, RulerScale *rulerScale, bool showTrackLabels, double initialUnitsPerPixel, - TQWidget* parent, const char* name, + TQWidget* tqparent, const char* name, WFlags) : DCOPObject("TrackEditorIface"), - TQWidget(parent, name), + TQWidget(tqparent, name), m_doc(doc), m_rulerScale(rulerScale), m_topStandardRuler(0), @@ -166,7 +166,7 @@ TrackEditor::init(TQWidget* rosegardenguiview) connect(rosegardenguiview, TQT_SIGNAL(instrumentParametersChanged(InstrumentId)), m_compositionModel, TQT_SLOT(slotInstrumentParametersChanged(InstrumentId))); - connect(rosegardenguiview->parent(), TQT_SIGNAL(instrumentParametersChanged(InstrumentId)), + connect(rosegardenguiview->tqparent(), TQT_SIGNAL(instrumentParametersChanged(InstrumentId)), m_compositionModel, TQT_SLOT(slotInstrumentParametersChanged(InstrumentId))); m_segmentCanvas = new CompositionView(m_doc, m_compositionModel, this); @@ -331,7 +331,7 @@ void TrackEditor::slotReadjustCanvasSize() void TrackEditor::slotTrackButtonsWidthChanged() { - // We need to make sure the trackButtons geometry is fully updated + // We need to make sure the trackButtons tqgeometry is fully updated // ProgressDialog::processEvents(); @@ -360,13 +360,13 @@ int TrackEditor::getTrackCellHeight() const bool TrackEditor::isCompositionModified() { - return m_doc->getComposition().getRefreshStatus + return m_doc->getComposition().getRefreshtqStatus (m_compositionRefreshStatusId).needsRefresh(); } void TrackEditor::setCompositionModified(bool c) { - m_doc->getComposition().getRefreshStatus + m_doc->getComposition().getRefreshtqStatus (m_compositionRefreshStatusId).setNeedsRefresh(c); } @@ -444,7 +444,7 @@ void TrackEditor::addSegment(int track, int time, unsigned int duration) void TrackEditor::slotSegmentOrderChanged(int section, int fromIdx, int toIdx) { RG_DEBUG << TQString("TrackEditor::segmentOrderChanged(section : %1, from %2, to %3)") - .arg(section).arg(fromIdx).arg(toIdx) << endl; + .tqarg(section).tqarg(fromIdx).tqarg(toIdx) << endl; //!!! how do we get here? need to involve a command emit needUpdate(); @@ -490,7 +490,7 @@ TrackEditor::slotSetPointerPosition(timeT position) if (distance >= 1.0) { if (m_doc && m_doc->getSequenceManager() && - (m_doc->getSequenceManager()->getTransportStatus() != STOPPED)) { + (m_doc->getSequenceManager()->getTransporttqStatus() != STOPPED)) { if (m_playTracking) { getSegmentCanvas()->slotScrollHoriz(int(double(position) / ruler->getUnitsPerPixel())); @@ -547,7 +547,7 @@ bool TrackEditor::handleAutoScroll(int currentPosition, timeT newTimePosition, d if (moveDetected) { if (m_doc && m_doc->getSequenceManager() && - (m_doc->getSequenceManager()->getTransportStatus() != STOPPED)) { + (m_doc->getSequenceManager()->getTransporttqStatus() != STOPPED)) { if (m_playTracking) { getSegmentCanvas()->slotScrollHoriz(int(double(newTimePosition) / ruler->getUnitsPerPixel())); diff --git a/src/gui/editors/segment/TrackEditor.h b/src/gui/editors/segment/TrackEditor.h index b2c2bd2..86e3b77 100644 --- a/src/gui/editors/segment/TrackEditor.h +++ b/src/gui/editors/segment/TrackEditor.h @@ -68,6 +68,7 @@ class StandardRuler; class TrackEditor : public TQWidget, virtual public TrackEditorIface { Q_OBJECT + TQ_OBJECT public: /** * Create a new TrackEditor representing the document \a doc @@ -77,7 +78,7 @@ public: RulerScale *rulerScale, bool showTrackLabels, double initialUnitsPerPixel = 0, - TQWidget* parent = 0, const char* name = 0, + TQWidget* tqparent = 0, const char* name = 0, WFlags f=0); ~TrackEditor(); diff --git a/src/gui/editors/segment/TrackHeader.cpp b/src/gui/editors/segment/TrackHeader.cpp index 367d02b..84b850b 100644 --- a/src/gui/editors/segment/TrackHeader.cpp +++ b/src/gui/editors/segment/TrackHeader.cpp @@ -41,8 +41,8 @@ void TrackHeader::paintEvent(TQPaintEvent *e) { TQPainter p( this ); - p.setPen( colorGroup().buttonText() ); - int pos = (orientation() == Horizontal) + p.setPen( tqcolorGroup().buttonText() ); + int pos = (orientation() == Qt::Horizontal) ? e->rect().left() : e->rect().top(); int id = mapToIndex( sectionAt( pos + offset() ) ); @@ -54,8 +54,8 @@ TrackHeader::paintEvent(TQPaintEvent *e) for ( int i = id; i < count(); i++ ) { TQRect r = sRect( i ); paintSection( &p, i, r ); - if ( orientation() == Horizontal && r. right() >= e->rect().right() || - orientation() == Vertical && r. bottom() >= e->rect().bottom() ) + if ( orientation() == Qt::Horizontal && r. right() >= e->rect().right() || + orientation() == Qt::Vertical && r. bottom() >= e->rect().bottom() ) return ; } diff --git a/src/gui/editors/segment/TrackHeader.h b/src/gui/editors/segment/TrackHeader.h index 91bef26..56891f4 100644 --- a/src/gui/editors/segment/TrackHeader.h +++ b/src/gui/editors/segment/TrackHeader.h @@ -38,14 +38,14 @@ namespace Rosegarden -class TrackHeader : public QHeader +class TrackHeader : public TQHeader { public: TrackHeader(int number, - TQWidget *parent=0, + TQWidget *tqparent=0, const char *name=0 ): - TQHeader(number, parent, name) {;} + TQHeader(number, tqparent, name) {;} ~TrackHeader(); protected: diff --git a/src/gui/editors/segment/TrackLabel.cpp b/src/gui/editors/segment/TrackLabel.cpp index 9df485f..53795a7 100644 --- a/src/gui/editors/segment/TrackLabel.cpp +++ b/src/gui/editors/segment/TrackLabel.cpp @@ -45,9 +45,9 @@ namespace Rosegarden TrackLabel::TrackLabel(TrackId id, int position, - TQWidget *parent, + TQWidget *tqparent, const char *name): - TQWidgetStack(parent, name), + TQWidgetStack(tqparent, name), m_instrumentLabel(new TQLabel(this)), m_trackLabel(new TQLabel(this)), m_id(id), @@ -124,18 +124,18 @@ TrackLabel::setSelected(bool on) if (on) { m_selected = true; - m_instrumentLabel->setPaletteBackgroundColor(colorGroup().highlight()); - m_instrumentLabel->setPaletteForegroundColor(colorGroup().highlightedText()); - m_trackLabel->setPaletteBackgroundColor(colorGroup().highlight()); - m_trackLabel->setPaletteForegroundColor(colorGroup().highlightedText()); + m_instrumentLabel->setPaletteBackgroundColor(tqcolorGroup().highlight()); + m_instrumentLabel->setPaletteForegroundColor(tqcolorGroup().highlightedText()); + m_trackLabel->setPaletteBackgroundColor(tqcolorGroup().highlight()); + m_trackLabel->setPaletteForegroundColor(tqcolorGroup().highlightedText()); } else { m_selected = false; - m_instrumentLabel->setPaletteBackgroundColor(colorGroup().background()); - m_trackLabel->setPaletteBackgroundColor(colorGroup().background()); - m_instrumentLabel->setPaletteForegroundColor(colorGroup().text()); - m_trackLabel->setPaletteForegroundColor(colorGroup().text()); + m_instrumentLabel->setPaletteBackgroundColor(tqcolorGroup().background()); + m_trackLabel->setPaletteBackgroundColor(tqcolorGroup().background()); + m_instrumentLabel->setPaletteForegroundColor(tqcolorGroup().text()); + m_trackLabel->setPaletteForegroundColor(tqcolorGroup().text()); } if (visibleWidget()) visibleWidget()->update(); @@ -144,12 +144,12 @@ TrackLabel::setSelected(bool on) void TrackLabel::mousePressEvent(TQMouseEvent *e) { - if (e->button() == RightButton) { + if (e->button() == Qt::RightButton) { emit clicked(); emit changeToInstrumentList(); - } else if (e->button() == LeftButton) { + } else if (e->button() == Qt::LeftButton) { // start a timer on this hold m_pressTimer->start(200, true); // 200ms, single shot @@ -163,7 +163,7 @@ TrackLabel::mouseReleaseEvent(TQMouseEvent *e) if (m_pressTimer->isActive()) m_pressTimer->stop(); - if (e->button() == LeftButton) { + if (e->button() == Qt::LeftButton) { emit clicked(); } } @@ -171,7 +171,7 @@ TrackLabel::mouseReleaseEvent(TQMouseEvent *e) void TrackLabel::mouseDoubleClickEvent(TQMouseEvent *e) { - if (e->button() != LeftButton) + if (e->button() != Qt::LeftButton) return ; // Highlight this label alone and cheat using @@ -186,7 +186,7 @@ TrackLabel::mouseDoubleClickEvent(TQMouseEvent *e) bool ok = false; - TQRegExpValidator validator(TQRegExp(".*"), this); // empty is OK + TQRegExpValidator validator(TQRegExp(".*"), TQT_TQOBJECT(this)); // empty is OK TQString newText = KLineEditDlg::getText(i18n("Change track name"), i18n("Enter new track name"), diff --git a/src/gui/editors/segment/TrackLabel.h b/src/gui/editors/segment/TrackLabel.h index b7aac70..a7b5207 100644 --- a/src/gui/editors/segment/TrackLabel.h +++ b/src/gui/editors/segment/TrackLabel.h @@ -47,9 +47,10 @@ namespace Rosegarden * selectable label/label list. In conjunction with TrackButtons * provides a framework for Track selection on the TrackCanvas. */ -class TrackLabel : public QWidgetStack +class TrackLabel : public TQWidgetStack { Q_OBJECT + TQ_OBJECT public: enum InstrumentTrackLabels @@ -61,7 +62,7 @@ public: TrackLabel(TrackId id, int position, - TQWidget *parent, + TQWidget *tqparent, const char *name=0); ~TrackLabel(); diff --git a/src/gui/editors/segment/TrackVUMeter.cpp b/src/gui/editors/segment/TrackVUMeter.cpp index f8acbe8..5001a28 100644 --- a/src/gui/editors/segment/TrackVUMeter.cpp +++ b/src/gui/editors/segment/TrackVUMeter.cpp @@ -34,16 +34,16 @@ namespace Rosegarden { -TrackVUMeter::TrackVUMeter(TQWidget *parent, +TrackVUMeter::TrackVUMeter(TQWidget *tqparent, VUMeterType type, int width, int height, int position, const char *name): - VUMeter(parent, type, false, false, width, height, VUMeter::Horizontal, name), + VUMeter(tqparent, type, false, false, width, height, VUMeter::Horizontal, name), m_position(position), m_textHeight(12) { - setAlignment(AlignCenter); + tqsetAlignment(AlignCenter); TQFont font; font.setPointSize(font.pointSize() * 95 / 100); @@ -67,7 +67,7 @@ TrackVUMeter::meterStop() { setMinimumHeight(m_textHeight); setMaximumHeight(m_textHeight); - setText(TQString("%1").arg(m_position + 1)); + setText(TQString("%1").tqarg(m_position + 1)); if (m_active) { m_active = false; update(); diff --git a/src/gui/editors/segment/TrackVUMeter.h b/src/gui/editors/segment/TrackVUMeter.h index dad0455..9630301 100644 --- a/src/gui/editors/segment/TrackVUMeter.h +++ b/src/gui/editors/segment/TrackVUMeter.h @@ -40,7 +40,7 @@ namespace Rosegarden class TrackVUMeter: public VUMeter { public: - TrackVUMeter(TQWidget *parent = 0, + TrackVUMeter(TQWidget *tqparent = 0, VUMeterType type = Plain, int width = 0, int height = 0, diff --git a/src/gui/editors/segment/TriggerManagerItem.h b/src/gui/editors/segment/TriggerManagerItem.h index 7af5619..1d6a819 100644 --- a/src/gui/editors/segment/TriggerManagerItem.h +++ b/src/gui/editors/segment/TriggerManagerItem.h @@ -32,18 +32,18 @@ namespace Rosegarden { -class TriggerManagerItem : public QListViewItem +class TriggerManagerItem : public TQListViewItem { public: - TriggerManagerItem(TQListView * parent, TQString label1, - TQString label2 = TQString::null, - TQString label3 = TQString::null, - TQString label4 = TQString::null, - TQString label5 = TQString::null, - TQString label6 = TQString::null, - TQString label7 = TQString::null, - TQString label8 = TQString::null): - TQListViewItem(parent, label1, label2, label3, label4, + TriggerManagerItem(TQListView * tqparent, TQString label1, + TQString label2 = TQString(), + TQString label3 = TQString(), + TQString label4 = TQString(), + TQString label5 = TQString(), + TQString label6 = TQString(), + TQString label7 = TQString(), + TQString label8 = TQString()): + TQListViewItem(tqparent, label1, label2, label3, label4, label5, label6, label7, label8) { ; } virtual int compare(TQListViewItem * i, int col, bool ascending) const; diff --git a/src/gui/editors/segment/TriggerSegmentManager.cpp b/src/gui/editors/segment/TriggerSegmentManager.cpp index 76e71bf..e658cc3 100644 --- a/src/gui/editors/segment/TriggerSegmentManager.cpp +++ b/src/gui/editors/segment/TriggerSegmentManager.cpp @@ -73,9 +73,9 @@ namespace Rosegarden { -TriggerSegmentManager::TriggerSegmentManager(TQWidget *parent, +TriggerSegmentManager::TriggerSegmentManager(TQWidget *tqparent, RosegardenGUIDoc *doc): - KMainWindow(parent, "triggereditordialog"), + KMainWindow(tqparent, "triggereditordialog"), m_doc(doc), m_modified(false) { @@ -95,14 +95,14 @@ TriggerSegmentManager::TriggerSegmentManager(TQWidget *parent, // Align centrally for (int i = 0; i < 2; ++i) - m_listView->setColumnAlignment(i, Qt::AlignHCenter); + m_listView->setColumnAlignment(i, TQt::AlignHCenter); TQFrame* btnBox = new TQFrame(mainFrame); - btnBox->setSizePolicy( + btnBox->tqsetSizePolicy( TQSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed)); - TQHBoxLayout* layout = new TQHBoxLayout(btnBox, 4, 10); + TQHBoxLayout* tqlayout = new TQHBoxLayout(btnBox, 4, 10); m_addButton = new TQPushButton(i18n("Add"), btnBox); m_deleteButton = new TQPushButton(i18n("Delete"), btnBox); @@ -126,14 +126,14 @@ TriggerSegmentManager::TriggerSegmentManager(TQWidget *parent, (m_closeButton, i18n("Close the Triggered Segment Manager")); - layout->addStretch(10); - layout->addWidget(m_addButton); - layout->addWidget(m_deleteButton); - layout->addWidget(m_deleteAllButton); - layout->addSpacing(30); + tqlayout->addStretch(10); + tqlayout->addWidget(m_addButton); + tqlayout->addWidget(m_deleteButton); + tqlayout->addWidget(m_deleteAllButton); + tqlayout->addSpacing(30); - layout->addWidget(m_closeButton); - layout->addSpacing(5); + tqlayout->addWidget(m_closeButton); + tqlayout->addSpacing(5); connect(m_addButton, TQT_SIGNAL(released()), TQT_SLOT(slotAdd())); @@ -246,16 +246,16 @@ TriggerSegmentManager::slotUpdate() TQString used = i18n("%1 on 1 track", "%1 on %n tracks", - tracks.size()).arg(uses); + tracks.size()).tqarg(uses); TQString pitch = TQString("%1 (%2)") - .arg(MidiPitchLabel((*it)->getBasePitch()).getQString()) - .arg((*it)->getBasePitch()); + .tqarg(MidiPitchLabel((*it)->getBasePitch()).getTQString()) + .tqarg((*it)->getBasePitch()); - TQString velocity = TQString("%1").arg((*it)->getBaseVelocity()); + TQString velocity = TQString("%1").tqarg((*it)->getBaseVelocity()); item = new TriggerManagerItem - (m_listView, TQString("%1").arg(i + 1), TQString("%1").arg((*it)->getId()), + (m_listView, TQString("%1").tqarg(i + 1), TQString("%1").tqarg((*it)->getId()), label, timeString, pitch, velocity, used); item->setRawDuration(duration); @@ -375,12 +375,12 @@ TriggerSegmentManager::slotClose() void TriggerSegmentManager::setupActions() { - KAction* close = KStdAction::close(this, + KAction* close = KStdAction::close(TQT_TQOBJECT(this), TQT_SLOT(slotClose()), actionCollection()); m_closeButton->setText(close->text()); - connect(m_closeButton, TQT_SIGNAL(released()), this, TQT_SLOT(slotClose())); + connect(m_closeButton, TQT_SIGNAL(released()), TQT_TQOBJECT(this), TQT_SLOT(slotClose())); TQString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); @@ -397,7 +397,7 @@ TriggerSegmentManager::setupActions() actionCollection(), KStdAction::stdName(KStdAction::Redo)); - new KAction(i18n("Pa&ste as New Triggered Segment"), CTRL + SHIFT + Key_V, this, + new KAction(i18n("Pa&ste as New Triggered Segment"), CTRL + SHIFT + Key_V, TQT_TQOBJECT(this), TQT_SLOT(slotPasteAsNew()), actionCollection(), "paste_to_trigger_segment"); @@ -409,7 +409,7 @@ TriggerSegmentManager::setupActions() TQCanvasPixmap pixmap(pixmapDir + "/toolbar/time-musical.png"); TQIconSet icon(pixmap); - action = new KRadioAction(i18n("&Musical Times"), icon, 0, this, + action = new KRadioAction(i18n("&Musical Times"), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotMusicalTime()), actionCollection(), "time_musical"); action->setExclusiveGroup("timeMode"); @@ -419,7 +419,7 @@ TriggerSegmentManager::setupActions() pixmap.load(pixmapDir + "/toolbar/time-real.png"); icon = TQIconSet(pixmap); - action = new KRadioAction(i18n("&Real Times"), icon, 0, this, + action = new KRadioAction(i18n("&Real Times"), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotRealTime()), actionCollection(), "time_real"); action->setExclusiveGroup("timeMode"); @@ -429,7 +429,7 @@ TriggerSegmentManager::setupActions() pixmap.load(pixmapDir + "/toolbar/time-raw.png"); icon = TQIconSet(pixmap); - action = new KRadioAction(i18n("Ra&w Times"), icon, 0, this, + action = new KRadioAction(i18n("Ra&w Times"), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotRawTime()), actionCollection(), "time_raw"); action->setExclusiveGroup("timeMode"); @@ -509,7 +509,7 @@ TriggerSegmentManager::slotItemClicked(TQListViewItem *item) RG_DEBUG << "TriggerSegmentManager::slotItemClicked" << endl; } -QString +TQString TriggerSegmentManager::makeDurationString(timeT time, timeT duration, int timeMode) { @@ -523,15 +523,15 @@ TriggerSegmentManager::makeDurationString(timeT time, m_doc->getComposition().getMusicalTimeForDuration (time, duration, bar, beat, fraction, remainder); return TQString("%1%2%3-%4%5-%6%7-%8%9 ") - .arg(bar / 100) - .arg((bar % 100) / 10) - .arg(bar % 10) - .arg(beat / 10) - .arg(beat % 10) - .arg(fraction / 10) - .arg(fraction % 10) - .arg(remainder / 10) - .arg(remainder % 10); + .tqarg(bar / 100) + .tqarg((bar % 100) / 10) + .tqarg(bar % 10) + .tqarg(beat / 10) + .tqarg(beat % 10) + .tqarg(fraction / 10) + .tqarg(fraction % 10) + .tqarg(remainder / 10) + .tqarg(remainder % 10); } case 1: // real time @@ -539,12 +539,12 @@ TriggerSegmentManager::makeDurationString(timeT time, RealTime rt = m_doc->getComposition().getRealTimeDifference (time, time + duration); - // return TQString("%1 ").arg(rt.toString().c_str()); - return TQString("%1 ").arg(rt.toText().c_str()); + // return TQString("%1 ").tqarg(rt.toString().c_str()); + return TQString("%1 ").tqarg(rt.toText().c_str()); } default: - return TQString("%1 ").arg(duration); + return TQString("%1 ").tqarg(duration); } } diff --git a/src/gui/editors/segment/TriggerSegmentManager.h b/src/gui/editors/segment/TriggerSegmentManager.h index 4746a0e..dbe5ea0 100644 --- a/src/gui/editors/segment/TriggerSegmentManager.h +++ b/src/gui/editors/segment/TriggerSegmentManager.h @@ -50,9 +50,10 @@ class MultiViewCommandHistory; class TriggerSegmentManager : public KMainWindow { Q_OBJECT + TQ_OBJECT public: - TriggerSegmentManager(TQWidget *parent, + TriggerSegmentManager(TQWidget *tqparent, RosegardenGUIDoc *doc); ~TriggerSegmentManager(); diff --git a/src/gui/editors/segment/segmentcanvas/AudioPreviewPainter.cpp b/src/gui/editors/segment/segmentcanvas/AudioPreviewPainter.cpp index b0d3f3b..786e1a4 100644 --- a/src/gui/editors/segment/segmentcanvas/AudioPreviewPainter.cpp +++ b/src/gui/editors/segment/segmentcanvas/AudioPreviewPainter.cpp @@ -60,7 +60,7 @@ AudioPreviewPainter::AudioPreviewPainter(CompositionModelImpl& model, m_image = TQImage(pixWidth, m_rect.height(), 8, 4); m_image.setAlphaBuffer(true); - m_penWidth = (std::max(1U, m_rect.getPen().width()) * 2); + m_penWidth = (std::max(1U, (uint)m_rect.getPen().width()) * 2); m_halfRectHeight = m_model.grid().getYSnap()/2 - m_penWidth / 2 - 2; } @@ -276,7 +276,7 @@ void AudioPreviewPainter::paintPreviewImage() m_segment->getStartTime()) - m_model.grid().getRulerScale()->getXForTime(m_segment->getStartTime())); - m_p.setPen(Qt::blue); + m_p.setPen(TQt::blue); m_p.drawRect(0, m_apData->getSegmentRect().height() - 1, audioFadeInEnd, 1); m_pb.drawRect(0, m_apData->getSegmentRect().height() - 1, audioFadeInEnd, 1); } @@ -291,15 +291,15 @@ void AudioPreviewPainter::finalizeCurrentSlice() // RG_DEBUG << "AudioPreviewPainter::finalizeCurrentSlice : copying pixmap to image at " << m_sliceNb * tileWidth() << endl; // transparent background - m_image.setColor(0, qRgba(255, 255, 255, 0)); + m_image.setColor(0, tqRgba(255, 255, 255, 0)); // foreground from computeSegmentPreviewColor TQColor c = m_model.computeSegmentPreviewColor(m_segment); - QRgb rgba = qRgba(c.red(), c.green(), c.blue(), 255); + TQRgb rgba = tqRgba(c.red(), c.green(), c.blue(), 255); m_image.setColor(1, rgba); // red for clipping - m_image.setColor(2, qRgba(255, 0, 0, 255)); + m_image.setColor(2, tqRgba(255, 0, 0, 255)); m_previewPixmaps.push_back(m_image.copy()); diff --git a/src/gui/editors/segment/segmentcanvas/AudioPreviewThread.h b/src/gui/editors/segment/segmentcanvas/AudioPreviewThread.h index 0337346..2944b38 100644 --- a/src/gui/editors/segment/segmentcanvas/AudioPreviewThread.h +++ b/src/gui/editors/segment/segmentcanvas/AudioPreviewThread.h @@ -44,7 +44,7 @@ namespace Rosegarden class AudioFileManager; -class AudioPreviewThread : public QThread +class AudioPreviewThread : public TQThread { public: AudioPreviewThread(AudioFileManager *manager); diff --git a/src/gui/editors/segment/segmentcanvas/AudioPreviewUpdater.cpp b/src/gui/editors/segment/segmentcanvas/AudioPreviewUpdater.cpp index 182eb9b..1ae0acd 100644 --- a/src/gui/editors/segment/segmentcanvas/AudioPreviewUpdater.cpp +++ b/src/gui/editors/segment/segmentcanvas/AudioPreviewUpdater.cpp @@ -44,8 +44,8 @@ static int apuExtantCount = 0; AudioPreviewUpdater::AudioPreviewUpdater(AudioPreviewThread &thread, const Composition& c, const Segment* s, const TQRect& r, - CompositionModelImpl* parent) - : TQObject(parent), + CompositionModelImpl* tqparent) + : TQObject(tqparent), m_thread(thread), m_composition(c), m_segment(s), diff --git a/src/gui/editors/segment/segmentcanvas/AudioPreviewUpdater.h b/src/gui/editors/segment/segmentcanvas/AudioPreviewUpdater.h index 347ba16..047f9b2 100644 --- a/src/gui/editors/segment/segmentcanvas/AudioPreviewUpdater.h +++ b/src/gui/editors/segment/segmentcanvas/AudioPreviewUpdater.h @@ -43,16 +43,17 @@ class Composition; class AudioPreviewThread; -class AudioPreviewUpdater : public QObject +class AudioPreviewUpdater : public TQObject { Q_OBJECT + TQ_OBJECT public: AudioPreviewUpdater(AudioPreviewThread &thread, const Composition &composition, const Segment *segment, const TQRect &displayExtent, - CompositionModelImpl *parent); + CompositionModelImpl *tqparent); ~AudioPreviewUpdater(); void update(); diff --git a/src/gui/editors/segment/segmentcanvas/CompositionItemHelper.cpp b/src/gui/editors/segment/segmentcanvas/CompositionItemHelper.cpp index 9579ba2..fe4b926 100644 --- a/src/gui/editors/segment/segmentcanvas/CompositionItemHelper.cpp +++ b/src/gui/editors/segment/segmentcanvas/CompositionItemHelper.cpp @@ -60,12 +60,12 @@ timeT CompositionItemHelper::getEndTime(const CompositionItem& item, const Roseg timeT t = 0; if (item) { - TQRect itemRect = item->rect(); + TQRect tqitemRect = item->rect(); - t = std::max(grid.snapX(itemRect.x() + itemRect.width()), 0L); + t = std::max(grid.snapX(tqitemRect.x() + tqitemRect.width()), 0L); // RG_DEBUG << "CompositionItemHelper::getEndTime() : rect width = " -// << itemRect.width() +// << tqitemRect.width() // << " - item is repeating : " << item->isRepeating() // << " - endTime = " << t // << endl; diff --git a/src/gui/editors/segment/segmentcanvas/CompositionItemImpl.cpp b/src/gui/editors/segment/segmentcanvas/CompositionItemImpl.cpp index 12984a0..76cbe70 100644 --- a/src/gui/editors/segment/segmentcanvas/CompositionItemImpl.cpp +++ b/src/gui/editors/segment/segmentcanvas/CompositionItemImpl.cpp @@ -48,7 +48,7 @@ CompositionItemImpl::CompositionItemImpl(Segment& s, const CompositionRect& rect TQRect CompositionItemImpl::rect() const { - TQRect res = m_rect; + TQRect res = static_cast<const TQRect&>(m_rect); if (m_rect.isRepeating()) { CompositionRect::repeatmarks repeatMarks = m_rect.getRepeatMarks(); int neww = m_rect.getBaseWidth(); diff --git a/src/gui/editors/segment/segmentcanvas/CompositionModel.h b/src/gui/editors/segment/segmentcanvas/CompositionModel.h index 63412c0..1e4bd2f 100644 --- a/src/gui/editors/segment/segmentcanvas/CompositionModel.h +++ b/src/gui/editors/segment/segmentcanvas/CompositionModel.h @@ -56,6 +56,7 @@ typedef std::vector<TQImage> PixmapArray; class CompositionModel : public TQObject, public CompositionObserver, public SegmentObserver { Q_OBJECT + TQ_OBJECT public: struct CompositionItemCompare { diff --git a/src/gui/editors/segment/segmentcanvas/CompositionModelImpl.cpp b/src/gui/editors/segment/segmentcanvas/CompositionModelImpl.cpp index 9627b16..388a4c1 100644 --- a/src/gui/editors/segment/segmentcanvas/CompositionModelImpl.cpp +++ b/src/gui/editors/segment/segmentcanvas/CompositionModelImpl.cpp @@ -231,7 +231,7 @@ void CompositionModelImpl::makeAudioPreviewRects(AudioPreviewDrawData* apRects, TQPoint basePoint = segRect.topLeft(); - AudioPreviewDrawDataItem previewItem(previewImage, basePoint, segRect); + AudioPreviewDrawDataItem previewItem(previewImage, basePoint, static_cast<const TQRect&>(segRect)); if (getChangeType() == ChangeResizeFromStart) { CompositionRect originalRect = computeSegmentRect(*segment); @@ -476,7 +476,7 @@ void CompositionModelImpl::slotAudioPreviewComplete(AudioPreviewUpdater* apu) TQRect updateRect; if (apData) { - RG_DEBUG << "CompositionModelImpl::slotAudioPreviewComplete(" << apu << "): apData contains " << apData->getValues().size() << " values already" << endl; + RG_DEBUG << "CompositionModelImpl::slotAudioPreviewComplete(" << apu << "): apData tqcontains " << apData->getValues().size() << " values already" << endl; unsigned int channels = 0; const std::vector<float> &values = apu->getComputedValues(channels); if (channels > 0) { @@ -501,7 +501,7 @@ TQRect CompositionModelImpl::postProcessAudioPreview(AudioPreviewData* apData, c m_audioSegmentPreviewMap[segment] = previewPainter.getPreviewImage(); - return previewPainter.getSegmentRect(); + return static_cast<const TQRect&>(previewPainter.getSegmentRect()); } void CompositionModelImpl::slotInstrumentParametersChanged(InstrumentId id) @@ -796,7 +796,7 @@ CompositionModel::itemcontainer CompositionModelImpl::getItemsAt(const TQPoint& Segment* s = *i; CompositionRect sr = computeSegmentRect(*s); - if (sr.contains(point)) { + if (sr.tqcontains(point)) { // RG_DEBUG << "CompositionModelImpl::getItemsAt() adding " << sr << " for segment " << s << endl; CompositionItem item(new CompositionItemImpl(*s, sr)); unsigned int z = computeZForSegment(s); @@ -1124,7 +1124,7 @@ CompositionRect CompositionModelImpl::computeSegmentRect(const Segment& s, bool if (s.getType() == Segment::Audio) { static TQRegExp re1("( *\\([^)]*\\))*$"); // (inserted) (copied) (etc) static TQRegExp re2("\\.[^.]+$"); // filename suffix - label.replace(re1, "").replace(re2, ""); + label.tqreplace(re1, "").tqreplace(re2, ""); } cr.setLabel(label); diff --git a/src/gui/editors/segment/segmentcanvas/CompositionModelImpl.h b/src/gui/editors/segment/segmentcanvas/CompositionModelImpl.h index 2d3fd64..f2998c3 100644 --- a/src/gui/editors/segment/segmentcanvas/CompositionModelImpl.h +++ b/src/gui/editors/segment/segmentcanvas/CompositionModelImpl.h @@ -62,6 +62,7 @@ class AudioPreviewThread; class CompositionModelImpl : public CompositionModel { Q_OBJECT + TQ_OBJECT public: CompositionModelImpl(Composition& compo, diff --git a/src/gui/editors/segment/segmentcanvas/CompositionRect.cpp b/src/gui/editors/segment/segmentcanvas/CompositionRect.cpp index 9f867a5..ec4bef0 100644 --- a/src/gui/editors/segment/segmentcanvas/CompositionRect.cpp +++ b/src/gui/editors/segment/segmentcanvas/CompositionRect.cpp @@ -37,6 +37,6 @@ namespace Rosegarden { - const TQColor CompositionRect::DefaultPenColor = Qt::black; + const TQColor CompositionRect::DefaultPenColor = TQt::black; const TQColor CompositionRect::DefaultBrushColor = TQColor(COLOUR_DEF_R, COLOUR_DEF_G, COLOUR_DEF_B); } diff --git a/src/gui/editors/segment/segmentcanvas/CompositionRect.h b/src/gui/editors/segment/segmentcanvas/CompositionRect.h index 45c5f50..53dcc2e 100644 --- a/src/gui/editors/segment/segmentcanvas/CompositionRect.h +++ b/src/gui/editors/segment/segmentcanvas/CompositionRect.h @@ -41,7 +41,7 @@ class TQPoint; namespace Rosegarden { -class CompositionRect : public QRect +class CompositionRect : public TQRect { public: typedef TQValueVector<int> repeatmarks; diff --git a/src/gui/editors/segment/segmentcanvas/CompositionView.cpp b/src/gui/editors/segment/segmentcanvas/CompositionView.cpp index 1ff0263..6faf230 100644 --- a/src/gui/editors/segment/segmentcanvas/CompositionView.cpp +++ b/src/gui/editors/segment/segmentcanvas/CompositionView.cpp @@ -88,12 +88,12 @@ protected: CompositionView::CompositionView(RosegardenGUIDoc* doc, CompositionModel* model, - TQWidget * parent, const char * name, WFlags f) + TQWidget * tqparent, const char * name, WFlags f) #if KDE_VERSION >= KDE_MAKE_VERSION(3,2,0) - : RosegardenScrollView(parent, name, f | WNoAutoErase | WStaticContents), + : RosegardenScrollView(tqparent, name, f | WNoAutoErase | WStaticContents), #else : - RosegardenScrollView(parent, name, f | WRepaintNoErase | WResizeNoErase | WStaticContents), + RosegardenScrollView(tqparent, name, f | WRepaintNoErase | WResizeNoErase | WStaticContents), #endif m_model(model), m_currentItem(0), @@ -191,7 +191,7 @@ CompositionView::CompositionView(RosegardenGUIDoc* doc, } if (doc) { - doc->getAudioPreviewThread().setEmptyQueueListener(this); + doc->getAudioPreviewThread().setEmptyQueueListener(TQT_TQOBJECT(this)); } m_segmentsDrawBuffer.setOptimization(TQPixmap::BestOptim); @@ -227,7 +227,7 @@ void CompositionView::slotUpdateSize() RulerScale *ruler = grid().getRulerScale(); - int minWidth = sizeHint().width(); + int minWidth = tqsizeHint().width(); int computedWidth = int(nearbyint(ruler->getTotalWidth())); int width = std::max(computedWidth, minWidth); @@ -327,7 +327,7 @@ void CompositionView::slotSetTool(const TQString& toolName) if (m_tool) m_tool->ready(); else { - KMessageBox::error(0, TQString("CompositionView::slotSetTool() : unknown tool name %1").arg(toolName)); + KMessageBox::error(0, TQString("CompositionView::slotSetTool() : unknown tool name %1").tqarg(toolName)); } } @@ -495,7 +495,7 @@ void CompositionView::resizeEvent(TQResizeEvent* e) void CompositionView::viewportPaintEvent(TQPaintEvent* e) { - TQMemArray<TQRect> rects = e->region().rects(); + TQMemArray<TQRect> rects = TQRegion(e->region()).tqrects(); for (unsigned int i = 0; i < rects.size(); ++i) { viewportPaintRect(rects[i]); @@ -550,7 +550,7 @@ void CompositionView::viewportPaintRect(TQRect r) // DEBUG // TQPainter pdebug(viewport()); - // static TQPen framePen(Qt::red, 1); + // static TQPen framePen(TQt::red, 1); // pdebug.setPen(framePen); // pdebug.drawRect(updateRect); @@ -669,7 +669,7 @@ void CompositionView::refreshSegmentsDrawBuffer(const TQRect& rect) drawArea(&p, rect); // DEBUG - show what's updated - // TQPen framePen(Qt::red, 1); + // TQPen framePen(TQt::red, 1); // p.setPen(framePen); // p.drawRect(rect); @@ -682,7 +682,7 @@ void CompositionView::refreshArtifactsDrawBuffer(const TQRect& rect) // << rect << endl; TQPainter p; - p.begin(&m_artifactsDrawBuffer, viewport()); + p.tqbegin(&m_artifactsDrawBuffer, viewport()); p.translate( -contentsX(), -contentsY()); // TQRect r(contentsX(), contentsY(), m_artifactsDrawBuffer.width(), m_artifactsDrawBuffer.height()); drawAreaArtifacts(&p, rect); @@ -929,7 +929,7 @@ void CompositionView::drawAreaArtifacts(TQPainter * p, const TQRect& clipRect) // // Split line // - if (m_splitLinePos.x() > 0 && clipRect.contains(m_splitLinePos)) { + if (m_splitLinePos.x() > 0 && clipRect.tqcontains(m_splitLinePos)) { p->save(); p->setPen(m_guideColor); p->drawLine(m_splitLinePos.x(), m_splitLinePos.y(), @@ -975,7 +975,7 @@ void CompositionView::drawCompRect(const CompositionRect& r, TQPainter *p, const // draw 'start' rectangle with original brush // - TQRect startRect = r; + TQRect startRect = static_cast<const TQRect&>(r); startRect.setWidth(repeatMarks[0] - r.x()); p->setBrush(r.getBrush()); drawRect(startRect, p, clipRect, r.isSelected(), intersectLvl, fill); @@ -984,7 +984,7 @@ void CompositionView::drawCompRect(const CompositionRect& r, TQPainter *p, const // now draw the 'repeat' marks // p->setPen(CompositionColourCache::getInstance()->RepeatSegmentBorder); - int penWidth = std::max(r.getPen().width(), 1u); + int penWidth = std::max((uint)r.getPen().width(), 1u); for (unsigned int i = 0; i < repeatMarks.size(); ++i) { int pos = repeatMarks[i]; @@ -1020,9 +1020,9 @@ void CompositionView::drawCompRectLabel(const CompositionRect& r, TQPainter *p, TQRect textRect(r); textRect.setX(textRect.x() + 3); TQString label = " " + r.getLabel() + " "; - TQRect textBoundingRect = p->boundingRect(textRect, Qt::AlignLeft | Qt::AlignVCenter, label); + TQRect textBoundingRect = p->boundingRect(textRect, TQt::AlignLeft | TQt::AlignVCenter, label); p->drawRect(textBoundingRect & r); - p->drawText(textRect, Qt::AlignLeft | Qt::AlignVCenter, label); + p->drawText(textRect, TQt::AlignLeft | TQt::AlignVCenter, label); p->restore(); } #else @@ -1036,7 +1036,7 @@ void CompositionView::drawCompRectLabel(const CompositionRect& r, TQPainter *p, font.setItalic(false); p->setFont(font); - TQRect labelRect = QRect + TQRect labelRect = TQRect (r.x(), r.y() + ((r.height() - p->fontMetrics().height()) / 2) + 1, r.width(), @@ -1074,7 +1074,7 @@ void CompositionView::drawCompRectLabel(const CompositionRect& r, TQPainter *p, labelRect.setY(wy); p->drawText(labelRect, - Qt::AlignLeft | Qt::AlignTop, + TQt::AlignLeft | TQt::AlignTop, r.getLabel()); } @@ -1084,7 +1084,7 @@ void CompositionView::drawCompRectLabel(const CompositionRect& r, TQPainter *p, p->setPen(GUIPalette::getColour (GUIPalette::SegmentLabel)); p->drawText(labelRect, - Qt::AlignLeft | Qt::AlignVCenter, r.getLabel()); + TQt::AlignLeft | TQt::AlignVCenter, r.getLabel()); p->restore(); } #endif @@ -1122,13 +1122,13 @@ void CompositionView::drawRect(const TQRect& r, TQPainter *p, const TQRect& clip // RG_DEBUG << "CompositionView::drawRect : intersected color : " << fillColor << " isSelected : " << isSelected << endl; } } else { - p->setBrush(Qt::NoBrush); + p->setBrush(TQt::NoBrush); } // Paint using the small coordinates... TQRect intersection = rect.intersect(clipRect); - if (clipRect.contains(rect)) { + if (clipRect.tqcontains(rect)) { p->drawRect(rect); } else { // draw only what's necessary @@ -1199,7 +1199,7 @@ void CompositionView::drawIntersections(const CompositionModel::rectcontainer& r break; for (; i != rects.end(); ++i) { - CompositionRect ri = testRect.intersect(*i); + CompositionRect ri = TQT_TQRECT_OBJECT(testRect.intersect(*i)); if (!ri.isEmpty()) { CompositionModel::rectcontainer::iterator t = std::find(intersections.begin(), intersections.end(), ri); @@ -1246,7 +1246,7 @@ void CompositionView::drawIntersections(const CompositionModel::rectcontainer& r break; for (; i != intersections.end(); ++i) { - CompositionRect ri = testRect.intersect(*i); + CompositionRect ri = TQT_TQRECT_OBJECT(testRect.intersect(*i)); if (!ri.isEmpty() && ri != *i) { CompositionModel::rectcontainer::iterator t = std::find(intersections2.begin(), intersections2.end(), ri); @@ -1356,15 +1356,15 @@ void CompositionView::slotToolHelpChanged(const TQString &text) void CompositionView::contentsMousePressEvent(TQMouseEvent* e) { - Qt::ButtonState bs = e->state(); - slotSetSelectCopy((bs & Qt::ControlButton) != 0); - slotSetSelectAdd((bs & Qt::ShiftButton) != 0); - slotSetFineGrain((bs & Qt::ShiftButton) != 0); - slotSetPencilOverExisting((bs & Qt::AltButton + Qt::ControlButton) != 0); + TQt::ButtonState bs = e->state(); + slotSetSelectCopy((bs & TQt::ControlButton) != 0); + slotSetSelectAdd((bs & TQt::ShiftButton) != 0); + slotSetFineGrain((bs & TQt::ShiftButton) != 0); + slotSetPencilOverExisting((bs & TQt::AltButton + TQt::ControlButton) != 0); switch (e->button()) { - case LeftButton: - case MidButton: + case Qt::LeftButton: + case Qt::MidButton: startAutoScroll(); if (m_tool) @@ -1373,7 +1373,7 @@ void CompositionView::contentsMousePressEvent(TQMouseEvent* e) RG_DEBUG << "CompositionView::contentsMousePressEvent() :" << this << " no tool\n"; break; - case RightButton: + case Qt::RightButton: if (m_tool) m_tool->handleRightButtonPress(e); else @@ -1394,8 +1394,8 @@ void CompositionView::contentsMouseReleaseEvent(TQMouseEvent* e) if (!m_tool) return ; - if (e->button() == LeftButton || - e->button() == MidButton ) + if (e->button() == Qt::LeftButton || + e->button() == Qt::MidButton ) m_tool->handleMouseButtonRelease(e); } @@ -1434,9 +1434,9 @@ void CompositionView::contentsMouseMoveEvent(TQMouseEvent* e) if (!m_tool) return ; - Qt::ButtonState bs = e->state(); - slotSetFineGrain((bs & Qt::ShiftButton) != 0); - slotSetPencilOverExisting((bs & Qt::AltButton) != 0); + TQt::ButtonState bs = e->state(); + slotSetFineGrain((bs & TQt::ShiftButton) != 0); + slotSetPencilOverExisting((bs & TQt::AltButton) != 0); int follow = m_tool->handleMouseMove(e); setScrollDirectionConstraint(follow); @@ -1584,7 +1584,7 @@ CompositionView::slotTextFloatTimeout() { hideTextFloat(); slotArtifactsDrawBufferNeedsRefresh(); - // rgapp->slotSetStatusMessage(TQString::null); + // rgapp->slotSetStatusMessage(TQString()); } } diff --git a/src/gui/editors/segment/segmentcanvas/CompositionView.h b/src/gui/editors/segment/segmentcanvas/CompositionView.h index c31cf96..12c5fb4 100644 --- a/src/gui/editors/segment/segmentcanvas/CompositionView.h +++ b/src/gui/editors/segment/segmentcanvas/CompositionView.h @@ -64,9 +64,10 @@ class CompositionRect; class CompositionView : public RosegardenScrollView { Q_OBJECT + TQ_OBJECT public: CompositionView(RosegardenGUIDoc*, CompositionModel*, - TQWidget * parent=0, const char* name=0, WFlags f=0); + TQWidget * tqparent=0, const char* name=0, WFlags f=0); void setPointerPos(int pos); int getPointerPos() { return m_pointerPos; } diff --git a/src/gui/editors/segment/segmentcanvas/SegmentEraser.cpp b/src/gui/editors/segment/segmentcanvas/SegmentEraser.cpp index f519c8a..3c4a7ae 100644 --- a/src/gui/editors/segment/segmentcanvas/SegmentEraser.cpp +++ b/src/gui/editors/segment/segmentcanvas/SegmentEraser.cpp @@ -50,7 +50,7 @@ SegmentEraser::SegmentEraser(CompositionView *c, RosegardenGUIDoc *d) void SegmentEraser::ready() { - m_canvas->viewport()->setCursor(Qt::pointingHandCursor); + m_canvas->viewport()->setCursor(TQt::pointingHandCursor); setBasicContextHelp(); } diff --git a/src/gui/editors/segment/segmentcanvas/SegmentEraser.h b/src/gui/editors/segment/segmentcanvas/SegmentEraser.h index 78165b9..e3bb6b5 100644 --- a/src/gui/editors/segment/segmentcanvas/SegmentEraser.h +++ b/src/gui/editors/segment/segmentcanvas/SegmentEraser.h @@ -43,6 +43,7 @@ class CompositionView; class SegmentEraser : public SegmentTool { Q_OBJECT + TQ_OBJECT friend class SegmentToolBox; diff --git a/src/gui/editors/segment/segmentcanvas/SegmentItemPreview.h b/src/gui/editors/segment/segmentcanvas/SegmentItemPreview.h index d1bb9a7..00d942e 100644 --- a/src/gui/editors/segment/segmentcanvas/SegmentItemPreview.h +++ b/src/gui/editors/segment/segmentcanvas/SegmentItemPreview.h @@ -44,7 +44,7 @@ class RulerScale; class SegmentItemPreview { public: - SegmentItemPreview(Segment& parent, + SegmentItemPreview(Segment& tqparent, RulerScale* scale); virtual ~SegmentItemPreview(); @@ -59,7 +59,7 @@ public: PreviewState getPreviewState() const { return m_previewState; } /** - * Sets whether the preview shape shown in the segment needs + * Sets whether the preview tqshape shown in the segment needs * to be refreshed */ void setPreviewCurrent(bool c) diff --git a/src/gui/editors/segment/segmentcanvas/SegmentJoiner.h b/src/gui/editors/segment/segmentcanvas/SegmentJoiner.h index 946edee..f2fd935 100644 --- a/src/gui/editors/segment/segmentcanvas/SegmentJoiner.h +++ b/src/gui/editors/segment/segmentcanvas/SegmentJoiner.h @@ -43,6 +43,7 @@ class CompositionView; class SegmentJoiner : public SegmentTool { Q_OBJECT + TQ_OBJECT friend class SegmentToolBox; diff --git a/src/gui/editors/segment/segmentcanvas/SegmentMover.cpp b/src/gui/editors/segment/segmentcanvas/SegmentMover.cpp index bc621fe..e2970ab 100644 --- a/src/gui/editors/segment/segmentcanvas/SegmentMover.cpp +++ b/src/gui/editors/segment/segmentcanvas/SegmentMover.cpp @@ -62,7 +62,7 @@ SegmentMover::SegmentMover(CompositionView *c, RosegardenGUIDoc *d) void SegmentMover::ready() { - m_canvas->viewport()->setCursor(Qt::sizeAllCursor); + m_canvas->viewport()->setCursor(TQt::sizeAllCursor); connect(m_canvas, TQT_SIGNAL(contentsMoving (int, int)), this, TQT_SLOT(slotCanvasScrolled(int, int))); setBasicContextHelp(); @@ -328,8 +328,8 @@ int SegmentMover::handleMouseMove(TQMouseEvent *e) comp.getMusicalTimeForAbsoluteTime(currentItemStartTime, bar, beat, fraction, remainder); TQString posString = TQString("%1.%2s (%3, %4, %5)") - .arg(time.sec).arg(ms) - .arg(bar + 1).arg(beat).arg(fraction); + .tqarg(time.sec).tqarg(ms) + .tqarg(bar + 1).tqarg(beat).tqarg(fraction); m_canvas->setTextFloat(guideX + 10, guideY - 30, posString); m_canvas->updateContents(); diff --git a/src/gui/editors/segment/segmentcanvas/SegmentMover.h b/src/gui/editors/segment/segmentcanvas/SegmentMover.h index 580fff0..882647e 100644 --- a/src/gui/editors/segment/segmentcanvas/SegmentMover.h +++ b/src/gui/editors/segment/segmentcanvas/SegmentMover.h @@ -44,6 +44,7 @@ class CompositionView; class SegmentMover : public SegmentTool { Q_OBJECT + TQ_OBJECT friend class SegmentToolBox; diff --git a/src/gui/editors/segment/segmentcanvas/SegmentPencil.cpp b/src/gui/editors/segment/segmentcanvas/SegmentPencil.cpp index 60a74f4..8f4399c 100644 --- a/src/gui/editors/segment/segmentcanvas/SegmentPencil.cpp +++ b/src/gui/editors/segment/segmentcanvas/SegmentPencil.cpp @@ -64,7 +64,7 @@ SegmentPencil::SegmentPencil(CompositionView *c, RosegardenGUIDoc *d) void SegmentPencil::ready() { - m_canvas->viewport()->setCursor(Qt::ibeamCursor); + m_canvas->viewport()->setCursor(TQt::ibeamCursor); connect(m_canvas, TQT_SIGNAL(contentsMoving (int, int)), this, TQT_SLOT(slotCanvasScrolled(int, int))); setContextHelpFor(TQPoint(0, 0)); @@ -86,7 +86,7 @@ void SegmentPencil::slotCanvasScrolled(int newX, int newY) void SegmentPencil::handleMouseButtonPress(TQMouseEvent *e) { - if (e->button() == RightButton) + if (e->button() == Qt::RightButton) return; // is user holding Ctrl+Alt? (ugly, but we are running short on available @@ -153,7 +153,7 @@ void SegmentPencil::handleMouseButtonPress(TQMouseEvent *e) void SegmentPencil::handleMouseButtonRelease(TQMouseEvent* e) { - if (e->button() == RightButton) + if (e->button() == Qt::RightButton) return ; setContextHelpFor(e->pos()); @@ -196,9 +196,9 @@ void SegmentPencil::handleMouseButtonRelease(TQMouseEvent* e) segment->setLowestPlayable(track->getLowestPlayable()); segment->setHighestPlayable(track->getHighestPlayable()); - std::string label = qstrtostr(track->getPresetLabel()); + std::string label = (track->getPresetLabel()); if (label != "") { - segment->setLabel(qstrtostr(track->getPresetLabel())); + segment->setLabel((track->getPresetLabel())); } CompositionItem item = CompositionItemHelper::makeCompositionItem(segment); diff --git a/src/gui/editors/segment/segmentcanvas/SegmentPencil.h b/src/gui/editors/segment/segmentcanvas/SegmentPencil.h index f283f15..894babf 100644 --- a/src/gui/editors/segment/segmentcanvas/SegmentPencil.h +++ b/src/gui/editors/segment/segmentcanvas/SegmentPencil.h @@ -47,6 +47,7 @@ class CompositionView; class SegmentPencil : public SegmentTool { Q_OBJECT + TQ_OBJECT friend class SegmentToolBox; friend class SegmentSelector; diff --git a/src/gui/editors/segment/segmentcanvas/SegmentResizer.cpp b/src/gui/editors/segment/segmentcanvas/SegmentResizer.cpp index 99241f1..4c4c884 100644 --- a/src/gui/editors/segment/segmentcanvas/SegmentResizer.cpp +++ b/src/gui/editors/segment/segmentcanvas/SegmentResizer.cpp @@ -69,7 +69,7 @@ SegmentResizer::SegmentResizer(CompositionView *c, RosegardenGUIDoc *d, void SegmentResizer::ready() { - m_canvas->viewport()->setCursor(Qt::sizeHorCursor); + m_canvas->viewport()->setCursor(TQt::sizeHorCursor); connect(m_canvas, TQT_SIGNAL(contentsMoving (int, int)), this, TQT_SLOT(slotCanvasScrolled(int, int))); setBasicContextHelp(false); @@ -116,7 +116,7 @@ void SegmentResizer::handleMouseButtonRelease(TQMouseEvent *e) { RG_DEBUG << "SegmentResizer::handleMouseButtonRelease" << endl; - bool rescale = (e->state() & Qt::ControlButton); + bool rescale = (e->state() & TQt::ControlButton); if (m_currentItem) { @@ -243,7 +243,7 @@ int SegmentResizer::handleMouseMove(TQMouseEvent *e) { // RG_DEBUG << "SegmentResizer::handleMouseMove" << endl; - bool rescale = (e->state() & Qt::ControlButton); + bool rescale = (e->state() & TQt::ControlButton); if (!m_currentItem) { setBasicContextHelp(rescale); diff --git a/src/gui/editors/segment/segmentcanvas/SegmentResizer.h b/src/gui/editors/segment/segmentcanvas/SegmentResizer.h index 7a0600d..809dc34 100644 --- a/src/gui/editors/segment/segmentcanvas/SegmentResizer.h +++ b/src/gui/editors/segment/segmentcanvas/SegmentResizer.h @@ -48,6 +48,7 @@ class CompositionView; class SegmentResizer : public SegmentTool { Q_OBJECT + TQ_OBJECT friend class SegmentToolBox; friend class SegmentSelector; diff --git a/src/gui/editors/segment/segmentcanvas/SegmentSelector.cpp b/src/gui/editors/segment/segmentcanvas/SegmentSelector.cpp index d601c16..964bc3b 100644 --- a/src/gui/editors/segment/segmentcanvas/SegmentSelector.cpp +++ b/src/gui/editors/segment/segmentcanvas/SegmentSelector.cpp @@ -75,7 +75,7 @@ SegmentSelector::~SegmentSelector() void SegmentSelector::ready() { - m_canvas->viewport()->setCursor(Qt::arrowCursor); + m_canvas->viewport()->setCursor(TQt::arrowCursor); connect(m_canvas, TQT_SIGNAL(contentsMoving (int, int)), this, TQT_SLOT(slotCanvasScrolled(int, int))); setContextHelp(i18n("Click and drag to select segments")); @@ -174,8 +174,8 @@ SegmentSelector::handleMouseButtonPress(TQMouseEvent *e) // Add on middle button or ctrl+left - bounding box on rest // - if (e->button() == MidButton || - (e->button() == LeftButton && (e->state() & Qt::ControlButton))) { + if (e->button() == Qt::MidButton || + (e->button() == Qt::LeftButton && (e->state() & TQ_ControlButton))) { m_dispatchTool = getToolBox()->getTool(SegmentPencil::ToolName); @@ -217,7 +217,7 @@ SegmentSelector::handleMouseButtonRelease(TQMouseEvent *e) if (m_dispatchTool) { m_dispatchTool->handleMouseButtonRelease(e); m_dispatchTool = 0; - m_canvas->viewport()->setCursor(Qt::arrowCursor); + m_canvas->viewport()->setCursor(TQt::arrowCursor); return ; } @@ -232,7 +232,7 @@ SegmentSelector::handleMouseButtonRelease(TQMouseEvent *e) return ; } - m_canvas->viewport()->setCursor(Qt::arrowCursor); + m_canvas->viewport()->setCursor(TQt::arrowCursor); Composition &comp = m_doc->getComposition(); @@ -313,7 +313,7 @@ int SegmentSelector::handleMouseMove(TQMouseEvent *e) { if (!m_buttonPressed) { - setContextHelpFor(e->pos(), (e->state() & Qt::ControlButton)); + setContextHelpFor(e->pos(), (e->state() & TQt::ControlButton)); return RosegardenCanvasView::NoFollow; } @@ -352,7 +352,7 @@ SegmentSelector::handleMouseMove(TQMouseEvent *e) return RosegardenCanvasView::FollowHorizontal | RosegardenCanvasView::FollowVertical; } - m_canvas->viewport()->setCursor(Qt::sizeAllCursor); + m_canvas->viewport()->setCursor(TQt::sizeAllCursor); if (m_segmentCopyMode && !m_segmentQuickCopyDone) { KMacroCommand *mcommand = new KMacroCommand @@ -466,8 +466,8 @@ SegmentSelector::handleMouseMove(TQMouseEvent *e) comp.getMusicalTimeForAbsoluteTime(currentItemStartTime, bar, beat, fraction, remainder); TQString posString = TQString("%1.%2s (%3, %4, %5)") - .arg(time.sec).arg(ms) - .arg(bar + 1).arg(beat).arg(fraction); + .tqarg(time.sec).tqarg(ms) + .tqarg(bar + 1).tqarg(beat).tqarg(fraction); m_canvas->setTextFloat(guideX + 10, guideY - 30, posString); m_canvas->updateContents(); diff --git a/src/gui/editors/segment/segmentcanvas/SegmentSelector.h b/src/gui/editors/segment/segmentcanvas/SegmentSelector.h index 3c602fa..db572d0 100644 --- a/src/gui/editors/segment/segmentcanvas/SegmentSelector.h +++ b/src/gui/editors/segment/segmentcanvas/SegmentSelector.h @@ -44,6 +44,7 @@ class CompositionView; class SegmentSelector : public SegmentTool { Q_OBJECT + TQ_OBJECT friend class SegmentToolBox; friend class SegmentTool; diff --git a/src/gui/editors/segment/segmentcanvas/SegmentSplitter.cpp b/src/gui/editors/segment/segmentcanvas/SegmentSplitter.cpp index 1149cd9..d5fe45a 100644 --- a/src/gui/editors/segment/segmentcanvas/SegmentSplitter.cpp +++ b/src/gui/editors/segment/segmentcanvas/SegmentSplitter.cpp @@ -59,7 +59,7 @@ SegmentSplitter::~SegmentSplitter() void SegmentSplitter::ready() { - m_canvas->viewport()->setCursor(Qt::splitHCursor); + m_canvas->viewport()->setCursor(TQt::splitHCursor); setBasicContextHelp(); } @@ -71,7 +71,7 @@ SegmentSplitter::handleMouseButtonPress(TQMouseEvent *e) CompositionItem item = m_canvas->getFirstItemAt(e->pos()); if (item) { - m_canvas->viewport()->setCursor(Qt::blankCursor); + m_canvas->viewport()->setCursor(TQt::blankCursor); m_prevX = item->rect().x(); m_prevX = item->rect().y(); drawSplitLine(e); @@ -106,7 +106,7 @@ SegmentSplitter::handleMouseButtonRelease(TQMouseEvent *e) } // Reinstate the cursor - m_canvas->viewport()->setCursor(Qt::splitHCursor); + m_canvas->viewport()->setCursor(TQt::splitHCursor); m_canvas->slotHideSplitLine(); } @@ -118,12 +118,12 @@ SegmentSplitter::handleMouseMove(TQMouseEvent *e) CompositionItem item = m_canvas->getFirstItemAt(e->pos()); if (item) { -// m_canvas->viewport()->setCursor(Qt::blankCursor); +// m_canvas->viewport()->setCursor(TQt::blankCursor); drawSplitLine(e); delete item; return RosegardenCanvasView::FollowHorizontal; } else { - m_canvas->viewport()->setCursor(Qt::splitHCursor); + m_canvas->viewport()->setCursor(TQt::splitHCursor); m_canvas->slotHideSplitLine(); return RosegardenCanvasView::NoFollow; } diff --git a/src/gui/editors/segment/segmentcanvas/SegmentSplitter.h b/src/gui/editors/segment/segmentcanvas/SegmentSplitter.h index 3f21ece..a2fc1f6 100644 --- a/src/gui/editors/segment/segmentcanvas/SegmentSplitter.h +++ b/src/gui/editors/segment/segmentcanvas/SegmentSplitter.h @@ -45,6 +45,7 @@ class CompositionView; class SegmentSplitter : public SegmentTool { Q_OBJECT + TQ_OBJECT friend class SegmentToolBox; diff --git a/src/gui/editors/segment/segmentcanvas/SegmentTool.cpp b/src/gui/editors/segment/segmentcanvas/SegmentTool.cpp index 438cc51..b74cc9f 100644 --- a/src/gui/editors/segment/segmentcanvas/SegmentTool.cpp +++ b/src/gui/editors/segment/segmentcanvas/SegmentTool.cpp @@ -42,7 +42,7 @@ namespace Rosegarden { SegmentTool::SegmentTool(CompositionView* canvas, RosegardenGUIDoc *doc) - : BaseTool("segment_tool_menu", dynamic_cast<KMainWindow*>(doc->parent())->factory(), canvas), + : BaseTool("segment_tool_menu", dynamic_cast<KMainWindow*>(doc->tqparent())->factory(), TQT_TQOBJECT(canvas)), m_canvas(canvas), m_doc(doc), m_changeMade(false) @@ -54,7 +54,7 @@ SegmentTool::~SegmentTool() void SegmentTool::ready() { - m_canvas->viewport()->setCursor(Qt::arrowCursor); + m_canvas->viewport()->setCursor(TQt::arrowCursor); } void @@ -86,12 +86,12 @@ SegmentTool::createMenu() RG_DEBUG << "SegmentTool::createMenu()\n"; RosegardenGUIApp *app = - dynamic_cast<RosegardenGUIApp*>(m_doc->parent()); + dynamic_cast<RosegardenGUIApp*>(m_doc->tqparent()); if (app) { m_menu = static_cast<TQPopupMenu*> //(app->factory()->container("segment_tool_menu", app)); - (m_parentFactory->container("segment_tool_menu", app)); + (m_tqparentFactory->container("segment_tool_menu", app)); if (!m_menu) { RG_DEBUG << "SegmentTool::createMenu() failed\n"; diff --git a/src/gui/editors/segment/segmentcanvas/SegmentTool.h b/src/gui/editors/segment/segmentcanvas/SegmentTool.h index 5b054a8..1b33ba3 100644 --- a/src/gui/editors/segment/segmentcanvas/SegmentTool.h +++ b/src/gui/editors/segment/segmentcanvas/SegmentTool.h @@ -64,7 +64,7 @@ public: virtual ~SegmentTool(); /** - * Is called by the parent View (EditView or SegmentCanvas) when + * Is called by the tqparent View (EditView or SegmentCanvas) when * the tool is set as current. * Add any setup here */ diff --git a/src/gui/editors/segment/segmentcanvas/SegmentToolBox.cpp b/src/gui/editors/segment/segmentcanvas/SegmentToolBox.cpp index 5ce8a58..c0b4aeb 100644 --- a/src/gui/editors/segment/segmentcanvas/SegmentToolBox.cpp +++ b/src/gui/editors/segment/segmentcanvas/SegmentToolBox.cpp @@ -42,9 +42,9 @@ namespace Rosegarden { -SegmentToolBox::SegmentToolBox(CompositionView* parent, RosegardenGUIDoc* doc) - : BaseToolBox(parent), - m_canvas(parent), +SegmentToolBox::SegmentToolBox(CompositionView* tqparent, RosegardenGUIDoc* doc) + : BaseToolBox(tqparent), + m_canvas(tqparent), m_doc(doc) {} @@ -84,7 +84,7 @@ SegmentTool* SegmentToolBox::createTool(const TQString& toolName) else { KMessageBox::error(0, TQString("SegmentToolBox::createTool : unrecognised toolname %1 (%2)") - .arg(toolName).arg(toolNamelc)); + .tqarg(toolName).tqarg(toolNamelc)); return 0; } diff --git a/src/gui/editors/segment/segmentcanvas/SegmentToolBox.h b/src/gui/editors/segment/segmentcanvas/SegmentToolBox.h index 2609708..c975e53 100644 --- a/src/gui/editors/segment/segmentcanvas/SegmentToolBox.h +++ b/src/gui/editors/segment/segmentcanvas/SegmentToolBox.h @@ -43,8 +43,9 @@ class CompositionView; class SegmentToolBox : public BaseToolBox { Q_OBJECT + TQ_OBJECT public: - SegmentToolBox(CompositionView* parent, RosegardenGUIDoc*); + SegmentToolBox(CompositionView* tqparent, RosegardenGUIDoc*); virtual SegmentTool* getTool(const TQString& toolName); diff --git a/src/gui/editors/tempo/TempoListItem.h b/src/gui/editors/tempo/TempoListItem.h index 640b7b1..be9e7a1 100644 --- a/src/gui/editors/tempo/TempoListItem.h +++ b/src/gui/editors/tempo/TempoListItem.h @@ -42,12 +42,12 @@ public: Type type, timeT time, int index, - KListView *parent, + KListView *tqparent, TQString label1, TQString label2, TQString label3, - TQString label4 = TQString::null) : - KListViewItem(parent, label1, label2, label3, label4), + TQString label4 = TQString()) : + KListViewItem(tqparent, label1, label2, label3, label4), m_composition(composition), m_type(type), m_time(time), diff --git a/src/gui/editors/tempo/TempoView.cpp b/src/gui/editors/tempo/TempoView.cpp index c3bc23e..1184ac3 100644 --- a/src/gui/editors/tempo/TempoView.cpp +++ b/src/gui/editors/tempo/TempoView.cpp @@ -70,8 +70,8 @@ int TempoView::m_lastSetFilter = -1; -TempoView::TempoView(RosegardenGUIDoc *doc, TQWidget *parent, timeT openTime): - EditViewBase(doc, std::vector<Segment *>(), 2, parent, "tempoview"), +TempoView::TempoView(RosegardenGUIDoc *doc, TQWidget *tqparent, timeT openTime): + EditViewBase(doc, std::vector<Segment *>(), 2, tqparent, "tempoview"), m_filter(Tempo | TimeSignature), m_ignoreUpdates(true) { @@ -86,7 +86,7 @@ TempoView::TempoView(RosegardenGUIDoc *doc, TQWidget *parent, timeT openTime): // define some note filtering buttons in a group // m_filterGroup = - new TQButtonGroup(1, Horizontal, i18n("Filter"), getCentralWidget()); + new TQButtonGroup(1, Qt::Horizontal, i18n("Filter"), getCentralWidget()); m_tempoCheckBox = new TQCheckBox(i18n("Tempo"), m_filterGroup); m_timeSigCheckBox = new TQCheckBox(i18n("Time Signature"), m_filterGroup); @@ -218,7 +218,7 @@ TempoView::applyLayout(int /*staffNo*/) new TempoListItem(comp, TempoListItem::TimeSignature, sig.first, i, m_list, timeString, i18n("Time Signature "), - TQString("%1/%2 ").arg(sig.second.getNumerator()). + TQString("%1/%2 ").tqarg(sig.second.getNumerator()). arg(sig.second.getDenominator()), properties); } @@ -243,7 +243,7 @@ TempoView::applyLayout(int /*staffNo*/) if (sig.getBeatDuration() == Note(Note::Crotchet).getDuration()) { desc = i18n("%1.%2%3"). - arg(qpmUnits).arg(qpmTenths).arg(qpmHundredths); + tqarg(qpmUnits).tqarg(qpmTenths).tqarg(qpmHundredths); } else { float bpm = (qpm * Note(Note::Crotchet).getDuration()) / @@ -253,8 +253,8 @@ TempoView::applyLayout(int /*staffNo*/) int bpmHundredths = int((bpm - bpmUnits - bpmTenths / 10.0) * 100 + 0.001); desc = i18n("%1.%2%3 qpm (%4.%5%6 bpm) "). - arg(qpmUnits).arg(qpmTenths).arg(qpmHundredths). - arg(bpmUnits).arg(bpmTenths).arg(bpmHundredths); + tqarg(qpmUnits).tqarg(qpmTenths).tqarg(qpmHundredths). + tqarg(bpmUnits).tqarg(bpmTenths).tqarg(bpmHundredths); } TQString timeString = makeTimeString(tempo.first, timeMode); @@ -342,7 +342,7 @@ TempoView::getCurrentSegment() return *m_segments.begin(); } -QString +TQString TempoView::makeTimeString(timeT time, int timeMode) { switch (timeMode) { @@ -354,27 +354,27 @@ TempoView::makeTimeString(timeT time, int timeMode) (time, bar, beat, fraction, remainder); ++bar; return TQString("%1%2%3-%4%5-%6%7-%8%9 ") - .arg(bar / 100) - .arg((bar % 100) / 10) - .arg(bar % 10) - .arg(beat / 10) - .arg(beat % 10) - .arg(fraction / 10) - .arg(fraction % 10) - .arg(remainder / 10) - .arg(remainder % 10); + .tqarg(bar / 100) + .tqarg((bar % 100) / 10) + .tqarg(bar % 10) + .tqarg(beat / 10) + .tqarg(beat % 10) + .tqarg(fraction / 10) + .tqarg(fraction % 10) + .tqarg(remainder / 10) + .tqarg(remainder % 10); } case 1: // real time { RealTime rt = getDocument()->getComposition().getElapsedRealTime(time); - // return TQString("%1 ").arg(rt.toString().c_str()); - return TQString("%1 ").arg(rt.toText().c_str()); + // return TQString("%1 ").tqarg(rt.toString().c_str()); + return TQString("%1 ").tqarg(rt.toText().c_str()); } default: - return TQString("%1 ").arg(time); + return TQString("%1 ").tqarg(time); } } @@ -578,36 +578,36 @@ TempoView::setupActions() TQString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); TQIconSet icon(TQPixmap(pixmapDir + "/toolbar/event-insert-tempo.png")); - new KAction(AddTempoChangeCommand::getGlobalName(), icon, Key_I, this, + new KAction(AddTempoChangeCommand::getGlobalName(), icon, Key_I, TQT_TQOBJECT(this), TQT_SLOT(slotEditInsertTempo()), actionCollection(), "insert_tempo"); TQCanvasPixmap pixmap(pixmapDir + "/toolbar/event-insert-timesig.png"); icon = TQIconSet(pixmap); - new KAction(AddTimeSignatureCommand::getGlobalName(), icon, Key_G, this, + new KAction(AddTimeSignatureCommand::getGlobalName(), icon, Key_G, TQT_TQOBJECT(this), TQT_SLOT(slotEditInsertTimeSignature()), actionCollection(), "insert_timesig"); pixmap.load(pixmapDir + "/toolbar/event-delete.png"); icon = TQIconSet(pixmap); - new KAction(i18n("&Delete"), icon, Key_Delete, this, + new KAction(i18n("&Delete"), icon, Key_Delete, TQT_TQOBJECT(this), TQT_SLOT(slotEditDelete()), actionCollection(), "delete"); pixmap.load(pixmapDir + "/toolbar/event-edit.png"); icon = TQIconSet(pixmap); - new KAction(i18n("&Edit Item"), icon, Key_E, this, + new KAction(i18n("&Edit Item"), icon, Key_E, TQT_TQOBJECT(this), TQT_SLOT(slotEdit()), actionCollection(), "edit"); - new KAction(i18n("Select &All"), 0, this, + new KAction(i18n("Select &All"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotSelectAll()), actionCollection(), "select_all"); - new KAction(i18n("Clear Selection"), Key_Escape, this, + new KAction(i18n("Clear Selection"), Key_Escape, TQT_TQOBJECT(this), TQT_SLOT(slotClearSelection()), actionCollection(), "clear_selection"); @@ -619,7 +619,7 @@ TempoView::setupActions() pixmap.load(pixmapDir + "/toolbar/time-musical.png"); icon = TQIconSet(pixmap); - action = new KRadioAction(i18n("&Musical Times"), icon, 0, this, + action = new KRadioAction(i18n("&Musical Times"), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotMusicalTime()), actionCollection(), "time_musical"); action->setExclusiveGroup("timeMode"); @@ -629,7 +629,7 @@ TempoView::setupActions() pixmap.load(pixmapDir + "/toolbar/time-real.png"); icon = TQIconSet(pixmap); - action = new KRadioAction(i18n("&Real Times"), icon, 0, this, + action = new KRadioAction(i18n("&Real Times"), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotRealTime()), actionCollection(), "time_real"); action->setExclusiveGroup("timeMode"); @@ -639,7 +639,7 @@ TempoView::setupActions() pixmap.load(pixmapDir + "/toolbar/time-raw.png"); icon = TQIconSet(pixmap); - action = new KRadioAction(i18n("Ra&w Times"), icon, 0, this, + action = new KRadioAction(i18n("Ra&w Times"), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotRawTime()), actionCollection(), "time_raw"); action->setExclusiveGroup("timeMode"); @@ -660,7 +660,7 @@ TempoView::initStatusBar() AlignLeft | AlignVCenter); } -QSize +TQSize TempoView::getViewSize() { return m_list->size(); @@ -692,7 +692,7 @@ TempoView::slotSaveOptions() void TempoView::slotModifyFilter(int button) { - TQCheckBox *checkBox = dynamic_cast<TQCheckBox*>(m_filterGroup->find(button)); + TQCheckBox *checkBox = dynamic_cast<TQCheckBox*>(m_filterGroup->tqfind(button)); if (checkBox == 0) return ; @@ -832,7 +832,7 @@ void TempoView::updateViewCaption() { setCaption(i18n("%1 - Tempo and Time Signature Editor") - .arg(getDocument()->getTitle())); + .tqarg(getDocument()->getTitle())); } } diff --git a/src/gui/editors/tempo/TempoView.h b/src/gui/editors/tempo/TempoView.h index fcf3efb..b715d24 100644 --- a/src/gui/editors/tempo/TempoView.h +++ b/src/gui/editors/tempo/TempoView.h @@ -62,6 +62,7 @@ class Composition; class TempoView : public EditViewBase, public CompositionObserver { Q_OBJECT + TQ_OBJECT enum Filter { @@ -71,7 +72,7 @@ class TempoView : public EditViewBase, public CompositionObserver }; public: - TempoView(RosegardenGUIDoc *doc, TQWidget *parent, timeT); + TempoView(RosegardenGUIDoc *doc, TQWidget *tqparent, timeT); virtual ~TempoView(); virtual bool applyLayout(int staffNo = -1); diff --git a/src/gui/general/BarLine.cpp b/src/gui/general/BarLine.cpp index 5b5973d..df610ac 100644 --- a/src/gui/general/BarLine.cpp +++ b/src/gui/general/BarLine.cpp @@ -113,7 +113,7 @@ BarLine::drawShape(TQPainter &painter) } } -QPointArray +TQPointArray BarLine::areaPoints() const { int bx = int(x()); diff --git a/src/gui/general/BarLine.h b/src/gui/general/BarLine.h index 3523c8a..02157f1 100644 --- a/src/gui/general/BarLine.h +++ b/src/gui/general/BarLine.h @@ -31,27 +31,27 @@ namespace Rosegarden { -class BarLine : public QCanvasPolygonalItem +class BarLine : public TQCanvasPolygonalItem { public: - BarLine(TQCanvas *canvas, double layoutX, + BarLine(TQCanvas *canvas, double tqlayoutX, int barLineHeight, int baseBarThickness, int lineSpacing, int inset, LinedStaff::BarStyle style) : TQCanvasPolygonalItem(canvas), - m_layoutX(layoutX), + m_tqlayoutX(tqlayoutX), m_barLineHeight(barLineHeight), m_baseBarThickness(baseBarThickness), m_lineSpacing(lineSpacing), m_inset(inset), m_style(style) { } - double getLayoutX() const { return m_layoutX; } + double getLayoutX() const { return m_tqlayoutX; } virtual TQPointArray areaPoints() const; virtual void drawShape(TQPainter &); protected: - double m_layoutX; + double m_tqlayoutX; int m_barLineHeight; int m_baseBarThickness; int m_lineSpacing; diff --git a/src/gui/general/BaseTool.cpp b/src/gui/general/BaseTool.cpp index 75202ac..ee95231 100644 --- a/src/gui/general/BaseTool.cpp +++ b/src/gui/general/BaseTool.cpp @@ -36,11 +36,11 @@ namespace Rosegarden { -BaseTool::BaseTool(const TQString& menuName, KXMLGUIFactory* factory, TQObject* parent) - : TQObject(parent), +BaseTool::BaseTool(const TQString& menuName, KXMLGUIFactory* factory, TQObject* tqparent) + : TQObject(tqparent), m_menuName(menuName), m_menu(0), - m_parentFactory(factory) + m_tqparentFactory(factory) {} BaseTool::~BaseTool() @@ -48,7 +48,7 @@ BaseTool::~BaseTool() RG_DEBUG << "BaseTool::~BaseTool()\n"; // delete m_menu; - // m_parentView->factory()->removeClient(this); + // m_tqparentView->factory()->removeClient(this); // m_instance = 0; } diff --git a/src/gui/general/BaseTool.h b/src/gui/general/BaseTool.h index 6dd6820..29ef8dd 100644 --- a/src/gui/general/BaseTool.h +++ b/src/gui/general/BaseTool.h @@ -44,9 +44,10 @@ namespace Rosegarden * handling by a BaseToolBox * */ -class BaseTool : public QObject +class BaseTool : public TQObject { Q_OBJECT + TQ_OBJECT friend class BaseToolBox; @@ -55,14 +56,14 @@ public: virtual ~BaseTool(); /** - * Is called by the parent View (EditView or SegmentCanvas) when + * Is called by the tqparent View (EditView or SegmentCanvas) when * the tool is set as current. - * Add any setup here (e.g. setting the mouse cursor shape) + * Add any setup here (e.g. setting the mouse cursor tqshape) */ virtual void ready(); /** - * Is called by the parent View (EditView or SegmentCanvas) after + * Is called by the tqparent View (EditView or SegmentCanvas) after * the tool is put away. * Add any cleanup here */ @@ -87,7 +88,7 @@ protected: * * \a menuName : the name of the menu defined in the XML rc file */ - BaseTool(const TQString& menuName, KXMLGUIFactory*, TQObject* parent); + BaseTool(const TQString& menuName, KXMLGUIFactory*, TQObject* tqparent); virtual void createMenu() = 0; virtual bool hasMenu() { return false; } @@ -100,7 +101,7 @@ protected: TQString m_menuName; TQPopupMenu* m_menu; - KXMLGUIFactory* m_parentFactory; + KXMLGUIFactory* m_tqparentFactory; TQString m_contextHelp; }; diff --git a/src/gui/general/BaseToolBox.cpp b/src/gui/general/BaseToolBox.cpp index e4c2a5f..70cf3bd 100644 --- a/src/gui/general/BaseToolBox.cpp +++ b/src/gui/general/BaseToolBox.cpp @@ -34,9 +34,9 @@ namespace Rosegarden { -BaseToolBox::BaseToolBox(TQWidget* parent) - : TQObject(parent), - m_tools(17, // default size, from the Qt docs +BaseToolBox::BaseToolBox(TQWidget* tqparent) + : TQObject(tqparent), + m_tools(17, // default size, from the TQt docs false) // but we want it to be case insensitive { //m_tools.setAutoDelete(true); diff --git a/src/gui/general/BaseToolBox.h b/src/gui/general/BaseToolBox.h index d061938..faf2b3a 100644 --- a/src/gui/general/BaseToolBox.h +++ b/src/gui/general/BaseToolBox.h @@ -45,12 +45,13 @@ class BaseTool; * * Tools are fetched from a name */ -class BaseToolBox : public QObject +class BaseToolBox : public TQObject { Q_OBJECT + TQ_OBJECT public: - BaseToolBox(TQWidget* parent); + BaseToolBox(TQWidget* tqparent); virtual BaseTool* getTool(const TQString& toolName); diff --git a/src/gui/general/CanvasCursor.h b/src/gui/general/CanvasCursor.h index a53e39f..8770165 100644 --- a/src/gui/general/CanvasCursor.h +++ b/src/gui/general/CanvasCursor.h @@ -37,7 +37,7 @@ namespace Rosegarden -class CanvasCursor : public QCanvasRectangle +class CanvasCursor : public TQCanvasRectangle { public: CanvasCursor(TQCanvas*, int width); diff --git a/src/gui/general/CanvasItemGC.h b/src/gui/general/CanvasItemGC.h index 681e021..50bd21f 100644 --- a/src/gui/general/CanvasItemGC.h +++ b/src/gui/general/CanvasItemGC.h @@ -52,10 +52,10 @@ namespace Rosegarden * * However, if the SegmentItem deletes its repeat rectangle, then when * the SegmentCanvas destruction occurs, the SegmentCanvas dtor will - * get a list of all its children (TQCanvas::allItems()), containing + * get a list of all its tqchildren (TQCanvas::allItems()), containing * both SegmentItems and their repeat rectangles. Deleting a * SegmentItem will delete its repeat rectangle, which will still be - * present in the all children list which the SegmentCanvas dtor is + * present in the all tqchildren list which the SegmentCanvas dtor is * iterating over. * * So a solution is simply to push to-be-deleted repeat rectangles on diff --git a/src/gui/general/EditTool.cpp b/src/gui/general/EditTool.cpp index f48017c..8a07fe8 100644 --- a/src/gui/general/EditTool.cpp +++ b/src/gui/general/EditTool.cpp @@ -41,8 +41,8 @@ namespace Rosegarden { EditTool::EditTool(const TQString& menuName, EditView* view) - : BaseTool(menuName, view->factory(), view), - m_parentView(view) + : BaseTool(menuName, view->factory(), TQT_TQOBJECT(view)), + m_tqparentView(view) {} void EditTool::handleMousePress(timeT time, @@ -123,9 +123,9 @@ void EditTool::createMenu() RG_DEBUG << "BaseTool::createMenu() " << m_rcFileName << " - " << m_menuName << endl; setXMLFile(m_rcFileName); - m_parentFactory->addClient(this); + m_tqparentFactory->addClient(this); - TQWidget* tmp = m_parentFactory->container(m_menuName, this); + TQWidget* tmp = m_tqparentFactory->container(m_menuName, this); if (!tmp) RG_DEBUG << "BaseTool::createMenu(" << m_rcFileName diff --git a/src/gui/general/EditTool.h b/src/gui/general/EditTool.h index 7fda27f..f38bfa1 100644 --- a/src/gui/general/EditTool.h +++ b/src/gui/general/EditTool.h @@ -157,7 +157,7 @@ protected: //--------------- Data members --------------------------------- TQString m_rcFileName; - EditView* m_parentView; + EditView* m_tqparentView; }; diff --git a/src/gui/general/EditToolBox.cpp b/src/gui/general/EditToolBox.cpp index 48fa7e4..c19a076 100644 --- a/src/gui/general/EditToolBox.cpp +++ b/src/gui/general/EditToolBox.cpp @@ -35,9 +35,9 @@ namespace Rosegarden { -EditToolBox::EditToolBox(EditView *parent) - : BaseToolBox(parent), - m_parentView(parent) +EditToolBox::EditToolBox(EditView *tqparent) + : BaseToolBox(tqparent), + m_tqparentView(tqparent) { } diff --git a/src/gui/general/EditToolBox.h b/src/gui/general/EditToolBox.h index c1287b8..1818b35 100644 --- a/src/gui/general/EditToolBox.h +++ b/src/gui/general/EditToolBox.h @@ -46,8 +46,9 @@ class EditView; class EditToolBox : public BaseToolBox { Q_OBJECT + TQ_OBJECT public: - EditToolBox(EditView* parent); + EditToolBox(EditView* tqparent); virtual EditTool* getTool(const TQString& toolName); @@ -56,7 +57,7 @@ protected: //--------------- Data members --------------------------------- - EditView* m_parentView; + EditView* m_tqparentView; }; diff --git a/src/gui/general/EditView.cpp b/src/gui/general/EditView.cpp index e37cbfc..f216dad 100644 --- a/src/gui/general/EditView.cpp +++ b/src/gui/general/EditView.cpp @@ -112,15 +112,15 @@ const unsigned int EditView::TOPBARBUTTONS_ROW = RULERS_ROW + 1; const unsigned int EditView::CANVASVIEW_ROW = TOPBARBUTTONS_ROW + 1; const unsigned int EditView::CONTROLRULER_ROW = CANVASVIEW_ROW + 1; -// Just some simple features we might want to show - make them bit maskable +// Just some simple features we might want to show - make them bit tqmaskable // static int FeatureShowVelocity = 0x00001; // show the velocity ruler EditView::EditView(RosegardenGUIDoc *doc, std::vector<Segment *> segments, unsigned int cols, - TQWidget *parent, const char *name) : - EditViewBase(doc, segments, cols, parent, name), + TQWidget *tqparent, const char *name) : + EditViewBase(doc, segments, cols, tqparent, name), m_currentEventSelection(0), m_activeItem(0), m_canvasView(0), @@ -138,7 +138,7 @@ EditView::EditView(RosegardenGUIDoc *doc, connect(m_controlRulers, TQT_SIGNAL(closeRequest(TQWidget*)), this, TQT_SLOT(slotRemoveControlRuler(TQWidget*))); - (dynamic_cast<TQBoxLayout*>(m_bottomBox->layout()))->setDirection(TQBoxLayout::BottomToTop); + (dynamic_cast<TQBoxLayout*>(m_bottomBox->tqlayout()))->setDirection(TQBoxLayout::BottomToTop); // m_rulerBoxFiller is a white label used to keep m_rulerBox exactly // above the scrolling part of the view (and never above the @@ -154,7 +154,7 @@ EditView::EditView(RosegardenGUIDoc *doc, m_grid->addLayout(gl, RULERS_ROW, m_mainCol); m_grid->addMultiCellLayout(m_controlBox, CONTROLS_ROW, CONTROLS_ROW, 0, 1); - m_controlBox->setAlignment(AlignRight); + m_controlBox->tqsetAlignment(AlignRight); // m_grid->addWidget(m_controlRulers, CONTROLRULER_ROW, 2); m_controlRulers->hide(); @@ -169,7 +169,7 @@ EditView::~EditView() void EditView::updateBottomWidgetGeometry() { - getBottomWidget()->layout()->invalidate(); + getBottomWidget()->tqlayout()->tqinvalidate(); getBottomWidget()->updateGeometry(); getCanvasView()->updateBottomWidgetGeometry(); } @@ -728,82 +728,82 @@ EditView::setupActions() TQIconSet icon = TQIconSet(pixmap); new KAction(AddTempoChangeCommand::getGlobalName(), icon, 0, - this, TQT_SLOT(slotAddTempo()), + TQT_TQOBJECT(this), TQT_SLOT(slotAddTempo()), actionCollection(), "add_tempo"); pixmap.load(pixmapDir + "/toolbar/event-insert-timesig.png"); icon = TQIconSet(pixmap); new KAction(AddTimeSignatureCommand::getGlobalName(), icon, 0, - this, TQT_SLOT(slotAddTimeSignature()), + TQT_TQOBJECT(this), TQT_SLOT(slotAddTimeSignature()), actionCollection(), "add_time_signature"); // // Transforms // - new KAction(i18n("&Halve Durations"), Key_H + CTRL, this, + new KAction(i18n("&Halve Durations"), Key_H + CTRL, TQT_TQOBJECT(this), TQT_SLOT(slotHalveDurations()), actionCollection(), "halve_durations"); - new KAction(i18n("&Double Durations"), Key_H + CTRL + SHIFT, this, + new KAction(i18n("&Double Durations"), Key_H + CTRL + SHIFT, TQT_TQOBJECT(this), TQT_SLOT(slotDoubleDurations()), actionCollection(), "double_durations"); - new KAction(RescaleCommand::getGlobalName(), 0, this, + new KAction(RescaleCommand::getGlobalName(), 0, TQT_TQOBJECT(this), TQT_SLOT(slotRescale()), actionCollection(), "rescale"); new KAction(TransposeCommand::getGlobalName(1), 0, - Key_Up, this, + Key_Up, TQT_TQOBJECT(this), TQT_SLOT(slotTransposeUp()), actionCollection(), "transpose_up"); new KAction(TransposeCommand::getGlobalName(12), 0, - Key_Up + CTRL, this, + Key_Up + CTRL, TQT_TQOBJECT(this), TQT_SLOT(slotTransposeUpOctave()), actionCollection(), "transpose_up_octave"); new KAction(TransposeCommand::getGlobalName( -1), 0, - Key_Down, this, + Key_Down, TQT_TQOBJECT(this), TQT_SLOT(slotTransposeDown()), actionCollection(), "transpose_down"); new KAction(TransposeCommand::getGlobalName( -12), 0, - Key_Down + CTRL, this, + Key_Down + CTRL, TQT_TQOBJECT(this), TQT_SLOT(slotTransposeDownOctave()), actionCollection(), "transpose_down_octave"); - new KAction(TransposeCommand::getGlobalName(0), 0, this, + new KAction(TransposeCommand::getGlobalName(0), 0, TQT_TQOBJECT(this), TQT_SLOT(slotTranspose()), actionCollection(), "general_transpose"); - new KAction(TransposeCommand::getDiatonicGlobalName(0,0), 0, this, + new KAction(TransposeCommand::getDiatonicGlobalName(0,0), 0, TQT_TQOBJECT(this), TQT_SLOT(slotDiatonicTranspose()), actionCollection(), "general_diatonic_transpose"); - new KAction(InvertCommand::getGlobalName(0), 0, this, + new KAction(InvertCommand::getGlobalName(0), 0, TQT_TQOBJECT(this), TQT_SLOT(slotInvert()), actionCollection(), "invert"); - new KAction(RetrogradeCommand::getGlobalName(0), 0, this, + new KAction(RetrogradeCommand::getGlobalName(0), 0, TQT_TQOBJECT(this), TQT_SLOT(slotRetrograde()), actionCollection(), "retrograde"); - new KAction(RetrogradeInvertCommand::getGlobalName(0), 0, this, + new KAction(RetrogradeInvertCommand::getGlobalName(0), 0, TQT_TQOBJECT(this), TQT_SLOT(slotRetrogradeInvert()), actionCollection(), "retrograde_invert"); - new KAction(i18n("Jog &Left"), Key_Left + ALT, this, + new KAction(i18n("Jog &Left"), Key_Left + ALT, TQT_TQOBJECT(this), TQT_SLOT(slotJogLeft()), actionCollection(), "jog_left"); - new KAction(i18n("Jog &Right"), Key_Right + ALT, this, + new KAction(i18n("Jog &Right"), Key_Right + ALT, TQT_TQOBJECT(this), TQT_SLOT(slotJogRight()), actionCollection(), "jog_right"); // Control rulers // - new KAction(i18n("Show Velocity Property Ruler"), 0, this, + new KAction(i18n("Show Velocity Property Ruler"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotShowVelocityControlRuler()), actionCollection(), "show_velocity_control_ruler"); @@ -822,37 +822,37 @@ EditView::setupActions() // // Control Ruler context menu // - new KAction(i18n("Insert item"), 0, this, + new KAction(i18n("Insert item"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotInsertControlRulerItem()), actionCollection(), "insert_control_ruler_item"); // This was on Key_Delete, but that conflicts with existing Delete commands // on individual edit views - new KAction(i18n("Erase selected items"), 0, this, + new KAction(i18n("Erase selected items"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotEraseControlRulerItem()), actionCollection(), "erase_control_ruler_item"); - new KAction(i18n("Clear ruler"), 0, this, + new KAction(i18n("Clear ruler"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotClearControlRulerItem()), actionCollection(), "clear_control_ruler_item"); - new KAction(i18n("Insert line of controllers"), 0, this, + new KAction(i18n("Insert line of controllers"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotStartControlLineItem()), actionCollection(), "start_control_line_item"); - new KAction(i18n("Flip forward"), Key_BracketRight, this, + new KAction(i18n("Flip forward"), Key_BracketRight, TQT_TQOBJECT(this), TQT_SLOT(slotFlipForwards()), actionCollection(), "flip_control_events_forward"); - new KAction(i18n("Flip backwards"), Key_BracketLeft, this, + new KAction(i18n("Flip backwards"), Key_BracketLeft, TQT_TQOBJECT(this), TQT_SLOT(slotFlipBackwards()), actionCollection(), "flip_control_events_back"); - new KAction(i18n("Draw property line"), 0, this, + new KAction(i18n("Draw property line"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotDrawPropertyLine()), actionCollection(), "draw_property_line"); - new KAction(i18n("Select all property values"), 0, this, + new KAction(i18n("Select all property values"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotSelectAllProperties()), actionCollection(), "select_all_properties"); } @@ -891,9 +891,9 @@ EditView::setupAddControlRulerMenu() TQString hexValue; hexValue.sprintf("(0x%x)", it->getControllerValue()); - itemStr = i18n("%1 Controller %2 %3").arg(strtoqstr(it->getName())) - .arg(it->getControllerValue()) - .arg(hexValue); + itemStr = i18n("%1 Controller %2 %3").tqarg(strtoqstr(it->getName())) + .tqarg(it->getControllerValue()) + .tqarg(hexValue); } else if (it->getType() == PitchBend::EventType) itemStr = i18n("Pitch Bend"); @@ -1082,18 +1082,18 @@ EditView::createInsertPitchActionMenu() }; KActionMenu *insertPitchActionMenu = - new KActionMenu(i18n("&Insert Note"), this, "insert_note_actionmenu"); + new KActionMenu(i18n("&Insert Note"), TQT_TQOBJECT(this), "insert_note_actionmenu"); for (int octave = 0; octave <= 2; ++octave) { KActionMenu *menu = insertPitchActionMenu; if (octave == 1) { - menu = new KActionMenu(i18n("&Upper Octave"), this, + menu = new KActionMenu(i18n("&Upper Octave"), TQT_TQOBJECT(this), "insert_note_actionmenu_upper_octave"); - insertPitchActionMenu->insert(new KActionSeparator(this)); + insertPitchActionMenu->insert(new KActionSeparator(TQT_TQOBJECT(this))); insertPitchActionMenu->insert(menu); } else if (octave == 2) { - menu = new KActionMenu(i18n("&Lower Octave"), this, + menu = new KActionMenu(i18n("&Lower Octave"), TQT_TQOBJECT(this), "insert_note_actionmenu_lower_octave"); insertPitchActionMenu->insert(menu); } @@ -1114,10 +1114,10 @@ EditView::createInsertPitchActionMenu() insertPitchAction = new KAction - (flat.arg(notePitchNames[i]), + (flat.tqarg(notePitchNames[i]), CTRL + SHIFT + notePitchKeys[octave][i], - this, TQT_SLOT(slotInsertNoteFromAction()), actionCollection(), - TQString("insert_%1_flat%2").arg(i).arg(octaveSuffix)); + TQT_TQOBJECT(this), TQT_SLOT(slotInsertNoteFromAction()), actionCollection(), + TQString("insert_%1_flat%2").tqarg(i).tqarg(octaveSuffix)); menu->insert(insertPitchAction); } @@ -1126,8 +1126,8 @@ EditView::createInsertPitchActionMenu() new KAction (notePitchNames[i], notePitchKeys[octave][i], - this, TQT_SLOT(slotInsertNoteFromAction()), actionCollection(), - TQString("insert_%1%2").arg(i).arg(octaveSuffix)); + TQT_TQOBJECT(this), TQT_SLOT(slotInsertNoteFromAction()), actionCollection(), + TQString("insert_%1%2").tqarg(i).tqarg(octaveSuffix)); menu->insert(insertPitchAction); @@ -1137,16 +1137,16 @@ EditView::createInsertPitchActionMenu() insertPitchAction = new KAction - (sharp.arg(notePitchNames[i]), + (sharp.tqarg(notePitchNames[i]), SHIFT + notePitchKeys[octave][i], - this, TQT_SLOT(slotInsertNoteFromAction()), actionCollection(), - TQString("insert_%1_sharp%2").arg(i).arg(octaveSuffix)); + TQT_TQOBJECT(this), TQT_SLOT(slotInsertNoteFromAction()), actionCollection(), + TQString("insert_%1_sharp%2").tqarg(i).tqarg(octaveSuffix)); menu->insert(insertPitchAction); } if (i < 6) - menu->insert(new KActionSeparator(this)); + menu->insert(new KActionSeparator(TQT_TQOBJECT(this))); } } @@ -1351,13 +1351,13 @@ void EditView::slotShowPropertyControlRuler() KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok); KListBox* propList = new KListBox(propChooserDialog.makeVBoxMainWidget()); - new QListBoxRGProperty(propList, BaseProperties::VELOCITY.c_str()); + new TQListBoxRGProperty(propList, BaseProperties::VELOCITY.c_str()); int rc = propChooserDialog.exec(); if (rc == TQDialog::Accepted) { // fix for KDE 3.0 - //QListBoxRGProperty* item = dynamic_cast<QListBoxRGProperty*>(propList->selectedItem()); - QListBoxRGProperty* item = dynamic_cast<QListBoxRGProperty*> + //TQListBoxRGProperty* item = dynamic_cast<TQListBoxRGProperty*>(propList->selectedItem()); + TQListBoxRGProperty* item = dynamic_cast<TQListBoxRGProperty*> (propList->item(propList->currentItem())); if (item) { @@ -1484,7 +1484,7 @@ void EditView::slotTranspose() int dialogDefault = m_config->readNumEntry("lasttransposition", 0); bool ok = false; - int semitones = QInputDialog::getInteger + int semitones = TQInputDialog::getInteger (i18n("Transpose"), i18n("By number of semitones: "), dialogDefault, -127, 127, 1, &ok, this); @@ -1674,7 +1674,7 @@ ControlRuler* EditView::findRuler(const ControlParameter& controller, int &index PropertyControlRuler* EditView::makePropertyControlRuler(PropertyName propertyName) { - TQCanvas* controlRulerCanvas = new TQCanvas(this); + TQCanvas* controlRulerCanvas = new TQCanvas(TQT_TQOBJECT(this)); TQSize viewSize = getViewSize(); controlRulerCanvas->resize(viewSize.width(), ControlRuler::DefaultRulerHeight); // TODO - keep it in sync with main canvas size @@ -1692,7 +1692,7 @@ PropertyControlRuler* EditView::makePropertyControlRuler(PropertyName propertyNa ControllerEventsRuler* EditView::makeControllerEventRuler(const ControlParameter *controller) { - TQCanvas* controlRulerCanvas = new TQCanvas(this); + TQCanvas* controlRulerCanvas = new TQCanvas(TQT_TQOBJECT(this)); TQSize viewSize = getViewSize(); controlRulerCanvas->resize(viewSize.width(), ControlRuler::DefaultRulerHeight); // TODO - keep it in sync with main canvas size // TQCanvas* controlRulerCanvas = ControlRulerCanvasRepository::getCanvas(getCurrentSegment(), controller, diff --git a/src/gui/general/EditView.h b/src/gui/general/EditView.h index e927281..ecbfb6a 100644 --- a/src/gui/general/EditView.h +++ b/src/gui/general/EditView.h @@ -69,6 +69,7 @@ class ActiveItem; class EditView : public EditViewBase { Q_OBJECT + TQ_OBJECT public: @@ -81,7 +82,7 @@ public: EditView(RosegardenGUIDoc *doc, std::vector<Segment *> segments, unsigned int cols, - TQWidget *parent, + TQWidget *tqparent, const char *name = 0); virtual ~EditView(); @@ -140,7 +141,7 @@ public slots: * Called when a mouse press occurred on an active canvas item * * @see ActiveItem - * @see QCanvasItem#setActive + * @see TQCanvasItem#setActive */ virtual void slotActiveItemPressed(TQMouseEvent*, TQCanvasItem*); diff --git a/src/gui/general/EditViewBase.cpp b/src/gui/general/EditViewBase.cpp index 84bdef0..15852c8 100644 --- a/src/gui/general/EditViewBase.cpp +++ b/src/gui/general/EditViewBase.cpp @@ -77,8 +77,8 @@ const unsigned int EditViewBase::NbLayoutRows = 6; EditViewBase::EditViewBase(RosegardenGUIDoc *doc, std::vector<Segment *> segments, unsigned int cols, - TQWidget *parent, const char *name) : - KDockMainWindow(parent, name), + TQWidget *tqparent, const char *name) : + KDockMainWindow(tqparent, name), m_viewNumber( -1), m_viewLocalPropertyPrefix(makeViewLocalPropertyPrefix()), m_config(kapp->config()), @@ -158,33 +158,33 @@ void EditViewBase::setupActions(TQString rcFileName, bool haveClipboard) // Actions all edit views will have - KStdAction::showToolbar(this, TQT_SLOT(slotToggleToolBar()), + KStdAction::showToolbar(TQT_TQOBJECT(this), TQT_SLOT(slotToggleToolBar()), actionCollection(), "options_show_toolbar"); - KStdAction::showStatusbar(this, TQT_SLOT(slotToggleStatusBar()), + KStdAction::showStatusbar(TQT_TQOBJECT(this), TQT_SLOT(slotToggleStatusBar()), actionCollection(), "options_show_statusbar"); - KStdAction::preferences(this, + KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT(slotConfigure()), actionCollection()); - KStdAction::keyBindings(this, + KStdAction::keyBindings(TQT_TQOBJECT(this), TQT_SLOT(slotEditKeys()), actionCollection()); - KStdAction::configureToolbars(this, + KStdAction::configureToolbars(TQT_TQOBJECT(this), TQT_SLOT(slotEditToolbars()), actionCollection()); // File menu - KStdAction::save (this, TQT_SIGNAL(saveFile()), actionCollection()); - KStdAction::close(this, TQT_SLOT(slotCloseWindow()), actionCollection()); + KStdAction::save (TQT_TQOBJECT(this), TQT_SIGNAL(saveFile()), actionCollection()); + KStdAction::close(TQT_TQOBJECT(this), TQT_SLOT(slotCloseWindow()), actionCollection()); if (haveClipboard) { - KStdAction::cut (this, TQT_SLOT(slotEditCut()), actionCollection()); - KStdAction::copy (this, TQT_SLOT(slotEditCopy()), actionCollection()); - KStdAction::paste (this, TQT_SLOT(slotEditPaste()), actionCollection()); + KStdAction::cut (TQT_TQOBJECT(this), TQT_SLOT(slotEditCut()), actionCollection()); + KStdAction::copy (TQT_TQOBJECT(this), TQT_SLOT(slotEditCopy()), actionCollection()); + KStdAction::paste (TQT_TQOBJECT(this), TQT_SLOT(slotEditPaste()), actionCollection()); } new KToolBarPopupAction(i18n("Und&o"), @@ -203,33 +203,33 @@ void EditViewBase::setupActions(TQString rcFileName, bool haveClipboard) TQCanvasPixmap pixmap(pixmapDir + "/toolbar/matrix.png"); TQIconSet icon = TQIconSet(pixmap); - new KAction(i18n("Open in Matri&x Editor"), icon, 0, this, + new KAction(i18n("Open in Matri&x Editor"), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotOpenInMatrix()), actionCollection(), "open_in_matrix"); pixmap.load(pixmapDir + "/toolbar/matrix-percussion.png"); icon = TQIconSet(pixmap); - new KAction(i18n("Open in &Percussion Matrix Editor"), icon, 0, this, + new KAction(i18n("Open in &Percussion Matrix Editor"), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotOpenInPercussionMatrix()), actionCollection(), "open_in_percussion_matrix"); pixmap.load(pixmapDir + "/toolbar/notation.png"); icon = TQIconSet(pixmap); - new KAction(i18n("Open in &Notation Editor"), icon, 0, this, + new KAction(i18n("Open in &Notation Editor"), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotOpenInNotation()), actionCollection(), "open_in_notation"); pixmap.load(pixmapDir + "/toolbar/eventlist.png"); icon = TQIconSet(pixmap); - new KAction(i18n("Open in &Event List Editor"), icon, 0, this, + new KAction(i18n("Open in &Event List Editor"), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotOpenInEventList()), actionCollection(), "open_in_event_list"); - new KAction(i18n("Set Segment Start Time..."), 0, this, + new KAction(i18n("Set Segment Start Time..."), 0, TQT_TQOBJECT(this), TQT_SLOT(slotSetSegmentStartTime()), actionCollection(), "set_segment_start"); - new KAction(i18n("Set Segment Duration..."), 0, this, + new KAction(i18n("Set Segment Duration..."), 0, TQT_TQOBJECT(this), TQT_SLOT(slotSetSegmentDuration()), actionCollection(), "set_segment_duration"); @@ -311,7 +311,7 @@ EditViewBase::makeViewLocalPropertyPrefix() void EditViewBase::paintEvent(TQPaintEvent* e) { // It is possible for this function to be called re-entrantly, - // because a re-layout procedure may deliberately ask the event + // because a re-tqlayout procedure may deliberately ask the event // loop to process some more events so as to keep the GUI looking // responsive. If that happens, we remember the events that came // in in the middle of one paintEvent call and process their union @@ -362,7 +362,7 @@ void EditViewBase::paintEvent(TQPaintEvent* e) // // If we have more than one segment modified, we need to update // them all at once with the same time range, otherwise we can run - // into problems when the layout of one depends on the others. So + // into problems when the tqlayout of one depends on the others. So // we use updateStart/End to calculate a bounding range for all // modifications. @@ -374,12 +374,12 @@ void EditViewBase::paintEvent(TQPaintEvent* e) Segment* segment = m_segments[i]; unsigned int refreshStatusId = m_segmentsRefreshStatusIds[i]; - SegmentRefreshStatus &refreshStatus = - segment->getRefreshStatus(refreshStatusId); + SegmentRefreshtqStatus &refreshtqStatus = + segment->getRefreshtqStatus(refreshStatusId); - if (refreshStatus.needsRefresh() && isCompositionModified()) { + if (refreshtqStatus.needsRefresh() && isCompositionModified()) { - // if composition is also modified, relayout everything + // if composition is also modified, retqlayout everything refreshSegment(0); segmentsToUpdate = 0; break; @@ -392,10 +392,10 @@ void EditViewBase::paintEvent(TQPaintEvent* e) m_timeSigNotifier->reset(); break; - } else if (refreshStatus.needsRefresh()) { + } else if (refreshtqStatus.needsRefresh()) { - timeT startTime = refreshStatus.from(), - endTime = refreshStatus.to(); + timeT startTime = refreshtqStatus.from(), + endTime = refreshtqStatus.to(); if (segmentsToUpdate == 0 || startTime < updateStart) { updateStart = startTime; @@ -406,7 +406,7 @@ void EditViewBase::paintEvent(TQPaintEvent* e) singleSegment = segment; ++segmentsToUpdate; - refreshStatus.setNeedsRefresh(false); + refreshtqStatus.setNeedsRefresh(false); m_needUpdate = true; } } @@ -518,13 +518,13 @@ void EditViewBase::initSegmentRefreshStatusIds() bool EditViewBase::isCompositionModified() { - return getDocument()->getComposition().getRefreshStatus + return getDocument()->getComposition().getRefreshtqStatus (m_compositionRefreshStatusId).needsRefresh(); } void EditViewBase::setCompositionModified(bool c) { - getDocument()->getComposition().getRefreshStatus + getDocument()->getComposition().getRefreshtqStatus (m_compositionRefreshStatusId).setNeedsRefresh(c); } diff --git a/src/gui/general/EditViewBase.h b/src/gui/general/EditViewBase.h index f263795..9d18d3b 100644 --- a/src/gui/general/EditViewBase.h +++ b/src/gui/general/EditViewBase.h @@ -60,6 +60,7 @@ class EditViewBase : public KDockMainWindow { Q_OBJECT + TQ_OBJECT public: @@ -72,7 +73,7 @@ public: EditViewBase(RosegardenGUIDoc *doc, std::vector<Segment *> segments, unsigned int cols, - TQWidget *parent, + TQWidget *tqparent, const char *name = 0); virtual ~EditViewBase(); @@ -310,7 +311,7 @@ protected: protected slots: /** * save general Options like all bar positions and status as well - * as the geometry and the recent file list to the configuration + * as the tqgeometry and the recent file list to the configuration * file */ virtual void slotSaveOptions(); diff --git a/src/gui/general/GUIPalette.cpp b/src/gui/general/GUIPalette.cpp index a58886e..fec72ca 100644 --- a/src/gui/general/GUIPalette.cpp +++ b/src/gui/general/GUIPalette.cpp @@ -59,10 +59,10 @@ TQColor GUIPalette::convertColour(const Colour& input) GUIPalette::GUIPalette() { - m_defaultsMap[ActiveRecordTrack] = Qt::red; + m_defaultsMap[ActiveRecordTrack] = TQt::red; m_defaultsMap[SegmentCanvas] = TQColor(230, 230, 230); - m_defaultsMap[SegmentBorder] = Qt::black; + m_defaultsMap[SegmentBorder] = TQt::black; // 1.0 colors // m_defaultsMap[RecordingInternalSegmentBlock] = TQColor(255, 182, 193); @@ -74,22 +74,22 @@ GUIPalette::GUIPalette() // audio recording preview (pale red) m_defaultsMap[RecordingAudioSegmentBlock] = TQColor(255, 182, 193); - m_defaultsMap[RecordingSegmentBorder] = Qt::black; + m_defaultsMap[RecordingSegmentBorder] = TQt::black; m_defaultsMap[RepeatSegmentBorder] = TQColor(130, 133, 170); m_defaultsMap[SegmentAudioPreview] = TQColor(39, 71, 22); - m_defaultsMap[SegmentInternalPreview] = Qt::white; - m_defaultsMap[SegmentLabel] = Qt::black; - m_defaultsMap[SegmentSplitLine] = Qt::black; + m_defaultsMap[SegmentInternalPreview] = TQt::white; + m_defaultsMap[SegmentLabel] = TQt::black; + m_defaultsMap[SegmentSplitLine] = TQt::black; - m_defaultsMap[MatrixElementBorder] = Qt::black; + m_defaultsMap[MatrixElementBorder] = TQt::black; m_defaultsMap[MatrixElementBlock] = TQColor(98, 128, 232); - m_defaultsMap[MatrixOverlapBlock] = Qt::black; + m_defaultsMap[MatrixOverlapBlock] = TQt::black; m_defaultsMap[LoopRulerBackground] = TQColor(120, 120, 120); - m_defaultsMap[LoopRulerForeground] = Qt::white; - m_defaultsMap[LoopHighlight] = Qt::white; + m_defaultsMap[LoopRulerForeground] = TQt::white; + m_defaultsMap[LoopHighlight] = TQt::white; m_defaultsMap[TempoBase] = TQColor(197, 211, 125); @@ -97,13 +97,13 @@ GUIPalette::GUIPalette() // m_defaultsMap[TextRulerBackground] = TQColor(120, 90, 238, TQColor::Hsv); // m_defaultsMap[TextRulerBackground] = TQColor(210, 220, 140); m_defaultsMap[TextRulerBackground] = TQColor(226, 232, 187); - m_defaultsMap[TextRulerForeground] = Qt::white; + m_defaultsMap[TextRulerForeground] = TQt::white; m_defaultsMap[ChordNameRulerBackground] = TQColor(230, 230, 230); - m_defaultsMap[ChordNameRulerForeground] = Qt::black; + m_defaultsMap[ChordNameRulerForeground] = TQt::black; m_defaultsMap[RawNoteRulerBackground] = TQColor(240, 240, 240); - m_defaultsMap[RawNoteRulerForeground] = Qt::black; + m_defaultsMap[RawNoteRulerForeground] = TQt::black; m_defaultsMap[LevelMeterGreen] = TQColor(0, 200, 0); m_defaultsMap[LevelMeterOrange] = TQColor(255, 165, 0); @@ -116,14 +116,14 @@ GUIPalette::GUIPalette() // m_defaultsMap[LevelMeterSolidRed] = TQColor(255, 50, 50); m_defaultsMap[LevelMeterSolidRed] = TQColor(255, 0, 0); - m_defaultsMap[BarLine] = Qt::black; + m_defaultsMap[BarLine] = TQt::black; m_defaultsMap[BarLineIncorrect] = TQColor(211, 0, 31); m_defaultsMap[BeatLine] = TQColor(100, 100, 100); m_defaultsMap[SubBeatLine] = TQColor(212, 212, 212); m_defaultsMap[StaffConnectingLine] = TQColor(192, 192, 192); m_defaultsMap[StaffConnectingTerminatingLine] = TQColor(128, 128, 128); - m_defaultsMap[Pointer] = Qt::darkBlue; + m_defaultsMap[Pointer] = TQt::darkBlue; m_defaultsMap[PointerRuler] = TQColor(100, 100, 100); m_defaultsMap[InsertCursor] = TQColor(160, 104, 186); @@ -151,12 +151,12 @@ GUIPalette::GUIPalette() m_defaultsMap[TextLilyPondDirectiveBackground] = TQColor(95, 157, 87); - m_defaultsMap[AudioCountdownBackground] = Qt::darkGray; - m_defaultsMap[AudioCountdownForeground] = Qt::red; + m_defaultsMap[AudioCountdownBackground] = TQt::darkGray; + m_defaultsMap[AudioCountdownForeground] = TQt::red; -// m_defaultsMap[RotaryFloatBackground] = Qt::cyan; +// m_defaultsMap[RotaryFloatBackground] = TQt::cyan; m_defaultsMap[RotaryFloatBackground] = TQColor(182, 222, 255); - m_defaultsMap[RotaryFloatForeground] = Qt::black; + m_defaultsMap[RotaryFloatForeground] = TQt::black; m_defaultsMap[RotaryPastelBlue] = TQColor(205, 212, 255); m_defaultsMap[RotaryPastelRed] = TQColor(255, 168, 169); @@ -174,7 +174,7 @@ GUIPalette::GUIPalette() m_defaultsMap[MarkerBackground] = TQColor(185, 255, 248); - m_defaultsMap[QuickMarker] = Qt::red; + m_defaultsMap[QuickMarker] = TQt::red; // m_defaultsMap[MuteTrackLED] = TQColor(218, 190, 230, TQColor::Hsv); m_defaultsMap[MuteTrackLED] = TQColor(211, 194, 238, TQColor::Hsv); diff --git a/src/gui/general/LinedStaff.cpp b/src/gui/general/LinedStaff.cpp index 5a4fbb6..5ca0c90 100644 --- a/src/gui/general/LinedStaff.cpp +++ b/src/gui/general/LinedStaff.cpp @@ -436,15 +436,15 @@ LinedStaff::getHeightAtCanvasCoords(double x, int y) const } } -QRect +TQRect LinedStaff::getBarExtents(double x, int y) const { int row = getRowForCanvasCoords(x, y); for (int i = 1; i < m_barLines.size(); ++i) { - double layoutX = m_barLines[i]->getLayoutX(); - int barRow = getRowForLayoutX(layoutX); + double tqlayoutX = m_barLines[i]->getLayoutX(); + int barRow = getRowForLayoutX(tqlayoutX); if (m_pageMode != LinearMode && (barRow < row)) continue; @@ -572,7 +572,7 @@ LinedStaff::getCanvasXForLeftOfRow(int row) const } void -LinedStaff::sizeStaff(HorizontalLayoutEngine &layout) +LinedStaff::sizeStaff(HorizontalLayoutEngine &tqlayout) { Profiler profiler("LinedStaff::sizeStaff", true); @@ -582,19 +582,19 @@ LinedStaff::sizeStaff(HorizontalLayoutEngine &layout) // RG_DEBUG << "LinedStaff::sizeStaff" << endl; - int lastBar = layout.getLastVisibleBarOnStaff(*this); + int lastBar = tqlayout.getLastVisibleBarOnStaff(*this); double xleft = 0, xright = 0; bool haveXLeft = false; - xright = layout.getBarPosition(lastBar) - 1; + xright = tqlayout.getBarPosition(lastBar) - 1; TimeSignature currentTimeSignature; - for (int barNo = layout.getFirstVisibleBarOnStaff(*this); + for (int barNo = tqlayout.getFirstVisibleBarOnStaff(*this); barNo <= lastBar; ++barNo) { - double x = layout.getBarPosition(barNo); + double x = tqlayout.getBarPosition(barNo); if (!haveXLeft) { xleft = x; @@ -603,7 +603,7 @@ LinedStaff::sizeStaff(HorizontalLayoutEngine &layout) double timeSigX = 0; TimeSignature timeSig; - bool isNew = layout.getTimeSignaturePosition(*this, barNo, timeSig, timeSigX); + bool isNew = tqlayout.getTimeSignaturePosition(*this, barNo, timeSig, timeSigX); if (isNew && barNo < lastBar) { currentTimeSignature = timeSig; @@ -619,8 +619,8 @@ LinedStaff::sizeStaff(HorizontalLayoutEngine &layout) insertBar(x, ((barNo == lastBar) ? 0 : - (layout.getBarPosition(barNo + 1) - x)), - layout.isBarCorrectOnStaff(*this, barNo - 1), + (tqlayout.getBarPosition(barNo + 1) - x)), + tqlayout.isBarCorrectOnStaff(*this, barNo - 1), currentTimeSignature, barNo, showBarNo); @@ -667,41 +667,41 @@ LinedStaff::deleteBars() } void -LinedStaff::insertBar(double layoutX, double width, bool isCorrect, +LinedStaff::insertBar(double tqlayoutX, double width, bool isCorrect, const TimeSignature &timeSig, int barNo, bool showBarNo) { - // RG_DEBUG << "insertBar: " << layoutX << ", " << width + // RG_DEBUG << "insertBar: " << tqlayoutX << ", " << width // << ", " << isCorrect << endl; int barThickness = m_lineThickness * 5 / 4; // hack to ensure the bar line appears on the correct row in - // notation page layouts, with a conditional to prevent us from + // notation page tqlayouts, with a conditional to prevent us from // moving the bar and beat lines in the matrix if (!showBeatLines()) { if (width > 0.01) { // not final bar in staff - layoutX += 1; + tqlayoutX += 1; } else { - layoutX -= 1; + tqlayoutX -= 1; } } - int row = getRowForLayoutX(layoutX); - double x = getCanvasXForLayoutX(layoutX); + int row = getRowForLayoutX(tqlayoutX); + double x = getCanvasXForLayoutX(tqlayoutX); int y = getCanvasYForTopLine(row); bool firstBarInRow = false, lastBarInRow = false; if (m_pageMode != LinearMode && - (getRowForLayoutX(layoutX) > - getRowForLayoutX(layoutX - getMargin() - 2))) + (getRowForLayoutX(tqlayoutX) > + getRowForLayoutX(tqlayoutX - getMargin() - 2))) firstBarInRow = true; if (m_pageMode != LinearMode && width > 0.01 && // width == 0 for final bar in staff - (getRowForLayoutX(layoutX) < - getRowForLayoutX(layoutX + width + getMargin() + 2))) + (getRowForLayoutX(tqlayoutX) < + getRowForLayoutX(tqlayoutX + width + getMargin() + 2))) lastBarInRow = true; BarStyle style = getBarStyle(barNo); @@ -710,7 +710,7 @@ LinedStaff::insertBar(double layoutX, double width, bool isCorrect, style = RepeatStartBar; if (firstBarInRow) - insertRepeatedClefAndKey(layoutX, barNo); + insertRepeatedClefAndKey(tqlayoutX, barNo); // If we're supposed to be hiding bar lines, we do just that -- // create them as normal, then hide them. We can't simply not @@ -725,7 +725,7 @@ LinedStaff::insertBar(double layoutX, double width, bool isCorrect, inset = getBarInset(barNo, firstBarInRow); } - BarLine *line = new BarLine(m_canvas, layoutX, + BarLine *line = new BarLine(m_canvas, tqlayoutX, getBarLineHeight(), barThickness, getLineSpacing(), (int)inset, style); @@ -745,7 +745,7 @@ LinedStaff::insertBar(double layoutX, double width, bool isCorrect, else line->show(); - // The bar lines have to be in order of layout-x (there's no + // The bar lines have to be in order of tqlayout-x (there's no // such interesting stipulation for beat or connecting lines) BarLineList::iterator insertPoint = lower_bound (m_barLines.begin(), m_barLines.end(), line, compareBars); @@ -758,7 +758,7 @@ LinedStaff::insertBar(double layoutX, double width, bool isCorrect, if (style == RepeatBothBar) style = RepeatEndBar; - BarLine *eline = new BarLine(m_canvas, layoutX, + BarLine *eline = new BarLine(m_canvas, tqlayoutX, getBarLineHeight(), barThickness, getLineSpacing(), 0, style); eline->moveBy(xe, y); @@ -782,7 +782,7 @@ LinedStaff::insertBar(double layoutX, double width, bool isCorrect, TQFont font; font.setPixelSize(m_resolution * 3 / 2); TQFontMetrics metrics(font); - TQString text = TQString("%1").arg(barNo + 1); + TQString text = TQString("%1").tqarg(barNo + 1); TQCanvasItem *barNoText = new TQCanvasText(text, font, m_canvas); barNoText->setX(x); @@ -814,7 +814,7 @@ LinedStaff::insertBar(double layoutX, double width, bool isCorrect, for (int gridLine = hidden ? 0 : 1; gridLine < gridLines; ++gridLine) { - rect = new QCanvasRectangle + rect = new TQCanvasRectangle (0, 0, barThickness, getBarLineHeight(), m_canvas); rect->moveBy(x + gridLine * dx, y); @@ -834,14 +834,14 @@ LinedStaff::insertBar(double layoutX, double width, bool isCorrect, rect->setZ( -1); rect->show(); // show beat lines even if the bar lines are hidden - LineRec beatLine(layoutX + gridLine * dx, rect); + LineRec beatLine(tqlayoutX + gridLine * dx, rect); m_beatLines.push_back(beatLine); } } if (m_connectingLineLength > 0) { - rect = new QCanvasRectangle + rect = new TQCanvasRectangle (0, 0, barThickness, m_connectingLineLength, m_canvas); rect->moveBy(x, y); @@ -854,7 +854,7 @@ LinedStaff::insertBar(double layoutX, double width, bool isCorrect, else rect->show(); - LineRec connectingLine(layoutX, rect); + LineRec connectingLine(tqlayoutX, rect); m_barConnectingLines.push_back(connectingLine); } } @@ -1009,7 +1009,7 @@ LinedStaff::resizeStaffLineRow(int row, double x, double length) // rather arbitrary (dup in insertBar) int barThickness = m_resolution / 12 + 1; y = getCanvasYForTopLine(row); - TQCanvasRectangle *line = new QCanvasRectangle + TQCanvasRectangle *line = new TQCanvasRectangle (int(x + length), y, barThickness, m_connectingLineLength, m_canvas); line->setPen(GUIPalette::getColour(GUIPalette::StaffConnectingTerminatingLine)); line->setBrush(GUIPalette::getColour(GUIPalette::StaffConnectingTerminatingLine)); @@ -1046,7 +1046,7 @@ LinedStaff::resizeStaffLineRow(int row, double x, double length) m_staffLines[row][lineIndex] = 0; if (m_lineThickness > 1) { - TQCanvasRectangle *rline = new QCanvasRectangle + TQCanvasRectangle *rline = new TQCanvasRectangle (int(x), y, int(length), m_lineThickness, m_canvas); rline->setPen(lineColour); rline->setBrush(lineColour); @@ -1110,10 +1110,10 @@ LinedStaff::getLayoutXOfInsertCursor() const } timeT -LinedStaff::getInsertCursorTime(HorizontalLayoutEngine &layout) const +LinedStaff::getInsertCursorTime(HorizontalLayoutEngine &tqlayout) const { if (m_insertCursorTimeValid) return m_insertCursorTime; - return layout.getTimeForX(getLayoutXOfInsertCursor()); + return tqlayout.getTimeForX(getLayoutXOfInsertCursor()); } void @@ -1141,16 +1141,16 @@ LinedStaff::setPointerPosition(double canvasX, int canvasY) } void -LinedStaff::setPointerPosition(HorizontalLayoutEngine &layout, +LinedStaff::setPointerPosition(HorizontalLayoutEngine &tqlayout, timeT time) { - setPointerPosition(layout.getXForTime(time)); + setPointerPosition(tqlayout.getXForTime(time)); } void -LinedStaff::setPointerPosition(double layoutX) +LinedStaff::setPointerPosition(double tqlayoutX) { - LinedStaffCoords coords = getCanvasCoordsForLayoutCoords(layoutX, 0); + LinedStaffCoords coords = getCanvasCoordsForLayoutCoords(tqlayoutX, 0); setPointerPosition(coords.first, coords.second); } @@ -1176,10 +1176,10 @@ LinedStaff::setInsertCursorPosition(double canvasX, int canvasY) } void -LinedStaff::setInsertCursorPosition(HorizontalLayoutEngine &layout, +LinedStaff::setInsertCursorPosition(HorizontalLayoutEngine &tqlayout, timeT time) { - double x = layout.getXForTime(time); + double x = tqlayout.getXForTime(time); LinedStaffCoords coords = getCanvasCoordsForLayoutCoords(x, 0); setInsertCursorPosition(coords.first, coords.second); m_insertCursorTime = time; diff --git a/src/gui/general/LinedStaff.h b/src/gui/general/LinedStaff.h index 359becf..e7dab8f 100644 --- a/src/gui/general/LinedStaff.h +++ b/src/gui/general/LinedStaff.h @@ -87,7 +87,7 @@ public: protected: /** * Create a new LinedStaff for the given Segment, with a - * linear layout. + * linear tqlayout. * * \a id is an arbitrary id for the staff in its view, * not used within the LinedStaff implementation but @@ -104,7 +104,7 @@ protected: /** * Create a new LinedStaff for the given Segment, with a - * page layout. + * page tqlayout. * * \a id is an arbitrary id for the staff in its view, * not used within the LinedStaff implementation but @@ -117,7 +117,7 @@ protected: * staff line should be * * \a pageWidth is the width of a page, to determine - * when to break lines for page layout + * when to break lines for page tqlayout * * \a rowsPerPage is the number of rows to a page, or zero * for a single continuous page @@ -131,7 +131,7 @@ protected: /** * Create a new LinedStaff for the given Segment, with - * either page or linear layout. + * either page or linear tqlayout. */ LinedStaff(TQCanvas *, Segment *, SnapGrid *, int id, int resolution, int lineThickness, PageMode pageMode, @@ -304,14 +304,14 @@ public: virtual int getTitleHeight() const; /** - * Returns the width of the entire staff after layout. Call + * Returns the width of the entire staff after tqlayout. Call * this only after you've done the full sizeStaff/positionElements * procedure. */ virtual double getTotalWidth() const; /** - * Returns the height of the entire staff after layout. Call + * Returns the height of the entire staff after tqlayout. Call * this only after you've done the full sizeStaff/positionElements * procedure. If there are multiple rows, this will be the * height of all rows, including any space between rows that @@ -383,26 +383,26 @@ public: virtual void setCurrent(bool current); /** - * Move the playback pointer to the layout-X coordinate + * Move the playback pointer to the tqlayout-X coordinate * corresponding to the given time, and show it. */ virtual void setPointerPosition (HorizontalLayoutEngine&, timeT); /** - * Move the playback pointer to the layout-X coordinate + * Move the playback pointer to the tqlayout-X coordinate * corresponding to the given canvas coordinates, and show it. */ virtual void setPointerPosition(double x, int y); /** - * Move the playback pointer to the given layout-X + * Move the playback pointer to the given tqlayout-X * coordinate, and show it. */ virtual void setPointerPosition(double x); /** - * Returns the layout-X coordinate corresponding to the current + * Returns the tqlayout-X coordinate corresponding to the current * position of the playback pointer. */ virtual double getLayoutXOfPointer() const; @@ -419,19 +419,19 @@ public: virtual void hidePointer(); /** - * Move the insertion cursor to the layout-X coordinate + * Move the insertion cursor to the tqlayout-X coordinate * corresponding to the given time, and show it. */ virtual void setInsertCursorPosition(HorizontalLayoutEngine&, timeT); /** - * Move the insertion cursor to the layout-X coordinate + * Move the insertion cursor to the tqlayout-X coordinate * corresponding to the given canvas coordinates, and show it. */ virtual void setInsertCursorPosition(double x, int y); /** - * Returns the layout-X coordinate corresponding to the current + * Returns the tqlayout-X coordinate corresponding to the current * position of the insertion cursor. Returns -1 if this staff * is not current or there is some other problem. */ @@ -454,8 +454,8 @@ public: virtual void hideInsertCursor(); /** - * Query the given horizontal layout object (which is assumed to - * have just completed its layout procedure) to determine the + * Query the given horizontal tqlayout object (which is assumed to + * have just completed its tqlayout procedure) to determine the * required extents of the staff and the positions of the bars, * and create the bars and staff lines accordingly. It may be * called either before or after renderElements and/or @@ -464,7 +464,7 @@ public: * No bars or staff lines will appear unless this method has * been called. */ - virtual void sizeStaff(HorizontalLayoutEngine& layout); + virtual void sizeStaff(HorizontalLayoutEngine& tqlayout); /** * Generate or re-generate sprites for all the elements between @@ -486,9 +486,9 @@ public: /** * Assign suitable coordinates to the elements on the staff - * between the start and end times, based entirely on the layout + * between the start and end times, based entirely on the tqlayout * X and Y coordinates they were given by the horizontal and - * vertical layout processes. + * vertical tqlayout processes. * * The implementation is free to render any elements it * chooses in this method as well. @@ -519,21 +519,21 @@ public: * Also return the clef and key in force at these coordinates. * * The default implementation should suit for subclasses that only - * show a single element per layout X coordinate. + * show a single element per tqlayout X coordinate. */ virtual ViewElementList::iterator getClosestElementToCanvasCoords (double x, int y, Event *&clef, Event *&key, bool notesAndRestsOnly = false, int proximityThreshold = 10) { - LinedStaffCoords layoutCoords = getLayoutCoordsForCanvasCoords(x, y); + LinedStaffCoords tqlayoutCoords = getLayoutCoordsForCanvasCoords(x, y); return getClosestElementToLayoutX - (layoutCoords.first, clef, key, + (tqlayoutCoords.first, clef, key, notesAndRestsOnly, proximityThreshold); } /** * Return an iterator pointing to the nearest view element to the - * given layout x-coordinate. + * given tqlayout x-coordinate. * * If notesAndRestsOnly is true, do not return any view element * other than a note or rest. @@ -564,12 +564,12 @@ public: * * * The default implementation should suit for subclasses that only - * show a single element per layout X coordinate. + * show a single element per tqlayout X coordinate. */ virtual ViewElementList::iterator getElementUnderCanvasCoords (double x, int y, Event *&clef, Event *&key) { - LinedStaffCoords layoutCoords = getLayoutCoordsForCanvasCoords(x, y); - return getElementUnderLayoutX(layoutCoords.first, clef, key); + LinedStaffCoords tqlayoutCoords = getLayoutCoordsForCanvasCoords(x, y); + return getElementUnderLayoutX(tqlayoutCoords.first, clef, key); } /** @@ -627,13 +627,13 @@ public: protected: // Methods that the subclass may (indeed, should) use to convert - // between the layout coordinates of elements and their canvas + // between the tqlayout coordinates of elements and their canvas // coordinates. These are deliberately not virtual. - // Note that even linear-layout staffs have multiple rows; their + // Note that even linear-tqlayout staffs have multiple rows; their // rows all have the same y coordinate but increasing x // coordinates, instead of the other way around. (The only reason - // for this is that it seems to be more efficient from the QCanvas + // for this is that it seems to be more efficient from the TQCanvas // perspective to create and manipulate many relatively short // canvas lines rather than a smaller number of very long ones.) @@ -682,7 +682,7 @@ protected: // signatures, override the deleteTimeSignatures and // insertTimeSignature methods. For repeated clefs and keys at // the start of each row, override deleteRepeatedClefsAndKeys - // and insertRepeatedClefAndKey, but note that your layout class + // and insertRepeatedClefAndKey, but note that your tqlayout class // will need to allot the space for them separately. virtual void resizeStaffLines(); @@ -690,18 +690,18 @@ protected: virtual void resizeStaffLineRow(int row, double offset, double length); virtual void deleteBars(); - virtual void insertBar(double layoutX, double width, bool isCorrect, + virtual void insertBar(double tqlayoutX, double width, bool isCorrect, const TimeSignature &, int barNo, bool showBarNo); // The default implementations of the following two are empty. virtual void deleteTimeSignatures(); - virtual void insertTimeSignature(double layoutX, + virtual void insertTimeSignature(double tqlayoutX, const TimeSignature &); // The default implementations of the following two are empty. virtual void deleteRepeatedClefsAndKeys(); - virtual void insertRepeatedClefAndKey(double layoutX, int barNo); + virtual void insertRepeatedClefAndKey(double tqlayoutX, int barNo); void initCursors(); @@ -737,7 +737,7 @@ protected: ItemMatrix m_staffLines; ItemList m_staffConnectingLines; - typedef std::pair<double, TQCanvasItem *> LineRec; // layout-x, line + typedef std::pair<double, TQCanvasItem *> LineRec; // tqlayout-x, line typedef FastVector<LineRec> LineRecList; typedef FastVector<BarLine *> BarLineList;//!!! should be multiset I reckon static bool compareBars(const BarLine *, const BarLine *); diff --git a/src/gui/general/MidiPitchLabel.cpp b/src/gui/general/MidiPitchLabel.cpp index f2d714d..a103234 100644 --- a/src/gui/general/MidiPitchLabel.cpp +++ b/src/gui/general/MidiPitchLabel.cpp @@ -55,7 +55,7 @@ MidiPitchLabel::MidiPitchLabel(int pitch) int baseOctave = config->readNumEntry("midipitchoctave", -2); int octave = (int)(((float)pitch) / 12.0) + baseOctave; - m_midiNote = notes[pitch % 12].arg(octave); + m_midiNote = notes[pitch % 12].tqarg(octave); } } @@ -65,8 +65,8 @@ MidiPitchLabel::getString() const return std::string(m_midiNote.utf8().data()); } -QString -MidiPitchLabel::getQString() const +TQString +MidiPitchLabel::getTQString() const { return m_midiNote; } diff --git a/src/gui/general/MidiPitchLabel.h b/src/gui/general/MidiPitchLabel.h index 4bc5253..b5fe4c8 100644 --- a/src/gui/general/MidiPitchLabel.h +++ b/src/gui/general/MidiPitchLabel.h @@ -43,7 +43,7 @@ public: MidiPitchLabel(int pitch); std::string getString() const; - TQString getQString() const; + TQString getTQString() const; private: TQString m_midiNote; diff --git a/src/gui/general/PixmapFunctions.cpp b/src/gui/general/PixmapFunctions.cpp index f61ff11..50dff1a 100644 --- a/src/gui/general/PixmapFunctions.cpp +++ b/src/gui/general/PixmapFunctions.cpp @@ -36,8 +36,8 @@ namespace Rosegarden { -QBitmap -PixmapFunctions::generateMask(const TQPixmap &map, const QRgb &px) +TQBitmap +PixmapFunctions::generateMask(const TQPixmap &map, const TQRgb &px) { TQImage i(map.convertToImage()); TQImage im(i.width(), i.height(), 1, 2, TQImage::LittleEndian); @@ -57,18 +57,18 @@ PixmapFunctions::generateMask(const TQPixmap &map, const QRgb &px) return m; } -QBitmap +TQBitmap PixmapFunctions::generateMask(const TQPixmap &map) { TQImage i(map.convertToImage()); TQImage im(i.width(), i.height(), 1, 2, TQImage::LittleEndian); - QRgb px0(i.pixel(0, 0)); - QRgb px1(i.pixel(i.width() - 1, 0)); - QRgb px2(i.pixel(i.width() - 1, i.height() - 1)); - QRgb px3(i.pixel(0, i.height() - 1)); + TQRgb px0(i.pixel(0, 0)); + TQRgb px1(i.pixel(i.width() - 1, 0)); + TQRgb px2(i.pixel(i.width() - 1, i.height() - 1)); + TQRgb px3(i.pixel(0, i.height() - 1)); - QRgb px(px0); + TQRgb px(px0); if (px0 != px2 && px1 == px3) px = px1; @@ -87,7 +87,7 @@ PixmapFunctions::generateMask(const TQPixmap &map) return m; } -QPixmap +TQPixmap PixmapFunctions::colourPixmap(const TQPixmap &map, int hue, int minValue) { // assumes pixmap is currently in shades of grey; maps black -> @@ -132,7 +132,7 @@ PixmapFunctions::colourPixmap(const TQPixmap &map, int hue, int minValue) return rmap; } -QPixmap +TQPixmap PixmapFunctions::shadePixmap(const TQPixmap &map) { TQImage image = map.convertToImage(); @@ -161,7 +161,7 @@ PixmapFunctions::shadePixmap(const TQPixmap &map) return rmap; } -QPixmap +TQPixmap PixmapFunctions::flipVertical(const TQPixmap &map) { TQPixmap rmap; @@ -178,7 +178,7 @@ PixmapFunctions::flipVertical(const TQPixmap &map) return rmap; } -QPixmap +TQPixmap PixmapFunctions::flipHorizontal(const TQPixmap &map) { TQPixmap rmap; @@ -249,7 +249,7 @@ PixmapFunctions::drawPixmapMasked(TQPixmap &dest, TQBitmap &destMask, if (ism.depth() == 1 && ism.pixel(x, y) == 0) continue; - if (ism.pixel(x, y) == Qt::white.rgb()) + if (ism.pixel(x, y) == TQt::white.rgb()) continue; int x1 = x + x0; diff --git a/src/gui/general/PixmapFunctions.h b/src/gui/general/PixmapFunctions.h index ea05693..22b743b 100644 --- a/src/gui/general/PixmapFunctions.h +++ b/src/gui/general/PixmapFunctions.h @@ -40,9 +40,9 @@ class PixmapFunctions { public: /** - * Generate a heuristic mask for the given pixmap. Unlike - * TQPixmap::createHeuristicMask, this removes from the mask all - * pixels that are apparently "background" even if they appear in + * Generate a heuristic tqmask for the given pixmap. Unlike + * TQPixmap::createHeuristicMask, this removes from the tqmask all + * pixels that are aptqparently "background" even if they appear in * holes in the middle of the image. This is more usually what we * want than the default behaviour of createHeuristicMask. * @@ -50,12 +50,12 @@ public: * * This function is slow. */ - static TQBitmap generateMask(const TQPixmap &map, const QRgb &rgb); + static TQBitmap generateMask(const TQPixmap &map, const TQRgb &rgb); /** - * Generate a heuristic mask for the given pixmap. Unlike - * TQPixmap::createHeuristicMask, this removes from the mask all - * pixels that are apparently "background" even if they appear in + * Generate a heuristic tqmask for the given pixmap. Unlike + * TQPixmap::createHeuristicMask, this removes from the tqmask all + * pixels that are aptqparently "background" even if they appear in * holes in the middle of the image. This is more usually what we * want than the default behaviour of createHeuristicMask. * @@ -78,23 +78,23 @@ public: */ static TQPixmap shadePixmap(const TQPixmap &map); - /// Return a TQPixmap that is a mirror image of map (including mask) + /// Return a TQPixmap that is a mirror image of map (including tqmask) static TQPixmap flipVertical(const TQPixmap &map); - /// Return a TQPixmap that is a mirror image of map (including mask) + /// Return a TQPixmap that is a mirror image of map (including tqmask) static TQPixmap flipHorizontal(const TQPixmap &map); - /// Return left and right parts of the QPixmap + /// Return left and right parts of the TQPixmap static std::pair<TQPixmap, TQPixmap> splitPixmap(const TQPixmap &original, int x); /** * Using TQPainter::drawPixmap to draw one pixmap on another does - * not appear to take the mask into account properly. Background + * not appear to take the tqmask into account properly. Background * pixels in the second pixmap erase foreground pixels in the - * first one, regardless of whether they're masked or not. This + * first one, regardless of whether they're tqmasked or not. This * function does what I expect. * - * Note that the source pixmap _must_ have a mask. + * Note that the source pixmap _must_ have a tqmask. */ static void drawPixmapMasked(TQPixmap &dest, TQBitmap &destMask, int x, int y, diff --git a/src/gui/general/PresetGroup.cpp b/src/gui/general/PresetGroup.cpp index bd5974f..050c487 100644 --- a/src/gui/general/PresetGroup.cpp +++ b/src/gui/general/PresetGroup.cpp @@ -70,22 +70,22 @@ PresetGroup::PresetGroup() : TQString language = KGlobal::locale()->language(); TQString presetFileName = TQString("%1/presets-%2.xml") - .arg(m_presetDirectory).arg(language); + .tqarg(m_presetDirectory).tqarg(language); if (!TQFileInfo(presetFileName).isReadable()) { RG_DEBUG << "Failed to open " << presetFileName << endl; - language.replace(TQRegExp("_.*$"), ""); + language.tqreplace(TQRegExp("_.*$"), ""); presetFileName = TQString("%1/presets-%2.xml") - .arg(m_presetDirectory).arg(language); + .tqarg(m_presetDirectory).tqarg(language); if (!TQFileInfo(presetFileName).isReadable()) { RG_DEBUG << "Failed to open " << presetFileName << endl; presetFileName = TQString("%1/presets.xml") - .arg(m_presetDirectory); + .tqarg(m_presetDirectory); if (!TQFileInfo(presetFileName).isReadable()) { @@ -247,10 +247,10 @@ PresetGroup::error(const TQXmlParseException& exception) RG_DEBUG << "PresetGroup::error(): jubilation and glee, we have an error, whee!" << endl; m_errorString = TQString("%1 at line %2, column %3: %4") - .arg(exception.message()) - .arg(exception.lineNumber()) - .arg(exception.columnNumber()) - .arg(m_errorString); + .tqarg(exception.message()) + .tqarg(exception.lineNumber()) + .tqarg(exception.columnNumber()) + .tqarg(m_errorString); return TQXmlDefaultHandler::error(exception); } @@ -259,10 +259,10 @@ PresetGroup::fatalError(const TQXmlParseException& exception) { RG_DEBUG << "PresetGroup::fatalError(): double your jubilation, and triple your glee, a fatal error doth it be!" << endl; m_errorString = TQString("%1 at line %2, column %3: %4") - .arg(exception.message()) - .arg(exception.lineNumber()) - .arg(exception.columnNumber()) - .arg(m_errorString); + .tqarg(exception.message()) + .tqarg(exception.lineNumber()) + .tqarg(exception.columnNumber()) + .tqarg(m_errorString); return TQXmlDefaultHandler::fatalError(exception); } diff --git a/src/gui/general/PresetGroup.h b/src/gui/general/PresetGroup.h index 5397838..03298b2 100644 --- a/src/gui/general/PresetGroup.h +++ b/src/gui/general/PresetGroup.h @@ -46,7 +46,7 @@ namespace Rosegarden * Read presets.xml from disk and store a collection of PresetElement objects * which can then be used to populate and run the chooser GUI */ -class PresetGroup : public QXmlDefaultHandler +class PresetGroup : public TQXmlDefaultHandler { public: typedef Exception PresetFileReadFailed; diff --git a/src/gui/general/PresetHandlerDialog.cpp b/src/gui/general/PresetHandlerDialog.cpp index 383a2b6..a4144f0 100644 --- a/src/gui/general/PresetHandlerDialog.cpp +++ b/src/gui/general/PresetHandlerDialog.cpp @@ -52,8 +52,8 @@ namespace Rosegarden { -PresetHandlerDialog::PresetHandlerDialog(TQWidget *parent, bool fromNotation) - : KDialogBase(parent, "presethandlerdialog", true, i18n("Load track parameters preset"), Ok | Cancel, Ok), +PresetHandlerDialog::PresetHandlerDialog(TQWidget *tqparent, bool fromNotation) + : KDialogBase(tqparent, "presethandlerdialog", true, i18n("Load track parameters preset"), Ok | Cancel, Ok), m_config(kapp->config()), m_fromNotation(fromNotation) { @@ -81,7 +81,7 @@ PresetHandlerDialog::initDialog() TQFrame *frame = new TQFrame(vBox); - TQGridLayout *layout = new TQGridLayout(frame, 6, 5, 10, 5); + TQGridLayout *tqlayout = new TQGridLayout(frame, 6, 5, 10, 5); TQLabel *title = new TQLabel(i18n("Select preset track parameters for:"), frame); if (m_fromNotation) title->setText(i18n("Create appropriate notation for:")); @@ -97,8 +97,8 @@ PresetHandlerDialog::initDialog() m_playerCombo->insertItem(i18n("Amateur")); m_playerCombo->insertItem(i18n("Professional")); - TQGroupBox *scopeBox = new QButtonGroup - (1, Horizontal, i18n("Scope"), frame); + TQGroupBox *scopeBox = new TQButtonGroup + (1, Qt::Horizontal, i18n("Scope"), frame); if (m_fromNotation) { TQRadioButton *onlySelectedSegments = new TQRadioButton(i18n("Only selected segments"), scopeBox); @@ -114,14 +114,14 @@ PresetHandlerDialog::initDialog() onlyNewSegments->setChecked(true); } - layout->addMultiCellWidget(title, 0, 0, 0, 1, AlignLeft); - layout->addWidget(catlabel, 1, 0, AlignRight); - layout->addWidget(m_categoryCombo, 1, 1); - layout->addWidget(inslabel, 2, 0, AlignRight); - layout->addWidget(m_instrumentCombo, 2, 1); - layout->addWidget(plylabel, 3, 0, AlignRight); - layout->addWidget(m_playerCombo, 3, 1); - layout->addMultiCellWidget(scopeBox, 4, 4, 0, 1, AlignLeft); + tqlayout->addMultiCellWidget(title, 0, 0, 0, 1, AlignLeft); + tqlayout->addWidget(catlabel, 1, 0, AlignRight); + tqlayout->addWidget(m_categoryCombo, 1, 1); + tqlayout->addWidget(inslabel, 2, 0, AlignRight); + tqlayout->addWidget(m_instrumentCombo, 2, 1); + tqlayout->addWidget(plylabel, 3, 0, AlignRight); + tqlayout->addWidget(m_playerCombo, 3, 1); + tqlayout->addMultiCellWidget(scopeBox, 4, 4, 0, 1, AlignLeft); populateCategoryCombo(); // try to set to same category used previously @@ -151,7 +151,7 @@ PresetHandlerDialog::initDialog() TQT_SLOT(slotCategoryIndexChanged(int))); } -QString +TQString PresetHandlerDialog::getName() { return m_instrumentCombo->currentText(); diff --git a/src/gui/general/PresetHandlerDialog.h b/src/gui/general/PresetHandlerDialog.h index c91d733..c28e85a 100644 --- a/src/gui/general/PresetHandlerDialog.h +++ b/src/gui/general/PresetHandlerDialog.h @@ -48,10 +48,11 @@ class PresetGroup; class PresetHandlerDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - PresetHandlerDialog(TQWidget* parent, bool fromNotation = false); + PresetHandlerDialog(TQWidget* tqparent, bool fromNotation = false); ~PresetHandlerDialog(); PresetGroup *m_presets; diff --git a/src/gui/general/ProgressReporter.cpp b/src/gui/general/ProgressReporter.cpp index 3fdfacc..94fbb40 100644 --- a/src/gui/general/ProgressReporter.cpp +++ b/src/gui/general/ProgressReporter.cpp @@ -31,8 +31,8 @@ namespace Rosegarden { -ProgressReporter::ProgressReporter(TQObject* parent, const char* name) - : TQObject(parent, name), m_isCancelled(false) +ProgressReporter::ProgressReporter(TQObject* tqparent, const char* name) + : TQObject(tqparent, name), m_isCancelled(false) {} diff --git a/src/gui/general/ProgressReporter.h b/src/gui/general/ProgressReporter.h index 3e87ba0..7039e92 100644 --- a/src/gui/general/ProgressReporter.h +++ b/src/gui/general/ProgressReporter.h @@ -36,24 +36,25 @@ namespace Rosegarden -class ProgressReporter : public QObject +class ProgressReporter : public TQObject { Q_OBJECT + TQ_OBJECT public: - ProgressReporter(TQObject* parent, const char* name = 0); + ProgressReporter(TQObject* tqparent, const char* name = 0); // exception class for cancellations class Cancelled { }; protected: /** - * Call this at appropriate times if you know Qt isn't in the stack + * Call this at appropriate times if you know TQt isn't in the stack */ void throwIfCancelled(); /* We have to use these accessors rather than throwing directly - from slotCancel() because Qt is generally compiled without + from slotCancel() because TQt is generally compiled without exception support, so we can't throw from a slot. */ bool isOperationCancelled() const { return m_isCancelled; } diff --git a/src/gui/general/RosegardenCanvasView.cpp b/src/gui/general/RosegardenCanvasView.cpp index 4893147..0798140 100644 --- a/src/gui/general/RosegardenCanvasView.cpp +++ b/src/gui/general/RosegardenCanvasView.cpp @@ -42,9 +42,9 @@ namespace Rosegarden { RosegardenCanvasView::RosegardenCanvasView(TQCanvas* canvas, - TQWidget* parent, + TQWidget* tqparent, const char* name, WFlags f) - : TQCanvasView(canvas, parent, name, f), + : TQCanvasView(canvas, tqparent, name, f), m_bottomWidget(0), m_currentBottomWidgetHeight( -1), m_leftWidget(0), @@ -84,10 +84,10 @@ void RosegardenCanvasView::setBottomFixedWidget(TQWidget* w) { m_bottomWidget = w; if (m_bottomWidget) { - int lww = m_leftWidget ? m_leftWidget->sizeHint().width() : 0; + int lww = m_leftWidget ? m_leftWidget->tqsizeHint().width() : 0; m_bottomWidget->reparent(this, 0, TQPoint(0, 0)); - m_bottomWidget->setSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed)); - setMargins(lww, 0, 0, m_bottomWidget->sizeHint().height()); + m_bottomWidget->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed)); + setMargins(lww, 0, 0, m_bottomWidget->tqsizeHint().height()); } } @@ -399,7 +399,7 @@ void RosegardenCanvasView::updateBottomWidgetGeometry() if (!m_bottomWidget) return ; - int bottomWidgetHeight = m_bottomWidget->sizeHint().height(); + int bottomWidgetHeight = m_bottomWidget->tqsizeHint().height(); int leftWidgetWidth = 0; if (m_leftWidget && m_leftWidget->isVisible()) { @@ -447,10 +447,10 @@ void RosegardenCanvasView::setLeftFixedWidget(TQWidget* w) { m_leftWidget = w; if (m_leftWidget) { - int bwh = m_bottomWidget ? m_bottomWidget->sizeHint().height() : 0; + int bwh = m_bottomWidget ? m_bottomWidget->tqsizeHint().height() : 0; m_leftWidget->reparent(this, 0, TQPoint(0, 0)); - m_leftWidget->setSizePolicy(TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Preferred)); - setMargins(m_leftWidget->sizeHint().width(), 0, 0, bwh); + m_leftWidget->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Preferred)); + setMargins(m_leftWidget->tqsizeHint().width(), 0, 0, bwh); } } @@ -467,7 +467,7 @@ void RosegardenCanvasView::updateLeftWidgetGeometry() m_leftWidget->setFixedWidth(leftWidgetWidth); int bottomWidgetHeight = m_bottomWidget ? - m_bottomWidget->sizeHint().height() : 0; + m_bottomWidget->tqsizeHint().height() : 0; setMargins(leftWidgetWidth, 0, 0, bottomWidgetHeight); diff --git a/src/gui/general/RosegardenCanvasView.h b/src/gui/general/RosegardenCanvasView.h index 3096334..02faef2 100644 --- a/src/gui/general/RosegardenCanvasView.h +++ b/src/gui/general/RosegardenCanvasView.h @@ -43,18 +43,19 @@ namespace Rosegarden /** * A TQCanvasView with an auxiliary horiz. scrollbar - * That scrollbar should be provided by the parent widget + * That scrollbar should be provided by the tqparent widget * (typically an EditView). The RosegardenCanvasView keeps * the auxilliary horiz. scrollbar range in sync with the * one of its own scrollbar with slotUpdate(). */ -class RosegardenCanvasView : public QCanvasView +class RosegardenCanvasView : public TQCanvasView { Q_OBJECT + TQ_OBJECT public: RosegardenCanvasView(TQCanvas*, - TQWidget* parent=0, const char* name=0, WFlags f=0); + TQWidget* tqparent=0, const char* name=0, WFlags f=0); /** * EditTool::handleMouseMove() returns a OR-ed combination of these diff --git a/src/gui/general/RosegardenScrollView.cpp b/src/gui/general/RosegardenScrollView.cpp index c3184da..cc73afb 100644 --- a/src/gui/general/RosegardenScrollView.cpp +++ b/src/gui/general/RosegardenScrollView.cpp @@ -49,9 +49,9 @@ const int RosegardenScrollView::InitialScrollAccel = 5; const int RosegardenScrollView::MaxScrollDelta = 100; // max a.scroll speed const double RosegardenScrollView::ScrollAccelValue = 1.04;// acceleration rate -RosegardenScrollView::RosegardenScrollView(TQWidget* parent, +RosegardenScrollView::RosegardenScrollView(TQWidget* tqparent, const char* name, WFlags f) - : TQScrollView(parent, name, f), + : TQScrollView(tqparent, name, f), m_bottomWidget(0), m_currentBottomWidgetHeight( -1), m_smoothScroll(true), @@ -75,8 +75,8 @@ void RosegardenScrollView::setBottomFixedWidget(TQWidget* w) m_bottomWidget = w; if (m_bottomWidget) { m_bottomWidget->reparent(this, 0, TQPoint(0, 0)); - m_bottomWidget->setSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed)); - setMargins(0, 0, 0, m_bottomWidget->sizeHint().height()); + m_bottomWidget->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed)); + setMargins(0, 0, 0, m_bottomWidget->tqsizeHint().height()); } } @@ -376,7 +376,7 @@ void RosegardenScrollView::updateBottomWidgetGeometry() if (!m_bottomWidget) return ; - int bottomWidgetHeight = m_bottomWidget->sizeHint().height(); + int bottomWidgetHeight = m_bottomWidget->tqsizeHint().height(); setMargins(0, 0, 0, bottomWidgetHeight); TQRect r = frameRect(); diff --git a/src/gui/general/RosegardenScrollView.h b/src/gui/general/RosegardenScrollView.h index a0aafbb..14744ee 100644 --- a/src/gui/general/RosegardenScrollView.h +++ b/src/gui/general/RosegardenScrollView.h @@ -48,11 +48,12 @@ namespace Rosegarden * and the ability to have a "fixed" (non-scrolling) widget at its bottom, * just above the bottom scrollbar. */ -class RosegardenScrollView : public QScrollView +class RosegardenScrollView : public TQScrollView { Q_OBJECT + TQ_OBJECT public: - RosegardenScrollView(TQWidget* parent=0, const char* name=0, WFlags f=0); + RosegardenScrollView(TQWidget* tqparent=0, const char* name=0, WFlags f=0); /** * EditTool::handleMouseMove() returns a OR-ed combination of these diff --git a/src/gui/general/StaffLine.cpp b/src/gui/general/StaffLine.cpp index 90208fe..6838b22 100644 --- a/src/gui/general/StaffLine.cpp +++ b/src/gui/general/StaffLine.cpp @@ -33,8 +33,8 @@ namespace Rosegarden { -StaffLine::StaffLine(TQCanvas *c, QCanvasItemGroup *g, int height) : - QCanvasLineGroupable(c, g), +StaffLine::StaffLine(TQCanvas *c, TQCanvasItemGroup *g, int height) : + TQCanvasLineGroupable(c, g), m_height(height), m_significant(true) { diff --git a/src/gui/general/StaffLine.h b/src/gui/general/StaffLine.h index 00a02c4..1fa00c2 100644 --- a/src/gui/general/StaffLine.h +++ b/src/gui/general/StaffLine.h @@ -30,7 +30,7 @@ #include <tqpen.h> -class QCanvasItemGroup; +class TQCanvasItemGroup; class TQCanvas; @@ -45,10 +45,10 @@ namespace Rosegarden * A groupable line which can be "highlighted" * (drawn with a different color) */ -class StaffLine : public QCanvasLineGroupable +class StaffLine : public TQCanvasLineGroupable { public: - StaffLine(TQCanvas *c, QCanvasItemGroup *g, int height); + StaffLine(TQCanvas *c, TQCanvasItemGroup *g, int height); enum { NoHeight = -150 }; diff --git a/src/gui/kdeext/KLedButton.cpp b/src/gui/kdeext/KLedButton.cpp index 1f1a3fc..03945b0 100644 --- a/src/gui/kdeext/KLedButton.cpp +++ b/src/gui/kdeext/KLedButton.cpp @@ -36,13 +36,13 @@ namespace Rosegarden { -KLedButton::KLedButton(const TQColor &col, TQWidget *parent, const char *name) - : KLed( col, parent, name ) +KLedButton::KLedButton(const TQColor &col, TQWidget *tqparent, const char *name) + : KLed( col, tqparent, name ) {} KLedButton::KLedButton(const TQColor& col, KLed::State st, KLed::Look look, - KLed::Shape shape, TQWidget *parent, const char *name) - : KLed( col, st, look, shape, parent, name ) + KLed::Shape tqshape, TQWidget *tqparent, const char *name) + : KLed( col, st, look, tqshape, tqparent, name ) {} KLedButton::~KLedButton() @@ -50,7 +50,7 @@ KLedButton::~KLedButton() void KLedButton::mousePressEvent( TQMouseEvent *e ) { - if (e->button() == LeftButton) { + if (e->button() == Qt::LeftButton) { toggle(); emit stateChanged( state() ); } diff --git a/src/gui/kdeext/KLedButton.h b/src/gui/kdeext/KLedButton.h index c7810af..3bd8c5c 100644 --- a/src/gui/kdeext/KLedButton.h +++ b/src/gui/kdeext/KLedButton.h @@ -49,10 +49,11 @@ namespace Rosegarden */ class KLedButton : public KLed { Q_OBJECT + TQ_OBJECT public: - KLedButton(const TQColor &col=Qt::green, TQWidget *parent=0, const char *name=0); - KLedButton(const TQColor& col, KLed::State st, KLed::Look look, KLed::Shape shape, - TQWidget *parent=0, const char *name=0); + KLedButton(const TQColor &col=TQt::green, TQWidget *tqparent=0, const char *name=0); + KLedButton(const TQColor& col, KLed::State st, KLed::Look look, KLed::Shape tqshape, + TQWidget *tqparent=0, const char *name=0); ~KLedButton(); signals: diff --git a/src/gui/kdeext/KStartupLogo.cpp b/src/gui/kdeext/KStartupLogo.cpp index 821ebb1..e3edd9d 100644 --- a/src/gui/kdeext/KStartupLogo.cpp +++ b/src/gui/kdeext/KStartupLogo.cpp @@ -36,14 +36,10 @@ #include "KStartupLogo.h" #include "misc/Debug.h" -KStartupLogo::KStartupLogo(TQWidget * parent, const char *name) - : TQWidget(parent, name, +KStartupLogo::KStartupLogo(TQWidget * tqparent, const char *name) + : TQWidget(tqparent, name, WStyle_Customize | -#if QT_VERSION >= 0x030100 WStyle_Splash -#else - WStyle_NoBorder | WStyle_StaysOnTop | WStyle_Tool | WX11BypassWM | WWinOwnDC -#endif ), m_readyToHide(false), m_showTip(true) @@ -88,15 +84,15 @@ void KStartupLogo::paintEvent(TQPaintEvent*) paint.drawRect(TQRect(m_pixmap.width() - 220, m_pixmap.height() - 43, 220, (y + 8) - (m_pixmap.height() - 43))); - // paint.setPen(Qt::black); - // paint.setBrush(Qt::black); - paint.setPen(Qt::white); - paint.setBrush(Qt::white); + // paint.setPen(TQt::black); + // paint.setBrush(TQt::black); + paint.setPen(TQt::white); + paint.setBrush(TQt::white); //TQString version(VERSION); - //int sepIdx = version.find("-"); + //int sepIdx = version.tqfind("-"); TQString versionLabel(VERSION); - //TQString("R%1 v%2").arg(version.left(sepIdx)).arg(version.mid(sepIdx + 1)); + //TQString("R%1 v%2").tqarg(version.left(sepIdx)).tqarg(version.mid(sepIdx + 1)); int versionWidth = metrics.width(versionLabel); paint.drawText(m_pixmap.width() - versionWidth - 18, diff --git a/src/gui/kdeext/KStartupLogo.h b/src/gui/kdeext/KStartupLogo.h index a588fe4..154a749 100644 --- a/src/gui/kdeext/KStartupLogo.h +++ b/src/gui/kdeext/KStartupLogo.h @@ -28,9 +28,10 @@ #include <tqwidget.h> #include <tqpixmap.h> -class KStartupLogo : public QWidget +class KStartupLogo : public TQWidget { Q_OBJECT + TQ_OBJECT public: static KStartupLogo* getInstance(); @@ -46,7 +47,7 @@ public slots: protected: - KStartupLogo(TQWidget *parent=0, const char *name=0); + KStartupLogo(TQWidget *tqparent=0, const char *name=0); ~KStartupLogo(); virtual void paintEvent(TQPaintEvent*); diff --git a/src/gui/kdeext/KTmpStatusMsg.cpp b/src/gui/kdeext/KTmpStatusMsg.cpp index 620d7c5..8977c74 100644 --- a/src/gui/kdeext/KTmpStatusMsg.cpp +++ b/src/gui/kdeext/KTmpStatusMsg.cpp @@ -33,7 +33,7 @@ KTmpStatusMsg::KTmpStatusMsg(const TQString& msg, KMainWindow* window, int id) : m_mainWindow(window), m_id(id) { - m_mainWindow->statusBar()->changeItem(TQString(" %1").arg(msg), m_id); + m_mainWindow->statusBar()->changeItem(TQString(" %1").tqarg(msg), m_id); Rosegarden::rgapp->refreshGUI(50); } diff --git a/src/gui/kdeext/QCanvasGroupableItem.cpp b/src/gui/kdeext/QCanvasGroupableItem.cpp index 2a31934..818004b 100644 --- a/src/gui/kdeext/QCanvasGroupableItem.cpp +++ b/src/gui/kdeext/QCanvasGroupableItem.cpp @@ -25,7 +25,7 @@ #include "QCanvasGroupableItem.h" QCanvasGroupableItem::QCanvasGroupableItem(TQCanvasItem *i, - QCanvasItemGroup *g, + TQCanvasItemGroup *g, bool withRelativeCoords) : m_group(g), m_item(i) @@ -66,15 +66,15 @@ QCanvasGroupableItem::detach() ////////////////////////////////////////////////////////////////////// -QCanvasItemGroup::QCanvasItemGroup(TQCanvas *c) +TQCanvasItemGroup::TQCanvasItemGroup(TQCanvas *c) : TQCanvasItem(c) { - // RG_DEBUG << "QCanvasItemGroup() - this : " << this << endl; + // RG_DEBUG << "TQCanvasItemGroup() - this : " << this << endl; } -QCanvasItemGroup::~QCanvasItemGroup() +TQCanvasItemGroup::~TQCanvasItemGroup() { - // RG_DEBUG << "~QCanvasItemGroup() - this : " << this << endl; + // RG_DEBUG << "~TQCanvasItemGroup() - this : " << this << endl; // Tell all our items that we're being destroyed TQCanvasItemList::Iterator i; @@ -86,7 +86,7 @@ QCanvasItemGroup::~QCanvasItemGroup() } void -QCanvasItemGroup::moveBy(double dx, double dy) +TQCanvasItemGroup::moveBy(double dx, double dy) { TQCanvasItem::moveBy(dx, dy); // move ourselves @@ -96,7 +96,7 @@ QCanvasItemGroup::moveBy(double dx, double dy) } void -QCanvasItemGroup::advance(int stage) +TQCanvasItemGroup::advance(int stage) { TQCanvasItemList::Iterator i; for (i = m_items.begin(); i != m_items.end(); ++i) @@ -104,7 +104,7 @@ QCanvasItemGroup::advance(int stage) } bool -QCanvasItemGroup::collidesWith(const TQCanvasItem *item) const +TQCanvasItemGroup::collidesWith(const TQCanvasItem *item) const { TQCanvasItemList::ConstIterator i; for (i = m_items.begin(); i != m_items.end(); ++i) @@ -115,7 +115,7 @@ QCanvasItemGroup::collidesWith(const TQCanvasItem *item) const } void -QCanvasItemGroup::draw(TQPainter&) +TQCanvasItemGroup::draw(TQPainter&) { // There isn't anything to do - all the items will be drawn // seperately by the canvas anyway. However the function has to be @@ -127,25 +127,25 @@ QCanvasItemGroup::draw(TQPainter&) } void -QCanvasItemGroup::setVisible(bool yes) +TQCanvasItemGroup::setVisible(bool yes) { TQCanvasItemList::Iterator i; for (i = m_items.begin(); i != m_items.end(); ++i) - (*i)->setVisible(yes); + (*i)->tqsetVisible(yes); } void -QCanvasItemGroup::setSelected(bool yes) +TQCanvasItemGroup::setSelected(bool yes) { TQCanvasItem::setSelected(yes); TQCanvasItemList::Iterator i; for (i = m_items.begin(); i != m_items.end(); ++i) - (*i)->setVisible(yes); + (*i)->tqsetVisible(yes); } void -QCanvasItemGroup::setEnabled(bool yes) +TQCanvasItemGroup::setEnabled(bool yes) { TQCanvasItem::setEnabled(yes); @@ -155,7 +155,7 @@ QCanvasItemGroup::setEnabled(bool yes) } void -QCanvasItemGroup::setActive(bool yes) +TQCanvasItemGroup::setActive(bool yes) { TQCanvasItem::setActive(yes); @@ -165,13 +165,13 @@ QCanvasItemGroup::setActive(bool yes) } int -QCanvasItemGroup::rtti() const +TQCanvasItemGroup::rtti() const { return 10002; } -QRect -QCanvasItemGroup::boundingRect() const +TQRect +TQCanvasItemGroup::boundingRect() const { TQRect r; @@ -182,8 +182,8 @@ QCanvasItemGroup::boundingRect() const return r; } -QRect -QCanvasItemGroup::boundingRectAdvanced() const +TQRect +TQCanvasItemGroup::boundingRectAdvanced() const { TQRect r; @@ -195,7 +195,7 @@ QCanvasItemGroup::boundingRectAdvanced() const } bool -QCanvasItemGroup::collidesWith(const TQCanvasSprite *s, +TQCanvasItemGroup::collidesWith(const TQCanvasSprite *s, const TQCanvasPolygonalItem *p, const TQCanvasRectangle *r, const TQCanvasEllipse *e, @@ -217,22 +217,22 @@ QCanvasItemGroup::collidesWith(const TQCanvasSprite *s, } void -QCanvasItemGroup::addItem(TQCanvasItem *i) +TQCanvasItemGroup::addItem(TQCanvasItem *i) { m_items.append(i); } void -QCanvasItemGroup::addItemWithRelativeCoords(TQCanvasItem *i) +TQCanvasItemGroup::addItemWithRelativeCoords(TQCanvasItem *i) { i->moveBy(x(), y()); addItem(i); } void -QCanvasItemGroup::removeItem(TQCanvasItem *i) +TQCanvasItemGroup::removeItem(TQCanvasItem *i) { - // RG_DEBUG << "QCanvasItemGroup::removeItem() - this : " + // RG_DEBUG << "TQCanvasItemGroup::removeItem() - this : " // << this << " - item : " << i << endl; m_items.remove(i); } @@ -240,40 +240,40 @@ QCanvasItemGroup::removeItem(TQCanvasItem *i) ////////////////////////////////////////////////////////////////////// -QCanvasLineGroupable::QCanvasLineGroupable(TQCanvas *c, - QCanvasItemGroup *g) +TQCanvasLineGroupable::TQCanvasLineGroupable(TQCanvas *c, + TQCanvasItemGroup *g) : TQCanvasLine(c), QCanvasGroupableItem(this, g) {} ////////////////////////////////////////////////////////////////////// -QCanvasRectangleGroupable::QCanvasRectangleGroupable(TQCanvas *c, - QCanvasItemGroup *g) +TQCanvasRectangleGroupable::TQCanvasRectangleGroupable(TQCanvas *c, + TQCanvasItemGroup *g) : TQCanvasRectangle(c), QCanvasGroupableItem(this, g) {} ////////////////////////////////////////////////////////////////////// -QCanvasTextGroupable::QCanvasTextGroupable(const TQString& label, +TQCanvasTextGroupable::TQCanvasTextGroupable(const TQString& label, TQCanvas *c, - QCanvasItemGroup *g) + TQCanvasItemGroup *g) : TQCanvasText(label, c), QCanvasGroupableItem(this, g) {} -QCanvasTextGroupable::QCanvasTextGroupable(TQCanvas *c, - QCanvasItemGroup *g) +TQCanvasTextGroupable::TQCanvasTextGroupable(TQCanvas *c, + TQCanvasItemGroup *g) : TQCanvasText(c), QCanvasGroupableItem(this, g) {} ////////////////////////////////////////////////////////////////////// -QCanvasSpriteGroupable::QCanvasSpriteGroupable(TQCanvasPixmapArray *pa, +TQCanvasSpriteGroupable::TQCanvasSpriteGroupable(TQCanvasPixmapArray *pa, TQCanvas *c, - QCanvasItemGroup *g) + TQCanvasItemGroup *g) : TQCanvasSprite(pa, c), QCanvasGroupableItem(this, g) {} diff --git a/src/gui/kdeext/QCanvasGroupableItem.h b/src/gui/kdeext/QCanvasGroupableItem.h index 1e54604..b7d4fbb 100644 --- a/src/gui/kdeext/QCanvasGroupableItem.h +++ b/src/gui/kdeext/QCanvasGroupableItem.h @@ -19,47 +19,47 @@ COPYING included with this distribution for more information. */ -#ifndef QCANVASGROUPABLEITEM_H -#define QCANVASGROUPABLEITEM_H +#ifndef TQCANVASGROUPABLEITEM_H +#define TQCANVASGROUPABLEITEM_H #include <tqcanvas.h> -class QCanvasItemGroup; +class TQCanvasItemGroup; /** - * This class is meant to be inherited by TQCanvasItem children to make + * This class is meant to be inherited by TQCanvasItem tqchildren to make * them groupable. * * On destruction, the item will remove itself from the group it's * attached to. * * @see QCanvasSpriteGroupable - * @see QCanvasLineGroupable + * @see TQCanvasLineGroupable */ class QCanvasGroupableItem { - friend class QCanvasItemGroup; + friend class TQCanvasItemGroup; public: /** * Create a groupable item, e.g. put the item in the specified - * QCanvasItemGroup. If withRelativeCoords is true, the item's + * TQCanvasItemGroup. If withRelativeCoords is true, the item's * position will be translated so that it's coordinates are * relative to those of the item group. * - * @see QCanvasItemGroup#addItemWithRelativeCoords() + * @see TQCanvasItemGroup#addItemWithRelativeCoords() */ - QCanvasGroupableItem(TQCanvasItem*, QCanvasItemGroup*, + QCanvasGroupableItem(TQCanvasItem*, TQCanvasItemGroup*, bool withRelativeCoords = false); virtual ~QCanvasGroupableItem(); - /// Returns the QCanvasItemGroup this groupable item belongs to - QCanvasItemGroup* group() { return m_group; } + /// Returns the TQCanvasItemGroup this groupable item belongs to + TQCanvasItemGroup* group() { return m_group; } - /// Returns the QCanvasItemGroup this groupable item belongs to - const QCanvasItemGroup* group() const { return m_group; } + /// Returns the TQCanvasItemGroup this groupable item belongs to + const TQCanvasItemGroup* group() const { return m_group; } /// Returns the TQCanvasItem which this groupable item wraps TQCanvasItem *item() { return m_item; } @@ -72,7 +72,7 @@ public: protected: /** - * Detach item from the item group - called by QCanvasItemGroup only + * Detach item from the item group - called by TQCanvasItemGroup only * * Set m_group to 0, so that on destruction the item won't try to * remove itself from the group @@ -82,7 +82,7 @@ protected: private: //--------------- Data members --------------------------------- - QCanvasItemGroup* m_group; + TQCanvasItemGroup* m_group; TQCanvasItem* m_item; }; @@ -98,13 +98,13 @@ private: * Proper behavior requires collaboration from the TQCanvasView, * though. When about to move an item, the TQCanvasView object should * first check if it's not a groupable item, and if so fetch its - * QCanvasItemGroup and move it instead. + * TQCanvasItemGroup and move it instead. */ -class QCanvasItemGroup : public QCanvasItem +class TQCanvasItemGroup : public TQCanvasItem { public: - QCanvasItemGroup(TQCanvas *); - virtual ~QCanvasItemGroup(); + TQCanvasItemGroup(TQCanvas *); + virtual ~TQCanvasItemGroup(); virtual void moveBy(double dx, double dy); virtual void advance(int stage); @@ -131,7 +131,7 @@ public: * Add a new item to this group. * * The item's coordinates are considered relative to the group. - * For example, suppose you have a QCanvasItemGroup whose coords + * For example, suppose you have a TQCanvasItemGroup whose coords * are 10,10. If you call addItemWithRelativeCoords() with an item * whose coords are 5,5, the item is moved so that its coords * will be 5,5 relative to the group (e.g. 15,15). @@ -162,40 +162,40 @@ protected: /** * A TQCanvasLine which can be put in a QCanvasGroup */ -class QCanvasLineGroupable : public TQCanvasLine, public QCanvasGroupableItem +class TQCanvasLineGroupable : public TQCanvasLine, public QCanvasGroupableItem { public: - QCanvasLineGroupable(TQCanvas *c, QCanvasItemGroup *g); + TQCanvasLineGroupable(TQCanvas *c, TQCanvasItemGroup *g); }; /** * A TQCanvasRectangle which can be put in a QCanvasGroup */ -class QCanvasRectangleGroupable : public TQCanvasRectangle, public QCanvasGroupableItem +class TQCanvasRectangleGroupable : public TQCanvasRectangle, public QCanvasGroupableItem { public: - QCanvasRectangleGroupable(TQCanvas *c, QCanvasItemGroup *g); + TQCanvasRectangleGroupable(TQCanvas *c, TQCanvasItemGroup *g); }; /** * A TQCanvasText which can be put in a QCanvasGroup */ -class QCanvasTextGroupable : public TQCanvasText, public QCanvasGroupableItem +class TQCanvasTextGroupable : public TQCanvasText, public QCanvasGroupableItem { public: - QCanvasTextGroupable(TQCanvas *c, QCanvasItemGroup *g); - QCanvasTextGroupable(const TQString&, TQCanvas *c, QCanvasItemGroup *g); + TQCanvasTextGroupable(TQCanvas *c, TQCanvasItemGroup *g); + TQCanvasTextGroupable(const TQString&, TQCanvas *c, TQCanvasItemGroup *g); }; /** - * A TQCanvasSprite that can be put in a QCanvasGroup + * A QCanvasSprite that can be put in a QCanvasGroup */ -class QCanvasSpriteGroupable : public TQCanvasSprite, public QCanvasGroupableItem +class TQCanvasSpriteGroupable : public TQCanvasSprite, public QCanvasGroupableItem { public: - QCanvasSpriteGroupable(TQCanvasPixmapArray*, + TQCanvasSpriteGroupable(TQCanvasPixmapArray*, TQCanvas*, - QCanvasItemGroup*); + TQCanvasItemGroup*); }; #endif diff --git a/src/gui/kdeext/QCanvasSimpleSprite.cpp b/src/gui/kdeext/QCanvasSimpleSprite.cpp index 2b03c87..74d4366 100644 --- a/src/gui/kdeext/QCanvasSimpleSprite.cpp +++ b/src/gui/kdeext/QCanvasSimpleSprite.cpp @@ -69,7 +69,7 @@ QCanvasSimpleSprite::~QCanvasSimpleSprite() // We can't delete m_pixmapArray or we get a core dump. // - // The reason I think is that after the TQCanvasSprite is deleted, + // The reason I think is that after the QCanvasSprite is deleted, // it is removed from the TQCanvas, which therefore needs the // pixmaps to know how to update itself (the crash is in // TQCanvas::removeChunks(), usually). @@ -82,13 +82,13 @@ QCanvasSimpleSprite::~QCanvasSimpleSprite() TQCanvasPixmapArray* QCanvasSimpleSprite::makePixmapArray(TQPixmap *pixmap) { - QList<TQPixmap> pixlist; + TQList<TQPixmap> pixlist; pixlist.setAutoDelete(true); // the TQCanvasPixmapArray creates its // own copies of the pixmaps, so we // can delete the one we're passed pixlist.append(pixmap); - QList<TQPoint> spotlist; + TQList<TQPoint> spotlist; spotlist.setAutoDelete(true); spotlist.append(new TQPoint(0, 0)); @@ -98,13 +98,13 @@ QCanvasSimpleSprite::makePixmapArray(TQPixmap *pixmap) TQCanvasPixmapArray* QCanvasSimpleSprite::makePixmapArray(TQCanvasPixmap *pixmap) { - QList<TQPixmap> pixlist; + TQList<TQPixmap> pixlist; pixlist.setAutoDelete(true); // the TQCanvasPixmapArray creates its // own copies of the pixmaps, so we // can delete the one we're passed pixlist.append(pixmap); - QList<TQPoint> spotlist; + TQList<TQPoint> spotlist; spotlist.setAutoDelete(true); spotlist.append(new TQPoint(pixmap->offsetX(), pixmap->offsetY())); @@ -119,14 +119,14 @@ QCanvasSimpleSprite::makePixmapArray(const TQString &pixmapfile) ////////////////////////////////////////////////////////////////////// -QCanvasNotationSprite::QCanvasNotationSprite(NotationElement& n, +TQCanvasNotationSprite::TQCanvasNotationSprite(NotationElement& n, TQPixmap* pixmap, TQCanvas* canvas) : QCanvasSimpleSprite(pixmap, canvas), m_notationElement(n) {} -QCanvasNotationSprite::QCanvasNotationSprite(NotationElement& n, +TQCanvasNotationSprite::TQCanvasNotationSprite(NotationElement& n, TQCanvasPixmap* pixmap, TQCanvas* canvas) : QCanvasSimpleSprite(pixmap, canvas), @@ -134,49 +134,49 @@ QCanvasNotationSprite::QCanvasNotationSprite(NotationElement& n, {} -QCanvasNotationSprite::~QCanvasNotationSprite() +TQCanvasNotationSprite::~TQCanvasNotationSprite() {} -QCanvasNonElementSprite::QCanvasNonElementSprite(TQPixmap *pixmap, +TQCanvasNonElementSprite::TQCanvasNonElementSprite(TQPixmap *pixmap, TQCanvas *canvas) : QCanvasSimpleSprite(pixmap, canvas) {} -QCanvasNonElementSprite::QCanvasNonElementSprite(TQCanvasPixmap *pixmap, +TQCanvasNonElementSprite::TQCanvasNonElementSprite(TQCanvasPixmap *pixmap, TQCanvas *canvas) : QCanvasSimpleSprite(pixmap, canvas) {} -QCanvasNonElementSprite::~QCanvasNonElementSprite() +TQCanvasNonElementSprite::~TQCanvasNonElementSprite() {} -QCanvasTimeSigSprite::QCanvasTimeSigSprite(double layoutX, +TQCanvasTimeSigSprite::TQCanvasTimeSigSprite(double tqlayoutX, TQPixmap *pixmap, TQCanvas *canvas) : - QCanvasNonElementSprite(pixmap, canvas), - m_layoutX(layoutX) + TQCanvasNonElementSprite(pixmap, canvas), + m_tqlayoutX(tqlayoutX) {} -QCanvasTimeSigSprite::QCanvasTimeSigSprite(double layoutX, +TQCanvasTimeSigSprite::TQCanvasTimeSigSprite(double tqlayoutX, TQCanvasPixmap *pixmap, TQCanvas *canvas) : - QCanvasNonElementSprite(pixmap, canvas), - m_layoutX(layoutX) + TQCanvasNonElementSprite(pixmap, canvas), + m_tqlayoutX(tqlayoutX) {} -QCanvasTimeSigSprite::~QCanvasTimeSigSprite() +TQCanvasTimeSigSprite::~TQCanvasTimeSigSprite() {} QCanvasStaffNameSprite::QCanvasStaffNameSprite(TQPixmap *pixmap, TQCanvas *canvas) : - QCanvasNonElementSprite(pixmap, canvas) + TQCanvasNonElementSprite(pixmap, canvas) {} QCanvasStaffNameSprite::QCanvasStaffNameSprite(TQCanvasPixmap *pixmap, TQCanvas *canvas) : - QCanvasNonElementSprite(pixmap, canvas) + TQCanvasNonElementSprite(pixmap, canvas) {} QCanvasStaffNameSprite::~QCanvasStaffNameSprite() diff --git a/src/gui/kdeext/QCanvasSimpleSprite.h b/src/gui/kdeext/QCanvasSimpleSprite.h index 7613b64..77f64f0 100644 --- a/src/gui/kdeext/QCanvasSimpleSprite.h +++ b/src/gui/kdeext/QCanvasSimpleSprite.h @@ -19,8 +19,8 @@ COPYING included with this distribution for more information. */ -#ifndef QCANVASSIMPLESPRITE_H -#define QCANVASSIMPLESPRITE_H +#ifndef TQCANVASSIMPLESPRITE_H +#define TQCANVASSIMPLESPRITE_H #include <tqwmatrix.h> #include <tqcanvas.h> @@ -30,9 +30,9 @@ namespace Rosegarden { /** - * A TQCanvasSprite with 1 frame only + * A QCanvasSprite with 1 frame only */ -class QCanvasSimpleSprite : public QCanvasSprite +class QCanvasSimpleSprite : public TQCanvasSprite { public: QCanvasSimpleSprite(TQPixmap*, TQCanvas*); @@ -59,15 +59,15 @@ protected: class NotationElement; /** - * A TQCanvasSprite referencing a NotationElement + * A QCanvasSprite referencing a NotationElement */ -class QCanvasNotationSprite : public QCanvasSimpleSprite +class TQCanvasNotationSprite : public QCanvasSimpleSprite { public: - QCanvasNotationSprite(Rosegarden::NotationElement&, TQPixmap*, TQCanvas*); - QCanvasNotationSprite(Rosegarden::NotationElement&, TQCanvasPixmap*, TQCanvas*); + TQCanvasNotationSprite(Rosegarden::NotationElement&, TQPixmap*, TQCanvas*); + TQCanvasNotationSprite(Rosegarden::NotationElement&, TQCanvasPixmap*, TQCanvas*); - virtual ~QCanvasNotationSprite(); + virtual ~TQCanvasNotationSprite(); Rosegarden::NotationElement& getNotationElement() { return m_notationElement; } @@ -77,35 +77,35 @@ protected: Rosegarden::NotationElement& m_notationElement; }; -class QCanvasNonElementSprite : public QCanvasSimpleSprite +class TQCanvasNonElementSprite : public QCanvasSimpleSprite { public: - QCanvasNonElementSprite(TQPixmap *, TQCanvas *); - QCanvasNonElementSprite(TQCanvasPixmap *, TQCanvas *); - virtual ~QCanvasNonElementSprite(); + TQCanvasNonElementSprite(TQPixmap *, TQCanvas *); + TQCanvasNonElementSprite(TQCanvasPixmap *, TQCanvas *); + virtual ~TQCanvasNonElementSprite(); }; /** - * A TQCanvasSprite used for a time signature + * A QCanvasSprite used for a time signature */ -class QCanvasTimeSigSprite : public QCanvasNonElementSprite +class TQCanvasTimeSigSprite : public TQCanvasNonElementSprite { public: - QCanvasTimeSigSprite(double layoutX, TQPixmap *, TQCanvas *); - QCanvasTimeSigSprite(double layoutX, TQCanvasPixmap *, TQCanvas *); - virtual ~QCanvasTimeSigSprite(); + TQCanvasTimeSigSprite(double tqlayoutX, TQPixmap *, TQCanvas *); + TQCanvasTimeSigSprite(double tqlayoutX, TQCanvasPixmap *, TQCanvas *); + virtual ~TQCanvasTimeSigSprite(); - void setLayoutX(double layoutX) { m_layoutX = layoutX; } - double getLayoutX() const { return m_layoutX; } + void setLayoutX(double tqlayoutX) { m_tqlayoutX = tqlayoutX; } + double getLayoutX() const { return m_tqlayoutX; } protected: - double m_layoutX; + double m_tqlayoutX; }; /** - * A TQCanvasSprite used for a staff name + * A QCanvasSprite used for a staff name */ -class QCanvasStaffNameSprite : public QCanvasNonElementSprite +class QCanvasStaffNameSprite : public TQCanvasNonElementSprite { public: QCanvasStaffNameSprite(TQPixmap *, TQCanvas *); diff --git a/src/gui/kdeext/RGLed.cpp b/src/gui/kdeext/RGLed.cpp index c5e5934..9d34dcb 100644 --- a/src/gui/kdeext/RGLed.cpp +++ b/src/gui/kdeext/RGLed.cpp @@ -4,7 +4,7 @@ KDE libraries. The modifications (for "brute-force" antialiasing) were carried out by Chris Cannam, April 2004. - Copyright (C) 1998 J�rg Habenicht ([email protected]) + Copyright (C) 1998 J�rg Habenicht ([email protected]) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public @@ -59,7 +59,7 @@ * * Revision 1.19 2001/08/08 14:35:12 hausmann * - removed empty KActionCollection::childEvent - * - added sizeHint() and minimumSizeHint() methods to KLed, as advised by + * - added tqsizeHint() and tqminimumSizeHint() methods to KLed, as advised by * Rik in the comment in kled.h * - removed unused mousePressEvent, mouseMoveEvent and mouseReleaseEvent * handlers from KPassDlg @@ -81,7 +81,7 @@ * * Revision 1.14 2000/06/03 01:04:42 gehrmab * * Made drawing routines available for overriding - * * Added a parent/name constructor + * * Added a tqparent/name constructor * * Propertyfication * * Revision 1.13 2000/05/08 19:38:49 sschiman @@ -119,7 +119,7 @@ * It does not yet work reliably. * * Revision 1.6 1999/03/01 23:34:49 kulow - * CVS_SILENT ported to Qt 2.0 + * CVS_SILENT ported to TQt 2.0 * * Revision 1.5 1999/02/19 08:52:42 habenich * ID und LOG tags included @@ -156,11 +156,11 @@ class KLed::KLedPrivate -KLed::KLed(TQWidget *parent, const char *name) - : TQWidget( parent, name), +KLed::KLed(TQWidget *tqparent, const char *name) + : TQWidget( tqparent, name), led_state(On), led_look(Raised), - led_shape(Circular) + led_tqshape(Circular) { TQColor col(green); d = new KLed::KLedPrivate; @@ -173,11 +173,11 @@ KLed::KLed(TQWidget *parent, const char *name) } -KLed::KLed(const TQColor& col, TQWidget *parent, const char *name) - : TQWidget( parent, name), +KLed::KLed(const TQColor& col, TQWidget *tqparent, const char *name) + : TQWidget( tqparent, name), led_state(On), led_look(Raised), - led_shape(Circular) + led_tqshape(Circular) { d = new KLed::KLedPrivate; d->dark_factor = 300; @@ -190,11 +190,11 @@ KLed::KLed(const TQColor& col, TQWidget *parent, const char *name) } KLed::KLed(const TQColor& col, KLed::State state, - KLed::Look look, KLed::Shape shape, TQWidget *parent, const char *name ) - : TQWidget(parent, name), + KLed::Look look, KLed::Shape tqshape, TQWidget *tqparent, const char *name ) + : TQWidget(tqparent, name), led_state(state), led_look(look), - led_shape(shape) + led_tqshape(tqshape) { d = new KLed::KLedPrivate; d->dark_factor = 300; @@ -202,7 +202,7 @@ KLed::KLed(const TQColor& col, KLed::State state, d->off_map = 0; d->on_map = 0; - //setShape(shape); + //setShape(tqshape); setColor(col); } @@ -223,7 +223,7 @@ KLed::paintEvent(TQPaintEvent *) t.start(); for (int i = 0; i < rounds; i++) { #endif - switch (led_shape) { + switch (led_tqshape) { case Rectangular: switch (led_look) { case Sunken : @@ -236,7 +236,7 @@ KLed::paintEvent(TQPaintEvent *) paintRect(); break; default : - qWarning("%s: in class KLed: no KLed::Look set", qApp->argv()[0]); + qWarning("%s: in class KLed: no KLed::Look set", tqApp->argv()[0]); } break; case Circular: @@ -251,11 +251,11 @@ KLed::paintEvent(TQPaintEvent *) paintSunken(); break; default: - qWarning("%s: in class KLed: no KLed::Look set", qApp->argv()[0]); + qWarning("%s: in class KLed: no KLed::Look set", tqApp->argv()[0]); } break; default: - qWarning("%s: in class KLed: no KLed::Shape set", qApp->argv()[0]); + qWarning("%s: in class KLed: no KLed::Shape set", tqApp->argv()[0]); break; } #ifdef PAINT_BENCH @@ -294,11 +294,11 @@ KLed::paintFlat() // paint a ROUND FLAT led lamp // Set the brush to SolidPattern, this fills the entire area // of the ellipse which is drawn with a thin grey "border" (pen) - brush.setStyle( TQBrush::SolidPattern ); + brush.setStyle( Qt::SolidPattern ); brush.setColor( color ); pen.setWidth( 1 ); - color = colorGroup().dark(); + color = tqcolorGroup().dark(); pen.setColor( color ); // Set the pen accordingly paint.setPen( pen ); // Select pen for drawing @@ -339,7 +339,7 @@ KLed::paintRound() // paint a ROUND RAISED led lamp // Set the brush to SolidPattern, this fills the entire area // of the ellipse which is drawn first - brush.setStyle( TQBrush::SolidPattern ); + brush.setStyle( Qt::SolidPattern ); brush.setColor( color ); paint.setBrush( brush ); // Assign the brush to the painter @@ -347,7 +347,7 @@ KLed::paintRound() // paint a ROUND RAISED led lamp paint.drawEllipse( 1, 1, width, width ); // Draw the bright light spot of the LED now, using modified "old" - // painter routine taken from KDEUI�s KLed widget: + // painter routine taken from KDEUI�s KLed widget: // Setting the new width of the pen is essential to avoid "pixelized" // shadow like it can be observed with the old LED code @@ -359,7 +359,7 @@ KLed::paintRound() // paint a ROUND RAISED led lamp light_width *= 2; light_width /= 3; - // Calculate the LED�s "light factor": + // Calculate the LED�s "light factor": int light_quote = (130 * 2 / (light_width ? light_width : 1)) + 100; // Now draw the bright spot on the LED: @@ -386,10 +386,10 @@ KLed::paintRound() // paint a ROUND RAISED led lamp // avoid that the border can be erased by the bright spot of the LED pen.setWidth( 1 ); - color = colorGroup().dark(); + color = tqcolorGroup().dark(); pen.setColor( color ); // Set the pen accordingly paint.setPen( pen ); // Select pen for drawing - brush.setStyle( TQBrush::NoBrush ); // Switch off the brush + brush.setStyle( Qt::NoBrush ); // Switch off the brush paint.setBrush( brush ); // This avoids filling of the ellipse paint.drawEllipse( 1, 1, width, width ); @@ -459,7 +459,7 @@ KLed::paintSunken() // paint a ROUND SUNKEN led lamp // Set the brush to SolidPattern, this fills the entire area // of the ellipse which is drawn first - brush.setStyle( TQBrush::SolidPattern ); + brush.setStyle( Qt::SolidPattern ); brush.setColor( color ); paint.setBrush( brush ); // Assign the brush to the painter @@ -467,7 +467,7 @@ KLed::paintSunken() // paint a ROUND SUNKEN led lamp paint.drawEllipse( scale, scale, width - scale*2, width - scale*2 ); // Draw the bright light spot of the LED now, using modified "old" - // painter routine taken from KDEUI�s KLed widget: + // painter routine taken from KDEUI�s KLed widget: // Setting the new width of the pen is essential to avoid "pixelized" // shadow like it can be observed with the old LED code @@ -479,7 +479,7 @@ KLed::paintSunken() // paint a ROUND SUNKEN led lamp light_width *= 2; light_width /= 3; - // Calculate the LED�s "light factor": + // Calculate the LED�s "light factor": int light_quote = (130 * 2 / (light_width ? light_width : 1)) + 100; // Now draw the bright spot on the LED: @@ -506,14 +506,14 @@ KLed::paintSunken() // paint a ROUND SUNKEN led lamp // from the upper left. pen.setWidth( 2 * scale + 1 ); // ### shouldn't this value be smaller for smaller LEDs? - brush.setStyle( TQBrush::NoBrush ); // Switch off the brush + brush.setStyle( Qt::NoBrush ); // Switch off the brush paint.setBrush( brush ); // This avoids filling of the ellipse - // Set the initial color value to colorGroup().light() (bright) and start - // drawing the shadow border at 45� (45*16 = 720). + // Set the initial color value to tqcolorGroup().light() (bright) and start + // drawing the shadow border at 45� (45*16 = 720). int angle = -720; - color = colorGroup().light(); + color = tqcolorGroup().light(); for ( int arc = 120; arc < 2880; arc += 240 ) { @@ -582,8 +582,8 @@ KLed::paintRectFrame(bool raised) TQBrush darkBrush(d->offcolor); int w = width(); int h = height(); - TQColor black = Qt::black; - TQColor white = Qt::white; + TQColor black = TQt::black; + TQColor white = TQt::white; // ----- if (raised) { painter.setPen(white); @@ -612,12 +612,12 @@ KLed::state() const } KLed::Shape -KLed::shape() const +KLed::tqshape() const { - return led_shape; + return led_tqshape; } -QColor +TQColor KLed::color() const { return led_color; @@ -649,8 +649,8 @@ KLed::toggleState() void KLed::setShape(KLed::Shape s) { - if (led_shape != s) { - led_shape = s; + if (led_tqshape != s) { + led_tqshape = s; update(); } } @@ -712,14 +712,14 @@ KLed::off() setState(Off); } -QSize -KLed::sizeHint() const +TQSize +KLed::tqsizeHint() const { return TQSize(16, 16); } -QSize -KLed::minimumSizeHint() const +TQSize +KLed::tqminimumSizeHint() const { return TQSize(16, 16 ); } diff --git a/src/gui/kdeext/klearlook.cpp b/src/gui/kdeext/klearlook.cpp index 7263370..698620f 100644 --- a/src/gui/kdeext/klearlook.cpp +++ b/src/gui/kdeext/klearlook.cpp @@ -4,7 +4,7 @@ Klearlook (C) Joerg C. Koenig, 2005 [email protected] ---- -Based upon QtCurve (C) Craig Drummond, 2003 [email protected] +Based upon TQtCurve (C) Craig Drummond, 2003 [email protected] Bernhard Rosenkr�zer <bero@r?dh?t.com> Preston Brown <pbrown@r?dh?t.com> Than Ngo <than@r?dh?t.com> @@ -81,15 +81,15 @@ DEALINGS IN THE SOFTWARE. // Uncomment the following to enable gradients in toolbars and menubars // NOTE: Not yet complete!!! -//#define QTC_GRADIENT_TOOLBARS_AND_MENUBARS +//#define TQTC_GRADIENT_TOOLBARS_AND_MENUBARS //static int HIGH_LIGHT_FACTORS[]={ 100, 100, 100, 101, 102, 103, 104, 105 /*def*/, 106, 107, 108 }; //#define HIGHLIGHT_FACTOR(X) (X<0||X>10) ? 105 : HIGH_LIGHT_FACTORS[X] -#define QTC_HIGHLIGHT_FACTOR 105 -#define QTC_BORDERED_FRAME_WIDTH 2 -#define QTC_DEF_FRAME_WIDTH 1 -//#define QTC_MIN_BTN_SIZE 10 -#define QTC_NO_SECT -1 +#define TQTC_HIGHLIGHT_FACTOR 105 +#define TQTC_BORDERED_FRAME_WIDTH 2 +#define TQTC_DEF_FRAME_WIDTH 1 +//#define TQTC_MIN_BTN_SIZE 10 +#define TQTC_NO_SECT -1 #define MENU_POPUP_ITEM_HIGH_HI 7 #define MENU_POPUP_ITEM_HIGH_LO 5 @@ -109,7 +109,7 @@ static TQString readEnvPath( const char *env ) { TQCString path = getenv( env ); return path.isEmpty() - ? TQString::null + ? TQString() : TQFile::decodeName( path ); } @@ -135,14 +135,14 @@ static bool kickerIsTrans() { line = stream.readLine(); if ( inGen ) { - if ( 0 == line.find( "Transparent=" ) ) // Found it! + if ( 0 == line.tqfind( "Transparent=" ) ) // Found it! { - if ( -1 != line.find( "true" ) ) + if ( -1 != line.tqfind( "true" ) ) trans = true; stop = true; } else if ( line[ 0 ] == TQChar( '[' ) ) // Then wasn't in General section... stop = true; - } else if ( 0 == line.find( "[General]" ) ) + } else if ( 0 == line.tqfind( "[General]" ) ) inGen = true; } cfgFile.close(); @@ -169,18 +169,18 @@ inline TQColor midColor( const TQColor &a, const TQColor &b, double factor = 1.0 // Copied from Keramik... static bool isFormWidget( const TQWidget *widget ) { //Form widgets are in the KHTMLView, but that has 2 further inner levels - //of widgets - QClipperWidget, and outside of that, QViewportWidget - TQWidget * potentialClipPort = widget->parentWidget(); + //of widgets - TQClipperWidget, and outside of that, TQViewportWidget + TQWidget * potentialClipPort = widget->tqparentWidget(); if ( !potentialClipPort || potentialClipPort->isTopLevel() ) return false; - TQWidget *potentialViewPort = potentialClipPort->parentWidget(); + TQWidget *potentialViewPort = potentialClipPort->tqparentWidget(); if ( !potentialViewPort || potentialViewPort->isTopLevel() || qstrcmp( potentialViewPort->name(), "qt_viewport" ) ) return false; - TQWidget *potentialKHTML = potentialViewPort->parentWidget(); + TQWidget *potentialKHTML = potentialViewPort->tqparentWidget(); if ( !potentialKHTML || potentialKHTML->isTopLevel() || qstrcmp( potentialKHTML->className(), "KHTMLView" ) ) return false; @@ -423,8 +423,8 @@ inline TQColor getFill( TQStyle::SFlags flags, const TQColor *use ) { ? use[ 3 ] : flags & TQStyle::Style_MouseOver ? flags & ( TQStyle::Style_On | TQStyle::Style_Sunken ) - ? use[ 3 ].light( QTC_HIGHLIGHT_FACTOR ) - : use[ NUM_SHADES ].light( QTC_HIGHLIGHT_FACTOR ) + ? TQColor(use[ 3 ].light( TQTC_HIGHLIGHT_FACTOR )) + : TQColor(use[ NUM_SHADES ].light( TQTC_HIGHLIGHT_FACTOR )) : flags & ( TQStyle::Style_On | TQStyle::Style_Sunken ) ? use[ 3 ] : use[ NUM_SHADES ]; @@ -452,10 +452,10 @@ hover( HOVER_NONE ), oldCursor( -1, -1 ), formMode( false ), hoverWidget( NULL ), -hoverSect( QTC_NO_SECT ) { +hoverSect( TQTC_NO_SECT ) { TQSettings s; - contrast = s.readNumEntry( "/Qt/KDE/contrast", 7 ); + contrast = s.readNumEntry( "/TQt/KDE/contrast", 7 ); if ( contrast < 0 || contrast > 10 ) contrast = 7; #ifdef USE_SINGLE_STYLE @@ -466,24 +466,24 @@ hoverSect( QTC_NO_SECT ) { darkMenubar = s.readBoolEntry( "/klearlookstyle/Settings/darkMenubar", true ); popupmenuHighlightLevel = s.readNumEntry( "/klearlookstyle/Settings/popupmenuHighlightLevel", 3); - TQString tmp = s.readEntry( "/klearlookstyle/Settings/toolbarBorders", TQString::null ); + TQString tmp = s.readEntry( "/klearlookstyle/Settings/toolbarBorders", TQString() ); toolbarBorders = tmp.isEmpty() ? TB_LIGHT : qtc_to_tbar_border( tmp.latin1() ); bool etched = s.readBoolEntry( "/klearlookstyle/Settings/etched", true ); - tmp = s.readEntry( "/klearlookstyle/Settings/sliderThumbs", TQString::null ); + tmp = s.readEntry( "/klearlookstyle/Settings/sliderThumbs", TQString() ); sliderThumbs = tmp.isEmpty() ? etched ? GROOVE_SUNKEN : GROOVE_RAISED : qtc_to_groove( tmp.latin1() ); - tmp = s.readEntry( "/klearlookstyle/Settings/lvExpander", TQString::null ); + tmp = s.readEntry( "/klearlookstyle/Settings/lvExpander", TQString() ); lvExpander = tmp.isEmpty() ? LV_EXP_ARR : qtc_to_lv_expander( tmp.latin1() ); - tmp = s.readEntry( "/klearlookstyle/Settings/lvLines", TQString::null ); + tmp = s.readEntry( "/klearlookstyle/Settings/lvLines", TQString() ); lvLines = tmp.isEmpty() ? LV_LINES_SOLID : qtc_to_lv_lines( tmp.latin1() ); @@ -511,11 +511,11 @@ hoverSect( QTC_NO_SECT ) { #endif if ( PROFILE_RAISED != pmProfile ) - shadeColors( qApp->palette().active().highlight(), menuPbar ); + shadeColors( tqApp->tqpalette().active().highlight(), menuPbar ); else - shadeGradient( qApp->palette().active().highlight(), menuPbar ); - shadeColors( qApp->palette().active().background(), gray ); - shadeColors( qApp->palette().active().button(), button ); + shadeGradient( tqApp->tqpalette().active().highlight(), menuPbar ); + shadeColors( tqApp->tqpalette().active().background(), gray ); + shadeColors( tqApp->tqpalette().active().button(), button ); } void KlearlookStyle::polish( TQApplication *app ) { @@ -534,11 +534,11 @@ void KlearlookStyle::polish( TQApplication *app ) { #endif } else - themedApp = qstrcmp( qApp->argv() [ 0 ], "soffice.bin" ) ? APP_OTHER : APP_OPENOFFICE; + themedApp = qstrcmp( tqApp->argv() [ 0 ], "soffice.bin" ) ? APP_OTHER : APP_OPENOFFICE; } void KlearlookStyle::polish( TQPalette &pal ) { - int c = TQSettings().readNumEntry( "/Qt/KDE/contrast", 7 ); + int c = TQSettings().readNumEntry( "/TQt/KDE/contrast", 7 ); bool newContrast = false; if ( c < 0 || c > 10 ) @@ -549,18 +549,18 @@ void KlearlookStyle::polish( TQPalette &pal ) { newContrast = true; } - if ( newContrast || gray[ NUM_SHADES ] != qApp->palette().active().background() ) - shadeColors( qApp->palette().active().background(), gray ); + if ( newContrast || gray[ NUM_SHADES ] != tqApp->tqpalette().active().background() ) + shadeColors( tqApp->tqpalette().active().background(), gray ); - if ( newContrast || button[ NUM_SHADES ] != qApp->palette().active().button() ) - shadeColors( qApp->palette().active().button(), button ); + if ( newContrast || button[ NUM_SHADES ] != tqApp->tqpalette().active().button() ) + shadeColors( tqApp->tqpalette().active().button(), button ); if ( PROFILE_RAISED == pmProfile ) { - if ( newContrast || menuPbar[ NUM_SHADES ] != qApp->palette().active().highlight() ) - shadeColors( qApp->palette().active().highlight(), menuPbar ); + if ( newContrast || menuPbar[ NUM_SHADES ] != tqApp->tqpalette().active().highlight() ) + shadeColors( tqApp->tqpalette().active().highlight(), menuPbar ); } else - if ( qApp->palette().active().highlight() != menuPbar[ GRADIENT_BASE ] ) - shadeGradient( qApp->palette().active().highlight(), menuPbar ); + if ( tqApp->tqpalette().active().highlight() != menuPbar[ GRADIENT_BASE ] ) + shadeGradient( tqApp->tqpalette().active().highlight(), menuPbar ); const TQColorGroup &actGroup = pal.active(), &inactGroup = pal.inactive(); @@ -585,35 +585,33 @@ void KlearlookStyle::polish( TQPalette &pal ) { static const char * kdeToolbarWidget = "kde toolbar widget"; void KlearlookStyle::polish( TQWidget *widget ) { - if ( tqqt_cast<TQRadioButton *>( widget ) - || tqqt_cast<TQCheckBox *>( widget ) - || tqqt_cast<TQSpinWidget *>( widget ) - || widget->inherits( "QSplitterHandle" ) ) { -#if QT_VERSION >= 0x030200 + if ( ::tqqt_cast<TQRadioButton *>( widget ) + || ::tqqt_cast<TQCheckBox *>( widget ) + || ::tqqt_cast<TQSpinWidget *>( widget ) + || widget->inherits( TQSPLITTERHANDLE_OBJECT_NAME_STRING ) ) { widget->setMouseTracking( true ); -#endif widget->installEventFilter( this ); - } else if ( tqqt_cast<TQButton *>( widget ) || tqqt_cast<TQComboBox *>( widget ) || - widget->inherits( "QToolBarExtensionWidget" ) ) { + } else if ( ::tqqt_cast<TQButton *>( widget ) || ::tqqt_cast<TQComboBox *>( widget ) || + widget->inherits( "TQToolBarExtensionWidget" ) ) { widget->setBackgroundMode( TQWidget::PaletteBackground ); widget->installEventFilter( this ); - } else if ( tqqt_cast<TQMenuBar *>( widget ) - || tqqt_cast<TQToolBar *>( widget ) - || tqqt_cast<TQPopupMenu *>( widget ) ) + } else if ( ::tqqt_cast<TQMenuBar *>( widget ) + || ::tqqt_cast<TQToolBar *>( widget ) + || ::tqqt_cast<TQPopupMenu *>( widget ) ) widget->setBackgroundMode( TQWidget::PaletteBackground ); else if ( widget->inherits( "KToolBarSeparator" ) ) { widget->setBackgroundMode( TQWidget::NoBackground ); widget->installEventFilter( this ); - } else if ( tqqt_cast<TQScrollBar *>( widget ) ) { + } else if ( ::tqqt_cast<TQScrollBar *>( widget ) ) { widget->setMouseTracking( true ); widget->installEventFilter( this ); widget->setBackgroundMode( TQWidget::NoBackground ); - } else if ( tqqt_cast<TQSlider *>( widget ) || tqqt_cast<TQHeader *>( widget ) ) { + } else if ( ::tqqt_cast<TQSlider *>( widget ) || ::tqqt_cast<TQHeader *>( widget ) ) { widget->setMouseTracking( true ); widget->installEventFilter( this ); @@ -626,36 +624,34 @@ void KlearlookStyle::polish( TQWidget *widget ) { } void KlearlookStyle::unPolish( TQWidget *widget ) { - if ( tqqt_cast<TQRadioButton *>( widget ) || - tqqt_cast<TQCheckBox *>( widget ) || - tqqt_cast<TQSpinWidget *>( widget ) || - widget->inherits( "QSplitterHandle" ) ) { -#if QT_VERSION >= 0x030200 + if ( ::tqqt_cast<TQRadioButton *>( widget ) || + ::tqqt_cast<TQCheckBox *>( widget ) || + ::tqqt_cast<TQSpinWidget *>( widget ) || + widget->inherits( TQSPLITTERHANDLE_OBJECT_NAME_STRING ) ) { widget->setMouseTracking( false ); -#endif widget->removeEventFilter( this ); - } else if ( tqqt_cast<TQButton *>( widget ) || tqqt_cast<TQComboBox *>( widget ) || - widget->inherits( "QToolBarExtensionWidget" ) ) { + } else if ( ::tqqt_cast<TQButton *>( widget ) || ::tqqt_cast<TQComboBox *>( widget ) || + widget->inherits( "TQToolBarExtensionWidget" ) ) { widget->setBackgroundMode( TQWidget::PaletteButton ); widget->removeEventFilter( this ); - } else if ( tqqt_cast<TQMenuBar *>( widget ) || - tqqt_cast<TQToolBar *>( widget ) || - tqqt_cast<TQPopupMenu *>( widget ) ) + } else if ( ::tqqt_cast<TQMenuBar *>( widget ) || + ::tqqt_cast<TQToolBar *>( widget ) || + ::tqqt_cast<TQPopupMenu *>( widget ) ) widget->setBackgroundMode( TQWidget::PaletteBackground ); else if ( widget->inherits( "KToolBarSeparator" ) ) { widget->setBackgroundMode( PaletteBackground ); widget->removeEventFilter( this ); - } else if ( tqqt_cast<TQScrollBar *>( widget ) ) { + } else if ( ::tqqt_cast<TQScrollBar *>( widget ) ) { widget->setMouseTracking( false ); widget->removeEventFilter( this ); widget->setBackgroundMode( TQWidget::PaletteButton ); - } else if ( tqqt_cast<TQSlider *>( widget ) || - tqqt_cast<TQHeader *>( widget ) ) { + } else if ( ::tqqt_cast<TQSlider *>( widget ) || + ::tqqt_cast<TQHeader *>( widget ) ) { widget->setMouseTracking( false ); widget->removeEventFilter( this ); @@ -668,38 +664,38 @@ void KlearlookStyle::unPolish( TQWidget *widget ) { } bool KlearlookStyle::eventFilter( TQObject *object, TQEvent *event ) { - if ( object->parent() && 0 == qstrcmp( object->name(), kdeToolbarWidget ) ) { + if ( object->tqparent() && 0 == qstrcmp( object->name(), kdeToolbarWidget ) ) { // Draw background for custom widgets in the toolbar that have specified a "kde toolbar widget" name. if ( TQEvent::Paint == event->type() ) { - TQWidget * widget = static_cast<TQWidget*>( object ), - *parent = static_cast<TQWidget*>( object->parent() ); -#ifdef QTC_GRADIENT_TOOLBARS_AND_MENUBARS + TQWidget * widget = TQT_TQWIDGET( object ), + *tqparent = TQT_TQWIDGET( object->tqparent() ); +#ifdef TQTC_GRADIENT_TOOLBARS_AND_MENUBARS // Find the top-level toolbar of this widget, since it may be nested in other // widgets that are on the toolbar. int x_offset = widget->x(), y_offset = widget->y(); - while ( parent && parent->parent() && !qstrcmp( parent->name(), kdeToolbarWidget ) ) { - x_offset += parent->x(); - y_offset += parent->y(); - parent = static_cast<TQWidget*>( parent->parent() ); + while ( tqparent && tqparent->tqparent() && !qstrcmp( tqparent->name(), kdeToolbarWidget ) ) { + x_offset += tqparent->x(); + y_offset += tqparent->y(); + tqparent = TQT_TQWIDGET( tqparent->tqparent() ); } - TQRect pr( parent->rect() ); + TQRect pr( tqparent->rect() ); bool horiz_grad = pr.width() < pr.height(); - // Check if the parent is a QToolbar, and use its orientation, else guess. - TQToolBar *toolbar = dynamic_cast<TQToolBar*>( parent ); + // Check if the tqparent is a TQToolbar, and use its orientation, else guess. + TQToolBar *toolbar = dynamic_cast<TQToolBar*>( tqparent ); if ( toolbar ) - horiz_grad = toolbar->orientation() == Qt::Vertical; + horiz_grad = toolbar->orientation() == TQt::Vertical; - drawBevelGradient( parent->colorGroup().background(), true, 1, &TQPainter( widget ), + drawBevelGradient( tqparent->tqcolorGroup().background(), true, 1, &TQPainter( widget ), TQRect( x_offset, y_offset, pr.width(), pr.height() ), horiz_grad, SHADE_BAR_LIGHT, SHADE_BAR_DARK ); #else - TQPainter( widget ).fillRect( widget->rect(), parent->colorGroup().background() ); + TQPainter( widget ).fillRect( widget->rect(), tqparent->tqcolorGroup().background() ); #endif return false; // Now draw the contents @@ -710,11 +706,11 @@ bool KlearlookStyle::eventFilter( TQObject *object, TQEvent *event ) { if ( frame && TQFrame::NoFrame != frame->frameShape() ) { TQPainter painter( frame ); if ( TQFrame::VLine == frame->frameShape() ) - drawPrimitive( PE_DockWindowSeparator, &painter, - frame->rect(), frame->colorGroup(), Style_Horizontal ); + tqdrawPrimitive( PE_DockWindowSeparator, &painter, + frame->rect(), frame->tqcolorGroup(), Style_Horizontal ); else if ( TQFrame::HLine == frame->frameShape() ) - drawPrimitive( PE_DockWindowSeparator, &painter, - frame->rect(), frame->colorGroup() ); + tqdrawPrimitive( PE_DockWindowSeparator, &painter, + frame->rect(), frame->tqcolorGroup() ); else return false; return true; // been drawn! @@ -726,7 +722,7 @@ bool KlearlookStyle::eventFilter( TQObject *object, TQEvent *event ) { hoverWidget = ( TQWidget * ) object; if ( hoverWidget && hoverWidget->isEnabled() ) { if ( redrawHoverWidget() ) { - hoverWidget->repaint( false ); + hoverWidget->tqrepaint( false ); if ( APP_KICKER == themedApp ) hover = HOVER_NONE; } @@ -736,17 +732,17 @@ bool KlearlookStyle::eventFilter( TQObject *object, TQEvent *event ) { } break; case TQEvent::Leave: - if ( hoverWidget && object == hoverWidget ) { + if ( hoverWidget && TQT_BASE_OBJECT(object) == TQT_BASE_OBJECT(hoverWidget) ) { oldCursor.setX( -1 ); oldCursor.setY( -1 ); hoverWidget = NULL; - ( ( TQWidget * ) object ) ->repaint( false ); + ( ( TQWidget * ) object ) ->tqrepaint( false ); } break; case TQEvent::MouseMove: if ( hoverWidget && object->isWidgetType() ) { if ( redrawHoverWidget() ) { - hoverWidget->repaint( false ); + hoverWidget->tqrepaint( false ); if ( APP_KICKER == themedApp ) hover = HOVER_NONE; } @@ -821,8 +817,8 @@ void KlearlookStyle::drawLightBevelButton( if ( borderButton ) if ( rounded && ROUNDED_NONE != round ) { - bool wide = r.width() >= QTC_MIN_BTN_SIZE, - tall = r.height() >= QTC_MIN_BTN_SIZE; + bool wide = r.width() >= TQTC_MIN_BTN_SIZE, + tall = r.height() >= TQTC_MIN_BTN_SIZE; TQColor border( flags & Style_ButtonDefault && IND_FONT_COLOUR == defBtnIndicator & flags & Style_Enabled ? cg.text() : custom ? custom[ 5 ] : gray[ 5 ] ); @@ -1037,8 +1033,8 @@ void KlearlookStyle::drawLightBevel( if ( borderButton ) if ( rounded && ROUNDED_NONE != round ) { - bool wide = r.width() >= QTC_MIN_BTN_SIZE, - tall = r.height() >= QTC_MIN_BTN_SIZE; + bool wide = r.width() >= TQTC_MIN_BTN_SIZE, + tall = r.height() >= TQTC_MIN_BTN_SIZE; TQColor border = menuPbar[ GRADIENT_BASE ].dark( 130 ); @@ -1194,7 +1190,7 @@ void KlearlookStyle::drawLightBevel( } void KlearlookStyle::drawArrow( TQPainter *p, const TQRect &r, const TQColorGroup &cg, TQStyle::SFlags flags, - TQStyle::PrimitiveElement pe, bool small, bool checkActive ) const { + TQStyle::TQ_PrimitiveElement pe, bool small, bool checkActive ) const { TQPointArray a; const TQColor &col = flags & Style_Enabled ? checkActive && flags & Style_Active @@ -1284,7 +1280,7 @@ void KlearlookStyle::drawArrow( TQPainter *p, const TQRect &r, const TQColorGrou p->restore(); } -void KlearlookStyle::drawPrimitiveMenu( PrimitiveElement pe, TQPainter *p, const TQRect &r, const TQColorGroup &cg, +void KlearlookStyle::tqdrawPrimitiveMenu( TQ_PrimitiveElement pe, TQPainter *p, const TQRect &r, const TQColorGroup &cg, SFlags flags, const TQStyleOption &data ) const { switch ( pe ) { case PE_CheckMark: @@ -1319,11 +1315,11 @@ void KlearlookStyle::drawPrimitiveMenu( PrimitiveElement pe, TQPainter *p, const break; default: - KStyle::drawPrimitive( pe, p, r, cg, flags, data ); + KStyle::tqdrawPrimitive( pe, p, r, cg, flags, data ); } } -void KlearlookStyle::drawPrimitive( PrimitiveElement pe, TQPainter *p, const TQRect &r, const TQColorGroup &cg, +void KlearlookStyle::tqdrawPrimitive( TQ_PrimitiveElement pe, TQPainter *p, const TQRect &r, const TQColorGroup &cg, SFlags flags, const TQStyleOption &data ) const { int x, y, w, h; @@ -1358,7 +1354,7 @@ void KlearlookStyle::drawPrimitive( PrimitiveElement pe, TQPainter *p, const TQR } else { flags = ( ( flags | Style_Sunken ) ^ Style_Sunken ) | Style_Raised; - if ( QTC_NO_SECT != hoverSect && HOVER_HEADER == hover && hoverWidget ) { + if ( TQTC_NO_SECT != hoverSect && HOVER_HEADER == hover && hoverWidget ) { TQHeader * hd = dynamic_cast<TQHeader *>( hoverWidget ); if ( hd && hd->isClickEnabled( hoverSect ) && r == hd->sectionRect( hoverSect ) ) @@ -1399,7 +1395,7 @@ void KlearlookStyle::drawPrimitive( PrimitiveElement pe, TQPainter *p, const TQR const TQColor * use = buttonColors( cg ); p->setPen( use[ 4 ] ); - int offset = r.width() >= QTC_MIN_BTN_SIZE && r.height() >= QTC_MIN_BTN_SIZE ? 4 : 3; + int offset = r.width() >= TQTC_MIN_BTN_SIZE && r.height() >= TQTC_MIN_BTN_SIZE ? 4 : 3; p->drawLine( r.x() + offset, r.y(), r.x() + r.width() - ( 1 + offset ), r.y() ); p->drawLine( r.x() + offset, r.y() + r.height() - 1, @@ -1479,11 +1475,11 @@ void KlearlookStyle::drawPrimitive( PrimitiveElement pe, TQPainter *p, const TQR int x = r.x(), y = r.y(), w = r.width(), h = r.height(), marg = lv->itemMargin(); p->setPen( TQPen( flags & Style_Enabled ? cg.text() - : lv->palette().color( TQPalette::Disabled, TQColorGroup::Text ) ) ); + : lv->tqpalette().color( TQPalette::Disabled, TQColorGroup::Text ) ) ); if ( flags & Style_Selected && !lv->rootIsDecorated() && - !( ( item->parent() && 1 == item->parent() ->rtti() && - TQCheckListItem::Controller == ( ( TQCheckListItem* ) item->parent() ) ->type() ) )) { + !( ( item->tqparent() && 1 == item->tqparent() ->rtti() && + TQCheckListItem::Controller == ( ( TQCheckListItem* ) item->tqparent() ) ->type() ) )) { p->fillRect( 0, 0, x + marg + w + 4, item->height(), cg.brush( TQColorGroup::Highlight ) ); if ( item->isEnabled() ) @@ -1504,13 +1500,13 @@ void KlearlookStyle::drawPrimitive( PrimitiveElement pe, TQPainter *p, const TQR TQListView * lv = item->listView(); p->setPen( TQPen( flags & Style_Enabled ? cg.text() - : lv->palette().color( TQPalette::Disabled, TQColorGroup::Text ), 2 ) ); + : lv->tqpalette().color( TQPalette::Disabled, TQColorGroup::Text ), 2 ) ); if ( flags & Style_Selected ) { flags -= Style_Selected; if ( !lv->rootIsDecorated() && - !( ( item->parent() && 1 == item->parent() ->rtti() && + !( ( item->tqparent() && 1 == item->tqparent() ->rtti() && TQCheckListItem::Controller == - ( ( TQCheckListItem* ) item->parent() ) ->type() ) ) ) { + ( ( TQCheckListItem* ) item->tqparent() ) ->type() ) ) ) { p->fillRect( 0, 0, r.x() + lv->itemMargin() + r.width() + 4, item->height(), cg.brush( TQColorGroup::Highlight ) ); if ( item->isEnabled() ) { @@ -1524,7 +1520,7 @@ void KlearlookStyle::drawPrimitive( PrimitiveElement pe, TQPainter *p, const TQR p->setBrush( cg.brush( TQColorGroup::Button ) ); p->drawRect( r.x() + lv->itemMargin(), r.y() + 2, r.width() - 4, r.width() - 4 ); if ( flags & TQStyle::Style_On || !( flags & Style_Off ) ) - drawPrimitive( PE_CheckMark, p, TQRect( r.x() + lv->itemMargin(), + tqdrawPrimitive( PE_CheckMark, p, TQRect( r.x() + lv->itemMargin(), r.y() + 2, r.width() - 4, r.width() - 4 ), cg, flags ); } break; @@ -1534,13 +1530,13 @@ void KlearlookStyle::drawPrimitive( PrimitiveElement pe, TQPainter *p, const TQR bool on = flags & TQStyle::Style_On || !( flags & Style_Off ); if ( APPEARANCE_FLAT != appearance ) - drawPrimitive( PE_ButtonTool, p, r, cg, flags ); + tqdrawPrimitive( PE_ButtonTool, p, r, cg, flags ); else { - p->fillRect( r.x() + 1, r.y() + 2, QTC_CHECK_SIZE - 2, QTC_CHECK_SIZE - 2, + p->fillRect( r.x() + 1, r.y() + 2, TQTC_CHECK_SIZE - 2, TQTC_CHECK_SIZE - 2, flags & Style_Enabled ? cg.base() : cg.background() ); p->setPen( use[ 4 ] ); - p->drawLine( r.x() + 1, r.y() + QTC_CHECK_SIZE - 1, r.x() + 1, r.y() + 1 ); - p->drawLine( r.x() + 1, r.y() + 1, r.x() + QTC_CHECK_SIZE - 2, r.y() + 1 ); + p->drawLine( r.x() + 1, r.y() + TQTC_CHECK_SIZE - 1, r.x() + 1, r.y() + 1 ); + p->drawLine( r.x() + 1, r.y() + 1, r.x() + TQTC_CHECK_SIZE - 2, r.y() + 1 ); } p->setPen( use[ 5 ] ); p->setBrush( NoBrush ); @@ -1556,10 +1552,10 @@ void KlearlookStyle::drawPrimitive( PrimitiveElement pe, TQPainter *p, const TQR p->drawPoint( r.x() + r.height() - 1, r.y() ); p->drawPoint( r.x() + r.height() - 1, r.y() + r.width() - 1 ); } else if ( APPEARANCE_FLAT == appearance || borderButton ) - p->drawRect( r.x(), r.y(), QTC_CHECK_SIZE, QTC_CHECK_SIZE ); + p->drawRect( r.x(), r.y(), TQTC_CHECK_SIZE, TQTC_CHECK_SIZE ); if ( on ) - drawPrimitive( PE_CheckMark, p, r, cg, flags ); + tqdrawPrimitive( PE_CheckMark, p, r, cg, flags ); break; } case PE_CheckListExclusiveIndicator: { @@ -1625,8 +1621,8 @@ void KlearlookStyle::drawPrimitive( PrimitiveElement pe, TQPainter *p, const TQR if ( PE_ExclusiveIndicatorMask == pe ) { p->fillRect( r, color0 ); - p->setPen( Qt::color1 ); - p->setBrush( Qt::color1 ); + p->setPen( TQt::color1 ); + p->setBrush( TQt::color1 ); p->drawPolygon( outer ); } else { TQPointArray shadow; @@ -1656,7 +1652,7 @@ void KlearlookStyle::drawPrimitive( PrimitiveElement pe, TQPainter *p, const TQR x + 8, y + 1 ); p->fillRect( r, crLabelHighlight && flags & Style_MouseOver - ? cg.background().light( QTC_HIGHLIGHT_FACTOR ) : cg.background() ); + ? TQColor(cg.background().light( TQTC_HIGHLIGHT_FACTOR )) : cg.background() ); if ( APPEARANCE_FLAT != appearance ) { indBgnd = getFill( flags, use ); @@ -1699,7 +1695,7 @@ void KlearlookStyle::drawPrimitive( PrimitiveElement pe, TQPainter *p, const TQR rightShadowColor = bgnd; p->setBrush( bgnd ); p->setPen( bgnd ); - p->drawEllipse( x, y, QTC_RADIO_SIZE, QTC_RADIO_SIZE ); + p->drawEllipse( x, y, TQTC_RADIO_SIZE, TQTC_RADIO_SIZE ); p->setPen( use[ 4 ] ); leftShadowColor = use[ 4 ]; p->drawPolyline( shadow ); @@ -1806,7 +1802,7 @@ void KlearlookStyle::drawPrimitive( PrimitiveElement pe, TQPainter *p, const TQR else { p->fillRect( r, TQColor( flags & Style_MouseOver ? - cg.background().light( QTC_HIGHLIGHT_FACTOR ) : + TQColor(cg.background().light( TQTC_HIGHLIGHT_FACTOR )) : cg.background() ) ); drawLines( p, r, flags & Style_Horizontal, 70, 1, use, 0, TRUE, APPEARANCE_LIGHT_GRADIENT == appearance ); @@ -1859,7 +1855,7 @@ void KlearlookStyle::drawPrimitive( PrimitiveElement pe, TQPainter *p, const TQR TQColorGroup( use[ 4 ], use[ NUM_SHADES ], use[ 0 ], use[ 4 ], use[ 2 ], cg.text(), use[ NUM_SHADES ] ), flags & Style_Sunken, - data.isDefault() ? QTC_BORDERED_FRAME_WIDTH - 1 : data.lineWidth() - 1 ); + data.isDefault() ? TQTC_BORDERED_FRAME_WIDTH - 1 : data.lineWidth() - 1 ); #endif } else @@ -1868,7 +1864,7 @@ void KlearlookStyle::drawPrimitive( PrimitiveElement pe, TQPainter *p, const TQR use[ 5 ], use[ NUM_SHADES ], use[ 0 ], use[ 5 ], use[ 2 ], cg.text(), use[ NUM_SHADES ] ), - flags & Style_Sunken, data.isDefault() ? QTC_DEF_FRAME_WIDTH : data.lineWidth() ); + flags & Style_Sunken, data.isDefault() ? TQTC_DEF_FRAME_WIDTH : data.lineWidth() ); break; } case PE_PanelTabWidget: { @@ -1884,7 +1880,7 @@ void KlearlookStyle::drawPrimitive( PrimitiveElement pe, TQPainter *p, const TQR TQColorGroup( use[ 4 ], use[ NUM_SHADES ], use[ 0 ], use[ 4 ], use[ 2 ], cg.text(), use[ NUM_SHADES ] ), flags & Style_Sunken, - data.isDefault() ? QTC_BORDERED_FRAME_WIDTH - 1 : data.lineWidth() - 1 ); + data.isDefault() ? TQTC_BORDERED_FRAME_WIDTH - 1 : data.lineWidth() - 1 ); #endif } else @@ -1893,7 +1889,7 @@ void KlearlookStyle::drawPrimitive( PrimitiveElement pe, TQPainter *p, const TQR use[ 5 ], use[ NUM_SHADES ], use[ 0 ], use[ 5 ], use[ 2 ], cg.text(), use[ NUM_SHADES ] ), - flags & Style_Sunken, data.isDefault() ? QTC_DEF_FRAME_WIDTH : data.lineWidth() ); + flags & Style_Sunken, data.isDefault() ? TQTC_DEF_FRAME_WIDTH : data.lineWidth() ); break; } case PE_PanelDockWindow: @@ -1910,7 +1906,7 @@ void KlearlookStyle::drawPrimitive( PrimitiveElement pe, TQPainter *p, const TQR flags & Style_Sunken, 1 ); -#ifdef QTC_GRADIENT_TOOLBARS_AND_MENUBARS +#ifdef TQTC_GRADIENT_TOOLBARS_AND_MENUBARS if ( APPEARANCE_FLAT != appearance ) drawBevelGradient( use[ NUM_SHADES ], @@ -1931,7 +1927,7 @@ void KlearlookStyle::drawPrimitive( PrimitiveElement pe, TQPainter *p, const TQR flags & Style_Sunken, 1 ); -#ifdef QTC_GRADIENT_TOOLBARS_AND_MENUBARS +#ifdef TQTC_GRADIENT_TOOLBARS_AND_MENUBARS if ( APPEARANCE_FLAT != appearance ) drawBevelGradient( use[ NUM_SHADES ], @@ -1968,7 +1964,7 @@ void KlearlookStyle::drawPrimitive( PrimitiveElement pe, TQPainter *p, const TQR PE_ArrowDown == pe ? ROUNDED_BOTTOM : PE_ArrowUp == pe ? ROUNDED_TOP : ROUNDED_NONE, getFill( flags, use ), use ); - drawPrimitive( pe, p, r, cg, flags ); + tqdrawPrimitive( pe, p, r, cg, flags ); break; } case PE_ScrollBarSubPage: @@ -2037,7 +2033,7 @@ void KlearlookStyle::drawPrimitive( PrimitiveElement pe, TQPainter *p, const TQR break; } default: - KStyle::drawPrimitive( pe, p, r, cg, flags, data ); + KStyle::tqdrawPrimitive( pe, p, r, cg, flags, data ); } } @@ -2058,7 +2054,7 @@ void KlearlookStyle::drawKStylePrimitive( KStylePrimitive kpe, TQPainter *p, con drawSliderHandle( p, r, cg, flags ); break; case KPE_ListViewExpander: { - int lvSize = QTC_LV_SIZE( lvExpander ); + int lvSize = TQTC_LV_SIZE( lvExpander ); TQRect ar( r.x() + ( ( r.width() - ( lvSize + 4 ) ) >> 1 ), r.y() + ( ( r.height() - ( lvSize + 4 ) ) >> 1 ), lvSize + 4, lvSize + 4 ); @@ -2200,7 +2196,7 @@ void KlearlookStyle::drawKStylePrimitive( KStylePrimitive kpe, TQPainter *p, con } } -void KlearlookStyle::drawControl( +void KlearlookStyle::tqdrawControl( ControlElement control, TQPainter *p, const TQWidget *widget, @@ -2216,11 +2212,11 @@ void KlearlookStyle::drawControl( bool cornerWidget = false, firstTab = 0 == tb->indexOf( data.tab() ->identifier() ); - if ( tqqt_cast<const TQTabWidget *>( tb->parent() ) ) { - const TQTabWidget * tw = ( const TQTabWidget* ) tb->parent(); + if ( ::tqqt_cast<const TQTabWidget *>( tb->tqparent() ) ) { + const TQTabWidget * tw = ( const TQTabWidget* ) tb->tqparent(); // is there a corner widget in the (top) left edge? - if ( tw->cornerWidget( Qt::TopLeft ) ) + if ( tw->cornerWidget( TQt::TopLeft ) ) cornerWidget = true; } @@ -2229,7 +2225,7 @@ void KlearlookStyle::drawControl( fr( r ); int offset = rounded ? 2 : 0; - switch ( tb->shape() ) { + switch ( tb->tqshape() ) { case TQTabBar::TriangularAbove: case TQTabBar::RoundedAbove: if ( flags & Style_Selected ) { @@ -2379,12 +2375,12 @@ void KlearlookStyle::drawControl( p->fillRect( fr, flags & Style_Selected ? cg.background() : gray[ 2 ] ); break; default: - KStyle::drawControl( control, p, widget, r, cg, flags, data ); + KStyle::tqdrawControl( control, p, widget, r, cg, flags, data ); } } else { TQRect br( r ); - switch ( tb->shape() ) { + switch ( tb->tqshape() ) { case TQTabBar::TriangularAbove: case TQTabBar::RoundedAbove: if ( flags & Style_Selected ) { @@ -2460,7 +2456,6 @@ void KlearlookStyle::drawControl( } break; } -#if QT_VERSION >= 0x030200 case CE_TabBarLabel: { if ( data.isDefault() ) break; @@ -2470,19 +2465,18 @@ void KlearlookStyle::drawControl( TQRect tr = r; if ( t->identifier() == tb->currentTab() ) { - if ( TQTabBar::RoundedAbove == tb->shape() || TQTabBar::TriangularAbove == tb->shape() ) - tr.setBottom( tr.bottom() - pixelMetric( TQStyle::PM_TabBarTabShiftVertical, tb ) ); + if ( TQTabBar::RoundedAbove == tb->tqshape() || TQTabBar::TriangularAbove == tb->tqshape() ) + tr.setBottom( tr.bottom() - tqpixelMetric( TQStyle::PM_TabBarTabShiftVertical, tb ) ); } else - if ( TQTabBar::RoundedBelow == tb->shape() || TQTabBar::TriangularBelow == tb->shape() ) - tr.setTop( tr.top() + pixelMetric( TQStyle::PM_TabBarTabShiftVertical, tb ) ); + if ( TQTabBar::RoundedBelow == tb->tqshape() || TQTabBar::TriangularBelow == tb->tqshape() ) + tr.setTop( tr.top() + tqpixelMetric( TQStyle::PM_TabBarTabShiftVertical, tb ) ); drawItem( p, tr, AlignCenter | ShowPrefix, cg, flags & Style_Enabled, 0, t->text() ); if ( ( flags & Style_HasFocus ) && !t->text().isEmpty() ) - drawPrimitive( PE_FocusRect, p, r, cg ); + tqdrawPrimitive( PE_FocusRect, p, r, cg ); break; } -#endif case CE_PushButtonLabel: // Taken from Highcolour and Plastik... { int x, y, w, h; @@ -2495,23 +2489,23 @@ void KlearlookStyle::drawControl( // Shift button contents if pushed. if ( active ) { - x += pixelMetric( PM_ButtonShiftHorizontal, widget ); - y += pixelMetric( PM_ButtonShiftVertical, widget ); + x += tqpixelMetric( PM_ButtonShiftHorizontal, widget ); + y += tqpixelMetric( PM_ButtonShiftVertical, widget ); flags |= Style_Sunken; } // Does the button have a popup menu? if ( button->isMenuButton() ) { - int dx = pixelMetric( PM_MenuButtonIndicator, widget ), - margin = pixelMetric( PM_ButtonMargin, widget ); + int dx = tqpixelMetric( PM_MenuButtonIndicator, widget ), + margin = tqpixelMetric( PM_ButtonMargin, widget ); if ( button->iconSet() && !button->iconSet() ->isNull() && ( dx + button->iconSet() ->pixmap ( TQIconSet::Small, TQIconSet::Normal, TQIconSet::Off ).width() ) >= w ) cornArrow = true; //To little room. Draw the arrow in the corner, don't adjust the widget else { - drawPrimitive( PE_ArrowDown, - p, visualRect( TQRect( + tqdrawPrimitive( PE_ArrowDown, + p, tqvisualRect( TQRect( ( x + w ) - ( dx + margin ), y, dx, h ), r ), cg, flags, data ); @@ -2543,7 +2537,7 @@ void KlearlookStyle::drawControl( pixmap ); else { iw = button->pixmap() ? button->pixmap() ->width() - : widget->fontMetrics().size( Qt::ShowPrefix, button->text() ).width(); + : widget->fontMetrics().size( TQt::ShowPrefix, button->text() ).width(); int cw = iw + pw + constSpace; @@ -2553,7 +2547,7 @@ void KlearlookStyle::drawControl( } if ( cornArrow ) //Draw over the icon - drawPrimitive( PE_ArrowDown, p, visualRect( TQRect( x + w - 6, x + h - 6, 7, 7 ), r ), + tqdrawPrimitive( PE_ArrowDown, p, tqvisualRect( TQRect( x + w - 6, x + h - 6, 7, 7 ), r ), cg, flags, data ); if ( xo && iw ) { @@ -2572,16 +2566,16 @@ void KlearlookStyle::drawControl( for ( i = 0; i < j; i++ ) drawItem( p, TQRect( x + i, y, w, h ), AlignCenter | ShowPrefix, - button->colorGroup(), + button->tqcolorGroup(), button->isEnabled(), button->pixmap(), button->text(), -1, - &button->colorGroup().buttonText() ); + &button->tqcolorGroup().buttonText() ); //Draw a focus rect if the button has focus if ( flags & Style_HasFocus ) - drawPrimitive( PE_FocusRect, p, - TQStyle::visualRect( subRect( SR_PushButtonFocusRect, widget ), widget ), cg, flags ); + tqdrawPrimitive( PE_FocusRect, p, + TQStyle::tqvisualRect( subRect( SR_PushButtonFocusRect, widget ), widget ), cg, flags ); break; } @@ -2616,7 +2610,7 @@ void KlearlookStyle::drawControl( break; } - maxpmw = QMAX( maxpmw, 16 ); + maxpmw = TQMAX( maxpmw, 16 ); TQRect cr, ir, tr, sr; if (menuIcons) { @@ -2642,10 +2636,10 @@ void KlearlookStyle::drawControl( bool reverse = TQApplication::reverseLayout(); if ( reverse ) { - cr = visualRect( cr, r ); - sr = visualRect( sr, r ); - tr = visualRect( tr, r ); - ir = visualRect( ir, r ); + cr = tqvisualRect( cr, r ); + sr = tqvisualRect( sr, r ); + tr = tqvisualRect( tr, r ); + ir = tqvisualRect( ir, r ); } if ( mi->iconSet() && menuIcons ) { @@ -2653,7 +2647,7 @@ void KlearlookStyle::drawControl( TQIconSet::Mode mode = flags & Style_Active ? ( mi->isEnabled() ? TQIconSet::Active : TQIconSet::Disabled ) : ( mi->isEnabled() ? TQIconSet::Normal : TQIconSet::Disabled ); - cr = visualRect( TQRect( x, y, maxpmw, h ), r ); + cr = tqvisualRect( TQRect( x, y, maxpmw, h ), r ); // Do we have an icon and are checked at the same time? // Then draw a "pressed" background behind the icon @@ -2686,7 +2680,7 @@ void KlearlookStyle::drawControl( ir.setCoords( cr.right() + 2, r.top(), tr.right() - 4, r.bottom() ); TQBrush brush( mi->isEnabled() ? cg.highlightedText() : cg.background() ); - drawPrimitiveMenu( PE_CheckMark, p, cr, cg, + tqdrawPrimitiveMenu( PE_CheckMark, p, cr, cg, ( flags & ( Style_Enabled | Style_Active ) ) | Style_On ); } @@ -2724,7 +2718,7 @@ void KlearlookStyle::drawControl( TQString text = mi->text(); if ( !text.isNull() ) { - int t = text.find( '\t' ); + int t = text.tqfind( '\t' ); // draw accelerator/tab-text if ( t >= 0 ) { @@ -2760,10 +2754,10 @@ void KlearlookStyle::drawControl( TQPixmap pixmap = *mi->pixmap(); if ( 1 == pixmap.depth() ) - p->setBackgroundMode( OpaqueMode ); + p->setBackgroundMode( Qt::OpaqueMode ); p->drawPixmap( ir.x(), ( ir.height() - pixmap.height() ) >> 1, pixmap ); if ( pixmap.depth() == 1 ) - p->setBackgroundMode( TransparentMode ); + p->setBackgroundMode( Qt::TransparentMode ); } if ( mi->popup() ) @@ -2777,7 +2771,7 @@ void KlearlookStyle::drawControl( drawPBarOrMenu2( p, TQRect(r.x(), r.y(), r.width(), r.height()), true, cg, true ); } else -#ifdef QTC_GRADIENT_TOOLBARS_AND_MENUBARS +#ifdef TQTC_GRADIENT_TOOLBARS_AND_MENUBARS if ( APPEARANCE_FLAT != appearance ) drawBevelGradient( cg.background(), true, 0, p, r, @@ -2819,7 +2813,7 @@ void KlearlookStyle::drawControl( break; case CE_DockWindowEmptyArea: -#ifdef QTC_GRADIENT_TOOLBARS_AND_MENUBARS +#ifdef TQTC_GRADIENT_TOOLBARS_AND_MENUBARS if ( APPEARANCE_FLAT != appearance ) drawBevelGradient( cg.background(), true, 1, p, r, true, SHADE_BAR_LIGHT, SHADE_BAR_DARK ); @@ -2847,7 +2841,7 @@ void KlearlookStyle::drawControl( if ( cr.isValid() && ( progress > 0 || steps == 0 ) ) { double pg = ( steps == 0 ) ? 0.1 : progress / steps; - int width = QMIN( cr.width(), ( int ) ( pg * cr.width() ) ); + int width = TQMIN( cr.width(), ( int ) ( pg * cr.width() ) ); if ( 0 == steps ) //Busy indicator { @@ -2885,7 +2879,7 @@ void KlearlookStyle::drawControl( case CE_PushButton: { const TQPushButton *button = static_cast<const TQPushButton *>( widget ); TQRect br( r ); - int dbi = pixelMetric( PM_ButtonDefaultIndicator, widget ); + int dbi = tqpixelMetric( PM_ButtonDefaultIndicator, widget ); if ( rounded && isFormWidget( widget ) ) formMode = true; @@ -2901,55 +2895,47 @@ void KlearlookStyle::drawControl( p->save(); p->setBrushOrigin( -widget->backgroundOffset().x(), -widget->backgroundOffset().y() ); // draw button - drawPrimitive( PE_ButtonCommand, p, br, cg, flags ); + tqdrawPrimitive( PE_ButtonCommand, p, br, cg, flags ); if ( button->isDefault() && IND_FONT_COLOUR != defBtnIndicator ) - drawPrimitive( PE_ButtonDefault, p, r, cg, flags ); + tqdrawPrimitive( PE_ButtonDefault, p, r, cg, flags ); p->restore(); formMode = false; break; } case CE_CheckBox: - drawPrimitive( PE_Indicator, p, r, cg, flags, data ); + tqdrawPrimitive( PE_Indicator, p, r, cg, flags, data ); break; case CE_CheckBoxLabel: if ( crLabelHighlight ) { const TQCheckBox * checkbox = ( const TQCheckBox * ) widget; if ( flags & Style_MouseOver && -#if QT_VERSION >= 0x030200 HOVER_CHECK == hover && hoverWidget == widget && -#endif !isFormWidget( widget ) ) { -#if QT_VERSION >= 0x030200 TQRect cr( checkbox->rect() ); TQRegion r( TQRect( cr.x(), cr.y(), - visualRect( subRect( SR_CheckBoxFocusRect, widget ), widget ).width() + - pixelMetric( PM_IndicatorWidth ) + 4, cr.height() ) ); + tqvisualRect( subRect( SR_CheckBoxFocusRect, widget ), widget ).width() + + tqpixelMetric( PM_IndicatorWidth ) + 4, cr.height() ) ); -#else - - TQRegion r( checkbox->rect() ); -#endif - - r -= visualRect( subRect( SR_CheckBoxIndicator, widget ), widget ); + r -= tqvisualRect( subRect( SR_CheckBoxIndicator, widget ), widget ); p->setClipRegion( r ); - p->fillRect( checkbox->rect(), cg.background().light( QTC_HIGHLIGHT_FACTOR ) ); + p->fillRect( checkbox->rect(), cg.background().light( TQTC_HIGHLIGHT_FACTOR ) ); p->setClipping( false ); } - int alignment = TQApplication::reverseLayout() ? AlignRight : AlignLeft; + int tqalignment = TQApplication::reverseLayout() ? AlignRight : AlignLeft; - drawItem( p, r, alignment | AlignVCenter | ShowPrefix, cg, + drawItem( p, r, tqalignment | AlignVCenter | ShowPrefix, cg, flags & Style_Enabled, checkbox->pixmap(), checkbox->text() ); if ( checkbox->hasFocus() ) - drawPrimitive( PE_FocusRect, p, - visualRect( subRect( SR_CheckBoxFocusRect, widget ), widget ), cg, flags ); + tqdrawPrimitive( PE_FocusRect, p, + tqvisualRect( subRect( SR_CheckBoxFocusRect, widget ), widget ), cg, flags ); } else - KStyle::drawControl( control, p, widget, r, cg, flags, data ); + KStyle::tqdrawControl( control, p, widget, r, cg, flags, data ); break; case CE_RadioButton: formMode = isFormWidget( widget ); - drawPrimitive( PE_ExclusiveIndicator, p, r, cg, flags, data ); + tqdrawPrimitive( PE_ExclusiveIndicator, p, r, cg, flags, data ); formMode = false; break; case CE_RadioButtonLabel: @@ -2957,47 +2943,40 @@ void KlearlookStyle::drawControl( const TQRadioButton * radiobutton = ( const TQRadioButton * ) widget; if ( flags & Style_MouseOver && -#if QT_VERSION >= 0x030200 HOVER_RADIO == hover && hoverWidget == widget && -#endif !isFormWidget( widget ) ) { -#if QT_VERSION >= 0x030200 TQRect rb( radiobutton->rect() ); TQRegion r( TQRect( rb.x(), rb.y(), - visualRect( subRect( SR_RadioButtonFocusRect, widget ), widget ).width() + - pixelMetric( PM_ExclusiveIndicatorWidth ) + 4, rb.height() ) ); -#else - - TQRegion r( radiobutton->rect() ); -#endif + tqvisualRect( subRect( SR_RadioButtonFocusRect, widget ), widget ).width() + + tqpixelMetric( PM_ExclusiveIndicatorWidth ) + 4, rb.height() ) ); - r -= visualRect( subRect( SR_RadioButtonIndicator, widget ), widget ); + r -= tqvisualRect( subRect( SR_RadioButtonIndicator, widget ), widget ); p->setClipRegion( r ); - p->fillRect( radiobutton->rect(), cg.background().light( QTC_HIGHLIGHT_FACTOR ) ); + p->fillRect( radiobutton->rect(), cg.background().light( TQTC_HIGHLIGHT_FACTOR ) ); p->setClipping( false ); } - int alignment = TQApplication::reverseLayout() ? AlignRight : AlignLeft; + int tqalignment = TQApplication::reverseLayout() ? AlignRight : AlignLeft; - drawItem( p, r, alignment | AlignVCenter | ShowPrefix, cg, + drawItem( p, r, tqalignment | AlignVCenter | ShowPrefix, cg, flags & Style_Enabled, radiobutton->pixmap(), radiobutton->text() ); if ( radiobutton->hasFocus() ) - drawPrimitive( PE_FocusRect, p, - visualRect( subRect( SR_RadioButtonFocusRect, widget ), widget ), cg, flags ); + tqdrawPrimitive( PE_FocusRect, p, + tqvisualRect( subRect( SR_RadioButtonFocusRect, widget ), widget ), cg, flags ); break; } default: - KStyle::drawControl( control, p, widget, r, cg, flags, data ); + KStyle::tqdrawControl( control, p, widget, r, cg, flags, data ); } } -void KlearlookStyle::drawControlMask( ControlElement control, TQPainter *p, const TQWidget *widget, const TQRect &r, +void KlearlookStyle::tqdrawControlMask( ControlElement control, TQPainter *p, const TQWidget *widget, const TQRect &r, const TQStyleOption &data ) const { switch ( control ) { case CE_PushButton: if ( rounded ) { - int offset = r.width() < QTC_MIN_BTN_SIZE || r.height() < QTC_MIN_BTN_SIZE ? 1 : 2; + int offset = r.width() < TQTC_MIN_BTN_SIZE || r.height() < TQTC_MIN_BTN_SIZE ? 1 : 2; p->fillRect( r, color0 ); p->fillRect( r.x() + 1, r.y() + 1, r.width() - 2, r.height() - 2, color1 ); @@ -3012,19 +2991,19 @@ void KlearlookStyle::drawControlMask( ControlElement control, TQPainter *p, cons p->fillRect( r, color1 ); break; default: - KStyle::drawControlMask( control, p, widget, r, data ); + KStyle::tqdrawControlMask( control, p, widget, r, data ); } } -void KlearlookStyle::drawComplexControlMask( ComplexControl control, TQPainter *p, const TQWidget *widget, const TQRect &r, +void KlearlookStyle::tqdrawComplexControlMask( ComplexControl control, TQPainter *p, const TQWidget *widget, const TQRect &r, const TQStyleOption &data ) const { switch ( control ) { case CC_ToolButton: case CC_ComboBox: - drawControlMask( CE_PushButton, p, widget, r, data ); + tqdrawControlMask( CE_PushButton, p, widget, r, data ); break; default: - KStyle::drawComplexControlMask( control, p, widget, r, data ); + KStyle::tqdrawComplexControlMask( control, p, widget, r, data ); } } @@ -3040,7 +3019,7 @@ TQRect KlearlookStyle::subRect( SubRect subrect, const TQWidget *widget ) const // if(button->isDefault() || button->autoDefault()) // { - dbw1 = pixelMetric( PM_ButtonDefaultIndicator, widget ); + dbw1 = tqpixelMetric( PM_ButtonDefaultIndicator, widget ); dbw2 = dbw1 * 2; // } @@ -3051,20 +3030,20 @@ TQRect KlearlookStyle::subRect( SubRect subrect, const TQWidget *widget ) const break; } case SR_CheckBoxIndicator: { - int h = pixelMetric( PM_IndicatorHeight ); + int h = tqpixelMetric( PM_IndicatorHeight ); rect.setRect( ( widget->rect().height() - h ) >> 1, ( widget->rect().height() - h ) >> 1, - pixelMetric( PM_IndicatorWidth ), + tqpixelMetric( PM_IndicatorWidth ), h ); break; } case SR_RadioButtonIndicator: { - int h = pixelMetric( PM_ExclusiveIndicatorHeight ); + int h = tqpixelMetric( PM_ExclusiveIndicatorHeight ); rect.setRect( ( widget->rect().height() - h ) >> 1, ( widget->rect().height() - h ) >> 1, - pixelMetric( PM_ExclusiveIndicatorWidth ), h ); + tqpixelMetric( PM_ExclusiveIndicatorWidth ), h ); break; } case SR_ProgressBarContents: @@ -3080,7 +3059,7 @@ TQRect KlearlookStyle::subRect( SubRect subrect, const TQWidget *widget ) const return rect; } -void KlearlookStyle::drawComplexControl( +void KlearlookStyle::tqdrawComplexControl( ComplexControl control, TQPainter *p, const TQWidget *widget, @@ -3104,19 +3083,19 @@ void KlearlookStyle::drawComplexControl( SFlags bflags = flags, mflags = flags; if ( APP_KORN == themedApp ) { - drawPrimitive( PE_ButtonTool, p, button, cg, bflags, data ); + tqdrawPrimitive( PE_ButtonTool, p, button, cg, bflags, data ); break; } bool onControlButtons = false, - onToolbar = widget->parentWidget() && tqqt_cast<TQToolBar *>( widget->parentWidget() ), + onToolbar = widget->tqparentWidget() && ::tqqt_cast<TQToolBar *>( widget->tqparentWidget() ), onExtender = !onToolbar && - widget->parentWidget() && - widget->parentWidget() ->inherits( "QToolBarExtensionWidget" ) && - tqqt_cast<TQToolBar *>( widget->parentWidget() ->parentWidget() ); + widget->tqparentWidget() && + widget->tqparentWidget() ->inherits( "TQToolBarExtensionWidget" ) && + ::tqqt_cast<TQToolBar *>( widget->tqparentWidget() ->tqparentWidget() ); - if ( !onToolbar && !onExtender && widget->parentWidget() && - !qstrcmp( widget->parentWidget() ->name(), "qt_maxcontrols" ) ) + if ( !onToolbar && !onExtender && widget->tqparentWidget() && + !qstrcmp( widget->tqparentWidget() ->name(), "qt_maxcontrols" ) ) onControlButtons = true; if ( active & SC_ToolButton ) @@ -3139,33 +3118,33 @@ void KlearlookStyle::drawComplexControl( if ( !onToolbar && !onControlButtons ) bflags |= Style_Horizontal; - drawPrimitive( PE_ButtonTool, p, button, cg, bflags, data ); + tqdrawPrimitive( PE_ButtonTool, p, button, cg, bflags, data ); } // Check whether to draw a background pixmap - else if ( toolbutton->parentWidget() && - toolbutton->parentWidget() ->backgroundPixmap() && - !toolbutton->parentWidget() ->backgroundPixmap() ->isNull() ) { + else if ( toolbutton->tqparentWidget() && + toolbutton->tqparentWidget() ->backgroundPixmap() && + !toolbutton->tqparentWidget() ->backgroundPixmap() ->isNull() ) { p->drawTiledPixmap( r, - *( toolbutton->parentWidget() ->backgroundPixmap() ), toolbutton->pos() ); - } else if ( widget->parent() ) { - if ( tqqt_cast<const TQToolBar *>( widget->parent() ) ) { - TQToolBar * parent = ( TQToolBar* ) widget->parent(); + *( toolbutton->tqparentWidget() ->backgroundPixmap() ), toolbutton->pos() ); + } else if ( widget->tqparent() ) { + if ( ::tqqt_cast<const TQToolBar *>( widget->tqparent() ) ) { + TQToolBar * tqparent = ( TQToolBar* ) widget->tqparent(); -#ifdef QTC_GRADIENT_TOOLBARS_AND_MENUBARS +#ifdef TQTC_GRADIENT_TOOLBARS_AND_MENUBARS if ( APPEARANCE_FLAT != appearance ) drawBevelGradient( cg.background(), true, 0, - p, parent->rect(), true, SHADE_BAR_LIGHT, SHADE_BAR_DARK ); + p, tqparent->rect(), true, SHADE_BAR_LIGHT, SHADE_BAR_DARK ); else #endif - p->fillRect( parent->rect(), cg.background() ); - } else if ( widget->parent() ->inherits( "QToolBarExtensionWidget" ) ) { - TQWidget * parent = ( TQWidget* ) widget->parent(); - TQToolBar *toolbar = ( TQToolBar* ) parent->parent(); + p->fillRect( tqparent->rect(), cg.background() ); + } else if ( widget->tqparent() ->inherits( "TQToolBarExtensionWidget" ) ) { + TQWidget * tqparent = ( TQWidget* ) widget->tqparent(); + TQToolBar *toolbar = ( TQToolBar* ) tqparent->tqparent(); -#ifdef QTC_GRADIENT_TOOLBARS_AND_MENUBARS +#ifdef TQTC_GRADIENT_TOOLBARS_AND_MENUBARS if ( APPEARANCE_FLAT != appearance ) drawBevelGradient( cg.background(), true, 0, p, toolbar->rect(), @@ -3180,27 +3159,27 @@ void KlearlookStyle::drawComplexControl( if ( controls & SC_ToolButtonMenu ) { if ( mflags & ( Style_Down | Style_On | Style_Raised ) ) - drawPrimitive( PE_ButtonDropDown, p, menuarea, cg, mflags, data ); - drawPrimitive( PE_ArrowDown, p, menuarea, cg, mflags, data ); + tqdrawPrimitive( PE_ButtonDropDown, p, menuarea, cg, mflags, data ); + tqdrawPrimitive( PE_ArrowDown, p, menuarea, cg, mflags, data ); } if ( toolbutton->hasFocus() && !toolbutton->focusProxy() ) { TQRect fr = toolbutton->rect(); fr.addCoords( 3, 3, -3, -3 ); - drawPrimitive( PE_FocusRect, p, fr, cg ); + tqdrawPrimitive( PE_FocusRect, p, fr, cg ); } break; } case CC_ComboBox: { const TQComboBox *combobox = ( const TQComboBox * ) widget; - TQRect frame( TQStyle::visualRect( querySubControlMetrics( CC_ComboBox, + TQRect frame( TQStyle::tqvisualRect( querySubControlMetrics( CC_ComboBox, widget,SC_ComboBoxFrame,data ),widget ) ), - arrow( TQStyle::visualRect( querySubControlMetrics( CC_ComboBox, + arrow( TQStyle::tqvisualRect( querySubControlMetrics( CC_ComboBox, widget,SC_ComboBoxArrow,data),widget)), - field( TQStyle::visualRect( querySubControlMetrics(CC_ComboBox, + field( TQStyle::tqvisualRect( querySubControlMetrics(CC_ComboBox, widget,SC_ComboBoxEditField,data),widget)); const TQColor *use = buttonColors( cg ); @@ -3224,7 +3203,7 @@ void KlearlookStyle::drawComplexControl( } if ( controls & SC_ComboBoxArrow && arrow.isValid() ) { - drawPrimitive( PE_ArrowDown, p, arrow, cg, flags & ~Style_MouseOver ); + tqdrawPrimitive( PE_ArrowDown, p, arrow, cg, flags & ~Style_MouseOver ); p->setPen( use[ 4 ].light(70) ); arrow.addCoords( -1, -1, -1, 1 ); p->drawLine( arrow.left(), arrow.top(), arrow.left(), arrow.bottom() ); @@ -3232,10 +3211,10 @@ void KlearlookStyle::drawComplexControl( if ( controls & SC_ComboBoxEditField && field.isValid() ) { if ( ( flags & Style_HasFocus ) && ( ! combobox->editable() ) ) { - TQRect fr = TQStyle::visualRect( subRect( SR_ComboBoxFocusRect, widget ), widget ); + TQRect fr = TQStyle::tqvisualRect( subRect( SR_ComboBoxFocusRect, widget ), widget ); fr.addCoords( 0, 0, -2, 0 ); - drawPrimitive( PE_FocusRect, + tqdrawPrimitive( PE_FocusRect, p, fr, cg, flags | Style_FocusAtBorder, TQStyleOption( cg.highlight() ) ); } } @@ -3257,32 +3236,32 @@ void KlearlookStyle::drawComplexControl( qDrawShadePanel( p, r, TQColorGroup( gray[ 5 ], gray[ NUM_SHADES ], gray[ 0 ], gray[ 5 ], gray[ 2 ], cg.text(), gray[ NUM_SHADES ] ), - true, pixelMetric( PM_SpinBoxFrameWidth ) + true, tqpixelMetric( PM_SpinBoxFrameWidth ) ); if ( ( controls & SC_SpinWidgetUp ) && up.isValid() ) { - PrimitiveElement pe = PE_SpinWidgetUp; + TQ_PrimitiveElement pe = PE_SpinWidgetUp; SFlags upflags = flags; if ( spinwidget->buttonSymbols() == TQSpinWidget::PlusMinus ) pe = PE_SpinWidgetPlus; if ( !spinwidget->isUpEnabled() ) upflags ^= Style_Enabled; - drawPrimitive( + tqdrawPrimitive( pe, p, up, cg, upflags | ( ( active == SC_SpinWidgetUp ) ? Style_On | Style_Sunken : Style_Raised ) ); } if ( ( controls & SC_SpinWidgetDown ) && down.isValid() ) { - PrimitiveElement pe = PE_SpinWidgetDown; + TQ_PrimitiveElement pe = PE_SpinWidgetDown; SFlags downflags = flags; if ( spinwidget->buttonSymbols() == TQSpinWidget::PlusMinus ) pe = PE_SpinWidgetMinus; if ( !spinwidget->isDownEnabled() ) downflags ^= Style_Enabled; - drawPrimitive( + tqdrawPrimitive( pe, p, down, cg, downflags | ( ( active == SC_SpinWidgetDown ) ? Style_On | Style_Sunken : Style_Raised ) ); @@ -3304,7 +3283,7 @@ void KlearlookStyle::drawComplexControl( last( querySubControlMetrics( control, widget, SC_ScrollBarLast, data ) ); if ( ( controls & SC_ScrollBarSubLine ) && subline.isValid() ) - drawPrimitive( + tqdrawPrimitive( PE_ScrollBarSubLine, p, subline, cg, ( hw && HOVER_SB_SUB == hover ? Style_MouseOver : Style_Default ) | Style_Enabled | @@ -3312,7 +3291,7 @@ void KlearlookStyle::drawComplexControl( ( ( scrollbar->orientation() == Qt::Horizontal ) ? Style_Horizontal : Style_Default ) ); if ( ( controls & SC_ScrollBarAddLine ) && addline.isValid() ) - drawPrimitive( + tqdrawPrimitive( PE_ScrollBarAddLine, p, addline, cg, ( hw && HOVER_SB_ADD == hover ? Style_MouseOver : Style_Default ) | Style_Enabled | @@ -3320,27 +3299,27 @@ void KlearlookStyle::drawComplexControl( ( ( scrollbar->orientation() == Qt::Horizontal ) ? Style_Horizontal : Style_Default ) ); if ( ( controls & SC_ScrollBarSubPage ) && subpage.isValid() ) - drawPrimitive( PE_ScrollBarSubPage, p, subpage, cg, + tqdrawPrimitive( PE_ScrollBarSubPage, p, subpage, cg, Style_Enabled | ( ( active == SC_ScrollBarSubPage ) ? Style_Down : Style_Default ) | ( ( scrollbar->orientation() == Qt::Horizontal ) ? Style_Horizontal : Style_Default ) ); if ( ( controls & SC_ScrollBarAddPage ) && addpage.isValid() ) - drawPrimitive( PE_ScrollBarAddPage, p, addpage, cg, + tqdrawPrimitive( PE_ScrollBarAddPage, p, addpage, cg, ( ( scrollbar->minValue() == scrollbar->maxValue() ) ? Style_Default : Style_Enabled ) | ( ( active == SC_ScrollBarAddPage ) ? Style_Down : Style_Default ) | ( ( scrollbar->orientation() == Qt::Horizontal ) ? Style_Horizontal : Style_Default ) ); if ( ( controls & SC_ScrollBarFirst ) && first.isValid() ) - drawPrimitive( PE_ScrollBarFirst, p, first, cg, + tqdrawPrimitive( PE_ScrollBarFirst, p, first, cg, Style_Enabled | ( ( active == SC_ScrollBarFirst ) ? Style_Down : Style_Default ) | ( ( scrollbar->orientation() == Qt::Horizontal ) ? Style_Horizontal : Style_Default ) ); if ( ( controls & SC_ScrollBarLast ) && last.isValid() ) - drawPrimitive( PE_ScrollBarLast, p, last, cg, + tqdrawPrimitive( PE_ScrollBarLast, p, last, cg, Style_Enabled | ( ( active == SC_ScrollBarLast ) ? Style_Down : Style_Default ) | ( ( scrollbar->orientation() == Qt::Horizontal ) ? Style_Horizontal : Style_Default ) ); if ( ( controls & SC_ScrollBarSlider ) && slider.isValid() ) { - drawPrimitive( PE_ScrollBarSlider, p, slider, cg, + tqdrawPrimitive( PE_ScrollBarSlider, p, slider, cg, ( hw && HOVER_SB_SLIDER == hover ? Style_MouseOver : Style_Default ) | Style_Enabled | ( ( active == SC_ScrollBarSlider ) ? Style_Down : Style_Default ) | @@ -3348,7 +3327,7 @@ void KlearlookStyle::drawComplexControl( // ### perhaps this should not be able to accept focus if maxedOut? if ( scrollbar->hasFocus() ) - drawPrimitive( PE_FocusRect, p, + tqdrawPrimitive( PE_FocusRect, p, TQRect( slider.x() + 2, slider.y() + 2, slider.width() - 5, slider.height() - 5 ), cg, Style_Default ); } @@ -3363,30 +3342,30 @@ void KlearlookStyle::drawComplexControl( if ( ( controls & SC_SliderHandle ) && handle.isValid() ) drawSliderHandle( p, handle, cg, flags ); if ( controls & SC_SliderTickmarks ) - TQCommonStyle::drawComplexControl( + TQCommonStyle::tqdrawComplexControl( control, p, widget, r, cg, flags, SC_SliderTickmarks, active, data ); break; } default: - KStyle::drawComplexControl( control, p, widget, r, cg, flags, controls, active, data ); + KStyle::tqdrawComplexControl( control, p, widget, r, cg, flags, controls, active, data ); } } -TQRect KlearlookStyle::querySubControlMetrics( ComplexControl control, const TQWidget *widget, SubControl sc, +TQRect KlearlookStyle::querySubControlMetrics( TQ_ComplexControl control, const TQWidget *widget, SubControl sc, const TQStyleOption &data ) const { switch ( control ) { case CC_SpinWidget: { if ( !widget ) return TQRect(); - int fw = pixelMetric( PM_SpinBoxFrameWidth, 0 ); + int fw = tqpixelMetric( PM_SpinBoxFrameWidth, 0 ); TQSize bs; bs.setHeight( widget->height() >> 1 ); if ( bs.height() < 8 ) bs.setHeight( 8 ); - bs.setWidth( QMIN( bs.height() * 8 / 6, widget->width() / 4 ) ); + bs.setWidth( TQMIN( bs.height() * 8 / 6, widget->width() / 4 ) ); bs = bs.expandedTo( TQApplication::globalStrut() ); if ( !( bs.width() % 2 ) ) @@ -3416,7 +3395,7 @@ TQRect KlearlookStyle::querySubControlMetrics( ComplexControl control, const TQW } } -int KlearlookStyle::pixelMetric( PixelMetric metric, const TQWidget *widget ) const { +int KlearlookStyle::tqpixelMetric( PixelMetric metric, const TQWidget *widget ) const { switch ( metric ) { case PM_MenuButtonIndicator: return 7; @@ -3425,23 +3404,21 @@ int KlearlookStyle::pixelMetric( PixelMetric metric, const TQWidget *widget ) co } case PM_ButtonMargin: return 5; -#if QT_VERSION >= 0x030200 case PM_TabBarTabShiftVertical: { - const TQTabBar *tb = tqqt_cast<const TQTabBar *>( widget ); + const TQTabBar *tb = ::tqqt_cast<const TQTabBar *>( widget ); - return TQTabBar::RoundedAbove == tb->shape() || TQTabBar::TriangularAbove == tb->shape() + return TQTabBar::RoundedAbove == tb->tqshape() || TQTabBar::TriangularAbove == tb->tqshape() ? 1 : -1; } case PM_TabBarTabShiftHorizontal: return 0; -#endif case PM_TabBarTabVSpace: { const TQTabBar * tb = ( const TQTabBar * ) widget; - if ( tb->shape() == TQTabBar::RoundedAbove || - tb->shape() == TQTabBar::RoundedBelow ) + if ( tb->tqshape() == TQTabBar::RoundedAbove || + tb->tqshape() == TQTabBar::RoundedBelow ) return 12; else return 4; @@ -3454,21 +3431,21 @@ int KlearlookStyle::pixelMetric( PixelMetric metric, const TQWidget *widget ) co case PM_ButtonDefaultIndicator: return IND_BORDER == defBtnIndicator ? 1 : 0; case PM_DefaultFrameWidth: - return borderFrame && widget && ( tqqt_cast<const TQTabBar *>( widget ) || - tqqt_cast<const TQWidgetStack *>( widget ) || - tqqt_cast<const TQPopupMenu *>( widget ) ) + return borderFrame && widget && ( ::tqqt_cast<const TQTabBar *>( widget ) || + ::tqqt_cast<const TQWidgetStack *>( widget ) || + ::tqqt_cast<const TQPopupMenu *>( widget ) ) ? 2 - : QTC_DEF_FRAME_WIDTH; + : TQTC_DEF_FRAME_WIDTH; case PM_SpinBoxFrameWidth: return 1; case PM_MenuBarFrameWidth: return 1; case PM_IndicatorWidth: case PM_IndicatorHeight: - return QTC_CHECK_SIZE; + return TQTC_CHECK_SIZE; case PM_ExclusiveIndicatorWidth: case PM_ExclusiveIndicatorHeight: - return QTC_RADIO_SIZE; + return TQTC_RADIO_SIZE; case PM_TabBarTabOverlap: return 1; case PM_ProgressBarChunkWidth: @@ -3490,7 +3467,7 @@ int KlearlookStyle::pixelMetric( PixelMetric metric, const TQWidget *widget ) co case PM_MaximumDragDistance: return -1; default: - return KStyle::pixelMetric( metric, widget ); + return KStyle::tqpixelMetric( metric, widget ); } } @@ -3503,7 +3480,7 @@ int KlearlookStyle::kPixelMetric( KStylePixelMetric kpm, const TQWidget *widget } } -TQSize KlearlookStyle::sizeFromContents( ContentsType t, +TQSize KlearlookStyle::tqsizeFromContents( ContentsType t, const TQWidget *widget, const TQSize &s, const TQStyleOption &opt ) const { @@ -3519,8 +3496,8 @@ TQSize KlearlookStyle::sizeFromContents( ContentsType t, bool checkable = popup->isCheckable(); if ( mi->custom() ) { - w = mi->custom() ->sizeHint().width(); - h = mi->custom() ->sizeHint().height(); + w = mi->custom() ->tqsizeHint().width(); + h = mi->custom() ->tqsizeHint().height(); if ( !mi->custom() ->fullSpan() ) h += 4; } else if ( mi->widget() ) { @@ -3530,22 +3507,22 @@ TQSize KlearlookStyle::sizeFromContents( ContentsType t, h = 8; } else { if ( mi->pixmap() ) { - h = QMAX( h, mi->pixmap() ->height() + 2 ); + h = TQMAX( h, mi->pixmap() ->height() + 2 ); } else { - h = QMAX( h, 21 ); + h = TQMAX( h, 21 ); TQSettings s; if ( menuIcons ) - h = QMAX( h, popup->fontMetrics().height() + MENU_POPUP_ITEM_HIGH_HI ); + h = TQMAX( h, popup->fontMetrics().height() + MENU_POPUP_ITEM_HIGH_HI ); else - h = QMAX( h, popup->fontMetrics().height() + MENU_POPUP_ITEM_HIGH_LO ); + h = TQMAX( h, popup->fontMetrics().height() + MENU_POPUP_ITEM_HIGH_LO ); } if ( mi->iconSet() ) { - h = QMAX( h, mi->iconSet() ->pixmap( TQIconSet::Small, TQIconSet::Normal ).height() + 2 ); + h = TQMAX( h, mi->iconSet() ->pixmap( TQIconSet::Small, TQIconSet::Normal ).height() + 2 ); } } - if ( !mi->text().isNull() && ( mi->text().find( '\t' ) >= 0 ) ) { + if ( !mi->text().isNull() && ( mi->text().tqfind( '\t' ) >= 0 ) ) { w += itemHMargin + itemFrame * 2 + 7; } else if ( mi->popup() ) { w += 2 * arrowHMargin; @@ -3569,8 +3546,8 @@ TQSize KlearlookStyle::sizeFromContents( ContentsType t, case CT_PushButton: { const TQPushButton* btn = static_cast<const TQPushButton*>( widget ); - int w = s.width() + 2 * pixelMetric( PM_ButtonMargin, widget ); - int h = s.height() + 2 * pixelMetric( PM_ButtonMargin, widget ); + int w = s.width() + 2 * tqpixelMetric( PM_ButtonMargin, widget ); + int h = s.height() + 2 * tqpixelMetric( PM_ButtonMargin, widget ); if ( btn->text().isEmpty() && s.width() < 32 ) return TQSize( w, h ); // return button size @@ -3578,23 +3555,23 @@ TQSize KlearlookStyle::sizeFromContents( ContentsType t, } case CT_ToolButton: { - if ( widget->parent() && tqqt_cast<TQToolBar*>( widget->parent() ) ) + if ( widget->tqparent() && ::tqqt_cast<TQToolBar*>( widget->tqparent() ) ) return TQSize( s.width() + 2 * 4, s.height() + 2 * 4 ); else { - return KStyle::sizeFromContents ( t, widget, s, opt ); + return KStyle::tqsizeFromContents ( t, widget, s, opt ); } } default: - return KStyle::sizeFromContents ( t, widget, s, opt ); + return KStyle::tqsizeFromContents ( t, widget, s, opt ); } - return KStyle::sizeFromContents ( t, widget, s, opt ); + return KStyle::tqsizeFromContents ( t, widget, s, opt ); } -int KlearlookStyle::styleHint( StyleHint stylehint, const TQWidget *widget, const TQStyleOption &option, QStyleHintReturn *returnData ) const { +int KlearlookStyle::tqstyleHint( StyleHint stylehint, const TQWidget *widget, const TQStyleOption &option, TQStyleHintReturn *returnData ) const { switch ( stylehint ) { case SH_EtchDisabledText: case SH_Slider_SnapToValue: @@ -3616,7 +3593,7 @@ int KlearlookStyle::styleHint( StyleHint stylehint, const TQWidget *widget, cons case SH_PopupMenu_AllowActiveAndDisabled: return 0; default: - return KStyle::styleHint( stylehint, widget, option, returnData ); + return KStyle::tqstyleHint( stylehint, widget, option, returnData ); } } @@ -3852,7 +3829,7 @@ void KlearlookStyle::drawSliderGroove TQRect fr( groove ); fr.addCoords( -1, -1, 1, 1 ); - drawPrimitive( PE_FocusRect, p, fr, TQColorGroup() ); + tqdrawPrimitive( PE_FocusRect, p, fr, TQColorGroup() ); } if ( Qt::Horizontal == slider->orientation() ) { @@ -3873,12 +3850,12 @@ void KlearlookStyle::drawSliderGroove } void KlearlookStyle::shadeColors( const TQColor &base, TQColor *vals ) const { - QTC_SHADES + TQTC_SHADES int i; for ( i = 0; i < NUM_SHADES; ++i ) - shade( base, &vals[ i ], QTC_SHADE( appearance, contrast, i ) ); + shade( base, &vals[ i ], TQTC_SHADE( appearance, contrast, i ) ); vals[ NUM_SHADES ] = base; } @@ -3908,10 +3885,8 @@ bool KlearlookStyle::redrawHoverWidget() { TQPoint cursor( TQCursor::pos() ), widgetZero( hoverWidget->mapToGlobal( TQPoint( 0, 0 ) ) ); -#if QT_VERSION >= 0x030200 - // - // Qt>=3.2 sets the sensitive part of a check/radio to the image + label -> anything else + // TQt>=3.2 sets the sensitive part of a check/radio to the image + label -> anything else // is not sensitive. But, // the widget can ocupy a larger area - and this whole are will react to mouse over. // This needs to be coounteracted @@ -3920,25 +3895,24 @@ bool KlearlookStyle::redrawHoverWidget() { if ( rb ) { TQRect rect( widgetZero.x(), widgetZero.y(), - visualRect( subRect( SR_RadioButtonFocusRect, rb ), rb ).width() + - pixelMetric( PM_ExclusiveIndicatorWidth ) + 4, hoverWidget->height() ); + tqvisualRect( subRect( SR_RadioButtonFocusRect, rb ), rb ).width() + + tqpixelMetric( PM_ExclusiveIndicatorWidth ) + 4, hoverWidget->height() ); - hover = rect.contains( cursor ) ? HOVER_RADIO : HOVER_NONE; - return ( HOVER_NONE != hover && !rect.contains( oldCursor ) ) || - ( HOVER_NONE == hover && rect.contains( oldCursor ) ); + hover = rect.tqcontains( cursor ) ? HOVER_RADIO : HOVER_NONE; + return ( HOVER_NONE != hover && !rect.tqcontains( oldCursor ) ) || + ( HOVER_NONE == hover && rect.tqcontains( oldCursor ) ); } else { TQCheckBox *cb = dynamic_cast<TQCheckBox *>( hoverWidget ); if ( cb ) { TQRect rect( widgetZero.x(), widgetZero.y(), - visualRect( subRect( SR_CheckBoxFocusRect, cb ), cb ).width() + - pixelMetric( PM_IndicatorWidth ) + 4, hoverWidget->height() ); + tqvisualRect( subRect( SR_CheckBoxFocusRect, cb ), cb ).width() + + tqpixelMetric( PM_IndicatorWidth ) + 4, hoverWidget->height() ); - hover = rect.contains( cursor ) ? HOVER_CHECK : HOVER_NONE; - return ( HOVER_NONE != hover && !rect.contains( oldCursor ) ) || - ( HOVER_NONE == hover && rect.contains( oldCursor ) ); + hover = rect.tqcontains( cursor ) ? HOVER_CHECK : HOVER_NONE; + return ( HOVER_NONE != hover && !rect.tqcontains( oldCursor ) ) || + ( HOVER_NONE == hover && rect.tqcontains( oldCursor ) ); } else { -#endif TQScrollBar *sb = dynamic_cast<TQScrollBar *>( hoverWidget ); if ( sb ) // So, are we over add button, sub button, slider, or none? @@ -3954,21 +3928,21 @@ bool KlearlookStyle::redrawHoverWidget() { slider.moveLeft( slider.x() + widgetZero.x() ); slider.moveTop( slider.y() + widgetZero.y() ); - if ( slider.contains( cursor ) ) + if ( slider.tqcontains( cursor ) ) hover = HOVER_SB_SLIDER; - else if ( subline.contains( cursor ) ) + else if ( subline.tqcontains( cursor ) ) hover = HOVER_SB_SUB; - else if ( addline.contains( cursor ) ) + else if ( addline.tqcontains( cursor ) ) hover = HOVER_SB_ADD; else hover = HOVER_NONE; - return ( HOVER_SB_SLIDER == hover && !slider.contains( oldCursor ) ) || - ( HOVER_SB_SLIDER != hover && slider.contains( oldCursor ) ) || - ( HOVER_SB_SUB == hover && !subline.contains( oldCursor ) ) || - ( HOVER_SB_SUB != hover && subline.contains( oldCursor ) ) || - ( HOVER_SB_ADD == hover && !addline.contains( oldCursor ) ) || - ( HOVER_SB_ADD != hover && addline.contains( oldCursor ) ); + return ( HOVER_SB_SLIDER == hover && !slider.tqcontains( oldCursor ) ) || + ( HOVER_SB_SLIDER != hover && slider.tqcontains( oldCursor ) ) || + ( HOVER_SB_SUB == hover && !subline.tqcontains( oldCursor ) ) || + ( HOVER_SB_SUB != hover && subline.tqcontains( oldCursor ) ) || + ( HOVER_SB_ADD == hover && !addline.tqcontains( oldCursor ) ) || + ( HOVER_SB_ADD != hover && addline.tqcontains( oldCursor ) ); } else { #if KDE_VERSION >= 0x30400 TQToolButton *tb = dynamic_cast<TQToolButton *>( hoverWidget ); @@ -3994,22 +3968,22 @@ bool KlearlookStyle::redrawHoverWidget() { int s = 0; bool redraw = false; - hover = rect.contains( cursor ) ? HOVER_HEADER : HOVER_NONE; - hoverSect = QTC_NO_SECT; + hover = rect.tqcontains( cursor ) ? HOVER_HEADER : HOVER_NONE; + hoverSect = TQTC_NO_SECT; - for ( s = 0; s < hd->count() && ( QTC_NO_SECT == hoverSect || !redraw ); ++s ) { + for ( s = 0; s < hd->count() && ( TQTC_NO_SECT == hoverSect || !redraw ); ++s ) { TQRect r( hd->sectionRect( s ) ); r.moveLeft( r.x() + widgetZero.x() ); r.moveTop( r.y() + widgetZero.y() ); - bool hasNew = r.contains( cursor ); + bool hasNew = r.tqcontains( cursor ); if ( hasNew ) hoverSect = s; if ( !redraw ) { - bool hasOld = r.contains( oldCursor ); + bool hasOld = r.tqcontains( oldCursor ); if ( ( hasNew && !hasOld ) || ( !hasNew && hasOld ) ) redraw = true; @@ -4024,11 +3998,8 @@ bool KlearlookStyle::redrawHoverWidget() { #endif } -#if QT_VERSION >= 0x030200 - } } -#endif return false; } diff --git a/src/gui/kdeext/klearlook.h b/src/gui/kdeext/klearlook.h index 26775c5..fc666f3 100644 --- a/src/gui/kdeext/klearlook.h +++ b/src/gui/kdeext/klearlook.h @@ -7,7 +7,7 @@ ---- - Based upon QtCurve (C) Craig Drummond, 2003 [email protected] + Based upon TQtCurve (C) Craig Drummond, 2003 [email protected] Bernhard Rosenkränzer <bero@r?dh?t.com> Preston Brown <pbrown@r?dh?t.com> Than Ngo <than@r?dh?t.com> @@ -43,10 +43,10 @@ #include <tqcolor.h> #include <tqpoint.h> -#define QTC_CHECK_SIZE 13 -#define QTC_RADIO_SIZE 13 -#define QTC_MIN_BTN_SIZE 10 -#define QTC_LV_SIZE(X) LV_EXP_ARR==(X) ? 7 : 5 +#define TQTC_CHECK_SIZE 13 +#define TQTC_RADIO_SIZE 13 +#define TQTC_MIN_BTN_SIZE 10 +#define TQTC_LV_SIZE(X) LV_EXP_ARR==(X) ? 7 : 5 #define NUM_SHADES 7 @@ -57,7 +57,7 @@ #define SHADE_GRADIENT_DARK 1.05 /* 3d effect - i.e. buttons, etc */ -#define QTC_SHADES \ +#define TQTC_SHADES \ double shades[2][11][NUM_SHADES]=\ { \ { \ @@ -88,7 +88,7 @@ } \ }; -#define QTC_SHADE(a, c, s) \ +#define TQTC_SHADE(a, c, s) \ (c>10 || c<0 || s>=NUM_SHADES || s<0 ? 1.0 : shades[APPEARANCE_LIGHT_GRADIENT!=(a) ? 0 : 1][c][s]) /* Shades used when gradient effect is selected */ @@ -186,6 +186,7 @@ extern "C" { class KlearlookStyle : public KStyle { Q_OBJECT + TQ_OBJECT public: @@ -251,32 +252,32 @@ class KlearlookStyle : public KStyle { const TQColor &fill, const TQColor *custom = NULL, bool light = false ) const; void drawLightBevelButton( TQPainter *p, const TQRect &r, const TQColorGroup &cg, TQStyle::SFlags flags, bool useGrad, ERound round, const TQColor &fill, const TQColor *custom = NULL, bool light = false ) const; - void drawArrow( TQPainter *p, const TQRect &r, const TQColorGroup &cg, TQStyle::SFlags flags, TQStyle::PrimitiveElement pe, + void drawArrow( TQPainter *p, const TQRect &r, const TQColorGroup &cg, TQStyle::SFlags flags, TQStyle::TQ_PrimitiveElement pe, bool small = false, bool checkActive = false ) const; - void drawPrimitive( PrimitiveElement, TQPainter *, const TQRect &, const TQColorGroup &, SFlags = Style_Default, + void tqdrawPrimitive( TQ_PrimitiveElement, TQPainter *, const TQRect &, const TQColorGroup &, SFlags = Style_Default, const TQStyleOption & = TQStyleOption::Default ) const; - void drawPrimitiveMenu( PrimitiveElement, TQPainter *, const TQRect &, const TQColorGroup &, SFlags = Style_Default, + void tqdrawPrimitiveMenu( TQ_PrimitiveElement, TQPainter *, const TQRect &, const TQColorGroup &, SFlags = Style_Default, const TQStyleOption & = TQStyleOption::Default ) const; void drawKStylePrimitive( KStylePrimitive kpe, TQPainter* p, const TQWidget* widget, const TQRect &r, const TQColorGroup &cg, SFlags flags, const TQStyleOption &opt ) const; - void drawControl( ControlElement, TQPainter *, const TQWidget *, const TQRect &, const TQColorGroup &, + void tqdrawControl( ControlElement, TQPainter *, const TQWidget *, const TQRect &, const TQColorGroup &, SFlags = Style_Default, const TQStyleOption & = TQStyleOption::Default ) const; - void drawControlMask( ControlElement, TQPainter *, const TQWidget *, const TQRect &, + void tqdrawControlMask( ControlElement, TQPainter *, const TQWidget *, const TQRect &, const TQStyleOption & = TQStyleOption::Default ) const; - void drawComplexControlMask( ComplexControl control, TQPainter *p, const TQWidget *widget, const TQRect &r, + void tqdrawComplexControlMask( ComplexControl control, TQPainter *p, const TQWidget *widget, const TQRect &r, const TQStyleOption &data ) const; TQRect subRect( SubRect, const TQWidget * ) const; - void drawComplexControl( ComplexControl, TQPainter *, const TQWidget *, const TQRect &, const TQColorGroup &, + void tqdrawComplexControl( ComplexControl, TQPainter *, const TQWidget *, const TQRect &, const TQColorGroup &, SFlags = Style_Default, SCFlags = SC_All, SCFlags = SC_None, const TQStyleOption & = TQStyleOption::Default ) const; - TQRect querySubControlMetrics( ComplexControl, const TQWidget *, SubControl, + TQRect querySubControlMetrics( TQ_ComplexControl, const TQWidget *, SubControl, const TQStyleOption & = TQStyleOption::Default ) const; - int pixelMetric( PixelMetric, const TQWidget *widget = 0 ) const; + int tqpixelMetric( PixelMetric, const TQWidget *widget = 0 ) const; int kPixelMetric( KStylePixelMetric kpm, const TQWidget *widget ) const; - TQSize sizeFromContents( ContentsType, const TQWidget *, const TQSize &, + TQSize tqsizeFromContents( ContentsType, const TQWidget *, const TQSize &, const TQStyleOption & = TQStyleOption::Default ) const; - int styleHint( StyleHint, const TQWidget *widget = 0, const TQStyleOption & = TQStyleOption::Default, - QStyleHintReturn *returnData = 0 ) const; + int tqstyleHint( StyleHint, const TQWidget *widget = 0, const TQStyleOption & = TQStyleOption::Default, + TQStyleHintReturn *returnData = 0 ) const; protected: diff --git a/src/gui/rulers/ChordNameRuler.cpp b/src/gui/rulers/ChordNameRuler.cpp index 001d5fd..121d911 100644 --- a/src/gui/rulers/ChordNameRuler.cpp +++ b/src/gui/rulers/ChordNameRuler.cpp @@ -62,9 +62,9 @@ ChordNameRuler::ChordNameRuler(RulerScale *rulerScale, RosegardenGUIDoc *doc, double xorigin, int height, - TQWidget *parent, + TQWidget *tqparent, const char *name) : - TQWidget(parent, name), + TQWidget(tqparent, name), m_xorigin(xorigin), m_height(height), m_currentXOffset(0), @@ -103,9 +103,9 @@ ChordNameRuler::ChordNameRuler(RulerScale *rulerScale, std::vector<Segment *> &segments, double xorigin, int height, - TQWidget *parent, + TQWidget *tqparent, const char *name) : - TQWidget(parent, name), + TQWidget(tqparent, name), m_xorigin(xorigin), m_height(height), m_currentXOffset(0), @@ -182,15 +182,15 @@ ChordNameRuler::slotScrollHoriz(int x) if (dx > 0) { // moving right, so the existing stuff moves left bitBlt(this, 0, 0, this, dx, 0, w - dx, h); - repaint(w - dx, 0, dx, h); + tqrepaint(w - dx, 0, dx, h); } else { // moving left, so the existing stuff moves right bitBlt(this, -dx, 0, this, 0, 0, w + dx, h); - repaint(0, 0, -dx, h); + tqrepaint(0, 0, -dx, h); } } -QSize -ChordNameRuler::sizeHint() const +TQSize +ChordNameRuler::tqsizeHint() const { double width = m_rulerScale->getBarPosition(m_rulerScale->getLastVisibleBar()) + @@ -203,8 +203,8 @@ ChordNameRuler::sizeHint() const return res; } -QSize -ChordNameRuler::minimumSizeHint() const +TQSize +ChordNameRuler::tqminimumSizeHint() const { double firstBarWidth = m_rulerScale->getBarWidth(0); TQSize res = TQSize(int(firstBarWidth), m_height); @@ -231,8 +231,8 @@ ChordNameRuler::recalculate(timeT from, timeT to) } else if (m_regetSegmentsOnChange) { - RefreshStatus &rs = - m_composition->getRefreshStatus(m_compositionRefreshStatusId); + RefreshtqStatus &rs = + m_composition->getRefreshtqStatus(m_compositionRefreshStatusId); if (rs.needsRefresh()) { rs.setNeedsRefresh(false); @@ -304,15 +304,15 @@ ChordNameRuler::recalculate(timeT from, timeT to) if (m_segments.empty()) return ; - SegmentRefreshStatus overallStatus; - overallStatus.setNeedsRefresh(false); + SegmentRefreshtqStatus overalltqStatus; + overalltqStatus.setNeedsRefresh(false); for (SegmentRefreshMap::iterator i = m_segments.begin(); i != m_segments.end(); ++i) { - SegmentRefreshStatus &status = - i->first->getRefreshStatus(i->second); + SegmentRefreshtqStatus &status = + i->first->getRefreshtqStatus(i->second); if (status.needsRefresh()) { - overallStatus.push(status.from(), status.to()); + overalltqStatus.push(status.from(), status.to()); } } @@ -326,17 +326,17 @@ ChordNameRuler::recalculate(timeT from, timeT to) if (from == to) { NOTATION_DEBUG << "ChordNameRuler::recalculate: from==to, recalculating all" << endl; level = RecalcWhole; - } else if (overallStatus.from() == overallStatus.to()) { - NOTATION_DEBUG << "ChordNameRuler::recalculate: overallStatus.from==overallStatus.to, ignoring" << endl; + } else if (overalltqStatus.from() == overalltqStatus.to()) { + NOTATION_DEBUG << "ChordNameRuler::recalculate: overalltqStatus.from==overalltqStatus.to, ignoring" << endl; level = RecalcNone; - } else if (overallStatus.from() >= from && overallStatus.to() <= to) { - NOTATION_DEBUG << "ChordNameRuler::recalculate: change is " << overallStatus.from() << "->" << overallStatus.to() << ", I show " << from << "->" << to << ", recalculating visible area" << endl; + } else if (overalltqStatus.from() >= from && overalltqStatus.to() <= to) { + NOTATION_DEBUG << "ChordNameRuler::recalculate: change is " << overalltqStatus.from() << "->" << overalltqStatus.to() << ", I show " << from << "->" << to << ", recalculating visible area" << endl; level = RecalcVisible; - } else if (overallStatus.from() >= to || overallStatus.to() <= from) { - NOTATION_DEBUG << "ChordNameRuler::recalculate: change is " << overallStatus.from() << "->" << overallStatus.to() << ", I show " << from << "->" << to << ", ignoring" << endl; + } else if (overalltqStatus.from() >= to || overalltqStatus.to() <= from) { + NOTATION_DEBUG << "ChordNameRuler::recalculate: change is " << overalltqStatus.from() << "->" << overalltqStatus.to() << ", I show " << from << "->" << to << ", ignoring" << endl; level = RecalcNone; } else { - NOTATION_DEBUG << "ChordNameRuler::recalculate: change is " << overallStatus.from() << "->" << overallStatus.to() << ", I show " << from << "->" << to << ", recalculating whole" << endl; + NOTATION_DEBUG << "ChordNameRuler::recalculate: change is " << overalltqStatus.from() << "->" << overalltqStatus.to() << ", I show " << from << "->" << to << ", recalculating whole" << endl; level = RecalcWhole; } } @@ -346,7 +346,7 @@ ChordNameRuler::recalculate(timeT from, timeT to) for (SegmentRefreshMap::iterator i = m_segments.begin(); i != m_segments.end(); ++i) { - i->first->getRefreshStatus(i->second).setNeedsRefresh(false); + i->first->getRefreshtqStatus(i->second).setNeedsRefresh(false); } if (!m_currentSegment) { //!!! arbitrary, must do better diff --git a/src/gui/rulers/ChordNameRuler.h b/src/gui/rulers/ChordNameRuler.h index 988b1f4..1b77ae0 100644 --- a/src/gui/rulers/ChordNameRuler.h +++ b/src/gui/rulers/ChordNameRuler.h @@ -54,9 +54,10 @@ class Composition; * describing the chords in a composition. */ -class ChordNameRuler : public QWidget +class ChordNameRuler : public TQWidget { Q_OBJECT + TQ_OBJECT public: /** @@ -69,7 +70,7 @@ public: RosegardenGUIDoc *doc, double xorigin = 0.0, int height = 0, - TQWidget* parent = 0, + TQWidget* tqparent = 0, const char *name = 0); /** @@ -83,7 +84,7 @@ public: std::vector<Segment *> &segments, double xorigin = 0.0, int height = 0, - TQWidget* parent = 0, + TQWidget* tqparent = 0, const char *name = 0); ~ChordNameRuler(); @@ -97,8 +98,8 @@ public: // may have one of these (to avoid using percussion tracks in chords): void setStudio(Studio *studio); - virtual TQSize sizeHint() const; - virtual TQSize minimumSizeHint() const; + virtual TQSize tqsizeHint() const; + virtual TQSize tqminimumSizeHint() const; void setMinimumWidth(int width) { m_width = width; } diff --git a/src/gui/rulers/ControlItem.cpp b/src/gui/rulers/ControlItem.cpp index 8eb17ed..332542e 100644 --- a/src/gui/rulers/ControlItem.cpp +++ b/src/gui/rulers/ControlItem.cpp @@ -44,8 +44,8 @@ ControlItem::ControlItem(ControlRuler* ruler, ElementAdapter* elementAdapter, width = DefaultWidth/4; // avoid invisible zero-duration items } setWidth(width); - setPen(TQPen(Qt::black, BorderThickness)); - setBrush(Qt::blue); + setPen(TQPen(TQt::black, BorderThickness)); + setBrush(TQt::blue); setX(xx); setY(canvas()->height()); @@ -186,8 +186,8 @@ void ControlItem::setSelected(bool s) { TQCanvasItem::setSelected(s); - if (s) setPen(TQPen(Qt::red, BorderThickness)); - else setPen(TQPen(Qt::black, BorderThickness)); + if (s) setPen(TQPen(TQt::red, BorderThickness)); + else setPen(TQPen(TQt::black, BorderThickness)); canvas()->update(); } diff --git a/src/gui/rulers/ControlItem.h b/src/gui/rulers/ControlItem.h index e90a06d..2aea4b8 100644 --- a/src/gui/rulers/ControlItem.h +++ b/src/gui/rulers/ControlItem.h @@ -29,7 +29,7 @@ namespace Rosegarden { class ControlRuler; class ElementAdapter; -class ControlItem : public QCanvasRectangle +class ControlItem : public TQCanvasRectangle { public: ControlItem(ControlRuler* controlRuler, @@ -54,7 +54,7 @@ public: virtual void setSelected(bool yes); - /// recompute height according to represented value prior to a canvas repaint + /// recompute height according to represented value prior to a canvas tqrepaint virtual void updateFromValue(); /// update value according to height after a user edit diff --git a/src/gui/rulers/ControlRuler.cpp b/src/gui/rulers/ControlRuler.cpp index 7fea1fc..c728093 100644 --- a/src/gui/rulers/ControlRuler.cpp +++ b/src/gui/rulers/ControlRuler.cpp @@ -62,11 +62,11 @@ const int ControlRuler::ItemHeightRange = 64; ControlRuler::ControlRuler(Segment *segment, RulerScale* rulerScale, - EditViewBase* parentView, - TQCanvas* c, TQWidget* parent, + EditViewBase* tqparentView, + TQCanvas* c, TQWidget* tqparent, const char* name, WFlags f) : - RosegardenCanvasView(c, parent, name, f), - m_parentEditView(parentView), + RosegardenCanvasView(c, tqparent, name, f), + m_tqparentEditView(tqparentView), m_mainHorizontalScrollBar(0), m_rulerScale(rulerScale), m_eventSelection(new EventSelection(*segment)), @@ -84,12 +84,12 @@ ControlRuler::ControlRuler(Segment *segment, { setHScrollBarMode(TQScrollView::AlwaysOff); - m_selectionRect->setPen(Qt::red); + m_selectionRect->setPen(TQt::red); - setFixedHeight(sizeHint().height()); + setFixedHeight(tqsizeHint().height()); connect(this, TQT_SIGNAL(stateChange(const TQString&, bool)), - m_parentEditView, TQT_SLOT(slotStateChanged(const TQString&, bool))); + m_tqparentEditView, TQT_SLOT(slotStateChanged(const TQString&, bool))); m_numberFloat = new TextFloat(this); m_numberFloat->hide(); @@ -113,7 +113,7 @@ void ControlRuler::slotUpdate() canvas()->setAllChanged(); // TODO: be a bit more subtle, call setChanged(<time area>) canvas()->update(); - repaint(); + tqrepaint(); } void ControlRuler::slotUpdateElementsHPos() @@ -127,13 +127,13 @@ void ControlRuler::slotUpdateElementsHPos() ControlItem* item = dynamic_cast<ControlItem*>(*it); if (!item) continue; - layoutItem(item); + tqlayoutItem(item); } canvas()->update(); } -void ControlRuler::layoutItem(ControlItem* item) +void ControlRuler::tqlayoutItem(ControlItem* item) { timeT itemTime = item->getElementAdapter()->getTime(); @@ -146,7 +146,7 @@ void ControlRuler::layoutItem(ControlItem* item) item->setWidth(width); - // RG_DEBUG << "ControlRuler::layoutItem ControlItem x = " << x << " - width = " << width << endl; + // RG_DEBUG << "ControlRuler::tqlayoutItem ControlItem x = " << x << " - width = " << width << endl; } void ControlRuler::setControlTool(ControlTool* tool) @@ -186,7 +186,7 @@ void ControlRuler::contentsMousePressEvent(TQMouseEvent* e) // clear selection unless control was pressed, in which case // add the event to the current selection - if (!(e->state() && TQMouseEvent::ControlButton)) { + if (!(e->state() && TQ_ControlButton)) { clearSelectedItems(); } @@ -216,7 +216,7 @@ void ControlRuler::contentsMousePressEvent(TQMouseEvent* e) } else { // select it - if (!(e->state() && TQMouseEvent::ControlButton)) { + if (!(e->state() && TQ_ControlButton)) { if (item->z() > topItem->z()) topItem = item; @@ -231,7 +231,7 @@ void ControlRuler::contentsMousePressEvent(TQMouseEvent* e) } } - if (topItem && !m_selectedItems.contains(topItem)) { // select the top item + if (topItem && !m_selectedItems.tqcontains(topItem)) { // select the top item m_selectedItems << topItem; topItem->setSelected(true); topItem->handleMouseButtonPress(e); @@ -281,7 +281,7 @@ void ControlRuler::contentsMouseReleaseEvent(TQMouseEvent* e) m_eventSelection->getEndTime()); RG_DEBUG << "ControlRuler::contentsMouseReleaseEvent : adding command\n"; - m_parentEditView->addCommandToHistory(command); + m_tqparentEditView->addCommandToHistory(command); m_itemMoved = false; } @@ -308,9 +308,9 @@ void ControlRuler::contentsMouseMoveEvent(TQMouseEvent* e) // Borrowed from Rotary - compute total position within window // - TQPoint totalPos = mapTo(topLevelWidget(), TQPoint(0, 0)); + TQPoint totalPos = mapTo(tqtopLevelWidget(), TQPoint(0, 0)); - int scrollX = dynamic_cast<EditView*>(m_parentEditView)->getRawCanvasView()-> + int scrollX = dynamic_cast<EditView*>(m_tqparentEditView)->getRawCanvasView()-> horizontalScrollBar()->value(); /* @@ -335,7 +335,7 @@ void ControlRuler::contentsMouseMoveEvent(TQMouseEvent* e) // set value to highest in selection if (item->getValue() >= value) { value = item->getValue(); - m_numberFloat->setText(TQString("%1").arg(value)); + m_numberFloat->setText(TQString("%1").tqarg(value)); } } } @@ -393,16 +393,16 @@ void ControlRuler::createMenu() { RG_DEBUG << "ControlRuler::createMenu()\n"; - KMainWindow* parentMainWindow = dynamic_cast<KMainWindow*>(topLevelWidget()); + KMainWindow* tqparentMainWindow = dynamic_cast<KMainWindow*>(tqtopLevelWidget()); - if (parentMainWindow && parentMainWindow->factory()) { - m_menu = static_cast<TQPopupMenu*>(parentMainWindow->factory()->container(m_menuName, parentMainWindow)); + if (tqparentMainWindow && tqparentMainWindow->factory()) { + m_menu = static_cast<TQPopupMenu*>(tqparentMainWindow->factory()->container(m_menuName, tqparentMainWindow)); if (!m_menu) { RG_DEBUG << "ControlRuler::createMenu() failed\n"; } } else { - RG_DEBUG << "ControlRuler::createMenu() failed: no parent factory\n"; + RG_DEBUG << "ControlRuler::createMenu() failed: no tqparent factory\n"; } } diff --git a/src/gui/rulers/ControlRuler.h b/src/gui/rulers/ControlRuler.h index d9f4882..8bdf200 100644 --- a/src/gui/rulers/ControlRuler.h +++ b/src/gui/rulers/ControlRuler.h @@ -63,15 +63,16 @@ class EditViewBase; class ControlRuler : public RosegardenCanvasView, public SegmentObserver { Q_OBJECT + TQ_OBJECT friend class ControlItem; public: ControlRuler(Segment*, RulerScale*, - EditViewBase* parentView, + EditViewBase* tqparentView, TQCanvas*, - TQWidget* parent=0, const char* name=0, WFlags f=0); + TQWidget* tqparent=0, const char* name=0, WFlags f=0); virtual ~ControlRuler(); virtual TQString getName() = 0; @@ -121,7 +122,7 @@ protected: virtual void computeStaffOffset() {}; - virtual void layoutItem(ControlItem*); + virtual void tqlayoutItem(ControlItem*); @@ -144,7 +145,7 @@ protected: //--------------- Data members --------------------------------- - EditViewBase* m_parentEditView; + EditViewBase* m_tqparentEditView; TQScrollBar* m_mainHorizontalScrollBar; RulerScale* m_rulerScale; EventSelection* m_eventSelection; diff --git a/src/gui/rulers/ControlSelector.cpp b/src/gui/rulers/ControlSelector.cpp index 15e2814..7f36234 100644 --- a/src/gui/rulers/ControlSelector.cpp +++ b/src/gui/rulers/ControlSelector.cpp @@ -29,9 +29,9 @@ namespace Rosegarden { -ControlSelector::ControlSelector(ControlRuler* parent) - : TQObject(parent), - m_ruler(parent) +ControlSelector::ControlSelector(ControlRuler* tqparent) + : TQObject(tqparent), + m_ruler(tqparent) { } diff --git a/src/gui/rulers/ControlSelector.h b/src/gui/rulers/ControlSelector.h index 9b01785..8ad1917 100644 --- a/src/gui/rulers/ControlSelector.h +++ b/src/gui/rulers/ControlSelector.h @@ -38,10 +38,10 @@ namespace Rosegarden { * Allow the user to select several ControlItems so he can change them * all at the same time */ -class ControlSelector : public QObject +class ControlSelector : public TQObject { public: - ControlSelector(ControlRuler* parent); + ControlSelector(ControlRuler* tqparent); virtual ~ControlSelector() {}; virtual void handleMouseButtonPress(TQMouseEvent *e); diff --git a/src/gui/rulers/ControllerEventsRuler.cpp b/src/gui/rulers/ControllerEventsRuler.cpp index 3cb6788..6fe95e6 100644 --- a/src/gui/rulers/ControllerEventsRuler.cpp +++ b/src/gui/rulers/ControllerEventsRuler.cpp @@ -57,12 +57,12 @@ namespace Rosegarden ControllerEventsRuler::ControllerEventsRuler(Segment *segment, RulerScale* rulerScale, - EditViewBase* parentView, + EditViewBase* tqparentView, TQCanvas* c, - TQWidget* parent, + TQWidget* tqparent, const ControlParameter *controller, const char* name, WFlags f) - : ControlRuler(segment, rulerScale, parentView, c, parent, name, f), + : ControlRuler(segment, rulerScale, tqparentView, c, tqparent, name, f), m_defaultItemWidth(20), m_controlLine(new TQCanvasLine(canvas())), m_controlLineShowing(false), @@ -143,9 +143,9 @@ ControllerEventsRuler::drawBackground() // Draw some minimum and maximum controller value guide lines // TQCanvasLine *topLine = new TQCanvasLine(canvas()); - TQCanvasLine *topQLine = new TQCanvasLine(canvas()); + TQCanvasLine *topTQLine = new TQCanvasLine(canvas()); TQCanvasLine *midLine = new TQCanvasLine(canvas()); - TQCanvasLine *botQLine = new TQCanvasLine(canvas()); + TQCanvasLine *botTQLine = new TQCanvasLine(canvas()); TQCanvasLine *bottomLine = new TQCanvasLine(canvas()); //m_controlLine->setPoints(m_controlLineX, m_controlLineY, m_controlLineX, m_controlLineY); int cHeight = canvas()->height(); @@ -156,20 +156,20 @@ ControllerEventsRuler::drawBackground() topLine->setZ( -10); topLine->show(); - topQLine->setPen(TQColor(192, 192, 192)); - topQLine->setPoints(0, cHeight / 4, cWidth, cHeight / 4); - topQLine->setZ( -10); - topQLine->show(); + topTQLine->setPen(TQColor(192, 192, 192)); + topTQLine->setPoints(0, cHeight / 4, cWidth, cHeight / 4); + topTQLine->setZ( -10); + topTQLine->show(); midLine->setPen(TQColor(127, 127, 127)); midLine->setPoints(0, cHeight / 2, cWidth, cHeight / 2); midLine->setZ( -10); midLine->show(); - botQLine->setPen(TQColor(192, 192, 192)); - botQLine->setPoints(0, 3*cHeight / 4, cWidth, 3*cHeight / 4); - botQLine->setZ( -10); - botQLine->show(); + botTQLine->setPen(TQColor(192, 192, 192)); + botTQLine->setPoints(0, 3*cHeight / 4, cWidth, 3*cHeight / 4); + botTQLine->setZ( -10); + botTQLine->show(); bottomLine->setPen(TQColor(127, 127, 127)); bottomLine->setPoints(0, cHeight - 1, cWidth, cHeight - 1); @@ -191,9 +191,9 @@ TQString ControllerEventsRuler::getName() TQString hexValue; hexValue.sprintf("0x%x", m_controller->getControllerValue()); - name = TQString("%1 (%2 / %3)").arg(strtoqstr(m_controller->getName())) - .arg(int(m_controller->getControllerValue())) - .arg(hexValue); + name = TQString("%1 (%2 / %3)").tqarg(strtoqstr(m_controller->getName())) + .tqarg(int(m_controller->getControllerValue())) + .tqarg(hexValue); } else if (m_controller->getType() == PitchBend::EventType) { name = i18n("Pitch Bend"); } @@ -274,7 +274,7 @@ void ControllerEventsRuler::insertControllerEvent() number = m_controller->getControllerValue(); } else { bool ok = false; - TQIntValidator intValidator(0, 128, this); + TQIntValidator intValidator(0, 128, TQT_TQOBJECT(this)); TQString res = KLineEditDlg::getText(i18n("Controller Event Number"), "0", &ok, this, &intValidator); if (ok) @@ -286,7 +286,7 @@ void ControllerEventsRuler::insertControllerEvent() insertTime, number, initialValue, *m_segment); - m_parentEditView->addCommandToHistory(command); + m_tqparentEditView->addCommandToHistory(command); } void ControllerEventsRuler::eraseControllerEvent() @@ -298,7 +298,7 @@ void ControllerEventsRuler::eraseControllerEvent() *m_segment, m_eventSelection->getStartTime(), m_eventSelection->getEndTime()); - m_parentEditView->addCommandToHistory(command); + m_tqparentEditView->addCommandToHistory(command); updateSelection(); } @@ -329,20 +329,20 @@ void ControllerEventsRuler::clearControllerEvents() } EraseCommand *command = new EraseCommand(*es); - m_parentEditView->addCommandToHistory(command); + m_tqparentEditView->addCommandToHistory(command); } void ControllerEventsRuler::startControlLine() { m_controlLineShowing = true; - this->setCursor(Qt::pointingHandCursor); + this->setCursor(TQt::pointingHandCursor); } void ControllerEventsRuler::contentsMousePressEvent(TQMouseEvent *e) { if (!m_controlLineShowing) { - if (e->button() == MidButton) + if (e->button() == Qt::MidButton) m_lastEventPos = inverseMapPoint(e->pos()); ControlRuler::contentsMousePressEvent(e); // send super @@ -351,15 +351,15 @@ void ControllerEventsRuler::contentsMousePressEvent(TQMouseEvent *e) } // cancel control line mode - if (e->button() == RightButton) { + if (e->button() == Qt::RightButton) { m_controlLineShowing = false; m_controlLine->hide(); - this->setCursor(Qt::arrowCursor); + this->setCursor(TQt::arrowCursor); return ; } - if (e->button() == LeftButton) { + if (e->button() == Qt::LeftButton) { TQPoint p = inverseMapPoint(e->pos()); m_controlLine->show(); @@ -373,7 +373,7 @@ void ControllerEventsRuler::contentsMousePressEvent(TQMouseEvent *e) void ControllerEventsRuler::contentsMouseReleaseEvent(TQMouseEvent *e) { if (!m_controlLineShowing) { - if (e->button() == MidButton) + if (e->button() == Qt::MidButton) insertControllerEvent(); ControlRuler::contentsMouseReleaseEvent(e); // send super @@ -395,11 +395,11 @@ void ControllerEventsRuler::contentsMouseReleaseEvent(TQMouseEvent *e) << ", endValue = " << endValue << endl; - drawControlLine(startTime, endTime, startValue, endValue); + tqdrawControlLine(startTime, endTime, startValue, endValue); m_controlLineShowing = false; m_controlLine->hide(); - this->setCursor(Qt::arrowCursor); + this->setCursor(TQt::arrowCursor); canvas()->update(); } } @@ -409,7 +409,7 @@ void ControllerEventsRuler::contentsMouseMoveEvent(TQMouseEvent *e) if (!m_controlLineShowing) { // Don't send super if we're using the middle button // - if (e->button() == MidButton) { + if (e->button() == Qt::MidButton) { m_lastEventPos = inverseMapPoint(e->pos()); return ; } @@ -425,7 +425,7 @@ void ControllerEventsRuler::contentsMouseMoveEvent(TQMouseEvent *e) } -void ControllerEventsRuler::layoutItem(ControlItem* item) +void ControllerEventsRuler::tqlayoutItem(ControlItem* item) { timeT itemTime = item->getElementAdapter()->getTime(); @@ -440,12 +440,12 @@ void ControllerEventsRuler::layoutItem(ControlItem* item) item->setWidth(width); - //RG_DEBUG << "ControllerEventsRuler::layoutItem ControlItem x = " << x + //RG_DEBUG << "ControllerEventsRuler::tqlayoutItem ControlItem x = " << x //<< " - width = " << width << endl; } void -ControllerEventsRuler::drawControlLine(timeT startTime, +ControllerEventsRuler::tqdrawControlLine(timeT startTime, timeT endTime, int startValue, int endValue) @@ -493,7 +493,7 @@ ControllerEventsRuler::drawControlLine(timeT startTime, time += quantDur; } - m_parentEditView->addCommandToHistory(macro); + m_tqparentEditView->addCommandToHistory(macro); } } diff --git a/src/gui/rulers/ControllerEventsRuler.h b/src/gui/rulers/ControllerEventsRuler.h index 9f077fc..877cf4e 100644 --- a/src/gui/rulers/ControllerEventsRuler.h +++ b/src/gui/rulers/ControllerEventsRuler.h @@ -56,9 +56,9 @@ class ControllerEventsRuler : public ControlRuler public: ControllerEventsRuler(Segment*, RulerScale*, - EditViewBase* parentView, + EditViewBase* tqparentView, TQCanvas*, - TQWidget* parent=0, + TQWidget* tqparent=0, const ControlParameter *controller = 0, const char* name=0, WFlags f=0); @@ -94,9 +94,9 @@ protected: virtual void contentsMouseReleaseEvent(TQMouseEvent*); virtual void contentsMouseMoveEvent(TQMouseEvent*); - virtual void layoutItem(ControlItem*); + virtual void tqlayoutItem(ControlItem*); - void drawControlLine(timeT startTime, + void tqdrawControlLine(timeT startTime, timeT endTime, int startValue, int endValue); diff --git a/src/gui/rulers/LoopRuler.cpp b/src/gui/rulers/LoopRuler.cpp index 0a0adb2..fec733b 100644 --- a/src/gui/rulers/LoopRuler.cpp +++ b/src/gui/rulers/LoopRuler.cpp @@ -51,9 +51,9 @@ LoopRuler::LoopRuler(RosegardenGUIDoc *doc, int height, double xorigin, bool invert, - TQWidget *parent, + TQWidget *tqparent, const char *name) : - TQWidget(parent, name), + TQWidget(tqparent, name), m_doc(doc), m_height(height), m_xorigin(xorigin), @@ -71,7 +71,7 @@ LoopRuler::LoopRuler(RosegardenGUIDoc *doc, { /* * I need to understand if this ruler is being built for the main - * window (Track Editor) or for any of the segment editors. Apparently + * window (Track Editor) or for any of the segment editors. Aptqparently * the name parameter is supplied (non-NULL) only for the main window. * I can't find of any other (more decent) way to do this. Sorry. */ @@ -103,7 +103,7 @@ void LoopRuler::scrollHoriz(int x) { if (getHScaleFactor() != 1.0) { m_currentXOffset = static_cast<int>( -x / getHScaleFactor()); - repaint(); + tqrepaint(); return; } @@ -118,14 +118,14 @@ void LoopRuler::scrollHoriz(int x) if (dx > 0) { // moving right, so the existing stuff moves left bitBlt(this, 0, 0, this, dx, 0, w - dx, h); - repaint(w - dx, 0, dx, h); + tqrepaint(w - dx, 0, dx, h); } else { // moving left, so the existing stuff moves right bitBlt(this, -dx, 0, this, 0, 0, w + dx, h); - repaint(0, 0, -dx, h); + tqrepaint(0, 0, -dx, h); } } -TQSize LoopRuler::sizeHint() const +TQSize LoopRuler::tqsizeHint() const { double width = m_rulerScale->getBarPosition(m_rulerScale->getLastVisibleBar()) + @@ -137,7 +137,7 @@ TQSize LoopRuler::sizeHint() const return res; } -TQSize LoopRuler::minimumSizeHint() const +TQSize LoopRuler::tqminimumSizeHint() const { double firstBarWidth = m_rulerScale->getBarWidth(0) + m_xorigin; @@ -156,7 +156,7 @@ void LoopRuler::paintEvent(TQPaintEvent* e) paint.setClipRegion(e->region()); paint.setClipRect(e->rect().normalize()); - paint.setBrush(colorGroup().foreground()); + paint.setBrush(tqcolorGroup().foreground()); drawBarSections(&paint); drawLoopMarker(&paint); @@ -255,10 +255,10 @@ LoopRuler::mousePressEvent(TQMouseEvent *mE) { RG_DEBUG << "LoopRuler::mousePressEvent: x = " << mE->x() << endl; - Qt::ButtonState bs = mE->state(); - setLoopingMode((bs & Qt::ShiftButton) != 0); + TQt::ButtonState bs = mE->state(); + setLoopingMode((bs & TQt::ShiftButton) != 0); - if (mE->button() == LeftButton) { + if (mE->button() == Qt::LeftButton) { double x = mE->pos().x() / getHScaleFactor() - m_currentXOffset - m_xorigin; if (m_loopingMode) { @@ -280,7 +280,7 @@ LoopRuler::mousePressEvent(TQMouseEvent *mE) void LoopRuler::mouseReleaseEvent(TQMouseEvent *mE) { - if (mE->button() == LeftButton) { + if (mE->button() == Qt::LeftButton) { if (m_loopingMode) { // Cancel the loop if there was no drag // @@ -321,7 +321,7 @@ LoopRuler::mouseDoubleClickEvent(TQMouseEvent *mE) RG_DEBUG << "LoopRuler::mouseDoubleClickEvent: x = " << x << ", looping = " << m_loopingMode << endl; - if (mE->button() == LeftButton && !m_loopingMode) + if (mE->button() == Qt::LeftButton && !m_loopingMode) emit setPlayPosition(m_grid->snapX(x)); } @@ -352,7 +352,7 @@ void LoopRuler::slotSetLoopMarker(timeT startLoop, m_endLoop = endLoop; TQPainter paint(this); - paint.setBrush(colorGroup().foreground()); + paint.setBrush(tqcolorGroup().foreground()); drawBarSections(&paint); drawLoopMarker(&paint); diff --git a/src/gui/rulers/LoopRuler.h b/src/gui/rulers/LoopRuler.h index dfe88ae..ac397fe 100644 --- a/src/gui/rulers/LoopRuler.h +++ b/src/gui/rulers/LoopRuler.h @@ -54,6 +54,7 @@ class RosegardenGUIDoc; class LoopRuler : public TQWidget, public HZoomable { Q_OBJECT + TQ_OBJECT public: LoopRuler(RosegardenGUIDoc *doc, @@ -61,15 +62,15 @@ public: int height = 0, double xorigin = 0.0, bool invert = false, - TQWidget* parent = 0, + TQWidget* tqparent = 0, const char *name = 0); ~LoopRuler(); void setSnapGrid(SnapGrid *grid); - virtual TQSize sizeHint() const; - virtual TQSize minimumSizeHint() const; + virtual TQSize tqsizeHint() const; + virtual TQSize tqminimumSizeHint() const; void scrollHoriz(int x); diff --git a/src/gui/rulers/MarkerRuler.cpp b/src/gui/rulers/MarkerRuler.cpp index 5d328a8..f572e64 100644 --- a/src/gui/rulers/MarkerRuler.cpp +++ b/src/gui/rulers/MarkerRuler.cpp @@ -61,10 +61,10 @@ MarkerRuler::MarkerRuler(RosegardenGUIDoc *doc, RulerScale *rulerScale, int barHeight, double xorigin, - TQWidget* parent, + TQWidget* tqparent, const char* name, WFlags f) - : TQWidget(parent, name, f), + : TQWidget(tqparent, name, f), m_barHeight(barHeight), m_xorigin(xorigin), m_currentXOffset(0), @@ -73,16 +73,16 @@ MarkerRuler::MarkerRuler(RosegardenGUIDoc *doc, m_menu(0), m_doc(doc), m_rulerScale(rulerScale), - m_parentMainWindow(dynamic_cast<KMainWindow*>(doc->parent())) + m_tqparentMainWindow(dynamic_cast<KMainWindow*>(doc->tqparent())) { - // If the parent window has a main window above it, we need to use - // that as the parent main window, not the document's parent. + // If the tqparent window has a main window above it, we need to use + // that as the tqparent main window, not the document's tqparent. // Otherwise we'll end up adding all actions to the same // (document-level) action collection regardless of which window // we're in. - TQObject *probe = parent; - while (probe && !dynamic_cast<KMainWindow *>(probe)) probe = probe->parent(); - if (probe) m_parentMainWindow = dynamic_cast<KMainWindow *>(probe); + TQObject *probe = TQT_TQOBJECT(tqparent); + while (probe && !dynamic_cast<KMainWindow *>(probe)) probe = probe->tqparent(); + if (probe) m_tqparentMainWindow = dynamic_cast<KMainWindow *>(probe); // m_barFont = new TQFont("helvetica", 12); // m_barFont->setPixelSize(12); @@ -97,21 +97,21 @@ MarkerRuler::MarkerRuler(RosegardenGUIDoc *doc, // don't become more event-specific in future... icon = TQIconSet(TQPixmap(pixmapDir + "/toolbar/event-insert.png")); - new KAction(i18n("Insert Marker"), icon, 0, this, + new KAction(i18n("Insert Marker"), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotInsertMarkerHere()), actionCollection(), "insert_marker_here"); - new KAction(i18n("Insert Marker at Playback Position"), 0, this, + new KAction(i18n("Insert Marker at Playback Position"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotInsertMarkerAtPointer()), actionCollection(), "insert_marker_at_pointer"); icon = TQIconSet(TQPixmap(pixmapDir + "/toolbar/event-delete.png")); - new KAction(i18n("Delete Marker"), icon, 0, this, + new KAction(i18n("Delete Marker"), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotDeleteMarker()), actionCollection(), "delete_marker"); icon = TQIconSet(TQPixmap(pixmapDir + "/toolbar/event-edit.png")); - new KAction(i18n("Edit Marker..."), icon, 0, this, + new KAction(i18n("Edit Marker..."), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotEditMarker()), actionCollection(), "edit_marker"); @@ -124,7 +124,7 @@ MarkerRuler::~MarkerRuler() delete m_barFont; // we have to do this so that the menu is re-created properly // when the main window is itself recreated (on a File->New for instance) - KXMLGUIFactory* factory = m_parentMainWindow->factory(); + KXMLGUIFactory* factory = m_tqparentMainWindow->factory(); if (factory) factory->removeClient(this); } @@ -134,7 +134,7 @@ MarkerRuler::createMenu() { setXMLFile("markerruler.rc"); - KXMLGUIFactory* factory = m_parentMainWindow->factory(); + KXMLGUIFactory* factory = m_tqparentMainWindow->factory(); factory->addClient(this); TQWidget* tmp = factory->container("marker_ruler_menu", this); @@ -156,11 +156,11 @@ void MarkerRuler::scrollHoriz(int x) { m_currentXOffset = static_cast<int>( -x / getHScaleFactor()); - repaint(); + tqrepaint(); } TQSize -MarkerRuler::sizeHint() const +MarkerRuler::tqsizeHint() const { int lastBar = m_rulerScale->getLastVisibleBar(); @@ -172,7 +172,7 @@ MarkerRuler::sizeHint() const } TQSize -MarkerRuler::minimumSizeHint() const +MarkerRuler::tqminimumSizeHint() const { double firstBarWidth = m_rulerScale->getBarWidth(0) + m_xorigin; @@ -201,8 +201,8 @@ MarkerRuler::slotDeleteMarker() if (marker) emit deleteMarker(marker->getID(), marker->getTime(), - marker->getName(), - marker->getDescription()); + marker->getName().c_str(), + marker->getDescription().c_str()); } void @@ -366,7 +366,7 @@ MarkerRuler::paintEvent(TQPaintEvent*) painter.setWorldXForm(false); if (i >= 0) - painter.drawText(textDrawPoint, TQString("%1").arg(i + 1)); + painter.drawText(textDrawPoint, TQString("%1").tqarg(i + 1)); painter.setWorldXForm(enableXForm); } else { @@ -432,7 +432,7 @@ MarkerRuler::mousePressEvent(TQMouseEvent *e) // if right-click, show popup menu // - if (e->button() == RightButton) { + if (e->button() == Qt::RightButton) { if (!m_menu) createMenu(); if (m_menu) { @@ -443,7 +443,7 @@ MarkerRuler::mousePressEvent(TQMouseEvent *e) return; } - bool shiftPressed = ((e->state() & Qt::ShiftButton) != 0); + bool shiftPressed = ((e->state() & TQt::ShiftButton) != 0); Composition &comp = m_doc->getComposition(); Composition::markercontainer markers = comp.getMarkers(); diff --git a/src/gui/rulers/MarkerRuler.h b/src/gui/rulers/MarkerRuler.h index 29c90d0..6d99d68 100644 --- a/src/gui/rulers/MarkerRuler.h +++ b/src/gui/rulers/MarkerRuler.h @@ -50,20 +50,21 @@ class RosegardenGUIDoc; class MarkerRuler : public TQWidget, public HZoomable, public KXMLGUIClient { Q_OBJECT + TQ_OBJECT public: MarkerRuler(RosegardenGUIDoc *doc, RulerScale *rulerScale, int buttonHeight, double xorigin = 0.0, - TQWidget* parent = 0, + TQWidget* tqparent = 0, const char* name = 0, WFlags f=0); virtual ~MarkerRuler(); - virtual TQSize sizeHint() const; - virtual TQSize minimumSizeHint() const; + virtual TQSize tqsizeHint() const; + virtual TQSize tqminimumSizeHint() const; void scrollHoriz(int x); @@ -111,7 +112,7 @@ protected: RosegardenGUIDoc *m_doc; RulerScale *m_rulerScale; - KMainWindow* m_parentMainWindow; + KMainWindow* m_tqparentMainWindow; }; diff --git a/src/gui/rulers/PercussionPitchRuler.cpp b/src/gui/rulers/PercussionPitchRuler.cpp index 48fc640..e72cf4e 100644 --- a/src/gui/rulers/PercussionPitchRuler.cpp +++ b/src/gui/rulers/PercussionPitchRuler.cpp @@ -44,10 +44,10 @@ namespace Rosegarden { -PercussionPitchRuler::PercussionPitchRuler(TQWidget *parent, +PercussionPitchRuler::PercussionPitchRuler(TQWidget *tqparent, const MidiKeyMapping *mapping, int lineSpacing) : - PitchRuler(parent), + PitchRuler(tqparent), m_mapping(mapping), m_lineSpacing(lineSpacing), m_mouseDown(false), @@ -63,13 +63,13 @@ PercussionPitchRuler::PercussionPitchRuler(TQWidget *parent, setMouseTracking(true); } -TQSize PercussionPitchRuler::sizeHint() const +TQSize PercussionPitchRuler::tqsizeHint() const { return TQSize(m_width, (m_lineSpacing + 1) * m_mapping->getPitchExtent()); } -TQSize PercussionPitchRuler::minimumSizeHint() const +TQSize PercussionPitchRuler::tqminimumSizeHint() const { return TQSize(m_width, m_lineSpacing + 1); } @@ -95,12 +95,12 @@ void PercussionPitchRuler::paintEvent(TQPaintEvent*) MidiPitchLabel label(minPitch + i); std::string key = m_mapping->getMapForKeyName(minPitch + i); - RG_DEBUG << i << ": " << label.getQString() << ": " << key << endl; + RG_DEBUG << i << ": " << label.getTQString() << ": " << key << endl; paint.drawText (2, (extent - i - 1) * (m_lineSpacing + 1) + m_fontMetrics->ascent() + 1, - label.getQString()); + label.getTQString()); paint.drawText (9 + lw, (extent - i - 1) * (m_lineSpacing + 1) + @@ -136,7 +136,7 @@ void PercussionPitchRuler::drawHoverNote(int evPitch) paint.setPen(TQColor(238, 238, 224)); paint.drawRect(lw + 7, y + 1, m_width - lw, m_lineSpacing); std::string key = m_mapping->getMapForKeyName(m_lastHoverHighlight); - paint.setPen(Qt::black); + paint.setPen(TQt::black); paint.drawText (9 + lw, y + m_fontMetrics->ascent() + 1, strtoqstr(key)); @@ -159,7 +159,7 @@ void PercussionPitchRuler::mouseMoveEvent(TQMouseEvent* e) { // ugh - MatrixView *matrixView = dynamic_cast<MatrixView*>(topLevelWidget()); + MatrixView *matrixView = dynamic_cast<MatrixView*>(tqtopLevelWidget()); if (matrixView) { MatrixStaff *staff = matrixView->getStaff(0); if (staff) { @@ -178,12 +178,12 @@ void PercussionPitchRuler::mouseMoveEvent(TQMouseEvent* e) void PercussionPitchRuler::mousePressEvent(TQMouseEvent *e) { - Qt::ButtonState bs = e->state(); + TQt::ButtonState bs = e->state(); - if (e->button() == LeftButton) { + if (e->button() == Qt::LeftButton) { m_mouseDown = true; - m_selecting = (bs & Qt::ShiftButton); + m_selecting = (bs & TQt::ShiftButton); if (m_selecting) emit keySelected(e->y(), false); @@ -194,7 +194,7 @@ void PercussionPitchRuler::mousePressEvent(TQMouseEvent *e) void PercussionPitchRuler::mouseReleaseEvent(TQMouseEvent *e) { - if (e->button() == LeftButton) { + if (e->button() == Qt::LeftButton) { m_mouseDown = false; m_selecting = false; } diff --git a/src/gui/rulers/PercussionPitchRuler.h b/src/gui/rulers/PercussionPitchRuler.h index 44fcd86..53d1adc 100644 --- a/src/gui/rulers/PercussionPitchRuler.h +++ b/src/gui/rulers/PercussionPitchRuler.h @@ -47,13 +47,14 @@ class MidiKeyMapping; class PercussionPitchRuler : public PitchRuler { Q_OBJECT + TQ_OBJECT public: - PercussionPitchRuler(TQWidget *parent, + PercussionPitchRuler(TQWidget *tqparent, const MidiKeyMapping *mapping, int lineSpacing); - virtual TQSize sizeHint() const; - virtual TQSize minimumSizeHint() const; + virtual TQSize tqsizeHint() const; + virtual TQSize tqminimumSizeHint() const; void drawHoverNote(int evPitch); diff --git a/src/gui/rulers/PitchRuler.cpp b/src/gui/rulers/PitchRuler.cpp index baa06cd..b771c18 100644 --- a/src/gui/rulers/PitchRuler.cpp +++ b/src/gui/rulers/PitchRuler.cpp @@ -33,22 +33,22 @@ namespace Rosegarden { PitchRuler:: -PitchRuler(TQWidget *parent) : - TQWidget(parent) +PitchRuler(TQWidget *tqparent) : + TQWidget(tqparent) { // nothing else } -QSize -PitchRuler::sizeHint() const +TQSize +PitchRuler::tqsizeHint() const { - return TQWidget::sizeHint(); + return TQWidget::tqsizeHint(); } -QSize -PitchRuler::minimumSizeHint() const +TQSize +PitchRuler::tqminimumSizeHint() const { - return TQWidget::minimumSizeHint(); + return TQWidget::tqminimumSizeHint(); } } diff --git a/src/gui/rulers/PitchRuler.h b/src/gui/rulers/PitchRuler.h index 2562096..fd07bdf 100644 --- a/src/gui/rulers/PitchRuler.h +++ b/src/gui/rulers/PitchRuler.h @@ -37,14 +37,15 @@ namespace Rosegarden -class PitchRuler : public QWidget +class PitchRuler : public TQWidget { Q_OBJECT + TQ_OBJECT public: - PitchRuler(TQWidget *parent); + PitchRuler(TQWidget *tqparent); - virtual TQSize sizeHint() const; - virtual TQSize minimumSizeHint() const; + virtual TQSize tqsizeHint() const; + virtual TQSize tqminimumSizeHint() const; virtual void drawHoverNote(int evPitch) = 0; diff --git a/src/gui/rulers/PropertyBox.cpp b/src/gui/rulers/PropertyBox.cpp index 7037b64..1a21dcf 100644 --- a/src/gui/rulers/PropertyBox.cpp +++ b/src/gui/rulers/PropertyBox.cpp @@ -38,22 +38,22 @@ namespace Rosegarden PropertyBox::PropertyBox(TQString label, int width, int height, - TQWidget *parent, + TQWidget *tqparent, const char *name): - TQWidget(parent, name), + TQWidget(tqparent, name), m_label(label), m_width(width), m_height(height) {} -QSize -PropertyBox::sizeHint() const +TQSize +PropertyBox::tqsizeHint() const { return TQSize(m_width, m_height); } -QSize -PropertyBox::minimumSizeHint() const +TQSize +PropertyBox::tqminimumSizeHint() const { return TQSize(m_width, m_height); } diff --git a/src/gui/rulers/PropertyBox.h b/src/gui/rulers/PropertyBox.h index 73e17b7..2b26428 100644 --- a/src/gui/rulers/PropertyBox.h +++ b/src/gui/rulers/PropertyBox.h @@ -44,19 +44,20 @@ namespace Rosegarden * and provide extra information or options. * */ -class PropertyBox : public QWidget +class PropertyBox : public TQWidget { Q_OBJECT + TQ_OBJECT public: PropertyBox(TQString label, int width, int height, - TQWidget *parent=0, + TQWidget *tqparent=0, const char *name = 0); - virtual TQSize sizeHint() const; - virtual TQSize minimumSizeHint() const; + virtual TQSize tqsizeHint() const; + virtual TQSize tqminimumSizeHint() const; protected: virtual void paintEvent(TQPaintEvent *); diff --git a/src/gui/rulers/PropertyControlRuler.cpp b/src/gui/rulers/PropertyControlRuler.cpp index a597820..4a01cb0 100644 --- a/src/gui/rulers/PropertyControlRuler.cpp +++ b/src/gui/rulers/PropertyControlRuler.cpp @@ -54,11 +54,11 @@ namespace Rosegarden PropertyControlRuler::PropertyControlRuler(PropertyName propertyName, Staff* staff, RulerScale* rulerScale, - EditViewBase* parentView, - TQCanvas* c, TQWidget* parent, + EditViewBase* tqparentView, + TQCanvas* c, TQWidget* tqparent, const char* name, WFlags f) : ControlRuler(&(staff->getSegment()), rulerScale, - parentView, c, parent, name, f), + tqparentView, c, tqparent, name, f), m_propertyName(propertyName), m_staff(staff), m_propertyLine(new TQCanvasLine(canvas())), @@ -98,9 +98,9 @@ PropertyControlRuler::drawBackground() // Draw some minimum and maximum controller value guide lines // TQCanvasLine *topLine = new TQCanvasLine(canvas()); - TQCanvasLine *topQLine = new TQCanvasLine(canvas()); + TQCanvasLine *topTQLine = new TQCanvasLine(canvas()); TQCanvasLine *midLine = new TQCanvasLine(canvas()); - TQCanvasLine *botQLine = new TQCanvasLine(canvas()); + TQCanvasLine *botTQLine = new TQCanvasLine(canvas()); TQCanvasLine *bottomLine = new TQCanvasLine(canvas()); //m_controlLine->setPoints(m_controlLineX, m_controlLineY, m_controlLineX, m_controlLineY); int cHeight = canvas()->height(); @@ -111,20 +111,20 @@ PropertyControlRuler::drawBackground() topLine->setZ( -10); topLine->show(); - topQLine->setPen(TQColor(192, 192, 192)); - topQLine->setPoints(0, cHeight / 4, cWidth, cHeight / 4); - topQLine->setZ( -10); - topQLine->show(); + topTQLine->setPen(TQColor(192, 192, 192)); + topTQLine->setPoints(0, cHeight / 4, cWidth, cHeight / 4); + topTQLine->setZ( -10); + topTQLine->show(); midLine->setPen(TQColor(127, 127, 127)); midLine->setPoints(0, cHeight / 2, cWidth, cHeight / 2); midLine->setZ( -10); midLine->show(); - botQLine->setPen(TQColor(192, 192, 192)); - botQLine->setPoints(0, 3*cHeight / 4, cWidth, 3*cHeight / 4); - botQLine->setZ( -10); - botQLine->show(); + botTQLine->setPen(TQColor(192, 192, 192)); + botTQLine->setPoints(0, 3*cHeight / 4, cWidth, 3*cHeight / 4); + botTQLine->setZ( -10); + botTQLine->show(); bottomLine->setPen(TQColor(127, 127, 127)); bottomLine->setPoints(0, cHeight - 1, cWidth, cHeight - 1); @@ -229,7 +229,7 @@ void PropertyControlRuler::startPropertyLine() { RG_DEBUG << "PropertyControlRuler::startPropertyLine\n"; m_propertyLineShowing = true; - this->setCursor(Qt::pointingHandCursor); + this->setCursor(TQt::pointingHandCursor); } void @@ -238,7 +238,7 @@ PropertyControlRuler::contentsMousePressEvent(TQMouseEvent *e) RG_DEBUG << "PropertyControlRuler::contentsMousePressEvent\n"; if (!m_propertyLineShowing) { - if (e->button() == MidButton) + if (e->button() == Qt::MidButton) m_lastEventPos = inverseMapPoint(e->pos()); ControlRuler::contentsMousePressEvent(e); // send super @@ -247,15 +247,15 @@ PropertyControlRuler::contentsMousePressEvent(TQMouseEvent *e) } // cancel control line mode - if (e->button() == RightButton) { + if (e->button() == Qt::RightButton) { m_propertyLineShowing = false; m_propertyLine->hide(); - this->setCursor(Qt::arrowCursor); + this->setCursor(TQt::arrowCursor); return ; } - if (e->button() == LeftButton) { + if (e->button() == Qt::LeftButton) { TQPoint p = inverseMapPoint(e->pos()); m_propertyLine->show(); @@ -274,7 +274,7 @@ PropertyControlRuler::contentsMouseReleaseEvent(TQMouseEvent *e) /* if (m_propertyLineShowing) { - this->setCursor(Qt::arrowCursor); + this->setCursor(TQt::arrowCursor); m_propertyLineShowing = false; canvas()->update(); } @@ -308,7 +308,7 @@ PropertyControlRuler::contentsMouseReleaseEvent(TQMouseEvent *e) m_propertyLineShowing = false; m_propertyLine->hide(); - this->setCursor(Qt::arrowCursor); + this->setCursor(TQt::arrowCursor); canvas()->update(); } } @@ -321,7 +321,7 @@ PropertyControlRuler::contentsMouseMoveEvent(TQMouseEvent *e) if (!m_propertyLineShowing) { // Don't send super if we're using the middle button // - if (e->button() == MidButton) { + if (e->button() == Qt::MidButton) { m_lastEventPos = inverseMapPoint(e->pos()); return ; } @@ -380,7 +380,7 @@ PropertyControlRuler::drawPropertyLine(timeT startTime, EventSelection selection(*m_segment, startTime, endTime, true); PropertyPattern pattern = DecrescendoPattern; - bool haveNotes = selection.contains(Note::EventType); + bool haveNotes = selection.tqcontains(Note::EventType); if (haveNotes) { @@ -391,7 +391,7 @@ PropertyControlRuler::drawPropertyLine(timeT startTime, startValue, endValue); - m_parentEditView->addCommandToHistory(command); + m_tqparentEditView->addCommandToHistory(command); } else { @@ -408,7 +408,7 @@ PropertyControlRuler::selectAllProperties() /* for(Segment::iterator i = m_segment.begin(); i != m_segment.end(); ++i) - if (!m_eventSelection->contains(*i)) m_eventSelection->addEvent(*i); + if (!m_eventSelection->tqcontains(*i)) m_eventSelection->addEvent(*i); */ clearSelectedItems(); diff --git a/src/gui/rulers/PropertyControlRuler.h b/src/gui/rulers/PropertyControlRuler.h index db1d698..0db8446 100644 --- a/src/gui/rulers/PropertyControlRuler.h +++ b/src/gui/rulers/PropertyControlRuler.h @@ -60,9 +60,9 @@ public: PropertyControlRuler(PropertyName propertyName, Staff*, RulerScale*, - EditViewBase* parentView, + EditViewBase* tqparentView, TQCanvas*, - TQWidget* parent=0, const char* name=0, WFlags f=0); + TQWidget* tqparent=0, const char* name=0, WFlags f=0); virtual ~PropertyControlRuler(); diff --git a/src/gui/rulers/PropertyViewRuler.cpp b/src/gui/rulers/PropertyViewRuler.cpp index 0365ae8..e871f16 100644 --- a/src/gui/rulers/PropertyViewRuler.cpp +++ b/src/gui/rulers/PropertyViewRuler.cpp @@ -52,9 +52,9 @@ PropertyViewRuler::PropertyViewRuler(RulerScale *rulerScale, const PropertyName &property, double xorigin, int height, - TQWidget *parent, + TQWidget *tqparent, const char *name) : - TQWidget(parent, name), + TQWidget(tqparent, name), m_propertyName(property), m_xorigin(xorigin), m_height(height), @@ -69,7 +69,7 @@ PropertyViewRuler::PropertyViewRuler(RulerScale *rulerScale, setBackgroundColor(GUIPalette::getColour(GUIPalette::SegmentCanvas)); - TQString tip = i18n("%1 controller").arg(strtoqstr(property)); + TQString tip = i18n("%1 controller").tqarg(strtoqstr(property)); TQToolTip::add (this, tip); } @@ -94,15 +94,15 @@ PropertyViewRuler::slotScrollHoriz(int x) if (dx > 0) { // moving right, so the existing stuff moves left bitBlt(this, 0, 0, this, dx, 0, w - dx, h); - repaint(w - dx, 0, dx, h); + tqrepaint(w - dx, 0, dx, h); } else { // moving left, so the existing stuff moves right bitBlt(this, -dx, 0, this, 0, 0, w + dx, h); - repaint(0, 0, -dx, h); + tqrepaint(0, 0, -dx, h); } } -QSize -PropertyViewRuler::sizeHint() const +TQSize +PropertyViewRuler::tqsizeHint() const { double width = m_rulerScale->getBarPosition(m_rulerScale->getLastVisibleBar()) + @@ -114,8 +114,8 @@ PropertyViewRuler::sizeHint() const return res; } -QSize -PropertyViewRuler::minimumSizeHint() const +TQSize +PropertyViewRuler::tqminimumSizeHint() const { double firstBarWidth = m_rulerScale->getBarWidth(0) + m_xorigin; TQSize res = TQSize(int(firstBarWidth), m_height); diff --git a/src/gui/rulers/PropertyViewRuler.h b/src/gui/rulers/PropertyViewRuler.h index 19ac410..5640bf6 100644 --- a/src/gui/rulers/PropertyViewRuler.h +++ b/src/gui/rulers/PropertyViewRuler.h @@ -51,6 +51,7 @@ class RulerScale; class PropertyViewRuler : public TQWidget, public HZoomable { Q_OBJECT + TQ_OBJECT public: PropertyViewRuler(RulerScale *rulerScale, @@ -58,13 +59,13 @@ public: const PropertyName &property, double xorigin = 0.0, int height = 0, - TQWidget* parent = 0, + TQWidget* tqparent = 0, const char *name = 0); ~PropertyViewRuler(); - virtual TQSize sizeHint() const; - virtual TQSize minimumSizeHint() const; + virtual TQSize tqsizeHint() const; + virtual TQSize tqminimumSizeHint() const; void setMinimumWidth(int width) { m_width = width; } diff --git a/src/gui/rulers/RawNoteRuler.cpp b/src/gui/rulers/RawNoteRuler.cpp index adfca44..ee159c1 100644 --- a/src/gui/rulers/RawNoteRuler.cpp +++ b/src/gui/rulers/RawNoteRuler.cpp @@ -50,9 +50,9 @@ RawNoteRuler::RawNoteRuler(RulerScale *rulerScale, Segment *segment, double xorigin, int height, - TQWidget *parent, + TQWidget *tqparent, const char *name) : - TQWidget(parent, name), + TQWidget(tqparent, name), m_xorigin(xorigin), m_height(height), m_currentXOffset(0), @@ -86,15 +86,15 @@ RawNoteRuler::slotScrollHoriz(int x) if (dx > 0) { // moving right, so the existing stuff moves left bitBlt(this, 0, 0, this, dx, 0, w - dx, h); - repaint(w - dx, 0, dx, h); + tqrepaint(w - dx, 0, dx, h); } else { // moving left, so the existing stuff moves right bitBlt(this, -dx, 0, this, 0, 0, w + dx, h); - repaint(0, 0, -dx, h); + tqrepaint(0, 0, -dx, h); } } -QSize -RawNoteRuler::sizeHint() const +TQSize +RawNoteRuler::tqsizeHint() const { double width = m_rulerScale->getBarPosition(m_rulerScale->getLastVisibleBar()) + @@ -106,8 +106,8 @@ RawNoteRuler::sizeHint() const return res; } -QSize -RawNoteRuler::minimumSizeHint() const +TQSize +RawNoteRuler::tqminimumSizeHint() const { double firstBarWidth = m_rulerScale->getBarWidth(0) + m_xorigin; TQSize res = TQSize(int(firstBarWidth), m_height); @@ -182,7 +182,7 @@ RawNoteRuler::addChildren(Segment *s, else rightmost = j; - node->children.push_back(subnode); + node->tqchildren.push_back(subnode); j = s->findTime(jex.second); } @@ -263,8 +263,8 @@ RawNoteRuler::dumpSubtree(EventTreeNode *node, int depth) else { std::cerr << "no-pitch]" << std::endl; } - for (EventTreeNode::NodeList::iterator i = node->children.begin(); - i != node->children.end(); ++i) { + for (EventTreeNode::NodeList::iterator i = node->tqchildren.begin(); + i != node->tqchildren.end(); ++i) { dumpSubtree(*i, depth + 1); } #endif @@ -292,14 +292,14 @@ RawNoteRuler::dumpForest(EventTreeNode::NodeList *forest) int RawNoteRuler::EventTreeNode::getDepth() { - int subchildrenDepth = 0; - for (NodeList::iterator i = children.begin(); - i != children.end(); ++i) { + int subtqchildrenDepth = 0; + for (NodeList::iterator i = tqchildren.begin(); + i != tqchildren.end(); ++i) { int subchildDepth = (*i)->getDepth(); - if (subchildDepth > subchildrenDepth) - subchildrenDepth = subchildDepth; + if (subchildDepth > subtqchildrenDepth) + subtqchildrenDepth = subchildDepth; } - return subchildrenDepth + 1; + return subtqchildrenDepth + 1; } int @@ -312,8 +312,8 @@ RawNoteRuler::EventTreeNode::getChildrenAboveOrBelow(bool below, int p) int max = 0; - for (NodeList::iterator i = children.begin(); - i != children.end(); ++i) { + for (NodeList::iterator i = tqchildren.begin(); + i != tqchildren.end(); ++i) { int forThisChild = (*i)->getChildrenAboveOrBelow(below, pitch); long thisChildPitch = pitch; (*(*i)->node)->get @@ -339,7 +339,7 @@ RawNoteRuler::drawNode(TQPainter &paint, DefaultVelocityColour &vc, int below = node->getChildrenAboveOrBelow(true); - NOTATION_DEBUG << "RawNoteRuler::drawNode: children above: " + NOTATION_DEBUG << "RawNoteRuler::drawNode: tqchildren above: " << above << ", below: " << below << endl; #endif @@ -414,8 +414,8 @@ RawNoteRuler::drawNode(TQPainter &paint, DefaultVelocityColour &vc, paint.drawLine(ui0, iy + 1, ui0, iy + ih - 1); paint.drawLine(ui1 - 1, iy + 1, ui1 - 1, iy + ih - 1); - for (EventTreeNode::NodeList::iterator i = node->children.begin(); - i != node->children.end(); ++i) { + for (EventTreeNode::NodeList::iterator i = node->tqchildren.begin(); + i != node->tqchildren.end(); ++i) { long nodePitch = myPitch; (*(*i)->node)->get @@ -451,9 +451,9 @@ RawNoteRuler::paintEvent(TQPaintEvent* e) trackPosition = track->getPosition(); TQToolTip::add(this,i18n("Track #%1, Segment \"%2\" (runtime id %3)") - .arg(trackPosition + 1) - .arg(m_segment->getLabel()) - .arg(m_segment->getRuntimeId())); + .tqarg(trackPosition + 1) + .tqarg(m_segment->getLabel().c_str()) + .tqarg(m_segment->getRuntimeId())); } // START_TIMING; @@ -559,7 +559,7 @@ RawNoteRuler::paintEvent(TQPaintEvent* e) // at a time when no other notes are playing (at least of // those that started no earlier than the paint start time). // Each node in that tree represents a note that starts - // playing during its parent node's note, or at the same time + // playing during its tqparent node's note, or at the same time // as it. drawNode(paint, *DefaultVelocityColour::getInstance(), *fi, m_height - 3, 2); diff --git a/src/gui/rulers/RawNoteRuler.h b/src/gui/rulers/RawNoteRuler.h index 8ced771..fc62946 100644 --- a/src/gui/rulers/RawNoteRuler.h +++ b/src/gui/rulers/RawNoteRuler.h @@ -52,16 +52,17 @@ class DefaultVelocityColour; * It has no editing function (yet?) */ -class RawNoteRuler : public QWidget +class RawNoteRuler : public TQWidget { Q_OBJECT + TQ_OBJECT public: RawNoteRuler(RulerScale *rulerScale, Segment *segment, double xorigin = 0.0, int height = 0, - TQWidget* parent = 0, + TQWidget* tqparent = 0, const char *name = 0); ~RawNoteRuler(); @@ -70,8 +71,8 @@ public: m_segment = segment; } - virtual TQSize sizeHint() const; - virtual TQSize minimumSizeHint() const; + virtual TQSize tqsizeHint() const; + virtual TQSize tqminimumSizeHint() const; void setMinimumWidth(int width) { m_width = width; } @@ -96,8 +97,8 @@ private: EventTreeNode(Segment::iterator n) : node(n) { } ~EventTreeNode() { - for (NodeList::iterator i = children.begin(); - i != children.end(); ++i) { + for (NodeList::iterator i = tqchildren.begin(); + i != tqchildren.end(); ++i) { delete *i; } } @@ -106,7 +107,7 @@ private: int getChildrenAboveOrBelow(bool below = false, int pitch = -1); Segment::iterator node; - NodeList children; + NodeList tqchildren; }; std::pair<timeT, timeT> getExtents(Segment::iterator); diff --git a/src/gui/rulers/StandardRuler.cpp b/src/gui/rulers/StandardRuler.cpp index 4869d84..2f7dc72 100644 --- a/src/gui/rulers/StandardRuler.cpp +++ b/src/gui/rulers/StandardRuler.cpp @@ -49,10 +49,10 @@ StandardRuler::StandardRuler(RosegardenGUIDoc *doc, double xorigin, int barHeight, bool invert, - TQWidget* parent, + TQWidget* tqparent, const char* name, WFlags f): - TQVBox(parent, name, f), + TQVBox(tqparent, name, f), m_invert(invert), m_loopRulerHeight(10), m_currentXOffset(0), diff --git a/src/gui/rulers/StandardRuler.h b/src/gui/rulers/StandardRuler.h index 67eb2f3..f41fc24 100644 --- a/src/gui/rulers/StandardRuler.h +++ b/src/gui/rulers/StandardRuler.h @@ -44,9 +44,10 @@ class MarkerRuler; class SnapGrid; -class StandardRuler : public QVBox +class StandardRuler : public TQVBox { Q_OBJECT + TQ_OBJECT public: StandardRuler(RosegardenGUIDoc *doc, @@ -54,7 +55,7 @@ public: double xorigin, int buttonHeight, bool invert = false, // draw upside-down - TQWidget* parent = 0, + TQWidget* tqparent = 0, const char* name = 0, WFlags f=0); diff --git a/src/gui/rulers/TempoColour.cpp b/src/gui/rulers/TempoColour.cpp index 5d5a448..0be644f 100644 --- a/src/gui/rulers/TempoColour.cpp +++ b/src/gui/rulers/TempoColour.cpp @@ -32,7 +32,7 @@ namespace Rosegarden { -QColor +TQColor TempoColour::getColour(double tempo) { int h, s, v; diff --git a/src/gui/rulers/TempoRuler.cpp b/src/gui/rulers/TempoRuler.cpp index 554d4b2..f5f600a 100644 --- a/src/gui/rulers/TempoRuler.cpp +++ b/src/gui/rulers/TempoRuler.cpp @@ -66,13 +66,13 @@ namespace Rosegarden TempoRuler::TempoRuler(RulerScale *rulerScale, RosegardenGUIDoc *doc, - KMainWindow *parentMainWindow, + KMainWindow *tqparentMainWindow, double xorigin, int height, bool small, - TQWidget *parent, + TQWidget *tqparent, const char *name) : - TQWidget(parent, name), + TQWidget(tqparent, name), m_xorigin(xorigin), m_height(height), m_currentXOffset(0), @@ -96,7 +96,7 @@ TempoRuler::TempoRuler(RulerScale *rulerScale, m_composition(&doc->getComposition()), m_rulerScale(rulerScale), m_menu(0), - m_parentMainWindow(parentMainWindow), + m_tqparentMainWindow(tqparentMainWindow), m_fontMetrics(m_boldFont) { // m_font.setPointSize(m_small ? 9 : 11); @@ -114,7 +114,7 @@ TempoRuler::TempoRuler(RulerScale *rulerScale, m_textFloat->hide(); // setBackgroundColor(GUIPalette::getColour(GUIPalette::TextRulerBackground)); - setBackgroundMode(Qt::NoBackground); + setBackgroundMode(TQt::NoBackground); TQObject::connect (doc->getCommandHistory(), TQT_SIGNAL(commandExecuted()), @@ -124,37 +124,37 @@ TempoRuler::TempoRuler(RulerScale *rulerScale, TQIconSet icon; icon = TQIconSet(TQPixmap(pixmapDir + "/toolbar/event-insert-tempo.png")); - new KAction(i18n("Insert Tempo Change"), icon, 0, this, + new KAction(i18n("Insert Tempo Change"), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotInsertTempoHere()), actionCollection(), "insert_tempo_here"); - new KAction(i18n("Insert Tempo Change at Playback Position"), 0, 0, this, + new KAction(i18n("Insert Tempo Change at Playback Position"), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotInsertTempoAtPointer()), actionCollection(), "insert_tempo_at_pointer"); icon = TQIconSet(TQPixmap(pixmapDir + "/toolbar/event-delete.png")); - new KAction(i18n("Delete Tempo Change"), icon, 0, this, + new KAction(i18n("Delete Tempo Change"), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotDeleteTempoChange()), actionCollection(), "delete_tempo"); - new KAction(i18n("Ramp Tempo to Next Tempo"), 0, 0, this, + new KAction(i18n("Ramp Tempo to Next Tempo"), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotRampToNext()), actionCollection(), "ramp_to_next"); - new KAction(i18n("Un-Ramp Tempo"), 0, 0, this, + new KAction(i18n("Un-Ramp Tempo"), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotUnramp()), actionCollection(), "unramp"); icon = TQIconSet(TQPixmap(pixmapDir + "/toolbar/event-edit.png")); - new KAction(i18n("Edit Tempo..."), icon, 0, this, + new KAction(i18n("Edit Tempo..."), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotEditTempo()), actionCollection(), "edit_tempo"); - new KAction(i18n("Edit Time Signature..."), 0, 0, this, + new KAction(i18n("Edit Time Signature..."), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotEditTimeSignature()), actionCollection(), "edit_time_signature"); - new KAction(i18n("Open Tempo and Time Signature Editor"), 0, 0, this, + new KAction(i18n("Open Tempo and Time Signature Editor"), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotEditTempos()), actionCollection(), "edit_tempos"); @@ -165,7 +165,7 @@ TempoRuler::~TempoRuler() { // we have to do this so that the menu is re-created properly // when the main window is itself recreated (on a File->New for instance) - KXMLGUIFactory* factory = m_parentMainWindow->factory(); + KXMLGUIFactory* factory = m_tqparentMainWindow->factory(); if (factory) factory->removeClient(this); } @@ -231,17 +231,17 @@ TempoRuler::slotScrollHoriz(int x) if (dx > 0) { // moving right, so the existing stuff moves left bitBlt(this, 0, 0, this, dx, 0, w - dx, h); - repaint(w - dx, 0, dx, h); + tqrepaint(w - dx, 0, dx, h); } else { // moving left, so the existing stuff moves right bitBlt(this, -dx, 0, this, 0, 0, w + dx, h); - repaint(0, 0, -dx, h); + tqrepaint(0, 0, -dx, h); } } void TempoRuler::mousePressEvent(TQMouseEvent *e) { - if (e->button() == LeftButton) { + if (e->button() == Qt::LeftButton) { if (e->type() == TQEvent::MouseButtonDblClick) { timeT t = m_rulerScale->getTimeForX @@ -269,13 +269,13 @@ TempoRuler::mousePressEvent(TQMouseEvent *e) m_dragStartTarget = tr.first ? tr.second : -1; m_dragOriginalTempo = m_dragStartTempo; m_dragOriginalTarget = m_dragStartTarget; - m_dragFine = ((e->state() & Qt::ShiftButton) != 0); + m_dragFine = ((e->state() & TQt::ShiftButton) != 0); int px = m_rulerScale->getXForTime(tc.first) + m_currentXOffset + m_xorigin; if (x >= px && x < px + 5) { m_dragHoriz = true; m_dragVert = false; - setCursor(Qt::SplitHCursor); + setCursor(TQt::SplitHCursor); } else { timeT nt = m_composition->getEndMarker(); if (tcn < m_composition->getTempoChangeCount() - 1) { @@ -284,16 +284,16 @@ TempoRuler::mousePressEvent(TQMouseEvent *e) int nx = m_rulerScale->getXForTime(nt) + m_currentXOffset + m_xorigin; if (x > px + 5 && x > nx - 5) { m_dragTarget = true; - setCursor(Qt::SizeVerCursor); + setCursor(TQt::SizeVerCursor); } else { m_dragTarget = false; - setCursor(Qt::SplitVCursor); + setCursor(TQt::SplitVCursor); } m_dragVert = true; m_dragHoriz = false; } - } else if (e->button() == RightButton) { + } else if (e->button() == Qt::RightButton) { m_clickX = e->x(); if (!m_menu) @@ -371,7 +371,7 @@ TempoRuler::mouseReleaseEvent(TQMouseEvent *e) void TempoRuler::mouseMoveEvent(TQMouseEvent *e) { - bool shiftPressed = ((e->state() & Qt::ShiftButton) != 0); + bool shiftPressed = ((e->state() & TQt::ShiftButton) != 0); if (m_dragVert) { @@ -555,20 +555,20 @@ TempoRuler::showTextFloat(tempoT tempo, tempoT target, // blargh -- duplicated with TempoView::makeTimeString timeText = TQString("%1%2%3-%4%5-%6%7-%8%9") - .arg(bar / 100) - .arg((bar % 100) / 10) - .arg(bar % 10) - .arg(beat / 10) - .arg(beat % 10) - .arg(fraction / 10) - .arg(fraction % 10) - .arg(remainder / 10) - .arg(remainder % 10); + .tqarg(bar / 100) + .tqarg((bar % 100) / 10) + .tqarg(bar % 10) + .tqarg(beat / 10) + .tqarg(beat % 10) + .tqarg(fraction / 10) + .tqarg(fraction % 10) + .tqarg(remainder / 10) + .tqarg(remainder % 10); timeText = TQString("%1\n%2") - .arg(timeText) - // .arg(rt.toString().c_str()); - .arg(rt.toText(true).c_str()); + .tqarg(timeText) + // .tqarg(rt.toString().c_str()); + .tqarg(rt.toText(true).c_str()); } TimeSignature sig = @@ -586,14 +586,14 @@ TempoRuler::showTextFloat(tempoT tempo, tempoT target, int b00 = int(bpm * 100 + 0.0001) % 10; tempoText = i18n("%1.%2%3 (%4.%5%6 bpm)") - .arg(qi).arg(q0).arg(q00) - .arg(bi).arg(b0).arg(b00); + .tqarg(qi).tqarg(q0).tqarg(q00) + .tqarg(bi).tqarg(b0).tqarg(b00); haveSet = true; } } if (!haveSet) { - tempoText = i18n("%1.%2%3 bpm").arg(qi).arg(q0).arg(q00); + tempoText = i18n("%1.%2%3 bpm").tqarg(qi).tqarg(q0).tqarg(q00); } if (target > 0 && target != tempo) { @@ -601,11 +601,11 @@ TempoRuler::showTextFloat(tempoT tempo, tempoT target, int tqi = int(tq + 0.0001); int tq0 = int(tq * 10 + 0.0001) % 10; int tq00 = int(tq * 100 + 0.0001) % 10; - tempoText = i18n("%1 - %2.%3%4").arg(tempoText).arg(tqi).arg(tq0).arg(tq00); + tempoText = i18n("%1 - %2.%3%4").tqarg(tempoText).tqarg(tqi).tqarg(tq0).tqarg(tq00); } if (showTime && time >= 0) { - m_textFloat->setText(TQString("%1\n%2").arg(timeText).arg(tempoText)); + m_textFloat->setText(TQString("%1\n%2").tqarg(timeText).tqarg(tempoText)); } else { m_textFloat->setText(tempoText); } @@ -614,12 +614,12 @@ TempoRuler::showTextFloat(tempoT tempo, tempoT target, // std::cerr << "cp = " << cp.x() << "," << cp.y() << ", tempo = " << qpm << std::endl; TQPoint mp = cp + pos(); - TQWidget *parent = parentWidget(); - while (parent->parentWidget() && - !parent->isTopLevel() && - !parent->isDialog()) { - mp += parent->pos(); - parent = parent->parentWidget(); + TQWidget *tqparent = tqparentWidget(); + while (tqparent->tqparentWidget() && + !tqparent->isTopLevel() && + !tqparent->isDialog()) { + mp += tqparent->pos(); + tqparent = tqparent->tqparentWidget(); } int yoff = cp.y() + m_textFloat->height() + 3; @@ -629,8 +629,8 @@ TempoRuler::showTextFloat(tempoT tempo, tempoT target, m_textFloat->show(); } -QSize -TempoRuler::sizeHint() const +TQSize +TempoRuler::tqsizeHint() const { double width = m_rulerScale->getBarPosition(m_rulerScale->getLastVisibleBar()) + @@ -642,8 +642,8 @@ TempoRuler::sizeHint() const return res; } -QSize -TempoRuler::minimumSizeHint() const +TQSize +TempoRuler::tqminimumSizeHint() const { double firstBarWidth = m_rulerScale->getBarWidth(0) + m_xorigin; TQSize res = TQSize(int(firstBarWidth), m_height); @@ -829,7 +829,7 @@ TempoRuler::paintEvent(TQPaintEvent* e) bool illuminateLine = (illuminate && !m_illuminatePoint && !m_illuminateTarget); - paint.setPen(illuminateLine ? Qt::white : Qt::black); + paint.setPen(illuminateLine ? TQt::white : TQt::black); if (ramping.first) { ry = getYForTempo(ramping.second); @@ -846,7 +846,7 @@ TempoRuler::paintEvent(TQPaintEvent* e) if (!illuminateLine && illuminate && m_illuminateTarget) { if (x > lastx) { - paint.setPen(Qt::white); + paint.setPen(TQt::white); paint.drawLine(x - 6, ry - ((ry - lasty) * 6) / (x - lastx), x - 2, ry); } @@ -858,10 +858,10 @@ TempoRuler::paintEvent(TQPaintEvent* e) bool illuminatePoint = (illuminate && m_illuminatePoint); - paint.setPen(illuminatePoint ? Qt::white : Qt::black); + paint.setPen(illuminatePoint ? TQt::white : TQt::black); paint.drawRect(x - 1, y - 1, 3, 3); - paint.setPen(illuminatePoint ? Qt::black : Qt::white); + paint.setPen(illuminatePoint ? TQt::black : TQt::white); paint.drawPoint(x, y); } @@ -883,7 +883,7 @@ TempoRuler::paintEvent(TQPaintEvent* e) if (haveSome) { bool illuminateLine = (illuminate && !m_illuminatePoint); - paint.setPen(illuminateLine ? Qt::white : Qt::black); + paint.setPen(illuminateLine ? TQt::white : TQt::black); paint.drawLine(lastx + 1, lasty, width(), lasty); } else if (!m_refreshLinesOnly) { tempoT tempo = m_composition->getTempoAtTime(from); @@ -893,8 +893,8 @@ TempoRuler::paintEvent(TQPaintEvent* e) paint.drawRect(e->rect()); } - paint.setPen(Qt::black); - paint.setBrush(Qt::black); + paint.setPen(TQt::black); + paint.setBrush(TQt::black); paint.drawLine(0, 0, width(), 0); for (TimePoints::iterator i = timePoints.begin(); @@ -917,8 +917,8 @@ TempoRuler::paintEvent(TQPaintEvent* e) m_composition->getTimeSignatureAt(time); TQString str = TQString("%1/%2") - .arg(sig.getNumerator()) - .arg(sig.getDenominator()); + .tqarg(sig.getNumerator()) + .tqarg(sig.getDenominator()); paint.setFont(m_boldFont); paint.drawText(static_cast<int>(x) + 2, m_height - 2, str); @@ -930,7 +930,7 @@ TempoRuler::paintEvent(TQPaintEvent* e) long bpm = long(tempo); // long frac = long(tempo * 100 + 0.001) - 100 * bpm; - TQString tempoString = TQString("%1").arg(bpm); + TQString tempoString = TQString("%1").tqarg(bpm); if (tempo == prevTempo) { if (m_small) @@ -1074,7 +1074,7 @@ TempoRuler::createMenu() { setXMLFile("temporuler.rc"); - KXMLGUIFactory* factory = m_parentMainWindow->factory(); + KXMLGUIFactory* factory = m_tqparentMainWindow->factory(); factory->addClient(this); TQWidget* tmp = factory->container("tempo_ruler_menu", this); diff --git a/src/gui/rulers/TempoRuler.h b/src/gui/rulers/TempoRuler.h index 7bf073e..ce51213 100644 --- a/src/gui/rulers/TempoRuler.h +++ b/src/gui/rulers/TempoRuler.h @@ -61,6 +61,7 @@ class Composition; class TempoRuler : public TQWidget, public KXMLGUIClient { Q_OBJECT + TQ_OBJECT public: /** @@ -72,17 +73,17 @@ public: */ TempoRuler(RulerScale *rulerScale, RosegardenGUIDoc *doc, - KMainWindow *parentMainWindow, + KMainWindow *tqparentMainWindow, double xorigin = 0.0, int height = 0, bool small = false, - TQWidget* parent = 0, + TQWidget* tqparent = 0, const char *name = 0); ~TempoRuler(); - virtual TQSize sizeHint() const; - virtual TQSize minimumSizeHint() const; + virtual TQSize tqsizeHint() const; + virtual TQSize tqminimumSizeHint() const; void setMinimumWidth(int width) { m_width = width; } @@ -166,7 +167,7 @@ private: RulerScale *m_rulerScale; TextFloat *m_textFloat; TQPopupMenu *m_menu; - KMainWindow *m_parentMainWindow; + KMainWindow *m_tqparentMainWindow; TQFont m_font; TQFont m_boldFont; diff --git a/src/gui/rulers/TextRuler.cpp b/src/gui/rulers/TextRuler.cpp index 4ef0569..d5db081 100644 --- a/src/gui/rulers/TextRuler.cpp +++ b/src/gui/rulers/TextRuler.cpp @@ -46,9 +46,9 @@ namespace Rosegarden TextRuler::TextRuler(RulerScale *rulerScale, Segment *segment, int height, - TQWidget *parent, + TQWidget *tqparent, const char *name) - : TQWidget(parent, name), + : TQWidget(tqparent, name), m_height(height), m_currentXOffset(0), m_width( -1), @@ -84,15 +84,15 @@ TextRuler::slotScrollHoriz(int x) if (dx > 0) { // moving right, so the existing stuff moves left bitBlt(this, 0, 0, this, dx, 0, w - dx, h); - repaint(w - dx, 0, dx, h); + tqrepaint(w - dx, 0, dx, h); } else { // moving left, so the existing stuff moves right bitBlt(this, -dx, 0, this, 0, 0, w + dx, h); - repaint(0, 0, -dx, h); + tqrepaint(0, 0, -dx, h); } } -QSize -TextRuler::sizeHint() const +TQSize +TextRuler::tqsizeHint() const { double width = m_rulerScale->getBarPosition(m_rulerScale->getLastVisibleBar()) + @@ -103,8 +103,8 @@ TextRuler::sizeHint() const return res; } -QSize -TextRuler::minimumSizeHint() const +TQSize +TextRuler::tqminimumSizeHint() const { double firstBarWidth = m_rulerScale->getBarWidth(0); TQSize res = TQSize(int(firstBarWidth), m_height); diff --git a/src/gui/rulers/TextRuler.h b/src/gui/rulers/TextRuler.h index 1e303d3..90b9aea 100644 --- a/src/gui/rulers/TextRuler.h +++ b/src/gui/rulers/TextRuler.h @@ -55,9 +55,10 @@ class RulerScale; * associated with a staff. */ -class TextRuler : public QWidget +class TextRuler : public TQWidget { Q_OBJECT + TQ_OBJECT public: /** @@ -76,13 +77,13 @@ public: TextRuler(RulerScale *rulerScale, Segment *segment, int height = 0, - TQWidget* parent = 0, + TQWidget* tqparent = 0, const char *name = 0); ~TextRuler(); - virtual TQSize sizeHint() const; - virtual TQSize minimumSizeHint() const; + virtual TQSize tqsizeHint() const; + virtual TQSize tqminimumSizeHint() const; void setMinimumWidth(int width) { m_width = width; } diff --git a/src/gui/rulers/VelocityColour.h b/src/gui/rulers/VelocityColour.h index e43dd22..291fb7f 100644 --- a/src/gui/rulers/VelocityColour.h +++ b/src/gui/rulers/VelocityColour.h @@ -37,7 +37,7 @@ namespace Rosegarden /** - * Returns a QColour according to a formula. We provide three colours + * Returns a TQColour according to a formula. We provide three colours * to mix, a maximum value and three knees at which points the * intermediate colours max out. Play around to your satisfaction. */ diff --git a/src/gui/seqmanager/CompositionMmapper.cpp b/src/gui/seqmanager/CompositionMmapper.cpp index 30983fe..778b655 100644 --- a/src/gui/seqmanager/CompositionMmapper.cpp +++ b/src/gui/seqmanager/CompositionMmapper.cpp @@ -49,7 +49,7 @@ CompositionMmapper::CompositionMmapper(RosegardenGUIDoc *doc) { cleanup(); - SEQMAN_DEBUG << "CompositionMmapper() - doc = " << doc << endl; + SETQMAN_DEBUG << "CompositionMmapper() - doc = " << doc << endl; Composition &comp = m_doc->getComposition(); for (Composition::iterator it = comp.begin(); it != comp.end(); it++) { @@ -67,7 +67,7 @@ CompositionMmapper::CompositionMmapper(RosegardenGUIDoc *doc) CompositionMmapper::~CompositionMmapper() { - SEQMAN_DEBUG << "~CompositionMmapper()\n"; + SETQMAN_DEBUG << "~CompositionMmapper()\n"; // // Clean up possible left-overs @@ -92,7 +92,7 @@ void CompositionMmapper::cleanup() TQDir segmentsDir(tmpPath, "segment_*"); for (unsigned int i = 0; i < segmentsDir.count(); ++i) { TQString segmentName = tmpPath + '/' + segmentsDir[i]; - SEQMAN_DEBUG << "CompositionMmapper : cleaning up " << segmentName << endl; + SETQMAN_DEBUG << "CompositionMmapper : cleaning up " << segmentName << endl; TQFile::remove (segmentName); } @@ -107,7 +107,7 @@ bool CompositionMmapper::segmentModified(Segment* segment) return false; // this can happen with the SegmentSplitCommand, where the new segment's transpose is set // even though it's not mapped yet - SEQMAN_DEBUG << "CompositionMmapper::segmentModified(" << segment << ") - mmapper = " + SETQMAN_DEBUG << "CompositionMmapper::segmentModified(" << segment << ") - mmapper = " << mmapper << endl; return mmapper->refresh(); @@ -115,24 +115,24 @@ bool CompositionMmapper::segmentModified(Segment* segment) void CompositionMmapper::segmentAdded(Segment* segment) { - SEQMAN_DEBUG << "CompositionMmapper::segmentAdded(" << segment << ")\n"; + SETQMAN_DEBUG << "CompositionMmapper::segmentAdded(" << segment << ")\n"; mmapSegment(segment); } void CompositionMmapper::segmentDeleted(Segment* segment) { - SEQMAN_DEBUG << "CompositionMmapper::segmentDeleted(" << segment << ")\n"; + SETQMAN_DEBUG << "CompositionMmapper::segmentDeleted(" << segment << ")\n"; SegmentMmapper* mmapper = m_segmentMmappers[segment]; m_segmentMmappers.erase(segment); - SEQMAN_DEBUG << "CompositionMmapper::segmentDeleted() : deleting SegmentMmapper " << mmapper << endl; + SETQMAN_DEBUG << "CompositionMmapper::segmentDeleted() : deleting SegmentMmapper " << mmapper << endl; delete mmapper; } void CompositionMmapper::mmapSegment(Segment* segment) { - SEQMAN_DEBUG << "CompositionMmapper::mmapSegment(" << segment << ")\n"; + SETQMAN_DEBUG << "CompositionMmapper::mmapSegment(" << segment << ")\n"; SegmentMmapper* mmapper = SegmentMmapperFactory::makeMmapperForSegment(m_doc, segment, @@ -147,8 +147,8 @@ TQString CompositionMmapper::makeFileName(Segment* segment) TQStringList tmpDirs = KGlobal::dirs()->resourceDirs("tmp"); return TQString("%1/segment_%2") - .arg(tmpDirs.last()) - .arg((uintptr_t)segment, 0, 16); + .tqarg(tmpDirs.last()) + .tqarg((uintptr_t)segment, 0, 16); } TQString CompositionMmapper::getSegmentFileName(Segment* s) @@ -158,7 +158,7 @@ TQString CompositionMmapper::getSegmentFileName(Segment* s) if (mmapper) return mmapper->getFileName(); else - return TQString::null; + return TQString(); } size_t CompositionMmapper::getSegmentFileSize(Segment* s) diff --git a/src/gui/seqmanager/ControlBlockMmapper.cpp b/src/gui/seqmanager/ControlBlockMmapper.cpp index 3b49bcc..46c632b 100644 --- a/src/gui/seqmanager/ControlBlockMmapper.cpp +++ b/src/gui/seqmanager/ControlBlockMmapper.cpp @@ -61,7 +61,7 @@ ControlBlockMmapper::ControlBlockMmapper(RosegardenGUIDoc* doc) m_fd = ::open(m_fileName.latin1(), O_RDWR | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR); if (m_fd < 0) { - SEQMAN_DEBUG << "ControlBlockMmapper : Couldn't open " << m_fileName + SETQMAN_DEBUG << "ControlBlockMmapper : Couldn't open " << m_fileName << endl; throw Exception("Couldn't open " + qstrtostr(m_fileName)); } @@ -76,11 +76,11 @@ ControlBlockMmapper::ControlBlockMmapper(RosegardenGUIDoc* doc) MAP_SHARED, m_fd, 0); if (m_mmappedBuffer == (void*) - 1) { - SEQMAN_DEBUG << TQString("mmap failed : (%1) %2\n").arg(errno).arg(strerror(errno)); + SETQMAN_DEBUG << TQString("mmap failed : (%1) %2\n").tqarg(errno).tqarg(strerror(errno)); throw Exception("mmap failed"); } - SEQMAN_DEBUG << "ControlBlockMmapper : mmap size : " << m_mmappedSize + SETQMAN_DEBUG << "ControlBlockMmapper : mmap size : " << m_mmappedSize << " at " << (void*)m_mmappedBuffer << endl; // Create new control block on file @@ -125,7 +125,7 @@ void ControlBlockMmapper::updateMetronomeData(InstrumentId instId) void ControlBlockMmapper::updateMetronomeForPlayback() { bool muted = !m_doc->getComposition().usePlayMetronome(); - SEQMAN_DEBUG << "ControlBlockMmapper::updateMetronomeForPlayback: muted=" << muted << endl; + SETQMAN_DEBUG << "ControlBlockMmapper::updateMetronomeForPlayback: muted=" << muted << endl; if (m_controlBlock->isMetronomeMuted() == muted) return ; m_controlBlock->setMetronomeMuted(muted); @@ -134,7 +134,7 @@ void ControlBlockMmapper::updateMetronomeForPlayback() void ControlBlockMmapper::updateMetronomeForRecord() { bool muted = !m_doc->getComposition().useRecordMetronome(); - SEQMAN_DEBUG << "ControlBlockMmapper::updateMetronomeForRecord: muted=" << muted << endl; + SETQMAN_DEBUG << "ControlBlockMmapper::updateMetronomeForRecord: muted=" << muted << endl; if (m_controlBlock->isMetronomeMuted() == muted) return ; m_controlBlock->setMetronomeMuted(muted); @@ -163,14 +163,14 @@ bool ControlBlockMmapper::updateSoloData(bool solo, void ControlBlockMmapper::setDocument(RosegardenGUIDoc* doc) { - SEQMAN_DEBUG << "ControlBlockMmapper::setDocument()\n"; + SETQMAN_DEBUG << "ControlBlockMmapper::setDocument()\n"; m_doc = doc; initControlBlock(); } void ControlBlockMmapper::initControlBlock() { - SEQMAN_DEBUG << "ControlBlockMmapper::initControlBlock()\n"; + SETQMAN_DEBUG << "ControlBlockMmapper::initControlBlock()\n"; m_controlBlock = new (m_mmappedBuffer) ControlBlock(m_doc->getComposition().getMaxTrackId()); @@ -194,7 +194,7 @@ void ControlBlockMmapper::initControlBlock() void ControlBlockMmapper::setFileSize(size_t size) { - SEQMAN_DEBUG << "ControlBlockMmapper : setting size of " + SETQMAN_DEBUG << "ControlBlockMmapper : setting size of " << m_fileName << " to " << size << endl; // rewind ::lseek(m_fd, 0, SEEK_SET); diff --git a/src/gui/seqmanager/MetronomeMmapper.cpp b/src/gui/seqmanager/MetronomeMmapper.cpp index 64964f0..d9804cd 100644 --- a/src/gui/seqmanager/MetronomeMmapper.cpp +++ b/src/gui/seqmanager/MetronomeMmapper.cpp @@ -54,7 +54,7 @@ MetronomeMmapper::MetronomeMmapper(RosegardenGUIDoc* doc) m_metronome(0), // no metronome to begin with m_tickDuration(0, 100000000) { - SEQMAN_DEBUG << "MetronomeMmapper ctor : " << this << endl; + SETQMAN_DEBUG << "MetronomeMmapper ctor : " << this << endl; // get metronome device Studio &studio = m_doc->getStudio(); @@ -65,13 +65,13 @@ MetronomeMmapper::MetronomeMmapper(RosegardenGUIDoc* doc) if (metronome) { - SEQMAN_DEBUG << "MetronomeMmapper: have metronome, it's on instrument " << metronome->getInstrument() << endl; + SETQMAN_DEBUG << "MetronomeMmapper: have metronome, it's on instrument " << metronome->getInstrument() << endl; m_metronome = new MidiMetronome(*metronome); } else { m_metronome = new MidiMetronome (SystemInstrumentBase); - SEQMAN_DEBUG << "MetronomeMmapper: no metronome for device " << device << endl; + SETQMAN_DEBUG << "MetronomeMmapper: no metronome for device " << device << endl; } Composition& c = m_doc->getComposition(); @@ -129,7 +129,7 @@ MetronomeMmapper::MetronomeMmapper(RosegardenGUIDoc* doc) sortTicks(); if (m_ticks.size() == 0) { - SEQMAN_DEBUG << "MetronomeMmapper : WARNING no ticks generated\n"; + SETQMAN_DEBUG << "MetronomeMmapper : WARNING no ticks generated\n"; } // Done by init() @@ -144,7 +144,7 @@ MetronomeMmapper::MetronomeMmapper(RosegardenGUIDoc* doc) MetronomeMmapper::~MetronomeMmapper() { - SEQMAN_DEBUG << "~MetronomeMmapper " << this << endl; + SETQMAN_DEBUG << "~MetronomeMmapper " << this << endl; delete m_metronome; } @@ -163,14 +163,14 @@ void MetronomeMmapper::dump() RealTime eventTime; Composition& comp = m_doc->getComposition(); - SEQMAN_DEBUG << "MetronomeMmapper::dump: instrument is " << m_metronome->getInstrument() << endl; + SETQMAN_DEBUG << "MetronomeMmapper::dump: instrument is " << m_metronome->getInstrument() << endl; MappedEvent* bufPos = m_mmappedEventBuffer, *mE; for (TickContainer::iterator i = m_ticks.begin(); i != m_ticks.end(); ++i) { /* - SEQMAN_DEBUG << "MetronomeMmapper::dump: velocity = " + SETQMAN_DEBUG << "MetronomeMmapper::dump: velocity = " << int(velocity) << endl; */ @@ -214,7 +214,7 @@ void MetronomeMmapper::dump() // Store the number of events at the start of the shared memory region *(size_t *)m_mmappedRegion = (bufPos - m_mmappedEventBuffer); - SEQMAN_DEBUG << "MetronomeMmapper::dump: - " + SETQMAN_DEBUG << "MetronomeMmapper::dump: - " << "Total events written = " << *(size_t *)m_mmappedRegion << endl; } @@ -244,7 +244,7 @@ size_t MetronomeMmapper::computeMmappedSize() Note(Note::Crotchet).getDuration(); /* - SEQMAN_DEBUG << "MetronomeMmapper::computeMmappedSize - " + SETQMAN_DEBUG << "MetronomeMmapper::computeMmappedSize - " << "Number of clock events catered for = " << clocks << endl; */ diff --git a/src/gui/seqmanager/MidiFilterDialog.cpp b/src/gui/seqmanager/MidiFilterDialog.cpp index 0227eff..dfd2017 100644 --- a/src/gui/seqmanager/MidiFilterDialog.cpp +++ b/src/gui/seqmanager/MidiFilterDialog.cpp @@ -41,9 +41,9 @@ namespace Rosegarden { -MidiFilterDialog::MidiFilterDialog(TQWidget *parent, +MidiFilterDialog::MidiFilterDialog(TQWidget *tqparent, RosegardenGUIDoc *doc): - KDialogBase(parent, 0, true, i18n("Modify MIDI filters..."), + KDialogBase(tqparent, 0, true, i18n("Modify MIDI filters..."), Ok | Apply | Close | Help), m_doc(doc), m_modified(true) @@ -141,46 +141,46 @@ MidiFilterDialog::slotApply() MidiFilter thruFilter = 0, recordFilter = 0; - if (dynamic_cast<TQCheckBox*>(m_thruBox->find(0))->isChecked()) + if (dynamic_cast<TQCheckBox*>(m_thruBox->tqfind(0))->isChecked()) thruFilter |= MappedEvent::MidiNote; - if (dynamic_cast<TQCheckBox*>(m_thruBox->find(1))->isChecked()) + if (dynamic_cast<TQCheckBox*>(m_thruBox->tqfind(1))->isChecked()) thruFilter |= MappedEvent::MidiProgramChange; - if (dynamic_cast<TQCheckBox*>(m_thruBox->find(2))->isChecked()) + if (dynamic_cast<TQCheckBox*>(m_thruBox->tqfind(2))->isChecked()) thruFilter |= MappedEvent::MidiKeyPressure; - if (dynamic_cast<TQCheckBox*>(m_thruBox->find(3))->isChecked()) + if (dynamic_cast<TQCheckBox*>(m_thruBox->tqfind(3))->isChecked()) thruFilter |= MappedEvent::MidiChannelPressure; - if (dynamic_cast<TQCheckBox*>(m_thruBox->find(4))->isChecked()) + if (dynamic_cast<TQCheckBox*>(m_thruBox->tqfind(4))->isChecked()) thruFilter |= MappedEvent::MidiPitchBend; - if (dynamic_cast<TQCheckBox*>(m_thruBox->find(5))->isChecked()) + if (dynamic_cast<TQCheckBox*>(m_thruBox->tqfind(5))->isChecked()) thruFilter |= MappedEvent::MidiController; - if (dynamic_cast<TQCheckBox*>(m_thruBox->find(6))->isChecked()) + if (dynamic_cast<TQCheckBox*>(m_thruBox->tqfind(6))->isChecked()) thruFilter |= MappedEvent::MidiSystemMessage; - if (dynamic_cast<TQCheckBox*>(m_recordBox->find(0))->isChecked()) + if (dynamic_cast<TQCheckBox*>(m_recordBox->tqfind(0))->isChecked()) recordFilter |= MappedEvent::MidiNote; - if (dynamic_cast<TQCheckBox*>(m_recordBox->find(1))->isChecked()) + if (dynamic_cast<TQCheckBox*>(m_recordBox->tqfind(1))->isChecked()) recordFilter |= MappedEvent::MidiProgramChange; - if (dynamic_cast<TQCheckBox*>(m_recordBox->find(2))->isChecked()) + if (dynamic_cast<TQCheckBox*>(m_recordBox->tqfind(2))->isChecked()) recordFilter |= MappedEvent::MidiKeyPressure; - if (dynamic_cast<TQCheckBox*>(m_recordBox->find(3))->isChecked()) + if (dynamic_cast<TQCheckBox*>(m_recordBox->tqfind(3))->isChecked()) recordFilter |= MappedEvent::MidiChannelPressure; - if (dynamic_cast<TQCheckBox*>(m_recordBox->find(4))->isChecked()) + if (dynamic_cast<TQCheckBox*>(m_recordBox->tqfind(4))->isChecked()) recordFilter |= MappedEvent::MidiPitchBend; - if (dynamic_cast<TQCheckBox*>(m_recordBox->find(5))->isChecked()) + if (dynamic_cast<TQCheckBox*>(m_recordBox->tqfind(5))->isChecked()) recordFilter |= MappedEvent::MidiController; - if (dynamic_cast<TQCheckBox*>(m_recordBox->find(6))->isChecked()) + if (dynamic_cast<TQCheckBox*>(m_recordBox->tqfind(6))->isChecked()) recordFilter |= MappedEvent::MidiSystemMessage; diff --git a/src/gui/seqmanager/MidiFilterDialog.h b/src/gui/seqmanager/MidiFilterDialog.h index aaeda9c..370ea14 100644 --- a/src/gui/seqmanager/MidiFilterDialog.h +++ b/src/gui/seqmanager/MidiFilterDialog.h @@ -42,8 +42,9 @@ class RosegardenGUIDoc; class MidiFilterDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - MidiFilterDialog(TQWidget *parent, + MidiFilterDialog(TQWidget *tqparent, RosegardenGUIDoc *doc); void setModified(bool value); diff --git a/src/gui/seqmanager/SegmentMmapper.cpp b/src/gui/seqmanager/SegmentMmapper.cpp index 37575b2..23f4c6b 100644 --- a/src/gui/seqmanager/SegmentMmapper.cpp +++ b/src/gui/seqmanager/SegmentMmapper.cpp @@ -60,7 +60,7 @@ SegmentMmapper::SegmentMmapper(RosegardenGUIDoc* doc, m_mmappedRegion(0), m_mmappedEventBuffer((MappedEvent*)0) { - SEQMAN_DEBUG << "SegmentMmapper : " << this + SETQMAN_DEBUG << "SegmentMmapper : " << this << " trying to mmap " << m_fileName << endl; @@ -68,12 +68,12 @@ SegmentMmapper::SegmentMmapper(RosegardenGUIDoc* doc, S_IRUSR | S_IWUSR); if (m_fd < 0) { perror("SegmentMmapper::SegmentMmapper: Failed to open mmap file for writing"); - SEQMAN_DEBUG << "SegmentMmapper : Couldn't open " << m_fileName + SETQMAN_DEBUG << "SegmentMmapper : Couldn't open " << m_fileName << endl; throw Exception("Couldn't open " + qstrtostr(m_fileName)); } - // SEQMAN_DEBUG << "SegmentMmapper : mmap size = " << m_mmappedSize + // SETQMAN_DEBUG << "SegmentMmapper : mmap size = " << m_mmappedSize // << endl; } @@ -86,18 +86,18 @@ void SegmentMmapper::init() doMmap(); dump(); if (m_segment != 0) { - SEQMAN_DEBUG << "SegmentMmapper::init : mmap size = " << m_mmappedSize + SETQMAN_DEBUG << "SegmentMmapper::init : mmap size = " << m_mmappedSize << " for segment " << m_segment->getLabel() << endl; } } else { - SEQMAN_DEBUG << "SegmentMmapper::init : mmap size = 0 - skipping mmapping for now\n"; + SETQMAN_DEBUG << "SegmentMmapper::init : mmap size = 0 - skipping mmapping for now\n"; } } SegmentMmapper::~SegmentMmapper() { - SEQMAN_DEBUG << "~SegmentMmapper : " << this + SETQMAN_DEBUG << "~SegmentMmapper : " << this << " unmapping " << (void*)m_mmappedRegion << " of size " << m_mmappedSize << endl; @@ -106,7 +106,7 @@ SegmentMmapper::~SegmentMmapper() ::munmap(m_mmappedRegion, m_mmappedSize); ::close(m_fd); - SEQMAN_DEBUG << "~SegmentMmapper : removing " << m_fileName << endl; + SETQMAN_DEBUG << "~SegmentMmapper : removing " << m_fileName << endl; TQFile::remove (m_fileName); @@ -118,7 +118,7 @@ bool SegmentMmapper::refresh() size_t newMmappedSize = computeMmappedSize() + sizeof(size_t); - SEQMAN_DEBUG << "SegmentMmapper::refresh() - " << getFileName() + SETQMAN_DEBUG << "SegmentMmapper::refresh() - " << getFileName() << " - m_mmappedRegion = " << (void*)m_mmappedRegion << " - m_mmappedEventBuffer = " << (void*)m_mmappedEventBuffer << " - new size = " << newMmappedSize @@ -157,7 +157,7 @@ bool SegmentMmapper::refresh() void SegmentMmapper::setFileSize(size_t size) { - SEQMAN_DEBUG << "SegmentMmapper::setFileSize() : setting size of " + SETQMAN_DEBUG << "SegmentMmapper::setFileSize() : setting size of " << m_fileName << " to " << size << " - current size = " << m_mmappedSize << endl; @@ -173,7 +173,7 @@ void SegmentMmapper::setFileSize(size_t size) // so go the safe way if (size == 0) { - SEQMAN_DEBUG << "SegmentMmapper : size == 0 : no resize to do\n"; + SETQMAN_DEBUG << "SegmentMmapper : size == 0 : no resize to do\n"; return ; } @@ -203,13 +203,13 @@ void SegmentMmapper::setFileSize(size_t size) void SegmentMmapper::remap(size_t newsize) { - SEQMAN_DEBUG << "SegmentMmapper : remapping " << m_fileName + SETQMAN_DEBUG << "SegmentMmapper : remapping " << m_fileName << " from size " << m_mmappedSize << " to size " << newsize << endl; if (!m_mmappedRegion) { // nothing to mremap, just mmap - SEQMAN_DEBUG << "SegmentMmapper : nothing to remap - mmap instead\n"; + SETQMAN_DEBUG << "SegmentMmapper : nothing to remap - mmap instead\n"; m_mmappedSize = newsize; doMmap(); @@ -222,7 +222,7 @@ void SegmentMmapper::remap(size_t newsize) m_mmappedEventBuffer = (MappedEvent *)((size_t *)m_mmappedRegion + 1); if (m_mmappedRegion != oldBuffer) { - SEQMAN_DEBUG << "NOTE: buffer moved from " << oldBuffer << + SETQMAN_DEBUG << "NOTE: buffer moved from " << oldBuffer << " to " << (void *)m_mmappedRegion << endl; } #else @@ -234,7 +234,7 @@ void SegmentMmapper::remap(size_t newsize) #endif if (m_mmappedRegion == (void*) - 1) { - SEQMAN_DEBUG << TQString("mremap failed : (%1) %2\n").arg(errno).arg(strerror(errno)); + SETQMAN_DEBUG << TQString("mremap failed : (%1) %2\n").tqarg(errno).tqarg(strerror(errno)); throw Exception("mremap failed"); } @@ -253,11 +253,11 @@ void SegmentMmapper::doMmap() m_mmappedEventBuffer = (MappedEvent *)((size_t *)m_mmappedRegion + 1); if (m_mmappedRegion == (void*) - 1) { - SEQMAN_DEBUG << TQString("mmap failed : (%1) %2\n").arg(errno).arg(strerror(errno)); + SETQMAN_DEBUG << TQString("mmap failed : (%1) %2\n").tqarg(errno).tqarg(strerror(errno)); throw Exception("mmap failed"); } - SEQMAN_DEBUG << "SegmentMmapper::doMmap() - mmap size : " << m_mmappedSize + SETQMAN_DEBUG << "SegmentMmapper::doMmap() - mmap size : " << m_mmappedSize << " at " << (void*)m_mmappedRegion << endl; } @@ -401,7 +401,7 @@ void SegmentMmapper::dump() ++bufPos; } catch (...) { - SEQMAN_DEBUG << "SegmentMmapper::dump - caught exception while trying to create MappedEvent\n"; + SETQMAN_DEBUG << "SegmentMmapper::dump - caught exception while trying to create MappedEvent\n"; } } } @@ -473,7 +473,7 @@ SegmentMmapper::mergeTriggerSegment(Segment **target, timeT d = (*i)->getDuration(); if (evDuration != trDuration && - timeAdjust == BaseProperties::TRIGGER_SEGMENT_ADJUST_SQUISH) { + timeAdjust == BaseProperties::TRIGGER_SEGMENT_ADJUST_STQUISH) { t = timeT(double(t * evDuration) / double(trDuration)); d = timeT(double(d * evDuration) / double(trDuration)); } diff --git a/src/gui/seqmanager/SegmentMmapperFactory.cpp b/src/gui/seqmanager/SegmentMmapperFactory.cpp index 4f40cd6..f681580 100644 --- a/src/gui/seqmanager/SegmentMmapperFactory.cpp +++ b/src/gui/seqmanager/SegmentMmapperFactory.cpp @@ -46,7 +46,7 @@ SegmentMmapper* SegmentMmapperFactory::makeMmapperForSegment(RosegardenGUIDoc* d SegmentMmapper* mmapper = 0; if (segment == 0) { - SEQMAN_DEBUG << "SegmentMmapperFactory::makeMmapperForSegment() segment == 0\n"; + SETQMAN_DEBUG << "SegmentMmapperFactory::makeMmapperForSegment() segment == 0\n"; return 0; } @@ -58,7 +58,7 @@ SegmentMmapper* SegmentMmapperFactory::makeMmapperForSegment(RosegardenGUIDoc* d mmapper = new AudioSegmentMmapper(doc, segment, fileName); break; default: - SEQMAN_DEBUG << "SegmentMmapperFactory::makeMmapperForSegment(" << segment + SETQMAN_DEBUG << "SegmentMmapperFactory::makeMmapperForSegment(" << segment << ") : can't map, unknown segment type " << segment->getType() << endl; mmapper = 0; } diff --git a/src/gui/seqmanager/SequenceManager.cpp b/src/gui/seqmanager/SequenceManager.cpp index 4ebe945..1176e3a 100644 --- a/src/gui/seqmanager/SequenceManager.cpp +++ b/src/gui/seqmanager/SequenceManager.cpp @@ -90,8 +90,8 @@ SequenceManager::SequenceManager(RosegardenGUIDoc *doc, m_metronomeMmapper(SegmentMmapperFactory::makeMetronome(m_doc)), m_tempoSegmentMmapper(SegmentMmapperFactory::makeTempo(m_doc)), m_timeSigSegmentMmapper(SegmentMmapperFactory::makeTimeSig(m_doc)), - m_transportStatus(STOPPED), - m_soundDriverStatus(NO_DRIVER), + m_transporttqStatus(STOPPED), + m_soundDrivertqStatus(NO_DRIVER), m_transport(transport), m_lastRewoundAt(clock()), m_countdownDialog(0), @@ -114,7 +114,7 @@ SequenceManager::SequenceManager(RosegardenGUIDoc *doc, // m_compositionMmapper->cleanup(); m_countdownDialog = new CountdownDialog(dynamic_cast<TQWidget*> - (m_doc->parent())->parentWidget()); + (m_doc->tqparent())->tqparentWidget()); // Connect these for use later // connect(m_countdownTimer, TQT_SIGNAL(timeout()), @@ -133,7 +133,7 @@ SequenceManager::SequenceManager(RosegardenGUIDoc *doc, m_doc->getComposition().addObserver(this); // The owner of this sequence manager will need to call - // checkSoundDriverStatus on it to set up its status appropriately + // checkSoundDrivertqStatus on it to set up its status appropriately // immediately after construction; we used to do it from here but // we're not well placed to handle reporting to the user if it // throws an exception (and we don't want to leave the object half @@ -148,7 +148,7 @@ SequenceManager::~SequenceManager() { m_doc->getComposition().removeObserver(this); - SEQMAN_DEBUG << "SequenceManager::~SequenceManager()\n"; + SETQMAN_DEBUG << "SequenceManager::~SequenceManager()\n"; delete m_compositionMmapper; delete m_controlBlockMmapper; delete m_metronomeMmapper; @@ -159,7 +159,7 @@ SequenceManager::~SequenceManager() void SequenceManager::setDocument(RosegardenGUIDoc* doc) { - SEQMAN_DEBUG << "SequenceManager::setDocument(" << doc << ")\n"; + SETQMAN_DEBUG << "SequenceManager::setDocument(" << doc << ")\n"; DataBlockRepository::clear(); @@ -180,7 +180,7 @@ void SequenceManager::setDocument(RosegardenGUIDoc* doc) delete m_compositionMmapperResetTimer; m_countdownDialog = new CountdownDialog(dynamic_cast<TQWidget*> - (m_doc->parent())->parentWidget()); + (m_doc->tqparent())->tqparentWidget()); // Bug 933041: no longer connect the CountdownDialog from // SequenceManager; instead let the RosegardenGUIApp connect it to @@ -201,7 +201,7 @@ void SequenceManager::setDocument(RosegardenGUIDoc* doc) for (Composition::iterator i = comp.begin(); i != comp.end(); ++i) { - SEQMAN_DEBUG << "Adding segment with rid " << (*i)->getRuntimeId() << endl; + SETQMAN_DEBUG << "Adding segment with rid " << (*i)->getRuntimeId() << endl; m_segments.insert(SegmentRefreshMap::value_type (*i, (*i)->getNewRefreshStatusId())); @@ -228,9 +228,9 @@ void SequenceManager::setDocument(RosegardenGUIDoc* doc) } void -SequenceManager::setTransportStatus(const TransportStatus &status) +SequenceManager::setTransporttqStatus(const TransporttqStatus &status) { - m_transportStatus = status; + m_transporttqStatus = status; } void @@ -256,14 +256,14 @@ SequenceManager::play() // If already playing or recording then stop // - if (m_transportStatus == PLAYING || - m_transportStatus == RECORDING ) { + if (m_transporttqStatus == PLAYING || + m_transporttqStatus == RECORDING ) { stopping(); return true; } // This check may throw an exception - checkSoundDriverStatus(false); + checkSoundDrivertqStatus(false); // Align Instrument lists and send initial program changes // @@ -284,15 +284,15 @@ SequenceManager::play() //!!! disable the record button, because recording while playing is horribly // broken, and disabling it is less complicated than fixing it // see #1223025 - DMM - // SEQMAN_DEBUG << "SequenceManager::play() - disabling record button, as we are playing\n"; + // SETQMAN_DEBUG << "SequenceManager::play() - disabling record button, as we are playing\n"; // m_transport->RecordButton()->setEnabled(false); if (comp.getCurrentTempo() == 0) { comp.setCompositionDefaultTempo(comp.getTempoForQpm(120.0)); - SEQMAN_DEBUG << "SequenceManager::play() - setting Tempo to Default value of 120.000\n"; + SETQMAN_DEBUG << "SequenceManager::play() - setting Tempo to Default value of 120.000\n"; } else { - SEQMAN_DEBUG << "SequenceManager::play() - starting to play\n"; + SETQMAN_DEBUG << "SequenceManager::play() - starting to play\n"; } // Send initial tempo @@ -369,7 +369,7 @@ SequenceManager::play() // Send Play to the Sequencer if (!rgapp->sequencerCall("play(long int, long int, long int, long int, long int, long int, long int, long int, long int, long int, long int)", replyType, replyData, data)) { - m_transportStatus = STOPPED; + m_transporttqStatus = STOPPED; return false; } @@ -380,9 +380,9 @@ SequenceManager::play() if (result) { // completed successfully - m_transportStatus = STARTING_TO_PLAY; + m_transporttqStatus = STARTING_TO_PLAY; } else { - m_transportStatus = STOPPED; + m_transporttqStatus = STOPPED; std::cerr << "ERROR: SequenceManager::play(): Failed to start playback!" << std::endl; } @@ -400,7 +400,7 @@ SequenceManager::stopping() // Do this here rather than in stop() to avoid any potential // race condition (we use setPointerPosition() during stop()). // - if (m_transportStatus == STOPPED) { + if (m_transporttqStatus == STOPPED) { /*!!! if (m_doc->getComposition().isLooping()) m_doc->slotSetPointerPosition(m_doc->getComposition().getLoopStart()); @@ -414,17 +414,17 @@ SequenceManager::stopping() // Disarm recording and drop back to STOPPED // - if (m_transportStatus == RECORDING_ARMED) { - m_transportStatus = STOPPED; + if (m_transporttqStatus == RECORDING_ARMED) { + m_transporttqStatus = STOPPED; m_transport->RecordButton()->setOn(false); m_transport->MetronomeButton()-> setOn(m_doc->getComposition().usePlayMetronome()); return ; } - SEQMAN_DEBUG << "SequenceManager::stopping() - preparing to stop\n"; + SETQMAN_DEBUG << "SequenceManager::stopping() - preparing to stop\n"; - // SEQMAN_DEBUG << kdBacktrace() << endl; + // SETQMAN_DEBUG << kdBacktrace() << endl; stop(); @@ -436,7 +436,7 @@ SequenceManager::stop() { // Toggle off the buttons - first record // - if (m_transportStatus == RECORDING) { + if (m_transporttqStatus == RECORDING) { m_transport->RecordButton()->setOn(false); m_transport->MetronomeButton()-> setOn(m_doc->getComposition().usePlayMetronome()); @@ -452,7 +452,7 @@ SequenceManager::stop() // re-enable the record button if it was previously disabled when // going into play mode - DMM - // SEQMAN_DEBUG << "SequenceManager::stop() - re-enabling record button\n"; + // SETQMAN_DEBUG << "SequenceManager::stop() - re-enabling record button\n"; // m_transport->RecordButton()->setEnabled(true); @@ -464,7 +464,7 @@ SequenceManager::stop() // wait cursor // - TQApplication::setOverrideCursor(TQCursor(Qt::waitCursor)); + TQApplication::setOverrideCursor(TQCursor(TQt::waitCursor)); TQCString replyType; TQByteArray replyData; @@ -477,25 +477,25 @@ SequenceManager::stop() // restore TQApplication::restoreOverrideCursor(); - TransportStatus status = m_transportStatus; + TransporttqStatus status = m_transporttqStatus; // set new transport status first, so that if we're stopping // recording we don't risk the record segment being restored by a // timer while the document is busy trying to do away with it - m_transportStatus = STOPPED; + m_transporttqStatus = STOPPED; // if we're recording MIDI or Audio then tidy up the recording Segment if (status == RECORDING) { m_doc->stopRecordingMidi(); m_doc->stopRecordingAudio(); - SEQMAN_DEBUG << "SequenceManager::stop() - stopped recording\n"; + SETQMAN_DEBUG << "SequenceManager::stop() - stopped recording\n"; } // always untoggle the play button at this stage // m_transport->PlayButton()->setOn(false); - SEQMAN_DEBUG << "SequenceManager::stop() - stopped playing\n"; + SETQMAN_DEBUG << "SequenceManager::stop() - stopped playing\n"; // We don't reset controllers at this point - what happens with static // controllers the next time we play otherwise? [rwb] @@ -515,7 +515,7 @@ SequenceManager::rewind() std::pair<timeT, timeT> barRange = composition.getBarRangeForTime(position - 1); - if (m_transportStatus == PLAYING) { + if (m_transporttqStatus == PLAYING) { // if we're playing and we had a rewind request less than 200ms // ago and we're some way into the bar but less than half way @@ -524,7 +524,7 @@ SequenceManager::rewind() clock_t now = clock(); int elapsed = (now - m_lastRewoundAt) * 1000 / CLOCKS_PER_SEC; - SEQMAN_DEBUG << "That was " << m_lastRewoundAt << ", this is " << now << ", elapsed is " << elapsed << endl; + SETQMAN_DEBUG << "That was " << m_lastRewoundAt << ", this is " << now << ", elapsed is " << elapsed << endl; if (elapsed >= 0 && elapsed <= 200) { if (position > barRange.first && @@ -563,10 +563,10 @@ SequenceManager::fastforward() } void -SequenceManager::notifySequencerStatus(TransportStatus status) +SequenceManager::notifySequencertqStatus(TransporttqStatus status) { // for the moment we don't do anything fancy - m_transportStatus = status; + m_transporttqStatus = status; } @@ -586,7 +586,7 @@ SequenceManager::record(bool toggled) { mapSequencer(); - SEQMAN_DEBUG << "SequenceManager::record(" << toggled << ")" << endl; + SETQMAN_DEBUG << "SequenceManager::record(" << toggled << ")" << endl; Composition &comp = m_doc->getComposition(); Studio &studio = m_doc->getStudio(); @@ -611,7 +611,7 @@ SequenceManager::record(bool toggled) Instrument *instr = studio.getInstrumentById(instrId); if (instr && instr->getType() == Instrument::Audio) { - if (!m_doc || !(m_soundDriverStatus & AUDIO_OK)) { + if (!m_doc || !(m_soundDrivertqStatus & AUDIO_OK)) { m_transport->RecordButton()->setOn(false); throw(Exception("Audio subsystem is not available - can't record audio")); } @@ -623,9 +623,9 @@ SequenceManager::record(bool toggled) if (toggled) { // preparing record or punch-in record - if (m_transportStatus == RECORDING_ARMED) { - SEQMAN_DEBUG << "SequenceManager::record - unarming record\n"; - m_transportStatus = STOPPED; + if (m_transporttqStatus == RECORDING_ARMED) { + SETQMAN_DEBUG << "SequenceManager::record - unarming record\n"; + m_transporttqStatus = STOPPED; // Toggle the buttons m_transport->MetronomeButton()->setOn(comp.usePlayMetronome()); @@ -634,9 +634,9 @@ SequenceManager::record(bool toggled) return ; } - if (m_transportStatus == STOPPED) { - SEQMAN_DEBUG << "SequenceManager::record - armed record\n"; - m_transportStatus = RECORDING_ARMED; + if (m_transporttqStatus == STOPPED) { + SETQMAN_DEBUG << "SequenceManager::record - armed record\n"; + m_transporttqStatus = RECORDING_ARMED; // Toggle the buttons m_transport->MetronomeButton()->setOn(comp.useRecordMetronome()); @@ -645,8 +645,8 @@ SequenceManager::record(bool toggled) return ; } - if (m_transportStatus == RECORDING) { - SEQMAN_DEBUG << "SequenceManager::record - stop recording and keep playing\n"; + if (m_transporttqStatus == RECORDING) { + SETQMAN_DEBUG << "SequenceManager::record - stop recording and keep playing\n"; TQByteArray data; TQCString replyType; @@ -654,12 +654,12 @@ SequenceManager::record(bool toggled) // Send Record to the Sequencer to signal it to drop out of record mode if (!rgapp->sequencerCall("punchOut()", replyType, replyData, data)) { - SEQMAN_DEBUG << "SequenceManager::record - the \"not very plausible\" code executed\n"; + SETQMAN_DEBUG << "SequenceManager::record - the \"not very plausible\" code executed\n"; // #1797873 - set new transport status first, so that // if we're stopping recording we don't risk the // record segment being restored by a timer while the // document is busy trying to do away with it - m_transportStatus = STOPPED; + m_transporttqStatus = STOPPED; m_doc->stopRecordingMidi(); m_doc->stopRecordingAudio(); @@ -667,7 +667,7 @@ SequenceManager::record(bool toggled) } // #1797873 - as above - m_transportStatus = PLAYING; + m_transporttqStatus = PLAYING; m_doc->stopRecordingMidi(); m_doc->stopRecordingAudio(); @@ -675,8 +675,8 @@ SequenceManager::record(bool toggled) return ; } - if (m_transportStatus == PLAYING) { - SEQMAN_DEBUG << "SequenceManager::record - punch in recording\n"; + if (m_transporttqStatus == PLAYING) { + SETQMAN_DEBUG << "SequenceManager::record - punch in recording\n"; punchIn = true; goto punchin; } @@ -720,7 +720,7 @@ punchin: } // may throw an exception - checkSoundDriverStatus(false); + checkSoundDrivertqStatus(false); // toggle the Metronome button if it's in use m_transport->MetronomeButton()->setOn(comp.useRecordMetronome()); @@ -738,7 +738,7 @@ punchin: if (comp.isLooping()) m_doc->slotSetPointerPosition(comp.getLoopStart()); else { - if (m_transportStatus != RECORDING_ARMED && punchIn == false) { + if (m_transporttqStatus != RECORDING_ARMED && punchIn == false) { int startBar = comp.getBarNumber(comp.getPosition()); startBar -= config->readUnsignedNumEntry("countinbars", 0); m_doc->slotSetPointerPosition(comp.getBarRange(startBar).first); @@ -767,7 +767,7 @@ punchin: InstrumentId iid = comp.getTrackById(*i)->getInstrument(); Instrument *inst = studio.getInstrumentById(iid); if (inst && (inst->getType() != Instrument::Audio)) { - SEQMAN_DEBUG << "SequenceManager: mdoc->addRecordMIDISegment(" << *i << ")" << endl; + SETQMAN_DEBUG << "SequenceManager: mdoc->addRecordMIDISegment(" << *i << ")" << endl; m_doc->addRecordMIDISegment(*i); } } @@ -778,10 +778,10 @@ punchin: m_transport->PlayButton()->setOn(true); if (comp.getCurrentTempo() == 0) { - SEQMAN_DEBUG << "SequenceManager::play() - setting Tempo to Default value of 120.000\n"; + SETQMAN_DEBUG << "SequenceManager::play() - setting Tempo to Default value of 120.000\n"; comp.setCompositionDefaultTempo(comp.getTempoForQpm(120.0)); } else { - SEQMAN_DEBUG << "SequenceManager::record() - starting to record\n"; + SETQMAN_DEBUG << "SequenceManager::record() - starting to record\n"; } // set the tempo in the transport @@ -853,7 +853,7 @@ punchin: if (!rgapp->sequencerCall("record(long int, long int, long int, long int, long int, long int, long int, long int, long int, long int, long int, long int)", replyType, replyData, data)) { // failed - m_transportStatus = STOPPED; + m_transporttqStatus = STOPPED; return ; } @@ -865,7 +865,7 @@ punchin: if (result) { // completed successfully - m_transportStatus = STARTING_TO_RECORD; + m_transporttqStatus = STARTING_TO_RECORD; // Create the countdown timer dialog to show recording time // remaining. (Note (dmm) this has changed, and it now reports @@ -898,9 +898,9 @@ punchin: //m_countdownDialog->show(); } else { - // Stop immediately - turn off buttons in parent + // Stop immediately - turn off buttons in tqparent // - m_transportStatus = STOPPED; + m_transporttqStatus = STOPPED; if (haveAudioInstrument) { throw(Exception("Couldn't start recording audio.\nPlease set a valid file path in the Document Properties\n(Composition menu -> Edit Document Properties -> Audio).")); @@ -950,7 +950,7 @@ SequenceManager::processAsynchronousMidi(const MappedComposition &mC, if ((*i)->getType() >= MappedEvent::Audio) { if ((*i)->getType() == MappedEvent::AudioStopped) { /* - SEQMAN_DEBUG << "AUDIO FILE ID = " + SETQMAN_DEBUG << "AUDIO FILE ID = " << int((*i)->getData1()) << " - FILE STOPPED - " << "INSTRUMENT = " @@ -971,7 +971,7 @@ SequenceManager::processAsynchronousMidi(const MappedComposition &mC, if ((*i)->getType() == MappedEvent::AudioGeneratePreview) { - SEQMAN_DEBUG << "Received AudioGeneratePreview: data1 is " << int((*i)->getData1()) << ", data2 " << int((*i)->getData2()) << ", instrument is " << (*i)->getInstrument() << endl; + SETQMAN_DEBUG << "Received AudioGeneratePreview: data1 is " << int((*i)->getData1()) << ", data2 " << int((*i)->getData2()) << ", instrument is " << (*i)->getInstrument() << endl; m_doc->finalizeAudioFile((int)(*i)->getData1() + (int)(*i)->getData2() * 256); @@ -990,11 +990,11 @@ SequenceManager::processAsynchronousMidi(const MappedComposition &mC, restoreRecordSubscriptions(); } - if (m_transportStatus == PLAYING || - m_transportStatus == RECORDING) { + if (m_transporttqStatus == PLAYING || + m_transporttqStatus == RECORDING) { if ((*i)->getType() == MappedEvent::SystemFailure) { - SEQMAN_DEBUG << "Failure of some sort..." << endl; + SETQMAN_DEBUG << "Failure of some sort..." << endl; bool handling = true; @@ -1010,13 +1010,13 @@ SequenceManager::processAsynchronousMidi(const MappedComposition &mC, } else if ((*i)->getData1() == MappedEvent::FailureJackRestartFailed) { KMessageBox::error( - dynamic_cast<TQWidget*>(m_doc->parent())->parentWidget(), + dynamic_cast<TQWidget*>(m_doc->tqparent())->tqparentWidget(), i18n("The JACK Audio subsystem has failed or it has stopped Rosegarden from processing audio.\nPlease restart Rosegarden to continue working with audio.\nQuitting other running applications may improve Rosegarden's performance.")); } else if ((*i)->getData1() == MappedEvent::FailureJackRestart) { KMessageBox::error( - dynamic_cast<TQWidget*>(m_doc->parent())->parentWidget(), + dynamic_cast<TQWidget*>(m_doc->tqparent())->tqparentWidget(), i18n("The JACK Audio subsystem has stopped Rosegarden from processing audio, probably because of a processing overload.\nAn attempt to restart the audio service has been made, but some problems may remain.\nQuitting other running applications may improve Rosegarden's performance.")); } else if ((*i)->getData1() == MappedEvent::FailureCPUOverload) { @@ -1027,7 +1027,7 @@ SequenceManager::processAsynchronousMidi(const MappedComposition &mC, stopping(); KMessageBox::error( - dynamic_cast<TQWidget*>(m_doc->parent())->parentWidget(), + dynamic_cast<TQWidget*>(m_doc->tqparent())->tqparentWidget(), i18n("Run out of processor power for real-time audio processing. Cannot continue.")); #endif @@ -1041,7 +1041,7 @@ SequenceManager::processAsynchronousMidi(const MappedComposition &mC, continue; if (!m_canReport) { - SEQMAN_DEBUG << "Not reporting it to user just yet" + SETQMAN_DEBUG << "Not reporting it to user just yet" << endl; continue; } @@ -1146,13 +1146,13 @@ SequenceManager::processAsynchronousMidi(const MappedComposition &mC, if ((*i)->getData1() == MappedEvent::FailureJackRestartFailed) { KMessageBox::error( - dynamic_cast<TQWidget*>(m_doc->parent()), + dynamic_cast<TQWidget*>(m_doc->tqparent()), i18n("The JACK Audio subsystem has failed or it has stopped Rosegarden from processing audio.\nPlease restart Rosegarden to continue working with audio.\nQuitting other running applications may improve Rosegarden's performance.")); } else if ((*i)->getData1() == MappedEvent::FailureJackRestart) { KMessageBox::error( - dynamic_cast<TQWidget*>(m_doc->parent()), + dynamic_cast<TQWidget*>(m_doc->tqparent()), i18n("The JACK Audio subsystem has stopped Rosegarden from processing audio, probably because of a processing overload.\nAn attempt to restart the audio service has been made, but some problems may remain.\nQuitting other running applications may improve Rosegarden's performance.")); } else if ((*i)->getData1() == MappedEvent::WarningImpreciseTimer && @@ -1166,7 +1166,7 @@ SequenceManager::processAsynchronousMidi(const MappedComposition &mC, RosegardenGUIApp::self()->awaitDialogClearance(); KMessageBox::information( - dynamic_cast<TQWidget*>(m_doc->parent()), + dynamic_cast<TQWidget*>(m_doc->tqparent()), i18n("<h3>System timer resolution is too low</h3><p>Rosegarden was unable to find a high-resolution timing source for MIDI performance.</p><p>This may mean you are using a Linux system with the kernel timer resolution set too low. Please contact your Linux distributor for more information.</p><p>Some Linux distributors already provide low latency kernels, see <a href=\"http://rosegarden.wiki.sourceforge.net/Low+latency+kernels\">http://rosegarden.wiki.sourceforge.net/Low+latency+kernels</a> for instructions.</p>"), NULL, NULL, KMessageBox::Notify + KMessageBox::AllowLink); @@ -1184,7 +1184,7 @@ SequenceManager::processAsynchronousMidi(const MappedComposition &mC, RosegardenGUIApp::self()->awaitDialogClearance(); KMessageBox::information( - dynamic_cast<TQWidget*>(m_doc->parent()), + dynamic_cast<TQWidget*>(m_doc->tqparent()), i18n("<h3>System timer resolution is too low</h3><p>Rosegarden was unable to find a high-resolution timing source for MIDI performance.</p><p>You may be able to solve this problem by loading the RTC timer kernel module. To do this, try running <b>sudo modprobe snd-rtctimer</b> in a terminal window and then restarting Rosegarden.</p><p>Alternatively, check whether your Linux distributor provides a multimedia-optimized kernel. See <a href=\"http://rosegarden.wiki.sourceforge.net/Low+latency+kernels\">http://rosegarden.wiki.sourceforge.net/Low+latency+kernels</a> for notes about this.</p>"), NULL, NULL, KMessageBox::Notify + KMessageBox::AllowLink); @@ -1201,8 +1201,8 @@ SequenceManager::processAsynchronousMidi(const MappedComposition &mC, // out any incoming external controller events for (i = mC.begin(); i != mC.end(); ++i ) { - if (m_transportStatus == STOPPED || - m_transportStatus == RECORDING_ARMED) { + if (m_transporttqStatus == STOPPED || + m_transporttqStatus == RECORDING_ARMED) { if ((*i)->getType() == MappedEvent::MidiNote) { if ((*i)->getVelocity() == 0) { emit insertableNoteOffReceived((*i)->getPitch(), (*i)->getVelocity()); @@ -1212,7 +1212,7 @@ SequenceManager::processAsynchronousMidi(const MappedComposition &mC, } } if ((*i)->getRecordedDevice() == Device::CONTROL_DEVICE) { - SEQMAN_DEBUG << "controllerDeviceEventReceived" << endl; + SETQMAN_DEBUG << "controllerDeviceEventReceived" << endl; emit controllerDeviceEventReceived(*i); } } @@ -1221,14 +1221,14 @@ SequenceManager::processAsynchronousMidi(const MappedComposition &mC, void SequenceManager::rewindToBeginning() { - SEQMAN_DEBUG << "SequenceManager::rewindToBeginning()\n"; + SETQMAN_DEBUG << "SequenceManager::rewindToBeginning()\n"; m_doc->slotSetPointerPosition(m_doc->getComposition().getStartMarker()); } void SequenceManager::fastForwardToEnd() { - SEQMAN_DEBUG << "SequenceManager::fastForwardToEnd()\n"; + SETQMAN_DEBUG << "SequenceManager::fastForwardToEnd()\n"; Composition &comp = m_doc->getComposition(); m_doc->slotSetPointerPosition(comp.getDuration()); @@ -1238,7 +1238,7 @@ void SequenceManager::setLoop(const timeT &lhs, const timeT &rhs) { // do not set a loop if JACK transport sync is enabled, because this is - // completely broken, and apparently broken due to a limitation of JACK + // completely broken, and aptqparently broken due to a limitation of JACK // transport itself. #1240039 - DMM // KConfig* config = kapp->config(); // config->setGroup(SequencerOptionsConfigGroup); @@ -1269,7 +1269,7 @@ SequenceManager::setLoop(const timeT &lhs, const timeT &rhs) } void -SequenceManager::checkSoundDriverStatus(bool warnUser) +SequenceManager::checkSoundDrivertqStatus(bool warnUser) { TQByteArray data; TQCString replyType; @@ -1278,28 +1278,28 @@ SequenceManager::checkSoundDriverStatus(bool warnUser) streamOut << TQString(VERSION); - if (! rgapp->sequencerCall("getSoundDriverStatus(TQString)", + if (! rgapp->sequencerCall("getSoundDrivertqStatus(TQString)", replyType, replyData, data)) { - m_soundDriverStatus = NO_DRIVER; + m_soundDrivertqStatus = NO_DRIVER; } else { TQDataStream streamIn(replyData, IO_ReadOnly); unsigned int result; streamIn >> result; - m_soundDriverStatus = result; + m_soundDrivertqStatus = result; } - SEQMAN_DEBUG << "Sound driver status is: " << m_soundDriverStatus << endl; + SETQMAN_DEBUG << "Sound driver status is: " << m_soundDrivertqStatus << endl; if (!warnUser) return; #ifdef HAVE_LIBJACK - if ((m_soundDriverStatus & (AUDIO_OK | MIDI_OK | VERSION_OK)) == + if ((m_soundDrivertqStatus & (AUDIO_OK | MIDI_OK | VERSION_OK)) == (AUDIO_OK | MIDI_OK | VERSION_OK)) return; #else - if ((m_soundDriverStatus & (MIDI_OK | VERSION_OK)) == + if ((m_soundDrivertqStatus & (MIDI_OK | VERSION_OK)) == (MIDI_OK | VERSION_OK)) return; #endif @@ -1308,24 +1308,24 @@ SequenceManager::checkSoundDriverStatus(bool warnUser) TQString text = ""; - if (m_soundDriverStatus == NO_DRIVER) { + if (m_soundDrivertqStatus == NO_DRIVER) { text = i18n("<p>Both MIDI and Audio subsystems have failed to initialize.</p><p>You may continue without the sequencer, but we suggest closing Rosegarden, running \"alsaconf\" as root, and starting Rosegarden again. If you wish to run with no sequencer by design, then use \"rosegarden --nosequencer\" to avoid seeing this error in the future.</p>"); - } else if (!(m_soundDriverStatus & MIDI_OK)) { + } else if (!(m_soundDrivertqStatus & MIDI_OK)) { text = i18n("<p>The MIDI subsystem has failed to initialize.</p><p>You may continue without the sequencer, but we suggest closing Rosegarden, running \"modprobe snd-seq-midi\" as root, and starting Rosegarden again. If you wish to run with no sequencer by design, then use \"rosegarden --nosequencer\" to avoid seeing this error in the future.</p>"); - } else if (!(m_soundDriverStatus & VERSION_OK)) { + } else if (!(m_soundDrivertqStatus & VERSION_OK)) { text = i18n("<p>The Rosegarden sequencer module version does not match the GUI module version.</p><p>You have probably mixed up files from two different versions of Rosegarden. Please check your installation.</p>"); } if (text != "") { RosegardenGUIApp::self()->awaitDialogClearance(); KMessageBox::error(RosegardenGUIApp::self(), - i18n("<h3>Sequencer startup failed</h3>%1").arg(text)); + i18n("<h3>Sequencer startup failed</h3>%1").tqarg(text)); CurrentProgressDialog::thaw(); return; } #ifdef HAVE_LIBJACK - if (!(m_soundDriverStatus & AUDIO_OK)) { + if (!(m_soundDrivertqStatus & AUDIO_OK)) { RosegardenGUIApp::self()->awaitDialogClearance(); KMessageBox::information(RosegardenGUIApp::self(), i18n("<h3>Failed to connect to JACK audio server.</h3><p>Rosegarden could not connect to the JACK audio server. This probably means the JACK server is not running.</p><p>If you want to be able to play or record audio files or use plugins, you should exit Rosegarden and start the JACK server before running Rosegarden again.</p>"), i18n("Failed to connect to JACK"), @@ -1421,7 +1421,7 @@ void SequenceManager::sendAudioLevel(MappedEvent *mE) { RosegardenGUIView *v; - QList<RosegardenGUIView>& viewList = m_doc->getViewList(); + TQList<RosegardenGUIView>& viewList = m_doc->getViewList(); for (v = viewList.first(); v != 0; v = viewList.next()) { v->showVisuals(mE); @@ -1432,7 +1432,7 @@ SequenceManager::sendAudioLevel(MappedEvent *mE) void SequenceManager::resetControllers() { - SEQMAN_DEBUG << "SequenceManager::resetControllers - resetting\n"; + SETQMAN_DEBUG << "SequenceManager::resetControllers - resetting\n"; // Should do all Midi Instrument - not just guess like this is doing // currently. @@ -1459,7 +1459,7 @@ SequenceManager::resetControllers() void SequenceManager::resetMidiNetwork() { - SEQMAN_DEBUG << "SequenceManager::resetMidiNetwork - resetting\n"; + SETQMAN_DEBUG << "SequenceManager::resetMidiNetwork - resetting\n"; MappedComposition mC; // Should do all Midi Instrument - not just guess like this is doing @@ -1492,7 +1492,7 @@ SequenceManager::sendMIDIRecordingDevice(const TQString recordDeviceStr) MidiByte(true)); StudioControl::sendMappedEvent(mE); - SEQMAN_DEBUG << "set MIDI record device to " + SETQMAN_DEBUG << "set MIDI record device to " << recordDevice << endl; } } @@ -1558,7 +1558,7 @@ SequenceManager::reinitialiseSequencerStudio() void SequenceManager::panic() { - SEQMAN_DEBUG << "panic button\n"; + SETQMAN_DEBUG << "panic button\n"; stopping(); @@ -1628,7 +1628,7 @@ SequenceManager::applyFiltering(const MappedComposition &mC, void SequenceManager::resetCompositionMmapper() { - SEQMAN_DEBUG << "SequenceManager::resetCompositionMmapper()\n"; + SETQMAN_DEBUG << "SequenceManager::resetCompositionMmapper()\n"; delete m_compositionMmapper; m_compositionMmapper = new CompositionMmapper(m_doc); @@ -1640,7 +1640,7 @@ void SequenceManager::resetCompositionMmapper() void SequenceManager::resetMetronomeMmapper() { - SEQMAN_DEBUG << "SequenceManager::resetMetronomeMmapper()\n"; + SETQMAN_DEBUG << "SequenceManager::resetMetronomeMmapper()\n"; delete m_metronomeMmapper; m_metronomeMmapper = SegmentMmapperFactory::makeMetronome(m_doc); @@ -1648,7 +1648,7 @@ void SequenceManager::resetMetronomeMmapper() void SequenceManager::resetTempoSegmentMmapper() { - SEQMAN_DEBUG << "SequenceManager::resetTempoSegmentMmapper()\n"; + SETQMAN_DEBUG << "SequenceManager::resetTempoSegmentMmapper()\n"; delete m_tempoSegmentMmapper; m_tempoSegmentMmapper = SegmentMmapperFactory::makeTempo(m_doc); @@ -1656,7 +1656,7 @@ void SequenceManager::resetTempoSegmentMmapper() void SequenceManager::resetTimeSigSegmentMmapper() { - SEQMAN_DEBUG << "SequenceManager::resetTimeSigSegmentMmapper()\n"; + SETQMAN_DEBUG << "SequenceManager::resetTimeSigSegmentMmapper()\n"; delete m_timeSigSegmentMmapper; m_timeSigSegmentMmapper = SegmentMmapperFactory::makeTimeSig(m_doc); @@ -1664,7 +1664,7 @@ void SequenceManager::resetTimeSigSegmentMmapper() void SequenceManager::resetControlBlockMmapper() { - SEQMAN_DEBUG << "SequenceManager::resetControlBlockMmapper()\n"; + SETQMAN_DEBUG << "SequenceManager::resetControlBlockMmapper()\n"; m_controlBlockMmapper->setDocument(m_doc); } @@ -1672,10 +1672,10 @@ void SequenceManager::resetControlBlockMmapper() bool SequenceManager::event(TQEvent *e) { if (e->type() == TQEvent::User) { - SEQMAN_DEBUG << "SequenceManager::event() with user event\n"; + SETQMAN_DEBUG << "SequenceManager::event() with user event\n"; if (m_updateRequested) { - SEQMAN_DEBUG << "SequenceManager::event(): update requested\n"; - checkRefreshStatus(); + SETQMAN_DEBUG << "SequenceManager::event(): update requested\n"; + checkRefreshtqStatus(); m_updateRequested = false; } return true; @@ -1686,16 +1686,16 @@ bool SequenceManager::event(TQEvent *e) void SequenceManager::update() { - SEQMAN_DEBUG << "SequenceManager::update()\n"; + SETQMAN_DEBUG << "SequenceManager::update()\n"; // schedule a refresh-status check for the next event loop TQEvent *e = new TQEvent(TQEvent::User); m_updateRequested = true; TQApplication::postEvent(this, e); } -void SequenceManager::checkRefreshStatus() +void SequenceManager::checkRefreshtqStatus() { - SEQMAN_DEBUG << "SequenceManager::checkRefreshStatus()\n"; + SETQMAN_DEBUG << "SequenceManager::checkRefreshtqStatus()\n"; // Look at trigger segments first: if one of those has changed, we'll // need to be aware of it when scanning segments subsequently @@ -1716,20 +1716,20 @@ void SequenceManager::checkRefreshStatus() newTriggerMap[s] = m_triggerSegments[s]; } - if (s->getRefreshStatus(newTriggerMap[s]).needsRefresh()) { + if (s->getRefreshtqStatus(newTriggerMap[s]).needsRefresh()) { TriggerSegmentRec::SegmentRuntimeIdSet &thisSet = (*i)->getReferences(); ridset.insert(thisSet.begin(), thisSet.end()); - s->getRefreshStatus(newTriggerMap[s]).setNeedsRefresh(false); + s->getRefreshtqStatus(newTriggerMap[s]).setNeedsRefresh(false); } } m_triggerSegments = newTriggerMap; - SEQMAN_DEBUG << "SequenceManager::checkRefreshStatus: segments modified by changes to trigger segments are:" << endl; + SETQMAN_DEBUG << "SequenceManager::checkRefreshtqStatus: segments modified by changes to trigger segments are:" << endl; int x = 0; for (TriggerSegmentRec::SegmentRuntimeIdSet::iterator i = ridset.begin(); i != ridset.end(); ++i) { - SEQMAN_DEBUG << x << ": " << *i << endl; + SETQMAN_DEBUG << x << ": " << *i << endl; ++x; } @@ -1741,16 +1741,16 @@ void SequenceManager::checkRefreshStatus() } m_removedSegments.clear(); - SEQMAN_DEBUG << "SequenceManager::checkRefreshStatus: we have " + SETQMAN_DEBUG << "SequenceManager::checkRefreshtqStatus: we have " << m_segments.size() << " segments" << endl; // then the ones which are still there for (SegmentRefreshMap::iterator i = m_segments.begin(); i != m_segments.end(); ++i) { - if (i->first->getRefreshStatus(i->second).needsRefresh() || + if (i->first->getRefreshtqStatus(i->second).needsRefresh() || ridset.find(i->first->getRuntimeId()) != ridset.end()) { segmentModified(i->first); - i->first->getRefreshStatus(i->second).setNeedsRefresh(false); + i->first->getRefreshtqStatus(i->second).setNeedsRefresh(false); } } @@ -1763,21 +1763,21 @@ void SequenceManager::checkRefreshStatus() void SequenceManager::segmentModified(Segment* s) { - SEQMAN_DEBUG << "SequenceManager::segmentModified(" << s << ")\n"; + SETQMAN_DEBUG << "SequenceManager::segmentModified(" << s << ")\n"; bool sizeChanged = m_compositionMmapper->segmentModified(s); - SEQMAN_DEBUG << "SequenceManager::segmentModified() : size changed = " + SETQMAN_DEBUG << "SequenceManager::segmentModified() : size changed = " << sizeChanged << endl; - if ((m_transportStatus == PLAYING) && sizeChanged) { + if ((m_transporttqStatus == PLAYING) && sizeChanged) { TQByteArray data; TQDataStream streamOut(data, IO_WriteOnly); streamOut << (TQString)m_compositionMmapper->getSegmentFileName(s); streamOut << (size_t)m_compositionMmapper->getSegmentFileSize(s); - SEQMAN_DEBUG << "SequenceManager::segmentModified() : DCOP-call sequencer remapSegment" + SETQMAN_DEBUG << "SequenceManager::segmentModified() : DCOP-call sequencer remapSegment" << m_compositionMmapper->getSegmentFileName(s) << endl; rgapp->sequencerSend("remapSegment(TQString, size_t)", data); @@ -1786,13 +1786,13 @@ void SequenceManager::segmentModified(Segment* s) void SequenceManager::segmentAdded(const Composition*, Segment* s) { - SEQMAN_DEBUG << "SequenceManager::segmentAdded(" << s << ")\n"; + SETQMAN_DEBUG << "SequenceManager::segmentAdded(" << s << ")\n"; m_addedSegments.push_back(s); } void SequenceManager::segmentRemoved(const Composition*, Segment* s) { - SEQMAN_DEBUG << "SequenceManager::segmentRemoved(" << s << ")\n"; + SETQMAN_DEBUG << "SequenceManager::segmentRemoved(" << s << ")\n"; m_removedSegments.push_back(s); std::vector<Segment*>::iterator i = find(m_addedSegments.begin(), m_addedSegments.end(), s); if (i != m_addedSegments.end()) @@ -1801,21 +1801,21 @@ void SequenceManager::segmentRemoved(const Composition*, Segment* s) void SequenceManager::segmentRepeatChanged(const Composition*, Segment* s, bool repeat) { - SEQMAN_DEBUG << "SequenceManager::segmentRepeatChanged(" << s << ", " << repeat << ")\n"; + SETQMAN_DEBUG << "SequenceManager::segmentRepeatChanged(" << s << ", " << repeat << ")\n"; segmentModified(s); } void SequenceManager::segmentRepeatEndChanged(const Composition*, Segment* s, timeT newEndTime) { - SEQMAN_DEBUG << "SequenceManager::segmentRepeatEndChanged(" << s << ", " << newEndTime << ")\n"; + SETQMAN_DEBUG << "SequenceManager::segmentRepeatEndChanged(" << s << ", " << newEndTime << ")\n"; segmentModified(s); } void SequenceManager::segmentEventsTimingChanged(const Composition*, Segment * s, timeT t, RealTime) { - SEQMAN_DEBUG << "SequenceManager::segmentEventsTimingChanged(" << s << ", " << t << ")\n"; + SETQMAN_DEBUG << "SequenceManager::segmentEventsTimingChanged(" << s << ", " << t << ")\n"; segmentModified(s); - if (s && s->getType() == Segment::Audio && m_transportStatus == PLAYING) { + if (s && s->getType() == Segment::Audio && m_transporttqStatus == PLAYING) { TQByteArray data; rgapp->sequencerSend("remapTracks()", data); } @@ -1823,15 +1823,15 @@ void SequenceManager::segmentEventsTimingChanged(const Composition*, Segment * s void SequenceManager::segmentTransposeChanged(const Composition*, Segment *s, int transpose) { - SEQMAN_DEBUG << "SequenceManager::segmentTransposeChanged(" << s << ", " << transpose << ")\n"; + SETQMAN_DEBUG << "SequenceManager::segmentTransposeChanged(" << s << ", " << transpose << ")\n"; segmentModified(s); } void SequenceManager::segmentTrackChanged(const Composition*, Segment *s, TrackId id) { - SEQMAN_DEBUG << "SequenceManager::segmentTrackChanged(" << s << ", " << id << ")\n"; + SETQMAN_DEBUG << "SequenceManager::segmentTrackChanged(" << s << ", " << id << ")\n"; segmentModified(s); - if (s && s->getType() == Segment::Audio && m_transportStatus == PLAYING) { + if (s && s->getType() == Segment::Audio && m_transporttqStatus == PLAYING) { TQByteArray data; rgapp->sequencerSend("remapTracks()", data); } @@ -1839,17 +1839,17 @@ void SequenceManager::segmentTrackChanged(const Composition*, Segment *s, TrackI void SequenceManager::segmentEndMarkerChanged(const Composition*, Segment *s, bool) { - SEQMAN_DEBUG << "SequenceManager::segmentEndMarkerChanged(" << s << ")\n"; + SETQMAN_DEBUG << "SequenceManager::segmentEndMarkerChanged(" << s << ")\n"; segmentModified(s); } void SequenceManager::processAddedSegment(Segment* s) { - SEQMAN_DEBUG << "SequenceManager::processAddedSegment(" << s << ")\n"; + SETQMAN_DEBUG << "SequenceManager::processAddedSegment(" << s << ")\n"; m_compositionMmapper->segmentAdded(s); - if (m_transportStatus == PLAYING) { + if (m_transporttqStatus == PLAYING) { TQByteArray data; TQDataStream streamOut(data, IO_WriteOnly); @@ -1857,7 +1857,7 @@ void SequenceManager::processAddedSegment(Segment* s) streamOut << m_compositionMmapper->getSegmentFileName(s); if (!rgapp->sequencerSend("addSegment(TQString)", data)) { - m_transportStatus = STOPPED; + m_transporttqStatus = STOPPED; } } @@ -1869,12 +1869,12 @@ void SequenceManager::processAddedSegment(Segment* s) void SequenceManager::processRemovedSegment(Segment* s) { - SEQMAN_DEBUG << "SequenceManager::processRemovedSegment(" << s << ")\n"; + SETQMAN_DEBUG << "SequenceManager::processRemovedSegment(" << s << ")\n"; TQString filename = m_compositionMmapper->getSegmentFileName(s); m_compositionMmapper->segmentDeleted(s); - if (m_transportStatus == PLAYING) { + if (m_transporttqStatus == PLAYING) { TQByteArray data; TQDataStream streamOut(data, IO_WriteOnly); @@ -1883,7 +1883,7 @@ void SequenceManager::processRemovedSegment(Segment* s) if (!rgapp->sequencerSend("deleteSegment(TQString)", data)) { // failed - m_transportStatus = STOPPED; + m_transporttqStatus = STOPPED; } } @@ -1893,7 +1893,7 @@ void SequenceManager::processRemovedSegment(Segment* s) void SequenceManager::endMarkerTimeChanged(const Composition *, bool /*shorten*/) { - SEQMAN_DEBUG << "SequenceManager::endMarkerTimeChanged()\n"; + SETQMAN_DEBUG << "SequenceManager::endMarkerTimeChanged()\n"; m_compositionMmapperResetTimer->start(500, true); // schedule a composition mmapper reset in 0.5s } @@ -1904,10 +1904,10 @@ void SequenceManager::timeSignatureChanged(const Composition *) void SequenceManager::trackChanged(const Composition *, Track* t) { - SEQMAN_DEBUG << "SequenceManager::trackChanged(" << t << ", " << (t ? t->getPosition() : -1) << ")\n"; + SETQMAN_DEBUG << "SequenceManager::trackChanged(" << t << ", " << (t ? t->getPosition() : -1) << ")\n"; m_controlBlockMmapper->updateTrackData(t); - if (m_transportStatus == PLAYING) { + if (m_transporttqStatus == PLAYING) { TQByteArray data; rgapp->sequencerSend("remapTracks()", data); } @@ -1924,7 +1924,7 @@ void SequenceManager::metronomeChanged(InstrumentId id, // This method is called when the user has changed the // metronome instrument, pitch etc - SEQMAN_DEBUG << "SequenceManager::metronomeChanged (simple)" + SETQMAN_DEBUG << "SequenceManager::metronomeChanged (simple)" << ", instrument = " << id << endl; @@ -1933,7 +1933,7 @@ void SequenceManager::metronomeChanged(InstrumentId id, resetMetronomeMmapper(); m_controlBlockMmapper->updateMetronomeData(id); - if (m_transportStatus == PLAYING) { + if (m_transporttqStatus == PLAYING) { m_controlBlockMmapper->updateMetronomeForPlayback(); } else { m_controlBlockMmapper->updateMetronomeForRecord(); @@ -1949,7 +1949,7 @@ void SequenceManager::metronomeChanged(const Composition *) // This method is called when the muting status in the composition // has changed -- the metronome itself has not actually changed - SEQMAN_DEBUG << "SequenceManager::metronomeChanged " + SETQMAN_DEBUG << "SequenceManager::metronomeChanged " << ", instrument = " << m_metronomeMmapper->getMetronomeInstrument() << endl; @@ -1957,7 +1957,7 @@ void SequenceManager::metronomeChanged(const Composition *) m_controlBlockMmapper->updateMetronomeData (m_metronomeMmapper->getMetronomeInstrument()); - if (m_transportStatus == PLAYING) { + if (m_transporttqStatus == PLAYING) { m_controlBlockMmapper->updateMetronomeForPlayback(); } else { m_controlBlockMmapper->updateMetronomeForRecord(); @@ -1973,7 +1973,7 @@ void SequenceManager::filtersChanged(MidiFilter thruFilter, void SequenceManager::soloChanged(const Composition *, bool solo, TrackId selectedTrack) { if (m_controlBlockMmapper->updateSoloData(solo, selectedTrack)) { - if (m_transportStatus == PLAYING) { + if (m_transporttqStatus == PLAYING) { TQByteArray data; rgapp->sequencerSend("remapTracks()", data); } @@ -1982,7 +1982,7 @@ void SequenceManager::soloChanged(const Composition *, bool solo, TrackId select void SequenceManager::tempoChanged(const Composition *c) { - SEQMAN_DEBUG << "SequenceManager::tempoChanged()\n"; + SETQMAN_DEBUG << "SequenceManager::tempoChanged()\n"; // Refresh all segments // @@ -1999,7 +1999,7 @@ void SequenceManager::tempoChanged(const Composition *c) if (c->isLooping()) setLoop(c->getLoopStart(), c->getLoopEnd()); - else if (m_transportStatus == PLAYING) { + else if (m_transporttqStatus == PLAYING) { // If the tempo changes during playback, reset the pointer // position because the sequencer keeps track of position in // real time and we want to maintain the same position in diff --git a/src/gui/seqmanager/SequenceManager.h b/src/gui/seqmanager/SequenceManager.h index 4713aab..c723e79 100644 --- a/src/gui/seqmanager/SequenceManager.h +++ b/src/gui/seqmanager/SequenceManager.h @@ -66,6 +66,7 @@ class AudioManagerDialog; class SequenceManager : public TQObject, public CompositionObserver { Q_OBJECT + TQ_OBJECT public: SequenceManager(RosegardenGUIDoc *doc, TransportDialog *transport); @@ -101,7 +102,7 @@ public: void fastForwardToEnd(); void setLoop(const timeT &lhs, const timeT &rhs); - void notifySequencerStatus(TransportStatus status); + void notifySequencertqStatus(TransporttqStatus status); void sendSequencerJump(const RealTime &time); // Events coming in @@ -111,7 +112,7 @@ public: // Before playing and recording. If warnUser is true, show the // user a warning dialog if there is a problem with the setup. // - void checkSoundDriverStatus(bool warnUser); + void checkSoundDrivertqStatus(bool warnUser); /** * Send program changes and align Instrument lists before playback @@ -125,8 +126,8 @@ public: void preparePlayback(bool forceProgramChanges = false); /// Check and set sequencer status - void setTransportStatus(const TransportStatus &status); - TransportStatus getTransportStatus() const { return m_transportStatus; } + void setTransporttqStatus(const TransporttqStatus &status); + TransporttqStatus getTransporttqStatus() const { return m_transporttqStatus; } /** * Suspend the sequencer to allow for a safe DCOP call() i.e. one @@ -139,7 +140,7 @@ public: void sendAudioLevel(MappedEvent *mE); /// Find what has been initialised and what hasn't - unsigned int getSoundDriverStatus() { return m_soundDriverStatus; } + unsigned int getSoundDrivertqStatus() { return m_soundDrivertqStatus; } /// Reset MIDI controllers void resetControllers(); @@ -246,7 +247,7 @@ protected: void resetMetronomeMmapper(); void resetTempoSegmentMmapper(); void resetTimeSigSegmentMmapper(); - void checkRefreshStatus(); + void checkRefreshtqStatus(); void sendMIDIRecordingDevice(const TQString recordDeviceStr); void restoreRecordSubscriptions(); bool shouldWarnForImpreciseTimer(); @@ -266,8 +267,8 @@ protected: bool m_metronomeNeedsRefresh; // statuses - TransportStatus m_transportStatus; - unsigned int m_soundDriverStatus; + TransporttqStatus m_transporttqStatus; + unsigned int m_soundDrivertqStatus; // pointer to the transport dialog TransportDialog *m_transport; diff --git a/src/gui/seqmanager/SequencerMapper.cpp b/src/gui/seqmanager/SequencerMapper.cpp index af4ca09..b39d7ef 100644 --- a/src/gui/seqmanager/SequencerMapper.cpp +++ b/src/gui/seqmanager/SequencerMapper.cpp @@ -74,7 +74,7 @@ SequencerMapper::map() if (m_fd < 0) { RG_DEBUG << "SequencerMapper::map() : Couldn't open " << m_filename << endl; - throw Exception("Couldn't open " + std::string(m_filename.data())); + throw Exception("Couldn't open " + std::string(m_filename.ascii())); } m_mmappedSize = sizeof(SequencerDataBlock); @@ -83,7 +83,7 @@ SequencerMapper::map() if (m_mmappedBuffer == (void*) - 1) { RG_DEBUG << TQString("mmap failed : (%1) %2\n"). - arg(errno).arg(strerror(errno)); + tqarg(errno).tqarg(strerror(errno)); throw Exception("mmap failed"); } diff --git a/src/gui/studio/AudioMixerWindow.cpp b/src/gui/studio/AudioMixerWindow.cpp index 2b7ad0e..e95a6b1 100644 --- a/src/gui/studio/AudioMixerWindow.cpp +++ b/src/gui/studio/AudioMixerWindow.cpp @@ -89,90 +89,90 @@ static const unsigned int MIXER_SHOW_UNASSIGNED_FADERS = 1 << 3; static const unsigned int MIXER_OMIT_SYNTH_FADERS = 1 << 4; -AudioMixerWindow::AudioMixerWindow(TQWidget *parent, +AudioMixerWindow::AudioMixerWindow(TQWidget *tqparent, RosegardenGUIDoc *document): - MixerWindow(parent, document), + MixerWindow(tqparent, document), m_mainBox (0) { populate(); - KStdAction::close(this, + KStdAction::close(TQT_TQOBJECT(this), TQT_SLOT(slotClose()), actionCollection()); - TQIconSet icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + TQIconSet icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-play"))); - KAction *play = new KAction(i18n("&Play"), icon, Key_Enter, this, + KAction *play = new KAction(i18n("&Play"), icon, Key_Enter, TQT_TQOBJECT(this), TQT_SIGNAL(play()), actionCollection(), "play"); // Alternative shortcut for Play KShortcut playShortcut = play->shortcut(); playShortcut.append( KKey(Key_Return + CTRL) ); play->setShortcut(playShortcut); - icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-stop"))); - new KAction(i18n("&Stop"), icon, Key_Insert, this, + new KAction(i18n("&Stop"), icon, Key_Insert, TQT_TQOBJECT(this), TQT_SIGNAL(stop()), actionCollection(), "stop"); - icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-rewind"))); - new KAction(i18n("Re&wind"), icon, Key_End, this, + new KAction(i18n("Re&wind"), icon, Key_End, TQT_TQOBJECT(this), TQT_SIGNAL(rewindPlayback()), actionCollection(), "playback_pointer_back_bar"); - icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-ffwd"))); - new KAction(i18n("&Fast Forward"), icon, Key_PageDown, this, + new KAction(i18n("&Fast Forward"), icon, Key_PageDown, TQT_TQOBJECT(this), TQT_SIGNAL(fastForwardPlayback()), actionCollection(), "playback_pointer_forward_bar"); - icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-rewind-end"))); - new KAction(i18n("Rewind to &Beginning"), icon, 0, this, + new KAction(i18n("Rewind to &Beginning"), icon, 0, TQT_TQOBJECT(this), TQT_SIGNAL(rewindPlaybackToBeginning()), actionCollection(), "playback_pointer_start"); - icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-ffwd-end"))); - new KAction(i18n("Fast Forward to &End"), icon, 0, this, + new KAction(i18n("Fast Forward to &End"), icon, 0, TQT_TQOBJECT(this), TQT_SIGNAL(fastForwardPlaybackToEnd()), actionCollection(), "playback_pointer_end"); - icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-record"))); - new KAction(i18n("&Record"), icon, 0, this, + new KAction(i18n("&Record"), icon, 0, TQT_TQOBJECT(this), TQT_SIGNAL(record()), actionCollection(), "record"); - icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-panic"))); - new KAction(i18n("Panic"), icon, Key_P + CTRL + ALT, this, + new KAction(i18n("Panic"), icon, Key_P + CTRL + ALT, TQT_TQOBJECT(this), TQT_SIGNAL(panic()), actionCollection(), "panic"); unsigned int mixerOptions = m_studio->getMixerDisplayOptions(); - (new KToggleAction(i18n("Show Audio &Faders"), 0, this, + (new KToggleAction(i18n("Show Audio &Faders"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotToggleFaders()), actionCollection(), "show_audio_faders"))->setChecked (!(mixerOptions & MIXER_OMIT_FADERS)); - (new KToggleAction(i18n("Show Synth &Faders"), 0, this, + (new KToggleAction(i18n("Show Synth &Faders"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotToggleSynthFaders()), actionCollection(), "show_synth_faders"))->setChecked (!(mixerOptions & MIXER_OMIT_SYNTH_FADERS)); - (new KToggleAction(i18n("Show &Submasters"), 0, this, + (new KToggleAction(i18n("Show &Submasters"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotToggleSubmasters()), actionCollection(), "show_audio_submasters"))->setChecked (!(mixerOptions & MIXER_OMIT_SUBMASTERS)); - (new KToggleAction(i18n("Show &Plugin Buttons"), 0, this, + (new KToggleAction(i18n("Show &Plugin Buttons"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotTogglePluginButtons()), actionCollection(), "show_plugin_buttons"))->setChecked (!(mixerOptions & MIXER_OMIT_PLUGINS)); - (new KToggleAction(i18n("Show &Unassigned Faders"), 0, this, + (new KToggleAction(i18n("Show &Unassigned Faders"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotToggleUnassignedFaders()), actionCollection(), "show_unassigned_faders"))->setChecked (mixerOptions & MIXER_SHOW_UNASSIGNED_FADERS); @@ -182,9 +182,9 @@ AudioMixerWindow::AudioMixerWindow(TQWidget *parent, for (int i = 1; i <= 16; i *= 2) { action = new KRadioAction(i18n("1 Input", "%n Inputs", i), - 0, this, + 0, TQT_TQOBJECT(this), TQT_SLOT(slotSetInputCountFromAction()), actionCollection(), - TQString("inputs_%1").arg(i)); + TQString("inputs_%1").tqarg(i)); action->setExclusiveGroup("inputs"); if (i == int(m_studio->getRecordIns().size())) action->setChecked(true); @@ -192,7 +192,7 @@ AudioMixerWindow::AudioMixerWindow(TQWidget *parent, action = new KRadioAction (i18n("No Submasters"), - 0, this, + 0, TQT_TQOBJECT(this), TQT_SLOT(slotSetSubmasterCountFromAction()), actionCollection(), TQString("submasters_0")); action->setExclusiveGroup("submasters"); @@ -201,9 +201,9 @@ AudioMixerWindow::AudioMixerWindow(TQWidget *parent, for (int i = 2; i <= 8; i *= 2) { action = new KRadioAction (i18n("1 Submaster", "%n Submasters", i), - 0, this, + 0, TQT_TQOBJECT(this), TQT_SLOT(slotSetSubmasterCountFromAction()), actionCollection(), - TQString("submasters_%1").arg(i)); + TQString("submasters_%1").tqarg(i)); action->setExclusiveGroup("submasters"); if (i == int(m_studio->getBusses().size()) - 1) action->setChecked(true); @@ -268,12 +268,12 @@ AudioMixerWindow::populate() BussList busses = m_studio->getBusses(); TQString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); - m_monoPixmap.load(TQString("%1/misc/mono.xpm").arg(pixmapDir)); - m_stereoPixmap.load(TQString("%1/misc/stereo.xpm").arg(pixmapDir)); + m_monoPixmap.load(TQString("%1/misc/mono.xpm").tqarg(pixmapDir)); + m_stereoPixmap.load(TQString("%1/misc/stereo.xpm").tqarg(pixmapDir)); // Total cols: is 2 for each fader, submaster or master, plus 1 // for each spacer. - TQGridLayout *mainLayout = new QGridLayout + TQGridLayout *mainLayout = new TQGridLayout (m_mainBox, (instruments.size() + busses.size()) * 3, 7); setCaption(i18n("Audio Mixer")); @@ -397,11 +397,11 @@ AudioMixerWindow::populate() TQLabel *idLabel; TQString idString; if ((*i)->getType() == Instrument::Audio) { - idString = i18n("Audio %1").arg((*i)->getId() - + idString = i18n("Audio %1").tqarg((*i)->getId() - AudioInstrumentBase + 1); idLabel = new TQLabel(idString, m_mainBox, "audioIdLabel"); } else { - idString = i18n("Synth %1").arg((*i)->getId() - + idString = i18n("Synth %1").tqarg((*i)->getId() - SoftSynthInstrumentBase + 1); idLabel = new TQLabel(idString, m_mainBox, "synthIdLabel"); } @@ -411,14 +411,14 @@ AudioMixerWindow::populate() mainLayout->addMultiCellWidget(rec.m_input->getWidget(), 1, 1, col, col + 1); } mainLayout->addMultiCellWidget(rec.m_output->getWidget(), 2, 2, col, col + 1); - // mainLayout->addWidget(idLabel, 2, col, Qt::AlignCenter); - // mainLayout->addWidget(rec.m_pan, 2, col+1, Qt::AlignLeft); + // mainLayout->addWidget(idLabel, 2, col, TQt::AlignCenter); + // mainLayout->addWidget(rec.m_pan, 2, col+1, TQt::AlignLeft); - mainLayout->addMultiCellWidget(idLabel, 0, 0, col, col + 1, Qt::AlignCenter); - mainLayout->addWidget(rec.m_pan, 5, col, Qt::AlignCenter); + mainLayout->addMultiCellWidget(idLabel, 0, 0, col, col + 1, TQt::AlignCenter); + mainLayout->addWidget(rec.m_pan, 5, col, TQt::AlignCenter); - mainLayout->addWidget(rec.m_fader, 3, col, Qt::AlignCenter); - mainLayout->addWidget(rec.m_meter, 3, col + 1, Qt::AlignCenter); + mainLayout->addWidget(rec.m_fader, 3, col, TQt::AlignCenter); + mainLayout->addWidget(rec.m_meter, 3, col + 1, TQt::AlignCenter); // commented out until implemented // mainLayout->addWidget(rec.m_muteButton, 4, col); @@ -525,17 +525,17 @@ AudioMixerWindow::populate() this, TQT_SLOT(slotSelectPlugin())); } - TQLabel *idLabel = new TQLabel(i18n("Sub %1").arg(count), m_mainBox, "subMaster"); + TQLabel *idLabel = new TQLabel(i18n("Sub %1").tqarg(count), m_mainBox, "subMaster"); idLabel->setFont(boldFont); - // mainLayout->addWidget(idLabel, 2, col, Qt::AlignCenter); - mainLayout->addMultiCellWidget(idLabel, 0, 0, col, col + 1, Qt::AlignCenter); + // mainLayout->addWidget(idLabel, 2, col, TQt::AlignCenter); + mainLayout->addMultiCellWidget(idLabel, 0, 0, col, col + 1, TQt::AlignCenter); - // mainLayout->addWidget(rec.m_pan, 2, col+1, Qt::AlignLeft); - mainLayout->addMultiCellWidget(rec.m_pan, 5, 5, col, col + 1, Qt::AlignCenter); + // mainLayout->addWidget(rec.m_pan, 2, col+1, TQt::AlignLeft); + mainLayout->addMultiCellWidget(rec.m_pan, 5, 5, col, col + 1, TQt::AlignCenter); - mainLayout->addWidget(rec.m_fader, 3, col, Qt::AlignCenter); - mainLayout->addWidget(rec.m_meter, 3, col + 1, Qt::AlignCenter); + mainLayout->addWidget(rec.m_fader, 3, col, TQt::AlignCenter); + mainLayout->addWidget(rec.m_meter, 3, col + 1, TQt::AlignCenter); // mainLayout->addMultiCellWidget(rec.m_muteButton, 4, 4, col, col+1); rec.m_muteButton->hide(); @@ -587,9 +587,9 @@ AudioMixerWindow::populate() TQLabel *idLabel = new TQLabel(i18n("Master"), m_mainBox); idLabel->setFont(boldFont); - mainLayout->addMultiCellWidget(idLabel, 0, 0, col, col + 1, Qt::AlignCenter); - mainLayout->addWidget(rec.m_fader, 3, col, Qt::AlignCenter); - mainLayout->addWidget(rec.m_meter, 3, col + 1, Qt::AlignCenter); + mainLayout->addMultiCellWidget(idLabel, 0, 0, col, col + 1, TQt::AlignCenter); + mainLayout->addWidget(rec.m_fader, 3, col, TQt::AlignCenter); + mainLayout->addWidget(rec.m_meter, 3, col + 1, TQt::AlignCenter); // mainLayout->addMultiCellWidget(rec.m_muteButton, 4, 4, col, col+1); rec.m_muteButton->hide(); @@ -706,7 +706,7 @@ AudioMixerWindow::slotPluginSelected(InstrumentId id, } - rec.m_plugins[index]->setPaletteForegroundColor(Qt::white); + rec.m_plugins[index]->setPaletteForegroundColor(TQt::white); rec.m_plugins[index]->setPaletteBackgroundColor(pluginBgColour); } } else if (id > 0 && id <= m_submasters.size()) { @@ -745,7 +745,7 @@ AudioMixerWindow::slotPluginSelected(InstrumentId id, } - rec.m_plugins[index]->setPaletteForegroundColor(Qt::white); + rec.m_plugins[index]->setPaletteForegroundColor(TQt::white); rec.m_plugins[index]->setPaletteBackgroundColor(pluginBgColour); } } @@ -921,7 +921,7 @@ AudioMixerWindow::updatePluginButtons(int id) } else if (used) { - rec->m_plugins[i]->setPaletteForegroundColor(Qt::white); + rec->m_plugins[i]->setPaletteForegroundColor(TQt::white); rec->m_plugins[i]->setPaletteBackgroundColor(pluginBgColour); @@ -942,7 +942,7 @@ AudioMixerWindow::updatePluginButtons(int id) void AudioMixerWindow::slotSelectPlugin() { - const TQObject *s = sender(); + const TQObject *s = TQT_TQOBJECT_CONST(const_cast<const TQT_BASE_OBJECT_NAME*>(sender())); for (FaderMap::iterator i = m_faders.begin(); i != m_faders.end(); ++i) { @@ -954,7 +954,7 @@ AudioMixerWindow::slotSelectPlugin() for (std::vector<TQPushButton *>::iterator pli = i->second.m_plugins.begin(); pli != i->second.m_plugins.end(); ++pli) { - if (*pli == s) { + if (TQT_BASE_OBJECT(*pli) == TQT_BASE_OBJECT_CONST(s)) { emit selectPlugin(this, i->first, index); return ; @@ -977,7 +977,7 @@ AudioMixerWindow::slotSelectPlugin() for (std::vector<TQPushButton *>::iterator pli = i->m_plugins.begin(); pli != i->m_plugins.end(); ++pli) { - if (*pli == s) { + if (TQT_BASE_OBJECT(*pli) == TQT_BASE_OBJECT_CONST(s)) { emit selectPlugin(this, b, index); return ; @@ -993,7 +993,7 @@ AudioMixerWindow::slotSelectPlugin() void AudioMixerWindow::slotInputChanged() { - const TQObject *s = sender(); + const TQObject *s = TQT_TQOBJECT_CONST(const_cast<const TQT_BASE_OBJECT_NAME*>(sender())); for (FaderMap::iterator i = m_faders.begin(); i != m_faders.end(); ++i) { @@ -1006,7 +1006,7 @@ AudioMixerWindow::slotInputChanged() void AudioMixerWindow::slotOutputChanged() { - const TQObject *s = sender(); + const TQObject *s = TQT_TQOBJECT_CONST(const_cast<const TQT_BASE_OBJECT_NAME*>(sender())); for (FaderMap::iterator i = m_faders.begin(); i != m_faders.end(); ++i) { @@ -1060,11 +1060,11 @@ AudioMixerWindow::sendControllerRefresh() void AudioMixerWindow::slotFaderLevelChanged(float dB) { - const TQObject *s = sender(); + const TQObject *s = TQT_TQOBJECT_CONST(const_cast<const TQT_BASE_OBJECT_NAME*>(sender())); BussList busses = m_studio->getBusses(); - if (m_master.m_fader == s) { + if (TQT_BASE_OBJECT(m_master.m_fader) == TQT_BASE_OBJECT_CONST(s)) { if (busses.size() > 0) { StudioControl::setStudioObjectProperty @@ -1082,7 +1082,7 @@ AudioMixerWindow::slotFaderLevelChanged(float dB) for (FaderVector::iterator i = m_submasters.begin(); i != m_submasters.end(); ++i) { - if (i->m_fader == s) { + if (TQT_BASE_OBJECT(i->m_fader) == TQT_BASE_OBJECT_CONST(s)) { if ((int)busses.size() > index) { StudioControl::setStudioObjectProperty (MappedObjectId(busses[index]->getMappedId()), @@ -1102,7 +1102,7 @@ AudioMixerWindow::slotFaderLevelChanged(float dB) for (FaderMap::iterator i = m_faders.begin(); i != m_faders.end(); ++i) { - if (i->second.m_fader == s) { + if (TQT_BASE_OBJECT(i->second.m_fader) == TQT_BASE_OBJECT_CONST(s)) { Instrument *instrument = m_studio->getInstrumentById(i->first); @@ -1140,7 +1140,7 @@ AudioMixerWindow::slotFaderLevelChanged(float dB) void AudioMixerWindow::slotPanChanged(float pan) { - const TQObject *s = sender(); + const TQObject *s = TQT_TQOBJECT_CONST(const_cast<const TQT_BASE_OBJECT_NAME*>(sender())); BussList busses = m_studio->getBusses(); @@ -1149,7 +1149,7 @@ AudioMixerWindow::slotPanChanged(float pan) for (FaderVector::iterator i = m_submasters.begin(); i != m_submasters.end(); ++i) { - if (i->m_pan == s) { + if (TQT_BASE_OBJECT(i->m_pan) == TQT_BASE_OBJECT_CONST(s)) { if ((int)busses.size() > index) { StudioControl::setStudioObjectProperty (MappedObjectId(busses[index]->getMappedId()), @@ -1168,7 +1168,7 @@ AudioMixerWindow::slotPanChanged(float pan) for (FaderMap::iterator i = m_faders.begin(); i != m_faders.end(); ++i) { - if (i->second.m_pan == s) { + if (TQT_BASE_OBJECT(i->second.m_pan) == TQT_BASE_OBJECT_CONST(s)) { Instrument *instrument = m_studio->getInstrumentById(i->first); @@ -1208,7 +1208,7 @@ AudioMixerWindow::slotPanChanged(float pan) void AudioMixerWindow::slotChannelsChanged() { - const TQObject *s = sender(); + const TQObject *s = TQT_TQOBJECT_CONST(const_cast<const TQT_BASE_OBJECT_NAME*>(sender())); // channels are only switchable on instruments @@ -1218,7 +1218,7 @@ AudioMixerWindow::slotChannelsChanged() for (FaderMap::iterator i = m_faders.begin(); i != m_faders.end(); ++i) { - if (s == i->second.m_stereoButton) { + if (TQT_BASE_OBJECT_CONST(s) == TQT_BASE_OBJECT(i->second.m_stereoButton)) { Instrument *instrument = m_studio->getInstrumentById(i->first); @@ -1322,7 +1322,7 @@ AudioMixerWindow::updateMonitorMeters(SequencerMapper *mapper) // only show monitor levels when quiescent or when recording (as // record levels) if (m_document->getSequenceManager() && - m_document->getSequenceManager()->getTransportStatus() == PLAYING) { + m_document->getSequenceManager()->getTransporttqStatus() == PLAYING) { return ; } @@ -1444,7 +1444,7 @@ AudioMixerWindow::slotControllerDeviceEventReceived(MappedEvent *e, void AudioMixerWindow::slotSetInputCountFromAction() { - const TQObject *s = sender(); + const TQObject *s = TQT_TQOBJECT_CONST(const_cast<const TQT_BASE_OBJECT_NAME*>(sender())); TQString name = s->name(); if (name.left(7) == "inputs_") { @@ -1475,7 +1475,7 @@ AudioMixerWindow::slotSetInputCountFromAction() void AudioMixerWindow::slotSetSubmasterCountFromAction() { - const TQObject *s = sender(); + const TQObject *s = TQT_TQOBJECT_CONST(const_cast<const TQT_BASE_OBJECT_NAME*>(sender())); TQString name = s->name(); if (name.left(11) == "submasters_") { @@ -1714,7 +1714,7 @@ AudioMixerWindow::slotToggleUnassignedFaders() void AudioMixerWindow::toggleNamedWidgets(bool show, const char* const name) { - TQLayoutIterator it = m_mainBox->layout()->iterator(); + TQLayoutIterator it = m_mainBox->tqlayout()->iterator(); TQLayoutItem *child; while ( (child = it.current()) != 0 ) { TQWidget * widget = child->widget(); diff --git a/src/gui/studio/AudioMixerWindow.h b/src/gui/studio/AudioMixerWindow.h index cc3cd77..e5ec815 100644 --- a/src/gui/studio/AudioMixerWindow.h +++ b/src/gui/studio/AudioMixerWindow.h @@ -55,9 +55,10 @@ class AudioRouteMenu; class AudioMixerWindow : public MixerWindow { Q_OBJECT + TQ_OBJECT public: - AudioMixerWindow(TQWidget *parent, RosegardenGUIDoc *document); + AudioMixerWindow(TQWidget *tqparent, RosegardenGUIDoc *document); ~AudioMixerWindow(); void updateMeters(SequencerMapper *mapper); diff --git a/src/gui/studio/AudioPlugin.cpp b/src/gui/studio/AudioPlugin.cpp index dd30472..c837fd7 100644 --- a/src/gui/studio/AudioPlugin.cpp +++ b/src/gui/studio/AudioPlugin.cpp @@ -52,7 +52,7 @@ AudioPlugin::AudioPlugin(const TQString &identifier, m_isSynth(isSynth), m_isGrouped(isGrouped), m_category(category), - m_colour(Qt::darkRed) + m_colour(TQt::darkRed) {} void diff --git a/src/gui/studio/AudioPluginManager.h b/src/gui/studio/AudioPluginManager.h index 9150f69..540f388 100644 --- a/src/gui/studio/AudioPluginManager.h +++ b/src/gui/studio/AudioPluginManager.h @@ -89,7 +89,7 @@ protected: bool removePlugin(const TQString &identifier); - class Enumerator : public QThread + class Enumerator : public TQThread { public: Enumerator(AudioPluginManager *); diff --git a/src/gui/studio/AudioPluginOSCGUI.cpp b/src/gui/studio/AudioPluginOSCGUI.cpp index d443acd..3fd2ffb 100644 --- a/src/gui/studio/AudioPluginOSCGUI.cpp +++ b/src/gui/studio/AudioPluginOSCGUI.cpp @@ -86,7 +86,7 @@ AudioPluginOSCGUI::~AudioPluginOSCGUI() quit(); } -QString +TQString AudioPluginOSCGUI::getGUIFilePath(TQString identifier) { TQString type, soName, label; diff --git a/src/gui/studio/AudioPluginOSCGUIManager.cpp b/src/gui/studio/AudioPluginOSCGUIManager.cpp index e3d61d7..6662a53 100644 --- a/src/gui/studio/AudioPluginOSCGUIManager.cpp +++ b/src/gui/studio/AudioPluginOSCGUIManager.cpp @@ -329,7 +329,7 @@ AudioPluginOSCGUIManager::updateConfiguration(InstrumentId instrument, int posit m_guis[instrument][position]->sendConfiguration(key, value); } -QString +TQString AudioPluginOSCGUIManager::getOSCUrl(InstrumentId instrument, int position, TQString identifier) { @@ -345,18 +345,18 @@ AudioPluginOSCGUIManager::getOSCUrl(InstrumentId instrument, int position, baseUrl += '/'; TQString url = TQString("%1%2/%3/%4/%5/%6") - .arg(baseUrl) - .arg("plugin") - .arg(type) - .arg(instrument); + .tqarg(baseUrl) + .tqarg("plugin") + .tqarg(type) + .tqarg(instrument); if (position == int(Instrument::SYNTH_PLUGIN_POSITION)) { - url = url.arg("synth"); + url = url.tqarg("synth"); } else { - url = url.arg(position); + url = url.tqarg(position); } - url = url.arg(label); + url = url.tqarg(label); return url; } @@ -435,7 +435,7 @@ AudioPluginOSCGUIManager::parseOSCPath(TQString path, InstrumentId &instrument, return true; } -QString +TQString AudioPluginOSCGUIManager::getFriendlyName(InstrumentId instrument, int position, TQString) { @@ -444,10 +444,10 @@ AudioPluginOSCGUIManager::getFriendlyName(InstrumentId instrument, int position, return i18n("Rosegarden Plugin"); else { if (position == int(Instrument::SYNTH_PLUGIN_POSITION)) { - return i18n("Rosegarden: %1").arg(strtoqstr(container->getPresentationName())); + return i18n("Rosegarden: %1").tqarg(strtoqstr(container->getPresentationName())); } else { - return i18n("Rosegarden: %1: %2").arg(strtoqstr(container->getPresentationName())) - .arg(i18n("Plugin slot %1").arg(position)); + return i18n("Rosegarden: %1: %2").tqarg(strtoqstr(container->getPresentationName())) + .tqarg(i18n("Plugin slot %1").tqarg(position)); } } } diff --git a/src/gui/studio/BankEditorDialog.cpp b/src/gui/studio/BankEditorDialog.cpp index 5c5c3d2..6103652 100644 --- a/src/gui/studio/BankEditorDialog.cpp +++ b/src/gui/studio/BankEditorDialog.cpp @@ -78,10 +78,10 @@ namespace Rosegarden { -BankEditorDialog::BankEditorDialog(TQWidget *parent, +BankEditorDialog::BankEditorDialog(TQWidget *tqparent, RosegardenGUIDoc *doc, DeviceId defaultDevice): - KMainWindow(parent, "bankeditordialog"), + KMainWindow(tqparent, "bankeditordialog"), m_studio(&doc->getStudio()), m_doc(doc), m_copyBank(Device::NO_DEVICE, -1), @@ -100,20 +100,20 @@ BankEditorDialog::BankEditorDialog(TQWidget *parent, TQFrame* btnBox = new TQFrame(mainFrame); - btnBox->setSizePolicy(TQSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed)); + btnBox->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed)); - TQHBoxLayout* layout = new TQHBoxLayout(btnBox, 4, 10); + TQHBoxLayout* tqlayout = new TQHBoxLayout(btnBox, 4, 10); m_closeButton = new TQPushButton(btnBox); m_applyButton = new TQPushButton(i18n("Apply"), btnBox); m_resetButton = new TQPushButton(i18n("Reset"), btnBox); - layout->addStretch(10); - layout->addWidget(m_applyButton); - layout->addWidget(m_resetButton); - layout->addSpacing(15); - layout->addWidget(m_closeButton); - layout->addSpacing(5); + tqlayout->addStretch(10); + tqlayout->addWidget(m_applyButton); + tqlayout->addWidget(m_resetButton); + tqlayout->addSpacing(15); + tqlayout->addWidget(m_closeButton); + tqlayout->addSpacing(5); connect(m_applyButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotApply())); @@ -206,8 +206,8 @@ BankEditorDialog::BankEditorDialog(TQWidget *parent, vboxLayout->addWidget(m_keyMappingEditor); m_keyMappingEditor->hide(); - m_programEditor->setSizePolicy(TQSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Preferred)); - m_keyMappingEditor->setSizePolicy(TQSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Preferred)); + m_programEditor->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Preferred)); + m_keyMappingEditor->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Preferred)); m_optionBox = new TQVGroupBox(i18n("Options"), vbox); vboxLayout->addWidget(m_optionBox); @@ -303,14 +303,14 @@ BankEditorDialog::~BankEditorDialog() void BankEditorDialog::setupActions() { - KAction* close = KStdAction::close (this, TQT_SLOT(slotFileClose()), actionCollection()); + KAction* close = KStdAction::close (TQT_TQOBJECT(this), TQT_SLOT(slotFileClose()), actionCollection()); m_closeButton->setText(close->text()); connect(m_closeButton, TQT_SIGNAL(clicked()), - this, TQT_SLOT(slotFileClose())); + TQT_TQOBJECT(this), TQT_SLOT(slotFileClose())); - KStdAction::copy (this, TQT_SLOT(slotEditCopy()), actionCollection()); - KStdAction::paste (this, TQT_SLOT(slotEditPaste()), actionCollection()); + KStdAction::copy (TQT_TQOBJECT(this), TQT_SLOT(slotEditCopy()), actionCollection()); + KStdAction::paste (TQT_TQOBJECT(this), TQT_SLOT(slotEditPaste()), actionCollection()); // some adjustments @@ -593,7 +593,7 @@ BankEditorDialog::updateDeviceItem(MidiDeviceListViewItem* deviceItem) // delete banks which are no longer present // - std::vector<TQListViewItem*> childrenToDelete; + std::vector<TQListViewItem*> tqchildrenToDelete; TQListViewItem* child = deviceItem->firstChild(); @@ -603,7 +603,7 @@ BankEditorDialog::updateDeviceItem(MidiDeviceListViewItem* deviceItem) dynamic_cast<MidiBankListViewItem *>(child); if (bankItem) { if (bankItem->getBank() >= int(banks.size())) - childrenToDelete.push_back(child); + tqchildrenToDelete.push_back(child); else { // update the banks MSB/LSB which might have changed bankItem->setPercussion(banks[bankItem->getBank()].isPercussion()); bankItem->setMSB(banks[bankItem->getBank()].getMSB()); @@ -615,15 +615,15 @@ BankEditorDialog::updateDeviceItem(MidiDeviceListViewItem* deviceItem) dynamic_cast<MidiKeyMapListViewItem *>(child); if (keyItem) { if (!midiDevice->getKeyMappingByName(qstrtostr(keyItem->getName()))) { - childrenToDelete.push_back(child); + tqchildrenToDelete.push_back(child); } } child = child->nextSibling(); } - for (unsigned int i = 0; i < childrenToDelete.size(); ++i) - delete childrenToDelete[i]; + for (unsigned int i = 0; i < tqchildrenToDelete.size(); ++i) + delete tqchildrenToDelete[i]; } bool @@ -968,15 +968,15 @@ BankEditorDialog::getParentDeviceItem(TQListViewItem* item) return 0; if (dynamic_cast<MidiBankListViewItem*>(item)) - // go up to the parent device item - item = item->parent(); + // go up to the tqparent device item + item = item->tqparent(); if (dynamic_cast<MidiKeyMapListViewItem*>(item)) - // go up to the parent device item - item = item->parent(); + // go up to the tqparent device item + item = item->tqparent(); if (!item) { - RG_DEBUG << "BankEditorDialog::getParentDeviceItem : missing parent device item for bank item - this SHOULD NOT HAPPEN" << endl; + RG_DEBUG << "BankEditorDialog::getParentDeviceItem : missing tqparent device item for bank item - this SHOULD NOT HAPPEN" << endl; return 0; } @@ -1045,7 +1045,7 @@ BankEditorDialog::slotAddKeyMapping() if (n == 1) name = i18n("<new mapping>"); else - name = i18n("<new mapping %1>").arg(n); + name = i18n("<new mapping %1>").tqarg(n); } MidiKeyMapping newKeyMapping(qstrtostr(name)); diff --git a/src/gui/studio/BankEditorDialog.h b/src/gui/studio/BankEditorDialog.h index 6e36bef..4ab64ea 100644 --- a/src/gui/studio/BankEditorDialog.h +++ b/src/gui/studio/BankEditorDialog.h @@ -61,9 +61,10 @@ class MidiDevice; class BankEditorDialog : public KMainWindow { Q_OBJECT + TQ_OBJECT public: - BankEditorDialog(TQWidget *parent, + BankEditorDialog(TQWidget *tqparent, RosegardenGUIDoc *doc, DeviceId defaultDevice = Device::NO_DEVICE); diff --git a/src/gui/studio/ChangeRecordDeviceCommand.cpp b/src/gui/studio/ChangeRecordDeviceCommand.cpp index 5f46eff..f596f1c 100644 --- a/src/gui/studio/ChangeRecordDeviceCommand.cpp +++ b/src/gui/studio/ChangeRecordDeviceCommand.cpp @@ -42,12 +42,12 @@ ChangeRecordDeviceCommand::swap() TQString sdevice = TQString::number(m_deviceId); if (m_action) { - if(!devList.contains(sdevice)) + if(!devList.tqcontains(sdevice)) devList.append(sdevice); } else { - if(devList.contains(sdevice)) + if(devList.tqcontains(sdevice)) devList.remove(sdevice); } config->writeEntry("midirecorddevice", devList); diff --git a/src/gui/studio/DeviceEditorDialog.cpp b/src/gui/studio/DeviceEditorDialog.cpp index 9f45c31..66f371a 100644 --- a/src/gui/studio/DeviceEditorDialog.cpp +++ b/src/gui/studio/DeviceEditorDialog.cpp @@ -55,9 +55,9 @@ namespace Rosegarden { -DeviceEditorDialog::DeviceEditorDialog(TQWidget *parent, +DeviceEditorDialog::DeviceEditorDialog(TQWidget *tqparent, RosegardenGUIDoc *document) : - KDialogBase(parent, "deviceeditordialog", true, + KDialogBase(tqparent, "deviceeditordialog", true, i18n("Manage MIDI Devices"), Ok | Apply | Close, Ok, true), m_document(document), m_studio(&document->getStudio()), @@ -145,7 +145,7 @@ DeviceEditorDialog::populate() MidiDevice *md = static_cast<MidiDevice *>(*it); // if you change this string ("Device %1"), change test in slotApply - TQString deviceName = i18n("Device %1").arg(md->getId() + 1); + TQString deviceName = i18n("Device %1").tqarg(md->getId() + 1); TQString deviceLabel = strtoqstr(md->getName()); TQString connectionName = strtoqstr(md->getConnection()); @@ -221,7 +221,7 @@ DeviceEditorDialog::makeConnectionList(unsigned int direction, TQDataStream reply(replyData, IO_ReadOnly); TQString connection; - if (replyType == "TQString") { + if (replyType == TQSTRING_OBJECT_NAME_STRING) { reply >> connection; list.append(connection); } diff --git a/src/gui/studio/DeviceEditorDialog.h b/src/gui/studio/DeviceEditorDialog.h index 44247b3..7eea5a7 100644 --- a/src/gui/studio/DeviceEditorDialog.h +++ b/src/gui/studio/DeviceEditorDialog.h @@ -46,8 +46,9 @@ class RosegardenGUIDoc; class DeviceEditorDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - DeviceEditorDialog(TQWidget *parent, RosegardenGUIDoc *document); + DeviceEditorDialog(TQWidget *tqparent, RosegardenGUIDoc *document); ~DeviceEditorDialog(); void setModified(bool value); diff --git a/src/gui/studio/DeviceManagerDialog.cpp b/src/gui/studio/DeviceManagerDialog.cpp index eb40c77..84aa0ca 100644 --- a/src/gui/studio/DeviceManagerDialog.cpp +++ b/src/gui/studio/DeviceManagerDialog.cpp @@ -83,9 +83,9 @@ static const int RECORD_CURRENT_COL = 1; static const int RECORD_CONNECTION_COL = 2; -DeviceManagerDialog::DeviceManagerDialog(TQWidget *parent, +DeviceManagerDialog::DeviceManagerDialog(TQWidget *tqparent, RosegardenGUIDoc *document) : - KMainWindow(parent, "deviceeditordialog"), + KMainWindow(tqparent, "deviceeditordialog"), m_document(document), m_studio(&document->getStudio()) { @@ -95,7 +95,7 @@ DeviceManagerDialog::DeviceManagerDialog(TQWidget *parent, setCaption(i18n("Manage MIDI Devices")); - TQGroupBox *groupBox = new TQGroupBox(2, Horizontal, i18n("Play devices"), mainBox); + TQGroupBox *groupBox = new TQGroupBox(2, Qt::Horizontal, i18n("Play devices"), mainBox); m_playTable = new TQTable(0, 2, groupBox); m_playTable->setSorting(false); @@ -110,16 +110,16 @@ DeviceManagerDialog::DeviceManagerDialog(TQWidget *parent, m_playTable->setSelectionMode(TQTable::SingleRow); TQFrame *frame = new TQFrame(groupBox); - TQVBoxLayout *vlayout = new TQVBoxLayout(frame); - TQGrid *buttons = new TQGrid(2, Horizontal, frame); + TQVBoxLayout *vtqlayout = new TQVBoxLayout(frame); + TQGrid *buttons = new TQGrid(2, Qt::Horizontal, frame); TQPushButton *addButton = new TQPushButton(i18n("New"), buttons); m_deletePlayButton = new TQPushButton(i18n("Delete"), buttons); m_importButton = new TQPushButton(i18n("Import..."), buttons); m_exportButton = new TQPushButton(i18n("Export..."), buttons); m_banksButton = new TQPushButton(i18n("Banks..."), buttons); m_controllersButton = new TQPushButton(i18n("Control Events..."), buttons); - vlayout->addWidget(buttons); - vlayout->addStretch(10); + vtqlayout->addWidget(buttons); + vtqlayout->addStretch(10); TQToolTip::add (addButton, @@ -153,7 +153,7 @@ DeviceManagerDialog::DeviceManagerDialog(TQWidget *parent, this, TQT_SLOT(slotPlayDeviceSelected (int, int))); mainLayout->addWidget(groupBox); - groupBox = new TQGroupBox(2, Horizontal, i18n("Record devices"), mainBox); + groupBox = new TQGroupBox(2, Qt::Horizontal, i18n("Record devices"), mainBox); m_recordTable = new TQTable(0, 3, groupBox); m_recordTable->setSorting(false); @@ -169,12 +169,12 @@ DeviceManagerDialog::DeviceManagerDialog(TQWidget *parent, m_recordTable->setSelectionMode(TQTable::SingleRow); frame = new TQFrame(groupBox); - vlayout = new TQVBoxLayout(frame); - buttons = new TQGrid(2, Horizontal, frame); + vtqlayout = new TQVBoxLayout(frame); + buttons = new TQGrid(2, Qt::Horizontal, frame); addButton = new TQPushButton(i18n("New"), buttons); m_deleteRecordButton = new TQPushButton(i18n("Delete"), buttons); - vlayout->addWidget(buttons); - vlayout->addStretch(10); + vtqlayout->addWidget(buttons); + vtqlayout->addStretch(10); TQToolTip::add (addButton, @@ -204,17 +204,17 @@ DeviceManagerDialog::DeviceManagerDialog(TQWidget *parent, TQFrame* btnBox = new TQFrame(mainBox); - btnBox->setSizePolicy( + btnBox->tqsetSizePolicy( TQSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed)); TQPushButton *closeButton = new TQPushButton(i18n("Close"), btnBox); - TQHBoxLayout* layout = new TQHBoxLayout(btnBox, 0, 10); - layout->addStretch(10); - layout->addWidget(closeButton); - layout->addSpacing(5); + TQHBoxLayout* tqlayout = new TQHBoxLayout(btnBox, 0, 10); + tqlayout->addStretch(10); + tqlayout->addWidget(closeButton); + tqlayout->addSpacing(5); - KAction* close = KStdAction::close(this, + KAction* close = KStdAction::close(TQT_TQOBJECT(this), TQT_SLOT(slotClose()), actionCollection()); @@ -326,7 +326,7 @@ DeviceManagerDialog::DeviceManagerDialog(TQWidget *parent, m_playTable->insertRows(deviceCount, 1); - TQString deviceName = i18n("%1").arg(deviceCount + 1); + TQString deviceName = i18n("%1").tqarg(deviceCount + 1); TQString connectionName = strtoqstr((*it)->getConnection()); m_playTable->setText(deviceCount, PLAY_NAME_COL, @@ -360,7 +360,7 @@ DeviceManagerDialog::DeviceManagerDialog(TQWidget *parent, m_recordTable->insertRows(deviceCount, 1); - TQString deviceName = i18n("%1").arg(deviceCount + 1); + TQString deviceName = i18n("%1").tqarg(deviceCount + 1); TQString connectionName = strtoqstr((*it)->getConnection()); m_recordTable->setText(deviceCount, RECORD_NAME_COL, @@ -443,7 +443,7 @@ DeviceManagerDialog::DeviceManagerDialog(TQWidget *parent, TQDataStream reply(replyData, IO_ReadOnly); TQString connection; - if (replyType == "TQString") { + if (replyType == TQSTRING_OBJECT_NAME_STRING) { reply >> connection; list.append(connection); } diff --git a/src/gui/studio/DeviceManagerDialog.h b/src/gui/studio/DeviceManagerDialog.h index 84dceab..09e908d 100644 --- a/src/gui/studio/DeviceManagerDialog.h +++ b/src/gui/studio/DeviceManagerDialog.h @@ -50,8 +50,9 @@ class MidiDevice; class DeviceManagerDialog : public KMainWindow { Q_OBJECT + TQ_OBJECT public: - DeviceManagerDialog(TQWidget *parent, RosegardenGUIDoc *document); + DeviceManagerDialog(TQWidget *tqparent, RosegardenGUIDoc *document); ~DeviceManagerDialog(); void setModified(bool value); diff --git a/src/gui/studio/MidiBankListViewItem.cpp b/src/gui/studio/MidiBankListViewItem.cpp index d3c9fb5..bb15ed4 100644 --- a/src/gui/studio/MidiBankListViewItem.cpp +++ b/src/gui/studio/MidiBankListViewItem.cpp @@ -37,10 +37,10 @@ namespace Rosegarden MidiBankListViewItem::MidiBankListViewItem(DeviceId deviceId, int bankNb, - TQListViewItem* parent, + TQListViewItem* tqparent, TQString name, bool percussion, int msb, int lsb) - : MidiDeviceListViewItem(deviceId, parent, name, percussion, msb, lsb), + : MidiDeviceListViewItem(deviceId, tqparent, name, percussion, msb, lsb), m_percussion(percussion), m_bankNb(bankNb) {} @@ -86,7 +86,7 @@ int MidiBankListViewItem::compare(TQListViewItem *i, int col, bool ascending) co } } - // 'ascending' should be ignored according to Qt docs + // 'ascending' should be ignored according to TQt docs // return thisVal > otherVal ? 1 : diff --git a/src/gui/studio/MidiBankListViewItem.h b/src/gui/studio/MidiBankListViewItem.h index 5d42160..a160374 100644 --- a/src/gui/studio/MidiBankListViewItem.h +++ b/src/gui/studio/MidiBankListViewItem.h @@ -44,7 +44,7 @@ class MidiBankListViewItem : public MidiDeviceListViewItem public: MidiBankListViewItem(DeviceId deviceId, int bankNb, - TQListViewItem* parent, TQString name, + TQListViewItem* tqparent, TQString name, bool percussion, int msb, int lsb); diff --git a/src/gui/studio/MidiDeviceListViewItem.cpp b/src/gui/studio/MidiDeviceListViewItem.cpp index 21a8cda..723e6fa 100644 --- a/src/gui/studio/MidiDeviceListViewItem.cpp +++ b/src/gui/studio/MidiDeviceListViewItem.cpp @@ -35,24 +35,24 @@ namespace Rosegarden { MidiDeviceListViewItem::MidiDeviceListViewItem(DeviceId deviceId, - TQListView* parent, TQString name) - : KListViewItem(parent, name), + TQListView* tqparent, TQString name) + : KListViewItem(tqparent, name), m_deviceId(deviceId) {} MidiDeviceListViewItem::MidiDeviceListViewItem(DeviceId deviceId, - TQListViewItem* parent, TQString name, + TQListViewItem* tqparent, TQString name, bool percussion, int msb, int lsb) - : KListViewItem(parent, name, + : KListViewItem(tqparent, name, TQString(percussion ? i18n("Percussion Bank") : i18n("Bank")), TQString().setNum(msb), TQString().setNum(lsb)), m_deviceId(deviceId) {} MidiDeviceListViewItem::MidiDeviceListViewItem(DeviceId deviceId, - TQListViewItem* parent, TQString name) -: KListViewItem(parent, name, i18n("Key Mapping"), "", ""), + TQListViewItem* tqparent, TQString name) +: KListViewItem(tqparent, name, i18n("Key Mapping"), "", ""), m_deviceId(deviceId) {} @@ -78,7 +78,7 @@ int MidiDeviceListViewItem::compare(TQListViewItem *i, int col, bool ascending) } } - // 'ascending' should be ignored according to Qt docs + // 'ascending' should be ignored according to TQt docs // return (thisVal > otherVal) ? 1 : -1; diff --git a/src/gui/studio/MidiDeviceListViewItem.h b/src/gui/studio/MidiDeviceListViewItem.h index a17a46c..554c62e 100644 --- a/src/gui/studio/MidiDeviceListViewItem.h +++ b/src/gui/studio/MidiDeviceListViewItem.h @@ -41,17 +41,17 @@ class MidiDeviceListViewItem : public KListViewItem public: // Device MidiDeviceListViewItem(DeviceId id, - TQListView* parent, TQString name); + TQListView* tqparent, TQString name); // Bank MidiDeviceListViewItem(DeviceId id, - TQListViewItem* parent, TQString name, + TQListViewItem* tqparent, TQString name, bool percussion, int msb, int lsb); // Key Mapping MidiDeviceListViewItem(DeviceId id, - TQListViewItem* parent, TQString name); + TQListViewItem* tqparent, TQString name); DeviceId getDeviceId() const { return m_deviceId; } diff --git a/src/gui/studio/MidiKeyMapListViewItem.cpp b/src/gui/studio/MidiKeyMapListViewItem.cpp index dd77055..93c1532 100644 --- a/src/gui/studio/MidiKeyMapListViewItem.cpp +++ b/src/gui/studio/MidiKeyMapListViewItem.cpp @@ -36,9 +36,9 @@ namespace Rosegarden { MidiKeyMapListViewItem::MidiKeyMapListViewItem(DeviceId deviceId, - TQListViewItem* parent, + TQListViewItem* tqparent, TQString name) - : MidiDeviceListViewItem(deviceId, parent, name), + : MidiDeviceListViewItem(deviceId, tqparent, name), m_name(name) { setText(1, i18n("Key Mapping")); diff --git a/src/gui/studio/MidiKeyMapListViewItem.h b/src/gui/studio/MidiKeyMapListViewItem.h index d29b0a6..c658e73 100644 --- a/src/gui/studio/MidiKeyMapListViewItem.h +++ b/src/gui/studio/MidiKeyMapListViewItem.h @@ -43,7 +43,7 @@ class MidiKeyMapListViewItem : public MidiDeviceListViewItem { public: MidiKeyMapListViewItem(DeviceId deviceId, - TQListViewItem* parent, TQString name); + TQListViewItem* tqparent, TQString name); virtual int compare(TQListViewItem *i, int col, bool ascending) const; diff --git a/src/gui/studio/MidiKeyMappingEditor.cpp b/src/gui/studio/MidiKeyMappingEditor.cpp index a9e347c..93fd33f 100644 --- a/src/gui/studio/MidiKeyMappingEditor.cpp +++ b/src/gui/studio/MidiKeyMappingEditor.cpp @@ -51,11 +51,11 @@ namespace Rosegarden { MidiKeyMappingEditor::MidiKeyMappingEditor(BankEditorDialog* bankEditor, - TQWidget* parent, + TQWidget* tqparent, const char* name) : NameSetEditor(bankEditor, i18n("Key Mapping details"), - parent, name, i18n("Pitches"), false), + tqparent, name, i18n("Pitches"), false), m_device(0) { TQWidget *additionalWidget = makeAdditionalWidget(m_mainFrame); @@ -65,7 +65,7 @@ MidiKeyMappingEditor::MidiKeyMappingEditor(BankEditorDialog* bankEditor, } TQWidget * -MidiKeyMappingEditor::makeAdditionalWidget(TQWidget *parent) +MidiKeyMappingEditor::makeAdditionalWidget(TQWidget *tqparent) { return 0; } @@ -162,7 +162,7 @@ MidiKeyMappingEditor::slotNameChanged(const TQString& name) return ; } - TQString senderName = sender()->name(); + TQString senderName = TQT_TQOBJECT_CONST(sender())->name(); // Adjust value back to zero rated // diff --git a/src/gui/studio/MidiKeyMappingEditor.h b/src/gui/studio/MidiKeyMappingEditor.h index 563501e..4f10ea6 100644 --- a/src/gui/studio/MidiKeyMappingEditor.h +++ b/src/gui/studio/MidiKeyMappingEditor.h @@ -46,10 +46,11 @@ class BankEditorDialog; class MidiKeyMappingEditor : public NameSetEditor { Q_OBJECT + TQ_OBJECT public: MidiKeyMappingEditor(BankEditorDialog *bankEditor, - TQWidget *parent, + TQWidget *tqparent, const char *name = 0); void clearAll(); @@ -62,7 +63,7 @@ public slots: virtual void slotEntryButtonPressed(); protected: - virtual TQWidget *makeAdditionalWidget(TQWidget *parent); + virtual TQWidget *makeAdditionalWidget(TQWidget *tqparent); void blockAllSignals(bool block); //--------------- Data members --------------------------------- diff --git a/src/gui/studio/MidiMixerVUMeter.cpp b/src/gui/studio/MidiMixerVUMeter.cpp index b882dec..8f1e1e5 100644 --- a/src/gui/studio/MidiMixerVUMeter.cpp +++ b/src/gui/studio/MidiMixerVUMeter.cpp @@ -32,14 +32,14 @@ namespace Rosegarden { -MidiMixerVUMeter::MidiMixerVUMeter(TQWidget *parent, +MidiMixerVUMeter::MidiMixerVUMeter(TQWidget *tqparent, VUMeterType type, int width, int height, const char *name): - VUMeter(parent, type, false, false, width, height, VUMeter::Vertical, name) + VUMeter(tqparent, type, false, false, width, height, VUMeter::Vertical, name) { - setAlignment(AlignCenter); + tqsetAlignment(AlignCenter); } void diff --git a/src/gui/studio/MidiMixerVUMeter.h b/src/gui/studio/MidiMixerVUMeter.h index 70622b2..4af8e81 100644 --- a/src/gui/studio/MidiMixerVUMeter.h +++ b/src/gui/studio/MidiMixerVUMeter.h @@ -40,7 +40,7 @@ namespace Rosegarden class MidiMixerVUMeter : public VUMeter { public: - MidiMixerVUMeter(TQWidget *parent = 0, + MidiMixerVUMeter(TQWidget *tqparent = 0, VUMeterType type = Plain, int width = 0, int height = 0, diff --git a/src/gui/studio/MidiMixerWindow.cpp b/src/gui/studio/MidiMixerWindow.cpp index 047ba39..cb65b09 100644 --- a/src/gui/studio/MidiMixerWindow.cpp +++ b/src/gui/studio/MidiMixerWindow.cpp @@ -63,66 +63,66 @@ namespace Rosegarden { -MidiMixerWindow::MidiMixerWindow(TQWidget *parent, +MidiMixerWindow::MidiMixerWindow(TQWidget *tqparent, RosegardenGUIDoc *document): - MixerWindow(parent, document), + MixerWindow(tqparent, document), m_tabFrame(0) { // Initial setup // setupTabs(); - KStdAction::close(this, + KStdAction::close(TQT_TQOBJECT(this), TQT_SLOT(slotClose()), actionCollection()); - TQIconSet icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + TQIconSet icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-play"))); - KAction *play = new KAction(i18n("&Play"), icon, Key_Enter, this, + KAction *play = new KAction(i18n("&Play"), icon, Key_Enter, TQT_TQOBJECT(this), TQT_SIGNAL(play()), actionCollection(), "play"); // Alternative shortcut for Play KShortcut playShortcut = play->shortcut(); playShortcut.append( KKey(Key_Return + CTRL) ); play->setShortcut(playShortcut); - icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-stop"))); - new KAction(i18n("&Stop"), icon, Key_Insert, this, + new KAction(i18n("&Stop"), icon, Key_Insert, TQT_TQOBJECT(this), TQT_SIGNAL(stop()), actionCollection(), "stop"); - icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-rewind"))); - new KAction(i18n("Re&wind"), icon, Key_End, this, + new KAction(i18n("Re&wind"), icon, Key_End, TQT_TQOBJECT(this), TQT_SIGNAL(rewindPlayback()), actionCollection(), "playback_pointer_back_bar"); - icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-ffwd"))); - new KAction(i18n("&Fast Forward"), icon, Key_PageDown, this, + new KAction(i18n("&Fast Forward"), icon, Key_PageDown, TQT_TQOBJECT(this), TQT_SIGNAL(fastForwardPlayback()), actionCollection(), "playback_pointer_forward_bar"); - icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-rewind-end"))); - new KAction(i18n("Rewind to &Beginning"), icon, 0, this, + new KAction(i18n("Rewind to &Beginning"), icon, 0, TQT_TQOBJECT(this), TQT_SIGNAL(rewindPlaybackToBeginning()), actionCollection(), "playback_pointer_start"); - icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-ffwd-end"))); - new KAction(i18n("Fast Forward to &End"), icon, 0, this, + new KAction(i18n("Fast Forward to &End"), icon, 0, TQT_TQOBJECT(this), TQT_SIGNAL(fastForwardPlaybackToEnd()), actionCollection(), "playback_pointer_end"); - icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-record"))); - new KAction(i18n("&Record"), icon, 0, this, + new KAction(i18n("&Record"), icon, 0, TQT_TQOBJECT(this), TQT_SIGNAL(record()), actionCollection(), "record"); - icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-panic"))); - new KAction(i18n("Panic"), icon, Key_P + CTRL + ALT, this, + new KAction(i18n("Panic"), icon, Key_P + CTRL + ALT, TQT_TQOBJECT(this), TQT_SIGNAL(panic()), actionCollection(), "panic"); @@ -171,39 +171,39 @@ MidiMixerWindow::setupTabs() m_tabFrame->setFrameStyle(TQFrame::TabWidgetPanel); m_tabFrame->setMargin(10); - TQGridLayout *mainLayout = new QGridLayout + TQGridLayout *mainLayout = new TQGridLayout (m_tabFrame, instruments.size() + 4, controls.size() + 4, 5); // MIDI Mixer label // //TQLabel *label = new TQLabel(TQString("%1 %2"). //arg(strtoqstr(dev->getName())) - //.arg(i18n("MIDI Mixer")), m_tabFrame); + //.tqarg(i18n("MIDI Mixer")), m_tabFrame); TQLabel *label = new TQLabel("", m_tabFrame); - mainLayout->addMultiCellWidget(label, 0, 0, 0, 16, Qt::AlignCenter); + mainLayout->addMultiCellWidget(label, 0, 0, 0, 16, TQt::AlignCenter); // control labels for (unsigned int i = 0; i < controls.size(); ++i) { label = new TQLabel(strtoqstr(controls[i].getName()), m_tabFrame); - mainLayout->addWidget(label, i + 1, 0, Qt::AlignCenter); + mainLayout->addWidget(label, i + 1, 0, TQt::AlignCenter); } // meter label // //label = new TQLabel(i18n("Meter"), m_tabFrame); //mainLayout->addWidget(label, - //controls.size() + 1, 0, Qt::AlignCenter); + //controls.size() + 1, 0, TQt::AlignCenter); // volume label label = new TQLabel(i18n("Volume"), m_tabFrame); mainLayout->addWidget(label, controls.size() + 2, 0, - Qt::AlignCenter); + TQt::AlignCenter); // instrument label label = new TQLabel(i18n("Instrument"), m_tabFrame); mainLayout->addWidget(label, controls.size() + 3, 0, - Qt::AlignCenter); + TQt::AlignCenter); int posCount = 1; int firstInstrument = -1; @@ -223,7 +223,7 @@ MidiMixerWindow::setupTabs() // Add the controls // for (unsigned int i = 0; i < controls.size(); ++i) { - TQColor knobColour = Qt::white; + TQColor knobColour = TQt::white; if (controls[i].getColourIndex() > 0) { Colour c = @@ -252,7 +252,7 @@ MidiMixerWindow::setupTabs() this, TQT_SLOT(slotControllerChanged(float))); mainLayout->addWidget(controller, i + 1, posCount, - Qt::AlignCenter); + TQt::AlignCenter); // Store the rotary // @@ -267,7 +267,7 @@ MidiMixerWindow::setupTabs() new MidiMixerVUMeter(m_tabFrame, VUMeter::FixedHeightVisiblePeakHold, 6, 30); mainLayout->addWidget(meter, controls.size() + 1, - posCount, Qt::AlignCenter); + posCount, TQt::AlignCenter); m_faders[faderCount]->m_vuMeter = meter; // Volume fader @@ -275,7 +275,7 @@ MidiMixerWindow::setupTabs() Fader *fader = new Fader(0, 127, 100, 20, 80, m_tabFrame); mainLayout->addWidget(fader, controls.size() + 2, - posCount, Qt::AlignCenter); + posCount, TQt::AlignCenter); m_faders[faderCount]->m_volumeFader = fader; //fader->setFader(float((*iIt)->getVolume())); @@ -286,7 +286,7 @@ MidiMixerWindow::setupTabs() m_tabFrame, "idLabel"); mainLayout->addWidget(idLabel, controls.size() + 3, - posCount, Qt::AlignCenter); + posCount, TQt::AlignCenter); // store id in struct m_faders[faderCount]->m_id = (*iIt)->getId(); @@ -306,8 +306,8 @@ MidiMixerWindow::setupTabs() faderCount++; } - TQString name = TQString("%1 (%2)").arg(strtoqstr(dev->getName())) - .arg(deviceCount++); + TQString name = TQString("%1 (%2)").tqarg(strtoqstr(dev->getName())) + .tqarg(deviceCount++); addTab(m_tabFrame, name); } @@ -323,11 +323,11 @@ MidiMixerWindow::addTab(TQWidget *tab, const TQString &title) void MidiMixerWindow::slotFaderLevelChanged(float value) { - const TQObject *s = sender(); + const TQObject *s = TQT_TQOBJECT_CONST(const_cast<const TQT_BASE_OBJECT_NAME*>(sender())); for (FaderVector::const_iterator it = m_faders.begin(); it != m_faders.end(); ++it) { - if ((*it)->m_volumeFader == s) { + if (TQT_BASE_OBJECT((*it)->m_volumeFader) == TQT_BASE_OBJECT_CONST(s)) { Instrument *instr = m_studio-> getInstrumentById((*it)->m_id); @@ -376,12 +376,12 @@ MidiMixerWindow::slotFaderLevelChanged(float value) void MidiMixerWindow::slotControllerChanged(float value) { - const TQObject *s = sender(); + const TQObject *s = TQT_TQOBJECT_CONST(const_cast<const TQT_BASE_OBJECT_NAME*>(sender())); unsigned int i = 0, j = 0; for (i = 0; i < m_faders.size(); ++i) { for (j = 0; j < m_faders[i]->m_controllerRotaries.size(); ++j) { - if (m_faders[i]->m_controllerRotaries[j].second == s) + if (TQT_BASE_OBJECT(m_faders[i]->m_controllerRotaries[j].second) == TQT_BASE_OBJECT_CONST(s)) break; } diff --git a/src/gui/studio/MidiMixerWindow.h b/src/gui/studio/MidiMixerWindow.h index 28ab9e3..8b98364 100644 --- a/src/gui/studio/MidiMixerWindow.h +++ b/src/gui/studio/MidiMixerWindow.h @@ -51,9 +51,10 @@ class Fader; class MidiMixerWindow : public MixerWindow { Q_OBJECT + TQ_OBJECT public: - MidiMixerWindow(TQWidget *parent, RosegardenGUIDoc *document); + MidiMixerWindow(TQWidget *tqparent, RosegardenGUIDoc *document); /** * Setup the tabs on the Mixer according to the Studio diff --git a/src/gui/studio/MidiProgramsEditor.cpp b/src/gui/studio/MidiProgramsEditor.cpp index e69b1a9..08c0114 100644 --- a/src/gui/studio/MidiProgramsEditor.cpp +++ b/src/gui/studio/MidiProgramsEditor.cpp @@ -60,11 +60,11 @@ namespace Rosegarden { MidiProgramsEditor::MidiProgramsEditor(BankEditorDialog* bankEditor, - TQWidget* parent, + TQWidget* tqparent, const char* name) : NameSetEditor(bankEditor, i18n("Bank and Program details"), - parent, name, i18n("Programs"), true), + tqparent, name, i18n("Programs"), true), m_device(0), m_bankList(bankEditor->getBankList()), m_programList(bankEditor->getProgramList()), @@ -77,9 +77,9 @@ MidiProgramsEditor::MidiProgramsEditor(BankEditorDialog* bankEditor, } TQWidget * -MidiProgramsEditor::makeAdditionalWidget(TQWidget *parent) +MidiProgramsEditor::makeAdditionalWidget(TQWidget *tqparent) { - TQFrame *frame = new TQFrame(parent); + TQFrame *frame = new TQFrame(tqparent); m_percussion = new TQCheckBox(frame); m_msb = new TQSpinBox(frame); @@ -251,7 +251,7 @@ MidiProgramsEditor::populate(TQListViewItem* item) getEntryButton(i)->setPixmap(keyPixmap); TQToolTip::add (getEntryButton(i), - i18n("Key Mapping: %1").arg( + i18n("Key Mapping: %1").tqarg( strtoqstr(m_device->getKeyMappingForProgram(*it)->getName()))); } @@ -391,7 +391,7 @@ MidiProgramsEditor::slotNameChanged(const TQString& programName) return ; } - TQString senderName = sender()->name(); + TQString senderName = TQT_TQOBJECT_CONST(sender())->name(); // Adjust value back to zero rated // @@ -444,9 +444,9 @@ MidiProgramsEditor::slotNameChanged(const TQString& programName) void MidiProgramsEditor::slotEntryButtonPressed() { - TQPushButton* button = dynamic_cast<TQPushButton*>(const_cast<TQObject *>(sender())); + TQPushButton* button = dynamic_cast<TQPushButton*>(TQT_TQWIDGET(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))); if (!button) { - RG_DEBUG << "MidiProgramsEditor::slotEntryButtonPressed() : %%% ERROR - signal sender is not a QPushButton\n"; + RG_DEBUG << "MidiProgramsEditor::slotEntryButtonPressed() : %%% ERROR - signal sender is not a TQPushButton\n"; return ; } @@ -538,7 +538,7 @@ MidiProgramsEditor::slotEntryMenuItemSelected(int i) btn->setPixmap(TQPixmap(file)); } TQToolTip::add - (btn, i18n("Key Mapping: %1").arg(strtoqstr(newMapping))); + (btn, i18n("Key Mapping: %1").tqarg(strtoqstr(newMapping))); } btn->setEnabled(haveKeyMappings); } diff --git a/src/gui/studio/MidiProgramsEditor.h b/src/gui/studio/MidiProgramsEditor.h index 64375cb..a71ca5a 100644 --- a/src/gui/studio/MidiProgramsEditor.h +++ b/src/gui/studio/MidiProgramsEditor.h @@ -49,9 +49,10 @@ class BankEditorDialog; class MidiProgramsEditor : public NameSetEditor { Q_OBJECT + TQ_OBJECT public: MidiProgramsEditor(BankEditorDialog *bankEditor, - TQWidget *parent, + TQWidget *tqparent, const char *name = 0); void clearAll(); @@ -93,7 +94,7 @@ protected: void setBankName(const TQString& s); - virtual TQWidget *makeAdditionalWidget(TQWidget *parent); + virtual TQWidget *makeAdditionalWidget(TQWidget *tqparent); void blockAllSignals(bool block); diff --git a/src/gui/studio/MixerWindow.cpp b/src/gui/studio/MixerWindow.cpp index d0c233a..e27299d 100644 --- a/src/gui/studio/MixerWindow.cpp +++ b/src/gui/studio/MixerWindow.cpp @@ -37,9 +37,9 @@ namespace Rosegarden { -MixerWindow::MixerWindow(TQWidget *parent, +MixerWindow::MixerWindow(TQWidget *tqparent, RosegardenGUIDoc *document) : - KMainWindow(parent, "mixerwindow"), + KMainWindow(tqparent, "mixerwindow"), m_document(document), m_studio(&document->getStudio()), m_currentId(0) diff --git a/src/gui/studio/MixerWindow.h b/src/gui/studio/MixerWindow.h index 94d8bee..f4ff441 100644 --- a/src/gui/studio/MixerWindow.h +++ b/src/gui/studio/MixerWindow.h @@ -45,9 +45,10 @@ class RosegardenGUIDoc; class MixerWindow: public KMainWindow { Q_OBJECT + TQ_OBJECT public: - MixerWindow(TQWidget *parent, RosegardenGUIDoc *document); + MixerWindow(TQWidget *tqparent, RosegardenGUIDoc *document); TQAccel* getAccelerators() { return m_accelerators; } signals: diff --git a/src/gui/studio/NameSetEditor.cpp b/src/gui/studio/NameSetEditor.cpp index 6fa9bbe..396112d 100644 --- a/src/gui/studio/NameSetEditor.cpp +++ b/src/gui/studio/NameSetEditor.cpp @@ -48,11 +48,11 @@ namespace Rosegarden NameSetEditor::NameSetEditor(BankEditorDialog* bankEditor, TQString title, - TQWidget* parent, + TQWidget* tqparent, const char* name, TQString headingPrefix, bool showEntryButtons) - : TQVGroupBox(title, parent, name), + : TQVGroupBox(title, tqparent, name), m_bankEditor(bankEditor), m_mainFrame(new TQFrame(this)) { @@ -99,7 +99,7 @@ NameSetEditor::NameSetEditor(BankEditorDialog* bankEditor, for (unsigned int row = 0; row < 128 / (tabs*cols); ++row) { numBox = new TQHBox(v); - TQString numberText = TQString("%1").arg(labelId + 1); + TQString numberText = TQString("%1").tqarg(labelId + 1); if (tab == 0 && col == 0 && row == 0) { // Initial label; button to adjust whether labels start at 0 or 1 @@ -111,7 +111,7 @@ NameSetEditor::NameSetEditor(BankEditorDialog* bankEditor, } else { TQLabel *label = new TQLabel(numberText, numBox); label->setFixedWidth(40); - label->setAlignment(AlignCenter); + label->tqsetAlignment(AlignCenter); m_labels.push_back(label); } @@ -178,11 +178,11 @@ NameSetEditor::slotToggleInitialLabel() else index = 0; - m_initialLabel->setText(TQString("%1").arg(index++)); + m_initialLabel->setText(TQString("%1").tqarg(index++)); for (std::vector<TQLabel*>::iterator it( m_labels.begin() ); it != m_labels.end(); ++it) { - (*it)->setText(TQString("%1").arg(index++)); + (*it)->setText(TQString("%1").tqarg(index++)); } } diff --git a/src/gui/studio/NameSetEditor.h b/src/gui/studio/NameSetEditor.h index 8fd33ef..cef94a2 100644 --- a/src/gui/studio/NameSetEditor.h +++ b/src/gui/studio/NameSetEditor.h @@ -47,9 +47,10 @@ namespace Rosegarden class BankEditorDialog; -class NameSetEditor : public QVGroupBox +class NameSetEditor : public TQVGroupBox { Q_OBJECT + TQ_OBJECT public: virtual void clearAll() = 0; @@ -64,7 +65,7 @@ public slots: protected: NameSetEditor(BankEditorDialog *bankEditor, TQString title, - TQWidget *parent, + TQWidget *tqparent, const char *name, TQString headingPrefix = "", bool showEntryButtons = false); diff --git a/src/gui/studio/RemapInstrumentDialog.cpp b/src/gui/studio/RemapInstrumentDialog.cpp index a957650..b1aff98 100644 --- a/src/gui/studio/RemapInstrumentDialog.cpp +++ b/src/gui/studio/RemapInstrumentDialog.cpp @@ -50,9 +50,9 @@ namespace Rosegarden { -RemapInstrumentDialog::RemapInstrumentDialog(TQWidget *parent, +RemapInstrumentDialog::RemapInstrumentDialog(TQWidget *tqparent, RosegardenGUIDoc *doc): - KDialogBase(parent, "", true, i18n("Remap Instrument assigments..."), + KDialogBase(tqparent, "", true, i18n("Remap Instrument assigments..."), Ok | Apply | Cancel), m_doc(doc) { diff --git a/src/gui/studio/RemapInstrumentDialog.h b/src/gui/studio/RemapInstrumentDialog.h index c0cae3a..d5999f8 100644 --- a/src/gui/studio/RemapInstrumentDialog.h +++ b/src/gui/studio/RemapInstrumentDialog.h @@ -48,8 +48,9 @@ class MultiViewCommandHistory; class RemapInstrumentDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - RemapInstrumentDialog(TQWidget *parent, + RemapInstrumentDialog(TQWidget *tqparent, RosegardenGUIDoc *doc); void populateCombo(int id); diff --git a/src/gui/studio/StudioControl.cpp b/src/gui/studio/StudioControl.cpp index 6a4d643..04a838c 100644 --- a/src/gui/studio/StudioControl.cpp +++ b/src/gui/studio/StudioControl.cpp @@ -60,7 +60,7 @@ streamOut << (int)type; if (!rgapp->sequencerCall("createMappedObject(int)", replyType, replyData, data)) { - SEQMAN_DEBUG << "createStudioObject - " + SETQMAN_DEBUG << "createStudioObject - " << "failed to contact Rosegarden sequencer" << endl; } else @@ -87,7 +87,7 @@ StudioControl::destroyStudioObject(MappedObjectId id) if (!rgapp->sequencerCall("destroyMappedObject(int)", replyType, replyData, data)) { - SEQMAN_DEBUG << "destroyStudioObject - " + SETQMAN_DEBUG << "destroyStudioObject - " << "failed to contact Rosegarden sequencer" << endl; } else { @@ -119,7 +119,7 @@ StudioControl::getStudioObjectProperty(MappedObjectId id, if (!rgapp->sequencerCall("getPropertyList(int, TQString)", replyType, replyData, data)) { - SEQMAN_DEBUG << "getStudioObjectProperty - " + SETQMAN_DEBUG << "getStudioObjectProperty - " << "failed to contact Rosegarden sequencer" << endl; } else { @@ -224,7 +224,7 @@ StudioControl::getStudioObjectByType(MappedObject::MappedObjectType type) if (!rgapp->sequencerCall("getMappedObjectId(int)", replyType, replyData, data)) { - SEQMAN_DEBUG << "getStudioObjectByType - " + SETQMAN_DEBUG << "getStudioObjectByType - " << "failed to contact Rosegarden sequencer" << endl; } else { @@ -271,7 +271,7 @@ StudioControl::getStudioPluginPort(MappedObjectId pluginId, if (!rgapp->sequencerCall("getMappedPort(int, unsigned long int)", replyType, replyData, data)) { - SEQMAN_DEBUG << "getStudioPluginPort - " + SETQMAN_DEBUG << "getStudioPluginPort - " << "failed to contact Rosegarden sequencer" << endl; } else { @@ -293,7 +293,7 @@ StudioControl::getPluginInformation() if (!rgapp->sequencerCall("getPluginInformation()", replyType, replyData, data)) { - SEQMAN_DEBUG << "getPluginInformation - " + SETQMAN_DEBUG << "getPluginInformation - " << "failed to contact Rosegarden sequencer" << endl; } else { @@ -304,7 +304,7 @@ StudioControl::getPluginInformation() return list; } -QString +TQString StudioControl::getPluginProgram(MappedObjectId id, int bank, int program) { TQByteArray data; @@ -320,7 +320,7 @@ StudioControl::getPluginProgram(MappedObjectId id, int bank, int program) if (!rgapp->sequencerCall("getPluginProgram(int, int, int)", replyType, replyData, data)) { - SEQMAN_DEBUG << "getPluginProgram - " + SETQMAN_DEBUG << "getPluginProgram - " << "failed to contact Rosegarden sequencer" << endl; } else { @@ -346,7 +346,7 @@ StudioControl::getPluginProgram(MappedObjectId id, TQString name) if (!rgapp->sequencerCall("getPluginProgram(int, TQString)", replyType, replyData, data)) { - SEQMAN_DEBUG << "getPluginProgram - " + SETQMAN_DEBUG << "getPluginProgram - " << "failed to contact Rosegarden sequencer" << endl; } else { @@ -370,7 +370,7 @@ StudioControl::connectStudioObjects(MappedObjectId id1, streamOut << (int)id2; if (!rgapp->sequencerSend("connectMappedObjects(int, int)", data)) { - SEQMAN_DEBUG << "connectStudioObjects - " + SETQMAN_DEBUG << "connectStudioObjects - " << "failed to contact Rosegarden sequencer" << endl; } @@ -391,7 +391,7 @@ StudioControl::disconnectStudioObjects(MappedObjectId id1, streamOut << (int)id2; if (!rgapp->sequencerSend("disconnectMappedObjects(int, int)", data)) { - SEQMAN_DEBUG << "disconnectStudioObjects - " + SETQMAN_DEBUG << "disconnectStudioObjects - " << "failed to contact Rosegarden sequencer" << endl; } @@ -410,7 +410,7 @@ StudioControl::disconnectStudioObject(MappedObjectId id) streamOut << (int)id; if (!rgapp->sequencerSend("disconnectMappedObject(int)", data)) { - SEQMAN_DEBUG << "disconnectStudioObject - " + SETQMAN_DEBUG << "disconnectStudioObject - " << "failed to contact Rosegarden sequencer" << endl; } diff --git a/src/gui/studio/SynthPluginManagerDialog.cpp b/src/gui/studio/SynthPluginManagerDialog.cpp index 037fa3a..9530fad 100644 --- a/src/gui/studio/SynthPluginManagerDialog.cpp +++ b/src/gui/studio/SynthPluginManagerDialog.cpp @@ -54,13 +54,13 @@ namespace Rosegarden { -SynthPluginManagerDialog::SynthPluginManagerDialog(TQWidget *parent, +SynthPluginManagerDialog::SynthPluginManagerDialog(TQWidget *tqparent, RosegardenGUIDoc *doc #ifdef HAVE_LIBLO , AudioPluginOSCGUIManager *guiManager #endif ) : - KMainWindow(parent, "synthpluginmanagerdialog"), + KMainWindow(tqparent, "synthpluginmanagerdialog"), m_document(doc), m_studio(&doc->getStudio()), m_pluginManager(doc->getPluginManager()) @@ -75,7 +75,7 @@ SynthPluginManagerDialog::SynthPluginManagerDialog(TQWidget *parent, TQVBoxLayout *mainLayout = new TQVBoxLayout(mainBox, 10, 10); - TQGroupBox *groupBox = new TQGroupBox(1, Horizontal, i18n("Synth plugins"), mainBox); + TQGroupBox *groupBox = new TQGroupBox(1, Qt::Horizontal, i18n("Synth plugins"), mainBox); mainLayout->addWidget(groupBox); TQFrame *pluginFrame = new TQFrame(groupBox); @@ -105,7 +105,7 @@ SynthPluginManagerDialog::SynthPluginManagerDialog(TQWidget *parent, // pluginLayout->addWidget(new TQLabel(instrument->getPresentationName().c_str(), // pluginFrame), i, 0); - pluginLayout->addWidget(new TQLabel(TQString("%1").arg(i + 1), + pluginLayout->addWidget(new TQLabel(TQString("%1").tqarg(i + 1), pluginFrame), i, 0); AudioPluginInstance *plugin = instrument->getPlugin @@ -161,17 +161,17 @@ SynthPluginManagerDialog::SynthPluginManagerDialog(TQWidget *parent, TQFrame* btnBox = new TQFrame(mainBox); - btnBox->setSizePolicy( + btnBox->tqsetSizePolicy( TQSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed)); TQPushButton *closeButton = new TQPushButton(i18n("Close"), btnBox); - TQHBoxLayout* layout = new TQHBoxLayout(btnBox, 0, 10); - layout->addStretch(10); - layout->addWidget(closeButton); - layout->addSpacing(5); + TQHBoxLayout* tqlayout = new TQHBoxLayout(btnBox, 0, 10); + tqlayout->addStretch(10); + tqlayout->addWidget(closeButton); + tqlayout->addSpacing(5); - KAction* close = KStdAction::close(this, + KAction* close = KStdAction::close(TQT_TQOBJECT(this), TQT_SLOT(slotClose()), actionCollection()); @@ -233,12 +233,12 @@ SynthPluginManagerDialog::SynthPluginManagerDialog(TQWidget *parent, void SynthPluginManagerDialog::slotGUIButtonClicked() { - const TQObject *s = sender(); + const TQObject *s = TQT_TQOBJECT_CONST(const_cast<const TQT_BASE_OBJECT_NAME*>(sender())); int instrumentNo = -1; for (unsigned int i = 0; i < m_guiButtons.size(); ++i) { - if (s == m_guiButtons[i]) + if (TQT_BASE_OBJECT_CONST(s) == TQT_BASE_OBJECT(m_guiButtons[i])) instrumentNo = i; } @@ -255,12 +255,12 @@ SynthPluginManagerDialog::SynthPluginManagerDialog(TQWidget *parent, void SynthPluginManagerDialog::slotControlsButtonClicked() { - const TQObject *s = sender(); + const TQObject *s = TQT_TQOBJECT_CONST(const_cast<const TQT_BASE_OBJECT_NAME*>(sender())); int instrumentNo = -1; for (unsigned int i = 0; i < m_controlsButtons.size(); ++i) { - if (s == m_controlsButtons[i]) + if (TQT_BASE_OBJECT_CONST(s) == TQT_BASE_OBJECT(m_controlsButtons[i])) instrumentNo = i; } @@ -277,7 +277,7 @@ SynthPluginManagerDialog::SynthPluginManagerDialog(TQWidget *parent, void SynthPluginManagerDialog::slotPluginChanged(int index) { - const TQObject *s = sender(); + const TQObject *s = TQT_TQOBJECT_CONST(const_cast<const TQT_BASE_OBJECT_NAME*>(sender())); RG_DEBUG << "SynthPluginManagerDialog::slotPluginChanged(" << index << ")" << endl; @@ -285,7 +285,7 @@ SynthPluginManagerDialog::SynthPluginManagerDialog(TQWidget *parent, int instrumentNo = -1; for (unsigned int i = 0; i < m_synthCombos.size(); ++i) { - if (s == m_synthCombos[i]) + if (TQT_BASE_OBJECT_CONST(s) == TQT_BASE_OBJECT(m_synthCombos[i])) instrumentNo = i; } @@ -316,7 +316,7 @@ SynthPluginManagerDialog::SynthPluginManagerDialog(TQWidget *parent, if (plugin) { RG_DEBUG << "plugin is " << plugin->getIdentifier() << endl; - pluginInstance->setIdentifier(plugin->getIdentifier().data()); + pluginInstance->setIdentifier(plugin->getIdentifier().ascii()); // set ports to defaults diff --git a/src/gui/studio/SynthPluginManagerDialog.h b/src/gui/studio/SynthPluginManagerDialog.h index f58c07c..d637e7a 100644 --- a/src/gui/studio/SynthPluginManagerDialog.h +++ b/src/gui/studio/SynthPluginManagerDialog.h @@ -49,9 +49,10 @@ class AudioPluginManager; class SynthPluginManagerDialog : public KMainWindow { Q_OBJECT + TQ_OBJECT public: - SynthPluginManagerDialog(TQWidget *parent, + SynthPluginManagerDialog(TQWidget *tqparent, RosegardenGUIDoc *doc #ifdef HAVE_LIBLO , AudioPluginOSCGUIManager *guiManager diff --git a/src/gui/studio/TimerCallbackAssistant.cpp b/src/gui/studio/TimerCallbackAssistant.cpp index 7b2bc76..23534d3 100644 --- a/src/gui/studio/TimerCallbackAssistant.cpp +++ b/src/gui/studio/TimerCallbackAssistant.cpp @@ -44,7 +44,7 @@ TimerCallbackAssistant::TimerCallbackAssistant(int ms, void (*callback)(void *da TimerCallbackAssistant::~TimerCallbackAssistant() { - // nothing -- the TQTimer is deleted automatically by its parent TQObject (me) + // nothing -- the TQTimer is deleted automatically by its tqparent TQObject (me) } void diff --git a/src/gui/studio/TimerCallbackAssistant.h b/src/gui/studio/TimerCallbackAssistant.h index 836db90..3048f20 100644 --- a/src/gui/studio/TimerCallbackAssistant.h +++ b/src/gui/studio/TimerCallbackAssistant.h @@ -39,9 +39,10 @@ namespace Rosegarden AudioPluginOSCGUI cannot be a TQObject because it's only conditionally compiled. */ -class TimerCallbackAssistant : public QObject +class TimerCallbackAssistant : public TQObject { Q_OBJECT + TQ_OBJECT public: TimerCallbackAssistant(int ms, void (*callback)(void *data), void *data); diff --git a/src/gui/ui/RosegardenTransport.ui b/src/gui/ui/RosegardenTransport.ui index 347b30b..3aac5be 100644 --- a/src/gui/ui/RosegardenTransport.ui +++ b/src/gui/ui/RosegardenTransport.ui @@ -1,10 +1,10 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>RosegardenTransport</class> -<widget class="QFrame"> +<widget class="TQFrame"> <property name="name"> <cstring>RosegardenTransport</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>0</x> <y>0</y> @@ -21,11 +21,11 @@ <property name="frameShadow"> <enum>Plain</enum> </property> - <widget class="QFrame"> + <widget class="TQFrame"> <property name="name"> <cstring>RecordingFrame</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>0</x> <y>87</y> @@ -39,11 +39,11 @@ <property name="frameShadow"> <enum>Raised</enum> </property> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>PanelCloseButton</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>3</x> <y>4</y> @@ -70,11 +70,11 @@ <string>Hide additional controls</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>PanicButton</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>174</x> <y>4</y> @@ -110,11 +110,11 @@ <string>Resets all MIDI devices if you've got stuck notes</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>MetronomeButton</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>217</x> <y>4</y> @@ -150,11 +150,11 @@ <string>Provides a metronome click for you to play along with</string> </property> </widget> - <widget class="QFrame"> + <widget class="TQFrame"> <property name="name"> <cstring>MidiEventFrame</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>31</x> <y>7</y> @@ -421,11 +421,11 @@ <property name="whatsThis" stdset="0"> <string>Shows MIDI activity in and out of Rosegarden</string> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>InLabel</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>18</x> <y>1</y> @@ -693,11 +693,11 @@ <string>IN</string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>OutLabel</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>8</x> <y>15</y> @@ -965,11 +965,11 @@ <string>OUT</string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>InDisplay</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>40</x> <y>1</y> @@ -1237,11 +1237,11 @@ <string>NO EVENTS</string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>OutDisplay</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>40</x> <y>15</y> @@ -1510,11 +1510,11 @@ </property> </widget> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>RecordButton</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>370</x> <y>4</y> @@ -1544,11 +1544,11 @@ <string>Record either MIDI or audio</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>LoopButton</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>320</x> <y>4</y> @@ -1584,11 +1584,11 @@ <string>Turn on and off the loop markers (if set)</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>SoloButton</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>260</x> <y>4</y> @@ -1624,11 +1624,11 @@ <string>Mutes all but the currently selected track</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>SetStartLPButton</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>303</x> <y>4</y> @@ -1646,11 +1646,11 @@ <string>Start loop or range here</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>SetStopLPButton</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>353</x> <y>4</y> @@ -1669,11 +1669,11 @@ </property> </widget> </widget> - <widget class="QFrame"> + <widget class="TQFrame"> <property name="name"> <cstring>MainFrame</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>0</x> <y>0</y> @@ -1687,11 +1687,11 @@ <property name="frameShadow"> <enum>Raised</enum> </property> - <widget class="QFrame"> + <widget class="TQFrame"> <property name="name"> <cstring>LCDBoxFrame</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>31</x> <y>7</y> @@ -1959,7 +1959,7 @@ <property name="name"> <cstring>UnitHoursPixmap</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>39</x> <y>6</y> @@ -1981,7 +1981,7 @@ <property name="name"> <cstring>HourColonPixmap</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>59</x> <y>6</y> @@ -2003,7 +2003,7 @@ <property name="name"> <cstring>TenMinutesPixmap</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>64</x> <y>6</y> @@ -2025,7 +2025,7 @@ <property name="name"> <cstring>UnitMinutesPixmap</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>84</x> <y>6</y> @@ -2047,7 +2047,7 @@ <property name="name"> <cstring>TenSecondsPixmap</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>109</x> <y>6</y> @@ -2069,7 +2069,7 @@ <property name="name"> <cstring>UnitSecondsPixmap</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>129</x> <y>6</y> @@ -2091,7 +2091,7 @@ <property name="name"> <cstring>HundredthsPixmap</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>169</x> <y>16</y> @@ -2113,7 +2113,7 @@ <property name="name"> <cstring>NegativePixmap</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>2</x> <y>6</y> @@ -2135,7 +2135,7 @@ <property name="name"> <cstring>TenHoursPixmap</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>19</x> <y>6</y> @@ -2153,11 +2153,11 @@ <cstring></cstring> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TimeSigLabel</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>6</x> <y>51</y> @@ -2425,11 +2425,11 @@ <string>SIG</string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>DivisionLabel</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>66</x> <y>51</y> @@ -2697,11 +2697,11 @@ <string>DIV</string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>DivisionDisplay</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>86</x> <y>51</y> @@ -2968,17 +2968,17 @@ <property name="text"> <string>/16</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> <property name="hAlign" stdset="0"> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TempoLabel</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>124</x> <y>51</y> @@ -3250,7 +3250,7 @@ <property name="name"> <cstring>TimeSigDisplay</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>23</x> <y>51</y> @@ -3259,11 +3259,11 @@ </rect> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>ToEndLabel</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>192</x> <y>1</y> @@ -3530,17 +3530,17 @@ <property name="text"> <string>END</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> <property name="hAlign" stdset="0"> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TimeDisplayLabel</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>157</x> <y>1</y> @@ -3807,7 +3807,7 @@ <property name="text"> <string>BAR</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> <property name="hAlign" stdset="0"> @@ -3817,7 +3817,7 @@ <property name="name"> <cstring>TenThousandthsPixmap</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>201</x> <y>16</y> @@ -3839,7 +3839,7 @@ <property name="name"> <cstring>MinuteColonPixmap</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>104</x> <y>6</y> @@ -3861,7 +3861,7 @@ <property name="name"> <cstring>SecondColonPixmap</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>183</x> <y>14</y> @@ -3883,7 +3883,7 @@ <property name="name"> <cstring>HundredthColonPixmap</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>151</x> <y>14</y> @@ -3905,7 +3905,7 @@ <property name="name"> <cstring>TenthsPixmap</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>155</x> <y>16</y> @@ -3927,7 +3927,7 @@ <property name="name"> <cstring>ThousandthsPixmap</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>187</x> <y>16</y> @@ -3949,7 +3949,7 @@ <property name="name"> <cstring>TempoDisplay</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>159</x> <y>51</y> @@ -3959,11 +3959,11 @@ </property> </widget> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>TimeDisplayButton</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>3</x> <y>4</y> @@ -3993,11 +3993,11 @@ <string>Switch between real time, musical time, and frame count</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>PanelOpenButton</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>3</x> <y>56</y> @@ -4030,11 +4030,11 @@ <string>Show additional controls</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>RewindButton</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>260</x> <y>4</y> @@ -4064,11 +4064,11 @@ <string>Moves the current pointer position back one bar.</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>RewindEndButton</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>260</x> <y>43</y> @@ -4095,11 +4095,11 @@ <string>Moves the pointer position to the start of the composition. (This may mean going forwards if the pointer is currently before the start.)</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>PlayButton</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>303</x> <y>4</y> @@ -4132,11 +4132,11 @@ <string>Plays from the current pointer position, or pauses playback if already in progress.</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>StopButton</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>303</x> <y>43</y> @@ -4163,11 +4163,11 @@ <string>Stops playback or recording.</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>FfwdButton</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>370</x> <y>4</y> @@ -4197,11 +4197,11 @@ <string>Moves the current pointer position forwards one bar.</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>FfwdEndButton</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>370</x> <y>43</y> @@ -4228,11 +4228,11 @@ <string>Moves the pointer position to the end of the composition. (This may mean going backwards if the pointer is already beyond the end.)</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>ToEndButton</cstring> </property> - <property name="geometry"> + <property name="tqgeometry"> <rect> <x>3</x> <y>28</y> @@ -4357,5 +4357,5 @@ <tabstop>FfwdButton</tabstop> <tabstop>FfwdEndButton</tabstop> </tabstops> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/src/gui/widgets/AudioFaderBox.cpp b/src/gui/widgets/AudioFaderBox.cpp index 27980e7..f544003 100644 --- a/src/gui/widgets/AudioFaderBox.cpp +++ b/src/gui/widgets/AudioFaderBox.cpp @@ -57,12 +57,12 @@ namespace Rosegarden { -AudioFaderBox::AudioFaderBox(TQWidget *parent, +AudioFaderBox::AudioFaderBox(TQWidget *tqparent, TQString id, bool haveInOut, const char *name): - TQFrame(parent, name), - m_signalMapper(new TQSignalMapper(this)), + TQFrame(tqparent, name), + m_signalMapper(new TQSignalMapper(TQT_TQOBJECT(this))), m_id(id), m_isStereo(false) { @@ -82,7 +82,7 @@ AudioFaderBox::AudioFaderBox(TQWidget *parent, (plugin, i18n("Audio plugin button")); m_plugins.push_back(plugin); - m_signalMapper->setMapping(plugin, i); + m_signalMapper->setMapping(TQT_TQOBJECT(plugin), i); connect(plugin, TQT_SIGNAL(clicked()), m_signalMapper, TQT_SLOT(map())); } @@ -116,8 +116,8 @@ AudioFaderBox::AudioFaderBox(TQWidget *parent, m_fader->setOutlineColour(GUIPalette::getColour(GUIPalette::PlaybackFaderOutline)); TQString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); - m_monoPixmap.load(TQString("%1/misc/mono.xpm").arg(pixmapDir)); - m_stereoPixmap.load(TQString("%1/misc/stereo.xpm").arg(pixmapDir)); + m_monoPixmap.load(TQString("%1/misc/mono.xpm").tqarg(pixmapDir)); + m_stereoPixmap.load(TQString("%1/misc/stereo.xpm").tqarg(pixmapDir)); m_pan = new Rotary(this, -100.0, 100.0, 1.0, 5.0, 0.0, 22, Rotary::NoTicks, false, true); @@ -244,8 +244,8 @@ bool AudioFaderBox::owns(const TQObject *object) { return (object && - ((object->parent() == this) || - (object->parent() && (object->parent()->parent() == this)))); + ((TQT_BASE_OBJECT(object->tqparent()) == TQT_BASE_OBJECT(this)) || + (object->tqparent() && (TQT_BASE_OBJECT(object->tqparent()->tqparent()) == TQT_BASE_OBJECT(this))))); } void diff --git a/src/gui/widgets/AudioFaderBox.h b/src/gui/widgets/AudioFaderBox.h index 0c96b86..8c4f291 100644 --- a/src/gui/widgets/AudioFaderBox.h +++ b/src/gui/widgets/AudioFaderBox.h @@ -50,12 +50,13 @@ class AudioVUMeter; class AudioRouteMenu; -class AudioFaderBox : public QFrame +class AudioFaderBox : public TQFrame { Q_OBJECT + TQ_OBJECT public: - AudioFaderBox(TQWidget *parent, + AudioFaderBox(TQWidget *tqparent, TQString id = "", bool haveInOut = true, const char *name = 0); diff --git a/src/gui/widgets/AudioListItem.h b/src/gui/widgets/AudioListItem.h index 410c374..7486bfa 100644 --- a/src/gui/widgets/AudioListItem.h +++ b/src/gui/widgets/AudioListItem.h @@ -33,32 +33,32 @@ namespace Rosegarden class Segment; -// Add an Id to a QListViewItem +// Add an Id to a TQListViewItem // class AudioListItem : public KListViewItem { public: - AudioListItem(KListView *parent):KListViewItem(parent), + AudioListItem(KListView *tqparent):KListViewItem(tqparent), m_segment(0) {;} - AudioListItem(KListViewItem *parent):KListViewItem(parent), + AudioListItem(KListViewItem *tqparent):KListViewItem(tqparent), m_segment(0) {;} - AudioListItem(KListView *parent, + AudioListItem(KListView *tqparent, TQString label, AudioFileId id): - KListViewItem(parent, + KListViewItem(tqparent, label, "", "", "", "", "", "", ""), m_id(id), m_segment(0) {;} - AudioListItem(KListViewItem *parent, + AudioListItem(KListViewItem *tqparent, TQString label, AudioFileId id): - KListViewItem(parent, + KListViewItem(tqparent, label, "", "", "", "", "", "", ""), m_id(id), diff --git a/src/gui/widgets/AudioListView.cpp b/src/gui/widgets/AudioListView.cpp index 3c75526..a840868 100644 --- a/src/gui/widgets/AudioListView.cpp +++ b/src/gui/widgets/AudioListView.cpp @@ -31,8 +31,8 @@ namespace Rosegarden { -AudioListView::AudioListView(TQWidget *parent, const char *name) - : KListView(parent, name) +AudioListView::AudioListView(TQWidget *tqparent, const char *name) + : KListView(tqparent, name) { setDragEnabled(true); setAcceptDrops(true); diff --git a/src/gui/widgets/AudioListView.h b/src/gui/widgets/AudioListView.h index 04c293e..e6bbaca 100644 --- a/src/gui/widgets/AudioListView.h +++ b/src/gui/widgets/AudioListView.h @@ -32,7 +32,7 @@ namespace Rosegarden { class AudioListView : public KListView { public: - AudioListView(TQWidget *parent = 0, const char *name = 0); + AudioListView(TQWidget *tqparent = 0, const char *name = 0); protected: bool acceptDrag(TQDropEvent* e) const; diff --git a/src/gui/widgets/AudioRouteMenu.cpp b/src/gui/widgets/AudioRouteMenu.cpp index 0cdc889..9af8ec3 100644 --- a/src/gui/widgets/AudioRouteMenu.cpp +++ b/src/gui/widgets/AudioRouteMenu.cpp @@ -133,7 +133,7 @@ AudioRouteMenu::slotShowMenu() if (getNumEntries() == 0) return ; - RosegardenPopupMenu *menu = new RosegardenPopupMenu((TQWidget *)parent()); + RosegardenPopupMenu *menu = new RosegardenPopupMenu((TQWidget *)tqparent()); for (int i = 0; i < getNumEntries(); ++i) { @@ -220,7 +220,7 @@ AudioRouteMenu::getCurrentEntry() return 0; } -QString +TQString AudioRouteMenu::getEntryText(int entry) { switch (m_direction) { @@ -231,24 +231,24 @@ AudioRouteMenu::getEntryText(int entry) if (stereo) { if (entry < recordIns) { - return i18n("In %1").arg(entry + 1); + return i18n("In %1").tqarg(entry + 1); } else if (entry == recordIns) { return i18n("Master"); } else { - return i18n("Sub %1").arg(entry - recordIns); + return i18n("Sub %1").tqarg(entry - recordIns); } } else { int channel = entry % 2; entry /= 2; if (entry < recordIns) { return (channel ? i18n("In %1 R") : - i18n("In %1 L")).arg(entry + 1); + i18n("In %1 L")).tqarg(entry + 1); } else if (entry == recordIns) { return (channel ? i18n("Master R") : i18n("Master L")); } else { return (channel ? i18n("Sub %1 R") : - i18n("Sub %1 L")).arg(entry - recordIns); + i18n("Sub %1 L")).tqarg(entry - recordIns); } } break; @@ -258,7 +258,7 @@ AudioRouteMenu::getEntryText(int entry) if (entry == 0) return i18n("Master"); else - return i18n("Sub %1").arg(entry); + return i18n("Sub %1").tqarg(entry); } return TQString(); diff --git a/src/gui/widgets/AudioRouteMenu.h b/src/gui/widgets/AudioRouteMenu.h index 659a57b..400d64e 100644 --- a/src/gui/widgets/AudioRouteMenu.h +++ b/src/gui/widgets/AudioRouteMenu.h @@ -42,15 +42,16 @@ class Studio; class Instrument; -class AudioRouteMenu : public QObject +class AudioRouteMenu : public TQObject { Q_OBJECT + TQ_OBJECT public: enum Direction { In, Out }; enum Format { Compact, Regular }; - AudioRouteMenu(TQWidget *parent, + AudioRouteMenu(TQWidget *tqparent, Direction direction, Format format, Studio *studio = 0, diff --git a/src/gui/widgets/AudioVUMeter.cpp b/src/gui/widgets/AudioVUMeter.cpp index d881818..adc8bb2 100644 --- a/src/gui/widgets/AudioVUMeter.cpp +++ b/src/gui/widgets/AudioVUMeter.cpp @@ -37,17 +37,17 @@ namespace Rosegarden { -AudioVUMeter::AudioVUMeter(TQWidget *parent, +AudioVUMeter::AudioVUMeter(TQWidget *tqparent, VUMeter::VUMeterType type, bool stereo, bool hasRecord, int width, int height, const char *name) : - TQWidget(parent, name), + TQWidget(tqparent, name), m_stereo(stereo) { - setBackgroundMode(Qt::NoBackground); + setBackgroundMode(TQt::NoBackground); setFixedSize(width, height); // This offset is intended to match that for the height of the @@ -76,11 +76,11 @@ void AudioVUMeter::paintEvent(TQPaintEvent *e) { TQPainter paint(this); - paint.setPen(colorGroup().mid()); + paint.setPen(tqcolorGroup().mid()); paint.drawRect(0, 0, width(), height()); - paint.setPen(colorGroup().background()); - paint.setBrush(colorGroup().background()); + paint.setPen(tqcolorGroup().background()); + paint.setBrush(tqcolorGroup().background()); paint.drawRect(1, 1, width() - 2, m_yoff / 2 - 1); paint.drawRect(1, 1, m_xoff / 2 - 1, height() - 2); paint.drawRect(width() - m_xoff / 2 - 1, 1, m_xoff / 2, height() - 2); @@ -90,14 +90,14 @@ AudioVUMeter::paintEvent(TQPaintEvent *e) m_meter->paintEvent(e); } -AudioVUMeter::AudioVUMeterImpl::AudioVUMeterImpl(TQWidget *parent, +AudioVUMeter::AudioVUMeterImpl::AudioVUMeterImpl(TQWidget *tqparent, VUMeterType type, bool stereo, bool hasRecord, int width, int height, const char *name) : - VUMeter(parent, type, stereo, hasRecord, width, height, VUMeter::Vertical, name) + VUMeter(tqparent, type, stereo, hasRecord, width, height, VUMeter::Vertical, name) {} } diff --git a/src/gui/widgets/AudioVUMeter.h b/src/gui/widgets/AudioVUMeter.h index e59014d..73e406b 100644 --- a/src/gui/widgets/AudioVUMeter.h +++ b/src/gui/widgets/AudioVUMeter.h @@ -38,10 +38,10 @@ namespace Rosegarden -class AudioVUMeter : public QWidget +class AudioVUMeter : public TQWidget { public: - AudioVUMeter(TQWidget *parent = 0, + AudioVUMeter(TQWidget *tqparent = 0, VUMeter::VUMeterType type = VUMeter::AudioPeakHoldShort, bool stereo = true, bool hasRecord = false, @@ -69,7 +69,7 @@ protected: class AudioVUMeterImpl : public VUMeter { public: - AudioVUMeterImpl(TQWidget *parent, + AudioVUMeterImpl(TQWidget *tqparent, VUMeterType type, bool stereo, bool hasRecord, diff --git a/src/gui/widgets/BigArrowButton.h b/src/gui/widgets/BigArrowButton.h index 7adfb9b..3a51143 100644 --- a/src/gui/widgets/BigArrowButton.h +++ b/src/gui/widgets/BigArrowButton.h @@ -32,12 +32,12 @@ namespace Rosegarden { class BigArrowButton : public KArrowButton { public: - BigArrowButton(TQWidget *parent = 0, Qt::ArrowType arrow = Qt::UpArrow, + BigArrowButton(TQWidget *tqparent = 0, Qt::ArrowType arrow = Qt::UpArrow, const char *name = 0) : - KArrowButton(parent, arrow, name) { } + KArrowButton(tqparent, arrow, name) { } virtual ~BigArrowButton() { } - virtual TQSize sizeHint() const { + virtual TQSize tqsizeHint() const { return TQSize(20, 20); } }; diff --git a/src/gui/widgets/CollapsingFrame.cpp b/src/gui/widgets/CollapsingFrame.cpp index fdc351b..5835045 100644 --- a/src/gui/widgets/CollapsingFrame.cpp +++ b/src/gui/widgets/CollapsingFrame.cpp @@ -41,13 +41,13 @@ namespace Rosegarden { -CollapsingFrame::CollapsingFrame(TQString label, TQWidget *parent, const char *n) : - TQFrame(parent, n), +CollapsingFrame::CollapsingFrame(TQString label, TQWidget *tqparent, const char *n) : + TQFrame(tqparent, n), m_widget(0), m_fill(false), m_collapsed(false) { - m_layout = new TQGridLayout(this, 3, 3, 0, 0); + m_tqlayout = new TQGridLayout(this, 3, 3, 0, 0); m_toggleButton = new TQToolButton(this); m_toggleButton->setTextLabel(label); @@ -66,7 +66,7 @@ CollapsingFrame::CollapsingFrame(TQString label, TQWidget *parent, const char *n connect(m_toggleButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(toggle())); - m_layout->addMultiCellWidget(m_toggleButton, 0, 0, 0, 2); + m_tqlayout->addMultiCellWidget(m_toggleButton, 0, 0, 0, 2); } CollapsingFrame::~CollapsingFrame() @@ -78,7 +78,7 @@ CollapsingFrame::setWidgetFill(bool fill) m_fill = fill; } -QFont +TQFont CollapsingFrame::font() const { return m_toggleButton->font(); @@ -96,9 +96,9 @@ CollapsingFrame::setWidget(TQWidget *widget) assert(!m_widget); m_widget = widget; if (m_fill) { - m_layout->addMultiCellWidget(widget, 1, 1, 0, 2); + m_tqlayout->addMultiCellWidget(widget, 1, 1, 0, 2); } else { - m_layout->addWidget(widget, 1, 1); + m_tqlayout->addWidget(widget, 1, 1); } bool expanded = true; diff --git a/src/gui/widgets/CollapsingFrame.h b/src/gui/widgets/CollapsingFrame.h index bdce001..90a7887 100644 --- a/src/gui/widgets/CollapsingFrame.h +++ b/src/gui/widgets/CollapsingFrame.h @@ -40,12 +40,13 @@ namespace Rosegarden -class CollapsingFrame : public QFrame +class CollapsingFrame : public TQFrame { Q_OBJECT + TQ_OBJECT public: - CollapsingFrame(TQString label, TQWidget *parent = 0, const char *name = 0); + CollapsingFrame(TQString label, TQWidget *tqparent = 0, const char *name = 0); virtual ~CollapsingFrame(); TQFont font() const; @@ -61,7 +62,7 @@ public slots: void toggle(); protected: - TQGridLayout *m_layout; + TQGridLayout *m_tqlayout; TQToolButton *m_toggleButton; TQWidget *m_widget; bool m_fill; diff --git a/src/gui/widgets/ColourTable.cpp b/src/gui/widgets/ColourTable.cpp index 2cceca4..cde4dbc 100644 --- a/src/gui/widgets/ColourTable.cpp +++ b/src/gui/widgets/ColourTable.cpp @@ -43,8 +43,8 @@ namespace Rosegarden { ColourTable::ColourTable -(TQWidget *parent, ColourMap &input, ColourList &list) - : TQTable(1, 2, parent, "RColourTable") +(TQWidget *tqparent, ColourMap &input, ColourList &list) + : TQTable(1, 2, tqparent, "RColourTable") { setSorting(FALSE); setSelectionMode(TQTable::SingleRow); diff --git a/src/gui/widgets/ColourTable.h b/src/gui/widgets/ColourTable.h index b1e470a..3932df6 100644 --- a/src/gui/widgets/ColourTable.h +++ b/src/gui/widgets/ColourTable.h @@ -44,13 +44,14 @@ namespace Rosegarden class ColourMap; -class ColourTable : public QTable +class ColourTable : public TQTable { Q_OBJECT + TQ_OBJECT public: typedef std::map<unsigned int, unsigned int, std::less<unsigned int> > ColourList; - ColourTable(TQWidget *parent, ColourMap &input, ColourList &list); + ColourTable(TQWidget *tqparent, ColourMap &input, ColourList &list); void populate_table(ColourMap &input, ColourList &list); diff --git a/src/gui/widgets/ColourTableItem.h b/src/gui/widgets/ColourTableItem.h index fb5b417..9f4926b 100644 --- a/src/gui/widgets/ColourTableItem.h +++ b/src/gui/widgets/ColourTableItem.h @@ -40,7 +40,7 @@ namespace Rosegarden -class ColourTableItem : public QTableItem +class ColourTableItem : public TQTableItem { public: ColourTableItem(TQTable *t, const TQColor &input) diff --git a/src/gui/widgets/CurrentProgressDialog.h b/src/gui/widgets/CurrentProgressDialog.h index 2ca0838..90823ea 100644 --- a/src/gui/widgets/CurrentProgressDialog.h +++ b/src/gui/widgets/CurrentProgressDialog.h @@ -37,9 +37,10 @@ namespace Rosegarden class ProgressDialog; -class CurrentProgressDialog : public QObject +class CurrentProgressDialog : public TQObject { Q_OBJECT + TQ_OBJECT public: static CurrentProgressDialog* getInstance(); @@ -64,8 +65,8 @@ public slots: void slotCurrentProgressDialogDestroyed(); protected: - CurrentProgressDialog(TQObject* parent, const char* name = 0) - : TQObject(parent, name) {} + CurrentProgressDialog(TQObject* tqparent, const char* name = 0) + : TQObject(tqparent, name) {} //--------------- Data members --------------------------------- static CurrentProgressDialog* m_instance; diff --git a/src/gui/widgets/DiatonicPitchChooser.cpp b/src/gui/widgets/DiatonicPitchChooser.cpp index 6a1b8ab..13fe3b5 100644 --- a/src/gui/widgets/DiatonicPitchChooser.cpp +++ b/src/gui/widgets/DiatonicPitchChooser.cpp @@ -43,11 +43,11 @@ namespace Rosegarden { DiatonicPitchChooser::DiatonicPitchChooser(TQString title, - TQWidget *parent, + TQWidget *tqparent, int defaultNote, int defaultPitch, int defaultOctave) : - TQGroupBox(1, Horizontal, title, parent), + TQGroupBox(1, Qt::Horizontal, title, tqparent), m_defaultPitch(defaultPitch) { m_pitchDragLabel = new PitchDragLabel(this, defaultPitch); @@ -87,7 +87,7 @@ DiatonicPitchChooser::DiatonicPitchChooser(TQString title, m_accidental->insertItem(i18n("double sharp")); m_accidental->setCurrentItem(2); // default: natural - m_pitchLabel = new TQLabel(TQString("%1").arg(getPitch()), hbox); + m_pitchLabel = new TQLabel(TQString("%1").tqarg(getPitch()), hbox); m_pitchLabel->setMinimumWidth(40); @@ -157,7 +157,7 @@ DiatonicPitchChooser::slotSetPitch(int pitch) m_accidental->setCurrentItem(pitchChange + 2); - m_pitchLabel->setText(TQString("%1").arg(pitch)); + m_pitchLabel->setText(TQString("%1").tqarg(pitch)); update(); } @@ -199,7 +199,7 @@ DiatonicPitchChooser::setLabelsIfNeeded() //{ m_pitchDragLabel->slotSetPitch(getPitch(), m_octave->currentItem(), m_step->currentItem()); //} - m_pitchLabel->setText(TQString("%1").arg(getPitch())); + m_pitchLabel->setText(TQString("%1").tqarg(getPitch())); } void @@ -217,7 +217,7 @@ DiatonicPitchChooser::slotSetNote(int pitch, int octave, int step) m_accidental->setCurrentItem(pitchOffset + 2); //MidiPitchLabel pl(p); - m_pitchLabel->setText(TQString("%1").arg(pitch)); + m_pitchLabel->setText(TQString("%1").tqarg(pitch)); update(); } diff --git a/src/gui/widgets/DiatonicPitchChooser.h b/src/gui/widgets/DiatonicPitchChooser.h index bf20539..7992a76 100644 --- a/src/gui/widgets/DiatonicPitchChooser.h +++ b/src/gui/widgets/DiatonicPitchChooser.h @@ -42,12 +42,13 @@ namespace Rosegarden class PitchDragLabel; -class DiatonicPitchChooser : public QGroupBox +class DiatonicPitchChooser : public TQGroupBox { Q_OBJECT + TQ_OBJECT public: DiatonicPitchChooser(TQString title, - TQWidget *parent, + TQWidget *tqparent, int defaultNote = 0, int defaultPitch = 60, int defaultOctave = 5); diff --git a/src/gui/widgets/Fader.cpp b/src/gui/widgets/Fader.cpp index fc77f8e..021252e 100644 --- a/src/gui/widgets/Fader.cpp +++ b/src/gui/widgets/Fader.cpp @@ -45,8 +45,8 @@ Fader::PixmapCache Fader::m_pixmapCache; Fader::Fader(AudioLevel::FaderType type, - int w, int h, TQWidget *parent) : - TQWidget(parent), + int w, int h, TQWidget *tqparent) : + TQWidget(tqparent), m_integral(false), m_vertical(h > w), m_min(0), @@ -56,7 +56,7 @@ Fader::Fader(AudioLevel::FaderType type, m_float(new TextFloat(this)), m_floatTimer(new TQTimer()) { - setBackgroundMode(Qt::NoBackground); + setBackgroundMode(TQt::NoBackground); setFixedSize(w, h); // provisional calculateButtonPixmap(); // if (m_vertical) { @@ -73,7 +73,7 @@ Fader::Fader(AudioLevel::FaderType type, m_sliderMax = width() - m_sliderMin; } - m_outlineColour = colorGroup().mid(); + m_outlineColour = tqcolorGroup().mid(); calculateGroovePixmap(); setFader(0.0); @@ -83,8 +83,8 @@ Fader::Fader(AudioLevel::FaderType type, } Fader::Fader(int min, int max, int deflt, - int w, int h, TQWidget *parent) : - TQWidget(parent), + int w, int h, TQWidget *tqparent) : + TQWidget(tqparent), m_integral(true), m_vertical(h > w), m_min(min), @@ -93,7 +93,7 @@ Fader::Fader(int min, int max, int deflt, m_float(new TextFloat(this)), m_floatTimer(new TQTimer()) { - setBackgroundMode(Qt::NoBackground); + setBackgroundMode(TQt::NoBackground); setFixedSize(w, h); // provisional calculateButtonPixmap(); // if (m_vertical) { @@ -110,7 +110,7 @@ Fader::Fader(int min, int max, int deflt, m_sliderMax = width() - m_sliderMin; } - m_outlineColour = colorGroup().mid(); + m_outlineColour = tqcolorGroup().mid(); calculateGroovePixmap(); setFader(deflt); @@ -120,8 +120,8 @@ Fader::Fader(int min, int max, int deflt, } Fader::Fader(int min, int max, int deflt, - bool vertical, TQWidget *parent) : - TQWidget(parent), + bool vertical, TQWidget *tqparent) : + TQWidget(tqparent), m_integral(true), m_vertical(vertical), m_min(min), @@ -130,7 +130,7 @@ Fader::Fader(int min, int max, int deflt, m_float(new TextFloat(this)), m_floatTimer(new TQTimer()) { - setBackgroundMode(Qt::NoBackground); + setBackgroundMode(TQt::NoBackground); calculateButtonPixmap(); if (m_vertical) { @@ -141,7 +141,7 @@ Fader::Fader(int min, int max, int deflt, m_sliderMax = width() - m_sliderMin; } - m_outlineColour = colorGroup().mid(); + m_outlineColour = tqcolorGroup().mid(); calculateGroovePixmap(); setFader(deflt); @@ -320,7 +320,7 @@ Fader::mousePressEvent(TQMouseEvent *e) { m_clickMousePos = -1; - if (e->button() == LeftButton) { + if (e->button() == Qt::LeftButton) { if (e->type() == TQEvent::MouseButtonDblClick) { setFader(0); @@ -397,17 +397,17 @@ Fader::showFloatText() TQString text; if (m_integral) { - text = TQString("%1").arg(int(m_value)); + text = TQString("%1").tqarg(int(m_value)); } else if (m_value == AudioLevel::DB_FLOOR) { text = "Off"; } else { float v = fabs(m_value); text = TQString("%1%2.%3%4%5 dB") - .arg(m_value < 0 ? '-' : '+') - .arg(int(v)) - .arg(int(v * 10) % 10) - .arg(int(v * 100) % 10) - .arg(int(v * 1000) % 10); + .tqarg(m_value < 0 ? '-' : '+') + .tqarg(int(v)) + .tqarg(int(v * 10) % 10) + .tqarg(int(v * 100) % 10) + .tqarg(int(v * 1000) % 10); } m_float->setText(text); @@ -415,12 +415,12 @@ Fader::showFloatText() // Reposition - we need to sum the relative positions up to the // topLevel or dialog to please move(). // - TQWidget *par = parentWidget(); + TQWidget *par = tqparentWidget(); TQPoint totalPos = this->pos(); - while (par->parentWidget() && !par->isTopLevel() && !par->isDialog()) { + while (par->tqparentWidget() && !par->isTopLevel() && !par->isDialog()) { totalPos += par->pos(); - par = par->parentWidget(); + par = par->tqparentWidget(); } // Move just top/right @@ -447,9 +447,9 @@ Fader::calculateGroovePixmap() delete map; map = new TQPixmap(width(), height()); - map->fill(colorGroup().background()); + map->fill(tqcolorGroup().background()); TQPainter paint(map); - paint.setBrush(colorGroup().background()); + paint.setBrush(tqcolorGroup().background()); if (m_vertical) { @@ -464,9 +464,9 @@ Fader::calculateGroovePixmap() if (position >= 0 && position < m_sliderMax - m_sliderMin) { if (dB == 0) - paint.setPen(colorGroup().dark()); + paint.setPen(tqcolorGroup().dark()); else - paint.setPen(colorGroup().midlight()); + paint.setPen(tqcolorGroup().midlight()); paint.drawLine(1, (m_sliderMax - position), width() - 2, (m_sliderMax - position)); } @@ -477,8 +477,8 @@ Fader::calculateGroovePixmap() } } - paint.setPen(colorGroup().dark()); - paint.setBrush(colorGroup().mid()); + paint.setPen(tqcolorGroup().dark()); + paint.setBrush(tqcolorGroup().mid()); paint.drawRect(width() / 2 - 3, height() - m_sliderMax, 6, m_sliderMax - m_sliderMin); paint.end(); @@ -511,48 +511,48 @@ Fader::calculateButtonPixmap() buttonWidth = width() - 2; map = new TQPixmap(buttonWidth, buttonHeight); - map->fill(colorGroup().background()); + map->fill(tqcolorGroup().background()); int x = 0; int y = 0; TQPainter paint(map); - paint.setPen(colorGroup().light()); + paint.setPen(tqcolorGroup().light()); paint.drawLine(x + 1, y, x + buttonWidth - 2, y); paint.drawLine(x, y + 1, x, y + buttonHeight - 2); - paint.setPen(colorGroup().midlight()); + paint.setPen(tqcolorGroup().midlight()); paint.drawLine(x + 1, y + 1, x + buttonWidth - 2, y + 1); paint.drawLine(x + 1, y + 1, x + 1, y + buttonHeight - 2); - paint.setPen(colorGroup().mid()); + paint.setPen(tqcolorGroup().mid()); paint.drawLine(x + 2, y + buttonHeight - 2, x + buttonWidth - 2, y + buttonHeight - 2); paint.drawLine(x + buttonWidth - 2, y + 2, x + buttonWidth - 2, y + buttonHeight - 2); - paint.setPen(colorGroup().dark()); + paint.setPen(tqcolorGroup().dark()); paint.drawLine(x + 1, y + buttonHeight - 1, x + buttonWidth - 2, y + buttonHeight - 1); paint.drawLine(x + buttonWidth - 1, y + 1, x + buttonWidth - 1, y + buttonHeight - 2); - paint.setPen(colorGroup().shadow()); + paint.setPen(tqcolorGroup().shadow()); paint.drawLine(x + 1, y + buttonHeight / 2, x + buttonWidth - 2, y + buttonHeight / 2); - paint.setPen(colorGroup().mid()); + paint.setPen(tqcolorGroup().mid()); paint.drawLine(x + 1, y + buttonHeight / 2 - 1, x + buttonWidth - 2, y + buttonHeight / 2 - 1); paint.drawPoint(x, y + buttonHeight / 2); - paint.setPen(colorGroup().light()); + paint.setPen(tqcolorGroup().light()); paint.drawLine(x + 1, y + buttonHeight / 2 + 1, x + buttonWidth - 2, y + buttonHeight / 2 + 1); - paint.setPen(colorGroup().button()); - paint.setBrush(colorGroup().button()); + paint.setPen(tqcolorGroup().button()); + paint.setBrush(tqcolorGroup().button()); paint.drawRect(x + 2, y + 2, buttonWidth - 4, buttonHeight / 2 - 4); paint.drawRect(x + 2, y + buttonHeight / 2 + 2, buttonWidth - 4, buttonHeight / 2 - 4); diff --git a/src/gui/widgets/Fader.h b/src/gui/widgets/Fader.h index 60aca20..dad638b 100644 --- a/src/gui/widgets/Fader.h +++ b/src/gui/widgets/Fader.h @@ -46,9 +46,10 @@ namespace Rosegarden class TextFloat; -class Fader : public QWidget +class Fader : public TQWidget { Q_OBJECT + TQ_OBJECT public: /** @@ -56,21 +57,21 @@ public: * based on the given dimensions. */ Fader(AudioLevel::FaderType, - int width, int height, TQWidget *parent); + int width, int height, TQWidget *tqparent); /** * Construct a fader on an integral scale. The fader calculates * its orientation based on the given dimensions. */ Fader(int min, int max, int deflt, - int width, int height, TQWidget *parent); + int width, int height, TQWidget *tqparent); /** * Construct a fader on an integral scale, with a 1:1 ratio of * pixel positions and values. */ Fader(int min, int max, int deflt, - bool vertical, TQWidget *parent); + bool vertical, TQWidget *tqparent); virtual ~Fader(); diff --git a/src/gui/widgets/HSpinBox.cpp b/src/gui/widgets/HSpinBox.cpp index f3b5970..637c010 100644 --- a/src/gui/widgets/HSpinBox.cpp +++ b/src/gui/widgets/HSpinBox.cpp @@ -46,23 +46,23 @@ int HSpinBox::mapTextToValue( bool* ok ) return int(f * m_scaleFactor); } -HSpinBox::HSpinBox( int minV, int maxV, int step, TQWidget* parent, +HSpinBox::HSpinBox( int minV, int maxV, int step, TQWidget* tqparent, double bottom, double top, int decimals, float initialValue) - : TQSpinBox(minV,maxV,step,parent) + : TQSpinBox(minV,maxV,step,tqparent) { - setValidator(new TQDoubleValidator(bottom,top,decimals,this)); + setValidator(new TQDoubleValidator(bottom,top,decimals,TQT_TQOBJECT(this))); initialize(decimals); setValuef(initialValue); } //constructor with default settings -HSpinBox::HSpinBox( TQWidget* parent, float initialValue, int step, +HSpinBox::HSpinBox( TQWidget* tqparent, float initialValue, int step, double bottom, double top, int decimals, const TQObject* recv, const char* mem) : TQSpinBox((int)(bottom*pow(10.0, decimals)), - (int)(top*pow(10.0, decimals)), step, parent) + (int)(top*pow(10.0, decimals)), step, tqparent) { - setValidator(new TQDoubleValidator(bottom,top,decimals,this)); + setValidator(new TQDoubleValidator(bottom,top,decimals,TQT_TQOBJECT(this))); initialize(decimals); setValuef(initialValue); if (recv != NULL && mem != NULL) diff --git a/src/gui/widgets/HSpinBox.h b/src/gui/widgets/HSpinBox.h index 70baf87..584d086 100644 --- a/src/gui/widgets/HSpinBox.h +++ b/src/gui/widgets/HSpinBox.h @@ -35,18 +35,18 @@ namespace Rosegarden { -class HSpinBox : public QSpinBox +class HSpinBox : public TQSpinBox { TQString mapValueToText(int j); int mapTextToValue( bool* ok ); public: - HSpinBox( int minV, int maxV, int step, TQWidget* parent, + HSpinBox( int minV, int maxV, int step, TQWidget* tqparent, double bottom, double top, int decimals, float initialValue); //constructor with default settings - HSpinBox( TQWidget* parent, float initialValue = 0.2, int step=1, + HSpinBox( TQWidget* tqparent, float initialValue = 0.2, int step=1, double bottom=-25.0, double top=25.0, int decimals=3, const TQObject* recv=NULL, const char* mem=NULL); diff --git a/src/gui/widgets/Label.h b/src/gui/widgets/Label.h index a30b196..60c98fa 100644 --- a/src/gui/widgets/Label.h +++ b/src/gui/widgets/Label.h @@ -37,12 +37,13 @@ class TQMouseEvent; namespace Rosegarden { -class Label : public QLabel +class Label : public TQLabel { Q_OBJECT + TQ_OBJECT public: - Label(TQWidget *parent = 0, const char *name=0): - TQLabel(parent, name) {;} + Label(TQWidget *tqparent = 0, const char *name=0): + TQLabel(tqparent, name) {;} protected: virtual void mouseDoubleClickEvent(TQMouseEvent * /*e*/) diff --git a/src/gui/widgets/MidiFaderWidget.h b/src/gui/widgets/MidiFaderWidget.h index 308d022..0e24bfa 100644 --- a/src/gui/widgets/MidiFaderWidget.h +++ b/src/gui/widgets/MidiFaderWidget.h @@ -43,12 +43,13 @@ class Fader; class AudioVUMeter; -class MidiFaderWidget : public QFrame +class MidiFaderWidget : public TQFrame { Q_OBJECT + TQ_OBJECT public: - MidiFaderWidget(TQWidget *parent, + MidiFaderWidget(TQWidget *tqparent, TQString id = ""); AudioVUMeter *m_vuMeter; diff --git a/src/gui/widgets/PitchChooser.cpp b/src/gui/widgets/PitchChooser.cpp index 2aa1c57..b46efda 100644 --- a/src/gui/widgets/PitchChooser.cpp +++ b/src/gui/widgets/PitchChooser.cpp @@ -40,9 +40,9 @@ namespace Rosegarden { PitchChooser::PitchChooser(TQString title, - TQWidget *parent, + TQWidget *tqparent, int defaultPitch) : - TQGroupBox(1, Horizontal, title, parent), + TQGroupBox(1, Qt::Horizontal, title, tqparent), m_defaultPitch(defaultPitch) { m_pitchDragLabel = new PitchDragLabel(this, defaultPitch); @@ -58,7 +58,7 @@ PitchChooser::PitchChooser(TQString title, m_pitch->setValue(defaultPitch); MidiPitchLabel pl(defaultPitch); - m_pitchLabel = new TQLabel(pl.getQString(), hbox); + m_pitchLabel = new TQLabel(pl.getTQString(), hbox); m_pitchLabel->setMinimumWidth(40); connect(m_pitch, TQT_SIGNAL(valueChanged(int)), @@ -99,7 +99,7 @@ PitchChooser::slotSetPitch(int p) m_pitchDragLabel->slotSetPitch(p); MidiPitchLabel pl(p); - m_pitchLabel->setText(pl.getQString()); + m_pitchLabel->setText(pl.getTQString()); update(); } diff --git a/src/gui/widgets/PitchChooser.h b/src/gui/widgets/PitchChooser.h index 4c844ca..ef6dcf5 100644 --- a/src/gui/widgets/PitchChooser.h +++ b/src/gui/widgets/PitchChooser.h @@ -41,12 +41,13 @@ namespace Rosegarden class PitchDragLabel; -class PitchChooser : public QGroupBox +class PitchChooser : public TQGroupBox { Q_OBJECT + TQ_OBJECT public: PitchChooser(TQString title, - TQWidget *parent, + TQWidget *tqparent, int defaultPitch = 60); int getPitch() const; diff --git a/src/gui/widgets/PitchDragLabel.cpp b/src/gui/widgets/PitchDragLabel.cpp index 9a174bb..55a06d5 100644 --- a/src/gui/widgets/PitchDragLabel.cpp +++ b/src/gui/widgets/PitchDragLabel.cpp @@ -38,10 +38,10 @@ namespace Rosegarden { -PitchDragLabel::PitchDragLabel(TQWidget *parent, +PitchDragLabel::PitchDragLabel(TQWidget *tqparent, int defaultPitch, bool defaultSharps) : - TQWidget(parent), + TQWidget(tqparent), m_pitch(defaultPitch), m_usingSharps(defaultSharps), m_clickedY(0), @@ -84,7 +84,7 @@ PitchDragLabel::slotSetPitch(int pitch, int octave, int step) void PitchDragLabel::mousePressEvent(TQMouseEvent *e) { - if (e->button() == LeftButton) { + if (e->button() == Qt::LeftButton) { m_clickedY = e->y(); m_clickedPitch = m_pitch; m_clicked = true; @@ -201,8 +201,8 @@ PitchDragLabel::paintEvent(TQPaintEvent *) } -QSize -PitchDragLabel::sizeHint() const +TQSize +PitchDragLabel::tqsizeHint() const { return TQSize(150, 135); } diff --git a/src/gui/widgets/PitchDragLabel.h b/src/gui/widgets/PitchDragLabel.h index fa3ecfd..1be7232 100644 --- a/src/gui/widgets/PitchDragLabel.h +++ b/src/gui/widgets/PitchDragLabel.h @@ -42,17 +42,18 @@ namespace Rosegarden class NotePixmapFactory; -class PitchDragLabel : public QWidget +class PitchDragLabel : public TQWidget { Q_OBJECT + TQ_OBJECT public: - PitchDragLabel(TQWidget *parent, + PitchDragLabel(TQWidget *tqparent, int defaultPitch = 60, bool defaultSharps = true); ~PitchDragLabel(); int getPitch() const { return m_pitch; } - virtual TQSize sizeHint() const; + virtual TQSize tqsizeHint() const; signals: void pitchDragged(int); diff --git a/src/gui/widgets/PluginControl.cpp b/src/gui/widgets/PluginControl.cpp index 69e9591..1f546da 100644 --- a/src/gui/widgets/PluginControl.cpp +++ b/src/gui/widgets/PluginControl.cpp @@ -43,8 +43,8 @@ namespace Rosegarden { -PluginControl::PluginControl(TQWidget *parent, - TQGridLayout *layout, +PluginControl::PluginControl(TQWidget *tqparent, + TQGridLayout *tqlayout, ControlType type, PluginPort *port, AudioPluginManager *aPM, @@ -52,8 +52,8 @@ PluginControl::PluginControl(TQWidget *parent, float initialValue, bool showBounds, bool hidden): - TQObject(parent), - m_layout(layout), + TQObject(tqparent), + m_tqlayout(tqlayout), m_type(type), m_port(port), m_pluginManager(aPM), @@ -63,7 +63,7 @@ PluginControl::PluginControl(TQWidget *parent, plainFont.setPointSize((plainFont.pointSize() * 9 ) / 10); TQLabel *controlTitle = - new TQLabel(TQString("%1 ").arg(strtoqstr(port->getName())), parent); + new TQLabel(TQString("%1 ").tqarg(strtoqstr(port->getName())), tqparent); controlTitle->setFont(plainFont); if (type == Rotary) { @@ -121,9 +121,9 @@ PluginControl::PluginControl(TQWidget *parent, TQLabel *low; if (port->getDisplayHint() & (PluginPort::Integer | PluginPort::Toggled)) { - low = new TQLabel(TQString("%1").arg(int(displayLower)), parent); + low = new TQLabel(TQString("%1").tqarg(int(displayLower)), tqparent); } else { - low = new TQLabel(TQString("%1").arg(displayLower), parent); + low = new TQLabel(TQString("%1").tqarg(displayLower), tqparent); } low->setFont(plainFont); @@ -134,7 +134,7 @@ PluginControl::PluginControl(TQWidget *parent, // << ", actual upper " << upperBound << ", step " // << step << std::endl; - m_dial = new ::Rosegarden::Rotary(parent, + m_dial = new ::Rosegarden::Rotary(tqparent, lowerBound, // min upperBound, // max step, // step @@ -154,9 +154,9 @@ PluginControl::PluginControl(TQWidget *parent, TQLabel *upp; if (port->getDisplayHint() & (PluginPort::Integer | PluginPort::Toggled)) { - upp = new TQLabel(TQString("%1").arg(int(displayUpper)), parent); + upp = new TQLabel(TQString("%1").tqarg(int(displayUpper)), tqparent); } else { - upp = new TQLabel(TQString("%1").arg(displayUpper), parent); + upp = new TQLabel(TQString("%1").tqarg(displayUpper), tqparent); } upp->setFont(plainFont); @@ -165,8 +165,8 @@ PluginControl::PluginControl(TQWidget *parent, if (!hidden) { controlTitle->show(); item = new TQWidgetItem(controlTitle); - item->setAlignment(Qt::AlignRight | Qt::AlignBottom); - m_layout->addItem(item); + item->tqsetAlignment(TQt::AlignRight | TQt::AlignBottom); + m_tqlayout->addItem(item); } else { controlTitle->hide(); } @@ -174,8 +174,8 @@ PluginControl::PluginControl(TQWidget *parent, if (showBounds && !hidden) { low->show(); item = new TQWidgetItem(low); - item->setAlignment(Qt::AlignRight | Qt::AlignBottom); - m_layout->addItem(item); + item->tqsetAlignment(TQt::AlignRight | TQt::AlignBottom); + m_tqlayout->addItem(item); } else { low->hide(); } @@ -183,8 +183,8 @@ PluginControl::PluginControl(TQWidget *parent, if (!hidden) { m_dial->show(); item = new TQWidgetItem(m_dial); - item->setAlignment(Qt::AlignCenter); - m_layout->addItem(item); + item->tqsetAlignment(TQt::AlignCenter); + m_tqlayout->addItem(item); } else { m_dial->hide(); } @@ -192,8 +192,8 @@ PluginControl::PluginControl(TQWidget *parent, if (showBounds && !hidden) { upp->show(); item = new TQWidgetItem(upp); - item->setAlignment(Qt::AlignLeft | Qt::AlignBottom); - m_layout->addItem(item); + item->tqsetAlignment(TQt::AlignLeft | TQt::AlignBottom); + m_tqlayout->addItem(item); } else { upp->hide(); } diff --git a/src/gui/widgets/PluginControl.h b/src/gui/widgets/PluginControl.h index d809d81..468bb09 100644 --- a/src/gui/widgets/PluginControl.h +++ b/src/gui/widgets/PluginControl.h @@ -43,9 +43,10 @@ class PluginPort; class AudioPluginManager; class Studio; -class PluginControl : public QObject +class PluginControl : public TQObject { Q_OBJECT + TQ_OBJECT public: typedef enum @@ -55,8 +56,8 @@ public: NumericSlider } ControlType; - PluginControl(TQWidget *parent, - TQGridLayout *layout, + PluginControl(TQWidget *tqparent, + TQGridLayout *tqlayout, ControlType type, PluginPort *port, AudioPluginManager *pluginManager, @@ -83,7 +84,7 @@ protected: //--------------- Data members --------------------------------- - TQGridLayout *m_layout; + TQGridLayout *m_tqlayout; ControlType m_type; PluginPort *m_port; diff --git a/src/gui/widgets/ProgressBar.h b/src/gui/widgets/ProgressBar.h index 383a58a..2a93471 100644 --- a/src/gui/widgets/ProgressBar.h +++ b/src/gui/widgets/ProgressBar.h @@ -40,6 +40,7 @@ namespace Rosegarden class ProgressBar : public KProgress { Q_OBJECT + TQ_OBJECT public: ProgressBar(int totalSteps, diff --git a/src/gui/widgets/ProgressDialog.cpp b/src/gui/widgets/ProgressDialog.cpp index 715e9ae..e8ff6ee 100644 --- a/src/gui/widgets/ProgressDialog.cpp +++ b/src/gui/widgets/ProgressDialog.cpp @@ -45,7 +45,7 @@ ProgressDialog::ProgressDialog(TQWidget *creator, const char *name, bool modal): KProgressDialog(creator, name, - i18n("Processing..."), TQString::null, modal), + i18n("Processing..."), TQString(), modal), m_wasVisible(false), m_frozen(false), m_modal(modal) @@ -107,9 +107,9 @@ ProgressDialog::polish() KProgressDialog::polish(); if (allowCancel()) - setCursor(Qt::ArrowCursor); + setCursor(TQt::ArrowCursor); else - TQApplication::setOverrideCursor(TQCursor(Qt::waitCursor)); + TQApplication::setOverrideCursor(TQCursor(TQt::waitCursor)); } void ProgressDialog::hideEvent(TQHideEvent* e) @@ -128,10 +128,10 @@ ProgressDialog::slotSetOperationName(TQString name) // << name << ") visible : " << isVisible() << endl; setLabel(name); - // Little trick stolen from QProgressDialog + // Little trick stolen from TQProgressDialog // increase resize only, never shrink - int w = QMAX( isVisible() ? width() : 0, sizeHint().width() ); - int h = QMAX( isVisible() ? height() : 0, sizeHint().height() ); + int w = TQMAX( isVisible() ? width() : 0, tqsizeHint().width() ); + int h = TQMAX( isVisible() ? height() : 0, tqsizeHint().height() ); resize( w, h ); } @@ -199,7 +199,7 @@ void ProgressDialog::processEvents() // RG_DEBUG << "ProgressDialog::processEvents: modalVisible is " // << m_modalVisible << endl; if (m_modalVisible) { - kapp->processEvents(50); + kapp->tqprocessEvents(50); } else { rgapp->refreshGUI(50); } diff --git a/src/gui/widgets/ProgressDialog.h b/src/gui/widgets/ProgressDialog.h index 8e6e030..890c8b2 100644 --- a/src/gui/widgets/ProgressDialog.h +++ b/src/gui/widgets/ProgressDialog.h @@ -44,6 +44,7 @@ namespace Rosegarden class ProgressDialog : public KProgressDialog { Q_OBJECT + TQ_OBJECT public: ProgressDialog(TQWidget * creator = 0, const char * name = 0, diff --git a/src/gui/widgets/QDeferScrollView.cpp b/src/gui/widgets/QDeferScrollView.cpp index 38cb211..35f098e 100644 --- a/src/gui/widgets/QDeferScrollView.cpp +++ b/src/gui/widgets/QDeferScrollView.cpp @@ -32,10 +32,10 @@ namespace Rosegarden { -QDeferScrollView::QDeferScrollView(TQWidget* parent, const char *name, WFlags f) - : TQScrollView(parent, name, f) +QDeferScrollView::QDeferScrollView(TQWidget* tqparent, const char *name, WFlags f) + : TQScrollView(tqparent, name, f) { - setFocusPolicy(TQWidget::WheelFocus); + setFocusPolicy(TQ_WheelFocus); } void QDeferScrollView::setBottomMargin(int m) diff --git a/src/gui/widgets/QDeferScrollView.h b/src/gui/widgets/QDeferScrollView.h index 9ba02a9..d9a1d36 100644 --- a/src/gui/widgets/QDeferScrollView.h +++ b/src/gui/widgets/QDeferScrollView.h @@ -23,8 +23,8 @@ COPYING included with this distribution for more information. */ -#ifndef _RG_QDEFERSCROLLVIEW_H_ -#define _RG_QDEFERSCROLLVIEW_H_ +#ifndef _RG_TQDEFERSCROLLVIEW_H_ +#define _RG_TQDEFERSCROLLVIEW_H_ #include <tqscrollview.h> @@ -53,11 +53,12 @@ namespace Rosegarden * @see SegmentCanvas * @see TrackEditor::m_trackButtonScroll */ -class QDeferScrollView : public QScrollView +class QDeferScrollView : public TQScrollView { Q_OBJECT + TQ_OBJECT public: - QDeferScrollView(TQWidget* parent=0, const char *name=0, WFlags f=0); + QDeferScrollView(TQWidget* tqparent=0, const char *name=0, WFlags f=0); void setBottomMargin(int); diff --git a/src/gui/widgets/QuantizeParameters.cpp b/src/gui/widgets/QuantizeParameters.cpp index 1cb2a58..a00969a 100644 --- a/src/gui/widgets/QuantizeParameters.cpp +++ b/src/gui/widgets/QuantizeParameters.cpp @@ -52,13 +52,13 @@ namespace Rosegarden { -QuantizeParameters::QuantizeParameters(TQWidget *parent, +QuantizeParameters::QuantizeParameters(TQWidget *tqparent, QuantizerType defaultQuantizer, bool showNotationOption, bool showAdvancedButton, TQString configCategory, TQString preamble) : - TQFrame(parent), + TQFrame(tqparent), m_configCategory(configCategory), m_standardQuantizations (BasicQuantizer::getStandardQuantizations()) @@ -71,47 +71,47 @@ QuantizeParameters::QuantizeParameters(TQWidget *parent, int zero = 0; if (preamble) { TQLabel *label = new TQLabel(preamble, this); - label->setAlignment(Qt::WordBreak); + label->tqsetAlignment(TQt::WordBreak); m_mainLayout->addMultiCellWidget(label, 0, 0, 0, 1); zero = 1; } - TQGroupBox *quantizerBox = new QGroupBox - (1, Horizontal, i18n("Quantizer"), this); + TQGroupBox *quantizerBox = new TQGroupBox + (1, Qt::Horizontal, i18n("Quantizer"), this); m_mainLayout->addWidget(quantizerBox, zero, 0); TQFrame *typeFrame = new TQFrame(quantizerBox); - TQGridLayout *layout = new TQGridLayout(typeFrame, 2, 2, 5, 3); - layout->addWidget(new TQLabel(i18n("Quantizer type:"), typeFrame), 0, 0); + TQGridLayout *tqlayout = new TQGridLayout(typeFrame, 2, 2, 5, 3); + tqlayout->addWidget(new TQLabel(i18n("Quantizer type:"), typeFrame), 0, 0); m_typeCombo = new KComboBox(typeFrame); m_typeCombo->insertItem(i18n("Grid quantizer")); m_typeCombo->insertItem(i18n("Legato quantizer")); m_typeCombo->insertItem(i18n("Heuristic notation quantizer")); - layout->addWidget(m_typeCombo, 0, 1); + tqlayout->addWidget(m_typeCombo, 0, 1); - m_notationTarget = new QCheckBox + m_notationTarget = new TQCheckBox (i18n("Quantize for notation only (leave performance unchanged)"), typeFrame); - layout->addMultiCellWidget(m_notationTarget, 1, 1, 0, 1); + tqlayout->addMultiCellWidget(m_notationTarget, 1, 1, 0, 1); if (!showNotationOption) m_notationTarget->hide(); TQHBox *parameterBox = new TQHBox(this); m_mainLayout->addWidget(parameterBox, zero + 1, 0); - m_notationBox = new QGroupBox - (1, Horizontal, i18n("Notation parameters"), parameterBox); + m_notationBox = new TQGroupBox + (1, Qt::Horizontal, i18n("Notation parameters"), parameterBox); TQFrame *notationFrame = new TQFrame(m_notationBox); - layout = new TQGridLayout(notationFrame, 4, 2, 5, 3); + tqlayout = new TQGridLayout(notationFrame, 4, 2, 5, 3); - layout->addWidget(new TQLabel(i18n("Base grid unit:"), notationFrame), + tqlayout->addWidget(new TQLabel(i18n("Base grid unit:"), notationFrame), 1, 0); m_notationUnitCombo = new KComboBox(notationFrame); - layout->addWidget(m_notationUnitCombo, 1, 1); + tqlayout->addWidget(m_notationUnitCombo, 1, 1); - layout->addWidget(new TQLabel(i18n("Complexity:"), + tqlayout->addWidget(new TQLabel(i18n("Complexity:"), notationFrame), 0, 0); m_simplicityCombo = new KComboBox(notationFrame); @@ -120,9 +120,9 @@ QuantizeParameters::QuantizeParameters(TQWidget *parent, m_simplicityCombo->insertItem(i18n("Normal")); m_simplicityCombo->insertItem(i18n("Low")); m_simplicityCombo->insertItem(i18n("Very low")); - layout->addWidget(m_simplicityCombo, 0, 1); + tqlayout->addWidget(m_simplicityCombo, 0, 1); - layout->addWidget(new TQLabel(i18n("Tuplet level:"), + tqlayout->addWidget(new TQLabel(i18n("Tuplet level:"), notationFrame), 2, 0); m_maxTuplet = new KComboBox(notationFrame); m_maxTuplet->insertItem(i18n("None")); @@ -136,37 +136,37 @@ QuantizeParameters::QuantizeParameters(TQWidget *parent, m_maxTuplet->insertItem(i18n("8-Tuplet")); */ m_maxTuplet->insertItem(i18n("Any")); - layout->addWidget(m_maxTuplet, 2, 1); + tqlayout->addWidget(m_maxTuplet, 2, 1); m_counterpoint = new TQCheckBox(i18n("Permit counterpoint"), notationFrame); - layout->addMultiCellWidget(m_counterpoint, 3, 3, 0, 1); + tqlayout->addMultiCellWidget(m_counterpoint, 3, 3, 0, 1); - m_gridBox = new QGroupBox - (1, Horizontal, i18n("Grid parameters"), parameterBox); + m_gridBox = new TQGroupBox + (1, Qt::Horizontal, i18n("Grid parameters"), parameterBox); TQFrame *gridFrame = new TQFrame(m_gridBox); - layout = new TQGridLayout(gridFrame, 4, 2, 5, 3); + tqlayout = new TQGridLayout(gridFrame, 4, 2, 5, 3); - layout->addWidget(new TQLabel(i18n("Base grid unit:"), gridFrame), 0, 0); + tqlayout->addWidget(new TQLabel(i18n("Base grid unit:"), gridFrame), 0, 0); m_gridUnitCombo = new KComboBox(gridFrame); - layout->addWidget(m_gridUnitCombo, 0, 1); + tqlayout->addWidget(m_gridUnitCombo, 0, 1); m_swingLabel = new TQLabel(i18n("Swing:"), gridFrame); - layout->addWidget(m_swingLabel, 1, 0); + tqlayout->addWidget(m_swingLabel, 1, 0); m_swingCombo = new KComboBox(gridFrame); - layout->addWidget(m_swingCombo, 1, 1); + tqlayout->addWidget(m_swingCombo, 1, 1); m_iterativeLabel = new TQLabel(i18n("Iterative amount:"), gridFrame); - layout->addWidget(m_iterativeLabel, 2, 0); + tqlayout->addWidget(m_iterativeLabel, 2, 0); m_iterativeCombo = new KComboBox(gridFrame); - layout->addWidget(m_iterativeCombo, 2, 1); + tqlayout->addWidget(m_iterativeCombo, 2, 1); - m_durationCheckBox = new QCheckBox + m_durationCheckBox = new TQCheckBox (i18n("Quantize durations as well as start times"), gridFrame); - layout->addMultiCellWidget(m_durationCheckBox, 3, 3, 0, 1); + tqlayout->addMultiCellWidget(m_durationCheckBox, 3, 3, 0, 1); - m_postProcessingBox = new QGroupBox - (1, Horizontal, i18n("After quantization"), this); + m_postProcessingBox = new TQGroupBox + (1, Qt::Horizontal, i18n("After quantization"), this); if (preamble) { m_mainLayout->addMultiCellWidget(m_postProcessingBox, @@ -181,26 +181,26 @@ QuantizeParameters::QuantizeParameters(TQWidget *parent, if (showAdvancedButton) { m_advancedButton = new TQPushButton(i18n("Show advanced options"), this); - m_mainLayout->addWidget(m_advancedButton, zero + 2, 0, Qt::AlignLeft); + m_mainLayout->addWidget(m_advancedButton, zero + 2, 0, TQt::AlignLeft); TQObject::connect(m_advancedButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotAdvancedChanged())); } TQFrame *postFrame = new TQFrame(m_postProcessingBox); - layout = new TQGridLayout(postFrame, 4, 1, 5, 3); + tqlayout = new TQGridLayout(postFrame, 4, 1, 5, 3); m_rebeam = new TQCheckBox(i18n("Re-beam"), postFrame); - m_articulate = new QCheckBox + m_articulate = new TQCheckBox (i18n("Add articulations (staccato, tenuto, slurs)"), postFrame); m_makeViable = new TQCheckBox(i18n("Tie notes at barlines etc"), postFrame); m_deCounterpoint = new TQCheckBox(i18n("Split-and-tie overlapping chords"), postFrame); - layout->addWidget(m_rebeam, 0, 0); - layout->addWidget(m_articulate, 1, 0); - layout->addWidget(m_makeViable, 2, 0); - layout->addWidget(m_deCounterpoint, 3, 0); + tqlayout->addWidget(m_rebeam, 0, 0); + tqlayout->addWidget(m_articulate, 1, 0); + tqlayout->addWidget(m_makeViable, 2, 0); + tqlayout->addWidget(m_deCounterpoint, 3, 0); - TQPixmap noMap = NotePixmapFactory::toQPixmap + TQPixmap noMap = NotePixmapFactory::toTQPixmap (NotePixmapFactory::makeToolbarPixmap("menu-no-note")); int defaultType = 0; @@ -278,7 +278,7 @@ QuantizeParameters::QuantizeParameters(TQWidget *parent, timeT time = m_standardQuantizations[i]; timeT error = 0; - TQPixmap pmap = NotePixmapFactory::toQPixmap + TQPixmap pmap = NotePixmapFactory::toTQPixmap (NotePixmapFactory::makeNoteMenuPixmap(time, error)); TQString label = NotationStrings::makeNoteMenuLabel(time, false, error); @@ -286,8 +286,8 @@ QuantizeParameters::QuantizeParameters(TQWidget *parent, m_gridUnitCombo->insertItem(pmap, label); m_notationUnitCombo->insertItem(pmap, label); } else { - m_gridUnitCombo->insertItem(noMap, TQString("%1").arg(time)); - m_notationUnitCombo->insertItem(noMap, TQString("%1").arg(time)); + m_gridUnitCombo->insertItem(noMap, TQString("%1").tqarg(time)); + m_notationUnitCombo->insertItem(noMap, TQString("%1").tqarg(time)); } if (m_standardQuantizations[i] == defaultUnit) { @@ -298,14 +298,14 @@ QuantizeParameters::QuantizeParameters(TQWidget *parent, } for (int i = -100; i <= 200; i += 10) { - m_swingCombo->insertItem(i == 0 ? i18n("None") : TQString("%1%").arg(i)); + m_swingCombo->insertItem(i == 0 ? i18n("None") : TQString("%1%").tqarg(i)); if (i == defaultSwing) m_swingCombo->setCurrentItem(m_swingCombo->count() - 1); } for (int i = 10; i <= 100; i += 10) { m_iterativeCombo->insertItem(i == 100 ? i18n("Full quantize") : - TQString("%1%").arg(i)); + TQString("%1%").tqarg(i)); if (i == defaultIterate) m_iterativeCombo->setCurrentItem(m_iterativeCombo->count() - 1); } diff --git a/src/gui/widgets/QuantizeParameters.h b/src/gui/widgets/QuantizeParameters.h index 8efd0c5..97a6350 100644 --- a/src/gui/widgets/QuantizeParameters.h +++ b/src/gui/widgets/QuantizeParameters.h @@ -23,8 +23,8 @@ COPYING included with this distribution for more information. */ -#ifndef _RG_ROSEGARDENQUANTIZEPARAMETERS_H_ -#define _RG_ROSEGARDENQUANTIZEPARAMETERS_H_ +#ifndef _RG_ROSEGARDENTQUANTIZEPARAMETERS_H_ +#define _RG_ROSEGARDENTQUANTIZEPARAMETERS_H_ #include <tqframe.h> #include <tqstring.h> @@ -47,13 +47,14 @@ namespace Rosegarden class Quantizer; -class QuantizeParameters : public QFrame +class QuantizeParameters : public TQFrame { Q_OBJECT + TQ_OBJECT public: enum QuantizerType { Grid, Legato, Notation }; - QuantizeParameters(TQWidget *parent, + QuantizeParameters(TQWidget *tqparent, QuantizerType defaultQuantizer, bool showNotationOption, bool showAdvancedButton, diff --git a/src/gui/widgets/RosegardenPopupMenu.h b/src/gui/widgets/RosegardenPopupMenu.h index 8bc81cb..f16b2f7 100644 --- a/src/gui/widgets/RosegardenPopupMenu.h +++ b/src/gui/widgets/RosegardenPopupMenu.h @@ -29,11 +29,11 @@ namespace Rosegarden { -class RosegardenPopupMenu : public QPopupMenu +class RosegardenPopupMenu : public TQPopupMenu { // just to make itemHeight public public: - RosegardenPopupMenu(TQWidget *parent) : TQPopupMenu(parent) { } + RosegardenPopupMenu(TQWidget *tqparent) : TQPopupMenu(tqparent) { } using TQPopupMenu::itemHeight; }; diff --git a/src/gui/widgets/Rotary.cpp b/src/gui/widgets/Rotary.cpp index f7cd1ec..a011275 100644 --- a/src/gui/widgets/Rotary.cpp +++ b/src/gui/widgets/Rotary.cpp @@ -60,7 +60,7 @@ static TQTimer *_floatTimer = 0; Rotary::PixmapCache Rotary::m_pixmaps; -Rotary::Rotary(TQWidget *parent, +Rotary::Rotary(TQWidget *tqparent, float minValue, float maxValue, float step, @@ -71,7 +71,7 @@ Rotary::Rotary(TQWidget *parent, bool snapToTicks, bool centred, bool logarithmic) : - TQWidget(parent), + TQWidget(tqparent), m_minValue(minValue), m_maxValue(maxValue), m_step(step), @@ -89,7 +89,7 @@ Rotary::Rotary(TQWidget *parent, m_knobColour(0, 0, 0), m_logarithmic(logarithmic) { - setBackgroundMode(Qt::NoBackground); + setBackgroundMode(TQt::NoBackground); if (!_float) _float = new TextFloat(this); @@ -133,7 +133,7 @@ void Rotary::setKnobColour(const TQColor &colour) { m_knobColour = colour; - repaint(); + tqrepaint(); } void @@ -187,7 +187,7 @@ Rotary::paintEvent(TQPaintEvent *) pen.setWidth(scale); paint.setPen(pen); - if (m_knobColour != Qt::black) { + if (m_knobColour != TQt::black) { paint.setBrush(m_knobColour); } else { paint.setBrush( @@ -223,7 +223,7 @@ Rotary::paintEvent(TQPaintEvent *) paint.setBrush(TQBrush::NoBrush); - pen.setColor(colorGroup().dark()); + pen.setColor(tqcolorGroup().dark()); pen.setWidth(scale); paint.setPen(pen); @@ -253,7 +253,7 @@ Rotary::paintEvent(TQPaintEvent *) paint.setPen(pen); int shadowAngle = -720; - c = colorGroup().dark(); + c = tqcolorGroup().dark(); for (int arc = 120; arc < 2880; arc += 240) { pen.setColor(c); paint.setPen(pen); @@ -263,7 +263,7 @@ Rotary::paintEvent(TQPaintEvent *) } shadowAngle = 2160; - c = colorGroup().dark(); + c = tqcolorGroup().dark(); for (int arc = 120; arc < 2880; arc += 240) { pen.setColor(c); paint.setPen(pen); @@ -289,7 +289,7 @@ Rotary::paintEvent(TQPaintEvent *) double y = hyp + len * cos(angle); pen.setWidth(scale * 2); - pen.setColor(colorGroup().dark()); + pen.setColor(tqcolorGroup().dark()); paint.setPen(pen); paint.drawLine(int(x0), int(y0), int(x), int(y)); @@ -373,17 +373,17 @@ Rotary::snapPosition() void Rotary::mousePressEvent(TQMouseEvent *e) { - if (e->button() == LeftButton) { + if (e->button() == Qt::LeftButton) { m_buttonPressed = true; m_lastY = e->y(); m_lastX = e->x(); - } else if (e->button() == MidButton) // reset to default + } else if (e->button() == Qt::MidButton) // reset to default { m_position = m_initialPosition; snapPosition(); update(); emit valueChanged(m_snapPosition); - } else if (e->button() == RightButton) // reset to centre position + } else if (e->button() == Qt::RightButton) // reset to centre position { m_position = (m_maxValue + m_minValue) / 2.0; snapPosition(); @@ -391,23 +391,23 @@ Rotary::mousePressEvent(TQMouseEvent *e) emit valueChanged(m_snapPosition); } - TQPoint totalPos = mapTo(topLevelWidget(), TQPoint(0, 0)); + TQPoint totalPos = mapTo(tqtopLevelWidget(), TQPoint(0, 0)); if (!_float) _float = new TextFloat(this); _float->reparent(this); _float->move(totalPos + TQPoint(width() + 2, -height() / 2)); if (m_logarithmic) { - _float->setText(TQString("%1").arg(powf(10, m_position))); + _float->setText(TQString("%1").tqarg(powf(10, m_position))); } else { - _float->setText(TQString("%1").arg(m_position)); + _float->setText(TQString("%1").tqarg(m_position)); } _float->show(); // std::cerr << "Rotary::mousePressEvent: logarithmic = " << m_logarithmic // << ", position = " << m_position << std::endl; - if (e->button() == RightButton || e->button() == MidButton) { + if (e->button() == Qt::RightButton || e->button() == Qt::MidButton) { // one shot, 500ms _floatTimer->start(500, true); } @@ -455,7 +455,7 @@ Rotary::mouseDoubleClickEvent(TQMouseEvent * /*e*/) void Rotary::mouseReleaseEvent(TQMouseEvent *e) { - if (e->button() == LeftButton) { + if (e->button() == Qt::LeftButton) { m_buttonPressed = false; m_lastY = 0; m_lastX = 0; @@ -498,9 +498,9 @@ Rotary::mouseMoveEvent(TQMouseEvent *e) // draw on the float text if (m_logarithmic) { - _float->setText(TQString("%1").arg(powf(10, m_snapPosition))); + _float->setText(TQString("%1").tqarg(powf(10, m_snapPosition))); } else { - _float->setText(TQString("%1").arg(m_snapPosition)); + _float->setText(TQString("%1").tqarg(m_snapPosition)); } } } @@ -527,15 +527,15 @@ Rotary::wheelEvent(TQWheelEvent *e) // draw on the float text if (m_logarithmic) { - _float->setText(TQString("%1").arg(powf(10, m_snapPosition))); + _float->setText(TQString("%1").tqarg(powf(10, m_snapPosition))); } else { - _float->setText(TQString("%1").arg(m_snapPosition)); + _float->setText(TQString("%1").tqarg(m_snapPosition)); } // Reposition - we need to sum the relative positions up to the // topLevel or dialog to please move(). Move just top/right of the rotary // - TQPoint totalPos = mapTo(topLevelWidget(), TQPoint(0, 0)); + TQPoint totalPos = mapTo(tqtopLevelWidget(), TQPoint(0, 0)); _float->reparent(this); _float->move(totalPos + TQPoint(width() + 2, -height() / 2)); _float->show(); diff --git a/src/gui/widgets/Rotary.h b/src/gui/widgets/Rotary.h index cecff8c..f399eab 100644 --- a/src/gui/widgets/Rotary.h +++ b/src/gui/widgets/Rotary.h @@ -42,9 +42,10 @@ namespace Rosegarden -class Rotary : public QWidget +class Rotary : public TQWidget { Q_OBJECT + TQ_OBJECT public: enum TickMode { @@ -55,7 +56,7 @@ public: StepTicks // end points plus every step interval }; - Rotary(TQWidget *parent, + Rotary(TQWidget *tqparent, float minValue = 0.0, float maxValue = 100.0, float step = 1.0, diff --git a/src/gui/widgets/ScrollBox.cpp b/src/gui/widgets/ScrollBox.cpp index d129a08..66e32e2 100644 --- a/src/gui/widgets/ScrollBox.cpp +++ b/src/gui/widgets/ScrollBox.cpp @@ -43,8 +43,8 @@ namespace Rosegarden { -ScrollBox::ScrollBox(TQWidget* parent, SizeMode sizeMode, const char* name) : - TQFrame(parent, name), +ScrollBox::ScrollBox(TQWidget* tqparent, SizeMode sizeMode, const char* name) : + TQFrame(tqparent, name), m_sizeMode(sizeMode) { setFrameStyle(Panel | Sunken); @@ -53,15 +53,15 @@ ScrollBox::ScrollBox(TQWidget* parent, SizeMode sizeMode, const char* name) : void ScrollBox::mousePressEvent(TQMouseEvent* e) { m_mouse = e->pos(); - if (e->button() == RightButton) + if (e->button() == Qt::RightButton) emit button3Pressed(); - if (e->button() == MidButton) + if (e->button() == Qt::MidButton) emit button2Pressed(); } void ScrollBox::mouseMoveEvent(TQMouseEvent* e) { - if (e->state() != LeftButton) + if (e->state() != Qt::LeftButton) return ; int dx = (e->pos().x() - m_mouse.x()) * m_pagesize.width() / width(); @@ -80,7 +80,7 @@ void ScrollBox::drawContents(TQPainter* paint) TQRect c(contentsRect()); - paint->setPen(Qt::red); + paint->setPen(TQt::red); int len = m_pagesize.width(); int x = c.x() + c.width() * m_viewpos.x() / len; @@ -123,36 +123,36 @@ void ScrollBox::setPageSize(const TQSize& s) setFixedWidth(width); } - repaint(); + tqrepaint(); } void ScrollBox::setViewSize(const TQSize& s) { m_viewsize = s; - repaint(); + tqrepaint(); } void ScrollBox::setViewPos(const TQPoint& pos) { m_viewpos = pos; - repaint(); + tqrepaint(); } void ScrollBox::setViewX(int x) { m_viewpos = TQPoint(x, m_viewpos.y()); - repaint(); + tqrepaint(); } void ScrollBox::setViewY(int y) { m_viewpos = TQPoint(m_viewpos.x(), y); - repaint(); + tqrepaint(); } void ScrollBox::setThumbnail(TQPixmap img) { - setPaletteBackgroundPixmap(img.convertToImage().smoothScale(size())); + setPaletteBackgroundPixmap(TQPixmap(img.convertToImage().smoothScale(size()))); } } diff --git a/src/gui/widgets/ScrollBox.h b/src/gui/widgets/ScrollBox.h index ebd99a8..aeca48d 100644 --- a/src/gui/widgets/ScrollBox.h +++ b/src/gui/widgets/ScrollBox.h @@ -44,14 +44,15 @@ class TQMouseEvent; namespace Rosegarden { -class ScrollBox: public QFrame +class ScrollBox: public TQFrame { Q_OBJECT + TQ_OBJECT public: enum SizeMode { FixWidth, FixHeight }; - ScrollBox(TQWidget *parent = 0, + ScrollBox(TQWidget *tqparent = 0, SizeMode mode = FixWidth, const char *name = 0); diff --git a/src/gui/widgets/ScrollBoxDialog.cpp b/src/gui/widgets/ScrollBoxDialog.cpp index 008c868..f262605 100644 --- a/src/gui/widgets/ScrollBoxDialog.cpp +++ b/src/gui/widgets/ScrollBoxDialog.cpp @@ -38,11 +38,11 @@ namespace Rosegarden { -ScrollBoxDialog::ScrollBoxDialog(TQWidget *parent, +ScrollBoxDialog::ScrollBoxDialog(TQWidget *tqparent, ScrollBox::SizeMode sizeMode, const char *name, WFlags flags) : - KDialog(parent, name, flags), + KDialog(tqparent, name, flags), m_scrollbox(new ScrollBox(this, sizeMode)) { } diff --git a/src/gui/widgets/ScrollBoxDialog.h b/src/gui/widgets/ScrollBoxDialog.h index a4478c1..722f518 100644 --- a/src/gui/widgets/ScrollBoxDialog.h +++ b/src/gui/widgets/ScrollBoxDialog.h @@ -43,9 +43,10 @@ namespace Rosegarden class ScrollBoxDialog : public KDialog { Q_OBJECT + TQ_OBJECT public: - ScrollBoxDialog(TQWidget *parent = 0, + ScrollBoxDialog(TQWidget *tqparent = 0, ScrollBox::SizeMode mode = ScrollBox::FixWidth, const char *name = 0, WFlags flags = 0); diff --git a/src/gui/widgets/SpinBox.cpp b/src/gui/widgets/SpinBox.cpp index 64bd300..ec77fda 100644 --- a/src/gui/widgets/SpinBox.cpp +++ b/src/gui/widgets/SpinBox.cpp @@ -34,11 +34,11 @@ namespace Rosegarden { -SpinBox::SpinBox(TQWidget *parent, const char *name): - TQSpinBox(parent, name), m_doubleValue(0) +SpinBox::SpinBox(TQWidget *tqparent, const char *name): + TQSpinBox(tqparent, name), m_doubleValue(0) {} -QString +TQString SpinBox::mapValueToText(int value) { TQString doubleStr; diff --git a/src/gui/widgets/SpinBox.h b/src/gui/widgets/SpinBox.h index 804935b..25d99bb 100644 --- a/src/gui/widgets/SpinBox.h +++ b/src/gui/widgets/SpinBox.h @@ -41,13 +41,14 @@ namespace Rosegarden /** * A Combobox that just about handles doubles - you have * to set the precision outside of this class if you're - * using it with Qt designer. Urch. + * using it with TQt designer. Urch. */ -class SpinBox : public QSpinBox +class SpinBox : public TQSpinBox { Q_OBJECT + TQ_OBJECT public: - SpinBox(TQWidget *parent = 0, const char *name=0); + SpinBox(TQWidget *tqparent = 0, const char *name=0); double getDoubleValue() const { return m_doubleValue; } diff --git a/src/gui/widgets/TextFloat.cpp b/src/gui/widgets/TextFloat.cpp index b1f5cfd..a62f3a1 100644 --- a/src/gui/widgets/TextFloat.cpp +++ b/src/gui/widgets/TextFloat.cpp @@ -39,12 +39,12 @@ namespace Rosegarden { -TextFloat::TextFloat(TQWidget *parent): - TQWidget(parent, "TextFloat", +TextFloat::TextFloat(TQWidget *tqparent): + TQWidget(tqparent, "TextFloat", WStyle_Customize | WStyle_NoBorder | WStyle_StaysOnTop), m_text("") { - reparent(parentWidget()); + reparent(tqparentWidget()); resize(20, 20); } @@ -55,15 +55,15 @@ TextFloat::reparent(TQWidget *newParent) // Get position and reparent to either top level or dialog // - while (newParent->parentWidget() && !newParent->isTopLevel() + while (newParent->tqparentWidget() && !newParent->isTopLevel() && !newParent->isDialog()) { - newParent = newParent->parentWidget(); + newParent = newParent->tqparentWidget(); position += newParent->pos(); } - // Position this widget to the right of the parent + // Position this widget to the right of the tqparent // - //move(pos + TQPoint(parent->width() + 5, 5)); + //move(pos + TQPoint(tqparent->width() + 5, 5)); TQWidget::reparent(newParent, WStyle_Customize | WStyle_NoBorder | WStyle_StaysOnTop, @@ -85,11 +85,11 @@ TextFloat::paintEvent(TQPaintEvent *e) TQFontMetrics metrics(paint.fontMetrics()); - TQRect r = metrics.boundingRect(0, 0, 400, 400, Qt::AlignAuto, m_text); + TQRect r = metrics.boundingRect(0, 0, 400, 400, TQt::AlignAuto, m_text); resize(r.width() + 7, r.height() + 7); paint.drawRect(0, 0, r.width() + 6, r.height() + 6); - paint.setPen(Qt::black); - paint.drawText(TQRect(3, 3, r.width(), r.height()), Qt::AlignAuto, m_text); + paint.setPen(TQt::black); + paint.drawText(TQRect(3, 3, r.width(), r.height()), TQt::AlignAuto, m_text); /* TQRect textBound = metrics.boundingRect(m_text); @@ -97,7 +97,7 @@ TextFloat::paintEvent(TQPaintEvent *e) resize(textBound.width() + 7, textBound.height() + 7); paint.drawRect(0, 0, textBound.width() + 6, textBound.height() + 6); - paint.setPen(Qt::black); + paint.setPen(TQt::black); paint.drawText(3, textBound.height() + 3, m_text); */ } @@ -106,7 +106,7 @@ void TextFloat::setText(const TQString &text) { m_text = text; - repaint(); + tqrepaint(); } } diff --git a/src/gui/widgets/TextFloat.h b/src/gui/widgets/TextFloat.h index b9463aa..d68cd4d 100644 --- a/src/gui/widgets/TextFloat.h +++ b/src/gui/widgets/TextFloat.h @@ -38,15 +38,15 @@ namespace Rosegarden -class TextFloat : public QWidget +class TextFloat : public TQWidget { public: - TextFloat(TQWidget *parent); + TextFloat(TQWidget *tqparent); virtual ~TextFloat() {;} void setText(const TQString &text); - // Reparent the float correctly by context + // Retqparent the float correctly by context // void reparent(TQWidget *newParent); diff --git a/src/gui/widgets/TimeWidget.cpp b/src/gui/widgets/TimeWidget.cpp index 8eced3a..df177a4 100644 --- a/src/gui/widgets/TimeWidget.cpp +++ b/src/gui/widgets/TimeWidget.cpp @@ -48,12 +48,12 @@ namespace Rosegarden { TimeWidget::TimeWidget(TQString title, - TQWidget *parent, + TQWidget *tqparent, Composition *composition, timeT absTime, bool editable, bool constrainToCompositionDuration) : - TQGroupBox(1, Horizontal, title, parent), + TQGroupBox(1, Qt::Horizontal, title, tqparent), m_composition(composition), m_isDuration(false), m_constrain(constrainToCompositionDuration), @@ -65,13 +65,13 @@ TimeWidget::TimeWidget(TQString title, } TimeWidget::TimeWidget(TQString title, - TQWidget *parent, + TQWidget *tqparent, Composition *composition, timeT startTime, timeT duration, bool editable, bool constrainToCompositionDuration) : - TQGroupBox(1, Horizontal, title, parent), + TQGroupBox(1, Qt::Horizontal, title, tqparent), m_composition(composition), m_isDuration(true), m_constrain(constrainToCompositionDuration), @@ -93,14 +93,14 @@ TimeWidget::init(bool editable) editable = true; TQFrame *frame = new TQFrame(this); - TQGridLayout *layout = new TQGridLayout(frame, 7, 3, 5, 5); + TQGridLayout *tqlayout = new TQGridLayout(frame, 7, 3, 5, 5); TQLabel *label = 0; if (m_isDuration) { label = new TQLabel(i18n("Note:"), frame); - label->setAlignment(Qt::AlignRight | Qt::AlignVCenter); - layout->addWidget(label, 0, 0); + label->tqsetAlignment(TQt::AlignRight | TQt::AlignVCenter); + tqlayout->addWidget(label, 0, 0); if (editable) { m_note = new TQComboBox(frame); @@ -118,7 +118,7 @@ TimeWidget::init(bool editable) timeT error = 0; TQString label = NotationStrings::makeNoteMenuLabel (dottedDuration, false, error); - TQPixmap pmap = NotePixmapFactory::toQPixmap + TQPixmap pmap = NotePixmapFactory::toTQPixmap (NotePixmapFactory::makeNoteMenuPixmap(dottedDuration, error)); m_note->insertItem(pmap, label); // ignore error } @@ -127,13 +127,13 @@ TimeWidget::init(bool editable) timeT error = 0; TQString label = NotationStrings::makeNoteMenuLabel (duration, false, error); - TQPixmap pmap = NotePixmapFactory::toQPixmap + TQPixmap pmap = NotePixmapFactory::toTQPixmap (NotePixmapFactory::makeNoteMenuPixmap(duration, error)); m_note->insertItem(pmap, label); // ignore error } connect(m_note, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotNoteChanged(int))); - layout->addMultiCellWidget(m_note, 0, 0, 1, 3); + tqlayout->addMultiCellWidget(m_note, 0, 0, 1, 3); } else { @@ -145,12 +145,12 @@ TimeWidget::init(bool editable) label = i18n("<inexact>"); TQLineEdit *le = new TQLineEdit(label, frame); le->setReadOnly(true); - layout->addMultiCellWidget(le, 0, 0, 1, 3); + tqlayout->addMultiCellWidget(le, 0, 0, 1, 3); } label = new TQLabel(i18n("Units:"), frame); - label->setAlignment(Qt::AlignRight | Qt::AlignVCenter); - layout->addWidget(label, 0, 4); + label->tqsetAlignment(TQt::AlignRight | TQt::AlignVCenter); + tqlayout->addWidget(label, 0, 4); if (editable) { m_timeT = new TQSpinBox(frame); @@ -158,12 +158,12 @@ TimeWidget::init(bool editable) (Note(Note::Shortest).getDuration()); connect(m_timeT, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotTimeTChanged(int))); - layout->addWidget(m_timeT, 0, 5); + tqlayout->addWidget(m_timeT, 0, 5); } else { m_timeT = 0; - TQLineEdit *le = new TQLineEdit(TQString("%1").arg(m_time), frame); + TQLineEdit *le = new TQLineEdit(TQString("%1").tqarg(m_time), frame); le->setReadOnly(true); - layout->addWidget(le, 0, 5); + tqlayout->addWidget(le, 0, 5); } } else { @@ -171,8 +171,8 @@ TimeWidget::init(bool editable) m_note = 0; label = new TQLabel(i18n("Time:"), frame); - label->setAlignment(Qt::AlignRight | Qt::AlignVCenter); - layout->addWidget(label, 0, 0); + label->tqsetAlignment(TQt::AlignRight | TQt::AlignVCenter); + tqlayout->addWidget(label, 0, 0); if (editable) { m_timeT = new TQSpinBox(frame); @@ -180,19 +180,19 @@ TimeWidget::init(bool editable) (Note(Note::Shortest).getDuration()); connect(m_timeT, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotTimeTChanged(int))); - layout->addWidget(m_timeT, 0, 1); - layout->addWidget(new TQLabel(i18n("units"), frame), 0, 2); + tqlayout->addWidget(m_timeT, 0, 1); + tqlayout->addWidget(new TQLabel(i18n("units"), frame), 0, 2); } else { m_timeT = 0; - TQLineEdit *le = new TQLineEdit(TQString("%1").arg(m_time), frame); + TQLineEdit *le = new TQLineEdit(TQString("%1").tqarg(m_time), frame); le->setReadOnly(true); - layout->addWidget(le, 0, 2); + tqlayout->addWidget(le, 0, 2); } } label = new TQLabel(m_isDuration ? i18n("Measures:") : i18n("Measure:"), frame); - label->setAlignment(Qt::AlignRight | Qt::AlignVCenter); - layout->addWidget(label, 1, 0); + label->tqsetAlignment(TQt::AlignRight | TQt::AlignVCenter); + tqlayout->addWidget(label, 1, 0); if (editable) { m_barLabel = 0; @@ -201,17 +201,17 @@ TimeWidget::init(bool editable) m_bar->setMinValue(0); connect(m_bar, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotBarBeatOrFractionChanged(int))); - layout->addWidget(m_bar, 1, 1); + tqlayout->addWidget(m_bar, 1, 1); } else { m_bar = 0; m_barLabel = new TQLineEdit(frame); m_barLabel->setReadOnly(true); - layout->addWidget(m_barLabel, 1, 1); + tqlayout->addWidget(m_barLabel, 1, 1); } label = new TQLabel(m_isDuration ? i18n("beats:") : i18n("beat:"), frame); - label->setAlignment(Qt::AlignRight | Qt::AlignVCenter); - layout->addWidget(label, 1, 2); + label->tqsetAlignment(TQt::AlignRight | TQt::AlignVCenter); + tqlayout->addWidget(label, 1, 2); if (editable) { m_beatLabel = 0; @@ -219,20 +219,20 @@ TimeWidget::init(bool editable) m_beat->setMinValue(1); connect(m_beat, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotBarBeatOrFractionChanged(int))); - layout->addWidget(m_beat, 1, 3); + tqlayout->addWidget(m_beat, 1, 3); } else { m_beat = 0; m_beatLabel = new TQLineEdit(frame); m_beatLabel->setReadOnly(true); - layout->addWidget(m_beatLabel, 1, 3); + tqlayout->addWidget(m_beatLabel, 1, 3); } - label = new TQLabel(i18n("%1:").arg(NotationStrings::getShortNoteName + label = new TQLabel(i18n("%1:").tqarg(NotationStrings::getShortNoteName (Note (Note::Shortest), true)), frame); - label->setAlignment(Qt::AlignRight | Qt::AlignVCenter); - layout->addWidget(label, 1, 4); + label->tqsetAlignment(TQt::AlignRight | TQt::AlignVCenter); + tqlayout->addWidget(label, 1, 4); if (editable) { m_fractionLabel = 0; @@ -240,20 +240,20 @@ TimeWidget::init(bool editable) m_fraction->setMinValue(1); connect(m_fraction, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotBarBeatOrFractionChanged(int))); - layout->addWidget(m_fraction, 1, 5); + tqlayout->addWidget(m_fraction, 1, 5); } else { m_fraction = 0; m_fractionLabel = new TQLineEdit(frame); m_fractionLabel->setReadOnly(true); - layout->addWidget(m_fractionLabel, 1, 5); + tqlayout->addWidget(m_fractionLabel, 1, 5); } m_timeSig = new TQLabel(frame); - layout->addWidget(m_timeSig, 1, 6); + tqlayout->addWidget(m_timeSig, 1, 6); label = new TQLabel(i18n("Seconds:"), frame); - label->setAlignment(Qt::AlignRight | Qt::AlignVCenter); - layout->addWidget(label, 2, 0); + label->tqsetAlignment(TQt::AlignRight | TQt::AlignVCenter); + tqlayout->addWidget(label, 2, 0); if (editable) { m_secLabel = 0; @@ -262,17 +262,17 @@ TimeWidget::init(bool editable) m_sec->setMinValue(0); connect(m_sec, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotSecOrMSecChanged(int))); - layout->addWidget(m_sec, 2, 1); + tqlayout->addWidget(m_sec, 2, 1); } else { m_sec = 0; m_secLabel = new TQLineEdit(frame); m_secLabel->setReadOnly(true); - layout->addWidget(m_secLabel, 2, 1); + tqlayout->addWidget(m_secLabel, 2, 1); } label = new TQLabel(i18n("msec:"), frame); - label->setAlignment(Qt::AlignRight | Qt::AlignVCenter); - layout->addWidget(label, 2, 2); + label->tqsetAlignment(TQt::AlignRight | TQt::AlignVCenter); + tqlayout->addWidget(label, 2, 2); if (editable) { m_msecLabel = 0; @@ -281,17 +281,17 @@ TimeWidget::init(bool editable) m_msec->setLineStep(10); connect(m_msec, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotSecOrMSecChanged(int))); - layout->addWidget(m_msec, 2, 3); + tqlayout->addWidget(m_msec, 2, 3); } else { m_msec = 0; m_msecLabel = new TQLineEdit(frame); m_msecLabel->setReadOnly(true); - layout->addWidget(m_msecLabel, 2, 3); + tqlayout->addWidget(m_msecLabel, 2, 3); } if (m_isDuration) { m_tempo = new TQLabel(frame); - layout->addWidget(m_tempo, 2, 6); + tqlayout->addWidget(m_tempo, 2, 6); } else { m_tempo = 0; } @@ -383,7 +383,7 @@ TimeWidget::populate() } m_bar->setValue(bars); } else { - m_barLabel->setText(TQString("%1").arg(bars)); + m_barLabel->setText(TQString("%1").tqarg(bars)); } if (m_beat) { @@ -391,7 +391,7 @@ TimeWidget::populate() m_beat->setMaxValue(timeSig.getBeatsPerBar() - 1); m_beat->setValue(beats); } else { - m_beatLabel->setText(TQString("%1").arg(beats)); + m_beatLabel->setText(TQString("%1").tqarg(beats)); } if (m_fraction) { @@ -401,10 +401,10 @@ TimeWidget::populate() getDuration() - 1); m_fraction->setValue(hemidemis); } else { - m_fractionLabel->setText(TQString("%1").arg(hemidemis)); + m_fractionLabel->setText(TQString("%1").tqarg(hemidemis)); } - m_timeSig->setText(i18n("(%1/%2 time)").arg(timeSig.getNumerator()). + m_timeSig->setText(i18n("(%1/%2 time)").tqarg(timeSig.getNumerator()). arg(timeSig.getDenominator())); timeT endTime = m_startTime + m_time; @@ -422,7 +422,7 @@ TimeWidget::populate() } m_sec->setValue(rt.sec); } else { - m_secLabel->setText(TQString("%1").arg(rt.sec)); + m_secLabel->setText(TQString("%1").tqarg(rt.sec)); } if (m_msec) { @@ -430,7 +430,7 @@ TimeWidget::populate() m_msec->setMaxValue(999); m_msec->setValue(rt.msec()); } else { - m_msecLabel->setText(TQString("%1").arg(rt.msec())); + m_msecLabel->setText(TQString("%1").tqarg(rt.msec())); } bool change = (m_composition->getTempoChangeNumberAt(endTime) != @@ -507,7 +507,7 @@ TimeWidget::populate() } m_bar->setValue(bar + 1); } else { - m_barLabel->setText(TQString("%1").arg(bar + 1)); + m_barLabel->setText(TQString("%1").tqarg(bar + 1)); } if (m_beat) { @@ -515,7 +515,7 @@ TimeWidget::populate() m_beat->setMaxValue(timeSig.getBeatsPerBar()); m_beat->setValue(beat); } else { - m_beatLabel->setText(TQString("%1").arg(beat)); + m_beatLabel->setText(TQString("%1").tqarg(beat)); } if (m_fraction) { @@ -525,10 +525,10 @@ TimeWidget::populate() getDuration() - 1); m_fraction->setValue(hemidemis); } else { - m_fractionLabel->setText(TQString("%1").arg(hemidemis)); + m_fractionLabel->setText(TQString("%1").tqarg(hemidemis)); } - m_timeSig->setText(i18n("(%1/%2 time)").arg(timeSig.getNumerator()). + m_timeSig->setText(i18n("(%1/%2 time)").tqarg(timeSig.getNumerator()). arg(timeSig.getDenominator())); RealTime rt = m_composition->getElapsedRealTime(m_time); @@ -543,7 +543,7 @@ TimeWidget::populate() } m_sec->setValue(rt.sec); } else { - m_secLabel->setText(TQString("%1").arg(rt.sec)); + m_secLabel->setText(TQString("%1").tqarg(rt.sec)); } if (m_msec) { @@ -551,7 +551,7 @@ TimeWidget::populate() m_msec->setMaxValue(999); m_msec->setValue(rt.msec()); } else { - m_msecLabel->setText(TQString("%1").arg(rt.msec())); + m_msecLabel->setText(TQString("%1").tqarg(rt.msec())); } } diff --git a/src/gui/widgets/TimeWidget.h b/src/gui/widgets/TimeWidget.h index 874981d..4ede052 100644 --- a/src/gui/widgets/TimeWidget.h +++ b/src/gui/widgets/TimeWidget.h @@ -46,15 +46,16 @@ namespace Rosegarden class Composition; -class TimeWidget : public QGroupBox +class TimeWidget : public TQGroupBox { Q_OBJECT + TQ_OBJECT public: /** * Constructor for absolute time widget */ TimeWidget(TQString title, - TQWidget *parent, + TQWidget *tqparent, Composition *composition, // for bar/beat/msec timeT initialTime, bool editable = true, @@ -66,7 +67,7 @@ public: * correct real-time (based on tempo at startTime) etc. */ TimeWidget(TQString title, - TQWidget *parent, + TQWidget *tqparent, Composition *composition, // for bar/beat/msec timeT startTime, timeT initialDuration, diff --git a/src/gui/widgets/TristateCheckBox.h b/src/gui/widgets/TristateCheckBox.h index 30e7db0..4d8f318 100644 --- a/src/gui/widgets/TristateCheckBox.h +++ b/src/gui/widgets/TristateCheckBox.h @@ -42,12 +42,13 @@ namespace Rosegarden * and allows us to click only between on and off * and only to _show_ the third ("Some") state */ -class TristateCheckBox : public QCheckBox +class TristateCheckBox : public TQCheckBox { Q_OBJECT + TQ_OBJECT public: - TristateCheckBox(TQWidget *parent=0, - const char *name=0):TQCheckBox(parent, name) + TristateCheckBox(TQWidget *tqparent=0, + const char *name=0):TQCheckBox(tqparent, name) { setTristate(true) ;} virtual ~TristateCheckBox(); diff --git a/src/gui/widgets/VUMeter.cpp b/src/gui/widgets/VUMeter.cpp index 1a6d90d..d963cc6 100644 --- a/src/gui/widgets/VUMeter.cpp +++ b/src/gui/widgets/VUMeter.cpp @@ -40,19 +40,19 @@ namespace Rosegarden { -VUMeter::VUMeter(TQWidget *parent, +VUMeter::VUMeter(TQWidget *tqparent, VUMeterType type, bool stereo, bool hasRecord, int width, int height, - VUAlignment alignment, + VUAlignment tqalignment, const char *name): - TQLabel(parent, name), + TQLabel(tqparent, name), m_originalHeight(height), m_active(true), m_type(type), - m_alignment(alignment), + m_tqalignment(tqalignment), m_levelLeft(0), m_recordLevelLeft(0), m_peakLevelLeft(0), @@ -121,7 +121,7 @@ VUMeter::VUMeter(TQWidget *parent, setMinimumSize(width, m_originalHeight); setMaximumSize(width, m_originalHeight); - if (m_alignment == Vertical) + if (m_tqalignment == Vertical) m_maxLevel = height; else m_maxLevel = width; @@ -153,7 +153,7 @@ VUMeter::VUMeter(TQWidget *parent, red = max * 92 / 100; orange = max * 60 / 100; green = max * 10 / 100; - m_background = Qt::black; + m_background = TQt::black; } if (m_type == AudioPeakHoldLong || @@ -336,7 +336,7 @@ VUMeter::paintEvent(TQPaintEvent *e) drawMeterLevel(&paint); - paint.setPen(colorGroup().background()); + paint.setPen(tqcolorGroup().background()); paint.drawPoint(0, 0); paint.drawPoint(width() - 1, 0); paint.drawPoint(0, height() - 1); @@ -376,12 +376,12 @@ VUMeter::drawColouredBar(TQPainter *paint, int channel, m_type == AudioPeakHoldIEC || m_type == AudioPeakHoldIECLong) { - Qt::BrushStyle style = Qt::SolidPattern; + TQt::BrushStyle style = TQt::SolidPattern; int medium = m_velocityColour->getMediumKnee(), loud = m_velocityColour->getLoudKnee(); - if (m_alignment == Vertical) { + if (m_tqalignment == Vertical) { if (h > loud) { paint->setPen(m_velocityColour->getLoudColour()); paint->setBrush(TQBrush(m_velocityColour->getLoudColour(), @@ -397,7 +397,7 @@ VUMeter::drawColouredBar(TQPainter *paint, int channel, } } - if (m_alignment == Vertical) { + if (m_tqalignment == Vertical) { if (h > medium) { paint->setPen(m_velocityColour->getMediumColour()); paint->setBrush(TQBrush(m_velocityColour->getMediumColour(), @@ -415,7 +415,7 @@ VUMeter::drawColouredBar(TQPainter *paint, int channel, } } - if (m_alignment == Vertical) { + if (m_tqalignment == Vertical) { paint->setPen(m_velocityColour->getQuietColour()); paint->setBrush(TQBrush(m_velocityColour->getQuietColour(), style)); @@ -458,7 +458,7 @@ VUMeter::drawMeterLevel(TQPainter* paint) loud = m_velocityColour->getLoudKnee(); if (m_stereo) { - if (m_alignment == VUMeter::Vertical) { + if (m_tqalignment == VUMeter::Vertical) { int hW = width() / 2; int midWidth = 1; @@ -492,12 +492,12 @@ VUMeter::drawMeterLevel(TQPainter* paint) y = height() - h; if (h > loud) { - paint->setPen(Qt::red); // brighter than the red meter bar + paint->setPen(TQt::red); // brighter than the red meter bar paint->drawLine(0, y - 1, hW - midWidth - 1, y - 1); paint->drawLine(0, y + 1, hW - midWidth - 1, y + 1); } - paint->setPen(Qt::white); + paint->setPen(TQt::white); paint->drawLine(0, y, hW - midWidth - 1, y); } @@ -524,13 +524,13 @@ VUMeter::drawMeterLevel(TQPainter* paint) y = height() - h; if (h > loud) { - paint->setPen(Qt::red); // brighter than the red meter bar + paint->setPen(TQt::red); // brighter than the red meter bar paint->drawLine(hW + midWidth, y - 1, width(), y - 1); paint->drawLine(hW + midWidth, y + 1, width(), y + 1); } - paint->setPen(Qt::white); - paint->setBrush(Qt::white); + paint->setPen(TQt::white); + paint->setBrush(TQt::white); paint->drawLine(hW + midWidth, y, width(), y); } @@ -545,8 +545,8 @@ VUMeter::drawMeterLevel(TQPainter* paint) paint->drawRect(0, 0, x, height()); if (m_showPeakLevel) { - paint->setPen(Qt::white); - paint->setBrush(Qt::white); + paint->setPen(TQt::white); + paint->setBrush(TQt::white); // show peak level x = m_peakLevelLeft * width() / m_maxLevel; @@ -561,7 +561,7 @@ VUMeter::drawMeterLevel(TQPainter* paint) } else { // Paint a vertical meter according to type // - if (m_alignment == VUMeter::Vertical) { + if (m_tqalignment == VUMeter::Vertical) { int y = height() - (m_levelLeft * height()) / m_maxLevel; drawColouredBar(paint, 0, 0, y, width(), height()); @@ -575,8 +575,8 @@ VUMeter::drawMeterLevel(TQPainter* paint) */ if (m_showPeakLevel) { - paint->setPen(Qt::white); - paint->setBrush(Qt::white); + paint->setPen(TQt::white); + paint->setBrush(TQt::white); y = height() - (m_peakLevelLeft * height()) / m_maxLevel; @@ -592,8 +592,8 @@ VUMeter::drawMeterLevel(TQPainter* paint) paint->drawRect(x, 0, width() - x, height()); if (m_showPeakLevel) { - paint->setPen(Qt::white); - paint->setBrush(Qt::white); + paint->setPen(TQt::white); + paint->setBrush(TQt::white); // show peak level x = (m_peakLevelLeft * width()) / m_maxLevel; diff --git a/src/gui/widgets/VUMeter.h b/src/gui/widgets/VUMeter.h index fd75b9a..610d87c 100644 --- a/src/gui/widgets/VUMeter.h +++ b/src/gui/widgets/VUMeter.h @@ -42,9 +42,10 @@ namespace Rosegarden class VelocityColour; -class VUMeter : public QLabel +class VUMeter : public TQLabel { Q_OBJECT + TQ_OBJECT public: typedef enum @@ -82,13 +83,13 @@ protected: // Constructor is protected - we can only create an object // from a sub-class of this type from a sub-class. // - VUMeter(TQWidget *parent = 0, + VUMeter(TQWidget *tqparent = 0, VUMeterType type = Plain, bool stereo = false, bool hasRecord = false, int width = 0, int height = 0, - VUAlignment alignment = Horizontal, + VUAlignment tqalignment = Horizontal, const char *name = 0); ~VUMeter(); @@ -114,7 +115,7 @@ private: int x, int y, int w, int h); VUMeterType m_type; - VUAlignment m_alignment; + VUAlignment m_tqalignment; TQColor m_background; short m_maxLevel; diff --git a/src/gui/widgets/WheelyButton.h b/src/gui/widgets/WheelyButton.h index 050fd9b..17dd803 100644 --- a/src/gui/widgets/WheelyButton.h +++ b/src/gui/widgets/WheelyButton.h @@ -38,9 +38,10 @@ namespace Rosegarden -class WheelyButton : public QPushButton +class WheelyButton : public TQPushButton { Q_OBJECT + TQ_OBJECT public: WheelyButton(TQWidget *w) : TQPushButton(w) { } diff --git a/src/gui/widgets/ZoomSlider.h b/src/gui/widgets/ZoomSlider.h index 9f4235a..9cf58ab 100644 --- a/src/gui/widgets/ZoomSlider.h +++ b/src/gui/widgets/ZoomSlider.h @@ -40,7 +40,7 @@ namespace Rosegarden template <class T> -class ZoomSlider : public QSlider +class ZoomSlider : public TQSlider { public: @@ -60,7 +60,7 @@ public: * to the user as a nice continuous range. */ ZoomSlider(const std::vector<T> &sizes, T defaultValue, - Orientation, TQWidget * parent, const char * name=0); + Qt::Orientation, TQWidget * tqparent, const char * name=0); virtual ~ZoomSlider(); @@ -84,10 +84,10 @@ protected: template<class T> ZoomSlider<T>::ZoomSlider(const std::vector<T> &sizes, - T initialSize, Orientation o, - TQWidget *parent, const char *name) : + T initialSize, Qt::Orientation o, + TQWidget *tqparent, const char *name) : TQSlider(0, sizes.size()-1, 1, - getIndex(sizes, initialSize), o, parent, name), + getIndex(sizes, initialSize), o, tqparent, name), m_sizes(sizes), m_defaultValue(initialSize) { diff --git a/src/misc/Debug.cpp b/src/misc/Debug.cpp index 751c3ce..5f23613 100644 --- a/src/misc/Debug.cpp +++ b/src/misc/Debug.cpp @@ -307,8 +307,8 @@ operator<<(kdbgstream &dbg, const TQRegion& reg ) TQMemArray<TQRect>rs = reg.rects(); for (uint i = 0;i < rs.size();++i) - dbg << TQString("[%1,%2 - %3x%4] ").arg(rs[i].x()).arg(rs[i].y()) - .arg(rs[i].width()).arg(rs[i].height() ) ; + dbg << TQString("[%1,%2 - %3x%4] ").tqarg(rs[i].x()).tqarg(rs[i].y()) + .tqarg(rs[i].width()).tqarg(rs[i].height() ) ; dbg << "]"; return dbg; diff --git a/src/misc/Debug.h b/src/misc/Debug.h index 598dd6c..ca245bc 100644 --- a/src/misc/Debug.h +++ b/src/misc/Debug.h @@ -54,7 +54,7 @@ namespace Rosegarden { class Event; class Segment; class RealTime; class Colour; #define NOTATION_DEBUG kdDebug(KDEBUG_AREA_NOTATION) #define MATRIX_DEBUG kdDebug(KDEBUG_AREA_MATRIX) #define SEQUENCER_DEBUG kdDebug(KDEBUG_AREA_SEQUENCER) -#define SEQMAN_DEBUG kdDebug(KDEBUG_AREA_SEQUENCEMANAGER) +#define SETQMAN_DEBUG kdDebug(KDEBUG_AREA_SEQUENCEMANAGER) #ifndef NDEBUG diff --git a/src/misc/stableheaders.h b/src/misc/stableheaders.h index ddc3f5d..07f7cef 100644 --- a/src/misc/stableheaders.h +++ b/src/misc/stableheaders.h @@ -29,12 +29,12 @@ // QT3 headers -// Common headers, or used by sources generated by moc +// Common headers, or used by sources generated by tqmoc #include <tqmap.h> #include <tqglobal.h> -#include <private/qucomextra_p.h> +#include <private/tqucomextra_p.h> #include <tqmetaobject.h> -#include <qobjectdefs.h> +#include <tqobjectdefs.h> #include <tqsignalslotimp.h> #include <tqstyle.h> diff --git a/src/sequencer/ControlBlockMmapper.cpp b/src/sequencer/ControlBlockMmapper.cpp index 95f2a16..51389de 100644 --- a/src/sequencer/ControlBlockMmapper.cpp +++ b/src/sequencer/ControlBlockMmapper.cpp @@ -45,7 +45,7 @@ ControlBlockMmapper::ControlBlockMmapper(TQString fileName) m_fd = ::open(m_fileName.latin1(), O_RDWR); if (m_fd < 0) { - SEQMAN_DEBUG << "ControlBlockMmapper : Couldn't open " << m_fileName + SETQMAN_DEBUG << "ControlBlockMmapper : Couldn't open " << m_fileName << endl; throw Exception(std::string("Couldn't open ") + m_fileName.latin1()); @@ -60,12 +60,12 @@ ControlBlockMmapper::ControlBlockMmapper(TQString fileName) if (m_mmappedBuffer == (void*) - 1) { SEQUENCER_DEBUG << TQString("mmap failed : (%1) %2\n"). - arg(errno).arg(strerror(errno)); + tqarg(errno).tqarg(strerror(errno)); throw Exception("mmap failed"); } - SEQMAN_DEBUG << "ControlBlockMmapper : mmap size : " << m_mmappedSize + SETQMAN_DEBUG << "ControlBlockMmapper : mmap size : " << m_mmappedSize << " at " << (void*)m_mmappedBuffer << endl; // Create new control block on file diff --git a/src/sequencer/MmappedSegment.cpp b/src/sequencer/MmappedSegment.cpp index 2176bdd..2cdffe0 100644 --- a/src/sequencer/MmappedSegment.cpp +++ b/src/sequencer/MmappedSegment.cpp @@ -49,7 +49,7 @@ MmappedSegment::MmappedSegment(const TQString filename) bool MmappedSegment::isMetronome() { - return (getFileName().contains("metronome", false) > 0); + return (getFileName().tqcontains("metronome", false) > 0); } @@ -71,7 +71,7 @@ void MmappedSegment::map() if (m_mmappedRegion == (void*) - 1) { SEQUENCER_DEBUG << TQString("mmap failed : (%1) %2\n"). - arg(errno).arg(strerror(errno)); + tqarg(errno).tqarg(strerror(errno)); throw Exception("mmap failed"); } @@ -146,7 +146,7 @@ bool MmappedSegment::remap(size_t newSize) if (m_mmappedRegion == (void*) - 1) { SEQUENCER_DEBUG << TQString("mremap failed : (%1) %2\n"). - arg(errno).arg(strerror(errno)); + tqarg(errno).tqarg(strerror(errno)); throw Exception("mremap failed"); } diff --git a/src/sequencer/RosegardenSequencerApp.cpp b/src/sequencer/RosegardenSequencerApp.cpp index 179820f..0aabda1 100644 --- a/src/sequencer/RosegardenSequencerApp.cpp +++ b/src/sequencer/RosegardenSequencerApp.cpp @@ -66,7 +66,7 @@ namespace Rosegarden RosegardenSequencerApp::RosegardenSequencerApp() : DCOPObject("RosegardenSequencerIface"), m_driver(0), - m_transportStatus(STOPPED), + m_transporttqStatus(STOPPED), m_songPosition(0, 0), m_lastFetchSongPosition(0, 0), m_readAhead(0, 80000000), // default value @@ -143,7 +143,7 @@ RosegardenSequencerApp::quit() close(); // and break out of the loop next time around - m_transportStatus = QUIT; + m_transporttqStatus = TQUIT; } @@ -152,7 +152,7 @@ RosegardenSequencerApp::stop() { // set our state at this level to STOPPING (pending any // unfinished NOTES) - m_transportStatus = STOPPING; + m_transporttqStatus = STOPPING; // report // @@ -186,7 +186,7 @@ RosegardenSequencerApp::fetchEvents(MappedComposition &composition, { // Always return nothing if we're stopped // - if ( m_transportStatus == STOPPED || m_transportStatus == STOPPING ) + if ( m_transporttqStatus == STOPPED || m_transporttqStatus == STOPPING ) return ; // If we're looping then we should get as much of the rest of @@ -361,8 +361,8 @@ RosegardenSequencerApp::updateClocks() // If we're not playing etc. then that's all we need to do // - if (m_transportStatus != PLAYING && - m_transportStatus != RECORDING) + if (m_transporttqStatus != PLAYING && + m_transporttqStatus != RECORDING) return ; RealTime newPosition = m_driver->getSequencerTime(); @@ -409,19 +409,19 @@ RosegardenSequencerApp::updateClocks() } void -RosegardenSequencerApp::notifySequencerStatus() +RosegardenSequencerApp::notifySequencertqStatus() { TQByteArray data, replyData; TQCString replyType; TQDataStream arg(data, IO_WriteOnly); - arg << (int)m_transportStatus; + arg << (int)m_transporttqStatus; if (!kapp->dcopClient()->send(ROSEGARDEN_GUI_APP_NAME, ROSEGARDEN_GUI_IFACE_NAME, - "notifySequencerStatus(int)", + "notifySequencertqStatus(int)", data)) { - SEQUENCER_DEBUG << "RosegardenSequencer::notifySequencerStatus()" + SEQUENCER_DEBUG << "RosegardenSequencer::notifySequencertqStatus()" << " - can't send to RosegardenGUI client" << endl; @@ -645,12 +645,12 @@ RosegardenSequencerApp::record(const RealTime &time, long smallFileSize, long recordMode) { - TransportStatus localRecordMode = (TransportStatus) recordMode; + TransporttqStatus localRecordMode = (TransporttqStatus) recordMode; - SEQUENCER_DEBUG << "RosegardenSequencerApp::record - recordMode is " << recordMode << ", transport status is " << m_transportStatus << endl; + SEQUENCER_DEBUG << "RosegardenSequencerApp::record - recordMode is " << recordMode << ", transport status is " << m_transporttqStatus << endl; // punch in recording - if (m_transportStatus == PLAYING) { + if (m_transporttqStatus == PLAYING) { if (localRecordMode == STARTING_TO_RECORD) { SEQUENCER_DEBUG << "RosegardenSequencerApp::record: punching in" << endl; localRecordMode = RECORDING; // no need to start playback @@ -758,7 +758,7 @@ RosegardenSequencerApp::record(const RealTime &time, // Now set the local transport status to the record mode // // - m_transportStatus = localRecordMode; + m_transporttqStatus = localRecordMode; if (localRecordMode == RECORDING) { // punch in return 1; @@ -787,14 +787,14 @@ RosegardenSequencerApp::play(const RealTime &time, const RealTime &audioWrite, long smallFileSize) { - if (m_transportStatus == PLAYING || - m_transportStatus == STARTING_TO_PLAY) + if (m_transporttqStatus == PLAYING || + m_transporttqStatus == STARTING_TO_PLAY) return true; // Check for record toggle (punch out) // - if (m_transportStatus == RECORDING) { - m_transportStatus = PLAYING; + if (m_transporttqStatus == RECORDING) { + m_transporttqStatus = PLAYING; return punchOut(); } @@ -809,9 +809,9 @@ RosegardenSequencerApp::play(const RealTime &time, (m_songPosition); } - if (m_transportStatus != RECORDING && - m_transportStatus != STARTING_TO_RECORD) { - m_transportStatus = STARTING_TO_PLAY; + if (m_transporttqStatus != RECORDING && + m_transporttqStatus != STARTING_TO_RECORD) { + m_transporttqStatus = STARTING_TO_PLAY; } m_driver->stopClocks(); @@ -898,9 +898,9 @@ RosegardenSequencerApp::punchOut() { // Check for record toggle (punch out) // - if (m_transportStatus == RECORDING) { + if (m_transporttqStatus == RECORDING) { m_driver->punchOut(); - m_transportStatus = PLAYING; + m_transporttqStatus = PLAYING; return true; } return false; @@ -943,7 +943,7 @@ void RosegardenSequencerApp::cleanupMmapData() void RosegardenSequencerApp::remapSegment(const TQString& filename, size_t newSize) { - if (m_transportStatus != PLAYING) + if (m_transporttqStatus != PLAYING) return ; SEQUENCER_DEBUG << "RosegardenSequencerApp::remapSegment(" << filename << ")\n"; @@ -955,7 +955,7 @@ void RosegardenSequencerApp::remapSegment(const TQString& filename, size_t newSi void RosegardenSequencerApp::addSegment(const TQString& filename) { - if (m_transportStatus != PLAYING) + if (m_transporttqStatus != PLAYING) return ; SEQUENCER_DEBUG << "MmappedSegment::addSegment(" << filename << ")\n"; @@ -968,7 +968,7 @@ void RosegardenSequencerApp::addSegment(const TQString& filename) void RosegardenSequencerApp::deleteSegment(const TQString& filename) { - if (m_transportStatus != PLAYING) + if (m_transporttqStatus != PLAYING) return ; SEQUENCER_DEBUG << "MmappedSegment::deleteSegment(" << filename << ")\n"; @@ -1097,18 +1097,18 @@ RosegardenSequencerApp::setLoop(long loopStartSec, // Return the status of the sound systems (audio and MIDI) // unsigned int -RosegardenSequencerApp::getSoundDriverStatus(const TQString &guiVersion) +RosegardenSequencerApp::getSoundDrivertqStatus(const TQString &guiVersion) { - unsigned int driverStatus = m_driver->getStatus(); + unsigned int drivertqStatus = m_driver->gettqStatus(); if (guiVersion == VERSION) - driverStatus |= VERSION_OK; + drivertqStatus |= VERSION_OK; else { - std::cerr << "WARNING: RosegardenSequencerApp::getSoundDriverStatus: " + std::cerr << "WARNING: RosegardenSequencerApp::getSoundDrivertqStatus: " << "GUI version \"" << guiVersion << "\" does not match sequencer version \"" << VERSION << "\"" << std::endl; } - return driverStatus; + return drivertqStatus; } @@ -1250,7 +1250,7 @@ RosegardenSequencerApp::getConnections(int type, unsigned int direction) (MidiDevice::DeviceDirection)direction); } -QString +TQString RosegardenSequencerApp::getConnection(int type, unsigned int direction, unsigned int connectionNo) { @@ -1279,13 +1279,13 @@ RosegardenSequencerApp::getTimers() return m_driver->getTimers(); } -QString +TQString RosegardenSequencerApp::getTimer(unsigned int n) { return m_driver->getTimer(n); } -QString +TQString RosegardenSequencerApp::getCurrentTimer() { return m_driver->getCurrentTimer(); @@ -1483,7 +1483,7 @@ RosegardenSequencerApp::getPluginInformation() return list; } -QString +TQString RosegardenSequencerApp::getPluginProgram(int id, int bank, int program) { MappedObject *object = m_studio->getObjectById(id); @@ -1561,8 +1561,8 @@ RosegardenSequencerApp::connectMappedObjects(int id1, int id2) // When this happens we need to resynchronise our audio processing, // and this is the easiest (and most brutal) way to do it. - if (m_transportStatus == PLAYING || - m_transportStatus == RECORDING) { + if (m_transporttqStatus == PLAYING || + m_transporttqStatus == RECORDING) { RealTime seqTime = m_driver->getSequencerTime(); jumpTo(seqTime.sec, seqTime.nsec); } @@ -1637,8 +1637,8 @@ RosegardenSequencerApp::slotCheckForNewClients() { // Don't do this check if any of these conditions hold // - if (m_transportStatus == PLAYING || - m_transportStatus == RECORDING) + if (m_transporttqStatus == PLAYING || + m_transporttqStatus == RECORDING) return ; if (m_driver->checkForNewClients()) { @@ -1659,7 +1659,7 @@ RosegardenSequencerApp::setQuarterNoteLength(long timeSec, long timeNSec) RealTime(timeSec, timeNSec) / 24); } -QString +TQString RosegardenSequencerApp::getStatusLog() { return m_driver->getStatusLog(); @@ -1795,8 +1795,8 @@ RosegardenSequencerApp::checkExternalTransport() "jumpToTime(int, int)", data); - if (m_transportStatus == PLAYING || - m_transportStatus != RECORDING) { + if (m_transporttqStatus == PLAYING || + m_transporttqStatus != RECORDING) { jumpTo(pair.second.sec, pair.second.usec() * 1000); } diff --git a/src/sequencer/RosegardenSequencerApp.h b/src/sequencer/RosegardenSequencerApp.h index 72208d3..0926911 100644 --- a/src/sequencer/RosegardenSequencerApp.h +++ b/src/sequencer/RosegardenSequencerApp.h @@ -34,7 +34,7 @@ // -// include files for Qt +// include files for TQt #include <tqstrlist.h> // include files for KDE @@ -80,6 +80,7 @@ class RosegardenSequencerApp : public KMainWindow, public ExternalTransport { Q_OBJECT + TQ_OBJECT public: RosegardenSequencerApp(); @@ -161,7 +162,7 @@ public: // Return the Sound system status (audio/MIDI) // - virtual unsigned int getSoundDriverStatus(const TQString &guiVersion); + virtual unsigned int getSoundDrivertqStatus(const TQString &guiVersion); // Add and remove Audio files on the sequencer // @@ -329,9 +330,9 @@ public: - void setStatus(TransportStatus status) - { m_transportStatus = status; } - TransportStatus getStatus() { return m_transportStatus; } + void settqStatus(TransporttqStatus status) + { m_transporttqStatus = status; } + TransporttqStatus gettqStatus() { return m_transporttqStatus; } // Process the first chunk of Sequencer events bool startPlaying(); @@ -345,7 +346,7 @@ public: bool checkExternalTransport(); // Sends status changes up to GUI - void notifySequencerStatus(); + void notifySequencertqStatus(); // Send latest slice information back to GUI for display void notifyVisuals(MappedComposition *mC); @@ -460,7 +461,7 @@ protected: //--------------- Data members --------------------------------- SoundDriver *m_driver; - TransportStatus m_transportStatus; + TransporttqStatus m_transporttqStatus; // Position pointer RealTime m_songPosition; diff --git a/src/sequencer/RosegardenSequencerIface.h b/src/sequencer/RosegardenSequencerIface.h index ac401ae..f66c7e8 100644 --- a/src/sequencer/RosegardenSequencerIface.h +++ b/src/sequencer/RosegardenSequencerIface.h @@ -104,7 +104,7 @@ public: // Get the status of the Sequencer // - virtual unsigned int getSoundDriverStatus(const TQString &guiVersion) = 0; + virtual unsigned int getSoundDrivertqStatus(const TQString &guiVersion) = 0; // Add and delete audio files on the Sequencer // diff --git a/src/sequencer/SequencerMmapper.cpp b/src/sequencer/SequencerMmapper.cpp index 047878f..bc34642 100644 --- a/src/sequencer/SequencerMmapper.cpp +++ b/src/sequencer/SequencerMmapper.cpp @@ -67,7 +67,7 @@ SequencerMmapper::SequencerMmapper(): if (m_fd < 0) { SEQUENCER_DEBUG << "SequencerMmapper : Couldn't open " << m_fileName << endl; - throw Exception("Couldn't open " + std::string(m_fileName.data())); + throw Exception("Couldn't open " + std::string(m_fileName.ascii())); } setFileSize(m_mmappedSize); @@ -81,7 +81,7 @@ SequencerMmapper::SequencerMmapper(): if (m_mmappedBuffer == (void*) - 1) { SEQUENCER_DEBUG << - TQString("mmap failed : (%1) %2\n").arg(errno).arg(strerror(errno)); + TQString("mmap failed : (%1) %2\n").tqarg(errno).tqarg(strerror(errno)); throw Exception("mmap failed"); } @@ -135,7 +135,7 @@ SequencerMmapper::setFileSize(size_t size) } } -QString +TQString SequencerMmapper::createFileName() { return KGlobal::dirs()->resourceDirs("tmp").last() + diff --git a/src/sequencer/main.cpp b/src/sequencer/main.cpp index dd97510..3b6daec 100644 --- a/src/sequencer/main.cpp +++ b/src/sequencer/main.cpp @@ -70,7 +70,7 @@ int main(int argc, char *argv[]) srandom((unsigned int)time(0) * (unsigned int)getpid()); // Block signals during startup, so that child threads (inheriting - // this mask) ignore them; then after startup we can unblock them + // this tqmask) ignore them; then after startup we can unblock them // for this thread only. This trick picked up from the jackd code. sigemptyset (&_signals); sigaddset(&_signals, SIGHUP); @@ -131,21 +131,21 @@ int main(int argc, char *argv[]) // make sure the loop doesn't eat up all the // processor - we're not in that much of a rush! // - TransportStatus lastSeqStatus = roseSeq->getStatus(); + TransporttqStatus lastSeqtqStatus = roseSeq->gettqStatus(); RealTime sleepTime = RealTime(0, 10000000); - while (!_exiting && roseSeq && roseSeq->getStatus() != QUIT) { + while (!_exiting && roseSeq && roseSeq->gettqStatus() != TQUIT) { bool atLeisure = true; - switch (roseSeq->getStatus()) { + switch (roseSeq->gettqStatus()) { case STARTING_TO_PLAY: if (!roseSeq->startPlaying()) { // send result failed and stop Sequencer - roseSeq->setStatus(STOPPING); + roseSeq->settqStatus(STOPPING); } else { - roseSeq->setStatus(PLAYING); + roseSeq->settqStatus(PLAYING); } break; @@ -153,7 +153,7 @@ int main(int argc, char *argv[]) if (!roseSeq->keepPlaying()) { // there's a problem or the piece has // finished - so stop playing - roseSeq->setStatus(STOPPING); + roseSeq->settqStatus(STOPPING); } else { // process any async events // @@ -163,9 +163,9 @@ int main(int argc, char *argv[]) case STARTING_TO_RECORD: if (!roseSeq->startPlaying()) { - roseSeq->setStatus(STOPPING); + roseSeq->settqStatus(STOPPING); } else { - roseSeq->setStatus(RECORDING); + roseSeq->settqStatus(RECORDING); } break; @@ -173,7 +173,7 @@ int main(int argc, char *argv[]) if (!roseSeq->keepPlaying()) { // there's a problem or the piece has // finished - so stop playing - roseSeq->setStatus(STOPPING); + roseSeq->settqStatus(STOPPING); } else { // Now process any incoming MIDI events // and return them to the gui @@ -196,7 +196,7 @@ int main(int argc, char *argv[]) // There's no call to roseSeq to actually process the // stop, because this arises from a DCOP call from the GUI // direct to roseSeq to start with - roseSeq->setStatus(STOPPED); + roseSeq->settqStatus(STOPPED); SEQUENCER_DEBUG << "RosegardenSequencer - Stopped" << endl; break; @@ -226,10 +226,10 @@ int main(int argc, char *argv[]) // we want to process transport changes immediately if (roseSeq->checkExternalTransport()) { atLeisure = false; - } else if (lastSeqStatus != roseSeq->getStatus()) { - SEQUENCER_DEBUG << "Sequencer status changed from " << lastSeqStatus << " to " << roseSeq->getStatus() << endl; - roseSeq->notifySequencerStatus(); - lastSeqStatus = roseSeq->getStatus(); + } else if (lastSeqtqStatus != roseSeq->gettqStatus()) { + SEQUENCER_DEBUG << "Sequencer status changed from " << lastSeqtqStatus << " to " << roseSeq->gettqStatus() << endl; + roseSeq->notifySequencertqStatus(); + lastSeqtqStatus = roseSeq->gettqStatus(); atLeisure = false; } diff --git a/src/sound/AlsaDriver.cpp b/src/sound/AlsaDriver.cpp index 16a152b..176b90b 100644 --- a/src/sound/AlsaDriver.cpp +++ b/src/sound/AlsaDriver.cpp @@ -223,7 +223,7 @@ AlsaDriver::getSystemInfo() } void -AlsaDriver::showQueueStatus(int queue) +AlsaDriver::showQueuetqStatus(int queue) { int err, idx, min, max; snd_seq_queue_status_t *status; @@ -347,13 +347,13 @@ AlsaDriver::getAutoTimer(bool &wantTimerChecks) { Audit audit; - // Look for the apparent best-choice timer. + // Look for the aptqparent best-choice timer. if (m_timers.empty()) return ""; // The system RTC timer ought to be good, but it doesn't look like - // a very safe choice -- we've seen some system lockups apparently + // a very safe choice -- we've seen some system lockups aptqparently // connected with use of this timer on 2.6 kernels. So we avoid // using that as an auto option. @@ -705,7 +705,7 @@ AlsaDriver::generateInstruments() DeviceId ssiDeviceId = getSpareDeviceId(); - if (m_driverStatus & AUDIO_OK) { + if (m_drivertqStatus & AUDIO_OK) { for (int i = 0; i < count; ++i) { sprintf(number, " #%d", i + 1); std::string name = "Synth plugin" + std::string(number); @@ -743,7 +743,7 @@ AlsaDriver::generateInstruments() DeviceId audioDeviceId = getSpareDeviceId(); - if (m_driverStatus & AUDIO_OK) + if (m_drivertqStatus & AUDIO_OK) { for (int channel = 0; channel < audioCount; ++channel) { sprintf(number, " #%d", channel + 1); @@ -973,11 +973,11 @@ AlsaDriver::createMidiDevice(AlsaPortDescription *port, if (TQString(deviceName).startsWith("Anonymous MIDI device ")) { portName = TQString("out %1") - .arg(m_outputPorts.size() + 1); + .tqarg(m_outputPorts.size() + 1); } else { portName = TQString("out %1 - %2") - .arg(m_outputPorts.size() + 1) - .arg(deviceName); + .tqarg(m_outputPorts.size() + 1) + .tqarg(deviceName); } int outputPort = checkAlsaError(snd_seq_create_simple_port @@ -1154,7 +1154,7 @@ AlsaDriver::renameDevice(DeviceId id, TQString name) snd_seq_get_port_info(m_midiHandle, i->second, pinfo); TQString oldName = snd_seq_port_info_get_name(pinfo); - int sep = oldName.find(" - "); + int sep = oldName.tqfind(" - "); TQString newName; @@ -1168,13 +1168,13 @@ AlsaDriver::renameDevice(DeviceId id, TQString name) newName = oldName.left(sep + 3) + name; } - snd_seq_port_info_set_name(pinfo, newName.data()); + snd_seq_port_info_set_name(pinfo, newName.ascii()); checkAlsaError(snd_seq_set_port_info(m_midiHandle, i->second, pinfo), "renameDevice"); for (unsigned int i = 0; i < m_devices.size(); ++i) { if (m_devices[i]->getId() == id) { - m_devices[i]->setName(newName.data()); + m_devices[i]->setName(newName.ascii()); break; } } @@ -1225,7 +1225,7 @@ AlsaDriver::getConnections(Device::DeviceType type, return count; } -QString +TQString AlsaDriver::getConnection(Device::DeviceType type, MidiDevice::DeviceDirection direction, unsigned int connectionNo) @@ -1253,7 +1253,7 @@ AlsaDriver::setConnectionToDevice(MappedDevice &device, TQString connection) { ClientPortPair pair( -1, -1); if (connection && connection != "") { - pair = getPortByName(connection.data()); + pair = getPortByName(connection.ascii()); } setConnectionToDevice(device, connection, pair); } @@ -1263,7 +1263,7 @@ AlsaDriver::setConnectionToDevice(MappedDevice &device, TQString connection, const ClientPortPair &pair) { TQString prevConnection = device.getConnection().c_str(); - device.setConnection(connection.data()); + device.setConnection(connection.ascii()); if (device.getDirection() == MidiDevice::Play) { @@ -1272,7 +1272,7 @@ AlsaDriver::setConnectionToDevice(MappedDevice &device, TQString connection, if (j != m_outputPorts.end()) { if (prevConnection != "") { - ClientPortPair prevPair = getPortByName(prevConnection.data()); + ClientPortPair prevPair = getPortByName(prevConnection.ascii()); if (prevPair.first >= 0 && prevPair.second >= 0) { std::cerr << "Disconnecting my port " << j->second << " from " << prevPair.first << ":" << prevPair.second << " on reconnection" << std::endl; @@ -1286,7 +1286,7 @@ AlsaDriver::setConnectionToDevice(MappedDevice &device, TQString connection, for (MappedDeviceList::iterator k = m_devices.begin(); k != m_devices.end(); ++k) { if ((*k)->getId() != device.getId()) { - if ((*k)->getConnection() == prevConnection.data()) { + if ((*k)->getConnection() == prevConnection.ascii()) { foundElsewhere = true; break; } @@ -1323,7 +1323,7 @@ void AlsaDriver::setConnection(DeviceId id, TQString connection) { Audit audit; - ClientPortPair port(getPortByName(connection.data())); + ClientPortPair port(getPortByName(connection.ascii())); if (port.first != -1 && port.second != -1) { @@ -1349,7 +1349,7 @@ void AlsaDriver::setPlausibleConnection(DeviceId id, TQString idealConnection) { Audit audit; - ClientPortPair port(getPortByName(idealConnection.data())); + ClientPortPair port(getPortByName(idealConnection.ascii())); audit << "AlsaDriver::setPlausibleConnection: connection like " << idealConnection << " requested for device " << id << std::endl; @@ -1383,20 +1383,20 @@ AlsaDriver::setPlausibleConnection(DeviceId id, TQString idealConnection) // of the requested string. int client = -1; - int colon = idealConnection.find(":"); + int colon = idealConnection.tqfind(":"); if (colon >= 0) client = idealConnection.left(colon).toInt(); int portNo = -1; if (client > 0) { TQString remainder = idealConnection.mid(colon + 1); - int space = remainder.find(" "); + int space = remainder.tqfind(" "); if (space >= 0) portNo = remainder.left(space).toInt(); } - int firstSpace = idealConnection.find(" "); - int endOfText = idealConnection.find(TQRegExp("[^\\w ]"), firstSpace); + int firstSpace = idealConnection.tqfind(" "); + int endOfText = idealConnection.tqfind(TQRegExp("[^\\w ]"), firstSpace); TQString text; if (endOfText < 2) { @@ -1448,7 +1448,7 @@ AlsaDriver::setPlausibleConnection(DeviceId id, TQString idealConnection) } if (testName && text != "" && - !TQString(port->m_name.c_str()).contains(text)) + !TQString(port->m_name.c_str()).tqcontains(text)) continue; if (testUsed) { @@ -1507,7 +1507,7 @@ AlsaDriver::checkTimerSync(size_t frames) #ifdef HAVE_LIBJACK if (!m_jackDriver || !m_queueRunning || frames == 0 || - (getMTCStatus() == TRANSPORT_SLAVE)) { + (getMTCtqStatus() == TRANSPORT_SLAVE)) { m_firstTimerCheck = true; return ; } @@ -1587,7 +1587,7 @@ AlsaDriver::getTimers() return m_timers.size() + 1; // one extra for auto } -QString +TQString AlsaDriver::getTimer(unsigned int n) { if (n == 0) @@ -1596,7 +1596,7 @@ AlsaDriver::getTimer(unsigned int n) return m_timers[n -1].name.c_str(); } -QString +TQString AlsaDriver::getCurrentTimer() { return m_currentTimer.c_str(); @@ -1612,7 +1612,7 @@ AlsaDriver::setCurrentTimer(TQString timer) std::cerr << "AlsaDriver::setCurrentTimer(" << timer << ")" << std::endl; - std::string name(timer.data()); + std::string name(timer.ascii()); if (name == AUTO_TIMER_NAME) { name = getAutoTimer(m_doTimerChecks); @@ -1817,7 +1817,7 @@ AlsaDriver::initialiseMidi() // Modify status with MIDI success // - m_driverStatus |= MIDI_OK; + m_drivertqStatus |= MIDI_OK; generateTimerList(); setCurrentTimer(AUTO_TIMER_NAME); @@ -1851,7 +1851,7 @@ AlsaDriver::initialiseAudio() m_jackDriver = new JackDriver(this); if (m_jackDriver->isOK()) { - m_driverStatus |= AUDIO_OK; + m_drivertqStatus |= AUDIO_OK; } else { delete m_jackDriver; m_jackDriver = 0; @@ -1876,19 +1876,19 @@ AlsaDriver::initialisePlayback(const RealTime &position) m_mtcSigmaE = 0; m_mtcSigmaC = 0; - if (getMMCStatus() == TRANSPORT_MASTER) { + if (getMMCtqStatus() == TRANSPORT_MASTER) { sendMMC(127, MIDI_MMC_PLAY, true, ""); m_eat_mtc = 0; } - if (getMTCStatus() == TRANSPORT_MASTER) { + if (getMTCtqStatus() == TRANSPORT_MASTER) { insertMTCFullFrame(position); } // If MIDI Sync is enabled then adjust for the MIDI Clock to // synchronise the sequencer with the clock. // - if (getMIDISyncStatus() == TRANSPORT_MASTER) { + if (getMIDISynctqStatus() == TRANSPORT_MASTER) { // Send the Song Position Pointer for MIDI CLOCK positioning // // Get time from current alsa time to start of alsa timing - @@ -1935,11 +1935,11 @@ AlsaDriver::stopPlayback() std::cerr << "\n\nAlsaDriver - stopPlayback" << std::endl; #endif - if (getMIDISyncStatus() == TRANSPORT_MASTER) { + if (getMIDISynctqStatus() == TRANSPORT_MASTER) { sendSystemDirect(SND_SEQ_EVENT_STOP, NULL); } - if (getMMCStatus() == TRANSPORT_MASTER) { + if (getMMCtqStatus() == TRANSPORT_MASTER) { sendMMC(127, MIDI_MMC_STOP, true, ""); //<VN> need to throw away the next MTC event m_eat_mtc = 3; @@ -1992,7 +1992,7 @@ AlsaDriver::punchOut() #ifdef HAVE_LIBJACK // Close any recording file - if (m_recordStatus == RECORD_ON) { + if (m_recordtqStatus == RECORD_ON) { for (InstrumentSet::const_iterator i = m_recordingInstruments.begin(); i != m_recordingInstruments.end(); ++i) { @@ -2037,8 +2037,8 @@ AlsaDriver::punchOut() // Change recorded state if any set // - if (m_recordStatus == RECORD_ON) - m_recordStatus = RECORD_OFF; + if (m_recordtqStatus == RECORD_ON) + m_recordtqStatus = RECORD_OFF; m_recordingInstruments.clear(); } @@ -2050,12 +2050,12 @@ AlsaDriver::resetPlayback(const RealTime &oldPosition, const RealTime &position) std::cerr << "\n\nAlsaDriver - resetPlayback(" << oldPosition << "," << position << ")" << std::endl; #endif - if (getMMCStatus() == TRANSPORT_MASTER) { + if (getMMCtqStatus() == TRANSPORT_MASTER) { unsigned char t_sec = (unsigned char) position.sec % 60; unsigned char t_min = (unsigned char) (position.sec / 60) % 60; unsigned char t_hrs = (unsigned char) (position.sec / 3600); -#define STUPID_BROKEN_EQUIPMENT -#ifdef STUPID_BROKEN_EQUIPMENT +#define STUPID_BROKEN_ETQUIPMENT +#ifdef STUPID_BROKEN_ETQUIPMENT // Some recorders assume you are talking in 30fps... unsigned char t_frm = (unsigned char) (position.nsec / 33333333U); unsigned char t_sbf = (unsigned char) ((position.nsec / 333333U) % 100U); @@ -2135,7 +2135,7 @@ AlsaDriver::resetPlayback(const RealTime &oldPosition, const RealTime &position) snd_seq_remove_events_set_condition(info, SND_SEQ_REMOVE_OUTPUT); snd_seq_remove_events(m_midiHandle, info); - if (getMTCStatus() == TRANSPORT_MASTER) { + if (getMTCtqStatus() == TRANSPORT_MASTER) { m_mtcFirstTime = -1; m_mtcSigmaE = 0; m_mtcSigmaC = 0; @@ -2718,8 +2718,8 @@ AlsaDriver::getMappedComposition() case SND_SEQ_EVENT_QFRAME: if (fromController) continue; - if (getMTCStatus() == TRANSPORT_SLAVE) { - handleMTCQFrame(event->data.control.value, eventTime); + if (getMTCtqStatus() == TRANSPORT_SLAVE) { + handleMTCTQFrame(event->data.control.value, eventTime); } break; @@ -2733,7 +2733,7 @@ AlsaDriver::getMappedComposition() break; case SND_SEQ_EVENT_START: - if ((getMIDISyncStatus() == TRANSPORT_SLAVE) && !isPlaying()) { + if ((getMIDISynctqStatus() == TRANSPORT_SLAVE) && !isPlaying()) { ExternalTransport *transport = getExternalTransportControl(); if (transport) { transport->transportJump(ExternalTransport::TransportStopAtTime, @@ -2749,7 +2749,7 @@ AlsaDriver::getMappedComposition() break; case SND_SEQ_EVENT_CONTINUE: - if ((getMIDISyncStatus() == TRANSPORT_SLAVE) && !isPlaying()) { + if ((getMIDISynctqStatus() == TRANSPORT_SLAVE) && !isPlaying()) { ExternalTransport *transport = getExternalTransportControl(); if (transport) { transport->transportChange(ExternalTransport::TransportPlay); @@ -2763,7 +2763,7 @@ AlsaDriver::getMappedComposition() break; case SND_SEQ_EVENT_STOP: - if ((getMIDISyncStatus() == TRANSPORT_SLAVE) && isPlaying()) { + if ((getMIDISynctqStatus() == TRANSPORT_SLAVE) && isPlaying()) { ExternalTransport *transport = getExternalTransportControl(); if (transport) { transport->transportChange(ExternalTransport::TransportStop); @@ -2819,7 +2819,7 @@ AlsaDriver::getMappedComposition() } } - if (getMTCStatus() == TRANSPORT_SLAVE && isPlaying()) { + if (getMTCtqStatus() == TRANSPORT_SLAVE && isPlaying()) { #ifdef MTC_DEBUG std::cerr << "seq time is " << getSequencerTime() << ", last MTC receive " << m_mtcLastReceive << ", first time " << m_mtcFirstTime << std::endl; @@ -2844,9 +2844,9 @@ AlsaDriver::getMappedComposition() static int lock_count = 0; void -AlsaDriver::handleMTCQFrame(unsigned int data_byte, RealTime the_time) +AlsaDriver::handleMTCTQFrame(unsigned int data_byte, RealTime the_time) { - if (getMTCStatus() != TRANSPORT_SLAVE) + if (getMTCtqStatus() != TRANSPORT_SLAVE) return ; switch (data_byte & 0xF0) { @@ -3059,7 +3059,7 @@ AlsaDriver::insertMTCFullFrame(RealTime time) } void -AlsaDriver::insertMTCQFrames(RealTime sliceStart, RealTime sliceEnd) +AlsaDriver::insertMTCTQFrames(RealTime sliceStart, RealTime sliceEnd) { if (sliceStart == RealTime::zeroTime && sliceEnd == RealTime::zeroTime) { // not a real slice @@ -3073,7 +3073,7 @@ AlsaDriver::insertMTCQFrames(RealTime sliceStart, RealTime sliceEnd) #ifdef MTC_DEBUG - std::cout << "AlsaDriver::insertMTCQFrames(" << sliceStart << "," + std::cout << "AlsaDriver::insertMTCTQFrames(" << sliceStart << "," << sliceEnd << "): first time " << m_mtcFirstTime << std::endl; #endif @@ -3147,7 +3147,7 @@ AlsaDriver::insertMTCQFrames(RealTime sliceStart, RealTime sliceEnd) snd_seq_ev_schedule_real(&event, m_queue, 0, &atime); checkAlsaError(snd_seq_event_output(m_midiHandle, &event), - "insertMTCQFrames sending qframe event"); + "insertMTCTQFrames sending qframe event"); if (++type == 8) { m_mtcFrames += 2; @@ -3172,7 +3172,7 @@ AlsaDriver::insertMTCQFrames(RealTime sliceStart, RealTime sliceEnd) bool AlsaDriver::testForMTCSysex(const snd_seq_event_t *event) { - if (getMTCStatus() != TRANSPORT_SLAVE) + if (getMTCtqStatus() != TRANSPORT_SLAVE) return false; // At this point, and possibly for the foreseeable future, the only @@ -3344,7 +3344,7 @@ AlsaDriver::tweakSkewForMTC(int factor) bool AlsaDriver::testForMMCSysex(const snd_seq_event_t *event) { - if (getMMCStatus() != TRANSPORT_SLAVE) + if (getMMCtqStatus() != TRANSPORT_SLAVE) return false; if (event->data.ext.len != 6) @@ -3764,8 +3764,8 @@ AlsaDriver::processMidiOut(const MappedComposition &mC, processNotesOff(sliceEnd - m_playStartPosition + m_alsaPlayStartTime, now); - if (getMTCStatus() == TRANSPORT_MASTER) { - insertMTCQFrames(sliceStart, sliceEnd); + if (getMTCtqStatus() == TRANSPORT_MASTER) { + insertMTCTQFrames(sliceStart, sliceEnd); } if (m_queueRunning) { @@ -4009,7 +4009,7 @@ AlsaDriver::processEventsOut(const MappedComposition &mC, // we're really rolling. m_playing = true; - if (getMTCStatus() == TRANSPORT_SLAVE) { + if (getMTCtqStatus() == TRANSPORT_SLAVE) { tweakSkewForMTC(0); } } @@ -4155,7 +4155,7 @@ AlsaDriver::processEventsOut(const MappedComposition &mC, << std::endl; #endif - setMIDISyncStatus(TRANSPORT_OFF); + setMIDISynctqStatus(TRANSPORT_OFF); break; case 1: @@ -4167,7 +4167,7 @@ AlsaDriver::processEventsOut(const MappedComposition &mC, << std::endl; #endif - setMIDISyncStatus(TRANSPORT_MASTER); + setMIDISynctqStatus(TRANSPORT_MASTER); break; case 2: @@ -4179,7 +4179,7 @@ AlsaDriver::processEventsOut(const MappedComposition &mC, << std::endl; #endif - setMIDISyncStatus(TRANSPORT_SLAVE); + setMIDISynctqStatus(TRANSPORT_SLAVE); break; } } @@ -4274,7 +4274,7 @@ AlsaDriver::processEventsOut(const MappedComposition &mC, << std::endl; #endif - setMMCStatus(TRANSPORT_MASTER); + setMMCtqStatus(TRANSPORT_MASTER); break; case 2: @@ -4285,7 +4285,7 @@ AlsaDriver::processEventsOut(const MappedComposition &mC, << std::endl; #endif - setMMCStatus(TRANSPORT_SLAVE); + setMMCtqStatus(TRANSPORT_SLAVE); break; case 0: @@ -4297,7 +4297,7 @@ AlsaDriver::processEventsOut(const MappedComposition &mC, << std::endl; #endif - setMMCStatus(TRANSPORT_OFF); + setMMCtqStatus(TRANSPORT_OFF); break; } } @@ -4312,7 +4312,7 @@ AlsaDriver::processEventsOut(const MappedComposition &mC, << std::endl; #endif - setMTCStatus(TRANSPORT_MASTER); + setMTCtqStatus(TRANSPORT_MASTER); tweakSkewForMTC(0); m_mtcFirstTime = -1; break; @@ -4325,7 +4325,7 @@ AlsaDriver::processEventsOut(const MappedComposition &mC, << std::endl; #endif - setMTCStatus(TRANSPORT_SLAVE); + setMTCtqStatus(TRANSPORT_SLAVE); m_mtcFirstTime = -1; break; @@ -4338,7 +4338,7 @@ AlsaDriver::processEventsOut(const MappedComposition &mC, << std::endl; #endif - setMTCStatus(TRANSPORT_OFF); + setMTCtqStatus(TRANSPORT_OFF); m_mtcFirstTime = -1; break; } @@ -4477,15 +4477,15 @@ AlsaDriver::processEventsOut(const MappedComposition &mC, } bool -AlsaDriver::record(RecordStatus recordStatus, +AlsaDriver::record(RecordtqStatus recordtqStatus, const std::vector<InstrumentId> *armedInstruments, const std::vector<TQString> *audioFileNames) { m_recordingInstruments.clear(); - if (recordStatus == RECORD_ON) { + if (recordtqStatus == RECORD_ON) { // start recording - m_recordStatus = RECORD_ON; + m_recordtqStatus = RECORD_ON; m_alsaRecordStartTime = RealTime::zeroTime; unsigned int audioCount = 0; @@ -4516,13 +4516,13 @@ AlsaDriver::record(RecordStatus recordStatus, #ifdef HAVE_LIBJACK if (m_jackDriver && - m_jackDriver->openRecordFile(id, fileName.data())) { + m_jackDriver->openRecordFile(id, fileName.ascii())) { good = true; } #endif if (!good) { - m_recordStatus = RECORD_OFF; + m_recordtqStatus = RECORD_OFF; std::cerr << "AlsaDriver::record: No JACK driver, or JACK driver failed to prepare for recording audio" << std::endl; return false; } @@ -4532,8 +4532,8 @@ AlsaDriver::record(RecordStatus recordStatus, } } } else - if (recordStatus == RECORD_OFF) { - m_recordStatus = RECORD_OFF; + if (recordtqStatus == RECORD_OFF) { + m_recordtqStatus = RECORD_OFF; } #ifdef DEBUG_ALSA else { @@ -5254,7 +5254,7 @@ AlsaDriver::scavengePlugins() } -QString +TQString AlsaDriver::getStatusLog() { return TQString::fromUtf8(Audit::getAudit().c_str()); diff --git a/src/sound/AlsaDriver.h b/src/sound/AlsaDriver.h index 973fc72..a7c83ee 100644 --- a/src/sound/AlsaDriver.h +++ b/src/sound/AlsaDriver.h @@ -68,7 +68,7 @@ public: virtual MappedComposition *getMappedComposition(); - virtual bool record(RecordStatus recordStatus, + virtual bool record(RecordtqStatus recordtqStatus, const std::vector<InstrumentId> *armedInstruments = 0, const std::vector<TQString> *audioFileNames = 0); @@ -105,7 +105,7 @@ public: // Some stuff to help us debug this // void getSystemInfo(); - void showQueueStatus(int queue); + void showQueuetqStatus(int queue); // Process pending // @@ -290,7 +290,7 @@ public: // Create and enqueue a batch of MTC quarter-frame events // - void insertMTCQFrames(RealTime sliceStart, RealTime sliceEnd); + void insertMTCTQFrames(RealTime sliceStart, RealTime sliceEnd); // Create and enqueue an MTC full-frame system exclusive event // @@ -298,7 +298,7 @@ public: // Parse and accept an incoming MTC quarter-frame event // - void handleMTCQFrame(unsigned int data_byte, RealTime the_time); + void handleMTCTQFrame(unsigned int data_byte, RealTime the_time); // Check whether the given event is an MTC sysex we need to act on // (and if so act on it) diff --git a/src/sound/AudioFile.cpp b/src/sound/AudioFile.cpp index 9af3ce6..d8bed6c 100644 --- a/src/sound/AudioFile.cpp +++ b/src/sound/AudioFile.cpp @@ -61,7 +61,7 @@ AudioFile::~AudioFile() delete m_fileInfo; } -QDateTime +TQDateTime AudioFile::getModificationDateTime() { if (m_fileInfo) diff --git a/src/sound/AudioFileManager.cpp b/src/sound/AudioFileManager.cpp index 46525c4..cc919f0 100644 --- a/src/sound/AudioFileManager.cpp +++ b/src/sound/AudioFileManager.cpp @@ -537,8 +537,8 @@ AudioFileManager::createRecordingAudioFile() while (fileName == "") { fileName = TQString("rg-%1-%2.wav") - .arg(TQDateTime::currentDateTime().toString("yyyyMMdd-hhmmss")) - .arg(newId + 1); + .tqarg(TQDateTime::tqcurrentDateTime().toString("yyyyMMdd-hhmmss")) + .tqarg(newId + 1); if (TQFile(m_audioPath.c_str() + fileName).exists()) { fileName = ""; @@ -550,7 +550,7 @@ AudioFileManager::createRecordingAudioFile() WAVAudioFile *aF = 0; try { - aF = new WAVAudioFile(newId, fileName.data(), m_audioPath + fileName.data()); + aF = new WAVAudioFile(newId, fileName.ascii(), (m_audioPath.c_str() + fileName).ascii()); m_audioFiles.push_back(aF); m_recordedAudioFiles.insert(aF); } catch (SoundFile::BadSoundFileException e) { @@ -622,10 +622,10 @@ AudioFileManager::createDerivedAudioFile(AudioFileId source, while (fileName == "") { fileName = TQString("%1-%2-%3-%4.wav") - .arg(prefix) - .arg(sourceBase) - .arg(TQDateTime::currentDateTime().toString("yyyyMMdd-hhmmss")) - .arg(newId + 1); + .tqarg(prefix) + .tqarg(sourceBase.c_str()) + .tqarg(TQDateTime::tqcurrentDateTime().toString("yyyyMMdd-hhmmss")) + .tqarg(newId + 1); if (TQFile(m_audioPath.c_str() + fileName).exists()) { fileName = ""; @@ -638,8 +638,8 @@ AudioFileManager::createDerivedAudioFile(AudioFileId source, try { aF = new WAVAudioFile(newId, - fileName.data(), - m_audioPath + fileName.data()); + fileName.ascii(), + (m_audioPath.c_str() + fileName).ascii()); m_audioFiles.push_back(aF); m_derivedAudioFiles.insert(aF); } catch (SoundFile::BadSoundFileException e) { @@ -653,22 +653,22 @@ AudioFileManager::createDerivedAudioFile(AudioFileId source, AudioFileId AudioFileManager::importURL(const KURL &url, int sampleRate) { - if (url.isLocalFile()) return importFile(url.path(), sampleRate); + if (url.isLocalFile()) return importFile(url.path().ascii(), sampleRate); std::cerr << "AudioFileManager::importURL("<< url.prettyURL() << ", " << sampleRate << ")" << std::endl; - emit setOperationName(i18n("Downloading file %1").arg(url.prettyURL())); + emit setOperationName(i18n("Downloading file %1").tqarg(url.prettyURL())); TQString localPath = ""; if (!KIO::NetAccess::download(url, localPath)) { - KMessageBox::error(0, i18n("Cannot download file %1").arg(url.prettyURL())); - throw SoundFile::BadSoundFileException(url.prettyURL()); + KMessageBox::error(0, i18n("Cannot download file %1").tqarg(url.prettyURL())); + throw SoundFile::BadSoundFileException(url.prettyURL().ascii()); } AudioFileId id = 0; try { - id = importFile(localPath.data(), sampleRate); + id = importFile(localPath.ascii(), sampleRate); } catch (BadAudioPathException ape) { KIO::NetAccess::removeTempFile(localPath); throw ape; @@ -688,7 +688,7 @@ AudioFileManager::fileNeedsConversion(const std::string &fileName, *proc << "rosegarden-audiofile-importer"; if (sampleRate > 0) { *proc << "-r"; - *proc << TQString("%1").arg(sampleRate); + *proc << TQString("%1").tqarg(sampleRate); } *proc << "-w"; *proc << fileName.c_str(); @@ -715,7 +715,7 @@ AudioFileManager::importFile(const std::string &fileName, int sampleRate) *proc << "rosegarden-audiofile-importer"; if (sampleRate > 0) { *proc << "-r"; - *proc << TQString("%1").arg(sampleRate); + *proc << TQString("%1").tqarg(sampleRate); } *proc << "-w"; *proc << fileName.c_str(); @@ -753,9 +753,9 @@ AudioFileManager::importFile(const std::string &fileName, int sampleRate) while (targetName == "") { targetName = TQString("conv-%2-%3-%4.wav") - .arg(sourceBase) - .arg(TQDateTime::currentDateTime().toString("yyyyMMdd-hhmmss")) - .arg(newId + 1); + .tqarg(sourceBase) + .tqarg(TQDateTime::tqcurrentDateTime().toString("yyyyMMdd-hhmmss")) + .tqarg(newId + 1); if (TQFile(m_audioPath.c_str() + targetName).exists()) { targetName = ""; @@ -768,7 +768,7 @@ AudioFileManager::importFile(const std::string &fileName, int sampleRate) *m_importProcess << "rosegarden-audiofile-importer"; if (sampleRate > 0) { *m_importProcess << "-r"; - *m_importProcess << TQString("%1").arg(sampleRate); + *m_importProcess << TQString("%1").tqarg(sampleRate); } *m_importProcess << "-c"; *m_importProcess << fileName.c_str(); @@ -777,7 +777,7 @@ AudioFileManager::importFile(const std::string &fileName, int sampleRate) m_importProcess->start(KProcess::NotifyOnExit, KProcess::NoCommunication); while (m_importProcess->isRunning()) { - kapp->processEvents(100); + kapp->tqprocessEvents(100); } if (!m_importProcess->normalExit()) { @@ -791,7 +791,7 @@ AudioFileManager::importFile(const std::string &fileName, int sampleRate) if (es) { std::cerr << "audio file importer failed" << std::endl; - throw SoundFile::BadSoundFileException(fileName, i18n("Failed to convert or resample audio file on import")); + throw SoundFile::BadSoundFileException(fileName, i18n("Failed to convert or resample audio file on import").ascii()); } else { std::cerr << "audio file importer succeeded" << std::endl; } @@ -800,8 +800,8 @@ AudioFileManager::importFile(const std::string &fileName, int sampleRate) WAVAudioFile *aF = 0; aF = new WAVAudioFile(newId, - targetName.data(), - m_audioPath + targetName.data()); + targetName.ascii(), + (m_audioPath.c_str() + targetName).ascii()); m_audioFiles.push_back(aF); m_derivedAudioFiles.insert(aF); // Don't catch SoundFile::BadSoundFileException diff --git a/src/sound/AudioFileManager.h b/src/sound/AudioFileManager.h index 67ae6c6..8bc4535 100644 --- a/src/sound/AudioFileManager.h +++ b/src/sound/AudioFileManager.h @@ -61,6 +61,7 @@ typedef std::vector<AudioFile*>::const_iterator AudioFileManagerIterator; class AudioFileManager : public TQObject, public XmlExportable { Q_OBJECT + TQ_OBJECT public: AudioFileManager(); virtual ~AudioFileManager(); diff --git a/src/sound/AudioFileTimeStretcher.h b/src/sound/AudioFileTimeStretcher.h index f2de00c..0654b59 100644 --- a/src/sound/AudioFileTimeStretcher.h +++ b/src/sound/AudioFileTimeStretcher.h @@ -33,9 +33,10 @@ namespace Rosegarden { class AudioFileManager; -class AudioFileTimeStretcher : public QObject +class AudioFileTimeStretcher : public TQObject { Q_OBJECT + TQ_OBJECT public: AudioFileTimeStretcher(AudioFileManager *mgr); diff --git a/src/sound/AudioPlayQueue.cpp b/src/sound/AudioPlayQueue.cpp index 2bd07c3..6858328 100644 --- a/src/sound/AudioPlayQueue.cpp +++ b/src/sound/AudioPlayQueue.cpp @@ -25,8 +25,8 @@ #include "PlayableAudioFile.h" #include "Profiler.h" -//#define DEBUG_AUDIO_PLAY_QUEUE 1 -//#define FINE_DEBUG_AUDIO_PLAY_QUEUE 1 +//#define DEBUG_AUDIO_PLAY_TQUEUE 1 +//#define FINE_DEBUG_AUDIO_PLAY_TQUEUE 1 namespace Rosegarden { @@ -94,7 +94,7 @@ AudioPlayQueue::addScheduled(PlayableAudioFile *file) m_instrumentIndex.push_back(ReverseFileMap()); } -#ifdef DEBUG_AUDIO_PLAY_QUEUE +#ifdef DEBUG_AUDIO_PLAY_TQUEUE std::cerr << "AudioPlayQueue[" << this << "]::addScheduled(" << file << "): start " << file->getStartTime() << ", end " << file->getEndTime() << ", slots: " << std::endl; #endif @@ -107,13 +107,13 @@ AudioPlayQueue::addScheduled(PlayableAudioFile *file) m_maxBuffers = m_counts[i]; } } -#ifdef DEBUG_AUDIO_PLAY_QUEUE +#ifdef DEBUG_AUDIO_PLAY_TQUEUE std::cerr << i << " "; #endif } -#ifdef DEBUG_AUDIO_PLAY_QUEUE +#ifdef DEBUG_AUDIO_PLAY_TQUEUE std::cerr << std::endl << "(max buffers now " << m_maxBuffers << ")" << std::endl; #endif @@ -122,13 +122,13 @@ AudioPlayQueue::addScheduled(PlayableAudioFile *file) void AudioPlayQueue::addUnscheduled(PlayableAudioFile *file) { -#ifdef DEBUG_AUDIO_PLAY_QUEUE +#ifdef DEBUG_AUDIO_PLAY_TQUEUE std::cerr << "AudioPlayQueue[" << this << "]::addUnscheduled(" << file << "): start " << file->getStartTime() << ", end " << file->getEndTime() << ", instrument " << file->getInstrument() << std::endl; #endif m_unscheduled.push_back(file); -#ifdef DEBUG_AUDIO_PLAY_QUEUE +#ifdef DEBUG_AUDIO_PLAY_TQUEUE std::cerr << "AudioPlayQueue[" << this << "]::addUnscheduled: now " << m_unscheduled.size() << " unscheduled files" << std::endl; #endif @@ -138,7 +138,7 @@ AudioPlayQueue::addUnscheduled(PlayableAudioFile *file) void AudioPlayQueue::erase(PlayableAudioFile *file) { -#ifdef DEBUG_AUDIO_PLAY_QUEUE +#ifdef DEBUG_AUDIO_PLAY_TQUEUE std::cerr << "AudioPlayQueue::erase(" << file << "): start " << file->getStartTime() << ", end " << file->getEndTime() << std::endl; #endif @@ -195,7 +195,7 @@ AudioPlayQueue::erase(PlayableAudioFile *file) void AudioPlayQueue::clear() { -#ifdef DEBUG_AUDIO_PLAY_QUEUE +#ifdef DEBUG_AUDIO_PLAY_TQUEUE std::cerr << "AudioPlayQueue::clear()" << std::endl; #endif @@ -255,7 +255,7 @@ AudioPlayQueue::getPlayingFiles(const RealTime &sliceStart, f->getStartTime() + f->getDuration() <= sliceStart) continue; -#ifdef FINE_DEBUG_AUDIO_PLAY_QUEUE +#ifdef FINE_DEBUG_AUDIO_PLAY_TQUEUE std::cerr << "... found " << f << " in slot " << i << std::endl; #endif @@ -273,7 +273,7 @@ AudioPlayQueue::getPlayingFiles(const RealTime &sliceStart, } } -#ifdef FINE_DEBUG_AUDIO_PLAY_QUEUE +#ifdef FINE_DEBUG_AUDIO_PLAY_TQUEUE if (playing.size() > 0) { std::cerr << "AudioPlayQueue::getPlayingFiles(" << sliceStart << "," << sliceDuration << "): total " @@ -289,7 +289,7 @@ AudioPlayQueue::getPlayingFilesForInstrument(const RealTime &sliceStart, PlayableAudioFile **playing, size_t &size) const { -#ifdef FINE_DEBUG_AUDIO_PLAY_QUEUE +#ifdef FINE_DEBUG_AUDIO_PLAY_TQUEUE bool printed = false; Profiler profiler("AudioPlayQueue::getPlayingFilesForInstrument", true); #endif @@ -321,7 +321,7 @@ AudioPlayQueue::getPlayingFilesForInstrument(const RealTime &sliceStart, if (f->getInstrument() != instrumentId) continue; -#ifdef FINE_DEBUG_AUDIO_PLAY_QUEUE +#ifdef FINE_DEBUG_AUDIO_PLAY_TQUEUE if (!printed) { std::cerr << "AudioPlayQueue::getPlayingFilesForInstrument(" << sliceStart @@ -334,7 +334,7 @@ AudioPlayQueue::getPlayingFilesForInstrument(const RealTime &sliceStart, if (f->getStartTime() > sliceEnd || f->getEndTime() <= sliceStart) { -#ifdef FINE_DEBUG_AUDIO_PLAY_QUEUE +#ifdef FINE_DEBUG_AUDIO_PLAY_TQUEUE std::cerr << "... rejected " << f << " in slot " << i << std::endl; if (f->getStartTime() > sliceEnd) { std::cerr << "(" << f->getStartTime() << " > " << sliceEnd @@ -348,7 +348,7 @@ AudioPlayQueue::getPlayingFilesForInstrument(const RealTime &sliceStart, continue; } -#ifdef FINE_DEBUG_AUDIO_PLAY_QUEUE +#ifdef FINE_DEBUG_AUDIO_PLAY_TQUEUE std::cerr << "... found " << f << " in slot " << i << " (" << f->getStartTime() << " -> " << f->getEndTime() << ")" << std::endl; @@ -363,7 +363,7 @@ AudioPlayQueue::getPlayingFilesForInstrument(const RealTime &sliceStart, break; // already have it if (written >= size) { -#ifdef FINE_DEBUG_AUDIO_PLAY_QUEUE +#ifdef FINE_DEBUG_AUDIO_PLAY_TQUEUE std::cerr << "No room to write it!" << std::endl; #endif @@ -382,7 +382,7 @@ unscheduled: PlayableAudioFile *f = *fli; if (f->getInstrument() != instrumentId) { -#ifdef FINE_DEBUG_AUDIO_PLAY_QUEUE +#ifdef FINE_DEBUG_AUDIO_PLAY_TQUEUE std::cerr << "rejecting unscheduled " << f << " as wrong instrument (" << f->getInstrument() << " != " << instrumentId << ")" << std::endl; #endif @@ -390,7 +390,7 @@ unscheduled: continue; } -#ifdef FINE_DEBUG_AUDIO_PLAY_QUEUE +#ifdef FINE_DEBUG_AUDIO_PLAY_TQUEUE if (!printed) { std::cerr << "AudioPlayQueue::getPlayingFilesForInstrument(" << sliceStart << ", " << sliceDuration << ", " << instrumentId << ")" @@ -402,7 +402,7 @@ unscheduled: if (f->getStartTime() <= sliceEnd && f->getStartTime() + f->getDuration() > sliceStart) { -#ifdef FINE_DEBUG_AUDIO_PLAY_QUEUE +#ifdef FINE_DEBUG_AUDIO_PLAY_TQUEUE std::cerr << "... found " << f << " in unscheduled list (" << f->getStartTime() << " -> " << f->getEndTime() << ")" << std::endl; @@ -412,7 +412,7 @@ unscheduled: break; playing[written++] = f; -#ifdef FINE_DEBUG_AUDIO_PLAY_QUEUE +#ifdef FINE_DEBUG_AUDIO_PLAY_TQUEUE } else { @@ -429,7 +429,7 @@ unscheduled: } } -#ifdef FINE_DEBUG_AUDIO_PLAY_QUEUE +#ifdef FINE_DEBUG_AUDIO_PLAY_TQUEUE if (written > 0) { std::cerr << "AudioPlayQueue::getPlayingFilesForInstrument: total " << written << " files" << std::endl; @@ -442,7 +442,7 @@ unscheduled: bool AudioPlayQueue::haveFilesForInstrument(InstrumentId instrumentId) const { -#ifdef FINE_DEBUG_AUDIO_PLAY_QUEUE +#ifdef FINE_DEBUG_AUDIO_PLAY_TQUEUE std::cerr << "AudioPlayQueue::haveFilesForInstrument(" << instrumentId << ")..."; #endif @@ -450,7 +450,7 @@ AudioPlayQueue::haveFilesForInstrument(InstrumentId instrumentId) const if (index < m_instrumentIndex.size() && !m_instrumentIndex[index].empty()) { -#ifdef FINE_DEBUG_AUDIO_PLAY_QUEUE +#ifdef FINE_DEBUG_AUDIO_PLAY_TQUEUE std::cerr << " yes (scheduled)" << std::endl; #endif @@ -461,7 +461,7 @@ AudioPlayQueue::haveFilesForInstrument(InstrumentId instrumentId) const fli != m_unscheduled.end(); ++fli) { PlayableAudioFile *file = *fli; if (file->getInstrument() == instrumentId) { -#ifdef FINE_DEBUG_AUDIO_PLAY_QUEUE +#ifdef FINE_DEBUG_AUDIO_PLAY_TQUEUE std::cerr << " yes (unscheduled)" << std::endl; #endif @@ -469,7 +469,7 @@ AudioPlayQueue::haveFilesForInstrument(InstrumentId instrumentId) const } } -#ifdef FINE_DEBUG_AUDIO_PLAY_QUEUE +#ifdef FINE_DEBUG_AUDIO_PLAY_TQUEUE std::cerr << " no" << std::endl; #endif @@ -479,7 +479,7 @@ AudioPlayQueue::haveFilesForInstrument(InstrumentId instrumentId) const const AudioPlayQueue::FileSet & AudioPlayQueue::getAllScheduledFiles() const { -#ifdef DEBUG_AUDIO_PLAY_QUEUE +#ifdef DEBUG_AUDIO_PLAY_TQUEUE std::cerr << "AudioPlayQueue[" << this << "]::getAllScheduledFiles: have " << m_files.size() << " files" << std::endl; #endif @@ -489,7 +489,7 @@ AudioPlayQueue::getAllScheduledFiles() const const AudioPlayQueue::FileList & AudioPlayQueue::getAllUnscheduledFiles() const { -#ifdef DEBUG_AUDIO_PLAY_QUEUE +#ifdef DEBUG_AUDIO_PLAY_TQUEUE std::cerr << "AudioPlayQueue[" << this << "]::getAllUnscheduledFiles: have " << m_unscheduled.size() << " files" << std::endl; #endif diff --git a/src/sound/AudioPlayQueue.h b/src/sound/AudioPlayQueue.h index 2a7067c..0ef0efb 100644 --- a/src/sound/AudioPlayQueue.h +++ b/src/sound/AudioPlayQueue.h @@ -19,8 +19,8 @@ COPYING included with this distribution for more information. */ -#ifndef _AUDIO_PLAY_QUEUE_H_ -#define _AUDIO_PLAY_QUEUE_H_ +#ifndef _AUDIO_PLAY_TQUEUE_H_ +#define _AUDIO_PLAY_TQUEUE_H_ #include "RealTime.h" #include "Instrument.h" diff --git a/src/sound/AudioProcess.cpp b/src/sound/AudioProcess.cpp index 1fb5a61..c209703 100644 --- a/src/sound/AudioProcess.cpp +++ b/src/sound/AudioProcess.cpp @@ -1084,7 +1084,7 @@ AudioInstrumentMixer::setPluginBypass(InstrumentId id, int position, bool bypass instance->setBypassed(bypass); } -QStringList +TQStringList AudioInstrumentMixer::getPluginPrograms(InstrumentId id, int position) { // Not RT safe @@ -1096,7 +1096,7 @@ AudioInstrumentMixer::getPluginPrograms(InstrumentId id, int position) return programs; } -QString +TQString AudioInstrumentMixer::getPluginProgram(InstrumentId id, int position) { // Not RT safe @@ -1108,7 +1108,7 @@ AudioInstrumentMixer::getPluginProgram(InstrumentId id, int position) return program; } -QString +TQString AudioInstrumentMixer::getPluginProgram(InstrumentId id, int position, int bank, int program) { @@ -1143,7 +1143,7 @@ AudioInstrumentMixer::setPluginProgram(InstrumentId id, int position, TQString p instance->selectProgram(program); } -QString +TQString AudioInstrumentMixer::configurePlugin(InstrumentId id, int position, TQString key, TQString value) { // Not RT safe @@ -2337,7 +2337,7 @@ AudioFileWriter::closeRecordFile(InstrumentId id, AudioFileId &returnedId) return false; returnedId = m_files[id].first->getId(); - m_files[id].second->setStatus(RecordableAudioFile::DEFUNCT); + m_files[id].second->settqStatus(RecordableAudioFile::DEFUNCT); #ifdef DEBUG_WRITER @@ -2364,7 +2364,7 @@ AudioFileWriter::haveRecordFileOpen(InstrumentId id) } return (m_files[id].first && - (m_files[id].second->getStatus() != RecordableAudioFile::DEFUNCT)); + (m_files[id].second->gettqStatus() != RecordableAudioFile::DEFUNCT)); } bool @@ -2377,7 +2377,7 @@ AudioFileWriter::haveRecordFilesOpen() for (InstrumentId id = instrumentBase; id < instrumentBase + instrumentCount; ++id) { if (m_files[id].first && - (m_files[id].second->getStatus() != RecordableAudioFile::DEFUNCT)) { + (m_files[id].second->gettqStatus() != RecordableAudioFile::DEFUNCT)) { #ifdef DEBUG_WRITER std::cerr << "AudioFileWriter::haveRecordFilesOpen: found open record file for instrument " << id << std::endl; #endif @@ -2410,7 +2410,7 @@ AudioFileWriter::kick(bool wantLock) RecordableAudioFile *raf = m_files[id].second; - if (raf->getStatus() == RecordableAudioFile::DEFUNCT) { + if (raf->gettqStatus() == RecordableAudioFile::DEFUNCT) { #ifdef DEBUG_WRITER std::cerr << "AudioFileWriter::kick: found defunct file on instrument " << id << std::endl; diff --git a/src/sound/AudioTimeStretcher.cpp b/src/sound/AudioTimeStretcher.cpp index 392693e..fcb87e6 100644 --- a/src/sound/AudioTimeStretcher.cpp +++ b/src/sound/AudioTimeStretcher.cpp @@ -4,7 +4,7 @@ Sonic Visualiser An audio file viewer and annotation editor. Centre for Digital Music, Queen Mary, University of London. - This file copyright 2006 Chris Cannam and QMUL. + This file copyright 2006 Chris Cannam and TQMUL. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as diff --git a/src/sound/AudioTimeStretcher.h b/src/sound/AudioTimeStretcher.h index c5d0170..96fc54c 100644 --- a/src/sound/AudioTimeStretcher.h +++ b/src/sound/AudioTimeStretcher.h @@ -28,7 +28,7 @@ Sonic Visualiser An audio file viewer and annotation editor. Centre for Digital Music, Queen Mary, University of London. - This file copyright 2006 Chris Cannam and QMUL. + This file copyright 2006 Chris Cannam and TQMUL. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as @@ -159,7 +159,7 @@ protected: /** * Resynthesise from m_freq[channel] adding in to "out", * adjusting phases on the basis of a prior step size of lastStep. - * Also add the window shape in to the modulation array (if + * Also add the window tqshape in to the modulation array (if * present) -- for use in ensuring the output has the correct * magnitude afterwards. */ diff --git a/src/sound/DSSIPluginFactory.cpp b/src/sound/DSSIPluginFactory.cpp index 42df247..60f7720 100644 --- a/src/sound/DSSIPluginFactory.cpp +++ b/src/sound/DSSIPluginFactory.cpp @@ -67,14 +67,14 @@ DSSIPluginFactory::enumeratePlugins(MappedObjectPropertyList &list) list.push_back(*i); list.push_back(descriptor->Name); - list.push_back(TQString("%1").arg(descriptor->UniqueID)); + list.push_back(TQString("%1").tqarg(descriptor->UniqueID)); list.push_back(descriptor->Label); list.push_back(descriptor->Maker); list.push_back(descriptor->Copyright); list.push_back((ddesc->run_synth || ddesc->run_multiple_synths) ? "true" : "false"); list.push_back(ddesc->run_multiple_synths ? "true" : "false"); list.push_back(m_taxonomy[descriptor->UniqueID]); - list.push_back(TQString("%1").arg(descriptor->PortCount)); + list.push_back(TQString("%1").tqarg(descriptor->PortCount)); for (unsigned long p = 0; p < descriptor->PortCount; ++p) { @@ -90,13 +90,13 @@ DSSIPluginFactory::enumeratePlugins(MappedObjectPropertyList &list) type |= PluginPort::Output; } - list.push_back(TQString("%1").arg(p)); + list.push_back(TQString("%1").tqarg(p)); list.push_back(descriptor->PortNames[p]); - list.push_back(TQString("%1").arg(type)); - list.push_back(TQString("%1").arg(getPortDisplayHint(descriptor, p))); - list.push_back(TQString("%1").arg(getPortMinimum(descriptor, p))); - list.push_back(TQString("%1").arg(getPortMaximum(descriptor, p))); - list.push_back(TQString("%1").arg(getPortDefault(descriptor, p))); + list.push_back(TQString("%1").tqarg(type)); + list.push_back(TQString("%1").tqarg(getPortDisplayHint(descriptor, p))); + list.push_back(TQString("%1").tqarg(getPortMinimum(descriptor, p))); + list.push_back(TQString("%1").tqarg(getPortMaximum(descriptor, p))); + list.push_back(TQString("%1").tqarg(getPortDefault(descriptor, p))); } } @@ -296,7 +296,7 @@ DSSIPluginFactory::getLRDFPath(TQString &baseUri) void DSSIPluginFactory::discoverPlugins(TQString soName) { - void *libraryHandle = dlopen(soName.data(), RTLD_LAZY); + void *libraryHandle = dlopen(soName.ascii(), RTLD_LAZY); if (!libraryHandle) { std::cerr << "WARNING: DSSIPluginFactory::discoverPlugins: couldn't dlopen " diff --git a/src/sound/DSSIPluginInstance.cpp b/src/sound/DSSIPluginInstance.cpp index 30b9256..9f71629 100644 --- a/src/sound/DSSIPluginInstance.cpp +++ b/src/sound/DSSIPluginInstance.cpp @@ -451,7 +451,7 @@ DSSIPluginInstance::checkProgramCache() ProgramDescriptor d; d.bank = programDescriptor->Bank; d.program = programDescriptor->Program; - d.name = TQString("%1. %2").arg(index).arg(programDescriptor->Name); + d.name = TQString("%1. %2").tqarg(index).tqarg(programDescriptor->Name); m_cachedPrograms.push_back(d); } @@ -462,7 +462,7 @@ DSSIPluginInstance::checkProgramCache() m_programCacheValid = true; } -QStringList +TQStringList DSSIPluginInstance::getPrograms() { #ifdef DEBUG_DSSI @@ -484,7 +484,7 @@ DSSIPluginInstance::getPrograms() return programs; } -QString +TQString DSSIPluginInstance::getProgram(int bank, int program) { #ifdef DEBUG_DSSI @@ -531,7 +531,7 @@ DSSIPluginInstance::getProgram(TQString name) return 0; } -QString +TQString DSSIPluginInstance::getCurrentProgram() { return m_program; @@ -765,7 +765,7 @@ DSSIPluginInstance::getPortValue(unsigned int portNumber) return 0.0; } -QString +TQString DSSIPluginInstance::configure(TQString key, TQString value) { @@ -787,7 +787,7 @@ DSSIPluginInstance::configure(TQString key, std::cerr << "DSSIPluginInstance::configure(" << key << "," << value << ")" << std::endl; #endif - char *message = m_descriptor->configure(m_instanceHandle, key.data(), value.data()); + char *message = m_descriptor->configure(m_instanceHandle, key.ascii(), value.ascii()); m_programCacheValid = false; diff --git a/src/sound/DummyDriver.h b/src/sound/DummyDriver.h index d60c7c0..5cb5cad 100644 --- a/src/sound/DummyDriver.h +++ b/src/sound/DummyDriver.h @@ -60,7 +60,7 @@ public: // Activate a recording state // - virtual bool record(RecordStatus /*recordStatus*/, + virtual bool record(RecordtqStatus /*recordtqStatus*/, const std::vector<InstrumentId> */*armedInstruments = 0*/, const std::vector<TQString> */*audioFileNames = 0*/) { return false; } diff --git a/src/sound/JackDriver.cpp b/src/sound/JackDriver.cpp index b9a7205..ecd6739 100644 --- a/src/sound/JackDriver.cpp +++ b/src/sound/JackDriver.cpp @@ -1383,7 +1383,7 @@ JackDriver::jackProcessRecord(InstrumentId id, float gain = AudioLevel::dB_to_multiplier(level); - if (m_alsaDriver->getRecordStatus() == RECORD_ON && + if (m_alsaDriver->getRecordtqStatus() == RECORD_ON && clocksRunning && m_fileWriter->haveRecordFileOpen(id)) { @@ -2368,7 +2368,7 @@ JackDriver::setPluginInstanceBypass(InstrumentId id, int position, bool value) m_instrumentMixer->setPluginBypass(id, position, value); } -QStringList +TQStringList JackDriver::getPluginInstancePrograms(InstrumentId id, int position) { if (m_instrumentMixer) @@ -2376,7 +2376,7 @@ JackDriver::getPluginInstancePrograms(InstrumentId id, int position) return TQStringList(); } -QString +TQString JackDriver::getPluginInstanceProgram(InstrumentId id, int position) { if (m_instrumentMixer) @@ -2384,7 +2384,7 @@ JackDriver::getPluginInstanceProgram(InstrumentId id, int position) return TQString(); } -QString +TQString JackDriver::getPluginInstanceProgram(InstrumentId id, int position, int bank, int program) { @@ -2408,7 +2408,7 @@ JackDriver::setPluginInstanceProgram(InstrumentId id, int position, TQString pro m_instrumentMixer->setPluginProgram(id, position, program); } -QString +TQString JackDriver::configurePlugin(InstrumentId id, int position, TQString key, TQString value) { if (m_instrumentMixer) diff --git a/src/sound/LADSPAPluginFactory.cpp b/src/sound/LADSPAPluginFactory.cpp index 5ec25ef..9daa431 100644 --- a/src/sound/LADSPAPluginFactory.cpp +++ b/src/sound/LADSPAPluginFactory.cpp @@ -81,7 +81,7 @@ LADSPAPluginFactory::enumeratePlugins(MappedObjectPropertyList &list) list.push_back(*i); list.push_back(descriptor->Name); - list.push_back(TQString("%1").arg(descriptor->UniqueID)); + list.push_back(TQString("%1").tqarg(descriptor->UniqueID)); list.push_back(descriptor->Label); list.push_back(descriptor->Maker); list.push_back(descriptor->Copyright); @@ -104,7 +104,7 @@ LADSPAPluginFactory::enumeratePlugins(MappedObjectPropertyList &list) } - list.push_back(TQString("%1").arg(descriptor->PortCount)); + list.push_back(TQString("%1").tqarg(descriptor->PortCount)); for (unsigned long p = 0; p < descriptor->PortCount; ++p) { @@ -120,13 +120,13 @@ LADSPAPluginFactory::enumeratePlugins(MappedObjectPropertyList &list) type |= PluginPort::Output; } - list.push_back(TQString("%1").arg(p)); + list.push_back(TQString("%1").tqarg(p)); list.push_back(descriptor->PortNames[p]); - list.push_back(TQString("%1").arg(type)); - list.push_back(TQString("%1").arg(getPortDisplayHint(descriptor, p))); - list.push_back(TQString("%1").arg(getPortMinimum(descriptor, p))); - list.push_back(TQString("%1").arg(getPortMaximum(descriptor, p))); - list.push_back(TQString("%1").arg(getPortDefault(descriptor, p))); + list.push_back(TQString("%1").tqarg(type)); + list.push_back(TQString("%1").tqarg(getPortDisplayHint(descriptor, p))); + list.push_back(TQString("%1").tqarg(getPortMinimum(descriptor, p))); + list.push_back(TQString("%1").tqarg(getPortMaximum(descriptor, p))); + list.push_back(TQString("%1").tqarg(getPortDefault(descriptor, p))); } } @@ -507,7 +507,7 @@ LADSPAPluginFactory::getLADSPADescriptor(TQString identifier) void LADSPAPluginFactory::loadLibrary(TQString soName) { - void *libraryHandle = dlopen(soName.data(), RTLD_NOW); + void *libraryHandle = dlopen(soName.ascii(), RTLD_NOW); if (libraryHandle) m_libraryHandles[soName] = libraryHandle; } @@ -644,7 +644,7 @@ LADSPAPluginFactory::discoverPlugins() for (size_t i = 0; i < lrdfPaths.size(); ++i) { TQDir dir(lrdfPaths[i], "*.rdf;*.rdfs"); for (unsigned int j = 0; j < dir.count(); ++j) { - if (!lrdf_read_file(TQString("file:" + lrdfPaths[i] + "/" + dir[j]).data())) { + if (!lrdf_read_file(TQString("file:" + lrdfPaths[i] + "/" + dir[j]).ascii())) { // std::cerr << "LADSPAPluginFactory: read RDF file " << (lrdfPaths[i] + "/" + dir[j]) << std::endl; haveSomething = true; } @@ -664,7 +664,7 @@ LADSPAPluginFactory::discoverPlugins() TQDir pluginDir(*i, "*.so"); for (unsigned int j = 0; j < pluginDir.count(); ++j) { - discoverPlugins(TQString("%1/%2").arg(*i).arg(pluginDir[j])); + discoverPlugins(TQString("%1/%2").tqarg(*i).tqarg(pluginDir[j])); } } @@ -680,7 +680,7 @@ LADSPAPluginFactory::discoverPlugins() void LADSPAPluginFactory::discoverPlugins(TQString soName) { - void *libraryHandle = dlopen(soName.data(), RTLD_LAZY); + void *libraryHandle = dlopen(soName.ascii(), RTLD_LAZY); if (!libraryHandle) { std::cerr << "WARNING: LADSPAPluginFactory::discoverPlugins: couldn't dlopen " @@ -770,9 +770,9 @@ LADSPAPluginFactory::generateFallbackCategories() std::vector<TQString> path; for (size_t i = 0; i < pluginPath.size(); ++i) { - if (pluginPath[i].contains("/lib/")) { + if (pluginPath[i].tqcontains("/lib/")) { TQString p(pluginPath[i]); - p.replace("/lib/", "/share/"); + p.tqreplace("/lib/", "/share/"); path.push_back(p); // std::cerr << "LADSPAPluginFactory::generateFallbackCategories: path element " << p << std::endl; } @@ -813,7 +813,7 @@ void LADSPAPluginFactory::generateTaxonomy(TQString uri, TQString base) { #ifdef HAVE_LIBLRDF - lrdf_uris *uris = lrdf_get_instances(uri.data()); + lrdf_uris *uris = lrdf_get_instances(uri.ascii()); if (uris != NULL) { for (int i = 0; i < uris->count; ++i) { @@ -822,7 +822,7 @@ LADSPAPluginFactory::generateTaxonomy(TQString uri, TQString base) lrdf_free_uris(uris); } - uris = lrdf_get_subclasses(uri.data()); + uris = lrdf_get_subclasses(uri.ascii()); if (uris != NULL) { for (int i = 0; i < uris->count; ++i) { diff --git a/src/sound/MappedCommon.h b/src/sound/MappedCommon.h index 0a793bc..28fd8c4 100644 --- a/src/sound/MappedCommon.h +++ b/src/sound/MappedCommon.h @@ -39,7 +39,7 @@ typedef TQString MappedObjectProperty; typedef float MappedObjectValue; // typedef TQValueVector<MappedObjectProperty> MappedObjectPropertyList; -// replaced with a std::vector<> for Qt2 compatibility +// replaced with a std::vector<> for TQt2 compatibility typedef std::vector<MappedObjectId> MappedObjectIdList; typedef std::vector<MappedObjectProperty> MappedObjectPropertyList; diff --git a/src/sound/MappedDevice.cpp b/src/sound/MappedDevice.cpp index e5a9dd8..bc7fd39 100644 --- a/src/sound/MappedDevice.cpp +++ b/src/sound/MappedDevice.cpp @@ -137,8 +137,8 @@ operator>>(TQDataStream &dS, MappedDevice *mD) dS >> recording; mD->setId(id); mD->setType(Device::DeviceType(dType)); - mD->setName(std::string(name.data())); - mD->setConnection(connection.data()); + mD->setName(std::string(name.ascii())); + mD->setConnection(connection.ascii()); mD->setDirection(MidiDevice::DeviceDirection(direction)); mD->setRecording((bool)recording); @@ -182,8 +182,8 @@ operator>>(TQDataStream &dS, MappedDevice &mD) dS >> recording; mD.setId(id); mD.setType(Device::DeviceType(dType)); - mD.setName(std::string(name.data())); - mD.setConnection(connection.data()); + mD.setName(std::string(name.ascii())); + mD.setConnection(connection.ascii()); mD.setDirection(MidiDevice::DeviceDirection(direction)); mD.setRecording((bool)recording); diff --git a/src/sound/MappedEvent.cpp b/src/sound/MappedEvent.cpp index 4bae51e..2eb6382 100644 --- a/src/sound/MappedEvent.cpp +++ b/src/sound/MappedEvent.cpp @@ -390,7 +390,7 @@ protected: }; DataBlockFile::DataBlockFile(DataBlockRepository::blockid id) - : m_fileName(KGlobal::dirs()->resourceDirs("tmp").first() + TQString("/rosegarden_datablock_%1").arg(id)), + : m_fileName(KGlobal::dirs()->resourceDirs("tmp").first() + TQString("/rosegarden_datablock_%1").tqarg(id)), m_file(m_fileName), m_cleared(false) { diff --git a/src/sound/MappedInstrument.cpp b/src/sound/MappedInstrument.cpp index a3c366f..626fd35 100644 --- a/src/sound/MappedInstrument.cpp +++ b/src/sound/MappedInstrument.cpp @@ -90,7 +90,7 @@ operator>>(TQDataStream &dS, MappedInstrument *mI) mI->setType(Instrument::InstrumentType(type)); mI->setChannel(MidiByte(channel)); mI->setId(InstrumentId(id)); - mI->setName(std::string(name.data())); + mI->setName(std::string(name.ascii())); mI->setDevice(DeviceId(device)); mI->setAudioChannels(audioChannels); @@ -113,7 +113,7 @@ operator>>(TQDataStream &dS, MappedInstrument &mI) mI.setType(Instrument::InstrumentType(type)); mI.setChannel(MidiByte(channel)); mI.setId(InstrumentId(id)); - mI.setName(std::string(name.data())); + mI.setName(std::string(name.ascii())); mI.setDevice(DeviceId(device)); mI.setAudioChannels(audioChannels); diff --git a/src/sound/MappedStudio.cpp b/src/sound/MappedStudio.cpp index b72550b..3d9dbb8 100644 --- a/src/sound/MappedStudio.cpp +++ b/src/sound/MappedStudio.cpp @@ -59,17 +59,17 @@ static inline void releaseLock(const char *file, int line) #define GET_LOCK getLock(__FILE__,__LINE__) #define RELEASE_LOCK releaseLock(__FILE__,__LINE__) -// These stream functions are stolen and adapted from Qt3 tqvaluevector.h +// These stream functions are stolen and adapted from TQt3 tqvaluevector.h // // ** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. // TQDataStream& operator>>(TQDataStream& s, MappedObjectIdList& v) { v.clear(); - Q_UINT32 c; + TQ_UINT32 c; s >> c; v.resize(c); - for (Q_UINT32 i = 0; i < c; ++i) { + for (TQ_UINT32 i = 0; i < c; ++i) { MappedObjectId t; s >> t; v[i] = t; @@ -79,7 +79,7 @@ TQDataStream& operator>>(TQDataStream& s, MappedObjectIdList& v) TQDataStream& operator<<(TQDataStream& s, const MappedObjectIdList& v) { - s << (Q_UINT32)v.size(); + s << (TQ_UINT32)v.size(); MappedObjectIdList::const_iterator it = v.begin(); for ( ; it != v.end(); ++it ) s << *it; @@ -89,10 +89,10 @@ TQDataStream& operator<<(TQDataStream& s, const MappedObjectIdList& v) TQDataStream& operator>>(TQDataStream& s, MappedObjectPropertyList& v) { v.clear(); - Q_UINT32 c; + TQ_UINT32 c; s >> c; v.resize(c); - for (Q_UINT32 i = 0; i < c; ++i) { + for (TQ_UINT32 i = 0; i < c; ++i) { MappedObjectProperty t; s >> t; v[i] = t; @@ -102,7 +102,7 @@ TQDataStream& operator>>(TQDataStream& s, MappedObjectPropertyList& v) TQDataStream& operator<<(TQDataStream& s, const MappedObjectPropertyList& v) { - s << (Q_UINT32)v.size(); + s << (TQ_UINT32)v.size(); MappedObjectPropertyList::const_iterator it = v.begin(); for ( ; it != v.end(); ++it ) s << *it; @@ -112,10 +112,10 @@ TQDataStream& operator<<(TQDataStream& s, const MappedObjectPropertyList& v) TQDataStream& operator>>(TQDataStream& s, MappedObjectValueList& v) { v.clear(); - Q_UINT32 c; + TQ_UINT32 c; s >> c; v.resize(c); - for (Q_UINT32 i = 0; i < c; ++i) { + for (TQ_UINT32 i = 0; i < c; ++i) { MappedObjectValue t; s >> t; v[i] = t; @@ -125,7 +125,7 @@ TQDataStream& operator>>(TQDataStream& s, MappedObjectValueList& v) TQDataStream& operator<<(TQDataStream& s, const MappedObjectValueList& v) { - s << (Q_UINT32)v.size(); + s << (TQ_UINT32)v.size(); MappedObjectValueList::const_iterator it = v.begin(); for ( ; it != v.end(); ++it ) s << *it; @@ -185,21 +185,21 @@ const MappedObjectProperty MappedPluginPort::Value = "value"; void MappedObject::addChild(MappedObject *object) { - std::vector<MappedObject*>::iterator it = m_children.begin(); - for (; it != m_children.end(); it++) + std::vector<MappedObject*>::iterator it = m_tqchildren.begin(); + for (; it != m_tqchildren.end(); it++) if ((*it) == object) return ; - m_children.push_back(object); + m_tqchildren.push_back(object); } void MappedObject::removeChild(MappedObject *object) { - std::vector<MappedObject*>::iterator it = m_children.begin(); - for (; it != m_children.end(); it++) { + std::vector<MappedObject*>::iterator it = m_tqchildren.begin(); + for (; it != m_tqchildren.end(); it++) { if ((*it) == object) { - m_children.erase(it); + m_tqchildren.erase(it); return ; } } @@ -211,9 +211,9 @@ MappedObjectPropertyList MappedObject::getChildren() { MappedObjectPropertyList list; - std::vector<MappedObject*>::iterator it = m_children.begin(); - for (; it != m_children.end(); it++) - list.push_back(TQString("%1").arg((*it)->getId())); + std::vector<MappedObject*>::iterator it = m_tqchildren.begin(); + for (; it != m_tqchildren.end(); it++) + list.push_back(TQString("%1").tqarg((*it)->getId())); return list; } @@ -225,10 +225,10 @@ MappedObjectPropertyList MappedObject::getChildren(MappedObjectType type) { MappedObjectPropertyList list; - std::vector<MappedObject*>::iterator it = m_children.begin(); - for (; it != m_children.end(); it++) { + std::vector<MappedObject*>::iterator it = m_tqchildren.begin(); + for (; it != m_tqchildren.end(); it++) { if ((*it)->getType() == type) - list.push_back(TQString("%1").arg((*it)->getId())); + list.push_back(TQString("%1").tqarg((*it)->getId())); } return list; @@ -244,16 +244,16 @@ MappedObject::destroyChildren() // see note in destroy() below - std::vector<MappedObject *> children = m_children; - m_children.clear(); + std::vector<MappedObject *> tqchildren = m_tqchildren; + m_tqchildren.clear(); - std::vector<MappedObject *>::iterator it = children.begin(); - for (; it != children.end(); it++) + std::vector<MappedObject *>::iterator it = tqchildren.begin(); + for (; it != tqchildren.end(); it++) (*it)->destroy(); // remove from studio and destroy } // Destroy this object and remove it from the studio and -// do the same for all its children. +// do the same for all its tqchildren. // void MappedObject::destroy() @@ -265,17 +265,17 @@ MappedObject::destroy() MappedStudio *studio = dynamic_cast<MappedStudio*>(studioObject); // The destroy method on each child calls studio->clearObject, - // which calls back on the parent (in this case us) to remove the + // which calls back on the tqparent (in this case us) to remove the // child. (That's necessary for the case of destroying a plugin, // where we need to remove it from its plugin manager -- etc.) So - // we don't want to be iterating over m_children here, as it will + // we don't want to be iterating over m_tqchildren here, as it will // change from under us. - std::vector<MappedObject *> children = m_children; - m_children.clear(); + std::vector<MappedObject *> tqchildren = m_tqchildren; + m_tqchildren.clear(); - std::vector<MappedObject *>::iterator it = children.begin(); - for (; it != children.end(); it++) { + std::vector<MappedObject *>::iterator it = tqchildren.begin(); + for (; it != tqchildren.end(); it++) { (*it)->destroy(); } @@ -387,7 +387,7 @@ MappedStudio::createObject(MappedObjectType type, } else if (type == MappedObject::PluginPort) { mO = new MappedPluginPort(this, id); - // reset the port's parent after creation outside this method + // reset the port's tqparent after creation outside this method } // Insert @@ -597,11 +597,11 @@ MappedStudio::clearObject(MappedObjectId id) MappedObjectCategory::iterator j = i->second.find(id); if (j != i->second.end()) { - // if the object has a parent other than the studio, - // persuade that parent to abandon it - MappedObject *parent = j->second->getParent(); - if (parent && !dynamic_cast<MappedStudio *>(parent)) { - parent->removeChild(j->second); + // if the object has a tqparent other than the studio, + // persuade that tqparent to abandon it + MappedObject *tqparent = j->second->getParent(); + if (tqparent && !dynamic_cast<MappedStudio *>(tqparent)) { + tqparent->removeChild(j->second); } i->second.erase(j); @@ -776,11 +776,11 @@ MappedStudio::getAudioInput(int inputNumber) // -------------- MappedConnectableObject ----------------- // // -MappedConnectableObject::MappedConnectableObject(MappedObject *parent, +MappedConnectableObject::MappedConnectableObject(MappedObject *tqparent, const std::string &name, MappedObjectType type, MappedObjectId id): - MappedObject(parent, + MappedObject(tqparent, name, type, id) @@ -842,10 +842,10 @@ MappedConnectableObject::getConnections(ConnectionDirection dir) // ------------ MappedAudioFader ---------------- // -MappedAudioFader::MappedAudioFader(MappedObject *parent, +MappedAudioFader::MappedAudioFader(MappedObject *tqparent, MappedObjectId id, MappedObjectValue channels): - MappedConnectableObject(parent, + MappedConnectableObject(tqparent, "MappedAudioFader", AudioFader, id), @@ -875,30 +875,30 @@ MappedAudioFader::getPropertyList(const MappedObjectProperty &property) list.push_back(MappedConnectableObject::ConnectionsIn); list.push_back(MappedConnectableObject::ConnectionsOut); } else if (property == MappedObject::Instrument) { - list.push_back(MappedObjectProperty("%1").arg(m_instrumentId)); + list.push_back(MappedObjectProperty("%1").tqarg(m_instrumentId)); } else if (property == MappedAudioFader::FaderLevel) { - list.push_back(MappedObjectProperty("%1").arg(m_level)); + list.push_back(MappedObjectProperty("%1").tqarg(m_level)); } else if (property == MappedAudioFader::FaderRecordLevel) { - list.push_back(MappedObjectProperty("%1").arg(m_recordLevel)); + list.push_back(MappedObjectProperty("%1").tqarg(m_recordLevel)); } else if (property == MappedAudioFader::Channels) { - list.push_back(MappedObjectProperty("%1").arg(m_channels)); + list.push_back(MappedObjectProperty("%1").tqarg(m_channels)); } else if (property == MappedAudioFader::InputChannel) { - list.push_back(MappedObjectProperty("%1").arg(m_inputChannel)); + list.push_back(MappedObjectProperty("%1").tqarg(m_inputChannel)); } else if (property == MappedAudioFader::Pan) { - list.push_back(MappedObjectProperty("%1").arg(m_pan)); + list.push_back(MappedObjectProperty("%1").tqarg(m_pan)); } else if (property == MappedConnectableObject::ConnectionsIn) { MappedObjectValueList::const_iterator it = m_connectionsIn.begin(); for ( ; it != m_connectionsIn.end(); ++it) { - list.push_back(TQString("%1").arg(*it)); + list.push_back(TQString("%1").tqarg(*it)); } } else if (property == MappedConnectableObject::ConnectionsOut) { MappedObjectValueList::const_iterator it = m_connectionsOut.begin(); for ( ; it != m_connectionsOut.end(); ++it) { - list.push_back(TQString("%1").arg(*it)); + list.push_back(TQString("%1").tqarg(*it)); } } @@ -987,9 +987,9 @@ MappedAudioFader::setProperty(const MappedObjectProperty &property, // ---------------- MappedAudioBuss ------------------- // // -MappedAudioBuss::MappedAudioBuss(MappedObject *parent, +MappedAudioBuss::MappedAudioBuss(MappedObject *tqparent, MappedObjectId id) : - MappedConnectableObject(parent, + MappedConnectableObject(tqparent, "MappedAudioBuss", AudioBuss, id), @@ -1013,22 +1013,22 @@ MappedAudioBuss::getPropertyList(const MappedObjectProperty &property) list.push_back(MappedConnectableObject::ConnectionsIn); list.push_back(MappedConnectableObject::ConnectionsOut); } else if (property == BussId) { - list.push_back(MappedObjectProperty("%1").arg(m_bussId)); + list.push_back(MappedObjectProperty("%1").tqarg(m_bussId)); } else if (property == Level) { - list.push_back(MappedObjectProperty("%1").arg(m_level)); + list.push_back(MappedObjectProperty("%1").tqarg(m_level)); } else if (property == MappedConnectableObject::ConnectionsIn) { MappedObjectValueList::const_iterator it = m_connectionsIn.begin(); for ( ; it != m_connectionsIn.end(); ++it) { - list.push_back(TQString("%1").arg(*it)); + list.push_back(TQString("%1").tqarg(*it)); } } else if (property == MappedConnectableObject::ConnectionsOut) { MappedObjectValueList::const_iterator it = m_connectionsOut.begin(); for ( ; it != m_connectionsOut.end(); ++it) { - list.push_back(TQString("%1").arg(*it)); + list.push_back(TQString("%1").tqarg(*it)); } } @@ -1133,9 +1133,9 @@ MappedAudioBuss::getInstruments() // ---------------- MappedAudioInput ------------------- // // -MappedAudioInput::MappedAudioInput(MappedObject *parent, +MappedAudioInput::MappedAudioInput(MappedObject *tqparent, MappedObjectId id) : - MappedConnectableObject(parent, + MappedConnectableObject(tqparent, "MappedAudioInput", AudioInput, id) @@ -1152,7 +1152,7 @@ MappedAudioInput::getPropertyList(const MappedObjectProperty &property) if (property == "") { list.push_back(MappedAudioInput::InputNumber); } else if (property == InputNumber) { - list.push_back(MappedObjectProperty("%1").arg(m_inputNumber)); + list.push_back(MappedObjectProperty("%1").tqarg(m_inputNumber)); } return list; @@ -1191,8 +1191,8 @@ MappedAudioInput::setProperty(const MappedObjectProperty &property, } -MappedPluginSlot::MappedPluginSlot(MappedObject *parent, MappedObjectId id) : - MappedObject(parent, "MappedPluginSlot", PluginSlot, id) +MappedPluginSlot::MappedPluginSlot(MappedObject *tqparent, MappedObjectId id) : + MappedObject(tqparent, "MappedPluginSlot", PluginSlot, id) { #ifdef DEBUG_MAPPEDSTUDIO std::cerr << "MappedPluginSlot::MappedPluginSlot: id = " << id << std::endl; @@ -1322,7 +1322,7 @@ MappedPluginSlot::getProperty(const MappedObjectProperty &property, return true; } -QString +TQString MappedPluginSlot::getProgram(int bank, int program) { MappedStudio *studio = @@ -1548,8 +1548,8 @@ MappedPluginSlot::getPort(unsigned long portNumber) } -MappedPluginPort::MappedPluginPort(MappedObject *parent, MappedObjectId id) : - MappedObject(parent, "MappedPluginPort", PluginPort, id) +MappedPluginPort::MappedPluginPort(MappedObject *tqparent, MappedObjectId id) : + MappedObject(tqparent, "MappedPluginPort", PluginPort, id) {} MappedPluginPort::~MappedPluginPort() diff --git a/src/sound/MappedStudio.h b/src/sound/MappedStudio.h index 89acc9b..e7fa4f9 100644 --- a/src/sound/MappedStudio.h +++ b/src/sound/MappedStudio.h @@ -71,14 +71,14 @@ public: } MappedObjectType; - MappedObject(MappedObject *parent, + MappedObject(MappedObject *tqparent, const std::string &name, MappedObjectType type, MappedObjectId id): m_type(type), m_id(id), m_name(name), - m_parent(parent) {;} + m_tqparent(tqparent) {;} virtual ~MappedObject() {;} @@ -116,9 +116,9 @@ public: // Ownership // - MappedObject* getParent() { return m_parent; } - const MappedObject* getParent() const { return m_parent; } - void setParent(MappedObject *parent) { m_parent = parent; } + MappedObject* getParent() { return m_tqparent; } + const MappedObject* getParent() const { return m_tqparent; } + void setParent(MappedObject *tqparent) { m_tqparent = tqparent; } // Get a list of child ids - get a list of a certain type // @@ -135,7 +135,7 @@ public: void destroy(); void destroyChildren(); - std::vector<MappedObject*> getChildObjects() { return m_children; } + std::vector<MappedObject*> getChildObjects() { return m_tqchildren; } protected: @@ -143,8 +143,8 @@ protected: MappedObjectId m_id; std::string m_name; - MappedObject *m_parent; - std::vector<MappedObject*> m_children; + MappedObject *m_tqparent; + std::vector<MappedObject*> m_tqchildren; }; @@ -261,7 +261,7 @@ private: MappedObjectId m_runningObjectId; // All of our mapped (virtual) studio resides in this container as - // well as having all their parent/child relationships. Because + // well as having all their tqparent/child relationships. Because // some things are just blobs with no connections we need to // maintain both - don't forget about this. // @@ -298,7 +298,7 @@ public: Out } ConnectionDirection; - MappedConnectableObject(MappedObject *parent, + MappedConnectableObject(MappedObject *tqparent, const std::string &name, MappedObjectType type, MappedObjectId id); @@ -335,7 +335,7 @@ public: static const MappedObjectProperty Pan; static const MappedObjectProperty InputChannel; - MappedAudioFader(MappedObject *parent, + MappedAudioFader(MappedObject *tqparent, MappedObjectId id, MappedObjectValue channels = 2); // stereo default ~MappedAudioFader(); @@ -385,7 +385,7 @@ public: static const MappedObjectProperty Pan; static const MappedObjectProperty Level; - MappedAudioBuss(MappedObject *parent, + MappedAudioBuss(MappedObject *tqparent, MappedObjectId id); ~MappedAudioBuss(); @@ -418,7 +418,7 @@ public: static const MappedObjectProperty InputNumber; - MappedAudioInput(MappedObject *parent, + MappedAudioInput(MappedObject *tqparent, MappedObjectId id); ~MappedAudioInput(); @@ -455,7 +455,7 @@ public: static const MappedObjectProperty Bypassed; static const MappedObjectProperty Configuration; // list property - MappedPluginSlot(MappedObject *parent, MappedObjectId id); + MappedPluginSlot(MappedObject *tqparent, MappedObjectId id); ~MappedPluginSlot(); virtual MappedObjectPropertyList getPropertyList( @@ -513,7 +513,7 @@ public: static const MappedObjectProperty DisplayHint; static const MappedObjectProperty Value; - MappedPluginPort(MappedObject *parent, MappedObjectId id); + MappedPluginPort(MappedObject *tqparent, MappedObjectId id); ~MappedPluginPort(); virtual MappedObjectPropertyList getPropertyList( diff --git a/src/sound/Midi.h b/src/sound/Midi.h index 65bfe93..c6d877b 100644 --- a/src/sound/Midi.h +++ b/src/sound/Midi.h @@ -61,7 +61,7 @@ const MidiByte MIDI_SELECT_CHNL_MODE = 0xB0; // system messages const MidiByte MIDI_SYSTEM_EXCLUSIVE = 0xF0; -const MidiByte MIDI_TC_QUARTER_FRAME = 0xF1; +const MidiByte MIDI_TC_TQUARTER_FRAME = 0xF1; const MidiByte MIDI_SONG_POSITION_PTR = 0xF2; const MidiByte MIDI_SONG_SELECT = 0xF3; const MidiByte MIDI_TUNE_REQUEST = 0xF6; diff --git a/src/sound/MidiFile.cpp b/src/sound/MidiFile.cpp index 76d5c85..4e97455 100644 --- a/src/sound/MidiFile.cpp +++ b/src/sound/MidiFile.cpp @@ -171,7 +171,7 @@ MidiFile::getMidiByte(ifstream* midiFile) emit setProgress((int)(double(midiFile->tellg()) / double(m_fileSize) * 20.0)); - kapp->processEvents(50); + kapp->tqprocessEvents(50); } return (MidiByte)byte; @@ -249,7 +249,7 @@ MidiFile::getMidiBytes(ifstream* midiFile, unsigned long numberOfBytes) if (bytesGot % 2000 == 0) { emit setProgress((int)(double(midiFile->tellg()) / double(m_fileSize) * 20.0)); - kapp->processEvents(50); + kapp->tqprocessEvents(50); } return stringRet; @@ -464,7 +464,7 @@ MidiFile::parseHeader(const string &midiHeader) m_numberOfTracks = midiBytesToInt(midiHeader.substr(10, 2)); m_timingDivision = midiBytesToInt(midiHeader.substr(12, 2)); - if ( m_format == MIDI_SEQUENTIAL_TRACK_FILE ) { + if ( m_format == MIDI_SETQUENTIAL_TRACK_FILE ) { #ifdef MIDI_DEBUG std::cerr << "MidiFile::parseHeader()" << "- can't load sequential track file" @@ -503,7 +503,7 @@ MidiFile::parseTrack(ifstream* midiFile, TrackId &lastTrackNum) unsigned long accumulatedTime = 0; // The trackNum passed in to this method is the default track for - // all events provided they're all on the same channel. If we find + // all events provided they're all on the same channel. If we tqfind // events on more than one channel, we increment trackNum and record // the mapping from channel to trackNum in this channelTrackMap. // We then return the new trackNum by reference so the calling @@ -524,7 +524,7 @@ MidiFile::parseTrack(ifstream* midiFile, TrackId &lastTrackNum) TrackId metaTrack = lastTrackNum; // Remember the last non-meta status byte (-1 if we haven't seen one) - int runningStatus = -1; + int runningtqStatus = -1; bool firstTrack = true; @@ -550,11 +550,11 @@ MidiFile::parseTrack(ifstream* midiFile, TrackId &lastTrackNum) midiByte = getMidiByte(midiFile); if (!(midiByte & MIDI_STATUS_BYTE_MASK)) { - if (runningStatus < 0) { + if (runningtqStatus < 0) { throw (Exception("Running status used for first event in track")); } - eventCode = (MidiByte)runningStatus; + eventCode = (MidiByte)runningtqStatus; data1 = midiByte; #ifdef MIDI_DEBUG @@ -603,7 +603,7 @@ MidiFile::parseTrack(ifstream* midiFile, TrackId &lastTrackNum) } else // the rest { - runningStatus = eventCode; + runningtqStatus = eventCode; MidiEvent *midiEvent; @@ -842,7 +842,7 @@ MidiFile::convertToRosegarden(Composition &composition, ConversionType type) // split over these tracks emit setProgress(20 + (int)((80.0 * double(i) / double(m_numberOfTracks)))); - kapp->processEvents(50); + kapp->tqprocessEvents(50); // Convert the deltaTime to an absolute time since // the start of the segment. The addTime method @@ -2120,7 +2120,7 @@ MidiFile::writeTrack(std::ofstream* midiFile, TrackId trackNumber) if (progressCount % 500 == 0) { emit setProgress(progressCount * 100 / progressTotal); - kapp->processEvents(500); + kapp->tqprocessEvents(500); } } diff --git a/src/sound/MidiFile.h b/src/sound/MidiFile.h index 7efeb28..7cbbb6f 100644 --- a/src/sound/MidiFile.h +++ b/src/sound/MidiFile.h @@ -38,7 +38,7 @@ // from MIDI Files. Despite the fact you can reuse this // object it's probably safer just to create it for a // single way conversion and then throw it away (MIDI -// to Composition conversion invalidates the internal +// to Composition conversion tqinvalidates the internal // MIDI model). // // Derived from SoundFile but still had some features @@ -66,13 +66,14 @@ class Studio; class MidiFile : public TQObject, public SoundFile { Q_OBJECT + TQ_OBJECT public: typedef enum { MIDI_SINGLE_TRACK_FILE = 0x00, MIDI_SIMULTANEOUS_TRACK_FILE = 0x01, - MIDI_SEQUENTIAL_TRACK_FILE = 0x02, + MIDI_SETQUENTIAL_TRACK_FILE = 0x02, MIDI_CONVERTED_TO_APPLICATION = 0xFE, MIDI_FILE_NOT_LOADED = 0xFF } MIDIFileFormatType; diff --git a/src/sound/PeakFile.cpp b/src/sound/PeakFile.cpp index 3c306db..aebd7c7 100644 --- a/src/sound/PeakFile.cpp +++ b/src/sound/PeakFile.cpp @@ -146,7 +146,7 @@ PeakFile::parseHeader() m_numberOfPeaks = getIntegerFromLittleEndian(header.substr(28, 4)); m_positionPeakOfPeaks = getIntegerFromLittleEndian(header.substr(32, 4)); - // Read in date string and convert it up to QDateTime + // Read in date string and convert it up to TQDateTime // TQString dateString = TQString(header.substr(40, 28).c_str()); @@ -286,7 +286,7 @@ PeakFile::close() // Set modification time to now // - m_modificationTime = m_modificationTime.currentDateTime(); + m_modificationTime = m_modificationTime.tqcurrentDateTime(); TQString fDate; fDate.sprintf("%04d:%02d:%02d:%02d:%02d:%02d:%03d", @@ -298,7 +298,7 @@ PeakFile::close() m_modificationTime.time().second(), m_modificationTime.time().msec()); - std::string dateString(fDate.data()); + std::string dateString(fDate.ascii()); // Pad with spaces to make up to 28 bytes long and output // diff --git a/src/sound/PeakFile.h b/src/sound/PeakFile.h index ce1aeac..5b4fc1e 100644 --- a/src/sound/PeakFile.h +++ b/src/sound/PeakFile.h @@ -54,6 +54,7 @@ typedef std::pair<RealTime, RealTime> SplitPointPair; class PeakFile : public TQObject, public SoundFile { Q_OBJECT + TQ_OBJECT public: PeakFile(AudioFile *audioFile); diff --git a/src/sound/PeakFileManager.h b/src/sound/PeakFileManager.h index 40e6d95..26ced4d 100644 --- a/src/sound/PeakFileManager.h +++ b/src/sound/PeakFileManager.h @@ -46,9 +46,10 @@ namespace Rosegarden class AudioFile; class RealTime; -class PeakFileManager : public QObject +class PeakFileManager : public TQObject { Q_OBJECT + TQ_OBJECT public: // updatePercentage tells this object how often to throw a // percentage complete message - active between 0-100 only diff --git a/src/sound/PluginIdentifier.cpp b/src/sound/PluginIdentifier.cpp index bd2f96c..a22598c 100644 --- a/src/sound/PluginIdentifier.cpp +++ b/src/sound/PluginIdentifier.cpp @@ -25,7 +25,7 @@ namespace Rosegarden { -QString +TQString PluginIdentifier::createIdentifier(TQString type, TQString soName, TQString label) @@ -65,7 +65,7 @@ PluginIdentifier::areIdentifiersSimilar(TQString id1, TQString id2) // The prefix of this key is also used as a literal in base/AudioPluginInstance.C. // If you change one, change the other. // Better still, don't change one. -QString +TQString PluginIdentifier::RESERVED_PROJECT_DIRECTORY_KEY = "__ROSEGARDEN__:__RESERVED__:ProjectDirectoryKey"; } diff --git a/src/sound/RIFFAudioFile.cpp b/src/sound/RIFFAudioFile.cpp index c34435f..823ee4f 100644 --- a/src/sound/RIFFAudioFile.cpp +++ b/src/sound/RIFFAudioFile.cpp @@ -154,7 +154,7 @@ RIFFAudioFile::scanTo(std::ifstream *file, const RealTime &time) if (file == 0) return false; - // whatever we do here we invalidate the read buffer + // whatever we do here we tqinvalidate the read buffer // m_loseBuffer = true; diff --git a/src/sound/RecordableAudioFile.h b/src/sound/RecordableAudioFile.h index 06df6f0..886b07c 100644 --- a/src/sound/RecordableAudioFile.h +++ b/src/sound/RecordableAudioFile.h @@ -44,21 +44,21 @@ public: IDLE, RECORDING, DEFUNCT - } RecordStatus; + } RecordtqStatus; RecordableAudioFile(AudioFile *audioFile, // should be already open for writing size_t bufferSize); ~RecordableAudioFile(); - void setStatus(const RecordStatus &status) { m_status = status; } - RecordStatus getStatus() const { return m_status; } + void settqStatus(const RecordtqStatus &status) { m_status = status; } + RecordtqStatus gettqStatus() const { return m_status; } size_t buffer(const sample_t *data, int channel, size_t frames); void write(); protected: AudioFile *m_audioFile; - RecordStatus m_status; + RecordtqStatus m_status; std::vector<RingBuffer<sample_t> *> m_ringBuffers; // one per channel }; diff --git a/src/sound/SoundDriver.cpp b/src/sound/SoundDriver.cpp index aab641c..f09de3b 100644 --- a/src/sound/SoundDriver.cpp +++ b/src/sound/SoundDriver.cpp @@ -40,12 +40,12 @@ namespace Rosegarden SoundDriver::SoundDriver(MappedStudio *studio, const std::string &name): m_name(name), - m_driverStatus(NO_DRIVER), + m_drivertqStatus(NO_DRIVER), m_playStartPosition(0, 0), m_startPlayback(false), m_playing(false), m_midiRecordDevice(0), - m_recordStatus(RECORD_OFF), + m_recordtqStatus(RECORD_OFF), m_midiRunningId(MidiInstrumentBase), m_audioRunningId(AudioInstrumentBase), // m_audioQueueScavenger(4, 50), @@ -55,8 +55,8 @@ SoundDriver::SoundDriver(MappedStudio *studio, const std::string &name): m_studio(studio), m_sequencerDataBlock(0), m_externalTransport(0), - m_mmcStatus(TRANSPORT_OFF), - m_mtcStatus(TRANSPORT_OFF), + m_mmctqStatus(TRANSPORT_OFF), + m_mtctqStatus(TRANSPORT_OFF), m_mmcId(0), // default MMC id of 0 m_midiClockEnabled(false), m_midiClockInterval(0, 0), diff --git a/src/sound/SoundDriver.h b/src/sound/SoundDriver.h index 74bd966..ee6f9da 100644 --- a/src/sound/SoundDriver.h +++ b/src/sound/SoundDriver.h @@ -54,10 +54,10 @@ typedef enum { RECORD_OFF, RECORD_ON, -} RecordStatus; +} RecordtqStatus; -// Status of a SoundDriver - whether we're got an audio and +// tqStatus of a SoundDriver - whether we're got an audio and // MIDI subsystem or not. This is reported right up to the // gui. // @@ -67,7 +67,7 @@ typedef enum AUDIO_OK = 0x01, // AUDIO's OK MIDI_OK = 0x02, // MIDI's OK VERSION_OK = 0x04 // GUI and sequencer versions match -} SoundDriverStatus; +} SoundDrivertqStatus; // Used for MMC and MTC, not for JACK transport @@ -77,7 +77,7 @@ typedef enum TRANSPORT_OFF, TRANSPORT_MASTER, TRANSPORT_SLAVE -} TransportSyncStatus; +} TransportSynctqStatus; // The NoteOffQueue holds a time ordered set of @@ -179,7 +179,7 @@ public: // Activate a recording state. armedInstruments and audioFileNames // can be NULL if no audio tracks recording. // - virtual bool record(RecordStatus recordStatus, + virtual bool record(RecordtqStatus recordtqStatus, const std::vector<InstrumentId> *armedInstruments = 0, const std::vector<TQString> *audioFileNames = 0) = 0; @@ -269,7 +269,7 @@ public: // Return the current status of the driver // - unsigned int getStatus() const { return m_driverStatus; } + unsigned int gettqStatus() const { return m_drivertqStatus; } // Are we playing? // @@ -281,7 +281,7 @@ public: virtual bool areClocksRunning() const = 0; RealTime getStartPosition() const { return m_playStartPosition; } - RecordStatus getRecordStatus() const { return m_recordStatus; } + RecordtqStatus getRecordtqStatus() const { return m_recordtqStatus; } // Return a MappedDevice full of the Instrument mappings // that the driver has discovered. The gui can then use @@ -385,18 +385,18 @@ public: // MIDI Realtime Sync setting // - TransportSyncStatus getMIDISyncStatus() const { return m_midiSyncStatus; } - void setMIDISyncStatus(TransportSyncStatus status) { m_midiSyncStatus = status; } + TransportSynctqStatus getMIDISynctqStatus() const { return m_midiSynctqStatus; } + void setMIDISynctqStatus(TransportSynctqStatus status) { m_midiSynctqStatus = status; } // MMC master/slave setting // - TransportSyncStatus getMMCStatus() const { return m_mmcStatus; } - void setMMCStatus(TransportSyncStatus status) { m_mmcStatus = status; } + TransportSynctqStatus getMMCtqStatus() const { return m_mmctqStatus; } + void setMMCtqStatus(TransportSynctqStatus status) { m_mmctqStatus = status; } // MTC master/slave setting // - TransportSyncStatus getMTCStatus() const { return m_mtcStatus; } - void setMTCStatus(TransportSyncStatus status) { m_mtcStatus = status; } + TransportSynctqStatus getMTCtqStatus() const { return m_mtctqStatus; } + void setMTCtqStatus(TransportSynctqStatus status) { m_mtctqStatus = status; } // MMC Id // @@ -446,7 +446,7 @@ protected: AudioFile* getAudioFile(unsigned int id); std::string m_name; - unsigned int m_driverStatus; + unsigned int m_drivertqStatus; RealTime m_playStartPosition; bool m_startPlayback; bool m_playing; @@ -470,7 +470,7 @@ protected: MappedComposition m_recordComposition; MappedComposition m_returnComposition; - RecordStatus m_recordStatus; + RecordtqStatus m_recordtqStatus; InstrumentId m_midiRunningId; @@ -506,9 +506,9 @@ protected: // MMC and MTC status and ID // - TransportSyncStatus m_midiSyncStatus; - TransportSyncStatus m_mmcStatus; - TransportSyncStatus m_mtcStatus; + TransportSynctqStatus m_midiSynctqStatus; + TransportSynctqStatus m_mmctqStatus; + TransportSynctqStatus m_mtctqStatus; MidiByte m_mmcId; // device id // MIDI clock interval diff --git a/src/test/segmenttransposecommand.cpp b/src/test/segmenttransposecommand.cpp index 0025529..710ca30 100644 --- a/src/test/segmenttransposecommand.cpp +++ b/src/test/segmenttransposecommand.cpp @@ -21,10 +21,10 @@ int testSegmentBbtoF() Event * bes = n->getAsNoteEvent(1, 10); segment1->insert(bes); segment1->insert(Key("Bb major").getAsEvent(0)); - SegmentTransposeCommand * mockCommand = + SegmentTransposeCommand * tqmockCommand = new SegmentTransposeCommand(*segment1, true, -3, -5, true); - mockCommand->execute(); + tqmockCommand->execute(); EventSelection m_selection(*segment1, segment1->getStartTime(), segment1->getEndMarkerTime()); EventSelection::eventcontainer::iterator i; @@ -58,10 +58,10 @@ int testGistoAis() Event * gis = n->getAsNoteEvent(1, 8); segment1->insert(gis); segment1->insert(Key("E major").getAsEvent(0)); - SegmentTransposeCommand * mockCommand = + SegmentTransposeCommand * tqmockCommand = new SegmentTransposeCommand(*segment1, true, 1, 2, true); - mockCommand->execute(); + tqmockCommand->execute(); EventSelection m_selection(*segment1, segment1->getStartTime(), segment1->getEndMarkerTime()); EventSelection::eventcontainer::iterator i; @@ -93,10 +93,10 @@ int testSegmentCisToC() Event * cis = n->getAsNoteEvent(1, 13); segment1->insert(cis); segment1->insert(Key("C# major").getAsEvent(0)); - SegmentTransposeCommand * mockCommand = + SegmentTransposeCommand * tqmockCommand = new SegmentTransposeCommand(*segment1, true, 0, -1, true); - mockCommand->execute(); + tqmockCommand->execute(); EventSelection m_selection(*segment1, segment1->getStartTime(), segment1->getEndMarkerTime()); EventSelection::eventcontainer::iterator i; @@ -124,29 +124,29 @@ int testUndo() Segment * segment2 = new Segment(); // transpose once - SegmentTransposeCommand * mockCommand1a = + SegmentTransposeCommand * tqmockCommand1a = new SegmentTransposeCommand(*segment1, true, -1, -2, true); - mockCommand1a->execute(); - SegmentTransposeCommand * mockCommand1b = + tqmockCommand1a->execute(); + SegmentTransposeCommand * tqmockCommand1b = new SegmentTransposeCommand(*segment2, true, -1, -2, true); - mockCommand1b->execute(); + tqmockCommand1b->execute(); // transpose twice - SegmentTransposeCommand * mockCommand2a = + SegmentTransposeCommand * tqmockCommand2a = new SegmentTransposeCommand(*segment1, true, -1, -2, true); - mockCommand2a->execute(); - SegmentTransposeCommand * mockCommand2b = + tqmockCommand2a->execute(); + SegmentTransposeCommand * tqmockCommand2b = new SegmentTransposeCommand(*segment2, true, -1, -2, true); - mockCommand2b->execute(); + tqmockCommand2b->execute(); - mockCommand2b->unexecute(); - mockCommand2a->unexecute(); - mockCommand1b->unexecute(); - mockCommand1a->unexecute(); + tqmockCommand2b->unexecute(); + tqmockCommand2a->unexecute(); + tqmockCommand1b->unexecute(); + tqmockCommand1a->unexecute(); return 0; } |