rename the following methods:

tqfind find
tqreplace replace
tqcontains contains


git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/rosegarden@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
v3.5.13-sru
tpearson 13 years ago
parent bb426283a6
commit 80ee419f07

@ -35,7 +35,7 @@ class EventSelection;
* editing operations. Conceptually it has two "modes", * editing operations. Conceptually it has two "modes",
* single-segment and multiple-segment, although there's no particular * single-segment and multiple-segment, although there's no particular
* distinction behind the scenes. The Clipboard owns all the segments * distinction behind the scenes. The Clipboard owns all the segments
* it tqcontains -- they should always be deep copies, not aliases. * it contains -- they should always be deep copies, not aliases.
*/ */
class Clipboard class Clipboard

@ -111,7 +111,7 @@ public:
*/ */
bool swapItems(unsigned int item_1, unsigned int item_2); bool swapItems(unsigned int item_1, unsigned int item_2);
// void tqreplace(ColourMap &input); // void replace(ColourMap &input);
/** /**
* This returns a const iterator pointing to m_map.begin() * This returns a const iterator pointing to m_map.begin()

@ -102,7 +102,7 @@ Composition::ReferenceSegment::getDuration() const
} }
Composition::ReferenceSegment::iterator Composition::ReferenceSegment::iterator
Composition::ReferenceSegment::tqfind(Event *e) Composition::ReferenceSegment::find(Event *e)
{ {
return std::lower_bound return std::lower_bound
(begin(), end(), e, ReferenceSegmentEventCmp()); (begin(), end(), e, ReferenceSegmentEventCmp());
@ -116,7 +116,7 @@ Composition::ReferenceSegment::insert(Event *e)
m_eventType, e->getType(), __FILE__, __LINE__); m_eventType, e->getType(), __FILE__, __LINE__);
} }
iterator i = tqfind(e); iterator i = find(e);
if (i != end() && (*i)->getAbsoluteTime() == e->getAbsoluteTime()) { if (i != end() && (*i)->getAbsoluteTime() == e->getAbsoluteTime()) {
@ -133,7 +133,7 @@ Composition::ReferenceSegment::insert(Event *e)
void void
Composition::ReferenceSegment::erase(Event *e) Composition::ReferenceSegment::erase(Event *e)
{ {
iterator i = tqfind(e); iterator i = find(e);
if (i != end()) Impl::erase(i); if (i != end()) Impl::erase(i);
} }
@ -141,7 +141,7 @@ Composition::ReferenceSegment::iterator
Composition::ReferenceSegment::findTime(timeT t) Composition::ReferenceSegment::findTime(timeT t)
{ {
Event dummy("dummy", t, 0, MIN_SUBORDERING); Event dummy("dummy", t, 0, MIN_SUBORDERING);
return tqfind(&dummy); return find(&dummy);
} }
Composition::ReferenceSegment::iterator Composition::ReferenceSegment::iterator
@ -150,7 +150,7 @@ Composition::ReferenceSegment::findRealTime(RealTime t)
Event dummy("dummy", 0, 0, MIN_SUBORDERING); Event dummy("dummy", 0, 0, MIN_SUBORDERING);
dummy.set<Bool>(NoAbsoluteTimeProperty, true); dummy.set<Bool>(NoAbsoluteTimeProperty, true);
setTempoTimestamp(&dummy, t); setTempoTimestamp(&dummy, t);
return tqfind(&dummy); return find(&dummy);
} }
Composition::ReferenceSegment::iterator Composition::ReferenceSegment::iterator
@ -298,7 +298,7 @@ Composition::weakDetachSegment(Segment *segment)
} }
bool bool
Composition::tqcontains(const Segment *s) Composition::contains(const Segment *s)
{ {
iterator i = findSegment(s); iterator i = findSegment(s);
return (i != end()); return (i != end());

@ -254,7 +254,7 @@ public:
/** /**
* Test whether a Segment exists in this Composition. * Test whether a Segment exists in this Composition.
*/ */
bool tqcontains(const Segment *); bool contains(const Segment *);
/** /**
* Return an iterator pointing at the given Segment, or end() * 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 tqcontains * Return the starting and ending times of the bar that contains
* time t. * time t.
* *
* Will happily return theoretical timings for bars before the * Will happily return theoretical timings for bars before the
@ -906,7 +906,7 @@ protected:
std::string getEventType() const { return m_eventType; } std::string getEventType() const { return m_eventType; }
private: private:
iterator tqfind(Event *e); iterator find(Event *e);
std::string m_eventType; std::string m_eventType;
}; };

@ -118,7 +118,7 @@ Event::EventData::setTime(const PropertyName &name, timeT t, timeT deft)
} }
PropertyMap * PropertyMap *
Event::tqfind(const PropertyName &name, PropertyMap::iterator &i) Event::find(const PropertyName &name, PropertyMap::iterator &i)
{ {
PropertyMap *map = m_data->m_properties; PropertyMap *map = m_data->m_properties;
@ -142,7 +142,7 @@ Event::has(const PropertyName &name) const
#endif #endif
PropertyMap::const_iterator i; PropertyMap::const_iterator i;
const PropertyMap *map = tqfind(name, i); const PropertyMap *map = find(name, i);
if (map) return true; if (map) return true;
else return false; else return false;
} }
@ -156,7 +156,7 @@ Event::unset(const PropertyName &name)
unshare(); unshare();
PropertyMap::iterator i; PropertyMap::iterator i;
PropertyMap *map = tqfind(name, i); PropertyMap *map = find(name, i);
if (map) { if (map) {
delete i->second; delete i->second;
map->erase(i); map->erase(i);
@ -169,7 +169,7 @@ Event::getPropertyType(const PropertyName &name) const
// throw (NoData) // throw (NoData)
{ {
PropertyMap::const_iterator i; PropertyMap::const_iterator i;
const PropertyMap *map = tqfind(name, i); const PropertyMap *map = find(name, i);
if (map) { if (map) {
return i->second->getType(); return i->second->getType();
} else { } else {
@ -183,7 +183,7 @@ Event::getPropertyTypeAsString(const PropertyName &name) const
// throw (NoData) // throw (NoData)
{ {
PropertyMap::const_iterator i; PropertyMap::const_iterator i;
const PropertyMap *map = tqfind(name, i); const PropertyMap *map = find(name, i);
if (map) { if (map) {
return i->second->getTypeName(); return i->second->getTypeName();
} else { } else {
@ -197,7 +197,7 @@ Event::getAsString(const PropertyName &name) const
// throw (NoData) // throw (NoData)
{ {
PropertyMap::const_iterator i; PropertyMap::const_iterator i;
const PropertyMap *map = tqfind(name, i); const PropertyMap *map = find(name, i);
if (map) { if (map) {
return i->second->unparse(); return i->second->unparse();
} else { } else {

@ -363,12 +363,12 @@ private:
} }
// returned iterator (in i) only valid if return map value is non-zero // returned iterator (in i) only valid if return map value is non-zero
PropertyMap *tqfind(const PropertyName &name, PropertyMap::iterator &i); PropertyMap *find(const PropertyName &name, PropertyMap::iterator &i);
const PropertyMap *tqfind(const PropertyName &name, const PropertyMap *find(const PropertyName &name,
PropertyMap::const_iterator &i) const { PropertyMap::const_iterator &i) const {
PropertyMap::iterator j; PropertyMap::iterator j;
PropertyMap *map = const_cast<Event *>(this)->tqfind(name, j); PropertyMap *map = const_cast<Event *>(this)->find(name, j);
i = j; i = j;
return map; return map;
} }
@ -400,7 +400,7 @@ Event::get(const PropertyName &name, typename PropertyDefn<P>::basic_type &val)
#endif #endif
PropertyMap::const_iterator i; PropertyMap::const_iterator i;
const PropertyMap *map = tqfind(name, i); const PropertyMap *map = find(name, i);
if (map) { if (map) {
@ -434,7 +434,7 @@ Event::get(const PropertyName &name) const
#endif #endif
PropertyMap::const_iterator i; PropertyMap::const_iterator i;
const PropertyMap *map = tqfind(name, i); const PropertyMap *map = find(name, i);
if (map) { if (map) {
@ -464,7 +464,7 @@ Event::isPersistent(const PropertyName &name) const
// throw (NoData) // throw (NoData)
{ {
PropertyMap::const_iterator i; PropertyMap::const_iterator i;
const PropertyMap *map = tqfind(name, i); const PropertyMap *map = find(name, i);
if (map) { if (map) {
return (map == m_data->m_properties); return (map == m_data->m_properties);
@ -481,7 +481,7 @@ Event::setPersistence(const PropertyName &name, bool persistent)
{ {
unshare(); unshare();
PropertyMap::iterator i; PropertyMap::iterator i;
PropertyMap *map = tqfind(name, i); PropertyMap *map = find(name, i);
if (map) { if (map) {
insert(*i, persistent); insert(*i, persistent);
@ -506,7 +506,7 @@ Event::set(const PropertyName &name, typename PropertyDefn<P>::basic_type value,
unshare(); unshare();
PropertyMap::iterator i; PropertyMap::iterator i;
PropertyMap *map = tqfind(name, i); PropertyMap *map = find(name, i);
if (map) { if (map) {
bool persistentBefore = (map == m_data->m_properties); bool persistentBefore = (map == m_data->m_properties);
@ -547,7 +547,7 @@ Event::setMaybe(const PropertyName &name, typename PropertyDefn<P>::basic_type v
unshare(); unshare();
PropertyMap::iterator i; PropertyMap::iterator i;
PropertyMap *map = tqfind(name, i); PropertyMap *map = find(name, i);
if (map) { if (map) {
if (map == m_data->m_properties) return; // persistent, so ignore it if (map == m_data->m_properties) return; // persistent, so ignore it

@ -28,7 +28,7 @@
#include "XmlExportable.h" #include "XmlExportable.h"
#include "MidiProgram.h" #include "MidiProgram.h"
// An Instrument connects a Track (which itself tqcontains // An Instrument connects a Track (which itself contains
// a list of Segments) to a device that can play that // a list of Segments) to a device that can play that
// Track. // Track.
// //

@ -953,7 +953,7 @@ SegmentNotationHelper::insertSomething(iterator i, int duration,
if (needToSplit) { if (needToSplit) {
//!!! This is not quite right for rests. Because they //!!! This is not quite right for rests. Because they
//tqreplace (rather than chording with) any events already //replace (rather than chording with) any events already
//present, they don't need to be split in the case where //present, they don't need to be split in the case where
//their duration spans several note-events. Worry about //their duration spans several note-events. Worry about
//that later, I guess. We're actually getting enough //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 // or start after this one starts but before it ends, then we go
// for the delete-event-and-normalize-rests option. Otherwise // for the delete-event-and-normalize-rests option. Otherwise
// (the notationally simpler case) we go for the // (the notationally simpler case) we go for the
// tqreplace-note-by-rest option. We still lose in the case where // replace-note-by-rest option. We still lose in the case where
// another note starts before this one, overlaps it, but then also // another note starts before this one, overlaps it, but then also
// ends before it does -- but I think we can live with that. // ends before it does -- but I think we can live with that.

@ -99,7 +99,7 @@ void EventSelection::addEvent(Event *e)
timeT eventDuration = e->getDuration(); timeT eventDuration = e->getDuration();
if (eventDuration == 0) eventDuration = 1; if (eventDuration == 0) eventDuration = 1;
if (tqcontains(e)) return; if (contains(e)) return;
if (e->getAbsoluteTime() < m_beginTime || !m_haveRealStartTime) { if (e->getAbsoluteTime() < m_beginTime || !m_haveRealStartTime) {
m_beginTime = e->getAbsoluteTime(); m_beginTime = e->getAbsoluteTime();
@ -115,7 +115,7 @@ void EventSelection::addFromSelection(EventSelection *sel)
{ {
for (eventcontainer::iterator i = sel->getSegmentEvents().begin(); for (eventcontainer::iterator i = sel->getSegmentEvents().begin();
i != sel->getSegmentEvents().end(); ++i) { i != sel->getSegmentEvents().end(); ++i) {
if (!tqcontains(*i)) addEvent(*i); if (!contains(*i)) addEvent(*i);
} }
} }
@ -134,7 +134,7 @@ void EventSelection::removeEvent(Event *e)
} }
} }
bool EventSelection::tqcontains(Event *e) const bool EventSelection::contains(Event *e) const
{ {
std::pair<eventcontainer::const_iterator, eventcontainer::const_iterator> std::pair<eventcontainer::const_iterator, eventcontainer::const_iterator>
interval = m_segmentEvents.equal_range(e); interval = m_segmentEvents.equal_range(e);
@ -148,7 +148,7 @@ bool EventSelection::tqcontains(Event *e) const
return false; return false;
} }
bool EventSelection::tqcontains(const std::string &type) const bool EventSelection::contains(const std::string &type) const
{ {
for (eventcontainer::const_iterator i = m_segmentEvents.begin(); for (eventcontainer::const_iterator i = m_segmentEvents.begin();
i != m_segmentEvents.end(); ++i) { i != m_segmentEvents.end(); ++i) {
@ -173,13 +173,13 @@ EventSelection::getRanges() const
while (j != k) { while (j != k) {
for (j = i; j != k && tqcontains(*j); ++j); for (j = i; j != k && contains(*j); ++j);
if (j != i) { if (j != i) {
ranges.push_back(RangeList::value_type(i, j)); ranges.push_back(RangeList::value_type(i, j));
} }
for (i = j; i != k && !tqcontains(*i); ++i); for (i = j; i != k && !contains(*i); ++i);
j = i; j = i;
} }
@ -210,7 +210,7 @@ EventSelection::getRangeTimes() const
void void
EventSelection::eventRemoved(const Segment *s, Event *e) EventSelection::eventRemoved(const Segment *s, Event *e)
{ {
if (s == &m_originalSegment /*&& tqcontains(e)*/) { if (s == &m_originalSegment /*&& contains(e)*/) {
removeEvent(e); removeEvent(e);
} }
} }

