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

« back to all changes in this revision

Viewing changes to kmix/gui/mdwenum.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) 2004 Chrisitan Esken <esken@kde.org>
 
7
 *
 
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.
 
12
 *
 
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.
 
17
 *
 
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.
 
21
 */
 
22
 
 
23
#ifndef MDWENUM_H
 
24
#define MDWENUM_H
 
25
 
 
26
#include <QWidget>
 
27
#include "core/volume.h"
 
28
 
 
29
// KMix
 
30
class MixDevice;
 
31
class ViewBase;
 
32
 
 
33
// KDE
 
34
class KAction;
 
35
class KComboBox;
 
36
 
 
37
// Qt
 
38
class QBoxLayout;
 
39
class QLabel;
 
40
 
 
41
#include "gui/mixdevicewidget.h"
 
42
 
 
43
class MDWEnum : public MixDeviceWidget
 
44
{
 
45
    Q_OBJECT
 
46
 
 
47
public:
 
48
    MDWEnum( MixDevice* md,
 
49
               Qt::Orientation orientation,
 
50
               QWidget* parent, ViewBase* view, ProfControl* pctl);
 
51
    ~MDWEnum();
 
52
 
 
53
    void addActionToPopup( KAction *action );
 
54
    QSizePolicy sizePolicy() const;
 
55
    bool eventFilter( QObject* obj, QEvent* e );
 
56
 
 
57
public slots:
 
58
    // GUI hide and show
 
59
    void setDisabled();
 
60
    void setDisabled(bool);
 
61
 
 
62
    // Enum handling: next and selecting
 
63
    void nextEnumId();
 
64
    int  enumId();
 
65
    void setEnumId(int value);
 
66
 
 
67
    void update();
 
68
    virtual void showContextMenu();
 
69
 
 
70
private:
 
71
    void createWidgets();
 
72
 
 
73
    QLabel        *_label;
 
74
    KComboBox     *_enumCombo;
 
75
    QBoxLayout    *_layout;
 
76
};
 
77
 
 
78
#endif