summaryrefslogtreecommitdiff
path: root/noncore/multimedia/tonleiter/mainwidget.cpp
blob: db16541e5b9f351885c899951e452659271124d4 (plain)
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
37
38
39
40
41
42
43
44
#include "mainwidget.h"

#include <qlayout.h>

MainWidget::MainWidget(QWidget* parent,const char* name,WFlags f)
:QMainWindow(parent,name,f)
{
    setCaption("Tonleiter");
    data=new Data::TonleiterData(this);

    QWidget* mainwidget=new QWidget(this,"mainwidget");
    setCentralWidget(mainwidget);
    QBoxLayout* mainlayout=new QBoxLayout(mainwidget,QBoxLayout::TopToBottom);

    menuwidget=new Menu::MenuWidget(data,mainwidget);
    mainlayout->addWidget(menuwidget);

    fretboard=new Graph::FretBoard(data,mainwidget);
    connect(fretboard,SIGNAL(pressed()),this,SLOT(fretboardPressed()));
    mainlayout->addWidget(fretboard);

    showmenu=true;

}
//****************************************************************************
MainWidget::~MainWidget()
{
}
//****************************************************************************
void MainWidget::fretboardPressed()
{
    if(showmenu)
    {
        menuwidget->hide();
        showmenu=false;
    }
    else
    {
        menuwidget->show();
        showmenu=true;
    }
}
//****************************************************************************
//****************************************************************************