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

« back to all changes in this revision

Viewing changes to kmix/gui/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 "core/volume.h"
 
30
#include <qpixmap.h>
 
31
 
 
32
 
 
33
class KAction;
 
34
class KActionCollection;
 
35
class KShortcutsDialog;
 
36
 
 
37
class MixDevice;
 
38
class ProfControl;
 
39
class ViewBase;
 
40
 
 
41
class MixDeviceWidget
 
42
 : public QWidget
 
43
{
 
44
      Q_OBJECT
 
45
 
 
46
public:
 
47
    MixDeviceWidget( MixDevice* md,
 
48
                     bool small, Qt::Orientation orientation,
 
49
                     QWidget* parent, ViewBase*, ProfControl * );
 
50
    ~MixDeviceWidget();
 
51
 
 
52
    void addActionToPopup( KAction *action );
 
53
 
 
54
    virtual bool isDisabled() const;
 
55
    MixDevice* mixDevice() { return m_mixdevice; }
 
56
 
 
57
    virtual void setColors( QColor high, QColor low, QColor back );
 
58
    virtual void setIcons( bool value );
 
59
    virtual void setMutedColors( QColor high, QColor low, QColor back );
 
60
 
 
61
    virtual bool isStereoLinked() const { return false; }
 
62
    virtual void setStereoLinked( bool ) {}
 
63
    virtual void setLabeled( bool );
 
64
    virtual void setTicks( bool ) {}
 
65
 
 
66
 
 
67
public slots:
 
68
    virtual void setDisabled( bool value );
 
69
    virtual void defineKeys();
 
70
    virtual void update();
 
71
    virtual void showContextMenu();
 
72
 
 
73
protected slots:
 
74
    void volumeChange( int );
 
75
    virtual void setVolume( int channel, int volume );
 
76
    virtual void setVolume( Volume volume );
 
77
 
 
78
protected:
 
79
 
 
80
      MixDevice*           m_mixdevice;
 
81
      KActionCollection*   _mdwActions;
 
82
      KActionCollection*   _mdwPopupActions;
 
83
      ViewBase*            m_view;
 
84
      ProfControl*         _pctl;
 
85
      bool                 m_disabled;
 
86
      Qt::Orientation      _orientation;
 
87
      bool                 m_small;
 
88
      KShortcutsDialog*    m_shortcutsDialog;
 
89
 
 
90
private:
 
91
      void mousePressEvent( QMouseEvent *e );
 
92
};
 
93
 
 
94
#endif