~ubuntu-branches/ubuntu/precise/lmms/precise-updates

« back to all changes in this revision

Viewing changes to include/InstrumentTrack.h

  • Committer: Bazaar Package Importer
  • Author(s): Артём Попов
  • Date: 2011-02-14 20:58:36 UTC
  • mfrom: (1.1.10 upstream) (3.1.9 sid)
  • Revision ID: james.westby@ubuntu.com-20110214205836-2u41xus1d2mj8nfz
Tags: 0.4.10-1ubuntu1
* Merge from debian unstable (LP: #718801).  Remaining changes:
  - Replace build-dep on libwine-dev with wine1.2-dev to build
    against the newer Wine.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 * InstrumentTrack.h - declaration of class InstrumentTrack, a track + window
3
3
 *                     which holds an instrument-plugin
4
4
 *
5
 
 * Copyright (c) 2004-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
 
5
 * Copyright (c) 2004-2010 Tobias Doerffel <tobydox/at/users.sourceforge.net>
6
6
 *
7
7
 * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
8
8
 *
88
88
        void playNote( notePlayHandle * _n, sampleFrame * _working_buffer );
89
89
 
90
90
        QString instrumentName() const;
91
 
        inline const Instrument * instrument() const
 
91
        const Instrument *instrument() const
92
92
        {
93
93
                return m_instrument;
94
94
        }
95
95
 
96
 
        inline Instrument * instrument()
 
96
        Instrument *instrument()
97
97
        {
98
98
                return m_instrument;
99
99
        }
108
108
        int masterKey( int _midi_key ) const;
109
109
 
110
110
        // translate pitch to midi-pitch [0,16383]
111
 
        inline int midiPitch() const
 
111
        int midiPitch() const
112
112
        {
113
113
                return (int)( ( m_pitchModel.value()+100 ) * 16383 ) / 200;
114
114
        }
135
135
        // load instrument whose name matches given one
136
136
        Instrument * loadInstrument( const QString & _instrument_name );
137
137
 
138
 
        inline AudioPort * audioPort()
 
138
        AudioPort * audioPort()
139
139
        {
140
140
                return &m_audioPort;
141
141
        }
142
142
 
143
 
        inline MidiPort * midiPort()
 
143
        MidiPort * midiPort()
144
144
        {
145
145
                return &m_midiPort;
146
146
        }
147
147
 
148
 
        IntModel * baseNoteModel()
149
 
        {
150
 
                return &m_baseNoteModel;
151
 
        }
152
 
 
153
 
        Piano * getPiano()
 
148
        const IntModel *baseNoteModel() const
 
149
        {
 
150
                return &m_baseNoteModel;
 
151
        }
 
152
 
 
153
        IntModel *baseNoteModel()
 
154
        {
 
155
                return &m_baseNoteModel;
 
156
        }
 
157
 
 
158
        Piano *pianoModel()
154
159
        {
155
160
                return &m_piano;
156
161
        }
258
263
                return castModel<InstrumentTrack>();
259
264
        }
260
265
 
 
266
        static InstrumentTrackWindow * topLevelInstrumentTrackWindow();
261
267
 
262
268
        QMenu * midiMenu()
263
269
        {
266
272
 
267
273
        void freeInstrumentTrackWindow();
268
274
 
269
 
        static void cleanupWindowPool();
 
275
        static void cleanupWindowCache();
270
276
 
271
277
 
272
278
protected:
287
293
private:
288
294
        InstrumentTrackWindow * m_window;
289
295
 
290
 
        static QQueue<InstrumentTrackWindow *> s_windows;
 
296
        static QQueue<InstrumentTrackWindow *> s_windowCache;
291
297
 
292
298
        // widgets in track-settings-widget
293
299
        trackLabelButton * m_tlb;
334
340
                return castModel<InstrumentTrack>();
335
341
        }
336
342
 
337
 
        void setInstrumentTrackView( InstrumentTrackView * _tv )
 
343
        void setInstrumentTrackView( InstrumentTrackView * _tv );
 
344
 
 
345
        PianoView * pianoView()
338
346
        {
339
 
                m_itv = _tv;
 
347
                return m_pianoView;
340
348
        }
341
349
 
342
350
        static void dragEnterEventGeneric( QDragEnterEvent * _dee );