~ubuntu-branches/ubuntu/hoary/kdemultimedia/hoary

« back to all changes in this revision

Viewing changes to kmix/kmix.h

  • Committer: Bazaar Package Importer
  • Author(s): Martin Schulze
  • Date: 2003-01-22 15:00:51 UTC
  • Revision ID: james.westby@ubuntu.com-20030122150051-uihwkdoxf15mi1tn
Tags: upstream-2.2.2
ImportĀ upstreamĀ versionĀ 2.2.2

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., 675 Mass Ave, Cambridge, MA 02139, USA.
 
20
 */
 
21
 
 
22
#ifndef KMIX_H
 
23
#define KMIX_H
 
24
 
 
25
 
 
26
#ifdef HAVE_CONFIG_H
 
27
#include <config.h>
 
28
#endif
 
29
 
 
30
// include files for Qt
 
31
#include <qstrlist.h>
 
32
#include <qtabwidget.h>
 
33
 
 
34
// include files for KDE
 
35
#include <kapp.h>
 
36
#include <kmainwindow.h>
 
37
#include <kaccel.h>
 
38
#include <kaction.h>
 
39
#include <kiconloader.h>
 
40
#include <kuniqueapp.h>
 
41
 
 
42
#include "mixer.h"
 
43
 
 
44
class KMixerWidget;
 
45
class KMixerPrefWidget;
 
46
class KMixPrefDlg;
 
47
class KMixDockWidget;
 
48
class KMixWindow;
 
49
 
 
50
class KMixApp : public KUniqueApplication
 
51
{
 
52
 public:
 
53
    KMixApp();
 
54
    ~KMixApp();
 
55
    int newInstance ();
 
56
 
 
57
 private:
 
58
    KMixWindow *m_kmix;
 
59
};
 
60
 
 
61
class KMixWindow : public KMainWindow
 
62
{
 
63
   Q_OBJECT
 
64
 
 
65
  public:
 
66
   KMixWindow();
 
67
   ~KMixWindow();
 
68
 
 
69
  protected:
 
70
   void saveConfig();
 
71
   void loadConfig();
 
72
 
 
73
   void initMixer();
 
74
   void initPrefDlg();
 
75
   void initActions();
 
76
   void initWidgets();
 
77
 
 
78
   void updateDocking();
 
79
 
 
80
   void closeEvent( QCloseEvent * e );
 
81
 
 
82
  public slots:
 
83
   void quit();
 
84
   void showSettings();
 
85
   void showHelp();
 
86
   void showAbout();
 
87
   void toggleMenuBar();
 
88
   void closeMixer();
 
89
   void newMixer();
 
90
   void loadVolumes();
 
91
   void saveVolumes();
 
92
   virtual void applyPrefs( KMixPrefDlg *prefDlg );
 
93
 
 
94
  private:
 
95
   KAccel *m_keyAccel;
 
96
   QPopupMenu *m_fileMenu;
 
97
   QPopupMenu *m_viewMenu;
 
98
   QPopupMenu *m_helpMenu;
 
99
 
 
100
   bool m_showDockWidget;
 
101
   bool m_volumeWidget;
 
102
   bool m_hideOnClose;
 
103
   bool m_showTicks;
 
104
   bool m_showLabels;
 
105
   bool m_startVisible;
 
106
   bool m_showMenubar;
 
107
   int m_maxId;
 
108
 
 
109
   QList<Mixer> m_mixers;
 
110
   QList<KMixerWidget> m_mixerWidgets;
 
111
   int m_visibleTabs;
 
112
 
 
113
   QTabWidget *m_tab;
 
114
   QWidget *m_buttons;
 
115
   KMixPrefDlg *m_prefDlg;
 
116
   KMixDockWidget *m_dockWidget;
 
117
 
 
118
  private slots:
 
119
   void insertMixerWidget( KMixerWidget *mw );
 
120
   void removeMixerWidget( KMixerWidget *mw );
 
121
   void updateLayout();
 
122
 
 
123
   void toggleVisibility();
 
124
};
 
125
 
 
126
#endif // KMIX_H