/*

    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
