summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--muse2/ChangeLog1
-rw-r--r--muse2/muse/app.cpp21
-rw-r--r--muse2/muse/cobject.cpp6
-rw-r--r--muse2/muse/globals.cpp1
-rw-r--r--muse2/muse/globals.h1
-rw-r--r--muse2/muse/icons.cpp3
-rw-r--r--muse2/muse/icons.h1
-rw-r--r--muse2/xpm/metronome.xpm30
8 files changed, 57 insertions, 7 deletions
diff --git a/muse2/ChangeLog b/muse2/ChangeLog
index 96cf673d..e49ba158 100644
--- a/muse2/ChangeLog
+++ b/muse2/ChangeLog
@@ -1,5 +1,6 @@
28.03.2013:
- Allow reading old drummaps for new style drumtracks (rj)
+ - Added metronome icon in main window (rj)
27.03.2013:
- Fixed moving events with keyboard in Drum editor (rj)
10.03.2013:
diff --git a/muse2/muse/app.cpp b/muse2/muse/app.cpp
index c0a56ac3..ae0f19c4 100644
--- a/muse2/muse/app.cpp
+++ b/muse2/muse/app.cpp
@@ -437,26 +437,30 @@ MusE::MusE() : QMainWindow()
MusEGlobal::stopAction->setChecked(true);
connect(MusEGlobal::stopAction, SIGNAL(toggled(bool)), MusEGlobal::song, SLOT(setStop(bool)));
- MusEGlobal::playAction = new QAction(QIcon(*MusEGui::playIcon),
- tr("Play"), MusEGlobal::transportAction);
+ MusEGlobal::playAction = new QAction(QIcon(*MusEGui::playIcon), tr("Play"), MusEGlobal::transportAction);
MusEGlobal::playAction->setCheckable(true);
MusEGlobal::playAction->setWhatsThis(tr("start sequencer play"));
MusEGlobal::playAction->setChecked(false);
connect(MusEGlobal::playAction, SIGNAL(toggled(bool)), MusEGlobal::song, SLOT(setPlay(bool)));
- MusEGlobal::recordAction = new QAction(QIcon(*MusEGui::recordIcon),
- tr("Record"), MusEGlobal::transportAction);
+ MusEGlobal::recordAction = new QAction(QIcon(*MusEGui::recordIcon), tr("Record"), MusEGlobal::transportAction);
MusEGlobal::recordAction->setCheckable(true);
MusEGlobal::recordAction->setWhatsThis(tr("to record press record and then play"));
connect(MusEGlobal::recordAction, SIGNAL(toggled(bool)), MusEGlobal::song, SLOT(setRecord(bool)));
- MusEGlobal::panicAction = new QAction(QIcon(*MusEGui::panicIcon),
- tr("Panic"), this);
+ MusEGlobal::panicAction = new QAction(QIcon(*MusEGui::panicIcon), tr("Panic"), this);
MusEGlobal::panicAction->setWhatsThis(tr("send note off to all midi channels"));
connect(MusEGlobal::panicAction, SIGNAL(activated()), MusEGlobal::song, SLOT(panic()));
+ MusEGlobal::metronomeAction = new QAction(QIcon(*MusEGui::metronomeIcon), tr("Metronome"), this);
+ MusEGlobal::metronomeAction->setCheckable(true);
+ MusEGlobal::metronomeAction->setWhatsThis(tr("turn on/off metronome"));
+ MusEGlobal::metronomeAction->setChecked(MusEGlobal::song->click());
+ connect(MusEGlobal::metronomeAction, SIGNAL(toggled(bool)), MusEGlobal::song, SLOT(setClick(bool)));
+ connect(MusEGlobal::song, SIGNAL(clickChanged(bool)), MusEGlobal::metronomeAction, SLOT(setChecked(bool)));
+
//----Actions
//-------- File Actions
@@ -707,6 +711,10 @@ MusE::MusE() : QMainWindow()
panicToolbar->setObjectName("Panic (global)");
panicToolbar->addAction(MusEGlobal::panicAction);
+ QToolBar* metronomeToolbar = addToolBar(tr("Metronome"));
+ metronomeToolbar->setObjectName("Metronome");
+ metronomeToolbar->addAction(MusEGlobal::metronomeAction);
+
requiredToolbars.push_back(tools);
optionalToolbars.push_back(songpos_tb);
optionalToolbars.push_back(sig_tb);
@@ -714,6 +722,7 @@ MusE::MusE() : QMainWindow()
optionalToolbars.push_back(undoToolbar);
optionalToolbars.push_back(transportToolbar);
optionalToolbars.push_back(panicToolbar);
+ optionalToolbars.push_back(metronomeToolbar);
QSocketNotifier* ss = new QSocketNotifier(MusEGlobal::audio->getFromThreadFdr(), QSocketNotifier::Read, this);
connect(ss, SIGNAL(activated(int)), MusEGlobal::song, SLOT(seqSignal(int)));
diff --git a/muse2/muse/cobject.cpp b/muse2/muse/cobject.cpp
index b7f257ae..4a850434 100644
--- a/muse2/muse/cobject.cpp
+++ b/muse2/muse/cobject.cpp
@@ -116,7 +116,11 @@ TopWin::TopWin(ToplevelType t, QWidget* parent, const char* name, Qt::WindowFlag
panic_toolbar->setObjectName("panic");
panic_toolbar->addAction(MusEGlobal::panicAction);
- QToolBar* transport_toolbar = addToolBar(tr("Transport"));
+ QToolBar* metronome_toolbar = addToolBar(tr("Metronome"));
+ metronome_toolbar->setObjectName("metronome");
+ metronome_toolbar->addAction(MusEGlobal::metronomeAction);
+
+ QToolBar* transport_toolbar = addToolBar(tr("Transport"));
transport_toolbar->setObjectName("transport");
transport_toolbar->addActions(MusEGlobal::transportAction->actions());
diff --git a/muse2/muse/globals.cpp b/muse2/muse/globals.cpp
index c1329172..700b0a9a 100644
--- a/muse2/muse/globals.cpp
+++ b/muse2/muse/globals.cpp
@@ -247,6 +247,7 @@ QAction* punchinAction;
QAction* punchoutAction;
QAction* recordAction;
QAction* panicAction;
+QAction* metronomeAction;
MusEGui::MusE* muse = 0;
diff --git a/muse2/muse/globals.h b/muse2/muse/globals.h
index e295771a..e84c2ce0 100644
--- a/muse2/muse/globals.h
+++ b/muse2/muse/globals.h
@@ -150,6 +150,7 @@ extern QAction* punchinAction;
extern QAction* punchoutAction;
extern QAction* recordAction;
extern QAction* panicAction;
+extern QAction* metronomeAction;
extern MusEGui::MusE* muse;
diff --git a/muse2/muse/icons.cpp b/muse2/muse/icons.cpp
index 1a578c3e..b6469109 100644
--- a/muse2/muse/icons.cpp
+++ b/muse2/muse/icons.cpp
@@ -179,6 +179,7 @@
#include "xpm/buttondown.xpm"
#include "xpm/configure.xpm"
#include "xpm/panic.xpm"
+#include "xpm/metronome.xpm"
// next two lines will vanish soon
@@ -419,6 +420,7 @@ QPixmap* soloblksqIconOff;
QPixmap* editmuteIcon;
QPixmap* editmuteSIcon;
QPixmap* panicIcon;
+QPixmap* metronomeIcon;
QIcon* pianoIconSet;
QIcon* scoreIconSet;
@@ -628,6 +630,7 @@ void initIcons()
editmuteIcon = new MPIXMAP(editmute_xpm, NULL);
editmuteSIcon = new MPIXMAP(editmuteS_xpm, NULL);
panicIcon = new MPIXMAP(panic_xpm, NULL);
+ metronomeIcon = new MPIXMAP(metronome_xpm, NULL);
editcutIconSet = new MICON(editcutS_xpm, "edit-cut"); // ddskrjo
editcopyIconSet = new MICON(editcopyS_xpm, "edit-copy");
diff --git a/muse2/muse/icons.h b/muse2/muse/icons.h
index a2222489..37fd717a 100644
--- a/muse2/muse/icons.h
+++ b/muse2/muse/icons.h
@@ -125,6 +125,7 @@ extern QPixmap* configureIcon;
extern QPixmap* editmuteIcon;
extern QPixmap* editmuteSIcon;
extern QPixmap* panicIcon;
+extern QPixmap* metronomeIcon;
extern QIcon* pianoIconSet;
extern QIcon* scoreIconSet;
diff --git a/muse2/xpm/metronome.xpm b/muse2/xpm/metronome.xpm
new file mode 100644
index 00000000..ed0a93ef
--- /dev/null
+++ b/muse2/xpm/metronome.xpm
@@ -0,0 +1,30 @@
+/* XPM */
+static const char * metronome_xpm[] = {
+"18 18 9 1",
+" c None",
+". c #000000",
+"+ c #FFAE4C",
+"@ c #D5961C",
+"# c #FFFFFF",
+"$ c #FF9933",
+"% c #FFCC33",
+"& c #FFCC66",
+"* c #FFC054",
+" ",
+" ",
+" ..... ",
+" .+@@. #. ",
+" .@+@@$. #. ",
+" .@+@@$.#. ",
+" .@+@@$.#. ",
+" .@+@@$#. ",
+" .@@+@@$#. ",
+" .@@+@@#.. ",
+" .@@+@@#.. ",
+" .%@@+@#.@@. ",
+" .%@@+@#.@@. ",
+" .%@@+#.$@@. ",
+" .%@@+#.$@@. ",
+" .&%@@+**$@@+. ",
+" ............. ",
+" "};