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., 675 Mass Ave, Cambridge, MA 02139, USA.
27
#include <kpanelapplet.h>
29
#include <kcolordialog.h>
31
#include "colorwidget.h"
32
#include "kmixerwidget.h"
38
class ColorDialog : public ColorWidget {
41
ColorDialog( QWidget * parent=0, const char * name=0, bool modal=FALSE, WFlags f=0 )
42
: ColorWidget( parent, name, modal, f ) {
43
connect( buttonApply, SIGNAL(clicked()), SLOT(apply()) );
46
virtual ~ColorDialog() {};
49
virtual void apply() { emit applied(); }
50
virtual void accept() { ColorWidget::accept(); emit applied(); }
51
virtual void reject() { ColorWidget::reject(); emit rejected(); }
59
class KMixApplet : public KPanelApplet
64
KMixApplet( const QString& configFile, Type t = Normal,
65
QWidget *parent = 0, const char *name = 0 );
66
virtual ~KMixApplet();
68
int widthForHeight(int height) const;
69
int heightForWidth(int width) const;
76
void triggerUpdateLayout();
77
void updateLayoutNow();
82
void resizeEvent( QResizeEvent * );
86
KMixerWidget *m_mixerWidget;
87
QPushButton *m_errorLabel;
88
QTimer *m_layoutTimer;
91
bool insideOut; // reverses direction of sliders and icon position
92
void popupDirectionChange(Direction);
94
static int s_instCount;
95
static QList<Mixer> *s_mixers;
96
static QTimer *s_timer;
98
KMixerWidget::Colors m_colors;