From: Chris C. <ca...@us...> - 2005-06-29 19:34:38
|
Update of /cvsroot/rosegarden/gui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10383/gui Modified Files: Tag: guitar_chord_editor SConscript dialogs.cpp mixer.cpp rosegardenconfigurationpage.cpp rosegardengui.cpp rosegardengui.h rosegardenguiview.cpp rosegardenguiview.h rosegardenui.rc Log Message: * Stephen Torri's guitar tab code -- first commit This branch also contains some KDE deprecation-warning fixes and so on that are currently not being accepted in HEAD because they break older versions of KDE. Index: rosegardenui.rc =================================================================== RCS file: /cvsroot/rosegarden/gui/rosegardenui.rc,v retrieving revision 1.175 retrieving revision 1.175.2.1 diff -C2 -d -r1.175 -r1.175.2.1 *** rosegardenui.rc 9 Jun 2005 01:09:28 -0000 1.175 --- rosegardenui.rc 29 Jun 2005 19:33:57 -0000 1.175.2.1 *************** *** 44,47 **** --- 44,48 ---- <Action name="audio_mixer"/> <Action name="midi_mixer"/> + <Action name="guitar_chord"/> <Separator/> <Action name="manage_devices"/> *************** *** 220,225 **** --- 221,228 ---- <Action name="midi_mixer"/> <Action name="audio_mixer"/> + <Action name="guitar_chord"/> </ToolBar> + <ToolBar name="Transport Toolbar"> <text>Transport Toolbar</text> Index: rosegardenguiview.h =================================================================== RCS file: /cvsroot/rosegarden/gui/rosegardenguiview.h,v retrieving revision 1.154 retrieving revision 1.154.2.1 diff -C2 -d -r1.154 -r1.154.2.1 *** rosegardenguiview.h 4 Jun 2005 21:45:13 -0000 1.154 --- rosegardenguiview.h 29 Jun 2005 19:33:56 -0000 1.154.2.1 *************** *** 166,169 **** --- 166,171 ---- void slotEditSegmentPercussionMatrix(Rosegarden::Segment*); void slotEditSegmentsPercussionMatrix(std::vector<Rosegarden::Segment*>); + void slotEditSegmentGuitarChord(Rosegarden::Segment*); + void slotEditSegmentsGuitarChord(std::vector<Rosegarden::Segment*>); void slotEditSegmentEventList(Rosegarden::Segment*); void slotEditSegmentsEventList(std::vector<Rosegarden::Segment*>); Index: rosegardengui.cpp =================================================================== RCS file: /cvsroot/rosegarden/gui/rosegardengui.cpp,v retrieving revision 1.824 retrieving revision 1.824.2.1 diff -C2 -d -r1.824 -r1.824.2.1 *** rosegardengui.cpp 15 Jun 2005 20:49:54 -0000 1.824 --- rosegardengui.cpp 29 Jun 2005 19:33:55 -0000 1.824.2.1 *************** *** 41,45 **** #include <kmenubar.h> #include <klocale.h> ! #include <klineeditdlg.h> #include <kconfig.h> #include <kprocess.h> --- 41,45 ---- #include <kmenubar.h> #include <klocale.h> ! #include <kinputdialog.h> #include <kconfig.h> #include <kprocess.h> *************** *** 124,127 **** --- 124,128 ---- #include "audiosynthmanager.h" #include "PluginIdentifier.h" + #include "guitar/guitartabeditor.h" #ifdef HAVE_LIBJACK *************** *** 247,250 **** --- 248,252 ---- m_audioMixer(0), m_midiMixer(0), + m_guitarChord(0), m_bankEditor(0), m_markerEditor(0), *************** *** 611,615 **** new KToolBarPopupAction(i18n("Und&o"), "undo", ! KStdAccel::key(KStdAccel::Undo), actionCollection(), KStdAction::stdName(KStdAction::Undo)); --- 613,617 ---- new KToolBarPopupAction(i18n("Und&o"), "undo", ! KStdAccel::shortcut(KStdAccel::Undo), actionCollection(), KStdAction::stdName(KStdAction::Undo)); *************** *** 617,621 **** new KToolBarPopupAction(i18n("Re&do"), "redo", ! KStdAccel::key(KStdAccel::Redo), actionCollection(), KStdAction::stdName(KStdAction::Redo)); --- 619,623 ---- new KToolBarPopupAction(i18n("Re&do"), "redo", ! KStdAccel::shortcut(KStdAccel::Redo), actionCollection(), KStdAction::stdName(KStdAction::Redo)); *************** *** 980,983 **** --- 982,991 ---- actionCollection(), "midi_mixer"); + pixmap.load(pixmapDir + "/toolbar/midimixer.xpm"); + icon = QIconSet(pixmap); + new KAction(i18n("Guitar Tab Editor"), icon, 0, this, + SLOT(slotOpenGuitarTabEditor()), + actionCollection(), "guitar_chord"); + pixmap.load(pixmapDir + "/toolbar/manage-midi-devices.xpm"); icon = QIconSet(pixmap); *************** *** 2015,2019 **** RG_DEBUG << "RosegardenGUIApp::openURL: KURL " << netFile << endl; ! if (url.isMalformed()) { QString string; string = i18n( "Malformed URL\n%1").arg(netFile); --- 2023,2027 ---- RG_DEBUG << "RosegardenGUIApp::openURL: KURL " << netFile << endl; ! if (!url.isValid()) { QString string; string = i18n( "Malformed URL\n%1").arg(netFile); *************** *** 2025,2029 **** QString target; ! if (KIO::NetAccess::download(url, target) == false) { KMessageBox::error(this, i18n("Cannot download file %1").arg(url.prettyURL())); return; --- 2033,2037 ---- QString target; ! if (KIO::NetAccess::download(url, target, this) == false) { KMessageBox::error(this, i18n("Cannot download file %1").arg(url.prettyURL())); return; *************** *** 2085,2089 **** QString target; ! if (KIO::NetAccess::download(url, target) == false) { KMessageBox::error(this, i18n("Cannot download file %1").arg(url.prettyURL())); return; --- 2093,2097 ---- QString target; ! if (KIO::NetAccess::download(url, target, this) == false) { KMessageBox::error(this, i18n("Cannot download file %1").arg(url.prettyURL())); return; *************** *** 2184,2188 **** KURL *u = new KURL(name); ! if (u->isMalformed()) { KMessageBox::sorry(this, i18n("This is not a valid filename.\n")); return ""; --- 2192,2196 ---- KURL *u = new KURL(name); ! if (!u->isValid()) { KMessageBox::sorry(this, i18n("This is not a valid filename.\n")); return ""; *************** *** 3295,3299 **** QString tmpfile; ! KIO::NetAccess::download(url, tmpfile); KProcess *proc = new KProcess; --- 3303,3307 ---- QString tmpfile; ! KIO::NetAccess::download(url, tmpfile, this); KProcess *proc = new KProcess; *************** *** 3332,3336 **** QString tmpfile; ! KIO::NetAccess::download(url, tmpfile); openFile(tmpfile, ImportMIDI); // does everything including setting the document --- 3340,3344 ---- QString tmpfile; ! KIO::NetAccess::download(url, tmpfile, this); openFile(tmpfile, ImportMIDI); // does everything including setting the document *************** *** 3347,3351 **** QString tmpfile; ! KIO::NetAccess::download(url, tmpfile); mergeFile(tmpfile, ImportMIDI); --- 3355,3359 ---- QString tmpfile; ! KIO::NetAccess::download(url, tmpfile, this); mergeFile(tmpfile, ImportMIDI); *************** *** 3495,3499 **** QString tmpfile; ! KIO::NetAccess::download(url, tmpfile); openFile(tmpfile, ImportRG21); --- 3503,3507 ---- QString tmpfile; ! KIO::NetAccess::download(url, tmpfile, this); openFile(tmpfile, ImportRG21); *************** *** 3510,3514 **** QString tmpfile; ! KIO::NetAccess::download(url, tmpfile); mergeFile(tmpfile, ImportRG21); --- 3518,3522 ---- QString tmpfile; ! KIO::NetAccess::download(url, tmpfile, this); mergeFile(tmpfile, ImportRG21); *************** *** 3577,3581 **** QString tmpfile; ! KIO::NetAccess::download(url, tmpfile); openFile(tmpfile, ImportHydrogen); --- 3585,3589 ---- QString tmpfile; ! KIO::NetAccess::download(url, tmpfile, this); openFile(tmpfile, ImportHydrogen); *************** *** 3592,3596 **** QString tmpfile; ! KIO::NetAccess::download(url, tmpfile); mergeFile(tmpfile, ImportHydrogen); --- 3600,3604 ---- QString tmpfile; ! KIO::NetAccess::download(url, tmpfile, this); mergeFile(tmpfile, ImportHydrogen); *************** *** 5667,5671 **** bool ok = false; ! QString newLabel = KLineEditDlg::getText(editLabel, i18n("Enter new label"), label, --- 5675,5679 ---- bool ok = false; ! QString newLabel = KInputDialog::getText(editLabel, i18n("Enter new label"), label, *************** *** 5892,5895 **** --- 5900,5919 ---- void + RosegardenGUIApp::slotOpenGuitarTabEditor() + { + if (m_guitarChord) { + m_guitarChord->raise(); + return; + } + + m_guitarChord = new GuitarTabEditorWindow(this, m_doc); + + connect(m_guitarChord, SIGNAL(closing()), + this, SLOT(slotGuitarTabEditorClosed())); + + m_guitarChord->show(); + } + + void RosegardenGUIApp::slotEditControlParameters(Rosegarden::DeviceId device) { *************** *** 6662,6665 **** --- 6686,6697 ---- void + RosegardenGUIApp::slotGuitarTabEditorClosed() + { + RG_DEBUG << "RosegardenGUIApp::slotGuitarTabEditorClosed()\n"; + + m_guitarChord = 0; + } + + void RosegardenGUIApp::slotPanic() { *************** *** 6805,6809 **** QString target; ! if (KIO::NetAccess::download(url, target) == false) { KMessageBox::error(this, i18n("Cannot download file %1") .arg(url.prettyURL())); --- 6837,6841 ---- QString target; ! if (KIO::NetAccess::download(url, target, this) == false) { KMessageBox::error(this, i18n("Cannot download file %1") .arg(url.prettyURL())); Index: rosegardenguiview.cpp =================================================================== RCS file: /cvsroot/rosegarden/gui/rosegardenguiview.cpp,v retrieving revision 1.338 retrieving revision 1.338.2.1 diff -C2 -d -r1.338 -r1.338.2.1 *** rosegardenguiview.cpp 10 Jun 2005 11:13:02 -0000 1.338 --- rosegardenguiview.cpp 29 Jun 2005 19:33:56 -0000 1.338.2.1 *************** *** 118,121 **** --- 118,125 ---- connect(m_trackEditor->getSegmentCanvas(), + SIGNAL(editSegmentGuitarChord(Rosegarden::Segment*)), + SLOT(slotEditSegmentGuitarChord(Rosegarden::Segment*))); + + connect(m_trackEditor->getSegmentCanvas(), SIGNAL(editSegmentMatrix(Rosegarden::Segment*)), SLOT(slotEditSegmentMatrix(Rosegarden::Segment*))); *************** *** 988,994 **** Rosegarden::Studio &studio = getDocument()->getStudio(); Rosegarden::Instrument *instrument = studio.getInstrumentById(id); ! Rosegarden::Composition &comp = getDocument()->getComposition(); ! Rosegarden::Track *track = comp.getTrackById(comp.getSelectedTrack()); // Reset the instrument --- 992,998 ---- Rosegarden::Studio &studio = getDocument()->getStudio(); Rosegarden::Instrument *instrument = studio.getInstrumentById(id); ! // UNUSED Rosegarden::Composition &comp = getDocument()->getComposition(); ! // UNUSED Rosegarden::Track *track = comp.getTrackById(comp.getSelectedTrack()); // Reset the instrument *************** *** 1238,1242 **** } ! void RosegardenGUIView::slotUpdateAudioPreviews(Rosegarden::InstrumentId id) { // nothing to do anymore with the new canvas --- 1242,1246 ---- } ! void RosegardenGUIView::slotUpdateAudioPreviews(Rosegarden::InstrumentId) { // nothing to do anymore with the new canvas *************** *** 1633,1636 **** --- 1637,1663 ---- } + void RosegardenGUIView::slotEditSegmentGuitarChord(Rosegarden::Segment* p) + { + RG_DEBUG + << "\n\n\n\nRosegardenGUIView::slotEditSegmentGuitarChord: p is " + << p << endl; + + } + + void RosegardenGUIView::slotEditSegmentsGuitarChord(std::vector<Rosegarden::Segment *> segmentsToEdit) + { + RG_DEBUG + << "\n\n\n\nRosegardenGUIView::slotEditSegmentsGuitarChord: " << endl; + + for ( std::vector<Rosegarden::Segment*>::iterator pos = + segmentsToEdit.begin(); + pos != segmentsToEdit.end(); + ++pos) + { + RG_DEBUG << "p: " << (*pos) << endl; + } + RG_DEBUG << endl; + } + #include "rosegardenguiview.moc" Index: mixer.cpp =================================================================== RCS file: /cvsroot/rosegarden/gui/mixer.cpp,v retrieving revision 1.62 retrieving revision 1.62.2.1 diff -C2 -d -r1.62 -r1.62.2.1 *** mixer.cpp 4 Jun 2005 21:45:03 -0000 1.62 --- mixer.cpp 29 Jun 2005 19:33:54 -0000 1.62.2.1 *************** *** 84,90 **** AudioMixerWindow::AudioMixerWindow(QWidget *parent, RosegardenGUIDoc *document): ! MixerWindow(parent, document) { - m_mainBox = 0; populate(); --- 84,90 ---- AudioMixerWindow::AudioMixerWindow(QWidget *parent, RosegardenGUIDoc *document): ! MixerWindow(parent, document), ! m_mainBox (0) { populate(); Index: SConscript =================================================================== RCS file: /cvsroot/rosegarden/gui/SConscript,v retrieving revision 1.9 retrieving revision 1.9.2.1 diff -C2 -d -r1.9 -r1.9.2.1 *** SConscript 29 May 2005 10:09:36 -0000 1.9 --- SConscript 29 Jun 2005 19:33:54 -0000 1.9.2.1 *************** *** 40,44 **** eventcommands.cpp eventfilter.cpp ! eventview.cpp hydrogenio.cpp importdevicedialog.cpp --- 40,44 ---- eventcommands.cpp eventfilter.cpp ! eventview.cpp hydrogenio.cpp importdevicedialog.cpp *************** *** 161,169 **** # RG libs ! myenv.KDEaddlibs(['RosegardenSequencer', 'RosegardenSound', 'base']) myenv['LIBPATH'].insert(0, '../base') myenv['LIBPATH'].insert(0, '../sound') myenv['LIBPATH'].append('/usr/X11R6/lib') for dep in soundLibs: --- 161,170 ---- # RG libs ! myenv.KDEaddlibs(['RosegardenSequencer', 'RosegardenSound', 'base', 'guitar']) myenv['LIBPATH'].insert(0, '../base') myenv['LIBPATH'].insert(0, '../sound') myenv['LIBPATH'].append('/usr/X11R6/lib') + myenv['LIBPATH'].insert(0, '../gui/guitar') for dep in soundLibs: Index: rosegardenconfigurationpage.cpp =================================================================== RCS file: /cvsroot/rosegarden/gui/rosegardenconfigurationpage.cpp,v retrieving revision 1.3 retrieving revision 1.3.4.1 diff -C2 -d -r1.3 -r1.3.4.1 *** rosegardenconfigurationpage.cpp 13 May 2005 22:43:23 -0000 1.3 --- rosegardenconfigurationpage.cpp 29 Jun 2005 19:33:54 -0000 1.3.4.1 *************** *** 63,66 **** --- 63,67 ---- #include <kcolordialog.h> #include <kdiskfreesp.h> + #include <kinputdialog.h> #if KDE_VERSION >= KDE_MAKE_VERSION(3,2,0) #include <kfontrequester.h> *************** *** 1797,1801 **** m_fixed->addColumn(i18n("Name")); m_fixed->addColumn(i18n("Value")); ! m_fixed->setFullWidth(); m_fixed->setItemsRenameable(true); m_fixed->setRenameable(1); --- 1798,1802 ---- m_fixed->addColumn(i18n("Name")); m_fixed->addColumn(i18n("Value")); ! m_fixed->setFullWidth(true); m_fixed->setItemsRenameable(true); m_fixed->setRenameable(1); *************** *** 1808,1812 **** m_metadata->addColumn(i18n("Name")); m_metadata->addColumn(i18n("Value")); ! m_metadata->setFullWidth(); m_metadata->setItemsRenameable(true); m_metadata->setRenameable(0); --- 1809,1813 ---- m_metadata->addColumn(i18n("Name")); m_metadata->addColumn(i18n("Value")); ! m_metadata->setFullWidth(true); m_metadata->setItemsRenameable(true); m_metadata->setRenameable(0); *************** *** 2379,2384 **** bool ok = false; ! QString newName = KLineEditDlg::getText(i18n("New Color Name"), i18n("Enter new name"), ! i18n("New"), &ok); if ((ok == true) && (!newName.isEmpty())) { --- 2380,2388 ---- bool ok = false; ! QString newName = KInputDialog::getText(i18n("New Color Name"), ! i18n("Enter new name"), ! i18n("New"), ! &ok); ! if ((ok == true) && (!newName.isEmpty())) { Index: dialogs.cpp =================================================================== RCS file: /cvsroot/rosegarden/gui/dialogs.cpp,v retrieving revision 1.205 retrieving revision 1.205.2.1 diff -C2 -d -r1.205 -r1.205.2.1 *** dialogs.cpp 9 Jun 2005 22:37:46 -0000 1.205 --- dialogs.cpp 29 Jun 2005 19:33:54 -0000 1.205.2.1 *************** *** 2744,2748 **** // Set tempo new QLabel(i18n("New tempo"), tempoBox); ! m_tempoValueSpinBox = new HSpinBox(tempoBox, 0, 1e6, 0.0, 1000.0, 6); connect(m_tempoValueSpinBox, SIGNAL(valueChanged(const QString &)), --- 2744,2748 ---- // Set tempo new QLabel(i18n("New tempo"), tempoBox); ! m_tempoValueSpinBox = new HSpinBox(tempoBox, 0, static_cast<int>(1e6), 0.0, 1000.0, 6); connect(m_tempoValueSpinBox, SIGNAL(valueChanged(const QString &)), Index: rosegardengui.h =================================================================== RCS file: /cvsroot/rosegarden/gui/rosegardengui.h,v retrieving revision 1.308 retrieving revision 1.308.2.1 diff -C2 -d -r1.308 -r1.308.2.1 *** rosegardengui.h 4 Jun 2005 21:45:03 -0000 1.308 --- rosegardengui.h 29 Jun 2005 19:33:56 -0000 1.308.2.1 *************** *** 53,56 **** --- 53,57 ---- class AudioMixerWindow; class MidiMixerWindow; + class GuitarTabEditorWindow; class RosegardenGUIDoc; class RosegardenGUIView; *************** *** 793,796 **** --- 794,802 ---- /** + * Show the Guitar Tab Editor + */ + void slotOpenGuitarTabEditor(); + + /** * Edit Banks/Programs */ *************** *** 1281,1284 **** --- 1287,1295 ---- /** + * called when the Guitar Tab Editor is being closed + */ + void slotGuitarTabEditorClosed(); + + /** * Update the pointer position from the sequencer mmapped file when playing */ *************** *** 1436,1439 **** --- 1447,1451 ---- AudioMixerWindow *m_audioMixer; MidiMixerWindow *m_midiMixer; + GuitarTabEditorWindow *m_guitarChord; BankEditorDialog *m_bankEditor; MarkerEditorDialog *m_markerEditor; |