root/branches/new_fx_rack_and_sample_fun/gui/src/HydrogenApp.h @ 572

Revision 570, 3.8 KB (checked in by wolke, 5 years ago)

merge the audio-file-browser branch

Line 
1/*
2 * Hydrogen
3 * Copyright(c) 2002-2008 by Alex >Comix< Cominu [comix@users.sourceforge.net]
4 *
5 * http://www.hydrogen-music.org
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (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
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
20 *
21 */
22
23#ifndef HYDROGEN_APP_H
24#define HYDROGEN_APP_H
25
26#include "config.h"
27
28#include <hydrogen/Object.h>
29#include <hydrogen/globals.h>
30
31#include "EventListener.h"
32
33#include <iostream>
34#include <vector>
35#include <QtGui>
36
37namespace H2Core
38{
39        class Song;
40}
41
42class SongEditorPanel;
43class MainForm;
44class PlayerControl;
45class PatternEditorPanel;
46class InstrumentEditorPanel;
47class SongEditor;
48class Mixer;
49class AudioEngineInfoForm;
50class SimpleHTMLBrowser;
51class LadspaFXProperties;
52class LadspaFXInfo;
53class LadspaFXGroup;
54class InstrumentRack;
55class PlaylistDialog;
56//class AudioFileBrowser;
57
58class HydrogenApp : public QObject, public Object
59{
60        Q_OBJECT
61        public:
62                HydrogenApp( MainForm* pMainForm, H2Core::Song *pFirstSong );
63
64                /// Returns the instance of HydrogenApp class
65                static HydrogenApp* getInstance();
66
67                virtual ~HydrogenApp();
68
69                void setSong( H2Core::Song* pSong );
70
71                void showPreferencesDialog();
72                void showMixer(bool bShow);
73                void showAudioEngineInfoForm();
74                void showPlaylistDialog();
75//              void showAudioFileBrowser();
76
77                Mixer* getMixer() {     return m_pMixer;        }
78                MainForm* getMainForm() {       return m_pMainForm;     }
79                SongEditorPanel* getSongEditorPanel() { return m_pSongEditorPanel;      }
80                AudioEngineInfoForm* getAudioEngineInfoForm() { return m_pAudioEngineInfoForm;  }
81                PlaylistDialog* getPlayListDialog() {   return m_pPlaylistDialog;       }
82//              AudioFileBrowser* getAudioFileBrowser() {  return m_pAudioFileBrowser;  }
83                SimpleHTMLBrowser* getHelpBrowser() {   return m_pHelpBrowser;  }
84                PatternEditorPanel* getPatternEditorPanel() {   return m_pPatternEditorPanel;   }
85                PlayerControl* getPlayerControl() {     return m_pPlayerControl;        }
86                InstrumentRack* getInstrumentRack(){    return m_pInstrumentRack;       }
87
88
89                void setStatusBarMessage( const QString& msg, int msec = 0 );
90                void setScrollStatusBarMessage( const QString& msg, int msec = 0, bool test = true );
91
92#ifdef LADSPA_SUPPORT
93                LadspaFXProperties* getLadspaFXProperties(uint nFX) {   return m_pLadspaFXProperties[nFX];      }
94#endif
95                void addEventListener( EventListener* pListener );
96                void removeEventListener( EventListener* pListener );
97                void closeFXProperties();
98
99                void onDrumkitLoad( QString name );
100
101        public slots:
102                void onEventQueueTimer();
103
104        private:
105                static HydrogenApp *m_pInstance;        ///< HydrogenApp instance
106
107#ifdef LADSPA_SUPPORT
108                LadspaFXProperties *m_pLadspaFXProperties[MAX_FX];
109#endif
110
111                MainForm *m_pMainForm;
112                Mixer *m_pMixer;
113                PatternEditorPanel* m_pPatternEditorPanel;
114                AudioEngineInfoForm *m_pAudioEngineInfoForm;
115                SongEditorPanel *m_pSongEditorPanel;
116                SimpleHTMLBrowser *m_pHelpBrowser;
117                SimpleHTMLBrowser *m_pFirstTimeInfo;
118                InstrumentRack* m_pInstrumentRack;
119                PlayerControl *m_pPlayerControl;
120                PlaylistDialog *m_pPlaylistDialog;
121//              AudioFileBrowser *m_pAudioFileBrowser;
122
123                QTimer *m_pEventQueueTimer;
124                std::vector<EventListener*> m_eventListeners;
125
126                // implement EngineListener interface
127                void engineError(uint nErrorCode);
128
129                //void setupTopLevelInterface();
130                void setupSinglePanedInterface();
131                void showInfoSplash();
132};
133
134
135#endif
Note: See TracBrowser for help on using the browser.