summaryrefslogtreecommitdiffstats
path: root/arts/tools/artsactions.h
blob: f542fb9ba991ac16d922834bfbda78906e1e1675 (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
/*

    Copyright (C) 2003 Arnold Krille <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.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.

    */

#ifndef ARTS_ACTIONS_H
#define ARTS_ACTIONS_H

#include <tqwidget.h>
#include <tdelibs_export.h>
class KArtsServer;
class TDEAction;
class TDEActionCollection;
class TDEPopupMenu;
class FFTScopeView;
class Gui_AUDIO_MANAGER;
class ArtsStatusView;
class MidiManagerView;
class EnvironmentView;
class MediaTypesView;

class TDE_EXPORT ArtsActions : public TQObject
{
	TQ_OBJECT
  
public:
	/**
		Constructs a ArtsActions-object.

		Use the TDEActions you get from it to obtain a unique Style for all menus.

		It also provides an easy way to have FFT-ScopeView, Audiomanager and other things available.

		@param artsserver a pointer to a existing KArtsServer. If 0 a new is created.
		@param actioncollection the TDEActionCollection all the actions should belong to. Names of the actions are then: artssupport_*
		@param qwidget the parent TQWidget
		@param name the name of the object
	*/
	ArtsActions( KArtsServer* artsserver, TDEActionCollection* actioncollection, TQWidget* qwidget, const char* name=0 );
	/** Destructor */
	~ArtsActions();

	/** Returns an Action for showing the ScopeView. Unless otherwise connected it also toggles a ScopeView.  */
	TDEAction* actionScopeView();
	/** Returns an Action for showing the Audiomanager. Unless otherwise connected it also toggles a Audiomanager.  */
	TDEAction* actionAudioManager();
	/** Returns an Action for showing the StatusView. Unless otherwise connected it also toggles a StatusView.  */
	TDEAction* actionArtsStatusView();
	/** Returns an Action for showing the MidiManager. Unless otherwise connected it also toggles a MidiManager.  */
	TDEAction* actionMidiManagerView();
	/** Returns an Action for showing the EnvironmentView. Unless otherwise connected it also toggles a EnvironmentView.  */
	TDEAction* actionEnvironmentView();
	/** Returns an Action for showing the MediaTypesView. Unless otherwise connected it also toggles a MediaTypesView.  */
	TDEAction* actionMediaTypesView();

	TDEAction* actionStyleNormal();
	TDEAction* actionStyleFire();
	TDEAction* actionStyleLine();
	TDEAction* actionStyleLED();
	TDEAction* actionStyleAnalog();
	TDEAction* actionStyleSmall();
	TDEPopupMenu* stylemenu();

	static TDEAction* actionMoreBars( const TQObject*, const char*, TDEActionCollection* );
	static TDEAction* actionLessBars( const TQObject*, const char*, TDEActionCollection* );

public slots:
	void viewScopeView();
	void viewAudioManager();
	void viewArtsStatusView();
	void viewMidiManagerView();
	void viewEnvironmentView();
	void viewMediaTypesView();
private slots:
	void _p_style_normal() { emit styleNormal(); }
	void _p_style_fire() { emit styleFire(); }
	void _p_style_line() { emit styleLine(); }
	void _p_style_led() { emit styleLED(); }
	void _p_style_analog() { emit styleAnalog(); }
	void _p_style_small() { emit styleSmall(); }
signals:
	void styleNormal();
	void styleFire();
	void styleLine();
	void styleLED();
	void styleAnalog();
	void styleSmall();
private:
	KArtsServer* _kartsserver;
	TDEActionCollection* _actioncollection;
	TDEAction *_a_sv, *_a_am, *_a_asv, *_a_mmv, *_a_ev, *_a_mtv;
	//TDEAction *_a_morebars, *_a_lessbars;
	TDEAction *_a_style_normal, *_a_style_fire, *_a_style_line, *_a_style_led, *_a_style_analog, *_a_style_small;
	TDEPopupMenu* _stylemenu;
	FFTScopeView *_sv;
	Gui_AUDIO_MANAGER *_am;
	ArtsStatusView *_asv;
	MidiManagerView *_mmv;
	EnvironmentView *_ev;
	MediaTypesView *_mtv;
};

#endif