From: werner s. <wsc...@us...> - 2005-01-11 20:52:52
|
Update of /cvsroot/lmuse/muse/muse/arranger In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29161/muse/arranger Modified Files: arranger.cpp arranger.h trackinfo.cpp Log Message: updates Index: trackinfo.cpp =================================================================== RCS file: /cvsroot/lmuse/muse/muse/arranger/trackinfo.cpp,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** trackinfo.cpp 9 Jan 2005 21:48:47 -0000 1.17 --- trackinfo.cpp 11 Jan 2005 20:52:05 -0000 1.18 *************** *** 3,7 **** // Linux Music Editor // $Id$ ! // (C) Copyright 1999-2004 Werner Schweer (ws...@se...) //========================================================= --- 3,7 ---- // Linux Music Editor // $Id$ ! // (C) Copyright 1999-2005 Werner Schweer (ws...@se...) //========================================================= *************** *** 14,24 **** #include "midi.h" #include "midictrl.h" - #include "xpm/muse_leftside_logo.xpm" #include "song.h" #include "trackinfo.h" - static const int INFO_WIDTH = 45; - //--------------------------------------------------------- // MidiTrackInfo --- 14,21 ---- *************** *** 59,84 **** //--------------------------------------------------------- - // newTrackInfo - //--------------------------------------------------------- - - QWidget* Arranger::newTrackInfo(QWidget* parent, Track* t) - { - QWidget* w; - - if (!t->isMidiTrack()) { - QLabel* l = new QLabel(parent); - w = l; - l->setPixmap(QPixmap(muse_leftside_logo_xpm)); - w->setFixedWidth(INFO_WIDTH + 2); - } - else { - MidiTrackInfo* midiTrackInfo = new MidiTrackInfo((MidiTrack*)t, parent); - w = midiTrackInfo; - w->setFixedWidth(INFO_WIDTH); - } - return w; - } - - //--------------------------------------------------------- // nameChanged //--------------------------------------------------------- --- 56,59 ---- *************** *** 183,187 **** const char* name = instr->getPatchName(channel, program, song->mtype()); iPatch->setText(QString(name)); ! track->setController(CTRL_PROGRAM, float(program)); } --- 158,162 ---- const char* name = instr->getPatchName(channel, program, song->mtype()); iPatch->setText(QString(name)); ! track->setController(CTRL_PROGRAM, program); } *************** *** 282,287 **** iInputChannel->setText(bitmap2String(inChannel)); - // seek(); - iTransp->setValue(track->transposition); iAnschl->setValue(track->velocity); --- 257,260 ---- *************** *** 292,372 **** } - #if 0 - //--------------------------------------------------------- - // seek - // change values akkording to seek position - //--------------------------------------------------------- - - void Arranger::seek() - { - int outPort = track->outPort(); - int outChannel = track->outChannel(); - MidiPort* mp = &midiPorts[outPort]; - - // int nprogram = mp->getCtrl(outChannel, tick, CTRL_PROGRAM); - int nprogram = mp->hwCtrlState(outChannel, CTRL_PROGRAM); - - if (program != nprogram) { - program = nprogram; - - int hb, lb, pr; - if (program == CTRL_VAL_UNKNOWN) { - hb = lb = pr = 0; - iPatch->setText("---"); - } - else { - MidiInstrument* instr = midiPorts[outPort].instrument(); - const char* name = instr->getPatchName(outChannel, program, song->mtype()); - iPatch->setText(QString(name)); - - hb = ((program >> 16) & 0xff) + 1; - if (hb == 0x100) - hb = 0; - lb = ((program >> 8) & 0xff) + 1; - if (lb == 0x100) - lb = 0; - pr = (program & 0xff) + 1; - if (pr == 0x100) - pr = 0; - } - iHBank->blockSignals(true); - iLBank->blockSignals(true); - iProgram->blockSignals(true); - - iHBank->setValue(hb); - iLBank->setValue(lb); - iProgram->setValue(pr); - - iHBank->blockSignals(false); - iLBank->blockSignals(false); - iProgram->blockSignals(false); - } - - //int nvolume = midiPorts[outPort].getCtrl(outChannel, tick, CTRL_VOLUME); - int nvolume = midiPorts[outPort].hwCtrlState(outChannel, CTRL_VOLUME); - if (nvolume == CTRL_VAL_UNKNOWN) - nvolume = -1; - // int npan = midiPorts[outPort].getCtrl(outChannel, tick, CTRL_PANPOT); - int npan = midiPorts[outPort].hwCtrlState(outChannel, CTRL_PANPOT); - if (npan == CTRL_VAL_UNKNOWN) - npan = -66; - if (nvolume != volume) { - volume = nvolume; - iLautst->blockSignals(true); - iLautst->setValue(volume); - iLautst->blockSignals(false); - } - if (npan != pan) { - pan = npan; - iPan->blockSignals(true); - iPan->setValue(pan - 65); - iPan->blockSignals(false); - } - } - break; - } - } - #endif - //--------------------------------------------------------- // setController --- 265,268 ---- Index: arranger.h =================================================================== RCS file: /cvsroot/lmuse/muse/muse/arranger/arranger.h,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** arranger.h 7 Jan 2005 21:00:20 -0000 1.32 --- arranger.h 11 Jan 2005 20:52:05 -0000 1.33 *************** *** 165,169 **** void updateIndex(); void appendSubtrack(int); - QWidget* newTrackInfo(QWidget* parent, Track*); private slots: --- 165,168 ---- Index: arranger.cpp =================================================================== RCS file: /cvsroot/lmuse/muse/muse/arranger/arranger.cpp,v retrieving revision 1.64 retrieving revision 1.65 diff -C2 -d -r1.64 -r1.65 *** arranger.cpp 7 Jan 2005 21:00:19 -0000 1.64 --- arranger.cpp 11 Jan 2005 20:52:04 -0000 1.65 *************** *** 31,34 **** --- 31,36 ---- #include "audio.h" #include "shortcuts.h" + #include "xpm/muse_leftside_logo.xpm" + #include "trackinfo.h" static const int minTrackHeight = TRACK_ROW_HEIGHT; *************** *** 36,41 **** static const int infoHeight = 20; //static const int trackInfoWidth = 70; ! ! // static const int INFO_WIDTH = 120; static const int MAP_OFFSET = 20; --- 38,42 ---- static const int infoHeight = 20; //static const int trackInfoWidth = 70; ! static const int INFO_WIDTH = 125; static const int MAP_OFFSET = 20; *************** *** 154,158 **** trackInfoVisible = false; mixerStripVisible = false; ! QGridLayout* centralGrid = new QGridLayout(this); centralGrid->setName("centralGrid"); --- 155,159 ---- trackInfoVisible = false; mixerStripVisible = false; ! QGridLayout* centralGrid = new QGridLayout(this, 1, 1, 0, 0, "centralGrid"); centralGrid->setName("centralGrid"); *************** *** 161,167 **** split->setChildrenCollapsible(true); ! trackInfo = new QVBox(split); ! mixerStrip = new QVBox(split); mixerStrip->setFixedWidth(STRIP_WIDTH); --- 162,168 ---- split->setChildrenCollapsible(true); ! trackInfo = new QVBox(split); mixerStrip = new QVBox(split); + trackInfo->setFixedWidth(INFO_WIDTH); mixerStrip->setFixedWidth(STRIP_WIDTH); *************** *** 701,705 **** if (trackInfoVisible) { if (!info && _curTrack) { ! info = newTrackInfo(trackInfo, _curTrack); info->show(); } --- 702,715 ---- 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(); } |