summaryrefslogtreecommitdiffstats
path: root/arts/tools/artscontrolapplet_private.h
blob: bddc072866b4cf558907000ee5349592555e7f7e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
/***************************************************************************
                          artscontrolapplet_private.h  -  description
                             -------------------
    begin                : Don Jan 30 2003
    copyright            : (C) 2003 by Arnold Krille
    email                : arnold@arnoldarts.de
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/

#ifndef ARTSCONTROLAPPLET_PRIVATE_H
#define ARTSCONTROLAPPLET_PRIVATE_H

#include "artscontrolapplet.h"

#include <tqobject.h>

#include <tqlayout.h>
#include <tqlabel.h>
#include <tqslider.h>
#include <tqpushbutton.h>
#include <kpopupmenu.h>
#include <kaction.h>
#include <tqfont.h>

#include <kartsserver.h>
#include <kartsdispatcher.h>
#include <kartsfloatwatch.h>
#include <kartswidget.h>
#include <artsflow.h>
#include <connect.h>
#include <artsmoduleseffects.h>
#include <kdelibs_export.h>

#include "artsactions.h"

#include "fftscopeview.h"

class VolumeSlider;

class KDE_EXPORT ArtsControlAppletPrivate : public TQObject {
   Q_OBJECT
  TQ_OBJECT
private:
	ArtsControlApplet *_parent;
	ArtsActions* _artsactions;
public:
	TQBoxLayout *tqlayout;
	KArtsServer *arts;
	KArtsDispatcher *dispatcher;
	Arts::StereoVolumeControl volume;
	bool barts, bInUpdate;
	FFTScopeView *svinline;

	KArtsWidget *vuw;
	Arts::StereoVolumeControlGui vu;

	KPopupMenu *menu;
	KAction *_showSV, *_showSVinline, *_showAM, *_showArtstqStatus, *_showMidiManager, *_showEnvironment, *_showMediaTypes, *_moreBars, *_lessBars;
	KAction *_styleNormalBars, *_styleFireBars, *_styleLineBars, *_styleLEDs, *_styleAnalog, *_styleSmall;

	ArtsControlAppletPrivate( ArtsControlApplet *parent )
	    : TQObject(parent)
	    , _parent( parent )
	    , barts( false )
	    , bInUpdate( false )
	{
		arts = new KArtsServer( 0 );
		dispatcher = new KArtsDispatcher( 0 );
		if( ! arts->server().isNull() ) barts = true;
		if( barts ) volume = arts->server().outVolume();
		svinline=0;

		_artsactions = new ArtsActions( arts, 0, parent );

		menu = new KPopupMenu( 0 );
		_showSV = _artsactions->actionScopeView();
		_showSV->plug( menu );
		_showSVinline = new KAction( i18n( "Toggle &Inline FFT Scope" ), "artscontrol", KShortcut(), this, TQT_SLOT( SVinline() ), this );
		_showSVinline->plug( menu );
		_showAM = _artsactions->actionAudioManager();
		_showAM->plug( menu );
		_showArtstqStatus = _artsactions->actionArtsStatusView();
		_showArtstqStatus->plug( menu );
		_showMidiManager = _artsactions->actionMidiManagerView();
		_showMidiManager->plug( menu );
		_showEnvironment = _artsactions->actionEnvironmentView();
		_showEnvironment->plug( menu );
		_showMediaTypes = _artsactions->actionMediaTypesView();
		_showMediaTypes->plug( menu );
		menu->insertSeparator();
		menu->insertItem( i18n( "VU-Style" ), _artsactions->stylemenu() );
		connect( _artsactions, TQT_SIGNAL( styleNormal() ), this, TQT_SLOT( styleNormalBars() ) );
		connect( _artsactions, TQT_SIGNAL( styleFire() ), this, TQT_SLOT( styleFireBars() ) );
		connect( _artsactions, TQT_SIGNAL( styleLine() ), this, TQT_SLOT( styleLineBars() ) );
		connect( _artsactions, TQT_SIGNAL( styleLED() ), this, TQT_SLOT( styleLEDs() ) );
		connect( _artsactions, TQT_SIGNAL( styleAnalog() ), this, TQT_SLOT( styleAnalog() ) );
		connect( _artsactions, TQT_SIGNAL( styleSmall() ), this, TQT_SLOT( styleSmall() ) );
	}
	~ArtsControlAppletPrivate() {
		if ( svinline ) SVinline();
	}
public slots:
	void SVinline(); // ScopeView inline
	void moreBars();
	void lessBars();
	void styleNormalBars();
	void styleFireBars();
	void styleLineBars();
	void styleLEDs();
	void styleAnalog();
	void styleSmall();
};

// vim: sw=4 ts=4
#endif