-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathchimerymenus.cpp
36 lines (32 loc) · 892 Bytes
/
chimerymenus.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#include"chimerymenus.h"
#include<QDebug>
ChimeryMenus::ChimeryMenus(ChimeryMainWindow * mwin, ChimeryAboutWindow * awin) :
QMenuBar(NULL)
{
mainwin = mwin;
aboutwin = awin;
menu = new QMenu("&Chimes", this);
sched = new QAction("&Stop Chimes", this);
about = new QAction("&About Chimery", this);
sched->setEnabled(false);
sched->setShortcuts(QKeySequence::Undo);
menu->addAction(sched);
menu->addAction(about);
this->addMenu(menu);
#ifdef Q_OS_MAC
menu->setAsDockMenu();
#endif
QObject::connect(sched, SIGNAL(triggered()), mainwin, SLOT(reinit()), Qt::QueuedConnection);
QObject::connect(about, SIGNAL(triggered()), aboutwin, SLOT(show()), Qt::QueuedConnection);
}
void ChimeryMenus::sched_start()
{
sched->setEnabled(true);
}
void ChimeryMenus::sched_stop()
{
sched->setEnabled(false);
}
ChimeryMenus::~ChimeryMenus()
{
}