summaryrefslogtreecommitdiff
path: root/noncore/applets/volumeapplet2/volumeapplet.h
Unidiff
Diffstat (limited to 'noncore/applets/volumeapplet2/volumeapplet.h') (more/less context) (show whitespace changes)
-rw-r--r--noncore/applets/volumeapplet2/volumeapplet.h103
1 files changed, 103 insertions, 0 deletions
diff --git a/noncore/applets/volumeapplet2/volumeapplet.h b/noncore/applets/volumeapplet2/volumeapplet.h
new file mode 100644
index 0000000..c1f1a3a
--- a/dev/null
+++ b/noncore/applets/volumeapplet2/volumeapplet.h
@@ -0,0 +1,103 @@
1/*
2                 This file is part of the Opie Project
3
4 =. (C) 2005 Michael 'Mickey' Lauer <mickey@Vanille.de>
5 .=l.
6           .>+-=
7 _;:,     .>    :=|. This program is free software; you can
8.> <`_,   >  .   <= redistribute it and/or modify it under
9:`=1 )Y*s>-.--   : the terms of the GNU Library General Public
10.="- .-=="i,     .._ License as published by the Free Software
11 - .   .-<_>     .<> Foundation; either version 2 of the License,
12     ._= =}       : or (at your option) any later version.
13    .%`+i>       _;_.
14    .i_,=:_.      -<s. This program is distributed in the hope that
15     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
16    : ..    .:,     . . . without even the implied warranty of
17    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
18  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
19..}^=.=       =       ; Library General Public License for more
20++=   -.     .`     .: details.
21 :     =  ...= . :.=-
22 -.   .:....=;==+<; You should have received a copy of the GNU
23  -_. . .   )=.  = Library General Public License along with
24    --        :-=` this library; see the file COPYING.LIB.
25 If not, write to the Free Software Foundation,
26 Inc., 59 Temple Place - Suite 330,
27 Boston, MA 02111-1307, USA.
28
29*/
30
31#ifndef VOLUMEAPPLET_H
32#define VOLUMEAPPLET_H
33
34#include <opie2/otaskbarapplet.h>
35#include <qframe.h>
36#include <qstring.h>
37#include <qvbox.h>
38#include <qpixmap.h>
39
40namespace Opie
41{
42 namespace Ui { class OLedBox; }
43 namespace MM { class OMixerInterface; }
44}
45class QLabel;
46class QSlider;
47class QShowEvent;
48class QHideEvent;
49class QGridLayout;
50
51class Channel : public QVBox
52{
53 public:
54 Channel( Opie::MM::OMixerInterface* mixer, QWidget* parent, const char* name );
55 virtual ~Channel();
56
57 // public slots:
58 // virtual void clicked();
59
60 private:
61 QLabel* _name;
62 QSlider* _volume;
63 Opie::Ui::OLedBox* _mute;
64 Opie::MM::OMixerInterface* _mixer;
65};
66
67class VolumeAppletControl : public QFrame
68{
69 public:
70 VolumeAppletControl( Opie::Ui::OTaskbarApplet* parent, const char* name = 0 );
71 ~VolumeAppletControl();
72
73 virtual QSize sizeHint() const;
74
75 protected:
76 virtual void showEvent( QShowEvent* );
77 virtual void hideEvent( QHideEvent* );
78 void build();
79
80 private:
81 QGridLayout* l;
82
83};
84
85
86class VolumeApplet : public Opie::Ui::OTaskbarApplet
87{
88 public:
89 VolumeApplet( QWidget* parent = 0, const char* name = 0 );
90 ~VolumeApplet();
91
92 static int position();
93 protected:
94 virtual void paintEvent( QPaintEvent* );
95 virtual void mousePressEvent( QMouseEvent* );
96
97 private:
98 VolumeAppletControl* _control;
99 QPixmap _pixmap;
100};
101
102#endif
103