1 /**
2  * File name: control_area.h
3  * Project: Geonkick (A kick synthesizer)
4  *
5  * Copyright (C) 2017 Iurie Nistor (http://iuriepage.wordpress.com)
6  *
7  * This file is part of Geonkick.
8  *
9  * GeonKick is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 3 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22  */
23 
24 #ifndef GKICK_CONTROL_AREA_H
25 #define GKICK_CONTROL_AREA_H
26 
27 #include "envelope.h"
28 #include "geonkick_widget.h"
29 #include "ViewState.h"
30 
31 class Oscillator;
32 class ControlsWidget;
33 class KitModel;
34 #ifndef GEONKICK_SINGLE
35 class KitWidget;
36 #endif // GEONKICK_SINGLE
37 class EnvelopeWidget;
38 class PresetBrowserView;
39 class PresetBrowserModel;
40 
41 class ControlArea: public GeonkickWidget
42 {
43  public:
44         ControlArea(GeonkickWidget *parent,
45                     KitModel* model,
46                     const std::vector<std::unique_ptr<Oscillator>> &oscillators);
47         ~ControlArea() = default;
48         RK_DECL_ACT(updateGui, updateGui(), RK_ARG_TYPE(), RK_ARG_VAL());
49         void showControls();
50 #ifndef GEONKICK_SINGLE
51         void showKit();
52 #endif // GEONKICK_SINGLE
53         void showPresets();
54         KitModel* getKitModel() const;
55  private:
56         void showWidget(ViewState::View view);
57 
58  private:
59         KitModel *kitModel;
60         const std::vector<std::unique_ptr<Oscillator>> &oscillators;
61         PresetBrowserModel *presetsModel;
62         RkWidget* currentWidget;
63 };
64 
65 #endif // GKICK_CONTROL_AREA_H
66