1 //-*-C++-*-
2 /*
3  * KMix -- KDE's full featured mini mixer
4  *
5  * Copyright Christian Esken <esken@kde.org>
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Library General Public
9  * License as published by the Free Software Foundation; either
10  * version 2 of the License, or (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15  * Library General Public License for more details.
16  *
17  * You should have received a copy of the GNU Library General Public
18  * License along with this program; if not, write to the Free
19  * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
20  */
21 #ifndef ViewSliders_h
22 #define ViewSliders_h
23 
24 #include "viewbase.h"
25 
26 class QBoxLayout;
27 class QGridLayout;
28 class QPushButton;
29 class KMessageWidget;
30 
31 class Mixer;
32 
33 #include "gui/viewbase.h"
34 #include "core/ControlManager.h"
35 
36 
37 class ViewSliders : public ViewBase
38 {
39     Q_OBJECT
40 
41 public:
42     ViewSliders(QWidget *parent, const QString &id, Mixer *mixer, ViewBase::ViewFlags vflags, const QString &guiProfileId, KActionCollection *actColl);
43     virtual ~ViewSliders();
44 
45     QWidget *add(const shared_ptr<MixDevice> md) override;
46     void constructionFinished() override;
47     void configurationUpdate() override;
48 
49 public slots:
50     void controlsChange(ControlManager::ChangeType changeType);
51 
52 protected:
53     void initLayout() override;
54     Qt::Orientation orientationSetting() const override;
55 
56 private:
57     void refreshVolumeLevels() override;
58 
59     QGridLayout *m_layoutMDW;
60     QBoxLayout *m_layoutSliders;
61     QBoxLayout *m_layoutSwitches;
62     QPushButton *m_configureViewButton;
63     KMessageWidget *m_emptyStreamHint;
64 };
65 
66 #endif
67