diff options
-rw-r--r-- | muse/muse/CMakeLists.txt | 3 | ||||
-rw-r--r-- | muse/muse/conf.cpp | 3 | ||||
-rw-r--r-- | muse/muse/gconfig.cpp | 1 | ||||
-rw-r--r-- | muse/muse/gconfig.h | 1 | ||||
-rw-r--r-- | muse/muse/muse.cpp | 68 | ||||
-rw-r--r-- | muse/muse/preferences.cpp | 2 | ||||
-rw-r--r-- | muse/muse/preferences.ui | 50 | ||||
-rw-r--r-- | muse/muse/song.cpp | 29 | ||||
-rw-r--r-- | muse/muse/song.h | 1 | ||||
-rw-r--r-- | muse/muse/templatedialog.cpp | 233 | ||||
-rw-r--r-- | muse/muse/templatedialog.h | 50 | ||||
-rw-r--r-- | muse/muse/templatedialog.ui | 188 | ||||
-rw-r--r-- | muse/muse/track.cpp | 8 | ||||
-rw-r--r-- | muse/muse/transport.cpp | 2 | ||||
-rw-r--r-- | muse/muse/wavetrack.cpp | 2 |
15 files changed, 584 insertions, 57 deletions
diff --git a/muse/muse/CMakeLists.txt b/muse/muse/CMakeLists.txt index 438d22f1..88deda29 100644 --- a/muse/muse/CMakeLists.txt +++ b/muse/muse/CMakeLists.txt @@ -48,13 +48,14 @@ set (muse_uics muse preferences exportmididialog configmidifile transport aboutbox transpose projectdialog + templatedialog midiedit/quantconfig mixer/routedialog arranger/configtrack ) set(muse_mocs - projectdialog preferences plugingui midiplugin muse + projectdialog templatedialog preferences plugingui midiplugin muse song transport conf editor cobject transpose track midisynti midiport miditrack wavetrack audiotrack audioaux audiooutput diff --git a/muse/muse/conf.cpp b/muse/muse/conf.cpp index ca8064f7..0ba0119e 100644 --- a/muse/muse/conf.cpp +++ b/muse/muse/conf.cpp @@ -267,6 +267,8 @@ void readConfiguration(QDomNode node) config.createDefaultMidiInput = i; else if (tag == "projectPath") config.projectPath = s; + else if (tag == "templatePath") + config.templatePath = s; else if (tag == "PianoRoll") PianoRoll::readConfiguration(node); else if (tag == "DrumEdit") @@ -485,6 +487,7 @@ void MusE::writeGlobalConfiguration(Xml& xml) const xml.intTag("connectToAllMidiTracks", config.connectToAllMidiTracks); xml.intTag("createDefaultMidiInput", config.createDefaultMidiInput); xml.strTag("projectPath", config.projectPath); + xml.strTag("templatePath", config.templatePath); PianoRoll::writeConfiguration(xml); DrumEdit::writeConfiguration(xml); diff --git a/muse/muse/gconfig.cpp b/muse/muse/gconfig.cpp index 37534203..7a90489c 100644 --- a/muse/muse/gconfig.cpp +++ b/muse/muse/gconfig.cpp @@ -136,5 +136,6 @@ GlobalConfigValues config = { true, // connectToAllMidiTracks true, // createDefaultMidiInput QString("MusE/projects"), // projectPath + QString("MusE/templates"), // templatePath }; diff --git a/muse/muse/gconfig.h b/muse/muse/gconfig.h index 8bfed74b..d35ba0f9 100644 --- a/muse/muse/gconfig.h +++ b/muse/muse/gconfig.h @@ -124,6 +124,7 @@ struct GlobalConfigValues { bool connectToAllMidiTracks; bool createDefaultMidiInput; QString projectPath; + QString templatePath; }; extern GlobalConfigValues config; diff --git a/muse/muse/muse.cpp b/muse/muse/muse.cpp index 26da3c8c..9e67f104 100644 --- a/muse/muse/muse.cpp +++ b/muse/muse/muse.cpp @@ -60,6 +60,7 @@ #include "instruments/editinstrument.h" #include "part.h" #include "projectdialog.h" +#include "templatedialog.h" static pthread_t watchdogThread; @@ -1104,6 +1105,9 @@ void MusE::loadProject1(const QString& path) return; } } + // + // close all toplevel windows + // foreach(QWidget* w, QApplication::topLevelWidgets()) { if (!w->isVisible()) continue; @@ -1120,7 +1124,33 @@ void MusE::loadProject1(const QString& path) } emit startLoadSong(); song->setProjectPath(path); - song->load(); + song->clear(false); + + QString s = pd.absoluteFilePath(path + "/" + name + ".med"); + QFile f(s); + + bool rv = true; + if (f.open(QIODevice::ReadOnly)) { + rv = song->read(&f); + f.close(); + } + else { + TemplateDialog templateDialog; + if (templateDialog.exec() == 1) { + QString path = templateDialog.templatePath(); + if (!path.isEmpty()) { + QFile f(path); + if (f.open(QIODevice::ReadOnly)) { + rv = song->read(&f); + f.close(); + } + } + } + } + if (!rv) { + QMessageBox::critical(this, QString("MusE"), + tr("File read error")); + } tr_id->setChecked(config.transportVisible); bt_id->setChecked(config.bigTimeVisible); @@ -2858,17 +2888,19 @@ int main(int argc, char* argv[]) // load project //--------------------------------------------------- - // first check if there is a project directory: + // check if there is a project directory: QDir pd(QDir::homePath() + "/" + config.projectPath); if (!pd.exists()) { // ask user to create a new project directory + QString title(muse->tr("MusE: create project directory")); + QString s; s = "The MusE project directory\n%1\ndoes not exists"; s = s.arg(pd.path()); int rv = QMessageBox::question(0, - "MusE: create project directory", + title, s, "Create", "Abort", @@ -2879,12 +2911,40 @@ int main(int argc, char* argv[]) if (!pd.mkpath(pd.path())) { // TODO: tell user why this has happened QMessageBox::critical(0, - "MusE: create project directory", + title, "Creating project directory failed"); exit(-1); } } + // check if there is a template directory: + + pd.setPath(QDir::homePath() + "/" + config.templatePath); + if (!pd.exists()) { + // ask user to create a new template directory + QString title(muse->tr("MusE: create template directory")); + + QString s; + s = "The MusE template directory\n%1\ndoes not exists"; + s = s.arg(pd.path()); + + int rv = QMessageBox::question(0, + title, + s, + "Create", + "Abort", + QString(), + 0, 1); + if (rv == 0) { + if (!pd.mkpath(pd.path())) { + // TODO: tell user why this has happened + QMessageBox::critical(0, + title, + "Creating template directory failed"); + } + } + } + QString path; // project path relativ to config.projectPath if (argc >= 2) path = argv[optind]; // start with first name on command line diff --git a/muse/muse/preferences.cpp b/muse/muse/preferences.cpp index f8b838cd..7efd6751 100644 --- a/muse/muse/preferences.cpp +++ b/muse/muse/preferences.cpp @@ -341,6 +341,7 @@ PreferencesDialog::PreferencesDialog(Arranger* a, QWidget* parent) freewheelMode->setChecked(config->useJackFreewheelMode); showSplash->setChecked(config->showSplashScreen); projectPath->setText(config->projectPath); + templatePath->setText(config->templatePath); stopActive->setChecked(midiRCList.isActive(RC_STOP)); playActive->setChecked(midiRCList.isActive(RC_PLAY)); @@ -595,6 +596,7 @@ void PreferencesDialog::apply() ::config.showSplashScreen = showSplash->isChecked(); ::config.projectPath = projectPath->text(); + ::config.templatePath = templatePath->text(); PianoRoll::initWidth = pianorollWidth->value(); PianoRoll::initHeight = pianorollHeight->value(); diff --git a/muse/muse/preferences.ui b/muse/muse/preferences.ui index cb7e2db4..116fb3e7 100644 --- a/muse/muse/preferences.ui +++ b/muse/muse/preferences.ui @@ -9,7 +9,7 @@ <x>0</x> <y>0</y> <width>731</width> - <height>602</height> + <height>713</height> </rect> </property> <property name="windowTitle" > @@ -117,24 +117,34 @@ <item> <widget class="QGroupBox" name="groupBox_7" > <property name="title" > - <string>Path</string> + <string>Local Paths</string> </property> - <layout class="QHBoxLayout" > + <layout class="QGridLayout" > <property name="margin" > <number>9</number> </property> <property name="spacing" > <number>6</number> </property> - <item> - <widget class="QLabel" name="label" > + <item row="1" column="1" > + <widget class="QLineEdit" name="templatePath" /> + </item> + <item row="0" column="1" > + <widget class="QLineEdit" name="projectPath" /> + </item> + <item row="1" column="0" > + <widget class="QLabel" name="label_35" > <property name="text" > - <string>Project Path</string> + <string>Templates</string> </property> </widget> </item> - <item> - <widget class="QLineEdit" name="projectPath" /> + <item row="0" column="0" > + <widget class="QLabel" name="label" > + <property name="text" > + <string>Projects</string> + </property> + </widget> </item> </layout> </widget> @@ -2307,30 +2317,30 @@ <pixmapfunction></pixmapfunction> <customwidgets> <customwidget> - <class>GreendotButton</class> - <extends>QToolButton</extends> - <header>greendotbutton.h</header> + <class>QuantCombo</class> + <extends>QComboBox</extends> + <header>quantcombo.h</header> <container>0</container> <pixmap></pixmap> </customwidget> <customwidget> - <class>RasterCombo</class> - <extends>QComboBox</extends> - <header>rastercombo.h</header> + <class>RecordButton</class> + <extends>QToolButton</extends> + <header>recordbutton.h</header> <container>0</container> <pixmap></pixmap> </customwidget> <customwidget> - <class>QuantCombo</class> - <extends>QComboBox</extends> - <header>quantcombo.h</header> + <class>GreendotButton</class> + <extends>QToolButton</extends> + <header>greendotbutton.h</header> <container>0</container> <pixmap></pixmap> </customwidget> <customwidget> - <class>RecordButton</class> - <extends>QToolButton</extends> - <header>recordbutton.h</header> + <class>RasterCombo</class> + <extends>QComboBox</extends> + <header>rastercombo.h</header> <container>0</container> <pixmap></pixmap> </customwidget> diff --git a/muse/muse/song.cpp b/muse/muse/song.cpp index 35e277ae..0832e054 100644 --- a/muse/muse/song.cpp +++ b/muse/muse/song.cpp @@ -2393,30 +2393,8 @@ void Song::setProjectPath(const QString& s) } //--------------------------------------------------------- -// load -//--------------------------------------------------------- - -void Song::load() - { - clear(false); - - QString s = absoluteProjectPath() + "/" + projectName() + ".med"; - - QFile f(s); - if (f.open(QIODevice::ReadOnly)) { - int rv = read(&f); - f.close(); - if (rv) { - QMessageBox::critical(0, QString("MusE"), - tr("File read error")); - return; - } - } - dirty = false; - } - -//--------------------------------------------------------- // read +// return false on error //--------------------------------------------------------- bool Song::read(QFile* qf) @@ -2431,7 +2409,7 @@ bool Song::read(QFile* qf) ln.setNum(line); error = err + "\n at line: " + ln + " col: " + col; printf("error reading med file: %s\n", error.toLatin1().data()); - return true; + return false; } for (QDomNode node = doc.documentElement(); !node.isNull(); node = node.nextSibling()) { QDomElement e = node.toElement(); @@ -2452,7 +2430,8 @@ bool Song::read(QFile* qf) else printf("MusE: %s not supported\n", e.tagName().toLatin1().data()); } - return false; + dirty = false; + return true; } //--------------------------------------------------------- diff --git a/muse/muse/song.h b/muse/muse/song.h index 1338de13..f7322c7f 100644 --- a/muse/muse/song.h +++ b/muse/muse/song.h @@ -402,7 +402,6 @@ class Song : public QObject { QString comment() const { return _comment; } void setComment(const QString& s) { _comment = s; } - void load(); bool read(QFile* qf); void read20(QDomNode node); void read10(QDomNode); diff --git a/muse/muse/templatedialog.cpp b/muse/muse/templatedialog.cpp new file mode 100644 index 00000000..3e72fdf8 --- /dev/null +++ b/muse/muse/templatedialog.cpp @@ -0,0 +1,233 @@ +//============================================================================= +// 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. +//============================================================================= + +#include "templatedialog.h" +#include "gconfig.h" +#include "song.h" +#include "icons.h" + +// +// entry types for templateTree tree widget: +// +enum { DIR_TYPE, TEMPLATE_TYPE }; + +//--------------------------------------------------------- +// processSubdir +//--------------------------------------------------------- + +void TemplateDialog::processSubdir(QTreeWidgetItem* item, const QString& p, + const QString& subdir) + { + QDir pd(p + "/" + subdir); + pd.setFilter(QDir::Files | QDir::AllDirs | QDir::NoDotAndDotDot); + pd.setNameFilters(QStringList("*.med")); + QFileInfoList el = pd.entryInfoList(); + foreach (QFileInfo s, el) { + QTreeWidgetItem* pi; + if (s.isDir()) { + pi = new QTreeWidgetItem(item, DIR_TYPE); + pi->setIcon(0, style()->standardIcon(QStyle::SP_FileIcon)); + itemCollapsed(pi); + processSubdir(pi, pd.absolutePath(), s.fileName()); + } + else { + pi = new QTreeWidgetItem(item, TEMPLATE_TYPE); + pi->setIcon(0, style()->standardIcon(QStyle::SP_FileIcon)); + } + pi->setText(0, s.fileName()); + } + } + +//--------------------------------------------------------- +// TemplateDialog +//--------------------------------------------------------- + +TemplateDialog::TemplateDialog(QWidget* parent) + : QDialog(parent) + { + setupUi(this); + templateTree->setSelectionBehavior(QAbstractItemView::SelectRows); + templateTree->setSelectionMode(QAbstractItemView::SingleSelection); + + QDir pd(QDir::homePath() + "/" + config.templatePath); + pd.setFilter(QDir::Files | QDir::AllDirs | QDir::NoDotAndDotDot); + pd.setNameFilters(QStringList("*.med")); + QFileInfoList el = pd.entryInfoList(); + foreach (QFileInfo s, el) { + QTreeWidgetItem* pi; + + if (s.isDir()) { + pi = new QTreeWidgetItem(templateTree, DIR_TYPE); + pi->setIcon(0, style()->standardIcon(QStyle::SP_FileIcon)); + itemCollapsed(pi); + processSubdir(pi, pd.absolutePath(), s.fileName()); + } + else { + pi = new QTreeWidgetItem(templateTree, TEMPLATE_TYPE); + pi->setIcon(0, style()->standardIcon(QStyle::SP_FileIcon)); + } + pi->setText(0, s.fileName()); + } + connect(templateTree, + SIGNAL(currentItemChanged(QTreeWidgetItem*, QTreeWidgetItem*)), + SLOT(currentChanged(QTreeWidgetItem*, QTreeWidgetItem*))); + connect(templateTree, + SIGNAL(itemDoubleClicked(QTreeWidgetItem*, int)), + SLOT(itemDoubleClicked(QTreeWidgetItem*, int))); + connect(templateTree, + SIGNAL(itemCollapsed(QTreeWidgetItem*)), + SLOT(itemCollapsed(QTreeWidgetItem*))); + connect(templateTree, + SIGNAL(itemExpanded(QTreeWidgetItem*)), + SLOT(itemExpanded(QTreeWidgetItem*))); + + currentChanged(0, 0); + } + +//--------------------------------------------------------- +// itemCollapsed +//--------------------------------------------------------- + +void TemplateDialog::itemCollapsed(QTreeWidgetItem* item) + { + item->setIcon(0, style()->standardIcon(QStyle::SP_DirClosedIcon)); + } + +//--------------------------------------------------------- +// itemExpanded +//--------------------------------------------------------- + +void TemplateDialog::itemExpanded(QTreeWidgetItem* item) + { + item->setIcon(0, style()->standardIcon(QStyle::SP_DirOpenIcon)); + } + +//--------------------------------------------------------- +// itemPath +//--------------------------------------------------------- + +QString TemplateDialog::itemPath(QTreeWidgetItem* item) const + { + QString path; + QTreeWidgetItem* ti = item; + QStringList dirComponent; + do { + dirComponent.prepend(ti->text(0)); + ti = ti->parent(); + } while (ti); + foreach (QString s, dirComponent) { + if (!path.isEmpty()) + path += "/"; + path += s; + } + return path; + } + +//--------------------------------------------------------- +// currentChanged +//--------------------------------------------------------- + +void TemplateDialog::currentChanged(QTreeWidgetItem* item, QTreeWidgetItem*) + { + bool enable = (item != 0) && (item->type() == TEMPLATE_TYPE); + createdDate->setEnabled(enable); + modifiedDate->setEnabled(enable); + comment->setEnabled(enable); + + // newFolder->setEnabled(item == 0 || item->type() == DIR_TYPE); + if (!enable) + return; + + QString pd(QDir::homePath() + "/" + config.templatePath + "/"); + + pd += "/" + itemPath(item); + + QFileInfo pf(pd + "/" + item->text(0) + ".med"); + createdDate->setDateTime(pf.created()); + modifiedDate->setDateTime(pf.lastModified()); + + QTime time(0, 0, 0); + + QFile f(pf.filePath()); + QDomDocument doc; + int line, column; + QString err; + if (!doc.setContent(&f, false, &err, &line, &column)) { + QString col, ln, error; + col.setNum(column); + ln.setNum(line); + error = err + "\n at line: " + ln + " col: " + col; + printf("error reading med file: %s\n", error.toLatin1().data()); + return; + } + for (QDomNode node = doc.documentElement(); !node.isNull(); node = node.nextSibling()) { + QDomElement e = node.toElement(); + if (e.isNull()) + continue; + if (e.tagName() == "muse") { + QString sversion = e.attribute("version", "1.0"); + int major=0, minor=0; + sscanf(sversion.toLatin1().data(), "%d.%d", &major, &minor); + int version = major << 8 + minor; + if (version >= 0x200) { + for (QDomNode n1 = node.firstChild(); !n1.isNull(); n1 = n1.nextSibling()) { + QDomElement e = n1.toElement(); + if (e.tagName() == "song") { + for (QDomNode n2 = n1.firstChild(); !n2.isNull(); n2 = n2.nextSibling()) { + QDomElement e = n2.toElement(); + QString tag(e.tagName()); + QString s(e.text()); + if (tag == "comment") + comment->setPlainText(s); + else if (tag == "LenInSec") { + int sec = s.toInt(); + time = time.addSecs(sec); + } + } + } + } + } + } + } + } + +//--------------------------------------------------------- +// templatePath +//--------------------------------------------------------- + +QString TemplateDialog::templatePath() const + { + QTreeWidgetItem* item = templateTree->currentItem(); + QString s; + if (item) + s = itemPath(item); + return s; + } + +//--------------------------------------------------------- +// itemDoubleClicked +//--------------------------------------------------------- + +void TemplateDialog::itemDoubleClicked(QTreeWidgetItem* item, int) + { + if (item->type() == TEMPLATE_TYPE) + accept(); + } + diff --git a/muse/muse/templatedialog.h b/muse/muse/templatedialog.h new file mode 100644 index 00000000..108163d1 --- /dev/null +++ b/muse/muse/templatedialog.h @@ -0,0 +1,50 @@ +//============================================================================= +// 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 __TEMPLATE_DIALOG_H__ +#define __TEMPLATE_DIALOG_H__ + +#include "ui_templatedialog.h" + +//--------------------------------------------------------- +// TemplateDialog +//--------------------------------------------------------- + +class TemplateDialog : public QDialog, public Ui_TemplateDialogBase { + Q_OBJECT + + void processSubdir(QTreeWidgetItem*, const QString&, + const QString&); + + QString itemPath(QTreeWidgetItem*) const; + + private slots: + void currentChanged(QTreeWidgetItem*, QTreeWidgetItem*); + void itemCollapsed(QTreeWidgetItem*); + void itemExpanded(QTreeWidgetItem*); + void itemDoubleClicked(QTreeWidgetItem*, int); + + public: + TemplateDialog(QWidget* parent = 0); + QString templatePath() const; + }; + +#endif + diff --git a/muse/muse/templatedialog.ui b/muse/muse/templatedialog.ui new file mode 100644 index 00000000..cbbc295d --- /dev/null +++ b/muse/muse/templatedialog.ui @@ -0,0 +1,188 @@ +<ui version="4.0" > + <author></author> + <comment></comment> + <exportmacro></exportmacro> + <class>TemplateDialogBase</class> + <widget class="QDialog" name="TemplateDialogBase" > + <property name="geometry" > + <rect> + <x>0</x> + <y>0</y> + <width>574</width> + <height>385</height> + </rect> + </property> + <property name="windowTitle" > + <string>MusE: Select Template</string> + </property> + <layout class="QGridLayout" > + <property name="margin" > + <number>9</number> + </property> + <property name="spacing" > + <number>6</number> + </property> + <item row="0" column="1" > + <widget class="QGroupBox" name="groupBox" > + <property name="title" > + <string>Properties</string> + </property> + <layout class="QGridLayout" > + <property name="margin" > + <number>9</number> + </property> + <property name="spacing" > + <number>3</number> + </property> + <item row="0" 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="1" column="1" > + <widget class="QDateEdit" name="modifiedDate" > + <property name="focusPolicy" > + <enum>Qt::NoFocus</enum> + </property> + <property name="readOnly" > + <bool>true</bool> + </property> + </widget> + </item> + <item row="3" column="0" > + <widget class="QLabel" name="label_5" > + <property name="text" > + <string>Comment:</string> + </property> + </widget> + </item> + <item row="1" column="0" > + <widget class="QLabel" name="label_3" > + <property name="text" > + <string>Modified:</string> + </property> + </widget> + </item> + <item row="0" column="0" > + <widget class="QLabel" name="label_2" > + <property name="text" > + <string>Created:</string> + </property> + </widget> + </item> + <item row="4" column="0" colspan="2" > + <widget class="QTextEdit" name="comment" > + <property name="focusPolicy" > + <enum>Qt::NoFocus</enum> + </property> + <property name="readOnly" > + <bool>true</bool> + </property> + </widget> + </item> + </layout> + </widget> + </item> + <item row="1" column="0" colspan="2" > + <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> + <property name="default" > + <bool>true</bool> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="cancelButton" > + <property name="text" > + <string>Cancel</string> + </property> + </widget> + </item> + </layout> + </item> + <item row="0" column="0" > + <widget class="QTreeWidget" name="templateTree" > + <column> + <property name="text" > + <string>Templates</string> + </property> + </column> + </widget> + </item> + </layout> + </widget> + <pixmapfunction></pixmapfunction> + <tabstops> + <tabstop>okButton</tabstop> + <tabstop>cancelButton</tabstop> + <tabstop>templateTree</tabstop> + <tabstop>modifiedDate</tabstop> + <tabstop>createdDate</tabstop> + <tabstop>comment</tabstop> + </tabstops> + <resources> + <include location="muse.qrc" /> + </resources> + <connections> + <connection> + <sender>okButton</sender> + <signal>clicked()</signal> + <receiver>TemplateDialogBase</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>TemplateDialogBase</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/track.cpp b/muse/muse/track.cpp index 0df6ef1b..c8f1f20e 100644 --- a/muse/muse/track.cpp +++ b/muse/muse/track.cpp @@ -205,7 +205,7 @@ void Track::setDefaultName() void Track::dump() const { - printf("Track <%s>: typ %d, parts %ld sel %d\n", + printf("Track <%s>: typ %d, parts %zd sel %d\n", _name.toLatin1().data(), _type, _parts->size(), _selected); } @@ -429,7 +429,7 @@ bool Track::addControllerVal(int id, unsigned time, CVal val) return c->add(time, val); } } - printf("Track::addControllerVal(): id 0x%x not found, listsize %ld\n", + printf("Track::addControllerVal(): id 0x%x not found, listsize %zd\n", id, controller()->size()); return false; } @@ -444,7 +444,7 @@ void Track::removeControllerVal(int id, unsigned time) { iCtrl i = controller()->find(id); if (i == controller()->end()) { - printf("Track::removeControllerVal(): id 0x%x not found, listsize %ld\n", + printf("Track::removeControllerVal(): id 0x%x not found, listsize %zd\n", id, controller()->size()); return; } @@ -873,7 +873,7 @@ int Track::getCtrl(int tick, int ctrl) const ciCtrl cl = _controller.find(ctrl); if (cl == _controller.end()) { if (debugMsg) - printf("getCtrl: controller %d(0x%x) not found %ld\n", + printf("getCtrl: controller %d(0x%x) not found %zd\n", ctrl, ctrl, _controller.size()); return CTRL_VAL_UNKNOWN; } diff --git a/muse/muse/transport.cpp b/muse/muse/transport.cpp index c2c421f9..e54096a4 100644 --- a/muse/muse/transport.cpp +++ b/muse/muse/transport.cpp @@ -167,7 +167,7 @@ void Transport::setLen(const AL::Pos& len) // setTimesig //--------------------------------------------------------- -void Transport::setTimesig(int z, int n) +void Transport::setTimesig(int /*z*/, int /*n*/) { //TD tempo->setTimesig(z, n); } diff --git a/muse/muse/wavetrack.cpp b/muse/muse/wavetrack.cpp index 76d7bdf3..b7a688d3 100644 --- a/muse/muse/wavetrack.cpp +++ b/muse/muse/wavetrack.cpp @@ -321,7 +321,7 @@ void WaveTrack::collectInputData() return; } - unsigned framePos = audio->pos().frame(); +// unsigned framePos = audio->pos().frame(); if (audio->freewheel()) { // when freewheeling, read data direct from file: // TODO: fetchData(framePos, segmentSize, buffer); |