Rename old tq methods that no longer need a unique name

pull/1/head
Timothy Pearson 13 years ago
parent 6ca08e7a88
commit ef13416bfc

@ -799,8 +799,8 @@ public:
return m_refreshStatusArray.getNewRefreshStatusId(); return m_refreshStatusArray.getNewRefreshStatusId();
} }
RefreshtqStatus& getRefreshtqStatus(unsigned int id) { RefreshStatus& getRefreshStatus(unsigned int id) {
return m_refreshStatusArray.getRefreshtqStatus(id); return m_refreshStatusArray.getRefreshStatus(id);
} }
/// Set all refresh statuses to true /// Set all refresh statuses to true
@ -989,7 +989,7 @@ protected:
bool m_playMetronome; bool m_playMetronome;
bool m_recordMetronome; bool m_recordMetronome;
RefreshStatusArray<RefreshtqStatus> m_refreshStatusArray; RefreshStatusArray<RefreshStatus> m_refreshStatusArray;
// User defined markers in the composition // User defined markers in the composition
// //

@ -82,7 +82,7 @@ public:
virtual void finishLayout(timeT startTime = 0, virtual void finishLayout(timeT startTime = 0,
timeT endTime = 0) = 0; timeT endTime = 0) = 0;
unsigned int gettqStatus() const { return m_status; } unsigned int getStatus() const { return m_status; }
protected: protected:
unsigned int m_status; unsigned int m_status;

