diff options
-rw-r--r-- | muse/ChangeLog | 2 | ||||
-rw-r--r-- | muse/muse/CMakeLists.txt | 11 | ||||
-rw-r--r-- | muse/muse/icons.cpp | 6 | ||||
-rw-r--r-- | muse/muse/muse.cpp | 25 | ||||
-rw-r--r-- | muse/muse/muse.h | 4 | ||||
-rw-r--r-- | muse/muse/projectpropsdialog.h | 46 | ||||
-rw-r--r-- | muse/muse/projectpropsdialog.ui | 188 | ||||
-rw-r--r-- | muse/muse/song.h | 1 |
8 files changed, 274 insertions, 9 deletions
diff --git a/muse/ChangeLog b/muse/ChangeLog index b83fe865..d1f6b7c4 100644 --- a/muse/ChangeLog +++ b/muse/ChangeLog @@ -1,3 +1,5 @@ +23.6. (ws) + * new project property dialog to edit the project comment 22.6. (ws) * fix: get reference count right when undo "split part" * implement: rename part diff --git a/muse/muse/CMakeLists.txt b/muse/muse/CMakeLists.txt index d3bb0d5c..f40eb74f 100644 --- a/muse/muse/CMakeLists.txt +++ b/muse/muse/CMakeLists.txt @@ -45,8 +45,14 @@ subdirs( ) set (muse_uics - muse preferences exportmididialog configmidifile - transport aboutbox transpose + muse + preferences + exportmididialog + configmidifile + transport + aboutbox + transpose + projectpropsdialog projectdialog templatedialog midiedit/quantconfig @@ -58,6 +64,7 @@ set (muse_uics ) set(muse_mocs + projectpropsdialog projectdialog templatedialog preferences plugingui midiplugin muse song transport conf editor diff --git a/muse/muse/icons.cpp b/muse/muse/icons.cpp index 8c4f05c6..fec9711d 100644 --- a/muse/muse/icons.cpp +++ b/muse/muse/icons.cpp @@ -111,8 +111,8 @@ #include "xpm/flagS.xpm" #include "xpm/lock.xpm" #include "xpm/toc.xpm" -#include "xpm/piano.xpm" -// #include "xpm/pianoS.xpm" +// #include "xpm/piano.xpm" +#include "xpm/pianoS.xpm" #include "xpm/exitS.xpm" #include "xpm/undo.xpm" @@ -512,7 +512,7 @@ void initIcons() select_inside_loopIcon = new QPixmap(select_inside_loop_xpm); select_invert_selectionIcon = new QPixmap(select_invert_selection); select_outside_loopIcon = new QPixmap(select_outside_loop_xpm); - pianoIconSet = new QIcon(QPixmap(piano_xpm)); + pianoIconSet = new QIcon(QPixmap(pianoS_xpm)); audio_bounce_to_fileIcon = new QPixmap(audio_bounce_to_file_xpm); audio_bounce_to_trackIcon = new QPixmap(audio_bounce_to_track_xpm); diff --git a/muse/muse/muse.cpp b/muse/muse/muse.cpp index f6eba4b7..d2b153ad 100644 --- a/muse/muse/muse.cpp +++ b/muse/muse/muse.cpp @@ -65,6 +65,7 @@ #include "part.h" #include "projectdialog.h" #include "templatedialog.h" +#include "projectpropsdialog.h" static pthread_t watchdogThread; @@ -463,6 +464,7 @@ MusE::MusE() mixer2 = 0; markerView = 0; exportMidiDialog = 0; + projectPropsDialog = 0; song->blockSignals(true); heartBeatTimer = new QTimer(this); @@ -684,15 +686,19 @@ MusE::MusE() menuEdit->addSeparator(); menuEdit->addAction(pianoAction); - menu_ids[CMD_OPEN_DRUMS] = menuEdit->addAction(QIcon(*edit_drummsIcon), tr("Drums"), this, SLOT(startDrumEditor()), 0); - menu_ids[CMD_OPEN_LIST] = menuEdit->addAction(QIcon(*edit_listIcon), tr("List"), this, SLOT(startListEditor()), 0); - + menu_ids[CMD_OPEN_DRUMS] = menuEdit->addAction(QIcon(*edit_drummsIcon), tr("Drums")); + menu_ids[CMD_OPEN_LIST] = menuEdit->addAction(QIcon(*edit_listIcon), tr("List")); menu_ids[CMD_OPEN_GRAPHIC_MASTER] = menuEdit->addAction(QIcon(*mastertrack_graphicIcon),tr("Mastertrack")); + menu_ids[CMD_OPEN_PROJECT_PROPS] = menuEdit->addAction(*saveIcon, tr("Project Properties")); + + connect(menu_ids[CMD_OPEN_DRUMS], SIGNAL(triggered()), SLOT(startDrumEditor())); + connect(menu_ids[CMD_OPEN_LIST], SIGNAL(triggered()), SLOT(startListEditor())); connect(menu_ids[CMD_OPEN_GRAPHIC_MASTER], SIGNAL(triggered()), SLOT(startMasterEditor())); + connect(menu_ids[CMD_OPEN_PROJECT_PROPS], SIGNAL(triggered()), SLOT(showProjectPropsDialog())); menuEdit->addSeparator(); connect(menuEdit, SIGNAL(triggered(QAction*)), SLOT(cmd(QAction*))); - connect(select, SIGNAL(triggered(QAction*)), SLOT(cmd(QAction*))); + connect(select, SIGNAL(triggered(QAction*)), SLOT(cmd(QAction*))); midiEdit = menuEdit->addMenu(QIcon(*edit_midiIcon), tr("Midi")); // menu_ids[CMD_OPEN_MIDI_TRANSFORM] = midiEdit->addAction(QIcon(*midi_transformIcon), tr("Midi &Transform"), this, SLOT(startMidiTransformer()), 0); @@ -1544,6 +1550,17 @@ void MusE::startMasterEditor() } //--------------------------------------------------------- +// showProjectPropsDialog +//--------------------------------------------------------- + +void MusE::showProjectPropsDialog() + { + if (projectPropsDialog == 0) + projectPropsDialog = new ProjectPropsDialog(this); + projectPropsDialog->show(); + } + +//--------------------------------------------------------- // startDrumEditor //--------------------------------------------------------- diff --git a/muse/muse/muse.h b/muse/muse/muse.h index 711cf3d0..36c23ae3 100644 --- a/muse/muse/muse.h +++ b/muse/muse/muse.h @@ -84,6 +84,7 @@ class MusE : public QMainWindow, public Ui::MuseBase CMD_MIXER_SNAPSHOT, CMD_MIXER_AUTOMATION_CLEAR, CMD_OPEN_HELP, CMD_OPEN_HOMEPAGE, CMD_OPEN_BUG, CMD_START_WHATSTHIS, CMD_AUDIO_BOUNCE_TO_FILE, CMD_AUDIO_BOUNCE_TO_TRACK, CMD_AUDIO_RESTART, + CMD_OPEN_PROJECT_PROPS, CMD_LAST }; QAction* menu_ids[CMD_LAST]; @@ -147,6 +148,8 @@ class MusE : public QMainWindow, public Ui::MuseBase QMenu* openRecent; QSpinBox* globalTempoSpinBox; + QDialog* projectPropsDialog; + //------------------------------------------ bool readMidi(FILE*); @@ -206,6 +209,7 @@ class MusE : public QMainWindow, public Ui::MuseBase void startWaveEditor(PartList*); void writeGlobalConfiguration() const; void startEditInstrument(); + void showProjectPropsDialog(); void openRecentMenu(); void selectProject(QAction*); diff --git a/muse/muse/projectpropsdialog.h b/muse/muse/projectpropsdialog.h new file mode 100644 index 00000000..83b7a511 --- /dev/null +++ b/muse/muse/projectpropsdialog.h @@ -0,0 +1,46 @@ +//============================================================================= +// MusE +// Linux Music Editor +// $Id:$ +// +// Copyright (C) 2002-2006 by Werner Schweer and others +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License version 2. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +//============================================================================= + +#ifndef __PROJECTPROPS_DIALOG_H__ +#define __PROJECTPROPS_DIALOG_H__ + +#include "ui_projectpropsdialog.h" + +//--------------------------------------------------------- +// ProjectPropsDialog +//--------------------------------------------------------- + +class ProjectPropsDialog : public QDialog, public Ui_ProjectPropsDialogBase { + Q_OBJECT + + QString projectComment; + + public slots: + virtual void accept(); + virtual void reject(); + + public: + ProjectPropsDialog(QWidget* parent = 0); + }; + +#endif + + + diff --git a/muse/muse/projectpropsdialog.ui b/muse/muse/projectpropsdialog.ui new file mode 100644 index 00000000..f431b602 --- /dev/null +++ b/muse/muse/projectpropsdialog.ui @@ -0,0 +1,188 @@ +<ui version="4.0" > + <author></author> + <comment></comment> + <exportmacro></exportmacro> + <class>ProjectPropsDialogBase</class> + <widget class="QDialog" name="ProjectPropsDialogBase" > + <property name="geometry" > + <rect> + <x>0</x> + <y>0</y> + <width>456</width> + <height>382</height> + </rect> + </property> + <property name="windowTitle" > + <string>MusE: Project Properties</string> + </property> + <layout class="QGridLayout" > + <property name="margin" > + <number>9</number> + </property> + <property name="spacing" > + <number>6</number> + </property> + <item row="4" column="0" colspan="4" > + <widget class="QTextEdit" name="comment" /> + </item> + <item row="3" column="0" colspan="4" > + <widget class="QLabel" name="label" > + <property name="text" > + <string>Comment:</string> + </property> + </widget> + </item> + <item row="2" column="3" > + <widget class="QSpinBox" name="sampleRate" > + <property name="readOnly" > + <bool>true</bool> + </property> + <property name="suffix" > + <string>Hz</string> + </property> + <property name="maximum" > + <number>100000</number> + </property> + <property name="value" > + <number>48000</number> + </property> + </widget> + </item> + <item row="2" column="2" > + <widget class="QLabel" name="label_5" > + <property name="text" > + <string>Samplerate:</string> + </property> + <property name="alignment" > + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> + </widget> + </item> + <item row="2" column="0" > + <widget class="QLabel" name="label_4" > + <property name="text" > + <string>Length:</string> + </property> + </widget> + </item> + <item row="2" column="1" > + <widget class="QTimeEdit" name="length" > + <property name="focusPolicy" > + <enum>Qt::NoFocus</enum> + </property> + <property name="readOnly" > + <bool>true</bool> + </property> + </widget> + </item> + <item row="1" column="1" > + <widget class="QDateEdit" name="createdDate" > + <property name="focusPolicy" > + <enum>Qt::NoFocus</enum> + </property> + <property name="readOnly" > + <bool>true</bool> + </property> + </widget> + </item> + <item row="5" column="0" colspan="4" > + <layout class="QHBoxLayout" > + <property name="margin" > + <number>0</number> + </property> + <property name="spacing" > + <number>6</number> + </property> + <item> + <spacer> + <property name="orientation" > + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" > + <size> + <width>131</width> + <height>31</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QPushButton" name="okButton" > + <property name="text" > + <string>OK</string> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="cancelButton" > + <property name="text" > + <string>Cancel</string> + </property> + </widget> + </item> + </layout> + </item> + <item row="1" column="0" > + <widget class="QLabel" name="label_2" > + <property name="text" > + <string>Created:</string> + </property> + </widget> + </item> + <item row="0" column="0" > + <widget class="QLabel" name="label_6" > + <property name="sizePolicy" > + <sizepolicy> + <hsizetype>0</hsizetype> + <vsizetype>0</vsizetype> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text" > + <string>Project:</string> + </property> + </widget> + </item> + <item row="0" column="1" colspan="3" > + <widget class="QLineEdit" name="projectName" /> + </item> + </layout> + </widget> + <pixmapfunction></pixmapfunction> + <resources/> + <connections> + <connection> + <sender>okButton</sender> + <signal>clicked()</signal> + <receiver>ProjectPropsDialogBase</receiver> + <slot>accept()</slot> + <hints> + <hint type="sourcelabel" > + <x>278</x> + <y>253</y> + </hint> + <hint type="destinationlabel" > + <x>96</x> + <y>254</y> + </hint> + </hints> + </connection> + <connection> + <sender>cancelButton</sender> + <signal>clicked()</signal> + <receiver>ProjectPropsDialogBase</receiver> + <slot>reject()</slot> + <hints> + <hint type="sourcelabel" > + <x>369</x> + <y>253</y> + </hint> + <hint type="destinationlabel" > + <x>179</x> + <y>282</y> + </hint> + </hints> + </connection> + </connections> +</ui> diff --git a/muse/muse/song.h b/muse/muse/song.h index 344d1c80..40842a3f 100644 --- a/muse/muse/song.h +++ b/muse/muse/song.h @@ -407,6 +407,7 @@ class Song : public QObject { void setComment(const QString& s) { _comment = s; } void setCreated(bool val) { _created = val; } bool created() const { return _created; } + QDateTime createDate() const { return _createDate; } bool read(QFile* qf); void read20(QDomNode node); |