diff options
author | Robert Jonsson <spamatica@gmail.com> | 2010-10-13 19:34:22 +0000 |
---|---|---|
committer | Robert Jonsson <spamatica@gmail.com> | 2010-10-13 19:34:22 +0000 |
commit | 8a2c2824a59d7644e13bc52c9a0ecbd641f21f95 (patch) | |
tree | 064ad3f2bf8daab0ad27b128abd86a9bbdb1e496 /muse2/muse/marker | |
parent | a27706d9629e8b592cca4659f865b70adef24e6d (diff) |
new branch muse2, first checkin
Diffstat (limited to 'muse2/muse/marker')
-rw-r--r-- | muse2/muse/marker/Makefile.am | 15 | ||||
-rw-r--r-- | muse2/muse/marker/Makefile.in | 596 | ||||
-rw-r--r-- | muse2/muse/marker/marker.cpp | 90 | ||||
-rw-r--r-- | muse2/muse/marker/marker.h | 51 | ||||
-rw-r--r-- | muse2/muse/marker/markerview.cpp | 597 | ||||
-rw-r--r-- | muse2/muse/marker/markerview.h | 84 |
6 files changed, 1433 insertions, 0 deletions
diff --git a/muse2/muse/marker/Makefile.am b/muse2/muse/marker/Makefile.am new file mode 100644 index 00000000..f577d695 --- /dev/null +++ b/muse2/muse/marker/Makefile.am @@ -0,0 +1,15 @@ +include $(top_srcdir)/common.am + +if PCH +AM_CXXFLAGS += -include $(top_srcdir)/all.h +endif + +noinst_LIBRARIES = libmarker.a + +dist_libmarker_a_SOURCES = \ + marker.cpp marker.h \ + markerview.cpp markerview.h + +nodist_libmarker_a_SOURCES = \ + moc_markerview.cpp + diff --git a/muse2/muse/marker/Makefile.in b/muse2/muse/marker/Makefile.in new file mode 100644 index 00000000..d9ed6779 --- /dev/null +++ b/muse2/muse/marker/Makefile.in @@ -0,0 +1,596 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(top_srcdir)/common.am +@PCH_TRUE@am__append_1 = -include $(top_srcdir)/all.h +subdir = muse/marker +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/aclocal-include.m4 \ + $(top_srcdir)/m4/alsa.m4 $(top_srcdir)/m4/docbook.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LIBRARIES = $(noinst_LIBRARIES) +ARFLAGS = cru +libmarker_a_AR = $(AR) $(ARFLAGS) +libmarker_a_LIBADD = +dist_libmarker_a_OBJECTS = marker.$(OBJEXT) markerview.$(OBJEXT) +nodist_libmarker_a_OBJECTS = moc_markerview.$(OBJEXT) +libmarker_a_OBJECTS = $(dist_libmarker_a_OBJECTS) \ + $(nodist_libmarker_a_OBJECTS) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(dist_libmarker_a_SOURCES) $(nodist_libmarker_a_SOURCES) +DIST_SOURCES = $(dist_libmarker_a_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ALSA_CFLAGS = @ALSA_CFLAGS@ +ALSA_LIBS = @ALSA_LIBS@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DOCBOOKSTYLE = @DOCBOOKSTYLE@ +DOCBOOKTARGETS = @DOCBOOKTARGETS@ +DOT = @DOT@ +DOTPATH = @DOTPATH@ +DOXYGEN = @DOXYGEN@ +DOXYGEN_TREEVIEW = @DOXYGEN_TREEVIEW@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FLUIDSYNTHDIRS = @FLUIDSYNTHDIRS@ +FST_CFLAGS = @FST_CFLAGS@ +FST_LIBS = @FST_LIBS@ +Fluidsynth_CFLAGS = @Fluidsynth_CFLAGS@ +Fluidsynth_LIBS = @Fluidsynth_LIBS@ +GIVERTCAP = @GIVERTCAP@ +GREP = @GREP@ +HAVEDOT = @HAVEDOT@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +JACK_CFLAGS = @JACK_CFLAGS@ +JACK_LIBS = @JACK_LIBS@ +JADE = @JADE@ +LASH_CFLAGS = @LASH_CFLAGS@ +LASH_LIBS = @LASH_LIBS@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LO_CFLAGS = @LO_CFLAGS@ +LO_LIBS = @LO_LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MUSECXXFLAGS = @MUSECXXFLAGS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +NSGMLS = @NSGMLS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCH = @PCH@ +PERL = @PERL@ +PKG_CONFIG = @PKG_CONFIG@ +PYTHON = @PYTHON@ +PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ +PYTHON_INCLUDES = @PYTHON_INCLUDES@ +PYTHON_LIB = @PYTHON_LIB@ +PYTHON_PLATFORM = @PYTHON_PLATFORM@ +PYTHON_PREFIX = @PYTHON_PREFIX@ +PYTHON_VERSION = @PYTHON_VERSION@ +QTDIR_BIN = @QTDIR_BIN@ +QTDIR_INC = @QTDIR_INC@ +QT_LIBS = @QT_LIBS@ +RANLIB = @RANLIB@ +SAMPLERATE_CFLAGS = @SAMPLERATE_CFLAGS@ +SAMPLERATE_LIBS = @SAMPLERATE_LIBS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SNDFILE_CFLAGS = @SNDFILE_CFLAGS@ +SNDFILE_LIBS = @SNDFILE_LIBS@ +STRIP = @STRIP@ +SUIDBUILD = @SUIDBUILD@ +SUIDINSTALL = @SUIDINSTALL@ +USE_SSE = @USE_SSE@ +UUID_CFLAGS = @UUID_CFLAGS@ +UUID_LIBS = @UUID_LIBS@ +VERSION = @VERSION@ +XMKMF = @XMKMF@ +X_CFLAGS = @X_CFLAGS@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_LIBS = @X_LIBS@ +X_PRE_LIBS = @X_PRE_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +have_docbook = @have_docbook@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +pkgpyexecdir = @pkgpyexecdir@ +pkgpythondir = @pkgpythondir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +pyexecdir = @pyexecdir@ +pythondir = @pythondir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +synth_fluid = @synth_fluid@ +synth_fluidsynth = @synth_fluidsynth@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +AM_CXXFLAGS = $(MUSECXXFLAGS) -I.. -I$(top_srcdir)/synti \ + -I$(top_srcdir)/muse/widgets -DQT_SHARED -DQT_THREAD_SUPPORT \ + -DQT_PLUGIN $(QTDIR_INC) -DQT3_SUPPORT $(am__append_1) +AM_CPPFLAGS = +MOC = $(QTDIR_BIN)/moc +#UIC = $(QTDIR_BIN)/uic3 +UIC = /usr/bin/uic3 +UIFILES = $(wildcard *.ui) +MOCFILES = $(shell for h in $(filter %.h,$(SOURCES)); do \ + if grep -q Q_OBJECT $$h; then \ + echo $$h | sed "s/\(.*\)\.h/moc_\1.cpp/"; \ + fi; \ + done) + +BUILT_SOURCES = $(MOCFILES) $(UIFILES:%.ui=%.h) +MOSTLYCLEANFILES = $(MOCFILES) $(UIFILES:%.ui=%.h) +SUFFIXES = .ui .h.gch +noinst_LIBRARIES = libmarker.a +dist_libmarker_a_SOURCES = \ + marker.cpp marker.h \ + markerview.cpp markerview.h + +nodist_libmarker_a_SOURCES = \ + moc_markerview.cpp + +all: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) all-am + +.SUFFIXES: +.SUFFIXES: .ui .h.gch .cpp .lo .o .obj +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/common.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu muse/marker/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu muse/marker/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLIBRARIES: + -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) +libmarker.a: $(libmarker_a_OBJECTS) $(libmarker_a_DEPENDENCIES) + -rm -f libmarker.a + $(libmarker_a_AR) libmarker.a $(libmarker_a_OBJECTS) $(libmarker_a_LIBADD) + $(RANLIB) libmarker.a + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/marker.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/markerview.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/moc_markerview.Po@am__quote@ + +.cpp.o: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< + +.cpp.obj: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cpp.lo: +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) check-am +all-am: Makefile $(LIBRARIES) +installdirs: +install: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: all check install install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am + + +de: + @for base in $(MOCFILES); do echo -e "\t$${base}.cpp $${base}.h \\"; done + +nde: + @for base in $(MOCFILES); do echo -e "\tmoc_$${base}.cpp \\"; done + +.ui.o: %.h + $(UIC) -L $(top_srcdir)/muse/widgets -o $*.cpp -impl $*.h $*.ui + $(MOC) $*.h >> $*.cpp + $(CXXCOMPILE) -c $*.cpp -o $*.o + $(RM) $*.cpp moc_$*.cpp moc_$*.o + +.ui.lo: %.h + $(UIC) -L $(top_srcdir)/muse/widgets -o $*.cpp -impl $*.h $*.ui + $(MOC) $*.h >> $*.cpp + $(LTCXXCOMPILE) -c $*.cpp -o $*.lo + $(RM) $*.cpp moc_$*.cpp moc_$*.lo moc_$*.o + +moc_%.cpp: %.h + $(MOC) $< -o $@ + +%.h: %.ui + $(UIC) -o $@ $< +# $(UIC) -L $(top_srcdir)/muse/widgets -o $@ $< + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/muse2/muse/marker/marker.cpp b/muse2/muse/marker/marker.cpp new file mode 100644 index 00000000..eee0be02 --- /dev/null +++ b/muse2/muse/marker/marker.cpp @@ -0,0 +1,90 @@ +//========================================================= +// MusE +// Linux Music Editor +// $Id: marker.cpp,v 1.2 2003/12/10 18:34:22 wschweer Exp $ +// (C) Copyright 2000 Werner Schweer (ws@seh.de) +//========================================================= + +#include "marker.h" +#include "xml.h" + +Marker* MarkerList::add(const Marker& marker) + { + iMarker i = insert(std::pair<const int, Marker> (marker.tick(), Marker(marker))); + return &i->second; + } + +Marker* MarkerList::add(const QString& s, int t, bool lck) + { + Marker marker(s); + marker.setType(lck ? Pos::FRAMES : Pos::TICKS); + marker.setTick(t); + iMarker i = insert(std::pair<const int, Marker> (t, marker)); + return &i->second; + } + +//--------------------------------------------------------- +// read +//--------------------------------------------------------- + +void Marker::read(Xml& xml) + { + for (;;) { + Xml::Token token = xml.parse(); + const QString& tag = xml.s1(); + switch (token) { + case Xml::Error: + case Xml::End: + return; + case Xml::TagStart: + xml.unknown("Marker"); + break; + case Xml::Attribut: + if (tag == "tick") + setTick(xml.s2().toInt()); + else if (tag == "lock") + setType(xml.s2().toInt() ? FRAMES:TICKS); + else if (tag == "name") + { + _name = xml.s2(); + } + break; + case Xml::TagEnd: + if (xml.s1() == "marker") + return; + default: + break; + } + } + } + +//--------------------------------------------------------- +// write +//--------------------------------------------------------- + +void MarkerList::write(int level, Xml& xml) const + { + for (ciMarker i = begin(); i != end(); ++i) { + const Marker& m = i->second; + xml.put(level, "<marker tick=\"%d\" lock=\"%d\" name=\"%s\" />", + //m.tick(), m.type()==Pos::FRAMES, m.name().latin1()); + m.tick(), m.type()==Pos::FRAMES, Xml::xmlString(m.name()).latin1()); + } + } + +//--------------------------------------------------------- +// remove +//--------------------------------------------------------- + +void MarkerList::remove(Marker* m) + { + for (iMarker i = begin(); i != end(); ++i) { + Marker* mm = &i->second; + if (mm == m) { + erase(i); + return; + } + } + printf("MarkerList::remove(): marker not found\n"); + } + diff --git a/muse2/muse/marker/marker.h b/muse2/muse/marker/marker.h new file mode 100644 index 00000000..a00e1fc6 --- /dev/null +++ b/muse2/muse/marker/marker.h @@ -0,0 +1,51 @@ +//========================================================= +// MusE +// Linux Music Editor +// $Id: marker.h,v 1.2 2003/12/15 11:41:00 wschweer Exp $ +// (C) Copyright 2000 Werner Schweer (ws@seh.de) +//========================================================= + +#ifndef __MARKER_H__ +#define __MARKER_H__ + +#include <map> +#include <qstring.h> +#include "xml.h" +#include "pos.h" + +//--------------------------------------------------------- +// Marker +//--------------------------------------------------------- + +class Marker : public Pos { + QString _name; + bool _current; + + public: + Marker() : _current(false) {} + Marker(const QString& s, bool cur = false) + : _name(s), _current(cur) {} + void read(Xml&); + const QString name() const { return _name; } + void setName(const QString& s) { _name = s; } + bool current() const { return _current; } + void setCurrent(bool f) { _current = f; } + }; + +//--------------------------------------------------------- +// MarkerList +//--------------------------------------------------------- + +class MarkerList : public std::multimap<unsigned, Marker, std::less<unsigned> > { + public: + Marker* add(const Marker& m); + Marker* add(const QString& s, int t, bool lck); + void write(int, Xml&) const; + void remove(Marker*); + }; + +typedef std::multimap<unsigned, Marker, std::less<unsigned> >::iterator iMarker; +typedef std::multimap<unsigned, Marker, std::less<unsigned> >::const_iterator ciMarker; + +#endif + diff --git a/muse2/muse/marker/markerview.cpp b/muse2/muse/marker/markerview.cpp new file mode 100644 index 00000000..39885ec7 --- /dev/null +++ b/muse2/muse/marker/markerview.cpp @@ -0,0 +1,597 @@ +//========================================================= +// MusE +// Linux Music Editor +// $Id: markerview.cpp,v 1.7.2.6 2009/08/25 20:28:45 spamatica Exp $ +// (C) Copyright 2000 Werner Schweer (ws@seh.de) +//========================================================= + +#include "marker.h" +#include "markerview.h" +#include "xml.h" +#include "globals.h" +#include "sync.h" +#include "icons.h" +#include "song.h" +#include "posedit.h" + +#include <q3toolbar.h> +#include <qtoolbutton.h> +#include <qtooltip.h> +#include <qlayout.h> +#include <qsizegrip.h> +#include <q3popupmenu.h> +#include <qmenubar.h> +#include <qaction.h> +#include <q3groupbox.h> +#include <qlineedit.h> +#include <Qt3Support> +//Added by qt3to4: +#include <QCloseEvent> +#include <Q3VBoxLayout> + +enum { COL_TICK = 0, COL_SMPTE, COL_LOCK, COL_NAME }; + +//--------------------------------------------------------- +// tick +//--------------------------------------------------------- + +unsigned MarkerItem::tick() const + { + return _marker->tick(); + } + +//--------------------------------------------------------- +// name +//--------------------------------------------------------- + +const QString MarkerItem::name() const + { + return _marker->name(); + } + +//--------------------------------------------------------- +// lock +//--------------------------------------------------------- + +bool MarkerItem::lock() const + { + return _marker->type() == Pos::FRAMES; + } + +//--------------------------------------------------------- +// MarkerItem +//--------------------------------------------------------- + +MarkerItem::MarkerItem(Q3ListView* parent, Marker* m) + : Q3ListViewItem(parent) + { + _marker = m; + setText(COL_NAME, m->name()); + setTick(m->tick()); + if (m->type() == Pos::FRAMES) + setPixmap(COL_LOCK, *lockIcon); + setLock(m->type() == Pos::FRAMES); + } + +//--------------------------------------------------------- +// setName +//--------------------------------------------------------- + +void MarkerItem::setName(const QString& s) + { + setText(COL_NAME, s); + _marker = song->setMarkerName(_marker, s); + } + +//--------------------------------------------------------- +// setLock +//--------------------------------------------------------- + +void MarkerItem::setLock(bool lck) + { + setPixmap(COL_LOCK, lck ? *lockIcon : 0); + _marker = song->setMarkerLock(_marker, lck); + } + +//--------------------------------------------------------- +// setTick +//--------------------------------------------------------- + +void MarkerItem::setTick(unsigned v) + { + if (_marker->tick() != v) + _marker = song->setMarkerTick(_marker, v); + QString s; + int bar, beat; + unsigned tick; + sigmap.tickValues(v, &bar, &beat, &tick); + s.sprintf("%04d.%02d.%03d", bar+1, beat+1, tick); + setText(COL_TICK, s); + + double time = double(tempomap.tick2frame(v))/double(sampleRate); + int hour = int(time) / 3600; + int min = (int(time) % 3600)/60; + int sec = int(time) % 60; + double rest = time - (hour*3600 + min * 60 + sec); + switch(mtcType) { + case 0: // 24 frames sec + rest *= 24; + break; + case 1: // 25 + rest *= 25; + break; + case 2: // 30 drop frame + rest *= 30; + break; + case 3: // 30 non drop frame + rest *= 30; + break; + } + int frame = int(rest); + int subframe = int((rest-frame)*100); + s.sprintf("%02d:%02d:%02d:%02d:%02d", + hour, min, sec, frame, subframe); + setText(COL_SMPTE, s); + } + +//--------------------------------------------------------- +// closeEvent +//--------------------------------------------------------- + +void MarkerView::closeEvent(QCloseEvent* e) + { + emit deleted((unsigned long)this); + emit closed(); + e->accept(); + } + +//--------------------------------------------------------- +// MarkerView +//--------------------------------------------------------- + +MarkerView::MarkerView(QWidget* parent) + : TopWin(parent, "markerview", Qt::WType_TopLevel /*| WDestructiveClose*/) + { + setCaption(tr("MusE: Marker")); + + //---------Actions---------------------------- + Q3Action* markerAdd = new Q3Action(tr("add marker"), + QIcon(*flagIcon), tr("Add Marker"), + 0, this, "add marker"); + connect(markerAdd, SIGNAL(activated()), SLOT(addMarker())); + + Q3Action* markerDelete = new Q3Action(tr("delete marker"), + QIcon(*deleteIcon), tr("Delete Marker"), + 0, this, "delete marker"); + connect(markerDelete, SIGNAL(activated()), SLOT(deleteMarker())); + + //---------Pulldown Menu---------------------------- + Q3PopupMenu* fileMenu = new Q3PopupMenu(this); + menuBar()->insertItem(tr("&File"), fileMenu); + Q3PopupMenu* editMenu = new Q3PopupMenu(this); + menuBar()->insertItem(tr("&Edit"), editMenu); + markerAdd->addTo(editMenu); + markerDelete->addTo(editMenu); + + //---------ToolBar---------------------------------- + tools = new Q3ToolBar(this, "marker-tools"); + undoRedo->addTo(tools); + + Q3ToolBar* edit = new Q3ToolBar(this, "edit tools"); + markerAdd->addTo(edit); + markerDelete->addTo(edit); + + //--------------------------------------------------- + // master + //--------------------------------------------------- + + QWidget* w = new QWidget(this, "main"); + setCentralWidget(w); + Q3VBoxLayout* vbox = new Q3VBoxLayout(w); + + table = new Q3ListView(w); + table->setAllColumnsShowFocus(true); + table->setSelectionMode(Q3ListView::Single); + table->setSorting(COL_TICK, true); + + table->addColumn(tr("Bar:Beat:Tick")); + table->addColumn(tr("Hr:Mn:Sc:Fr:Sf")); + table->addColumn(tr("Lock")); + table->addColumn(tr("Text")); + table->setColumnWidth(3, 200); + table->setColumnWidthMode(3, Q3ListView::Maximum); + connect(table, SIGNAL(selectionChanged()), + SLOT(markerSelectionChanged())); + connect(table, SIGNAL(clicked(Q3ListViewItem*)), + SLOT(clicked(Q3ListViewItem*))); + + Q3GroupBox* props = new Q3GroupBox(4, Qt::Horizontal, tr("Marker Properties"), w); + + editTick = new PosEdit(props); + editTick->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, + QSizePolicy::Fixed)); + + editSMPTE = new PosEdit(props); + editSMPTE->setSmpte(true); + editSMPTE->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, + QSizePolicy::Fixed)); + + lock = new QToolButton(props); + lock->setPixmap(*lockIcon); + lock->setToggleButton(true); + + editName = new QLineEdit(props); + editName->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, + QSizePolicy::Preferred)); + connect(editName, SIGNAL(textChanged(const QString&)), + SLOT(nameChanged(const QString&))); + connect(editTick, SIGNAL(valueChanged(const Pos&)), + SLOT(tickChanged(const Pos&))); + connect(editSMPTE, SIGNAL(valueChanged(const Pos&)), + SLOT(tickChanged(const Pos&))); + connect(editSMPTE, SIGNAL(valueChanged(const Pos&)), + editTick, SLOT(setValue(const Pos&))); + connect(editTick, SIGNAL(valueChanged(const Pos&)), + editSMPTE, SLOT(setValue(const Pos&))); + connect(lock, SIGNAL(toggled(bool)), + SLOT(lockChanged(bool))); + connect(song, SIGNAL(markerChanged(int)), + SLOT(markerChanged(int))); + + vbox->addWidget(table); + vbox->addWidget(props); + + //--------------------------------------------------- + // Rest + //--------------------------------------------------- + + //connect(song, SIGNAL(songChanged(int)), SLOT(updateList())); + connect(song, SIGNAL(songChanged(int)), SLOT(songChanged(int))); + + updateList(); + + // work around for probable QT/WM interaction bug. + // for certain window managers, e.g xfce, this window is + // is displayed although not specifically set to show(); + // bug: 2811156 Softsynth GUI unclosable with XFCE4 (and a few others) + show(); + hide(); + + } + +//--------------------------------------------------------- +// MArkerView +//--------------------------------------------------------- + +MarkerView::~MarkerView() + { + // p3.3.47 + //printf("MarkerView::~MarkerView() before undoRedo->removeFrom(tools)\n"); + + undoRedo->removeFrom(tools); + } + +//--------------------------------------------------------- +// readStatus +//--------------------------------------------------------- + +void MarkerView::readStatus(Xml& xml) + { + for (;;) { + Xml::Token token = xml.parse(); + const QString& tag = xml.s1(); + if (token == Xml::Error || token == Xml::End) + break; + switch (token) { + case Xml::TagStart: + xml.unknown("Marker"); + break; + case Xml::TagEnd: + if (tag == "marker") + return; + default: + break; + } + } + } + +//--------------------------------------------------------- +// writeStatus +//--------------------------------------------------------- + +void MarkerView::writeStatus(int level, Xml& xml) const + { + xml.tag(level++, "marker"); + xml.tag(level, "/marker"); + } + +//--------------------------------------------------------- +// addMarker +//--------------------------------------------------------- +void MarkerView::addMarker() + { + addMarker(-1); + } +void MarkerView::addMarker(int i) + { + if( i==-1 ) i = song->cpos(); + + // Changed p3.3.43 Let Song::addMarker emit markerChanged(MARKER_ADD) + // and handle it in MarkerView::markerChanged(int) + //Marker* m = song->addMarker(QString(""), i, false); + //MarkerItem* newItem = new MarkerItem(table, m); + //table->setSelected(newItem, true); + // + song->addMarker(QString(""), i, false); + } + +//--------------------------------------------------------- +// deleteMarker +//--------------------------------------------------------- + +void MarkerView::deleteMarker() + { + MarkerItem* item = (MarkerItem*)table->selectedItem(); + if (item) { + song->removeMarker(item->marker()); + + // Removed p3.3.43 Let Song::removeMarker emit markerChanged(MARKER_REMOVE) + // and handle it in MarkerView::markerChanged(int) + //delete item; + } + } + +//--------------------------------------------------------- +// songChanged +//--------------------------------------------------------- + +void MarkerView::songChanged(int flags) +{ + // Is it simply a midi controller value adjustment? Forget it. + if(flags == SC_MIDI_CONTROLLER) + return; + + updateList(); +} + +//--------------------------------------------------------- +// updateList +//--------------------------------------------------------- + +void MarkerView::updateList() +{ + // Added p3.3.43 Manage selected item, due to clearing of table... + MarkerList* marker = song->marker(); + MarkerItem* selitem = (MarkerItem*)table->selectedItem(); + Marker* selm = selitem ? selitem->marker() : 0; + // p3.3.44 Look for removed markers before added markers... + if(selitem) + { + MarkerItem* mitem = (MarkerItem*)table->firstChild(); + while(mitem) + { + bool found = false; + for(iMarker i = marker->begin(); i != marker->end(); ++i) + { + Marker* m = &i->second; + if(m == mitem->marker()) + { + found = true; + break; + } + } + // Anything removed from the marker list? + if(!found) + { + // If it is the current selected item, it no longer exists. Make the next item be selected. + if(mitem == selitem) + { + MarkerItem* mi = (MarkerItem*)selitem->nextSibling(); + if(mi) + { + selitem = mi; + selm = selitem->marker(); + } + } + } + mitem = (MarkerItem*)mitem->nextSibling(); + } + } + // Look for added markers... + for(iMarker i = marker->begin(); i != marker->end(); ++i) + { + Marker* m = &i->second; + bool found = false; + MarkerItem* item = (MarkerItem*)table->firstChild(); + while(item) + { + if(item->marker() == m) + { + found = true; + break; + } + item = (MarkerItem*)item->nextSibling(); + } + // Anything new found in the marker list? + if(!found) + selm = m; + } + + table->clear(); + //MarkerList* marker = song->marker(); + for (iMarker i = marker->begin(); i != marker->end(); ++i) + { + Marker* m = &i->second; + + // Changed p3.3.43 + //QString tick; + //tick.setNum(i->first); + //new MarkerItem(table, m); + MarkerItem* item = new MarkerItem(table, m); + if(m == selm) + { + m->setCurrent(true); + table->setSelected(item, true); + } + else + { + m->setCurrent(false); + } + } +} + +//--------------------------------------------------------- +// markerSelected +//--------------------------------------------------------- + +void MarkerView::markerSelectionChanged() + { + MarkerItem* item = (MarkerItem*)table->selectedItem(); + if (item == 0) { // never triggered + editTick->setValue(0); + editSMPTE->setValue(0); + editName->setText(QString("")); + lock->setOn(false); + editSMPTE->setEnabled(false); + editTick->setEnabled(false); + lock->setEnabled(false); + editName->setEnabled(false); + } + else { + editTick->setValue(item->tick()); + editSMPTE->setValue(item->tick()); + editName->setText(item->name()); + editName->setEnabled(true); + lock->setOn(item->lock()); + lock->setEnabled(true); + + //printf("MarkerView::markerSelectionChanged item->lock:%d\n", item->lock()); + + editSMPTE->setEnabled(item->lock()); + editTick->setEnabled(!item->lock()); + } + } + +void MarkerView::clicked(Q3ListViewItem* i) + { + MarkerItem* item = (MarkerItem*)i; + if (item == 0) { + table->clearSelection(); + return; + } + Pos p(item->tick(), true); + song->setPos(0, p, true, true, false); + } + +//--------------------------------------------------------- +// nameChanged +//--------------------------------------------------------- + +void MarkerView::nameChanged(const QString& s) + { + MarkerItem* item = (MarkerItem*)table->selectedItem(); + if (item) + item->setName(s); + } + +//--------------------------------------------------------- +// tickChanged +//--------------------------------------------------------- + +void MarkerView::tickChanged(const Pos& pos) + { + MarkerItem* item = (MarkerItem*)table->selectedItem(); + if (item) { + item->setTick(pos.tick()); + Pos p(pos.tick(), true); + song->setPos(0, p, true, true, false); + table->sort(); + } + } + +//--------------------------------------------------------- +// lockChanged +//--------------------------------------------------------- + +void MarkerView::lockChanged(bool lck) + { + MarkerItem* item = (MarkerItem*)table->selectedItem(); + if (item) { + item->setLock(lck); + editSMPTE->setEnabled(item->lock()); + editTick->setEnabled(!item->lock()); + } + } + +//--------------------------------------------------------- +// posChanged +// select appropriate Marker +//--------------------------------------------------------- + +void MarkerView::markerChanged(int val) +{ + //if (val != Song::MARKER_CUR) + // return; + // p3.3.43 + switch(val) + { + // MARKER_CUR, MARKER_ADD, MARKER_REMOVE, MARKER_NAME, + // MARKER_TICK, MARKER_LOCK + case Song::MARKER_ADD: + case Song::MARKER_REMOVE: + updateList(); + break; // Try falling through and let it try to select something. No, let updateList() do it... + + case Song::MARKER_CUR: + { + + MarkerList* marker = song->marker(); + for (iMarker i = marker->begin(); i != marker->end(); ++i) { + if (i->second.current()) { + MarkerItem* item = (MarkerItem*)table->firstChild(); + while (item) { + if (item->marker() == &i->second) { + table->setSelected(item, true); + return; + } + item = (MarkerItem*)item->nextSibling(); + } + } + } + } + break; + + default: + break; + } +} + +void MarkerView::nextMarker() + { + unsigned int curPos = song->cpos();//prevent compiler warning: comparison of sigend/unsigned + unsigned int nextPos = 0xFFFFFFFF; + MarkerList* marker = song->marker(); + for (iMarker i = marker->begin(); i != marker->end(); ++i) { + if (i->second.tick() > curPos && i->second.tick() < nextPos) + nextPos = i->second.tick(); + } + if (nextPos == 0xFFFFFFFF) + return; + Pos p(nextPos, true); + song->setPos(0, p, true, true, false); + + } +void MarkerView::prevMarker() + { + unsigned int curPos = song->cpos();//prevent compiler warning: comparison of sigend/unsigned + unsigned int nextPos = 0; + MarkerList* marker = song->marker(); + for (iMarker i = marker->begin(); i != marker->end(); ++i) { + if (i->second.tick() < curPos && i->second.tick() > nextPos) + nextPos = i->second.tick(); + } +/* if (nextPos == 0) + return;*/ + Pos p(nextPos, true); + song->setPos(0, p, true, true, false); + } diff --git a/muse2/muse/marker/markerview.h b/muse2/muse/marker/markerview.h new file mode 100644 index 00000000..b9f5a85d --- /dev/null +++ b/muse2/muse/marker/markerview.h @@ -0,0 +1,84 @@ +//========================================================= +// MusE +// Linux Music Editor +// $Id: markerview.h,v 1.4.2.3 2008/08/18 00:15:25 terminator356 Exp $ +// (C) Copyright 2000 Werner Schweer (ws@seh.de) +//========================================================= + +#ifndef __MARKERVIEW_H__ +#define __MARKERVIEW_H__ + +#include "cobject.h" +#include <q3mainwindow.h> +#include <q3listview.h> +//Added by qt3to4: +#include <QCloseEvent> + +class QLineEdit; +class PosEdit; +class QToolButton; +class Marker; +class Q3ToolBar; +class Pos; + +//--------------------------------------------------------- +// MarkerItem +//--------------------------------------------------------- + +class MarkerItem : public Q3ListViewItem { + Marker* _marker; + + public: + MarkerItem(Q3ListView* parent, Marker* m); + Marker* marker() const { return _marker; } + unsigned tick() const; + const QString name() const; + bool lock() const; + void setName(const QString& s); + void setTick(unsigned t); + void setLock(bool lck); + }; + +//--------------------------------------------------------- +// MarkerView +//--------------------------------------------------------- + +class MarkerView : public TopWin { + Q3ListView* table; + QLineEdit* editName; + PosEdit* editSMPTE; + PosEdit* editTick; + QToolButton* lock; + Q3ToolBar* tools; + + Q_OBJECT + virtual void closeEvent(QCloseEvent*); + + private slots: + void addMarker(); + void addMarker(int); + void deleteMarker(); + void markerSelectionChanged(); + void nameChanged(const QString&); + void tickChanged(const Pos&); + void lockChanged(bool); + void markerChanged(int); + void clicked(Q3ListViewItem*); + void updateList(); + void songChanged(int); + + signals: + void deleted(unsigned long); + void closed(); + + public: + MarkerView(QWidget* parent); + ~MarkerView(); + virtual void readStatus(Xml&); + virtual void writeStatus(int, Xml&) const; + void nextMarker(); + void prevMarker(); + }; + +#endif + |