@ -26,10 +26,10 @@
namespace Rosegarden namespace Rosegarden
{ {
class RefreshtqStatus class RefreshStatus
{ {
public: public:
RefreshtqStatus() : m_needsRefresh(true) {} RefreshStatus() : m_needsRefresh(true) {}
bool needsRefresh() { return m_needsRefresh; } bool needsRefresh() { return m_needsRefresh; }
void setNeedsRefresh(bool s) { m_needsRefresh = s; } void setNeedsRefresh(bool s) { m_needsRefresh = s; }
@ -44,7 +44,7 @@ class RefreshStatusArray
public: public:
unsigned int getNewRefreshStatusId(); unsigned int getNewRefreshStatusId();
size_t size() { return m_refreshStatuses.size(); } size_t size() { return m_refreshStatuses.size(); }
RS& getRefreshtqStatus(unsigned int id) { return m_refreshStatuses[id]; } RS& getRefreshStatus(unsigned int id) { return m_refreshStatuses[id]; }
void updateRefreshStatuses(); void updateRefreshStatuses();
protected: protected:

@ -352,7 +352,7 @@ void
Segment::updateRefreshStatuses(timeT startTime, timeT endTime) Segment::updateRefreshStatuses(timeT startTime, timeT endTime)
{ {
for(unsigned int i = 0; i < m_refreshStatusArray.size(); ++i) for(unsigned int i = 0; i < m_refreshStatusArray.size(); ++i)
m_refreshStatusArray.getRefreshtqStatus(i).push(startTime, endTime); m_refreshStatusArray.getRefreshStatus(i).push(startTime, endTime);
} }
@ -1269,7 +1269,7 @@ SegmentHelper::~SegmentHelper() { }
void void
SegmentRefreshtqStatus::push(timeT from, timeT to) SegmentRefreshStatus::push(timeT from, timeT to)
{ {
if (!needsRefresh()) { // don't do anything subtle - just erase the old data if (!needsRefresh()) { // don't do anything subtle - just erase the old data

@ -37,10 +37,10 @@
namespace Rosegarden namespace Rosegarden
{ {
class SegmentRefreshtqStatus : public RefreshtqStatus class SegmentRefreshStatus : public RefreshStatus
{ {
public: public:
SegmentRefreshtqStatus() : m_from(0), m_to(0) {} SegmentRefreshStatus() : m_from(0), m_to(0) {}
void push(timeT from, timeT to); void push(timeT from, timeT to);
@ -616,8 +616,8 @@ public:
return m_refreshStatusArray.getNewRefreshStatusId(); return m_refreshStatusArray.getNewRefreshStatusId();
} }
SegmentRefreshtqStatus &getRefreshtqStatus(unsigned int id) { SegmentRefreshStatus &getRefreshStatus(unsigned int id) {
return m_refreshStatusArray.getRefreshtqStatus(id); return m_refreshStatusArray.getRefreshStatus(id);
} }
void updateRefreshStatuses(timeT startTime, timeT endTime); void updateRefreshStatuses(timeT startTime, timeT endTime);
@ -657,7 +657,7 @@ private:
int m_highestPlayable; // suggestion for highest playable note (notation) int m_highestPlayable; // suggestion for highest playable note (notation)
int m_lowestPlayable; // suggestion for lowest playable note (notation) int m_lowestPlayable; // suggestion for lowest playable note (notation)
RefreshStatusArray<SegmentRefreshtqStatus> m_refreshStatusArray; RefreshStatusArray<SegmentRefreshStatus> m_refreshStatusArray;
struct ClefKeyCmp { struct ClefKeyCmp {
bool operator()(const Event *e1, const Event *e2) const; bool operator()(const Event *e1, const Event *e2) const;

@ -239,7 +239,7 @@ void RosegardenGUIDoc::setModified(bool m)
RG_DEBUG << "RosegardenGUIDoc[" << this << "]::setModified(" << m << ")\n"; RG_DEBUG << "RosegardenGUIDoc[" << this << "]::setModified(" << m << ")\n";
} }
void RosegardenGUIDoc::clearModifiedtqStatus() void RosegardenGUIDoc::clearModifiedStatus()
{ {
setModified(false); setModified(false);
setAutoSaved(true); setAutoSaved(true);
@ -1612,7 +1612,7 @@ RosegardenGUIDoc::xmlParse(TQString fileContents, TQString &errMsg,
} else { } else {
if (getSequenceManager() && if (getSequenceManager() &&
!(getSequenceManager()->getSoundDrivertqStatus() & AUDIO_OK)) { !(getSequenceManager()->getSoundDriverStatus() & AUDIO_OK)) {
KStartupLogo::hideIfStillThere(); KStartupLogo::hideIfStillThere();
CurrentProgressDialog::freeze(); CurrentProgressDialog::freeze();

@ -147,7 +147,7 @@ protected:
* action on the view connected to the document. * action on the view connected to the document.
* *
* this is just an accessor, other components should call * this is just an accessor, other components should call
* slotDocumentModified() and clearModifiedtqStatus() instead of * slotDocumentModified() and clearModifiedStatus() instead of
* this method, which perform all the related housework. * this method, which perform all the related housework.
* *
*/ */
@ -164,7 +164,7 @@ public:
* clears the 'modified' status of the document (sets it back to false). * clears the 'modified' status of the document (sets it back to false).
* *
*/ */
void clearModifiedtqStatus(); void clearModifiedStatus();
/** /**
* "save modified" - asks the user for saving if the document is * "save modified" - asks the user for saving if the document is

@ -1992,16 +1992,16 @@ LilyPondExporter::writeBar(Segment *s,
str << "c:" << barreStart << "-" << barreEnd << "-" << barreFret << ";"; str << "c:" << barreStart << "-" << barreEnd << "-" << barreFret << ";";
} }
if (fingering.getStringtqStatus( 6-stringNum ) == Guitar::Fingering::MUTED) { if (fingering.getStringStatus( 6-stringNum ) == Guitar::Fingering::MUTED) {
str << stringNum << "-x;"; str << stringNum << "-x;";
} else if (fingering.getStringtqStatus( 6-stringNum ) == Guitar::Fingering::OPEN) { } else if (fingering.getStringStatus( 6-stringNum ) == Guitar::Fingering::OPEN) {
str << stringNum << "-o;"; str << stringNum << "-o;";
} else { } else {
int stringtqStatus = fingering.getStringtqStatus(6-stringNum); int stringStatus = fingering.getStringStatus(6-stringNum);
if ((stringNum <= barreStart) && (stringNum >= barreEnd)) { if ((stringNum <= barreStart) && (stringNum >= barreEnd)) {
str << stringNum << "-" << barreFret << ";"; str << stringNum << "-" << barreFret << ";";
} else { } else {
str << stringNum << "-" << stringtqStatus << ";"; str << stringNum << "-" << stringStatus << ";";
} }
} }
} }

@ -69,7 +69,7 @@ RG21Loader::RG21Loader(Studio *studio,
m_currentClef(Clef::Treble), m_currentClef(Clef::Treble),
m_currentInstrumentId(MidiInstrumentBase), m_currentInstrumentId(MidiInstrumentBase),
m_inGroup(false), m_inGroup(false),
m_tietqStatus(0), m_tieStatus(0),
m_nbStaves(0) m_nbStaves(0)
{} {}
@ -173,10 +173,10 @@ bool RG21Loader::parseChordItem()
noteEvent->set noteEvent->set
<Int>(PITCH, pitch); <Int>(PITCH, pitch);
if (m_tietqStatus == 1) { if (m_tieStatus == 1) {
noteEvent->set noteEvent->set
<Bool>(TIED_FORWARD, true); <Bool>(TIED_FORWARD, true);
} else if (m_tietqStatus == 2) { } else if (m_tieStatus == 2) {
noteEvent->set noteEvent->set
<Bool>(TIED_BACKWARD, true); <Bool>(TIED_BACKWARD, true);
} }
@ -199,10 +199,10 @@ bool RG21Loader::parseChordItem()
} }
m_currentSegmentTime += duration; m_currentSegmentTime += duration;
if (m_tietqStatus == 2) if (m_tieStatus == 2)
m_tietqStatus = 0; m_tieStatus = 0;
else if (m_tietqStatus == 1) else if (m_tieStatus == 1)
m_tietqStatus = 2; m_tieStatus = 2;
return true; return true;
} }
@ -348,13 +348,13 @@ bool RG21Loader::parseIndicationStart()
if (indicationType == "tie") { if (indicationType == "tie") {
if (m_tietqStatus != 0) { if (m_tieStatus != 0) {
RG_DEBUG RG_DEBUG
<< "RG21Loader:: parseIndicationStart: WARNING: Found tie within " << "RG21Loader:: parseIndicationStart: WARNING: Found tie within "
<< "tie, ignoring" << endl; << "tie, ignoring" << endl;
return true; return true;
} }
// m_tietqStatus = 1; // m_tieStatus = 1;
Segment::iterator i = m_currentSegment->end(); Segment::iterator i = m_currentSegment->end();
if (i != m_currentSegment->begin()) { if (i != m_currentSegment->begin()) {
@ -368,7 +368,7 @@ bool RG21Loader::parseIndicationStart()
--i; --i;
} }
} }
m_tietqStatus = 2; m_tieStatus = 2;
RG_DEBUG << "rg21io: Indication start: it's a tie" << endl; RG_DEBUG << "rg21io: Indication start: it's a tie" << endl;

@ -145,7 +145,7 @@ protected:
int m_groupUntupledLength; int m_groupUntupledLength;
int m_groupUntupledCount; int m_groupUntupledCount;
int m_tietqStatus; // 0 -> none, 1 -> tie started, 2 -> seen one note int m_tieStatus; // 0 -> none, 1 -> tie started, 2 -> seen one note
TQString m_currentLine; TQString m_currentLine;
TQString m_currentStaffName; TQString m_currentStaffName;

@ -44,7 +44,7 @@ typedef enum
STARTING_TO_RECORD, STARTING_TO_RECORD,
RECORDING_ARMED, // gui only state RECORDING_ARMED, // gui only state
TQUIT TQUIT
} TransporttqStatus; } TransportStatus;
#endif // _ROSEGARDEN_DCOP_H_ #endif // _ROSEGARDEN_DCOP_H_

@ -437,7 +437,7 @@ RosegardenGUIApp::RosegardenGUIApp(bool useSequencer,
// problems. This warning has to happen early, in case it // problems. This warning has to happen early, in case it
// affects the ability to load plugins etc from a file on the // affects the ability to load plugins etc from a file on the
// command line. // command line.
m_seqManager->checkSoundDrivertqStatus(true); m_seqManager->checkSoundDriverStatus(true);
} }
if (m_view) { if (m_view) {
@ -445,7 +445,7 @@ RosegardenGUIApp::RosegardenGUIApp(bool useSequencer,
m_view, TQT_SLOT(slotControllerDeviceEventReceived(MappedEvent *))); m_view, TQT_SLOT(slotControllerDeviceEventReceived(MappedEvent *)));
} }
if (m_seqManager->getSoundDrivertqStatus() & AUDIO_OK) { if (m_seqManager->getSoundDriverStatus() & AUDIO_OK) {
slotStateChanged("got_audio", true); slotStateChanged("got_audio", true);
} else { } else {
slotStateChanged("got_audio", false); slotStateChanged("got_audio", false);
@ -1631,7 +1631,7 @@ void RosegardenGUIApp::setDocument(RosegardenGUIDoc* newDocument)
TQT_TQOBJECT(this), TQT_SLOT(slotDocumentDevicesResyncd())); TQT_TQOBJECT(this), TQT_SLOT(slotDocumentDevicesResyncd()));
m_doc->syncDevices(); m_doc->syncDevices();
m_doc->clearModifiedtqStatus(); m_doc->clearModifiedStatus();
if (newDocument->getStudio().haveMidiDevices()) { if (newDocument->getStudio().haveMidiDevices()) {
stateChanged("got_midi_devices"); stateChanged("got_midi_devices");
@ -1658,7 +1658,7 @@ void RosegardenGUIApp::setDocument(RosegardenGUIDoc* newDocument)
emit documentChanged(m_doc); emit documentChanged(m_doc);
m_doc->clearModifiedtqStatus(); // because it's set as modified by the various m_doc->clearModifiedStatus(); // because it's set as modified by the various
// init operations // init operations
// TODO: this sucks, have to sort it out somehow. // TODO: this sucks, have to sort it out somehow.
@ -1739,7 +1739,7 @@ RosegardenGUIApp::createDocument(TQString filePath, ImportType importType)
// Stop if playing // Stop if playing
// //
if (m_seqManager && m_seqManager->getTransporttqStatus() == PLAYING) if (m_seqManager && m_seqManager->getTransportStatus() == PLAYING)
slotStop(); slotStop();
slotEnableTransport(false); slotEnableTransport(false);
@ -1834,7 +1834,7 @@ RosegardenGUIApp::createDocumentFromRGFile(TQString filePath)
newDoc->setAbsFilePath(info.absFilePath()); newDoc->setAbsFilePath(info.absFilePath());
newDoc->setTitle(info.fileName()); newDoc->setTitle(info.fileName());
} else { } else {
newDoc->clearModifiedtqStatus(); newDoc->clearModifiedStatus();
} }
} else { } else {
delete newDoc; delete newDoc;
@ -4236,7 +4236,7 @@ RosegardenGUIApp::slotUpdatePlaybackPosition()
// std::cerr << "RosegardenGUIApp::slotUpdatePlaybackPosition: mapper timeT = " << elapsedTime << std::endl; // std::cerr << "RosegardenGUIApp::slotUpdatePlaybackPosition: mapper timeT = " << elapsedTime << std::endl;
if (m_seqManager->getTransporttqStatus() == RECORDING) { if (m_seqManager->getTransportStatus() == RECORDING) {
MappedComposition mC; MappedComposition mC;
if (mapper->getRecordedEvents(mC) > 0) { if (mapper->getRecordedEvents(mC) > 0) {
@ -4358,10 +4358,10 @@ void RosegardenGUIApp::slotSetPointerPosition(timeT t)
// std::cerr << "RosegardenGUIApp::slotSetPointerPosition: t = " << t << std::endl; // std::cerr << "RosegardenGUIApp::slotSetPointerPosition: t = " << t << std::endl;
if (m_seqManager) { if (m_seqManager) {
if ( m_seqManager->getTransporttqStatus() == PLAYING || if ( m_seqManager->getTransportStatus() == PLAYING ||
m_seqManager->getTransporttqStatus() == RECORDING ) { m_seqManager->getTransportStatus() == RECORDING ) {
if (t > comp.getEndMarker()) { if (t > comp.getEndMarker()) {
if (m_seqManager->getTransporttqStatus() == PLAYING) { if (m_seqManager->getTransportStatus() == PLAYING) {
slotStop(); slotStop();
t = comp.getEndMarker(); t = comp.getEndMarker();
@ -4477,8 +4477,8 @@ void RosegardenGUIApp::slotDisplayBarTime(timeT t)
void RosegardenGUIApp::slotRefreshTimeDisplay() void RosegardenGUIApp::slotRefreshTimeDisplay()
{ {
if ( m_seqManager->getTransporttqStatus() == PLAYING || if ( m_seqManager->getTransportStatus() == PLAYING ||
m_seqManager->getTransporttqStatus() == RECORDING ) { m_seqManager->getTransportStatus() == RECORDING ) {
return ; // it'll be refreshed in a moment anyway return ; // it'll be refreshed in a moment anyway
} }
slotSetPointerPosition(m_doc->getComposition().getPosition()); slotSetPointerPosition(m_doc->getComposition().getPosition());
@ -4560,7 +4560,7 @@ void RosegardenGUIApp::slotTestStartupTester()
} }
#ifdef HAVE_LIBJACK #ifdef HAVE_LIBJACK
if (m_seqManager && (m_seqManager->getSoundDrivertqStatus() & AUDIO_OK)) { if (m_seqManager && (m_seqManager->getSoundDriverStatus() & AUDIO_OK)) {
m_haveAudioImporter = m_startupTester->haveAudioFileImporter(&missing); m_haveAudioImporter = m_startupTester->haveAudioFileImporter(&missing);
@ -4623,7 +4623,7 @@ bool RosegardenGUIApp::launchSequencer(bool useExisting)
if (isSequencerRunning()) { if (isSequencerRunning()) {
RG_DEBUG << "RosegardenGUIApp::launchSequencer() - sequencer already running - returning\n"; RG_DEBUG << "RosegardenGUIApp::launchSequencer() - sequencer already running - returning\n";
if (m_seqManager) m_seqManager->checkSoundDrivertqStatus(false); if (m_seqManager) m_seqManager->checkSoundDriverStatus(false);
return true; return true;
} }
@ -4639,7 +4639,7 @@ bool RosegardenGUIApp::launchSequencer(bool useExisting)
<< "existing DCOP registered sequencer found\n"; << "existing DCOP registered sequencer found\n";
if (useExisting) { if (useExisting) {
if (m_seqManager) m_seqManager->checkSoundDrivertqStatus(false); if (m_seqManager) m_seqManager->checkSoundDriverStatus(false);
m_sequencerProcess = (KProcess*)SequencerExternal; m_sequencerProcess = (KProcess*)SequencerExternal;
return true; return true;
} }
@ -4733,7 +4733,7 @@ bool RosegardenGUIApp::launchSequencer(bool useExisting)
try { try {
// if (m_seqManager) { // if (m_seqManager) {
// RG_DEBUG << "RosegardenGUIApp::launchSequencer : checking sound driver status\n"; // RG_DEBUG << "RosegardenGUIApp::launchSequencer : checking sound driver status\n";
// m_seqManager->checkSoundDrivertqStatus(); // m_seqManager->checkSoundDriverStatus();
// } // }
stateChanged("sequencer_running"); stateChanged("sequencer_running");
@ -5168,9 +5168,9 @@ RosegardenGUIApp::slotToggleMetronome()
{ {
Composition &comp = m_doc->getComposition(); Composition &comp = m_doc->getComposition();
if (m_seqManager->getTransporttqStatus() == STARTING_TO_RECORD || if (m_seqManager->getTransportStatus() == STARTING_TO_RECORD ||
m_seqManager->getTransporttqStatus() == RECORDING || m_seqManager->getTransportStatus() == RECORDING ||
m_seqManager->getTransporttqStatus() == RECORDING_ARMED) { m_seqManager->getTransportStatus() == RECORDING_ARMED) {
if (comp.useRecordMetronome()) if (comp.useRecordMetronome())
comp.setRecordMetronome(false); comp.setRecordMetronome(false);
else else
@ -5192,7 +5192,7 @@ RosegardenGUIApp::slotRewindToBeginning()
{ {
// ignore requests if recording // ignore requests if recording
// //
if (m_seqManager->getTransporttqStatus() == RECORDING) if (m_seqManager->getTransportStatus() == RECORDING)
return ; return ;
m_seqManager->rewindToBeginning(); m_seqManager->rewindToBeginning();
@ -5203,7 +5203,7 @@ RosegardenGUIApp::slotFastForwardToEnd()
{ {
// ignore requests if recording // ignore requests if recording
// //
if (m_seqManager->getTransporttqStatus() == RECORDING) if (m_seqManager->getTransportStatus() == RECORDING)
return ; return ;
m_seqManager->fastForwardToEnd(); m_seqManager->fastForwardToEnd();
@ -5213,18 +5213,18 @@ void
RosegardenGUIApp::slotSetPlayPosition(timeT time) RosegardenGUIApp::slotSetPlayPosition(timeT time)
{ {
RG_DEBUG << "RosegardenGUIApp::slotSetPlayPosition(" << time << ")" << endl; RG_DEBUG << "RosegardenGUIApp::slotSetPlayPosition(" << time << ")" << endl;
if (m_seqManager->getTransporttqStatus() == RECORDING) if (m_seqManager->getTransportStatus() == RECORDING)
return ; return ;
m_doc->slotSetPointerPosition(time); m_doc->slotSetPointerPosition(time);
if (m_seqManager->getTransporttqStatus() == PLAYING) if (m_seqManager->getTransportStatus() == PLAYING)
return ; return ;
slotPlay(); slotPlay();
} }
void RosegardenGUIApp::notifySequencertqStatus(int status) void RosegardenGUIApp::notifySequencerStatus(int status)
{ {
stateChanged("not_playing", stateChanged("not_playing",
(status == PLAYING || (status == PLAYING ||
@ -5232,7 +5232,7 @@ void RosegardenGUIApp::notifySequencertqStatus(int status)
KXMLGUIClient::StateReverse : KXMLGUIClient::StateNoReverse); KXMLGUIClient::StateReverse : KXMLGUIClient::StateNoReverse);
if (m_seqManager) if (m_seqManager)
m_seqManager->setTransporttqStatus((TransporttqStatus) status); m_seqManager->setTransportStatus((TransportStatus) status);
} }
void RosegardenGUIApp::processAsynchronousMidi(const MappedComposition &mC) void RosegardenGUIApp::processAsynchronousMidi(const MappedComposition &mC)
@ -5261,10 +5261,10 @@ RosegardenGUIApp::slotRecord()
return ; return ;
} }
if (m_seqManager->getTransporttqStatus() == RECORDING) { if (m_seqManager->getTransportStatus() == RECORDING) {
slotStop(); slotStop();
return ; return ;
} else if (m_seqManager->getTransporttqStatus() == PLAYING) { } else if (m_seqManager->getTransportStatus() == PLAYING) {
slotToggleRecord(); slotToggleRecord();
return ; return ;
} }
@ -5398,7 +5398,7 @@ void RosegardenGUIApp::slotPlay()
// slotRecord ensures we don't toggle the recording state in // slotRecord ensures we don't toggle the recording state in
// SequenceManager) // SequenceManager)
// //
if (m_seqManager->getTransporttqStatus() == RECORDING_ARMED) { if (m_seqManager->getTransportStatus() == RECORDING_ARMED) {
slotRecord(); slotRecord();
return ; return ;
} }
@ -5481,7 +5481,7 @@ void RosegardenGUIApp::slotRewind()
{ {
// ignore requests if recording // ignore requests if recording
// //
if (m_seqManager->getTransporttqStatus() == RECORDING) if (m_seqManager->getTransportStatus() == RECORDING)
return ; return ;
if (m_seqManager) if (m_seqManager)
m_seqManager->rewind(); m_seqManager->rewind();
@ -5491,7 +5491,7 @@ void RosegardenGUIApp::slotFastforward()
{ {
// ignore requests if recording // ignore requests if recording
// //
if (m_seqManager->getTransporttqStatus() == RECORDING) if (m_seqManager->getTransportStatus() == RECORDING)
return ; return ;
if (m_seqManager) if (m_seqManager)
@ -6307,8 +6307,8 @@ RosegardenGUIApp::slotAudioManager()
connect(TQT_TQOBJECT(this), TQT_SIGNAL(documentAboutToChange()), connect(TQT_TQOBJECT(this), TQT_SIGNAL(documentAboutToChange()),
m_audioManagerDialog, TQT_SLOT(close())); m_audioManagerDialog, TQT_SLOT(close()));
m_audioManagerDialog->setAudioSubsystemtqStatus( m_audioManagerDialog->setAudioSubsystemStatus(
m_seqManager->getSoundDrivertqStatus() & AUDIO_OK); m_seqManager->getSoundDriverStatus() & AUDIO_OK);
plugAccelerators(m_audioManagerDialog, plugAccelerators(m_audioManagerDialog,
m_audioManagerDialog->getAccelerators()); m_audioManagerDialog->getAccelerators());
@ -7942,8 +7942,8 @@ void
RosegardenGUIApp::slotAutoSave() RosegardenGUIApp::slotAutoSave()
{ {
if (!m_seqManager || if (!m_seqManager ||
m_seqManager->getTransporttqStatus() == PLAYING || m_seqManager->getTransportStatus() == PLAYING ||
m_seqManager->getTransporttqStatus() == RECORDING) m_seqManager->getTransportStatus() == RECORDING)
return ; return ;
KConfig* config = kapp->config(); KConfig* config = kapp->config();

@ -437,7 +437,7 @@ RosegardenGUIApp::RosegardenGUIApp(bool useSequencer,
// problems. This warning has to happen early, in case it // problems. This warning has to happen early, in case it
// affects the ability to load plugins etc from a file on the // affects the ability to load plugins etc from a file on the
// command line. // command line.
m_seqManager->checkSoundDrivertqStatus(true); m_seqManager->checkSoundDriverStatus(true);
} }
if (m_view) { if (m_view) {
@ -445,7 +445,7 @@ RosegardenGUIApp::RosegardenGUIApp(bool useSequencer,
m_view, TQT_SLOT(slotControllerDeviceEventReceived(MappedEvent *))); m_view, TQT_SLOT(slotControllerDeviceEventReceived(MappedEvent *)));
} }
if (m_seqManager->getSoundDrivertqStatus() & AUDIO_OK) { if (m_seqManager->getSoundDriverStatus() & AUDIO_OK) {
slotStateChanged("got_audio", true); slotStateChanged("got_audio", true);
} else { } else {
slotStateChanged("got_audio", false); slotStateChanged("got_audio", false);
@ -1631,7 +1631,7 @@ void RosegardenGUIApp::setDocument(RosegardenGUIDoc* newDocument)
this, TQT_SLOT(slotDocumentDevicesResyncd())); this, TQT_SLOT(slotDocumentDevicesResyncd()));
m_doc->syncDevices(); m_doc->syncDevices();
m_doc->clearModifiedtqStatus(); m_doc->clearModifiedStatus();
if (newDocument->getStudio().haveMidiDevices()) { if (newDocument->getStudio().haveMidiDevices()) {
stateChanged("got_midi_devices"); stateChanged("got_midi_devices");
@ -1658,7 +1658,7 @@ void RosegardenGUIApp::setDocument(RosegardenGUIDoc* newDocument)
emit documentChanged(m_doc); emit documentChanged(m_doc);
m_doc->clearModifiedtqStatus(); // because it's set as modified by the various m_doc->clearModifiedStatus(); // because it's set as modified by the various
// init operations // init operations
// TODO: this sucks, have to sort it out somehow. // TODO: this sucks, have to sort it out somehow.
@ -1739,7 +1739,7 @@ RosegardenGUIApp::createDocument(TQString filePath, ImportType importType)
// Stop if playing // Stop if playing
// //
if (m_seqManager && m_seqManager->getTransporttqStatus() == PLAYING) if (m_seqManager && m_seqManager->getTransportStatus() == PLAYING)
slotStop(); slotStop();
slotEnableTransport(false); slotEnableTransport(false);
@ -1834,7 +1834,7 @@ RosegardenGUIApp::createDocumentFromRGFile(TQString filePath)
newDoc->setAbsFilePath(info.absFilePath()); newDoc->setAbsFilePath(info.absFilePath());
newDoc->setTitle(info.fileName()); newDoc->setTitle(info.fileName());
} else { } else {
newDoc->clearModifiedtqStatus(); newDoc->clearModifiedStatus();
} }
} else { } else {
delete newDoc; delete newDoc;
@ -4236,7 +4236,7 @@ RosegardenGUIApp::slotUpdatePlaybackPosition()
// std::cerr << "RosegardenGUIApp::slotUpdatePlaybackPosition: mapper timeT = " << elapsedTime << std::endl; // std::cerr << "RosegardenGUIApp::slotUpdatePlaybackPosition: mapper timeT = " << elapsedTime << std::endl;
if (m_seqManager->getTransporttqStatus() == RECORDING) { if (m_seqManager->getTransportStatus() == RECORDING) {
MappedComposition mC; MappedComposition mC;
if (mapper->getRecordedEvents(mC) > 0) { if (mapper->getRecordedEvents(mC) > 0) {
@ -4358,10 +4358,10 @@ void RosegardenGUIApp::slotSetPointerPosition(timeT t)
// std::cerr << "RosegardenGUIApp::slotSetPointerPosition: t = " << t << std::endl; // std::cerr << "RosegardenGUIApp::slotSetPointerPosition: t = " << t << std::endl;
if (m_seqManager) { if (m_seqManager) {
if ( m_seqManager->getTransporttqStatus() == PLAYING || if ( m_seqManager->getTransportStatus() == PLAYING ||
m_seqManager->getTransporttqStatus() == RECORDING ) { m_seqManager->getTransportStatus() == RECORDING ) {
if (t > comp.getEndMarker()) { if (t > comp.getEndMarker()) {
if (m_seqManager->getTransporttqStatus() == PLAYING) { if (m_seqManager->getTransportStatus() == PLAYING) {
slotStop(); slotStop();
t = comp.getEndMarker(); t = comp.getEndMarker();
@ -4477,8 +4477,8 @@ void RosegardenGUIApp::slotDisplayBarTime(timeT t)
void RosegardenGUIApp::slotRefreshTimeDisplay() void RosegardenGUIApp::slotRefreshTimeDisplay()
{ {
if ( m_seqManager->getTransporttqStatus() == PLAYING || if ( m_seqManager->getTransportStatus() == PLAYING ||
m_seqManager->getTransporttqStatus() == RECORDING ) { m_seqManager->getTransportStatus() == RECORDING ) {
return ; // it'll be refreshed in a moment anyway return ; // it'll be refreshed in a moment anyway
} }
slotSetPointerPosition(m_doc->getComposition().getPosition()); slotSetPointerPosition(m_doc->getComposition().getPosition());
@ -4560,7 +4560,7 @@ void RosegardenGUIApp::slotTestStartupTester()
} }
#ifdef HAVE_LIBJACK #ifdef HAVE_LIBJACK
if (m_seqManager && (m_seqManager->getSoundDrivertqStatus() & AUDIO_OK)) { if (m_seqManager && (m_seqManager->getSoundDriverStatus() & AUDIO_OK)) {
m_haveAudioImporter = m_startupTester->haveAudioFileImporter(&missing); m_haveAudioImporter = m_startupTester->haveAudioFileImporter(&missing);
@ -4623,7 +4623,7 @@ bool RosegardenGUIApp::launchSequencer(bool useExisting)
if (isSequencerRunning()) { if (isSequencerRunning()) {
RG_DEBUG << "RosegardenGUIApp::launchSequencer() - sequencer already running - returning\n"; RG_DEBUG << "RosegardenGUIApp::launchSequencer() - sequencer already running - returning\n";
if (m_seqManager) m_seqManager->checkSoundDrivertqStatus(false); if (m_seqManager) m_seqManager->checkSoundDriverStatus(false);
return true; return true;
} }
@ -4639,7 +4639,7 @@ bool RosegardenGUIApp::launchSequencer(bool useExisting)
<< "existing DCOP registered sequencer found\n"; << "existing DCOP registered sequencer found\n";
if (useExisting) { if (useExisting) {
if (m_seqManager) m_seqManager->checkSoundDrivertqStatus(false); if (m_seqManager) m_seqManager->checkSoundDriverStatus(false);
m_sequencerProcess = (KProcess*)SequencerExternal; m_sequencerProcess = (KProcess*)SequencerExternal;
return true; return true;
} }
@ -4733,7 +4733,7 @@ bool RosegardenGUIApp::launchSequencer(bool useExisting)
try { try {
// if (m_seqManager) { // if (m_seqManager) {
// RG_DEBUG << "RosegardenGUIApp::launchSequencer : checking sound driver status\n"; // RG_DEBUG << "RosegardenGUIApp::launchSequencer : checking sound driver status\n";
// m_seqManager->checkSoundDrivertqStatus(); // m_seqManager->checkSoundDriverStatus();
// } // }
stateChanged("sequencer_running"); stateChanged("sequencer_running");
@ -5168,9 +5168,9 @@ RosegardenGUIApp::slotToggleMetronome()
{ {
Composition &comp = m_doc->getComposition(); Composition &comp = m_doc->getComposition();
if (m_seqManager->getTransporttqStatus() == STARTING_TO_RECORD || if (m_seqManager->getTransportStatus() == STARTING_TO_RECORD ||
m_seqManager->getTransporttqStatus() == RECORDING || m_seqManager->getTransportStatus() == RECORDING ||
m_seqManager->getTransporttqStatus() == RECORDING_ARMED) { m_seqManager->getTransportStatus() == RECORDING_ARMED) {
if (comp.useRecordMetronome()) if (comp.useRecordMetronome())
comp.setRecordMetronome(false); comp.setRecordMetronome(false);
else else
@ -5192,7 +5192,7 @@ RosegardenGUIApp::slotRewindToBeginning()
{ {
// ignore requests if recording // ignore requests if recording
// //
if (m_seqManager->getTransporttqStatus() == RECORDING) if (m_seqManager->getTransportStatus() == RECORDING)
return ; return ;
m_seqManager->rewindToBeginning(); m_seqManager->rewindToBeginning();
@ -5203,7 +5203,7 @@ RosegardenGUIApp::slotFastForwardToEnd()
{ {
// ignore requests if recording // ignore requests if recording
// //
if (m_seqManager->getTransporttqStatus() == RECORDING) if (m_seqManager->getTransportStatus() == RECORDING)
return ; return ;
m_seqManager->fastForwardToEnd(); m_seqManager->fastForwardToEnd();
@ -5213,18 +5213,18 @@ void
RosegardenGUIApp::slotSetPlayPosition(timeT time) RosegardenGUIApp::slotSetPlayPosition(timeT time)
{ {
RG_DEBUG << "RosegardenGUIApp::slotSetPlayPosition(" << time << ")" << endl; RG_DEBUG << "RosegardenGUIApp::slotSetPlayPosition(" << time << ")" << endl;
if (m_seqManager->getTransporttqStatus() == RECORDING) if (m_seqManager->getTransportStatus() == RECORDING)
return ; return ;
m_doc->slotSetPointerPosition(time); m_doc->slotSetPointerPosition(time);
if (m_seqManager->getTransporttqStatus() == PLAYING) if (m_seqManager->getTransportStatus() == PLAYING)
return ; return ;
slotPlay(); slotPlay();
} }
void RosegardenGUIApp::notifySequencertqStatus(int status) void RosegardenGUIApp::notifySequencerStatus(int status)
{ {
stateChanged("not_playing", stateChanged("not_playing",
(status == PLAYING || (status == PLAYING ||
@ -5232,7 +5232,7 @@ void RosegardenGUIApp::notifySequencertqStatus(int status)
KXMLGUIClient::StateReverse : KXMLGUIClient::StateNoReverse); KXMLGUIClient::StateReverse : KXMLGUIClient::StateNoReverse);
if (m_seqManager) if (m_seqManager)
m_seqManager->setTransporttqStatus((TransporttqStatus) status); m_seqManager->setTransportStatus((TransportStatus) status);
} }
void RosegardenGUIApp::processAsynchronousMidi(const MappedComposition &mC) void RosegardenGUIApp::processAsynchronousMidi(const MappedComposition &mC)
@ -5261,10 +5261,10 @@ RosegardenGUIApp::slotRecord()
return ; return ;
} }
if (m_seqManager->getTransporttqStatus() == RECORDING) { if (m_seqManager->getTransportStatus() == RECORDING) {
slotStop(); slotStop();
return ; return ;
} else if (m_seqManager->getTransporttqStatus() == PLAYING) { } else if (m_seqManager->getTransportStatus() == PLAYING) {
slotToggleRecord(); slotToggleRecord();
return ; return ;
} }
@ -5398,7 +5398,7 @@ void RosegardenGUIApp::slotPlay()
// slotRecord ensures we don't toggle the recording state in // slotRecord ensures we don't toggle the recording state in
// SequenceManager) // SequenceManager)
// //
if (m_seqManager->getTransporttqStatus() == RECORDING_ARMED) { if (m_seqManager->getTransportStatus() == RECORDING_ARMED) {
slotRecord(); slotRecord();
return ; return ;
} }
@ -5481,7 +5481,7 @@ void RosegardenGUIApp::slotRewind()
{ {
// ignore requests if recording // ignore requests if recording
// //
if (m_seqManager->getTransporttqStatus() == RECORDING) if (m_seqManager->getTransportStatus() == RECORDING)
return ; return ;
if (m_seqManager) if (m_seqManager)
m_seqManager->rewind(); m_seqManager->rewind();
@ -5491,7 +5491,7 @@ void RosegardenGUIApp::slotFastforward()
{ {
// ignore requests if recording // ignore requests if recording
// //
if (m_seqManager->getTransporttqStatus() == RECORDING) if (m_seqManager->getTransportStatus() == RECORDING)
return ; return ;
if (m_seqManager) if (m_seqManager)
@ -6307,8 +6307,8 @@ RosegardenGUIApp::slotAudioManager()
connect(this, TQT_SIGNAL(documentAboutToChange()), connect(this, TQT_SIGNAL(documentAboutToChange()),
m_audioManagerDialog, TQT_SLOT(close())); m_audioManagerDialog, TQT_SLOT(close()));
m_audioManagerDialog->setAudioSubsystemtqStatus( m_audioManagerDialog->setAudioSubsystemStatus(
m_seqManager->getSoundDrivertqStatus() & AUDIO_OK); m_seqManager->getSoundDriverStatus() & AUDIO_OK);
plugAccelerators(m_audioManagerDialog, plugAccelerators(m_audioManagerDialog,
m_audioManagerDialog->getAccelerators()); m_audioManagerDialog->getAccelerators());
@ -7912,8 +7912,8 @@ void
RosegardenGUIApp::slotAutoSave() RosegardenGUIApp::slotAutoSave()
{ {
if (!m_seqManager || if (!m_seqManager ||
m_seqManager->getTransporttqStatus() == PLAYING || m_seqManager->getTransportStatus() == PLAYING ||
m_seqManager->getTransporttqStatus() == RECORDING) m_seqManager->getTransportStatus() == RECORDING)
return ; return ;
KConfig* config = kapp->config(); KConfig* config = kapp->config();

@ -280,7 +280,7 @@ public:
/** /**
* Set the sequencer status - pass through DCOP as an int * Set the sequencer status - pass through DCOP as an int
*/ */
virtual void notifySequencertqStatus(int status); virtual void notifySequencerStatus(int status);
/** /**
* Handle some random incoming MIDI events. * Handle some random incoming MIDI events.

@ -1196,7 +1196,7 @@ RosegardenGUIView::updateMeters(SequencerMapper *mapper)
bool toSet = false; bool toSet = false;
if (states[instrumentId] == newState && if (states[instrumentId] == newState &&
(getDocument()->getSequenceManager()->getTransporttqStatus() (getDocument()->getSequenceManager()->getTransportStatus()
!= STOPPED)) { != STOPPED)) {
if (info.level != 0 || info.levelRight != 0) { if (info.level != 0 || info.levelRight != 0) {
@ -1212,7 +1212,7 @@ RosegardenGUIView::updateMeters(SequencerMapper *mapper)
if (recStates[instrumentId] == newState && if (recStates[instrumentId] == newState &&
instrument->getType() == Instrument::Audio && instrument->getType() == Instrument::Audio &&
(getDocument()->getSequenceManager()->getTransporttqStatus() (getDocument()->getSequenceManager()->getTransportStatus()
!= PLAYING)) { != PLAYING)) {
if (recInfo.level != 0 || recInfo.levelRight != 0) { if (recInfo.level != 0 || recInfo.levelRight != 0) {
@ -1238,7 +1238,7 @@ RosegardenGUIView::updateMeters(SequencerMapper *mapper)
if (info.level == 0) if (info.level == 0)
continue; continue;
if (getDocument()->getSequenceManager()->getTransporttqStatus() if (getDocument()->getSequenceManager()->getTransportStatus()
!= STOPPED) { != STOPPED) {
// The information in 'info' is specific for this instrument, not // The information in 'info' is specific for this instrument, not

@ -86,7 +86,7 @@ k_dcop:
// Sequencer updates GUI with status // Sequencer updates GUI with status
// //
virtual void notifySequencertqStatus(int status) = 0; virtual void notifySequencerStatus(int status) = 0;
// Used to map unexpected (async) MIDI events to the user interface. // Used to map unexpected (async) MIDI events to the user interface.
// We can show these on the Transport or on a MIDI Mixer. // We can show these on the Transport or on a MIDI Mixer.

@ -147,7 +147,7 @@ StartupTester::isReady()
void void
StartupTester::stdoutReceived(KProcess *, char *buffer, int len) StartupTester::stdoutReceived(KProcess *, char *buffer, int len)
{ {
m_stdoutBuffer += TQString::tqfromLatin1(buffer, len); m_stdoutBuffer += TQString::fromLatin1(buffer, len);
} }
void void

@ -722,7 +722,7 @@ int main(int argc, char *argv[])
TQVBox *mw = dialog->makeVBoxMainWidget(); TQVBox *mw = dialog->makeVBoxMainWidget();
TQHBox *hb = new TQHBox(mw); TQHBox *hb = new TQHBox(mw);
TQLabel *image = new TQLabel(hb); TQLabel *image = new TQLabel(hb);
image->tqsetAlignment(TQt::AlignTop); image->setAlignment(TQt::AlignTop);
TQString iconFile = locate("appdata", "pixmaps/misc/welcome-icon.png"); TQString iconFile = locate("appdata", "pixmaps/misc/welcome-icon.png");
if (!iconFile.isNull()) { if (!iconFile.isNull()) {
image->setPixmap(TQPixmap(iconFile)); image->setPixmap(TQPixmap(iconFile));

@ -182,7 +182,7 @@ AudioConfigurationPage::AudioConfigurationPage(
++row; ++row;
label = new TQLabel(i18n("Rosegarden can start the JACK audio daemon (jackd) for you automatically if it isn't already running when Rosegarden starts.\n\nThis is recommended for beginners and those who use Rosegarden as their main audio application, but it might not be to the liking of advanced users.\n\nIf you want to start JACK automatically, make sure the command includes a full path where necessary as well as any command-line arguments you want to use.\n\nFor example: /usr/local/bin/jackd -d alsa -d hw -r44100 -p 2048 -n 2\n\n"), frame); label = new TQLabel(i18n("Rosegarden can start the JACK audio daemon (jackd) for you automatically if it isn't already running when Rosegarden starts.\n\nThis is recommended for beginners and those who use Rosegarden as their main audio application, but it might not be to the liking of advanced users.\n\nIf you want to start JACK automatically, make sure the command includes a full path where necessary as well as any command-line arguments you want to use.\n\nFor example: /usr/local/bin/jackd -d alsa -d hw -r44100 -p 2048 -n 2\n\n"), frame);
label->tqsetAlignment(TQt::WordBreak); label->setAlignment(TQt::WordBreak);
tqlayout->addMultiCellWidget(label, row, row, 0, 3); tqlayout->addMultiCellWidget(label, row, row, 0, 3);
++row; ++row;

@ -173,8 +173,8 @@ GeneralConfigurationPage::GeneralConfigurationPage(RosegardenGUIDoc *doc,
TQString status(i18n("Unknown")); TQString status(i18n("Unknown"));
SequenceManager *mgr = doc->getSequenceManager(); SequenceManager *mgr = doc->getSequenceManager();
if (mgr) { if (mgr) {
int drivertqStatus = mgr->getSoundDrivertqStatus() & (AUDIO_OK | MIDI_OK); int driverStatus = mgr->getSoundDriverStatus() & (AUDIO_OK | MIDI_OK);
switch (drivertqStatus) { switch (driverStatus) {
case AUDIO_OK: case AUDIO_OK:
status = i18n("No MIDI, audio OK"); status = i18n("No MIDI, audio OK");
break; break;
@ -195,7 +195,7 @@ GeneralConfigurationPage::GeneralConfigurationPage(RosegardenGUIDoc *doc,
TQPushButton *showStatusButton = new TQPushButton(i18n("Details..."), TQPushButton *showStatusButton = new TQPushButton(i18n("Details..."),
frame); frame);
TQObject::connect(showStatusButton, TQT_SIGNAL(clicked()), TQObject::connect(showStatusButton, TQT_SIGNAL(clicked()),
this, TQT_SLOT(slotShowtqStatus())); this, TQT_SLOT(slotShowStatus()));
tqlayout->addWidget(showStatusButton, row, 2, TQt::AlignRight); tqlayout->addWidget(showStatusButton, row, 2, TQt::AlignRight);
++row; ++row;
@ -289,7 +289,7 @@ GeneralConfigurationPage::GeneralConfigurationPage(RosegardenGUIDoc *doc,
} }
void void
GeneralConfigurationPage::slotShowtqStatus() GeneralConfigurationPage::slotShowStatus()
{ {
ShowSequencerStatusDialog dialog(this); ShowSequencerStatusDialog dialog(this);
dialog.exec(); dialog.exec();

@ -85,7 +85,7 @@ signals:
void updateSidebarStyle(unsigned int); void updateSidebarStyle(unsigned int);
protected slots: protected slots:
void slotShowtqStatus(); void slotShowStatus();
protected: protected:
int getCountInSpin() { return m_countIn->value(); } int getCountInSpin() { return m_countIn->value(); }

@ -141,7 +141,7 @@ HeadersConfigurationPage::HeadersConfigurationPage(TQWidget *parent,
} }
// editHeader->setReadOnly( true ); // editHeader->setReadOnly( true );
editHeader->tqsetAlignment( (col == 0 ? TQt::AlignLeft : (col >= 3 ? TQt::AlignRight : TQt::AlignCenter) )); editHeader->setAlignment( (col == 0 ? TQt::AlignLeft : (col >= 3 ? TQt::AlignRight : TQt::AlignCenter) ));
layoutHeaders->addMultiCellWidget(editHeader, row, row, col, col+(width-1) ); layoutHeaders->addMultiCellWidget(editHeader, row, row, col, col+(width-1) );
@ -153,7 +153,7 @@ HeadersConfigurationPage::HeadersConfigurationPage(TQWidget *parent,
shown.insert(key); shown.insert(key);
} }
TQLabel *separator = new TQLabel(i18n("The composition comes here."), frameHeaders); TQLabel *separator = new TQLabel(i18n("The composition comes here."), frameHeaders);
separator->tqsetAlignment( TQt::AlignCenter ); separator->setAlignment( TQt::AlignCenter );
layoutHeaders->addMultiCellWidget(separator, 7, 7, 1, 4 ); layoutHeaders->addMultiCellWidget(separator, 7, 7, 1, 4 );
// //

@ -481,11 +481,11 @@ NotationConfigurationPage::NotationConfigurationPage(KConfig *cfg,
subLayout->addWidget(typeLabel, 3, 0); subLayout->addWidget(typeLabel, 3, 0);
m_fontOriginLabel = new TQLabel(subFrame); m_fontOriginLabel = new TQLabel(subFrame);
m_fontOriginLabel->tqsetAlignment(TQt::WordBreak); m_fontOriginLabel->setAlignment(TQt::WordBreak);
m_fontOriginLabel->setFont(font); m_fontOriginLabel->setFont(font);
// m_fontOriginLabel->setFixedWidth(250); // m_fontOriginLabel->setFixedWidth(250);
m_fontCopyrightLabel = new TQLabel(subFrame); m_fontCopyrightLabel = new TQLabel(subFrame);
m_fontCopyrightLabel->tqsetAlignment(TQt::WordBreak); m_fontCopyrightLabel->setAlignment(TQt::WordBreak);
m_fontCopyrightLabel->setFont(font); m_fontCopyrightLabel->setFont(font);
// m_fontCopyrightLabel->setFixedWidth(250); // m_fontCopyrightLabel->setFixedWidth(250);
m_fontMappedByLabel = new TQLabel(subFrame); m_fontMappedByLabel = new TQLabel(subFrame);

@ -1179,7 +1179,7 @@ AudioManagerDialog::slotClose()
} }
void void
AudioManagerDialog::setAudioSubsystemtqStatus(bool ok) AudioManagerDialog::setAudioSubsystemStatus(bool ok)
{ {
// We can do something more fancy in the future but for the moment // We can do something more fancy in the future but for the moment
// this will suffice. // this will suffice.

@ -88,7 +88,7 @@ public:
// Can we playback audio currently? // Can we playback audio currently?
// //
void setAudioSubsystemtqStatus(bool ok); void setAudioSubsystemStatus(bool ok);
// Return the accelerator object // Return the accelerator object
// //

@ -86,7 +86,7 @@ AudioPluginDialog::AudioPluginDialog(TQWidget *parent,
{ {
setHelp("studio-plugins"); setHelp("studio-plugins");
tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, setSizePolicy(TQSizePolicy(TQSizePolicy::Preferred,
TQSizePolicy::Fixed)); TQSizePolicy::Fixed));
#ifdef HAVE_LIBLO #ifdef HAVE_LIBLO
@ -125,12 +125,12 @@ AudioPluginDialog::AudioPluginDialog(TQWidget *parent,
m_insOuts = new TQLabel(i18n("<ports>"), h); m_insOuts = new TQLabel(i18n("<ports>"), h);
m_insOuts->tqsetAlignment(AlignRight); m_insOuts->setAlignment(AlignRight);
TQToolTip::add TQToolTip::add
(m_insOuts, i18n("Input and output port counts.")); (m_insOuts, i18n("Input and output port counts."));
m_pluginId = new TQLabel(i18n("<id>"), h); m_pluginId = new TQLabel(i18n("<id>"), h);
m_pluginId->tqsetAlignment(AlignRight); m_pluginId->setAlignment(AlignRight);
TQToolTip::add TQToolTip::add
(m_pluginId, i18n("Unique ID of plugin.")); (m_pluginId, i18n("Unique ID of plugin."));
@ -503,7 +503,7 @@ AudioPluginDialog::slotPluginSelected(int i)
} }
adjustSize(); adjustSize();
setFixedSize(tqminimumSizeHint()); setFixedSize(minimumSizeHint());
// tell the sequencer // tell the sequencer
emit pluginSelected(m_containerId, m_index, number - 1); emit pluginSelected(m_containerId, m_index, number - 1);

@ -120,7 +120,7 @@ AudioSplitDialog::drawPreview()
rect->setZ(1); rect->setZ(1);
rect->setPen(kapp->palette().color(TQPalette::Active, TQColorGroup::Dark)); rect->setPen(kapp->palette().color(TQPalette::Active, TQColorGroup::Dark));
rect->setBrush(kapp->palette().color(TQPalette::Active, TQColorGroup::Base)); rect->setBrush(kapp->palette().color(TQPalette::Active, TQColorGroup::Base));
rect->tqsetVisible(true); rect->setVisible(true);
// Get preview in vector form // Get preview in vector form
// //
@ -143,7 +143,7 @@ AudioSplitDialog::drawPreview()
text->setX(30); text->setX(30);
text->setY(30); text->setY(30);
text->setZ(4); text->setZ(4);
text->tqsetVisible(true); text->setVisible(true);
m_canvas->update(); m_canvas->update();
return ; return ;
} }
@ -192,7 +192,7 @@ AudioSplitDialog::drawPreview()
palette().color(TQPalette::Active, TQColorGroup::Shadow)); palette().color(TQPalette::Active, TQColorGroup::Shadow));
line->setBrush(kapp-> line->setBrush(kapp->
palette().color(TQPalette::Active, TQColorGroup::Shadow)); palette().color(TQPalette::Active, TQColorGroup::Shadow));
line->tqsetVisible(true); line->setVisible(true);
} }
@ -205,7 +205,7 @@ AudioSplitDialog::drawPreview()
rect->setPen(kapp->palette().color(TQPalette::Active, TQColorGroup::Shadow)); rect->setPen(kapp->palette().color(TQPalette::Active, TQColorGroup::Shadow));
rect->setBrush(kapp->palette().color(TQPalette::Active, TQColorGroup::Shadow)); rect->setBrush(kapp->palette().color(TQPalette::Active, TQColorGroup::Shadow));
rect->setZ(4); rect->setZ(4);
rect->tqsetVisible(true); rect->setVisible(true);
// Start time // Start time
// //
@ -221,7 +221,7 @@ AudioSplitDialog::drawPreview()
text->setX(startX - 20); text->setX(startX - 20);
text->setY(m_canvasHeight / 2 - m_previewHeight / 2 - 35); text->setY(m_canvasHeight / 2 - m_previewHeight / 2 - 35);
text->setZ(3); text->setZ(3);
text->tqsetVisible(true); text->setVisible(true);
rect = new TQCanvasRectangle(m_canvas); rect = new TQCanvasRectangle(m_canvas);
rect->setX(startX - 1); rect->setX(startX - 1);
@ -229,7 +229,7 @@ AudioSplitDialog::drawPreview()
rect->setSize(1, m_previewHeight + 28); rect->setSize(1, m_previewHeight + 28);
rect->setPen(kapp->palette().color(TQPalette::Active, TQColorGroup::Shadow)); rect->setPen(kapp->palette().color(TQPalette::Active, TQColorGroup::Shadow));
rect->setZ(3); rect->setZ(3);
rect->tqsetVisible(true); rect->setVisible(true);
// End time // End time
// //
@ -244,7 +244,7 @@ AudioSplitDialog::drawPreview()
text->setX(startX + m_previewWidth - 20); text->setX(startX + m_previewWidth - 20);
text->setY(m_canvasHeight / 2 - m_previewHeight / 2 - 35); text->setY(m_canvasHeight / 2 - m_previewHeight / 2 - 35);
text->setZ(3); text->setZ(3);
text->tqsetVisible(true); text->setVisible(true);
rect = new TQCanvasRectangle(m_canvas); rect = new TQCanvasRectangle(m_canvas);
rect->setX(startX + m_previewWidth - 1); rect->setX(startX + m_previewWidth - 1);
@ -252,7 +252,7 @@ AudioSplitDialog::drawPreview()
rect->setSize(1, m_previewHeight + 28); rect->setSize(1, m_previewHeight + 28);
rect->setPen(kapp->palette().color(TQPalette::Active, TQColorGroup::Shadow)); rect->setPen(kapp->palette().color(TQPalette::Active, TQColorGroup::Shadow));
rect->setZ(3); rect->setZ(3);
rect->tqsetVisible(true); rect->setVisible(true);
m_canvas->update(); m_canvas->update();
} }
@ -303,7 +303,7 @@ AudioSplitDialog::drawSplits(int threshold)
palette().color(TQPalette::Active, TQColorGroup::Mid)); palette().color(TQPalette::Active, TQColorGroup::Mid));
rect->setBrush(kapp-> rect->setBrush(kapp->
palette().color(TQPalette::Active, TQColorGroup::Mid)); palette().color(TQPalette::Active, TQColorGroup::Mid));
rect->tqsetVisible(true); rect->setVisible(true);
tempRects.push_back(rect); tempRects.push_back(rect);
} }
@ -315,7 +315,7 @@ AudioSplitDialog::drawSplits(int threshold)
// clear any previous preview boxes // clear any previous preview boxes
// //
for (pIt = m_previewBoxes.begin(); pIt != m_previewBoxes.end(); pIt++) { for (pIt = m_previewBoxes.begin(); pIt != m_previewBoxes.end(); pIt++) {
//(*pIt)->tqsetVisible(false); //(*pIt)->setVisible(false);
delete (*pIt); delete (*pIt);
} }
m_previewBoxes.erase(m_previewBoxes.begin(), m_previewBoxes.end()); m_previewBoxes.erase(m_previewBoxes.begin(), m_previewBoxes.end());

@ -77,7 +77,7 @@ ClefDialog::ClefDialog(TQWidget *parent,
(m_octaveUp, i18n("Up an Octave")); (m_octaveUp, i18n("Up an Octave"));
m_clefLabel = new TQLabel(i18n("Clef"), clefLabelBox); m_clefLabel = new TQLabel(i18n("Clef"), clefLabelBox);
m_clefLabel->tqsetAlignment(AlignVCenter | AlignHCenter); m_clefLabel->setAlignment(AlignVCenter | AlignHCenter);
m_octaveDown = new BigArrowButton(clefLabelBox, Qt::DownArrow); m_octaveDown = new BigArrowButton(clefLabelBox, Qt::DownArrow);
TQToolTip::add TQToolTip::add
@ -88,7 +88,7 @@ ClefDialog::ClefDialog(TQWidget *parent,
(clefUp, i18n("Higher clef")); (clefUp, i18n("Higher clef"));
m_clefNameLabel = new TQLabel(i18n("Clef"), clefLabelBox); m_clefNameLabel = new TQLabel(i18n("Clef"), clefLabelBox);
m_clefNameLabel->tqsetAlignment(AlignVCenter | AlignHCenter); m_clefNameLabel->setAlignment(AlignVCenter | AlignHCenter);
if (showConversionOptions) { if (showConversionOptions) {
m_noConversionButton = m_noConversionButton =

@ -54,7 +54,7 @@ static TQPixmap loadIcon(const char *name)
return TQPixmap(fileBase + ".xpm"); return TQPixmap(fileBase + ".xpm");
} }
TQPixmap pmap = KGlobal::instance()->iconLoader() TQPixmap pmap = KGlobal::instance()->iconLoader()
->loadIcon(TQString::tqfromLatin1(name), KIcon::NoGroup, KIcon::SizeMedium); ->loadIcon(TQString::fromLatin1(name), KIcon::NoGroup, KIcon::SizeMedium);
return pmap; return pmap;
} }

@ -53,7 +53,7 @@ static TQPixmap loadIcon(const char *name)
} }
TQPixmap pmap = KGlobal::instance()->iconLoader() TQPixmap pmap = KGlobal::instance()->iconLoader()
->loadIcon(TQString::tqfromLatin1(name), KIcon::NoGroup, KIcon::SizeMedium); ->loadIcon(TQString::fromLatin1(name), KIcon::NoGroup, KIcon::SizeMedium);
return pmap; return pmap;
} }
@ -100,7 +100,7 @@ DocumentConfigureDialog::DocumentConfigureDialog(RosegardenGUIDoc *doc,
page->setPageIndex(pageIndex(pageWidget)); page->setPageIndex(pageIndex(pageWidget));
m_configurationPages.push_back(page); m_configurationPages.push_back(page);
resize(tqminimumSize()); resize(minimumSize());
} }
void void

@ -134,7 +134,7 @@ EventFilterDialog::initDialog()
TQT_SLOT(slotPitchFromChanged(int))); TQT_SLOT(slotPitchFromChanged(int)));
m_pitchFromChooserButton = new TQPushButton(i18n("edit"), noteFrame); m_pitchFromChooserButton = new TQPushButton(i18n("edit"), noteFrame);
m_pitchFromChooserButton->tqsetSizePolicy(TQSizePolicy((TQSizePolicy::SizeType)0, m_pitchFromChooserButton->setSizePolicy(TQSizePolicy((TQSizePolicy::SizeType)0,
(TQSizePolicy::SizeType)0, 0, 0, m_pitchFromChooserButton-> (TQSizePolicy::SizeType)0, 0, 0, m_pitchFromChooserButton->
sizePolicy().hasHeightForWidth())); sizePolicy().hasHeightForWidth()));
TQToolTip::add TQToolTip::add

@ -58,7 +58,7 @@ FileLocateDialog::FileLocateDialog(TQWidget *parent,
"Would you like to try and locate this file or skip it?").tqarg(m_file); "Would you like to try and locate this file or skip it?").tqarg(m_file);
TQLabel *labelW = new TQLabel(label, w); TQLabel *labelW = new TQLabel(label, w);
labelW->tqsetAlignment(TQt::AlignCenter); labelW->setAlignment(TQt::AlignCenter);
labelW->setMinimumHeight(60); labelW->setMinimumHeight(60);
} }

@ -66,7 +66,7 @@ IntervalDialog::IntervalDialog(TQWidget *parent, bool askChangeKey, bool askTran
//m_intervalStepsLabel = new TQLabel( i18n("Steps: %1").tqarg(intervalDiatonic % 7), hBox); //m_intervalStepsLabel = new TQLabel( i18n("Steps: %1").tqarg(intervalDiatonic % 7), hBox);
m_intervalLabel = new TQLabel( i18n("a perfect unison"), vBox); m_intervalLabel = new TQLabel( i18n("a perfect unison"), vBox);
m_intervalLabel->tqsetAlignment(TQt::AlignCenter); m_intervalLabel->setAlignment(TQt::AlignCenter);
TQFont font(m_intervalLabel->font()); TQFont font(m_intervalLabel->font());
font.setItalic(true); font.setItalic(true);
m_intervalLabel->setFont(font); m_intervalLabel->setFont(font);

@ -98,7 +98,7 @@ KeySignatureDialog::KeySignatureDialog(TQWidget *parent,
(keyDown, i18n("Flatten")); (keyDown, i18n("Flatten"));
m_keyLabel = new TQLabel(i18n("Key"), keyBox); m_keyLabel = new TQLabel(i18n("Key"), keyBox);
m_keyLabel->tqsetAlignment(AlignVCenter | AlignHCenter); m_keyLabel->setAlignment(AlignVCenter | AlignHCenter);
BigArrowButton *keyUp = new BigArrowButton(keyBox, Qt::RightArrow); BigArrowButton *keyUp = new BigArrowButton(keyBox, Qt::RightArrow);
TQToolTip::add TQToolTip::add

@ -292,7 +292,7 @@ LilyPondOptionsDialog::LilyPondOptionsDialog(TQWidget *parent,
advancedGrid->setRowStretch(2, 10); advancedGrid->setRowStretch(2, 10);
resize(tqminimumSize()); resize(minimumSize());
} }
void void

@ -155,7 +155,7 @@ SimpleEventEditDialog::SimpleEventEditDialog(TQWidget *parent,
m_controllerLabel = new TQLabel(i18n("Controller name:"), frame); m_controllerLabel = new TQLabel(i18n("Controller name:"), frame);
m_controllerLabelValue = new TQLabel(i18n("<none>"), frame); m_controllerLabelValue = new TQLabel(i18n("<none>"), frame);
m_controllerLabelValue->tqsetAlignment(TQLabel::AlignRight); m_controllerLabelValue->setAlignment(TQLabel::AlignRight);
tqlayout->addWidget(m_controllerLabel, 4, 0); tqlayout->addWidget(m_controllerLabel, 4, 0);
tqlayout->addWidget(m_controllerLabelValue, 4, 1); tqlayout->addWidget(m_controllerLabelValue, 4, 1);

@ -96,8 +96,8 @@ TimeSignatureDialog::TimeSignatureDialog(TQWidget *parent,
m_denomLabel = new TQLabel m_denomLabel = new TQLabel
(TQString("%1").tqarg(m_timeSignature.getDenominator()), denomBox); (TQString("%1").tqarg(m_timeSignature.getDenominator()), denomBox);
m_numLabel->tqsetAlignment(AlignHCenter | AlignVCenter); m_numLabel->setAlignment(AlignHCenter | AlignVCenter);
m_denomLabel->tqsetAlignment(AlignHCenter | AlignVCenter); m_denomLabel->setAlignment(AlignHCenter | AlignVCenter);
m_numLabel->setFont(*timeSigFont); m_numLabel->setFont(*timeSigFont);
m_denomLabel->setFont(*timeSigFont); m_denomLabel->setFont(*timeSigFont);

@ -206,10 +206,10 @@ TransportDialog::TransportDialog(TQWidget *parent,
pal.setColor(TQColorGroup::Foreground, TQColor(192, 216, 255)); pal.setColor(TQColorGroup::Foreground, TQColor(192, 216, 255));
m_transport->TempoDisplay->setPalette(pal); m_transport->TempoDisplay->setPalette(pal);
m_transport->TempoDisplay->tqsetAlignment(int(TQLabel::AlignVCenter | TQLabel::AlignRight)); m_transport->TempoDisplay->setAlignment(int(TQLabel::AlignVCenter | TQLabel::AlignRight));
m_transport->TimeSigDisplay->setPalette(pal); m_transport->TimeSigDisplay->setPalette(pal);
m_transport->TimeSigDisplay->tqsetAlignment(int(TQLabel::AlignVCenter | TQLabel::AlignRight)); m_transport->TimeSigDisplay->setAlignment(int(TQLabel::AlignVCenter | TQLabel::AlignRight));
TQFont localFont(m_transport->OutDisplay->font() ); TQFont localFont(m_transport->OutDisplay->font() );
localFont.setFamily( "lucida" ); localFont.setFamily( "lucida" );

@ -120,7 +120,7 @@ TupletDialog::TupletDialog(TQWidget *parent, Note::Type defaultUnitType,
new TQLabel(i18n("Selected region:"), timingDisplayGrid); new TQLabel(i18n("Selected region:"), timingDisplayGrid);
new TQLabel("", timingDisplayGrid); new TQLabel("", timingDisplayGrid);
m_selectionDurationDisplay = new TQLabel("x", timingDisplayGrid); m_selectionDurationDisplay = new TQLabel("x", timingDisplayGrid);
m_selectionDurationDisplay->tqsetAlignment(int(TQLabel::AlignVCenter | m_selectionDurationDisplay->setAlignment(int(TQLabel::AlignVCenter |
TQLabel::AlignRight)); TQLabel::AlignRight));
} else { } else {
m_selectionDurationDisplay = 0; m_selectionDurationDisplay = 0;
@ -129,19 +129,19 @@ TupletDialog::TupletDialog(TQWidget *parent, Note::Type defaultUnitType,
new TQLabel(i18n("Group with current timing:"), timingDisplayGrid); new TQLabel(i18n("Group with current timing:"), timingDisplayGrid);
m_untupledDurationCalculationDisplay = new TQLabel("x", timingDisplayGrid); m_untupledDurationCalculationDisplay = new TQLabel("x", timingDisplayGrid);
m_untupledDurationDisplay = new TQLabel("x", timingDisplayGrid); m_untupledDurationDisplay = new TQLabel("x", timingDisplayGrid);
m_untupledDurationDisplay->tqsetAlignment(int(TQLabel::AlignVCenter | m_untupledDurationDisplay->setAlignment(int(TQLabel::AlignVCenter |
TQLabel::AlignRight)); TQLabel::AlignRight));
new TQLabel(i18n("Group with new timing:"), timingDisplayGrid); new TQLabel(i18n("Group with new timing:"), timingDisplayGrid);
m_tupledDurationCalculationDisplay = new TQLabel("x", timingDisplayGrid); m_tupledDurationCalculationDisplay = new TQLabel("x", timingDisplayGrid);
m_tupledDurationDisplay = new TQLabel("x", timingDisplayGrid); m_tupledDurationDisplay = new TQLabel("x", timingDisplayGrid);
m_tupledDurationDisplay->tqsetAlignment(int(TQLabel::AlignVCenter | m_tupledDurationDisplay->setAlignment(int(TQLabel::AlignVCenter |
TQLabel::AlignRight)); TQLabel::AlignRight));
new TQLabel(i18n("Gap created by timing change:"), timingDisplayGrid); new TQLabel(i18n("Gap created by timing change:"), timingDisplayGrid);
m_newGapDurationCalculationDisplay = new TQLabel("x", timingDisplayGrid); m_newGapDurationCalculationDisplay = new TQLabel("x", timingDisplayGrid);
m_newGapDurationDisplay = new TQLabel("x", timingDisplayGrid); m_newGapDurationDisplay = new TQLabel("x", timingDisplayGrid);
m_newGapDurationDisplay->tqsetAlignment(int(TQLabel::AlignVCenter | m_newGapDurationDisplay->setAlignment(int(TQLabel::AlignVCenter |
TQLabel::AlignRight)); TQLabel::AlignRight));
if (maxDuration > 0) { if (maxDuration > 0) {
@ -150,7 +150,7 @@ TupletDialog::TupletDialog(TQWidget *parent, Note::Type defaultUnitType,
m_unchangedDurationCalculationDisplay = new TQLabel m_unchangedDurationCalculationDisplay = new TQLabel
("x", timingDisplayGrid); ("x", timingDisplayGrid);
m_unchangedDurationDisplay = new TQLabel("x", timingDisplayGrid); m_unchangedDurationDisplay = new TQLabel("x", timingDisplayGrid);
m_unchangedDurationDisplay->tqsetAlignment(int(TQLabel::AlignVCenter | m_unchangedDurationDisplay->setAlignment(int(TQLabel::AlignVCenter |
TQLabel::AlignRight)); TQLabel::AlignRight));
} else { } else {

@ -69,24 +69,24 @@ Fingering::getStartFret() const
bool bool
Fingering::hasBarre() const Fingering::hasBarre() const
{ {
int lastStringtqStatus = m_strings[getNbStrings() - 1]; int lastStringStatus = m_strings[getNbStrings() - 1];
return ((m_strings[0] > OPEN && m_strings[0] == lastStringtqStatus) || return ((m_strings[0] > OPEN && m_strings[0] == lastStringStatus) ||
(m_strings[1] > OPEN && m_strings[1] == lastStringtqStatus) || (m_strings[1] > OPEN && m_strings[1] == lastStringStatus) ||
(m_strings[2] > OPEN && m_strings[2] == lastStringtqStatus)); (m_strings[2] > OPEN && m_strings[2] == lastStringStatus));
} }
Fingering::Barre Fingering::Barre
Fingering::getBarre() const Fingering::getBarre() const
{ {
int lastStringtqStatus = m_strings[getNbStrings() - 1]; int lastStringStatus = m_strings[getNbStrings() - 1];
Barre res; Barre res;
res.fret = lastStringtqStatus; res.fret = lastStringStatus;
for(unsigned int i = 0; i < 3; ++i) { for(unsigned int i = 0; i < 3; ++i) {
if (m_strings[i] > OPEN && m_strings[i] == lastStringtqStatus) if (m_strings[i] > OPEN && m_strings[i] == lastStringStatus)
res.start = i; res.start = i;
break; break;
} }
@ -140,8 +140,8 @@ std::string Fingering::toString() const
bool operator<(const Fingering& a, const Fingering& b) bool operator<(const Fingering& a, const Fingering& b)
{ {
for(unsigned int i = 0; i < Fingering::DEFAULT_NB_STRINGS; ++i) { for(unsigned int i = 0; i < Fingering::DEFAULT_NB_STRINGS; ++i) {
if (a.getStringtqStatus(i) != b.getStringtqStatus(i)) { if (a.getStringStatus(i) != b.getStringStatus(i)) {
return a.getStringtqStatus(i) < b.getStringtqStatus(i); return a.getStringStatus(i) < b.getStringStatus(i);
} }
} }
return false; return false;

@ -60,8 +60,8 @@ public:
* returns the fret number on which the string is pressed, or one of MUTED and OPEN * returns the fret number on which the string is pressed, or one of MUTED and OPEN
* *
*/ */
int getStringtqStatus(int stringNb) const { return m_strings[stringNb]; } int getStringStatus(int stringNb) const { return m_strings[stringNb]; }
void setStringtqStatus(int stringNb, int status) { m_strings[stringNb] = status; } void setStringStatus(int stringNb, int status) { m_strings[stringNb] = status; }
unsigned int getStartFret() const; unsigned int getStartFret() const;
unsigned int getNbStrings() const { return m_strings.size(); } unsigned int getNbStrings() const { return m_strings.size(); }

@ -219,16 +219,16 @@ FingeringBox::processMouseRelease(unsigned int release_string_num,
if(m_press_fret_num == 0) { if(m_press_fret_num == 0) {
int stringtqStatus = m_fingering.getStringtqStatus(m_press_string_num); int stringStatus = m_fingering.getStringStatus(m_press_string_num);
if (stringtqStatus == Guitar::Fingering::OPEN) if (stringStatus == Guitar::Fingering::OPEN)
aVal = Guitar::Fingering::MUTED; aVal = Guitar::Fingering::MUTED;
else if (stringtqStatus > Guitar::Fingering::OPEN) else if (stringStatus > Guitar::Fingering::OPEN)
aVal = Guitar::Fingering::OPEN; aVal = Guitar::Fingering::OPEN;
} }
m_fingering.setStringtqStatus(m_press_string_num, aVal); m_fingering.setStringStatus(m_press_string_num, aVal);
update(); update();
} }

@ -205,7 +205,7 @@ MatrixView::MatrixView(RosegardenGUIDoc *doc,
TQString backgroundPixmap = isDrumMode() ? "bg-paper-white.xpm" : "bg-matrix-lines.xpm"; TQString backgroundPixmap = isDrumMode() ? "bg-paper-white.xpm" : "bg-matrix-lines.xpm";
if (background.load(TQString("%1/misc/%2"). if (background.load(TQString("%1/misc/%2").
arg(pixmapDir, backgroundPixmap))) { arg(pixmapDir, backgroundPixmap))) {
tCanvas->tqsetBackgroundPixmap(background); tCanvas->setBackgroundPixmap(background);
} }
} }
@ -440,7 +440,7 @@ MatrixView::MatrixView(RosegardenGUIDoc *doc,
for (unsigned int i = 0; i < m_staffs.size(); ++i) { for (unsigned int i = 0; i < m_staffs.size(); ++i) {
m_staffs[i]->positionAllElements(); m_staffs[i]->positionAllElements();
m_staffs[i]->getSegment().getRefreshtqStatus m_staffs[i]->getSegment().getRefreshStatus
(m_segmentsRefreshStatusIds[i]).setNeedsRefresh(false); (m_segmentsRefreshStatusIds[i]).setNeedsRefresh(false);
} }
} }
@ -667,7 +667,7 @@ void MatrixView::setupActions()
icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap("chord"))); icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap("chord")));
(new KToggleAction(i18n("C&hord Insert Mode"), icon, Key_H, (new KToggleAction(i18n("C&hord Insert Mode"), icon, Key_H,
TQT_TQOBJECT(this), TQT_SLOT(slotUpdateInsertModetqStatus()), TQT_TQOBJECT(this), TQT_SLOT(slotUpdateInsertModeStatus()),
actionCollection(), "chord_mode"))-> actionCollection(), "chord_mode"))->
setChecked(false); setChecked(false);
@ -1197,7 +1197,7 @@ void MatrixView::setCurrentSelection(EventSelection* s, bool preview,
std::max(endA, endB)); std::max(endA, endB));
} else { } else {
// mark refresh status and then request a tqrepaint // mark refresh status and then request a tqrepaint
segment.getRefreshtqStatus segment.getRefreshStatus
(m_segmentsRefreshStatusIds (m_segmentsRefreshStatusIds
[getStaff(segment)->getId()]). [getStaff(segment)->getId()]).
push(std::min(startA, startB), std::max(endA, endB)); push(std::min(startA, startB), std::max(endA, endB));
@ -1215,12 +1215,12 @@ void MatrixView::setCurrentSelection(EventSelection* s, bool preview,
} else { } else {
// mark refresh status and then request a tqrepaint // mark refresh status and then request a tqrepaint
oldSelection->getSegment().getRefreshtqStatus oldSelection->getSegment().getRefreshStatus
(m_segmentsRefreshStatusIds (m_segmentsRefreshStatusIds
[getStaff(oldSelection->getSegment())->getId()]). [getStaff(oldSelection->getSegment())->getId()]).
push(startA, endA); push(startA, endA);
s->getSegment().getRefreshtqStatus s->getSegment().getRefreshStatus
(m_segmentsRefreshStatusIds (m_segmentsRefreshStatusIds
[getStaff(s->getSegment())->getId()]). [getStaff(s->getSegment())->getId()]).
push(startB, endB); push(startB, endB);
@ -2928,7 +2928,7 @@ MatrixView::slotToggleStepByStep()
} }
void void
MatrixView::slotUpdateInsertModetqStatus() MatrixView::slotUpdateInsertModeStatus()
{ {
TQString message; TQString message;
if (isInChordMode()) { if (isInChordMode()) {
@ -3044,7 +3044,7 @@ MatrixView::slotPercussionSetChanged(Instrument * newInstr)
m_pitchRuler = pitchRuler; m_pitchRuler = pitchRuler;
m_pianoView->addChild(m_pitchRuler); m_pianoView->addChild(m_pitchRuler);
m_pitchRuler->show(); m_pitchRuler->show();
m_pianoView->setFixedWidth(pitchRuler->tqsizeHint().width()); m_pianoView->setFixedWidth(pitchRuler->sizeHint().width());
// Update matrix canvas // Update matrix canvas
readjustCanvasSize(); readjustCanvasSize();
@ -3054,7 +3054,7 @@ MatrixView::slotPercussionSetChanged(Instrument * newInstr)
else { else {
MATRIX_DEBUG << "MatrixView : rendering elements\n"; MATRIX_DEBUG << "MatrixView : rendering elements\n";
m_staffs[0]->positionAllElements(); m_staffs[0]->positionAllElements();
m_staffs[0]->getSegment().getRefreshtqStatus m_staffs[0]->getSegment().getRefreshStatus
(m_segmentsRefreshStatusIds[0]).setNeedsRefresh(false); (m_segmentsRefreshStatusIds[0]).setNeedsRefresh(false);
update(); update();
} }

@ -190,7 +190,7 @@ public:
* Adjust an X coord by world matrix * Adjust an X coord by world matrix
*/ */
double getXbyWorldMatrix(double value) double getXbyWorldMatrix(double value)
{ return m_canvasView->tqworldMatrix().m11() * value; } { return m_canvasView->worldMatrix().m11() * value; }
double getXbyInverseWorldMatrix(double value) double getXbyInverseWorldMatrix(double value)
{ return m_canvasView->inverseWorldMatrix().m11() * value; } { return m_canvasView->inverseWorldMatrix().m11() * value; }
@ -292,7 +292,7 @@ public slots:
void slotToggleStepByStep(); void slotToggleStepByStep();
/// status stuff /// status stuff
void slotUpdateInsertModetqStatus(); void slotUpdateInsertModeStatus();
/// transforms /// transforms
void slotTransformsQuantize(); void slotTransformsQuantize();
@ -600,7 +600,7 @@ protected:
timeT m_lastEndMarkerTime; timeT m_lastEndMarkerTime;
// tqStatus bar elements // Status bar elements
TQLabel* m_hoveredOverAbsoluteTime; TQLabel* m_hoveredOverAbsoluteTime;
TQLabel* m_hoveredOverNoteName; TQLabel* m_hoveredOverNoteName;
TQLabel *m_selectionCounter; TQLabel *m_selectionCounter;

@ -65,13 +65,13 @@ PianoKeyboard::PianoKeyboard(TQWidget *parent, int keys)
setMouseTracking(true); setMouseTracking(true);
} }
TQSize PianoKeyboard::tqsizeHint() const TQSize PianoKeyboard::sizeHint() const
{ {
return TQSize(m_keySize.width(), return TQSize(m_keySize.width(),
m_keySize.height() * m_nbKeys); m_keySize.height() * m_nbKeys);
} }
TQSize PianoKeyboard::tqminimumSizeHint() const TQSize PianoKeyboard::minimumSizeHint() const
{ {
return m_keySize; return m_keySize;
} }
@ -154,7 +154,7 @@ void PianoKeyboard::paintEvent(TQPaintEvent*)
label.getTQString()); label.getTQString());
} }
paint.setBrush(tqcolorGroup().foreground()); paint.setBrush(colorGroup().foreground());
for (unsigned int i = 0; i < m_blackKeyPos.size(); ++i) for (unsigned int i = 0; i < m_blackKeyPos.size(); ++i)
paint.drawRect(0, m_blackKeyPos[i], paint.drawRect(0, m_blackKeyPos[i],
@ -249,7 +249,7 @@ void PianoKeyboard::mouseMoveEvent(TQMouseEvent* e)
// //
// RWB (20040220) // RWB (20040220)
// //
MatrixView *matrixView = dynamic_cast<MatrixView*>(tqtopLevelWidget()); MatrixView *matrixView = dynamic_cast<MatrixView*>(topLevelWidget());
if (matrixView) { if (matrixView) {
MatrixStaff *staff = matrixView->getStaff(0); MatrixStaff *staff = matrixView->getStaff(0);

@ -49,8 +49,8 @@ class PianoKeyboard : public PitchRuler
public: public:
PianoKeyboard(TQWidget *parent, int keys = 88); PianoKeyboard(TQWidget *parent, int keys = 88);
virtual TQSize tqsizeHint() const; virtual TQSize sizeHint() const;
virtual TQSize tqminimumSizeHint() const; virtual TQSize minimumSizeHint() const;
/* /*
* We want to be able to call this from the matrix view * We want to be able to call this from the matrix view

@ -68,7 +68,7 @@ void QCanvasMatrixDiamond::drawShape(TQPainter & p)
TQPointArray pa(4); TQPointArray pa(4);
int q = height() / 2 + 2; int q = height() / 2 + 2;
TQPoint mapPos = p.tqworldMatrix().map(TQPoint(int(x()), int(y()))); TQPoint mapPos = p.worldMatrix().map(TQPoint(int(x()), int(y())));
pa[0] = TQPoint(mapPos.x(), mapPos.y() - 3); pa[0] = TQPoint(mapPos.x(), mapPos.y() - 3);
pa[1] = TQPoint(mapPos.x() + q, mapPos.y() - 3 + q); pa[1] = TQPoint(mapPos.x() + q, mapPos.y() - 3 + q);

@ -125,7 +125,7 @@ void FontViewFrame::setGlyphs(bool glyphs)
update(); update();
} }
TQSize FontViewFrame::tqsizeHint() const TQSize FontViewFrame::sizeHint() const
{ {
return TQSize(16 * m_fontSize * 3 / 2 + margin() + 2 * frameWidth(), return TQSize(16 * m_fontSize * 3 / 2 + margin() + 2 * frameWidth(),
16 * m_fontSize * 3 / 2 + margin() + 2 * frameWidth()); 16 * m_fontSize * 3 / 2 + margin() + 2 * frameWidth());

@ -49,7 +49,7 @@ public:
FontViewFrame(int pixelSize, TQWidget *parent = 0, const char *name = 0); FontViewFrame(int pixelSize, TQWidget *parent = 0, const char *name = 0);
virtual ~FontViewFrame(); virtual ~FontViewFrame();
TQSize tqsizeHint() const; TQSize sizeHint() const;
bool hasRow(int row) const; bool hasRow(int row) const;
public slots: public slots:

@ -473,8 +473,8 @@ protected:
TQPainter *m_printPainter; TQPainter *m_printPainter;
enum BartqStatus { UnRendered = 0, Rendered, Positioned }; enum BarStatus { UnRendered = 0, Rendered, Positioned };
typedef std::map<int, BartqStatus> BarStatusMap; typedef std::map<int, BarStatus> BarStatusMap;
BarStatusMap m_status; BarStatusMap m_status;
std::pair<int, int> m_lastRenderCheck; std::pair<int, int> m_lastRenderCheck;
bool m_ready; bool m_ready;

@ -585,7 +585,7 @@ NotationView::NotationView(RosegardenGUIDoc *doc,
setPageMode(mode); setPageMode(mode);
for (unsigned int i = 0; i < m_staffs.size(); ++i) { for (unsigned int i = 0; i < m_staffs.size(); ++i) {
m_staffs[i]->getSegment().getRefreshtqStatus m_staffs[i]->getSegment().getRefreshStatus
(m_segmentsRefreshStatusIds[i]).setNeedsRefresh(false); (m_segmentsRefreshStatusIds[i]).setNeedsRefresh(false);
} }
@ -754,7 +754,7 @@ NotationView::NotationView(RosegardenGUIDoc *doc,
slotSetInsertCursorPosition(0); slotSetInsertCursorPosition(0);
slotSetPointerPosition(doc->getComposition().getPosition()); slotSetPointerPosition(doc->getComposition().getPosition());
setCurrentSelection(0, false, true); setCurrentSelection(0, false, true);
slotUpdateInsertModetqStatus(); slotUpdateInsertModeStatus();
m_chordNameRuler->tqrepaint(); m_chordNameRuler->tqrepaint();
m_tempoRuler->tqrepaint(); m_tempoRuler->tqrepaint();
m_rawNoteRuler->tqrepaint(); m_rawNoteRuler->tqrepaint();
@ -930,7 +930,7 @@ NotationView::NotationView(RosegardenGUIDoc *doc,
setPageMode(LinedStaff::MultiPageMode); // also positions and renders the staffs! setPageMode(LinedStaff::MultiPageMode); // also positions and renders the staffs!
for (unsigned int i = 0; i < m_staffs.size(); ++i) { for (unsigned int i = 0; i < m_staffs.size(); ++i) {
m_staffs[i]->getSegment().getRefreshtqStatus m_staffs[i]->getSegment().getRefreshStatus
(m_segmentsRefreshStatusIds[i]).setNeedsRefresh(false); (m_segmentsRefreshStatusIds[i]).setNeedsRefresh(false);
} }
@ -1365,14 +1365,14 @@ void NotationView::positionPages()
if (m_pageMode != LinedStaff::MultiPageMode) { if (m_pageMode != LinedStaff::MultiPageMode) {
if (haveBackground) { if (haveBackground) {
canvas()->tqsetBackgroundPixmap(background); canvas()->setBackgroundPixmap(background);
getCanvasView()->setBackgroundMode(TQt::FixedPixmap); getCanvasView()->setBackgroundMode(TQt::FixedPixmap);
getCanvasView()->setPaletteBackgroundPixmap(background); getCanvasView()->setPaletteBackgroundPixmap(background);
getCanvasView()->setErasePixmap(background); getCanvasView()->setErasePixmap(background);
} }
} else { } else {
if (haveBackground) { if (haveBackground) {
canvas()->tqsetBackgroundPixmap(deskBackground); canvas()->setBackgroundPixmap(deskBackground);
getCanvasView()->setBackgroundMode(TQt::FixedPixmap); getCanvasView()->setBackgroundMode(TQt::FixedPixmap);
getCanvasView()->setPaletteBackgroundPixmap(background); getCanvasView()->setPaletteBackgroundPixmap(background);
getCanvasView()->setErasePixmap(background); getCanvasView()->setErasePixmap(background);
@ -1482,13 +1482,13 @@ void NotationView::readOptions()
opt = m_config->readBoolEntry("Show Annotations", true); opt = m_config->readBoolEntry("Show Annotations", true);
m_annotationsVisible = opt; m_annotationsVisible = opt;
getToggleAction("show_annotations")->setChecked(opt); getToggleAction("show_annotations")->setChecked(opt);
slotUpdateAnnotationstqStatus(); slotUpdateAnnotationsStatus();
// slotToggleAnnotations(); // slotToggleAnnotations();
opt = m_config->readBoolEntry("Show LilyPond Directives", true); opt = m_config->readBoolEntry("Show LilyPond Directives", true);
m_lilyPondDirectivesVisible = opt; m_lilyPondDirectivesVisible = opt;
getToggleAction("show_lilypond_directives")->setChecked(opt); getToggleAction("show_lilypond_directives")->setChecked(opt);
slotUpdateLilyPondDirectivestqStatus(); slotUpdateLilyPondDirectivesStatus();
} }
void NotationView::setupActions() void NotationView::setupActions()
@ -1910,21 +1910,21 @@ void NotationView::setupActions()
icon = TQIconSet(NotePixmapFactory::toTQPixmap icon = TQIconSet(NotePixmapFactory::toTQPixmap
(NotePixmapFactory::makeToolbarPixmap("triplet"))); (NotePixmapFactory::makeToolbarPixmap("triplet")));
(new KToggleAction(i18n("Trip&let Insert Mode"), icon, Key_G, (new KToggleAction(i18n("Trip&let Insert Mode"), icon, Key_G,
TQT_TQOBJECT(this), TQT_SLOT(slotUpdateInsertModetqStatus()), TQT_TQOBJECT(this), TQT_SLOT(slotUpdateInsertModeStatus()),
actionCollection(), "triplet_mode"))-> actionCollection(), "triplet_mode"))->
setChecked(false); setChecked(false);
icon = TQIconSet(NotePixmapFactory::toTQPixmap icon = TQIconSet(NotePixmapFactory::toTQPixmap
(NotePixmapFactory::makeToolbarPixmap("chord"))); (NotePixmapFactory::makeToolbarPixmap("chord")));
(new KToggleAction(i18n("C&hord Insert Mode"), icon, Key_H, (new KToggleAction(i18n("C&hord Insert Mode"), icon, Key_H,
TQT_TQOBJECT(this), TQT_SLOT(slotUpdateInsertModetqStatus()), TQT_TQOBJECT(this), TQT_SLOT(slotUpdateInsertModeStatus()),
actionCollection(), "chord_mode"))-> actionCollection(), "chord_mode"))->
setChecked(false); setChecked(false);
icon = TQIconSet(NotePixmapFactory::toTQPixmap icon = TQIconSet(NotePixmapFactory::toTQPixmap
(NotePixmapFactory::makeToolbarPixmap("group-grace"))); (NotePixmapFactory::makeToolbarPixmap("group-grace")));
(new KToggleAction(i18n("Grace Insert Mode"), icon, 0, (new KToggleAction(i18n("Grace Insert Mode"), icon, 0,
TQT_TQOBJECT(this), TQT_SLOT(slotUpdateInsertModetqStatus()), TQT_TQOBJECT(this), TQT_SLOT(slotUpdateInsertModeStatus()),
actionCollection(), "grace_mode"))-> actionCollection(), "grace_mode"))->
setChecked(false); setChecked(false);
/*!!! /*!!!
@ -2990,12 +2990,12 @@ NotationView::paintEvent(TQPaintEvent *e)
} }
} }
slotSetOperationNameAndtqStatus(i18n(" Ready.")); slotSetOperationNameAndStatus(i18n(" Ready."));
} }
bool NotationView::applyLayout(int staffNo, timeT startTime, timeT endTime) bool NotationView::applyLayout(int staffNo, timeT startTime, timeT endTime)
{ {
slotSetOperationNameAndtqStatus(i18n("Laying out score...")); slotSetOperationNameAndStatus(i18n("Laying out score..."));
ProgressDialog::processEvents(); ProgressDialog::processEvents();
m_htqlayout->setStaffCount(m_staffs.size()); m_htqlayout->setStaffCount(m_staffs.size());
@ -3008,7 +3008,7 @@ bool NotationView::applyLayout(int staffNo, timeT startTime, timeT endTime)
if (staffNo >= 0 && (int)i != staffNo) if (staffNo >= 0 && (int)i != staffNo)
continue; continue;
slotSetOperationNameAndtqStatus(i18n("Laying out staff %1...").tqarg(i + 1)); slotSetOperationNameAndStatus(i18n("Laying out staff %1...").tqarg(i + 1));
ProgressDialog::processEvents(); ProgressDialog::processEvents();
m_htqlayout->resetStaff(*m_staffs[i], startTime, endTime); m_htqlayout->resetStaff(*m_staffs[i], startTime, endTime);
@ -3017,7 +3017,7 @@ bool NotationView::applyLayout(int staffNo, timeT startTime, timeT endTime)
m_vtqlayout->scanStaff(*m_staffs[i], startTime, endTime); m_vtqlayout->scanStaff(*m_staffs[i], startTime, endTime);
} }
slotSetOperationNameAndtqStatus(i18n("Reconciling staffs...")); slotSetOperationNameAndStatus(i18n("Reconciling staffs..."));
ProgressDialog::processEvents(); ProgressDialog::processEvents();
m_htqlayout->finishLayout(startTime, endTime); m_htqlayout->finishLayout(startTime, endTime);
@ -3195,7 +3195,7 @@ void NotationView::setCurrentSelection(EventSelection* s, bool preview,
std::max(endA, endB)); std::max(endA, endB));
} else { } else {
// mark refresh status and then request a tqrepaint // mark refresh status and then request a tqrepaint
segment.getRefreshtqStatus segment.getRefreshStatus
(m_segmentsRefreshStatusIds (m_segmentsRefreshStatusIds
[getLinedStaff(segment)->getId()]). [getLinedStaff(segment)->getId()]).
push(std::min(startA, startB), std::max(endA, endB)); push(std::min(startA, startB), std::max(endA, endB));
@ -3213,12 +3213,12 @@ void NotationView::setCurrentSelection(EventSelection* s, bool preview,
} else { } else {
// mark refresh status and then request a tqrepaint // mark refresh status and then request a tqrepaint
oldSelection->getSegment().getRefreshtqStatus oldSelection->getSegment().getRefreshStatus
(m_segmentsRefreshStatusIds (m_segmentsRefreshStatusIds
[getLinedStaff(oldSelection->getSegment())->getId()]). [getLinedStaff(oldSelection->getSegment())->getId()]).
push(startA, endA); push(startA, endA);
s->getSegment().getRefreshtqStatus s->getSegment().getRefreshStatus
(m_segmentsRefreshStatusIds (m_segmentsRefreshStatusIds
[getLinedStaff(s->getSegment())->getId()]). [getLinedStaff(s->getSegment())->getId()]).
push(startB, endB); push(startB, endB);
@ -3809,7 +3809,7 @@ void NotationView::refreshSegment(Segment *segment,
} }
setMenuStates(); setMenuStates();
slotSetOperationNameAndtqStatus(i18n(" Ready.")); slotSetOperationNameAndStatus(i18n(" Ready."));
NOTATION_DEBUG << "*** " << endl; NOTATION_DEBUG << "*** " << endl;
} }
@ -3876,7 +3876,7 @@ void NotationView::readjustCanvasSize()
double maxWidth = 0.0; double maxWidth = 0.0;
int maxHeight = 0; int maxHeight = 0;
slotSetOperationNameAndtqStatus(i18n("Sizing and allocating canvas...")); slotSetOperationNameAndStatus(i18n("Sizing and allocating canvas..."));
ProgressDialog::processEvents(); ProgressDialog::processEvents();
int progressTotal = m_staffs.size() + 2; int progressTotal = m_staffs.size() + 2;
@ -4146,7 +4146,7 @@ void NotationView::setupProgress(ProgressDialog* dialog)
for (unsigned int i = 0; i < m_staffs.size(); ++i) { for (unsigned int i = 0; i < m_staffs.size(); ++i) {
connect(m_staffs[i], TQT_SIGNAL(setOperationName(TQString)), connect(m_staffs[i], TQT_SIGNAL(setOperationName(TQString)),
this, TQT_SLOT(slotSetOperationNameAndtqStatus(TQString))); this, TQT_SLOT(slotSetOperationNameAndStatus(TQString)));
connect(dialog, TQT_SIGNAL(cancelClicked()), connect(dialog, TQT_SIGNAL(cancelClicked()),
m_staffs[i], TQT_SLOT(slotCancel())); m_staffs[i], TQT_SLOT(slotCancel()));
@ -4159,7 +4159,7 @@ void NotationView::setupProgress(ProgressDialog* dialog)
} }
void NotationView::slotSetOperationNameAndtqStatus(TQString name) void NotationView::slotSetOperationNameAndStatus(TQString name)
{ {
emit setOperationName(name); emit setOperationName(name);
statusBar()->changeItem(TQString(" %1").tqarg(name), statusBar()->changeItem(TQString(" %1").tqarg(name),
@ -4230,7 +4230,7 @@ NotationView::MarkActionDataMap* NotationView::m_markActionDataMap = 0;
void void
NotationView::slotUpdateInsertModetqStatus() NotationView::slotUpdateInsertModeStatus()
{ {
TQString tripletMessage = i18n("Triplet"); TQString tripletMessage = i18n("Triplet");
TQString chordMessage = i18n("Chord"); TQString chordMessage = i18n("Chord");
@ -4253,7 +4253,7 @@ NotationView::slotUpdateInsertModetqStatus()
} }
void void
NotationView::slotUpdateAnnotationstqStatus() NotationView::slotUpdateAnnotationsStatus()
{ {
if (!areAnnotationsVisible()) { if (!areAnnotationsVisible()) {
for (int i = 0; i < getStaffCount(); ++i) { for (int i = 0; i < getStaffCount(); ++i) {
@ -4273,7 +4273,7 @@ NotationView::slotUpdateAnnotationstqStatus()
} }
void void
NotationView::slotUpdateLilyPondDirectivestqStatus() NotationView::slotUpdateLilyPondDirectivesStatus()
{ {
if (!areLilyPondDirectivesVisible()) { if (!areLilyPondDirectivesVisible()) {
for (int i = 0; i < getStaffCount(); ++i) { for (int i = 0; i < getStaffCount(); ++i) {
@ -6998,7 +6998,7 @@ void NotationView::slotToggleTempoRuler()
void NotationView::slotToggleAnnotations() void NotationView::slotToggleAnnotations()
{ {
m_annotationsVisible = !m_annotationsVisible; m_annotationsVisible = !m_annotationsVisible;
slotUpdateAnnotationstqStatus(); slotUpdateAnnotationsStatus();
//!!! use refresh mechanism //!!! use refresh mechanism
refreshSegment(0, 0, 0); refreshSegment(0, 0, 0);
} }
@ -7006,7 +7006,7 @@ void NotationView::slotToggleAnnotations()
void NotationView::slotToggleLilyPondDirectives() void NotationView::slotToggleLilyPondDirectives()
{ {
m_lilyPondDirectivesVisible = !m_lilyPondDirectivesVisible; m_lilyPondDirectivesVisible = !m_lilyPondDirectivesVisible;
slotUpdateLilyPondDirectivestqStatus(); slotUpdateLilyPondDirectivesStatus();
//!!! use refresh mechanism //!!! use refresh mechanism
refreshSegment(0, 0, 0); refreshSegment(0, 0, 0);
} }

@ -494,9 +494,9 @@ public slots:
void slotToggleStepByStep(); void slotToggleStepByStep();
/// status stuff /// status stuff
void slotUpdateInsertModetqStatus(); void slotUpdateInsertModeStatus();
void slotUpdateAnnotationstqStatus(); void slotUpdateAnnotationsStatus();
void slotUpdateLilyPondDirectivestqStatus(); void slotUpdateLilyPondDirectivesStatus();
/// edit menu /// edit menu
void slotPreviewSelection(); void slotPreviewSelection();
@ -812,7 +812,7 @@ public slots:
/// Do some background rendering work. /// Do some background rendering work.
void slotRenderSomething(); void slotRenderSomething();
void slotSetOperationNameAndtqStatus(TQString); void slotSetOperationNameAndStatus(TQString);
// Update notation view based on track/staff name change // Update notation view based on track/staff name change
void slotUpdateStaffName(); void slotUpdateStaffName();

@ -105,19 +105,19 @@ public:
void drawPolygon(const TQPointArray &a, bool winding = false, void drawPolygon(const TQPointArray &a, bool winding = false,
int index = 0, int n = -1) { int index = 0, int n = -1) {
m_painter->tqdrawPolygon(a, winding, index, n); m_painter->drawPolygon(a, winding, index, n);
if (m_useMask) m_maskPainter.tqdrawPolygon(a, winding, index, n); if (m_useMask) m_maskPainter.drawPolygon(a, winding, index, n);
} }
void drawPolyline(const TQPointArray &a, int index = 0, int n = -1) { void drawPolyline(const TQPointArray &a, int index = 0, int n = -1) {
m_painter->tqdrawPolyline(a, index, n); m_painter->drawPolyline(a, index, n);
if (m_useMask) m_maskPainter.tqdrawPolyline(a, index, n); if (m_useMask) m_maskPainter.drawPolyline(a, index, n);
} }
void drawPixmap(int x, int y, const TQPixmap &pm, void drawPixmap(int x, int y, const TQPixmap &pm,
int sx = 0, int sy = 0, int sw = -1, int sh = -1) { int sx = 0, int sy = 0, int sw = -1, int sh = -1) {
m_painter->tqdrawPixmap(x, y, pm, sx, sy, sw, sh); m_painter->drawPixmap(x, y, pm, sx, sy, sw, sh);
if (m_useMask) m_maskPainter.tqdrawPixmap(x, y, *(pm.mask()), sx, sy, sw, sh); if (m_useMask) m_maskPainter.drawPixmap(x, y, *(pm.mask()), sx, sy, sw, sh);
} }
void drawText(int x, int y, const TQString &string) { void drawText(int x, int y, const TQString &string) {

@ -65,7 +65,7 @@ namespace Rosegarden
{ {
// tqStatus bits // Status bits
const int TrackHeader::SEGMENT_HERE = 1 << 0; const int TrackHeader::SEGMENT_HERE = 1 << 0;
const int TrackHeader::SUPERIMPOSED_SEGMENTS = 1 << 1; const int TrackHeader::SUPERIMPOSED_SEGMENTS = 1 << 1;
const int TrackHeader::INCONSISTENT_CLEFS = 1 << 2; const int TrackHeader::INCONSISTENT_CLEFS = 1 << 2;

@ -169,7 +169,7 @@ private :
void transposeValueToName(int transpose, TQString &transposeName); void transposeValueToName(int transpose, TQString &transposeName);
// tqStatus bits // Status bits
static const int SEGMENT_HERE; static const int SEGMENT_HERE;
static const int SUPERIMPOSED_SEGMENTS; static const int SUPERIMPOSED_SEGMENTS;
static const int INCONSISTENT_CLEFS; static const int INCONSISTENT_CLEFS;

@ -48,7 +48,7 @@ InstrumentParameterPanel::InstrumentParameterPanel(RosegardenGUIDoc *doc,
int width25 = metrics.width("1234567890123456789012345"); int width25 = metrics.width("1234567890123456789012345");
m_instrumentLabel->setFixedWidth(width25); m_instrumentLabel->setFixedWidth(width25);
m_instrumentLabel->tqsetAlignment(TQt::AlignCenter); m_instrumentLabel->setAlignment(TQt::AlignCenter);
} }
void void

@ -98,7 +98,7 @@ MIDIInstrumentParameterPanel::MIDIInstrumentParameterPanel(RosegardenGUIDoc *doc
m_variationValue->setMinimumWidth(width22); m_variationValue->setMinimumWidth(width22);
m_connectionLabel->setFixedWidth(width25); m_connectionLabel->setFixedWidth(width25);
m_connectionLabel->tqsetAlignment(TQt::AlignCenter); m_connectionLabel->setAlignment(TQt::AlignCenter);
// Configure the empty final row to accomodate any extra vertical space. // Configure the empty final row to accomodate any extra vertical space.

@ -86,7 +86,7 @@ void RosegardenParameterArea::addRosegardenParameterBox(
m_parameterBoxes.push_back(b); m_parameterBoxes.push_back(b);
m_scrollView->setMinimumWidth(std::max(m_scrollView->minimumWidth(), m_scrollView->setMinimumWidth(std::max(m_scrollView->minimumWidth(),
b->tqsizeHint().width()) + 8); b->sizeHint().width()) + 8);
// Create a titled group box for the parameter box, parented by the // Create a titled group box for the parameter box, parented by the
// classic tqlayout widget, so that it can be used to provide a title // classic tqlayout widget, so that it can be used to provide a title

@ -128,7 +128,7 @@ TrackParameterBox::TrackParameterBox( RosegardenGUIDoc *doc,
// track label // track label
// //
m_trackLabel = new KSqueezedTextLabel(i18n("<untitled>"), this); m_trackLabel = new KSqueezedTextLabel(i18n("<untitled>"), this);
m_trackLabel->tqsetAlignment(TQt::AlignCenter); m_trackLabel->setAlignment(TQt::AlignCenter);
//mainLayout->addMultiCellWidget(m_trackLabel, 0, 0, 0, 5, AlignCenter); //mainLayout->addMultiCellWidget(m_trackLabel, 0, 0, 0, 5, AlignCenter);
mainLayout->addWidget(m_trackLabel, 0, 0); mainLayout->addWidget(m_trackLabel, 0, 0);

@ -121,7 +121,7 @@ ControlEditorDialog::ControlEditorDialog(TQWidget *parent,
TQFrame* btnBox = new TQFrame(mainFrame); TQFrame* btnBox = new TQFrame(mainFrame);
btnBox->tqsetSizePolicy( btnBox->setSizePolicy(
TQSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed)); TQSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed));
TQHBoxLayout* tqlayout = new TQHBoxLayout(btnBox, 4, 10); TQHBoxLayout* tqlayout = new TQHBoxLayout(btnBox, 4, 10);

@ -105,7 +105,7 @@ MarkerEditor::MarkerEditor(TQWidget *parent,
TQFrame* btnBox = new TQFrame(mainFrame); TQFrame* btnBox = new TQFrame(mainFrame);
btnBox->tqsetSizePolicy( btnBox->setSizePolicy(
TQSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed)); TQSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed));
TQHBoxLayout* tqlayout = new TQHBoxLayout(btnBox, 4, 10); TQHBoxLayout* tqlayout = new TQHBoxLayout(btnBox, 4, 10);

@ -360,13 +360,13 @@ int TrackEditor::getTrackCellHeight() const
bool TrackEditor::isCompositionModified() bool TrackEditor::isCompositionModified()
{ {
return m_doc->getComposition().getRefreshtqStatus return m_doc->getComposition().getRefreshStatus
(m_compositionRefreshStatusId).needsRefresh(); (m_compositionRefreshStatusId).needsRefresh();
} }
void TrackEditor::setCompositionModified(bool c) void TrackEditor::setCompositionModified(bool c)
{ {
m_doc->getComposition().getRefreshtqStatus m_doc->getComposition().getRefreshStatus
(m_compositionRefreshStatusId).setNeedsRefresh(c); (m_compositionRefreshStatusId).setNeedsRefresh(c);
} }
@ -490,7 +490,7 @@ TrackEditor::slotSetPointerPosition(timeT position)
if (distance >= 1.0) { if (distance >= 1.0) {
if (m_doc && m_doc->getSequenceManager() && if (m_doc && m_doc->getSequenceManager() &&
(m_doc->getSequenceManager()->getTransporttqStatus() != STOPPED)) { (m_doc->getSequenceManager()->getTransportStatus() != STOPPED)) {
if (m_playTracking) { if (m_playTracking) {
getSegmentCanvas()->slotScrollHoriz(int(double(position) / ruler->getUnitsPerPixel())); getSegmentCanvas()->slotScrollHoriz(int(double(position) / ruler->getUnitsPerPixel()));
@ -547,7 +547,7 @@ bool TrackEditor::handleAutoScroll(int currentPosition, timeT newTimePosition, d
if (moveDetected) { if (moveDetected) {
if (m_doc && m_doc->getSequenceManager() && if (m_doc && m_doc->getSequenceManager() &&
(m_doc->getSequenceManager()->getTransporttqStatus() != STOPPED)) { (m_doc->getSequenceManager()->getTransportStatus() != STOPPED)) {
if (m_playTracking) { if (m_playTracking) {
getSegmentCanvas()->slotScrollHoriz(int(double(newTimePosition) / ruler->getUnitsPerPixel())); getSegmentCanvas()->slotScrollHoriz(int(double(newTimePosition) / ruler->getUnitsPerPixel()));

@ -41,7 +41,7 @@ void
TrackHeader::paintEvent(TQPaintEvent *e) TrackHeader::paintEvent(TQPaintEvent *e)
{ {
TQPainter p( this ); TQPainter p( this );
p.setPen( tqcolorGroup().buttonText() ); p.setPen( colorGroup().buttonText() );
int pos = (orientation() == Qt::Horizontal) int pos = (orientation() == Qt::Horizontal)
? e->rect().left() ? e->rect().left()
: e->rect().top(); : e->rect().top();

@ -124,18 +124,18 @@ TrackLabel::setSelected(bool on)
if (on) { if (on) {
m_selected = true; m_selected = true;
m_instrumentLabel->setPaletteBackgroundColor(tqcolorGroup().highlight()); m_instrumentLabel->setPaletteBackgroundColor(colorGroup().highlight());
m_instrumentLabel->setPaletteForegroundColor(tqcolorGroup().highlightedText()); m_instrumentLabel->setPaletteForegroundColor(colorGroup().highlightedText());
m_trackLabel->setPaletteBackgroundColor(tqcolorGroup().highlight()); m_trackLabel->setPaletteBackgroundColor(colorGroup().highlight());
m_trackLabel->setPaletteForegroundColor(tqcolorGroup().highlightedText()); m_trackLabel->setPaletteForegroundColor(colorGroup().highlightedText());
} else { } else {
m_selected = false; m_selected = false;
m_instrumentLabel->setPaletteBackgroundColor(tqcolorGroup().background()); m_instrumentLabel->setPaletteBackgroundColor(colorGroup().background());
m_trackLabel->setPaletteBackgroundColor(tqcolorGroup().background()); m_trackLabel->setPaletteBackgroundColor(colorGroup().background());
m_instrumentLabel->setPaletteForegroundColor(tqcolorGroup().text()); m_instrumentLabel->setPaletteForegroundColor(colorGroup().text());
m_trackLabel->setPaletteForegroundColor(tqcolorGroup().text()); m_trackLabel->setPaletteForegroundColor(colorGroup().text());
} }
if (visibleWidget()) if (visibleWidget())
visibleWidget()->update(); visibleWidget()->update();

@ -43,7 +43,7 @@ TrackVUMeter::TrackVUMeter(TQWidget *parent,
VUMeter(parent, type, false, false, width, height, VUMeter::Horizontal, name), VUMeter(parent, type, false, false, width, height, VUMeter::Horizontal, name),
m_position(position), m_textHeight(12) m_position(position), m_textHeight(12)
{ {
tqsetAlignment(AlignCenter); setAlignment(AlignCenter);
TQFont font; TQFont font;
font.setPointSize(font.pointSize() * 95 / 100); font.setPointSize(font.pointSize() * 95 / 100);

@ -99,7 +99,7 @@ TriggerSegmentManager::TriggerSegmentManager(TQWidget *parent,
TQFrame* btnBox = new TQFrame(mainFrame); TQFrame* btnBox = new TQFrame(mainFrame);
btnBox->tqsetSizePolicy( btnBox->setSizePolicy(
TQSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed)); TQSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed));
TQHBoxLayout* tqlayout = new TQHBoxLayout(btnBox, 4, 10); TQHBoxLayout* tqlayout = new TQHBoxLayout(btnBox, 4, 10);

@ -60,12 +60,12 @@ timeT CompositionItemHelper::getEndTime(const CompositionItem& item, const Roseg
timeT t = 0; timeT t = 0;
if (item) { if (item) {
TQRect tqitemRect = item->rect(); TQRect itemRect = item->rect();
t = std::max(grid.snapX(tqitemRect.x() + tqitemRect.width()), 0L); t = std::max(grid.snapX(itemRect.x() + itemRect.width()), 0L);
// RG_DEBUG << "CompositionItemHelper::getEndTime() : rect width = " // RG_DEBUG << "CompositionItemHelper::getEndTime() : rect width = "
// << tqitemRect.width() // << itemRect.width()
// << " - item is repeating : " << item->isRepeating() // << " - item is repeating : " << item->isRepeating()
// << " - endTime = " << t // << " - endTime = " << t
// << endl; // << endl;

@ -227,7 +227,7 @@ void CompositionView::slotUpdateSize()
RulerScale *ruler = grid().getRulerScale(); RulerScale *ruler = grid().getRulerScale();
int minWidth = tqsizeHint().width(); int minWidth = sizeHint().width();
int computedWidth = int(nearbyint(ruler->getTotalWidth())); int computedWidth = int(nearbyint(ruler->getTotalWidth()));
int width = std::max(computedWidth, minWidth); int width = std::max(computedWidth, minWidth);

@ -154,7 +154,7 @@ EditView::EditView(RosegardenGUIDoc *doc,
m_grid->addLayout(gl, RULERS_ROW, m_mainCol); m_grid->addLayout(gl, RULERS_ROW, m_mainCol);
m_grid->addMultiCellLayout(m_controlBox, CONTROLS_ROW, CONTROLS_ROW, 0, 1); m_grid->addMultiCellLayout(m_controlBox, CONTROLS_ROW, CONTROLS_ROW, 0, 1);
m_controlBox->tqsetAlignment(AlignRight); m_controlBox->setAlignment(AlignRight);
// m_grid->addWidget(m_controlRulers, CONTROLRULER_ROW, 2); // m_grid->addWidget(m_controlRulers, CONTROLRULER_ROW, 2);
m_controlRulers->hide(); m_controlRulers->hide();

@ -374,10 +374,10 @@ void EditViewBase::paintEvent(TQPaintEvent* e)
Segment* segment = m_segments[i]; Segment* segment = m_segments[i];
unsigned int refreshStatusId = m_segmentsRefreshStatusIds[i]; unsigned int refreshStatusId = m_segmentsRefreshStatusIds[i];
SegmentRefreshtqStatus &refreshtqStatus = SegmentRefreshStatus &refreshStatus =
segment->getRefreshtqStatus(refreshStatusId); segment->getRefreshStatus(refreshStatusId);
if (refreshtqStatus.needsRefresh() && isCompositionModified()) { if (refreshStatus.needsRefresh() && isCompositionModified()) {
// if composition is also modified, retqlayout everything // if composition is also modified, retqlayout everything
refreshSegment(0); refreshSegment(0);
@ -392,10 +392,10 @@ void EditViewBase::paintEvent(TQPaintEvent* e)
m_timeSigNotifier->reset(); m_timeSigNotifier->reset();
break; break;
} else if (refreshtqStatus.needsRefresh()) { } else if (refreshStatus.needsRefresh()) {
timeT startTime = refreshtqStatus.from(), timeT startTime = refreshStatus.from(),
endTime = refreshtqStatus.to(); endTime = refreshStatus.to();
if (segmentsToUpdate == 0 || startTime < updateStart) { if (segmentsToUpdate == 0 || startTime < updateStart) {
updateStart = startTime; updateStart = startTime;
@ -406,7 +406,7 @@ void EditViewBase::paintEvent(TQPaintEvent* e)
singleSegment = segment; singleSegment = segment;
++segmentsToUpdate; ++segmentsToUpdate;
refreshtqStatus.setNeedsRefresh(false); refreshStatus.setNeedsRefresh(false);
m_needUpdate = true; m_needUpdate = true;
} }
} }
@ -518,13 +518,13 @@ void EditViewBase::initSegmentRefreshStatusIds()
bool EditViewBase::isCompositionModified() bool EditViewBase::isCompositionModified()
{ {
return getDocument()->getComposition().getRefreshtqStatus return getDocument()->getComposition().getRefreshStatus
(m_compositionRefreshStatusId).needsRefresh(); (m_compositionRefreshStatusId).needsRefresh();
} }
void EditViewBase::setCompositionModified(bool c) void EditViewBase::setCompositionModified(bool c)
{ {
getDocument()->getComposition().getRefreshtqStatus getDocument()->getComposition().getRefreshStatus
(m_compositionRefreshStatusId).setNeedsRefresh(c); (m_compositionRefreshStatusId).setNeedsRefresh(c);
} }

@ -84,10 +84,10 @@ void RosegardenCanvasView::setBottomFixedWidget(TQWidget* w)
{ {
m_bottomWidget = w; m_bottomWidget = w;
if (m_bottomWidget) { if (m_bottomWidget) {
int lww = m_leftWidget ? m_leftWidget->tqsizeHint().width() : 0; int lww = m_leftWidget ? m_leftWidget->sizeHint().width() : 0;
m_bottomWidget->reparent(this, 0, TQPoint(0, 0)); m_bottomWidget->reparent(this, 0, TQPoint(0, 0));
m_bottomWidget->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed)); m_bottomWidget->setSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed));
setMargins(lww, 0, 0, m_bottomWidget->tqsizeHint().height()); setMargins(lww, 0, 0, m_bottomWidget->sizeHint().height());
} }
} }
@ -399,7 +399,7 @@ void RosegardenCanvasView::updateBottomWidgetGeometry()
if (!m_bottomWidget) if (!m_bottomWidget)
return ; return ;
int bottomWidgetHeight = m_bottomWidget->tqsizeHint().height(); int bottomWidgetHeight = m_bottomWidget->sizeHint().height();
int leftWidgetWidth = 0; int leftWidgetWidth = 0;
if (m_leftWidget && m_leftWidget->isVisible()) { if (m_leftWidget && m_leftWidget->isVisible()) {
@ -447,10 +447,10 @@ void RosegardenCanvasView::setLeftFixedWidget(TQWidget* w)
{ {
m_leftWidget = w; m_leftWidget = w;
if (m_leftWidget) { if (m_leftWidget) {
int bwh = m_bottomWidget ? m_bottomWidget->tqsizeHint().height() : 0; int bwh = m_bottomWidget ? m_bottomWidget->sizeHint().height() : 0;
m_leftWidget->reparent(this, 0, TQPoint(0, 0)); m_leftWidget->reparent(this, 0, TQPoint(0, 0));
m_leftWidget->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Preferred)); m_leftWidget->setSizePolicy(TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Preferred));
setMargins(m_leftWidget->tqsizeHint().width(), 0, 0, bwh); setMargins(m_leftWidget->sizeHint().width(), 0, 0, bwh);
} }
} }
@ -467,7 +467,7 @@ void RosegardenCanvasView::updateLeftWidgetGeometry()
m_leftWidget->setFixedWidth(leftWidgetWidth); m_leftWidget->setFixedWidth(leftWidgetWidth);
int bottomWidgetHeight = m_bottomWidget ? int bottomWidgetHeight = m_bottomWidget ?
m_bottomWidget->tqsizeHint().height() : 0; m_bottomWidget->sizeHint().height() : 0;
setMargins(leftWidgetWidth, 0, 0, bottomWidgetHeight); setMargins(leftWidgetWidth, 0, 0, bottomWidgetHeight);

@ -75,8 +75,8 @@ void RosegardenScrollView::setBottomFixedWidget(TQWidget* w)
m_bottomWidget = w; m_bottomWidget = w;
if (m_bottomWidget) { if (m_bottomWidget) {
m_bottomWidget->reparent(this, 0, TQPoint(0, 0)); m_bottomWidget->reparent(this, 0, TQPoint(0, 0));
m_bottomWidget->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed)); m_bottomWidget->setSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed));
setMargins(0, 0, 0, m_bottomWidget->tqsizeHint().height()); setMargins(0, 0, 0, m_bottomWidget->sizeHint().height());
} }
} }
@ -376,7 +376,7 @@ void RosegardenScrollView::updateBottomWidgetGeometry()
if (!m_bottomWidget) if (!m_bottomWidget)
return ; return ;
int bottomWidgetHeight = m_bottomWidget->tqsizeHint().height(); int bottomWidgetHeight = m_bottomWidget->sizeHint().height();
setMargins(0, 0, 0, bottomWidgetHeight); setMargins(0, 0, 0, bottomWidgetHeight);
TQRect r = frameRect(); TQRect r = frameRect();

@ -131,7 +131,7 @@ TQCanvasItemGroup::setVisible(bool yes)
{ {
TQCanvasItemList::Iterator i; TQCanvasItemList::Iterator i;
for (i = m_items.begin(); i != m_items.end(); ++i) for (i = m_items.begin(); i != m_items.end(); ++i)
(*i)->tqsetVisible(yes); (*i)->setVisible(yes);
} }
void void
@ -141,7 +141,7 @@ TQCanvasItemGroup::setSelected(bool yes)
TQCanvasItemList::Iterator i; TQCanvasItemList::Iterator i;
for (i = m_items.begin(); i != m_items.end(); ++i) for (i = m_items.begin(); i != m_items.end(); ++i)
(*i)->tqsetVisible(yes); (*i)->setVisible(yes);
} }
void void

@ -59,7 +59,7 @@
* *
* Revision 1.19 2001/08/08 14:35:12 hausmann * Revision 1.19 2001/08/08 14:35:12 hausmann
* - removed empty KActionCollection::childEvent * - removed empty KActionCollection::childEvent
* - added tqsizeHint() and tqminimumSizeHint() methods to KLed, as advised by * - added sizeHint() and minimumSizeHint() methods to KLed, as advised by
* Rik in the comment in kled.h * Rik in the comment in kled.h
* - removed unused mousePressEvent, mouseMoveEvent and mouseReleaseEvent * - removed unused mousePressEvent, mouseMoveEvent and mouseReleaseEvent
* handlers from KPassDlg * handlers from KPassDlg
@ -298,7 +298,7 @@ KLed::paintFlat() // paint a ROUND FLAT led lamp
brush.setColor( color ); brush.setColor( color );
pen.setWidth( 1 ); pen.setWidth( 1 );
color = tqcolorGroup().dark(); color = colorGroup().dark();
pen.setColor( color ); // Set the pen accordingly pen.setColor( color ); // Set the pen accordingly
paint.setPen( pen ); // Select pen for drawing paint.setPen( pen ); // Select pen for drawing
@ -386,7 +386,7 @@ KLed::paintRound() // paint a ROUND RAISED led lamp
// avoid that the border can be erased by the bright spot of the LED // avoid that the border can be erased by the bright spot of the LED
pen.setWidth( 1 ); pen.setWidth( 1 );
color = tqcolorGroup().dark(); color = colorGroup().dark();
pen.setColor( color ); // Set the pen accordingly pen.setColor( color ); // Set the pen accordingly
paint.setPen( pen ); // Select pen for drawing paint.setPen( pen ); // Select pen for drawing
brush.setStyle( Qt::NoBrush ); // Switch off the brush brush.setStyle( Qt::NoBrush ); // Switch off the brush
@ -509,11 +509,11 @@ KLed::paintSunken() // paint a ROUND SUNKEN led lamp
brush.setStyle( Qt::NoBrush ); // Switch off the brush brush.setStyle( Qt::NoBrush ); // Switch off the brush
paint.setBrush( brush ); // This avoids filling of the ellipse paint.setBrush( brush ); // This avoids filling of the ellipse
// Set the initial color value to tqcolorGroup().light() (bright) and start // Set the initial color value to colorGroup().light() (bright) and start
// drawing the shadow border at 45<34> (45*16 = 720). // drawing the shadow border at 45<34> (45*16 = 720).
int angle = -720; int angle = -720;
color = tqcolorGroup().light(); color = colorGroup().light();
for ( int arc = 120; arc < 2880; arc += 240 ) for ( int arc = 120; arc < 2880; arc += 240 )
{ {
@ -713,13 +713,13 @@ KLed::off()
} }
TQSize TQSize
KLed::tqsizeHint() const KLed::sizeHint() const
{ {
return TQSize(16, 16); return TQSize(16, 16);
} }
TQSize TQSize
KLed::tqminimumSizeHint() const KLed::minimumSizeHint() const
{ {
return TQSize(16, 16 ); return TQSize(16, 16 );
} }

@ -690,12 +690,12 @@ bool KlearlookStyle::eventFilter( TQObject *object, TQEvent *event ) {
if ( toolbar ) if ( toolbar )
horiz_grad = toolbar->orientation() == TQt::Vertical; horiz_grad = toolbar->orientation() == TQt::Vertical;
drawBevelGradient( parent->tqcolorGroup().background(), true, 1, &TQPainter( widget ), drawBevelGradient( parent->colorGroup().background(), true, 1, &TQPainter( widget ),
TQRect( x_offset, y_offset, pr.width(), pr.height() ), TQRect( x_offset, y_offset, pr.width(), pr.height() ),
horiz_grad, SHADE_BAR_LIGHT, SHADE_BAR_DARK ); horiz_grad, SHADE_BAR_LIGHT, SHADE_BAR_DARK );
#else #else
TQPainter( widget ).fillRect( widget->rect(), parent->tqcolorGroup().background() ); TQPainter( widget ).fillRect( widget->rect(), parent->colorGroup().background() );
#endif #endif
return false; // Now draw the contents return false; // Now draw the contents
@ -707,10 +707,10 @@ bool KlearlookStyle::eventFilter( TQObject *object, TQEvent *event ) {
TQPainter painter( frame ); TQPainter painter( frame );
if ( TQFrame::VLine == frame->frameShape() ) if ( TQFrame::VLine == frame->frameShape() )
tqdrawPrimitive( PE_DockWindowSeparator, &painter, tqdrawPrimitive( PE_DockWindowSeparator, &painter,
frame->rect(), frame->tqcolorGroup(), Style_Horizontal ); frame->rect(), frame->colorGroup(), Style_Horizontal );
else if ( TQFrame::HLine == frame->frameShape() ) else if ( TQFrame::HLine == frame->frameShape() )
tqdrawPrimitive( PE_DockWindowSeparator, &painter, tqdrawPrimitive( PE_DockWindowSeparator, &painter,
frame->rect(), frame->tqcolorGroup() ); frame->rect(), frame->colorGroup() );
else else
return false; return false;
return true; // been drawn! return true; // been drawn!
@ -2196,7 +2196,7 @@ void KlearlookStyle::drawKStylePrimitive( KStylePrimitive kpe, TQPainter *p, con
} }
} }
void KlearlookStyle::tqdrawControl( void KlearlookStyle::drawControl(
ControlElement control, ControlElement control,
TQPainter *p, TQPainter *p,
const TQWidget *widget, const TQWidget *widget,
@ -2375,7 +2375,7 @@ void KlearlookStyle::tqdrawControl(
p->fillRect( fr, flags & Style_Selected ? cg.background() : gray[ 2 ] ); p->fillRect( fr, flags & Style_Selected ? cg.background() : gray[ 2 ] );
break; break;
default: default:
KStyle::tqdrawControl( control, p, widget, r, cg, flags, data ); KStyle::drawControl( control, p, widget, r, cg, flags, data );
} }
} else { } else {
TQRect br( r ); TQRect br( r );
@ -2466,10 +2466,10 @@ void KlearlookStyle::tqdrawControl(
if ( t->identifier() == tb->currentTab() ) { if ( t->identifier() == tb->currentTab() ) {
if ( TQTabBar::RoundedAbove == tb->tqshape() || TQTabBar::TriangularAbove == tb->tqshape() ) if ( TQTabBar::RoundedAbove == tb->tqshape() || TQTabBar::TriangularAbove == tb->tqshape() )
tr.setBottom( tr.bottom() - tqpixelMetric( TQStyle::PM_TabBarTabShiftVertical, tb ) ); tr.setBottom( tr.bottom() - pixelMetric( TQStyle::PM_TabBarTabShiftVertical, tb ) );
} else } else
if ( TQTabBar::RoundedBelow == tb->tqshape() || TQTabBar::TriangularBelow == tb->tqshape() ) if ( TQTabBar::RoundedBelow == tb->tqshape() || TQTabBar::TriangularBelow == tb->tqshape() )
tr.setTop( tr.top() + tqpixelMetric( TQStyle::PM_TabBarTabShiftVertical, tb ) ); tr.setTop( tr.top() + pixelMetric( TQStyle::PM_TabBarTabShiftVertical, tb ) );
drawItem( p, tr, AlignCenter | ShowPrefix, cg, flags & Style_Enabled, 0, t->text() ); drawItem( p, tr, AlignCenter | ShowPrefix, cg, flags & Style_Enabled, 0, t->text() );
@ -2489,15 +2489,15 @@ void KlearlookStyle::tqdrawControl(
// Shift button contents if pushed. // Shift button contents if pushed.
if ( active ) { if ( active ) {
x += tqpixelMetric( PM_ButtonShiftHorizontal, widget ); x += pixelMetric( PM_ButtonShiftHorizontal, widget );
y += tqpixelMetric( PM_ButtonShiftVertical, widget ); y += pixelMetric( PM_ButtonShiftVertical, widget );
flags |= Style_Sunken; flags |= Style_Sunken;
} }
// Does the button have a popup menu? // Does the button have a popup menu?
if ( button->isMenuButton() ) { if ( button->isMenuButton() ) {
int dx = tqpixelMetric( PM_MenuButtonIndicator, widget ), int dx = pixelMetric( PM_MenuButtonIndicator, widget ),
margin = tqpixelMetric( PM_ButtonMargin, widget ); margin = pixelMetric( PM_ButtonMargin, widget );
if ( button->iconSet() && !button->iconSet() ->isNull() && if ( button->iconSet() && !button->iconSet() ->isNull() &&
( dx + button->iconSet() ->pixmap ( TQIconSet::Small, TQIconSet::Normal, ( dx + button->iconSet() ->pixmap ( TQIconSet::Small, TQIconSet::Normal,
@ -2505,7 +2505,7 @@ void KlearlookStyle::tqdrawControl(
cornArrow = true; //To little room. Draw the arrow in the corner, don't adjust the widget cornArrow = true; //To little room. Draw the arrow in the corner, don't adjust the widget
else { else {
tqdrawPrimitive( PE_ArrowDown, tqdrawPrimitive( PE_ArrowDown,
p, tqvisualRect( TQRect( p, visualRect( TQRect(
( x + w ) - ( dx + margin ), y, dx, ( x + w ) - ( dx + margin ), y, dx,
h ), r ), cg, flags, data ); h ), r ), cg, flags, data );
@ -2547,7 +2547,7 @@ void KlearlookStyle::tqdrawControl(
} }
if ( cornArrow ) //Draw over the icon if ( cornArrow ) //Draw over the icon
tqdrawPrimitive( PE_ArrowDown, p, tqvisualRect( TQRect( x + w - 6, x + h - 6, 7, 7 ), r ), tqdrawPrimitive( PE_ArrowDown, p, visualRect( TQRect( x + w - 6, x + h - 6, 7, 7 ), r ),
cg, flags, data ); cg, flags, data );
if ( xo && iw ) { if ( xo && iw ) {
@ -2566,16 +2566,16 @@ void KlearlookStyle::tqdrawControl(
for ( i = 0; i < j; i++ ) for ( i = 0; i < j; i++ )
drawItem( p, TQRect( x + i, y, w, h ), drawItem( p, TQRect( x + i, y, w, h ),
AlignCenter | ShowPrefix, AlignCenter | ShowPrefix,
button->tqcolorGroup(), button->colorGroup(),
button->isEnabled(), button->isEnabled(),
button->pixmap(), button->pixmap(),
button->text(), -1, button->text(), -1,
&button->tqcolorGroup().buttonText() ); &button->colorGroup().buttonText() );
//Draw a focus rect if the button has focus //Draw a focus rect if the button has focus
if ( flags & Style_HasFocus ) if ( flags & Style_HasFocus )
tqdrawPrimitive( PE_FocusRect, p, tqdrawPrimitive( PE_FocusRect, p,
TQStyle::tqvisualRect( subRect( SR_PushButtonFocusRect, widget ), widget ), cg, flags ); TQStyle::visualRect( subRect( SR_PushButtonFocusRect, widget ), widget ), cg, flags );
break; break;
} }
@ -2636,10 +2636,10 @@ void KlearlookStyle::tqdrawControl(
bool reverse = TQApplication::reverseLayout(); bool reverse = TQApplication::reverseLayout();
if ( reverse ) { if ( reverse ) {
cr = tqvisualRect( cr, r ); cr = visualRect( cr, r );
sr = tqvisualRect( sr, r ); sr = visualRect( sr, r );
tr = tqvisualRect( tr, r ); tr = visualRect( tr, r );
ir = tqvisualRect( ir, r ); ir = visualRect( ir, r );
} }
if ( mi->iconSet() && menuIcons ) { if ( mi->iconSet() && menuIcons ) {
@ -2647,7 +2647,7 @@ void KlearlookStyle::tqdrawControl(
TQIconSet::Mode mode = flags & Style_Active TQIconSet::Mode mode = flags & Style_Active
? ( mi->isEnabled() ? TQIconSet::Active : TQIconSet::Disabled ) ? ( mi->isEnabled() ? TQIconSet::Active : TQIconSet::Disabled )
: ( mi->isEnabled() ? TQIconSet::Normal : TQIconSet::Disabled ); : ( mi->isEnabled() ? TQIconSet::Normal : TQIconSet::Disabled );
cr = tqvisualRect( TQRect( x, y, maxpmw, h ), r ); cr = visualRect( TQRect( x, y, maxpmw, h ), r );
// Do we have an icon and are checked at the same time? // Do we have an icon and are checked at the same time?
// Then draw a "pressed" background behind the icon // Then draw a "pressed" background behind the icon
@ -2879,7 +2879,7 @@ void KlearlookStyle::tqdrawControl(
case CE_PushButton: { case CE_PushButton: {
const TQPushButton *button = static_cast<const TQPushButton *>( widget ); const TQPushButton *button = static_cast<const TQPushButton *>( widget );
TQRect br( r ); TQRect br( r );
int dbi = tqpixelMetric( PM_ButtonDefaultIndicator, widget ); int dbi = pixelMetric( PM_ButtonDefaultIndicator, widget );
if ( rounded && isFormWidget( widget ) ) if ( rounded && isFormWidget( widget ) )
formMode = true; formMode = true;
@ -2914,10 +2914,10 @@ void KlearlookStyle::tqdrawControl(
!isFormWidget( widget ) ) { !isFormWidget( widget ) ) {
TQRect cr( checkbox->rect() ); TQRect cr( checkbox->rect() );
TQRegion r( TQRect( cr.x(), cr.y(), TQRegion r( TQRect( cr.x(), cr.y(),
tqvisualRect( subRect( SR_CheckBoxFocusRect, widget ), widget ).width() + visualRect( subRect( SR_CheckBoxFocusRect, widget ), widget ).width() +
tqpixelMetric( PM_IndicatorWidth ) + 4, cr.height() ) ); pixelMetric( PM_IndicatorWidth ) + 4, cr.height() ) );
r -= tqvisualRect( subRect( SR_CheckBoxIndicator, widget ), widget ); r -= visualRect( subRect( SR_CheckBoxIndicator, widget ), widget );
p->setClipRegion( r ); p->setClipRegion( r );
p->fillRect( checkbox->rect(), cg.background().light( TQTC_HIGHLIGHT_FACTOR ) ); p->fillRect( checkbox->rect(), cg.background().light( TQTC_HIGHLIGHT_FACTOR ) );
p->setClipping( false ); p->setClipping( false );
@ -2929,9 +2929,9 @@ void KlearlookStyle::tqdrawControl(
if ( checkbox->hasFocus() ) if ( checkbox->hasFocus() )
tqdrawPrimitive( PE_FocusRect, p, tqdrawPrimitive( PE_FocusRect, p,
tqvisualRect( subRect( SR_CheckBoxFocusRect, widget ), widget ), cg, flags ); visualRect( subRect( SR_CheckBoxFocusRect, widget ), widget ), cg, flags );
} else } else
KStyle::tqdrawControl( control, p, widget, r, cg, flags, data ); KStyle::drawControl( control, p, widget, r, cg, flags, data );
break; break;
case CE_RadioButton: case CE_RadioButton:
formMode = isFormWidget( widget ); formMode = isFormWidget( widget );
@ -2947,10 +2947,10 @@ void KlearlookStyle::tqdrawControl(
!isFormWidget( widget ) ) { !isFormWidget( widget ) ) {
TQRect rb( radiobutton->rect() ); TQRect rb( radiobutton->rect() );
TQRegion r( TQRect( rb.x(), rb.y(), TQRegion r( TQRect( rb.x(), rb.y(),
tqvisualRect( subRect( SR_RadioButtonFocusRect, widget ), widget ).width() + visualRect( subRect( SR_RadioButtonFocusRect, widget ), widget ).width() +
tqpixelMetric( PM_ExclusiveIndicatorWidth ) + 4, rb.height() ) ); pixelMetric( PM_ExclusiveIndicatorWidth ) + 4, rb.height() ) );
r -= tqvisualRect( subRect( SR_RadioButtonIndicator, widget ), widget ); r -= visualRect( subRect( SR_RadioButtonIndicator, widget ), widget );
p->setClipRegion( r ); p->setClipRegion( r );
p->fillRect( radiobutton->rect(), cg.background().light( TQTC_HIGHLIGHT_FACTOR ) ); p->fillRect( radiobutton->rect(), cg.background().light( TQTC_HIGHLIGHT_FACTOR ) );
p->setClipping( false ); p->setClipping( false );
@ -2963,15 +2963,15 @@ void KlearlookStyle::tqdrawControl(
if ( radiobutton->hasFocus() ) if ( radiobutton->hasFocus() )
tqdrawPrimitive( PE_FocusRect, p, tqdrawPrimitive( PE_FocusRect, p,
tqvisualRect( subRect( SR_RadioButtonFocusRect, widget ), widget ), cg, flags ); visualRect( subRect( SR_RadioButtonFocusRect, widget ), widget ), cg, flags );
break; break;
} }
default: default:
KStyle::tqdrawControl( control, p, widget, r, cg, flags, data ); KStyle::drawControl( control, p, widget, r, cg, flags, data );
} }
} }
void KlearlookStyle::tqdrawControlMask( ControlElement control, TQPainter *p, const TQWidget *widget, const TQRect &r, void KlearlookStyle::drawControlMask( ControlElement control, TQPainter *p, const TQWidget *widget, const TQRect &r,
const TQStyleOption &data ) const { const TQStyleOption &data ) const {
switch ( control ) { switch ( control ) {
case CE_PushButton: case CE_PushButton:
@ -2991,19 +2991,19 @@ void KlearlookStyle::tqdrawControlMask( ControlElement control, TQPainter *p, co
p->fillRect( r, color1 ); p->fillRect( r, color1 );
break; break;
default: default:
KStyle::tqdrawControlMask( control, p, widget, r, data ); KStyle::drawControlMask( control, p, widget, r, data );
} }
} }
void KlearlookStyle::tqdrawComplexControlMask( ComplexControl control, TQPainter *p, const TQWidget *widget, const TQRect &r, void KlearlookStyle::drawComplexControlMask( ComplexControl control, TQPainter *p, const TQWidget *widget, const TQRect &r,
const TQStyleOption &data ) const { const TQStyleOption &data ) const {
switch ( control ) { switch ( control ) {
case CC_ToolButton: case CC_ToolButton:
case CC_ComboBox: case CC_ComboBox:
tqdrawControlMask( CE_PushButton, p, widget, r, data ); drawControlMask( CE_PushButton, p, widget, r, data );
break; break;
default: default:
KStyle::tqdrawComplexControlMask( control, p, widget, r, data ); KStyle::drawComplexControlMask( control, p, widget, r, data );
} }
} }
@ -3019,7 +3019,7 @@ TQRect KlearlookStyle::subRect( SubRect subrect, const TQWidget *widget ) const
// if(button->isDefault() || button->autoDefault()) // if(button->isDefault() || button->autoDefault())
// { // {
dbw1 = tqpixelMetric( PM_ButtonDefaultIndicator, widget ); dbw1 = pixelMetric( PM_ButtonDefaultIndicator, widget );
dbw2 = dbw1 * 2; dbw2 = dbw1 * 2;
// } // }
@ -3030,20 +3030,20 @@ TQRect KlearlookStyle::subRect( SubRect subrect, const TQWidget *widget ) const
break; break;
} }
case SR_CheckBoxIndicator: { case SR_CheckBoxIndicator: {
int h = tqpixelMetric( PM_IndicatorHeight ); int h = pixelMetric( PM_IndicatorHeight );
rect.setRect( ( widget->rect().height() - h ) >> 1, rect.setRect( ( widget->rect().height() - h ) >> 1,
( widget->rect().height() - h ) >> 1, ( widget->rect().height() - h ) >> 1,
tqpixelMetric( PM_IndicatorWidth ), pixelMetric( PM_IndicatorWidth ),
h ); h );
break; break;
} }
case SR_RadioButtonIndicator: { case SR_RadioButtonIndicator: {
int h = tqpixelMetric( PM_ExclusiveIndicatorHeight ); int h = pixelMetric( PM_ExclusiveIndicatorHeight );
rect.setRect( ( widget->rect().height() - h ) >> 1, rect.setRect( ( widget->rect().height() - h ) >> 1,
( widget->rect().height() - h ) >> 1, ( widget->rect().height() - h ) >> 1,
tqpixelMetric( PM_ExclusiveIndicatorWidth ), h ); pixelMetric( PM_ExclusiveIndicatorWidth ), h );
break; break;
} }
case SR_ProgressBarContents: case SR_ProgressBarContents:
@ -3059,7 +3059,7 @@ TQRect KlearlookStyle::subRect( SubRect subrect, const TQWidget *widget ) const
return rect; return rect;
} }
void KlearlookStyle::tqdrawComplexControl( void KlearlookStyle::drawComplexControl(
ComplexControl control, ComplexControl control,
TQPainter *p, TQPainter *p,
const TQWidget *widget, const TQWidget *widget,
@ -3173,13 +3173,13 @@ void KlearlookStyle::tqdrawComplexControl(
case CC_ComboBox: { case CC_ComboBox: {
const TQComboBox *combobox = ( const TQComboBox * ) widget; const TQComboBox *combobox = ( const TQComboBox * ) widget;
TQRect frame( TQStyle::tqvisualRect( querySubControlMetrics( CC_ComboBox, TQRect frame( TQStyle::visualRect( querySubControlMetrics( CC_ComboBox,
widget,SC_ComboBoxFrame,data ),widget ) ), widget,SC_ComboBoxFrame,data ),widget ) ),
arrow( TQStyle::tqvisualRect( querySubControlMetrics( CC_ComboBox, arrow( TQStyle::visualRect( querySubControlMetrics( CC_ComboBox,
widget,SC_ComboBoxArrow,data),widget)), widget,SC_ComboBoxArrow,data),widget)),
field( TQStyle::tqvisualRect( querySubControlMetrics(CC_ComboBox, field( TQStyle::visualRect( querySubControlMetrics(CC_ComboBox,
widget,SC_ComboBoxEditField,data),widget)); widget,SC_ComboBoxEditField,data),widget));
const TQColor *use = buttonColors( cg ); const TQColor *use = buttonColors( cg );
@ -3211,7 +3211,7 @@ void KlearlookStyle::tqdrawComplexControl(
if ( controls & SC_ComboBoxEditField && field.isValid() ) { if ( controls & SC_ComboBoxEditField && field.isValid() ) {
if ( ( flags & Style_HasFocus ) && ( ! combobox->editable() ) ) { if ( ( flags & Style_HasFocus ) && ( ! combobox->editable() ) ) {
TQRect fr = TQStyle::tqvisualRect( subRect( SR_ComboBoxFocusRect, widget ), widget ); TQRect fr = TQStyle::visualRect( subRect( SR_ComboBoxFocusRect, widget ), widget );
fr.addCoords( 0, 0, -2, 0 ); fr.addCoords( 0, 0, -2, 0 );
tqdrawPrimitive( PE_FocusRect, tqdrawPrimitive( PE_FocusRect,
@ -3236,7 +3236,7 @@ void KlearlookStyle::tqdrawComplexControl(
qDrawShadePanel( qDrawShadePanel(
p, r, TQColorGroup( gray[ 5 ], gray[ NUM_SHADES ], gray[ 0 ], p, r, TQColorGroup( gray[ 5 ], gray[ NUM_SHADES ], gray[ 0 ],
gray[ 5 ], gray[ 2 ], cg.text(), gray[ NUM_SHADES ] ), gray[ 5 ], gray[ 2 ], cg.text(), gray[ NUM_SHADES ] ),
true, tqpixelMetric( PM_SpinBoxFrameWidth ) true, pixelMetric( PM_SpinBoxFrameWidth )
); );
if ( ( controls & SC_SpinWidgetUp ) && up.isValid() ) { if ( ( controls & SC_SpinWidgetUp ) && up.isValid() ) {
@ -3342,13 +3342,13 @@ void KlearlookStyle::tqdrawComplexControl(
if ( ( controls & SC_SliderHandle ) && handle.isValid() ) if ( ( controls & SC_SliderHandle ) && handle.isValid() )
drawSliderHandle( p, handle, cg, flags ); drawSliderHandle( p, handle, cg, flags );
if ( controls & SC_SliderTickmarks ) if ( controls & SC_SliderTickmarks )
TQCommonStyle::tqdrawComplexControl( TQCommonStyle::drawComplexControl(
control, p, widget, r, cg, flags, SC_SliderTickmarks, active, data control, p, widget, r, cg, flags, SC_SliderTickmarks, active, data
); );
break; break;
} }
default: default:
KStyle::tqdrawComplexControl( control, p, widget, r, cg, flags, controls, active, data ); KStyle::drawComplexControl( control, p, widget, r, cg, flags, controls, active, data );
} }
} }
@ -3359,7 +3359,7 @@ TQRect KlearlookStyle::querySubControlMetrics( TQ_ComplexControl control, const
if ( !widget ) if ( !widget )
return TQRect(); return TQRect();
int fw = tqpixelMetric( PM_SpinBoxFrameWidth, 0 ); int fw = pixelMetric( PM_SpinBoxFrameWidth, 0 );
TQSize bs; TQSize bs;
bs.setHeight( widget->height() >> 1 ); bs.setHeight( widget->height() >> 1 );
@ -3395,7 +3395,7 @@ TQRect KlearlookStyle::querySubControlMetrics( TQ_ComplexControl control, const
} }
} }
int KlearlookStyle::tqpixelMetric( PixelMetric metric, const TQWidget *widget ) const { int KlearlookStyle::pixelMetric( PixelMetric metric, const TQWidget *widget ) const {
switch ( metric ) { switch ( metric ) {
case PM_MenuButtonIndicator: case PM_MenuButtonIndicator:
return 7; return 7;
@ -3467,7 +3467,7 @@ int KlearlookStyle::tqpixelMetric( PixelMetric metric, const TQWidget *widget )
case PM_MaximumDragDistance: case PM_MaximumDragDistance:
return -1; return -1;
default: default:
return KStyle::tqpixelMetric( metric, widget ); return KStyle::pixelMetric( metric, widget );
} }
} }
@ -3496,8 +3496,8 @@ TQSize KlearlookStyle::tqsizeFromContents( ContentsType t,
bool checkable = popup->isCheckable(); bool checkable = popup->isCheckable();
if ( mi->custom() ) { if ( mi->custom() ) {
w = mi->custom() ->tqsizeHint().width(); w = mi->custom() ->sizeHint().width();
h = mi->custom() ->tqsizeHint().height(); h = mi->custom() ->sizeHint().height();
if ( !mi->custom() ->fullSpan() ) if ( !mi->custom() ->fullSpan() )
h += 4; h += 4;
} else if ( mi->widget() ) { } else if ( mi->widget() ) {
@ -3546,8 +3546,8 @@ TQSize KlearlookStyle::tqsizeFromContents( ContentsType t,
case CT_PushButton: { case CT_PushButton: {
const TQPushButton* btn = static_cast<const TQPushButton*>( widget ); const TQPushButton* btn = static_cast<const TQPushButton*>( widget );
int w = s.width() + 2 * tqpixelMetric( PM_ButtonMargin, widget ); int w = s.width() + 2 * pixelMetric( PM_ButtonMargin, widget );
int h = s.height() + 2 * tqpixelMetric( PM_ButtonMargin, widget ); int h = s.height() + 2 * pixelMetric( PM_ButtonMargin, widget );
if ( btn->text().isEmpty() && s.width() < 32 ) if ( btn->text().isEmpty() && s.width() < 32 )
return TQSize( w, h ); return TQSize( w, h );
// return button size // return button size
@ -3571,7 +3571,7 @@ TQSize KlearlookStyle::tqsizeFromContents( ContentsType t,
int KlearlookStyle::tqstyleHint( StyleHint stylehint, const TQWidget *widget, const TQStyleOption &option, TQStyleHintReturn *returnData ) const { int KlearlookStyle::styleHint( StyleHint stylehint, const TQWidget *widget, const TQStyleOption &option, TQStyleHintReturn *returnData ) const {
switch ( stylehint ) { switch ( stylehint ) {
case SH_EtchDisabledText: case SH_EtchDisabledText:
case SH_Slider_SnapToValue: case SH_Slider_SnapToValue:
@ -3593,7 +3593,7 @@ int KlearlookStyle::tqstyleHint( StyleHint stylehint, const TQWidget *widget, co
case SH_PopupMenu_AllowActiveAndDisabled: case SH_PopupMenu_AllowActiveAndDisabled:
return 0; return 0;
default: default:
return KStyle::tqstyleHint( stylehint, widget, option, returnData ); return KStyle::styleHint( stylehint, widget, option, returnData );
} }
} }
@ -3895,8 +3895,8 @@ bool KlearlookStyle::redrawHoverWidget() {
if ( rb ) { if ( rb ) {
TQRect rect( widgetZero.x(), widgetZero.y(), TQRect rect( widgetZero.x(), widgetZero.y(),
tqvisualRect( subRect( SR_RadioButtonFocusRect, rb ), rb ).width() + visualRect( subRect( SR_RadioButtonFocusRect, rb ), rb ).width() +
tqpixelMetric( PM_ExclusiveIndicatorWidth ) + 4, hoverWidget->height() ); pixelMetric( PM_ExclusiveIndicatorWidth ) + 4, hoverWidget->height() );
hover = rect.contains( cursor ) ? HOVER_RADIO : HOVER_NONE; hover = rect.contains( cursor ) ? HOVER_RADIO : HOVER_NONE;
return ( HOVER_NONE != hover && !rect.contains( oldCursor ) ) || return ( HOVER_NONE != hover && !rect.contains( oldCursor ) ) ||
@ -3906,8 +3906,8 @@ bool KlearlookStyle::redrawHoverWidget() {
if ( cb ) { if ( cb ) {
TQRect rect( widgetZero.x(), widgetZero.y(), TQRect rect( widgetZero.x(), widgetZero.y(),
tqvisualRect( subRect( SR_CheckBoxFocusRect, cb ), cb ).width() + visualRect( subRect( SR_CheckBoxFocusRect, cb ), cb ).width() +
tqpixelMetric( PM_IndicatorWidth ) + 4, hoverWidget->height() ); pixelMetric( PM_IndicatorWidth ) + 4, hoverWidget->height() );
hover = rect.contains( cursor ) ? HOVER_CHECK : HOVER_NONE; hover = rect.contains( cursor ) ? HOVER_CHECK : HOVER_NONE;
return ( HOVER_NONE != hover && !rect.contains( oldCursor ) ) || return ( HOVER_NONE != hover && !rect.contains( oldCursor ) ) ||

@ -260,23 +260,23 @@ class KlearlookStyle : public KStyle {
const TQStyleOption & = TQStyleOption::Default ) const; const TQStyleOption & = TQStyleOption::Default ) const;
void drawKStylePrimitive( KStylePrimitive kpe, TQPainter* p, const TQWidget* widget, const TQRect &r, void drawKStylePrimitive( KStylePrimitive kpe, TQPainter* p, const TQWidget* widget, const TQRect &r,
const TQColorGroup &cg, SFlags flags, const TQStyleOption &opt ) const; const TQColorGroup &cg, SFlags flags, const TQStyleOption &opt ) const;
void tqdrawControl( ControlElement, TQPainter *, const TQWidget *, const TQRect &, const TQColorGroup &, void drawControl( ControlElement, TQPainter *, const TQWidget *, const TQRect &, const TQColorGroup &,
SFlags = Style_Default, const TQStyleOption & = TQStyleOption::Default ) const; SFlags = Style_Default, const TQStyleOption & = TQStyleOption::Default ) const;
void tqdrawControlMask( ControlElement, TQPainter *, const TQWidget *, const TQRect &, void drawControlMask( ControlElement, TQPainter *, const TQWidget *, const TQRect &,
const TQStyleOption & = TQStyleOption::Default ) const; const TQStyleOption & = TQStyleOption::Default ) const;
void tqdrawComplexControlMask( ComplexControl control, TQPainter *p, const TQWidget *widget, const TQRect &r, void drawComplexControlMask( ComplexControl control, TQPainter *p, const TQWidget *widget, const TQRect &r,
const TQStyleOption &data ) const; const TQStyleOption &data ) const;
TQRect subRect( SubRect, const TQWidget * ) const; TQRect subRect( SubRect, const TQWidget * ) const;
void tqdrawComplexControl( ComplexControl, TQPainter *, const TQWidget *, const TQRect &, const TQColorGroup &, void drawComplexControl( ComplexControl, TQPainter *, const TQWidget *, const TQRect &, const TQColorGroup &,
SFlags = Style_Default, SCFlags = SC_All, SCFlags = SC_None, SFlags = Style_Default, SCFlags = SC_All, SCFlags = SC_None,
const TQStyleOption & = TQStyleOption::Default ) const; const TQStyleOption & = TQStyleOption::Default ) const;
TQRect querySubControlMetrics( TQ_ComplexControl, const TQWidget *, SubControl, TQRect querySubControlMetrics( TQ_ComplexControl, const TQWidget *, SubControl,
const TQStyleOption & = TQStyleOption::Default ) const; const TQStyleOption & = TQStyleOption::Default ) const;
int tqpixelMetric( PixelMetric, const TQWidget *widget = 0 ) const; int pixelMetric( PixelMetric, const TQWidget *widget = 0 ) const;
int kPixelMetric( KStylePixelMetric kpm, const TQWidget *widget ) const; int kPixelMetric( KStylePixelMetric kpm, const TQWidget *widget ) const;
TQSize tqsizeFromContents( ContentsType, const TQWidget *, const TQSize &, TQSize tqsizeFromContents( ContentsType, const TQWidget *, const TQSize &,
const TQStyleOption & = TQStyleOption::Default ) const; const TQStyleOption & = TQStyleOption::Default ) const;
int tqstyleHint( StyleHint, const TQWidget *widget = 0, const TQStyleOption & = TQStyleOption::Default, int styleHint( StyleHint, const TQWidget *widget = 0, const TQStyleOption & = TQStyleOption::Default,
TQStyleHintReturn *returnData = 0 ) const; TQStyleHintReturn *returnData = 0 ) const;
protected: protected:

@ -190,7 +190,7 @@ ChordNameRuler::slotScrollHoriz(int x)
} }
TQSize TQSize
ChordNameRuler::tqsizeHint() const ChordNameRuler::sizeHint() const
{ {
double width = double width =
m_rulerScale->getBarPosition(m_rulerScale->getLastVisibleBar()) + m_rulerScale->getBarPosition(m_rulerScale->getLastVisibleBar()) +
@ -204,7 +204,7 @@ ChordNameRuler::tqsizeHint() const
} }
TQSize TQSize
ChordNameRuler::tqminimumSizeHint() const ChordNameRuler::minimumSizeHint() const
{ {
double firstBarWidth = m_rulerScale->getBarWidth(0); double firstBarWidth = m_rulerScale->getBarWidth(0);
TQSize res = TQSize(int(firstBarWidth), m_height); TQSize res = TQSize(int(firstBarWidth), m_height);
@ -231,8 +231,8 @@ ChordNameRuler::recalculate(timeT from, timeT to)
} else if (m_regetSegmentsOnChange) { } else if (m_regetSegmentsOnChange) {
RefreshtqStatus &rs = RefreshStatus &rs =
m_composition->getRefreshtqStatus(m_compositionRefreshStatusId); m_composition->getRefreshStatus(m_compositionRefreshStatusId);
if (rs.needsRefresh()) { if (rs.needsRefresh()) {
rs.setNeedsRefresh(false); rs.setNeedsRefresh(false);
@ -304,15 +304,15 @@ ChordNameRuler::recalculate(timeT from, timeT to)
if (m_segments.empty()) if (m_segments.empty())
return ; return ;
SegmentRefreshtqStatus overalltqStatus; SegmentRefreshStatus overallStatus;
overalltqStatus.setNeedsRefresh(false); overallStatus.setNeedsRefresh(false);
for (SegmentRefreshMap::iterator i = m_segments.begin(); for (SegmentRefreshMap::iterator i = m_segments.begin();
i != m_segments.end(); ++i) { i != m_segments.end(); ++i) {
SegmentRefreshtqStatus &status = SegmentRefreshStatus &status =
i->first->getRefreshtqStatus(i->second); i->first->getRefreshStatus(i->second);
if (status.needsRefresh()) { if (status.needsRefresh()) {
overalltqStatus.push(status.from(), status.to()); overallStatus.push(status.from(), status.to());
} }
} }
@ -326,17 +326,17 @@ ChordNameRuler::recalculate(timeT from, timeT to)
if (from == to) { if (from == to) {
NOTATION_DEBUG << "ChordNameRuler::recalculate: from==to, recalculating all" << endl; NOTATION_DEBUG << "ChordNameRuler::recalculate: from==to, recalculating all" << endl;
level = RecalcWhole; level = RecalcWhole;
} else if (overalltqStatus.from() == overalltqStatus.to()) { } else if (overallStatus.from() == overallStatus.to()) {
NOTATION_DEBUG << "ChordNameRuler::recalculate: overallStatus.from==overallStatus.to, ignoring" << endl; NOTATION_DEBUG << "ChordNameRuler::recalculate: overallStatus.from==overallStatus.to, ignoring" << endl;
level = RecalcNone; level = RecalcNone;
} else if (overalltqStatus.from() >= from && overalltqStatus.to() <= to) { } else if (overallStatus.from() >= from && overallStatus.to() <= to) {
NOTATION_DEBUG << "ChordNameRuler::recalculate: change is " << overalltqStatus.from() << "->" << overalltqStatus.to() << ", I show " << from << "->" << to << ", recalculating visible area" << endl; NOTATION_DEBUG << "ChordNameRuler::recalculate: change is " << overallStatus.from() << "->" << overallStatus.to() << ", I show " << from << "->" << to << ", recalculating visible area" << endl;
level = RecalcVisible; level = RecalcVisible;
} else if (overalltqStatus.from() >= to || overalltqStatus.to() <= from) { } else if (overallStatus.from() >= to || overallStatus.to() <= from) {
NOTATION_DEBUG << "ChordNameRuler::recalculate: change is " << overalltqStatus.from() << "->" << overalltqStatus.to() << ", I show " << from << "->" << to << ", ignoring" << endl; NOTATION_DEBUG << "ChordNameRuler::recalculate: change is " << overallStatus.from() << "->" << overallStatus.to() << ", I show " << from << "->" << to << ", ignoring" << endl;
level = RecalcNone; level = RecalcNone;
} else { } else {
NOTATION_DEBUG << "ChordNameRuler::recalculate: change is " << overalltqStatus.from() << "->" << overalltqStatus.to() << ", I show " << from << "->" << to << ", recalculating whole" << endl; NOTATION_DEBUG << "ChordNameRuler::recalculate: change is " << overallStatus.from() << "->" << overallStatus.to() << ", I show " << from << "->" << to << ", recalculating whole" << endl;
level = RecalcWhole; level = RecalcWhole;
} }
} }
@ -346,7 +346,7 @@ ChordNameRuler::recalculate(timeT from, timeT to)
for (SegmentRefreshMap::iterator i = m_segments.begin(); for (SegmentRefreshMap::iterator i = m_segments.begin();
i != m_segments.end(); ++i) { i != m_segments.end(); ++i) {
i->first->getRefreshtqStatus(i->second).setNeedsRefresh(false); i->first->getRefreshStatus(i->second).setNeedsRefresh(false);
} }
if (!m_currentSegment) { //!!! arbitrary, must do better if (!m_currentSegment) { //!!! arbitrary, must do better

@ -98,8 +98,8 @@ public:
// may have one of these (to avoid using percussion tracks in chords): // may have one of these (to avoid using percussion tracks in chords):
void setStudio(Studio *studio); void setStudio(Studio *studio);
virtual TQSize tqsizeHint() const; virtual TQSize sizeHint() const;
virtual TQSize tqminimumSizeHint() const; virtual TQSize minimumSizeHint() const;
void setMinimumWidth(int width) { m_width = width; } void setMinimumWidth(int width) { m_width = width; }

@ -86,7 +86,7 @@ ControlRuler::ControlRuler(Segment *segment,
m_selectionRect->setPen(TQt::red); m_selectionRect->setPen(TQt::red);
setFixedHeight(tqsizeHint().height()); setFixedHeight(sizeHint().height());
connect(this, TQT_SIGNAL(stateChange(const TQString&, bool)), connect(this, TQT_SIGNAL(stateChange(const TQString&, bool)),
m_parentEditView, TQT_SLOT(slotStateChanged(const TQString&, bool))); m_parentEditView, TQT_SLOT(slotStateChanged(const TQString&, bool)));
@ -308,7 +308,7 @@ void ControlRuler::contentsMouseMoveEvent(TQMouseEvent* e)
// Borrowed from Rotary - compute total position within window // Borrowed from Rotary - compute total position within window
// //
TQPoint totalPos = mapTo(tqtopLevelWidget(), TQPoint(0, 0)); TQPoint totalPos = mapTo(topLevelWidget(), TQPoint(0, 0));
int scrollX = dynamic_cast<EditView*>(m_parentEditView)->getRawCanvasView()-> int scrollX = dynamic_cast<EditView*>(m_parentEditView)->getRawCanvasView()->
horizontalScrollBar()->value(); horizontalScrollBar()->value();
@ -393,7 +393,7 @@ void ControlRuler::createMenu()
{ {
RG_DEBUG << "ControlRuler::createMenu()\n"; RG_DEBUG << "ControlRuler::createMenu()\n";
KMainWindow* parentMainWindow = dynamic_cast<KMainWindow*>(tqtopLevelWidget()); KMainWindow* parentMainWindow = dynamic_cast<KMainWindow*>(topLevelWidget());
if (parentMainWindow && parentMainWindow->factory()) { if (parentMainWindow && parentMainWindow->factory()) {
m_menu = static_cast<TQPopupMenu*>(parentMainWindow->factory()->container(m_menuName, parentMainWindow)); m_menu = static_cast<TQPopupMenu*>(parentMainWindow->factory()->container(m_menuName, parentMainWindow));

@ -395,7 +395,7 @@ void ControllerEventsRuler::contentsMouseReleaseEvent(TQMouseEvent *e)
<< ", endValue = " << endValue << ", endValue = " << endValue
<< endl; << endl;
tqdrawControlLine(startTime, endTime, startValue, endValue); drawControlLine(startTime, endTime, startValue, endValue);
m_controlLineShowing = false; m_controlLineShowing = false;
m_controlLine->hide(); m_controlLine->hide();
@ -445,7 +445,7 @@ void ControllerEventsRuler::layoutItem(ControlItem* item)
} }
void void
ControllerEventsRuler::tqdrawControlLine(timeT startTime, ControllerEventsRuler::drawControlLine(timeT startTime,
timeT endTime, timeT endTime,
int startValue, int startValue,
int endValue) int endValue)

@ -96,7 +96,7 @@ protected:
virtual void layoutItem(ControlItem*); virtual void layoutItem(ControlItem*);
void tqdrawControlLine(timeT startTime, void drawControlLine(timeT startTime,
timeT endTime, timeT endTime,
int startValue, int startValue,
int endValue); int endValue);

@ -125,7 +125,7 @@ void LoopRuler::scrollHoriz(int x)
} }
} }
TQSize LoopRuler::tqsizeHint() const TQSize LoopRuler::sizeHint() const
{ {
double width = double width =
m_rulerScale->getBarPosition(m_rulerScale->getLastVisibleBar()) + m_rulerScale->getBarPosition(m_rulerScale->getLastVisibleBar()) +
@ -137,7 +137,7 @@ TQSize LoopRuler::tqsizeHint() const
return res; return res;
} }
TQSize LoopRuler::tqminimumSizeHint() const TQSize LoopRuler::minimumSizeHint() const
{ {
double firstBarWidth = m_rulerScale->getBarWidth(0) + m_xorigin; double firstBarWidth = m_rulerScale->getBarWidth(0) + m_xorigin;
@ -156,7 +156,7 @@ void LoopRuler::paintEvent(TQPaintEvent* e)
paint.setClipRegion(e->region()); paint.setClipRegion(e->region());
paint.setClipRect(e->rect().normalize()); paint.setClipRect(e->rect().normalize());
paint.setBrush(tqcolorGroup().foreground()); paint.setBrush(colorGroup().foreground());
drawBarSections(&paint); drawBarSections(&paint);
drawLoopMarker(&paint); drawLoopMarker(&paint);
@ -352,7 +352,7 @@ void LoopRuler::slotSetLoopMarker(timeT startLoop,
m_endLoop = endLoop; m_endLoop = endLoop;
TQPainter paint(this); TQPainter paint(this);
paint.setBrush(tqcolorGroup().foreground()); paint.setBrush(colorGroup().foreground());
drawBarSections(&paint); drawBarSections(&paint);
drawLoopMarker(&paint); drawLoopMarker(&paint);

@ -69,8 +69,8 @@ public:
void setSnapGrid(SnapGrid *grid); void setSnapGrid(SnapGrid *grid);
virtual TQSize tqsizeHint() const; virtual TQSize sizeHint() const;
virtual TQSize tqminimumSizeHint() const; virtual TQSize minimumSizeHint() const;
void scrollHoriz(int x); void scrollHoriz(int x);

@ -160,7 +160,7 @@ MarkerRuler::scrollHoriz(int x)
} }
TQSize TQSize
MarkerRuler::tqsizeHint() const MarkerRuler::sizeHint() const
{ {
int lastBar = int lastBar =
m_rulerScale->getLastVisibleBar(); m_rulerScale->getLastVisibleBar();
@ -172,7 +172,7 @@ MarkerRuler::tqsizeHint() const
} }
TQSize TQSize
MarkerRuler::tqminimumSizeHint() const MarkerRuler::minimumSizeHint() const
{ {
double firstBarWidth = m_rulerScale->getBarWidth(0) + m_xorigin; double firstBarWidth = m_rulerScale->getBarWidth(0) + m_xorigin;

@ -63,8 +63,8 @@ public:
virtual ~MarkerRuler(); virtual ~MarkerRuler();
virtual TQSize tqsizeHint() const; virtual TQSize sizeHint() const;
virtual TQSize tqminimumSizeHint() const; virtual TQSize minimumSizeHint() const;
void scrollHoriz(int x); void scrollHoriz(int x);

@ -63,13 +63,13 @@ PercussionPitchRuler::PercussionPitchRuler(TQWidget *parent,
setMouseTracking(true); setMouseTracking(true);
} }
TQSize PercussionPitchRuler::tqsizeHint() const TQSize PercussionPitchRuler::sizeHint() const
{ {
return TQSize(m_width, return TQSize(m_width,
(m_lineSpacing + 1) * m_mapping->getPitchExtent()); (m_lineSpacing + 1) * m_mapping->getPitchExtent());
} }
TQSize PercussionPitchRuler::tqminimumSizeHint() const TQSize PercussionPitchRuler::minimumSizeHint() const
{ {
return TQSize(m_width, m_lineSpacing + 1); return TQSize(m_width, m_lineSpacing + 1);
} }
@ -159,7 +159,7 @@ void PercussionPitchRuler::mouseMoveEvent(TQMouseEvent* e)
{ {
// ugh // ugh
MatrixView *matrixView = dynamic_cast<MatrixView*>(tqtopLevelWidget()); MatrixView *matrixView = dynamic_cast<MatrixView*>(topLevelWidget());
if (matrixView) { if (matrixView) {
MatrixStaff *staff = matrixView->getStaff(0); MatrixStaff *staff = matrixView->getStaff(0);
if (staff) { if (staff) {

@ -53,8 +53,8 @@ public:
const MidiKeyMapping *mapping, const MidiKeyMapping *mapping,
int lineSpacing); int lineSpacing);
virtual TQSize tqsizeHint() const; virtual TQSize sizeHint() const;
virtual TQSize tqminimumSizeHint() const; virtual TQSize minimumSizeHint() const;
void drawHoverNote(int evPitch); void drawHoverNote(int evPitch);

@ -40,15 +40,15 @@ PitchRuler(TQWidget *parent) :
} }
TQSize TQSize
PitchRuler::tqsizeHint() const PitchRuler::sizeHint() const
{ {
return TQWidget::tqsizeHint(); return TQWidget::sizeHint();
} }
TQSize TQSize
PitchRuler::tqminimumSizeHint() const PitchRuler::minimumSizeHint() const
{ {
return TQWidget::tqminimumSizeHint(); return TQWidget::minimumSizeHint();
} }
} }

@ -44,8 +44,8 @@ class PitchRuler : public TQWidget
public: public:
PitchRuler(TQWidget *parent); PitchRuler(TQWidget *parent);
virtual TQSize tqsizeHint() const; virtual TQSize sizeHint() const;
virtual TQSize tqminimumSizeHint() const; virtual TQSize minimumSizeHint() const;
virtual void drawHoverNote(int evPitch) = 0; virtual void drawHoverNote(int evPitch) = 0;

@ -47,13 +47,13 @@ PropertyBox::PropertyBox(TQString label,
{} {}
TQSize TQSize
PropertyBox::tqsizeHint() const PropertyBox::sizeHint() const
{ {
return TQSize(m_width, m_height); return TQSize(m_width, m_height);
} }
TQSize TQSize
PropertyBox::tqminimumSizeHint() const PropertyBox::minimumSizeHint() const
{ {
return TQSize(m_width, m_height); return TQSize(m_width, m_height);
} }

@ -56,8 +56,8 @@ public:
TQWidget *parent=0, TQWidget *parent=0,
const char *name = 0); const char *name = 0);
virtual TQSize tqsizeHint() const; virtual TQSize sizeHint() const;
virtual TQSize tqminimumSizeHint() const; virtual TQSize minimumSizeHint() const;
protected: protected:
virtual void paintEvent(TQPaintEvent *); virtual void paintEvent(TQPaintEvent *);

@ -102,7 +102,7 @@ PropertyViewRuler::slotScrollHoriz(int x)
} }
TQSize TQSize
PropertyViewRuler::tqsizeHint() const PropertyViewRuler::sizeHint() const
{ {
double width = double width =
m_rulerScale->getBarPosition(m_rulerScale->getLastVisibleBar()) + m_rulerScale->getBarPosition(m_rulerScale->getLastVisibleBar()) +
@ -115,7 +115,7 @@ PropertyViewRuler::tqsizeHint() const
} }
TQSize TQSize
PropertyViewRuler::tqminimumSizeHint() const PropertyViewRuler::minimumSizeHint() const
{ {
double firstBarWidth = m_rulerScale->getBarWidth(0) + m_xorigin; double firstBarWidth = m_rulerScale->getBarWidth(0) + m_xorigin;
TQSize res = TQSize(int(firstBarWidth), m_height); TQSize res = TQSize(int(firstBarWidth), m_height);

@ -64,8 +64,8 @@ public:
~PropertyViewRuler(); ~PropertyViewRuler();
virtual TQSize tqsizeHint() const; virtual TQSize sizeHint() const;
virtual TQSize tqminimumSizeHint() const; virtual TQSize minimumSizeHint() const;
void setMinimumWidth(int width) { m_width = width; } void setMinimumWidth(int width) { m_width = width; }

@ -94,7 +94,7 @@ RawNoteRuler::slotScrollHoriz(int x)
} }
TQSize TQSize
RawNoteRuler::tqsizeHint() const RawNoteRuler::sizeHint() const
{ {
double width = double width =
m_rulerScale->getBarPosition(m_rulerScale->getLastVisibleBar()) + m_rulerScale->getBarPosition(m_rulerScale->getLastVisibleBar()) +
@ -107,7 +107,7 @@ RawNoteRuler::tqsizeHint() const
} }
TQSize TQSize
RawNoteRuler::tqminimumSizeHint() const RawNoteRuler::minimumSizeHint() const
{ {
double firstBarWidth = m_rulerScale->getBarWidth(0) + m_xorigin; double firstBarWidth = m_rulerScale->getBarWidth(0) + m_xorigin;
TQSize res = TQSize(int(firstBarWidth), m_height); TQSize res = TQSize(int(firstBarWidth), m_height);

@ -71,8 +71,8 @@ public:
m_segment = segment; m_segment = segment;
} }
virtual TQSize tqsizeHint() const; virtual TQSize sizeHint() const;
virtual TQSize tqminimumSizeHint() const; virtual TQSize minimumSizeHint() const;
void setMinimumWidth(int width) { m_width = width; } void setMinimumWidth(int width) { m_width = width; }

@ -630,7 +630,7 @@ TempoRuler::showTextFloat(tempoT tempo, tempoT target,
} }
TQSize TQSize
TempoRuler::tqsizeHint() const TempoRuler::sizeHint() const
{ {
double width = double width =
m_rulerScale->getBarPosition(m_rulerScale->getLastVisibleBar()) + m_rulerScale->getBarPosition(m_rulerScale->getLastVisibleBar()) +
@ -643,7 +643,7 @@ TempoRuler::tqsizeHint() const
} }
TQSize TQSize
TempoRuler::tqminimumSizeHint() const TempoRuler::minimumSizeHint() const
{ {
double firstBarWidth = m_rulerScale->getBarWidth(0) + m_xorigin; double firstBarWidth = m_rulerScale->getBarWidth(0) + m_xorigin;
TQSize res = TQSize(int(firstBarWidth), m_height); TQSize res = TQSize(int(firstBarWidth), m_height);

@ -82,8 +82,8 @@ public:
~TempoRuler(); ~TempoRuler();
virtual TQSize tqsizeHint() const; virtual TQSize sizeHint() const;
virtual TQSize tqminimumSizeHint() const; virtual TQSize minimumSizeHint() const;
void setMinimumWidth(int width) { m_width = width; } void setMinimumWidth(int width) { m_width = width; }

@ -92,7 +92,7 @@ TextRuler::slotScrollHoriz(int x)
} }
TQSize TQSize
TextRuler::tqsizeHint() const TextRuler::sizeHint() const
{ {
double width = double width =
m_rulerScale->getBarPosition(m_rulerScale->getLastVisibleBar()) + m_rulerScale->getBarPosition(m_rulerScale->getLastVisibleBar()) +
@ -104,7 +104,7 @@ TextRuler::tqsizeHint() const
} }
TQSize TQSize
TextRuler::tqminimumSizeHint() const TextRuler::minimumSizeHint() const
{ {
double firstBarWidth = m_rulerScale->getBarWidth(0); double firstBarWidth = m_rulerScale->getBarWidth(0);
TQSize res = TQSize(int(firstBarWidth), m_height); TQSize res = TQSize(int(firstBarWidth), m_height);

@ -82,8 +82,8 @@ public:
~TextRuler(); ~TextRuler();
virtual TQSize tqsizeHint() const; virtual TQSize sizeHint() const;
virtual TQSize tqminimumSizeHint() const; virtual TQSize minimumSizeHint() const;
void setMinimumWidth(int width) { m_width = width; } void setMinimumWidth(int width) { m_width = width; }

@ -90,8 +90,8 @@ SequenceManager::SequenceManager(RosegardenGUIDoc *doc,
m_metronomeMmapper(SegmentMmapperFactory::makeMetronome(m_doc)), m_metronomeMmapper(SegmentMmapperFactory::makeMetronome(m_doc)),
m_tempoSegmentMmapper(SegmentMmapperFactory::makeTempo(m_doc)), m_tempoSegmentMmapper(SegmentMmapperFactory::makeTempo(m_doc)),
m_timeSigSegmentMmapper(SegmentMmapperFactory::makeTimeSig(m_doc)), m_timeSigSegmentMmapper(SegmentMmapperFactory::makeTimeSig(m_doc)),
m_transporttqStatus(STOPPED), m_transportStatus(STOPPED),
m_soundDrivertqStatus(NO_DRIVER), m_soundDriverStatus(NO_DRIVER),
m_transport(transport), m_transport(transport),
m_lastRewoundAt(clock()), m_lastRewoundAt(clock()),
m_countdownDialog(0), m_countdownDialog(0),
@ -133,7 +133,7 @@ SequenceManager::SequenceManager(RosegardenGUIDoc *doc,
m_doc->getComposition().addObserver(this); m_doc->getComposition().addObserver(this);
// The owner of this sequence manager will need to call // The owner of this sequence manager will need to call
// checkSoundDrivertqStatus on it to set up its status appropriately // checkSoundDriverStatus on it to set up its status appropriately
// immediately after construction; we used to do it from here but // immediately after construction; we used to do it from here but
// we're not well placed to handle reporting to the user if it // we're not well placed to handle reporting to the user if it
// throws an exception (and we don't want to leave the object half // throws an exception (and we don't want to leave the object half
@ -228,9 +228,9 @@ void SequenceManager::setDocument(RosegardenGUIDoc* doc)
} }
void void
SequenceManager::setTransporttqStatus(const TransporttqStatus &status) SequenceManager::setTransportStatus(const TransportStatus &status)
{ {
m_transporttqStatus = status; m_transportStatus = status;
} }
void void
@ -256,14 +256,14 @@ SequenceManager::play()
// If already playing or recording then stop // If already playing or recording then stop
// //
if (m_transporttqStatus == PLAYING || if (m_transportStatus == PLAYING ||
m_transporttqStatus == RECORDING ) { m_transportStatus == RECORDING ) {
stopping(); stopping();
return true; return true;
} }
// This check may throw an exception // This check may throw an exception
checkSoundDrivertqStatus(false); checkSoundDriverStatus(false);
// Align Instrument lists and send initial program changes // Align Instrument lists and send initial program changes
// //
@ -369,7 +369,7 @@ SequenceManager::play()
// Send Play to the Sequencer // Send Play to the Sequencer
if (!rgapp->sequencerCall("play(long int, long int, long int, long int, long int, long int, long int, long int, long int, long int, long int)", if (!rgapp->sequencerCall("play(long int, long int, long int, long int, long int, long int, long int, long int, long int, long int, long int)",
replyType, replyData, data)) { replyType, replyData, data)) {
m_transporttqStatus = STOPPED; m_transportStatus = STOPPED;
return false; return false;
} }
@ -380,9 +380,9 @@ SequenceManager::play()
if (result) { if (result) {
// completed successfully // completed successfully
m_transporttqStatus = STARTING_TO_PLAY; m_transportStatus = STARTING_TO_PLAY;
} else { } else {
m_transporttqStatus = STOPPED; m_transportStatus = STOPPED;
std::cerr << "ERROR: SequenceManager::play(): Failed to start playback!" << std::endl; std::cerr << "ERROR: SequenceManager::play(): Failed to start playback!" << std::endl;
} }
@ -400,7 +400,7 @@ SequenceManager::stopping()
// Do this here rather than in stop() to avoid any potential // Do this here rather than in stop() to avoid any potential
// race condition (we use setPointerPosition() during stop()). // race condition (we use setPointerPosition() during stop()).
// //
if (m_transporttqStatus == STOPPED) { if (m_transportStatus == STOPPED) {
/*!!! /*!!!
if (m_doc->getComposition().isLooping()) if (m_doc->getComposition().isLooping())
m_doc->slotSetPointerPosition(m_doc->getComposition().getLoopStart()); m_doc->slotSetPointerPosition(m_doc->getComposition().getLoopStart());
@ -414,8 +414,8 @@ SequenceManager::stopping()
// Disarm recording and drop back to STOPPED // Disarm recording and drop back to STOPPED
// //
if (m_transporttqStatus == RECORDING_ARMED) { if (m_transportStatus == RECORDING_ARMED) {
m_transporttqStatus = STOPPED; m_transportStatus = STOPPED;
m_transport->RecordButton()->setOn(false); m_transport->RecordButton()->setOn(false);
m_transport->MetronomeButton()-> m_transport->MetronomeButton()->
setOn(m_doc->getComposition().usePlayMetronome()); setOn(m_doc->getComposition().usePlayMetronome());
@ -436,7 +436,7 @@ SequenceManager::stop()
{ {
// Toggle off the buttons - first record // Toggle off the buttons - first record
// //
if (m_transporttqStatus == RECORDING) { if (m_transportStatus == RECORDING) {
m_transport->RecordButton()->setOn(false); m_transport->RecordButton()->setOn(false);
m_transport->MetronomeButton()-> m_transport->MetronomeButton()->
setOn(m_doc->getComposition().usePlayMetronome()); setOn(m_doc->getComposition().usePlayMetronome());
@ -477,12 +477,12 @@ SequenceManager::stop()
// restore // restore
TQApplication::restoreOverrideCursor(); TQApplication::restoreOverrideCursor();
TransporttqStatus status = m_transporttqStatus; TransportStatus status = m_transportStatus;
// set new transport status first, so that if we're stopping // set new transport status first, so that if we're stopping
// recording we don't risk the record segment being restored by a // recording we don't risk the record segment being restored by a
// timer while the document is busy trying to do away with it // timer while the document is busy trying to do away with it
m_transporttqStatus = STOPPED; m_transportStatus = STOPPED;
// if we're recording MIDI or Audio then tidy up the recording Segment // if we're recording MIDI or Audio then tidy up the recording Segment
if (status == RECORDING) { if (status == RECORDING) {
@ -515,7 +515,7 @@ SequenceManager::rewind()
std::pair<timeT, timeT> barRange = std::pair<timeT, timeT> barRange =
composition.getBarRangeForTime(position - 1); composition.getBarRangeForTime(position - 1);
if (m_transporttqStatus == PLAYING) { if (m_transportStatus == PLAYING) {
// if we're playing and we had a rewind request less than 200ms // if we're playing and we had a rewind request less than 200ms
// ago and we're some way into the bar but less than half way // ago and we're some way into the bar but less than half way
@ -563,10 +563,10 @@ SequenceManager::fastforward()
} }
void void
SequenceManager::notifySequencertqStatus(TransporttqStatus status) SequenceManager::notifySequencerStatus(TransportStatus status)
{ {
// for the moment we don't do anything fancy // for the moment we don't do anything fancy
m_transporttqStatus = status; m_transportStatus = status;
} }
@ -611,7 +611,7 @@ SequenceManager::record(bool toggled)
Instrument *instr = studio.getInstrumentById(instrId); Instrument *instr = studio.getInstrumentById(instrId);
if (instr && instr->getType() == Instrument::Audio) { if (instr && instr->getType() == Instrument::Audio) {
if (!m_doc || !(m_soundDrivertqStatus & AUDIO_OK)) { if (!m_doc || !(m_soundDriverStatus & AUDIO_OK)) {
m_transport->RecordButton()->setOn(false); m_transport->RecordButton()->setOn(false);
throw(Exception("Audio subsystem is not available - can't record audio")); throw(Exception("Audio subsystem is not available - can't record audio"));
} }
@ -623,9 +623,9 @@ SequenceManager::record(bool toggled)
if (toggled) { // preparing record or punch-in record if (toggled) { // preparing record or punch-in record
if (m_transporttqStatus == RECORDING_ARMED) { if (m_transportStatus == RECORDING_ARMED) {
SETQMAN_DEBUG << "SequenceManager::record - unarming record\n"; SETQMAN_DEBUG << "SequenceManager::record - unarming record\n";
m_transporttqStatus = STOPPED; m_transportStatus = STOPPED;
// Toggle the buttons // Toggle the buttons
m_transport->MetronomeButton()->setOn(comp.usePlayMetronome()); m_transport->MetronomeButton()->setOn(comp.usePlayMetronome());
@ -634,9 +634,9 @@ SequenceManager::record(bool toggled)
return ; return ;
} }
if (m_transporttqStatus == STOPPED) { if (m_transportStatus == STOPPED) {
SETQMAN_DEBUG << "SequenceManager::record - armed record\n"; SETQMAN_DEBUG << "SequenceManager::record - armed record\n";
m_transporttqStatus = RECORDING_ARMED; m_transportStatus = RECORDING_ARMED;
// Toggle the buttons // Toggle the buttons
m_transport->MetronomeButton()->setOn(comp.useRecordMetronome()); m_transport->MetronomeButton()->setOn(comp.useRecordMetronome());
@ -645,7 +645,7 @@ SequenceManager::record(bool toggled)
return ; return ;
} }
if (m_transporttqStatus == RECORDING) { if (m_transportStatus == RECORDING) {
SETQMAN_DEBUG << "SequenceManager::record - stop recording and keep playing\n"; SETQMAN_DEBUG << "SequenceManager::record - stop recording and keep playing\n";
TQByteArray data; TQByteArray data;
@ -659,7 +659,7 @@ SequenceManager::record(bool toggled)
// if we're stopping recording we don't risk the // if we're stopping recording we don't risk the
// record segment being restored by a timer while the // record segment being restored by a timer while the
// document is busy trying to do away with it // document is busy trying to do away with it
m_transporttqStatus = STOPPED; m_transportStatus = STOPPED;
m_doc->stopRecordingMidi(); m_doc->stopRecordingMidi();
m_doc->stopRecordingAudio(); m_doc->stopRecordingAudio();
@ -667,7 +667,7 @@ SequenceManager::record(bool toggled)
} }
// #1797873 - as above // #1797873 - as above
m_transporttqStatus = PLAYING; m_transportStatus = PLAYING;
m_doc->stopRecordingMidi(); m_doc->stopRecordingMidi();
m_doc->stopRecordingAudio(); m_doc->stopRecordingAudio();
@ -675,7 +675,7 @@ SequenceManager::record(bool toggled)
return ; return ;
} }
if (m_transporttqStatus == PLAYING) { if (m_transportStatus == PLAYING) {
SETQMAN_DEBUG << "SequenceManager::record - punch in recording\n"; SETQMAN_DEBUG << "SequenceManager::record - punch in recording\n";
punchIn = true; punchIn = true;
goto punchin; goto punchin;
@ -720,7 +720,7 @@ punchin:
} }
// may throw an exception // may throw an exception
checkSoundDrivertqStatus(false); checkSoundDriverStatus(false);
// toggle the Metronome button if it's in use // toggle the Metronome button if it's in use
m_transport->MetronomeButton()->setOn(comp.useRecordMetronome()); m_transport->MetronomeButton()->setOn(comp.useRecordMetronome());
@ -738,7 +738,7 @@ punchin:
if (comp.isLooping()) if (comp.isLooping())
m_doc->slotSetPointerPosition(comp.getLoopStart()); m_doc->slotSetPointerPosition(comp.getLoopStart());
else { else {
if (m_transporttqStatus != RECORDING_ARMED && punchIn == false) { if (m_transportStatus != RECORDING_ARMED && punchIn == false) {
int startBar = comp.getBarNumber(comp.getPosition()); int startBar = comp.getBarNumber(comp.getPosition());
startBar -= config->readUnsignedNumEntry("countinbars", 0); startBar -= config->readUnsignedNumEntry("countinbars", 0);
m_doc->slotSetPointerPosition(comp.getBarRange(startBar).first); m_doc->slotSetPointerPosition(comp.getBarRange(startBar).first);
@ -853,7 +853,7 @@ punchin:
if (!rgapp->sequencerCall("record(long int, long int, long int, long int, long int, long int, long int, long int, long int, long int, long int, long int)", if (!rgapp->sequencerCall("record(long int, long int, long int, long int, long int, long int, long int, long int, long int, long int, long int, long int)",
replyType, replyData, data)) { replyType, replyData, data)) {
// failed // failed
m_transporttqStatus = STOPPED; m_transportStatus = STOPPED;
return ; return ;
} }
@ -865,7 +865,7 @@ punchin:
if (result) { if (result) {
// completed successfully // completed successfully
m_transporttqStatus = STARTING_TO_RECORD; m_transportStatus = STARTING_TO_RECORD;
// Create the countdown timer dialog to show recording time // Create the countdown timer dialog to show recording time
// remaining. (Note (dmm) this has changed, and it now reports // remaining. (Note (dmm) this has changed, and it now reports
@ -900,7 +900,7 @@ punchin:
} else { } else {
// Stop immediately - turn off buttons in parent // Stop immediately - turn off buttons in parent
// //
m_transporttqStatus = STOPPED; m_transportStatus = STOPPED;
if (haveAudioInstrument) { if (haveAudioInstrument) {
throw(Exception("Couldn't start recording audio.\nPlease set a valid file path in the Document Properties\n(Composition menu -> Edit Document Properties -> Audio).")); throw(Exception("Couldn't start recording audio.\nPlease set a valid file path in the Document Properties\n(Composition menu -> Edit Document Properties -> Audio)."));
@ -990,8 +990,8 @@ SequenceManager::processAsynchronousMidi(const MappedComposition &mC,
restoreRecordSubscriptions(); restoreRecordSubscriptions();
} }
if (m_transporttqStatus == PLAYING || if (m_transportStatus == PLAYING ||
m_transporttqStatus == RECORDING) { m_transportStatus == RECORDING) {
if ((*i)->getType() == MappedEvent::SystemFailure) { if ((*i)->getType() == MappedEvent::SystemFailure) {
SETQMAN_DEBUG << "Failure of some sort..." << endl; SETQMAN_DEBUG << "Failure of some sort..." << endl;
@ -1201,8 +1201,8 @@ SequenceManager::processAsynchronousMidi(const MappedComposition &mC,
// out any incoming external controller events // out any incoming external controller events
for (i = mC.begin(); i != mC.end(); ++i ) { for (i = mC.begin(); i != mC.end(); ++i ) {
if (m_transporttqStatus == STOPPED || if (m_transportStatus == STOPPED ||
m_transporttqStatus == RECORDING_ARMED) { m_transportStatus == RECORDING_ARMED) {
if ((*i)->getType() == MappedEvent::MidiNote) { if ((*i)->getType() == MappedEvent::MidiNote) {
if ((*i)->getVelocity() == 0) { if ((*i)->getVelocity() == 0) {
emit insertableNoteOffReceived((*i)->getPitch(), (*i)->getVelocity()); emit insertableNoteOffReceived((*i)->getPitch(), (*i)->getVelocity());
@ -1269,7 +1269,7 @@ SequenceManager::setLoop(const timeT &lhs, const timeT &rhs)
} }
void void
SequenceManager::checkSoundDrivertqStatus(bool warnUser) SequenceManager::checkSoundDriverStatus(bool warnUser)
{ {
TQByteArray data; TQByteArray data;
TQCString replyType; TQCString replyType;
@ -1281,25 +1281,25 @@ SequenceManager::checkSoundDrivertqStatus(bool warnUser)
if (! rgapp->sequencerCall("getSoundDriverStatus(TQString)", if (! rgapp->sequencerCall("getSoundDriverStatus(TQString)",
replyType, replyData, data)) { replyType, replyData, data)) {
m_soundDrivertqStatus = NO_DRIVER; m_soundDriverStatus = NO_DRIVER;
} else { } else {
TQDataStream streamIn(replyData, IO_ReadOnly); TQDataStream streamIn(replyData, IO_ReadOnly);
unsigned int result; unsigned int result;
streamIn >> result; streamIn >> result;
m_soundDrivertqStatus = result; m_soundDriverStatus = result;
} }
SETQMAN_DEBUG << "Sound driver status is: " << m_soundDrivertqStatus << endl; SETQMAN_DEBUG << "Sound driver status is: " << m_soundDriverStatus << endl;
if (!warnUser) return; if (!warnUser) return;
#ifdef HAVE_LIBJACK #ifdef HAVE_LIBJACK
if ((m_soundDrivertqStatus & (AUDIO_OK | MIDI_OK | VERSION_OK)) == if ((m_soundDriverStatus & (AUDIO_OK | MIDI_OK | VERSION_OK)) ==
(AUDIO_OK | MIDI_OK | VERSION_OK)) return; (AUDIO_OK | MIDI_OK | VERSION_OK)) return;
#else #else
if ((m_soundDrivertqStatus & (MIDI_OK | VERSION_OK)) == if ((m_soundDriverStatus & (MIDI_OK | VERSION_OK)) ==
(MIDI_OK | VERSION_OK)) return; (MIDI_OK | VERSION_OK)) return;
#endif #endif
@ -1308,11 +1308,11 @@ SequenceManager::checkSoundDrivertqStatus(bool warnUser)
TQString text = ""; TQString text = "";
if (m_soundDrivertqStatus == NO_DRIVER) { if (m_soundDriverStatus == NO_DRIVER) {
text = i18n("<p>Both MIDI and Audio subsystems have failed to initialize.</p><p>You may continue without the sequencer, but we suggest closing Rosegarden, running \"alsaconf\" as root, and starting Rosegarden again. If you wish to run with no sequencer by design, then use \"rosegarden --nosequencer\" to avoid seeing this error in the future.</p>"); text = i18n("<p>Both MIDI and Audio subsystems have failed to initialize.</p><p>You may continue without the sequencer, but we suggest closing Rosegarden, running \"alsaconf\" as root, and starting Rosegarden again. If you wish to run with no sequencer by design, then use \"rosegarden --nosequencer\" to avoid seeing this error in the future.</p>");
} else if (!(m_soundDrivertqStatus & MIDI_OK)) { } else if (!(m_soundDriverStatus & MIDI_OK)) {
text = i18n("<p>The MIDI subsystem has failed to initialize.</p><p>You may continue without the sequencer, but we suggest closing Rosegarden, running \"modprobe snd-seq-midi\" as root, and starting Rosegarden again. If you wish to run with no sequencer by design, then use \"rosegarden --nosequencer\" to avoid seeing this error in the future.</p>"); text = i18n("<p>The MIDI subsystem has failed to initialize.</p><p>You may continue without the sequencer, but we suggest closing Rosegarden, running \"modprobe snd-seq-midi\" as root, and starting Rosegarden again. If you wish to run with no sequencer by design, then use \"rosegarden --nosequencer\" to avoid seeing this error in the future.</p>");
} else if (!(m_soundDrivertqStatus & VERSION_OK)) { } else if (!(m_soundDriverStatus & VERSION_OK)) {
text = i18n("<p>The Rosegarden sequencer module version does not match the GUI module version.</p><p>You have probably mixed up files from two different versions of Rosegarden. Please check your installation.</p>"); text = i18n("<p>The Rosegarden sequencer module version does not match the GUI module version.</p><p>You have probably mixed up files from two different versions of Rosegarden. Please check your installation.</p>");
} }
@ -1325,7 +1325,7 @@ SequenceManager::checkSoundDrivertqStatus(bool warnUser)
} }
#ifdef HAVE_LIBJACK #ifdef HAVE_LIBJACK
if (!(m_soundDrivertqStatus & AUDIO_OK)) { if (!(m_soundDriverStatus & AUDIO_OK)) {
RosegardenGUIApp::self()->awaitDialogClearance(); RosegardenGUIApp::self()->awaitDialogClearance();
KMessageBox::information(RosegardenGUIApp::self(), i18n("<h3>Failed to connect to JACK audio server.</h3><p>Rosegarden could not connect to the JACK audio server. This probably means the JACK server is not running.</p><p>If you want to be able to play or record audio files or use plugins, you should exit Rosegarden and start the JACK server before running Rosegarden again.</p>"), KMessageBox::information(RosegardenGUIApp::self(), i18n("<h3>Failed to connect to JACK audio server.</h3><p>Rosegarden could not connect to the JACK audio server. This probably means the JACK server is not running.</p><p>If you want to be able to play or record audio files or use plugins, you should exit Rosegarden and start the JACK server before running Rosegarden again.</p>"),
i18n("Failed to connect to JACK"), i18n("Failed to connect to JACK"),
@ -1675,7 +1675,7 @@ bool SequenceManager::event(TQEvent *e)
SETQMAN_DEBUG << "SequenceManager::event() with user event\n"; SETQMAN_DEBUG << "SequenceManager::event() with user event\n";
if (m_updateRequested) { if (m_updateRequested) {
SETQMAN_DEBUG << "SequenceManager::event(): update requested\n"; SETQMAN_DEBUG << "SequenceManager::event(): update requested\n";
checkRefreshtqStatus(); checkRefreshStatus();
m_updateRequested = false; m_updateRequested = false;
} }
return true; return true;
@ -1693,7 +1693,7 @@ void SequenceManager::update()
TQApplication::postEvent(this, e); TQApplication::postEvent(this, e);
} }
void SequenceManager::checkRefreshtqStatus() void SequenceManager::checkRefreshStatus()
{ {
SETQMAN_DEBUG << "SequenceManager::checkRefreshStatus()\n"; SETQMAN_DEBUG << "SequenceManager::checkRefreshStatus()\n";
@ -1716,10 +1716,10 @@ void SequenceManager::checkRefreshtqStatus()
newTriggerMap[s] = m_triggerSegments[s]; newTriggerMap[s] = m_triggerSegments[s];
} }
if (s->getRefreshtqStatus(newTriggerMap[s]).needsRefresh()) { if (s->getRefreshStatus(newTriggerMap[s]).needsRefresh()) {
TriggerSegmentRec::SegmentRuntimeIdSet &thisSet = (*i)->getReferences(); TriggerSegmentRec::SegmentRuntimeIdSet &thisSet = (*i)->getReferences();
ridset.insert(thisSet.begin(), thisSet.end()); ridset.insert(thisSet.begin(), thisSet.end());
s->getRefreshtqStatus(newTriggerMap[s]).setNeedsRefresh(false); s->getRefreshStatus(newTriggerMap[s]).setNeedsRefresh(false);
} }
} }
@ -1747,10 +1747,10 @@ void SequenceManager::checkRefreshtqStatus()
// then the ones which are still there // then the ones which are still there
for (SegmentRefreshMap::iterator i = m_segments.begin(); for (SegmentRefreshMap::iterator i = m_segments.begin();
i != m_segments.end(); ++i) { i != m_segments.end(); ++i) {
if (i->first->getRefreshtqStatus(i->second).needsRefresh() || if (i->first->getRefreshStatus(i->second).needsRefresh() ||
ridset.find(i->first->getRuntimeId()) != ridset.end()) { ridset.find(i->first->getRuntimeId()) != ridset.end()) {
segmentModified(i->first); segmentModified(i->first);
i->first->getRefreshtqStatus(i->second).setNeedsRefresh(false); i->first->getRefreshStatus(i->second).setNeedsRefresh(false);
} }
} }
@ -1770,7 +1770,7 @@ void SequenceManager::segmentModified(Segment* s)
SETQMAN_DEBUG << "SequenceManager::segmentModified() : size changed = " SETQMAN_DEBUG << "SequenceManager::segmentModified() : size changed = "
<< sizeChanged << endl; << sizeChanged << endl;
if ((m_transporttqStatus == PLAYING) && sizeChanged) { if ((m_transportStatus == PLAYING) && sizeChanged) {
TQByteArray data; TQByteArray data;
TQDataStream streamOut(data, IO_WriteOnly); TQDataStream streamOut(data, IO_WriteOnly);
@ -1815,7 +1815,7 @@ void SequenceManager::segmentEventsTimingChanged(const Composition*, Segment * s
{ {
SETQMAN_DEBUG << "SequenceManager::segmentEventsTimingChanged(" << s << ", " << t << ")\n"; SETQMAN_DEBUG << "SequenceManager::segmentEventsTimingChanged(" << s << ", " << t << ")\n";
segmentModified(s); segmentModified(s);
if (s && s->getType() == Segment::Audio && m_transporttqStatus == PLAYING) { if (s && s->getType() == Segment::Audio && m_transportStatus == PLAYING) {
TQByteArray data; TQByteArray data;
rgapp->sequencerSend("remapTracks()", data); rgapp->sequencerSend("remapTracks()", data);
} }
@ -1831,7 +1831,7 @@ void SequenceManager::segmentTrackChanged(const Composition*, Segment *s, TrackI
{ {
SETQMAN_DEBUG << "SequenceManager::segmentTrackChanged(" << s << ", " << id << ")\n"; SETQMAN_DEBUG << "SequenceManager::segmentTrackChanged(" << s << ", " << id << ")\n";
segmentModified(s); segmentModified(s);
if (s && s->getType() == Segment::Audio && m_transporttqStatus == PLAYING) { if (s && s->getType() == Segment::Audio && m_transportStatus == PLAYING) {
TQByteArray data; TQByteArray data;
rgapp->sequencerSend("remapTracks()", data); rgapp->sequencerSend("remapTracks()", data);
} }
@ -1849,7 +1849,7 @@ void SequenceManager::processAddedSegment(Segment* s)
m_compositionMmapper->segmentAdded(s); m_compositionMmapper->segmentAdded(s);
if (m_transporttqStatus == PLAYING) { if (m_transportStatus == PLAYING) {
TQByteArray data; TQByteArray data;
TQDataStream streamOut(data, IO_WriteOnly); TQDataStream streamOut(data, IO_WriteOnly);
@ -1857,7 +1857,7 @@ void SequenceManager::processAddedSegment(Segment* s)
streamOut << m_compositionMmapper->getSegmentFileName(s); streamOut << m_compositionMmapper->getSegmentFileName(s);
if (!rgapp->sequencerSend("addSegment(TQString)", data)) { if (!rgapp->sequencerSend("addSegment(TQString)", data)) {
m_transporttqStatus = STOPPED; m_transportStatus = STOPPED;
} }
} }
@ -1874,7 +1874,7 @@ void SequenceManager::processRemovedSegment(Segment* s)
TQString filename = m_compositionMmapper->getSegmentFileName(s); TQString filename = m_compositionMmapper->getSegmentFileName(s);
m_compositionMmapper->segmentDeleted(s); m_compositionMmapper->segmentDeleted(s);
if (m_transporttqStatus == PLAYING) { if (m_transportStatus == PLAYING) {
TQByteArray data; TQByteArray data;
TQDataStream streamOut(data, IO_WriteOnly); TQDataStream streamOut(data, IO_WriteOnly);
@ -1883,7 +1883,7 @@ void SequenceManager::processRemovedSegment(Segment* s)
if (!rgapp->sequencerSend("deleteSegment(TQString)", data)) { if (!rgapp->sequencerSend("deleteSegment(TQString)", data)) {
// failed // failed
m_transporttqStatus = STOPPED; m_transportStatus = STOPPED;
} }
} }
@ -1907,7 +1907,7 @@ void SequenceManager::trackChanged(const Composition *, Track* t)
SETQMAN_DEBUG << "SequenceManager::trackChanged(" << t << ", " << (t ? t->getPosition() : -1) << ")\n"; SETQMAN_DEBUG << "SequenceManager::trackChanged(" << t << ", " << (t ? t->getPosition() : -1) << ")\n";
m_controlBlockMmapper->updateTrackData(t); m_controlBlockMmapper->updateTrackData(t);
if (m_transporttqStatus == PLAYING) { if (m_transportStatus == PLAYING) {
TQByteArray data; TQByteArray data;
rgapp->sequencerSend("remapTracks()", data); rgapp->sequencerSend("remapTracks()", data);
} }
@ -1933,7 +1933,7 @@ void SequenceManager::metronomeChanged(InstrumentId id,
resetMetronomeMmapper(); resetMetronomeMmapper();
m_controlBlockMmapper->updateMetronomeData(id); m_controlBlockMmapper->updateMetronomeData(id);
if (m_transporttqStatus == PLAYING) { if (m_transportStatus == PLAYING) {
m_controlBlockMmapper->updateMetronomeForPlayback(); m_controlBlockMmapper->updateMetronomeForPlayback();
} else { } else {
m_controlBlockMmapper->updateMetronomeForRecord(); m_controlBlockMmapper->updateMetronomeForRecord();
@ -1957,7 +1957,7 @@ void SequenceManager::metronomeChanged(const Composition *)
m_controlBlockMmapper->updateMetronomeData m_controlBlockMmapper->updateMetronomeData
(m_metronomeMmapper->getMetronomeInstrument()); (m_metronomeMmapper->getMetronomeInstrument());
if (m_transporttqStatus == PLAYING) { if (m_transportStatus == PLAYING) {
m_controlBlockMmapper->updateMetronomeForPlayback(); m_controlBlockMmapper->updateMetronomeForPlayback();
} else { } else {
m_controlBlockMmapper->updateMetronomeForRecord(); m_controlBlockMmapper->updateMetronomeForRecord();
@ -1973,7 +1973,7 @@ void SequenceManager::filtersChanged(MidiFilter thruFilter,
void SequenceManager::soloChanged(const Composition *, bool solo, TrackId selectedTrack) void SequenceManager::soloChanged(const Composition *, bool solo, TrackId selectedTrack)
{ {
if (m_controlBlockMmapper->updateSoloData(solo, selectedTrack)) { if (m_controlBlockMmapper->updateSoloData(solo, selectedTrack)) {
if (m_transporttqStatus == PLAYING) { if (m_transportStatus == PLAYING) {
TQByteArray data; TQByteArray data;
rgapp->sequencerSend("remapTracks()", data); rgapp->sequencerSend("remapTracks()", data);
} }
@ -1999,7 +1999,7 @@ void SequenceManager::tempoChanged(const Composition *c)
if (c->isLooping()) if (c->isLooping())
setLoop(c->getLoopStart(), c->getLoopEnd()); setLoop(c->getLoopStart(), c->getLoopEnd());
else if (m_transporttqStatus == PLAYING) { else if (m_transportStatus == PLAYING) {
// If the tempo changes during playback, reset the pointer // If the tempo changes during playback, reset the pointer
// position because the sequencer keeps track of position in // position because the sequencer keeps track of position in
// real time and we want to maintain the same position in // real time and we want to maintain the same position in

@ -102,7 +102,7 @@ public:
void fastForwardToEnd(); void fastForwardToEnd();
void setLoop(const timeT &lhs, const timeT &rhs); void setLoop(const timeT &lhs, const timeT &rhs);
void notifySequencertqStatus(TransporttqStatus status); void notifySequencerStatus(TransportStatus status);
void sendSequencerJump(const RealTime &time); void sendSequencerJump(const RealTime &time);
// Events coming in // Events coming in
@ -112,7 +112,7 @@ public:
// Before playing and recording. If warnUser is true, show the // Before playing and recording. If warnUser is true, show the
// user a warning dialog if there is a problem with the setup. // user a warning dialog if there is a problem with the setup.
// //
void checkSoundDrivertqStatus(bool warnUser); void checkSoundDriverStatus(bool warnUser);
/** /**
* Send program changes and align Instrument lists before playback * Send program changes and align Instrument lists before playback
@ -126,8 +126,8 @@ public:
void preparePlayback(bool forceProgramChanges = false); void preparePlayback(bool forceProgramChanges = false);
/// Check and set sequencer status /// Check and set sequencer status
void setTransporttqStatus(const TransporttqStatus &status); void setTransportStatus(const TransportStatus &status);
TransporttqStatus getTransporttqStatus() const { return m_transporttqStatus; } TransportStatus getTransportStatus() const { return m_transportStatus; }
/** /**
* Suspend the sequencer to allow for a safe DCOP call() i.e. one * Suspend the sequencer to allow for a safe DCOP call() i.e. one
@ -140,7 +140,7 @@ public:
void sendAudioLevel(MappedEvent *mE); void sendAudioLevel(MappedEvent *mE);
/// Find what has been initialised and what hasn't /// Find what has been initialised and what hasn't
unsigned int getSoundDrivertqStatus() { return m_soundDrivertqStatus; } unsigned int getSoundDriverStatus() { return m_soundDriverStatus; }
/// Reset MIDI controllers /// Reset MIDI controllers
void resetControllers(); void resetControllers();
@ -247,7 +247,7 @@ protected:
void resetMetronomeMmapper(); void resetMetronomeMmapper();
void resetTempoSegmentMmapper(); void resetTempoSegmentMmapper();
void resetTimeSigSegmentMmapper(); void resetTimeSigSegmentMmapper();
void checkRefreshtqStatus(); void checkRefreshStatus();
void sendMIDIRecordingDevice(const TQString recordDeviceStr); void sendMIDIRecordingDevice(const TQString recordDeviceStr);
void restoreRecordSubscriptions(); void restoreRecordSubscriptions();
bool shouldWarnForImpreciseTimer(); bool shouldWarnForImpreciseTimer();
@ -267,8 +267,8 @@ protected:
bool m_metronomeNeedsRefresh; bool m_metronomeNeedsRefresh;
// statuses // statuses
TransporttqStatus m_transporttqStatus; TransportStatus m_transportStatus;
unsigned int m_soundDrivertqStatus; unsigned int m_soundDriverStatus;
// pointer to the transport dialog // pointer to the transport dialog
TransportDialog *m_transport; TransportDialog *m_transport;

@ -1322,7 +1322,7 @@ AudioMixerWindow::updateMonitorMeters(SequencerMapper *mapper)
// only show monitor levels when quiescent or when recording (as // only show monitor levels when quiescent or when recording (as
// record levels) // record levels)
if (m_document->getSequenceManager() && if (m_document->getSequenceManager() &&
m_document->getSequenceManager()->getTransporttqStatus() == PLAYING) { m_document->getSequenceManager()->getTransportStatus() == PLAYING) {
return ; return ;
} }

@ -100,7 +100,7 @@ BankEditorDialog::BankEditorDialog(TQWidget *parent,
TQFrame* btnBox = new TQFrame(mainFrame); TQFrame* btnBox = new TQFrame(mainFrame);
btnBox->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed)); btnBox->setSizePolicy(TQSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed));
TQHBoxLayout* tqlayout = new TQHBoxLayout(btnBox, 4, 10); TQHBoxLayout* tqlayout = new TQHBoxLayout(btnBox, 4, 10);
@ -206,8 +206,8 @@ BankEditorDialog::BankEditorDialog(TQWidget *parent,
vboxLayout->addWidget(m_keyMappingEditor); vboxLayout->addWidget(m_keyMappingEditor);
m_keyMappingEditor->hide(); m_keyMappingEditor->hide();
m_programEditor->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Preferred)); m_programEditor->setSizePolicy(TQSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Preferred));
m_keyMappingEditor->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Preferred)); m_keyMappingEditor->setSizePolicy(TQSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Preferred));
m_optionBox = new TQVGroupBox(i18n("Options"), vbox); m_optionBox = new TQVGroupBox(i18n("Options"), vbox);
vboxLayout->addWidget(m_optionBox); vboxLayout->addWidget(m_optionBox);

@ -204,7 +204,7 @@ DeviceManagerDialog::DeviceManagerDialog(TQWidget *parent,
TQFrame* btnBox = new TQFrame(mainBox); TQFrame* btnBox = new TQFrame(mainBox);
btnBox->tqsetSizePolicy( btnBox->setSizePolicy(
TQSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed)); TQSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed));
TQPushButton *closeButton = new TQPushButton(i18n("Close"), btnBox); TQPushButton *closeButton = new TQPushButton(i18n("Close"), btnBox);

@ -39,7 +39,7 @@ MidiMixerVUMeter::MidiMixerVUMeter(TQWidget *parent,
const char *name): const char *name):
VUMeter(parent, type, false, false, width, height, VUMeter::Vertical, name) VUMeter(parent, type, false, false, width, height, VUMeter::Vertical, name)
{ {
tqsetAlignment(AlignCenter); setAlignment(AlignCenter);
} }
void void

@ -111,7 +111,7 @@ NameSetEditor::NameSetEditor(BankEditorDialog* bankEditor,
} else { } else {
TQLabel *label = new TQLabel(numberText, numBox); TQLabel *label = new TQLabel(numberText, numBox);
label->setFixedWidth(40); label->setFixedWidth(40);
label->tqsetAlignment(AlignCenter); label->setAlignment(AlignCenter);
m_labels.push_back(label); m_labels.push_back(label);
} }

@ -161,7 +161,7 @@ SynthPluginManagerDialog::SynthPluginManagerDialog(TQWidget *parent,
TQFrame* btnBox = new TQFrame(mainBox); TQFrame* btnBox = new TQFrame(mainBox);
btnBox->tqsetSizePolicy( btnBox->setSizePolicy(
TQSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed)); TQSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed));
TQPushButton *closeButton = new TQPushButton(i18n("Close"), btnBox); TQPushButton *closeButton = new TQPushButton(i18n("Close"), btnBox);

@ -76,11 +76,11 @@ void
AudioVUMeter::paintEvent(TQPaintEvent *e) AudioVUMeter::paintEvent(TQPaintEvent *e)
{ {
TQPainter paint(this); TQPainter paint(this);
paint.setPen(tqcolorGroup().mid()); paint.setPen(colorGroup().mid());
paint.drawRect(0, 0, width(), height()); paint.drawRect(0, 0, width(), height());
paint.setPen(tqcolorGroup().background()); paint.setPen(colorGroup().background());
paint.setBrush(tqcolorGroup().background()); paint.setBrush(colorGroup().background());
paint.drawRect(1, 1, width() - 2, m_yoff / 2 - 1); paint.drawRect(1, 1, width() - 2, m_yoff / 2 - 1);
paint.drawRect(1, 1, m_xoff / 2 - 1, height() - 2); paint.drawRect(1, 1, m_xoff / 2 - 1, height() - 2);
paint.drawRect(width() - m_xoff / 2 - 1, 1, m_xoff / 2, height() - 2); paint.drawRect(width() - m_xoff / 2 - 1, 1, m_xoff / 2, height() - 2);

@ -37,7 +37,7 @@ public:
KArrowButton(parent, arrow, name) { } KArrowButton(parent, arrow, name) { }
virtual ~BigArrowButton() { } virtual ~BigArrowButton() { }
virtual TQSize tqsizeHint() const { virtual TQSize sizeHint() const {
return TQSize(20, 20); return TQSize(20, 20);
} }
}; };

@ -73,7 +73,7 @@ Fader::Fader(AudioLevel::FaderType type,
m_sliderMax = width() - m_sliderMin; m_sliderMax = width() - m_sliderMin;
} }
m_outlineColour = tqcolorGroup().mid(); m_outlineColour = colorGroup().mid();
calculateGroovePixmap(); calculateGroovePixmap();
setFader(0.0); setFader(0.0);
@ -110,7 +110,7 @@ Fader::Fader(int min, int max, int deflt,
m_sliderMax = width() - m_sliderMin; m_sliderMax = width() - m_sliderMin;
} }
m_outlineColour = tqcolorGroup().mid(); m_outlineColour = colorGroup().mid();
calculateGroovePixmap(); calculateGroovePixmap();
setFader(deflt); setFader(deflt);
@ -141,7 +141,7 @@ Fader::Fader(int min, int max, int deflt,
m_sliderMax = width() - m_sliderMin; m_sliderMax = width() - m_sliderMin;
} }
m_outlineColour = tqcolorGroup().mid(); m_outlineColour = colorGroup().mid();
calculateGroovePixmap(); calculateGroovePixmap();
setFader(deflt); setFader(deflt);
@ -447,9 +447,9 @@ Fader::calculateGroovePixmap()
delete map; delete map;
map = new TQPixmap(width(), height()); map = new TQPixmap(width(), height());
map->fill(tqcolorGroup().background()); map->fill(colorGroup().background());
TQPainter paint(map); TQPainter paint(map);
paint.setBrush(tqcolorGroup().background()); paint.setBrush(colorGroup().background());
if (m_vertical) { if (m_vertical) {
@ -464,9 +464,9 @@ Fader::calculateGroovePixmap()
if (position >= 0 && if (position >= 0 &&
position < m_sliderMax - m_sliderMin) { position < m_sliderMax - m_sliderMin) {
if (dB == 0) if (dB == 0)
paint.setPen(tqcolorGroup().dark()); paint.setPen(colorGroup().dark());
else else
paint.setPen(tqcolorGroup().midlight()); paint.setPen(colorGroup().midlight());
paint.drawLine(1, (m_sliderMax - position), paint.drawLine(1, (m_sliderMax - position),
width() - 2, (m_sliderMax - position)); width() - 2, (m_sliderMax - position));
} }
@ -477,8 +477,8 @@ Fader::calculateGroovePixmap()
} }
} }
paint.setPen(tqcolorGroup().dark()); paint.setPen(colorGroup().dark());
paint.setBrush(tqcolorGroup().mid()); paint.setBrush(colorGroup().mid());
paint.drawRect(width() / 2 - 3, height() - m_sliderMax, paint.drawRect(width() / 2 - 3, height() - m_sliderMax,
6, m_sliderMax - m_sliderMin); 6, m_sliderMax - m_sliderMin);
paint.end(); paint.end();
@ -511,48 +511,48 @@ Fader::calculateButtonPixmap()
buttonWidth = width() - 2; buttonWidth = width() - 2;
map = new TQPixmap(buttonWidth, buttonHeight); map = new TQPixmap(buttonWidth, buttonHeight);
map->fill(tqcolorGroup().background()); map->fill(colorGroup().background());
int x = 0; int x = 0;
int y = 0; int y = 0;
TQPainter paint(map); TQPainter paint(map);
paint.setPen(tqcolorGroup().light()); paint.setPen(colorGroup().light());
paint.drawLine(x + 1, y, x + buttonWidth - 2, y); paint.drawLine(x + 1, y, x + buttonWidth - 2, y);
paint.drawLine(x, y + 1, x, y + buttonHeight - 2); paint.drawLine(x, y + 1, x, y + buttonHeight - 2);
paint.setPen(tqcolorGroup().midlight()); paint.setPen(colorGroup().midlight());
paint.drawLine(x + 1, y + 1, x + buttonWidth - 2, y + 1); paint.drawLine(x + 1, y + 1, x + buttonWidth - 2, y + 1);
paint.drawLine(x + 1, y + 1, x + 1, y + buttonHeight - 2); paint.drawLine(x + 1, y + 1, x + 1, y + buttonHeight - 2);
paint.setPen(tqcolorGroup().mid()); paint.setPen(colorGroup().mid());
paint.drawLine(x + 2, y + buttonHeight - 2, x + buttonWidth - 2, paint.drawLine(x + 2, y + buttonHeight - 2, x + buttonWidth - 2,
y + buttonHeight - 2); y + buttonHeight - 2);
paint.drawLine(x + buttonWidth - 2, y + 2, x + buttonWidth - 2, paint.drawLine(x + buttonWidth - 2, y + 2, x + buttonWidth - 2,
y + buttonHeight - 2); y + buttonHeight - 2);
paint.setPen(tqcolorGroup().dark()); paint.setPen(colorGroup().dark());
paint.drawLine(x + 1, y + buttonHeight - 1, x + buttonWidth - 2, paint.drawLine(x + 1, y + buttonHeight - 1, x + buttonWidth - 2,
y + buttonHeight - 1); y + buttonHeight - 1);
paint.drawLine(x + buttonWidth - 1, y + 1, x + buttonWidth - 1, paint.drawLine(x + buttonWidth - 1, y + 1, x + buttonWidth - 1,
y + buttonHeight - 2); y + buttonHeight - 2);
paint.setPen(tqcolorGroup().shadow()); paint.setPen(colorGroup().shadow());
paint.drawLine(x + 1, y + buttonHeight / 2, x + buttonWidth - 2, paint.drawLine(x + 1, y + buttonHeight / 2, x + buttonWidth - 2,
y + buttonHeight / 2); y + buttonHeight / 2);
paint.setPen(tqcolorGroup().mid()); paint.setPen(colorGroup().mid());
paint.drawLine(x + 1, y + buttonHeight / 2 - 1, x + buttonWidth - 2, paint.drawLine(x + 1, y + buttonHeight / 2 - 1, x + buttonWidth - 2,
y + buttonHeight / 2 - 1); y + buttonHeight / 2 - 1);
paint.drawPoint(x, y + buttonHeight / 2); paint.drawPoint(x, y + buttonHeight / 2);
paint.setPen(tqcolorGroup().light()); paint.setPen(colorGroup().light());
paint.drawLine(x + 1, y + buttonHeight / 2 + 1, x + buttonWidth - 2, paint.drawLine(x + 1, y + buttonHeight / 2 + 1, x + buttonWidth - 2,
y + buttonHeight / 2 + 1); y + buttonHeight / 2 + 1);
paint.setPen(tqcolorGroup().button()); paint.setPen(colorGroup().button());
paint.setBrush(tqcolorGroup().button()); paint.setBrush(colorGroup().button());
paint.drawRect(x + 2, y + 2, buttonWidth - 4, buttonHeight / 2 - 4); paint.drawRect(x + 2, y + 2, buttonWidth - 4, buttonHeight / 2 - 4);
paint.drawRect(x + 2, y + buttonHeight / 2 + 2, paint.drawRect(x + 2, y + buttonHeight / 2 + 2,
buttonWidth - 4, buttonHeight / 2 - 4); buttonWidth - 4, buttonHeight / 2 - 4);

@ -202,7 +202,7 @@ PitchDragLabel::paintEvent(TQPaintEvent *)
} }
TQSize TQSize
PitchDragLabel::tqsizeHint() const PitchDragLabel::sizeHint() const
{ {
return TQSize(150, 135); return TQSize(150, 135);
} }

@ -53,7 +53,7 @@ public:
int getPitch() const { return m_pitch; } int getPitch() const { return m_pitch; }
virtual TQSize tqsizeHint() const; virtual TQSize sizeHint() const;
signals: signals:
void pitchDragged(int); void pitchDragged(int);

@ -165,7 +165,7 @@ PluginControl::PluginControl(TQWidget *parent,
if (!hidden) { if (!hidden) {
controlTitle->show(); controlTitle->show();
item = new TQWidgetItem(controlTitle); item = new TQWidgetItem(controlTitle);
item->tqsetAlignment(TQt::AlignRight | TQt::AlignBottom); item->setAlignment(TQt::AlignRight | TQt::AlignBottom);
m_tqlayout->addItem(item); m_tqlayout->addItem(item);
} else { } else {
controlTitle->hide(); controlTitle->hide();
@ -174,7 +174,7 @@ PluginControl::PluginControl(TQWidget *parent,
if (showBounds && !hidden) { if (showBounds && !hidden) {
low->show(); low->show();
item = new TQWidgetItem(low); item = new TQWidgetItem(low);
item->tqsetAlignment(TQt::AlignRight | TQt::AlignBottom); item->setAlignment(TQt::AlignRight | TQt::AlignBottom);
m_tqlayout->addItem(item); m_tqlayout->addItem(item);
} else { } else {
low->hide(); low->hide();
@ -183,7 +183,7 @@ PluginControl::PluginControl(TQWidget *parent,
if (!hidden) { if (!hidden) {
m_dial->show(); m_dial->show();
item = new TQWidgetItem(m_dial); item = new TQWidgetItem(m_dial);
item->tqsetAlignment(TQt::AlignCenter); item->setAlignment(TQt::AlignCenter);
m_tqlayout->addItem(item); m_tqlayout->addItem(item);
} else { } else {
m_dial->hide(); m_dial->hide();
@ -192,7 +192,7 @@ PluginControl::PluginControl(TQWidget *parent,
if (showBounds && !hidden) { if (showBounds && !hidden) {
upp->show(); upp->show();
item = new TQWidgetItem(upp); item = new TQWidgetItem(upp);
item->tqsetAlignment(TQt::AlignLeft | TQt::AlignBottom); item->setAlignment(TQt::AlignLeft | TQt::AlignBottom);
m_tqlayout->addItem(item); m_tqlayout->addItem(item);
} else { } else {
upp->hide(); upp->hide();

@ -130,8 +130,8 @@ ProgressDialog::slotSetOperationName(TQString name)
setLabel(name); setLabel(name);
// Little trick stolen from TQProgressDialog // Little trick stolen from TQProgressDialog
// increase resize only, never shrink // increase resize only, never shrink
int w = TQMAX( isVisible() ? width() : 0, tqsizeHint().width() ); int w = TQMAX( isVisible() ? width() : 0, sizeHint().width() );
int h = TQMAX( isVisible() ? height() : 0, tqsizeHint().height() ); int h = TQMAX( isVisible() ? height() : 0, sizeHint().height() );
resize( w, h ); resize( w, h );
} }
@ -199,7 +199,7 @@ void ProgressDialog::processEvents()
// RG_DEBUG << "ProgressDialog::processEvents: modalVisible is " // RG_DEBUG << "ProgressDialog::processEvents: modalVisible is "
// << m_modalVisible << endl; // << m_modalVisible << endl;
if (m_modalVisible) { if (m_modalVisible) {
kapp->tqprocessEvents(50); kapp->processEvents(50);
} else { } else {
rgapp->refreshGUI(50); rgapp->refreshGUI(50);
} }

@ -71,7 +71,7 @@ QuantizeParameters::QuantizeParameters(TQWidget *parent,
int zero = 0; int zero = 0;
if (!preamble.isNull()) { if (!preamble.isNull()) {
TQLabel *label = new TQLabel(preamble, this); TQLabel *label = new TQLabel(preamble, this);
label->tqsetAlignment(TQt::WordBreak); label->setAlignment(TQt::WordBreak);
m_mainLayout->addMultiCellWidget(label, 0, 0, 0, 1); m_mainLayout->addMultiCellWidget(label, 0, 0, 0, 1);
zero = 1; zero = 1;
} }

@ -223,7 +223,7 @@ Rotary::paintEvent(TQPaintEvent *)
paint.setBrush(TQBrush::NoBrush); paint.setBrush(TQBrush::NoBrush);
pen.setColor(tqcolorGroup().dark()); pen.setColor(colorGroup().dark());
pen.setWidth(scale); pen.setWidth(scale);
paint.setPen(pen); paint.setPen(pen);
@ -253,7 +253,7 @@ Rotary::paintEvent(TQPaintEvent *)
paint.setPen(pen); paint.setPen(pen);
int shadowAngle = -720; int shadowAngle = -720;
c = tqcolorGroup().dark(); c = colorGroup().dark();
for (int arc = 120; arc < 2880; arc += 240) { for (int arc = 120; arc < 2880; arc += 240) {
pen.setColor(c); pen.setColor(c);
paint.setPen(pen); paint.setPen(pen);
@ -263,7 +263,7 @@ Rotary::paintEvent(TQPaintEvent *)
} }
shadowAngle = 2160; shadowAngle = 2160;
c = tqcolorGroup().dark(); c = colorGroup().dark();
for (int arc = 120; arc < 2880; arc += 240) { for (int arc = 120; arc < 2880; arc += 240) {
pen.setColor(c); pen.setColor(c);
paint.setPen(pen); paint.setPen(pen);
@ -289,7 +289,7 @@ Rotary::paintEvent(TQPaintEvent *)
double y = hyp + len * cos(angle); double y = hyp + len * cos(angle);
pen.setWidth(scale * 2); pen.setWidth(scale * 2);
pen.setColor(tqcolorGroup().dark()); pen.setColor(colorGroup().dark());
paint.setPen(pen); paint.setPen(pen);
paint.drawLine(int(x0), int(y0), int(x), int(y)); paint.drawLine(int(x0), int(y0), int(x), int(y));
@ -391,7 +391,7 @@ Rotary::mousePressEvent(TQMouseEvent *e)
emit valueChanged(m_snapPosition); emit valueChanged(m_snapPosition);
} }
TQPoint totalPos = mapTo(tqtopLevelWidget(), TQPoint(0, 0)); TQPoint totalPos = mapTo(topLevelWidget(), TQPoint(0, 0));
if (!_float) if (!_float)
_float = new TextFloat(this); _float = new TextFloat(this);
@ -535,7 +535,7 @@ Rotary::wheelEvent(TQWheelEvent *e)
// Reposition - we need to sum the relative positions up to the // Reposition - we need to sum the relative positions up to the
// topLevel or dialog to please move(). Move just top/right of the rotary // topLevel or dialog to please move(). Move just top/right of the rotary
// //
TQPoint totalPos = mapTo(tqtopLevelWidget(), TQPoint(0, 0)); TQPoint totalPos = mapTo(topLevelWidget(), TQPoint(0, 0));
_float->reparent(this); _float->reparent(this);
_float->move(totalPos + TQPoint(width() + 2, -height() / 2)); _float->move(totalPos + TQPoint(width() + 2, -height() / 2));
_float->show(); _float->show();

@ -99,7 +99,7 @@ TimeWidget::init(bool editable)
if (m_isDuration) { if (m_isDuration) {
label = new TQLabel(i18n("Note:"), frame); label = new TQLabel(i18n("Note:"), frame);
label->tqsetAlignment(TQt::AlignRight | TQt::AlignVCenter); label->setAlignment(TQt::AlignRight | TQt::AlignVCenter);
tqlayout->addWidget(label, 0, 0); tqlayout->addWidget(label, 0, 0);
if (editable) { if (editable) {
@ -149,7 +149,7 @@ TimeWidget::init(bool editable)
} }
label = new TQLabel(i18n("Units:"), frame); label = new TQLabel(i18n("Units:"), frame);
label->tqsetAlignment(TQt::AlignRight | TQt::AlignVCenter); label->setAlignment(TQt::AlignRight | TQt::AlignVCenter);
tqlayout->addWidget(label, 0, 4); tqlayout->addWidget(label, 0, 4);
if (editable) { if (editable) {
@ -171,7 +171,7 @@ TimeWidget::init(bool editable)
m_note = 0; m_note = 0;
label = new TQLabel(i18n("Time:"), frame); label = new TQLabel(i18n("Time:"), frame);
label->tqsetAlignment(TQt::AlignRight | TQt::AlignVCenter); label->setAlignment(TQt::AlignRight | TQt::AlignVCenter);
tqlayout->addWidget(label, 0, 0); tqlayout->addWidget(label, 0, 0);
if (editable) { if (editable) {
@ -191,7 +191,7 @@ TimeWidget::init(bool editable)
} }
label = new TQLabel(m_isDuration ? i18n("Measures:") : i18n("Measure:"), frame); label = new TQLabel(m_isDuration ? i18n("Measures:") : i18n("Measure:"), frame);
label->tqsetAlignment(TQt::AlignRight | TQt::AlignVCenter); label->setAlignment(TQt::AlignRight | TQt::AlignVCenter);
tqlayout->addWidget(label, 1, 0); tqlayout->addWidget(label, 1, 0);
if (editable) { if (editable) {
@ -210,7 +210,7 @@ TimeWidget::init(bool editable)
} }
label = new TQLabel(m_isDuration ? i18n("beats:") : i18n("beat:"), frame); label = new TQLabel(m_isDuration ? i18n("beats:") : i18n("beat:"), frame);
label->tqsetAlignment(TQt::AlignRight | TQt::AlignVCenter); label->setAlignment(TQt::AlignRight | TQt::AlignVCenter);
tqlayout->addWidget(label, 1, 2); tqlayout->addWidget(label, 1, 2);
if (editable) { if (editable) {
@ -231,7 +231,7 @@ TimeWidget::init(bool editable)
(Note (Note
(Note::Shortest), true)), (Note::Shortest), true)),
frame); frame);
label->tqsetAlignment(TQt::AlignRight | TQt::AlignVCenter); label->setAlignment(TQt::AlignRight | TQt::AlignVCenter);
tqlayout->addWidget(label, 1, 4); tqlayout->addWidget(label, 1, 4);
if (editable) { if (editable) {
@ -252,7 +252,7 @@ TimeWidget::init(bool editable)
tqlayout->addWidget(m_timeSig, 1, 6); tqlayout->addWidget(m_timeSig, 1, 6);
label = new TQLabel(i18n("Seconds:"), frame); label = new TQLabel(i18n("Seconds:"), frame);
label->tqsetAlignment(TQt::AlignRight | TQt::AlignVCenter); label->setAlignment(TQt::AlignRight | TQt::AlignVCenter);
tqlayout->addWidget(label, 2, 0); tqlayout->addWidget(label, 2, 0);
if (editable) { if (editable) {
@ -271,7 +271,7 @@ TimeWidget::init(bool editable)
} }
label = new TQLabel(i18n("msec:"), frame); label = new TQLabel(i18n("msec:"), frame);
label->tqsetAlignment(TQt::AlignRight | TQt::AlignVCenter); label->setAlignment(TQt::AlignRight | TQt::AlignVCenter);
tqlayout->addWidget(label, 2, 2); tqlayout->addWidget(label, 2, 2);
if (editable) { if (editable) {

@ -336,7 +336,7 @@ VUMeter::paintEvent(TQPaintEvent *e)
drawMeterLevel(&paint); drawMeterLevel(&paint);
paint.setPen(tqcolorGroup().background()); paint.setPen(colorGroup().background());
paint.drawPoint(0, 0); paint.drawPoint(0, 0);
paint.drawPoint(width() - 1, 0); paint.drawPoint(width() - 1, 0);
paint.drawPoint(0, height() - 1); paint.drawPoint(0, height() - 1);

@ -66,7 +66,7 @@ namespace Rosegarden
RosegardenSequencerApp::RosegardenSequencerApp() : RosegardenSequencerApp::RosegardenSequencerApp() :
DCOPObject("RosegardenSequencerIface"), DCOPObject("RosegardenSequencerIface"),
m_driver(0), m_driver(0),
m_transporttqStatus(STOPPED), m_transportStatus(STOPPED),
m_songPosition(0, 0), m_songPosition(0, 0),
m_lastFetchSongPosition(0, 0), m_lastFetchSongPosition(0, 0),
m_readAhead(0, 80000000), // default value m_readAhead(0, 80000000), // default value
@ -143,7 +143,7 @@ RosegardenSequencerApp::quit()
close(); close();
// and break out of the loop next time around // and break out of the loop next time around
m_transporttqStatus = TQUIT; m_transportStatus = TQUIT;
} }
@ -152,7 +152,7 @@ RosegardenSequencerApp::stop()
{ {
// set our state at this level to STOPPING (pending any // set our state at this level to STOPPING (pending any
// unfinished NOTES) // unfinished NOTES)
m_transporttqStatus = STOPPING; m_transportStatus = STOPPING;
// report // report
// //
@ -186,7 +186,7 @@ RosegardenSequencerApp::fetchEvents(MappedComposition &composition,
{ {
// Always return nothing if we're stopped // Always return nothing if we're stopped
// //
if ( m_transporttqStatus == STOPPED || m_transporttqStatus == STOPPING ) if ( m_transportStatus == STOPPED || m_transportStatus == STOPPING )
return ; return ;
// If we're looping then we should get as much of the rest of // If we're looping then we should get as much of the rest of
@ -361,8 +361,8 @@ RosegardenSequencerApp::updateClocks()
// If we're not playing etc. then that's all we need to do // If we're not playing etc. then that's all we need to do
// //
if (m_transporttqStatus != PLAYING && if (m_transportStatus != PLAYING &&
m_transporttqStatus != RECORDING) m_transportStatus != RECORDING)
return ; return ;
RealTime newPosition = m_driver->getSequencerTime(); RealTime newPosition = m_driver->getSequencerTime();
@ -409,13 +409,13 @@ RosegardenSequencerApp::updateClocks()
} }
void void
RosegardenSequencerApp::notifySequencertqStatus() RosegardenSequencerApp::notifySequencerStatus()
{ {
TQByteArray data, replyData; TQByteArray data, replyData;
TQCString replyType; TQCString replyType;
TQDataStream arg(data, IO_WriteOnly); TQDataStream arg(data, IO_WriteOnly);
arg << (int)m_transporttqStatus; arg << (int)m_transportStatus;
if (!kapp->dcopClient()->send(ROSEGARDEN_GUI_APP_NAME, if (!kapp->dcopClient()->send(ROSEGARDEN_GUI_APP_NAME,
ROSEGARDEN_GUI_IFACE_NAME, ROSEGARDEN_GUI_IFACE_NAME,
@ -645,12 +645,12 @@ RosegardenSequencerApp::record(const RealTime &time,
long smallFileSize, long smallFileSize,
long recordMode) long recordMode)
{ {
TransporttqStatus localRecordMode = (TransporttqStatus) recordMode; TransportStatus localRecordMode = (TransportStatus) recordMode;
SEQUENCER_DEBUG << "RosegardenSequencerApp::record - recordMode is " << recordMode << ", transport status is " << m_transporttqStatus << endl; SEQUENCER_DEBUG << "RosegardenSequencerApp::record - recordMode is " << recordMode << ", transport status is " << m_transportStatus << endl;
// punch in recording // punch in recording
if (m_transporttqStatus == PLAYING) { if (m_transportStatus == PLAYING) {
if (localRecordMode == STARTING_TO_RECORD) { if (localRecordMode == STARTING_TO_RECORD) {
SEQUENCER_DEBUG << "RosegardenSequencerApp::record: punching in" << endl; SEQUENCER_DEBUG << "RosegardenSequencerApp::record: punching in" << endl;
localRecordMode = RECORDING; // no need to start playback localRecordMode = RECORDING; // no need to start playback
@ -758,7 +758,7 @@ RosegardenSequencerApp::record(const RealTime &time,
// Now set the local transport status to the record mode // Now set the local transport status to the record mode
// //
// //
m_transporttqStatus = localRecordMode; m_transportStatus = localRecordMode;
if (localRecordMode == RECORDING) { // punch in if (localRecordMode == RECORDING) { // punch in
return 1; return 1;
@ -787,14 +787,14 @@ RosegardenSequencerApp::play(const RealTime &time,
const RealTime &audioWrite, const RealTime &audioWrite,
long smallFileSize) long smallFileSize)
{ {
if (m_transporttqStatus == PLAYING || if (m_transportStatus == PLAYING ||
m_transporttqStatus == STARTING_TO_PLAY) m_transportStatus == STARTING_TO_PLAY)
return true; return true;
// Check for record toggle (punch out) // Check for record toggle (punch out)
// //
if (m_transporttqStatus == RECORDING) { if (m_transportStatus == RECORDING) {
m_transporttqStatus = PLAYING; m_transportStatus = PLAYING;
return punchOut(); return punchOut();
} }
@ -809,9 +809,9 @@ RosegardenSequencerApp::play(const RealTime &time,
(m_songPosition); (m_songPosition);
} }
if (m_transporttqStatus != RECORDING && if (m_transportStatus != RECORDING &&
m_transporttqStatus != STARTING_TO_RECORD) { m_transportStatus != STARTING_TO_RECORD) {
m_transporttqStatus = STARTING_TO_PLAY; m_transportStatus = STARTING_TO_PLAY;
} }
m_driver->stopClocks(); m_driver->stopClocks();
@ -898,9 +898,9 @@ RosegardenSequencerApp::punchOut()
{ {
// Check for record toggle (punch out) // Check for record toggle (punch out)
// //
if (m_transporttqStatus == RECORDING) { if (m_transportStatus == RECORDING) {
m_driver->punchOut(); m_driver->punchOut();
m_transporttqStatus = PLAYING; m_transportStatus = PLAYING;
return true; return true;
} }
return false; return false;
@ -943,7 +943,7 @@ void RosegardenSequencerApp::cleanupMmapData()
void RosegardenSequencerApp::remapSegment(const TQString& filename, size_t newSize) void RosegardenSequencerApp::remapSegment(const TQString& filename, size_t newSize)
{ {
if (m_transporttqStatus != PLAYING) if (m_transportStatus != PLAYING)
return ; return ;
SEQUENCER_DEBUG << "RosegardenSequencerApp::remapSegment(" << filename << ")\n"; SEQUENCER_DEBUG << "RosegardenSequencerApp::remapSegment(" << filename << ")\n";
@ -955,7 +955,7 @@ void RosegardenSequencerApp::remapSegment(const TQString& filename, size_t newSi
void RosegardenSequencerApp::addSegment(const TQString& filename) void RosegardenSequencerApp::addSegment(const TQString& filename)
{ {
if (m_transporttqStatus != PLAYING) if (m_transportStatus != PLAYING)
return ; return ;
SEQUENCER_DEBUG << "MmappedSegment::addSegment(" << filename << ")\n"; SEQUENCER_DEBUG << "MmappedSegment::addSegment(" << filename << ")\n";
@ -968,7 +968,7 @@ void RosegardenSequencerApp::addSegment(const TQString& filename)
void RosegardenSequencerApp::deleteSegment(const TQString& filename) void RosegardenSequencerApp::deleteSegment(const TQString& filename)
{ {
if (m_transporttqStatus != PLAYING) if (m_transportStatus != PLAYING)
return ; return ;
SEQUENCER_DEBUG << "MmappedSegment::deleteSegment(" << filename << ")\n"; SEQUENCER_DEBUG << "MmappedSegment::deleteSegment(" << filename << ")\n";
@ -1097,18 +1097,18 @@ RosegardenSequencerApp::setLoop(long loopStartSec,
// Return the status of the sound systems (audio and MIDI) // Return the status of the sound systems (audio and MIDI)
// //
unsigned int unsigned int
RosegardenSequencerApp::getSoundDrivertqStatus(const TQString &guiVersion) RosegardenSequencerApp::getSoundDriverStatus(const TQString &guiVersion)
{ {
unsigned int drivertqStatus = m_driver->gettqStatus(); unsigned int driverStatus = m_driver->getStatus();
if (guiVersion == VERSION) if (guiVersion == VERSION)
drivertqStatus |= VERSION_OK; driverStatus |= VERSION_OK;
else { else {
std::cerr << "WARNING: RosegardenSequencerApp::getSoundDriverStatus: " std::cerr << "WARNING: RosegardenSequencerApp::getSoundDriverStatus: "
<< "GUI version \"" << guiVersion.ascii() << "GUI version \"" << guiVersion.ascii()
<< "\" does not match sequencer version \"" << VERSION << "\" does not match sequencer version \"" << VERSION
<< "\"" << std::endl; << "\"" << std::endl;
} }
return drivertqStatus; return driverStatus;
} }
@ -1561,8 +1561,8 @@ RosegardenSequencerApp::connectMappedObjects(int id1, int id2)
// When this happens we need to resynchronise our audio processing, // When this happens we need to resynchronise our audio processing,
// and this is the easiest (and most brutal) way to do it. // and this is the easiest (and most brutal) way to do it.
if (m_transporttqStatus == PLAYING || if (m_transportStatus == PLAYING ||
m_transporttqStatus == RECORDING) { m_transportStatus == RECORDING) {
RealTime seqTime = m_driver->getSequencerTime(); RealTime seqTime = m_driver->getSequencerTime();
jumpTo(seqTime.sec, seqTime.nsec); jumpTo(seqTime.sec, seqTime.nsec);
} }
@ -1637,8 +1637,8 @@ RosegardenSequencerApp::slotCheckForNewClients()
{ {
// Don't do this check if any of these conditions hold // Don't do this check if any of these conditions hold
// //
if (m_transporttqStatus == PLAYING || if (m_transportStatus == PLAYING ||
m_transporttqStatus == RECORDING) m_transportStatus == RECORDING)
return ; return ;
if (m_driver->checkForNewClients()) { if (m_driver->checkForNewClients()) {
@ -1795,8 +1795,8 @@ RosegardenSequencerApp::checkExternalTransport()
"jumpToTime(int, int)", "jumpToTime(int, int)",
data); data);
if (m_transporttqStatus == PLAYING || if (m_transportStatus == PLAYING ||
m_transporttqStatus != RECORDING) { m_transportStatus != RECORDING) {
jumpTo(pair.second.sec, pair.second.usec() * 1000); jumpTo(pair.second.sec, pair.second.usec() * 1000);
} }

@ -162,7 +162,7 @@ public:
// Return the Sound system status (audio/MIDI) // Return the Sound system status (audio/MIDI)
// //
virtual unsigned int getSoundDrivertqStatus(const TQString &guiVersion); virtual unsigned int getSoundDriverStatus(const TQString &guiVersion);
// Add and remove Audio files on the sequencer // Add and remove Audio files on the sequencer
// //
@ -330,9 +330,9 @@ public:
void settqStatus(TransporttqStatus status) void setStatus(TransportStatus status)
{ m_transporttqStatus = status; } { m_transportStatus = status; }
TransporttqStatus gettqStatus() { return m_transporttqStatus; } TransportStatus getStatus() { return m_transportStatus; }
// Process the first chunk of Sequencer events // Process the first chunk of Sequencer events
bool startPlaying(); bool startPlaying();
@ -346,7 +346,7 @@ public:
bool checkExternalTransport(); bool checkExternalTransport();
// Sends status changes up to GUI // Sends status changes up to GUI
void notifySequencertqStatus(); void notifySequencerStatus();
// Send latest slice information back to GUI for display // Send latest slice information back to GUI for display
void notifyVisuals(MappedComposition *mC); void notifyVisuals(MappedComposition *mC);
@ -461,7 +461,7 @@ protected:
//--------------- Data members --------------------------------- //--------------- Data members ---------------------------------
SoundDriver *m_driver; SoundDriver *m_driver;
TransporttqStatus m_transporttqStatus; TransportStatus m_transportStatus;
// Position pointer // Position pointer
RealTime m_songPosition; RealTime m_songPosition;

@ -104,7 +104,7 @@ public:
// Get the status of the Sequencer // Get the status of the Sequencer
// //
virtual unsigned int getSoundDrivertqStatus(const TQString &guiVersion) = 0; virtual unsigned int getSoundDriverStatus(const TQString &guiVersion) = 0;
// Add and delete audio files on the Sequencer // Add and delete audio files on the Sequencer
// //

@ -131,21 +131,21 @@ int main(int argc, char *argv[])
// make sure the loop doesn't eat up all the // make sure the loop doesn't eat up all the
// processor - we're not in that much of a rush! // processor - we're not in that much of a rush!
// //
TransporttqStatus lastSeqtqStatus = roseSeq->gettqStatus(); TransportStatus lastSeqStatus = roseSeq->getStatus();
RealTime sleepTime = RealTime(0, 10000000); RealTime sleepTime = RealTime(0, 10000000);
while (!_exiting && roseSeq && roseSeq->gettqStatus() != TQUIT) { while (!_exiting && roseSeq && roseSeq->getStatus() != TQUIT) {
bool atLeisure = true; bool atLeisure = true;
switch (roseSeq->gettqStatus()) { switch (roseSeq->getStatus()) {
case STARTING_TO_PLAY: case STARTING_TO_PLAY:
if (!roseSeq->startPlaying()) { if (!roseSeq->startPlaying()) {
// send result failed and stop Sequencer // send result failed and stop Sequencer
roseSeq->settqStatus(STOPPING); roseSeq->setStatus(STOPPING);
} else { } else {
roseSeq->settqStatus(PLAYING); roseSeq->setStatus(PLAYING);
} }
break; break;
@ -153,7 +153,7 @@ int main(int argc, char *argv[])
if (!roseSeq->keepPlaying()) { if (!roseSeq->keepPlaying()) {
// there's a problem or the piece has // there's a problem or the piece has
// finished - so stop playing // finished - so stop playing
roseSeq->settqStatus(STOPPING); roseSeq->setStatus(STOPPING);
} else { } else {
// process any async events // process any async events
// //
@ -163,9 +163,9 @@ int main(int argc, char *argv[])
case STARTING_TO_RECORD: case STARTING_TO_RECORD:
if (!roseSeq->startPlaying()) { if (!roseSeq->startPlaying()) {
roseSeq->settqStatus(STOPPING); roseSeq->setStatus(STOPPING);
} else { } else {
roseSeq->settqStatus(RECORDING); roseSeq->setStatus(RECORDING);
} }
break; break;
@ -173,7 +173,7 @@ int main(int argc, char *argv[])
if (!roseSeq->keepPlaying()) { if (!roseSeq->keepPlaying()) {
// there's a problem or the piece has // there's a problem or the piece has
// finished - so stop playing // finished - so stop playing
roseSeq->settqStatus(STOPPING); roseSeq->setStatus(STOPPING);
} else { } else {
// Now process any incoming MIDI events // Now process any incoming MIDI events
// and return them to the gui // and return them to the gui
@ -196,7 +196,7 @@ int main(int argc, char *argv[])
// There's no call to roseSeq to actually process the // There's no call to roseSeq to actually process the
// stop, because this arises from a DCOP call from the GUI // stop, because this arises from a DCOP call from the GUI
// direct to roseSeq to start with // direct to roseSeq to start with
roseSeq->settqStatus(STOPPED); roseSeq->setStatus(STOPPED);
SEQUENCER_DEBUG << "RosegardenSequencer - Stopped" << endl; SEQUENCER_DEBUG << "RosegardenSequencer - Stopped" << endl;
break; break;
@ -226,10 +226,10 @@ int main(int argc, char *argv[])
// we want to process transport changes immediately // we want to process transport changes immediately
if (roseSeq->checkExternalTransport()) { if (roseSeq->checkExternalTransport()) {
atLeisure = false; atLeisure = false;
} else if (lastSeqtqStatus != roseSeq->gettqStatus()) { } else if (lastSeqStatus != roseSeq->getStatus()) {
SEQUENCER_DEBUG << "Sequencer status changed from " << lastSeqtqStatus << " to " << roseSeq->gettqStatus() << endl; SEQUENCER_DEBUG << "Sequencer status changed from " << lastSeqStatus << " to " << roseSeq->getStatus() << endl;
roseSeq->notifySequencertqStatus(); roseSeq->notifySequencerStatus();
lastSeqtqStatus = roseSeq->gettqStatus(); lastSeqStatus = roseSeq->getStatus();
atLeisure = false; atLeisure = false;
} }

@ -223,7 +223,7 @@ AlsaDriver::getSystemInfo()
} }
void void
AlsaDriver::showQueuetqStatus(int queue) AlsaDriver::showQueueStatus(int queue)
{ {
int err, idx, min, max; int err, idx, min, max;
snd_seq_queue_status_t *status; snd_seq_queue_status_t *status;
@ -705,7 +705,7 @@ AlsaDriver::generateInstruments()
DeviceId ssiDeviceId = getSpareDeviceId(); DeviceId ssiDeviceId = getSpareDeviceId();
if (m_drivertqStatus & AUDIO_OK) { if (m_driverStatus & AUDIO_OK) {
for (int i = 0; i < count; ++i) { for (int i = 0; i < count; ++i) {
sprintf(number, " #%d", i + 1); sprintf(number, " #%d", i + 1);
std::string name = "Synth plugin" + std::string(number); std::string name = "Synth plugin" + std::string(number);
@ -743,7 +743,7 @@ AlsaDriver::generateInstruments()
DeviceId audioDeviceId = getSpareDeviceId(); DeviceId audioDeviceId = getSpareDeviceId();
if (m_drivertqStatus & AUDIO_OK) if (m_driverStatus & AUDIO_OK)
{ {
for (int channel = 0; channel < audioCount; ++channel) { for (int channel = 0; channel < audioCount; ++channel) {
sprintf(number, " #%d", channel + 1); sprintf(number, " #%d", channel + 1);
@ -1507,7 +1507,7 @@ AlsaDriver::checkTimerSync(size_t frames)
#ifdef HAVE_LIBJACK #ifdef HAVE_LIBJACK
if (!m_jackDriver || !m_queueRunning || frames == 0 || if (!m_jackDriver || !m_queueRunning || frames == 0 ||
(getMTCtqStatus() == TRANSPORT_SLAVE)) { (getMTCStatus() == TRANSPORT_SLAVE)) {
m_firstTimerCheck = true; m_firstTimerCheck = true;
return ; return ;
} }
@ -1817,7 +1817,7 @@ AlsaDriver::initialiseMidi()
// Modify status with MIDI success // Modify status with MIDI success
// //
m_drivertqStatus |= MIDI_OK; m_driverStatus |= MIDI_OK;
generateTimerList(); generateTimerList();
setCurrentTimer(AUTO_TIMER_NAME); setCurrentTimer(AUTO_TIMER_NAME);
@ -1851,7 +1851,7 @@ AlsaDriver::initialiseAudio()
m_jackDriver = new JackDriver(this); m_jackDriver = new JackDriver(this);
if (m_jackDriver->isOK()) { if (m_jackDriver->isOK()) {
m_drivertqStatus |= AUDIO_OK; m_driverStatus |= AUDIO_OK;
} else { } else {
delete m_jackDriver; delete m_jackDriver;
m_jackDriver = 0; m_jackDriver = 0;
@ -1876,19 +1876,19 @@ AlsaDriver::initialisePlayback(const RealTime &position)
m_mtcSigmaE = 0; m_mtcSigmaE = 0;
m_mtcSigmaC = 0; m_mtcSigmaC = 0;
if (getMMCtqStatus() == TRANSPORT_MASTER) { if (getMMCStatus() == TRANSPORT_MASTER) {
sendMMC(127, MIDI_MMC_PLAY, true, ""); sendMMC(127, MIDI_MMC_PLAY, true, "");
m_eat_mtc = 0; m_eat_mtc = 0;
} }
if (getMTCtqStatus() == TRANSPORT_MASTER) { if (getMTCStatus() == TRANSPORT_MASTER) {
insertMTCFullFrame(position); insertMTCFullFrame(position);
} }
// If MIDI Sync is enabled then adjust for the MIDI Clock to // If MIDI Sync is enabled then adjust for the MIDI Clock to
// synchronise the sequencer with the clock. // synchronise the sequencer with the clock.
// //
if (getMIDISynctqStatus() == TRANSPORT_MASTER) { if (getMIDISyncStatus() == TRANSPORT_MASTER) {
// Send the Song Position Pointer for MIDI CLOCK positioning // Send the Song Position Pointer for MIDI CLOCK positioning
// //
// Get time from current alsa time to start of alsa timing - // Get time from current alsa time to start of alsa timing -
@ -1935,11 +1935,11 @@ AlsaDriver::stopPlayback()
std::cerr << "\n\nAlsaDriver - stopPlayback" << std::endl; std::cerr << "\n\nAlsaDriver - stopPlayback" << std::endl;
#endif #endif
if (getMIDISynctqStatus() == TRANSPORT_MASTER) { if (getMIDISyncStatus() == TRANSPORT_MASTER) {
sendSystemDirect(SND_SEQ_EVENT_STOP, NULL); sendSystemDirect(SND_SEQ_EVENT_STOP, NULL);
} }
if (getMMCtqStatus() == TRANSPORT_MASTER) { if (getMMCStatus() == TRANSPORT_MASTER) {
sendMMC(127, MIDI_MMC_STOP, true, ""); sendMMC(127, MIDI_MMC_STOP, true, "");
//<VN> need to throw away the next MTC event //<VN> need to throw away the next MTC event
m_eat_mtc = 3; m_eat_mtc = 3;
@ -1992,7 +1992,7 @@ AlsaDriver::punchOut()
#ifdef HAVE_LIBJACK #ifdef HAVE_LIBJACK
// Close any recording file // Close any recording file
if (m_recordtqStatus == RECORD_ON) { if (m_recordStatus == RECORD_ON) {
for (InstrumentSet::const_iterator i = m_recordingInstruments.begin(); for (InstrumentSet::const_iterator i = m_recordingInstruments.begin();
i != m_recordingInstruments.end(); ++i) { i != m_recordingInstruments.end(); ++i) {
@ -2037,8 +2037,8 @@ AlsaDriver::punchOut()
// Change recorded state if any set // Change recorded state if any set
// //
if (m_recordtqStatus == RECORD_ON) if (m_recordStatus == RECORD_ON)
m_recordtqStatus = RECORD_OFF; m_recordStatus = RECORD_OFF;
m_recordingInstruments.clear(); m_recordingInstruments.clear();
} }
@ -2050,7 +2050,7 @@ AlsaDriver::resetPlayback(const RealTime &oldPosition, const RealTime &position)
std::cerr << "\n\nAlsaDriver - resetPlayback(" << oldPosition << "," << position << ")" << std::endl; std::cerr << "\n\nAlsaDriver - resetPlayback(" << oldPosition << "," << position << ")" << std::endl;
#endif #endif
if (getMMCtqStatus() == TRANSPORT_MASTER) { if (getMMCStatus() == TRANSPORT_MASTER) {
unsigned char t_sec = (unsigned char) position.sec % 60; unsigned char t_sec = (unsigned char) position.sec % 60;
unsigned char t_min = (unsigned char) (position.sec / 60) % 60; unsigned char t_min = (unsigned char) (position.sec / 60) % 60;
unsigned char t_hrs = (unsigned char) (position.sec / 3600); unsigned char t_hrs = (unsigned char) (position.sec / 3600);
@ -2135,7 +2135,7 @@ AlsaDriver::resetPlayback(const RealTime &oldPosition, const RealTime &position)
snd_seq_remove_events_set_condition(info, SND_SEQ_REMOVE_OUTPUT); snd_seq_remove_events_set_condition(info, SND_SEQ_REMOVE_OUTPUT);
snd_seq_remove_events(m_midiHandle, info); snd_seq_remove_events(m_midiHandle, info);
if (getMTCtqStatus() == TRANSPORT_MASTER) { if (getMTCStatus() == TRANSPORT_MASTER) {
m_mtcFirstTime = -1; m_mtcFirstTime = -1;
m_mtcSigmaE = 0; m_mtcSigmaE = 0;
m_mtcSigmaC = 0; m_mtcSigmaC = 0;
@ -2718,7 +2718,7 @@ AlsaDriver::getMappedComposition()
case SND_SEQ_EVENT_QFRAME: case SND_SEQ_EVENT_QFRAME:
if (fromController) if (fromController)
continue; continue;
if (getMTCtqStatus() == TRANSPORT_SLAVE) { if (getMTCStatus() == TRANSPORT_SLAVE) {
handleMTCTQFrame(event->data.control.value, eventTime); handleMTCTQFrame(event->data.control.value, eventTime);
} }
break; break;
@ -2733,7 +2733,7 @@ AlsaDriver::getMappedComposition()
break; break;
case SND_SEQ_EVENT_START: case SND_SEQ_EVENT_START:
if ((getMIDISynctqStatus() == TRANSPORT_SLAVE) && !isPlaying()) { if ((getMIDISyncStatus() == TRANSPORT_SLAVE) && !isPlaying()) {
ExternalTransport *transport = getExternalTransportControl(); ExternalTransport *transport = getExternalTransportControl();
if (transport) { if (transport) {
transport->transportJump(ExternalTransport::TransportStopAtTime, transport->transportJump(ExternalTransport::TransportStopAtTime,
@ -2749,7 +2749,7 @@ AlsaDriver::getMappedComposition()
break; break;
case SND_SEQ_EVENT_CONTINUE: case SND_SEQ_EVENT_CONTINUE:
if ((getMIDISynctqStatus() == TRANSPORT_SLAVE) && !isPlaying()) { if ((getMIDISyncStatus() == TRANSPORT_SLAVE) && !isPlaying()) {
ExternalTransport *transport = getExternalTransportControl(); ExternalTransport *transport = getExternalTransportControl();
if (transport) { if (transport) {
transport->transportChange(ExternalTransport::TransportPlay); transport->transportChange(ExternalTransport::TransportPlay);
@ -2763,7 +2763,7 @@ AlsaDriver::getMappedComposition()
break; break;
case SND_SEQ_EVENT_STOP: case SND_SEQ_EVENT_STOP:
if ((getMIDISynctqStatus() == TRANSPORT_SLAVE) && isPlaying()) { if ((getMIDISyncStatus() == TRANSPORT_SLAVE) && isPlaying()) {
ExternalTransport *transport = getExternalTransportControl(); ExternalTransport *transport = getExternalTransportControl();
if (transport) { if (transport) {
transport->transportChange(ExternalTransport::TransportStop); transport->transportChange(ExternalTransport::TransportStop);
@ -2819,7 +2819,7 @@ AlsaDriver::getMappedComposition()
} }
} }
if (getMTCtqStatus() == TRANSPORT_SLAVE && isPlaying()) { if (getMTCStatus() == TRANSPORT_SLAVE && isPlaying()) {
#ifdef MTC_DEBUG #ifdef MTC_DEBUG
std::cerr << "seq time is " << getSequencerTime() << ", last MTC receive " std::cerr << "seq time is " << getSequencerTime() << ", last MTC receive "
<< m_mtcLastReceive << ", first time " << m_mtcFirstTime << std::endl; << m_mtcLastReceive << ", first time " << m_mtcFirstTime << std::endl;
@ -2846,7 +2846,7 @@ static int lock_count = 0;
void void
AlsaDriver::handleMTCTQFrame(unsigned int data_byte, RealTime the_time) AlsaDriver::handleMTCTQFrame(unsigned int data_byte, RealTime the_time)
{ {
if (getMTCtqStatus() != TRANSPORT_SLAVE) if (getMTCStatus() != TRANSPORT_SLAVE)
return ; return ;
switch (data_byte & 0xF0) { switch (data_byte & 0xF0) {
@ -3172,7 +3172,7 @@ AlsaDriver::insertMTCTQFrames(RealTime sliceStart, RealTime sliceEnd)
bool bool
AlsaDriver::testForMTCSysex(const snd_seq_event_t *event) AlsaDriver::testForMTCSysex(const snd_seq_event_t *event)
{ {
if (getMTCtqStatus() != TRANSPORT_SLAVE) if (getMTCStatus() != TRANSPORT_SLAVE)
return false; return false;
// At this point, and possibly for the foreseeable future, the only // At this point, and possibly for the foreseeable future, the only
@ -3344,7 +3344,7 @@ AlsaDriver::tweakSkewForMTC(int factor)
bool bool
AlsaDriver::testForMMCSysex(const snd_seq_event_t *event) AlsaDriver::testForMMCSysex(const snd_seq_event_t *event)
{ {
if (getMMCtqStatus() != TRANSPORT_SLAVE) if (getMMCStatus() != TRANSPORT_SLAVE)
return false; return false;
if (event->data.ext.len != 6) if (event->data.ext.len != 6)
@ -3764,7 +3764,7 @@ AlsaDriver::processMidiOut(const MappedComposition &mC,
processNotesOff(sliceEnd - m_playStartPosition + m_alsaPlayStartTime, now); processNotesOff(sliceEnd - m_playStartPosition + m_alsaPlayStartTime, now);
if (getMTCtqStatus() == TRANSPORT_MASTER) { if (getMTCStatus() == TRANSPORT_MASTER) {
insertMTCTQFrames(sliceStart, sliceEnd); insertMTCTQFrames(sliceStart, sliceEnd);
} }
@ -4009,7 +4009,7 @@ AlsaDriver::processEventsOut(const MappedComposition &mC,
// we're really rolling. // we're really rolling.
m_playing = true; m_playing = true;
if (getMTCtqStatus() == TRANSPORT_SLAVE) { if (getMTCStatus() == TRANSPORT_SLAVE) {
tweakSkewForMTC(0); tweakSkewForMTC(0);
} }
} }
@ -4155,7 +4155,7 @@ AlsaDriver::processEventsOut(const MappedComposition &mC,
<< std::endl; << std::endl;
#endif #endif
setMIDISynctqStatus(TRANSPORT_OFF); setMIDISyncStatus(TRANSPORT_OFF);
break; break;
case 1: case 1:
@ -4167,7 +4167,7 @@ AlsaDriver::processEventsOut(const MappedComposition &mC,
<< std::endl; << std::endl;
#endif #endif
setMIDISynctqStatus(TRANSPORT_MASTER); setMIDISyncStatus(TRANSPORT_MASTER);
break; break;
case 2: case 2:
@ -4179,7 +4179,7 @@ AlsaDriver::processEventsOut(const MappedComposition &mC,
<< std::endl; << std::endl;
#endif #endif
setMIDISynctqStatus(TRANSPORT_SLAVE); setMIDISyncStatus(TRANSPORT_SLAVE);
break; break;
} }
} }
@ -4274,7 +4274,7 @@ AlsaDriver::processEventsOut(const MappedComposition &mC,
<< std::endl; << std::endl;
#endif #endif
setMMCtqStatus(TRANSPORT_MASTER); setMMCStatus(TRANSPORT_MASTER);
break; break;
case 2: case 2:
@ -4285,7 +4285,7 @@ AlsaDriver::processEventsOut(const MappedComposition &mC,
<< std::endl; << std::endl;
#endif #endif
setMMCtqStatus(TRANSPORT_SLAVE); setMMCStatus(TRANSPORT_SLAVE);
break; break;
case 0: case 0:
@ -4297,7 +4297,7 @@ AlsaDriver::processEventsOut(const MappedComposition &mC,
<< std::endl; << std::endl;
#endif #endif
setMMCtqStatus(TRANSPORT_OFF); setMMCStatus(TRANSPORT_OFF);
break; break;
} }
} }
@ -4312,7 +4312,7 @@ AlsaDriver::processEventsOut(const MappedComposition &mC,
<< std::endl; << std::endl;
#endif #endif
setMTCtqStatus(TRANSPORT_MASTER); setMTCStatus(TRANSPORT_MASTER);
tweakSkewForMTC(0); tweakSkewForMTC(0);
m_mtcFirstTime = -1; m_mtcFirstTime = -1;
break; break;
@ -4325,7 +4325,7 @@ AlsaDriver::processEventsOut(const MappedComposition &mC,
<< std::endl; << std::endl;
#endif #endif
setMTCtqStatus(TRANSPORT_SLAVE); setMTCStatus(TRANSPORT_SLAVE);
m_mtcFirstTime = -1; m_mtcFirstTime = -1;
break; break;
@ -4338,7 +4338,7 @@ AlsaDriver::processEventsOut(const MappedComposition &mC,
<< std::endl; << std::endl;
#endif #endif
setMTCtqStatus(TRANSPORT_OFF); setMTCStatus(TRANSPORT_OFF);
m_mtcFirstTime = -1; m_mtcFirstTime = -1;
break; break;
} }
@ -4477,15 +4477,15 @@ AlsaDriver::processEventsOut(const MappedComposition &mC,
} }
bool bool
AlsaDriver::record(RecordtqStatus recordtqStatus, AlsaDriver::record(RecordStatus recordStatus,
const std::vector<InstrumentId> *armedInstruments, const std::vector<InstrumentId> *armedInstruments,
const std::vector<TQString> *audioFileNames) const std::vector<TQString> *audioFileNames)
{ {
m_recordingInstruments.clear(); m_recordingInstruments.clear();
if (recordtqStatus == RECORD_ON) { if (recordStatus == RECORD_ON) {
// start recording // start recording
m_recordtqStatus = RECORD_ON; m_recordStatus = RECORD_ON;
m_alsaRecordStartTime = RealTime::zeroTime; m_alsaRecordStartTime = RealTime::zeroTime;
unsigned int audioCount = 0; unsigned int audioCount = 0;
@ -4522,7 +4522,7 @@ AlsaDriver::record(RecordtqStatus recordtqStatus,
#endif #endif
if (!good) { if (!good) {
m_recordtqStatus = RECORD_OFF; m_recordStatus = RECORD_OFF;
std::cerr << "AlsaDriver::record: No JACK driver, or JACK driver failed to prepare for recording audio" << std::endl; std::cerr << "AlsaDriver::record: No JACK driver, or JACK driver failed to prepare for recording audio" << std::endl;
return false; return false;
} }
@ -4532,8 +4532,8 @@ AlsaDriver::record(RecordtqStatus recordtqStatus,
} }
} }
} else } else
if (recordtqStatus == RECORD_OFF) { if (recordStatus == RECORD_OFF) {
m_recordtqStatus = RECORD_OFF; m_recordStatus = RECORD_OFF;
} }
#ifdef DEBUG_ALSA #ifdef DEBUG_ALSA
else { else {

@ -68,7 +68,7 @@ public:
virtual MappedComposition *getMappedComposition(); virtual MappedComposition *getMappedComposition();
virtual bool record(RecordtqStatus recordtqStatus, virtual bool record(RecordStatus recordStatus,
const std::vector<InstrumentId> *armedInstruments = 0, const std::vector<InstrumentId> *armedInstruments = 0,
const std::vector<TQString> *audioFileNames = 0); const std::vector<TQString> *audioFileNames = 0);
@ -105,7 +105,7 @@ public:
// Some stuff to help us debug this // Some stuff to help us debug this
// //
void getSystemInfo(); void getSystemInfo();
void showQueuetqStatus(int queue); void showQueueStatus(int queue);
// Process pending // Process pending
// //

@ -537,7 +537,7 @@ AudioFileManager::createRecordingAudioFile()
while (fileName == "") { while (fileName == "") {
fileName = TQString("rg-%1-%2.wav") fileName = TQString("rg-%1-%2.wav")
.tqarg(TQDateTime::tqcurrentDateTime().toString("yyyyMMdd-hhmmss")) .tqarg(TQDateTime::currentDateTime().toString("yyyyMMdd-hhmmss"))
.tqarg(newId + 1); .tqarg(newId + 1);
if (TQFile(m_audioPath.c_str() + fileName).exists()) { if (TQFile(m_audioPath.c_str() + fileName).exists()) {
@ -624,7 +624,7 @@ AudioFileManager::createDerivedAudioFile(AudioFileId source,
fileName = TQString("%1-%2-%3-%4.wav") fileName = TQString("%1-%2-%3-%4.wav")
.tqarg(prefix) .tqarg(prefix)
.tqarg(sourceBase.c_str()) .tqarg(sourceBase.c_str())
.tqarg(TQDateTime::tqcurrentDateTime().toString("yyyyMMdd-hhmmss")) .tqarg(TQDateTime::currentDateTime().toString("yyyyMMdd-hhmmss"))
.tqarg(newId + 1); .tqarg(newId + 1);
if (TQFile(m_audioPath.c_str() + fileName).exists()) { if (TQFile(m_audioPath.c_str() + fileName).exists()) {
@ -754,7 +754,7 @@ AudioFileManager::importFile(const std::string &fileName, int sampleRate)
targetName = TQString("conv-%2-%3-%4.wav") targetName = TQString("conv-%2-%3-%4.wav")
.tqarg(sourceBase) .tqarg(sourceBase)
.tqarg(TQDateTime::tqcurrentDateTime().toString("yyyyMMdd-hhmmss")) .tqarg(TQDateTime::currentDateTime().toString("yyyyMMdd-hhmmss"))
.tqarg(newId + 1); .tqarg(newId + 1);
if (TQFile(m_audioPath.c_str() + targetName).exists()) { if (TQFile(m_audioPath.c_str() + targetName).exists()) {
@ -777,7 +777,7 @@ AudioFileManager::importFile(const std::string &fileName, int sampleRate)
m_importProcess->start(KProcess::NotifyOnExit, KProcess::NoCommunication); m_importProcess->start(KProcess::NotifyOnExit, KProcess::NoCommunication);
while (m_importProcess->isRunning()) { while (m_importProcess->isRunning()) {
kapp->tqprocessEvents(100); kapp->processEvents(100);
} }
if (!m_importProcess->normalExit()) { if (!m_importProcess->normalExit()) {

@ -2337,7 +2337,7 @@ AudioFileWriter::closeRecordFile(InstrumentId id, AudioFileId &returnedId)
return false; return false;
returnedId = m_files[id].first->getId(); returnedId = m_files[id].first->getId();
m_files[id].second->settqStatus(RecordableAudioFile::DEFUNCT); m_files[id].second->setStatus(RecordableAudioFile::DEFUNCT);
#ifdef DEBUG_WRITER #ifdef DEBUG_WRITER
@ -2364,7 +2364,7 @@ AudioFileWriter::haveRecordFileOpen(InstrumentId id)
} }
return (m_files[id].first && return (m_files[id].first &&
(m_files[id].second->gettqStatus() != RecordableAudioFile::DEFUNCT)); (m_files[id].second->getStatus() != RecordableAudioFile::DEFUNCT));
} }
bool bool
@ -2377,7 +2377,7 @@ AudioFileWriter::haveRecordFilesOpen()
for (InstrumentId id = instrumentBase; id < instrumentBase + instrumentCount; ++id) { for (InstrumentId id = instrumentBase; id < instrumentBase + instrumentCount; ++id) {
if (m_files[id].first && if (m_files[id].first &&
(m_files[id].second->gettqStatus() != RecordableAudioFile::DEFUNCT)) { (m_files[id].second->getStatus() != RecordableAudioFile::DEFUNCT)) {
#ifdef DEBUG_WRITER #ifdef DEBUG_WRITER
std::cerr << "AudioFileWriter::haveRecordFilesOpen: found open record file for instrument " << id << std::endl; std::cerr << "AudioFileWriter::haveRecordFilesOpen: found open record file for instrument " << id << std::endl;
#endif #endif
@ -2410,7 +2410,7 @@ AudioFileWriter::kick(bool wantLock)
RecordableAudioFile *raf = m_files[id].second; RecordableAudioFile *raf = m_files[id].second;
if (raf->gettqStatus() == RecordableAudioFile::DEFUNCT) { if (raf->getStatus() == RecordableAudioFile::DEFUNCT) {
#ifdef DEBUG_WRITER #ifdef DEBUG_WRITER
std::cerr << "AudioFileWriter::kick: found defunct file on instrument " << id << std::endl; std::cerr << "AudioFileWriter::kick: found defunct file on instrument " << id << std::endl;

@ -60,7 +60,7 @@ public:
// Activate a recording state // Activate a recording state
// //
virtual bool record(RecordtqStatus /*recordtqStatus*/, virtual bool record(RecordStatus /*recordStatus*/,
const std::vector<InstrumentId> */*armedInstruments = 0*/, const std::vector<InstrumentId> */*armedInstruments = 0*/,
const std::vector<TQString> */*audioFileNames = 0*/) const std::vector<TQString> */*audioFileNames = 0*/)
{ return false; } { return false; }

@ -1383,7 +1383,7 @@ JackDriver::jackProcessRecord(InstrumentId id,
float gain = AudioLevel::dB_to_multiplier(level); float gain = AudioLevel::dB_to_multiplier(level);
if (m_alsaDriver->getRecordtqStatus() == RECORD_ON && if (m_alsaDriver->getRecordStatus() == RECORD_ON &&
clocksRunning && clocksRunning &&
m_fileWriter->haveRecordFileOpen(id)) { m_fileWriter->haveRecordFileOpen(id)) {

@ -171,7 +171,7 @@ MidiFile::getMidiByte(ifstream* midiFile)
emit setProgress((int)(double(midiFile->tellg()) / emit setProgress((int)(double(midiFile->tellg()) /
double(m_fileSize) * 20.0)); double(m_fileSize) * 20.0));
kapp->tqprocessEvents(50); kapp->processEvents(50);
} }
return (MidiByte)byte; return (MidiByte)byte;
@ -249,7 +249,7 @@ MidiFile::getMidiBytes(ifstream* midiFile, unsigned long numberOfBytes)
if (bytesGot % 2000 == 0) { if (bytesGot % 2000 == 0) {
emit setProgress((int)(double(midiFile->tellg()) / emit setProgress((int)(double(midiFile->tellg()) /
double(m_fileSize) * 20.0)); double(m_fileSize) * 20.0));
kapp->tqprocessEvents(50); kapp->processEvents(50);
} }
return stringRet; return stringRet;
@ -524,7 +524,7 @@ MidiFile::parseTrack(ifstream* midiFile, TrackId &lastTrackNum)
TrackId metaTrack = lastTrackNum; TrackId metaTrack = lastTrackNum;
// Remember the last non-meta status byte (-1 if we haven't seen one) // Remember the last non-meta status byte (-1 if we haven't seen one)
int runningtqStatus = -1; int runningStatus = -1;
bool firstTrack = true; bool firstTrack = true;
@ -550,11 +550,11 @@ MidiFile::parseTrack(ifstream* midiFile, TrackId &lastTrackNum)
midiByte = getMidiByte(midiFile); midiByte = getMidiByte(midiFile);
if (!(midiByte & MIDI_STATUS_BYTE_MASK)) { if (!(midiByte & MIDI_STATUS_BYTE_MASK)) {
if (runningtqStatus < 0) { if (runningStatus < 0) {
throw (Exception("Running status used for first event in track")); throw (Exception("Running status used for first event in track"));
} }
eventCode = (MidiByte)runningtqStatus; eventCode = (MidiByte)runningStatus;
data1 = midiByte; data1 = midiByte;
#ifdef MIDI_DEBUG #ifdef MIDI_DEBUG
@ -603,7 +603,7 @@ MidiFile::parseTrack(ifstream* midiFile, TrackId &lastTrackNum)
} else // the rest } else // the rest
{ {
runningtqStatus = eventCode; runningStatus = eventCode;
MidiEvent *midiEvent; MidiEvent *midiEvent;
@ -842,7 +842,7 @@ MidiFile::convertToRosegarden(Composition &composition, ConversionType type)
// split over these tracks // split over these tracks
emit setProgress(20 + emit setProgress(20 +
(int)((80.0 * double(i) / double(m_numberOfTracks)))); (int)((80.0 * double(i) / double(m_numberOfTracks))));
kapp->tqprocessEvents(50); kapp->processEvents(50);
// Convert the deltaTime to an absolute time since // Convert the deltaTime to an absolute time since
// the start of the segment. The addTime method // the start of the segment. The addTime method
@ -2120,7 +2120,7 @@ MidiFile::writeTrack(std::ofstream* midiFile, TrackId trackNumber)
if (progressCount % 500 == 0) { if (progressCount % 500 == 0) {
emit setProgress(progressCount * 100 / progressTotal); emit setProgress(progressCount * 100 / progressTotal);
kapp->tqprocessEvents(500); kapp->processEvents(500);
} }
} }

@ -286,7 +286,7 @@ PeakFile::close()
// Set modification time to now // Set modification time to now
// //
m_modificationTime = m_modificationTime.tqcurrentDateTime(); m_modificationTime = m_modificationTime.currentDateTime();
TQString fDate; TQString fDate;
fDate.sprintf("%04d:%02d:%02d:%02d:%02d:%02d:%03d", fDate.sprintf("%04d:%02d:%02d:%02d:%02d:%02d:%03d",

@ -44,21 +44,21 @@ public:
IDLE, IDLE,
RECORDING, RECORDING,
DEFUNCT DEFUNCT
} RecordtqStatus; } RecordStatus;
RecordableAudioFile(AudioFile *audioFile, // should be already open for writing RecordableAudioFile(AudioFile *audioFile, // should be already open for writing
size_t bufferSize); size_t bufferSize);
~RecordableAudioFile(); ~RecordableAudioFile();
void settqStatus(const RecordtqStatus &status) { m_status = status; } void setStatus(const RecordStatus &status) { m_status = status; }
RecordtqStatus gettqStatus() const { return m_status; } RecordStatus getStatus() const { return m_status; }
size_t buffer(const sample_t *data, int channel, size_t frames); size_t buffer(const sample_t *data, int channel, size_t frames);
void write(); void write();
protected: protected:
AudioFile *m_audioFile; AudioFile *m_audioFile;
RecordtqStatus m_status; RecordStatus m_status;
std::vector<RingBuffer<sample_t> *> m_ringBuffers; // one per channel std::vector<RingBuffer<sample_t> *> m_ringBuffers; // one per channel
}; };

@ -40,12 +40,12 @@ namespace Rosegarden
SoundDriver::SoundDriver(MappedStudio *studio, const std::string &name): SoundDriver::SoundDriver(MappedStudio *studio, const std::string &name):
m_name(name), m_name(name),
m_drivertqStatus(NO_DRIVER), m_driverStatus(NO_DRIVER),
m_playStartPosition(0, 0), m_playStartPosition(0, 0),
m_startPlayback(false), m_startPlayback(false),
m_playing(false), m_playing(false),
m_midiRecordDevice(0), m_midiRecordDevice(0),
m_recordtqStatus(RECORD_OFF), m_recordStatus(RECORD_OFF),
m_midiRunningId(MidiInstrumentBase), m_midiRunningId(MidiInstrumentBase),
m_audioRunningId(AudioInstrumentBase), m_audioRunningId(AudioInstrumentBase),
// m_audioQueueScavenger(4, 50), // m_audioQueueScavenger(4, 50),
@ -55,8 +55,8 @@ SoundDriver::SoundDriver(MappedStudio *studio, const std::string &name):
m_studio(studio), m_studio(studio),
m_sequencerDataBlock(0), m_sequencerDataBlock(0),
m_externalTransport(0), m_externalTransport(0),
m_mmctqStatus(TRANSPORT_OFF), m_mmcStatus(TRANSPORT_OFF),
m_mtctqStatus(TRANSPORT_OFF), m_mtcStatus(TRANSPORT_OFF),
m_mmcId(0), // default MMC id of 0 m_mmcId(0), // default MMC id of 0
m_midiClockEnabled(false), m_midiClockEnabled(false),
m_midiClockInterval(0, 0), m_midiClockInterval(0, 0),

@ -54,10 +54,10 @@ typedef enum
{ {
RECORD_OFF, RECORD_OFF,
RECORD_ON, RECORD_ON,
} RecordtqStatus; } RecordStatus;
// tqStatus of a SoundDriver - whether we're got an audio and // Status of a SoundDriver - whether we're got an audio and
// MIDI subsystem or not. This is reported right up to the // MIDI subsystem or not. This is reported right up to the
// gui. // gui.
// //
@ -67,7 +67,7 @@ typedef enum
AUDIO_OK = 0x01, // AUDIO's OK AUDIO_OK = 0x01, // AUDIO's OK
MIDI_OK = 0x02, // MIDI's OK MIDI_OK = 0x02, // MIDI's OK
VERSION_OK = 0x04 // GUI and sequencer versions match VERSION_OK = 0x04 // GUI and sequencer versions match
} SoundDrivertqStatus; } SoundDriverStatus;
// Used for MMC and MTC, not for JACK transport // Used for MMC and MTC, not for JACK transport
@ -77,7 +77,7 @@ typedef enum
TRANSPORT_OFF, TRANSPORT_OFF,
TRANSPORT_MASTER, TRANSPORT_MASTER,
TRANSPORT_SLAVE TRANSPORT_SLAVE
} TransportSynctqStatus; } TransportSyncStatus;
// The NoteOffQueue holds a time ordered set of // The NoteOffQueue holds a time ordered set of
@ -179,7 +179,7 @@ public:
// Activate a recording state. armedInstruments and audioFileNames // Activate a recording state. armedInstruments and audioFileNames
// can be NULL if no audio tracks recording. // can be NULL if no audio tracks recording.
// //
virtual bool record(RecordtqStatus recordtqStatus, virtual bool record(RecordStatus recordStatus,
const std::vector<InstrumentId> *armedInstruments = 0, const std::vector<InstrumentId> *armedInstruments = 0,
const std::vector<TQString> *audioFileNames = 0) = 0; const std::vector<TQString> *audioFileNames = 0) = 0;
@ -269,7 +269,7 @@ public:
// Return the current status of the driver // Return the current status of the driver
// //
unsigned int gettqStatus() const { return m_drivertqStatus; } unsigned int getStatus() const { return m_driverStatus; }
// Are we playing? // Are we playing?
// //
@ -281,7 +281,7 @@ public:
virtual bool areClocksRunning() const = 0; virtual bool areClocksRunning() const = 0;
RealTime getStartPosition() const { return m_playStartPosition; } RealTime getStartPosition() const { return m_playStartPosition; }
RecordtqStatus getRecordtqStatus() const { return m_recordtqStatus; } RecordStatus getRecordStatus() const { return m_recordStatus; }
// Return a MappedDevice full of the Instrument mappings // Return a MappedDevice full of the Instrument mappings
// that the driver has discovered. The gui can then use // that the driver has discovered. The gui can then use
@ -385,18 +385,18 @@ public:
// MIDI Realtime Sync setting // MIDI Realtime Sync setting
// //
TransportSynctqStatus getMIDISynctqStatus() const { return m_midiSynctqStatus; } TransportSyncStatus getMIDISyncStatus() const { return m_midiSyncStatus; }
void setMIDISynctqStatus(TransportSynctqStatus status) { m_midiSynctqStatus = status; } void setMIDISyncStatus(TransportSyncStatus status) { m_midiSyncStatus = status; }
// MMC master/slave setting // MMC master/slave setting
// //
TransportSynctqStatus getMMCtqStatus() const { return m_mmctqStatus; } TransportSyncStatus getMMCStatus() const { return m_mmcStatus; }
void setMMCtqStatus(TransportSynctqStatus status) { m_mmctqStatus = status; } void setMMCStatus(TransportSyncStatus status) { m_mmcStatus = status; }
// MTC master/slave setting // MTC master/slave setting
// //
TransportSynctqStatus getMTCtqStatus() const { return m_mtctqStatus; } TransportSyncStatus getMTCStatus() const { return m_mtcStatus; }
void setMTCtqStatus(TransportSynctqStatus status) { m_mtctqStatus = status; } void setMTCStatus(TransportSyncStatus status) { m_mtcStatus = status; }
// MMC Id // MMC Id
// //
@ -446,7 +446,7 @@ protected:
AudioFile* getAudioFile(unsigned int id); AudioFile* getAudioFile(unsigned int id);
std::string m_name; std::string m_name;
unsigned int m_drivertqStatus; unsigned int m_driverStatus;
RealTime m_playStartPosition; RealTime m_playStartPosition;
bool m_startPlayback; bool m_startPlayback;
bool m_playing; bool m_playing;
@ -470,7 +470,7 @@ protected:
MappedComposition m_recordComposition; MappedComposition m_recordComposition;
MappedComposition m_returnComposition; MappedComposition m_returnComposition;
RecordtqStatus m_recordtqStatus; RecordStatus m_recordStatus;
InstrumentId m_midiRunningId; InstrumentId m_midiRunningId;
@ -506,9 +506,9 @@ protected:
// MMC and MTC status and ID // MMC and MTC status and ID
// //
TransportSynctqStatus m_midiSynctqStatus; TransportSyncStatus m_midiSyncStatus;
TransportSynctqStatus m_mmctqStatus; TransportSyncStatus m_mmcStatus;
TransportSynctqStatus m_mtctqStatus; TransportSyncStatus m_mtcStatus;
MidiByte m_mmcId; // device id MidiByte m_mmcId; // device id
// MIDI clock interval // MIDI clock interval

Loading…
Cancel
Save