Final polisihing for KDE4:
[kdemultimedia.git] / kmix / kmixerwidget.h
blob548946136b80075cb7ca0d63c621510ae234ef57
1 /*
2 * KMix -- KDE's full featured mini mixer
5 * Copyright (C) 2000 Stefan Schimanski <1Stein@gmx.de>
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.
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.
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.
22 #ifndef KMIXERWIDGET_H
23 #define KMIXERWIDGET_H
25 #include <vector>
27 #include <QWidget>
28 class QString;
31 #include "mixer.h"
32 #include "mixdevicewidget.h"
34 // QT
35 class QSlider;
38 // KDE
39 class KActionCollection;
40 class KConfig;
41 //class KTabWidget;
43 // KMix
44 class GUIProfile;
45 class Mixer;
46 #include "viewbase.h"
47 // KMix experimental
50 class KMixerWidget : public QWidget
52 Q_OBJECT
54 public:
55 explicit KMixerWidget( Mixer *mixer,
56 QWidget *parent=0, const char *name=0, ViewBase::ViewFlags vflags=0, KActionCollection* coll = 0 );
57 ~KMixerWidget();
59 Mixer *mixer() const { return _mixer; }
60 ViewBase* currentView();
62 signals:
63 void toggleMenuBar();
65 public slots:
66 void setTicks( bool on );
67 void setLabels( bool on );
68 void setIcons( bool on );
69 void toggleMenuBarSlot();
71 void saveConfig( KConfig *config );
72 void loadConfig( KConfig *config );
74 private slots:
75 void balanceChanged(int balance);
77 private:
78 Mixer *_mixer;
79 QString m_id;
80 QSlider *m_balanceSlider;
81 QVBoxLayout *m_topLayout; // contains TabWidget and balance slider
83 std::vector<ViewBase*> _views;
84 KActionCollection* _actionCollection; // -<- applciations wide action collection
86 void createLayout(ViewBase::ViewFlags vflags);
87 void possiblyAddView(ViewBase* vbase);
88 void createViewsByProfile(Mixer* mixer, GUIProfile* guiprof, ViewBase::ViewFlags vflags);
91 #endif