dropped Qt3-support and improved Qt4-support
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@547 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
220
ChangeLog
220
ChangeLog
@@ -1,3 +1,223 @@
|
||||
2007-08-26 Tobias Doerffel <tobydox/at/users/dot/sourceforge/dot/net>
|
||||
|
||||
* plugins/patman/patman.cpp:
|
||||
* plugins/patman/patman.h:
|
||||
* plugins/ladspa_effect/ladspa_effect.cpp:
|
||||
* plugins/ladspa_effect/ladspa_control_dialog.cpp:
|
||||
* plugins/ladspa_effect/ladspa_effect.h:
|
||||
* plugins/ladspa_effect/ladspa_control_dialog.h:
|
||||
* plugins/ladspa_effect/ladspa_subplugin_features.cpp:
|
||||
* plugins/organic/organic.cpp:
|
||||
* plugins/lb302/lb302.cpp:
|
||||
* plugins/bit_invader/graph.cpp:
|
||||
* plugins/bit_invader/bit_invader.cpp:
|
||||
* plugins/bit_invader/graph.h:
|
||||
* plugins/vst_effect/vst_effect.h:
|
||||
* plugins/vibed/graph.cpp:
|
||||
* plugins/vibed/impulse_editor.h:
|
||||
* plugins/vibed/nine_button_selector.h:
|
||||
* plugins/vibed/vibed.h:
|
||||
* plugins/vibed/graph.h:
|
||||
* plugins/vibed/string_container.h:
|
||||
* plugins/vibed/impulse_editor.cpp:
|
||||
* plugins/vibed/nine_button_selector.cpp:
|
||||
* plugins/vibed/vibed.cpp:
|
||||
* plugins/triple_oscillator/triple_oscillator.cpp:
|
||||
* plugins/singerbot/singerbot.h:
|
||||
* plugins/singerbot/singerbot.cpp:
|
||||
* plugins/live_tool/live_tool.cpp:
|
||||
* plugins/ladspa_base/ladspa_manager.cpp:
|
||||
* plugins/ladspa_base/ladspa_2_lmms.h:
|
||||
* plugins/ladspa_base/ladspa_manager.h:
|
||||
* plugins/ladspa_base/ladspa_control.cpp:
|
||||
* plugins/ladspa_base/ladspa_port_dialog.cpp:
|
||||
* plugins/ladspa_base/ladspa_control.h:
|
||||
* plugins/ladspa_base/ladspa_port_dialog.h:
|
||||
* plugins/ladspa_base/ladspa_2_lmms.cpp:
|
||||
* plugins/audio_file_processor/audio_file_processor.cpp:
|
||||
* plugins/audio_file_processor/audio_file_processor.h:
|
||||
* plugins/stk/mallets/mallets.cpp:
|
||||
* plugins/stk/mallets/mallets.h:
|
||||
* plugins/vestige/vestige.cpp:
|
||||
* plugins/vst_base/lvsl_client.cpp:
|
||||
* plugins/vst_base/lvsl_client.h:
|
||||
* plugins/kicker/kicker.cpp:
|
||||
* plugins/Makefile.am:
|
||||
* plugins/flp_import/flp_import.h:
|
||||
* plugins/flp_import/flp_import.cpp:
|
||||
* plugins/midi_import/midi_import.h:
|
||||
* plugins/midi_import/midi_import.cpp:
|
||||
* include/mmp.h:
|
||||
* include/knob.h:
|
||||
* include/cpuload_widget.h:
|
||||
* include/fade_button.h:
|
||||
* include/templates.h:
|
||||
* include/automatable_slider.h:
|
||||
* include/lcd_spinbox.h:
|
||||
* include/track.h:
|
||||
* include/spc_bg_hndl_widget.h:
|
||||
* include/note.h:
|
||||
* include/tool_button.h:
|
||||
* include/embed.h:
|
||||
* include/name_label.h:
|
||||
* include/midi_alsa_raw.h:
|
||||
* include/gui_templates.h:
|
||||
* include/visualization_widget.h:
|
||||
* include/tab_widget.h:
|
||||
* include/config_mgr.h:
|
||||
* include/midi_tab_widget.h:
|
||||
* include/import_filter.h:
|
||||
* include/mixer.h:
|
||||
* include/instrument_track.h:
|
||||
* include/audio_port.h:
|
||||
* include/instrument.h:
|
||||
* include/text_float.h:
|
||||
* include/piano_widget.h:
|
||||
* include/sample_buffer.h:
|
||||
* include/effect_select_dialog.h:
|
||||
* include/automation_pattern.h:
|
||||
* include/midi_mapper.h:
|
||||
* include/nstate_button.h:
|
||||
* include/plugin.h:
|
||||
* include/clipboard.h:
|
||||
* include/note_play_handle.h:
|
||||
* include/side_bar.h:
|
||||
* include/rack_view.h:
|
||||
* include/pattern.h:
|
||||
* include/string_pair_drag.h:
|
||||
* include/audio_file_device.h:
|
||||
* include/kmultitabbar.h:
|
||||
* include/file_browser.h:
|
||||
* include/base64.h:
|
||||
* include/audio_jack.h:
|
||||
* include/about_dialog.h:
|
||||
* include/piano_roll.h:
|
||||
* include/group_box.h:
|
||||
* include/envelope_tab_widget.h:
|
||||
* include/rubberband.h:
|
||||
* include/bb_track.h:
|
||||
* include/song_editor.h:
|
||||
* include/project_notes.h:
|
||||
* include/effect_tab_widget.h:
|
||||
* include/kmultitabbar-qt3.h:
|
||||
* include/automatable_button.h:
|
||||
* include/midi_alsa_seq.h:
|
||||
* include/tab_button.h:
|
||||
* include/journalling_object.h:
|
||||
* include/setup_dialog.h:
|
||||
* include/export_project_dialog.h:
|
||||
* include/rename_dialog.h:
|
||||
* include/pixmap_button.h:
|
||||
* include/tab_bar.h:
|
||||
* include/effect_label.h:
|
||||
* include/automatable_object_templates.h:
|
||||
* include/sample_track.h:
|
||||
* include/timeline.h:
|
||||
* include/surround_area.h:
|
||||
* include/main_window.h:
|
||||
* include/audio_device.h:
|
||||
* include/midi_client.h:
|
||||
* include/automatable_object.h:
|
||||
* include/automation_editor.h:
|
||||
* include/midi_port.h:
|
||||
* include/audio_sample_recorder.h:
|
||||
* include/bb_editor.h:
|
||||
* include/effect_chain.h:
|
||||
* include/arp_and_chords_tab_widget.h:
|
||||
* include/project_journal.h:
|
||||
* include/plugin_browser.h:
|
||||
* include/envelope_and_lfo_widget.h:
|
||||
* include/preset_preview_play_handle.h:
|
||||
* include/qt3support.h:
|
||||
* include/track_container.h:
|
||||
* include/combobox.h:
|
||||
* include/side_bar_widget.h:
|
||||
* include/play_handle.h:
|
||||
* include/qxembed.h:
|
||||
* include/xqmap.h:
|
||||
* configure.in:
|
||||
* src/audio/audio_file_device.cpp:
|
||||
* src/audio/audio_alsa.cpp:
|
||||
* src/audio/audio_oss.cpp:
|
||||
* src/audio/audio_jack.cpp:
|
||||
* src/midi/midi_client.cpp:
|
||||
* src/midi/midi_mapper.cpp:
|
||||
* src/midi/midi_oss.cpp:
|
||||
* src/midi/midi_alsa_seq.cpp:
|
||||
* src/midi/midi_alsa_raw.cpp:
|
||||
* src/lib/string_pair_drag.cpp:
|
||||
* src/lib/base64.cpp:
|
||||
* src/lib/mmp.cpp:
|
||||
* src/lib/journalling_object.cpp:
|
||||
* src/lib/sample_buffer.cpp:
|
||||
* src/lib/embed.cpp:
|
||||
* src/widgets/rack_plugin.cpp:
|
||||
* src/widgets/automatable_slider.cpp:
|
||||
* src/widgets/visualization_widget.cpp:
|
||||
* src/widgets/group_box.cpp:
|
||||
* src/widgets/lcd_spinbox.cpp:
|
||||
* src/widgets/rubberband.cpp:
|
||||
* src/widgets/tool_button.cpp:
|
||||
* src/widgets/combobox.cpp:
|
||||
* src/widgets/text_float.cpp:
|
||||
* src/widgets/tab_widget.cpp:
|
||||
* src/widgets/rack_view.cpp:
|
||||
* src/widgets/led_checkbox.cpp:
|
||||
* src/widgets/side_bar_widget.cpp:
|
||||
* src/widgets/project_notes.cpp:
|
||||
* src/widgets/volume_knob.cpp:
|
||||
* src/widgets/kmultitabbar.cpp:
|
||||
* src/widgets/qxembed.cpp:
|
||||
* src/widgets/rename_dialog.cpp:
|
||||
* src/widgets/pixmap_button.cpp:
|
||||
* src/widgets/nstate_button.cpp:
|
||||
* src/widgets/knob.cpp:
|
||||
* src/widgets/automatable_button.cpp:
|
||||
* src/widgets/tempo_sync_knob.cpp:
|
||||
* src/widgets/fade_button.cpp:
|
||||
* src/widgets/cpuload_widget.cpp:
|
||||
* src/widgets/tab_bar.cpp:
|
||||
* src/widgets/tooltip.cpp:
|
||||
* src/tracks/sample_track.cpp:
|
||||
* src/tracks/bb_track.cpp:
|
||||
* src/tracks/instrument_track.cpp:
|
||||
* src/tracks/pattern.cpp:
|
||||
* src/core/plugin.cpp:
|
||||
* src/core/arp_and_chords_tab_widget.cpp:
|
||||
* src/core/plugin_browser.cpp:
|
||||
* src/core/envelope_and_lfo_widget.cpp:
|
||||
* src/core/preset_preview_play_handle.cpp:
|
||||
* src/core/track_container.cpp:
|
||||
* src/core/config_mgr.cpp:
|
||||
* src/core/midi_tab_widget.cpp:
|
||||
* src/core/effect_control_dialog.cpp:
|
||||
* src/core/import_filter.cpp:
|
||||
* src/core/setup_dialog.cpp:
|
||||
* src/core/file_browser.cpp:
|
||||
* src/core/main.cpp:
|
||||
* src/core/mixer.cpp:
|
||||
* src/core/export_project_dialog.cpp:
|
||||
* src/core/about_dialog.cpp:
|
||||
* src/core/piano_roll.cpp:
|
||||
* src/core/track.cpp:
|
||||
* src/core/engine.cpp:
|
||||
* src/core/note.cpp:
|
||||
* src/core/timeline.cpp:
|
||||
* src/core/envelope_tab_widget.cpp:
|
||||
* src/core/surround_area.cpp:
|
||||
* src/core/piano_widget.cpp:
|
||||
* src/core/effect_select_dialog.cpp:
|
||||
* src/core/main_window.cpp:
|
||||
* src/core/song_editor.cpp:
|
||||
* src/core/automation_pattern.cpp:
|
||||
* src/core/name_label.cpp:
|
||||
* src/core/effect_tab_widget.cpp:
|
||||
* src/core/automation_editor.cpp:
|
||||
* src/core/bb_editor.cpp:
|
||||
* acinclude.m4:
|
||||
* Makefile.am:
|
||||
dropped Qt3-support and improved Qt4-support
|
||||
|
||||
2007-08-23 Tobias Doerffel <tobydox/at/users/dot/sourceforge/dot/net>
|
||||
|
||||
* configure.in:
|
||||
|
||||
19
Makefile.am
19
Makefile.am
@@ -69,7 +69,6 @@ lmms_MOC = \
|
||||
./file_browser.moc \
|
||||
./group_box.moc \
|
||||
./kmultitabbar.moc \
|
||||
./kmultitabbar-qt3.moc \
|
||||
./knob.moc \
|
||||
./lcd_spinbox.moc \
|
||||
./led_checkbox.moc \
|
||||
@@ -89,7 +88,6 @@ lmms_MOC = \
|
||||
./rack_plugin.moc \
|
||||
./rack_view.moc \
|
||||
./rubberband.moc \
|
||||
./qxembed.moc \
|
||||
./rename_dialog.moc \
|
||||
./sample_buffer.moc \
|
||||
./sample_play_handle.moc \
|
||||
@@ -188,11 +186,11 @@ lmms_SOURCES = \
|
||||
$(srcdir)/src/core/track_container.cpp \
|
||||
$(srcdir)/src/core/surround_area.cpp \
|
||||
$(srcdir)/src/core/timeline.cpp \
|
||||
$(srcdir)/src/lib/base64.cpp \
|
||||
$(srcdir)/src/lib/clipboard.cpp \
|
||||
$(srcdir)/src/lib/journalling_object.cpp \
|
||||
$(srcdir)/src/lib/project_journal.cpp \
|
||||
$(srcdir)/src/lib/project_version.cpp \
|
||||
$(srcdir)/src/lib/base64.cpp \
|
||||
$(srcdir)/src/lib/embed.cpp \
|
||||
$(srcdir)/src/lib/mmp.cpp \
|
||||
$(srcdir)/src/lib/oscillator.cpp \
|
||||
@@ -226,7 +224,6 @@ lmms_SOURCES = \
|
||||
$(srcdir)/src/widgets/rack_plugin.cpp \
|
||||
$(srcdir)/src/widgets/rack_view.cpp \
|
||||
$(srcdir)/src/widgets/rubberband.cpp \
|
||||
$(srcdir)/src/widgets/qxembed.cpp \
|
||||
$(srcdir)/src/widgets/rename_dialog.cpp \
|
||||
$(srcdir)/src/widgets/side_bar_widget.cpp \
|
||||
$(srcdir)/src/widgets/tab_bar.cpp \
|
||||
@@ -291,7 +288,6 @@ lmms_SOURCES = \
|
||||
$(srcdir)/include/gui_templates.h \
|
||||
$(srcdir)/include/surround_area.h \
|
||||
$(srcdir)/include/kmultitabbar.h \
|
||||
$(srcdir)/include/kmultitabbar-qt3.h \
|
||||
$(srcdir)/include/side_bar.h \
|
||||
$(srcdir)/include/side_bar_widget.h \
|
||||
$(srcdir)/include/track.h \
|
||||
@@ -312,7 +308,6 @@ lmms_SOURCES = \
|
||||
$(srcdir)/include/clipboard.h \
|
||||
$(srcdir)/include/types.h \
|
||||
$(srcdir)/include/update_event.h \
|
||||
$(srcdir)/include/qt3support.h \
|
||||
$(srcdir)/include/embed.h \
|
||||
$(srcdir)/include/timeline.h \
|
||||
$(srcdir)/include/config_mgr.h \
|
||||
@@ -374,9 +369,17 @@ lmms_SOURCES = \
|
||||
$(srcdir)/include/ladspa-1.1.h \
|
||||
$(srcdir)/include/sweep_oscillator.h \
|
||||
$(srcdir)/include/meter_dialog.h \
|
||||
$(srcdir)/include/qxembed.h \
|
||||
$(srcdir)/include/effect_lib.h \
|
||||
$(srcdir)/include/xqmap.h \
|
||||
$(srcdir)/plugins/ladspa_base/ladspa_base.cpp \
|
||||
$(srcdir)/plugins/ladspa_base/ladspa_port_dialog.cpp \
|
||||
$(srcdir)/plugins/ladspa_base/ladspa_2_lmms.cpp \
|
||||
$(srcdir)/plugins/ladspa_base/ladspa_manager.cpp \
|
||||
$(srcdir)/plugins/ladspa_base/ladspa_control.cpp \
|
||||
$(srcdir)/plugins/ladspa_base/ladspa_manager.h \
|
||||
$(srcdir)/plugins/ladspa_base/ladspa_2_lmms.h \
|
||||
$(srcdir)/plugins/ladspa_base/ladspa_control.h \
|
||||
$(srcdir)/plugins/ladspa_base/ladspa_port_dialog.h \
|
||||
$(srcdir)/plugins/ladspa_base/ladspa_base.h \
|
||||
$(THIRD_PARTY_CODE)
|
||||
|
||||
|
||||
|
||||
303
acinclude.m4
303
acinclude.m4
@@ -9,15 +9,15 @@ AC_ARG_WITH([qtdir], [ --with-qtdir=DIR Qt installation directory [defau
|
||||
# Check that QTDIR is defined or that --with-qtdir given
|
||||
if test x"$QTDIR" = x ; then
|
||||
# some usual Qt-locations
|
||||
QT_SEARCH="/usr /usr/lib/qt /usr/lib/qt3 /usr/lib/qt31 /usr/lib/qt32 /usr/lib/qt33 /usr/lib/qt-3.0 /usr/lib/qt-3.1 /usr/lib/qt-3.2 /usr/lib/qt-3.3 /usr/local/qt /usr/local/qt3 /usr/local/qt31 /usr/local/qt32 /usr/local/qt33 /usr/share/qt3 /usr/X11R6" # /usr/share/qt4 /usr/local/Trolltech/Qt-4.0.0 /usr/local/Trolltech/Qt-4.0.1 /usr/local/Trolltech/Qt-4.1.0 /usr/local/Trolltech/Qt-4.1.0"
|
||||
QT_SEARCH="/usr /usr/lib/qt4 /usr/share/qt4 /usr/local/Trolltech/Qt-4.3.0 /usr/local/Trolltech/Qt-4.3.1 /usr/local/Trolltech/Qt-4.1.0"
|
||||
else
|
||||
QT_SEARCH=$QTDIR
|
||||
QTDIR=""
|
||||
fi
|
||||
for i in $QT_SEARCH ; do
|
||||
QT_INCLUDE_SEARCH="include include/qt include/qt3" # include/qt4/Qt include/Qt"
|
||||
QT_INCLUDE_SEARCH="include/qt4 include"
|
||||
for j in $QT_INCLUDE_SEARCH ; do
|
||||
if test -f $i/$j/qglobal.h -a x$QTDIR = x ; then
|
||||
if test -f $i/$j/Qt/qglobal.h -a x$QTDIR = x ; then
|
||||
QTDIR=$i
|
||||
QT_INCLUDES=$i/$j
|
||||
fi
|
||||
@@ -41,36 +41,11 @@ if test x"$QT_INCLUDES" = x ; then
|
||||
fi
|
||||
AC_MSG_RESULT([$QT_INCLUDES])
|
||||
|
||||
# Figure out which version of Qt we are using
|
||||
AC_MSG_CHECKING([Qt version])
|
||||
QT_VER=`grep 'define.*QT_VERSION_STR\W' $QT_INCLUDES/qglobal.h | perl -p -e 's/\D//g'`
|
||||
case "${QT_VER}" in
|
||||
2*)
|
||||
AC_MSG_ERROR([*** Qt 2 is not supported by iTALC. Please upgrade to Qt3!])
|
||||
;;
|
||||
3*)
|
||||
QT_MAJOR="3"
|
||||
;;
|
||||
# 4*)
|
||||
# QT_MAJOR="4"
|
||||
# ;;
|
||||
*)
|
||||
AC_MSG_ERROR([*** Don't know how to handle this Qt major version])
|
||||
;;
|
||||
esac
|
||||
AC_MSG_RESULT([$QT_VER ($QT_MAJOR)])
|
||||
|
||||
# Search for available Qt translations
|
||||
AH_TEMPLATE(QT_TRANSLATIONS_DIR, [Define to Qt translations directory])
|
||||
AC_MSG_CHECKING([Qt translations])
|
||||
case "${QT_VER}" in
|
||||
3*)
|
||||
QT_TRANSLATIONS_SEARCH="/usr/share/qt3 /usr/local/qt3 /usr/local/qt31 /usr/local/qt32 /usr/local/qt33 /usr/local/qt"
|
||||
;;
|
||||
4*)
|
||||
QT_TRANSLATIONS_SEARCH="/usr/share/qt4 /usr/local/qt /usr/local/Trolltech/Qt-4.0.0 /usr/local/Trolltech/Qt-4.0.1 /usr/local/Trolltech/Qt-4.1.0 /usr/local/Trolltech/Qt-4.1.0"
|
||||
;;
|
||||
esac
|
||||
QT_TRANSLATIONS_SEARCH="/usr/share/qt4 /usr/local/qt /usr/local/Trolltech/Qt-4.3.0 /usr/local/Trolltech/Qt-4.3.1"
|
||||
for i in $QT_TRANSLATIONS_SEARCH ; do
|
||||
if test -d $i/translations -a x$QT_TRANSLATIONS = x ; then
|
||||
QT_TRANSLATIONS=$i/translations
|
||||
@@ -83,217 +58,115 @@ else
|
||||
fi
|
||||
AC_MSG_RESULT([$QT_TRANSLATIONS])
|
||||
|
||||
QTHOSTDIR=/usr
|
||||
|
||||
if test -z "$QTHOSTDIR" ; then
|
||||
case "${prefix}" in
|
||||
/opt/mingw*)
|
||||
QTHOSTDIR=/usr
|
||||
;;
|
||||
*)
|
||||
if test -n "$QTDIR" ; then
|
||||
QTHOSTDIR="$QTDIR"
|
||||
else
|
||||
QTHOSTDIR=/usr
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
|
||||
# Check that moc is in path
|
||||
AC_CHECK_PROG(MOC, moc, $QTDIR/bin/moc,,$QTDIR/bin/)
|
||||
AC_CHECK_PROG(MOC, moc-qt4, $QTHOSTDIR/bin/moc-qt4,,$QTHOSTDIR/bin/)
|
||||
if test x$MOC = x ; then
|
||||
AC_CHECK_PROG(MOC, moc-qt3, $QTDIR/bin/moc-qt3,,$QTDIR/bin/)
|
||||
AC_CHECK_PROG(MOC, moc, $QTHOSTDIR/bin/moc,,$QTHOSTDIR/bin/)
|
||||
if test x$MOC = x ; then
|
||||
AC_CHECK_PROG(MOC, moc-qt4, $QTHOSTDIR/bin/moc-qt4,,$QTHOSTDIR/bin/)
|
||||
if test x$MOC = x ; then
|
||||
AC_MSG_ERROR([*** not found! Make sure you have Qt-devel-tools installed!])
|
||||
fi
|
||||
AC_MSG_ERROR([*** not found! Make sure you have Qt-devel-tools installed!])
|
||||
fi
|
||||
fi
|
||||
|
||||
# uic is the Qt user interface compiler
|
||||
AC_CHECK_PROG(UIC, uic, $QTDIR/bin/uic,,$QTDIR/bin/)
|
||||
# Check that uic is in path
|
||||
AC_CHECK_PROG(UIC, uic-qt4, $QTHOSTDIR/bin/uic-qt4,,$QTHOSTDIR/bin/)
|
||||
if test x$UIC = x ; then
|
||||
AC_MSG_WARN([*** not found! It's currently not needed but should be part of a proper Qt-devel-tools-installation!])
|
||||
AC_CHECK_PROG(UIC, uic, $QTHOSTDIR/bin/uic,,$QTHOSTDIR/bin/)
|
||||
if test x$UIC = x ; then
|
||||
AC_MSG_ERROR([*** not found! Make sure you have Qt-devel-tools installed!])
|
||||
fi
|
||||
fi
|
||||
|
||||
# Check that rcc is in path
|
||||
AC_CHECK_PROG(RCC, rcc-qt4, $QTHOSTDIR/bin/rcc-qt4,,$QTHOSTDIR/bin/)
|
||||
if test x$RCC = x ; then
|
||||
AC_CHECK_PROG(RCC, rcc, $QTHOSTDIR/bin/rcc,,$QTHOSTDIR/bin/)
|
||||
if test x$RCC = x ; then
|
||||
AC_MSG_ERROR([*** not found! Make sure you have Qt-devel-tools installed!])
|
||||
fi
|
||||
fi
|
||||
|
||||
# lupdate is the Qt translation-update utility.
|
||||
AC_CHECK_PROG(LUPDATE, lupdate, $QTDIR/bin/lupdate,,$QTDIR/bin/)
|
||||
AC_CHECK_PROG(LUPDATE, lupdate-qt4, $QTHOSTDIR/bin/lupdate-qt4,,$QTHOSTDIR/bin/)
|
||||
if test x$LUPDATE = x ; then
|
||||
AC_MSG_WARN([*** not found! It's not needed just for compiling but should be part of a proper Qt-devel-tools-installation!])
|
||||
AC_CHECK_PROG(LUPDATE, lupdate, $QTHOSTDIR/bin/lupdate,,$QTHOSTDIR/bin/)
|
||||
if test x$LUPDATE = x ; then
|
||||
AC_MSG_WARN([*** not found! It's not needed just for compiling but should be part of a proper Qt-devel-tools-installation!])
|
||||
fi
|
||||
fi
|
||||
|
||||
# lrelease is the Qt translation-release utility.
|
||||
AC_CHECK_PROG(LRELEASE, lrelease, $QTDIR/bin/lrelease,,$QTDIR/bin/)
|
||||
AC_CHECK_PROG(LRELEASE, lrelease-qt4, $QTHOSTDIR/bin/lrelease-qt4,,$QTHOSTDIR/bin/)
|
||||
if test x$LRELEASE = x ; then
|
||||
AC_MSG_WARN([*** not found! It's not needed just for compiling but should be part of a proper Qt-devel-tools-installation!])
|
||||
fi
|
||||
|
||||
# Calculate Qt include path
|
||||
QT_CXXFLAGS="-I$QT_INCLUDES"
|
||||
if test "$QT_MAJOR" = "4" ; then
|
||||
QT_CXXFLAGS="$QT_CXXFLAGS -I$QTDIR/include/qt4 -I$QTDIR/include"
|
||||
fi
|
||||
|
||||
|
||||
QT_IS_EMBEDDED="no"
|
||||
# On unix, figure out if we're doing a static or dynamic link
|
||||
case "${host}" in
|
||||
*-cygwin)
|
||||
AC_DEFINE_UNQUOTED(WIN32, "", Defined if on Win32 platform)
|
||||
if test -f "$QTDIR/lib/qt.lib" ; then
|
||||
QT_LIB="qt.lib"
|
||||
QT_IS_STATIC="yes"
|
||||
QT_IS_MT="no"
|
||||
elif test -f "$QTDIR/lib/qt-mt.lib" ; then
|
||||
QT_LIB="qt-mt.lib"
|
||||
QT_IS_STATIC="yes"
|
||||
QT_IS_MT="yes"
|
||||
elif test -f "$QTDIR/lib/qt$QT_VER.lib" ; then
|
||||
QT_LIB="qt$QT_VER.lib"
|
||||
QT_IS_STATIC="no"
|
||||
QT_IS_MT="no"
|
||||
elif test -f "$QTDIR/lib/qt-mt$QT_VER.lib" ; then
|
||||
QT_LIB="qt-mt$QT_VER.lib"
|
||||
QT_IS_STATIC="no"
|
||||
QT_IS_MT="yes"
|
||||
fi
|
||||
;;
|
||||
|
||||
*mingw32)
|
||||
QT_IS_MT="yes"
|
||||
QT_LIB="-L$QTDIR/bin -lQtCore4 -lQtGui4 -lQtXml4 -lQt3Support4"
|
||||
;;
|
||||
*)
|
||||
QT_IS_STATIC=`ls $QTDIR/lib/*.a 2> /dev/null`
|
||||
if test "x$QT_IS_STATIC" = x; then
|
||||
QT_IS_STATIC="no"
|
||||
else
|
||||
QT_IS_STATIC="yes"
|
||||
fi
|
||||
if test x$QT_IS_STATIC = xno ; then
|
||||
QT_IS_DYNAMIC=`ls $QTDIR/lib/*.so 2> /dev/null`
|
||||
if test "x$QT_IS_DYNAMIC" = x; then
|
||||
QT_IS_DYNAMIC=`ls /usr/lib/libQt*so.4 2> /dev/null`
|
||||
if test "x$QT_IS_DYNAMIC" = x; then
|
||||
AC_MSG_ERROR([*** Couldn't find any Qt libraries])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if test "$QT_MAJOR" = "4" ; then
|
||||
QT_IS_MT="yes"
|
||||
QT_LIB="-lQtCore -lQtGui -lQtXml -lQt3Support"
|
||||
MOC="$MOC -DLADSPA_SUPPORT"
|
||||
else
|
||||
QT_CXXFLAGS="-DQT3 $QT_CXXFLAGS"
|
||||
if test "x`ls $QTDIR/lib/libqt-mt.* 2> /dev/null`" != x ; then
|
||||
QT_LIB="-lqt-mt"
|
||||
QT_IS_MT="yes"
|
||||
elif test "x`ls $QTDIR/lib/libqt.* 2> /dev/null`" != x ; then
|
||||
QT_LIB="-lqt"
|
||||
QT_IS_MT="no"
|
||||
elif test "x`ls $QTDIR/lib/libqte.* 2> /dev/null`" != x ; then
|
||||
QT_LIB="-lqte"
|
||||
QT_IS_MT="no"
|
||||
QT_IS_EMBEDDED="yes"
|
||||
elif test "x`ls $QTDIR/lib/libqte-mt.* 2> /dev/null`" != x ; then
|
||||
QT_LIB="-lqte-mt"
|
||||
QT_IS_MT="yes"
|
||||
QT_IS_EMBEDDED="yes"
|
||||
fi
|
||||
AC_CHECK_PROG(LRELEASE, lrelease, $QTHOSTDIR/bin/lrelease,,$QTHOSTDIR/bin/)
|
||||
if test x$LRELEASE = x ; then
|
||||
AC_MSG_WARN([*** not found! It's not needed just for compiling but should be part of a proper Qt-devel-tools-installation!])
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
AC_MSG_CHECKING([if Qt is static])
|
||||
AC_MSG_RESULT([$QT_IS_STATIC])
|
||||
AC_MSG_CHECKING([if Qt is multithreaded])
|
||||
if test "$QT_IS_MT" = "no"; then
|
||||
AC_MSG_ERROR([*** your Qt is not multithreaded. That's bad, because multithreading is required for compiling... Please install Qt-mt!])
|
||||
fi
|
||||
AC_MSG_RESULT([$QT_IS_MT])
|
||||
AC_MSG_CHECKING([if Qt is embedded])
|
||||
AC_MSG_RESULT([$QT_IS_EMBEDDED])
|
||||
|
||||
QT_GUILINK=""
|
||||
QASSISTANTCLIENT_LDADD="-lqassistantclient"
|
||||
QT_LIBS="$QT_LIB"
|
||||
x_libraries="$x_libraries -L/usr/X11R6/lib"
|
||||
|
||||
case "${host}" in
|
||||
*irix*)
|
||||
QT_LIBS="$QT_LIB"
|
||||
if test $QT_IS_STATIC = yes ; then
|
||||
QT_LIBS="$QT_LIBS -L$x_libraries -lXext -lX11 -lm -lSM -lICE"
|
||||
fi
|
||||
;;
|
||||
|
||||
*linux*)
|
||||
QT_LIBS="$QT_LIB"
|
||||
if test $QT_IS_STATIC = yes && test $QT_IS_EMBEDDED = no; then
|
||||
QT_LIBS="$QT_LIBS -L$x_libraries -lXext -lX11 -lm -lSM -lICE -ljpeg"
|
||||
fi
|
||||
;;
|
||||
|
||||
|
||||
*osf*)
|
||||
# Digital Unix (aka DGUX aka Tru64)
|
||||
QT_LIBS="$QT_LIB"
|
||||
if test $QT_IS_STATIC = yes ; then
|
||||
QT_LIBS="$QT_LIBS -L$x_libraries -lXext -lX11 -lm -lSM -lICE"
|
||||
fi
|
||||
;;
|
||||
|
||||
*solaris*)
|
||||
QT_LIBS="$QT_LIB"
|
||||
if test $QT_IS_STATIC = yes ; then
|
||||
QT_LIBS="$QT_LIBS -L$x_libraries -lXext -lX11 -lm -lSM -lICE -lresolv -lsocket -lnsl"
|
||||
fi
|
||||
;;
|
||||
|
||||
|
||||
*win*)
|
||||
# linker flag to suppress console when linking a GUI app on Win32
|
||||
QT_GUILINK="/subsystem:windows"
|
||||
|
||||
if test $QT_MAJOR = "3" ; then
|
||||
if test $QT_IS_MT = yes ; then
|
||||
QT_LIBS="/nodefaultlib:libcmt"
|
||||
else
|
||||
QT_LIBS="/nodefaultlib:libc"
|
||||
fi
|
||||
fi
|
||||
|
||||
if test $QT_IS_STATIC = yes ; then
|
||||
QT_LIBS="$QT_LIBS $QT_LIB kernel32.lib user32.lib gdi32.lib comdlg32.lib ole32.lib shell32.lib imm32.lib advapi32.lib wsock32.lib winspool.lib winmm.lib netapi32.lib"
|
||||
if test $QT_MAJOR = "3" ; then
|
||||
QT_LIBS="$QT_LIBS qtmain.lib"
|
||||
fi
|
||||
else
|
||||
QT_LIBS="$QT_LIBS $QT_LIB"
|
||||
if test $QT_MAJOR = "3" ; then
|
||||
QT_CXXFLAGS="$QT_CXXFLAGS -DQT_DLL"
|
||||
QT_LIBS="$QT_LIBS qtmain.lib qui.lib user32.lib netapi32.lib"
|
||||
fi
|
||||
fi
|
||||
QASSISTANTCLIENT_LDADD="qassistantclient.lib"
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
|
||||
if test x"$QT_IS_EMBEDDED" = "xyes" ; then
|
||||
QT_CXXFLAGS="-DQWS $QT_CXXFLAGS"
|
||||
fi
|
||||
|
||||
if test x"$QT_IS_MT" = "xyes" ; then
|
||||
QT_CXXFLAGS="$QT_CXXFLAGS -D_REENTRANT -DQT_THREAD_SUPPORT"
|
||||
QT_LIBS="$QT_LIBS"
|
||||
fi
|
||||
|
||||
QT_LDADD="-L$QTDIR/lib $QT_LIBS"
|
||||
|
||||
#if test x$QT_IS_STATIC = xyes ; then
|
||||
# OLDLIBS="$LIBS"
|
||||
# LIBS="$QT_LDADD"
|
||||
# AC_CHECK_LIB(Xft, XftFontOpen, QT_LDADD="$QT_LDADD -lXft")
|
||||
# LIBS="$LIBS"
|
||||
#fi
|
||||
# construct CXXFLAGS
|
||||
QT_CXXFLAGS="-I$QT_INCLUDES -I$QT_INCLUDES/Qt -D_REENTRANT -DQT_NO_DEBUG -DQT_CORE_LIB -DQT_XML_LIB -DQT_THREAD_SUPPORT"
|
||||
|
||||
AC_MSG_CHECKING([QT_CXXFLAGS])
|
||||
AC_MSG_RESULT([$QT_CXXFLAGS])
|
||||
AC_MSG_CHECKING([QT_LDADD])
|
||||
AC_MSG_RESULT([$QT_LDADD])
|
||||
|
||||
|
||||
# check libraries
|
||||
AC_MSG_CHECKING([Qt4 libraries])
|
||||
|
||||
case "${host}" in
|
||||
*mingw32)
|
||||
QT_LIBS=`ls $QTDIR/lib/libQt*.a 2> /dev/null`
|
||||
if test "x$QT_LIBS" = x; then
|
||||
AC_MSG_ERROR([*** Couldn't find any Qt4 libraries])
|
||||
fi
|
||||
QT_LIB="-L$QTDIR/bin -lQtCore4 -lQtXml4 -lQtNetwork4 -lQtGui4 -lQt3Support4 -lws2_32"
|
||||
# Check that windres is in path
|
||||
AC_PATH_PROGS([WINDRES],[i586-mingw32-windres windres],,[${prefix}/bin:$PATH])
|
||||
if test x$WINDRES = x ; then
|
||||
AC_MSG_ERROR([*** not found! Make sure you have mingw32 binutils installed!])
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
QT_LIBS=`ls $QTDIR/lib64/libQt*.so 2> /dev/null`
|
||||
if test "x$QT_LIBS" = x; then
|
||||
QT_LIBS=`ls $QTDIR/lib/libQt*.so 2> /dev/null`
|
||||
if test "x$QT_LIBS" = x; then
|
||||
AC_MSG_ERROR([*** Couldn't find any Qt4 libraries])
|
||||
fi
|
||||
QT_LIB="-L$QTDIR/lib -L$QTDIR/lib/qt4"
|
||||
else
|
||||
QT_LIB="-L$QTDIR/lib64 -L$QTDIR/lib64/qt4"
|
||||
fi
|
||||
QT_LIB="$QT_LIB -lQtCore -lQtXml -lQtNetwork -lQtGui -lQt3Support"
|
||||
;;
|
||||
esac
|
||||
AC_MSG_RESULT([found: $QT_LIB])
|
||||
|
||||
QT_LDADD="$QT_LIB"
|
||||
|
||||
|
||||
|
||||
|
||||
AC_SUBST(QT_CXXFLAGS)
|
||||
AC_SUBST(QT_LDADD)
|
||||
AC_SUBST(QT_GUILINK)
|
||||
AC_SUBST(QASSISTANTCLIENT_LDADD)
|
||||
|
||||
|
||||
])
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@ fi
|
||||
|
||||
AH_TEMPLATE(BUILD_LINUX, [Build LMMS for Linux])
|
||||
AH_TEMPLATE(BUILD_WIN32, [Build LMMS for Win32])
|
||||
AH_TEMPLATE(WIN32, [Build LMMS for Win32])
|
||||
AC_ARG_WITH(linux,
|
||||
[ --with-linux explicit build LMMS for Linux], [ build_linux=true ], [ build_linux=false ])
|
||||
AC_ARG_WITH(win32,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* about_dialog.h - declaration of class aboutDialog
|
||||
*
|
||||
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2004-2007 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -26,19 +26,8 @@
|
||||
#ifndef _ABOUT_DIALOG_H
|
||||
#define _ABOUT_DIALOG_H
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtGui/QDialog>
|
||||
|
||||
#else
|
||||
|
||||
#include <qdialog.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
class QPushButton;
|
||||
class QLabel;
|
||||
class QTabWidget;
|
||||
|
||||
@@ -27,22 +27,8 @@
|
||||
#ifndef _ARP_AND_CHORDS_TAB_WIDGET_H
|
||||
#define _ARP_AND_CHORDS_TAB_WIDGET_H
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtGui/QWidget>
|
||||
|
||||
#else
|
||||
|
||||
#include <qwidget.h>
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include "journalling_object.h"
|
||||
#include "types.h"
|
||||
|
||||
|
||||
@@ -26,22 +26,10 @@
|
||||
#ifndef _AUDIO_DEVICE_H
|
||||
#define _AUDIO_DEVICE_H
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtCore/QPair>
|
||||
#include <QtCore/QMutex>
|
||||
#include <QtCore/QThread>
|
||||
|
||||
#else
|
||||
|
||||
#include <qpair.h>
|
||||
#include <qmutex.h>
|
||||
#include <qthread.h>
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
@@ -27,19 +27,8 @@
|
||||
#define _AUDIO_FILE_DEVICE_H
|
||||
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtCore/QFile>
|
||||
|
||||
#else
|
||||
|
||||
#include <qfile.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#include "audio_device.h"
|
||||
|
||||
|
||||
|
||||
@@ -37,22 +37,10 @@
|
||||
#include <jack/jack.h>
|
||||
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtCore/QVector>
|
||||
#include <QtCore/QList>
|
||||
#include <QtCore/QMap>
|
||||
|
||||
#else
|
||||
|
||||
#include <qvaluevector.h>
|
||||
#include <qvaluelist.h>
|
||||
#include <qmap.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#include "audio_device.h"
|
||||
|
||||
@@ -109,7 +97,7 @@ private:
|
||||
|
||||
QSemaphore m_stop_semaphore;
|
||||
|
||||
vvector<jack_port_t *> m_outputPorts;
|
||||
QVector<jack_port_t *> m_outputPorts;
|
||||
surroundSampleFrame * m_outBuf;
|
||||
|
||||
|
||||
|
||||
@@ -26,18 +26,8 @@
|
||||
#ifndef _AUDIO_PORT_H
|
||||
#define _AUDIO_PORT_H
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtCore/QString>
|
||||
|
||||
#else
|
||||
|
||||
#include <qstring.h>
|
||||
|
||||
#endif
|
||||
|
||||
#include "effect_chain.h"
|
||||
|
||||
|
||||
|
||||
@@ -29,21 +29,9 @@
|
||||
#define _AUDIO_SAMPLE_RECORDER_H
|
||||
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtCore/QList>
|
||||
#include <QtCore/QPair>
|
||||
|
||||
#else
|
||||
|
||||
#include <qvaluelist.h>
|
||||
#include <qpair.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#include "audio_device.h"
|
||||
|
||||
|
||||
@@ -67,7 +55,7 @@ private:
|
||||
const fpp_t _frames,
|
||||
const float _master_gain );
|
||||
|
||||
typedef vlist<QPair<sampleFrame *, fpp_t> > bufferList;
|
||||
typedef QList<QPair<sampleFrame *, fpp_t> > bufferList;
|
||||
bufferList m_buffers;
|
||||
|
||||
} ;
|
||||
|
||||
@@ -26,19 +26,8 @@
|
||||
#ifndef _AUTOMATABLE_BUTTON_H
|
||||
#define _AUTOMATABLE_BUTTON_H
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtGui/QWidget>
|
||||
|
||||
#else
|
||||
|
||||
#include <qwidget.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#include "automatable_object.h"
|
||||
|
||||
|
||||
@@ -121,7 +110,7 @@ public:
|
||||
|
||||
|
||||
private:
|
||||
vlist<automatableButton *> m_buttons;
|
||||
QList<automatableButton *> m_buttons;
|
||||
|
||||
|
||||
signals:
|
||||
|
||||
@@ -28,19 +28,11 @@
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#include "qt3support.h"
|
||||
#include "journalling_object.h"
|
||||
#include "level_object.h"
|
||||
|
||||
#ifndef QT3
|
||||
|
||||
#include <QtCore/QPointer>
|
||||
|
||||
#else
|
||||
|
||||
#include <qguardedptr.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
class automationPattern;
|
||||
@@ -175,7 +167,7 @@ private:
|
||||
T m_oldValue;
|
||||
bool m_journalEntryReady;
|
||||
|
||||
typedef vvector<autoObj *> autoObjVector;
|
||||
typedef QVector<autoObj *> autoObjVector;
|
||||
autoObjVector m_linkedObjects;
|
||||
|
||||
inline void linkObject( autoObj * _object );
|
||||
|
||||
@@ -147,7 +147,7 @@ void automatableObject<T, EDIT_STEP_TYPE>::setValue( const T _value )
|
||||
// for( autoObjVector::iterator it =
|
||||
// m_linkedObjects.begin();
|
||||
// it != m_linkedObjects.end(); ++it )
|
||||
for( csize i = 0; i < m_linkedObjects.size(); ++i )
|
||||
for( int i = 0; i < m_linkedObjects.size(); ++i )
|
||||
{
|
||||
autoObj * it = m_linkedObjects[i];
|
||||
if( value() != it->value() && it->fittedValue( value() )
|
||||
@@ -437,7 +437,7 @@ void automatableObject<T, EDIT_STEP_TYPE>::unlinkObject( autoObj * _object )
|
||||
template<typename T, typename EDIT_STEP_TYPE>
|
||||
void automatableObject<T, EDIT_STEP_TYPE>::syncAutomationPattern( void )
|
||||
{
|
||||
for( csize i = 0; i < m_linkedObjects.size(); ++i )
|
||||
for( int i = 0; i < m_linkedObjects.size(); ++i )
|
||||
{
|
||||
autoObj * it = m_linkedObjects[i];
|
||||
if( m_automation_pattern != it->m_automation_pattern )
|
||||
|
||||
@@ -26,25 +26,13 @@
|
||||
#ifndef _AUTOMATABLE_SLIDER_H
|
||||
#define _AUTOMATABLE_SLIDER_H
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtGui/QSlider>
|
||||
#include <QtXml/QDomElement>
|
||||
|
||||
#else
|
||||
|
||||
#include <qdom.h>
|
||||
#include <qslider.h>
|
||||
|
||||
#endif
|
||||
|
||||
class knob;
|
||||
|
||||
|
||||
|
||||
|
||||
class automatableSlider : public QSlider
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@@ -27,19 +27,7 @@
|
||||
#ifndef _AUTOMATION_EDITOR_H
|
||||
#define _AUTOMATION_EDITOR_H
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtGui/QWidget>
|
||||
#include <QtCore/QVector>
|
||||
|
||||
#else
|
||||
|
||||
#include <qwidget.h>
|
||||
#include <qvaluevector.h>
|
||||
|
||||
#endif
|
||||
|
||||
#include "types.h"
|
||||
#include "journalling_object.h"
|
||||
|
||||
@@ -27,17 +27,10 @@
|
||||
#ifndef _AUTOMATION_PATTERN_H
|
||||
#define _AUTOMATION_PATTERN_H
|
||||
|
||||
#include <qobject.h>
|
||||
#include <QtCore/QObject>
|
||||
|
||||
#include "qt3support.h"
|
||||
#include "journalling_object.h"
|
||||
|
||||
#ifdef QT3
|
||||
|
||||
#include "xqmap.h"
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
class levelObject;
|
||||
class midiTime;
|
||||
@@ -50,12 +43,7 @@ class automationPattern : public QObject, public journallingObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
// map negative midiTime to level
|
||||
#ifdef QT3
|
||||
typedef XQMap<int, int> timeMap;
|
||||
#else
|
||||
typedef QMap<int, int> timeMap;
|
||||
#endif
|
||||
|
||||
automationPattern( track * _track, levelObject * _object );
|
||||
automationPattern( const automationPattern & _pat_to_copy );
|
||||
|
||||
@@ -27,21 +27,14 @@
|
||||
#ifndef _BASE64_H
|
||||
#define _BASE64_H
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifndef QT3
|
||||
|
||||
#include <QtCore/QByteArray>
|
||||
|
||||
#endif
|
||||
|
||||
#include <QtCore/QString>
|
||||
|
||||
class QVariant;
|
||||
|
||||
|
||||
namespace base64
|
||||
{
|
||||
#ifndef QT3
|
||||
inline void encode( const char * _data, const int _size,
|
||||
QString & _dst )
|
||||
{
|
||||
@@ -55,10 +48,6 @@ namespace base64
|
||||
*_data = new char[*_size];
|
||||
memcpy( *_data, data.constData(), *_size );
|
||||
}
|
||||
#else
|
||||
void encode( const char * _data, const int _size, QString & _dst );
|
||||
void decode( const QString & _b64, char * * _data, int * _size );
|
||||
#endif
|
||||
QString encode( const QVariant & _data );
|
||||
QVariant decode( const QString & _b64 );
|
||||
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
#ifndef _BB_EDITOR_H
|
||||
#define _BB_EDITOR_H
|
||||
|
||||
#include "qt3support.h"
|
||||
#include "track_container.h"
|
||||
|
||||
|
||||
@@ -59,16 +58,16 @@ public:
|
||||
return( TRUE );
|
||||
}
|
||||
|
||||
csize currentBB( void ) const;
|
||||
tact FASTCALL lengthOfBB( const csize _bb );
|
||||
int currentBB( void ) const;
|
||||
tact FASTCALL lengthOfBB( const int _bb );
|
||||
inline tact lengthOfCurrentBB( void )
|
||||
{
|
||||
return( lengthOfBB( currentBB() ) );
|
||||
}
|
||||
void FASTCALL removeBB( const csize _bb );
|
||||
csize numOfBBs( void ) const;
|
||||
void FASTCALL removeBB( const int _bb );
|
||||
int numOfBBs( void ) const;
|
||||
|
||||
void FASTCALL swapBB( const csize _bb1, const csize _bb2 );
|
||||
void FASTCALL swapBB( const int _bb1, const int _bb2 );
|
||||
|
||||
void updateBBTrack( trackContentObject * _tco );
|
||||
|
||||
@@ -93,7 +92,7 @@ private:
|
||||
//bbEditor( const bbEditor & );
|
||||
virtual ~bbEditor();
|
||||
|
||||
void FASTCALL createTCOsForBB( const csize _bb );
|
||||
void FASTCALL createTCOsForBB( const int _bb );
|
||||
|
||||
|
||||
QWidget * m_toolBar;
|
||||
|
||||
@@ -27,21 +27,9 @@
|
||||
#ifndef _BB_TRACK_H
|
||||
#define _BB_TRACK_H
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <QtCore/QMap>
|
||||
|
||||
#else
|
||||
|
||||
#include <qobject.h>
|
||||
#include <qmap.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#include "track.h"
|
||||
|
||||
class nameLabel;
|
||||
@@ -113,8 +101,8 @@ public:
|
||||
virtual void FASTCALL loadTrackSpecificSettings( const QDomElement &
|
||||
_this );
|
||||
|
||||
static bbTrack * FASTCALL findBBTrack( csize _bb_num );
|
||||
static csize FASTCALL numOfBBTrack( track * _track );
|
||||
static bbTrack * FASTCALL findBBTrack( int _bb_num );
|
||||
static int FASTCALL numOfBBTrack( track * _track );
|
||||
static void FASTCALL swapBBTracks( track * _track1, track * _track2 );
|
||||
|
||||
inline nameLabel * trackLabel( void )
|
||||
@@ -149,9 +137,9 @@ protected:
|
||||
|
||||
private:
|
||||
nameLabel * m_trackLabel;
|
||||
vlist<track *> m_disabled_tracks;
|
||||
QList<track *> m_disabled_tracks;
|
||||
|
||||
typedef QMap<bbTrack *, csize> infoMap;
|
||||
typedef QMap<bbTrack *, int> infoMap;
|
||||
static infoMap s_infoMap;
|
||||
|
||||
} ;
|
||||
|
||||
@@ -30,21 +30,9 @@
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtCore/QMap>
|
||||
#include <Qt/QtXml>
|
||||
|
||||
#else
|
||||
|
||||
#include <qmap.h>
|
||||
#include <qdom.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
class journallingObject;
|
||||
|
||||
|
||||
@@ -26,26 +26,12 @@
|
||||
#ifndef _COMBOBOX_H
|
||||
#define _COMBOBOX_H
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtGui/QWidget>
|
||||
#include <QtCore/QVector>
|
||||
#include <QtGui/QMenu>
|
||||
#include <QtGui/QPixmap>
|
||||
#include <QtCore/QPair>
|
||||
|
||||
#else
|
||||
|
||||
#include <qwidget.h>
|
||||
#include <qvaluevector.h>
|
||||
#include <qpopupmenu.h>
|
||||
#include <qpixmap.h>
|
||||
#include <qpair.h>
|
||||
|
||||
#endif
|
||||
|
||||
#include "automatable_object.h"
|
||||
|
||||
|
||||
@@ -95,14 +81,13 @@ private:
|
||||
|
||||
typedef QPair<QString, QPixmap> item;
|
||||
|
||||
vvector<item> m_items;
|
||||
QVector<item> m_items;
|
||||
|
||||
bool m_pressed;
|
||||
|
||||
|
||||
private slots:
|
||||
void setItem( QAction * _item );
|
||||
void setItem( int _item );
|
||||
|
||||
|
||||
signals:
|
||||
|
||||
@@ -31,25 +31,11 @@
|
||||
#endif
|
||||
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtGui/QDialog>
|
||||
#include <QtCore/QMap>
|
||||
#include <QtCore/QVector>
|
||||
#include <QtCore/QPair>
|
||||
|
||||
#else
|
||||
|
||||
#include <qdialog.h>
|
||||
#include <qmap.h>
|
||||
#include <qvaluevector.h>
|
||||
#include <qpair.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
class QLineEdit;
|
||||
class QLabel;
|
||||
@@ -201,7 +187,7 @@ protected slots:
|
||||
|
||||
void backButtonClicked( void );
|
||||
void nextButtonClicked( void );
|
||||
void switchPage( csize _pg );
|
||||
void switchPage( int _pg );
|
||||
void switchPage( QWidget * _pg );
|
||||
|
||||
|
||||
@@ -237,7 +223,7 @@ private:
|
||||
QStringList m_recentlyOpenedProjects;
|
||||
|
||||
|
||||
typedef vvector<QPair<QString, QString> > stringPairVector;
|
||||
typedef QVector<QPair<QString, QString> > stringPairVector;
|
||||
typedef QMap<QString, stringPairVector> settingsMap;
|
||||
settingsMap m_settings;
|
||||
|
||||
@@ -253,8 +239,8 @@ private:
|
||||
QLineEdit * m_wdLineEdit;
|
||||
|
||||
// wizard stuff
|
||||
vlist<QPair<QWidget *, QString> > m_pages;
|
||||
csize m_currentPage;
|
||||
QList<QPair<QWidget *, QString> > m_pages;
|
||||
int m_currentPage;
|
||||
QFrame * m_hbar;
|
||||
QWidget * m_contentWidget;
|
||||
QLabel * m_title;
|
||||
|
||||
@@ -27,22 +27,10 @@
|
||||
#ifndef _CPULOAD_WIDGET_H
|
||||
#define _CPULOAD_WIDGET_H
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtCore/QTimer>
|
||||
#include <QtGui/QPixmap>
|
||||
#include <QtGui/QWidget>
|
||||
|
||||
#else
|
||||
|
||||
#include <qwidget.h>
|
||||
#include <qpixmap.h>
|
||||
#include <qtimer.h>
|
||||
|
||||
#endif
|
||||
|
||||
#include "types.h"
|
||||
|
||||
|
||||
|
||||
@@ -25,11 +25,9 @@
|
||||
#ifndef _EFFECT_CHAIN_H
|
||||
#define _EFFECT_CHAIN_H
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#include "effect.h"
|
||||
|
||||
typedef vvector<effect *> effect_list_t;
|
||||
typedef QVector<effect *> effect_list_t;
|
||||
|
||||
class effectChain
|
||||
{
|
||||
|
||||
@@ -26,22 +26,10 @@
|
||||
#ifndef _EFFECT_LABEL_H
|
||||
#define _EFFECT_LABEL_H
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtGui/QWidget>
|
||||
#include <QtGui/QPushButton>
|
||||
#include <QtGui/QLabel>
|
||||
|
||||
#else
|
||||
|
||||
#include <qwidget.h>
|
||||
#include <qpushbutton.h>
|
||||
#include <qlabel.h>
|
||||
|
||||
#endif
|
||||
|
||||
#include "journalling_object.h"
|
||||
|
||||
|
||||
|
||||
@@ -26,22 +26,8 @@
|
||||
#ifndef _EFFECT_SELECT_DIALOG_H
|
||||
#define _EFFECT_SELECT_DIALOG_H
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtGui/QDialog>
|
||||
#include <Qt3Support/Q3ListBox>
|
||||
#define QListBoxItem Q3ListBoxItem
|
||||
|
||||
#else
|
||||
|
||||
#include <qdialog.h>
|
||||
#include <qlistbox.h>
|
||||
|
||||
#define Q3ListBox QListBox
|
||||
|
||||
#endif
|
||||
|
||||
#include "effect.h"
|
||||
|
||||
@@ -94,11 +80,11 @@ protected:
|
||||
protected slots:
|
||||
void onHighlighted( int _plugin );
|
||||
void onAddButtonReleased();
|
||||
void onDoubleClicked( QListBoxItem * _item );
|
||||
void onDoubleClicked( Q3ListBoxItem * _item );
|
||||
|
||||
|
||||
private:
|
||||
vvector<plugin::descriptor> m_pluginDescriptors;
|
||||
QVector<plugin::descriptor> m_pluginDescriptors;
|
||||
effectKeyList m_effectKeys;
|
||||
effectKey m_currentSelection;
|
||||
|
||||
|
||||
@@ -27,28 +27,10 @@
|
||||
#ifndef _EFFECT_TAB_WIDGET_H
|
||||
#define _EFFECT_TAB_WIDGET_H
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtGui/QWidget>
|
||||
#include <QtGui/QPushButton>
|
||||
#include <QtGui/QLayout>
|
||||
|
||||
#else
|
||||
|
||||
#include <qwidget.h>
|
||||
#include <qpushbutton.h>
|
||||
#include <qlayout.h>
|
||||
#include <qscrollview.h>
|
||||
#include <qvbox.h>
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include "journalling_object.h"
|
||||
#include "rack_view.h"
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* embed.h - misc. stuff for using embedded data (resources linked into binary)
|
||||
*
|
||||
* Copyright (c) 2004-2006 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2004-2007 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -26,19 +26,9 @@
|
||||
#ifndef _EMBED_H
|
||||
#define _EMBED_H
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtGui/QPixmap>
|
||||
#include <QtCore/QString>
|
||||
|
||||
#else
|
||||
|
||||
#include <qpixmap.h>
|
||||
#include <qstring.h>
|
||||
|
||||
#endif
|
||||
|
||||
namespace embed
|
||||
{
|
||||
|
||||
@@ -28,24 +28,9 @@
|
||||
#ifndef _ENVELOPE_AND_LFO_WIDGET_H
|
||||
#define _ENVELOPE_AND_LFO_WIDGET_H
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtGui/QWidget>
|
||||
#include <QtCore/QVector>
|
||||
|
||||
#else
|
||||
|
||||
#include <qwidget.h>
|
||||
#include <qvaluevector.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#include "journalling_object.h"
|
||||
#include "types.h"
|
||||
@@ -129,7 +114,7 @@ private:
|
||||
static QPixmap * s_envGraph;
|
||||
static QPixmap * s_lfoGraph;
|
||||
|
||||
static vvector<envelopeAndLFOWidget *> s_EaLWidgets;
|
||||
static QVector<envelopeAndLFOWidget *> s_EaLWidgets;
|
||||
|
||||
bool m_used;
|
||||
|
||||
|
||||
@@ -28,19 +28,8 @@
|
||||
#ifndef _ENVELOPE_TAB_WIDGET_H
|
||||
#define _ENVELOPE_TAB_WIDGET_H
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtGui/QWidget>
|
||||
|
||||
#else
|
||||
|
||||
#include <qwidget.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#include "mixer.h"
|
||||
|
||||
|
||||
|
||||
@@ -27,22 +27,8 @@
|
||||
#ifndef _EXPORT_PROJECT_DIALOG_H
|
||||
#define _EXPORT_PROJECT_DIALOG_H
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtGui/QDialog>
|
||||
|
||||
#else
|
||||
|
||||
#include <qdialog.h>
|
||||
|
||||
#endif
|
||||
|
||||
#include "export.h"
|
||||
|
||||
|
||||
@@ -81,8 +67,7 @@ private:
|
||||
void finishProjectExport( void );
|
||||
void abortProjectExport( void );
|
||||
|
||||
static fileTypes FASTCALL getFileTypeFromExtension( const QString &
|
||||
_ext );
|
||||
static fileTypes getFileTypeFromExtension( const QString & _ext );
|
||||
static Sint16 s_availableBitrates[];
|
||||
|
||||
|
||||
|
||||
@@ -26,21 +26,9 @@
|
||||
#ifndef _FADE_BUTTON_H
|
||||
#define _FADE_BUTTON_H
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtGui/QAbstractButton>
|
||||
#include <QtGui/QColor>
|
||||
|
||||
#else
|
||||
|
||||
#include <qbutton.h>
|
||||
#include <qcolor.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
class fadeButton : public QAbstractButton
|
||||
{
|
||||
@@ -58,11 +46,7 @@ public slots:
|
||||
|
||||
|
||||
protected:
|
||||
#ifndef QT3
|
||||
virtual void customEvent( QEvent * );
|
||||
#else
|
||||
virtual void customEvent( QCustomEvent * );
|
||||
#endif
|
||||
virtual void paintEvent( QPaintEvent * _pe );
|
||||
|
||||
|
||||
|
||||
@@ -26,37 +26,16 @@
|
||||
#ifndef _FILE_BROWSER_H
|
||||
#define _FILE_BROWSER_H
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtCore/QDir>
|
||||
#include <QtCore/QMutex>
|
||||
|
||||
#else
|
||||
|
||||
#include <qlistview.h>
|
||||
#include <qdir.h>
|
||||
#include <qmutex.h>
|
||||
|
||||
#define cleanPath cleanDirPath
|
||||
|
||||
#endif
|
||||
class QColorGroup;
|
||||
#include <Qt3Support/Q3ListView>
|
||||
|
||||
|
||||
#include "side_bar_widget.h"
|
||||
|
||||
|
||||
#ifndef QT3
|
||||
class QListViewItem;
|
||||
#else
|
||||
class Q3ListViewItem;
|
||||
#endif
|
||||
class QPixmap;
|
||||
|
||||
class fileItem;
|
||||
@@ -138,16 +117,7 @@ private:
|
||||
|
||||
|
||||
|
||||
class directory :
|
||||
#ifndef QT3
|
||||
public Q3ListViewItem
|
||||
// trick moc
|
||||
#if 0
|
||||
,
|
||||
#endif
|
||||
#else
|
||||
public QListViewItem
|
||||
#endif
|
||||
class directory : public Q3ListViewItem
|
||||
{
|
||||
public:
|
||||
directory( Q3ListView * _parent, const QString & _filename,
|
||||
@@ -182,7 +152,7 @@ public:
|
||||
|
||||
private:
|
||||
void initPixmapStuff( void );
|
||||
void FASTCALL setPixmap( const QPixmap * _px );
|
||||
void setPixmap( const QPixmap * _px );
|
||||
|
||||
bool addItems( const QString & _path );
|
||||
|
||||
@@ -201,27 +171,13 @@ private:
|
||||
|
||||
|
||||
|
||||
class fileItem :
|
||||
#ifndef QT3
|
||||
public Q3ListViewItem
|
||||
// trick moc
|
||||
#if 0
|
||||
,
|
||||
#endif
|
||||
#else
|
||||
public QListViewItem
|
||||
#endif
|
||||
class fileItem : public Q3ListViewItem
|
||||
{
|
||||
public:
|
||||
fileItem( Q3ListView * _parent, const QString & _name,
|
||||
const QString & _path );
|
||||
#ifndef QT3
|
||||
fileItem( Q3ListViewItem * _parent, const QString & _name,
|
||||
const QString & _path );
|
||||
#else
|
||||
fileItem( QListViewItem * _parent, const QString & _name,
|
||||
const QString & _path );
|
||||
#endif
|
||||
|
||||
inline QString fullName( void ) const
|
||||
{
|
||||
@@ -265,9 +221,5 @@ private:
|
||||
} ;
|
||||
|
||||
|
||||
#ifdef QT3
|
||||
#undef cleanPath
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -26,18 +26,8 @@
|
||||
#ifndef _GROUP_BOX_H
|
||||
#define _GROUP_BOX_H
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtGui/QWidget>
|
||||
|
||||
#else
|
||||
|
||||
#include <qwidget.h>
|
||||
|
||||
#endif
|
||||
|
||||
#include "pixmap_button.h"
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* gui_templates.h - GUI-specific templates
|
||||
*
|
||||
* Copyright (c) 2005-2006 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2005-2007 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -26,22 +26,10 @@
|
||||
#ifndef _GUI_TEMPLATES_H
|
||||
#define _GUI_TEMPLATES_H
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtGui/QApplication>
|
||||
#include <QtGui/QFont>
|
||||
#include <QtGui/QDesktopWidget>
|
||||
|
||||
#else
|
||||
|
||||
#include <qpaintdevicemetrics.h>
|
||||
#include <qfont.h>
|
||||
#include <qapplication.h>
|
||||
#include <qdesktopwidget.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
// return DPI-independent font-size - font with returned font-size has always
|
||||
@@ -50,13 +38,8 @@ template<int SIZE>
|
||||
inline QFont pointSize( QFont _f )
|
||||
{
|
||||
static const int DPI = 96;
|
||||
#ifdef QT4
|
||||
_f.setPointSizeF( (float) SIZE * DPI /
|
||||
QApplication::desktop()->logicalDpiY() );
|
||||
#else
|
||||
_f.setPointSizeFloat( (float) SIZE * DPI /
|
||||
QPaintDeviceMetrics( qApp->desktop() ).logicalDpiY() );
|
||||
#endif
|
||||
return( _f );
|
||||
}
|
||||
|
||||
@@ -64,13 +47,8 @@ inline QFont pointSize( QFont _f )
|
||||
inline QFont pointSizeF( QFont _f, float SIZE )
|
||||
{
|
||||
static const int DPI = 96;
|
||||
#ifdef QT4
|
||||
_f.setPointSizeF( SIZE * DPI /
|
||||
QApplication::desktop()->logicalDpiY() );
|
||||
#else
|
||||
_f.setPointSizeFloat( SIZE * DPI /
|
||||
QPaintDeviceMetrics( qApp->desktop() ).logicalDpiY() );
|
||||
#endif
|
||||
return( _f );
|
||||
}
|
||||
|
||||
|
||||
@@ -27,23 +27,8 @@
|
||||
#ifndef _IMPORT_FILTER_H
|
||||
#define _IMPORT_FILTER_H
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtCore/QFile>
|
||||
|
||||
#else
|
||||
|
||||
#include <qfile.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#include "plugin.h"
|
||||
|
||||
@@ -82,34 +67,22 @@ protected:
|
||||
|
||||
inline int readByte( void )
|
||||
{
|
||||
#ifdef QT4
|
||||
char c;
|
||||
if( m_file.getChar( &c ) )
|
||||
{
|
||||
return( static_cast<int>( c ) );
|
||||
}
|
||||
return( -1 );
|
||||
#else
|
||||
return( m_file.getch() );
|
||||
#endif
|
||||
}
|
||||
|
||||
inline int readBlock( char * _data, int _len )
|
||||
{
|
||||
#ifndef QT3
|
||||
return( m_file.read( _data, _len ) );
|
||||
#else
|
||||
return( m_file.readBlock( _data, _len ) );
|
||||
#endif
|
||||
}
|
||||
|
||||
inline void ungetChar( int _ch )
|
||||
{
|
||||
#ifndef QT3
|
||||
m_file.ungetChar( _ch );
|
||||
#else
|
||||
m_file.ungetch( _ch );
|
||||
#endif
|
||||
}
|
||||
|
||||
virtual void FASTCALL saveSettings( QDomDocument &,
|
||||
|
||||
@@ -28,26 +28,9 @@
|
||||
#define _INSTRUMENT_H
|
||||
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtGui/QWidget>
|
||||
#include <QtCore/QVector>
|
||||
|
||||
#else
|
||||
|
||||
#include <qwidget.h>
|
||||
#include <qvaluevector.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#include "plugin.h"
|
||||
#include "mixer.h"
|
||||
|
||||
|
||||
@@ -27,22 +27,10 @@
|
||||
#ifndef _INSTRUMENT_TRACK_H
|
||||
#define _INSTRUMENT_TRACK_H
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtGui/QApplication>
|
||||
#include <QtGui/QPushButton>
|
||||
#include <QtGui/QPainter>
|
||||
|
||||
#else
|
||||
|
||||
#include <qapplication.h>
|
||||
#include <qpushbutton.h>
|
||||
#include <qpainter.h>
|
||||
|
||||
#endif
|
||||
|
||||
#include "midi_event_processor.h"
|
||||
#include "mixer.h"
|
||||
#include "tab_widget.h"
|
||||
@@ -220,7 +208,7 @@ private:
|
||||
tones m_baseTone;
|
||||
octaves m_baseOctave;
|
||||
|
||||
vlist<notePlayHandle *> m_processHandles;
|
||||
QList<notePlayHandle *> m_processHandles;
|
||||
|
||||
|
||||
// widgets on the top of a instrument-track-window
|
||||
@@ -248,14 +236,10 @@ private:
|
||||
volumeKnob * m_tswVolumeKnob;
|
||||
fadeButton * m_tswActivityIndicator;
|
||||
instrumentTrackButton * m_tswInstrumentTrackButton;
|
||||
|
||||
QMenu * m_tswMidiMenu;
|
||||
#ifdef QT4
|
||||
QAction * m_midiInputAction;
|
||||
QAction * m_midiOutputAction;
|
||||
#else
|
||||
int m_midiInputID;
|
||||
int m_midiOutputID;
|
||||
#endif
|
||||
|
||||
friend class instrumentTrackButton;
|
||||
friend class notePlayHandle;
|
||||
@@ -277,23 +261,6 @@ public:
|
||||
instrumentTrackButton( instrumentTrack * _instrument_track );
|
||||
virtual ~instrumentTrackButton();
|
||||
|
||||
#ifdef QT3
|
||||
inline void setChecked( bool _on )
|
||||
{
|
||||
setOn( _on );
|
||||
}
|
||||
|
||||
inline bool isChecked( void ) const
|
||||
{
|
||||
return( isOn() );
|
||||
}
|
||||
|
||||
inline void setCheckable( bool _on )
|
||||
{
|
||||
QPushButton::setToggleButton( _on );
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
protected:
|
||||
// since we want to draw a special label (instrument- and instrument-
|
||||
|
||||
@@ -31,21 +31,11 @@
|
||||
#endif
|
||||
|
||||
#include "types.h"
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifndef QT3
|
||||
|
||||
#include <QtCore/QVariant>
|
||||
#include <QtCore/QVector>
|
||||
#include <QtCore/QStack>
|
||||
|
||||
#else
|
||||
|
||||
#include <qvariant.h>
|
||||
#include <qvaluevector.h>
|
||||
#include <qvaluestack.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
class QDomDocument;
|
||||
@@ -105,7 +95,7 @@ private:
|
||||
} ;
|
||||
|
||||
|
||||
typedef vvector<journalEntry> journalEntryVector;
|
||||
typedef QVector<journalEntry> journalEntryVector;
|
||||
|
||||
|
||||
|
||||
@@ -209,7 +199,7 @@ private:
|
||||
|
||||
bool m_journalling;
|
||||
|
||||
vstack<bool> m_journallingStateStack;
|
||||
QStack<bool> m_journallingStateStack;
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
@@ -1,296 +0,0 @@
|
||||
/***************************************************************************
|
||||
kmultitabbar.h - description
|
||||
-------------------
|
||||
begin : 2001
|
||||
copyright : (C) 2001,2002,2003 by Joseph Wenninger <jowenn@kde.org>
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library 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
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public License
|
||||
along with this library; see the file COPYING.LIB. If not, write to
|
||||
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02110-1301 USA.
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef _KMultitabbar_qt3_h_
|
||||
#define _KMultitabbar_qt3_h_
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#include <qscrollview.h>
|
||||
#include <qvbox.h>
|
||||
#include <qhbox.h>
|
||||
#include <qabstractlayout.h>
|
||||
#include <qstring.h>
|
||||
#include <qptrlist.h>
|
||||
#include <qpushbutton.h>
|
||||
|
||||
class KMultiTabBarButton;
|
||||
class KMultiTabBarTab;
|
||||
|
||||
typedef QPtrList<KMultiTabBarButton> buttonList;
|
||||
typedef QPtrList<KMultiTabBarTab> tabList;
|
||||
|
||||
|
||||
class QPixmap;
|
||||
class QPainter;
|
||||
class QFrame;
|
||||
|
||||
class KMultiTabBarPrivate;
|
||||
class KMultiTabBarTabPrivate;
|
||||
class KMultiTabBarButtonPrivate;
|
||||
class KMultiTabBarInternal;
|
||||
|
||||
/**
|
||||
* A Widget for horizontal and vertical tabs.
|
||||
* It is possible to add normal buttons to the top/left
|
||||
* The handling if only one tab at a time or multiple tabs
|
||||
* should be raisable is left to the "user".
|
||||
*@author Joseph Wenninger
|
||||
*/
|
||||
class KMultiTabBar: public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
enum KMultiTabBarMode{ Horizontal, Vertical };
|
||||
enum KMultiTabBarPosition{Left, Right, Top, Bottom};
|
||||
|
||||
/**
|
||||
* VSNET == Visual Studio .Net like (only show the text of active tabs
|
||||
* KDEV3 == Kdevelop 3 like (always show the text)
|
||||
* KONQSBC == konqy's classic sidebar style (unthemed), this one is disabled
|
||||
* at the moment, but will be renabled soon too
|
||||
*/
|
||||
enum KMultiTabBarStyle{VSNET=0, KDEV3=1, KONQSBC=2, KDEV3ICON=3,STYLELAST=0xffff};
|
||||
|
||||
KMultiTabBar(KMultiTabBarMode m,QWidget *parent=0);
|
||||
virtual ~KMultiTabBar();
|
||||
|
||||
/**
|
||||
* append a new button to the button area. The button can later on be accessed with button(ID)
|
||||
* eg for connecting signals to it
|
||||
* @param pic a pixmap for the button
|
||||
* @param id an arbitraty ID value. It will be emitted in the clicked signal for identifying the button
|
||||
* if more than one button is connected to a signals.
|
||||
* @param popup A popup menu which should be displayed if the button is clicked
|
||||
* @param not_used_yet will be used for a popup text in the future
|
||||
*/
|
||||
int appendButton(const QPixmap &pic,int id=-1,QMenu* popup=0,const QString& not_used_yet=QString::null);
|
||||
/**
|
||||
* remove a button with the given ID
|
||||
*/
|
||||
void removeButton(int id);
|
||||
/**
|
||||
* append a new tab to the tab area. It can be accessed lateron with tabb(id);
|
||||
* @param pic a bitmap for the tab
|
||||
* @param id an arbitrary ID which can be used later on to identify the tab
|
||||
* @param text if a mode with text is used it will be the tab text, otherwise a mouse over hint
|
||||
*/
|
||||
int appendTab(const QPixmap &pic,int id=-1,const QString& text=QString::null);
|
||||
/**
|
||||
* remove a tab with a given ID
|
||||
*/
|
||||
void removeTab(int id);
|
||||
/**
|
||||
* set a tab to "raised"
|
||||
* @param id The ID of the tab to manipulate
|
||||
* @param state true == activated/raised, false == not active
|
||||
*/
|
||||
void setTab(int id ,bool state);
|
||||
/**
|
||||
* return the state of a tab, identified by it's ID
|
||||
*/
|
||||
bool isTabRaised(int id) const;
|
||||
/**
|
||||
* get a pointer to a button within the button area identified by its ID
|
||||
*/
|
||||
class KMultiTabBarButton *button(int id) const;
|
||||
|
||||
/**
|
||||
* get a pointer to a tab within the tab area, identiifed by its ID
|
||||
*/
|
||||
class KMultiTabBarTab *tab(int id) const;
|
||||
/**
|
||||
* set the real position of the widget.
|
||||
* @param pos if the mode is horizontal, only use top, bottom, if it is vertical use left or right
|
||||
*/
|
||||
void setPosition(KMultiTabBarPosition pos);
|
||||
/**
|
||||
* set the display style of the tabs
|
||||
*/
|
||||
void setStyle(KMultiTabBarStyle style);
|
||||
/**
|
||||
* be carefull, don't delete tabs yourself and don't delete the list itself
|
||||
*/
|
||||
tabList * tabs();
|
||||
/**
|
||||
* be carefull, don't delete buttons yourself and don't delete the list itself
|
||||
*/
|
||||
buttonList * buttons();
|
||||
|
||||
/**
|
||||
* might vanish, not sure yet
|
||||
*/
|
||||
void showActiveTabTexts(bool show=true);
|
||||
protected:
|
||||
friend class KMultiTabBarButton;
|
||||
virtual void fontChange( const QFont& );
|
||||
void updateSeparator();
|
||||
private:
|
||||
class KMultiTabBarInternal *m_internal;
|
||||
QBoxLayout *m_l;
|
||||
QFrame *m_btnTabSep;
|
||||
buttonList m_buttons;
|
||||
KMultiTabBarPosition m_position;
|
||||
KMultiTabBarPrivate *d;
|
||||
};
|
||||
|
||||
/**
|
||||
* This class should never be created except with the appendButton call of KMultiTabBar
|
||||
*/
|
||||
class KMultiTabBarButton: public QPushButton
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
KMultiTabBarButton(const QPixmap& pic,const QString&, QMenu *popup,
|
||||
int id,QWidget *parent, KMultiTabBar::KMultiTabBarPosition pos, KMultiTabBar::KMultiTabBarStyle style);
|
||||
KMultiTabBarButton(const QString&, QMenu *popup,
|
||||
int id,QWidget *parent, KMultiTabBar::KMultiTabBarPosition pos, KMultiTabBar::KMultiTabBarStyle style);
|
||||
virtual ~KMultiTabBarButton();
|
||||
int id() const;
|
||||
|
||||
public slots:
|
||||
/**
|
||||
* this is used internaly, but can be used by the user, if (s)he wants to
|
||||
* It the according call of KMultiTabBar is invoked though this modifications will be overwritten
|
||||
*/
|
||||
void setPosition(KMultiTabBar::KMultiTabBarPosition);
|
||||
/**
|
||||
* this is used internaly, but can be used by the user, if (s)he wants to
|
||||
* It the according call of KMultiTabBar is invoked though this modifications will be overwritten
|
||||
*/
|
||||
void setStyle(KMultiTabBar::KMultiTabBarStyle);
|
||||
|
||||
/**
|
||||
* modify the text of the button
|
||||
*/
|
||||
void setText(const QString &);
|
||||
|
||||
QSize sizeHint() const;
|
||||
|
||||
protected:
|
||||
KMultiTabBar::KMultiTabBarPosition m_position;
|
||||
KMultiTabBar::KMultiTabBarStyle m_style;
|
||||
QString m_text;
|
||||
virtual void hideEvent( class QHideEvent*);
|
||||
virtual void showEvent( class QShowEvent*);
|
||||
private:
|
||||
int m_id;
|
||||
KMultiTabBarButtonPrivate *d;
|
||||
signals:
|
||||
/**
|
||||
* this is emitted if the button is clicked
|
||||
* @param id the ID identifying the button
|
||||
*/
|
||||
void clicked(int id);
|
||||
protected slots:
|
||||
virtual void slotClicked();
|
||||
};
|
||||
|
||||
/**
|
||||
* This class should never be created except with the appendTab call of KMultiTabBar
|
||||
*/
|
||||
class KMultiTabBarTab: public KMultiTabBarButton
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
KMultiTabBarTab(const QPixmap& pic,const QString&,int id,QWidget *parent,
|
||||
KMultiTabBar::KMultiTabBarPosition pos,KMultiTabBar::KMultiTabBarStyle style);
|
||||
virtual ~KMultiTabBarTab();
|
||||
/**
|
||||
* set the active state of the tab
|
||||
* @param state true==active false==not active
|
||||
*/
|
||||
void setState(bool state);
|
||||
/**
|
||||
* choose if the text should always be displayed
|
||||
* this is only used in classic mode if at all
|
||||
*/
|
||||
void showActiveTabText(bool show);
|
||||
void resize(){ setSize( neededSize() ); }
|
||||
virtual inline const QColorGroup & palette( void ) const
|
||||
{
|
||||
return( colorGroup() );
|
||||
}
|
||||
private:
|
||||
bool m_showActiveTabText;
|
||||
int m_expandedSize;
|
||||
KMultiTabBarTabPrivate *d;
|
||||
protected:
|
||||
friend class KMultiTabBarInternal;
|
||||
void setSize(int);
|
||||
int neededSize();
|
||||
void updateState();
|
||||
virtual void drawButton(QPainter *);
|
||||
virtual void drawButtonLabel(QPainter *);
|
||||
void drawButtonStyled(QPainter *);
|
||||
void drawButtonClassic(QPainter *);
|
||||
protected slots:
|
||||
virtual void slotClicked();
|
||||
void setTabsPosition(KMultiTabBar::KMultiTabBarPosition);
|
||||
|
||||
public slots:
|
||||
virtual void setIcon(const QString&);
|
||||
virtual void setIcon(const QPixmap&);
|
||||
};
|
||||
|
||||
|
||||
|
||||
class KMultiTabBarInternal: public Q3ScrollView
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
KMultiTabBarInternal(QWidget *parent, KMultiTabBar::KMultiTabBarMode m);
|
||||
int appendTab(const QPixmap &,int=-1,const QString& =QString::null);
|
||||
KMultiTabBarTab *tab(int) const;
|
||||
void removeTab(int);
|
||||
void setPosition(enum KMultiTabBar::KMultiTabBarPosition pos);
|
||||
void setStyle(enum KMultiTabBar::KMultiTabBarStyle style);
|
||||
void showActiveTabTexts(bool show);
|
||||
tabList * tabs(){return &m_tabs;}
|
||||
virtual inline const QColorGroup & palette( void ) const
|
||||
{
|
||||
return( colorGroup() );
|
||||
}
|
||||
private:
|
||||
friend class KMultiTabBar;
|
||||
QWidget *box;
|
||||
QBoxLayout *mainLayout;
|
||||
tabList m_tabs;
|
||||
enum KMultiTabBar::KMultiTabBarPosition m_position;
|
||||
bool m_showActiveTabTexts;
|
||||
enum KMultiTabBar::KMultiTabBarStyle m_style;
|
||||
int m_expandedTabSize;
|
||||
int m_lines;
|
||||
protected:
|
||||
/**
|
||||
* [contentsM|m]ousePressEvent are reimplemented from QScrollView
|
||||
* in order to ignore all mouseEvents on the viewport, so that the
|
||||
* parent can handle them.
|
||||
*/
|
||||
virtual void contentsMousePressEvent(QMouseEvent *);
|
||||
virtual void mousePressEvent(QMouseEvent *);
|
||||
virtual void resizeEvent(QResizeEvent *);
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -25,8 +25,6 @@
|
||||
#ifndef _KMultitabbar_h_
|
||||
#define _KMultitabbar_h_
|
||||
|
||||
#ifndef QT3
|
||||
|
||||
#include <QtCore/QString>
|
||||
#include <QtCore/QList>
|
||||
#include <QtGui/QLayout>
|
||||
@@ -307,10 +305,5 @@ protected:
|
||||
};
|
||||
|
||||
|
||||
#else
|
||||
|
||||
#include "kmultitabbar-qt3.h"
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -29,21 +29,9 @@
|
||||
#ifndef _KNOB_H
|
||||
#define _KNOB_H
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtGui/QWidget>
|
||||
#include <QtCore/QPoint>
|
||||
|
||||
#else
|
||||
|
||||
#include <qwidget.h>
|
||||
#include <qpoint.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#include "automatable_object.h"
|
||||
|
||||
|
||||
|
||||
@@ -26,21 +26,9 @@
|
||||
#ifndef _LCD_SPINBOX_H
|
||||
#define _LCD_SPINBOX_H
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtCore/QMap>
|
||||
#include <QtGui/QLCDNumber>
|
||||
|
||||
#else
|
||||
|
||||
#include <qlcdnumber.h>
|
||||
#include <qmap.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#include "automatable_object.h"
|
||||
|
||||
|
||||
|
||||
@@ -26,28 +26,11 @@
|
||||
#ifndef _MAIN_WINDOW_H
|
||||
#define _MAIN_WINDOW_H
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtCore/QList>
|
||||
#include <QtGui/QMainWindow>
|
||||
#include <QtGui/QWorkspace>
|
||||
#include <QtGui/QWhatsThis>
|
||||
|
||||
#else
|
||||
|
||||
#include <qmainwindow.h>
|
||||
#include <qworkspace.h>
|
||||
#include <qwhatsthis.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
|
||||
class QAction;
|
||||
class QDomElement;
|
||||
class QGridLayout;
|
||||
@@ -75,7 +58,7 @@ public:
|
||||
int addWidgetToToolBar( QWidget * _w, int _row = -1, int _col = -1 );
|
||||
void addSpacingToToolBar( int _size );
|
||||
|
||||
void FASTCALL resetWindowTitle( const QString & _add = "" );
|
||||
void resetWindowTitle( const QString & _add = "" );
|
||||
|
||||
void clearKeyModifiers( void );
|
||||
|
||||
@@ -110,7 +93,6 @@ public slots:
|
||||
}
|
||||
void createNewProject( void );
|
||||
void createNewProjectFromTemplate( QAction * _idx );
|
||||
void createNewProjectFromTemplate( int _id );
|
||||
void openProject( void );
|
||||
void updateRecentlyOpenedProjectsMenu( void );
|
||||
void openRecentlyOpenedProject( int );
|
||||
@@ -169,7 +151,7 @@ private:
|
||||
} m_keyMods;
|
||||
|
||||
QMenu * m_tools_menu;
|
||||
vlist<tool *> m_tools;
|
||||
QList<tool *> m_tools;
|
||||
|
||||
|
||||
friend class engine;
|
||||
@@ -179,7 +161,6 @@ private slots:
|
||||
void browseHelp( void );
|
||||
void fillTemplatesMenu( void );
|
||||
void showTool( QAction * _idx );
|
||||
void showTool( int _idx );
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
@@ -38,19 +38,8 @@
|
||||
|
||||
#include <alsa/asoundlib.h>
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtCore/QThread>
|
||||
|
||||
#else
|
||||
|
||||
#include <qthread.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#include "midi_client.h"
|
||||
|
||||
|
||||
|
||||
@@ -40,21 +40,9 @@
|
||||
|
||||
#endif
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtCore/QThread>
|
||||
#include <QtCore/QTimer>
|
||||
|
||||
#else
|
||||
|
||||
#include <qobject.h>
|
||||
#include <qthread.h>
|
||||
#include <qtimer.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#include "midi_client.h"
|
||||
|
||||
@@ -63,11 +51,7 @@ struct pollfd;
|
||||
class QLineEdit;
|
||||
|
||||
|
||||
class midiALSASeq :
|
||||
#ifndef QT4
|
||||
public QObject,
|
||||
#endif
|
||||
public midiClient, public QThread
|
||||
class midiALSASeq : public QThread, public midiClient
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
||||
@@ -26,20 +26,9 @@
|
||||
#ifndef _MIDI_CLIENT_H
|
||||
#define _MIDI_CLIENT_H
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtCore/QStringList>
|
||||
#include <QtCore/QVector>
|
||||
|
||||
#else
|
||||
|
||||
#include <qvaluevector.h>
|
||||
#include <qstringlist.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#include "midi.h"
|
||||
#include "midi_event_processor.h"
|
||||
@@ -116,11 +105,7 @@ public:
|
||||
public:
|
||||
setupWidget( const QString & _caption, QWidget * _parent ) :
|
||||
tabWidget( tabWidget::tr( "Settings for %1" ).arg(
|
||||
tr( _caption
|
||||
#ifndef QT3
|
||||
.toAscii()
|
||||
#endif
|
||||
) ).toUpper(), _parent )
|
||||
tr( _caption.toAscii() ) ).toUpper(), _parent )
|
||||
{
|
||||
}
|
||||
|
||||
@@ -142,7 +127,7 @@ public:
|
||||
|
||||
|
||||
protected:
|
||||
vvector<midiPort *> m_midiPorts;
|
||||
QVector<midiPort *> m_midiPorts;
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* midi_mapper.h - MIDI-mapper for any midiDevice
|
||||
*
|
||||
* Copyright (c) 2005-2006 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2005-2007 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -26,25 +26,13 @@
|
||||
#ifndef _MIDI_MAPPER_H
|
||||
#define _MIDI_MAPPER_H
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtCore/QPair>
|
||||
#include <QtCore/QFile>
|
||||
|
||||
#else
|
||||
|
||||
#include <qmap.h>
|
||||
#include <qpair.h>
|
||||
#include <qfile.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#include "types.h"
|
||||
#include "midi.h"
|
||||
|
||||
|
||||
const Uint8 MIDI_PROGRAMS = 128;
|
||||
const Uint8 MIDI_KEYS = 128;
|
||||
|
||||
|
||||
@@ -27,18 +27,8 @@
|
||||
#ifndef _MIDI_PORT_H
|
||||
#define _MIDI_PORT_H
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtCore/QString>
|
||||
|
||||
#else
|
||||
|
||||
#include <qstring.h>
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
@@ -27,22 +27,8 @@
|
||||
#ifndef _MIDI_TAB_WIDGET_H
|
||||
#define _MIDI_TAB_WIDGET_H
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtGui/QWidget>
|
||||
|
||||
#else
|
||||
|
||||
#include <qwidget.h>
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include "journalling_object.h"
|
||||
|
||||
|
||||
@@ -87,9 +73,6 @@ protected slots:
|
||||
void writeablePortsChanged( void );
|
||||
void activatedReadablePort( QAction * _item );
|
||||
void activatedWriteablePort( QAction * _item );
|
||||
// Qt3-version
|
||||
void activatedReadablePort( int _id );
|
||||
void activatedWriteablePort( int _id );
|
||||
|
||||
private:
|
||||
instrumentTrack * m_instrumentTrack;
|
||||
|
||||
@@ -30,23 +30,10 @@
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtCore/QMutex>
|
||||
#include <QtCore/QThread>
|
||||
#include <QtCore/QVector>
|
||||
|
||||
#else
|
||||
|
||||
#include <qobject.h>
|
||||
#include <qmutex.h>
|
||||
#include <qthread.h>
|
||||
#include <qvaluevector.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#include "types.h"
|
||||
#include "note.h"
|
||||
@@ -138,7 +125,7 @@ public:
|
||||
inline void removeAudioPort( audioPort * _port )
|
||||
{
|
||||
lock();
|
||||
vvector<audioPort *>::iterator it = qFind( m_audioPorts.begin(),
|
||||
QVector<audioPort *>::iterator it = qFind( m_audioPorts.begin(),
|
||||
m_audioPorts.end(),
|
||||
_port );
|
||||
if( it != m_audioPorts.end() )
|
||||
@@ -352,14 +339,14 @@ private:
|
||||
|
||||
const surroundSampleFrame * renderNextBuffer( void );
|
||||
|
||||
vvector<audioPort *> m_audioPorts;
|
||||
QVector<audioPort *> m_audioPorts;
|
||||
|
||||
fpp_t m_framesPerPeriod;
|
||||
|
||||
surroundSampleFrame * m_readBuf;
|
||||
surroundSampleFrame * m_writeBuf;
|
||||
|
||||
vvector<surroundSampleFrame *> m_bufferPool;
|
||||
QVector<surroundSampleFrame *> m_bufferPool;
|
||||
Uint8 m_readBuffer;
|
||||
Uint8 m_writeBuffer;
|
||||
Uint8 m_analBuffer;
|
||||
|
||||
@@ -26,24 +26,8 @@
|
||||
#ifndef _MMP_H
|
||||
#define _MMP_H
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <Qt/QtXml>
|
||||
|
||||
#else
|
||||
|
||||
#include <qdom.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
|
||||
#include "types.h"
|
||||
|
||||
|
||||
@@ -73,7 +57,7 @@ public:
|
||||
multimediaProject( projectTypes _project_type );
|
||||
~multimediaProject();
|
||||
|
||||
bool FASTCALL writeFile( QString & _fn, bool _overwrite_check = TRUE );
|
||||
bool writeFile( QString & _fn, bool _overwrite_check = TRUE );
|
||||
|
||||
inline QDomElement & content( void )
|
||||
{
|
||||
@@ -89,12 +73,12 @@ public:
|
||||
return( m_type );
|
||||
}
|
||||
|
||||
static projectTypes FASTCALL typeOfFile( const QString & _fn );
|
||||
static projectTypes typeOfFile( const QString & _fn );
|
||||
|
||||
|
||||
private:
|
||||
static projectTypes FASTCALL type( const QString & _type_name );
|
||||
static QString FASTCALL typeName( projectTypes _project_type );
|
||||
static projectTypes type( const QString & _type_name );
|
||||
static QString typeName( projectTypes _project_type );
|
||||
|
||||
void cleanMetaNodes( QDomElement _de );
|
||||
|
||||
|
||||
@@ -27,20 +27,9 @@
|
||||
#ifndef _NAME_LABEL_H
|
||||
#define _NAME_LABEL_H
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtGui/QLabel>
|
||||
#include <QtGui/QPixmap>
|
||||
|
||||
#else
|
||||
|
||||
#include <qlabel.h>
|
||||
#include <qpixmap.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
class nameLabel : public QLabel
|
||||
{
|
||||
|
||||
@@ -27,22 +27,8 @@
|
||||
#ifndef _NOTE_H
|
||||
#define _NOTE_H
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtCore/QVector>
|
||||
|
||||
#else
|
||||
|
||||
#include <qvaluevector.h>
|
||||
|
||||
#endif
|
||||
|
||||
#include "volume.h"
|
||||
#include "panning.h"
|
||||
#include "midi_time.h"
|
||||
@@ -216,7 +202,7 @@ private:
|
||||
} ;
|
||||
|
||||
|
||||
typedef vvector<note *> noteVector;
|
||||
typedef QVector<note *> noteVector;
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -38,8 +38,8 @@
|
||||
|
||||
class notePlayHandle;
|
||||
|
||||
typedef vvector<notePlayHandle *> notePlayHandleVector;
|
||||
typedef vvector<const notePlayHandle *> constNotePlayHandleVector;
|
||||
typedef QVector<notePlayHandle *> notePlayHandleVector;
|
||||
typedef QVector<const notePlayHandle *> constNotePlayHandleVector;
|
||||
|
||||
|
||||
class notePlayHandle : public playHandle, public note
|
||||
|
||||
@@ -30,22 +30,10 @@
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtGui/QPixmap>
|
||||
#include <QtCore/QVector>
|
||||
#include <QtCore/QPair>
|
||||
|
||||
#else
|
||||
|
||||
#include <qpixmap.h>
|
||||
#include <qvaluevector.h>
|
||||
#include <qpair.h>
|
||||
|
||||
#endif
|
||||
|
||||
#include "tool_button.h"
|
||||
|
||||
|
||||
@@ -81,7 +69,7 @@ protected:
|
||||
|
||||
|
||||
private:
|
||||
vvector<QPair<QPixmap, QString> > m_states;
|
||||
QVector<QPair<QPixmap, QString> > m_states;
|
||||
QString m_generalToolTip;
|
||||
|
||||
int m_curState;
|
||||
|
||||
@@ -27,26 +27,12 @@
|
||||
#ifndef _PATTERN_H
|
||||
#define _PATTERN_H
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtCore/QVector>
|
||||
#include <QtGui/QWidget>
|
||||
#include <QtGui/QDialog>
|
||||
#include <QtCore/QThread>
|
||||
#include <QtGui/QPixmap>
|
||||
|
||||
#else
|
||||
|
||||
#include <qvaluevector.h>
|
||||
#include <qwidget.h>
|
||||
#include <qdialog.h>
|
||||
#include <qthread.h>
|
||||
#include <qpixmap.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#include "note.h"
|
||||
#include "track.h"
|
||||
|
||||
@@ -27,19 +27,7 @@
|
||||
#ifndef _PIANO_ROLL_H
|
||||
#define _PIANO_ROLL_H
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtGui/QWidget>
|
||||
#include <QtCore/QVector>
|
||||
|
||||
#else
|
||||
|
||||
#include <qwidget.h>
|
||||
#include <qvaluevector.h>
|
||||
|
||||
#endif
|
||||
|
||||
#include "types.h"
|
||||
#include "note.h"
|
||||
|
||||
@@ -27,22 +27,10 @@
|
||||
#ifndef _PIANO_WIDGET_H
|
||||
#define _PIANO_WIDGET_H
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtGui/QWidget>
|
||||
#include <QtGui/QPixmap>
|
||||
#include <QtGui/QScrollBar>
|
||||
|
||||
#else
|
||||
|
||||
#include <qwidget.h>
|
||||
#include <qpixmap.h>
|
||||
#include <qscrollbar.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#include "note.h"
|
||||
|
||||
@@ -81,11 +69,7 @@ public:
|
||||
|
||||
protected:
|
||||
virtual void contextMenuEvent( QContextMenuEvent * _me );
|
||||
#ifndef QT3
|
||||
virtual void customEvent( QEvent * );
|
||||
#else
|
||||
virtual void customEvent( QCustomEvent * );
|
||||
#endif
|
||||
virtual void paintEvent( QPaintEvent * );
|
||||
virtual void mousePressEvent( QMouseEvent * me );
|
||||
virtual void mouseReleaseEvent( QMouseEvent * me );
|
||||
|
||||
@@ -26,19 +26,8 @@
|
||||
#ifndef _PIXMAP_BUTTON_H
|
||||
#define _PIXMAP_BUTTON_H
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtGui/QPixmap>
|
||||
|
||||
#else
|
||||
|
||||
#include <qpixmap.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#include "automatable_button.h"
|
||||
|
||||
|
||||
|
||||
@@ -27,22 +27,8 @@
|
||||
#ifndef _PLAY_HANDLE_H
|
||||
#define _PLAY_HANDLE_H
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtCore/QVector>
|
||||
|
||||
#else
|
||||
|
||||
#include <qvaluevector.h>
|
||||
|
||||
#endif
|
||||
|
||||
#include "types.h"
|
||||
|
||||
class track;
|
||||
@@ -109,8 +95,8 @@ private:
|
||||
} ;
|
||||
|
||||
|
||||
typedef vvector<playHandle *> playHandleVector;
|
||||
typedef vvector<const playHandle *> constPlayHandleVector;
|
||||
typedef QVector<playHandle *> playHandleVector;
|
||||
typedef QVector<const playHandle *> constPlayHandleVector;
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -27,25 +27,10 @@
|
||||
#define _PLUGIN_H
|
||||
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtCore/QString>
|
||||
#include <QtCore/QStringList>
|
||||
#include <QtCore/QVector>
|
||||
|
||||
#else
|
||||
|
||||
#include <qstring.h>
|
||||
#include <qvaluevector.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#include "journalling_object.h"
|
||||
#include "base64.h"
|
||||
|
||||
@@ -105,7 +90,7 @@ public:
|
||||
:
|
||||
desc( NULL )
|
||||
{
|
||||
const vlist<QVariant> l =
|
||||
const QList<QVariant> l =
|
||||
base64::decode( _dump_data ).
|
||||
toList();
|
||||
name = l[0].toString();
|
||||
@@ -114,14 +99,14 @@ public:
|
||||
inline QString dumpBase64( void ) const
|
||||
{
|
||||
return( base64::encode(
|
||||
vlist<QVariant>()
|
||||
QList<QVariant>()
|
||||
<< name << user ) );
|
||||
}
|
||||
plugin::descriptor * desc;
|
||||
QString name;
|
||||
QVariant user;
|
||||
};
|
||||
typedef vlist<key> keyList;
|
||||
typedef QList<key> keyList;
|
||||
|
||||
subPluginFeatures( plugin::pluginTypes _type ) :
|
||||
m_type( _type )
|
||||
@@ -208,7 +193,7 @@ public:
|
||||
|
||||
// fills given vector with descriptors of all available plugins
|
||||
static void FASTCALL getDescriptorsOfAvailPlugins(
|
||||
vvector<descriptor> & _plugin_descs );
|
||||
QVector<descriptor> & _plugin_descs );
|
||||
|
||||
private:
|
||||
const descriptor * m_descriptor;
|
||||
|
||||
@@ -26,27 +26,10 @@
|
||||
#ifndef _PLUGIN_BROWSER_H
|
||||
#define _PLUGIN_BROWSER_H
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtCore/QTimer>
|
||||
#include <QtCore/QVector>
|
||||
#include <QtGui/QPixmap>
|
||||
|
||||
#else
|
||||
|
||||
#include <qvaluevector.h>
|
||||
#include <qpixmap.h>
|
||||
#include <qtimer.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#include "side_bar_widget.h"
|
||||
#include "plugin.h"
|
||||
@@ -64,7 +47,7 @@ public:
|
||||
|
||||
|
||||
private:
|
||||
vvector<plugin::descriptor> m_pluginDescriptors;
|
||||
QVector<plugin::descriptor> m_pluginDescriptors;
|
||||
|
||||
QWidget * m_view;
|
||||
|
||||
|
||||
@@ -27,9 +27,6 @@
|
||||
#ifndef _PRESET_PREVIEW_PLAY_HANDLE_H
|
||||
#define _PRESET_PREVIEW_PLAY_HANDLE_H
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
|
||||
#include "note_play_handle.h"
|
||||
|
||||
|
||||
|
||||
@@ -26,22 +26,11 @@
|
||||
#ifndef _PROJECT_JOURNAL_H
|
||||
#define _PROJECT_JOURNAL_H
|
||||
|
||||
#include "types.h"
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifndef QT3
|
||||
|
||||
#include <QtCore/QHash>
|
||||
#include <QtCore/QVariant>
|
||||
#include <QtCore/QVector>
|
||||
|
||||
#else
|
||||
|
||||
#include <qvariant.h>
|
||||
#include <qvaluevector.h>
|
||||
#include <qmap.h>
|
||||
|
||||
#endif
|
||||
#include "types.h"
|
||||
|
||||
|
||||
class journallingObject;
|
||||
@@ -108,12 +97,8 @@ public:
|
||||
|
||||
|
||||
private:
|
||||
#ifndef QT3
|
||||
typedef QHash<jo_id_t, journallingObject *> joIDMap;
|
||||
#else
|
||||
typedef QMap<jo_id_t, journallingObject *> joIDMap;
|
||||
#endif
|
||||
typedef vvector<jo_id_t> journalEntryVector;
|
||||
typedef QVector<jo_id_t> journalEntryVector;
|
||||
|
||||
joIDMap m_joIDs;
|
||||
|
||||
|
||||
@@ -26,19 +26,8 @@
|
||||
#ifndef _PROJECT_NOTES_H
|
||||
#define _PROJECT_NOTES_H
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtGui/QMainWindow>
|
||||
|
||||
#else
|
||||
|
||||
#include <qmainwindow.h>
|
||||
#define textColor color
|
||||
|
||||
#endif
|
||||
|
||||
#include "journalling_object.h"
|
||||
|
||||
|
||||
|
||||
@@ -1,254 +0,0 @@
|
||||
/*
|
||||
* qt3support.h - layer for supporting Qt3
|
||||
*
|
||||
* Copyright (c) 2005-2007 Tobias Doerffel <tobydox/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 _QT3SUPPORT_H
|
||||
#define _QT3SUPPORT_H
|
||||
|
||||
|
||||
#include <qglobal.h>
|
||||
#include <qpair.h>
|
||||
|
||||
#if QT_VERSION >= 0x040000
|
||||
|
||||
#ifndef QT4
|
||||
#define QT4
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
#ifndef QT3
|
||||
#define QT3
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
|
||||
class QColorGroup;
|
||||
#include <Qt3Support/Q3ListView>
|
||||
|
||||
|
||||
typedef int csize;
|
||||
|
||||
#define vlist QList
|
||||
#define vstack QStack
|
||||
#define vvector QVector
|
||||
|
||||
#include <QtCore/QFileInfo>
|
||||
|
||||
inline QString baseName( const QString & _file )
|
||||
{
|
||||
return( QFileInfo( _file ).absolutePath() + "/" +
|
||||
QFileInfo( _file ).completeBaseName() );
|
||||
}
|
||||
|
||||
|
||||
#else /* QT3 */
|
||||
|
||||
|
||||
#define vlist QValueList
|
||||
#define vstack QValueStack
|
||||
#define vvector QValueVector
|
||||
|
||||
#define qSort qHeapSort
|
||||
|
||||
#define QMenu QPopupMenu
|
||||
#define QAbstractButton QButton
|
||||
#define QScrollArea QScrollView
|
||||
|
||||
#define Q3ListView QListView
|
||||
#define Q3ScrollView QScrollView
|
||||
|
||||
#define QMatrix QWMatrix
|
||||
#define QIcon QIconSet
|
||||
#define QAbstractButton QButton
|
||||
|
||||
|
||||
// QWidget
|
||||
#define setWindowTitle setCaption
|
||||
#define setWindowIcon setIcon
|
||||
#define windowIcon icon
|
||||
#define isExplicitlyHidden isHidden
|
||||
#define accessibleName name
|
||||
#define ensurePolished constPolish
|
||||
|
||||
|
||||
// QMenu/QPopupMenu
|
||||
#define addAction insertItem
|
||||
|
||||
|
||||
// QFile/QIODevice
|
||||
#define seek at
|
||||
|
||||
|
||||
// QFileDialog
|
||||
#define setFileMode setMode
|
||||
#define setDirectory setDir
|
||||
#define selectFile setSelection
|
||||
|
||||
|
||||
// QThread
|
||||
#define isRunning running
|
||||
|
||||
|
||||
// QScrollView/QScrollArea
|
||||
#define setHorizontalScrollBarPolicy setHScrollBarMode
|
||||
#define setVerticalScrollBarPolicy setVScrollBarMode
|
||||
|
||||
|
||||
// QScrollBar
|
||||
#define setMaximum setMaxValue
|
||||
#define setMinimum setMinValue
|
||||
|
||||
|
||||
// QAbstractButton/QButton
|
||||
#define setShortcut setAccel
|
||||
|
||||
|
||||
// QInputEvent/QKeyEvent
|
||||
#define modifiers state
|
||||
|
||||
|
||||
// QProgressBar
|
||||
#define setTextVisible setPercentageVisible
|
||||
|
||||
|
||||
// QComboBox
|
||||
#define addItem insertItem
|
||||
|
||||
|
||||
// QString
|
||||
#define toLower lower
|
||||
#define toUpper upper
|
||||
|
||||
// QTextEdit
|
||||
#define setLineWrapMode setWordWrap
|
||||
#define setPlainText setText
|
||||
|
||||
|
||||
// QSlider
|
||||
#define setTickPosition setTickmarks
|
||||
|
||||
|
||||
// QStatusBar/QSplashScreen
|
||||
#define showMessage message
|
||||
#define clearMessage clear
|
||||
|
||||
|
||||
// QDir
|
||||
#define NoFilter DefaultFilter
|
||||
#define homePath homeDirPath
|
||||
#define rootPath rootDirPath
|
||||
|
||||
|
||||
// QFileInfo
|
||||
#define absoluteFilePath absFilePath
|
||||
|
||||
|
||||
// QToolButton
|
||||
#define setMenu setPopup
|
||||
|
||||
|
||||
// QPixmap
|
||||
#define transformed xForm
|
||||
|
||||
|
||||
// QList
|
||||
#define removeAll remove
|
||||
|
||||
|
||||
// QGridLayout
|
||||
#define setColumnStretch setColStretch
|
||||
#define columnCount numCols
|
||||
#define setColumnMinimumWidth setColSpacing
|
||||
|
||||
|
||||
// QPointer
|
||||
#define QPointer QGuardedPtr
|
||||
|
||||
|
||||
// QRect
|
||||
#define normalized normalize
|
||||
|
||||
|
||||
// Qt-namespace
|
||||
#define ShiftModifier ShiftButton
|
||||
#define ControlModifier ControlButton
|
||||
#define Alignment AlignmentFlags
|
||||
#define TextWordWrap WordBreak
|
||||
|
||||
typedef unsigned int csize;
|
||||
|
||||
// some compat-stuff for older qt-versions...
|
||||
#if QT_VERSION < 0x030200
|
||||
|
||||
#define wasCanceled wasCancelled
|
||||
|
||||
#endif
|
||||
|
||||
#include <qfileinfo.h>
|
||||
|
||||
|
||||
inline QString baseName( const QString & _file )
|
||||
{
|
||||
return( QFileInfo( _file ).dirPath() + "/" +
|
||||
QFileInfo( _file ).baseName( TRUE ) );
|
||||
}
|
||||
|
||||
|
||||
|
||||
#if QT_VERSION < 0x030100
|
||||
|
||||
#include <qmutex.h>
|
||||
|
||||
// Qt 3.0.x doesn't have QMutexLocker, so we implement it on our own...
|
||||
class QMutexLocker
|
||||
{
|
||||
public:
|
||||
QMutexLocker( QMutex * _m ) :
|
||||
m_mutex( _m )
|
||||
{
|
||||
m_mutex->lock();
|
||||
}
|
||||
~QMutexLocker()
|
||||
{
|
||||
m_mutex->unlock();
|
||||
}
|
||||
|
||||
private:
|
||||
QMutex * m_mutex;
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
@@ -1,238 +0,0 @@
|
||||
/****************************************************************************
|
||||
Definition of QXEmbed class
|
||||
|
||||
Copyright (C) 1999-2000 Troll Tech AS
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library 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
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public License
|
||||
along with this library; see the file COPYING.LIB. If not, write to
|
||||
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02110-1301, USA.
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef QXEMBED_H
|
||||
#define QXEMBED_H
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifndef QT4
|
||||
|
||||
#include <qwidget.h>
|
||||
|
||||
|
||||
#ifdef Q_WS_X11
|
||||
|
||||
class QXEmbedData;
|
||||
|
||||
/**
|
||||
* A QXEmbed widget serves as an embedder that can manage one single embedded
|
||||
* X-window. These so-called client windows can be arbitrary Qt or non Qt
|
||||
* applications.
|
||||
*
|
||||
* There are two different ways of using QXEmbed,
|
||||
* from the client side or from the embedder's side.
|
||||
*
|
||||
* Embedding from the client's side requires that the client knows the
|
||||
* window identifier of the respective embedder widget. Use either
|
||||
* embedClientIntoWindow() or the high-level wrapper processClientCmdline().
|
||||
* This is only possible when the client is a Qt application.
|
||||
*
|
||||
* When using it from the embedder's side, you must know the window
|
||||
* identifier of the window that should be embedded. Simply call embed()
|
||||
* with this identifier as parameter. If the client is a Qt application,
|
||||
* make sure it has called QXEmbed::initialize(). Otherwise you should
|
||||
* probably call setProtocol(XPLAIN) before embed().
|
||||
*
|
||||
* Reimplement the change handler windowChanged() to catch embedding or
|
||||
* the destruction of embedded windows. In the latter case, the
|
||||
* embedder also emits a signal embeddedWindowDestroyed() for
|
||||
* convenience.
|
||||
*
|
||||
* @short The QXEmbed widget is a graphical socket that can embed an external X-Window.
|
||||
*/
|
||||
class QXEmbed : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
|
||||
/**
|
||||
*
|
||||
* Constructs a xembed widget.
|
||||
*
|
||||
* The parent, name and f arguments are passed to the QFrame
|
||||
* constructor.
|
||||
*/
|
||||
QXEmbed( QWidget *parent=0, const char *name=0, WFlags f = 0 );
|
||||
|
||||
/**
|
||||
* Destructor. Cleans up the focus if necessary.
|
||||
*/
|
||||
~QXEmbed();
|
||||
|
||||
/**
|
||||
* Embedded applications should call this function to make sure
|
||||
* they support the XEMBED protocol. It is called automatically
|
||||
* when you use embedClientIntoWindow() or
|
||||
* processClientCmdline(). Clients might have to call it
|
||||
* manually when you use embed().
|
||||
*/
|
||||
static void initialize();
|
||||
|
||||
enum Protocol { XEMBED, XPLAIN };
|
||||
|
||||
/**
|
||||
* Sets the protocol used for embedding windows.
|
||||
* This function must be called before embedding a window.
|
||||
* Protocol XEMBED provides maximal functionality (focus, tabs, etc)
|
||||
* but requires explicit cooperation from the embedded window.
|
||||
* Protocol XPLAIN provides maximal compatibility with
|
||||
* embedded applications that do not support the XEMBED protocol.
|
||||
* The default is XEMBED.
|
||||
*
|
||||
* Non KDE applications should be embedded with protocol XPLAIN.
|
||||
* This does not happen automatically yet.
|
||||
* You must call setProtocol() explicitly.
|
||||
*/
|
||||
|
||||
void setProtocol( Protocol proto );
|
||||
|
||||
/**
|
||||
* Returns the protocol used for embedding the current window.
|
||||
*
|
||||
* @return the protocol used by QXEmbed.
|
||||
*/
|
||||
|
||||
Protocol protocol();
|
||||
|
||||
/**
|
||||
* Embeds the window with the identifier w into this xembed widget.
|
||||
*
|
||||
* This function is useful if the embedder knows about the client window
|
||||
* that should be embedded. Often it is vice versa: the client knows
|
||||
* about its target embedder. In that case, it is not necessary to call
|
||||
* embed(). Instead, the client will call the static function
|
||||
* embedClientIntoWindow().
|
||||
*
|
||||
* @param w the identifier of the window to embed
|
||||
* @see embeddedWinId()
|
||||
*/
|
||||
void embed( WId w );
|
||||
|
||||
/**
|
||||
* Returns the window identifier of the embedded window, or 0 if no
|
||||
* window is embedded yet.
|
||||
*
|
||||
* @return the id of the embedded window (0 if no window is embedded)
|
||||
*/
|
||||
WId embeddedWinId() const;
|
||||
|
||||
/**
|
||||
* A function for clients that embed themselves. The widget
|
||||
* client will be embedded in the window window. The application has
|
||||
* to ensure that window is the handle of the window identifier of
|
||||
* an QXEmbed widget.
|
||||
*
|
||||
* @short #processClientCmdline()
|
||||
*/
|
||||
static void embedClientIntoWindow( QWidget* client, WId window );
|
||||
|
||||
/**
|
||||
* A utility function for clients that embed theirselves. The widget
|
||||
* client will be embedded in the window that is passed as
|
||||
* -embed command line argument.
|
||||
*
|
||||
* The function returns true on success or false if no such command line
|
||||
* parameter is specified.
|
||||
*
|
||||
* @see embedClientIntoWindow()
|
||||
*/
|
||||
static bool processClientCmdline( QWidget* client, int& argc, char ** argv );
|
||||
|
||||
/**
|
||||
* Sends a WM_DELETE_WINDOW message to the embedded window. This is what
|
||||
* typically happens when you click on the close button of a window
|
||||
* manager decoration. This should cause the embedded application to
|
||||
* cleanly close the window. Signal embeddedWindowDestroyed() can be used
|
||||
* to monitor the status of the embedded window.
|
||||
*/
|
||||
void sendDelete( void );
|
||||
|
||||
/**
|
||||
* Selects what shoud be done with the embedded window when the embedding
|
||||
* window is destroyed. When the argument is true, the embedded window is
|
||||
* kept alive, is hidden, and receives a WM_DELETE_WINDOW message using
|
||||
* sendDelete(). This is the default. Otherwise, the destruction of the
|
||||
* QXEmbed object simply destroys the embedded window.
|
||||
*
|
||||
* @see sendDelete()
|
||||
*/
|
||||
void setAutoDelete( bool );
|
||||
|
||||
/**
|
||||
* Returns the value of flag indicating what shoud be done with the
|
||||
* embedded window when the embedding window is destroyed.
|
||||
*
|
||||
* @see setAutoDelete()
|
||||
*/
|
||||
bool autoDelete() const;
|
||||
|
||||
/* Reimp */
|
||||
QSize sizeHint() const;
|
||||
QSize minimumSizeHint() const;
|
||||
QSizePolicy sizePolicy() const;
|
||||
bool eventFilter( QObject *, QEvent * );
|
||||
bool customWhatsThis() const;
|
||||
void enterWhatsThisMode(); // temporary, fix in Qt (Matthias, Mon Jul 17 15:20:55 CEST 2000 )
|
||||
virtual void reparent( QWidget * parent, WFlags f, const QPoint & p, bool showIt = false );
|
||||
|
||||
signals:
|
||||
/**
|
||||
* This signal is emitted when the embedded window has been lost (destroyed or reparented away)
|
||||
*
|
||||
* @see embeddedWinId()
|
||||
*/
|
||||
// KDE4 rename to embeddedWindowLost()
|
||||
void embeddedWindowDestroyed();
|
||||
|
||||
protected:
|
||||
bool event( QEvent * );
|
||||
void keyPressEvent( QKeyEvent * );
|
||||
void keyReleaseEvent( QKeyEvent * );
|
||||
void focusInEvent( QFocusEvent * );
|
||||
void focusOutEvent( QFocusEvent * );
|
||||
void resizeEvent(QResizeEvent *);
|
||||
void showEvent( QShowEvent * );
|
||||
bool x11Event( XEvent* );
|
||||
|
||||
/**
|
||||
* A change handler that indicates that the embedded window has been
|
||||
* changed. The window handle can also be retrieved with
|
||||
* embeddedWinId().
|
||||
*
|
||||
* @param w the handle of the window that changed
|
||||
*/
|
||||
virtual void windowChanged( WId w );
|
||||
|
||||
bool focusNextPrevChild( bool next );
|
||||
|
||||
private:
|
||||
WId window;
|
||||
QXEmbedData* d;
|
||||
void checkGrab();
|
||||
void sendSyntheticConfigureNotifyEvent();
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
@@ -25,24 +25,11 @@
|
||||
#ifndef _RACK_VIEW_H
|
||||
#define _RACK_VIEW_H
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtGui/QWidget>
|
||||
#include <QtGui/QLayout>
|
||||
#include <QtGui/QScrollArea>
|
||||
#include <QtGui/QVBoxLayout>
|
||||
|
||||
#else
|
||||
|
||||
#include <qwidget.h>
|
||||
#include <qlayout.h>
|
||||
#include <qscrollview.h>
|
||||
#include <qvbox.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#include "types.h"
|
||||
#include "journalling_object.h"
|
||||
@@ -85,7 +72,7 @@ private:
|
||||
void redraw();
|
||||
|
||||
|
||||
vvector<rackPlugin *> m_rackInserts;
|
||||
QVector<rackPlugin *> m_rackInserts;
|
||||
|
||||
QVBoxLayout * m_mainLayout;
|
||||
QScrollArea * m_scrollArea;
|
||||
|
||||
@@ -27,18 +27,8 @@
|
||||
#ifndef _RENAME_DIALOG_H
|
||||
#define _RENAME_DIALOG_H
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtGui/QDialog>
|
||||
|
||||
#else
|
||||
|
||||
#include <qdialog.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
class QLineEdit;
|
||||
|
||||
|
||||
@@ -27,20 +27,9 @@
|
||||
#ifndef _RUBBERBAND_H
|
||||
#define _RUBBERBAND_H
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifndef QT3
|
||||
|
||||
#include <QtGui/QRubberBand>
|
||||
#include <QtCore/QVector>
|
||||
|
||||
#else
|
||||
|
||||
#include <qwidget.h>
|
||||
#include <qvaluevector.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
class selectableObject : public QWidget
|
||||
{
|
||||
@@ -90,33 +79,21 @@ private:
|
||||
|
||||
|
||||
|
||||
typedef
|
||||
#ifndef QT3
|
||||
QRubberBand
|
||||
#else
|
||||
QWidget
|
||||
#endif
|
||||
rubberBandBase;
|
||||
|
||||
|
||||
class rubberBand : public rubberBandBase
|
||||
class rubberBand : public QRubberBand
|
||||
{
|
||||
public:
|
||||
rubberBand( QWidget * _parent );
|
||||
virtual ~rubberBand();
|
||||
|
||||
vvector<selectableObject *> selectedObjects( void ) const;
|
||||
QVector<selectableObject *> selectedObjects( void ) const;
|
||||
|
||||
|
||||
protected:
|
||||
virtual void resizeEvent( QResizeEvent * _re );
|
||||
#ifdef QT3
|
||||
virtual bool event( QEvent * _e );
|
||||
void updateMask( void );
|
||||
#endif
|
||||
|
||||
private:
|
||||
vvector<selectableObject *> selectableObjects( void ) const;
|
||||
QVector<selectableObject *> selectableObjects( void ) const;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -26,19 +26,8 @@
|
||||
#ifndef _SAMPLE_BUFFER_H
|
||||
#define _SAMPLE_BUFFER_H
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtCore/QObject>
|
||||
|
||||
#else
|
||||
|
||||
#include <qobject.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
@@ -27,19 +27,8 @@
|
||||
#ifndef _SAMPLE_TRACK_H
|
||||
#define _SAMPLE_TRACK_H
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtGui/QDialog>
|
||||
|
||||
#else
|
||||
|
||||
#include <qdialog.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#include "track.h"
|
||||
|
||||
class QLabel;
|
||||
|
||||
@@ -26,21 +26,9 @@
|
||||
#ifndef _SETUP_DIALOG_H
|
||||
#define _SETUP_DIALOG_H
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtGui/QDialog>
|
||||
#include <QtCore/QMap>
|
||||
|
||||
#else
|
||||
|
||||
#include <qdialog.h>
|
||||
#include <qmap.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#include "audio_device.h"
|
||||
#include "midi_client.h"
|
||||
|
||||
|
||||
@@ -26,19 +26,8 @@
|
||||
#ifndef _SIDE_BAR_H
|
||||
#define _SIDE_BAR_H
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtCore/QMap>
|
||||
|
||||
#else
|
||||
|
||||
#include <qmap.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#include "kmultitabbar.h"
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* side_bar_widget.h - base-class for all side-bar-widgets
|
||||
*
|
||||
* Copyright (c) 2004-2006 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2004-2007 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -26,22 +26,10 @@
|
||||
#ifndef _SIDE_BAR_WIDGET_H
|
||||
#define _SIDE_BAR_WIDGET_H
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtGui/QPixmap>
|
||||
#include <QtGui/QVBoxLayout>
|
||||
#include <QtGui/QWidget>
|
||||
|
||||
#else
|
||||
|
||||
#include <qwidget.h>
|
||||
#include <qlayout.h>
|
||||
#include <qpixmap.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
class sideBarWidget : public QWidget
|
||||
{
|
||||
|
||||
@@ -301,7 +301,7 @@ private:
|
||||
ACT_STOP_PLAY, ACT_PLAY_SONG, ACT_PLAY_TRACK, ACT_PLAY_BB,
|
||||
ACT_PLAY_PATTERN, ACT_PAUSE, ACT_RESUME_FROM_PAUSE
|
||||
} ;
|
||||
vvector<ACTIONS> m_actions;
|
||||
QVector<ACTIONS> m_actions;
|
||||
|
||||
|
||||
friend class engine;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* spc_bg_hndl_widget.h - class specialBgHandlingWidget
|
||||
*
|
||||
* Copyright (c) 2005-2006 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2005-2007 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -26,20 +26,10 @@
|
||||
#ifndef _SPC_BG_HNDL_WIDGET_H
|
||||
#define _SPC_BG_HNDL_WIDGET_H
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtGui/QWidget>
|
||||
#include <QtGui/QPainter>
|
||||
#include <QtGui/QPixmap>
|
||||
|
||||
#else
|
||||
|
||||
#include <qwidget.h>
|
||||
#include <qpixmap.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
class specialBgHandlingWidget
|
||||
@@ -80,16 +70,10 @@ public:
|
||||
const specialBgHandlingWidget *>( pw );
|
||||
if( s->backgroundPixmap().isNull() == FALSE )
|
||||
{
|
||||
#ifdef QT4
|
||||
QPainter p( &pm );
|
||||
p.drawPixmap( 0, 0, s->backgroundPixmap(),
|
||||
_w->x(), _w->y(), _w->width(),
|
||||
_w->height() );
|
||||
#else
|
||||
bitBlt( &pm, 0, 0, &s->backgroundPixmap(),
|
||||
_w->x(), _w->y(), _w->width(),
|
||||
_w->height() );
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -98,7 +82,6 @@ public:
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef QT4
|
||||
QPainter p( &pm );
|
||||
const QBrush & br = pw->palette().brush(
|
||||
pw->backgroundRole() );
|
||||
@@ -112,22 +95,6 @@ public:
|
||||
{
|
||||
pm.fill( br.color() );
|
||||
}
|
||||
#else
|
||||
const QPixmap * pbp = pw->paletteBackgroundPixmap();
|
||||
if( pbp == NULL )
|
||||
{
|
||||
pbp = pw->erasePixmap();
|
||||
}
|
||||
if( pbp )
|
||||
{
|
||||
bitBlt( &pm, 0, 0, pbp, _w->x(), _w->y(),
|
||||
_w->width(), _w->height() );
|
||||
}
|
||||
else
|
||||
{
|
||||
pm.fill( pw->paletteBackgroundColor() );
|
||||
}
|
||||
#endif
|
||||
}
|
||||
return( pm );
|
||||
}
|
||||
|
||||
@@ -26,28 +26,15 @@
|
||||
#ifndef _STRING_PAIR_DRAG_H
|
||||
#define _STRING_PAIR_DRAG_H
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtGui/QDrag>
|
||||
|
||||
#else
|
||||
|
||||
#include <qdragobject.h>
|
||||
|
||||
#endif
|
||||
#include <QtGui/QDragEnterEvent>
|
||||
#include <QtGui/QDropEvent>
|
||||
|
||||
|
||||
class QPixmap;
|
||||
|
||||
|
||||
class stringPairDrag : public
|
||||
#ifdef QT4
|
||||
QDrag
|
||||
#else
|
||||
QStoredDrag
|
||||
#endif
|
||||
class stringPairDrag : public QDrag
|
||||
{
|
||||
public:
|
||||
stringPairDrag( const QString & _key, const QString & _value,
|
||||
|
||||
@@ -28,19 +28,8 @@
|
||||
#ifndef _SURROUND_AREA_H
|
||||
#define _SURROUND_AREA_H
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtGui/QWidget>
|
||||
|
||||
#else
|
||||
|
||||
#include <qwidget.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#include "mixer.h"
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* tab_bar.h - class tabBar
|
||||
*
|
||||
* Copyright (c) 2004-2006 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2004-2007 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -30,23 +30,10 @@
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtCore/QMap>
|
||||
#include <QtGui/QLayout>
|
||||
#include <QtGui/QWidget>
|
||||
|
||||
#else
|
||||
|
||||
#include <qwidget.h>
|
||||
#include <qmap.h>
|
||||
#include <qlayout.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
class tabButton;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* tab_button.h - declaration of class tabButton
|
||||
*
|
||||
* Copyright (c) 2005-2006 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2005-2007 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -26,19 +26,8 @@
|
||||
#ifndef _TAB_BUTTON_H
|
||||
#define _TAB_BUTTON_H
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtGui/QPushButton>
|
||||
|
||||
#else
|
||||
|
||||
#include <qpushbutton.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
class tabButton : public QPushButton
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* tab_widget.h - LMMS-tabwidget
|
||||
*
|
||||
* Copyright (c) 2005 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2005-2007 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -26,26 +26,9 @@
|
||||
#ifndef _TAB_WIDGET_H
|
||||
#define _TAB_WIDGET_H
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtGui/QWidget>
|
||||
#include <QtCore/QMap>
|
||||
|
||||
#else
|
||||
|
||||
#include <qwidget.h>
|
||||
#include <qmap.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#include "spc_bg_hndl_widget.h"
|
||||
|
||||
|
||||
@@ -56,10 +39,10 @@ public:
|
||||
tabWidget( const QString & _caption, QWidget * _parent );
|
||||
~tabWidget();
|
||||
|
||||
void FASTCALL addTab( QWidget * _w, const QString & _name,
|
||||
void addTab( QWidget * _w, const QString & _name,
|
||||
int _idx = -1 );
|
||||
|
||||
void FASTCALL setActiveTab( int _idx );
|
||||
void setActiveTab( int _idx );
|
||||
|
||||
inline int activeTab( void ) const
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* templates.h - miscellanous templates and algorithms
|
||||
*
|
||||
* Copyright (c) 2004-2005 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2004-2007 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
|
||||
*
|
||||
@@ -26,18 +26,8 @@
|
||||
#ifndef _TEMPLATES_H
|
||||
#define _TEMPLATES_H
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtCore/QtAlgorithms>
|
||||
|
||||
#else
|
||||
|
||||
#include <qtl.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
template<class T>
|
||||
inline T tAbs( const T & x )
|
||||
|
||||
@@ -26,20 +26,9 @@
|
||||
#ifndef _TEXT_FLOAT
|
||||
#define _TEXT_FLOAT
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtGui/QWidget>
|
||||
#include <QtGui/QPixmap>
|
||||
|
||||
#else
|
||||
|
||||
#include <qwidget.h>
|
||||
#include <qpixmap.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
class textFloat : public QWidget
|
||||
{
|
||||
|
||||
@@ -26,19 +26,8 @@
|
||||
#ifndef _TIMELINE_H
|
||||
#define _TIMELINE_H
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtGui/QWidget>
|
||||
|
||||
#else
|
||||
|
||||
#include <qwidget.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#include "song_editor.h"
|
||||
|
||||
|
||||
|
||||
@@ -26,20 +26,9 @@
|
||||
#ifndef _TOOL_BUTTON_H
|
||||
#define _TOOL_BUTTON_H
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtGui/QToolButton>
|
||||
#include <QtGui/QColor>
|
||||
|
||||
#else
|
||||
|
||||
#include <qtoolbutton.h>
|
||||
#include <qcolor.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
class toolButton : public QToolButton
|
||||
{
|
||||
|
||||
@@ -31,22 +31,10 @@
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtCore/QVector>
|
||||
#include <QtCore/QList>
|
||||
#include <QtGui/QWidget>
|
||||
|
||||
#else
|
||||
|
||||
#include <qwidget.h>
|
||||
#include <qvaluevector.h>
|
||||
#include <qvaluelist.h>
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
@@ -179,14 +167,14 @@ public:
|
||||
trackContentWidget( trackWidget * _parent );
|
||||
virtual ~trackContentWidget();
|
||||
|
||||
trackContentObject * FASTCALL getTCO( csize _tco_num );
|
||||
csize numOfTCOs( void );
|
||||
trackContentObject * FASTCALL getTCO( int _tco_num );
|
||||
int numOfTCOs( void );
|
||||
trackContentObject * FASTCALL addTCO( trackContentObject * _tco );
|
||||
void FASTCALL removeTCO( csize _tco_num, bool _also_delete = TRUE );
|
||||
void FASTCALL removeTCO( int _tco_num, bool _also_delete = TRUE );
|
||||
void FASTCALL removeTCO( trackContentObject * _tco,
|
||||
bool _also_delete = TRUE );
|
||||
void removeAllTCOs( void );
|
||||
void FASTCALL swapPositionOfTCOs( csize _tco_num1, csize _tco_num2 );
|
||||
void FASTCALL swapPositionOfTCOs( int _tco_num1, int _tco_num2 );
|
||||
|
||||
inline Uint16 pixelsPerTact( void ) const
|
||||
{
|
||||
@@ -232,7 +220,7 @@ private:
|
||||
track * getTrack( void );
|
||||
midiTime getPosition( int _mouse_x );
|
||||
|
||||
typedef vvector<trackContentObject *> tcoVector;
|
||||
typedef QVector<trackContentObject *> tcoVector;
|
||||
|
||||
tcoVector m_trackContentObjects;
|
||||
trackWidget * m_trackWidget;
|
||||
@@ -451,14 +439,14 @@ public:
|
||||
|
||||
|
||||
trackContentObject * FASTCALL addTCO( trackContentObject * _tco );
|
||||
void FASTCALL removeTCO( csize _tco_num );
|
||||
csize numOfTCOs( void );
|
||||
trackContentObject * FASTCALL getTCO( csize _tco_num );
|
||||
csize FASTCALL getTCONum( trackContentObject * _tco );
|
||||
void FASTCALL getTCOsInRange( vlist<trackContentObject *> & _tco_v,
|
||||
void FASTCALL removeTCO( int _tco_num );
|
||||
int numOfTCOs( void );
|
||||
trackContentObject * FASTCALL getTCO( int _tco_num );
|
||||
int FASTCALL getTCONum( trackContentObject * _tco );
|
||||
void FASTCALL getTCOsInRange( QList<trackContentObject *> & _tco_v,
|
||||
const midiTime & _start,
|
||||
const midiTime & _end );
|
||||
void FASTCALL swapPositionOfTCOs( csize _tco_num1, csize _tco_num2 );
|
||||
void FASTCALL swapPositionOfTCOs( int _tco_num1, int _tco_num2 );
|
||||
|
||||
inline trackWidget * getTrackWidget( void )
|
||||
{
|
||||
@@ -512,13 +500,13 @@ protected:
|
||||
private:
|
||||
trackContainer * m_trackContainer;
|
||||
trackWidget * m_trackWidget;
|
||||
vlist<automationPattern *> m_automation_patterns;
|
||||
QList<automationPattern *> m_automation_patterns;
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
typedef vvector<track *> trackVector;
|
||||
typedef vvector<const track *> constTrackVector;
|
||||
typedef QVector<track *> trackVector;
|
||||
typedef QVector<const track *> constTrackVector;
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -27,22 +27,10 @@
|
||||
#ifndef _TRACK_CONTAINER_H
|
||||
#define _TRACK_CONTAINER_H
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtGui/QScrollArea>
|
||||
#include <QtCore/QVector>
|
||||
#include <QtGui/QMainWindow>
|
||||
|
||||
#else
|
||||
|
||||
#include <qscrollview.h>
|
||||
#include <qvaluevector.h>
|
||||
#include <qmainwindow.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#include "track.h"
|
||||
#include "journalling_object.h"
|
||||
@@ -118,15 +106,15 @@ public:
|
||||
return( m_rubberBand->isVisible() );
|
||||
}
|
||||
|
||||
inline vvector<selectableObject *> selectedObjects( void )
|
||||
inline QVector<selectableObject *> selectedObjects( void )
|
||||
{
|
||||
if( allowRubberband() == TRUE )
|
||||
{
|
||||
return( m_rubberBand->selectedObjects() );
|
||||
}
|
||||
//return( vvector<selectableObject *>() );
|
||||
vvector<selectableObject *> foo;
|
||||
return( foo );
|
||||
return( QVector<selectableObject *>() );
|
||||
/* QVector<selectableObject *> foo;
|
||||
return( foo );*/
|
||||
}
|
||||
|
||||
trackVector tracks( void );
|
||||
@@ -184,7 +172,7 @@ private:
|
||||
|
||||
|
||||
scrollArea * m_scrollArea;
|
||||
typedef vvector<trackWidget *> trackWidgetVector;
|
||||
typedef QVector<trackWidget *> trackWidgetVector;
|
||||
|
||||
trackWidgetVector m_trackWidgets;
|
||||
float m_ppt;
|
||||
|
||||
@@ -26,21 +26,9 @@
|
||||
#ifndef _VISUALIZATION_WIDGET
|
||||
#define _VISUALIZATION_WIDGET
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtGui/QWidget>
|
||||
#include <QtGui/QPixmap>
|
||||
|
||||
#else
|
||||
|
||||
#include <qwidget.h>
|
||||
#include <qpixmap.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#include "mixer.h"
|
||||
|
||||
|
||||
|
||||
519
include/xqmap.h
519
include/xqmap.h
@@ -1,519 +0,0 @@
|
||||
/*
|
||||
* XQMap.h - eXtended QMap template for Qt3
|
||||
*
|
||||
* Copyright (c) 2006 Javier Serrano Polo <jasp00/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 XQMAP_H
|
||||
#define XQMAP_H
|
||||
|
||||
#include <qmap.h>
|
||||
|
||||
|
||||
|
||||
|
||||
template<class Key, class T>
|
||||
class XQMapPrivate : public QMapPrivate<Key, T>
|
||||
{
|
||||
public:
|
||||
typedef QMapConstIterator<Key, T> ConstIterator;
|
||||
typedef QMapNode<Key, T> * NodePtr;
|
||||
|
||||
XQMapPrivate( void );
|
||||
XQMapPrivate( const XQMapPrivate<Key, T> * _map );
|
||||
|
||||
ConstIterator lowerBound( const Key & _k ) const;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
template<class Key, class T>
|
||||
Q_INLINE_TEMPLATES XQMapPrivate<Key, T>::XQMapPrivate( void )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
template<class Key, class T>
|
||||
Q_INLINE_TEMPLATES XQMapPrivate<Key, T>::XQMapPrivate(
|
||||
const XQMapPrivate<Key, T> * _map ) :
|
||||
QMapPrivate<Key, T>( _map )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
template<class Key, class T>
|
||||
Q_INLINE_TEMPLATES Q_TYPENAME XQMapPrivate<Key, T>::ConstIterator
|
||||
XQMapPrivate<Key, T>::lowerBound( const Key & _k ) const
|
||||
{
|
||||
QMapNodeBase * y = QMapPrivate<Key, T>::header; // Last node
|
||||
QMapNodeBase * x = QMapPrivate<Key, T>::header->parent; // Root node
|
||||
|
||||
while( x != 0 ) {
|
||||
// If as k <= key(x) go left
|
||||
if( !( QMapPrivate<Key, T>::key( x ) < _k ) )
|
||||
{
|
||||
y = x;
|
||||
x = x->left;
|
||||
}
|
||||
else
|
||||
{
|
||||
x = x->right;
|
||||
}
|
||||
}
|
||||
|
||||
// Was _k bigger then the biggest element of the tree? Return end()
|
||||
if( y == QMapPrivate<Key, T>::header )
|
||||
{
|
||||
return( ConstIterator( QMapPrivate<Key, T>::header ) );
|
||||
}
|
||||
return( ConstIterator( (NodePtr)y ) );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
template<class Key, class T>
|
||||
class XQMap
|
||||
{
|
||||
public:
|
||||
/**
|
||||
* Typedefs
|
||||
*/
|
||||
typedef Key key_type;
|
||||
typedef T mapped_type;
|
||||
typedef QPair<const key_type, mapped_type> value_type;
|
||||
typedef value_type * pointer;
|
||||
typedef const value_type * const_pointer;
|
||||
typedef value_type & reference;
|
||||
typedef const value_type & const_reference;
|
||||
#ifndef QT_NO_STL
|
||||
typedef ptrdiff_t difference_type;
|
||||
#else
|
||||
typedef int difference_type;
|
||||
#endif
|
||||
typedef size_t size_type;
|
||||
typedef QMapIterator<Key, T> iterator;
|
||||
typedef QMapConstIterator<Key, T> const_iterator;
|
||||
typedef QPair<iterator, bool> insert_pair;
|
||||
|
||||
typedef QMapIterator<Key, T> Iterator;
|
||||
typedef QMapConstIterator<Key, T> ConstIterator;
|
||||
typedef T ValueType;
|
||||
typedef XQMapPrivate<Key, T> Priv;
|
||||
|
||||
/**
|
||||
* API
|
||||
*/
|
||||
XQMap( void )
|
||||
{
|
||||
m_sh = new XQMapPrivate<Key, T>;
|
||||
}
|
||||
XQMap( const XQMap<Key, T> & _m )
|
||||
{
|
||||
m_sh = _m.m_sh;
|
||||
m_sh->ref();
|
||||
}
|
||||
|
||||
#ifndef QT_NO_STL
|
||||
XQMap( const std::map<Key, T> & _m )
|
||||
{
|
||||
m_sh = new XQMapPrivate<Key, T>;
|
||||
Q_TYPENAME std::map<Key, T>::const_iterator it = _m.begin();
|
||||
for( ; it != _m.end(); ++it )
|
||||
{
|
||||
value_type p( ( *it ).first, ( *it ).second );
|
||||
insert( p );
|
||||
}
|
||||
}
|
||||
#endif
|
||||
~XQMap()
|
||||
{
|
||||
if( m_sh->deref() )
|
||||
{
|
||||
delete m_sh;
|
||||
}
|
||||
}
|
||||
XQMap<Key, T> & operator=( const XQMap<Key, T> & _m );
|
||||
#ifndef QT_NO_STL
|
||||
XQMap<Key, T> & operator=( const std::map<Key, T> & _m )
|
||||
{
|
||||
clear();
|
||||
Q_TYPENAME std::map<Key, T>::const_iterator it = _m.begin();
|
||||
for( ; it != _m.end(); ++it )
|
||||
{
|
||||
value_type p( ( *it ).first, ( *it ).second );
|
||||
insert( p );
|
||||
}
|
||||
return( *this );
|
||||
}
|
||||
#endif
|
||||
|
||||
iterator begin( void )
|
||||
{
|
||||
detach();
|
||||
return( m_sh->begin() );
|
||||
}
|
||||
iterator end( void )
|
||||
{
|
||||
detach();
|
||||
return( m_sh->end() );
|
||||
}
|
||||
const_iterator begin( void ) const
|
||||
{
|
||||
return( ( (const Priv *)m_sh )->begin() );
|
||||
}
|
||||
const_iterator end( void ) const
|
||||
{
|
||||
return( ( (const Priv *)m_sh )->end() );
|
||||
}
|
||||
const_iterator constBegin( void ) const
|
||||
{
|
||||
return( begin() );
|
||||
}
|
||||
const_iterator constEnd( void ) const
|
||||
{
|
||||
return( end() );
|
||||
}
|
||||
|
||||
iterator replace( const Key & _k, const T & _v )
|
||||
{
|
||||
remove( _k );
|
||||
return( insert( _k, _v ) );
|
||||
}
|
||||
|
||||
size_type size( void ) const
|
||||
{
|
||||
return( m_sh->node_count );
|
||||
}
|
||||
bool empty( void ) const
|
||||
{
|
||||
return( m_sh->node_count == 0 );
|
||||
}
|
||||
QPair<iterator, bool> insert( const value_type & _x );
|
||||
|
||||
void erase( iterator _it )
|
||||
{
|
||||
detach();
|
||||
m_sh->remove( _it );
|
||||
}
|
||||
void erase( const key_type & _k );
|
||||
size_type count( const key_type & _k ) const;
|
||||
T & operator[]( const Key & _k );
|
||||
void clear( void );
|
||||
|
||||
iterator find( const Key & _k )
|
||||
{
|
||||
detach();
|
||||
return( iterator( m_sh->find( _k ).node ) );
|
||||
}
|
||||
|
||||
iterator lowerBound( const Key & _k )
|
||||
{
|
||||
detach();
|
||||
return( iterator( m_sh->lowerBound( _k ).node ) );
|
||||
}
|
||||
|
||||
const_iterator find( const Key & _k ) const
|
||||
{
|
||||
return( m_sh->find( _k ) );
|
||||
}
|
||||
|
||||
const_iterator lowerBound( const Key & _k ) const
|
||||
{
|
||||
return( m_sh->lowerBound( _k ) );
|
||||
}
|
||||
|
||||
const T & operator[]( const Key & _k ) const
|
||||
{
|
||||
QT_CHECK_INVALID_MAP_ELEMENT;
|
||||
return( m_sh->find( _k ).data() );
|
||||
}
|
||||
bool contains( const Key & _k ) const
|
||||
{
|
||||
return( find( _k ) != end() );
|
||||
}
|
||||
|
||||
size_type count( void ) const
|
||||
{
|
||||
return( m_sh->node_count );
|
||||
}
|
||||
|
||||
QValueList<Key> keys( void ) const
|
||||
{
|
||||
QValueList<Key> r;
|
||||
for( const_iterator i = begin(); i != end(); ++i )
|
||||
{
|
||||
r.append( i.key() );
|
||||
}
|
||||
return( r );
|
||||
}
|
||||
|
||||
QValueList<T> values( void ) const
|
||||
{
|
||||
QValueList<T> r;
|
||||
for( const_iterator i = begin(); i != end(); ++i )
|
||||
r.append( *i );
|
||||
return( r );
|
||||
}
|
||||
|
||||
bool isEmpty( void ) const
|
||||
{
|
||||
return( m_sh->node_count == 0 );
|
||||
}
|
||||
|
||||
iterator insert( const Key & _key, const T & _value,
|
||||
bool _overwrite = TRUE );
|
||||
void remove( iterator _it )
|
||||
{
|
||||
detach();
|
||||
m_sh->remove( _it );
|
||||
}
|
||||
void remove( const Key & _k );
|
||||
|
||||
#if defined( Q_FULL_TEMPLATE_INSTANTIATION )
|
||||
bool operator==( const XQMap<Key, T> & ) const
|
||||
{
|
||||
return( FALSE );
|
||||
}
|
||||
#ifndef QT_NO_STL
|
||||
bool operator==( const std::map<Key, T> & ) const
|
||||
{
|
||||
return( FALSE );
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
protected:
|
||||
/**
|
||||
* Helpers
|
||||
*/
|
||||
void detach( void )
|
||||
{
|
||||
if( m_sh->count > 1 )
|
||||
{
|
||||
detachInternal();
|
||||
}
|
||||
}
|
||||
|
||||
Priv * m_sh;
|
||||
|
||||
|
||||
private:
|
||||
void detachInternal( void );
|
||||
|
||||
friend class QDeepCopy< XQMap<Key, T> >;
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
|
||||
|
||||
template<class Key, class T>
|
||||
Q_INLINE_TEMPLATES XQMap<Key, T> & XQMap<Key, T>::operator=(
|
||||
const XQMap<Key, T> & _m )
|
||||
{
|
||||
_m.m_sh->ref();
|
||||
if( m_sh->deref() )
|
||||
{
|
||||
delete m_sh;
|
||||
}
|
||||
m_sh = _m.m_sh;
|
||||
return( *this );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
template<class Key, class T>
|
||||
Q_INLINE_TEMPLATES Q_TYPENAME XQMap<Key, T>::insert_pair
|
||||
XQMap<Key, T>::insert( const Q_TYPENAME XQMap<Key, T>::value_type & _x )
|
||||
{
|
||||
detach();
|
||||
size_type n = size();
|
||||
iterator it = m_sh->insertSingle( _x.first );
|
||||
bool inserted = FALSE;
|
||||
if( n < size() )
|
||||
{
|
||||
inserted = TRUE;
|
||||
it.data() = _x.second;
|
||||
}
|
||||
return( QPair<iterator, bool>( it, inserted ) );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
template<class Key, class T>
|
||||
Q_INLINE_TEMPLATES void XQMap<Key, T>::erase( const Key & _k )
|
||||
{
|
||||
detach();
|
||||
iterator it( m_sh->find( _k ).node );
|
||||
if( it != end() )
|
||||
{
|
||||
m_sh->remove( it );
|
||||
}
|
||||
}
|
||||
|
||||
template<class Key, class T>
|
||||
Q_INLINE_TEMPLATES Q_TYPENAME XQMap<Key, T>::size_type
|
||||
XQMap<Key, T>::count( const Key & _k ) const
|
||||
{
|
||||
const_iterator it( m_sh->find( _k ).node );
|
||||
if( it != end() )
|
||||
{
|
||||
size_type c = 0;
|
||||
while( it != end() )
|
||||
{
|
||||
++it;
|
||||
++c;
|
||||
}
|
||||
return( c );
|
||||
}
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
template<class Key, class T>
|
||||
Q_INLINE_TEMPLATES T & XQMap<Key, T>::operator[]( const Key & _k )
|
||||
{
|
||||
detach();
|
||||
QMapNode<Key, T> * p = m_sh->find( _k ).node;
|
||||
if( p != m_sh->end().node )
|
||||
{
|
||||
return( p->data );
|
||||
}
|
||||
return( insert( _k, T() ).data() );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
template<class Key, class T>
|
||||
Q_INLINE_TEMPLATES void XQMap<Key, T>::clear( void )
|
||||
{
|
||||
if( m_sh->count == 1 )
|
||||
{
|
||||
m_sh->clear();
|
||||
}
|
||||
else
|
||||
{
|
||||
m_sh->deref();
|
||||
m_sh = new XQMapPrivate<Key, T>;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
template<class Key, class T>
|
||||
Q_INLINE_TEMPLATES Q_TYPENAME XQMap<Key, T>::iterator XQMap<Key, T>::insert(
|
||||
const Key & _key, const T & _value, bool _overwrite )
|
||||
{
|
||||
detach();
|
||||
size_type n = size();
|
||||
iterator it = m_sh->insertSingle( _key );
|
||||
if( _overwrite || n < size() )
|
||||
{
|
||||
it.data() = _value;
|
||||
}
|
||||
return( it );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
template<class Key, class T>
|
||||
Q_INLINE_TEMPLATES void XQMap<Key, T>::remove( const Key & _k )
|
||||
{
|
||||
detach();
|
||||
iterator it( m_sh->find( _k ).node );
|
||||
if( it != end() )
|
||||
{
|
||||
m_sh->remove( it );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
template<class Key, class T>
|
||||
Q_INLINE_TEMPLATES void XQMap<Key, T>::detachInternal( void )
|
||||
{
|
||||
m_sh->deref();
|
||||
m_sh = new XQMapPrivate<Key, T>( m_sh );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#ifndef QT_NO_DATASTREAM
|
||||
template<class Key, class T>
|
||||
Q_INLINE_TEMPLATES QDataStream & operator>>( QDataStream & _s,
|
||||
XQMap<Key, T> & _m )
|
||||
{
|
||||
_m.clear();
|
||||
Q_UINT32 c;
|
||||
_s >> c;
|
||||
for( Q_UINT32 i = 0; i < c; ++i )
|
||||
{
|
||||
Key k;
|
||||
T t;
|
||||
_s >> k >> t;
|
||||
_m.insert( k, t );
|
||||
if( _s.atEnd() )
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
return( _s );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
template<class Key, class T>
|
||||
Q_INLINE_TEMPLATES QDataStream & operator<<( QDataStream & _s,
|
||||
const XQMap<Key, T> & _m )
|
||||
{
|
||||
_s << (Q_UINT32)_m.size();
|
||||
QMapConstIterator<Key, T> it = _m.begin();
|
||||
for( ; it != _m.end(); ++it )
|
||||
{
|
||||
_s << it.key() << it.data();
|
||||
}
|
||||
return( _s );
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
@@ -3,7 +3,7 @@ VST_DIRS=vst_base vst_effect vestige
|
||||
endif
|
||||
|
||||
if LADSPA_SUPPORT
|
||||
LADSPA_DIRS=ladspa_base ladspa_effect
|
||||
LADSPA_DIRS=ladspa_effect
|
||||
endif
|
||||
|
||||
if STK_SUPPORT
|
||||
|
||||
@@ -23,27 +23,12 @@
|
||||
*/
|
||||
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtGui/QPainter>
|
||||
#include <QtGui/QBitmap>
|
||||
#include <Qt/QtXml>
|
||||
#include <QtCore/QFileInfo>
|
||||
#include <QtGui/QDropEvent>
|
||||
|
||||
#else
|
||||
|
||||
#include <qpainter.h>
|
||||
#include <qbitmap.h>
|
||||
#include <qdom.h>
|
||||
#include <qfileinfo.h>
|
||||
#include <qcursor.h>
|
||||
#include <qwhatsthis.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#include "audio_file_processor.h"
|
||||
#include "engine.h"
|
||||
@@ -118,11 +103,7 @@ audioFileProcessor::audioFileProcessor( instrumentTrack * _channel_track ) :
|
||||
SLOT( openAudioFile() ) );
|
||||
toolTip::add( m_openAudioFileButton, tr( "Open other sample" ) );
|
||||
|
||||
#ifdef QT4
|
||||
m_openAudioFileButton->setWhatsThis(
|
||||
#else
|
||||
QWhatsThis::add( m_openAudioFileButton,
|
||||
#endif
|
||||
tr( "Click here, if you want to open another audio-file. After "
|
||||
"clicking on this button, a file-open-dialog appears "
|
||||
"and you can select your file. Settings like Looping-"
|
||||
@@ -141,11 +122,7 @@ audioFileProcessor::audioFileProcessor( instrumentTrack * _channel_track ) :
|
||||
connect( m_reverseButton, SIGNAL( toggled( bool ) ), this,
|
||||
SLOT( reverseBtnToggled( bool ) ) );
|
||||
toolTip::add( m_reverseButton, tr( "Reverse sample" ) );
|
||||
#ifdef QT4
|
||||
m_reverseButton->setWhatsThis(
|
||||
#else
|
||||
QWhatsThis::add( m_reverseButton,
|
||||
#endif
|
||||
tr( "If you enable this button, the whole sample is reversed. "
|
||||
"This is useful for cool effects, e.g. a reversed "
|
||||
"crash." ) );
|
||||
@@ -160,11 +137,7 @@ audioFileProcessor::audioFileProcessor( instrumentTrack * _channel_track ) :
|
||||
m_loopButton->setBgGraphic( getBackground( m_loopButton ) );
|
||||
toolTip::add( m_loopButton,
|
||||
tr( "Loop sample at start- and end-point" ) );
|
||||
#ifdef QT4
|
||||
m_loopButton->setWhatsThis(
|
||||
#else
|
||||
QWhatsThis::add( m_loopButton,
|
||||
#endif
|
||||
tr( "Here you can set, whether Looping-Mode is enabled. If "
|
||||
"enabled, AudioFileProcessor loops between start- and "
|
||||
"end-point of a sample until the whole note is played. "
|
||||
@@ -179,11 +152,7 @@ audioFileProcessor::audioFileProcessor( instrumentTrack * _channel_track ) :
|
||||
m_ampKnob->setLabel( tr( "AMP" ) );
|
||||
connect( m_ampKnob, SIGNAL( valueChanged( float ) ), this,
|
||||
SLOT( ampKnobChanged( float ) ) );
|
||||
#ifdef QT4
|
||||
m_ampKnob->setWhatsThis(
|
||||
#else
|
||||
QWhatsThis::add( m_ampKnob,
|
||||
#endif
|
||||
tr( "With this knob you can set the amplify-ratio. When you "
|
||||
"set a value of 100% your sample isn't changed. "
|
||||
"Otherwise it will be amplified up or down (your "
|
||||
@@ -198,11 +167,7 @@ audioFileProcessor::audioFileProcessor( instrumentTrack * _channel_track ) :
|
||||
m_startKnob->setLabel( tr( "START" ) );
|
||||
connect( m_startKnob, SIGNAL( valueChanged( float ) ), this,
|
||||
SLOT( startKnobChanged( float ) ) );
|
||||
#ifdef QT4
|
||||
m_startKnob->setWhatsThis(
|
||||
#else
|
||||
QWhatsThis::add( m_startKnob,
|
||||
#endif
|
||||
tr( "With this knob you can set the point where "
|
||||
"AudioFileProcessor should begin playing your sample. "
|
||||
"If you enable Looping-Mode, this is the point to "
|
||||
@@ -218,11 +183,7 @@ audioFileProcessor::audioFileProcessor( instrumentTrack * _channel_track ) :
|
||||
m_endKnob->setLabel( tr( "END" ) );
|
||||
connect( m_endKnob, SIGNAL( valueChanged( float ) ), this,
|
||||
SLOT( endKnobChanged( float ) ) );
|
||||
#ifdef QT4
|
||||
m_endKnob->setWhatsThis(
|
||||
#else
|
||||
QWhatsThis::add( m_endKnob,
|
||||
#endif
|
||||
tr( "With this knob you can set the point where "
|
||||
"AudioFileProcessor should stop playing your sample. "
|
||||
"If you enable Looping-Mode, this is the point where "
|
||||
@@ -238,11 +199,7 @@ audioFileProcessor::audioFileProcessor( instrumentTrack * _channel_track ) :
|
||||
}
|
||||
connect( m_viewLinesPB, SIGNAL( toggled( bool ) ), this,
|
||||
SLOT( lineDrawBtnToggled( bool ) ) );
|
||||
#ifdef QT4
|
||||
m_viewLinesPB->setWhatsThis(
|
||||
#else
|
||||
QWhatsThis::add( m_viewLinesPB,
|
||||
#endif
|
||||
tr( "Activate this button, if your sample should be drawn "
|
||||
"with connected lines. This doesn't change the "
|
||||
"sound itself. It just gives you another view to your "
|
||||
@@ -257,11 +214,7 @@ audioFileProcessor::audioFileProcessor( instrumentTrack * _channel_track ) :
|
||||
}
|
||||
connect( m_viewDotsPB, SIGNAL( toggled( bool ) ), this,
|
||||
SLOT( dotDrawBtnToggled( bool ) ) );
|
||||
#ifdef QT4
|
||||
m_viewDotsPB->setWhatsThis(
|
||||
#else
|
||||
QWhatsThis::add( m_viewDotsPB,
|
||||
#endif
|
||||
tr( "Activate this button, if your sample should be drawn "
|
||||
"with dots. This doesn't change the sound itself. "
|
||||
"It just gives you another view to your sample." ) );
|
||||
@@ -271,9 +224,6 @@ audioFileProcessor::audioFileProcessor( instrumentTrack * _channel_track ) :
|
||||
view_group->addButton( m_viewLinesPB );
|
||||
view_group->addButton( m_viewDotsPB );
|
||||
|
||||
#ifndef QT4
|
||||
setBackgroundMode( Qt::NoBackground );
|
||||
#endif
|
||||
setAcceptDrops( TRUE );
|
||||
}
|
||||
|
||||
@@ -422,7 +372,6 @@ void audioFileProcessor::deleteNotePluginData( notePlayHandle * _n )
|
||||
|
||||
void audioFileProcessor::dragEnterEvent( QDragEnterEvent * _dee )
|
||||
{
|
||||
#ifdef QT4
|
||||
if( _dee->mimeData()->hasFormat( stringPairDrag::mimeType() ) )
|
||||
{
|
||||
QString txt = _dee->mimeData()->data(
|
||||
@@ -445,41 +394,6 @@ void audioFileProcessor::dragEnterEvent( QDragEnterEvent * _dee )
|
||||
{
|
||||
_dee->ignore();
|
||||
}
|
||||
#else
|
||||
QString txt = _dee->encodedData( stringPairDrag::mimeType() );
|
||||
if( txt != "" )
|
||||
{
|
||||
if( txt.section( ':', 0, 0 ) == QString( "tco_%1" ).arg(
|
||||
track::SAMPLE_TRACK ) )
|
||||
{
|
||||
_dee->accept();
|
||||
return;
|
||||
}
|
||||
if( txt.section( ':', 0, 0 ) == "samplefile"
|
||||
&& subPluginFeatures::supported_extensions().contains(
|
||||
fileItem::extension( txt.section( ':', 1 ) ) ) )
|
||||
{
|
||||
_dee->accept();
|
||||
return;
|
||||
}
|
||||
_dee->ignore();
|
||||
return;
|
||||
}
|
||||
|
||||
txt = QString( _dee->encodedData( "text/plain" ) );
|
||||
if( txt != "" )
|
||||
{
|
||||
QString file = QUriDrag::uriToLocalFile(
|
||||
txt.stripWhiteSpace() );
|
||||
if( file && subPluginFeatures::supported_extensions().contains(
|
||||
fileItem::extension( file ) ) )
|
||||
{
|
||||
_dee->accept();
|
||||
return;
|
||||
}
|
||||
}
|
||||
_dee->ignore();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -504,17 +418,6 @@ void audioFileProcessor::dropEvent( QDropEvent * _de )
|
||||
return;
|
||||
}
|
||||
|
||||
#ifndef QT4
|
||||
QString txt = _de->encodedData( "text/plain" );
|
||||
if( txt != "" )
|
||||
{
|
||||
setAudioFile( QUriDrag::uriToLocalFile(
|
||||
txt.stripWhiteSpace() ) );
|
||||
_de->accept();
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
_de->ignore();
|
||||
}
|
||||
|
||||
@@ -523,14 +426,7 @@ void audioFileProcessor::dropEvent( QDropEvent * _de )
|
||||
|
||||
void audioFileProcessor::paintEvent( QPaintEvent * )
|
||||
{
|
||||
#ifdef QT4
|
||||
QPainter p( this );
|
||||
#else
|
||||
QPixmap pm( rect().size() );
|
||||
pm.fill( this, rect().topLeft() );
|
||||
|
||||
QPainter p( &pm, this );
|
||||
#endif
|
||||
|
||||
p.drawPixmap( 0, 0, *s_artwork );
|
||||
|
||||
@@ -544,13 +440,8 @@ void audioFileProcessor::paintEvent( QPaintEvent * )
|
||||
|
||||
// simple algorithm for creating a text from the filename that
|
||||
// matches in the white rectangle
|
||||
#ifdef QT4
|
||||
while( idx > 0 &&
|
||||
fm.size( Qt::TextSingleLine, file_name + "..." ).width() < 210 )
|
||||
#else
|
||||
while( idx > 0 &&
|
||||
fm.size( Qt::SingleLine, file_name + "..." ).width() < 210 )
|
||||
#endif
|
||||
{
|
||||
file_name = m_sampleBuffer.audioFile()[--idx] + file_name;
|
||||
}
|
||||
@@ -582,9 +473,6 @@ void audioFileProcessor::paintEvent( QPaintEvent * )
|
||||
end_frame_x + graph_rect.x(),
|
||||
graph_rect.height() + graph_rect.y() );
|
||||
|
||||
#ifndef QT4
|
||||
bitBlt( this, rect().topLeft(), &pm );
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -593,14 +481,8 @@ void audioFileProcessor::paintEvent( QPaintEvent * )
|
||||
void audioFileProcessor::sampleUpdated( void )
|
||||
{
|
||||
m_graph = QPixmap( 245, 75 );
|
||||
#ifdef QT4
|
||||
QPainter p( &m_graph );
|
||||
p.drawPixmap( 2, 172, m_graph );
|
||||
#else
|
||||
copyBlt( &m_graph, 0, 0, s_artwork, 2, 172, m_graph.width(),
|
||||
m_graph.height() );
|
||||
QPainter p( &m_graph );
|
||||
#endif
|
||||
p.setPen( QColor( 64, 255, 160 ) );
|
||||
m_sampleBuffer.visualize( p, QRect( 2, 2, m_graph.width() - 4,
|
||||
m_graph.height() - 4 ),
|
||||
|
||||
@@ -27,18 +27,8 @@
|
||||
#ifndef _AUDIO_FILE_PROCESSOR_H
|
||||
#define _AUDIO_FILE_PROCESSOR_H
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtGui/QPixmap>
|
||||
|
||||
#else
|
||||
|
||||
#include <qpixmap.h>
|
||||
|
||||
#endif
|
||||
|
||||
#include "instrument.h"
|
||||
#include "sample_buffer.h"
|
||||
#include "spc_bg_hndl_widget.h"
|
||||
|
||||
@@ -23,27 +23,10 @@
|
||||
*/
|
||||
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtGui/QPainter>
|
||||
#include <Qt/QtXml>
|
||||
#include <QtGui/QDropEvent>
|
||||
|
||||
#else
|
||||
|
||||
#include <qpainter.h>
|
||||
#include <qbitmap.h>
|
||||
#include <qdom.h>
|
||||
#include <qfileinfo.h>
|
||||
#include <qdom.h>
|
||||
#include <qmap.h>
|
||||
#include <qcanvas.h>
|
||||
#include <qlabel.h>
|
||||
|
||||
#endif
|
||||
|
||||
#include <iostream>
|
||||
#include <cstdlib>
|
||||
#include <ctime>
|
||||
@@ -333,16 +316,11 @@ bitInvader::bitInvader( instrumentTrack * _channel_track ) :
|
||||
this, SLOT ( smoothClicked( void ) ) );
|
||||
|
||||
|
||||
#ifdef QT4
|
||||
setAutoFillBackground( TRUE );
|
||||
QPalette pal;
|
||||
pal.setBrush( backgroundRole(), PLUGIN_NAME::getIconPixmap(
|
||||
"artwork" ) );
|
||||
setPalette( pal );
|
||||
#else
|
||||
setErasePixmap( PLUGIN_NAME::getIconPixmap( "artwork" ) );
|
||||
#endif
|
||||
|
||||
|
||||
sample_length = 128;
|
||||
sample_shape = new float[128];
|
||||
|
||||
@@ -23,23 +23,10 @@
|
||||
*/
|
||||
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtGui/QPaintEvent>
|
||||
#include <QtGui/QFontMetrics>
|
||||
#include <QtGui/QPainter>
|
||||
|
||||
#else
|
||||
|
||||
#include <qfontmetrics.h>
|
||||
#include <qpainter.h>
|
||||
#include <qcursor.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#include "graph.h"
|
||||
#include "string_pair_drag.h"
|
||||
#include "sample_buffer.h"
|
||||
@@ -60,11 +47,6 @@ graph::graph( QWidget * _parent ) :
|
||||
setFixedSize( 132, 104 );
|
||||
|
||||
setAcceptDrops( TRUE );
|
||||
|
||||
#ifndef QT4
|
||||
setBackgroundMode( NoBackground );
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -145,11 +127,7 @@ void graph::mousePressEvent( QMouseEvent * _me )
|
||||
|
||||
// toggle mouse state
|
||||
m_mouseDown = true;
|
||||
#ifndef QT3
|
||||
setCursor( Qt::BlankCursor );
|
||||
#else
|
||||
setCursor( QCursor::BlankCursor );
|
||||
#endif
|
||||
m_lastCursorX = x;
|
||||
}
|
||||
|
||||
@@ -177,11 +155,7 @@ void graph::mouseReleaseEvent( QMouseEvent * _me )
|
||||
{
|
||||
// toggle mouse state
|
||||
m_mouseDown = false;
|
||||
#ifndef QT3
|
||||
setCursor( Qt::ArrowCursor );
|
||||
#else
|
||||
setCursor( QCursor::ArrowCursor );
|
||||
#endif
|
||||
update();
|
||||
}
|
||||
|
||||
@@ -190,14 +164,7 @@ void graph::mouseReleaseEvent( QMouseEvent * _me )
|
||||
void graph::paintEvent( QPaintEvent * )
|
||||
{
|
||||
|
||||
#ifdef QT4
|
||||
QPainter p( this );
|
||||
#else
|
||||
QPixmap draw_pm( rect().size() );
|
||||
// draw_pm.fill( this, rect().topLeft() );
|
||||
|
||||
QPainter p( &draw_pm, this );
|
||||
#endif
|
||||
|
||||
// if (m_background != NULL) {
|
||||
p.drawPixmap( 0, 0, m_background );
|
||||
@@ -226,12 +193,6 @@ void graph::paintEvent( QPaintEvent * )
|
||||
p.drawLine( 2, cursor.y(), 130, cursor.y() );
|
||||
p.drawLine( cursor.x(), 2, cursor.x(), 102 );
|
||||
}
|
||||
|
||||
#ifndef QT4
|
||||
// and blit all the drawn stuff on the screen...
|
||||
bitBlt( this, rect().topLeft(), &draw_pm );
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -26,22 +26,10 @@
|
||||
#ifndef _GRAPH_H
|
||||
#define _GRAPH_H
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtGui/QWidget>
|
||||
#include <QtGui/QPixmap>
|
||||
#include <QtGui/QCursor>
|
||||
|
||||
#else
|
||||
|
||||
#include <qwidget.h>
|
||||
#include <qpixmap.h>
|
||||
#include <qcursor.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
class graph : public QWidget
|
||||
{
|
||||
|
||||
@@ -23,6 +23,12 @@
|
||||
*/
|
||||
|
||||
|
||||
#include <Qt/QtXml>
|
||||
#include <QtGui/QApplication>
|
||||
#include <QtGui/QProgressDialog>
|
||||
#include <QtCore/QDir>
|
||||
#include <QtCore/QBuffer>
|
||||
|
||||
#include "flp_import.h"
|
||||
#include "arp_and_chords_tab_widget.h"
|
||||
#include "basic_filters.h"
|
||||
@@ -47,23 +53,8 @@
|
||||
#include "tempo_sync_knob.h"
|
||||
#include "track_container.h"
|
||||
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <Qt/QtXml>
|
||||
#include <QtGui/QApplication>
|
||||
#include <QtGui/QProgressDialog>
|
||||
#include <QtCore/QDir>
|
||||
#include <QtCore/QBuffer>
|
||||
|
||||
#else
|
||||
|
||||
#include <qdom.h>
|
||||
#include <qapplication.h>
|
||||
#include <qprogressdialog.h>
|
||||
#include <qdir.h>
|
||||
#include <qbuffer.h>
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CTYPE_H
|
||||
@@ -185,14 +176,8 @@ bool flpImport::tryImport( trackContainer * _tc )
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
#ifdef QT4
|
||||
QProgressDialog pd( trackContainer::tr( "Importing FLP-file..." ),
|
||||
trackContainer::tr( "Cancel" ), 0, num_channels );
|
||||
#else
|
||||
QProgressDialog pd( trackContainer::tr( "Importing FLP-file..." ),
|
||||
trackContainer::tr( "Cancel" ), num_channels,
|
||||
0, 0, TRUE );
|
||||
#endif
|
||||
pd.setWindowTitle( trackContainer::tr( "Please wait..." ) );
|
||||
pd.show();
|
||||
|
||||
@@ -237,7 +222,7 @@ bool flpImport::tryImport( trackContainer * _tc )
|
||||
int current_pattern = 0;
|
||||
char * text = NULL;
|
||||
Uint32 text_len = 0;
|
||||
vlist<instrumentTrack *> i_tracks;
|
||||
QList<instrumentTrack *> i_tracks;
|
||||
int project_cur_pat = 0;
|
||||
|
||||
int step_pattern = 0;
|
||||
@@ -257,13 +242,8 @@ bool flpImport::tryImport( trackContainer * _tc )
|
||||
if( ++ev_cnt > 100 )
|
||||
{
|
||||
ev_cnt = 0;
|
||||
#ifdef QT4
|
||||
qApp->processEvents( QEventLoop::AllEvents, 100 );
|
||||
pd.setValue( i_tracks.size() );
|
||||
#else
|
||||
qApp->processEvents( 100 );
|
||||
pd.setProgress( i_tracks.size() );
|
||||
#endif
|
||||
|
||||
if( pd.wasCanceled() )
|
||||
{
|
||||
@@ -510,16 +490,9 @@ bool flpImport::tryImport( trackContainer * _tc )
|
||||
|
||||
case FLP_Text_CommentRTF:
|
||||
{
|
||||
#ifndef QT3
|
||||
QByteArray ba( text, text_len );
|
||||
QBuffer buf( &ba );
|
||||
buf.open( QBuffer::ReadOnly );
|
||||
#else
|
||||
QByteArray ba;
|
||||
ba.setRawData( text, text_len );
|
||||
QBuffer buf( ba );
|
||||
buf.open( IO_ReadOnly );
|
||||
#endif
|
||||
lineno = 0;
|
||||
attr_clear_all();
|
||||
op = html_init();
|
||||
@@ -529,9 +502,6 @@ bool flpImport::tryImport( trackContainer * _tc )
|
||||
word_print( word, out );
|
||||
word_free( word );
|
||||
op_free( op );
|
||||
#ifdef QT3
|
||||
ba.resetRawData( text, text_len );
|
||||
#endif
|
||||
|
||||
engine::getProjectNotes()->setText( out );
|
||||
outstring = "";
|
||||
@@ -814,8 +784,8 @@ bool flpImport::tryImport( trackContainer * _tc )
|
||||
it != m_steps.end(); ++it )
|
||||
{
|
||||
const int ch = ( *it ) >> 16;
|
||||
const csize pat = ( ( *it ) & 0xffff ) / 16;
|
||||
const csize pos = ( ( ( *it ) & 0xffff ) % 16 ) * 4;
|
||||
const int pat = ( ( *it ) & 0xffff ) / 16;
|
||||
const int pos = ( ( ( *it ) & 0xffff ) % 16 ) * 4;
|
||||
while( engine::getBBEditor()->numOfBBs() <= pat )
|
||||
{
|
||||
track::create( track::BB_TRACK,
|
||||
@@ -836,7 +806,7 @@ bool flpImport::tryImport( trackContainer * _tc )
|
||||
{
|
||||
const int where = ( *it ).first;
|
||||
const int ch = where % num_channels;
|
||||
const csize pat = where / num_channels;
|
||||
const int pat = where / num_channels;
|
||||
if( pat > 100 )
|
||||
{
|
||||
continue;
|
||||
@@ -845,11 +815,7 @@ bool flpImport::tryImport( trackContainer * _tc )
|
||||
{
|
||||
track::create( track::BB_TRACK,
|
||||
engine::getSongEditor() );
|
||||
#ifdef QT4
|
||||
qApp->processEvents( QEventLoop::AllEvents, 100 );
|
||||
#else
|
||||
qApp->processEvents( 100 );
|
||||
#endif
|
||||
}
|
||||
pattern * p = dynamic_cast<pattern *>(
|
||||
i_tracks[ch]->getTCO( pat ) );
|
||||
@@ -863,7 +829,7 @@ bool flpImport::tryImport( trackContainer * _tc )
|
||||
for( playListItems::const_iterator it = m_plItems.begin();
|
||||
it != m_plItems.end(); ++it )
|
||||
{
|
||||
csize pat_num = ( ( *it ) >> 16 ) - 1;
|
||||
int pat_num = ( ( *it ) >> 16 ) - 1;
|
||||
if( pat_num > 100 )
|
||||
{
|
||||
continue;
|
||||
@@ -872,11 +838,7 @@ bool flpImport::tryImport( trackContainer * _tc )
|
||||
{
|
||||
track::create( track::BB_TRACK,
|
||||
engine::getSongEditor() );
|
||||
#ifdef QT4
|
||||
qApp->processEvents( QEventLoop::AllEvents, 100 );
|
||||
#else
|
||||
qApp->processEvents( 100 );
|
||||
#endif
|
||||
}
|
||||
|
||||
bbTrack * bbt = bbTrack::findBBTrack( pat_num );
|
||||
@@ -884,7 +846,7 @@ bool flpImport::tryImport( trackContainer * _tc )
|
||||
tco->movePosition( midiTime( ( ( *it ) & 0xffff ) * 64 ) );
|
||||
}
|
||||
|
||||
if( (csize) project_cur_pat < engine::getBBEditor()->numOfBBs() )
|
||||
if( project_cur_pat < engine::getBBEditor()->numOfBBs() )
|
||||
{
|
||||
engine::getBBEditor()->setCurrentBB( project_cur_pat );
|
||||
}
|
||||
|
||||
@@ -26,28 +26,10 @@
|
||||
#ifndef _FLP_IMPORT_H
|
||||
#define _FLP_IMPORT_H
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
|
||||
#include "qt3support.h"
|
||||
|
||||
#ifdef QT4
|
||||
|
||||
#include <QtCore/QString>
|
||||
#include <QtCore/QPair>
|
||||
#include <QtCore/QVector>
|
||||
|
||||
#else
|
||||
|
||||
#include <qstring.h>
|
||||
#include <qpair.h>
|
||||
#include <qvaluevector.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#include "import_filter.h"
|
||||
#include "note.h"
|
||||
|
||||
@@ -239,13 +221,13 @@ private:
|
||||
}
|
||||
|
||||
|
||||
typedef vlist<QPair<int, note> > patternNoteVector;
|
||||
typedef QList<QPair<int, note> > patternNoteVector;
|
||||
patternNoteVector m_notes;
|
||||
|
||||
typedef vlist<int> stepVector;
|
||||
typedef QList<int> stepVector;
|
||||
stepVector m_steps;
|
||||
|
||||
typedef vlist<Uint32> playListItems;
|
||||
typedef QList<Uint32> playListItems;
|
||||
playListItems m_plItems;
|
||||
|
||||
} ;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user