pull/1/head
Timothy Pearson 13 years ago
parent 1461610fb3
commit 4b3c5dd929

@ -105,12 +105,41 @@ IF(WANT_SOUND)
#MESSAGE("LRDF_INC_DIR: ${LRDF_INC_DIR}")
ENDIF(LRDF_FOUND)
FIND_PACKAGE(LADSPA QUIET)
##################################################################
# - Try to find LADSPA header
# Once done this will define:
#
# LADSPA_FOUND - system has LADSPA
# LADSPA_INCLUDE_DIR - LADSPA header path
IF(LADSPA_INCLUDE_DIR)
SET(LADSPA_FIND_QUIETLY TRUE)
ENDIF(LADSPA_INCLUDE_DIR)
FIND_PATH(LADSPA_INCLUDE_DIR "ladspa.h"
/usr/include
/usr/local/include
)
IF(LADSPA_INCLUDE_DIR)
SET(LADSPA_FOUND TRUE)
ELSE(LADSPA_INCLUDE_DIR)
SET(LADSPA_FOUND FALSE)
SET(LADSPA_INCLUDE_DIR "")
ENDIF(LADSPA_INCLUDE_DIR)
IF(LADSPA_FOUND)
IF(NOT LADSPA_FIND_QUIETLY)
MESSAGE(STATUS "Found LADSPA: ${LADSPA_INCLUDE_DIR}")
ENDIF(NOT LADSPA_FIND_QUIETLY)
ELSE(LADSPA_FOUND)
IF(LADSPA_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find LADSPA")
ENDIF(LADSPA_FIND_REQUIRED)
ENDIF(LADSPA_FOUND)
MARK_AS_ADVANCED(LADSPA_INCLUDE_DIR)
##################################################################
IF(LADSPA_FOUND)
SET(HAVE_LADSPA TRUE)
ADD_DEFINITIONS(-DHAVE_LADSPA)
SET(LADSPA_INC_DIR ${LADSPA_INCLUDE_DIR})
MESSAGE(STATUS "Found LADSPA (${LADSPA_INC_DIR})")
ENDIF(LADSPA_FOUND)
ENDIF(WANT_SOUND)

@ -15,6 +15,7 @@ include_directories(
${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}/src
${CMAKE_SOURCE_DIR}/src
${CMAKE_SOURCE_DIR}/src/base
${ALSA_INC_DIR}
${JACK_INC_DIR}
${XFT_INC_DIR}
@ -36,6 +37,7 @@ link_directories(
${LRDF_LIB_DIR}
${LIRC_LIB_DIR}
${FFTW3F_LIB_DIR}
${CMAKE_BINARY_DIR}/src
)
##### include cmake file lists ##################

@ -44,7 +44,7 @@ class ClearTriggersCommand : public BasicSelectionCommand
public:
ClearTriggersCommand(EventSelection &selection,
TQString name = 0) :
BasicSelectionCommand(name ? name : getGlobalName(), selection, true),
BasicSelectionCommand(!name.isNull() ? name : getGlobalName(), selection, true),
m_selection(&selection)
{ }

@ -132,7 +132,7 @@ EventQuantizeCommand::modifySegment()
bool makeviable = false;
bool decounterpoint = false;
if (m_configGroup) {
if (!m_configGroup.isNull()) {
//!!! need way to decide whether to do these even if no config group (i.e. through args to the command)
KConfig *config = kapp->config();
config->setGroup(m_configGroup);

@ -51,7 +51,7 @@ public:
std::string timeAdjust,
Mark mark,
TQString name = 0) :
BasicSelectionCommand(name ? name : getGlobalName(), selection, true),
BasicSelectionCommand(!name.isNull() ? name : getGlobalName(), selection, true),
m_selection(&selection),
m_triggerSegmentId(triggerSegmentId),
m_notesOnly(notesOnly),

@ -307,7 +307,7 @@ MultiViewCommandHistory::updateButton(bool undo,
{
for (ViewSet::iterator i = m_views.begin(); i != m_views.end(); ++i) {
KAction *action = (*i)->action(name);
KAction *action = (*i)->action(name.ascii());
if (!action)
continue;
TQString text;
@ -340,7 +340,7 @@ MultiViewCommandHistory::updateMenu(bool undo,
{
for (ViewSet::iterator i = m_views.begin(); i != m_views.end(); ++i) {
KAction *action = (*i)->action(name);
KAction *action = (*i)->action(name.ascii());
if (!action)
continue;

@ -120,7 +120,7 @@ bool ConfigurationXmlSubHandler::startElement(const TQString&, const TQString&,
// handle alternative encoding for properties with arbitrary names
m_propertyName = atts.value("name");
TQString value = atts.value("value");
if (value) {
if (!value.isNull()) {
m_propertyType = "String";
m_configuration->set<String>(qstrtostr(m_propertyName),
qstrtostr(value));
@ -433,7 +433,7 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
// std::cerr << "\n\n\nRosegarden file version = \"" << version << "\"\n\n\n" << std::endl;
if (smajor) {
if (!smajor.isNull()) {
int major = smajor.toInt();
int minor = sminor.toInt();
@ -477,17 +477,17 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
//
TQString thruStr = atts.value("thrufilter");
if (thruStr)
if (!thruStr.isNull())
getStudio().setMIDIThruFilter(thruStr.toInt());
TQString recordStr = atts.value("recordfilter");
if (recordStr)
if (!recordStr.isNull())
getStudio().setMIDIRecordFilter(recordStr.toInt());
TQString inputStr = atts.value("audioinputpairs");
if (inputStr) {
if (!inputStr.isNull()) {
int inputs = inputStr.toInt();
if (inputs < 1)
inputs = 1; // we simply don't permit no inputs
@ -498,14 +498,14 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
TQString mixerStr = atts.value("mixerdisplayoptions");
if (mixerStr) {
if (!mixerStr.isNull()) {
unsigned int mixer = mixerStr.toUInt();
getStudio().setMixerDisplayOptions(mixer);
}
TQString metronomeStr = atts.value("metronomedevice");
if (metronomeStr) {
if (!metronomeStr.isNull()) {
DeviceId metronome = metronomeStr.toUInt();
getStudio().setMetronomeDevice(metronome);
}
@ -519,32 +519,32 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
timeT t = 0;
TQString timeStr = atts.value("time");
if (timeStr)
if (!timeStr.isNull())
t = timeStr.toInt();
int num = 4;
TQString numStr = atts.value("numerator");
if (numStr)
if (!numStr.isNull())
num = numStr.toInt();
int denom = 4;
TQString denomStr = atts.value("denominator");
if (denomStr)
if (!denomStr.isNull())
denom = denomStr.toInt();
bool common = false;
TQString commonStr = atts.value("common");
if (commonStr)
if (!commonStr.isNull())
common = (commonStr == "true");
bool hidden = false;
TQString hiddenStr = atts.value("hidden");
if (hiddenStr)
if (!hiddenStr.isNull())
hidden = (hiddenStr == "true");
bool hiddenBars = false;
TQString hiddenBarsStr = atts.value("hiddenbars");
if (hiddenBarsStr)
if (!hiddenBarsStr.isNull())
hiddenBars = (hiddenBarsStr == "true");
getComposition().addTimeSignature
@ -554,21 +554,21 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
timeT t = 0;
TQString timeStr = atts.value("time");
if (timeStr)
if (!timeStr.isNull())
t = timeStr.toInt();
tempoT tempo = Composition::getTempoForQpm(120.0);
TQString tempoStr = atts.value("tempo");
TQString targetStr = atts.value("target");
TQString bphStr = atts.value("bph");
if (tempoStr) {
if (!tempoStr.isNull()) {
tempo = tempoStr.toInt();
} else if (bphStr) {
} else if (!bphStr.isNull()) {
tempo = Composition::getTempoForQpm
(double(bphStr.toInt()) / 60.0);
}
if (targetStr) {
if (!targetStr.isNull()) {
getComposition().addTempoAtTime(t, tempo, targetStr.toInt());
} else {
getComposition().addTempoAtTime(t, tempo);
@ -587,12 +587,12 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
// Get and set the record track
//
TQString recordStr = atts.value("recordtrack");
if (recordStr) {
if (!recordStr.isNull()) {
getComposition().setTrackRecording(recordStr.toInt(), true);
}
TQString recordPlStr = atts.value("recordtracks");
if (recordPlStr) {
if (!recordPlStr.isNull()) {
RG_DEBUG << "Record tracks: " << recordPlStr << endl;
TQStringList recordList = TQStringList::split(',', recordPlStr);
for (TQStringList::iterator i = recordList.begin();
@ -606,7 +606,7 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
//
int position = 0;
TQString positionStr = atts.value("pointer");
if (positionStr) {
if (!positionStr.isNull()) {
position = positionStr.toInt();
}
@ -618,12 +618,12 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
// older defaultTempo.
//
TQString tempoStr = atts.value("compositionDefaultTempo");
if (tempoStr) {
if (!tempoStr.isNull()) {
tempoT tempo = tempoT(tempoStr.toInt());
getComposition().setCompositionDefaultTempo(tempo);
} else {
tempoStr = atts.value("defaultTempo");
if (tempoStr) {
if (!tempoStr.isNull()) {
double tempo = qstrtodouble(tempoStr);
getComposition().setCompositionDefaultTempo
(Composition::getTempoForQpm(tempo));
@ -639,7 +639,7 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
TQString loopStartStr = atts.value("loopstart");
TQString loopEndStr = atts.value("loopend");
if (loopStartStr && loopEndStr) {
if (!loopStartStr.isNull() && !loopEndStr.isNull()) {
int loopStart = loopStartStr.toInt();
int loopEnd = loopEndStr.toInt();
@ -649,7 +649,7 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
TQString selectedTrackStr = atts.value("selected");
if (selectedTrackStr) {
if (!selectedTrackStr.isNull()) {
TrackId selectedTrack =
(TrackId)selectedTrackStr.toInt();
@ -657,7 +657,7 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
}
TQString soloTrackStr = atts.value("solo");
if (soloTrackStr) {
if (!soloTrackStr.isNull()) {
if (soloTrackStr.toInt() == 1)
getComposition().setSolo(true);
else
@ -666,7 +666,7 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
TQString playMetStr = atts.value("playmetronome");
if (playMetStr) {
if (!playMetStr.isNull()) {
if (playMetStr.toInt())
getComposition().setPlayMetronome(true);
else
@ -674,7 +674,7 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
}
TQString recMetStr = atts.value("recordmetronome");
if (recMetStr) {
if (!recMetStr.isNull()) {
if (recMetStr.toInt())
getComposition().setRecordMetronome(true);
else
@ -682,23 +682,23 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
}
TQString nextTriggerIdStr = atts.value("nexttriggerid");
if (nextTriggerIdStr) {
if (!nextTriggerIdStr.isNull()) {
getComposition().setNextTriggerSegmentId(nextTriggerIdStr.toInt());
}
TQString copyrightStr = atts.value("copyright");
if (copyrightStr) {
if (!copyrightStr.isNull()) {
getComposition().setCopyrightNote(qstrtostr(copyrightStr));
}
TQString startMarkerStr = atts.value("startMarker");
TQString endMarkerStr = atts.value("endMarker");
if (startMarkerStr) {
if (!startMarkerStr.isNull()) {
getComposition().setStartMarker(startMarkerStr.toInt());
}
if (endMarkerStr) {
if (!endMarkerStr.isNull()) {
getComposition().setEndMarker(endMarkerStr.toInt());
}
@ -716,17 +716,17 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
bool muted = false;
TQString trackNbStr = atts.value("id");
if (trackNbStr) {
if (!trackNbStr.isNull()) {
id = trackNbStr.toInt();
}
TQString labelStr = atts.value("label");
if (labelStr) {
if (!labelStr.isNull()) {
label = qstrtostr(labelStr);
}
TQString mutedStr = atts.value("muted");
if (mutedStr) {
if (!mutedStr.isNull()) {
if (mutedStr == "true")
muted = true;
else
@ -734,12 +734,12 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
}
TQString positionStr = atts.value("position");
if (positionStr) {
if (!positionStr.isNull()) {
position = positionStr.toInt();
}
TQString instrumentStr = atts.value("instrument");
if (instrumentStr) {
if (!instrumentStr.isNull()) {
instrument = instrumentStr.toInt();
}
@ -754,42 +754,42 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
// here
TQString presetLabelStr = atts.value("defaultLabel");
if (labelStr) {
if (!labelStr.isNull()) {
track->setPresetLabel(presetLabelStr.ascii());
}
TQString clefStr = atts.value("defaultClef");
if (clefStr) {
if (!clefStr.isNull()) {
track->setClef(clefStr.toInt());
}
TQString transposeStr = atts.value("defaultTranspose");
if (transposeStr) {
if (!transposeStr.isNull()) {
track->setTranspose(transposeStr.toInt());
}
TQString colorStr = atts.value("defaultColour");
if (colorStr) {
if (!colorStr.isNull()) {
track->setColor(colorStr.toInt());
}
TQString highplayStr = atts.value("defaultHighestPlayable");
if (highplayStr) {
if (!highplayStr.isNull()) {
track->setHighestPlayable(highplayStr.toInt());
}
TQString lowplayStr = atts.value("defaultLowestPlayable");
if (lowplayStr) {
if (!lowplayStr.isNull()) {
track->setLowestPlayable(lowplayStr.toInt());
}
TQString staffSizeStr = atts.value("staffSize");
if (staffSizeStr) {
if (!staffSizeStr.isNull()) {
track->setStaffSize(staffSizeStr.toInt());
}
TQString staffBracketStr = atts.value("staffBracket");
if (staffBracketStr) {
if (!staffBracketStr.isNull()) {
track->setStaffBracket(staffBracketStr.toInt());
}
@ -809,17 +809,17 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
int track = -1, startTime = 0;
unsigned int colourindex = 0;
TQString trackNbStr = atts.value("track");
if (trackNbStr) {
if (!trackNbStr.isNull()) {
track = trackNbStr.toInt();
}
TQString startIdxStr = atts.value("start");
if (startIdxStr) {
if (!startIdxStr.isNull()) {
startTime = startIdxStr.toInt();
}
TQString segmentType = (atts.value("type")).lower();
if (segmentType) {
if (!segmentType.isNull()) {
if (segmentType == "audio") {
int audioFileId = atts.value("file").toInt();
@ -854,7 +854,7 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
}
TQString delayStr = atts.value("delay");
if (delayStr) {
if (!delayStr.isNull()) {
RG_DEBUG << "Delay string is \"" << delayStr << "\"" << endl;
long delay = delayStr.toLong();
RG_DEBUG << "Delay is " << delay << endl;
@ -864,8 +864,8 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
TQString rtDelaynSec = atts.value("rtdelaynsec");
TQString rtDelayuSec = atts.value("rtdelayusec");
TQString rtDelaySec = atts.value("rtdelaysec");
if (rtDelaySec && (rtDelaynSec || rtDelayuSec)) {
if (rtDelaynSec) {
if (!rtDelaySec.isNull() && (!rtDelaynSec.isNull() || !rtDelayuSec.isNull())) {
if (!rtDelaynSec.isNull()) {
m_currentSegment->setRealTimeDelay
(RealTime(rtDelaySec.toInt(),
rtDelaynSec.toInt()));
@ -877,31 +877,31 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
}
TQString transposeStr = atts.value("transpose");
if (transposeStr)
if (!transposeStr.isNull())
m_currentSegment->setTranspose(transposeStr.toInt());
// fill in the label
TQString labelStr = atts.value("label");
if (labelStr)
if (!labelStr.isNull())
m_currentSegment->setLabel(qstrtostr(labelStr));
m_currentSegment->setTrack(track);
//m_currentSegment->setStartTime(startTime);
TQString colourIndStr = atts.value("colourindex");
if (colourIndStr) {
if (!colourIndStr.isNull()) {
colourindex = colourIndStr.toInt();
}
m_currentSegment->setColourIndex(colourindex);
TQString snapGridSizeStr = atts.value("snapgridsize");
if (snapGridSizeStr) {
if (!snapGridSizeStr.isNull()) {
m_currentSegment->setSnapGridSize(snapGridSizeStr.toInt());
}
TQString viewFeaturesStr = atts.value("viewfeatures");
if (viewFeaturesStr) {
if (!viewFeaturesStr.isNull()) {
m_currentSegment->setViewFeatures(viewFeaturesStr.toInt());
}
@ -913,21 +913,21 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
TQString triggerRetuneStr = atts.value("triggerretune");
TQString triggerAdjustTimeStr = atts.value("triggeradjusttimes");
if (triggerIdStr) {
if (!triggerIdStr.isNull()) {
int pitch = -1;
if (triggerPitchStr)
if (!triggerPitchStr.isNull())
pitch = triggerPitchStr.toInt();
int velocity = -1;
if (triggerVelocityStr)
if (!triggerVelocityStr.isNull())
velocity = triggerVelocityStr.toInt();
TriggerSegmentRec *rec =
getComposition().addTriggerSegment(m_currentSegment,
triggerIdStr.toInt(),
pitch, velocity);
if (rec) {
if (triggerRetuneStr)
if (!triggerRetuneStr.isNull())
rec->setDefaultRetune(triggerRetuneStr.lower() == "true");
if (triggerAdjustTimeStr)
if (!triggerAdjustTimeStr.isNull())
rec->setDefaultTimeAdjust(qstrtostr(triggerAdjustTimeStr));
}
m_currentSegment->setStartTimeDataMember(startTime);
@ -937,7 +937,7 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
}
TQString endMarkerStr = atts.value("endmarker");
if (endMarkerStr) {
if (!endMarkerStr.isNull()) {
delete m_segmentEndMarkerTime;
m_segmentEndMarkerTime = new timeT(endMarkerStr.toInt());
}
@ -1246,10 +1246,10 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
skipToNextPlayDevice();
if (m_device) {
if (nameStr && nameStr != "") {
if (!nameStr.isNull() && nameStr != "") {
m_device->setName(qstrtostr(nameStr));
}
} else if (nameStr && nameStr != "") {
} else if (!nameStr.isNull() && nameStr != "") {
addMIDIDevice(nameStr, m_createDevices); // also sets m_device
}
}
@ -1366,7 +1366,7 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
m_lsb),
pc,
qstrtostr(nameStr),
keyMappingStr ? qstrtostr(keyMappingStr) : "");
(!keyMappingStr.isNull()) ? qstrtostr(keyMappingStr) : "");
if (m_device->getType() == Device::Midi) {
// Insert the program
@ -1412,7 +1412,7 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
if (m_keyMapping) {
TQString numStr = atts.value("number");
TQString namStr = atts.value("name");
if (numStr && namStr) {
if (!numStr.isNull() && !namStr.isNull()) {
m_keyNameMap[numStr.toInt()] = qstrtostr(namStr);
}
}
@ -1702,7 +1702,7 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
std::string program = "";
TQString progStr = atts.value("program");
if (progStr) {
if (!progStr.isNull()) {
program = qstrtostr(progStr);
}
@ -1715,8 +1715,8 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
AudioPlugin *plugin = 0;
AudioPluginManager *apm = getAudioPluginManager();
if (!identifier) {
if (atts.value("id")) {
if (identifier.isNull()) {
if (!(atts.value("id")).isNull()) {
unsigned long id = atts.value("id").toULong();
if (apm)
plugin = apm->getPluginByUniqueId(id);
@ -1750,10 +1750,10 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
// we shouldn't be halting import of the RG file just because
// we can't match a plugin
//
if (identifier) {
if (!identifier.isNull()) {
RG_DEBUG << "WARNING: RoseXmlHandler: plugin " << identifier << " not found" << endl;
m_pluginsNotFound.insert(identifier);
} else if (atts.value("id")) {
} else if (!(atts.value("id")).isNull()) {
RG_DEBUG << "WARNING: RoseXmlHandler: plugin uid " << atts.value("id") << " not found" << endl;
} else {
m_errorString = "No plugin identifier or uid specified";
@ -1764,7 +1764,7 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
if (lcName == "synth") {
TQString identifier = atts.value("identifier");
if (identifier) {
if (!identifier.isNull()) {
RG_DEBUG << "WARNING: RoseXmlHandler: no instrument for plugin " << identifier << endl;
m_pluginsNotFound.insert(identifier);
}
@ -1823,19 +1823,19 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
MidiMetronome metronome(instrument);
if (atts.value("barpitch"))
if (!(atts.value("barpitch")).isNull())
metronome.setBarPitch(atts.value("barpitch").toInt());
if (atts.value("beatpitch"))
if (!(atts.value("beatpitch")).isNull())
metronome.setBeatPitch(atts.value("beatpitch").toInt());
if (atts.value("subbeatpitch"))
if (!(atts.value("subbeatpitch")).isNull())
metronome.setSubBeatPitch(atts.value("subbeatpitch").toInt());
if (atts.value("depth"))
if (!(atts.value("depth")).isNull())
metronome.setDepth(atts.value("depth").toInt());
if (atts.value("barvelocity"))
if (!(atts.value("barvelocity")).isNull())
metronome.setBarVelocity(atts.value("barvelocity").toInt());
if (atts.value("beatvelocity"))
if (!(atts.value("beatvelocity")).isNull())
metronome.setBeatVelocity(atts.value("beatvelocity").toInt());
if (atts.value("subbeatvelocity"))
if (!(atts.value("subbeatvelocity")).isNull())
metronome.setSubBeatVelocity(atts.value("subbeatvelocity").toInt());
dynamic_cast<MidiDevice*>(m_device)->
@ -1964,7 +1964,7 @@ RoseXmlHandler::startElement(const TQString& namespaceURI,
int channel = atts.value("channel").toInt();
TQString type = atts.value("type");
if (type) {
if (!type.isNull()) {
if (type.lower() == "buss") {
if (m_instrument)
m_instrument->setAudioInputToBuss(value, channel);
@ -2359,7 +2359,7 @@ RoseXmlHandler::setMIDIDeviceName(TQString name)
arg << (unsigned int)md->getId();
arg << name;
std::cerr << "Renaming device " << md->getId() << " to " << name << std::endl;
std::cerr << "Renaming device " << md->getId() << " to " << name.ascii() << std::endl;
rgapp->sequencerSend("renameDevice(unsigned int, TQString)",
data);

@ -347,12 +347,12 @@ bool RosegardenGUIDoc::saveIfModified()
completed = saveDocument(getAbsFilePath(), errMsg);
if (!completed) {
if (errMsg) {
if (!errMsg.isNull()) {
KMessageBox::error(0, i18n(TQString("Could not save document at %1\n(%2)")
.tqarg(getAbsFilePath()).tqarg(errMsg)));
.tqarg(getAbsFilePath()).tqarg(errMsg).ascii()));
} else {
KMessageBox::error(0, i18n(TQString("Could not save document at %1")
.tqarg(getAbsFilePath())));
.tqarg(getAbsFilePath()).ascii()));
}
}
}
@ -461,7 +461,7 @@ RosegardenGUIDoc::deleteOrphanedAudioFiles(bool documentWillNotBeSaved)
for (size_t i = 0; i < derivedOrphans.size(); ++i) {
TQFile file(derivedOrphans[i]);
if (!file.remove()) {
std::cerr << "WARNING: Failed to remove orphaned derived audio file \"" << derivedOrphans[i] << std::endl;
std::cerr << "WARNING: Failed to remove orphaned derived audio file \"" << derivedOrphans[i].ascii() << std::endl;
}
TQFile peakFile(TQString("%1.pk").tqarg(derivedOrphans[i]));
peakFile.remove();
@ -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").tqarg(filename).tqarg(strerror(status)));
errMsg = i18n(TQString("Could not create temporary file in directory of '%1': %2").tqarg(filename).tqarg(strerror(status)).ascii());
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")
.tqarg(tempFileName).tqarg(strerror(status)));
.tqarg(tempFileName).tqarg(strerror(status)).ascii());
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'").tqarg(tempFileName).tqarg(filename));
errMsg = i18n(TQString("Failed to rename temporary output file '%1' to desired output file '%2'").tqarg(tempFileName).tqarg(filename).ascii());
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").tqarg(filename));
errMsg = i18n(TQString("Could not open file '%1' for writing").tqarg(filename).ascii());
delete fileCompressedDevice;
return false; // couldn't open file
}
@ -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'").tqarg(filename));
errMsg = i18n(TQString("Error while writing on '%1'").tqarg(filename).ascii());
delete fileCompressedDevice;
return false;
}
@ -1383,7 +1383,7 @@ void RosegardenGUIDoc::saveSegment(TQTextStream& outStream, Segment *segment,
.tqarg(segment->getTrack())
.tqarg(segment->getStartTime());
if (extraAttributes)
if (!extraAttributes.isNull())
outStream << extraAttributes << " ";
outStream << "label=\"" <<

@ -37,7 +37,7 @@
#include "gui/editors/segment/segmentcanvas/AudioPreviewThread.h"
#include <map>
#include "sound/AudioFileManager.h"
// #include <tqlist.h> (fixes problem for Adam Dingle)
#include <tqptrlist.h>
#include <tqobject.h>
#include <tqstring.h>
#include <tqstringlist.h>
@ -439,7 +439,7 @@ public:
/**
* return the list of the views currently connected to the document
*/
TQList<RosegardenGUIView>& getViewList() { return m_viewList; }
TQPtrList<RosegardenGUIView>& getViewList() { return m_viewList; }
bool isBeingDestroyed() { return m_beingDestroyed; }
@ -617,12 +617,12 @@ protected:
/**
* the list of the views currently connected to the document
*/
TQList<RosegardenGUIView> m_viewList;
TQPtrList<RosegardenGUIView> m_viewList;
/**
* the list of the edit views currently editing a part of this document
*/
TQList<EditViewBase> m_editViewList;
TQPtrList<EditViewBase> m_editViewList;
/**
* the modified flag of the current document

@ -409,7 +409,7 @@ LilyPondExporter::write()
std::ofstream str(qstrtostr(tmpName).c_str(), std::ios::out);
if (!str) {
std::cerr << "LilyPondExporter::write() - can't write file " << tmpName << std::endl;
std::cerr << "LilyPondExporter::write() - can't write file " << tmpName.ascii() << std::endl;
return false;
}

@ -2008,12 +2008,12 @@ void RosegardenGUIApp::saveGlobalProperties(KConfig *cfg)
TQString errMsg;
bool res = m_doc->saveDocument(tempname, errMsg);
if (!res) {
if (errMsg)
if (!errMsg.isNull())
KMessageBox::error(this, i18n(TQString("Could not save document at %1\nError was : %2")
.tqarg(tempname).tqarg(errMsg)));
.tqarg(tempname).tqarg(errMsg).ascii()));
else
KMessageBox::error(this, i18n(TQString("Could not save document at %1")
.tqarg(tempname)));
.tqarg(tempname).ascii()));
}
}
}
@ -2271,12 +2271,12 @@ void RosegardenGUIApp::slotFileSave()
bool res = m_doc->saveDocument(docFilePath, errMsg);
if (!res) {
if (errMsg)
if (!errMsg.isNull())
KMessageBox::error(this, i18n(TQString("Could not save document at %1\nError was : %2")
.tqarg(docFilePath).tqarg(errMsg)));
.tqarg(docFilePath).tqarg(errMsg).ascii()));
else
KMessageBox::error(this, i18n(TQString("Could not save document at %1")
.tqarg(docFilePath)));
.tqarg(docFilePath).ascii()));
}
}
}
@ -2294,7 +2294,7 @@ RosegardenGUIApp::getValidWriteFile(TQString descriptiveExtension,
// It's too bad there isn't this functionality within
// KFileDialog::getSaveFileName
KFileDialog saveFileDialog(":ROSEGARDEN", descriptiveExtension,this, label, true);
KFileDialog saveFileDialog(TQString(":ROSEGARDEN"), descriptiveExtension, TQT_TQWIDGET(this), label.ascii(), true);
saveFileDialog.setOperationMode(KFileDialog::Saving);
if (m_doc) {
TQString saveFileName = m_doc->getAbsFilePath();
@ -2319,7 +2319,7 @@ RosegardenGUIApp::getValidWriteFile(TQString descriptiveExtension,
//
if (!extension.isEmpty()) {
static TQRegExp rgFile("\\..{1,4}$");
if (rgFile.match(name) == -1) {
if (rgFile.search(name) == -1) {
name += extension;
}
}
@ -2374,12 +2374,12 @@ bool RosegardenGUIApp::slotFileSaveAs()
TQString errMsg;
bool res = m_doc->saveDocument(newName, errMsg);
if (!res) {
if (errMsg)
if (!errMsg.isNull())
KMessageBox::error(this, i18n(TQString("Could not save document at %1\nError was : %2")
.tqarg(newName).tqarg(errMsg)));
.tqarg(newName).tqarg(errMsg).ascii()));
else
KMessageBox::error(this, i18n(TQString("Could not save document at %1")
.tqarg(newName)));
.tqarg(newName).ascii()));
} else {
@ -7566,7 +7566,7 @@ RosegardenGUIApp::slotTutorial()
{
TQString exe = KStandardDirs::findExe( "x-www-browser" );
if( exe )
if( !exe.isNull() )
{
KProcess *proc = new KProcess;
*proc << "x-www-browser";
@ -7588,7 +7588,7 @@ RosegardenGUIApp::slotBugGuidelines()
{
TQString exe = KStandardDirs::findExe( "x-www-browser" );
if( exe )
if( !exe.isNull() )
{
KProcess *proc = new KProcess;
*proc << "x-www-browser";
@ -7751,12 +7751,12 @@ RosegardenGUIApp::slotSaveDefaultStudio()
TQString errMsg;
bool res = m_doc->saveDocument(autoloadFile, errMsg);
if (!res) {
if (errMsg)
if (!errMsg.isNull())
KMessageBox::error(this, i18n(TQString("Could not auto-save document at %1\nError was : %2")
.tqarg(autoloadFile).tqarg(errMsg)));
.tqarg(autoloadFile).tqarg(errMsg).ascii()));
else
KMessageBox::error(this, i18n(TQString("Could not auto-save document at %1")
.tqarg(autoloadFile)));
.tqarg(autoloadFile).ascii()));
}
}

@ -844,7 +844,7 @@ void RosegardenGUIView::slotEditSegmentAudio(Segment *segment)
if (splitCommand.size() == 0) {
std::cerr << "RosegardenGUIView::slotEditSegmentAudio() - "
<< "external editor \"" << application.data()
<< "external editor \"" << application.ascii()
<< "\" not found" << std::endl;
KMessageBox::sorry(this,
@ -856,7 +856,7 @@ void RosegardenGUIView::slotEditSegmentAudio(Segment *segment)
TQFileInfo *appInfo = new TQFileInfo(splitCommand[0]);
if (appInfo->exists() == false || appInfo->isExecutable() == false) {
std::cerr << "RosegardenGUIView::slotEditSegmentAudio() - "
<< "can't execute \"" << splitCommand[0] << "\""
<< "can't execute \"" << splitCommand[0].ascii() << "\""
<< std::endl;
return;
}
@ -1516,7 +1516,7 @@ RosegardenGUIView::slotDroppedNewAudio(TQString audioDesc)
s >> trackId;
s >> time;
std::cerr << "RosegardenGUIView::slotDroppedNewAudio: url " << url << ", trackId " << trackId << ", time " << time << std::endl;
std::cerr << "RosegardenGUIView::slotDroppedNewAudio: url " << url.ascii() << ", trackId " << trackId << ", time " << time << std::endl;
RosegardenGUIApp *app = RosegardenGUIApp::self();
AudioFileManager &aFM = getDocument()->getAudioFileManager();

@ -235,7 +235,7 @@ StartupTester::slotHttpDone(bool error)
TQString latestVersion = lines[0];
std::cerr << "Comparing current version \"" << VERSION
<< "\" with latest version \"" << latestVersion << "\""
<< "\" with latest version \"" << latestVersion.ascii() << "\""
<< std::endl;
if (isVersionNewerThan(latestVersion, VERSION)) {
emit newerVersionAvailable(latestVersion);

@ -350,20 +350,20 @@ void testInstalledVersion()
TQString versionLocation = locate("appdata", "version.txt");
TQString installedVersion;
if (versionLocation) {
if (!versionLocation.isNull()) {
TQFile versionFile(versionLocation);
if (versionFile.open(IO_ReadOnly)) {
TQTextStream text(&versionFile);
TQString s = text.readLine().stripWhiteSpace();
versionFile.close();
if (s) {
if (!s.isNull()) {
if (s == VERSION) return;
installedVersion = s;
}
}
}
if (installedVersion) {
if (!installedVersion.isNull()) {
KMessageBox::detailedError
(0,
@ -724,7 +724,7 @@ int main(int argc, char *argv[])
TQLabel *image = new TQLabel(hb);
image->tqsetAlignment(TQt::AlignTop);
TQString iconFile = locate("appdata", "pixmaps/misc/welcome-icon.png");
if (iconFile) {
if (!iconFile.isNull()) {
image->setPixmap(TQPixmap(iconFile));
}
TQLabel *label = new TQLabel(hb);

@ -119,7 +119,7 @@ AudioConfigurationPage::AudioConfigurationPage(
TQString defaultAudioEditor = getBestAvailableAudioEditor();
std::cerr << "defaultAudioEditor = " << defaultAudioEditor << std::endl;
std::cerr << "defaultAudioEditor = " << defaultAudioEditor.ascii() << std::endl;
TQString externalAudioEditor = m_cfg->readEntry("externalaudioeditor",
defaultAudioEditor);

@ -592,7 +592,7 @@ NotationConfigurationPage::slotViewButtonPressed()
(void)viewer->exec(); // no return value
}
} catch (Exception f) {
KMessageBox::error(0, i18n(strtoqstr(f.getMessage())));
KMessageBox::error(0, i18n(strtoqstr(f.getMessage()).ascii()));
}
#endif
}
@ -656,21 +656,21 @@ NotationConfigurationPage::slotFontComboChanged(int index)
NoteFont *noteFont = NoteFontFactory::getFont
(fontStr, NoteFontFactory::getDefaultSize(fontStr));
const NoteFontMap &map(noteFont->getNoteFontMap());
m_fontOriginLabel->setText(i18n(strtoqstr(map.getOrigin())));
m_fontCopyrightLabel->setText(i18n(strtoqstr(map.getCopyright())));
m_fontMappedByLabel->setText(i18n(strtoqstr(map.getMappedBy())));
m_fontOriginLabel->setText(i18n(strtoqstr(map.getOrigin()).ascii()));
m_fontCopyrightLabel->setText(i18n(strtoqstr(map.getCopyright()).ascii()));
m_fontMappedByLabel->setText(i18n(strtoqstr(map.getMappedBy()).ascii()));
if (map.isSmooth()) {
m_fontTypeLabel->setText(
i18n("%1 (smooth)").tqarg(i18n(strtoqstr(map.getType()))));
i18n("%1 (smooth)").tqarg(i18n(strtoqstr(map.getType()).ascii())));
} else {
m_fontTypeLabel->setText(
i18n("%1 (jaggy)").tqarg(i18n(strtoqstr(map.getType()))));
i18n("%1 (jaggy)").tqarg(i18n(strtoqstr(map.getType()).ascii())));
}
if (m_viewButton) {
m_viewButton->setEnabled(map.getSystemFontNames().count() > 0);
}
} catch (Exception f) {
KMessageBox::error(0, i18n(strtoqstr(f.getMessage())));
KMessageBox::error(0, i18n(strtoqstr(f.getMessage()).ascii()));
}
}

@ -882,7 +882,7 @@ AudioManagerDialog::slotDeleteUnused()
}
for (int i = 0; i < names.size(); ++i) {
std::cerr << i << ": " << names[i] << std::endl;
std::cerr << i << ": " << names[i].ascii() << std::endl;
TQFile file(names[i]);
if (!file.remove()) {
KMessageBox::error(this, i18n("File %1 could not be deleted.").tqarg(names[i]));
@ -891,7 +891,7 @@ AudioManagerDialog::slotDeleteUnused()
m_doc->getAudioFileManager().removeFile(nameMap[names[i]]);
emit deleteAudioFile(nameMap[names[i]]);
} else {
std::cerr << "WARNING: Audio file name " << names[i] << " not in name map" << std::endl;
std::cerr << "WARNING: Audio file name " << names[i].ascii() << " not in name map" << std::endl;
}
TQFile peakFile(TQString("%1.pk").tqarg(names[i]));
@ -1150,7 +1150,7 @@ AudioManagerDialog::slotDropped(TQDropEvent *event, TQListViewItem*)
// see if we can decode a URI.. if not, just ignore it
if (TQUriDrag::decode(event, uri)) {
// okay, we have a URI.. process it
for (TQString url = uri.first(); url; url = uri.next()) {
for (TQString url = uri.first(); !url.isNull(); url = uri.next()) {
RG_DEBUG << "AudioManagerDialog::dropEvent() : got "
<< url << endl;
@ -1222,7 +1222,7 @@ AudioManagerDialog::slotDistributeOnMidiSegment()
//Composition &comp = m_doc->getComposition();
TQList<RosegardenGUIView>& viewList = m_doc->getViewList();
TQPtrList<RosegardenGUIView>& viewList = m_doc->getViewList();
RosegardenGUIView *w = 0;
SegmentSelection selection;

@ -281,7 +281,7 @@ AudioPluginDialog::populatePluginList()
if (needCategory) {
TQString cat = "";
if ((*i)->getCategory())
if (!((*i)->getCategory()).isNull())
cat = (*i)->getCategory();
if (cat != category)
continue;

@ -73,7 +73,7 @@ ConfigureDialog::ConfigureDialog(RosegardenGUIDoc *doc,
//
pageWidget = addPage(GeneralConfigurationPage::iconLabel(),
GeneralConfigurationPage::title(),
loadIcon(GeneralConfigurationPage::iconName()));
loadIcon(GeneralConfigurationPage::iconName().ascii()));
vlay = new TQVBoxLayout(pageWidget, 0, spacingHint());
page = new GeneralConfigurationPage(doc, cfg, pageWidget);
vlay->addWidget(page);
@ -87,7 +87,7 @@ ConfigureDialog::ConfigureDialog(RosegardenGUIDoc *doc,
pageWidget = addPage(MIDIConfigurationPage::iconLabel(),
MIDIConfigurationPage::title(),
loadIcon(MIDIConfigurationPage::iconName()));
loadIcon(MIDIConfigurationPage::iconName().ascii()));
vlay = new TQVBoxLayout(pageWidget, 0, spacingHint());
page = new MIDIConfigurationPage(doc, cfg, pageWidget);
vlay->addWidget(page);
@ -96,7 +96,7 @@ ConfigureDialog::ConfigureDialog(RosegardenGUIDoc *doc,
pageWidget = addPage(AudioConfigurationPage::iconLabel(),
AudioConfigurationPage::title(),
loadIcon(AudioConfigurationPage::iconName()));
loadIcon(AudioConfigurationPage::iconName().ascii()));
vlay = new TQVBoxLayout(pageWidget, 0, spacingHint());
page = new AudioConfigurationPage(doc, cfg, pageWidget);
vlay->addWidget(page);
@ -106,7 +106,7 @@ ConfigureDialog::ConfigureDialog(RosegardenGUIDoc *doc,
// Notation Page
pageWidget = addPage(NotationConfigurationPage::iconLabel(),
NotationConfigurationPage::title(),
loadIcon(NotationConfigurationPage::iconName()));
loadIcon(NotationConfigurationPage::iconName().ascii()));
vlay = new TQVBoxLayout(pageWidget, 0, spacingHint());
page = new NotationConfigurationPage(cfg, pageWidget);
vlay->addWidget(page);

@ -38,7 +38,7 @@ namespace Rosegarden
ConfigureDialogBase::ConfigureDialogBase(TQWidget *parent,
TQString label,
const char *name):
KDialogBase(IconList, label ? label : i18n("Configure"), Help | Apply | Ok | Cancel,
KDialogBase(IconList, (!label.isNull()) ? label : i18n("Configure"), Help | Apply | Ok | Cancel,
Ok, parent, name, true) // modal
{
setWFlags(WDestructiveClose);

@ -71,7 +71,7 @@ DocumentConfigureDialog::DocumentConfigureDialog(RosegardenGUIDoc *doc,
//
pageWidget = addPage(DocumentMetaConfigurationPage::iconLabel(),
DocumentMetaConfigurationPage::title(),
loadIcon(DocumentMetaConfigurationPage::iconName()));
loadIcon(DocumentMetaConfigurationPage::iconName().ascii()));
vlay = new TQVBoxLayout(pageWidget, 0, spacingHint());
page = new DocumentMetaConfigurationPage(doc, pageWidget);
vlay->addWidget(page);
@ -82,7 +82,7 @@ DocumentConfigureDialog::DocumentConfigureDialog(RosegardenGUIDoc *doc,
//
pageWidget = addPage(AudioPropertiesPage::iconLabel(),
AudioPropertiesPage::title(),
loadIcon(AudioPropertiesPage::iconName()));
loadIcon(AudioPropertiesPage::iconName().ascii()));
vlay = new TQVBoxLayout(pageWidget, 0, spacingHint());
page = new AudioPropertiesPage(doc, pageWidget);
vlay->addWidget(page);
@ -92,7 +92,7 @@ DocumentConfigureDialog::DocumentConfigureDialog(RosegardenGUIDoc *doc,
// Colour Page
pageWidget = addPage(ColourConfigurationPage::iconLabel(),
ColourConfigurationPage::title(),
loadIcon(ColourConfigurationPage::iconName()));
loadIcon(ColourConfigurationPage::iconName().ascii()));
vlay = new TQVBoxLayout(pageWidget, 0, spacingHint());
page = new ColourConfigurationPage(doc, pageWidget);

@ -179,10 +179,10 @@ EventEditDialog::EventEditDialog(TQWidget *parent,
for (Event::PropertyNames::iterator i = p.begin();
i != p.end(); ++i) {
new TQLabel(strtoqstr(*i), m_nonPersistentGrid, strtoqstr(*i));
new TQLabel(strtoqstr(event.getPropertyTypeAsString(*i)), m_nonPersistentGrid, strtoqstr(*i));
new TQLabel(strtoqstr(event.getAsString(*i)), m_nonPersistentGrid, strtoqstr(*i));
TQPushButton *button = new TQPushButton("P", m_nonPersistentGrid, strtoqstr(*i));
new TQLabel(strtoqstr(*i), m_nonPersistentGrid, strtoqstr(*i).ascii());
new TQLabel(strtoqstr(event.getPropertyTypeAsString(*i)), m_nonPersistentGrid, strtoqstr(*i).ascii());
new TQLabel(strtoqstr(event.getAsString(*i)), m_nonPersistentGrid, strtoqstr(*i).ascii());
TQPushButton *button = new TQPushButton("P", m_nonPersistentGrid, strtoqstr(*i).ascii());
button->setFixedSize(TQSize(24, 24));
TQToolTip::add
(button, i18n("Make persistent"));
@ -195,10 +195,10 @@ EventEditDialog::EventEditDialog(TQWidget *parent,
void
EventEditDialog::addPersistentProperty(const PropertyName &name)
{
TQLabel *label = new TQLabel(strtoqstr(name), m_persistentGrid, strtoqstr(name));
TQLabel *label = new TQLabel(strtoqstr(name), m_persistentGrid, strtoqstr(name).ascii());
label->show();
label = new TQLabel(strtoqstr(m_originalEvent.getPropertyTypeAsString(name)),
m_persistentGrid, strtoqstr(name));
m_persistentGrid, strtoqstr(name).ascii());
label->show();
PropertyType type(m_originalEvent.getPropertyType(name));
@ -213,7 +213,7 @@ EventEditDialog::addPersistentProperty(const PropertyName &name)
max = 127;
}
TQSpinBox *spinBox = new TQSpinBox
(min, max, 1, m_persistentGrid, strtoqstr(name));
(min, max, 1, m_persistentGrid, strtoqstr(name).ascii());
spinBox->setValue(m_originalEvent.get<Int>(name));
TQObject::connect(spinBox, TQT_SIGNAL(valueChanged(int)),
this, TQT_SLOT(slotIntPropertyChanged(int)));
@ -228,7 +228,7 @@ case UInt: {
max = 65535;
}
TQSpinBox *spinBox = new TQSpinBox
(min, max, 1, m_persistentGrid, strtoqstr(name));
(min, max, 1, m_persistentGrid, strtoqstr(name).ascii());
spinBox->setValue(m_originalEvent.get<UInt>(name));
TQObject::connect(spinBox, TQT_SIGNAL(valueChanged(int)),
this, TQT_SLOT(slotIntPropertyChanged(int)));
@ -244,7 +244,7 @@ case UInt: {
//
TQSpinBox *spinBox = new TQSpinBox
(INT_MIN, INT_MAX, 1,
hbox, strtoqstr(name) + "%sec");
hbox, TQString(strtoqstr(name) + "%sec").ascii());
spinBox->setValue(realTime.sec);
TQObject::connect(spinBox, TQT_SIGNAL(valueChanged(int)),
@ -254,7 +254,7 @@ case UInt: {
//
spinBox = new TQSpinBox
(INT_MIN, INT_MAX, 1,
hbox, strtoqstr(name) + "%nsec");
hbox, TQString(strtoqstr(name) + "%nsec").ascii());
spinBox->setValue(realTime.nsec);
TQObject::connect(spinBox, TQT_SIGNAL(valueChanged(int)),
@ -265,7 +265,7 @@ case UInt: {
case Bool: {
TQCheckBox *checkBox = new TQCheckBox
("", m_persistentGrid, strtoqstr(name));
("", m_persistentGrid, strtoqstr(name).ascii());
checkBox->setChecked(m_originalEvent.get<Bool>(name));
TQObject::connect(checkBox, TQT_SIGNAL(activated()),
this, TQT_SLOT(slotBoolPropertyChanged()));
@ -277,7 +277,7 @@ case UInt: {
TQLineEdit *lineEdit = new TQLineEdit
(strtoqstr(m_originalEvent.get<String>(name)),
m_persistentGrid,
strtoqstr(name));
strtoqstr(name).ascii());
TQObject::connect(lineEdit, TQT_SIGNAL(textChanged(const TQString &)),
this, TQT_SLOT(slotStringPropertyChanged(const TQString &)));
lineEdit->show();
@ -286,7 +286,7 @@ case UInt: {
}
TQPushButton *button = new TQPushButton("X", m_persistentGrid,
strtoqstr(name));
strtoqstr(name).ascii());
button->setFixedSize(TQSize(24, 24));
TQToolTip::add
(button, i18n("Delete this property"));
@ -438,7 +438,7 @@ EventEditDialog::slotPropertyDeleted()
return ;
m_modified = true;
TQObjectList *list = m_persistentGrid->queryList(0, propertyName, false);
TQObjectList *list = m_persistentGrid->queryList(0, propertyName.ascii(), false);
TQObjectListIt i(*list);
TQObject *obj;
while ((obj = i.current()) != 0) {
@ -470,7 +470,7 @@ EventEditDialog::slotPropertyMadePersistent()
i18n("Make &Persistent")) != KMessageBox::Continue)
return ;
TQObjectList *list = m_nonPersistentGrid->queryList(0, propertyName, false);
TQObjectList *list = m_nonPersistentGrid->queryList(0, propertyName.ascii(), false);
TQObjectListIt i(*list);
TQObject *obj;
while ((obj = i.current()) != 0) {

@ -160,7 +160,7 @@ IdentifyTextCodecDialog::slotCodecSelected(int i)
// std::cerr << "codecs: ";
// for (int j = 0; j < m_codecs.size(); ++j) std::cerr << m_codecs[j] << " ";
// std::cerr << std::endl;
TQTextCodec *codec = TQTextCodec::codecForName(strtoqstr(name));
TQTextCodec *codec = TQTextCodec::codecForName(strtoqstr(name).ascii());
if (!codec) return;
m_codec = qstrtostr(codec->name());
std::cerr << "Applying codec " << m_codec << std::endl;

@ -89,7 +89,7 @@ KeySignatureDialog::KeySignatureDialog(TQWidget *parent,
nameBox = new TQHBox(keyFrame);
TQLabel *explanatoryLabel = 0;
if (explanatoryText) {
if (!explanatoryText.isNull()) {
explanatoryLabel = new TQLabel(explanatoryText, keyFrame);
}

@ -84,7 +84,7 @@ TimeSignatureDialog::TimeSignatureDialog(TQWidget *parent,
TQHBox *denomBox = new TQHBox(groupBox);
TQLabel *explanatoryLabel = 0;
if (explanatoryText) {
if (!explanatoryText.isNull()) {
explanatoryLabel = new TQLabel(explanatoryText, groupBox);
}

@ -347,7 +347,7 @@ TransportDialog::loadPixmaps()
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;
<< fileName.ascii() << "\"" << std::endl;
}
}
@ -959,7 +959,7 @@ TransportDialog::setMidiInLabel(const MappedEvent *mE)
void
TransportDialog::slotClearMidiInLabel()
{
m_transport->InDisplay->setText(i18n(TQString("NO EVENTS")));
m_transport->InDisplay->setText(i18n(TQString("NO EVENTS").ascii()));
// also, just to be sure:
slotResetBackground();
@ -1019,7 +1019,7 @@ TransportDialog::setMidiOutLabel(const MappedEvent *mE)
void
TransportDialog::slotClearMidiOutLabel()
{
m_transport->OutDisplay->setText(i18n(TQString("NO EVENTS")));
m_transport->OutDisplay->setText(i18n(TQString("NO EVENTS").ascii()));
}
void

@ -27,6 +27,8 @@
#ifndef _RG_SYMBOLS_H_
#define _RG_SYMBOLS_H_
#include <utility>
#include <tqbrush.h>
#include <tqpainter.h>

@ -106,7 +106,7 @@ void MatrixCanvasView::contentsMousePressEvent(TQMouseEvent* e)
QCanvasMatrixRectangle *mRect = 0;
if (item->active()) {
if (item->isActive()) {
activeItem = item;
break;
}

@ -520,7 +520,7 @@ void MatrixSelector::setViewCurrentSelection()
EventSelection* MatrixSelector::getSelection()
{
if (!m_selectionRect->visible()) return 0;
if (!m_selectionRect->isVisible()) return 0;
Segment& originalSegment = m_currentStaff->getSegment();
EventSelection* selection = new EventSelection(originalSegment);
@ -571,7 +571,7 @@ void MatrixSelector::setContextHelpFor(TQPoint p, bool ctrlPressed)
TQCanvasItem *item = *it;
QCanvasMatrixRectangle *mRect = 0;
if (item->active()) {
if (item->isActive()) {
break;
}

@ -907,7 +907,7 @@ void MatrixView::setupActions()
if (d == (crotchetDuration * 3) / 2) actionName = "snap_3";
new KAction(i18n("Snap to %1").tqarg(label), pixmap, cut, TQT_TQOBJECT(this),
TQT_SLOT(slotSetSnapFromAction()), actionCollection(),
actionName);
actionName.ascii());
}
}

@ -186,7 +186,7 @@ void NotationCanvasView::contentsMousePressEvent(TQMouseEvent *e)
for (it = itemList.begin(); it != itemList.end(); ++it) {
if ((*it)->active()) {
if ((*it)->isActive()) {
emit activeItemPressed(e, *it);
return ;
}
@ -284,7 +284,7 @@ NotationCanvasView::processActiveItems(TQMouseEvent* e,
for (it = itemList.begin(); it != itemList.end(); ++it) {
TQCanvasItem *item = *it;
if (item->active() && !pressedItem) {
if (item->isActive() && !pressedItem) {
NOTATION_DEBUG << "mousepress : got active item\n";
pressedItem = item;
}

@ -184,7 +184,7 @@ NotationElement::reposition(double canvasX, double canvasY)
bool
NotationElement::isSelected()
{
return m_canvasItem ? m_canvasItem->selected() : false;
return m_canvasItem ? m_canvasItem->isSelected() : false;
}
void

@ -824,7 +824,7 @@ EventSelection* NotationSelector::getSelection()
// If selection rect is not visible or too small,
// return 0
//
if (!m_selectionRect->visible()) return 0;
if (!m_selectionRect->isVisible()) return 0;
// NOTATION_DEBUG << "Selection x,y: " << m_selectionRect->x() << ","
// << m_selectionRect->y() << "; w,h: " << m_selectionRect->width() << "," << m_selectionRect->height() << endl;

@ -935,7 +935,7 @@ NotationStaff::renderSingleElement(ViewElementList::iterator &vli,
static bool warned = false;
if (!warned) {
KMessageBox::error(0, i18n(strtoqstr(u.getMessage())));
KMessageBox::error(0, i18n(strtoqstr(u.getMessage()).ascii()));
warned = true;
}
}

@ -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)").tqarg((*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()).ascii() << std::endl;
(*chord[j])->event()->dump(std::cerr);
}
h.push_back(height);

@ -1527,7 +1527,7 @@ void NotationView::setupActions()
KToggleAction *fontAction =
new KToggleAction
(fontTQName, 0, TQT_TQOBJECT(this), TQT_SLOT(slotChangeFontFromAction()),
actionCollection(), "note_font_" + fontTQName);
actionCollection(), TQString("note_font_" + fontTQName).ascii());
fontAction->setChecked(*i == m_fontName);
fontActionMenu->insert(fontAction);
@ -1559,7 +1559,7 @@ void NotationView::setupActions()
new KToggleAction
(TQString("%1%").tqarg(*i), 0, TQT_TQOBJECT(this),
TQT_SLOT(slotChangeSpacingFromAction()),
actionCollection(), TQString("spacing_%1").tqarg(*i));
actionCollection(), TQString("spacing_%1").tqarg(*i).ascii());
spacingAction->setExclusiveGroup("spacing");
spacingAction->setChecked(*i == defaultSpacing);
@ -1585,7 +1585,7 @@ void NotationView::setupActions()
new KToggleAction
(name, 0, TQT_TQOBJECT(this),
TQT_SLOT(slotChangeProportionFromAction()),
actionCollection(), TQString("proportion_%1").tqarg(*i));
actionCollection(), TQString("proportion_%1").tqarg(*i).ascii());
proportionAction->setExclusiveGroup("proportion");
proportionAction->setChecked(*i == defaultProportion);
@ -1608,7 +1608,7 @@ void NotationView::setupActions()
KAction *styleAction =
new KAction
(styleTQName, 0, TQT_TQOBJECT(this), TQT_SLOT(slotSetStyleFromAction()),
actionCollection(), "style_" + styleTQName);
actionCollection(), TQString("style_" + styleTQName).ascii());
styleActionMenu->insert(styleAction);
}
@ -1622,17 +1622,17 @@ void NotationView::setupActions()
new KAction
(i18n("Insert Rest"), Key_P, TQT_TQOBJECT(this), TQT_SLOT(slotInsertRest()),
actionCollection(), TQString("insert_rest"));
actionCollection(), TQString("insert_rest").ascii());
new KAction
(i18n("Switch from Note to Rest"), Key_T, TQT_TQOBJECT(this),
TQT_SLOT(slotSwitchFromNoteToRest()),
actionCollection(), TQString("switch_from_note_to_rest"));
actionCollection(), TQString("switch_from_note_to_rest").ascii());
new KAction
(i18n("Switch from Rest to Note"), Key_Y, TQT_TQOBJECT(this),
TQT_SLOT(slotSwitchFromRestToNote()),
actionCollection(), TQString("switch_from_rest_to_note"));
actionCollection(), TQString("switch_from_rest_to_note").ascii());
// setup Notes menu & toolbar
@ -1646,14 +1646,14 @@ void NotationView::setupActions()
icon = TQIconSet
(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap
(noteActionData.pixmapName)));
(noteActionData.pixmapName.ascii())));
noteAction = new KRadioAction(noteActionData.title,
icon,
noteActionData.keycode,
TQT_TQOBJECT(this),
TQT_SLOT(slotNoteAction()),
actionCollection(),
noteActionData.actionName);
noteActionData.actionName.ascii());
noteAction->setExclusiveGroup("notes");
if (noteActionData.noteType == Note::Crotchet &&
@ -1671,7 +1671,7 @@ void NotationView::setupActions()
icon = TQIconSet
(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap
(data.pixmapName)));
(data.pixmapName.ascii())));
KAction *action = new KAction(data.title,
icon,
@ -1679,7 +1679,7 @@ void NotationView::setupActions()
TQT_TQOBJECT(this),
TQT_SLOT(slotNoteChangeAction()),
actionCollection(),
data.actionName);
data.actionName.ascii());
}
//
@ -1700,10 +1700,10 @@ void NotationView::setupActions()
i < sizeof(actionsAccidental) / sizeof(actionsAccidental[0]); ++i) {
icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap
(actionsAccidental[i][3])));
(actionsAccidental[i][3].ascii())));
noteAction = new KRadioAction(actionsAccidental[i][0], icon, 0, TQT_TQOBJECT(this),
actionsAccidental[i][1],
actionCollection(), actionsAccidental[i][2]);
actionsAccidental[i][1].ascii(),
actionCollection(), actionsAccidental[i][2].ascii());
noteAction->setExclusiveGroup("accidentals");
}
@ -2194,7 +2194,7 @@ void NotationView::setupActions()
TQT_TQOBJECT(this),
TQT_SLOT(slotAddMark()),
actionCollection(),
markActionData.actionName);
markActionData.actionName.ascii());
}
icon = TQIconSet
@ -2263,7 +2263,7 @@ void NotationView::setupActions()
for (int i = 0; i <= 5; ++i) {
new KAction(slashTitles[i], 0, TQT_TQOBJECT(this),
TQT_SLOT(slotAddSlashes()), actionCollection(),
TQString("slashes_%1").tqarg(i));
TQString("slashes_%1").tqarg(i).ascii());
}
new KAction(ClefInsertionCommand::getGlobalName(), 0, TQT_TQOBJECT(this),
@ -2315,11 +2315,11 @@ void NotationView::setupActions()
for (unsigned int i = 0;
i < sizeof(actionsToolbars) / sizeof(actionsToolbars[0]); ++i) {
icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap(actionsToolbars[i][3])));
icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap(actionsToolbars[i][3].ascii())));
new KToggleAction(actionsToolbars[i][0], icon, 0,
TQT_TQOBJECT(this), actionsToolbars[i][1],
actionCollection(), actionsToolbars[i][2]);
TQT_TQOBJECT(this), actionsToolbars[i][1].ascii(),
actionCollection(), actionsToolbars[i][2].ascii());
}
new KAction(i18n("Cursor &Back"), 0, Key_Left, TQT_TQOBJECT(this),
@ -2546,7 +2546,7 @@ NotationView::setupFontSizeMenu(std::string oldFontName)
for (unsigned int i = 0; i < sizes.size(); ++i) {
KAction *action =
actionCollection()->action
(TQString("note_font_size_%1").tqarg(sizes[i]));
(TQString("note_font_size_%1").tqarg(sizes[i]).ascii());
m_fontSizeActionMenu->remove
(action);
@ -2563,14 +2563,14 @@ NotationView::setupFontSizeMenu(std::string oldFontName)
TQString actionName = TQString("note_font_size_%1").tqarg(sizes[i]);
KToggleAction *sizeAction = dynamic_cast<KToggleAction *>
(actionCollection()->action(actionName));
(actionCollection()->action(actionName.ascii()));
if (!sizeAction) {
sizeAction =
new KToggleAction(i18n("1 pixel", "%n pixels", sizes[i]),
0, TQT_TQOBJECT(this),
TQT_SLOT(slotChangeFontSizeFromAction()),
actionCollection(), actionName);
actionCollection(), actionName.ascii());
}
sizeAction->setChecked(sizes[i] == m_fontSize);
@ -3091,7 +3091,7 @@ void NotationView::setCurrentSelectedNote(const char *pixmapName,
void NotationView::setCurrentSelectedNote(const NoteActionData &noteAction)
{
setCurrentSelectedNote(noteAction.pixmapName,
setCurrentSelectedNote(noteAction.pixmapName.ascii(),
noteAction.rest,
noteAction.noteType,
noteAction.dots);
@ -3969,7 +3969,7 @@ void NotationView::slotNoteAction()
void NotationView::slotLastNoteAction()
{
KAction *action = actionCollection()->action(m_lastNoteAction);
KAction *action = actionCollection()->action(m_lastNoteAction.ascii());
if (!action)
action = actionCollection()->action("crotchet");
@ -3977,7 +3977,7 @@ void NotationView::slotLastNoteAction()
action->activate();
} else {
std::cerr << "NotationView::slotNoteAction() : couldn't find action named '"
<< m_lastNoteAction << "' or 'crotchet'\n";
<< m_lastNoteAction.ascii() << "' or 'crotchet'\n";
}
}
@ -4332,7 +4332,7 @@ NotationView::slotChangeSpacing(int spacing)
// m_spacingSlider->setSize(spacing);
KToggleAction *action = dynamic_cast<KToggleAction *>
(actionCollection()->action(TQString("spacing_%1").tqarg(spacing)));
(actionCollection()->action(TQString("spacing_%1").tqarg(spacing).ascii()));
if (action)
action->setChecked(true);
else {
@ -4390,7 +4390,7 @@ NotationView::slotChangeProportion(int proportion)
// m_proportionSlider->setSize(proportion);
KToggleAction *action = dynamic_cast<KToggleAction *>
(actionCollection()->action(TQString("proportion_%1").tqarg(proportion)));
(actionCollection()->action(TQString("proportion_%1").tqarg(proportion).ascii()));
if (action)
action->setChecked(true);
else {
@ -4544,7 +4544,7 @@ NotationView::slotChangeFont(std::string newName, int newSize)
if (thisOne)
m_fontCombo->setCurrentItem(i);
KToggleAction *action = dynamic_cast<KToggleAction *>
(actionCollection()->action("note_font_" + strtoqstr(f[i])));
(actionCollection()->action(TQString("note_font_" + strtoqstr(f[i])).ascii()));
NOTATION_DEBUG << "inspecting " << f[i] << (action ? ", have action" : ", no action") << endl;
if (action)
action->setChecked(thisOne);
@ -4869,7 +4869,7 @@ void NotationView::slotEditGeneralPaste()
KMessageBox::detailedError
(this,
i18n("Couldn't paste at this point."),
i18n(RESTRICTED_PASTE_FAILED_DESCRIPTION));
i18n(RESTRICTED_PASTE_FAILED_DESCRIPTION.ascii()));
} else {
addCommandToHistory(command);
setCurrentSelection(new EventSelection
@ -5146,7 +5146,7 @@ void NotationView::slotToggleTransportToolBar()
void NotationView::toggleNamedToolBar(const TQString& toolBarName, bool* force)
{
KToolBar *namedToolBar = toolBar(toolBarName);
KToolBar *namedToolBar = toolBar(toolBarName.ascii());
if (!namedToolBar) {
NOTATION_DEBUG << "NotationView::toggleNamedToolBar() : toolBar "
@ -5661,11 +5661,11 @@ void NotationView::slotSwitchFromRestToNote()
actionName = actionName.replace("-", "_");
KRadioAction *action = dynamic_cast<KRadioAction *>
(actionCollection()->action(actionName));
(actionCollection()->action(actionName.ascii()));
if (!action) {
std::cerr << "WARNING: Failed to find note action \""
<< actionName << "\"" << std::endl;
<< actionName.ascii() << "\"" << std::endl;
} else {
action->activate();
}
@ -5696,11 +5696,11 @@ void NotationView::slotSwitchFromNoteToRest()
actionName = actionName.replace("-", "_");
KRadioAction *action = dynamic_cast<KRadioAction *>
(actionCollection()->action(actionName));
(actionCollection()->action(actionName.ascii()));
if (!action) {
std::cerr << "WARNING: Failed to find rest action \""
<< actionName << "\"" << std::endl;
<< actionName.ascii() << "\"" << std::endl;
} else {
action->activate();
}

@ -78,7 +78,7 @@ NoteFontFactory::getFontNames(bool forceRescan)
TQDir dir(mappingDir);
if (!dir.exists()) {
std::cerr << "NoteFontFactory::getFontNames: mapping directory \""
<< mappingDir << "\" not found" << std::endl;
<< mappingDir.ascii() << "\" not found" << std::endl;
return m_fontNames;
}

@ -147,7 +147,7 @@ NoteFontMap::startElement(const TQString &, const TQString &,
TQString s;
s = attributes.value("name");
if (s) {
if (!s.isNull()) {
m_name = qstrtostr(s);
m_srcDirectory = m_name;
}
@ -157,28 +157,28 @@ NoteFontMap::startElement(const TQString &, const TQString &,
TQString s;
s = attributes.value("origin");
if (s)
if (!s.isNull())
m_origin = qstrtostr(s);
s = attributes.value("copyright");
if (s)
if (!s.isNull())
m_copyright = qstrtostr(s);
s = attributes.value("mapped-by");
if (s)
if (!s.isNull())
m_mappedBy = qstrtostr(s);
s = attributes.value("type");
if (s)
if (!s.isNull())
m_type = qstrtostr(s);
s = attributes.value("autocrop");
if (s) {
if (!s.isNull()) {
std::cerr << "Warning: autocrop attribute in note font mapping file is no longer supported\n(all fonts are now always autocropped)" << std::endl;
}
s = attributes.value("smooth");
if (s)
if (!s.isNull())
m_smooth = (s.lower() == "true");
} else if (lcName == "font-sizes") {
@ -195,46 +195,46 @@ NoteFontMap::startElement(const TQString &, const TQString &,
SizeData &sizeData = m_sizes[noteHeight];
s = attributes.value("staff-line-thickness");
if (s)
if (!s.isNull())
sizeData.setStaffLineThickness(s.toInt());
s = attributes.value("leger-line-thickness");
if (s)
if (!s.isNull())
sizeData.setLegerLineThickness(s.toInt());
s = attributes.value("stem-thickness");
if (s)
if (!s.isNull())
sizeData.setStemThickness(s.toInt());
s = attributes.value("beam-thickness");
if (s)
if (!s.isNull())
sizeData.setBeamThickness(s.toInt());
s = attributes.value("stem-length");
if (s)
if (!s.isNull())
sizeData.setStemLength(s.toInt());
s = attributes.value("flag-spacing");
if (s)
if (!s.isNull())
sizeData.setFlagSpacing(s.toInt());
s = attributes.value("border-x");
if (s) {
if (!s.isNull()) {
std::cerr << "Warning: border-x attribute in note font mapping file is no longer supported\n(use hotspot-x for note head or flag)" << std::endl;
}
s = attributes.value("border-y");
if (s) {
if (!s.isNull()) {
std::cerr << "Warning: border-y attribute in note font mapping file is no longer supported" << std::endl;
}
int fontId = 0;
s = attributes.value("font-id");
if (s)
if (!s.isNull())
fontId = s.toInt();
s = attributes.value("font-height");
if (s)
if (!s.isNull())
sizeData.setFontHeight(fontId, s.toInt());
} else if (lcName == "font-scale") {
@ -250,7 +250,7 @@ NoteFontMap::startElement(const TQString &, const TQString &,
TQString s;
s = attributes.value("font-height");
if (s)
if (!s.isNull())
fontHeight = qstrtodouble(s);
else {
m_errorString = "font-height is a required attribute of font-scale";
@ -258,32 +258,32 @@ NoteFontMap::startElement(const TQString &, const TQString &,
}
s = attributes.value("staff-line-thickness");
if (s)
if (!s.isNull())
staffLineThickness = qstrtodouble(s);
s = attributes.value("leger-line-thickness");
if (s)
if (!s.isNull())
legerLineThickness = qstrtodouble(s);
s = attributes.value("stem-thickness");
if (s)
if (!s.isNull())
stemThickness = qstrtodouble(s);
s = attributes.value("beam-thickness");
if (s)
if (!s.isNull())
beamThickness = qstrtodouble(s);
s = attributes.value("stem-length");
if (s)
if (!s.isNull())
stemLength = qstrtodouble(s);
s = attributes.value("flag-spacing");
if (s)
if (!s.isNull())
flagSpacing = qstrtodouble(s);
int fontId = 0;
s = attributes.value("font-id");
if (s)
if (!s.isNull())
fontId = s.toInt();
//!!! need to be able to calculate max size -- checkFont needs
@ -389,7 +389,7 @@ NoteFontMap::startElement(const TQString &, const TQString &,
int icode = -1;
bool ok = false;
if (code) {
if (!code.isNull()) {
icode = code.stripWhiteSpace().toInt(&ok);
if (!ok || icode < 0) {
m_errorString =
@ -402,7 +402,7 @@ NoteFontMap::startElement(const TQString &, const TQString &,
int iglyph = -1;
ok = false;
if (glyph) {
if (!glyph.isNull()) {
iglyph = glyph.stripWhiteSpace().toInt(&ok);
if (!ok || iglyph < 0) {
m_errorString =
@ -417,15 +417,15 @@ NoteFontMap::startElement(const TQString &, const TQString &,
m_errorString = "symbol must have either src, code, or glyph attribute";
return false;
}
if (src)
if (!src.isNull())
symbolData.setSrc(qstrtostr(src));
TQString inversionSrc = attributes.value("inversion-src");
if (inversionSrc)
if (!inversionSrc.isNull())
symbolData.setInversionSrc(qstrtostr(inversionSrc));
TQString inversionCode = attributes.value("inversion-code");
if (inversionCode) {
if (!inversionCode.isNull()) {
icode = inversionCode.stripWhiteSpace().toInt(&ok);
if (!ok || icode < 0) {
m_errorString =
@ -437,7 +437,7 @@ NoteFontMap::startElement(const TQString &, const TQString &,
}
TQString inversionGlyph = attributes.value("inversion-glyph");
if (inversionGlyph) {
if (!inversionGlyph.isNull()) {
iglyph = inversionGlyph.stripWhiteSpace().toInt(&ok);
if (!ok || iglyph < 0) {
m_errorString =
@ -449,7 +449,7 @@ NoteFontMap::startElement(const TQString &, const TQString &,
}
TQString fontId = attributes.value("font-id");
if (fontId) {
if (!fontId.isNull()) {
int n = fontId.stripWhiteSpace().toInt(&ok);
if (!ok || n < 0) {
m_errorString =
@ -482,7 +482,7 @@ NoteFontMap::startElement(const TQString &, const TQString &,
TQString s = attributes.value("x");
double x = -1.0;
if (s)
if (!s.isNull())
x = qstrtodouble(s);
s = attributes.value("y");
@ -509,12 +509,12 @@ NoteFontMap::startElement(const TQString &, const TQString &,
TQString s = attributes.value("x");
int x = 0;
if (s)
if (!s.isNull())
x = s.toInt();
s = attributes.value("y");
int y = 0;
if (s)
if (!s.isNull())
y = s.toInt();
HotspotDataMap::iterator i = m_hotspots.find(m_hotspotCharName);
@ -541,7 +541,7 @@ NoteFontMap::startElement(const TQString &, const TQString &,
s = attributes.value("x");
int x = 0;
if (s)
if (!s.isNull())
x = s.toInt();
s = attributes.value("y");
@ -566,7 +566,7 @@ NoteFontMap::startElement(const TQString &, const TQString &,
TQString id = attributes.value("font-id");
int n = -1;
bool ok = false;
if (id) {
if (!id.isNull()) {
n = id.stripWhiteSpace().toInt(&ok);
if (!ok) {
m_errorString =
@ -582,8 +582,8 @@ NoteFontMap::startElement(const TQString &, const TQString &,
TQString name = attributes.value("name");
TQString names = attributes.value("names");
if (name) {
if (names) {
if (!name.isNull()) {
if (!names.isNull()) {
m_errorString = "font-requirement may have name or names attribute, but not both";
return false;
}
@ -595,11 +595,11 @@ NoteFontMap::startElement(const TQString &, const TQString &,
m_systemFontNames[n] = name;
delete font;
} else {
std::cerr << TQString("Warning: Unable to load font \"%1\"").tqarg(name) << std::endl;
std::cerr << TQString("Warning: Unable to load font \"%1\"").tqarg(name).ascii() << std::endl;
m_ok = false;
}
} else if (names) {
} else if (!names.isNull()) {
bool have = false;
TQStringList list = TQStringList::split(",", names, 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\"").
tqarg(names) << std::endl;
tqarg(names).ascii() << std::endl;
m_ok = false;
}
@ -627,7 +627,7 @@ NoteFontMap::startElement(const TQString &, const TQString &,
TQString s = attributes.value("strategy").lower();
SystemFont::Strategy strategy = SystemFont::PreferGlyphs;
if (s) {
if (!s.isNull()) {
if (s == "prefer-glyphs")
strategy = SystemFont::PreferGlyphs;
else if (s == "prefer-codes")
@ -637,7 +637,7 @@ NoteFontMap::startElement(const TQString &, const TQString &,
else if (s == "only-codes")
strategy = SystemFont::OnlyCodes;
else {
std::cerr << "Warning: Unknown strategy value " << s
std::cerr << "Warning: Unknown strategy value " << s.ascii()
<< " (known values are prefer-glyphs, prefer-codes,"
<< " only-glyphs, only-codes)" << std::endl;
}
@ -725,11 +725,11 @@ NoteFontMap::checkFile(int size, std::string &src) const
if (!pixmapFileLowerInfo.isReadable()) {
if (pixmapFileMixedName != pixmapFileLowerName) {
std::cerr << "Warning: Unable to open pixmap file "
<< pixmapFileMixedName << " or " << pixmapFileLowerName
<< pixmapFileMixedName.ascii() << " or " << pixmapFileLowerName.ascii()
<< std::endl;
} else {
std::cerr << "Warning: Unable to open pixmap file "
<< pixmapFileMixedName << std::endl;
<< pixmapFileMixedName.ascii() << std::endl;
}
return false;
} else {

@ -662,9 +662,9 @@ void NoteInserter::slotToggleDot()
Note note(m_noteType, m_noteDots);
TQString actionName(NotationStrings::getReferenceName(note));
actionName.replace(TQRegExp("-"), "_");
KAction *action = m_parentView->actionCollection()->action(actionName);
KAction *action = m_parentView->actionCollection()->action(actionName.ascii());
if (!action) {
std::cerr << "WARNING: No such action as " << actionName << std::endl;
std::cerr << "WARNING: No such action as " << actionName.ascii() << std::endl;
} else {
action->activate();
}
@ -690,9 +690,9 @@ 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);
KAction *action = m_parentView->actionCollection()->action(actionName.ascii());
if (!action) {
std::cerr << "WARNING: No such action as " << actionName << std::endl;
std::cerr << "WARNING: No such action as " << actionName.ascii() << std::endl;
} else {
action->activate();
}

@ -193,7 +193,7 @@ NotePixmapFactory::init(std::string fontName, int size)
m_style = NoteStyleFactory::getStyle(NoteStyleFactory::DefaultStyle);
} catch (NoteStyleFactory::StyleUnavailable u) {
KStartupLogo::hideIfStillThere();
KMessageBox::error(0, i18n(strtoqstr(u.getMessage())));
KMessageBox::error(0, i18n(strtoqstr(u.getMessage()).ascii()));
throw;
}
@ -1969,7 +1969,7 @@ NotePixmapFactory::makeNoteMenuPixmap(timeT duration,
if (triplet)
noteName = "3-" + noteName;
noteName = "menu-" + noteName;
return makeToolbarPixmap(noteName);
return makeToolbarPixmap(noteName.ascii());
}
TQCanvasPixmap *

@ -52,7 +52,7 @@ NoteStyleFactory::getAvailableStyleNames()
TQString styleDir = KGlobal::dirs()->findResource("appdata", "styles/");
TQDir dir(styleDir);
if (!dir.exists()) {
std::cerr << "NoteStyle::getAvailableStyleNames: directory \"" << styleDir
std::cerr << "NoteStyle::getAvailableStyleNames: directory \"" << styleDir.ascii()
<< "\" not found" << std::endl;
return names;
}

@ -81,7 +81,7 @@ NoteStyleFileReader::startElement(const TQString &, const TQString &,
if (lcName == "rosegarden-note-style") {
TQString s = attributes.value("base-style");
if (s) m_style->setBaseStyle(qstrtostr(s));
if (!s.isNull()) m_style->setBaseStyle(qstrtostr(s));
} else if (lcName == "note") {
@ -126,13 +126,13 @@ NoteStyleFileReader::setFromAttributes(Note::Type type,
bool haveShape = false;
s = attributes.value("tqshape");
if (s) {
if (!s.isNull()) {
m_style->setShape(type, qstrtostr(s.lower()));
haveShape = true;
}
s = attributes.value("charname");
if (s) {
if (!s.isNull()) {
if (haveShape) {
m_errorString = i18n("global and note elements may have tqshape "
"or charname attribute, but not both");
@ -143,16 +143,16 @@ NoteStyleFileReader::setFromAttributes(Note::Type type,
}
s = attributes.value("filled");
if (s) m_style->setFilled(type, s.lower() == "true");
if (!s.isNull()) m_style->setFilled(type, s.lower() == "true");
s = attributes.value("stem");
if (s) m_style->setStem(type, s.lower() == "true");
if (!s.isNull()) m_style->setStem(type, s.lower() == "true");
s = attributes.value("flags");
if (s) m_style->setFlagCount(type, s.toInt());
if (!s.isNull()) m_style->setFlagCount(type, s.toInt());
s = attributes.value("slashes");
if (s) m_style->setSlashCount(type, s.toInt());
if (!s.isNull()) m_style->setSlashCount(type, s.toInt());
NoteStyle::HFixPoint hfix;
NoteStyle::VFixPoint vfix;
@ -161,7 +161,7 @@ NoteStyleFileReader::setFromAttributes(Note::Type type,
bool haveVFix = false;
s = attributes.value("hfixpoint");
if (s) {
if (!s.isNull()) {
s = s.lower();
haveHFix = true;
if (s == "normal") hfix = NoteStyle::Normal;
@ -171,7 +171,7 @@ NoteStyleFileReader::setFromAttributes(Note::Type type,
}
s = attributes.value("vfixpoint");
if (s) {
if (!s.isNull()) {
s = s.lower();
haveVFix = true;
if (s == "near") vfix = NoteStyle::Near;

@ -128,9 +128,9 @@ void RestInserter::slotToggleDot()
Note note(m_noteType, m_noteDots);
TQString actionName(NotationStrings::getReferenceName(note, true));
actionName.replace(TQRegExp("-"), "_");
KAction *action = m_parentView->actionCollection()->action(actionName);
KAction *action = m_parentView->actionCollection()->action(actionName.ascii());
if (!action) {
std::cerr << "WARNING: No such action as " << actionName << std::endl;
std::cerr << "WARNING: No such action as " << actionName.ascii() << std::endl;
} else {
action->activate();
}
@ -141,7 +141,7 @@ void RestInserter::slotNotesSelected()
Note note(m_noteType, m_noteDots);
TQString actionName(NotationStrings::getReferenceName(note));
actionName.replace(TQRegExp(" "), "_");
m_parentView->actionCollection()->action(actionName)->activate();
m_parentView->actionCollection()->action(actionName.ascii())->activate();
}
const TQString RestInserter::ToolName = "restinserter";

@ -143,7 +143,7 @@ PlayList::slotDropped(TQDropEvent *event, TQListViewItem* after)
// okay, we have a URI.. process it
// weed out non-rg files
//
for (TQString url = uri.first(); url; url = uri.next()) {
for (TQString url = uri.first(); !url.isNull(); url = uri.next()) {
if (url.right(3).lower() == ".rg")
new PlayListViewItem(m_listView, after, KURL(url));

@ -26,6 +26,8 @@
#ifndef _RG_AUDIOPREVIEWUPDATER_H_
#define _RG_AUDIOPREVIEWUPDATER_H_
#include <stdint.h>
#include <tqobject.h>
#include <tqrect.h>
#include <vector>

@ -55,7 +55,7 @@ const Rosegarden::Clef clefIndexToClef(int index)
const int clefNameToClefIndex(TQString s)
{
int m_elClef = 0;
if (s) {
if (!s.isNull()) {
if (s == "treble")
m_elClef = TrebleClef;
else if (s == "bass")

@ -1117,7 +1117,7 @@ EditView::createInsertPitchActionMenu()
(flat.tqarg(notePitchNames[i]),
CTRL + SHIFT + notePitchKeys[octave][i],
TQT_TQOBJECT(this), TQT_SLOT(slotInsertNoteFromAction()), actionCollection(),
TQString("insert_%1_flat%2").tqarg(i).tqarg(octaveSuffix));
TQString("insert_%1_flat%2").tqarg(i).tqarg(octaveSuffix).ascii());
menu->insert(insertPitchAction);
}
@ -1127,7 +1127,7 @@ EditView::createInsertPitchActionMenu()
(notePitchNames[i],
notePitchKeys[octave][i],
TQT_TQOBJECT(this), TQT_SLOT(slotInsertNoteFromAction()), actionCollection(),
TQString("insert_%1%2").tqarg(i).tqarg(octaveSuffix));
TQString("insert_%1%2").tqarg(i).tqarg(octaveSuffix).ascii());
menu->insert(insertPitchAction);
@ -1140,7 +1140,7 @@ EditView::createInsertPitchActionMenu()
(sharp.tqarg(notePitchNames[i]),
SHIFT + notePitchKeys[octave][i],
TQT_TQOBJECT(this), TQT_SLOT(slotInsertNoteFromAction()), actionCollection(),
TQString("insert_%1_sharp%2").tqarg(i).tqarg(octaveSuffix));
TQString("insert_%1_sharp%2").tqarg(i).tqarg(octaveSuffix).ascii());
menu->insert(insertPitchAction);
}

@ -704,7 +704,7 @@ MultiViewCommandHistory* EditViewBase::getCommandHistory()
KToggleAction* EditViewBase::getToggleAction(const TQString& actionName)
{
return dynamic_cast<KToggleAction*>(actionCollection()->action(actionName));
return dynamic_cast<KToggleAction*>(actionCollection()->action(actionName.ascii()));
}
}

@ -129,7 +129,7 @@ PresetGroup::startElement(const TQString &, const TQString &,
if (lcName == "category") {
TQString s = attributes.value("name");
if (s) {
if (!s.isNull()) {
m_elCategoryName = s;
// increment the current category number
m_lastCategory = m_currentCategory;
@ -151,7 +151,7 @@ PresetGroup::startElement(const TQString &, const TQString &,
} else if (lcName == "instrument") {
TQString s = attributes.value("name");
if (s) {
if (!s.isNull()) {
m_elInstrumentName = s;
m_name = true;
@ -162,13 +162,13 @@ PresetGroup::startElement(const TQString &, const TQString &,
} else if (lcName == "clef") {
TQString s = attributes.value("type");
if (s) {
if (!s.isNull()) {
m_elClef = clefNameToClefIndex(s);
m_clef = true;
}
} else if (lcName == "transpose") {
TQString s = attributes.value("value");
if (s) {
if (!s.isNull()) {
m_elTranspose = s.toInt();
m_transpose = true;
}
@ -178,13 +178,13 @@ PresetGroup::startElement(const TQString &, const TQString &,
if (s == "amateur") {
s = attributes.value("low");
if (s) {
if (!s.isNull()) {
m_elLowAm = s.toInt();
m_amateur = true;
}
s = attributes.value("high");
if (s && m_amateur) {
if (!s.isNull() && m_amateur) {
m_elHighAm = s.toInt();
} else {
return false;
@ -192,13 +192,13 @@ PresetGroup::startElement(const TQString &, const TQString &,
} else if (s == "professional") {
s = attributes.value("low");
if (s) {
if (!s.isNull()) {
m_pro = true;
m_elLowPro = s.toInt();
}
s = attributes.value("high");
if (s && m_pro) {
if (!s.isNull() && m_pro) {
m_elHighPro = s.toInt();
} else {
return false;

@ -82,13 +82,13 @@ QCanvasSimpleSprite::~QCanvasSimpleSprite()
TQCanvasPixmapArray*
QCanvasSimpleSprite::makePixmapArray(TQPixmap *pixmap)
{
TQList<TQPixmap> pixlist;
TQPtrList<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);
TQList<TQPoint> spotlist;
TQPtrList<TQPoint> spotlist;
spotlist.setAutoDelete(true);
spotlist.append(new TQPoint(0, 0));
@ -98,13 +98,13 @@ QCanvasSimpleSprite::makePixmapArray(TQPixmap *pixmap)
TQCanvasPixmapArray*
QCanvasSimpleSprite::makePixmapArray(TQCanvasPixmap *pixmap)
{
TQList<TQPixmap> pixlist;
TQPtrList<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);
TQList<TQPoint> spotlist;
TQPtrList<TQPoint> spotlist;
spotlist.setAutoDelete(true);
spotlist.append(new TQPoint(pixmap->offsetX(), pixmap->offsetY()));

@ -204,14 +204,14 @@ void ControlBlockMmapper::setFileSize(size_t size)
// (seek() to wanted size, then write a byte)
//
if (::lseek(m_fd, size - 1, SEEK_SET) == -1) {
std::cerr << "WARNING: ControlBlockMmapper : Couldn't lseek in " << m_fileName
std::cerr << "WARNING: ControlBlockMmapper : Couldn't lseek in " << m_fileName.ascii()
<< " to " << size << std::endl;
throw Exception("lseek failed");
}
if (::write(m_fd, "\0", 1) != 1) {
std::cerr << "WARNING: ControlBlockMmapper : Couldn't write byte in "
<< m_fileName << std::endl;
<< m_fileName.ascii() << std::endl;
throw Exception("write failed");
}

@ -186,13 +186,13 @@ void SegmentMmapper::setFileSize(size_t size)
//
if (::lseek(m_fd, size - 1, SEEK_SET) == -1) {
std::cerr << "WARNING: SegmentMmapper : Couldn't lseek in "
<< m_fileName << " to " << size << std::endl;
<< m_fileName.ascii() << " to " << size << std::endl;
throw Exception("lseek failed");
}
if (::write(m_fd, "\0", 1) != 1) {
std::cerr << "WARNING: SegmentMmapper : Couldn't write byte in "
<< m_fileName << std::endl;
<< m_fileName.ascii() << std::endl;
throw Exception("write failed");
}

@ -1124,7 +1124,7 @@ SequenceManager::processAsynchronousMidi(const MappedComposition &mC,
// the error you can't hear
KMessageBox::information(0, message);
} else {
std::cerr << message << std::endl;
std::cerr << message.ascii() << std::endl;
}
#endif
@ -1421,7 +1421,7 @@ void
SequenceManager::sendAudioLevel(MappedEvent *mE)
{
RosegardenGUIView *v;
TQList<RosegardenGUIView>& viewList = m_doc->getViewList();
TQPtrList<RosegardenGUIView>& viewList = m_doc->getViewList();
for (v = viewList.first(); v != 0; v = viewList.next()) {
v->showVisuals(mE);
@ -1482,7 +1482,7 @@ void
SequenceManager::sendMIDIRecordingDevice(const TQString recordDeviceStr)
{
if (recordDeviceStr) {
if (!recordDeviceStr.isNull()) {
int recordDevice = recordDeviceStr.toInt();
if (recordDevice >= 0) {

@ -184,7 +184,7 @@ AudioMixerWindow::AudioMixerWindow(TQWidget *parent,
new KRadioAction(i18n("1 Input", "%n Inputs", i),
0, TQT_TQOBJECT(this),
TQT_SLOT(slotSetInputCountFromAction()), actionCollection(),
TQString("inputs_%1").tqarg(i));
TQString("inputs_%1").tqarg(i).ascii());
action->setExclusiveGroup("inputs");
if (i == int(m_studio->getRecordIns().size()))
action->setChecked(true);
@ -194,7 +194,7 @@ AudioMixerWindow::AudioMixerWindow(TQWidget *parent,
(i18n("No Submasters"),
0, TQT_TQOBJECT(this),
TQT_SLOT(slotSetSubmasterCountFromAction()), actionCollection(),
TQString("submasters_0"));
TQString("submasters_0").ascii());
action->setExclusiveGroup("submasters");
action->setChecked(true);
@ -203,7 +203,7 @@ AudioMixerWindow::AudioMixerWindow(TQWidget *parent,
(i18n("1 Submaster", "%n Submasters", i),
0, TQT_TQOBJECT(this),
TQT_SLOT(slotSetSubmasterCountFromAction()), actionCollection(),
TQString("submasters_%1").tqarg(i));
TQString("submasters_%1").tqarg(i).ascii());
action->setExclusiveGroup("submasters");
if (i == int(m_studio->getBusses().size()) - 1)
action->setChecked(true);

@ -164,13 +164,13 @@ AudioPluginOSCGUI::setGUIUrl(TQString url)
if (m_address)
lo_address_free(m_address);
char *host = lo_url_get_hostname(url);
char *port = lo_url_get_port(url);
char *host = lo_url_get_hostname(url.ascii());
char *port = lo_url_get_port(url.ascii());
m_address = lo_address_new(host, port);
free(host);
free(port);
m_basePath = lo_url_get_path(url);
m_basePath = lo_url_get_path(url.ascii());
}
void
@ -181,7 +181,7 @@ AudioPluginOSCGUI::show()
if (!m_address)
return ;
TQString path = m_basePath + "/show";
lo_send(m_address, path, "");
lo_send(m_address, path.ascii(), "");
}
void
@ -190,7 +190,7 @@ AudioPluginOSCGUI::hide()
if (!m_address)
return ;
TQString path = m_basePath + "/hide";
lo_send(m_address, path, "");
lo_send(m_address, path.ascii(), "");
}
void
@ -199,7 +199,7 @@ AudioPluginOSCGUI::quit()
if (!m_address)
return ;
TQString path = m_basePath + "/quit";
lo_send(m_address, path, "");
lo_send(m_address, path.ascii(), "");
}
void
@ -208,7 +208,7 @@ AudioPluginOSCGUI::sendProgram(int bank, int program)
if (!m_address)
return ;
TQString path = m_basePath + "/program";
lo_send(m_address, path, "ii", bank, program);
lo_send(m_address, path.ascii(), "ii", bank, program);
}
void
@ -217,7 +217,7 @@ AudioPluginOSCGUI::sendPortValue(int port, float value)
if (!m_address)
return ;
TQString path = m_basePath + "/control";
lo_send(m_address, path, "if", port, value);
lo_send(m_address, path.ascii(), "if", port, value);
}
void
@ -226,7 +226,7 @@ AudioPluginOSCGUI::sendConfiguration(TQString key, TQString value)
if (!m_address)
return ;
TQString path = m_basePath + "/configure";
lo_send(m_address, path, "ss", key.data(), value.data());
lo_send(m_address, path.ascii(), "ss", key.ascii(), value.ascii());
}
}

@ -146,7 +146,7 @@ AudioPluginOSCGUIManager::hasGUI(InstrumentId instrument, int position)
try {
TQString filePath = AudioPluginOSCGUI::getGUIFilePath
(strtoqstr(pluginInstance->getIdentifier()));
return (filePath && filePath != "");
return (!filePath.isNull() && filePath != "");
} catch (Exception e) { // that's OK
return false;
}

@ -343,7 +343,7 @@ DeviceEditorDialog::getDeviceIdAt(int row) // -1 for new device w/o an id yet
TQString number = re.cap(1);
int id = -1;
if (number && number != "")
if (!number.isNull() && number != "")
{
id = number.toInt() - 1; // displayed device numbers are 1-based
}

@ -118,7 +118,7 @@ NameSetEditor::NameSetEditor(BankEditorDialog* bankEditor,
if (showEntryButtons) {
TQPushButton *button = new TQPushButton("", numBox, numberText);
TQPushButton *button = new TQPushButton("", numBox, numberText.ascii());
button->setMaximumWidth(40);
button->setMaximumHeight(20);
button->setFlat(true);
@ -127,7 +127,7 @@ NameSetEditor::NameSetEditor(BankEditorDialog* bankEditor,
m_entryButtons.push_back(button);
}
KLineEdit* lineEdit = new KLineEdit(numBox, numberText);
KLineEdit* lineEdit = new KLineEdit(numBox, numberText.ascii());
lineEdit->setMinimumWidth(110);
lineEdit->setCompletionMode(KGlobalSettings::CompletionAuto);
lineEdit->setCompletionObject(&m_completion);

@ -42,7 +42,7 @@ TQString HSpinBox::mapValueToText(int j)
int HSpinBox::mapTextToValue( bool* ok )
{
*ok = true;
float f = atof(text());
float f = atof(text().ascii());
return int(f * m_scaleFactor);
}

@ -64,12 +64,12 @@ QuantizeParameters::QuantizeParameters(TQWidget *parent,
(BasicQuantizer::getStandardQuantizations())
{
m_mainLayout = new TQGridLayout(this,
preamble ? 3 : 4, 2,
preamble ? 10 : 0,
preamble ? 5 : 4);
(!preamble.isNull()) ? 3 : 4, 2,
(!preamble.isNull()) ? 10 : 0,
(!preamble.isNull()) ? 5 : 4);
int zero = 0;
if (preamble) {
if (!preamble.isNull()) {
TQLabel *label = new TQLabel(preamble, this);
label->tqsetAlignment(TQt::WordBreak);
m_mainLayout->addMultiCellWidget(label, 0, 0, 0, 1);
@ -168,7 +168,7 @@ QuantizeParameters::QuantizeParameters(TQWidget *parent,
m_postProcessingBox = new TQGroupBox
(1, Qt::Horizontal, i18n("After quantization"), this);
if (preamble) {
if (!preamble.isNull()) {
m_mainLayout->addMultiCellWidget(m_postProcessingBox,
zero, zero + 1,
1, 1);
@ -217,7 +217,7 @@ QuantizeParameters::QuantizeParameters(TQWidget *parent,
int defaultSwing = 0;
int defaultIterate = 100;
if (m_configCategory) {
if (!m_configCategory.isNull()) {
KConfig *config = kapp->config();
config->setGroup(m_configCategory);
defaultType =
@ -267,7 +267,7 @@ QuantizeParameters::QuantizeParameters(TQWidget *parent,
advanced = false;
}
if (preamble || advanced) {
if (!preamble.isNull() || advanced) {
m_postProcessingBox->show();
} else {
m_postProcessingBox->hide();
@ -412,7 +412,7 @@ QuantizeParameters::getQuantizer() const
quantizer = nq;
}
if (m_configCategory) {
if (!m_configCategory.isNull()) {
KConfig *config = kapp->config();
config->setGroup(m_configCategory);
config->writeEntry("quantizetype", type);

@ -454,7 +454,7 @@ AudioFileManager::getFileInPath(const std::string &file)
return searchFile.latin1();
std::cout << "AudioFileManager::getFileInPath - "
<< "searchInfo = " << searchFile << std::endl;
<< "searchInfo = " << searchFile.ascii() << std::endl;
return "";
}
@ -655,7 +655,7 @@ AudioFileManager::importURL(const KURL &url, int sampleRate)
{
if (url.isLocalFile()) return importFile(url.path().ascii(), sampleRate);
std::cerr << "AudioFileManager::importURL("<< url.prettyURL() << ", " << sampleRate << ")" << std::endl;
std::cerr << "AudioFileManager::importURL("<< url.prettyURL().ascii() << ", " << sampleRate << ")" << std::endl;
emit setOperationName(i18n("Downloading file %1").tqarg(url.prettyURL()));

@ -913,7 +913,7 @@ AudioInstrumentMixer::setPlugin(InstrumentId id, int position, TQString identifi
{
// Not RT safe
std::cerr << "AudioInstrumentMixer::setPlugin(" << id << ", " << position << ", " << identifier << ")" << std::endl;
std::cerr << "AudioInstrumentMixer::setPlugin(" << id << ", " << position << ", " << identifier.ascii() << ")" << std::endl;
int channels = 2;
if (m_bufferMap.find(id) != m_bufferMap.end()) {
@ -938,7 +938,7 @@ AudioInstrumentMixer::setPlugin(InstrumentId id, int position, TQString identifi
}
} else {
std::cerr << "AudioInstrumentMixer::setPlugin: No factory for identifier "
<< identifier << std::endl;
<< identifier.ascii() << std::endl;
}
RunnablePluginInstance *oldInstance = 0;

@ -193,7 +193,7 @@ DSSIPluginFactory::getDSSIDescriptor(TQString identifier)
if (m_libraryHandles.find(soname) == m_libraryHandles.end()) {
loadLibrary(soname);
if (m_libraryHandles.find(soname) == m_libraryHandles.end()) {
std::cerr << "WARNING: DSSIPluginFactory::getDSSIDescriptor: loadLibrary failed for " << soname << std::endl;
std::cerr << "WARNING: DSSIPluginFactory::getDSSIDescriptor: loadLibrary failed for " << soname.ascii() << std::endl;
return 0;
}
}
@ -204,7 +204,7 @@ DSSIPluginFactory::getDSSIDescriptor(TQString identifier)
dlsym(libraryHandle, "dssi_descriptor");
if (!fn) {
std::cerr << "WARNING: DSSIPluginFactory::getDSSIDescriptor: No descriptor function in library " << soname << std::endl;
std::cerr << "WARNING: DSSIPluginFactory::getDSSIDescriptor: No descriptor function in library " << soname.ascii() << std::endl;
return 0;
}
@ -217,7 +217,7 @@ DSSIPluginFactory::getDSSIDescriptor(TQString identifier)
++index;
}
std::cerr << "WARNING: DSSIPluginFactory::getDSSIDescriptor: No such plugin as " << label << " in library " << soname << std::endl;
std::cerr << "WARNING: DSSIPluginFactory::getDSSIDescriptor: No such plugin as " << label.ascii() << " in library " << soname.ascii() << std::endl;
return 0;
}
@ -300,7 +300,7 @@ DSSIPluginFactory::discoverPlugins(TQString soName)
if (!libraryHandle) {
std::cerr << "WARNING: DSSIPluginFactory::discoverPlugins: couldn't dlopen "
<< soName << " - " << dlerror() << std::endl;
<< soName.ascii() << " - " << dlerror() << std::endl;
return ;
}
@ -308,7 +308,7 @@ DSSIPluginFactory::discoverPlugins(TQString soName)
dlsym(libraryHandle, "dssi_descriptor");
if (!fn) {
std::cerr << "WARNING: DSSIPluginFactory::discoverPlugins: No descriptor function in " << soName << std::endl;
std::cerr << "WARNING: DSSIPluginFactory::discoverPlugins: No descriptor function in " << soName.ascii() << std::endl;
return ;
}
@ -319,7 +319,7 @@ DSSIPluginFactory::discoverPlugins(TQString soName)
const LADSPA_Descriptor * ladspaDescriptor = descriptor->LADSPA_Plugin;
if (!ladspaDescriptor) {
std::cerr << "WARNING: DSSIPluginFactory::discoverPlugins: No LADSPA descriptor for plugin " << index << " in " << soName << std::endl;
std::cerr << "WARNING: DSSIPluginFactory::discoverPlugins: No LADSPA descriptor for plugin " << index << " in " << soName.ascii() << std::endl;
++index;
continue;
}

@ -622,7 +622,7 @@ DSSIPluginInstance::activate()
}
}
if (m_program) {
if (!m_program.isNull()) {
#ifdef DEBUG_DSSI
std::cerr << "DSSIPluginInstance::activate: restoring program " << m_program << std::endl;
#endif

@ -73,7 +73,7 @@ LADSPAPluginFactory::enumeratePlugins(MappedObjectPropertyList &list)
const LADSPA_Descriptor *descriptor = getLADSPADescriptor(*i);
if (!descriptor) {
std::cerr << "WARNING: LADSPAPluginFactory::enumeratePlugins: couldn't get descriptor for identifier " << *i << std::endl;
std::cerr << "WARNING: LADSPAPluginFactory::enumeratePlugins: couldn't get descriptor for identifier " << (*i).ascii() << std::endl;
continue;
}
@ -475,7 +475,7 @@ LADSPAPluginFactory::getLADSPADescriptor(TQString identifier)
if (m_libraryHandles.find(soname) == m_libraryHandles.end()) {
loadLibrary(soname);
if (m_libraryHandles.find(soname) == m_libraryHandles.end()) {
std::cerr << "WARNING: LADSPAPluginFactory::getLADSPADescriptor: loadLibrary failed for " << soname << std::endl;
std::cerr << "WARNING: LADSPAPluginFactory::getLADSPADescriptor: loadLibrary failed for " << soname.ascii() << std::endl;
return 0;
}
}
@ -486,7 +486,7 @@ LADSPAPluginFactory::getLADSPADescriptor(TQString identifier)
dlsym(libraryHandle, "ladspa_descriptor");
if (!fn) {
std::cerr << "WARNING: LADSPAPluginFactory::getLADSPADescriptor: No descriptor function in library " << soname << std::endl;
std::cerr << "WARNING: LADSPAPluginFactory::getLADSPADescriptor: No descriptor function in library " << soname.ascii() << std::endl;
return 0;
}
@ -499,7 +499,7 @@ LADSPAPluginFactory::getLADSPADescriptor(TQString identifier)
++index;
}
std::cerr << "WARNING: LADSPAPluginFactory::getLADSPADescriptor: No such plugin as " << label << " in library " << soname << std::endl;
std::cerr << "WARNING: LADSPAPluginFactory::getLADSPADescriptor: No such plugin as " << label.ascii() << " in library " << soname.ascii() << std::endl;
return 0;
}
@ -623,7 +623,7 @@ LADSPAPluginFactory::discoverPlugins()
<< "discovering plugins; path is ";
for (std::vector<TQString>::iterator i = pathList.begin();
i != pathList.end(); ++i) {
std::cerr << "[" << *i << "] ";
std::cerr << "[" << (*i).ascii() << "] ";
}
std::cerr << std::endl;
@ -684,7 +684,7 @@ LADSPAPluginFactory::discoverPlugins(TQString soName)
if (!libraryHandle) {
std::cerr << "WARNING: LADSPAPluginFactory::discoverPlugins: couldn't dlopen "
<< soName << " - " << dlerror() << std::endl;
<< soName.ascii() << " - " << dlerror() << std::endl;
return ;
}
@ -692,7 +692,7 @@ LADSPAPluginFactory::discoverPlugins(TQString soName)
dlsym(libraryHandle, "ladspa_descriptor");
if (!fn) {
std::cerr << "WARNING: LADSPAPluginFactory::discoverPlugins: No descriptor function in " << soName << std::endl;
std::cerr << "WARNING: LADSPAPluginFactory::discoverPlugins: No descriptor function in " << soName.ascii() << std::endl;
return ;
}

@ -1410,7 +1410,7 @@ MappedPluginSlot::setProperty(const MappedObjectProperty &property,
// populate myself and my ports
PluginFactory *factory = PluginFactory::instanceFor(m_identifier);
if (!factory) {
std::cerr << "WARNING: MappedPluginSlot::setProperty(identifier): No plugin factory for identifier " << m_identifier << "!" << std::endl;
std::cerr << "WARNING: MappedPluginSlot::setProperty(identifier): No plugin factory for identifier " << m_identifier.ascii() << "!" << std::endl;
m_identifier = "";
return ;
}
@ -1489,7 +1489,7 @@ MappedPluginSlot::setPropertyList(const MappedObjectProperty &property,
studio->getSoundDriver()->configurePlugin(m_instrument,
m_position,
key, value);
if (rv && rv != "") {
if (!rv.isNull() && rv != "") {
throw(rv);
}
}

@ -51,7 +51,7 @@ PluginFactory::instance(TQString pluginType)
if (pluginType == "ladspa") {
#ifdef HAVE_LADSPA
if (!_ladspaInstance) {
std::cerr << "PluginFactory::instance(" << pluginType
std::cerr << "PluginFactory::instance(" << pluginType.ascii()
<< "): creating new LADSPAPluginFactory" << std::endl;
_ladspaInstance = new LADSPAPluginFactory();
_ladspaInstance->discoverPlugins();
@ -65,7 +65,7 @@ PluginFactory::instance(TQString pluginType)
} else if (pluginType == "dssi") {
#ifdef HAVE_DSSI
if (!_dssiInstance) {
std::cerr << "PluginFactory::instance(" << pluginType
std::cerr << "PluginFactory::instance(" << pluginType.ascii()
<< "): creating new DSSIPluginFactory" << std::endl;
_dssiInstance = new DSSIPluginFactory();
_dssiInstance->discoverPlugins();

Loading…
Cancel
Save