root/branches/new_fx_rack_and_sample_fun/gui/src/SampleEditor/SampleEditor.h @ 612

Revision 612, 2.9 KB (checked in by wolke, 5 years ago)

more work

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 SAMPLEEDITOR_H
24#define SAMPLEEDITOR_H
25
26#include "config.h"
27#include "ui_SampleEditor_UI.h"
28#include "InstrumentEditor/InstrumentEditor.h"
29
30#include <QDialog>
31#include <hydrogen/Object.h>
32#include <hydrogen/Preferences.h>
33#include <hydrogen/Song.h>
34#include <hydrogen/sample.h>
35#include <hydrogen/instrument.h>
36
37
38class Button;
39class   MainSampleWaveDisplay;
40class   TargetWaveDisplay;
41class   DetailWaveDisplay;
42
43///
44/// This dialog is used to preview audiofiles
45///
46class SampleEditor : public QDialog, public Ui_SampleEditor_UI, public Object
47
48{
49        Q_OBJECT
50        public:
51               
52                SampleEditor( QWidget* pParent, H2Core::Sample* Sample );
53                ~SampleEditor();
54
55                void setSampleName( QString name);
56                bool getCloseQuestion();
57                bool m_pSampleEditorStatus;
58                void returnAllMainWaveDisplayValues();
59
60
61
62        private slots:
63                void on_ClosePushButton_clicked();
64                void on_ApplyChangesPushButton_clicked();
65                void valueChangedStartFrameSpinBox( int );
66                void valueChangedLoopFrameSpinBox( int );
67                void valueChangedEndFrameSpinBox( int );
68
69        private:
70/*
71        QString __sample_mode;          ///< loop mode
72        unsigned __fade_out_startframe; ///< start frame for fade out
73        int __repeats;                  ///< repats from the loop section
74        unsigned __start_frame;         ///< start frame
75        unsigned __loop_frame;          ///< beginn of the loop section
76        unsigned __end_frame;           ///< sample end frame
77*/             
78        QString m_samplename;
79        H2Core::Sample* m_pSample;
80
81        bool m_sample_is_modified;      ///< true if sample is modified
82        QString m_sample_mode;          ///< loop mode
83        unsigned m_fade_out_startframe; ///< start frame for fade out
84        int m_fade_out_type;            ///< fade out type 1=lin, 2=log
85        int m_repeats;                  ///< repats from the loop section
86        unsigned m_start_frame;         ///< start frame
87        unsigned m_loop_frame;          ///< beginn of the loop section
88        unsigned m_end_frame;           ///< sample end frame
89
90        double m_divider;
91        bool m_ponewayStart;
92        bool m_ponewayLoop;
93        bool m_ponewayEnd;
94
95        void setAllSampleProps();
96        virtual void mouseReleaseEvent(QMouseEvent *ev);
97
98        MainSampleWaveDisplay *m_pMainSampleWaveDisplay;
99        TargetWaveDisplay *m_pTargetSampleView;
100        DetailWaveDisplay *m_pSampleAdjustView;
101               
102};
103
104
105#endif
Note: See TracBrowser for help on using the browser.