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

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

little bit more work on sample_editor

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#include <hydrogen/sample.h>
31
32#include "EventListener.h"
33
34#include <iostream>
35#include <vector>
36#include <QtGui>
37
38namespace H2Core
39{
40        class Song;
41}
42
43class SongEditorPanel;
44class MainForm;
45class PlayerControl;
46class PatternEditorPanel;
47class InstrumentEditorPanel;
48class SongEditor;
49class Mixer;
50class AudioEngineInfoForm;
51class SimpleHTMLBrowser;
52class LadspaFXProperties;
53class LadspaFXInfo;
54class LadspaFXGroup;
55class InstrumentRack;
56class PlaylistDialog;
57class SampleEditor;
58
59class HydrogenApp : public QObject, public Object
60{
61        Q_OBJECT
62        public:
63                HydrogenApp( MainForm* pMainForm, H2Core::Song *pFirstSong );
64
65                /// Returns the instance of HydrogenApp class
66                static HydrogenApp* getInstance();
67
68                virtual ~HydrogenApp();
69
70                void setSong( H2Core::Song* pSong );
71
72                void showPreferencesDialog();
73                void showMixer(bool bShow);
74                void showAudioEngineInfoForm();
75                void showPlaylistDialog();
76                void showSampleEditor( QString name,  H2Core::Sample* Sample );
77
78                Mixer* getMixer() {     return m_pMixer;        }
79                MainForm* getMainForm() {       return m_pMainForm;     }
80                SongEditorPanel* getSongEditorPanel() { return m_pSongEditorPanel;      }
81                AudioEngineInfoForm* getAudioEngineInfoForm() { return m_pAudioEngineInfoForm;  }
82                PlaylistDialog* getPlayListDialog() {   return m_pPlaylistDialog;       }
83                SampleEditor* getSampleEditor() {  return m_pSampleEditor;      }
84                SimpleHTMLBrowser* getHelpBrowser() {   return m_pHelpBrowser;  }
85                PatternEditorPanel* getPatternEditorPanel() {   return m_pPatternEditorPanel;   }
86                PlayerControl* getPlayerControl() {     return m_pPlayerControl;        }
87                InstrumentRack* getInstrumentRack(){    return m_pInstrumentRack;       }
88
89
90                void setStatusBarMessage( const QString& msg, int msec = 0 );
91                void setScrollStatusBarMessage( const QString& msg, int msec = 0, bool test = true );
92
93#ifdef LADSPA_SUPPORT
94                LadspaFXProperties* getLadspaFXProperties(uint nFX) {   return m_pLadspaFXProperties[nFX];      }
95#endif
96                void addEventListener( EventListener* pListener );
97                void removeEventListener( EventListener* pListener );
98                void closeFXProperties();
99
100                void onDrumkitLoad( QString name );
101
102        public slots:
103                void onEventQueueTimer();
104
105        private:
106                static HydrogenApp *m_pInstance;        ///< HydrogenApp instance
107
108#ifdef LADSPA_SUPPORT
109                LadspaFXProperties *m_pLadspaFXProperties[MAX_FX];
110#endif
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                SampleEditor *m_pSampleEditor;
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.