~ubuntu-branches/ubuntu/natty/kdemultimedia/natty-proposed

« back to all changes in this revision

Viewing changes to kmix/mixdevicewidget.h

  • Committer: Bazaar Package Importer
  • Author(s): Debian Qt/KDE Maintainers
  • Date: 2011-05-26 02:41:36 UTC
  • mfrom: (0.2.3 upstream)
  • mto: This revision was merged to the branch mainline in revision 108.
  • Revision ID: james.westby@ubuntu.com-20110526024136-jjwsigfy402jhupm
Tags: upstream-4.6.3
ImportĀ upstreamĀ versionĀ 4.6.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
//-*-C++-*-
2
 
/*
3
 
 * KMix -- KDE's full featured mini mixer
4
 
 *
5
 
 *
6
 
 * Copyright (C) 2000 Stefan Schimanski <1Stein@gmx.de>
7
 
 *               1996-2000 Christian Esken <esken@kde.org>
8
 
 *                         Sven Fischer <herpes@kawo2.rwth-aachen.de>
9
 
 *
10
 
 * This program is free software; you can redistribute it and/or
11
 
 * modify it under the terms of the GNU Library General Public
12
 
 * License as published by the Free Software Foundation; either
13
 
 * version 2 of the License, or (at your option) any later version.
14
 
 *
15
 
 * This program is distributed in the hope that it will be useful,
16
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18
 
 * Library General Public License for more details.
19
 
 *
20
 
 * You should have received a copy of the GNU Library General Public
21
 
 * License along with this program; if not, write to the Free
22
 
 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
23
 
 */
24
 
 
25
 
#ifndef MIXDEVICEWIDGET_H
26
 
#define MIXDEVICEWIDGET_H
27
 
 
28
 
#include <QWidget>
29
 
#include "volume.h"
30
 
#include <qpixmap.h>
31
 
 
32
 
 
33
 
class KLed;
34
 
class KAction;
35
 
class KActionCollection;
36
 
class KShortcutsDialog;
37
 
 
38
 
class MixDevice;
39
 
class Mixer;
40
 
class ViewBase;
41
 
 
42
 
class MixDeviceWidget
43
 
 : public QWidget
44
 
{
45
 
      Q_OBJECT
46
 
 
47
 
public:
48
 
    MixDeviceWidget( MixDevice* md,
49
 
                     bool small, Qt::Orientation orientation,
50
 
                     QWidget* parent = 0, ViewBase* mw = 0 );
51
 
    ~MixDeviceWidget();
52
 
 
53
 
    void addActionToPopup( KAction *action );
54
 
 
55
 
    virtual bool isDisabled() const;
56
 
    MixDevice* mixDevice() { return m_mixdevice; }
57
 
 
58
 
    virtual void setColors( QColor high, QColor low, QColor back );
59
 
    virtual void setIcons( bool value );
60
 
    virtual void setMutedColors( QColor high, QColor low, QColor back );
61
 
 
62
 
    virtual bool isStereoLinked() const { return false; }
63
 
    virtual void setStereoLinked( bool ) {}
64
 
    virtual void setLabeled( bool );
65
 
    virtual void setTicks( bool ) {}
66
 
    const QString& iconName() const;
67
 
 
68
 
 
69
 
public slots:
70
 
    virtual void setDisabled( bool value );
71
 
    virtual void defineKeys();
72
 
    virtual void update();
73
 
    virtual void showContextMenu();
74
 
 
75
 
protected slots:
76
 
    void volumeChange( int );
77
 
    virtual void setVolume( int channel, int volume );
78
 
    virtual void setVolume( Volume volume );
79
 
 
80
 
protected:
81
 
      MixDevice*           m_mixdevice;
82
 
      KActionCollection*   _mdwActions;
83
 
      KActionCollection*   _mdwPopupActions;
84
 
      ViewBase*            m_view;
85
 
      bool                 m_disabled;
86
 
      Qt::Orientation      _orientation;
87
 
      bool                 m_small;
88
 
      KShortcutsDialog*    m_shortcutsDialog;
89
 
      QString _iconName;
90
 
 
91
 
private:
92
 
      void mousePressEvent( QMouseEvent *e );
93
 
};
94
 
 
95
 
#endif