@ -82,13 +82,13 @@ public:
* Test whether a given Event (in the Segment) is part of * Test whether a given Event (in the Segment) is part of
* this selection. * this selection.
*/ */
bool tqcontains(Event *e) const; bool contains(Event *e) const;
/** /**
* Return true if there are any events of the given type in * Return true if there are any events of the given type in
* this selection. Slow. * this selection. Slow.
*/ */
bool tqcontains(const std::string &eventType) const; bool contains(const std::string &eventType) const;
/** /**
* Return the time at which the first Event in the selection * Return the time at which the first Event in the selection

@ -103,7 +103,7 @@ public:
Iterator getHighestNote() const { return m_highest; } Iterator getHighestNote() const { return m_highest; }
Iterator getLowestNote() const { return m_lowest; } Iterator getLowestNote() const { return m_lowest; }
virtual bool tqcontains(const Iterator &) const = 0; virtual bool contains(const Iterator &) const = 0;
/// Return the pointed-to element, in Event form (public to work around gcc-2.95 bug) /// Return the pointed-to element, in Event form (public to work around gcc-2.95 bug)
static Event *getAsEvent(const Iterator &i); static Event *getAsEvent(const Iterator &i);
@ -175,7 +175,7 @@ public:
virtual int getMarkCountForChord() const; virtual int getMarkCountForChord() const;
virtual std::vector<Mark> getMarksForChord() const; virtual std::vector<Mark> getMarksForChord() const;
virtual std::vector<int> getPitches() const; virtual std::vector<int> getPitches() const;
virtual bool tqcontains(const Iterator &) const; virtual bool contains(const Iterator &) const;
/** /**
* Return an iterator pointing to the previous note before this * 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> template <class Element, class Container, bool singleStaff>
bool bool
GenericChord<Element, Container, singleStaff>::tqcontains(const Iterator &itr) const GenericChord<Element, Container, singleStaff>::contains(const Iterator &itr) const
{ {
for (typename std::vector<typename Container::iterator>::const_iterator for (typename std::vector<typename Container::iterator>::const_iterator
i = std::vector<typename Container::iterator>::begin(); i = std::vector<typename Container::iterator>::begin();

@ -57,7 +57,7 @@ CopyCommand::CopyCommand(SegmentSelection &selection,
for (SegmentSelection::iterator i = selection.begin(); for (SegmentSelection::iterator i = selection.begin();
i != selection.end(); ++i) { i != selection.end(); ++i) {
TQString newLabel = strtoqstr((*i)->getLabel()); TQString newLabel = strtoqstr((*i)->getLabel());
if (newLabel.tqcontains(i18n("(copied)"))) { if (newLabel.contains(i18n("(copied)"))) {
m_sourceClipboard->newSegment(*i); m_sourceClipboard->newSegment(*i);
} else { } else {
m_sourceClipboard->newSegment(*i)-> m_sourceClipboard->newSegment(*i)->

@ -60,7 +60,7 @@ public:
static PasteTypeMap getPasteTypes(); // type, descrip static PasteTypeMap getPasteTypes(); // type, descrip
/** /**
* Construct a Paste command from a clipboard that already tqcontains * Construct a Paste command from a clipboard that already contains
* the events to be pasted. * the events to be pasted.
*/ */
PasteEventsCommand(Segment &segment, PasteEventsCommand(Segment &segment,

@ -106,7 +106,7 @@ SetLyricsCommand::execute()
std::pair<timeT, timeT> barRange = comp->getBarRange(barNo++); std::pair<timeT, timeT> barRange = comp->getBarRange(barNo++);
TQString syllables = *bsi; TQString syllables = *bsi;
syllables.tqreplace(TQRegExp("\\[\\d+\\] "), " "); syllables.replace(TQRegExp("\\[\\d+\\] "), " ");
TQStringList syllableList = TQStringList::split(" ", syllables); // no empties TQStringList syllableList = TQStringList::split(" ", syllables); // no empties
i = m_segment->findTime(barRange.first); i = m_segment->findTime(barRange.first);
@ -131,7 +131,7 @@ SetLyricsCommand::execute()
} }
TQString syllable = *ssi; TQString syllable = *ssi;
syllable.tqreplace(TQRegExp("~"), " "); syllable.replace(TQRegExp("~"), " ");
syllable = syllable.simplifyWhiteSpace(); syllable = syllable.simplifyWhiteSpace();
if (syllable == "") if (syllable == "")
continue; continue;

