diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-03-01 18:37:05 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-03-01 18:37:05 +0000 |
commit | 145364a8af6a1fec06556221e66d4b724a62fc9a (patch) | |
tree | 53bd71a544008c518034f208d64c932dc2883f50 /src/gui/editors/parameters/TrackParameterBox.h | |
download | rosegarden-145364a8af6a1fec06556221e66d4b724a62fc9a.tar.gz rosegarden-145364a8af6a1fec06556221e66d4b724a62fc9a.zip |
Added old abandoned KDE3 version of the RoseGarden MIDI tool
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/rosegarden@1097595 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/gui/editors/parameters/TrackParameterBox.h')
-rw-r--r-- | src/gui/editors/parameters/TrackParameterBox.h | 161 |
1 files changed, 161 insertions, 0 deletions
diff --git a/src/gui/editors/parameters/TrackParameterBox.h b/src/gui/editors/parameters/TrackParameterBox.h new file mode 100644 index 0000000..c5fa0f9 --- /dev/null +++ b/src/gui/editors/parameters/TrackParameterBox.h @@ -0,0 +1,161 @@ +/* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ + +/* + Rosegarden + A MIDI and audio sequencer and musical notation editor. + + This program is Copyright 2000-2008 + Guillaume Laurent <[email protected]>, + Chris Cannam <[email protected]>, + Richard Bown <[email protected]> + + The moral rights of Guillaume Laurent, Chris Cannam, and Richard + Bown to claim authorship of this work have been asserted. + + This file is Copyright 2006 + Pedro Lopez-Cabanillas <[email protected]> + D. Michael McIntyre <[email protected]> + + Other copyrights also apply to some parts of this work. Please + see the AUTHORS file and individual file headers for details. + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. See the file + COPYING included with this distribution for more information. +*/ + +#ifndef _RG_TRACKPARAMETERBOX_H_ +#define _RG_TRACKPARAMETERBOX_H_ + +#include "base/MidiProgram.h" +#include "base/Track.h" +#include "gui/widgets/ColourTable.h" +#include <map> +#include "RosegardenParameterArea.h" +#include "RosegardenParameterBox.h" +#include <qstring.h> +#include <qcheckbox.h> // #include <QCheckBox> in QT4, thinking ahead +#include <vector> + + +class QWidget; +class QPushButton; +class QLabel; +class QFrame; +class KComboBox; +class QCheckBox; + + +namespace Rosegarden +{ + +class RosegardenGUIDoc; + + +class TrackParameterBox : public RosegardenParameterBox +{ +Q_OBJECT + +public: + TrackParameterBox( RosegardenGUIDoc *doc, + QWidget *parent=0); + ~TrackParameterBox(); + + void setDocument( RosegardenGUIDoc *doc ); + void populateDeviceLists(); + virtual void showAdditionalControls(bool showThem); + + virtual QString getPreviousBox(RosegardenParameterArea::Arrangement) const; + +public slots: + void slotSelectedTrackChanged(); + void slotSelectedTrackNameChanged(); + void slotPlaybackDeviceChanged(int index); + void slotInstrumentChanged(int index); + void slotRecordingDeviceChanged(int index); + void slotRecordingChannelChanged(int index); + void slotUpdateControls(int); + void slotInstrumentLabelChanged(InstrumentId id, QString label); + + void slotClefChanged(int clef); + void slotTransposeChanged(int transpose); + void slotTransposeIndexChanged(int index); + void slotTransposeTextChanged(QString text); + void slotDocColoursChanged(); + void slotColorChanged(int index); + void slotHighestPressed(); + void slotLowestPressed(); + void slotPresetPressed(); + + void slotStaffSizeChanged(int index); + void slotStaffBracketChanged(int index); + +signals: + void instrumentSelected(TrackId, int); + +protected: + void populatePlaybackDeviceList(); + void populateRecordingDeviceList(); + void updateHighLow(); + +private: + RosegardenGUIDoc *m_doc; + + KComboBox *m_playDevice; + KComboBox *m_instrument; + KComboBox *m_recDevice; + KComboBox *m_recChannel; + + QPushButton *m_presetButton; + QPushButton *m_highButton; + QPushButton *m_lowButton; + + KComboBox *m_defClef; + KComboBox *m_defColor; + KComboBox *m_defTranspose; + KComboBox *m_staffSizeCombo; + KComboBox *m_staffBracketCombo; + + + int m_addColourPos; + int m_highestPlayable; + int m_lowestPlayable; + ColourTable::ColourList m_colourList; + + QLabel *m_trackLabel; + + typedef std::vector<DeviceId> IdsVector; + + IdsVector m_playDeviceIds; + IdsVector m_recDeviceIds; + + std::map<DeviceId, IdsVector> m_instrumentIds; + std::map<DeviceId, QStringList> m_instrumentNames; + + int m_selectedTrackId; + + char m_lastInstrumentType; + + // Additional elements that may be hidden in vertical stacked mode + //QFrame *m_separator2; + QFrame *m_playbackGroup; + QFrame *m_recordGroup; + QFrame *m_defaultsGroup; + QFrame *m_staffGroup; + QLabel *m_segHeader; + QLabel *m_presetLbl; + QLabel *m_staffGrpLbl; + QLabel *m_grandStaffLbl; + QLabel *m_clefLbl; + QLabel *m_transpLbl; + QLabel *m_colorLbl; + QLabel *m_rangeLbl; + QLabel *m_psetLbl; +}; + + +} + +#endif |