Final polisihing for KDE4:
[kdemultimedia.git] / kmix / kmixdockwidget.h
blob9d347649678991fbbd2a889c80b888c44b18fe86
1 /*
2 * KMix -- KDE's full featured mini mixer
5 * Copyright (C) 2000 Stefan Schimanski <1Stein@gmx.de>
6 * Copyright (C) 2003 Sven Leiber <s.leiber@web.de>
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either
11 * version 2 of the License, or (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Library General Public License for more details.
18 * You should have received a copy of the GNU Library General Public
19 * License along with this program; if not, write to the Free
20 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
23 #ifndef KMIXDOCKWIDGET_H
24 #define KMIXDOCKWIDGET_H
26 class QString;
27 #include <QWidget>
29 #include <ksystemtrayicon.h>
31 class KMixWindow;
32 class Mixer;
33 //class ViewDockAreaPopup;
34 class Volume;
36 namespace Phonon
38 class MediaObject;
41 class KMixDockWidget : public KSystemTrayIcon {
42 Q_OBJECT
44 friend class KMixWindow;
46 public:
47 explicit KMixDockWidget(KMixWindow *parent, QWidget *referenceWidget, bool volumePopup);
48 ~KMixDockWidget();
50 void setErrorPixmap();
51 void ignoreNextEvent();
52 //ViewDockAreaPopup* getDockAreaPopup();
54 Mixer *m_mixer;
55 Phonon::MediaObject *_audioPlayer;
57 public slots:
58 void setVolumeTip();
59 void updatePixmap();
61 protected:
62 void createMasterVolWidget();
63 void createActions();
64 void moveVolumePopoup();
65 void trayWheelEvent(QWheelEvent *);
66 // void trayToolTipEvent(QHelpEvent *e );
67 void contextMenuAboutToShow( KMenu* menu );
68 void toggleMinimizeRestore();
69 bool event( QEvent *);
71 private:
72 bool _playBeepOnVolumeChange;
73 bool _ignoreNextEvent;
74 int _oldToolTipValue;
75 char _oldPixmapType;
76 bool _volumePopup;
77 KMixWindow* _kmixMainWindow;
78 private slots:
79 void dockMute();
80 void kmixSystrayAction(QSystemTrayIcon::ActivationReason);
81 void selectMaster();
82 void handleNewMaster(QString& soundcard_id, QString& channel_id);
85 #endif