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

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

add new sampleeditor files

RevLine 
[3]1/*
2 * Hydrogen
[73]3 * Copyright(c) 2002-2008 by Alex >Comix< Cominu [comix@users.sourceforge.net]
[3]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
[162]26#include "config.h"
27
[3]28#include <hydrogen/Object.h>
[13]29#include <hydrogen/globals.h>
[3]30
31#include "EventListener.h"
[377]32
33#include <iostream>
[3]34#include <vector>
[377]35#include <QtGui>
[3]36
[377]37namespace H2Core
38{
39        class Song;
40}
41
[3]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;
[230]55class PlaylistDialog;
[605]56class SampleEditor;
[3]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();
[230]74                void showPlaylistDialog();
[605]75                void showSampleEditor( QString name );
[3]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;  }
[230]81                PlaylistDialog* getPlayListDialog() {   return m_pPlaylistDialog;       }
[605]82                SampleEditor* getSampleEditor() {  return m_pSampleEditor;      }
[3]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 );
[471]90                void setScrollStatusBarMessage( const QString& msg, int msec = 0, bool test = true );
[3]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 );
[261]97                void closeFXProperties();
[3]98
[513]99                void onDrumkitLoad( QString name );
100
[3]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                MainForm *m_pMainForm;
111                Mixer *m_pMixer;
112                PatternEditorPanel* m_pPatternEditorPanel;
113                AudioEngineInfoForm *m_pAudioEngineInfoForm;
114                SongEditorPanel *m_pSongEditorPanel;
115                SimpleHTMLBrowser *m_pHelpBrowser;
116                SimpleHTMLBrowser *m_pFirstTimeInfo;
117                InstrumentRack* m_pInstrumentRack;
118                PlayerControl *m_pPlayerControl;
[230]119                PlaylistDialog *m_pPlaylistDialog;
[605]120                SampleEditor *m_pSampleEditor;
[3]121
122                QTimer *m_pEventQueueTimer;
123                std::vector<EventListener*> m_eventListeners;
124
125                // implement EngineListener interface
126                void engineError(uint nErrorCode);
127
128                //void setupTopLevelInterface();
129                void setupSinglePanedInterface();
130                void showInfoSplash();
131};
132
133
134#endif
Note: See TracBrowser for help on using the browser.