@ -84,7 +84,7 @@ AddFingeringMarkCommand::modifySegment()
for (Chord::iterator ci = chord.begin(); for (Chord::iterator ci = chord.begin();
ci != chord.end(); ++ci) { ci != chord.end(); ++ci) {
if (!m_selection->tqcontains(**ci)) if (!m_selection->contains(**ci))
continue; continue;
if (attempt < 2 && if (attempt < 2 &&
@ -104,7 +104,7 @@ AddFingeringMarkCommand::modifySegment()
break; break;
for (Chord::iterator ci = chord.begin(); for (Chord::iterator ci = chord.begin();
ci != chord.end(); ++ci) { ci != chord.end(); ++ci) {
if (m_selection->tqcontains(**ci)) { if (m_selection->contains(**ci)) {
Marks::removeMark Marks::removeMark
(***ci, (***ci,
Marks::getFingeringMark(***ci)); Marks::getFingeringMark(***ci));

@ -154,7 +154,7 @@ InterpretCommand::applyTextDynamics()
} }
if (t >= startTime && if (t >= startTime &&
(*i)->isa(Note::EventType) && m_selection->tqcontains(*i)) { (*i)->isa(Note::EventType) && m_selection->contains(*i)) {
(*i)->set (*i)->set
<Int>(VELOCITY, velocity); <Int>(VELOCITY, velocity);
} }

@ -59,7 +59,7 @@ TieNotesCommand::modifySegment()
Segment::iterator sj; Segment::iterator sj;
while ((sj = helper.getNextAdjacentNote(si, true, false)) != while ((sj = helper.getNextAdjacentNote(si, true, false)) !=
segment.end()) { segment.end()) {
if (!m_selection->tqcontains(*sj)) if (!m_selection->contains(*sj))
break; break;
(*si)->set<Bool>(TIED_FORWARD, true); (*si)->set<Bool>(TIED_FORWARD, true);
(*si)->unset(TIE_IS_ABOVE); (*si)->unset(TIE_IS_ABOVE);

@ -322,8 +322,8 @@ MultiViewCommandHistory::updateButton(bool undo,
} else { } else {
action->setEnabled(true); action->setEnabled(true);
TQString commandName = stack.top()->name(); TQString commandName = stack.top()->name();
commandName.tqreplace(TQRegExp("&"), ""); commandName.replace(TQRegExp("&"), "");
commandName.tqreplace(TQRegExp("\\.\\.\\.$"), ""); commandName.replace(TQRegExp("\\.\\.\\.$"), "");
if (undo) if (undo)
text = i18n("Und&o %1").tqarg(commandName); text = i18n("Und&o %1").tqarg(commandName);
else else
@ -364,8 +364,8 @@ MultiViewCommandHistory::updateMenu(bool undo,
stack.pop(); stack.pop();
TQString commandName = command->name(); TQString commandName = command->name();
commandName.tqreplace(TQRegExp("&"), ""); commandName.replace(TQRegExp("&"), "");
commandName.tqreplace(TQRegExp("\\.\\.\\.$"), ""); commandName.replace(TQRegExp("\\.\\.\\.$"), "");
TQString text; TQString text;
if (undo) if (undo)

@ -148,7 +148,7 @@ bool ConfigurationXmlSubHandler::characters(const TQString& chars)
if (m_propertyType == "RealTime") { if (m_propertyType == "RealTime") {
Rosegarden::RealTime rt; Rosegarden::RealTime rt;
int sepIdx = ch.tqfind(','); int sepIdx = ch.find(',');
rt.sec = ch.left(sepIdx).toInt(); rt.sec = ch.left(sepIdx).toInt();
rt.nsec = ch.mid(sepIdx + 1).toInt(); rt.nsec = ch.mid(sepIdx + 1).toInt();

@ -1834,7 +1834,7 @@ RosegardenGUIDoc::insertRecordedMidi(const MappedComposition &mC)
// it's a note-off // it's a note-off
//NoteOnMap::iterator mi = m_noteOnEvents.tqfind((*i)->getPitch()); //NoteOnMap::iterator mi = m_noteOnEvents.find((*i)->getPitch());
PitchMap *pm = &m_noteOnEvents[device][channel]; PitchMap *pm = &m_noteOnEvents[device][channel];
PitchMap::iterator mi = pm->find(pitch); PitchMap::iterator mi = pm->find(pitch);

@ -351,15 +351,15 @@ LilyPondExporter::protectIllegalChars(std::string inStr)
TQString tmpStr = strtoqstr(inStr); TQString tmpStr = strtoqstr(inStr);
tmpStr.tqreplace(TQRegExp("&"), "\\&"); tmpStr.replace(TQRegExp("&"), "\\&");
tmpStr.tqreplace(TQRegExp("\\^"), "\\^"); tmpStr.replace(TQRegExp("\\^"), "\\^");
tmpStr.tqreplace(TQRegExp("%"), "\\%"); tmpStr.replace(TQRegExp("%"), "\\%");
tmpStr.tqreplace(TQRegExp("<"), "\\<"); tmpStr.replace(TQRegExp("<"), "\\<");
tmpStr.tqreplace(TQRegExp(">"), "\\>"); tmpStr.replace(TQRegExp(">"), "\\>");
tmpStr.tqreplace(TQRegExp("\\["), ""); tmpStr.replace(TQRegExp("\\["), "");
tmpStr.tqreplace(TQRegExp("\\]"), ""); tmpStr.replace(TQRegExp("\\]"), "");
tmpStr.tqreplace(TQRegExp("\\{"), ""); tmpStr.replace(TQRegExp("\\{"), "");
tmpStr.tqreplace(TQRegExp("\\}"), ""); tmpStr.replace(TQRegExp("\\}"), "");
// //
// LilyPond uses utf8 encoding. // LilyPond uses utf8 encoding.
@ -389,11 +389,11 @@ LilyPondExporter::write()
TQString baseName = nfo.fileName(); TQString baseName = nfo.fileName();
// sed LilyPond-choking chars out of the filename proper // sed LilyPond-choking chars out of the filename proper
bool illegalFilename = (baseName.tqcontains(' ') || baseName.tqcontains("\\")); bool illegalFilename = (baseName.contains(' ') || baseName.contains("\\"));
baseName.tqreplace(TQRegExp(" "), ""); baseName.replace(TQRegExp(" "), "");
baseName.tqreplace(TQRegExp("\\\\"), ""); baseName.replace(TQRegExp("\\\\"), "");
baseName.tqreplace(TQRegExp("'"), ""); baseName.replace(TQRegExp("'"), "");
baseName.tqreplace(TQRegExp("\""), ""); baseName.replace(TQRegExp("\""), "");
// cat back together // cat back together
tmpName = dirName + '/' + baseName; tmpName = dirName + '/' + baseName;
@ -1181,7 +1181,7 @@ LilyPondExporter::write()
text += " "; text += " ";
TQString syllable(strtoqstr(ssyllable)); TQString syllable(strtoqstr(ssyllable));
syllable.tqreplace(TQRegExp("\\s+"), ""); syllable.replace(TQRegExp("\\s+"), "");
text += "\"" + syllable + "\""; text += "\"" + syllable + "\"";
haveLyric = true; haveLyric = true;
} else if (verse > lastVerse) { } else if (verse > lastVerse) {
@ -1190,8 +1190,8 @@ LilyPondExporter::write()
} }
} }
text.tqreplace( TQRegExp(" _+([^ ])") , " \\1" ); text.replace( TQRegExp(" _+([^ ])") , " \\1" );
text.tqreplace( "\"_\"" , " " ); text.replace( "\"_\"" , " " );
// Do not create empty context for lyrics. // Do not create empty context for lyrics.
// Does this save some vertical space, as was written // Does this save some vertical space, as was written

@ -129,7 +129,7 @@ protected:
// compose an appropriate LilyPond representation for various Marks // compose an appropriate LilyPond representation for various Marks
std::string composeLilyMark(std::string eventMark, bool stemUp); std::string composeLilyMark(std::string eventMark, bool stemUp);
// tqfind/protect illegal characters in user-supplied strings // find/protect illegal characters in user-supplied strings
std::string protectIllegalChars(std::string inStr); std::string protectIllegalChars(std::string inStr);
// return a string full of column tabs // return a string full of column tabs

@ -2288,7 +2288,7 @@ RosegardenGUIApp::getValidWriteFile(TQString descriptiveExtension,
// extract first extension listed in descriptiveExtension, for instance, // extract first extension listed in descriptiveExtension, for instance,
// ".rg" from "*.rg|Rosegarden files", or ".mid" from "*.mid *.midi|MIDI Files" // ".rg" from "*.rg|Rosegarden files", or ".mid" from "*.mid *.midi|MIDI Files"
// //
TQString extension = descriptiveExtension.left(descriptiveExtension.tqfind('|')).mid(1).section(' ', 0, 0); TQString extension = descriptiveExtension.left(descriptiveExtension.find('|')).mid(1).section(' ', 0, 0);
RG_DEBUG << "RosegardenGUIApp::getValidWriteFile() : extension = " << extension << endl; RG_DEBUG << "RosegardenGUIApp::getValidWriteFile() : extension = " << extension << endl;
@ -2299,7 +2299,7 @@ RosegardenGUIApp::getValidWriteFile(TQString descriptiveExtension,
if (m_doc) { if (m_doc) {
TQString saveFileName = m_doc->getAbsFilePath(); TQString saveFileName = m_doc->getAbsFilePath();
// Show filename without the old extension // Show filename without the old extension
int dotLoc = saveFileName.tqfindRev('.'); int dotLoc = saveFileName.findRev('.');
if (dotLoc >= int(saveFileName.length() - 4)) { if (dotLoc >= int(saveFileName.length() - 4)) {
saveFileName = saveFileName.left(dotLoc); saveFileName = saveFileName.left(dotLoc);
} }
@ -3134,7 +3134,7 @@ void RosegardenGUIApp::slotTempoToSegmentLength(TQWidget* tqparent)
int beats = 0; int beats = 0;
// Get user to tell us how many beats or bars the segment tqcontains // Get user to tell us how many beats or bars the segment contains
BeatsBarsDialog dialog(tqparent); BeatsBarsDialog dialog(tqparent);
if (dialog.exec() == TQDialog::Accepted) { if (dialog.exec() == TQDialog::Accepted) {
beats = dialog.getQuantity(); // beats (or bars) beats = dialog.getQuantity(); // beats (or bars)
@ -3723,8 +3723,8 @@ void RosegardenGUIApp::importProject(TQString filePath)
delete proc; delete proc;
TQString rgFile = filePath; TQString rgFile = filePath;
rgFile.tqreplace(TQRegExp(".rg.rgp$"), ".rg"); rgFile.replace(TQRegExp(".rg.rgp$"), ".rg");
rgFile.tqreplace(TQRegExp(".rgp$"), ".rg"); rgFile.replace(TQRegExp(".rgp$"), ".rg");
openURL(rgFile); openURL(rgFile);
} }
@ -4864,8 +4864,8 @@ void RosegardenGUIApp::slotExportProject()
return ; return ;
TQString rgFile = fileName; TQString rgFile = fileName;
rgFile.tqreplace(TQRegExp(".rg.rgp$"), ".rg"); rgFile.replace(TQRegExp(".rg.rgp$"), ".rg");
rgFile.tqreplace(TQRegExp(".rgp$"), ".rg"); rgFile.replace(TQRegExp(".rgp$"), ".rg");
CurrentProgressDialog::freeze(); CurrentProgressDialog::freeze();

@ -2288,7 +2288,7 @@ RosegardenGUIApp::getValidWriteFile(TQString descriptiveExtension,
// extract first extension listed in descriptiveExtension, for instance, // extract first extension listed in descriptiveExtension, for instance,
// ".rg" from "*.rg|Rosegarden files", or ".mid" from "*.mid *.midi|MIDI Files" // ".rg" from "*.rg|Rosegarden files", or ".mid" from "*.mid *.midi|MIDI Files"
// //
TQString extension = descriptiveExtension.left(descriptiveExtension.tqfind('|')).mid(1).section(' ', 0, 0); TQString extension = descriptiveExtension.left(descriptiveExtension.find('|')).mid(1).section(' ', 0, 0);
RG_DEBUG << "RosegardenGUIApp::getValidWriteFile() : extension = " << extension << endl; RG_DEBUG << "RosegardenGUIApp::getValidWriteFile() : extension = " << extension << endl;
@ -2299,7 +2299,7 @@ RosegardenGUIApp::getValidWriteFile(TQString descriptiveExtension,
if (m_doc) { if (m_doc) {
TQString saveFileName = m_doc->getAbsFilePath(); TQString saveFileName = m_doc->getAbsFilePath();
// Show filename without the old extension // Show filename without the old extension
int dotLoc = saveFileName.tqfindRev('.'); int dotLoc = saveFileName.findRev('.');
if (dotLoc >= int(saveFileName.length() - 4)) { if (dotLoc >= int(saveFileName.length() - 4)) {
saveFileName = saveFileName.left(dotLoc); saveFileName = saveFileName.left(dotLoc);
} }
@ -3134,7 +3134,7 @@ void RosegardenGUIApp::slotTempoToSegmentLength(TQWidget* tqparent)
int beats = 0; int beats = 0;
// Get user to tell us how many beats or bars the segment tqcontains // Get user to tell us how many beats or bars the segment contains
BeatsBarsDialog dialog(tqparent); BeatsBarsDialog dialog(tqparent);
if (dialog.exec() == TQDialog::Accepted) { if (dialog.exec() == TQDialog::Accepted) {
beats = dialog.getQuantity(); // beats (or bars) beats = dialog.getQuantity(); // beats (or bars)
@ -3723,8 +3723,8 @@ void RosegardenGUIApp::importProject(TQString filePath)
delete proc; delete proc;
TQString rgFile = filePath; TQString rgFile = filePath;
rgFile.tqreplace(TQRegExp(".rg.rgp$"), ".rg"); rgFile.replace(TQRegExp(".rg.rgp$"), ".rg");
rgFile.tqreplace(TQRegExp(".rgp$"), ".rg"); rgFile.replace(TQRegExp(".rgp$"), ".rg");
openURL(rgFile); openURL(rgFile);
} }
@ -4864,8 +4864,8 @@ void RosegardenGUIApp::slotExportProject()
return ; return ;
TQString rgFile = fileName; TQString rgFile = fileName;
rgFile.tqreplace(TQRegExp(".rg.rgp$"), ".rg"); rgFile.replace(TQRegExp(".rg.rgp$"), ".rg");
rgFile.tqreplace(TQRegExp(".rgp$"), ".rg"); rgFile.replace(TQRegExp(".rgp$"), ".rg");
CurrentProgressDialog::freeze(); CurrentProgressDialog::freeze();

@ -98,7 +98,7 @@ disastrous side-effects.
automatically ordered by their absolute time. It's the usual automatically ordered by their absolute time. It's the usual
container for Events. A Segment has a starting time that can be 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 changed, and a duration that is based solely on the end time of
the last Event it tqcontains. Note that in order to facilitate the last Event it contains. Note that in order to facilitate
musical notation editing, we explicitly store silences as series musical notation editing, we explicitly store silences as series
of rest Events; thus a Segment really should contain no gaps of rest Events; thus a Segment really should contain no gaps
between its Events. (This isn't checked anywhere and nothing will 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 The NotationTypes classes also define important constants for the
names of common properties in Events. For example, the Note class names of common properties in Events. For example, the Note class
contains Note::EventType, which is the type of a note Event, and contains Note::EventType, which is the type of a note Event, and
Note::EventRestType, the type of a rest Event; and Key tqcontains Note::EventRestType, the type of a rest Event; and Key contains
Key::EventType, the type of a key change Event, KeyPropertyName, Key::EventType, the type of a key change Event, KeyPropertyName,
the name of the property that defines the key change, and a set the name of the property that defines the key change, and a set
of the valid strings for key changes. of the valid strings for key changes.

@ -235,7 +235,7 @@ HeadersConfigurationPage::slotAddNewProperty()
propertyName = propertyName =
(i > 0 ? i18n("{new property %1}").tqarg(i) : i18n("{new property}")); (i > 0 ? i18n("{new property %1}").tqarg(i) : i18n("{new property}"));
if (!m_doc->getComposition().getMetadata().has(qstrtostr(propertyName)) && if (!m_doc->getComposition().getMetadata().has(qstrtostr(propertyName)) &&
m_metadata->tqfindItem(propertyName,0) == 0) m_metadata->findItem(propertyName,0) == 0)
break; break;
++i; ++i;
} }

@ -493,7 +493,7 @@ AudioManagerDialog::slotExportAudio()
// Check for a dot extension and append ".wav" if not found // Check for a dot extension and append ".wav" if not found
// //
if (saveFile.tqcontains(".") == 0) if (saveFile.contains(".") == 0)
saveFile += ".wav"; saveFile += ".wav";
ProgressDialog progressDlg(i18n("Exporting audio file..."), ProgressDialog progressDlg(i18n("Exporting audio file..."),

@ -494,7 +494,7 @@ AudioPluginDialog::slotPluginSelected(int i)
m_insOuts->setText(i18n("%1 in, %2 out").tqarg(ins).tqarg(outs)); m_insOuts->setText(i18n("%1 in, %2 out").tqarg(ins).tqarg(outs));
TQString shortName(plugin->getName()); TQString shortName(plugin->getName());
int parenIdx = shortName.tqfind(" ("); int parenIdx = shortName.find(" (");
if (parenIdx > 0) { if (parenIdx > 0) {
shortName = shortName.left(parenIdx); shortName = shortName.left(parenIdx);
if (shortName == "Null") if (shortName == "Null")

@ -47,7 +47,7 @@ BeatsBarsDialog::BeatsBarsDialog(TQWidget* tqparent) :
TQHBox *hbox = makeHBoxMainWidget(); TQHBox *hbox = makeHBoxMainWidget();
TQGroupBox *gbox = new TQGroupBox(1, Qt::Horizontal, TQGroupBox *gbox = new TQGroupBox(1, Qt::Horizontal,
i18n("The selected audio segment tqcontains:"), hbox); i18n("The selected audio segment contains:"), hbox);
TQFrame *frame = new TQFrame(gbox); TQFrame *frame = new TQFrame(gbox);
TQGridLayout *tqlayout = new TQGridLayout(frame, 1, 2, 5, 5); TQGridLayout *tqlayout = new TQGridLayout(frame, 1, 2, 5, 5);

@ -290,7 +290,7 @@ KeySignatureDialog::regenerateKeyCombo()
i != keys.end(); ++i) { i != keys.end(); ++i) {
TQString name(strtoqstr(i->getName())); TQString name(strtoqstr(i->getName()));
int space = name.tqfind(' '); int space = name.find(' ');
if (space > 0) if (space > 0)
name = name.left(space); name = name.left(space);

@ -219,7 +219,7 @@ LyricEditDialog::unparse()
(*i)->get<Int>(Text::LyricVersePropertyName, verse); (*i)->get<Int>(Text::LyricVersePropertyName, verse);
TQString syllable(strtoqstr(ssyllable)); TQString syllable(strtoqstr(ssyllable));
syllable.tqreplace(TQRegExp("\\s+"), "~"); syllable.replace(TQRegExp("\\s+"), "~");
m_texts[verse] += " " + syllable; m_texts[verse] += " " + syllable;
haveLyric[verse] = true; haveLyric[verse] = true;

@ -1271,7 +1271,7 @@ EventView::getCurrentSegment()
void void
EventView::slotModifyFilter(int button) EventView::slotModifyFilter(int button)
{ {
TQCheckBox *checkBox = dynamic_cast<TQCheckBox*>(m_filterGroup->tqfind(button)); TQCheckBox *checkBox = dynamic_cast<TQCheckBox*>(m_filterGroup->find(button));
if (checkBox == 0) if (checkBox == 0)
return ; return ;

@ -70,7 +70,7 @@ public:
TQString getExt() const { return m_ext; } TQString getExt() const { return m_ext; }
void setExt(TQString r) { m_ext = r.isEmpty() ? TQString() : r; } void setExt(TQString r) { m_ext = r.isEmpty() ? TQString() : r; }
bool hasAltBass() const { return m_ext.tqcontains(ALT_BASS_REGEXP); } bool hasAltBass() const { return m_ext.contains(ALT_BASS_REGEXP); }
Fingering getFingering() const { return m_fingering; } Fingering getFingering() const { return m_fingering; }
void setFingering(Fingering f) { m_fingering = f; } void setFingering(Fingering f) { m_fingering = f; }

@ -75,13 +75,13 @@ GuitarChordEditorDialog::GuitarChordEditorDialog(Guitar::Chord& chord, const Gui
TQStringList rootList = m_chordMap.getRootList(); TQStringList rootList = m_chordMap.getRootList();
if (rootList.count() > 0) { if (rootList.count() > 0) {
m_rootNotesList->insertStringList(rootList); m_rootNotesList->insertStringList(rootList);
m_rootNotesList->setCurrentItem(rootList.tqfindIndex(m_chord.getRoot())); m_rootNotesList->setCurrentItem(rootList.findIndex(m_chord.getRoot()));
} }
TQStringList extList = m_chordMap.getExtList(m_chord.getRoot()); TQStringList extList = m_chordMap.getExtList(m_chord.getRoot());
if (extList.count() > 0) { if (extList.count() > 0) {
m_ext->insertStringList(extList); m_ext->insertStringList(extList);
m_ext->setCurrentItem(extList.tqfindIndex(m_chord.getExt())); m_ext->setCurrentItem(extList.findIndex(m_chord.getExt()));
} }
} }

@ -214,12 +214,12 @@ GuitarChordSelectorDialog::slotNewFingering()
m_chordMap.insert(newChord); m_chordMap.insert(newChord);
// populate lists // populate lists
// //
if (!m_rootNotesList->tqfindItem(newChord.getRoot(), TQt::ExactMatch)) { if (!m_rootNotesList->findItem(newChord.getRoot(), TQt::ExactMatch)) {
m_rootNotesList->insertItem(newChord.getRoot()); m_rootNotesList->insertItem(newChord.getRoot());
m_rootNotesList->sort(); m_rootNotesList->sort();
} }
if (!m_chordExtList->tqfindItem(newChord.getExt(), TQt::ExactMatch)) { if (!m_chordExtList->findItem(newChord.getExt(), TQt::ExactMatch)) {
m_chordExtList->insertItem(newChord.getExt()); m_chordExtList->insertItem(newChord.getExt());
m_chordExtList->sort(); m_chordExtList->sort();
} }
@ -280,7 +280,7 @@ GuitarChordSelectorDialog::setChord(const Guitar::Chord& chord)
// select the chord's root // select the chord's root
// //
m_rootNotesList->setCurrentItem(0); m_rootNotesList->setCurrentItem(0);
TQListBoxItem* correspondingRoot = m_rootNotesList->tqfindItem(chord.getRoot(), TQt::ExactMatch); TQListBoxItem* correspondingRoot = m_rootNotesList->findItem(chord.getRoot(), TQt::ExactMatch);
if (correspondingRoot) if (correspondingRoot)
m_rootNotesList->setSelected(correspondingRoot, true); m_rootNotesList->setSelected(correspondingRoot, true);
@ -303,7 +303,7 @@ GuitarChordSelectorDialog::setChord(const Guitar::Chord& chord)
chordExt = ""; chordExt = "";
m_chordExtList->setSelected(0, true); m_chordExtList->setSelected(0, true);
} else { } else {
TQListBoxItem* correspondingExt = m_chordExtList->tqfindItem(chordExt, TQt::ExactMatch); TQListBoxItem* correspondingExt = m_chordExtList->findItem(chordExt, TQt::ExactMatch);
if (correspondingExt) if (correspondingExt)
m_chordExtList->setSelected(correspondingExt, true); m_chordExtList->setSelected(correspondingExt, true);
} }

@ -130,7 +130,7 @@ void MatrixCanvasView::contentsMousePressEvent(TQMouseEvent* e)
// TQCanvas::collisions() can be a bit optimistic and report // TQCanvas::collisions() can be a bit optimistic and report
// items which are close to the point but not actually under it. // items which are close to the point but not actually under it.
// So a little sanity check helps. // So a little sanity check helps.
if (!rect.tqcontains(p, true)) continue; if (!rect.contains(p, true)) continue;
mel = &(mRect->getMatrixElement()); mel = &(mRect->getMatrixElement());
// std::cerr << "MatrixCanvasView::contentsMousePressEvent: collision with an existing matrix element" << std::endl; // std::cerr << "MatrixCanvasView::contentsMousePressEvent: collision with an existing matrix element" << std::endl;
@ -198,7 +198,7 @@ void MatrixCanvasView::contentsMouseMoveEvent(TQMouseEvent* e)
QCanvasMatrixRectangle *mRect = 0; QCanvasMatrixRectangle *mRect = 0;
if ((mRect = dynamic_cast<QCanvasMatrixRectangle*>(item))) { if ((mRect = dynamic_cast<QCanvasMatrixRectangle*>(item))) {
if (!mRect->rect().tqcontains(p, true)) if (!mRect->rect().contains(p, true))
continue; continue;
mel = &(mRect->getMatrixElement()); mel = &(mRect->getMatrixElement());
MATRIX_DEBUG << "have element" << endl; MATRIX_DEBUG << "have element" << endl;

@ -124,14 +124,14 @@ void MatrixMover::handleLeftButtonPress(timeT time,
EventSelection *newSelection; EventSelection *newSelection;
if ((e->state() & TQt::ShiftButton) || if ((e->state() & TQt::ShiftButton) ||
selection->tqcontains(m_currentElement->event())) selection->contains(m_currentElement->event()))
newSelection = new EventSelection(*selection); newSelection = new EventSelection(*selection);
else else
newSelection = new EventSelection(m_currentStaff->getSegment()); newSelection = new EventSelection(m_currentStaff->getSegment());
// if the selection already contains the event, remove it from the // if the selection already contains the event, remove it from the
// selection if shift is pressed // selection if shift is pressed
if (selection->tqcontains(m_currentElement->event())){ if (selection->contains(m_currentElement->event())){
if (e->state() & TQt::ShiftButton) if (e->state() & TQt::ShiftButton)
newSelection->removeEvent(m_currentElement->event()); newSelection->removeEvent(m_currentElement->event());
} else { } else {

@ -111,7 +111,7 @@ void MatrixResizer::handleLeftButtonPress(timeT,
EventSelection *newSelection; EventSelection *newSelection;
if ((e->state() & TQt::ShiftButton) || if ((e->state() & TQt::ShiftButton) ||
selection->tqcontains(m_currentElement->event())) selection->contains(m_currentElement->event()))
newSelection = new EventSelection(*selection); newSelection = new EventSelection(*selection);
else else
newSelection = new EventSelection(m_currentStaff->getSegment()); newSelection = new EventSelection(m_currentStaff->getSegment());

@ -576,7 +576,7 @@ void MatrixSelector::setContextHelpFor(TQPoint p, bool ctrlPressed)
} }
if ((mRect = dynamic_cast<QCanvasMatrixRectangle*>(item))) { if ((mRect = dynamic_cast<QCanvasMatrixRectangle*>(item))) {
if (! mRect->rect().tqcontains(p, true)) continue; if (! mRect->rect().contains(p, true)) continue;
mel = &(mRect->getMatrixElement()); mel = &(mRect->getMatrixElement());
break; break;
} }

@ -166,7 +166,7 @@ void MatrixStaff::positionElement(ViewElement* vel)
// //
EventSelection *selection = m_view->getCurrentSelection(); EventSelection *selection = m_view->getCurrentSelection();
if (selection && selection->tqcontains(el->event())) if (selection && selection->contains(el->event()))
el->setColour(GUIPalette::getColour(GUIPalette::SelectedElement)); el->setColour(GUIPalette::getColour(GUIPalette::SelectedElement));
else if (el->event()->has(BaseProperties::TRIGGER_SEGMENT_ID)) else if (el->event()->has(BaseProperties::TRIGGER_SEGMENT_ID))
el->setColour(TQt::gray); el->setColour(TQt::gray);

@ -1156,7 +1156,7 @@ void MatrixView::setCurrentSelection(EventSelection* s, bool preview,
i != s->getSegmentEvents().end(); ++i) { i != s->getSegmentEvents().end(); ++i) {
if (oldSelection && oldSelection->getSegment() == s->getSegment() if (oldSelection && oldSelection->getSegment() == s->getSegment()
&& oldSelection->tqcontains(*i)) && oldSelection->contains(*i))
continue; continue;
foundNewEvent = true; foundNewEvent = true;
@ -1254,11 +1254,11 @@ void MatrixView::setCurrentSelection(EventSelection* s, bool preview,
if (s) { if (s) {
stateChanged("have_selection", KXMLGUIClient::StateNoReverse); stateChanged("have_selection", KXMLGUIClient::StateNoReverse);
if (s->tqcontains(Note::EventType)) { if (s->contains(Note::EventType)) {
stateChanged("have_notes_in_selection", stateChanged("have_notes_in_selection",
KXMLGUIClient::StateNoReverse); KXMLGUIClient::StateNoReverse);
} }
if (s->tqcontains(Note::EventRestType)) { if (s->contains(Note::EventRestType)) {
stateChanged("have_rests_in_selection", stateChanged("have_rests_in_selection",
KXMLGUIClient::StateNoReverse); KXMLGUIClient::StateNoReverse);
} }

@ -185,7 +185,7 @@ NotationGroup::sample(const NELIterator &i, bool goingForwards)
} }
bool bool
NotationGroup::tqcontains(const NELIterator &i) const NotationGroup::contains(const NELIterator &i) const
{ {
NELIterator j(getInitialElement()), NELIterator j(getInitialElement()),
k( getFinalElement()); k( getFinalElement());

@ -92,7 +92,7 @@ public:
*/ */
void applyTuplingLine(NotationStaff &); void applyTuplingLine(NotationStaff &);
virtual bool tqcontains(const NELIterator &) const; virtual bool contains(const NELIterator &) const;
virtual bool sample(const NELIterator &i, bool goingForwards); virtual bool sample(const NELIterator &i, bool goingForwards);

@ -1653,7 +1653,7 @@ NotationHLayout::getSpacingDuration(Staff &staff,
if (d > 0 && (*i)->event()->getDuration() == 0) return d; // grace note if (d > 0 && (*i)->event()->getDuration() == 0) return d; // grace note
NotationElementList::iterator j(i), e(staff.getViewElementList()->end()); NotationElementList::iterator j(i), e(staff.getViewElementList()->end());
while (j != e && (chord.tqcontains(j) || (*j)->getViewDuration() == 0)) while (j != e && (chord.contains(j) || (*j)->getViewDuration() == 0))
++j; ++j;
if (j != e) { if (j != e) {

@ -375,7 +375,7 @@ void NotationSelector::handleMouseRelease(timeT, int, TQMouseEvent *e)
// if the event was already part of the selection, we want to // if the event was already part of the selection, we want to
// remove it // remove it
if (m_selectionToMerge->tqcontains(m_clickedElement->event())) { if (m_selectionToMerge->contains(m_clickedElement->event())) {
m_selectionToMerge->removeEvent(m_clickedElement->event()); m_selectionToMerge->removeEvent(m_clickedElement->event());
} else { } else {
m_selectionToMerge->addEvent(m_clickedElement->event()); m_selectionToMerge->addEvent(m_clickedElement->event());
@ -431,7 +431,7 @@ void NotationSelector::drag(int x, int y, bool final)
return ; return ;
EventSelection *selection = m_nParentView->getCurrentSelection(); EventSelection *selection = m_nParentView->getCurrentSelection();
if (!selection || !selection->tqcontains(m_clickedElement->event())) { if (!selection || !selection->contains(m_clickedElement->event())) {
selection = new EventSelection(m_selectedStaff->getSegment()); selection = new EventSelection(m_selectedStaff->getSegment());
selection->addEvent(m_clickedElement->event()); selection->addEvent(m_clickedElement->event());
} }
@ -614,7 +614,7 @@ void NotationSelector::dragFine(int x, int y, bool final)
EventSelection *selection = m_nParentView->getCurrentSelection(); EventSelection *selection = m_nParentView->getCurrentSelection();
if (!selection) if (!selection)
selection = new EventSelection(m_selectedStaff->getSegment()); selection = new EventSelection(m_selectedStaff->getSegment());
if (!selection->tqcontains(m_clickedElement->event())) if (!selection->contains(m_clickedElement->event()))
selection->addEvent(m_clickedElement->event()); selection->addEvent(m_clickedElement->event());
m_nParentView->setCurrentSelection(selection); m_nParentView->setCurrentSelection(selection);
@ -870,11 +870,11 @@ EventSelection* NotationSelector::getSelection()
x += nbw; x += nbw;
} }
if (!rect.tqcontains(x, int((*it)->y()), true)) { if (!rect.contains(x, int((*it)->y()), true)) {
// #988217 (Notation: Special column of pixels // #988217 (Notation: Special column of pixels
// prevents sweep selection) -- for notes, test // prevents sweep selection) -- for notes, test
// again with centred x-coord // again with centred x-coord
if (!el.isNote() || !rect.tqcontains(x + nbw/2, int((*it)->y()), true)) { if (!el.isNote() || !rect.contains(x + nbw/2, int((*it)->y()), true)) {
continue; continue;
} }
} }
@ -925,11 +925,11 @@ EventSelection* NotationSelector::getSelection()
// check if the element's rect // check if the element's rect
// is actually included in the selection rect. // is actually included in the selection rect.
// //
if (!rect.tqcontains(x, int((*it)->y()), true)) { if (!rect.contains(x, int((*it)->y()), true)) {
// #988217 (Notation: Special column of pixels // #988217 (Notation: Special column of pixels
// prevents sweep selection) -- for notes, test again // prevents sweep selection) -- for notes, test again
// with centred x-coord // with centred x-coord
if (!el.isNote() || !rect.tqcontains(x + nbw/2, int((*it)->y()), true)) { if (!el.isNote() || !rect.contains(x + nbw/2, int((*it)->y()), true)) {
continue; continue;
} }
} }

@ -1819,7 +1819,7 @@ NotationStaff::isSelected(NotationElementList::iterator it)
{ {
const EventSelection *selection = const EventSelection *selection =
m_notationView->getCurrentSelection(); m_notationView->getCurrentSelection();
return selection && selection->tqcontains((*it)->event()); return selection && selection->contains((*it)->event());
} }
void void

@ -182,7 +182,7 @@ Note
NotationStrings::getNoteForName(TQString name) NotationStrings::getNoteForName(TQString name)
{ {
std::string origName(qstrtostr(name)); std::string origName(qstrtostr(name));
int pos = name.tqfind('-'); int pos = name.find('-');
int dots = 0; int dots = 0;
if (pos > 0 && pos < 6 && pos < int(name.length()) - 1) { if (pos > 0 && pos < 6 && pos < int(name.length()) - 1) {

@ -3147,7 +3147,7 @@ void NotationView::setCurrentSelection(EventSelection* s, bool preview,
i != s->getSegmentEvents().end(); ++i) { i != s->getSegmentEvents().end(); ++i) {
if (oldSelection && oldSelection->getSegment() == s->getSegment() if (oldSelection && oldSelection->getSegment() == s->getSegment()
&& oldSelection->tqcontains(*i)) && oldSelection->contains(*i))
continue; continue;
foundNewEvent = true; foundNewEvent = true;
@ -3829,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; 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); stateChanged("have_selection", KXMLGUIClient::StateNoReverse);
if (m_currentEventSelection->tqcontains if (m_currentEventSelection->contains
(Note::EventType)) { (Note::EventType)) {
stateChanged("have_notes_in_selection", stateChanged("have_notes_in_selection",
KXMLGUIClient::StateNoReverse); KXMLGUIClient::StateNoReverse);
} }
if (m_currentEventSelection->tqcontains if (m_currentEventSelection->contains
(Note::EventRestType)) { (Note::EventRestType)) {
stateChanged("have_rests_in_selection", stateChanged("have_rests_in_selection",
KXMLGUIClient::StateNoReverse); KXMLGUIClient::StateNoReverse);
@ -3955,7 +3955,7 @@ void NotationView::slotNoteAction()
const TQObject* sigSender = TQT_TQOBJECT_CONST(const_cast<const TQT_BASE_OBJECT_NAME*>(sender())); const TQObject* sigSender = TQT_TQOBJECT_CONST(const_cast<const TQT_BASE_OBJECT_NAME*>(sender()));
NoteActionDataMap::Iterator noteAct = NoteActionDataMap::Iterator noteAct =
m_noteActionDataMap->tqfind(sigSender->name()); m_noteActionDataMap->find(sigSender->name());
if (noteAct != m_noteActionDataMap->end()) { if (noteAct != m_noteActionDataMap->end()) {
m_lastNoteAction = sigSender->name(); m_lastNoteAction = sigSender->name();
@ -3987,7 +3987,7 @@ void NotationView::slotAddMark()
if (!m_currentEventSelection) if (!m_currentEventSelection)
return ; return ;
MarkActionDataMap::Iterator i = m_markActionDataMap->tqfind(s->name()); MarkActionDataMap::Iterator i = m_markActionDataMap->find(s->name());
if (i != m_markActionDataMap->end()) { if (i != m_markActionDataMap->end()) {
addCommandToHistory(new AddMarkCommand addCommandToHistory(new AddMarkCommand
@ -4000,7 +4000,7 @@ void NotationView::slotNoteChangeAction()
const TQObject* sigSender = TQT_TQOBJECT_CONST(const_cast<const TQT_BASE_OBJECT_NAME*>(sender())); const TQObject* sigSender = TQT_TQOBJECT_CONST(const_cast<const TQT_BASE_OBJECT_NAME*>(sender()));
NoteChangeActionDataMap::Iterator noteAct = NoteChangeActionDataMap::Iterator noteAct =
m_noteChangeActionDataMap->tqfind(sigSender->name()); m_noteChangeActionDataMap->find(sigSender->name());
if (noteAct != m_noteChangeActionDataMap->end()) { if (noteAct != m_noteChangeActionDataMap->end()) {
slotSetNoteDurations((**noteAct).noteType, (**noteAct).notationOnly); slotSetNoteDurations((**noteAct).noteType, (**noteAct).notationOnly);
@ -4032,7 +4032,7 @@ void NotationView::initActionDataMaps()
(NotationStrings::getReferenceName(Note(type, dots), rest == 1)); (NotationStrings::getReferenceName(Note(type, dots), rest == 1));
TQString shortName(refName); TQString shortName(refName);
shortName.tqreplace(TQRegExp("-"), "_"); shortName.replace(TQRegExp("-"), "_");
TQString titleName TQString titleName
(NotationStrings::getNoteName(Note(type, dots))); (NotationStrings::getNoteName(Note(type, dots)));
@ -4041,7 +4041,7 @@ void NotationView::initActionDataMaps()
titleName.right(titleName.length() - 1); titleName.right(titleName.length() - 1);
if (rest) { if (rest) {
titleName.tqreplace(TQRegExp(i18n("note")), i18n("rest")); titleName.replace(TQRegExp(i18n("note")), i18n("rest"));
} }
int keycode = keys[type - Note::Shortest]; int keycode = keys[type - Note::Shortest];
@ -4068,7 +4068,7 @@ void NotationView::initActionDataMaps()
TQString shortName(TQString("change_%1%2") TQString shortName(TQString("change_%1%2")
.tqarg(notationOnly ? "notation_" : "").tqarg(refName)); .tqarg(notationOnly ? "notation_" : "").tqarg(refName));
shortName.tqreplace(TQRegExp("-"), "_"); shortName.replace(TQRegExp("-"), "_");
TQString titleName TQString titleName
(NotationStrings::getNoteName(Note(type, 0))); (NotationStrings::getNoteName(Note(type, 0)));
@ -5658,7 +5658,7 @@ void NotationView::slotSwitchFromRestToNote()
Note note(restInserter->getCurrentNote()); Note note(restInserter->getCurrentNote());
TQString actionName = NotationStrings::getReferenceName(note, false); TQString actionName = NotationStrings::getReferenceName(note, false);
actionName = actionName.tqreplace("-", "_"); actionName = actionName.replace("-", "_");
KRadioAction *action = dynamic_cast<KRadioAction *> KRadioAction *action = dynamic_cast<KRadioAction *>
(actionCollection()->action(actionName)); (actionCollection()->action(actionName));
@ -5693,7 +5693,7 @@ void NotationView::slotSwitchFromNoteToRest()
Note note(noteInserter->getCurrentNote()); Note note(noteInserter->getCurrentNote());
TQString actionName = NotationStrings::getReferenceName(note, true); TQString actionName = NotationStrings::getReferenceName(note, true);
actionName = actionName.tqreplace("-", "_"); actionName = actionName.replace("-", "_");
KRadioAction *action = dynamic_cast<KRadioAction *> KRadioAction *action = dynamic_cast<KRadioAction *>
(actionCollection()->action(actionName)); (actionCollection()->action(actionName));

@ -65,7 +65,7 @@ NoteFontMap::NoteFontMap(std::string name) :
if (!mapFileMixedInfo.isReadable()) { if (!mapFileMixedInfo.isReadable()) {
TQString lowerName = strtoqstr(name).lower(); TQString lowerName = strtoqstr(name).lower();
lowerName.tqreplace(TQRegExp(" "), "_"); lowerName.replace(TQRegExp(" "), "_");
TQString mapFileLowerName = TQString("%1/mappings/%2.xml") TQString mapFileLowerName = TQString("%1/mappings/%2.xml")
.tqarg(m_fontDirectory) .tqarg(m_fontDirectory)
.tqarg(lowerName); .tqarg(lowerName);

@ -661,7 +661,7 @@ void NoteInserter::slotToggleDot()
m_noteDots = (m_noteDots) ? 0 : 1; m_noteDots = (m_noteDots) ? 0 : 1;
Note note(m_noteType, m_noteDots); Note note(m_noteType, m_noteDots);
TQString actionName(NotationStrings::getReferenceName(note)); TQString actionName(NotationStrings::getReferenceName(note));
actionName.tqreplace(TQRegExp("-"), "_"); actionName.replace(TQRegExp("-"), "_");
KAction *action = m_parentView->actionCollection()->action(actionName); KAction *action = m_parentView->actionCollection()->action(actionName);
if (!action) { if (!action) {
std::cerr << "WARNING: No such action as " << actionName << std::endl; std::cerr << "WARNING: No such action as " << actionName << std::endl;
@ -689,7 +689,7 @@ void NoteInserter::slotRestsSelected()
{ {
Note note(m_noteType, m_noteDots); Note note(m_noteType, m_noteDots);
TQString actionName(NotationStrings::getReferenceName(note, true)); TQString actionName(NotationStrings::getReferenceName(note, true));
actionName.tqreplace(TQRegExp("-"), "_"); actionName.replace(TQRegExp("-"), "_");
KAction *action = m_parentView->actionCollection()->action(actionName); KAction *action = m_parentView->actionCollection()->action(actionName);
if (!action) { if (!action) {
std::cerr << "WARNING: No such action as " << actionName << std::endl; std::cerr << "WARNING: No such action as " << actionName << std::endl;

@ -2300,7 +2300,7 @@ NotePixmapFactory::makeTrackHeaderPixmap(
if (!text.isEmpty()) { if (!text.isEmpty()) {
// String too long : cut it and replace last character by dots // String too long : cut it and replace last character by dots
int len = textLine.length(); int len = textLine.length();
if (len > 1) textLine.tqreplace(len - 1, 1, i18n("...")); if (len > 1) textLine.replace(len - 1, 1, i18n("..."));
} }
} else { } else {
textLine = getOneLine(text, width - charWidth / 2); textLine = getOneLine(text, width - charWidth / 2);
@ -2344,7 +2344,7 @@ NotePixmapFactory::makeTrackHeaderPixmap(
if ((l == numberOfTextLines) && !text.isEmpty()) { if ((l == numberOfTextLines) && !text.isEmpty()) {
// String too long : cut it and replace last character by dots // String too long : cut it and replace last character by dots
int len = textLine.length(); int len = textLine.length();
if (len > 1) textLine.tqreplace(len - 1, 1, i18n("...")); if (len > 1) textLine.replace(len - 1, 1, i18n("..."));
} }
m_p->drawText(charWidth / 4, lowerTextY, textLine); m_p->drawText(charWidth / 4, lowerTextY, textLine);

@ -127,7 +127,7 @@ void RestInserter::slotToggleDot()
m_noteDots = (m_noteDots) ? 0 : 1; m_noteDots = (m_noteDots) ? 0 : 1;
Note note(m_noteType, m_noteDots); Note note(m_noteType, m_noteDots);
TQString actionName(NotationStrings::getReferenceName(note, true)); TQString actionName(NotationStrings::getReferenceName(note, true));
actionName.tqreplace(TQRegExp("-"), "_"); actionName.replace(TQRegExp("-"), "_");
KAction *action = m_parentView->actionCollection()->action(actionName); KAction *action = m_parentView->actionCollection()->action(actionName);
if (!action) { if (!action) {
std::cerr << "WARNING: No such action as " << actionName << std::endl; std::cerr << "WARNING: No such action as " << actionName << std::endl;
@ -140,7 +140,7 @@ void RestInserter::slotNotesSelected()
{ {
Note note(m_noteType, m_noteDots); Note note(m_noteType, m_noteDots);
TQString actionName(NotationStrings::getReferenceName(note)); TQString actionName(NotationStrings::getReferenceName(note));
actionName.tqreplace(TQRegExp(" "), "_"); actionName.replace(TQRegExp(" "), "_");
m_parentView->actionCollection()->action(actionName)->activate(); m_parentView->actionCollection()->action(actionName)->activate();
} }

@ -152,7 +152,7 @@ qfont:
if (family == name.lower()) if (family == name.lower())
return new SystemFontQt(qfont); return new SystemFontQt(qfont);
else { else {
int bracket = family.tqfind(" ["); int bracket = family.find(" [");
if (bracket > 1) if (bracket > 1)
family = family.left(bracket); family = family.left(bracket);
if (family == name.lower()) if (family == name.lower())

@ -66,16 +66,16 @@ InstrumentParameterBox::InstrumentParameterBox(RosegardenGUIDoc *doc,
m_midiInstrumentParameters->setFont(m_font); m_midiInstrumentParameters->setFont(m_font);
m_audioInstrumentParameters->setFont(m_font); m_audioInstrumentParameters->setFont(m_font);
bool tqcontains = false; bool contains = false;
std::vector<InstrumentParameterBox*>::iterator it = std::vector<InstrumentParameterBox*>::iterator it =
instrumentParamBoxes.begin(); instrumentParamBoxes.begin();
for (; it != instrumentParamBoxes.end(); it++) for (; it != instrumentParamBoxes.end(); it++)
if ((*it) == this) if ((*it) == this)
tqcontains = true; contains = true;
if (!tqcontains) if (!contains)
instrumentParamBoxes.push_back(this); instrumentParamBoxes.push_back(this);
m_widgetStack->addWidget(m_midiInstrumentParameters); m_widgetStack->addWidget(m_midiInstrumentParameters);

@ -216,7 +216,7 @@ MIDIInstrumentParameterPanel::setupForInstrument(Instrument *instrument)
} else { } else {
// remove trailing "(duplex)", "(read only)", "(write only)" etc // remove trailing "(duplex)", "(read only)", "(write only)" etc
connection.tqreplace(TQRegExp("\\s*\\([^)0-9]+\\)\\s*$"), ""); connection.replace(TQRegExp("\\s*\\([^)0-9]+\\)\\s*$"), "");
TQString text = i18n("[ %1 ]").tqarg(connection); TQString text = i18n("[ %1 ]").tqarg(connection);
/*TQString origText(text); /*TQString origText(text);

@ -453,7 +453,7 @@ TrackParameterBox::populatePlaybackDeviceList()
DeviceId devId = device->getId(); DeviceId devId = device->getId();
if ((*it)->getType() == Instrument::SoftSynth) { if ((*it)->getType() == Instrument::SoftSynth) {
iname.tqreplace("Synth plugin ", ""); iname.replace("Synth plugin ", "");
pname = ""; pname = "";
AudioPluginInstance *plugin = (*it)->getPlugin AudioPluginInstance *plugin = (*it)->getPlugin
(Instrument::SYNTH_PLUGIN_POSITION); (Instrument::SYNTH_PLUGIN_POSITION);
@ -547,7 +547,7 @@ TrackParameterBox::populateRecordingDeviceList()
&& dev->isRecording()) { && dev->isRecording()) {
TQString connection = strtoqstr(dev->getConnection()); TQString connection = strtoqstr(dev->getConnection());
// remove trailing "(duplex)", "(read only)", "(write only)" etc // remove trailing "(duplex)", "(read only)", "(write only)" etc
connection.tqreplace(TQRegExp("\\s*\\([^)0-9]+\\)\\s*$"), ""); connection.replace(TQRegExp("\\s*\\([^)0-9]+\\)\\s*$"), "");
m_recDevice->insertItem(connection); m_recDevice->insertItem(connection);
m_recDeviceIds.push_back(dev->getId()); m_recDeviceIds.push_back(dev->getId());
} }

@ -476,7 +476,7 @@ void CompositionModelImpl::slotAudioPreviewComplete(AudioPreviewUpdater* apu)
TQRect updateRect; TQRect updateRect;
if (apData) { if (apData) {
RG_DEBUG << "CompositionModelImpl::slotAudioPreviewComplete(" << apu << "): apData tqcontains " << apData->getValues().size() << " values already" << endl; RG_DEBUG << "CompositionModelImpl::slotAudioPreviewComplete(" << apu << "): apData contains " << apData->getValues().size() << " values already" << endl;
unsigned int channels = 0; unsigned int channels = 0;
const std::vector<float> &values = apu->getComputedValues(channels); const std::vector<float> &values = apu->getComputedValues(channels);
if (channels > 0) { if (channels > 0) {
@ -796,7 +796,7 @@ CompositionModel::itemcontainer CompositionModelImpl::getItemsAt(const TQPoint&
Segment* s = *i; Segment* s = *i;
CompositionRect sr = computeSegmentRect(*s); CompositionRect sr = computeSegmentRect(*s);
if (sr.tqcontains(point)) { if (sr.contains(point)) {
// RG_DEBUG << "CompositionModelImpl::getItemsAt() adding " << sr << " for segment " << s << endl; // RG_DEBUG << "CompositionModelImpl::getItemsAt() adding " << sr << " for segment " << s << endl;
CompositionItem item(new CompositionItemImpl(*s, sr)); CompositionItem item(new CompositionItemImpl(*s, sr));
unsigned int z = computeZForSegment(s); unsigned int z = computeZForSegment(s);
@ -1124,7 +1124,7 @@ CompositionRect CompositionModelImpl::computeSegmentRect(const Segment& s, bool
if (s.getType() == Segment::Audio) { if (s.getType() == Segment::Audio) {
static TQRegExp re1("( *\\([^)]*\\))*$"); // (inserted) (copied) (etc) static TQRegExp re1("( *\\([^)]*\\))*$"); // (inserted) (copied) (etc)
static TQRegExp re2("\\.[^.]+$"); // filename suffix static TQRegExp re2("\\.[^.]+$"); // filename suffix
label.tqreplace(re1, "").tqreplace(re2, ""); label.replace(re1, "").replace(re2, "");
} }
cr.setLabel(label); cr.setLabel(label);

@ -929,7 +929,7 @@ void CompositionView::drawAreaArtifacts(TQPainter * p, const TQRect& clipRect)
// //
// Split line // Split line
// //
if (m_splitLinePos.x() > 0 && clipRect.tqcontains(m_splitLinePos)) { if (m_splitLinePos.x() > 0 && clipRect.contains(m_splitLinePos)) {
p->save(); p->save();
p->setPen(m_guideColor); p->setPen(m_guideColor);
p->drawLine(m_splitLinePos.x(), m_splitLinePos.y(), p->drawLine(m_splitLinePos.x(), m_splitLinePos.y(),
@ -1128,7 +1128,7 @@ void CompositionView::drawRect(const TQRect& r, TQPainter *p, const TQRect& clip
// Paint using the small coordinates... // Paint using the small coordinates...
TQRect intersection = rect.intersect(clipRect); TQRect intersection = rect.intersect(clipRect);
if (clipRect.tqcontains(rect)) { if (clipRect.contains(rect)) {
p->drawRect(rect); p->drawRect(rect);
} else { } else {
// draw only what's necessary // draw only what's necessary

@ -692,7 +692,7 @@ TempoView::slotSaveOptions()
void void
TempoView::slotModifyFilter(int button) TempoView::slotModifyFilter(int button)
{ {
TQCheckBox *checkBox = dynamic_cast<TQCheckBox*>(m_filterGroup->tqfind(button)); TQCheckBox *checkBox = dynamic_cast<TQCheckBox*>(m_filterGroup->find(button));
if (checkBox == 0) if (checkBox == 0)
return ; return ;

@ -76,7 +76,7 @@ PresetGroup::PresetGroup() :
RG_DEBUG << "Failed to open " << presetFileName << endl; RG_DEBUG << "Failed to open " << presetFileName << endl;
language.tqreplace(TQRegExp("_.*$"), ""); language.replace(TQRegExp("_.*$"), "");
presetFileName = TQString("%1/presets-%2.xml") presetFileName = TQString("%1/presets-%2.xml")
.tqarg(m_presetDirectory).tqarg(language); .tqarg(m_presetDirectory).tqarg(language);

@ -90,7 +90,7 @@ void KStartupLogo::paintEvent(TQPaintEvent*)
paint.setBrush(TQt::white); paint.setBrush(TQt::white);
//TQString version(VERSION); //TQString version(VERSION);
//int sepIdx = version.tqfind("-"); //int sepIdx = version.find("-");
TQString versionLabel(VERSION); TQString versionLabel(VERSION);
//TQString("R%1 v%2").tqarg(version.left(sepIdx)).tqarg(version.mid(sepIdx + 1)); //TQString("R%1 v%2").tqarg(version.left(sepIdx)).tqarg(version.mid(sepIdx + 1));
int versionWidth = metrics.width(versionLabel); int versionWidth = metrics.width(versionLabel);

@ -135,14 +135,14 @@ static bool kickerIsTrans() {
line = stream.readLine(); line = stream.readLine();
if ( inGen ) { if ( inGen ) {
if ( 0 == line.tqfind( "Transparent=" ) ) // Found it! if ( 0 == line.find( "Transparent=" ) ) // Found it!
{ {
if ( -1 != line.tqfind( "true" ) ) if ( -1 != line.find( "true" ) )
trans = true; trans = true;
stop = true; stop = true;
} else if ( line[ 0 ] == TQChar( '[' ) ) // Then wasn't in General section... } else if ( line[ 0 ] == TQChar( '[' ) ) // Then wasn't in General section...
stop = true; stop = true;
} else if ( 0 == line.tqfind( "[General]" ) ) } else if ( 0 == line.find( "[General]" ) )
inGen = true; inGen = true;
} }
cfgFile.close(); cfgFile.close();
@ -2718,7 +2718,7 @@ void KlearlookStyle::tqdrawControl(
TQString text = mi->text(); TQString text = mi->text();
if ( !text.isNull() ) { if ( !text.isNull() ) {
int t = text.tqfind( '\t' ); int t = text.find( '\t' );
// draw accelerator/tab-text // draw accelerator/tab-text
if ( t >= 0 ) { if ( t >= 0 ) {
@ -3522,7 +3522,7 @@ TQSize KlearlookStyle::tqsizeFromContents( ContentsType t,
} }
} }
if ( !mi->text().isNull() && ( mi->text().tqfind( '\t' ) >= 0 ) ) { if ( !mi->text().isNull() && ( mi->text().find( '\t' ) >= 0 ) ) {
w += itemHMargin + itemFrame * 2 + 7; w += itemHMargin + itemFrame * 2 + 7;
} else if ( mi->popup() ) { } else if ( mi->popup() ) {
w += 2 * arrowHMargin; w += 2 * arrowHMargin;
@ -3898,9 +3898,9 @@ bool KlearlookStyle::redrawHoverWidget() {
tqvisualRect( subRect( SR_RadioButtonFocusRect, rb ), rb ).width() + tqvisualRect( subRect( SR_RadioButtonFocusRect, rb ), rb ).width() +
tqpixelMetric( PM_ExclusiveIndicatorWidth ) + 4, hoverWidget->height() ); tqpixelMetric( PM_ExclusiveIndicatorWidth ) + 4, hoverWidget->height() );
hover = rect.tqcontains( cursor ) ? HOVER_RADIO : HOVER_NONE; hover = rect.contains( cursor ) ? HOVER_RADIO : HOVER_NONE;
return ( HOVER_NONE != hover && !rect.tqcontains( oldCursor ) ) || return ( HOVER_NONE != hover && !rect.contains( oldCursor ) ) ||
( HOVER_NONE == hover && rect.tqcontains( oldCursor ) ); ( HOVER_NONE == hover && rect.contains( oldCursor ) );
} else { } else {
TQCheckBox *cb = dynamic_cast<TQCheckBox *>( hoverWidget ); TQCheckBox *cb = dynamic_cast<TQCheckBox *>( hoverWidget );
@ -3909,9 +3909,9 @@ bool KlearlookStyle::redrawHoverWidget() {
tqvisualRect( subRect( SR_CheckBoxFocusRect, cb ), cb ).width() + tqvisualRect( subRect( SR_CheckBoxFocusRect, cb ), cb ).width() +
tqpixelMetric( PM_IndicatorWidth ) + 4, hoverWidget->height() ); tqpixelMetric( PM_IndicatorWidth ) + 4, hoverWidget->height() );
hover = rect.tqcontains( cursor ) ? HOVER_CHECK : HOVER_NONE; hover = rect.contains( cursor ) ? HOVER_CHECK : HOVER_NONE;
return ( HOVER_NONE != hover && !rect.tqcontains( oldCursor ) ) || return ( HOVER_NONE != hover && !rect.contains( oldCursor ) ) ||
( HOVER_NONE == hover && rect.tqcontains( oldCursor ) ); ( HOVER_NONE == hover && rect.contains( oldCursor ) );
} else { } else {
TQScrollBar *sb = dynamic_cast<TQScrollBar *>( hoverWidget ); TQScrollBar *sb = dynamic_cast<TQScrollBar *>( hoverWidget );
@ -3928,21 +3928,21 @@ bool KlearlookStyle::redrawHoverWidget() {
slider.moveLeft( slider.x() + widgetZero.x() ); slider.moveLeft( slider.x() + widgetZero.x() );
slider.moveTop( slider.y() + widgetZero.y() ); slider.moveTop( slider.y() + widgetZero.y() );
if ( slider.tqcontains( cursor ) ) if ( slider.contains( cursor ) )
hover = HOVER_SB_SLIDER; hover = HOVER_SB_SLIDER;
else if ( subline.tqcontains( cursor ) ) else if ( subline.contains( cursor ) )
hover = HOVER_SB_SUB; hover = HOVER_SB_SUB;
else if ( addline.tqcontains( cursor ) ) else if ( addline.contains( cursor ) )
hover = HOVER_SB_ADD; hover = HOVER_SB_ADD;
else else
hover = HOVER_NONE; hover = HOVER_NONE;
return ( HOVER_SB_SLIDER == hover && !slider.tqcontains( oldCursor ) ) || return ( HOVER_SB_SLIDER == hover && !slider.contains( oldCursor ) ) ||
( HOVER_SB_SLIDER != hover && slider.tqcontains( oldCursor ) ) || ( HOVER_SB_SLIDER != hover && slider.contains( oldCursor ) ) ||
( HOVER_SB_SUB == hover && !subline.tqcontains( oldCursor ) ) || ( HOVER_SB_SUB == hover && !subline.contains( oldCursor ) ) ||
( HOVER_SB_SUB != hover && subline.tqcontains( oldCursor ) ) || ( HOVER_SB_SUB != hover && subline.contains( oldCursor ) ) ||
( HOVER_SB_ADD == hover && !addline.tqcontains( oldCursor ) ) || ( HOVER_SB_ADD == hover && !addline.contains( oldCursor ) ) ||
( HOVER_SB_ADD != hover && addline.tqcontains( oldCursor ) ); ( HOVER_SB_ADD != hover && addline.contains( oldCursor ) );
} else { } else {
#if KDE_VERSION >= 0x30400 #if KDE_VERSION >= 0x30400
TQToolButton *tb = dynamic_cast<TQToolButton *>( hoverWidget ); TQToolButton *tb = dynamic_cast<TQToolButton *>( hoverWidget );
@ -3968,7 +3968,7 @@ bool KlearlookStyle::redrawHoverWidget() {
int s = 0; int s = 0;
bool redraw = false; bool redraw = false;
hover = rect.tqcontains( cursor ) ? HOVER_HEADER : HOVER_NONE; hover = rect.contains( cursor ) ? HOVER_HEADER : HOVER_NONE;
hoverSect = TQTC_NO_SECT; hoverSect = TQTC_NO_SECT;
for ( s = 0; s < hd->count() && ( TQTC_NO_SECT == hoverSect || !redraw ); ++s ) { for ( s = 0; s < hd->count() && ( TQTC_NO_SECT == hoverSect || !redraw ); ++s ) {
@ -3977,13 +3977,13 @@ bool KlearlookStyle::redrawHoverWidget() {
r.moveLeft( r.x() + widgetZero.x() ); r.moveLeft( r.x() + widgetZero.x() );
r.moveTop( r.y() + widgetZero.y() ); r.moveTop( r.y() + widgetZero.y() );
bool hasNew = r.tqcontains( cursor ); bool hasNew = r.contains( cursor );
if ( hasNew ) if ( hasNew )
hoverSect = s; hoverSect = s;
if ( !redraw ) { if ( !redraw ) {
bool hasOld = r.tqcontains( oldCursor ); bool hasOld = r.contains( oldCursor );
if ( ( hasNew && !hasOld ) || ( !hasNew && hasOld ) ) if ( ( hasNew && !hasOld ) || ( !hasNew && hasOld ) )
redraw = true; redraw = true;

@ -231,7 +231,7 @@ void ControlRuler::contentsMousePressEvent(TQMouseEvent* e)
} }
} }
if (topItem && !m_selectedItems.tqcontains(topItem)) { // select the top item if (topItem && !m_selectedItems.contains(topItem)) { // select the top item
m_selectedItems << topItem; m_selectedItems << topItem;
topItem->setSelected(true); topItem->setSelected(true);
topItem->handleMouseButtonPress(e); topItem->handleMouseButtonPress(e);

@ -380,7 +380,7 @@ PropertyControlRuler::drawPropertyLine(timeT startTime,
EventSelection selection(*m_segment, startTime, endTime, true); EventSelection selection(*m_segment, startTime, endTime, true);
PropertyPattern pattern = DecrescendoPattern; PropertyPattern pattern = DecrescendoPattern;
bool haveNotes = selection.tqcontains(Note::EventType); bool haveNotes = selection.contains(Note::EventType);
if (haveNotes) { if (haveNotes) {
@ -408,7 +408,7 @@ PropertyControlRuler::selectAllProperties()
/* /*
for(Segment::iterator i = m_segment.begin(); for(Segment::iterator i = m_segment.begin();
i != m_segment.end(); ++i) i != m_segment.end(); ++i)
if (!m_eventSelection->tqcontains(*i)) m_eventSelection->addEvent(*i); if (!m_eventSelection->contains(*i)) m_eventSelection->addEvent(*i);
*/ */
clearSelectedItems(); clearSelectedItems();

@ -141,46 +141,46 @@ MidiFilterDialog::slotApply()
MidiFilter thruFilter = 0, MidiFilter thruFilter = 0,
recordFilter = 0; recordFilter = 0;
if (dynamic_cast<TQCheckBox*>(m_thruBox->tqfind(0))->isChecked()) if (dynamic_cast<TQCheckBox*>(m_thruBox->find(0))->isChecked())
thruFilter |= MappedEvent::MidiNote; thruFilter |= MappedEvent::MidiNote;
if (dynamic_cast<TQCheckBox*>(m_thruBox->tqfind(1))->isChecked()) if (dynamic_cast<TQCheckBox*>(m_thruBox->find(1))->isChecked())
thruFilter |= MappedEvent::MidiProgramChange; thruFilter |= MappedEvent::MidiProgramChange;
if (dynamic_cast<TQCheckBox*>(m_thruBox->tqfind(2))->isChecked()) if (dynamic_cast<TQCheckBox*>(m_thruBox->find(2))->isChecked())
thruFilter |= MappedEvent::MidiKeyPressure; thruFilter |= MappedEvent::MidiKeyPressure;
if (dynamic_cast<TQCheckBox*>(m_thruBox->tqfind(3))->isChecked()) if (dynamic_cast<TQCheckBox*>(m_thruBox->find(3))->isChecked())
thruFilter |= MappedEvent::MidiChannelPressure; thruFilter |= MappedEvent::MidiChannelPressure;
if (dynamic_cast<TQCheckBox*>(m_thruBox->tqfind(4))->isChecked()) if (dynamic_cast<TQCheckBox*>(m_thruBox->find(4))->isChecked())
thruFilter |= MappedEvent::MidiPitchBend; thruFilter |= MappedEvent::MidiPitchBend;
if (dynamic_cast<TQCheckBox*>(m_thruBox->tqfind(5))->isChecked()) if (dynamic_cast<TQCheckBox*>(m_thruBox->find(5))->isChecked())
thruFilter |= MappedEvent::MidiController; thruFilter |= MappedEvent::MidiController;
if (dynamic_cast<TQCheckBox*>(m_thruBox->tqfind(6))->isChecked()) if (dynamic_cast<TQCheckBox*>(m_thruBox->find(6))->isChecked())
thruFilter |= MappedEvent::MidiSystemMessage; thruFilter |= MappedEvent::MidiSystemMessage;
if (dynamic_cast<TQCheckBox*>(m_recordBox->tqfind(0))->isChecked()) if (dynamic_cast<TQCheckBox*>(m_recordBox->find(0))->isChecked())
recordFilter |= MappedEvent::MidiNote; recordFilter |= MappedEvent::MidiNote;
if (dynamic_cast<TQCheckBox*>(m_recordBox->tqfind(1))->isChecked()) if (dynamic_cast<TQCheckBox*>(m_recordBox->find(1))->isChecked())
recordFilter |= MappedEvent::MidiProgramChange; recordFilter |= MappedEvent::MidiProgramChange;
if (dynamic_cast<TQCheckBox*>(m_recordBox->tqfind(2))->isChecked()) if (dynamic_cast<TQCheckBox*>(m_recordBox->find(2))->isChecked())
recordFilter |= MappedEvent::MidiKeyPressure; recordFilter |= MappedEvent::MidiKeyPressure;
if (dynamic_cast<TQCheckBox*>(m_recordBox->tqfind(3))->isChecked()) if (dynamic_cast<TQCheckBox*>(m_recordBox->find(3))->isChecked())
recordFilter |= MappedEvent::MidiChannelPressure; recordFilter |= MappedEvent::MidiChannelPressure;
if (dynamic_cast<TQCheckBox*>(m_recordBox->tqfind(4))->isChecked()) if (dynamic_cast<TQCheckBox*>(m_recordBox->find(4))->isChecked())
recordFilter |= MappedEvent::MidiPitchBend; recordFilter |= MappedEvent::MidiPitchBend;
if (dynamic_cast<TQCheckBox*>(m_recordBox->tqfind(5))->isChecked()) if (dynamic_cast<TQCheckBox*>(m_recordBox->find(5))->isChecked())
recordFilter |= MappedEvent::MidiController; recordFilter |= MappedEvent::MidiController;
if (dynamic_cast<TQCheckBox*>(m_recordBox->tqfind(6))->isChecked()) if (dynamic_cast<TQCheckBox*>(m_recordBox->find(6))->isChecked())
recordFilter |= MappedEvent::MidiSystemMessage; recordFilter |= MappedEvent::MidiSystemMessage;

@ -42,12 +42,12 @@ ChangeRecordDeviceCommand::swap()
TQString sdevice = TQString::number(m_deviceId); TQString sdevice = TQString::number(m_deviceId);
if (m_action) if (m_action)
{ {
if(!devList.tqcontains(sdevice)) if(!devList.contains(sdevice))
devList.append(sdevice); devList.append(sdevice);
} }
else else
{ {
if(devList.tqcontains(sdevice)) if(devList.contains(sdevice))
devList.remove(sdevice); devList.remove(sdevice);
} }
config->writeEntry("midirecorddevice", devList); config->writeEntry("midirecorddevice", devList);

@ -49,7 +49,7 @@ MmappedSegment::MmappedSegment(const TQString filename)
bool MmappedSegment::isMetronome() bool MmappedSegment::isMetronome()
{ {
return (getFileName().tqcontains("metronome", false) > 0); return (getFileName().contains("metronome", false) > 0);
} }

@ -1154,7 +1154,7 @@ AlsaDriver::renameDevice(DeviceId id, TQString name)
snd_seq_get_port_info(m_midiHandle, i->second, pinfo); snd_seq_get_port_info(m_midiHandle, i->second, pinfo);
TQString oldName = snd_seq_port_info_get_name(pinfo); TQString oldName = snd_seq_port_info_get_name(pinfo);
int sep = oldName.tqfind(" - "); int sep = oldName.find(" - ");
TQString newName; TQString newName;
@ -1383,20 +1383,20 @@ AlsaDriver::setPlausibleConnection(DeviceId id, TQString idealConnection)
// of the requested string. // of the requested string.
int client = -1; int client = -1;
int colon = idealConnection.tqfind(":"); int colon = idealConnection.find(":");
if (colon >= 0) if (colon >= 0)
client = idealConnection.left(colon).toInt(); client = idealConnection.left(colon).toInt();
int portNo = -1; int portNo = -1;
if (client > 0) { if (client > 0) {
TQString remainder = idealConnection.mid(colon + 1); TQString remainder = idealConnection.mid(colon + 1);
int space = remainder.tqfind(" "); int space = remainder.find(" ");
if (space >= 0) if (space >= 0)
portNo = remainder.left(space).toInt(); portNo = remainder.left(space).toInt();
} }
int firstSpace = idealConnection.tqfind(" "); int firstSpace = idealConnection.find(" ");
int endOfText = idealConnection.tqfind(TQRegExp("[^\\w ]"), firstSpace); int endOfText = idealConnection.find(TQRegExp("[^\\w ]"), firstSpace);
TQString text; TQString text;
if (endOfText < 2) { if (endOfText < 2) {
@ -1448,7 +1448,7 @@ AlsaDriver::setPlausibleConnection(DeviceId id, TQString idealConnection)
} }
if (testName && text != "" && if (testName && text != "" &&
!TQString(port->m_name.c_str()).tqcontains(text)) !TQString(port->m_name.c_str()).contains(text))
continue; continue;
if (testUsed) { if (testUsed) {

@ -770,9 +770,9 @@ LADSPAPluginFactory::generateFallbackCategories()
std::vector<TQString> path; std::vector<TQString> path;
for (size_t i = 0; i < pluginPath.size(); ++i) { for (size_t i = 0; i < pluginPath.size(); ++i) {
if (pluginPath[i].tqcontains("/lib/")) { if (pluginPath[i].contains("/lib/")) {
TQString p(pluginPath[i]); TQString p(pluginPath[i]);
p.tqreplace("/lib/", "/share/"); p.replace("/lib/", "/share/");
path.push_back(p); path.push_back(p);
// std::cerr << "LADSPAPluginFactory::generateFallbackCategories: path element " << p << std::endl; // std::cerr << "LADSPAPluginFactory::generateFallbackCategories: path element " << p << std::endl;
} }

@ -503,7 +503,7 @@ MidiFile::parseTrack(ifstream* midiFile, TrackId &lastTrackNum)
unsigned long accumulatedTime = 0; unsigned long accumulatedTime = 0;
// The trackNum passed in to this method is the default track for // The trackNum passed in to this method is the default track for
// all events provided they're all on the same channel. If we tqfind // all events provided they're all on the same channel. If we find
// events on more than one channel, we increment trackNum and record // events on more than one channel, we increment trackNum and record
// the mapping from channel to trackNum in this channelTrackMap. // the mapping from channel to trackNum in this channelTrackMap.
// We then return the new trackNum by reference so the calling // We then return the new trackNum by reference so the calling

Loading…
Cancel
Save