From: werner s. <wsc...@us...> - 2005-05-17 15:08:08
|
Update of /cvsroot/lmuse/muse/muse/arranger In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3762/muse/arranger Modified Files: arranger.cpp arranger.h configtrack.cpp tlwidget.cpp trackinfo.cpp trackinfo.h trelement.h Log Message: update Index: tlwidget.cpp =================================================================== RCS file: /cvsroot/lmuse/muse/muse/arranger/tlwidget.cpp,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** tlwidget.cpp 8 May 2005 17:01:33 -0000 1.25 --- tlwidget.cpp 17 May 2005 15:07:57 -0000 1.26 *************** *** 205,209 **** connect(nameEdit, SIGNAL(mousePress()), SLOT(select())); connect(_track, SIGNAL(nameChanged(const QString&)), nameEdit, SLOT(setText(const QString&))); - // nameEdit->setMinimumWidth(Arranger::trackNameWidth); QToolTip::add(nameEdit, tr("Track Name")); l->add(nameEdit, grp); --- 205,208 ---- *************** *** 212,215 **** --- 211,232 ---- break; + case TR_INSTRUMENT: + { + MidiInstrument* mi = ((MidiOutPort*)_track)->instrument(); + QComboBox* ic = new QComboBox(this); + ic->insertItem(mi->iname()); + ic->setCurrentItem(0); + l->add(ic, grp); + ic->show(); + wlist.push_back(ic); + } + break; + + case TR_PATCH: + { + // Ctrl* ctrl = _track->getController(CTRL_PROGRAM); + } + break; + case TR_OFF: { Index: arranger.h =================================================================== RCS file: /cvsroot/lmuse/muse/muse/arranger/arranger.h,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** arranger.h 29 Apr 2005 14:47:24 -0000 1.38 --- arranger.h 17 May 2005 15:07:57 -0000 1.39 *************** *** 21,24 **** --- 21,25 ---- class ArrangerTrack; class Track; + class TrackInfo; class TLWidget; class TLSWidget; *************** *** 143,147 **** ArrangerScrollView* csv; QWidget* configTrackEditor; ! QVBox* trackInfo; QVBox* mixerStrip; Track* _curTrack; // current selected track --- 144,149 ---- ArrangerScrollView* csv; QWidget* configTrackEditor; ! QWidgetStack* trackInfo; ! QScrollView* infoView; QVBox* mixerStrip; Track* _curTrack; // current selected track *************** *** 151,155 **** SimpleButton* gaw; Strip* strip; ! QWidget* info; ArrangerScrollBar* horizontalSb; QScrollBar* verticalSb; --- 153,157 ---- SimpleButton* gaw; Strip* strip; ! QWidgetStack* info; ArrangerScrollBar* horizontalSb; QScrollBar* verticalSb; *************** *** 171,174 **** --- 173,177 ---- void updateIndex(); void appendSubtrack(int); + TrackInfo* createTrackInfo(); private slots: Index: trackinfo.h =================================================================== RCS file: /cvsroot/lmuse/muse/muse/arranger/trackinfo.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** trackinfo.h 15 Jan 2005 16:48:54 -0000 1.3 --- trackinfo.h 17 May 2005 15:07:57 -0000 1.4 *************** *** 9,50 **** #define __TRACKINFO_H__ ! #include "widgets/mtrackinfobase.h" ! class MidiTrack; //--------------------------------------------------------- ! // MidiTrackInfo //--------------------------------------------------------- ! class MidiTrackInfo : public MidiTrackInfoBase { Q_OBJECT ! MidiTrack* track; ! QPopupMenu* pop; ! void update(); private slots: ! void nameChanged(); ! void iOutputChannelChanged(int channel); ! void iInputChannelChanged(const QString& s); ! void iOutputPortChanged(int index); ! void iInputPortChanged(const QString& s); ! void iProgramChanged(); ! void iTranspChanged(int val); ! void iAnschlChanged(int val); ! void iVerzChanged(int val); ! void iLenChanged(int val); void iKomprChanged(int val); - void instrPopup(); - void setOutPort(int); - void setOutChannel(int); - void setController(int); - void autoChanged(); public: MidiTrackInfo(MidiTrack* t, QWidget* parent); }; #endif --- 9,169 ---- #define __TRACKINFO_H__ ! class Track; class MidiTrack; + class AudioOutput; + class AudioInput; + class AudioGroup; + class AudioAux; + class SynthI; + class MidiInPort; + class MidiOutPort; + class MidiChannel; + class WaveTrack; + class TLLineEdit; //--------------------------------------------------------- ! // TrackInfo //--------------------------------------------------------- ! class TrackInfo : public QWidget { Q_OBJECT ! TLLineEdit* name; ! protected: ! QGridLayout* grid; ! Track* track; private slots: ! void nameChanged(QString s); ! ! public: ! TrackInfo(Track* t, QWidget* parent); ! virtual void init(Track*); ! }; ! ! //--------------------------------------------------------- ! // MidiTrackInfo ! //--------------------------------------------------------- ! ! class MidiTrackInfo : public TrackInfo { ! Q_OBJECT ! ! QSpinBox* transposition; ! QSpinBox* delay; ! QSpinBox* length; ! QSpinBox* velocity; ! QSpinBox* compression; ! ! private slots: ! void transpositionChanged(int val); ! void velocityChanged(int val); ! void delayChanged(int val); ! void lenChanged(int val); void iKomprChanged(int val); public: MidiTrackInfo(MidiTrack* t, QWidget* parent); + virtual void init(Track*); + }; + + //--------------------------------------------------------- + // AudioOutputInfo + //--------------------------------------------------------- + + class AudioOutputInfo : public TrackInfo { + Q_OBJECT + + public: + AudioOutputInfo(AudioOutput* t, QWidget* parent); }; + //--------------------------------------------------------- + // AudioInputInfo + //--------------------------------------------------------- + + class AudioInputInfo : public TrackInfo { + Q_OBJECT + + public: + AudioInputInfo(AudioInput* t, QWidget* parent); + }; + + //--------------------------------------------------------- + // AudioGroupInfo + //--------------------------------------------------------- + + class AudioGroupInfo : public TrackInfo { + Q_OBJECT + + public: + AudioGroupInfo(AudioGroup* t, QWidget* parent); + }; + + //--------------------------------------------------------- + // AudioAuxInfo + //--------------------------------------------------------- + + class AudioAuxInfo : public TrackInfo { + Q_OBJECT + + public: + AudioAuxInfo(AudioAux* t, QWidget* parent); + }; + + //--------------------------------------------------------- + // WaveTrackInfo + //--------------------------------------------------------- + + class WaveTrackInfo : public TrackInfo { + Q_OBJECT + + public: + WaveTrackInfo(WaveTrack* t, QWidget* parent); + }; + + //--------------------------------------------------------- + // SynthIInfo + //--------------------------------------------------------- + + class SynthIInfo : public TrackInfo { + Q_OBJECT + + public: + SynthIInfo(SynthI* t, QWidget* parent); + }; + + //--------------------------------------------------------- + // MidiOutPortInfo + //--------------------------------------------------------- + + class MidiOutPortInfo : public TrackInfo { + Q_OBJECT + + public: + MidiOutPortInfo(MidiOutPort* t, QWidget* parent); + }; + + //--------------------------------------------------------- + // MidiInPortInfo + //--------------------------------------------------------- + + class MidiInPortInfo : public TrackInfo { + Q_OBJECT + + public: + MidiInPortInfo(MidiInPort* t, QWidget* parent); + }; + + //--------------------------------------------------------- + // MidiChannelInfo + //--------------------------------------------------------- + + class MidiChannelInfo : public TrackInfo { + Q_OBJECT + + public: + MidiChannelInfo(MidiChannel* t, QWidget* parent); + }; #endif Index: configtrack.cpp =================================================================== RCS file: /cvsroot/lmuse/muse/muse/arranger/configtrack.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** configtrack.cpp 29 Apr 2005 14:47:24 -0000 1.4 --- configtrack.cpp 17 May 2005 15:07:57 -0000 1.5 *************** *** 41,46 **** void ConfigTrackList::init() { ! for (int tt = 0; tt < Track::TRACK_TYPES; ++tt) list[tt] = glist[tt]; trackTypeChanged(curType); trackNameSize->setValue(Arranger::trackNameWidth); --- 41,49 ---- void ConfigTrackList::init() { ! trackType->clear(); ! for (int tt = 0; tt < Track::TRACK_TYPES; ++tt) { list[tt] = glist[tt]; + trackType->insertItem(Track::_clname[tt]); + } trackTypeChanged(curType); trackNameSize->setValue(Arranger::trackNameWidth); Index: trelement.h =================================================================== RCS file: /cvsroot/lmuse/muse/muse/arranger/trelement.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** trelement.h 8 May 2005 17:01:33 -0000 1.5 --- trelement.h 17 May 2005 15:07:57 -0000 1.6 *************** *** 20,24 **** enum { TR_NAME, TR_MUTE, TR_OFF, TR_SOLO, TR_RECORD, TR_AREAD, TR_AWRITE, ! TR_OCHANNEL, TR_MONITOR, TR_DRUMMAP }; --- 20,24 ---- enum { TR_NAME, TR_MUTE, TR_OFF, TR_SOLO, TR_RECORD, TR_AREAD, TR_AWRITE, ! TR_OCHANNEL, TR_MONITOR, TR_DRUMMAP, TR_INSTRUMENT, TR_PATCH }; Index: trackinfo.cpp =================================================================== RCS file: /cvsroot/lmuse/muse/muse/arranger/trackinfo.cpp,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** trackinfo.cpp 29 Apr 2005 17:14:19 -0000 1.27 --- trackinfo.cpp 17 May 2005 15:07:57 -0000 1.28 *************** *** 7,20 **** #include "arranger.h" - #include "midiport.h" - #include "widgets/utils.h" #include "widgets/outportcombo.h" - #include "audio.h" #include "instruments/minstrument.h" - #include "midi.h" #include "midictrl.h" - #include "song.h" #include "trackinfo.h" //--------------------------------------------------------- --- 7,106 ---- #include "arranger.h" #include "widgets/outportcombo.h" #include "instruments/minstrument.h" #include "midictrl.h" #include "song.h" #include "trackinfo.h" + #include "synth.h" + #include "tllineedit.h" + + //--------------------------------------------------------- + // createTrackInfo + //--------------------------------------------------------- + + TrackInfo* Arranger::createTrackInfo() + { + TrackInfo* w; + Track::TrackType t = _curTrack->type(); + switch (t) { + case Track::MIDI: + w = new MidiTrackInfo((MidiTrack*)_curTrack, trackInfo); + break; + case Track::AUDIO_OUTPUT: + w = new AudioOutputInfo((AudioOutput*)_curTrack, trackInfo); + break; + case Track::AUDIO_GROUP: + w = new AudioGroupInfo((AudioGroup*)_curTrack, trackInfo); + break; + case Track::AUDIO_AUX: + w = new AudioAuxInfo((AudioAux*)_curTrack, trackInfo); + break; + case Track::WAVE: + w = new WaveTrackInfo((WaveTrack*)_curTrack, trackInfo); + break; + case Track::AUDIO_INPUT: + w = new AudioInputInfo((AudioInput*)_curTrack, trackInfo); + break; + case Track::AUDIO_SOFTSYNTH: + w = new SynthIInfo((SynthI*)_curTrack, trackInfo); + break; + case Track::MIDI_OUT: + w = new MidiOutPortInfo((MidiOutPort*)_curTrack, trackInfo); + break; + case Track::MIDI_IN: + w = new MidiInPortInfo((MidiInPort*)_curTrack, trackInfo); + break; + case Track::MIDI_CHANNEL: + w = new MidiChannelInfo((MidiChannel*)_curTrack, trackInfo); + break; + default: + w = 0; // crash + break; + } + trackInfo->addWidget(w, t); + return w; + } + + //--------------------------------------------------------- + // TrackInfo + //--------------------------------------------------------- + + TrackInfo::TrackInfo(Track* t, QWidget* parent) + : QWidget(parent) + { + track = t; + grid = new QGridLayout(this); + QLabel* label = new QLabel(t->clname(), this); + QToolTip::add(label, tr("Track Type")); + label->setPaletteBackgroundColor(QColor(85, 170, 255)); + + name = new TLLineEdit(track->name(), this); + QToolTip::add(name, tr("Track Name")); + + grid->addMultiCellWidget(label, 0, 0, 0, 1); + grid->addMultiCellWidget(name, 1, 1, 0, 1); + connect(name, SIGNAL(contentChanged(QString)), SLOT(nameChanged(QString))); + connect(track, SIGNAL(nameChanged(const QString&)), name, SLOT(setText(const QString&))); + } + + //--------------------------------------------------------- + // nameChanged + //--------------------------------------------------------- + + void TrackInfo::nameChanged(QString s) + { + song->changeTrackName(track, s); + name->setCursorPosition(0); + } + + //--------------------------------------------------------- + // init + //--------------------------------------------------------- + + void TrackInfo::init(Track* t) + { + track = t; + name->setText(track->name()); + } //--------------------------------------------------------- *************** *** 23,29 **** MidiTrackInfo::MidiTrackInfo(MidiTrack* t, QWidget* parent) ! : MidiTrackInfoBase(parent) { ! track = t; connect(iPatch, SIGNAL(released()), SLOT(instrPopup())); --- 109,167 ---- MidiTrackInfo::MidiTrackInfo(MidiTrack* t, QWidget* parent) ! : TrackInfo(t, parent) { ! QLabel* l1 = new QLabel(tr("Transp."), this); ! QLabel* l2 = new QLabel(tr("Delay"), this); ! QLabel* l3 = new QLabel(tr("Length"), this); ! QLabel* l4 = new QLabel(tr("Velocity"), this); ! QLabel* l5 = new QLabel(tr("Compr."), this); ! ! transposition = new QSpinBox(-127, 127, 1, this); ! QToolTip::add(transposition, tr("Pitch Transpose")); ! ! delay = new QSpinBox(-1000, 1000, 1, this); ! QToolTip::add(delay, tr("Track Delay (ticks)")); ! ! length = new QSpinBox(25, 200, 1, this); ! QToolTip::add(length, tr("Modify Note Length")); ! length->setSuffix("%"); ! ! velocity = new QSpinBox(-127, 127, 1, this); ! QToolTip::add(velocity, tr("Modify Note Velocity")); ! ! compression = new QSpinBox(25, 200, 1, this); ! compression->setSuffix("%"); ! QToolTip::add(compression, tr("Compress Note Velocity")); ! ! grid->addWidget(transposition, 2, 0); ! grid->addWidget(l1, 2, 1); ! ! grid->addWidget(delay, 3, 0); ! grid->addWidget(l2, 3, 1); ! ! grid->addWidget(length, 4, 0); ! grid->addWidget(l3, 4, 1); ! ! grid->addWidget(velocity, 5, 0); ! grid->addWidget(l4, 5, 1); ! ! grid->addWidget(compression, 6, 0); ! grid->addWidget(l5, 6, 1); ! ! QLabel* label = new QLabel(tr("Midi Channel"), this); ! label->setPaletteBackgroundColor(QColor(85, 170, 255)); ! grid->addMultiCellWidget(label, 7, 7, 0, 1); ! QLineEdit* channelName = new QLineEdit(this); ! channelName->setText("??"); ! grid->addMultiCellWidget(channelName, 8, 8, 0, 1); ! ! label = new QLabel(tr("Midi Out Port"), this); ! label->setPaletteBackgroundColor(QColor(85, 170, 255)); ! grid->addMultiCellWidget(label, 9, 9, 0, 1); ! QLineEdit* portName = new QLineEdit(this); ! portName->setText("??"); ! grid->addMultiCellWidget(portName, 10, 10, 0, 1); ! ! #if 0 connect(iPatch, SIGNAL(released()), SLOT(instrPopup())); *************** *** 31,135 **** pop->setCheckable(false); - connect(track, SIGNAL(nameChanged(const QString&)), iName, SLOT(setText(const QString&))); - connect(track, SIGNAL(outPortChanged(int)), SLOT(setOutPort(int))); - connect(track, SIGNAL(outChannelChanged(int)), SLOT(setOutChannel(int))); connect(track, SIGNAL(controllerChanged(int)), SLOT(setController(int))); connect(track, SIGNAL(autoReadChanged(bool)), SLOT(autoChanged())); connect(track, SIGNAL(autoWriteChanged(bool)), SLOT(autoChanged())); - - connect(iName, SIGNAL(returnPressed()), SLOT(nameChanged())); - connect(iName, SIGNAL(lostFocus()), SLOT(nameChanged())); - connect(iOutput, SIGNAL(activated(int)), SLOT(iOutputPortChanged(int))); - connect(iOutputChannel, SIGNAL(valueChanged(int)), SLOT(iOutputChannelChanged(int))); - connect(iInputChannel, SIGNAL(textChanged(const QString&)), SLOT(iInputChannelChanged(const QString&))); connect(iHBank, SIGNAL(valueChanged(int)), SLOT(iProgramChanged())); connect(iLBank, SIGNAL(valueChanged(int)), SLOT(iProgramChanged())); connect(iProgram, SIGNAL(valueChanged(int)), SLOT(iProgramChanged())); - connect(iTransp, SIGNAL(valueChanged(int)), SLOT(iTranspChanged(int))); - connect(iAnschl, SIGNAL(valueChanged(int)), SLOT(iAnschlChanged(int))); - connect(iVerz, SIGNAL(valueChanged(int)), SLOT(iVerzChanged(int))); - connect(iLen, SIGNAL(valueChanged(int)), SLOT(iLenChanged(int))); - connect(iKompr, SIGNAL(valueChanged(int)), SLOT(iKomprChanged(int))); - connect(iInput, SIGNAL(textChanged(const QString&)), SLOT(iInputPortChanged(const QString&))); update(); autoChanged(); ! } ! ! //--------------------------------------------------------- ! // nameChanged ! //--------------------------------------------------------- ! void MidiTrackInfo::nameChanged() ! { ! if (iName->text() != track->name()) ! song->changeTrackName(track, iName->text()); } //--------------------------------------------------------- ! // iOutputChannelChanged //--------------------------------------------------------- ! void MidiTrackInfo::iOutputChannelChanged(int channel) { ! //TODO3 track->setOutChannel(channel - 1); } //--------------------------------------------------------- ! // setOutChannel //--------------------------------------------------------- ! void MidiTrackInfo::setOutChannel(int channel) { ! iOutputChannel->setValue(channel + 1); } //--------------------------------------------------------- ! // iOutputPortChanged //--------------------------------------------------------- ! void MidiTrackInfo::iOutputPortChanged(int index) { ! //TODO3 track->setOutPort(index); } //--------------------------------------------------------- ! // setOutPort //--------------------------------------------------------- ! void MidiTrackInfo::setOutPort(int port) { ! iOutput->setCurrentItem(port); } //--------------------------------------------------------- ! // iKanalChanged //--------------------------------------------------------- ! void MidiTrackInfo::iInputChannelChanged(const QString& s) { ! #if 0 //TODO3 ! int val = string2bitmap(s); ! if (val != track->inChannelMask()) { ! track->setInChannelMask(val); ! // list->redraw(); ! } ! #endif } //--------------------------------------------------------- ! // iInputPortChanged //--------------------------------------------------------- ! void MidiTrackInfo::iInputPortChanged(const QString& s) { ! #if 0 //TODO3 ! int val = string2bitmap(s); ! if (val == track->inPortMask()) ! return; ! track->setInPortMask(val); ! // list->redraw(); ! #endif } //--------------------------------------------------------- // iProgramChanged --- 169,250 ---- pop->setCheckable(false); connect(track, SIGNAL(controllerChanged(int)), SLOT(setController(int))); connect(track, SIGNAL(autoReadChanged(bool)), SLOT(autoChanged())); connect(track, SIGNAL(autoWriteChanged(bool)), SLOT(autoChanged())); connect(iHBank, SIGNAL(valueChanged(int)), SLOT(iProgramChanged())); connect(iLBank, SIGNAL(valueChanged(int)), SLOT(iProgramChanged())); connect(iProgram, SIGNAL(valueChanged(int)), SLOT(iProgramChanged())); update(); autoChanged(); ! #endif ! connect(transposition, SIGNAL(valueChanged(int)), SLOT(transpositionChanged(int))); ! connect(velocity, SIGNAL(valueChanged(int)), SLOT(velocityChanged(int))); ! connect(delay, SIGNAL(valueChanged(int)), SLOT(delayChanged(int))); ! connect(length, SIGNAL(valueChanged(int)), SLOT(lenChanged(int))); ! connect(compression, SIGNAL(valueChanged(int)), SLOT(iKomprChanged(int))); ! grid->setRowStretch(grid->numRows(), 100); } //--------------------------------------------------------- ! // init //--------------------------------------------------------- ! void MidiTrackInfo::init(Track* t) { ! TrackInfo::init(t); ! transposition->setValue(((MidiTrack*)track)->transposition); ! delay->setValue(((MidiTrack*)track)->delay); ! length->setValue(((MidiTrack*)track)->len); ! velocity->setValue(((MidiTrack*)track)->velocity); ! compression->setValue(((MidiTrack*)track)->compression); } //--------------------------------------------------------- ! // transpositionChanged //--------------------------------------------------------- ! void MidiTrackInfo::transpositionChanged(int val) { ! ((MidiTrack*)track)->transposition = val; } //--------------------------------------------------------- ! // velocityChanged //--------------------------------------------------------- ! void MidiTrackInfo::velocityChanged(int val) { ! ((MidiTrack*)track)->velocity = val; } //--------------------------------------------------------- ! // delayChanged //--------------------------------------------------------- ! void MidiTrackInfo::delayChanged(int val) { ! ((MidiTrack*)track)->delay = val; } //--------------------------------------------------------- ! // lenChanged //--------------------------------------------------------- ! void MidiTrackInfo::lenChanged(int val) { ! ((MidiTrack*)track)->len = val; } //--------------------------------------------------------- ! // iKomprChanged //--------------------------------------------------------- ! void MidiTrackInfo::iKomprChanged(int val) { ! ((MidiTrack*)track)->compression = val; } + #if 0 //--------------------------------------------------------- // iProgramChanged *************** *** 162,210 **** //--------------------------------------------------------- - // iTranspChanged - //--------------------------------------------------------- - - void MidiTrackInfo::iTranspChanged(int val) - { - track->transposition = val; - } - - //--------------------------------------------------------- - // iAnschlChanged - //--------------------------------------------------------- - - void MidiTrackInfo::iAnschlChanged(int val) - { - track->velocity = val; - } - - //--------------------------------------------------------- - // iVerzChanged - //--------------------------------------------------------- - - void MidiTrackInfo::iVerzChanged(int val) - { - track->delay = val; - } - - //--------------------------------------------------------- - // iLenChanged - //--------------------------------------------------------- - - void MidiTrackInfo::iLenChanged(int val) - { - track->len = val; - } - - //--------------------------------------------------------- - // iKomprChanged - //--------------------------------------------------------- - - void MidiTrackInfo::iKomprChanged(int val) - { - track->compression = val; - } - - //--------------------------------------------------------- // instrPopup //--------------------------------------------------------- --- 277,280 ---- *************** *** 235,243 **** { #if 0 - int outChannel = track->outChannel(); - int inChannel = track->inChannelMask(); - int outPort = track->outPort(); - int inPort = track->inPortMask(); - iInput->clear(); iOutput->clear(); --- 305,308 ---- *************** *** 335,337 **** --- 400,494 ---- iPatch->setEnabled(ec); } + #endif + + //--------------------------------------------------------- + // AudioOutputInfo + //--------------------------------------------------------- + + AudioOutputInfo::AudioOutputInfo(AudioOutput* t, QWidget* parent) + : TrackInfo(t, parent) + { + grid->setRowStretch(grid->numRows(), 100); + } + + //--------------------------------------------------------- + // AudioInputInfo + //--------------------------------------------------------- + + AudioInputInfo::AudioInputInfo(AudioInput* t, QWidget* parent) + : TrackInfo(t, parent) + { + grid->setRowStretch(grid->numRows(), 100); + } + + //--------------------------------------------------------- + // AudioGroupInfo + //--------------------------------------------------------- + + AudioGroupInfo::AudioGroupInfo(AudioGroup* t, QWidget* parent) + : TrackInfo(t, parent) + { + grid->setRowStretch(grid->numRows(), 100); + } + + //--------------------------------------------------------- + // AudioAuxInfo + //--------------------------------------------------------- + + AudioAuxInfo::AudioAuxInfo(AudioAux* t, QWidget* parent) + : TrackInfo(t, parent) + { + grid->setRowStretch(grid->numRows(), 100); + } + + //--------------------------------------------------------- + // WaveTrackInfo + //--------------------------------------------------------- + + WaveTrackInfo::WaveTrackInfo(WaveTrack* t, QWidget* parent) + : TrackInfo(t, parent) + { + grid->setRowStretch(grid->numRows(), 100); + } + + //--------------------------------------------------------- + // SynthIInfo + //--------------------------------------------------------- + + SynthIInfo::SynthIInfo(SynthI* t, QWidget* parent) + : TrackInfo(t, parent) + { + grid->setRowStretch(grid->numRows(), 100); + } + + //--------------------------------------------------------- + // MidiOutPortInfo + //--------------------------------------------------------- + + MidiOutPortInfo::MidiOutPortInfo(MidiOutPort* t, QWidget* parent) + : TrackInfo(t, parent) + { + grid->setRowStretch(grid->numRows(), 100); + } + + //--------------------------------------------------------- + // MidiInPortInfo + //--------------------------------------------------------- + + MidiInPortInfo::MidiInPortInfo(MidiInPort* t, QWidget* parent) + : TrackInfo(t, parent) + { + grid->setRowStretch(grid->numRows(), 100); + } + + //--------------------------------------------------------- + // MidiChannelInfo + //--------------------------------------------------------- + + MidiChannelInfo::MidiChannelInfo(MidiChannel* t, QWidget* parent) + : TrackInfo(t, parent) + { + grid->setRowStretch(grid->numRows(), 100); + } + Index: arranger.cpp =================================================================== RCS file: /cvsroot/lmuse/muse/muse/arranger/arranger.cpp,v retrieving revision 1.82 retrieving revision 1.83 diff -C2 -d -r1.82 -r1.83 *** arranger.cpp 8 May 2005 17:01:32 -0000 1.82 --- arranger.cpp 17 May 2005 15:07:56 -0000 1.83 *************** *** 31,35 **** #include "audio.h" #include "shortcuts.h" - #include "xpm/muse_leftside_logo.xpm" #include "trackinfo.h" #include "widgets/splitter.h" --- 31,34 ---- *************** *** 38,43 **** static const int rulerHeight = 28; // TRACK_ROW_HEIGHT; static const int infoHeight = 20; - static const int INFO_WIDTH = 125; static const int MAP_OFFSET = 20; int Arranger::trackNameWidth = 80; --- 37,42 ---- static const int rulerHeight = 28; // TRACK_ROW_HEIGHT; static const int infoHeight = 20; static const int MAP_OFFSET = 20; + static const int INFO_WIDTH = 140; int Arranger::trackNameWidth = 80; *************** *** 81,86 **** TrElement(TR_AWRITE, 4, "automation write", -1 & ~Track::M_MIDI_IN), ! TrElement(TR_OCHANNEL, 5, "output channel", Track::M_MIDI), }; const int nTrElements = sizeof(trElements)/sizeof(*trElements); --- 80,88 ---- TrElement(TR_AWRITE, 4, "automation write", -1 & ~Track::M_MIDI_IN), ! TrElement(TR_OCHANNEL, 5, "output channel", Track::M_MIDI), ! TrElement(TR_INSTRUMENT, 6, "instrument", Track::M_MIDI_OUT), ! TrElement(TR_PATCH, 7, "patch", Track::M_MIDI_CHANNEL), }; + const int nTrElements = sizeof(trElements)/sizeof(*trElements); *************** *** 140,146 **** split->setChildrenCollapsible(true); ! trackInfo = new QVBox(split); mixerStrip = new QVBox(split); - trackInfo->setFixedWidth(INFO_WIDTH); mixerStrip->setFixedWidth(STRIP_WIDTH); --- 142,153 ---- split->setChildrenCollapsible(true); ! infoView = new QScrollView(split); ! infoView->setFixedWidth(INFO_WIDTH); ! infoView->setResizePolicy(QScrollView::AutoOneFit); ! infoView->setHScrollBarMode(QScrollView::AlwaysOff); ! trackInfo = new QWidgetStack(infoView->viewport()); ! infoView->addChild(trackInfo); ! mixerStrip = new QVBox(split); mixerStrip->setFixedWidth(STRIP_WIDTH); *************** *** 705,725 **** trackInfoVisible = val; if (trackInfoVisible) { ! if (!info && _curTrack) { ! if (!_curTrack->isMidiTrack()) { ! QLabel* l = new QLabel(trackInfo); ! l->setPixmap(QPixmap(muse_leftside_logo_xpm)); ! l->setAlignment(AlignTop | AlignLeft); ! info = l; ! } ! else ! info = new MidiTrackInfo((MidiTrack*)_curTrack, trackInfo); ! info->setFixedWidth(INFO_WIDTH); ! info->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored); ! info->show(); ! } ! trackInfo->show(); } ! else ! trackInfo->hide(); } --- 712,723 ---- trackInfoVisible = val; if (trackInfoVisible) { ! Track::TrackType t = _curTrack->type(); ! TrackInfo* w = (TrackInfo*)(trackInfo->widget(t)); ! if (w == 0) ! w = createTrackInfo(); ! trackInfo->raiseWidget(w); ! w->init(_curTrack); } ! infoView->setShown(trackInfoVisible); } *************** *** 752,759 **** strip->show(); } - mixerStrip->show(); } ! else ! mixerStrip->hide(); } --- 750,755 ---- strip->show(); } } ! mixerStrip->setShown(mixerStripVisible); } *************** *** 1164,1171 **** { _curTrack = t; - if (trackInfoVisible && info) { - delete info; - info = 0; - } toggleTrackInfo(trackInfoVisible); if (mixerStripVisible && strip) { --- 1160,1163 ---- |