* removed volumeKnob-class and added volumeKnob-property to knob-class instead

* reduced header-dependencies and various cleanups
* removed obsolete settings



git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1158 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
Tobias Doerffel
2008-06-20 22:44:49 +00:00
parent 38971caebb
commit 15134568f1
42 changed files with 304 additions and 806 deletions

136
ChangeLog
View File

@@ -1,4 +1,66 @@
2008-06-20 Paul Giblock <drfaygo/at/gmail/dot/com>
2008-06-20 Tobias Doerffel <tobydox/at/users/dot/sourceforge/dot/net>
* Makefile.am:
* include/knob.h:
* include/volume_knob.h:
* plugins/organic/organic.cpp:
* plugins/organic/organic.h:
* plugins/vibed/vibed.h:
* plugins/vibed/vibed.cpp:
* plugins/triple_oscillator/triple_oscillator.h:
* plugins/triple_oscillator/triple_oscillator.cpp:
* plugins/audio_file_processor/audio_file_processor.cpp:
* plugins/audio_file_processor/audio_file_processor.h:
* src/tracks/instrument_track.cpp:
* src/gui/widgets/knob.cpp:
* src/gui/widgets/volume_knob.cpp:
removed volumeKnob-class and added volumeKnob-property to knob-class
instead
* plugins/flp_import/flp_import.cpp:
* include/controller_connection.h:
* include/lcd_spinbox.h:
* include/controller.h:
* include/automatable_model.h:
* include/instrument_track.h:
* include/instrument_functions.h:
* include/note_play_handle.h:
* include/instrument_sound_shaping.h:
* include/basic_filters.h:
* include/sample_track.h:
* include/surround_area.h:
* src/core/note_play_handle.cpp:
* src/core/automatable_model.cpp:
* src/core/main.cpp:
* src/core/instrument_sound_shaping.cpp:
* src/core/piano.cpp:
* src/core/surround_area.cpp:
reduced header-dependencies and various cleanups
* include/tempo_sync_knob.h:
* src/gui/widgets/tempo_sync_knob.cpp:
do not re-implement private event-handlers and use knob's signals
instead
* src/gui/fx_mixer_view.cpp:
better initial position of FX-mixer view
* src/gui/song_editor.cpp:
removed obsolete headers
* include/setup_dialog.h:
* src/gui/bb_editor.cpp:
* src/gui/main_window.cpp:
* src/gui/setup_dialog.cpp:
* src/gui/song_editor.cpp:
* src/gui/widgets/controller_rack_view.cpp:
* src/gui/widgets/knob.cpp:
- removed obsolete non-MDI-mode
- removed classical knob-usability
- removed show-wizard-after-upgrade setting
- other cleanups
2008-06-20 Paul Giblock <drfaygo/at/gmail/dot/com>
* src/core/piano.cpp:
make SVN compile again
@@ -28,7 +90,7 @@
* src/tracks/instrument_track.cpp:
added unit to pitch-knob
2008-06-15 Paul Giblock <drfaygo/at/gmail/dot/com>
2008-06-15 Paul Giblock <drfaygo/at/gmail/dot/com>
* plugins/stereo_matrix/stereo_matrix.cpp:
update author email address
@@ -265,7 +327,7 @@
removed obsolete instrumentTrackView::updateName() and made
track-button update on name-changes
2008-06-10 Paul Giblock <drfaygo/at/gmail/dot/com>
2008-06-10 Paul Giblock <drfaygo/at/gmail/dot/com>
* plugins/sf2_player/artwork.png:
* plugins/sf2_player/chorus_off.png:
@@ -294,7 +356,7 @@
* Makefile.am:
added a few files to LMMS-headers
2008-06-08 Paul Giblock <drfaygo/at/gmail/dot/com>
2008-06-08 Paul Giblock <drfaygo/at/gmail/dot/com>
* src/gui/widgets/graph.h:
* src/gui/widgets/graph.cpp:
@@ -535,7 +597,7 @@
serializingObject so that creating note objects, notePlayHandles etc.
does not have all the journalling-overhead (assigning/freeing ID etc.)
2008-06-06 Paul Giblock <drfaygo/at/gmail/dot/com>
2008-06-06 Paul Giblock <drfaygo/at/gmail/dot/com>
* include/knob.h:
* include/automatable_slider.h:
@@ -621,7 +683,7 @@
* src/gui/automation_editor.cpp:
fixed various GCC-warnings
2008-06-05 Paul Giblock <drfaygo/at/gmail/dot/com>
2008-06-05 Paul Giblock <drfaygo/at/gmail/dot/com>
* include/automatable_model.h:
* include/mv_base.h:
@@ -641,7 +703,7 @@
heavily optimized journal-cleanup - project unloading is now
unbelievable fast!
2008-06-05 Paul Giblock <drfaygo/at/gmail/dot/com>
2008-06-05 Paul Giblock <drfaygo/at/gmail/dot/com>
* data/themes/default/style.css:
fix check-marks on menus. They used to all appear checked no matter what
@@ -685,7 +747,7 @@
* Makefile.am:
integrated TAP-plugins to be shipped with LMMS
2008-06-04 Paul Giblock <drfaygo/at/gmail/dot/com>
2008-06-04 Paul Giblock <drfaygo/at/gmail/dot/com>
* src/gui/lmms_style.cpp:
Shrink the titlebars
@@ -743,7 +805,7 @@
* Makefile.am:
added win32-pkg target
2008-06-02 Paul Giblock <drfaygo/at/gmail/dot/com>
2008-06-02 Paul Giblock <drfaygo/at/gmail/dot/com>
* plugins/sf2_player/sf2_player.cpp:
* plugins/sf2_player/sf2_player.h:
@@ -864,7 +926,7 @@
* src/core/instrument_midi_io.cpp:
coding style
2008-06-02 Paul Giblock <drfaygo/at/gmail/dot/com>
2008-06-02 Paul Giblock <drfaygo/at/gmail/dot/com>
* include/automatable_model.h:
* include/controller_connection.h:
@@ -903,7 +965,7 @@
* src/core/song.cpp:
Code style
2008-06-01 Paul Giblock <drfaygo/at/gmail/dot/com>
2008-06-01 Paul Giblock <drfaygo/at/gmail/dot/com>
* src/tracks/pattern.cpp:
Improve drawing of tact lines, so it is more obvious where a pattern
@@ -996,7 +1058,7 @@
* src/gui/setup_dialog.cpp:
added PulseAudio-support
2008-05-30 Paul Giblock <drfaygo/at/gmail/dot/com>
2008-05-30 Paul Giblock <drfaygo/at/gmail/dot/com>
* src/gui/piano_roll.cpp:
- Improve selection of volume-bars on a chord. Select closest note
@@ -1093,7 +1155,7 @@
diffstat: 63 files changed, 1145 insertions(+), 1170 deletions(-)
2008-05-27 Paul Giblock <drfaygo/at/gmail/dot/com>
2008-05-27 Paul Giblock <drfaygo/at/gmail/dot/com>
* plugins/sf2_player/sf2_player.cpp:
restore gain setting when loading a project and keep gain setting when
@@ -1112,7 +1174,7 @@
* src/gui/widgets/controller_view.cpp:
made LMMS compile + cleanups
2008-05-26 Paul Giblock <drfaygo/at/gmail/dot/com>
2008-05-26 Paul Giblock <drfaygo/at/gmail/dot/com>
* include/automatable_model.h:
* include/automatable_model_templates.h:
@@ -1583,7 +1645,7 @@
* data/themes/default/splash.png:
new transparent splash-screen without obsolete text-messages
2008-05-25 Paul Giblock <drfaygo/at/gmail/dot/com>
2008-05-25 Paul Giblock <drfaygo/at/gmail/dot/com>
* include/embed.h:
Fix missing distructor warning
@@ -1620,7 +1682,7 @@
splitted source-files for meterModel and meterDialog and added
"simple"-mode for meterDialog
2008-05-22 Paul Giblock <drfaygo/at/gmail/dot/com>
2008-05-22 Paul Giblock <drfaygo/at/gmail/dot/com>
* include/lfo_controller.h:
* src/gui/lfo_controller_dialog.cpp:
@@ -1633,14 +1695,14 @@
* src/gui/widgets/controller_rack_view.cpp:
Add icon to window
2008-05-21 Paul Giblock <drfaygo/at/gmail/dot/com>
2008-05-21 Paul Giblock <drfaygo/at/gmail/dot/com>
* plugins/sf2_player/Makefile.am:
* plugins/Makefile.am:
* configure.in:
Add fluidsynth detection to configure
2008-05-21 Paul Giblock <drfaygo/at/gmail/dot/com>
2008-05-21 Paul Giblock <drfaygo/at/gmail/dot/com>
* plugins/vestige/select_file.png:
* plugins/vestige/logo.png:
@@ -1786,7 +1848,7 @@
integrated patches from William Steidtmann <billstei/at/hbci/dot/com>
which makes Singerbot at least compile - doesn't seem to work yet though
2008-05-19 Paul Giblock <drfaygo/at/gmail/dot/com>
2008-05-19 Paul Giblock <drfaygo/at/gmail/dot/com>
* triple_oscillator.cpp:
* am_active.png:
@@ -1832,7 +1894,7 @@
* data/themes/default/style.css:
Including stylesheet changes I forgot to commit, fixes knobs in 3xOsc
2008-05-18 Paul Giblock <drfaygo/at/gmail/dot/com>
2008-05-18 Paul Giblock <drfaygo/at/gmail/dot/com>
* src/gui/widgets/knob.cpp:
* include/knob.h:
@@ -1913,7 +1975,7 @@
protect individual buffers of FX-channels from being processed by more
than one thread
2008-05-17 Paul Giblock <drfaygo/at/gmail/dot/com>
2008-05-17 Paul Giblock <drfaygo/at/gmail/dot/com>
* plugins/stereo_matrix/stereomatrix_controls.cpp:
Allow knobs to invert phase as well
@@ -1938,8 +2000,8 @@
Noted bug in automatable button
* src/gui/piano_roll.cpp:
Fix bug when trying to select note on first beat. However, still breaks if
the cursor moves quickly from right to left (i.e: if it skips the
Fix bug when trying to select note on first beat. However, still breaks
if the cursor moves quickly from right to left (i.e: if it skips the
pixel position)
2008-05-14 Tobias Doerffel <tobydox/at/users/dot/sourceforge/dot/net>
@@ -2217,7 +2279,7 @@
* plugins/organic/organic.cpp:
fixed knob-inheritance problems
2008-05-04 Paul Giblock <drfaygo/at/gmail/dot/com>
2008-05-04 Paul Giblock <drfaygo/at/gmail/dot/com>
* plugins/kicker/kicker.cpp:
* plugins/kicker/artwork.png:
@@ -2242,19 +2304,19 @@
* src/core/track.cpp:
fixed move of TCO-selections
2008-04-30 Paul Giblock <drfaygo/at/gmail/dot/com>
2008-04-30 Paul Giblock <drfaygo/at/gmail/dot/com>
* src/gui/piano_roll.cpp:
- Fixed moving of selected notes.
- TODO: Quantanize the movement to selected "Q"
2008-04-29 Paul Giblock <drfaygo/at/gmail/dot/com>
2008-04-29 Paul Giblock <drfaygo/at/gmail/dot/com>
* include/main_window.h:
* src/gui/main_window.cpp:
Add button for toggling FX Window. Can use a better icon.
2008-04-28 Paul Giblock <drfaygo/at/gmail/dot/com>
2008-04-28 Paul Giblock <drfaygo/at/gmail/dot/com>
* plugins/sf2_player/sf2_player.cpp:
* plugins/sf2_player/sf2_player.h:
@@ -2279,12 +2341,12 @@
- added missing call in constructor to clear newly created
delay-buffer - fixes bad distorted sound in various scenarios
2008-04-25 Paul Giblock <drfaygo/at/gmail/dot/com>
2008-04-25 Paul Giblock <drfaygo/at/gmail/dot/com>
* plugins/bit_invader/bit_invader.cpp:
Fixed samplelength loading
2008-04-24 Paul Giblock <drfaygo/at/gmail/dot/com>
2008-04-24 Paul Giblock <drfaygo/at/gmail/dot/com>
* src/core/song.cpp:
Reset LFO counter on song play
@@ -2349,12 +2411,12 @@
periodic updates can simply connect their update-slots to
songEditor::periodicUpdate()
2008-04-20 Paul Giblock <drfaygo/at/gmail/dot/com>
2008-04-20 Paul Giblock <drfaygo/at/gmail/dot/com>
* plugins/stereo_matrix/stereomatrix_controls.cpp:
Fixed saveSettings
2008-04-16 Paul Giblock <drfaygo/at/gmail/dot/com>
2008-04-16 Paul Giblock <drfaygo/at/gmail/dot/com>
* plugins/sf2_player/sf2_player.cpp:
* plugins/sf2_player/sf2_player.h:
@@ -2378,12 +2440,12 @@
directly delete view before removing model - fixes crash when
removing instrument-track with instrument-track-window open
2008-04-15 Paul Giblock <drfaygo/at/gmail/dot/com>
2008-04-15 Paul Giblock <drfaygo/at/gmail/dot/com>
* plugins/stereo_matrix/stereomatrix_control_dialog.cpp:
Fix layout
2008-04-14 Paul Giblock <drfaygo/at/gmail/dot/com>
2008-04-14 Paul Giblock <drfaygo/at/gmail/dot/com>
* plugins/stereo_matrix:
* plugins/stereo_matrix/stereo_matrix.cpp:
@@ -2405,7 +2467,7 @@
added resampling with Sinc-interpolation in case LMMS processes with
higher sample-rate than 96 KHz
2008-04-14 Paul Giblock <drfaygo/at/gmail/dot/com>
2008-04-14 Paul Giblock <drfaygo/at/gmail/dot/com>
* plugins/sf2_player/sf2_player.cpp:
* plugins/sf2_player/sf2_player.h:
@@ -2483,7 +2545,7 @@
changed internal MIDI-time-resolution from 64th to 192th resulting for
example in better MIDI-import and allowing to use triplet-notes in LMMS
2008-04-09 Paul Giblock <drfaygo/at/gmail/dot/com>
2008-04-09 Paul Giblock <drfaygo/at/gmail/dot/com>
* include/controller.h:
* src/core/controller.cpp:
@@ -2494,7 +2556,7 @@
* src/core/lfo_controller.cpp:
add more parameters to LFO controller
2008-04-08 Paul Giblock <drfaygo/at/gmail/dot/com>
2008-04-08 Paul Giblock <drfaygo/at/gmail/dot/com>
* include/engine.h:
* src/core/engine.cpp:
@@ -3798,7 +3860,7 @@
* include/instrument_sound_shaping.h:
made MIDI- and FLP-import-filter work
2008-02-15 Paul Giblock <drfaygo/at/gmail/dot/net>
2008-02-15 Paul Giblock <drfaygo/at/gmail/dot/net>
* plugins/plucked_string_synth/plucked_string_synth.cpp:
* plugins/plucked_string_synth/plucked_string_synth.h:
* plugins/organic/organic.cpp:

View File

@@ -133,7 +133,7 @@ lmms_MOC = \
./name_label.moc \
./nstate_button.moc \
./pattern.moc \
./peak_controller.moc \
./peak_controller.moc \
./piano_roll.moc \
./piano.moc \
./pixmap_button.moc \
@@ -161,8 +161,7 @@ lmms_MOC = \
./track_container.moc \
./track_container_view.moc \
./track.moc \
./visualization_widget.moc \
./volume_knob.moc
./visualization_widget.moc
lmms_UIC = \
ui_export_project.uic
@@ -233,7 +232,7 @@ lmms_SOURCES = \
$(srcdir)/src/core/note.cpp \
$(srcdir)/src/core/note_play_handle.cpp \
$(srcdir)/src/core/oscillator.cpp \
$(srcdir)/src/core/peak_controller.cpp \
$(srcdir)/src/core/peak_controller.cpp \
$(srcdir)/src/core/piano.cpp \
$(srcdir)/src/core/plugin.cpp \
$(srcdir)/src/core/preset_preview_play_handle.cpp \
@@ -327,7 +326,6 @@ lmms_SOURCES = \
$(srcdir)/src/gui/widgets/tool_button.cpp \
$(srcdir)/src/gui/widgets/tooltip.cpp \
$(srcdir)/src/gui/widgets/visualization_widget.cpp \
$(srcdir)/src/gui/widgets/volume_knob.cpp \
$(srcdir)/src/tracks/automation_track.cpp \
$(srcdir)/src/tracks/bb_track.cpp \
$(srcdir)/src/tracks/instrument_track.cpp \
@@ -446,7 +444,6 @@ lmms_SOURCES = \
$(srcdir)/include/led_checkbox.h \
$(srcdir)/include/text_float.h \
$(srcdir)/include/tempo_sync_knob.h \
$(srcdir)/include/volume_knob.h \
$(srcdir)/include/setup_dialog.h \
$(srcdir)/include/dummy_plugin.h \
$(srcdir)/include/dummy_instrument.h \

View File

@@ -31,13 +31,8 @@
#include "journalling_object.h"
#include "mv_base.h"
#include "controller_connection.h"
#include "automation_pattern.h"
#include <QtCore/QPointer>
#include <QtCore/QObject>
#include <QtCore/QString>
class automationPattern;
class track;
@@ -121,17 +116,7 @@ public:
}
inline void setControllerConnection( controllerConnection * _c )
{
m_controllerConnection = _c;
if( _c )
{
QObject::connect( m_controllerConnection,
SIGNAL( valueChanged() ),
this, SIGNAL( dataChanged() ) );
emit dataChanged();
}
}
void setControllerConnection( controllerConnection * _c );
template<class T>
@@ -296,7 +281,7 @@ private:
controllerConnection * m_controllerConnection;
QPointer<automationPattern> m_automationPattern;
automationPattern * m_automationPattern;
track * m_track;

