~ubuntu-branches/ubuntu/quantal/kmix/quantal-proposed

« back to all changes in this revision

Viewing changes to gui/kmixerwidget.h

  • Committer: Package Import Robot
  • Author(s): Felix Geyer
  • Date: 2012-06-14 17:19:54 UTC
  • Revision ID: package-import@ubuntu.com-20120614171954-8rg4l5uswtln8kh1
Tags: upstream-4.8.90+repack
ImportĀ upstreamĀ versionĀ 4.8.90+repack

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * KMix -- KDE's full featured mini mixer
 
3
 *
 
4
 *
 
5
 * Copyright (C) 2000 Stefan Schimanski <1Stein@gmx.de>
 
6
 *
 
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.
 
11
 *
 
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.
 
16
 *
 
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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 
20
 */
 
21
 
 
22
#ifndef KMIXERWIDGET_H
 
23
#define KMIXERWIDGET_H
 
24
 
 
25
#include <vector>
 
26
 
 
27
#include <QWidget>
 
28
class QString;
 
29
 
 
30
 
 
31
#include "core/mixer.h"
 
32
#include "gui/mixdevicewidget.h"
 
33
 
 
34
// QT
 
35
#include <QVBoxLayout>
 
36
 
 
37
// KDE
 
38
class KActionCollection;
 
39
class KConfig;
 
40
//class KTabWidget;
 
41
 
 
42
// KMix
 
43
class GUIProfile;
 
44
class ProfTab;
 
45
class Mixer;
 
46
#include "viewbase.h"
 
47
// KMix experimental
 
48
 
 
49
 
 
50
class KMixerWidget : public QWidget
 
51
{
 
52
   Q_OBJECT
 
53
 
 
54
  public:
 
55
   explicit KMixerWidget( Mixer *mixer,
 
56
                          QWidget *parent=0, ViewBase::ViewFlags vflags=0, GUIProfile* guiprof=0, KActionCollection* coll = 0 );
 
57
   ~KMixerWidget();
 
58
 
 
59
   Mixer *mixer() { return _mixer; }
 
60
   ViewBase* currentView();
 
61
   GUIProfile* getGuiprof() { return _guiprof; };
 
62
 
 
63
   
 
64
  signals:
 
65
   void toggleMenuBar();
 
66
   void rebuildGUI();
 
67
   void redrawMixer( const QString& mixer_ID );
 
68
    
 
69
  public slots:
 
70
   void setTicks( bool on );
 
71
   void setLabels( bool on );
 
72
   void setIcons( bool on );
 
73
   void toggleMenuBarSlot();
 
74
 
 
75
   void saveConfig( KConfig *config );
 
76
   void loadConfig( KConfig *config );
 
77
 
 
78
  private slots:
 
79
    void controlsReconfiguredToplevel(QString mixerId);
 
80
    void refreshVolumeLevelsToplevel();
 
81
 
 
82
  private:
 
83
   Mixer *_mixer;
 
84
   QVBoxLayout *m_topLayout; // contains TabWidget
 
85
   GUIProfile* _guiprof;
 
86
   ProfTab* _tab;
 
87
   std::vector<ViewBase*> _views;
 
88
   KActionCollection* _actionCollection;  // -<- applciations wide action collection
 
89
   QWidget* _mainWindow;
 
90
 
 
91
   
 
92
   void createLayout(ViewBase::ViewFlags vflags);
 
93
   bool possiblyAddView(ViewBase* vbase);
 
94
};
 
95
 
 
96
#endif