summaryrefslogtreecommitdiffstats
path: root/src/gui/studio/MidiMixerWindow.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-05-02 22:38:52 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-05-02 22:38:52 +0000
commit458efa7b0c935cbaafa2791021a5f8f7241aa876 (patch)
tree624583f2873febe23770bee3fa94b5c24bd59f4f /src/gui/studio/MidiMixerWindow.cpp
parent747037b72944ae2c02962b7c5c96e0a7f8852e38 (diff)
downloadrosegarden-458efa7b0c935cbaafa2791021a5f8f7241aa876.tar.gz
rosegarden-458efa7b0c935cbaafa2791021a5f8f7241aa876.zip
Initial TQt4 port of Rosegarden
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/rosegarden@1230242 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/gui/studio/MidiMixerWindow.cpp')
-rw-r--r--src/gui/studio/MidiMixerWindow.cpp74
1 files changed, 37 insertions, 37 deletions
diff --git a/src/gui/studio/MidiMixerWindow.cpp b/src/gui/studio/MidiMixerWindow.cpp
index 047ba39..cb65b09 100644
--- a/src/gui/studio/MidiMixerWindow.cpp
+++ b/src/gui/studio/MidiMixerWindow.cpp
@@ -63,66 +63,66 @@
namespace Rosegarden
{
-MidiMixerWindow::MidiMixerWindow(TQWidget *parent,
+MidiMixerWindow::MidiMixerWindow(TQWidget *tqparent,
RosegardenGUIDoc *document):
- MixerWindow(parent, document),
+ MixerWindow(tqparent, document),
m_tabFrame(0)
{
// Initial setup
//
setupTabs();
- KStdAction::close(this,
+ KStdAction::close(TQT_TQOBJECT(this),
TQT_SLOT(slotClose()),
actionCollection());
- TQIconSet icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap
+ TQIconSet icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap
("transport-play")));
- KAction *play = new KAction(i18n("&Play"), icon, Key_Enter, this,
+ KAction *play = new KAction(i18n("&Play"), icon, Key_Enter, TQT_TQOBJECT(this),
TQT_SIGNAL(play()), actionCollection(), "play");
// Alternative shortcut for Play
KShortcut playShortcut = play->shortcut();
playShortcut.append( KKey(Key_Return + CTRL) );
play->setShortcut(playShortcut);
- icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap
+ icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap
("transport-stop")));
- new KAction(i18n("&Stop"), icon, Key_Insert, this,
+ new KAction(i18n("&Stop"), icon, Key_Insert, TQT_TQOBJECT(this),
TQT_SIGNAL(stop()), actionCollection(), "stop");
- icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap
+ icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap
("transport-rewind")));
- new KAction(i18n("Re&wind"), icon, Key_End, this,
+ new KAction(i18n("Re&wind"), icon, Key_End, TQT_TQOBJECT(this),
TQT_SIGNAL(rewindPlayback()), actionCollection(),
"playback_pointer_back_bar");
- icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap
+ icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap
("transport-ffwd")));
- new KAction(i18n("&Fast Forward"), icon, Key_PageDown, this,
+ new KAction(i18n("&Fast Forward"), icon, Key_PageDown, TQT_TQOBJECT(this),
TQT_SIGNAL(fastForwardPlayback()), actionCollection(),
"playback_pointer_forward_bar");
- icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap
+ icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap
("transport-rewind-end")));
- new KAction(i18n("Rewind to &Beginning"), icon, 0, this,
+ new KAction(i18n("Rewind to &Beginning"), icon, 0, TQT_TQOBJECT(this),
TQT_SIGNAL(rewindPlaybackToBeginning()), actionCollection(),
"playback_pointer_start");
- icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap
+ icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap
("transport-ffwd-end")));
- new KAction(i18n("Fast Forward to &End"), icon, 0, this,
+ new KAction(i18n("Fast Forward to &End"), icon, 0, TQT_TQOBJECT(this),
TQT_SIGNAL(fastForwardPlaybackToEnd()), actionCollection(),
"playback_pointer_end");
- icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap
+ icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap
("transport-record")));
- new KAction(i18n("&Record"), icon, 0, this,
+ new KAction(i18n("&Record"), icon, 0, TQT_TQOBJECT(this),
TQT_SIGNAL(record()), actionCollection(),
"record");
- icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap
+ icon = TQIconSet(NotePixmapFactory::toTQPixmap(NotePixmapFactory::makeToolbarPixmap
("transport-panic")));
- new KAction(i18n("Panic"), icon, Key_P + CTRL + ALT, this,
+ new KAction(i18n("Panic"), icon, Key_P + CTRL + ALT, TQT_TQOBJECT(this),
TQT_SIGNAL(panic()), actionCollection(),
"panic");
@@ -171,39 +171,39 @@ MidiMixerWindow::setupTabs()
m_tabFrame->setFrameStyle(TQFrame::TabWidgetPanel);
m_tabFrame->setMargin(10);
- TQGridLayout *mainLayout = new QGridLayout
+ TQGridLayout *mainLayout = new TQGridLayout
(m_tabFrame, instruments.size() + 4, controls.size() + 4, 5);
// MIDI Mixer label
//
//TQLabel *label = new TQLabel(TQString("%1 %2").
//arg(strtoqstr(dev->getName()))
- //.arg(i18n("MIDI Mixer")), m_tabFrame);
+ //.tqarg(i18n("MIDI Mixer")), m_tabFrame);
TQLabel *label = new TQLabel("", m_tabFrame);
- mainLayout->addMultiCellWidget(label, 0, 0, 0, 16, Qt::AlignCenter);
+ mainLayout->addMultiCellWidget(label, 0, 0, 0, 16, TQt::AlignCenter);
// control labels
for (unsigned int i = 0; i < controls.size(); ++i) {
label = new TQLabel(strtoqstr(controls[i].getName()), m_tabFrame);
- mainLayout->addWidget(label, i + 1, 0, Qt::AlignCenter);
+ mainLayout->addWidget(label, i + 1, 0, TQt::AlignCenter);
}
// meter label
//
//label = new TQLabel(i18n("Meter"), m_tabFrame);
//mainLayout->addWidget(label,
- //controls.size() + 1, 0, Qt::AlignCenter);
+ //controls.size() + 1, 0, TQt::AlignCenter);
// volume label
label = new TQLabel(i18n("Volume"), m_tabFrame);
mainLayout->addWidget(label, controls.size() + 2, 0,
- Qt::AlignCenter);
+ TQt::AlignCenter);
// instrument label
label = new TQLabel(i18n("Instrument"), m_tabFrame);
mainLayout->addWidget(label, controls.size() + 3, 0,
- Qt::AlignCenter);
+ TQt::AlignCenter);
int posCount = 1;
int firstInstrument = -1;
@@ -223,7 +223,7 @@ MidiMixerWindow::setupTabs()
// Add the controls
//
for (unsigned int i = 0; i < controls.size(); ++i) {
- TQColor knobColour = Qt::white;
+ TQColor knobColour = TQt::white;
if (controls[i].getColourIndex() > 0) {
Colour c =
@@ -252,7 +252,7 @@ MidiMixerWindow::setupTabs()
this, TQT_SLOT(slotControllerChanged(float)));
mainLayout->addWidget(controller, i + 1, posCount,
- Qt::AlignCenter);
+ TQt::AlignCenter);
// Store the rotary
//
@@ -267,7 +267,7 @@ MidiMixerWindow::setupTabs()
new MidiMixerVUMeter(m_tabFrame,
VUMeter::FixedHeightVisiblePeakHold, 6, 30);
mainLayout->addWidget(meter, controls.size() + 1,
- posCount, Qt::AlignCenter);
+ posCount, TQt::AlignCenter);
m_faders[faderCount]->m_vuMeter = meter;
// Volume fader
@@ -275,7 +275,7 @@ MidiMixerWindow::setupTabs()
Fader *fader =
new Fader(0, 127, 100, 20, 80, m_tabFrame);
mainLayout->addWidget(fader, controls.size() + 2,
- posCount, Qt::AlignCenter);
+ posCount, TQt::AlignCenter);
m_faders[faderCount]->m_volumeFader = fader;
//fader->setFader(float((*iIt)->getVolume()));
@@ -286,7 +286,7 @@ MidiMixerWindow::setupTabs()
m_tabFrame, "idLabel");
mainLayout->addWidget(idLabel, controls.size() + 3,
- posCount, Qt::AlignCenter);
+ posCount, TQt::AlignCenter);
// store id in struct
m_faders[faderCount]->m_id = (*iIt)->getId();
@@ -306,8 +306,8 @@ MidiMixerWindow::setupTabs()
faderCount++;
}
- TQString name = TQString("%1 (%2)").arg(strtoqstr(dev->getName()))
- .arg(deviceCount++);
+ TQString name = TQString("%1 (%2)").tqarg(strtoqstr(dev->getName()))
+ .tqarg(deviceCount++);
addTab(m_tabFrame, name);
}
@@ -323,11 +323,11 @@ MidiMixerWindow::addTab(TQWidget *tab, const TQString &title)
void
MidiMixerWindow::slotFaderLevelChanged(float value)
{
- const TQObject *s = sender();
+ const TQObject *s = TQT_TQOBJECT_CONST(const_cast<const TQT_BASE_OBJECT_NAME*>(sender()));
for (FaderVector::const_iterator it = m_faders.begin();
it != m_faders.end(); ++it) {
- if ((*it)->m_volumeFader == s) {
+ if (TQT_BASE_OBJECT((*it)->m_volumeFader) == TQT_BASE_OBJECT_CONST(s)) {
Instrument *instr = m_studio->
getInstrumentById((*it)->m_id);
@@ -376,12 +376,12 @@ MidiMixerWindow::slotFaderLevelChanged(float value)
void
MidiMixerWindow::slotControllerChanged(float value)
{
- const TQObject *s = sender();
+ const TQObject *s = TQT_TQOBJECT_CONST(const_cast<const TQT_BASE_OBJECT_NAME*>(sender()));
unsigned int i = 0, j = 0;
for (i = 0; i < m_faders.size(); ++i) {
for (j = 0; j < m_faders[i]->m_controllerRotaries.size(); ++j) {
- if (m_faders[i]->m_controllerRotaries[j].second == s)
+ if (TQT_BASE_OBJECT(m_faders[i]->m_controllerRotaries[j].second) == TQT_BASE_OBJECT_CONST(s))
break;
}