~ubuntu-branches/ubuntu/utopic/lmms/utopic-proposed

« back to all changes in this revision

Viewing changes to include/FxMixerView.h

  • Committer: Package Import Robot
  • Author(s): Israel Dahl
  • Date: 2014-04-30 18:49:37 UTC
  • mfrom: (1.1.15)
  • Revision ID: package-import@ubuntu.com-20140430184937-hozuuxonlbshciya
Tags: 1.0.1-src-0ubuntu1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
#define _FX_MIXER_VIEW_H
27
27
 
28
28
#include <QtGui/QWidget>
29
 
#include <QtGui/QHBoxLayout>
30
 
#include <QtGui/QScrollArea>
31
29
 
32
 
#include "FxLine.h"
33
30
#include "FxMixer.h"
34
31
#include "ModelView.h"
35
 
#include "engine.h"
36
 
#include "fader.h"
37
 
#include "pixmap_button.h"
38
 
#include "tooltip.h"
39
 
#include "embed.h"
40
 
#include "EffectRackView.h"
41
32
 
 
33
class QStackedLayout;
42
34
class QButtonGroup;
 
35
class fader;
43
36
class FxLine;
44
 
 
45
 
class EXPORT FxMixerView : public QWidget, public ModelView,
 
37
class EffectRackView;
 
38
class pixmapButton;
 
39
 
 
40
 
 
41
class FxMixerView : public QWidget, public ModelView,
46
42
                                        public SerializingObjectHook
47
43
{
48
44
        Q_OBJECT
49
45
public:
50
 
        struct FxChannelView
51
 
        {
52
 
                FxChannelView(QWidget * _parent, FxMixerView * _mv, int _chIndex );
53
 
 
54
 
                FxLine * m_fxLine;
55
 
                pixmapButton * m_muteBtn;
56
 
                fader * m_fader;
57
 
        };
58
 
 
59
 
 
60
46
        FxMixerView();
61
47
        virtual ~FxMixerView();
62
48
 
63
 
        virtual void keyPressEvent(QKeyEvent * e);
64
 
 
65
49
        virtual void saveSettings( QDomDocument & _doc, QDomElement & _this );
66
50
        virtual void loadSettings( const QDomElement & _this );
67
51
 
68
 
        inline FxLine * currentFxLine()
 
52
        FxLine * currentFxLine()
69
53
        {
70
54
                return m_currentFxLine;
71
55
        }
72
 
 
73
 
        inline FxChannelView * channelView(int index)
74
 
        {
75
 
                return m_fxChannelViews[index];
76
 
        }
77
 
 
78
56
        void setCurrentFxLine( FxLine * _line );
79
57
        void setCurrentFxLine( int _line );
80
58
 
81
59
        void clear();
82
60
 
83
61
 
84
 
        // display the send button and knob correctly
85
 
        void updateFxLine(int index);
86
 
 
87
 
        // notify the view that an fx channel was deleted
88
 
        void deleteChannel(int index);
89
 
 
90
 
        // move the channel to the left or right
91
 
        void moveChannelLeft(int index);
92
 
        void moveChannelRight(int index);
93
 
 
94
 
        // make sure the display syncs up with the fx mixer.
95
 
        // useful for loading projects
96
 
        void refreshDisplay();
97
 
 
98
62
private slots:
99
63
        void updateFaders();
100
 
        void addNewChannel();
 
64
 
101
65
 
102
66
private:
103
 
 
104
 
        QVector<FxChannelView *> m_fxChannelViews;
105
 
 
 
67
        struct FxChannelView
 
68
        {
 
69
                FxLine * m_fxLine;
 
70
                EffectRackView * m_rackView;
 
71
                pixmapButton * m_muteBtn;
 
72
                fader * m_fader;
 
73
        } ;
 
74
 
 
75
        FxChannelView m_fxChannelViews[NumFxChannels+1];
 
76
 
 
77
        QStackedLayout * m_fxRacksLayout;
 
78
        QStackedLayout * m_fxLineBanks;
 
79
        QButtonGroup * m_bankButtons;
106
80
        FxLine * m_currentFxLine;
107
81
 
108
 
        QScrollArea * channelArea;
109
 
        QHBoxLayout * chLayout;
110
 
        QWidget * m_channelAreaWidget;
111
 
        EffectRackView * m_rackView;
112
 
 
113
 
        void updateMaxChannelSelector();
114
82
} ;
115
83
 
116
84
#endif