Final polisihing for KDE4:
[kdemultimedia.git] / kmix / kmix.h
blobe68ec43ff80318a2a4f185e332b9c88518415f2b
1 /*
2 * KMix -- KDE's full featured mini mixer
4 * Copyright (C) 2000 Stefan Schimanski <1Stein@gmx.de>
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Library General Public License for more details.
16 * You should have received a copy of the GNU Library General Public
17 * License along with this program; if not, write to the Free
18 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21 #ifndef KMIX_H
22 #define KMIX_H
25 #include <config.h>
27 // Qt
28 #include <QString>
29 class QLabel;
30 #include <qlist.h>
31 #include <QVBoxLayout>
32 class KTabWidget;
34 // KDE
35 class KAccel;
36 class KAction;
37 #include <kxmlguiwindow.h>
39 // KMix
40 class KMixPrefDlg;
41 class KMixDockWidget;
42 class KMixWindow;
43 class Mixer;
44 class ViewDockAreaPopup;
45 #include "mixer.h"
48 class
49 KMixWindow : public KXmlGuiWindow
51 Q_OBJECT
53 public:
54 KMixWindow();
55 ~KMixWindow();
57 bool updateDocking();
59 private:
60 void saveBaseConfig();
61 void saveViewConfig();
62 void loadConfig();
63 void loadBaseConfig();
65 void initPrefDlg();
66 void initActions();
67 void recreateGUI();
68 void initWidgets();
69 //void setErrorMixerWidget();
71 void clearMixerWidgets();
73 virtual bool queryClose();
75 public slots:
76 void quit();
77 void showSettings();
78 void showHelp();
79 void showAbout();
80 void toggleMenuBar();
81 //void loadVolumes();
82 void saveVolumes();
83 virtual void applyPrefs( KMixPrefDlg *prefDlg );
85 //void stopVisibilityUpdates();
86 //void showEvent( QShowEvent * );
87 //void hideEvent( QHideEvent * );
89 void newMixerShown(int tabIndex);
91 private:
92 KAccel *m_keyAccel;
93 KAction* _actionShowMenubar;
95 bool m_showDockWidget;
96 bool m_volumeWidget;
97 bool m_showTicks;
98 bool m_showLabels;
99 bool m_onLogin;
100 bool m_startVisible;
101 bool m_showMenubar;
102 // bool m_isVisible;
103 bool m_visibilityUpdateAllowed;
104 bool m_multiDriverMode; // Not officially supported.
105 Qt::Orientation m_toplevelOrientation;
107 KTabWidget *m_wsMixers;
108 KMixPrefDlg *m_prefDlg;
109 KMixDockWidget *m_dockWidget;
110 QString m_hwInfoString;
111 QVBoxLayout *m_widgetsLayout;
112 QLabel *m_errorLabel;
113 ViewDockAreaPopup *_dockAreaPopup;
115 private slots:
116 void saveConfig();
117 void slotHWInfo();
118 void slotConfigureCurrentView();
119 void addMixerWidget(const QString&);
120 void plugged( const char* driverName, const QString& udi, QString& dev);
121 void unplugged( const QString& udi);
122 void hideOrClose();
125 #endif // KMIX_H