View File

@@ -42,7 +42,7 @@
//const int MOOG_VOLTAGE = 40000;
template<ch_cnt_t CHANNELS = DEFAULT_CHANNELS>
template<ch_cnt_t CHANNELS/* = DEFAULT_CHANNELS*/>
class basicFilters
{
public:

View File

@@ -27,13 +27,9 @@
#ifndef _CONTROLLER_H
#define _CONTROLLER_H
#include <QtCore/QObject>
#include <QtCore/QVector>
#include "engine.h"
#include "mixer.h"
#include "mv_base.h"
#include "templates.h"
#include "journalling_object.h"
class controllerDialog;
@@ -41,6 +37,7 @@ class controller;
typedef QVector<controller *> controllerVector;
class controller : public model, public journallingObject
{
Q_OBJECT

View File

@@ -32,16 +32,14 @@
#include <QtCore/QObject>
#include <QtCore/QVector>
#include "engine.h"
#include "controller.h"
#include "mv_base.h"
#include "journalling_object.h"
class controllerConnection;
class QString;
typedef QVector<controllerConnection *> controllerConnectionVector;
class controllerConnection : public QObject, public journallingObject
{
Q_OBJECT

View File

@@ -30,7 +30,7 @@
#include "types.h"
#include "automatable_model.h"
#include "tempo_sync_knob.h"
#include "combobox.h"
#include "combobox_model.h"
class instrumentTrack;

View File

@@ -27,8 +27,7 @@
#define _INSTRUMENT_SOUND_SHAPING_H
#include "mixer.h"
#include "automatable_model.h"
#include "combobox.h"
#include "combobox_model.h"
class instrumentTrack;

View File

@@ -30,16 +30,11 @@
#include <QtGui/QPushButton>
#include "audio_port.h"
#include "automatable_model.h"
#include "instrument_functions.h"
#include "instrument_sound_shaping.h"
#include "lcd_spinbox.h"
#include "midi_event_processor.h"
#include "midi_port.h"
#include "mixer.h"
#include "piano.h"
#include "effect_chain.h"
#include "tab_widget.h"
#include "track.h"
@@ -54,11 +49,12 @@ class instrument;
class instrumentTrackButton;
class instrumentTrackWindow;
class instrumentMidiIOView;
class lcdSpinBox;
class midiPortMenu;
class notePlayHandle;
class pluginView;
class presetPreviewPlayHandle;
class volumeKnob;
class tabWidget;
class EXPORT instrumentTrack : public track, public midiEventProcessor
@@ -181,7 +177,7 @@ private:
floatModel m_volumeModel;
floatModel m_panningModel;
floatModel m_pitchModel;
lcdSpinBoxModel m_effectChannelModel;
intModel m_effectChannelModel;
instrument * m_instrument;
@@ -244,7 +240,7 @@ private:
static QQueue<instrumentTrackWindow *> s_windows;
// widgets in track-settings-widget
volumeKnob * m_tswVolumeKnob;
knob * m_tswVolumeKnob;
fadeButton * m_tswActivityIndicator;
instrumentTrackButton * m_tswInstrumentTrackButton;
@@ -271,7 +267,7 @@ public:
virtual ~instrumentTrackWindow();
// parent for all internal tab-widgets
QWidget * tabWidgetParent( void )
tabWidget * tabWidgetParent( void )
{
return( m_tabWidget );
}
@@ -323,7 +319,7 @@ private:
// widgets on the top of an instrument-track-window
tabWidget * m_generalSettingsWidget;
QLineEdit * m_instrumentNameLE;
volumeKnob * m_volumeKnob;
knob * m_volumeKnob;
knob * m_panningKnob;
knob * m_pitchKnob;
lcdSpinBox * m_effectChannelNumber;

View File

@@ -1,9 +1,6 @@
/*
* knob.h - powerful knob-widget
*
* This file is based on the knob-widget of the Qwt Widget Library by
* Josef Wilgen
*
* Copyright (c) 2004-2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
@@ -61,7 +58,7 @@ class EXPORT knob : public QWidget, public floatModelView
// Unfortunately, the gradient syntax doesn't create our gradient
// correctly so we need to do this:
Q_PROPERTY(QColor outerColor READ outerColor WRITE setOuterColor)
mapPropertyFromModel(bool,isVolumeKnob,setVolumeKnob,m_volumeKnob);
public:
knob( int _knob_num, QWidget * _parent, const QString & _name = QString::null );
virtual ~knob();
@@ -97,12 +94,6 @@ public:
void setOuterColor( const QColor & _c );
public slots:
virtual void enterValue( void );
void displayHelp( void );
void friendlyUpdate( void );
signals:
void sliderPressed( void );
void sliderReleased( void );
@@ -110,21 +101,6 @@ signals:
protected:
static textFloat * s_textFloat;
float m_mouseOffset;
QPoint m_origMousePos;
bool m_buttonPressed;
QPixmap * m_knobPixmap;
// Styled knob stuff, could break out
QPointF m_centerPoint;
float m_innerRadius;
float m_outerRadius;
float m_lineWidth;
QColor * m_outerColor;
virtual void contextMenuEvent( QContextMenuEvent * _me );
virtual void dragEnterEvent( QDragEnterEvent * _dee );
virtual void dropEvent( QDropEvent * _de );
@@ -135,15 +111,23 @@ protected:
virtual void paintEvent( QPaintEvent * _me );
virtual void wheelEvent( QWheelEvent * _me );
void drawKnob( QPainter * _p );
void setPosition( const QPoint & _p );
private slots:
virtual void enterValue( void );
void displayHelp( void );
void friendlyUpdate( void );
float getValue( const QPoint & _p );
private:
QString displayValue( void ) const;
virtual void doConnections( void );
QLineF calculateLine( const QPointF & _mid, float _radius,
float _innerRadius = 1) const;
private:
void drawKnob( QPainter * _p );
void setPosition( const QPoint & _p );
float getValue( const QPoint & _p );
bool updateAngle( void );
inline float pageSize( void ) const
@@ -153,19 +137,29 @@ private:
modelUntyped()->step<float>() ) );
}
virtual void doConnections( void );
static textFloat * s_textFloat;
int m_knobNum;
QString m_label;
void valueChange( void );
void buttonReleased( void );
QPixmap * m_knobPixmap;
boolModel m_volumeKnob;
float m_mouseOffset;
QPoint m_origMousePos;
bool m_buttonPressed;
float m_totalAngle;
int m_angle;
QImage m_cache;
int m_knobNum;
QString m_label;
// Styled knob stuff, could break out
QPointF m_centerPoint;
float m_innerRadius;
float m_outerRadius;
float m_lineWidth;
QColor * m_outerColor;
} ;

View File

@@ -27,14 +27,11 @@
#define _LCD_SPINBOX_H
#include <QtCore/QMap>
#include <QtGui/QLCDNumber>
#include <QtGui/QWidget>
#include "automatable_model_view.h"
class QLabel;
class EXPORT lcdSpinBox : public QWidget, public intModelView
{
Q_OBJECT

View File

@@ -28,8 +28,6 @@
#define _NOTE_PLAY_HANDLE_H
#include "mixer.h"
#include "basic_filters.h"
#include "bb_track.h"
#include "note.h"
#include "instrument.h"
#include "instrument_track.h"
@@ -38,6 +36,7 @@
class notePlayHandle;
template<ch_cnt_t=DEFAULT_CHANNELS> class basicFilters;
typedef QVector<notePlayHandle *> notePlayHandleVector;
typedef QVector<const notePlayHandle *> constNotePlayHandleVector;
@@ -223,7 +222,7 @@ public:
{
return( m_bbTrack && m_bbTrack->isMuted() );
}
void setBBTrack( bbTrack * _bb_track )
void setBBTrack( track * _bb_track )
{
m_bbTrack = _bb_track;
}
@@ -308,7 +307,7 @@ private:
// an arpeggio (either base-note or
// sub-note)
bool m_muted; // indicates whether note is muted
bbTrack * m_bbTrack; // related BB track
track * m_bbTrack; // related BB track
#if SINGERBOT_SUPPORT
int m_patternIndex; // position among relevant notes
#endif

View File

@@ -31,11 +31,11 @@
#include "audio_port.h"
#include "track.h"
#include "volume_knob.h"
class QLabel;
class effectLabel;
class sampleBuffer;
class knob;
//class sampleTCOSettingsDialog;
@@ -141,7 +141,7 @@ public:
private:
audioPort m_audioPort;
knobModel m_volumeModel;
floatModel m_volumeModel;
friend class sampleTrackView;
@@ -160,7 +160,7 @@ public:
private:
effectLabel * m_trackLabel;
volumeKnob * m_volumeKnob;
knob * m_volumeKnob;
} ;

View File

@@ -87,9 +87,6 @@ private slots:
void toggleToolTips( bool _enabled );
void toggleKnobUsability( bool _classical );
void toggleMdiWindows( bool _enabled );
void toggleWizard( bool _enabled );
void toggleWarnAfterSetup( bool _enabled );
void toggleDisplaydBV( bool _enabled );
void toggleMMPZ( bool _enabled );
@@ -114,9 +111,6 @@ private:
int m_bufferSize;
bool m_toolTips;
bool m_classicalKnobUsability;
bool m_MDI;
bool m_wizard;
bool m_warnAfterSetup;
bool m_displaydBV;
bool m_MMPZ;

View File

@@ -81,7 +81,7 @@ private:
} ;
/*
class surroundArea : public QWidget, public modelView
{
Q_OBJECT
@@ -113,7 +113,7 @@ private:
static QPixmap * s_backgroundArtwork;
} ;
*/
#endif

View File

@@ -79,6 +79,10 @@ signals:
public slots:
inline void disableSync( void )
{
setTempoSync( SyncNone );
}
void setTempoSync( int _note_type );
void setTempoSync( QAction * _item );
@@ -130,9 +134,7 @@ signals:
protected:
virtual void mouseMoveEvent( QMouseEvent * _me );
virtual void contextMenuEvent( QContextMenuEvent * _me );
virtual void wheelEvent( QWheelEvent * _me );
protected slots:
@@ -144,7 +146,7 @@ private:
QPixmap m_tempoSyncIcon;
QString m_tempoSyncDescription;
QPointer<meterDialog> m_custom;
meterDialog * m_custom;
} ;

View File

@@ -1,52 +0,0 @@
/*
* volume_knob.h - defines a knob that display it's value as either a
* percentage or in dBV.
*
* Copyright (c) 2006-2008 Danny McRae <khjklujn/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program (see COPYING); if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA.
*
*/
#ifndef _VOLUME_KNOB_H
#define _VOLUME_KNOB_H
#include "knob.h"
class EXPORT volumeKnob : public knob
{
Q_OBJECT
public:
volumeKnob( int _knob_num, QWidget * _parent, const QString & _name = QString::null );
virtual ~volumeKnob();
public slots:
virtual void enterValue( void );
protected:
virtual void mousePressEvent( QMouseEvent * _me );
virtual void mouseMoveEvent( QMouseEvent * _me );
virtual void wheelEvent( QWheelEvent * _we );
} ;
#endif

View File

@@ -404,7 +404,8 @@ audioFileProcessorView::audioFileProcessorView( instrument * _instrument,
"This is useful for things like string- and choir-"
"samples." ) );
m_ampKnob = new volumeKnob( knobStyled, this );
m_ampKnob = new knob( knobStyled, this );
m_ampKnob->setVolumeKnob( TRUE );
m_ampKnob->move( 17, 108 );
m_ampKnob->setFixedSize( 37, 47 );
m_ampKnob->setHintText( tr( "Amplify:" )+" ", "%" );

View File

@@ -32,7 +32,7 @@
#include "instrument.h"
#include "instrument_view.h"
#include "sample_buffer.h"
#include "volume_knob.h"
#include "knob.h"
#include "pixmap_button.h"
@@ -131,7 +131,7 @@ private:
static QPixmap * s_artwork;
QPixmap m_graph;
volumeKnob * m_ampKnob;
knob * m_ampKnob;
knob * m_startKnob;
knob * m_endKnob;
pixmapButton * m_openAudioFileButton;

View File

@@ -30,6 +30,7 @@
#include <QtCore/QBuffer>
#include "flp_import.h"
#include "note_play_handle.h"
#include "basic_filters.h"
#include "bb_track.h"
#include "bb_track_container.h"

View File

@@ -38,7 +38,6 @@
#include "pixmap_button.h"
#include "templates.h"
#include "tooltip.h"
#include "volume_knob.h"
#undef SINGLE_SOURCE_COMPILE
#include "embed.cpp"
@@ -401,6 +400,7 @@ organicInstrumentView::organicInstrumentView( instrument * _instrument,
// setup volume-knob
m_volKnob = new organicKnob( this );
m_volKnob->setVolumeKnob( TRUE );
m_volKnob->move( 60, 201 );
m_volKnob->setFixedSize( 37, 47 );
m_volKnob->setHintText( tr( "Volume:" ).arg( 1 ) + " ", "%" );
@@ -460,7 +460,8 @@ void organicInstrumentView::modelChanged( void )
i + 1 ) + " ", "%" );
// setup volume-knob
volumeKnob * volKnob = new volumeKnob( knobStyled, this );
knob * volKnob = new knob( knobStyled, this );
volKnob->setVolumeKnob( TRUE );
volKnob->move( x + i * colWidth, y + rowHeight*1 );
volKnob->setFixedSize( 21, 21 );
volKnob->setHintText( tr( "Osc %1 volume:" ).arg(

View File

@@ -37,7 +37,6 @@ class QPixmap;
class knob;
class notePlayHandle;
class pixmapButton;
class volumeKnob;
class oscillatorObject : public model
@@ -146,7 +145,7 @@ private:
struct oscillatorKnobs
{
oscillatorKnobs( volumeKnob * v,
oscillatorKnobs( knob * v,
knob * o,
knob * p,
knob * dt ) :
@@ -160,7 +159,7 @@ private:
{
}
volumeKnob * m_volKnob;
knob * m_volKnob;
knob * m_oscKnob;
knob * m_panKnob;
knob * m_detuneKnob;

View File

@@ -38,7 +38,6 @@
#include "sample_buffer.h"
#include "song_editor.h"
#include "tooltip.h"
#include "volume_knob.h"
#undef SINGLE_SOURCE_COMPILE
@@ -578,7 +577,8 @@ tripleOscillatorView::tripleOscillatorView( instrument * _instrument,
int knob_y = osc_y + i * osc_h;
// setup volume-knob
volumeKnob * vk = new volumeKnob( knobStyled, this );
knob * vk = new knob( knobStyled, this );
vk->setVolumeKnob( TRUE );
vk->setFixedSize( 28, 35 );
vk->move( 6, knob_y );
vk->setHintText( tr( "Osc %1 volume:" ).arg(

View File

@@ -38,7 +38,6 @@ class knob;
class notePlayHandle;
class pixmapButton;
class sampleBuffer;
class volumeKnob;
const int NUM_OF_OSCILLATORS = 3;
@@ -157,7 +156,7 @@ private:
struct oscillatorKnobs
{
oscillatorKnobs( volumeKnob * v,
oscillatorKnobs( knob * v,
knob * p,
knob * c,
knob * fl,
@@ -180,7 +179,7 @@ private:
oscillatorKnobs()
{
}
volumeKnob * m_volKnob;
knob * m_volKnob;
knob * m_panKnob;
knob * m_coarseKnob;
knob * m_fineLeftKnob;

View File

@@ -38,7 +38,6 @@
#include "string_container.h"
#include "templates.h"
#include "volume.h"
#include "volume_knob.h"
#include "song.h"
#undef SINGLE_SOURCE_COMPILE
@@ -362,7 +361,8 @@ vibedView::vibedView( instrument * _instrument,
"artwork" ) );
setPalette( pal );
m_volumeKnob = new volumeKnob( knobBright_26, this );
m_volumeKnob = new knob( knobBright_26, this );
m_volumeKnob->setVolumeKnob( TRUE );
m_volumeKnob->move( 103, 142 );
m_volumeKnob->setHintText( tr( "Volume:" ) + " ", "" );
m_volumeKnob->setWhatsThis( tr( "The 'V' knob sets the volume "

View File

@@ -31,7 +31,6 @@
#include "knob.h"
#include "pixmap_button.h"
#include "led_checkbox.h"
#include "volume_knob.h"
#include "nine_button_selector.h"
class vibedView;
@@ -110,7 +109,7 @@ private:
knob * m_pickKnob;
knob * m_pickupKnob;
knob * m_stiffnessKnob;
volumeKnob * m_volumeKnob;
knob * m_volumeKnob;
knob * m_panKnob;
knob * m_detuneKnob;
knob * m_randomKnob;

View File

@@ -29,6 +29,7 @@
#include "automatable_model.h"
#include "automation_pattern.h"
#include "automation_editor.h"
#include "controller_connection.h"
float automatableModel::__copiedValue = 0;
@@ -410,11 +411,28 @@ void automatableModel::unlinkModels( automatableModel * _model1,
void automatableModel::initAutomationPattern( void )
{
m_automationPattern = new automationPattern( NULL, this );
}
void automatableModel::setControllerConnection( controllerConnection * _c )
{
m_controllerConnection = _c;
if( _c )
{
m_automationPattern = new automationPattern( NULL, this );
QObject::connect( m_controllerConnection,
SIGNAL( valueChanged() ),
this, SIGNAL( dataChanged() ) );
emit dataChanged();
}
}
automationPattern * automatableModel::getAutomationPattern( void )
{

View File

@@ -29,6 +29,7 @@
#include "instrument_sound_shaping.h"
#include "basic_filters.h"
#include "embed.h"
#include "engine.h"
#include "envelope_and_lfo_parameters.h"

View File

@@ -27,11 +27,11 @@
#include <QtCore/QFileInfo>
#include <QtCore/QLocale>
#include <QtCore/QTime>
#include <QtCore/QTimer>
#include <QtCore/QTranslator>
#include <QtGui/QApplication>
#include <QtGui/QBitmap>
#include <QtGui/QDesktopWidget>
#include <QtGui/QPainter>
#include <QtGui/QSplashScreen>
@@ -46,7 +46,6 @@
#include "config_mgr.h"
#include "project_renderer.h"
#include "song.h"
#include "gui_templates.h"
#include "lmms_style.h"
#warning TODO: move somewhere else
@@ -351,7 +350,8 @@ int main( int argc, char * * argv )
p.end();
QSplashScreen * ss = new QSplashScreen( pm );
ss->setMask( splash.alphaChannel().createMaskFromColor( QColor( 0, 0, 0 ) ) );
ss->setMask( splash.alphaChannel().createMaskFromColor(
QColor( 0, 0, 0 ) ) );
ss->show();
qApp->processEvents();
@@ -368,19 +368,7 @@ int main( int argc, char * * argv )
engine::getSong()->createNewProject();
}
// MDI-mode?
if( engine::getMainWindow()->workspace() != NULL )
{
// then maximize
engine::getMainWindow()->showMaximized();
}
else
{
// otherwise arrange at top-left edge of screen
engine::getMainWindow()->show();
engine::getMainWindow()->move( 0, 0 );
engine::getMainWindow()->resize( 200, 500 );
}
engine::getMainWindow()->showMaximized();
delete ss;
}
@@ -392,10 +380,11 @@ int main( int argc, char * * argv )
// create renderer
projectRenderer * r = new projectRenderer( qs, os, eff,
render_out + QString( ( eff == projectRenderer::WaveFile ) ?
"wav" : "ogg" ) );
render_out +
QString( ( eff == projectRenderer::WaveFile ) ?
"wav" : "ogg" ) );
QCoreApplication::instance()->connect( r, SIGNAL( finished() ),
SLOT( quit() ) );
SLOT( quit() ) );
// timer for progress-updates
QTimer * t = new QTimer( r );

View File

@@ -27,6 +27,7 @@
#include "note_play_handle.h"
#include "basic_filters.h"
#include "config_mgr.h"
#include "detuning_helper.h"
#include "instrument_sound_shaping.h"

View File

@@ -47,6 +47,7 @@
#include <QtGui/QPainter>
#include "automation_pattern.h"
#include "caption_menu.h"
#include "embed.h"
#include "gui_templates.h"

View File

@@ -42,7 +42,7 @@
/*
QPixmap * surroundArea::s_backgroundArtwork = NULL;
@@ -176,7 +176,7 @@ void surroundArea::mouseReleaseEvent( QMouseEvent * )
model()->addJournalEntryFromOldToCurVal();
QApplication::restoreOverrideCursor();
}
*/

View File

@@ -24,21 +24,16 @@
#include <QtGui/QKeyEvent>
#include <QtGui/QLabel>
#include <QtGui/QLayout>
#include <QtGui/QMdiArea>
#include "bb_editor.h"
#include "bb_track_container.h"
#include "bb_track.h"
#include "combobox.h"
#include "embed.h"
#include "engine.h"
#include "main_window.h"
#include "name_label.h"
#include "song.h"
#include "templates.h"
#include "tool_button.h"
#include "tooltip.h"
@@ -109,27 +104,12 @@ bbEditor::bbEditor( bbTrackContainer * _tc ) :
tb_layout->addWidget( l );
tb_layout->addSpacing( 15 );
if( engine::getMainWindow()->workspace() != NULL )
{
engine::getMainWindow()->workspace()->addSubWindow( this );
parentWidget()->setAttribute( Qt::WA_DeleteOnClose, FALSE );
parentWidget()->layout()->setSizeConstraint(
QLayout::SetMinimumSize );
}
QWidget * w = ( parentWidget() != NULL ) ? parentWidget() : this;
if( engine::getMainWindow()->workspace() != NULL )
{
w->resize( minimumWidth(), 300 );
w->move( 10, 340 );
}
else
{
resize( minimumWidth(), 300 );
w->move( 210, 340 );
}
w->show();
engine::getMainWindow()->workspace()->addSubWindow( this );
parentWidget()->setAttribute( Qt::WA_DeleteOnClose, FALSE );
parentWidget()->layout()->setSizeConstraint( QLayout::SetMinimumSize );
parentWidget()->resize( minimumWidth(), 300 );
parentWidget()->move( 10, 340 );
parentWidget()->show();
setModel( _tc );

View File

@@ -61,12 +61,6 @@ public:
{
QPainter p( this );
p.fillRect( rect(), QColor( 72, 76, 88 ) );
/* p.setPen( QColor( 144, 152, 176 ) );
p.drawLine( 0, 0, width()-1, 0 );
p.drawLine( 0, 0, 0, height()-1 );
p.setPen( QColor( 36, 38, 44 ) );
p.drawLine( 0, height()-1, width()-1, height()-1 );
p.drawLine( width()-1, 0, width()-1, height()-1 );*/
p.setPen( QColor( 40, 42, 48 ) );
p.drawRect( 0, 0, width()-2, height()-2 );
p.setPen( QColor( 108, 114, 132 ) );
@@ -222,6 +216,7 @@ fxMixerView::fxMixerView() :
// add ourself to workspace
engine::getMainWindow()->workspace()->addSubWindow( this );
parentWidget()->setAttribute( Qt::WA_DeleteOnClose, FALSE );
parentWidget()->move( 10, 200 );
// we want to receive dataChanged-signals in order to update
setModel( m );

View File

@@ -71,9 +71,6 @@ mainWindow::mainWindow( void ) :
{
setAttribute( Qt::WA_DeleteOnClose );
bool no_mdi = configManager::inst()->value( "app", "gimplikewindows"
).toInt();
QWidget * main_widget = new QWidget( this );
QVBoxLayout * vbox = new QVBoxLayout( main_widget );
vbox->setSpacing( 0 );
@@ -131,15 +128,10 @@ mainWindow::mainWindow( void ) :
embed::getIconPixmap( "root" ),
splitter ), ++id );
if( no_mdi == FALSE )
{
m_workspace = new QMdiArea( splitter );
m_workspace->setBackground( Qt::NoBrush );
m_workspace->setHorizontalScrollBarPolicy(
Qt::ScrollBarAsNeeded );
m_workspace->setVerticalScrollBarPolicy(
Qt::ScrollBarAsNeeded );
}
m_workspace = new QMdiArea( splitter );
m_workspace->setBackground( Qt::NoBrush );
m_workspace->setHorizontalScrollBarPolicy( Qt::ScrollBarAsNeeded );
m_workspace->setVerticalScrollBarPolicy( Qt::ScrollBarAsNeeded );
hbox->addWidget( side_bar );
hbox->addWidget( splitter );
@@ -733,31 +725,16 @@ void mainWindow::help( void )
void mainWindow::toggleWindow( QWidget * _w )
{
if( m_workspace )
if( m_workspace->activeSubWindow() != _w->parentWidget()
|| _w->parentWidget()->isHidden() )
{
if( m_workspace->activeSubWindow() != _w->parentWidget()
|| _w->parentWidget()->isHidden() )
{
_w->parentWidget()->show();
_w->show();
_w->setFocus();
}
else
{
_w->parentWidget()->hide();
}
_w->parentWidget()->show();
_w->show();
_w->setFocus();
}
else
{
if( _w->isHidden() )
{
_w->show();
_w->setFocus();
}
else
{
_w->hide();
}
_w->parentWidget()->hide();
}
}
@@ -926,10 +903,7 @@ void mainWindow::showTool( QAction * _idx )
{
pluginView * p = m_tools[m_toolsMenu->actions().indexOf( _idx )];
p->show();
if( m_workspace )
{
p->parentWidget()->show();
}
p->parentWidget()->show();
p->setFocus();
}

View File

@@ -89,11 +89,6 @@ setupDialog::setupDialog( ConfigTabs _tab_to_open ) :
"framesperaudiobuffer" ).toInt() ),
m_toolTips( !configManager::inst()->value( "tooltips",
"disabled" ).toInt() ),
m_classicalKnobUsability( configManager::inst()->value( "knobs",
"classicalusability" ).toInt() ),
m_MDI( !configManager::inst()->value( "app",
"gimplikewindows" ).toInt() ),
m_wizard( !configManager::inst()->value( "app", "nowizard" ).toInt() ),
m_warnAfterSetup( !configManager::inst()->value( "app",
"nomsgaftersetup" ).toInt() ),
m_displaydBV( configManager::inst()->value( "app",
@@ -178,7 +173,7 @@ setupDialog::setupDialog( ConfigTabs _tab_to_open ) :
tabWidget * misc_tw = new tabWidget( tr( "MISC" ), general );
misc_tw->setFixedHeight( 164 );
misc_tw->setFixedHeight( 120 );
ledCheckBox * enable_tooltips = new ledCheckBox(
tr( "Enable tooltips" ),
@@ -189,38 +184,10 @@ setupDialog::setupDialog( ConfigTabs _tab_to_open ) :
this, SLOT( toggleToolTips( bool ) ) );
ledCheckBox * classical_knob_usability = new ledCheckBox(
tr( "Classical knob usability (move "
"cursor around knob to change "
"value)" ), misc_tw );
classical_knob_usability->move( 10, 36 );
classical_knob_usability->setChecked( m_classicalKnobUsability );
connect( classical_knob_usability, SIGNAL( toggled( bool ) ),
this, SLOT( toggleKnobUsability( bool ) ) );
ledCheckBox * mdi_windows = new ledCheckBox(
tr( "Multiple Document Interface" ),
misc_tw );
mdi_windows->move( 10, 54 );
mdi_windows->setChecked( m_MDI );
connect( mdi_windows, SIGNAL( toggled( bool ) ),
this, SLOT( toggleMdiWindows( bool ) ) );
ledCheckBox * wizard = new ledCheckBox(
tr( "Show wizard after up-/downgrade" ),
misc_tw );
wizard->move( 10, 72 );
wizard->setChecked( m_wizard );
connect( wizard, SIGNAL( toggled( bool ) ),
this, SLOT( toggleWizard( bool ) ) );
ledCheckBox * restart_msg = new ledCheckBox(
tr( "Show restart warning after changing settings" ),
misc_tw );
restart_msg->move( 10, 90 );
restart_msg->move( 10, 36 );
restart_msg->setChecked( m_warnAfterSetup );
connect( restart_msg, SIGNAL( toggled( bool ) ),
this, SLOT( toggleWarnAfterSetup( bool ) ) );
@@ -228,7 +195,7 @@ setupDialog::setupDialog( ConfigTabs _tab_to_open ) :
ledCheckBox * dbv = new ledCheckBox( tr( "Display volume as dBV " ),
misc_tw );
dbv->move( 10, 108 );
dbv->move( 10, 54 );
dbv->setChecked( m_displaydBV );
connect( dbv, SIGNAL( toggled( bool ) ),
this, SLOT( toggleDisplaydBV( bool ) ) );
@@ -237,7 +204,7 @@ setupDialog::setupDialog( ConfigTabs _tab_to_open ) :
ledCheckBox * mmpz = new ledCheckBox(
tr( "Compress project files per default" ),
misc_tw );
mmpz->move( 10, 126 );
mmpz->move( 10, 72 );
mmpz->setChecked( m_MMPZ );
connect( mmpz, SIGNAL( toggled( bool ) ),
this, SLOT( toggleMMPZ( bool ) ) );
@@ -245,7 +212,7 @@ setupDialog::setupDialog( ConfigTabs _tab_to_open ) :
ledCheckBox * hqaudio = new ledCheckBox(
tr( "HQ-mode for output audio-device" ),
misc_tw );
hqaudio->move( 10, 144 );
hqaudio->move( 10, 90 );
hqaudio->setChecked( m_hqAudioDev );
connect( hqaudio, SIGNAL( toggled( bool ) ),
this, SLOT( toggleHQAudioDev( bool ) ) );
@@ -436,13 +403,7 @@ setupDialog::setupDialog( ConfigTabs _tab_to_open ) :
tabWidget * smp_supp_tw = new tabWidget( tr( "SMP support" ).toUpper(),
performance );
smp_supp_tw->setFixedHeight( 200 );
perf_layout->addWidget( ui_fx_tw );
perf_layout->addSpacing( 15 );
perf_layout->addWidget( smp_supp_tw );
perf_layout->addStretch();
@@ -683,12 +644,6 @@ void setupDialog::accept( void )
m_midiIfaceNames[m_midiInterfaces->currentText()] );
configManager::inst()->setValue( "tooltips", "disabled",
QString::number( !m_toolTips ) );
configManager::inst()->setValue( "knobs", "classicalusability",
QString::number( m_classicalKnobUsability ) );
configManager::inst()->setValue( "app", "gimplikewindows",
QString::number( !m_MDI ) );
configManager::inst()->setValue( "app", "nowizard",
QString::number( !m_wizard ) );
configManager::inst()->setValue( "app", "nomsgaftersetup",
QString::number( !m_warnAfterSetup ) );
configManager::inst()->setValue( "app", "displaydbv",
@@ -805,30 +760,6 @@ void setupDialog::toggleToolTips( bool _enabled )
void setupDialog::toggleKnobUsability( bool _classical )
{
m_classicalKnobUsability = _classical;
}
void setupDialog::toggleMdiWindows( bool _enabled )
{
m_MDI = _enabled;
}
void setupDialog::toggleWizard( bool _enabled )
{
m_wizard = _enabled;
}
void setupDialog::toggleWarnAfterSetup( bool _enabled )
{
m_warnAfterSetup = _enabled;

View File

@@ -25,44 +25,23 @@
*/
#include <QtCore/QFile>
#include <QtCore/QFileInfo>
#include <QtGui/QAction>
#include <QtGui/QButtonGroup>
#include <QtGui/QFileDialog>
#include <QtGui/QKeyEvent>
#include <QtGui/QLabel>
#include <QtGui/QLayout>
#include <QtGui/QMdiArea>
#include <QtGui/QMessageBox>
#include <QtGui/QScrollBar>
#include <QtGui/QStatusBar>
#include <math.h>
#include "song_editor.h"
#include "automatable_slider.h"
#include "bb_editor.h"
#include "bb_track.h"
#include "combobox.h"
#include "config_mgr.h"
#include "cpuload_widget.h"
#include "embed.h"
#include "envelope_and_lfo_parameters.h"
#include "import_filter.h"
#include "instrument_track.h"
#include "lcd_spinbox.h"
#include "combobox.h"
#include "main_window.h"
#include "meter_dialog.h"
#include "midi_client.h"
#include "mmp.h"
#include "note_play_handle.h"
#include "pattern.h"
#include "piano_roll.h"
#include "project_journal.h"
#include "project_notes.h"
#include "rename_dialog.h"
#include "templates.h"
#include "text_float.h"
#include "timeline.h"
#include "tool_button.h"
@@ -351,25 +330,11 @@ songEditor::songEditor( song * _song, songEditor * & _engine_ptr ) :
this, SLOT( scrolled( int ) ) );
if( engine::getMainWindow()->workspace() != NULL )
{
engine::getMainWindow()->workspace()->addSubWindow( this );
parentWidget()->setAttribute( Qt::WA_DeleteOnClose, FALSE );
}
QWidget * w = ( parentWidget() != NULL ) ? parentWidget() : this;
if( engine::getMainWindow()->workspace() != NULL )
{
w->resize( 680, 300 );
w->move( 10, 10 );
}
else
{
resize( 580, 300 );
w->move( 210, 10 );
}
w->show();
engine::getMainWindow()->workspace()->addSubWindow( this );
parentWidget()->setAttribute( Qt::WA_DeleteOnClose, FALSE );
parentWidget()->resize( 680, 300 );
parentWidget()->move( 10, 10 );
parentWidget()->show();
m_updateTimer.start( 1000 / 20, this ); // 20 fps
}

View File

@@ -71,16 +71,13 @@ controllerRackView::controllerRackView( ) :
setModel( engine::getSong() );
if( engine::getMainWindow()->workspace() != NULL )
{
engine::getMainWindow()->workspace()->addSubWindow( this );
parentWidget()->setAttribute( Qt::WA_DeleteOnClose, FALSE );
}
engine::getMainWindow()->workspace()->addSubWindow( this );
parentWidget()->setAttribute( Qt::WA_DeleteOnClose, FALSE );
}
controllerRackView::~controllerRackView()
{
clear();

View File

@@ -3,9 +3,6 @@
/*
* knob.cpp - powerful knob-widget
*
* This file is partly based on the knob-widget of the Qwt Widget Library by
* Josef Wilgen.
*
* Copyright (c) 2004-2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
@@ -63,13 +60,14 @@ textFloat * knob::s_textFloat = NULL;
knob::knob( int _knob_num, QWidget * _parent, const QString & _name ) :
QWidget( _parent ),
floatModelView( new knobModel( 0, 0, 0, 1, NULL, _name, TRUE ) ),
m_knobNum( _knob_num ),
m_label( "" ),
m_knobPixmap( NULL ),
m_volumeKnob( FALSE ),
m_mouseOffset( 0.0f ),
m_buttonPressed( FALSE ),
m_knobPixmap( NULL ),
m_outerColor( NULL ),
m_angle( -10 ),
m_knobNum( _knob_num ),
m_label( "" )
m_outerColor( NULL )
{
if( s_textFloat == NULL )
{
@@ -373,40 +371,6 @@ void knob::drawKnob( QPainter * _p )
float knob::getValue( const QPoint & _p )
{
if( configManager::inst()->value( "knobs", "classicalusability"
).toInt() )
{
const float dx = float( ( rect().x() + rect().width() / 2 ) -
_p.x() );
const float dy = float( ( rect().y() + rect().height() / 2 ) -
_p.y() );
const float arc = atan2( -dx, dy ) * 180.0 / M_PI;
float new_value = 0.5 * ( model()->minValue() +
model()->maxValue() ) +
arc * ( model()->maxValue() -
model()->minValue() ) /
m_totalAngle;
const float oneTurn = tAbs<float>( model()->maxValue() -
model()->minValue() ) *
360.0 / m_totalAngle;
const float eqValue = model()->value() + m_mouseOffset;
if( tAbs<float>( new_value - eqValue ) > 0.5 * oneTurn )
{
if( new_value < eqValue )
{
new_value += oneTurn;
}
else
{
new_value -= oneTurn;
}
}
return( new_value );
}
if( engine::getMainWindow()->isShiftPressed() )
{
return( ( _p.y() - m_origMousePos.y() ) * model()->step<float>() );
@@ -476,23 +440,10 @@ void knob::mousePressEvent( QMouseEvent * _me )
const QPoint & p = _me->pos();
m_origMousePos = p;
if( configManager::inst()->value( "knobs",
"classicalusability").toInt() )
{
m_mouseOffset = getValue( p ) - model()->value();
}
emit sliderPressed();
if( !configManager::inst()->value( "knobs", "classicalusability"
).toInt() )
{
QApplication::setOverrideCursor( Qt::BlankCursor );
}
// s_textFloat->reparent( this );
s_textFloat->setText( m_description +
QString::number(
model()->value() ) +
m_unit );
QApplication::setOverrideCursor( Qt::BlankCursor );
s_textFloat->setText( displayValue() );
s_textFloat->moveGlobal( this,
QPoint( width() + 2, 0 ) );
s_textFloat->show();
@@ -531,17 +482,10 @@ void knob::mouseMoveEvent( QMouseEvent * _me )
{
setPosition( _me->pos() );
emit sliderMoved( model()->value() );
// emit valueChanged();
if( !configManager::inst()->value( "knobs",
"classicalusability").toInt() )
{
QCursor::setPos( mapToGlobal( m_origMousePos ) );
}
QCursor::setPos( mapToGlobal( m_origMousePos ) );
}
s_textFloat->setText( m_description +
QString::number( model()->value() ) +
m_unit );
s_textFloat->setText( displayValue() );
}
@@ -554,17 +498,12 @@ void knob::mouseReleaseEvent( QMouseEvent * /* _me*/ )
if( m_buttonPressed )
{
m_buttonPressed = TRUE;
buttonReleased();
}
m_mouseOffset = 0;
emit sliderReleased();
if( !configManager::inst()->value( "knobs", "classicalusability"
).toInt() )
{
QApplication::restoreOverrideCursor();
}
QApplication::restoreOverrideCursor();
s_textFloat->hide();
}
@@ -609,23 +548,11 @@ void knob::wheelEvent( QWheelEvent * _we )
model()->incValue( inc );
s_textFloat->setText( m_description +
QString::number( model()->value() ) +
m_unit );
s_textFloat->setText( displayValue() );
s_textFloat->moveGlobal( this, QPoint( width() + 2, 0 ) );
s_textFloat->setVisibilityTimeOut( 1000 );
emit sliderMoved( model()->value() );
// emit valueChanged();
}
void knob::buttonReleased( void )
{
// emit valueChanged( model()->value() );
// emit valueChanged();
}
@@ -633,71 +560,47 @@ void knob::buttonReleased( void )
void knob::setPosition( const QPoint & _p )
{
if( configManager::inst()->value( "knobs", "classicalusability"
).toInt() )
{
model()->setValue( getValue( _p ) - m_mouseOffset );
}
else
{
model()->setValue( model()->value() - getValue( _p ) );
}
model()->setValue( model()->value() - getValue( _p ) );
}
/*void knob::reset( void )
{
model()->setValue( model()->initValue() );
s_textFloat->setText( m_description +
QString::number( model()->value() ) +
m_unit );
s_textFloat->moveGlobal( this, QPoint( width() + 2, 0 ) );
s_textFloat->setVisibilityTimeOut( 1000 );
}
void knob::copyValue( void )
{
s_copiedValue = model()->value();
}
void knob::pasteValue( void )
{
model()->setValue( s_copiedValue );
s_textFloat->setText( m_description +
QString::number( model()->value() ) +
m_unit );
s_textFloat->moveGlobal( this, QPoint( width() + 2, 0 ) );
s_textFloat->setVisibilityTimeOut( 1000 );
}*/
void knob::enterValue( void )
{
bool ok;
float new_val = QInputDialog::getDouble(
this,
accessibleName(),
tr( "Please enter a new value between "
float new_val;
if( isVolumeKnob() &&
configManager::inst()->value( "app", "displaydbv" ).toInt() )
{
new_val = QInputDialog::getDouble(
this, accessibleName(),
tr( "Please enter a new value between "
"-96.0 dBV and 6.0 dBV:" ),
20.0 * log10( model()->value() / 100.0 ),
-96.0, 6.0, 4, &ok );
if( new_val <= -96.0 )
{
new_val = 0.0f;
}
else
{
new_val = pow( 10.0, ( new_val / 20.0 ) ) * 100.0;
}
}
else
{
new_val = QInputDialog::getDouble(
this, accessibleName(),
tr( "Please enter a new value between "
"%1 and %2:" ).
arg( model()->minValue() ).
arg( model()->maxValue() ),
model()->value(),
model()->minValue(),
model()->maxValue(),
4, &ok );
model()->maxValue(), 4, &ok );
}
if( ok )
{
model()->setValue( new_val );
@@ -719,6 +622,22 @@ void knob::friendlyUpdate( void )
QString knob::displayValue( void ) const
{
if( isVolumeKnob() &&
configManager::inst()->value( "app", "displaydbv" ).toInt() )
{
return( m_description + QString( " %1 dBV" ).arg(
20.0 * log10( model()->value() / 100.0 ),
3, 'f', 2 ) );
}
return( m_description + QString( " %1%" ).arg(
model()->value(), 3, 'f', 0 ) + m_unit );
}
void knob::doConnections( void )
{
if( model() != NULL )

View File

@@ -120,7 +120,7 @@ void tempoSyncKnobModel::calculateTempoSyncTime( bpm_t _bpm )
setValue( 60000.0 / ( _bpm * conversionFactor * m_scale ) );
setJournalling( journalling );
}
if( m_tempoSyncMode != m_tempoLastSyncMode )
{
emit syncModeChanged( m_tempoSyncMode );
@@ -225,7 +225,6 @@ tempoSyncKnob::~tempoSyncKnob()
{
if( m_custom )
{
// m_custom->deleteLater();
delete m_custom->parentWidget();
}
}
@@ -242,6 +241,8 @@ void tempoSyncKnob::modelChanged( void )
m_custom->setModel( &model()->m_custom );
connect( model(), SIGNAL( syncModeChanged( tempoSyncMode ) ),
this, SLOT( updateDescAndIcon() ) );
connect( this, SIGNAL( sliderMoved( float ) ),
model(), SLOT( disableSync() ) );
updateDescAndIcon();
}
@@ -327,24 +328,6 @@ void tempoSyncKnob::contextMenuEvent( QContextMenuEvent * )
void tempoSyncKnob::mouseMoveEvent( QMouseEvent * _me )
{
knob::mouseMoveEvent( _me );
model()->setSyncMode( tempoSyncKnobModel::SyncNone );
}
void tempoSyncKnob::wheelEvent( QWheelEvent * _we )
{
knob::wheelEvent( _we );
model()->setSyncMode( tempoSyncKnobModel::SyncNone );
}
void tempoSyncKnob::updateDescAndIcon( void )
{
if( model()->m_tempoSyncMode )

View File

@@ -1,225 +0,0 @@
#ifndef SINGLE_SOURCE_COMPILE
/*
* volume_knob.cpp - defines a knob that display it's value as either a
* percentage or in dBV.
*
* Copyright (c) 2006-2008 Danny McRae <khjklujn/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program (see COPYING); if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA.
*
*/
#include <QtGui/QApplication>
#include <QtGui/QInputDialog>
#include <QtGui/QMouseEvent>
#include <math.h>
#include "volume_knob.h"
#include "main_window.h"
#include "config_mgr.h"
#include "engine.h"
#include "text_float.h"
#include "string_pair_drag.h"
volumeKnob::volumeKnob( int _knob_num, QWidget * _parent,
const QString & _name ) :
knob( _knob_num, _parent, _name )
{
}
volumeKnob::~volumeKnob()
{
}
//! Mouse press event handler
void volumeKnob::mousePressEvent( QMouseEvent * _me )
{
if( _me->button() == Qt::LeftButton &&
engine::getMainWindow()->isCtrlPressed() == FALSE )
{
model()->prepareJournalEntryFromOldVal();
const QPoint & p = _me->pos();
m_origMousePos = p;
if( configManager::inst()->value( "knobs",
"classicalusability").toInt() )
{
m_mouseOffset = getValue( p ) - model()->value();
}
emit sliderPressed();
if( !configManager::inst()->value( "knobs", "classicalusability"
).toInt() )
{
QApplication::setOverrideCursor( Qt::BlankCursor );
}
QString val;
if( configManager::inst()->value( "app", "displaydbv" ).toInt() )
{
val = QString( " %1 dBV" ).arg(
20.0 * log10( model()->value() / 100.0 ),
3, 'f', 2 );
}
else
{
val = QString( " %1%" ).arg( model()->value(), 3, 'f', 0 );
}
s_textFloat->setText( m_description + val );
s_textFloat->moveGlobal( this,
QPoint( width() + 2, 0 ) );
s_textFloat->show();
m_buttonPressed = TRUE;
}
else if( _me->button() == Qt::LeftButton &&
engine::getMainWindow()->isCtrlPressed() == TRUE )
{
new stringPairDrag( "float_value", QString::number( model()->value() ),
QPixmap(), this );
}
else if( _me->button() == Qt::MidButton )
{
model()->reset();
}
}
void volumeKnob::mouseMoveEvent( QMouseEvent * _me )
{
// TODO: merge code with knob::mouseMoveEvent
if( m_buttonPressed == TRUE )
{
setPosition( _me->pos() );
emit sliderMoved( model()->value() );
// emit valueChanged();
if( !configManager::inst()->value( "knobs",
"classicalusability").toInt() )
{
QCursor::setPos( mapToGlobal( m_origMousePos ) );
}
}
QString val;
if( configManager::inst()->value( "app", "displaydbv" ).toInt() )
{
val = QString( " %1 dBV" ).arg(
20.0 * log10( model()->value() / 100.0 ),
3, 'f', 2 );
}
else
{
val = QString( " %1%" ).arg( model()->value(), 3, 'f', 0 );
}
s_textFloat->setText( m_description + val );
}
void volumeKnob::wheelEvent( QWheelEvent * _we )
{
// TODO: merge code with knob::mouseMoveEvent
_we->accept();
const int inc = ( _we->delta() > 0 ) ? 1 : -1;
model()->incValue( inc );
QString val;
if( configManager::inst()->value( "app", "displaydbv" ).toInt() )
{
val = QString( " %1 dBV" ).arg(
20.0 * log10( model()->value() / 100.0 ),
3, 'f', 2 );
}
else
{
val = QString( " %1%" ).arg( model()->value(), 3, 'f', 0 );
}
s_textFloat->setText( m_description + val );
s_textFloat->moveGlobal( this, QPoint( width() + 2, 0 ) );
s_textFloat->setVisibilityTimeOut( 1000 );
emit sliderMoved( model()->value() );
// emit valueChanged();
}
void volumeKnob::enterValue( void )
{
bool ok;
float new_val;
if( configManager::inst()->value( "app", "displaydbv" ).toInt() )
{
new_val = QInputDialog::getDouble(
this, accessibleName(),
tr( "Please enter a new value between "
"-96.0 dBV and 6.0 dBV:" ),
20.0 * log10( model()->value() / 100.0 ),
-96.0, 6.0, 4, &ok );
if( new_val <= -96.0 )
{
new_val = 0.0f;
}
else
{
new_val = pow( 10.0, ( new_val / 20.0 ) ) * 100.0;
}
}
else
{
new_val = QInputDialog::getDouble(
this, accessibleName(),
tr( "Please enter a new value between "
"%1 and %2:" ).
arg( model()->minValue() ).
arg( model()->maxValue() ),
model()->value(),
model()->minValue(),
model()->maxValue(), 4, &ok );
}
if( ok )
{
model()->setValue( new_val );
}
}
#include "volume_knob.moc"
#endif

View File

@@ -46,6 +46,7 @@
#include "audio_port.h"
#include "automation_pattern.h"
#include "bb_track.h"
#include "config_mgr.h"
#include "debug.h"
#include "effect_chain.h"
@@ -75,7 +76,6 @@
#include "surround_area.h"
#include "tab_widget.h"
#include "tooltip.h"
#include "volume_knob.h"
@@ -847,8 +847,8 @@ instrumentTrackView::instrumentTrackView( instrumentTrack * _it,
setFixedHeight( 32 );
// creation of widgets for track-settings-widget
m_tswVolumeKnob = new volumeKnob( knobSmall_17,
getTrackSettingsWidget() );
m_tswVolumeKnob = new knob( knobSmall_17, getTrackSettingsWidget() );
m_tswVolumeKnob->setVolumeKnob( TRUE );
m_tswVolumeKnob->setModel( &_it->m_volumeModel );
m_tswVolumeKnob->setHintText( tr( "Volume:" ) + " ", "%" );
m_tswVolumeKnob->move( 4, 4 );
@@ -1112,8 +1112,9 @@ instrumentTrackWindow::instrumentTrackWindow( instrumentTrackView * _itv ) :
// setup volume-knob
m_volumeKnob = new volumeKnob( knobBright_26, m_generalSettingsWidget,
m_volumeKnob = new knob( knobBright_26, m_generalSettingsWidget,
tr( "Instrument volume" ) );
m_volumeKnob->setVolumeKnob( TRUE );
m_volumeKnob->move( 10, 44 );
m_volumeKnob->setHintText( tr( "Volume:" ) + " ", "%" );
m_volumeKnob->setLabel( tr( "VOL" ) );