This list is closed, nobody may subscribe to it.
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2012 |
Jan
|
Feb
|
Mar
(2) |
Apr
|
May
(2) |
Jun
|
Jul
|
Aug
(34) |
Sep
(63) |
Oct
(3) |
Nov
|
Dec
|
2013 |
Jan
|
Feb
|
Mar
|
Apr
(6) |
May
|
Jun
(3) |
Jul
(3) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(4) |
Dec
(8) |
2015 |
Jan
|
Feb
|
Mar
|
Apr
(36) |
May
|
Jun
|
Jul
|
Aug
(12) |
Sep
|
Oct
|
Nov
|
Dec
|
2016 |
Jan
|
Feb
|
Mar
|
Apr
(38) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(12) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2018 |
Jan
|
Feb
|
Mar
|
Apr
(4) |
May
(2) |
Jun
(48) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
2019 |
Jan
(7) |
Feb
|
Mar
|
Apr
(3) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <its...@us...> - 2018-06-09 21:41:23
|
Revision: 1522 http://sourceforge.net/p/canorus/code/1522 Author: itsgeorg Date: 2018-06-09 21:41:13 +0000 (Sat, 09 Jun 2018) Log Message: ----------- Repeat and volta prerequisites for lilypond export. Modified Paths: -------------- trunk/src/export/lilypondexport.cpp trunk/src/export/lilypondexport.h Modified: trunk/src/export/lilypondexport.cpp =================================================================== --- trunk/src/export/lilypondexport.cpp 2018-06-09 14:34:26 UTC (rev 1521) +++ trunk/src/export/lilypondexport.cpp 2018-06-09 21:41:13 UTC (rev 1522) @@ -24,6 +24,8 @@ #include "score/tempo.h" #include "score/ritardando.h" #include "score/tuplet.h" +#include "score/barline.h" +#include "score/repeatmark.h" /*! \class CALilyPondExport @@ -800,6 +802,14 @@ writeDocumentHeader(); + + for ( int c = 0; c < sheet->contextList().size(); ++c ) { + if (sheet->contextList()[c]->contextType() == CAContext::Staff) { + scanForRepeats(static_cast<CAStaff*>(sheet->contextList()[c])); + break; + } + } + /* Write the volta helper function in case we need it if (!_voltaFunctionWritten) voltaFunction(); @@ -844,6 +854,37 @@ } /*! + Export document title, subtitle, composer, copyright etc. +*/ +void CALilyPondExport::scanForRepeats(CAStaff *staff) { + out() << "\n % \\repeat volta xxx \n"; + + CABarline *bl; + QList<CAMark*> ml; + + // barlineRefs aus score/staff.h + for (int b = 0; b < staff->barlineRefs().size(); b++ ) { + out() << "% " << (staff->barlineRefs()[b])->musElementType() << " " ; + bl = static_cast<CABarline*>(staff->barlineRefs()[b]); + bl->barlineType(); + out() << CABarline::barlineTypeToString(bl->barlineType()); + if ( bl->barlineType()==CABarline::RepeatClose || + bl->barlineType()==CABarline::RepeatOpen || + bl->barlineType()==CABarline::RepeatCloseOpen ) { + out() << "\n % \\repeat volta X " << CABarline::barlineTypeToString( bl->barlineType()) << "\n"; + } + ml = bl->markList(); + for (int e = 0; e < ml.size(); e++ ) { + if ( ml[e]->markType() == CAMark::RepeatMark && static_cast<CARepeatMark*>(ml[e])->repeatMarkType() == CARepeatMark::Volta) { + out() << "\n % \\repeat volta X " << CARepeatMark::repeatMarkTypeToString( static_cast<CARepeatMark*>(ml[e])->repeatMarkType()) << "\n"; + } + } + + } + // inline QList<CAMusElement *>& barlineRefs() { return _barlineList; } +} + +/*! Encapsulates the given string into \markup {}. */ QString CALilyPondExport::markupString( QString in ) { Modified: trunk/src/export/lilypondexport.h =================================================================== --- trunk/src/export/lilypondexport.h 2018-06-09 14:34:26 UTC (rev 1521) +++ trunk/src/export/lilypondexport.h 2018-06-09 21:41:13 UTC (rev 1522) @@ -52,6 +52,7 @@ void exportPlayable( CAPlayable *elt ); void writeDocumentHeader(); + void scanForRepeats(CAStaff *staff); CADiatonicPitch writeRelativeIntro(); void doAnacrusisCheck(CATimeSignature *time); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ma...@us...> - 2018-06-09 14:34:34
|
Revision: 1521 http://sourceforge.net/p/canorus/code/1521 Author: matevz Date: 2018-06-09 14:34:26 +0000 (Sat, 09 Jun 2018) Log Message: ----------- Added two more test cases. Added Paths: ----------- trunk/src/tests/scoreview-accidentals.xml trunk/src/tests/scoreview-repeat-marks-pickup-measure.xml Added: trunk/src/tests/scoreview-accidentals.xml =================================================================== --- trunk/src/tests/scoreview-accidentals.xml (rev 0) +++ trunk/src/tests/scoreview-accidentals.xml 2018-06-09 14:34:26 UTC (rev 1521) @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<!DOCTYPE canorusml> +<canorus-document> + <canorus-version>0.7.3rc2</canorus-version> + <document date-last-modified="2018-06-08T09:41:08" time-edited="1512" date-created="2018-06-08T08:10:17"> + <sheet name="Sheet1"> + <staff number-of-lines="5" name="Staff1"> + <voice midi-pitch-offset="0" stem-direction="stem-up" name="Staff1Voice1" midi-program="0" midi-channel="0"> + <clef c1="-2" offset="0" color="#00000000" time-start="0" clef-type="G"/> + <time-signature time-signature-type="classical" beats="4" color="#00000000" time-start="0" beat="4"/> + <rest time-length="1024" rest-type="normal" color="#00000000" time-start="0"> + <playable-length music-length="whole" dotted="0"/> + </rest> + <barline barline-type="single" color="#00000000" time-start="1024"/> + <rest time-length="1024" rest-type="normal" color="#00000000" time-start="1024"> + <playable-length music-length="whole" dotted="0"/> + </rest> + <barline barline-type="single" color="#00000000" time-start="2048"/> + </voice> + <voice midi-pitch-offset="0" stem-direction="stem-down" name="Staff1Voice2" midi-program="0" midi-channel="1"> + <clef c1="-2" offset="0" color="#00000000" time-start="0" clef-type="G"/> + <time-signature time-signature-type="classical" beats="4" color="#00000000" time-start="0" beat="4"/> + <note time-length="1024" color="#00000000" time-start="0"> + <playable-length music-length="whole" dotted="0"/> + <diatonic-pitch accs="1" note-name="32"/> + </note> + <barline barline-type="single" color="#00000000" time-start="1024"/> + <note time-length="1024" color="#00000000" time-start="1024"> + <playable-length music-length="whole" dotted="0"/> + <diatonic-pitch accs="1" note-name="32"/> + </note> + <barline barline-type="single" color="#00000000" time-start="2048"/> + </voice> + </staff> + </sheet> + </document> +</canorus-document> Added: trunk/src/tests/scoreview-repeat-marks-pickup-measure.xml =================================================================== --- trunk/src/tests/scoreview-repeat-marks-pickup-measure.xml (rev 0) +++ trunk/src/tests/scoreview-repeat-marks-pickup-measure.xml 2018-06-09 14:34:26 UTC (rev 1521) @@ -0,0 +1,100 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<!DOCTYPE canorusml> +<canorus-document> + <canorus-version>0.7.3rc2</canorus-version> + <document date-last-modified="2018-06-08T13:33:27" date-created="2018-06-08T13:28:02" time-edited="324"> + <sheet name="Sheet1"> + <staff number-of-lines="5" name="Staff1"> + <voice midi-pitch-offset="0" midi-channel="0" name="Staff1Voice1" midi-program="0" stem-direction="stem-up"> + <clef time-start="0" clef-type="G" c1="-2" offset="0" color="#00000000"/> + <time-signature time-start="0" beat="4" color="#00000000" time-signature-type="classical" beats="3"/> + <note time-start="0" color="#00000000" time-length="256"> + <playable-length dotted="0" music-length="quarter"/> + <diatonic-pitch note-name="29" accs="0"/> + </note> + <barline time-start="256" barline-type="single" color="#00000000"/> + <note time-start="256" color="#00000000" time-length="256"> + <playable-length dotted="0" music-length="quarter"/> + <diatonic-pitch note-name="32" accs="0"/> + </note> + <note time-start="512" color="#00000000" time-length="256"> + <playable-length dotted="0" music-length="quarter"/> + <diatonic-pitch note-name="33" accs="0"/> + </note> + <note time-start="768" color="#00000000" time-length="256"> + <playable-length dotted="0" music-length="quarter"/> + <diatonic-pitch note-name="34" accs="0"/> + </note> + <barline time-start="1024" barline-type="single" color="#00000000"/> + <note time-start="1024" color="#00000000" time-length="512"> + <playable-length dotted="0" music-length="half"/> + <diatonic-pitch note-name="35" accs="0"/> + </note> + <note time-start="1536" color="#00000000" time-length="256"> + <playable-length dotted="0" music-length="quarter"/> + <diatonic-pitch note-name="36" accs="0"/> + </note> + <barline time-start="1792" barline-type="single" color="#00000000"/> + <note time-start="1792" color="#00000000" time-length="768"> + <playable-length dotted="1" music-length="half"/> + <diatonic-pitch note-name="35" accs="0"/> + </note> + <barline time-start="2560" barline-type="single" color="#00000000"/> + <note time-start="2560" color="#00000000" time-length="256"> + <playable-length dotted="0" music-length="quarter"/> + <diatonic-pitch note-name="33" accs="0"/> + </note> + <rest time-start="2816" color="#00000000" time-length="256" rest-type="normal"> + <playable-length dotted="0" music-length="quarter"/> + </rest> + <barline time-start="3072" barline-type="repeat-close" color="#00000000"/> + <note time-start="3072" color="#00000000" time-length="256"> + <playable-length dotted="0" music-length="quarter"/> + <diatonic-pitch note-name="29" accs="0"/> + </note> + <barline time-start="3328" barline-type="single" color="#00000000"/> + <note time-start="3328" color="#00000000" time-length="256"> + <playable-length dotted="0" music-length="quarter"/> + <diatonic-pitch note-name="32" accs="0"/> + </note> + <note time-start="3584" color="#00000000" time-length="256"> + <playable-length dotted="0" music-length="quarter"/> + <diatonic-pitch note-name="33" accs="0"/> + </note> + <note time-start="3840" color="#00000000" time-length="256"> + <playable-length dotted="0" music-length="quarter"/> + <diatonic-pitch note-name="34" accs="0"/> + </note> + <barline time-start="4096" barline-type="single" color="#00000000"/> + <note time-start="4096" color="#00000000" time-length="256"> + <playable-length dotted="0" music-length="quarter"/> + <diatonic-pitch note-name="34" accs="0"/> + </note> + <note time-start="4352" color="#00000000" time-length="256"> + <playable-length dotted="0" music-length="quarter"/> + <diatonic-pitch note-name="33" accs="0"/> + </note> + <note time-start="4608" color="#00000000" time-length="256"> + <playable-length dotted="0" music-length="quarter"/> + <diatonic-pitch note-name="32" accs="0"/> + </note> + <barline time-start="4864" barline-type="single" color="#00000000"/> + <note time-start="4864" color="#00000000" time-length="768"> + <playable-length dotted="1" music-length="half"/> + <diatonic-pitch note-name="32" accs="0"/> + <tie slur-style="slur-solid" slur-direction="slur-preferred"/> + </note> + <barline time-start="5632" barline-type="single" color="#00000000"/> + <note time-start="5632" color="#00000000" time-length="256"> + <playable-length dotted="0" music-length="quarter"/> + <diatonic-pitch note-name="32" accs="0"/> + </note> + <rest time-start="5888" color="#00000000" time-length="256" rest-type="normal"> + <playable-length dotted="0" music-length="quarter"/> + </rest> + <barline time-start="6144" barline-type="end" color="#00000000"/> + </voice> + </staff> + </sheet> + </document> +</canorus-document> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ma...@us...> - 2018-06-09 13:39:38
|
Revision: 1520 http://sourceforge.net/p/canorus/code/1520 Author: matevz Date: 2018-06-09 13:37:33 +0000 (Sat, 09 Jun 2018) Log Message: ----------- Fixed crash when double clicking for adding a new sheet. Modified Paths: -------------- trunk/src/widgets/scoreview.cpp Modified: trunk/src/widgets/scoreview.cpp =================================================================== --- trunk/src/widgets/scoreview.cpp 2018-06-09 13:33:00 UTC (rev 1519) +++ trunk/src/widgets/scoreview.cpp 2018-06-09 13:37:33 UTC (rev 1520) @@ -517,7 +517,7 @@ QMap<int, CADrawableBarline*> result; // determine staff with most barlines - CADrawableStaff *dStaff = 0; + CADrawableStaff *dStaff = nullptr; for (int i=0; i<dContextList.size(); i++) { if ((dContextList[i]->drawableContextType()==CADrawableContext::DrawableStaff) && (!dStaff || dStaff->drawableBarlineList().size()<static_cast<CADrawableStaff*>(dContextList[i])->drawableBarlineList().size())) { @@ -524,6 +524,10 @@ dStaff = static_cast<CADrawableStaff*>(dContextList[i]); } } + + if (!dStaff) { + return result; + } QList<CADrawableBarline *> drawableBarlineList = dStaff->drawableBarlineList(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ma...@us...> - 2018-06-09 13:33:11
|
Revision: 1519 http://sourceforge.net/p/canorus/code/1519 Author: matevz Date: 2018-06-09 13:33:00 +0000 (Sat, 09 Jun 2018) Log Message: ----------- Fixed Qt5WebEngine compilation errors on Linux. Modified Paths: -------------- trunk/src/CMakeLists.txt Modified: trunk/src/CMakeLists.txt =================================================================== --- trunk/src/CMakeLists.txt 2018-06-09 13:03:34 UTC (rev 1518) +++ trunk/src/CMakeLists.txt 2018-06-09 13:33:00 UTC (rev 1519) @@ -176,6 +176,10 @@ scorectl/keysignaturectl.h ) +IF(Qt5WebEngineWidgets_LIBRARIES) + SET(Canorus_Gui_MOCs ${Canorus_Gui_MOCs} widgets/helpbrowser.h) +ENDIF(Qt5WebEngineWidgets_LIBRARIES) + SET(Canorus_Core_MOCs # MOCs compiled into scripting library as well import/import.h export/export.h @@ -193,11 +197,6 @@ interface/pluginaction.h ) -IF(Qt5WebEngineWidgets_LIBRARIES) - SET(Canorus_Gui_MOCs ${Canorus_Gui_MOCs} widgets/helpbrowser.h) - SET(Canorus_Widget_Srcs ${Canorus_Widget_Srcs} widgets/helpbrowser.cpp) -ENDIF(Qt5WebEngineWidgets_LIBRARIES) - ################ # Qt5 settings # ################ @@ -323,6 +322,10 @@ widgets/tabwidget.cpp ) +IF(Qt5WebEngineWidgets_LIBRARIES) + SET(Canorus_Widget_Srcs ${Canorus_Widget_Srcs} widgets/helpbrowser.cpp) +ENDIF(Qt5WebEngineWidgets_LIBRARIES) + SET(Canorus_Ui_Srcs # Implementations of widgets that have their own .ui qt-designer files ui/mainwin.cpp ui/settingsdialog.cpp @@ -477,6 +480,7 @@ scripting/swigruby.cpp ${Canorus_Core_MOC_Srcs} ) + IF(MINGW) # Append ZLIB srcs to Swig srcs on Windows SET( Canorus_Swig_Srcs ${Canorus_Swig_Srcs} ${ZLIB_Srcs} ) ENDIF(MINGW) @@ -670,10 +674,7 @@ # command. Never remove that line :-) # Add ${QT_QTTEST_LIBRARY} below to add the Qt Test library as well # Add ${POPPLERQT4_LIBRARY} ${POPPLER_LIBRARY} to reactivate poppler libraries -TARGET_LINK_LIBRARIES(canorus Qt5::Widgets Qt5::Core Qt5::Gui Qt5::Svg Qt5::Xml Qt5::PrintSupport ${RUBY_LIBRARY} ${PYTHON_LIBRARY} z pthread ) -IF(Qt5WebEngineWidgets_LIBRARIES) - TARGET_LINK_LIBRARIES(canorus Qt5::WebEngineWidgets) -ENDIF(Qt5WebEngineWidgets_LIBRARIES) +TARGET_LINK_LIBRARIES(canorus Qt5::Widgets Qt5::Core Qt5::Gui Qt5::Svg Qt5::Xml Qt5::PrintSupport ${Qt5WebEngineWidgets_LIBRARIES} ${RUBY_LIBRARY} ${PYTHON_LIBRARY} z pthread ) # Duma leads to a crash on libfontconfig with Ubuntu (10.04/12.04) # duma ) @@ -724,7 +725,7 @@ ADD_CUSTOM_COMMAND( TARGET canorus PRE_BUILD - WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/src COMMAND ${Qt5_LUPDATE_EXECUTABLE} ARGS -noobsolete ${Canorus_UIC_Srcs} ${Canorus_Srcs} -ts ${Canorus_Translation_Srcs} lang/template.ts ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ma...@us...> - 2018-06-09 13:03:41
|
Revision: 1518 http://sourceforge.net/p/canorus/code/1518 Author: matevz Date: 2018-06-09 13:03:34 +0000 (Sat, 09 Jun 2018) Log Message: ----------- Made Qt5WebEngine optional. If not installed, desktop web browser is launched for showing user's guide. Updated Readme.txt for compiling Canorus on Windows. Modified Paths: -------------- trunk/CMakeLists.txt trunk/src/CMakeLists.txt trunk/src/control/helpctl.cpp trunk/src/control/helpctl.h trunk/src/ui/mainwin.cpp trunk/src/ui/mainwin.h trunk/windows/Readme.txt Modified: trunk/CMakeLists.txt =================================================================== --- trunk/CMakeLists.txt 2018-06-09 11:57:52 UTC (rev 1517) +++ trunk/CMakeLists.txt 2018-06-09 13:03:34 UTC (rev 1518) @@ -99,7 +99,7 @@ FIND_PACKAGE(Qt5Xml REQUIRED) FIND_PACKAGE(Qt5Help REQUIRED) FIND_PACKAGE(Qt5PrintSupport REQUIRED) -FIND_PACKAGE(Qt5WebEngineWidgets REQUIRED) +FIND_PACKAGE(Qt5WebEngineWidgets) # in the following lines all the requires include directories are added INCLUDE_DIRECTORIES(src) Modified: trunk/src/CMakeLists.txt =================================================================== --- trunk/src/CMakeLists.txt 2018-06-09 11:57:52 UTC (rev 1517) +++ trunk/src/CMakeLists.txt 2018-06-09 13:03:34 UTC (rev 1518) @@ -165,7 +165,6 @@ widgets/pyconsole.h widgets/midirecorderview.h widgets/resourceview.h - widgets/helpbrowser.h widgets/actionseditor.h widgets/progressstatusbar.h widgets/tabwidget.h @@ -194,8 +193,13 @@ interface/pluginaction.h ) +IF(Qt5WebEngineWidgets_LIBRARIES) + SET(Canorus_Gui_MOCs ${Canorus_Gui_MOCs} widgets/helpbrowser.h) + SET(Canorus_Widget_Srcs ${Canorus_Widget_Srcs} widgets/helpbrowser.cpp) +ENDIF(Qt5WebEngineWidgets_LIBRARIES) + ################ -# Qt4 settings # +# Qt5 settings # ################ # Enable needed Qt modules for Canorus SET(QT_USE_QTXML True) # Save/Load @@ -314,7 +318,6 @@ widgets/pyconsole.cpp widgets/midirecorderview.cpp widgets/resourceview.cpp - widgets/helpbrowser.cpp widgets/actionseditor.cpp widgets/progressstatusbar.cpp widgets/tabwidget.cpp @@ -335,8 +338,8 @@ SET(Canorus_Gui_Ctl_Srcs # Control instances for user interface or views control/previewctl.cpp control/printctl.cpp - control/helpctl.cpp control/mainwinprogressctl.cpp + control/helpctl.cpp scorectl/keysignaturectl.cpp ) @@ -667,7 +670,10 @@ # command. Never remove that line :-) # Add ${QT_QTTEST_LIBRARY} below to add the Qt Test library as well # Add ${POPPLERQT4_LIBRARY} ${POPPLER_LIBRARY} to reactivate poppler libraries -TARGET_LINK_LIBRARIES(canorus Qt5::Widgets Qt5::Core Qt5::Gui Qt5::Svg Qt5::Xml Qt5::PrintSupport Qt5::WebEngineWidgets ${RUBY_LIBRARY} ${PYTHON_LIBRARY} z pthread ) +TARGET_LINK_LIBRARIES(canorus Qt5::Widgets Qt5::Core Qt5::Gui Qt5::Svg Qt5::Xml Qt5::PrintSupport ${RUBY_LIBRARY} ${PYTHON_LIBRARY} z pthread ) +IF(Qt5WebEngineWidgets_LIBRARIES) + TARGET_LINK_LIBRARIES(canorus Qt5::WebEngineWidgets) +ENDIF(Qt5WebEngineWidgets_LIBRARIES) # Duma leads to a crash on libfontconfig with Ubuntu (10.04/12.04) # duma ) @@ -734,7 +740,7 @@ ADD_CUSTOM_COMMAND( TARGET canorus POST_BUILD - COMMAND make install + COMMAND ${CMAKE_MAKE_PROGRAM} install ) ENDIF(${CANORUS_DEV_INSTALL} MATCHES True) @@ -776,7 +782,7 @@ IF(MINGW) # Install Qt libs - INSTALL( FILES ${QT_BIN_DIR}/Qt5Core.dll ${QT_BIN_DIR}/Qt5Gui.dll ${QT_BIN_DIR}/Qt5Widgets.dll ${QT_BIN_DIR}/Qt5Svg.dll ${QT_BIN_DIR}/Qt5Xml.dll ${QT_BIN_DIR}/Qt5Sql.dll ${QT_BIN_DIR}/Qt5Network.dll ${QT_BIN_DIR}/Qt5CLucene.dll ${QT_BIN_DIR}/Qt5PrintSupport.dll DESTINATION ${CMAKE_INSTALL_PREFIX}/${CANORUS_INSTALL_BIN_DIR} ) + INSTALL( FILES ${QT_BIN_DIR}/Qt5Core.dll ${QT_BIN_DIR}/Qt5Gui.dll ${QT_BIN_DIR}/Qt5Widgets.dll ${QT_BIN_DIR}/Qt5Svg.dll ${QT_BIN_DIR}/Qt5Xml.dll ${QT_BIN_DIR}/Qt5Sql.dll ${QT_BIN_DIR}/Qt5Network.dll ${QT_BIN_DIR}/Qt5PrintSupport.dll DESTINATION ${CMAKE_INSTALL_PREFIX}/${CANORUS_INSTALL_BIN_DIR} ) # Install qsvg plugin for rendering SVG icons get_target_property(QSvgIcon_loc Qt5::QSvgIconPlugin LOCATION) Modified: trunk/src/control/helpctl.cpp =================================================================== --- trunk/src/control/helpctl.cpp 2018-06-09 11:57:52 UTC (rev 1517) +++ trunk/src/control/helpctl.cpp 2018-06-09 13:03:34 UTC (rev 1518) @@ -7,11 +7,15 @@ #include <QStringList> #include <QDockWidget> +#include <QDesktopServices> #include "canorus.h" #include "control/helpctl.h" #include "ui/mainwin.h" + +#ifdef QT_WEBENGINEWIDGETS_LIB #include "widgets/helpbrowser.h" +#endif /*! \class CAHelpCtl @@ -77,7 +81,11 @@ } if (!url.path().isEmpty()) { +#ifdef QT_WEBENGINEWIDGETS_LIB displayHelp( url, helpWidget ); +#else + QDesktopServices::openUrl( url ); +#endif return true; } @@ -88,6 +96,7 @@ Activates the user's guide help at the given url. */ void CAHelpCtl::displayHelp( QUrl url, QWidget *helpWidget ) { +#ifdef QT_WEBENGINEWIDGETS_LIB CAHelpBrowser *browser=0; if ( !helpWidget ) { browser = new CAHelpBrowser; @@ -101,4 +110,5 @@ if (browser) { browser->setUrl( url ); } +#endif } Modified: trunk/src/control/helpctl.h =================================================================== --- trunk/src/control/helpctl.h 2018-06-09 11:57:52 UTC (rev 1517) +++ trunk/src/control/helpctl.h 2018-06-09 13:03:34 UTC (rev 1518) @@ -11,7 +11,6 @@ #include <QString> #include <QUrl> -class QHelpEngine; class QWidget; class CAHelpCtl { @@ -19,7 +18,7 @@ CAHelpCtl(); virtual ~CAHelpCtl(); - bool showUsersGuide( QString chapter="", QWidget *helpWidget=0 ); + bool showUsersGuide( QString chapter="", QWidget *helpWidget=nullptr ); private: QUrl _homeUrl; Modified: trunk/src/ui/mainwin.cpp =================================================================== --- trunk/src/ui/mainwin.cpp 2018-06-09 11:57:52 UTC (rev 1517) +++ trunk/src/ui/mainwin.cpp 2018-06-09 13:03:34 UTC (rev 1518) @@ -54,7 +54,9 @@ #include "widgets/undotoolbutton.h" #include "widgets/lcdnumber.h" #include "widgets/midirecorderview.h" +#ifdef QT_WEBENGINEWIDGETS_LIB #include "widgets/helpbrowser.h" +#endif #include "widgets/view.h" #include "widgets/viewcontainer.h" @@ -586,8 +588,10 @@ uiHelpDock = new QDockWidget(tr("Help"), this); uiHelpDock->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea); uiHelpDock->setMaximumWidth(400); +#ifdef QT_WEBENGINEWIDGETS_LIB uiHelpWidget = new CAHelpBrowser( uiHelpDock ); uiHelpDock->setWidget( uiHelpWidget ); +#endif #ifdef USE_PYTHON uiPyConsoleDock = new QDockWidget(tr("Canorus console"), this); @@ -4231,7 +4235,11 @@ } void CAMainWin::on_uiUsersGuide_triggered() { +#ifdef QT_WEBENGINEWIDGETS_LIB CACanorus::help()->showUsersGuide( "playback", this ); +#else + CACanorus::help()->showUsersGuide( "playback" ); +#endif } void CAMainWin::on_uiAboutQt_triggered() { Modified: trunk/src/ui/mainwin.h =================================================================== --- trunk/src/ui/mainwin.h 2018-06-09 11:57:52 UTC (rev 1517) +++ trunk/src/ui/mainwin.h 2018-06-09 13:03:34 UTC (rev 1518) @@ -45,7 +45,11 @@ class CAKeySignatureUI; class CAMainWinProgressCtl; + +#ifdef QT_WEBENGINEWIDGETS_LIB class CAHelpBrowser; +#endif + class CAMenuToolButton; class CAUndoToolButton; class CALCDNumber; @@ -148,8 +152,9 @@ CAPyConsoleInterface* pyConsoleIface; QDockWidget *helpDock() { return uiHelpDock; } +#ifdef QT_WEBENGINEWIDGETS_LIB CAHelpBrowser *helpWidget() { return uiHelpWidget; } - +#endif private slots: /////////////////////////// // ToolBar/Menus actions // @@ -541,6 +546,8 @@ // Help widget QDockWidget *uiHelpDock; +#ifdef QT_WEBENGINEWIDGETS_LIB CAHelpBrowser *uiHelpWidget; +#endif }; #endif /* MAINWIN_H_ */ Modified: trunk/windows/Readme.txt =================================================================== --- trunk/windows/Readme.txt 2018-06-09 11:57:52 UTC (rev 1517) +++ trunk/windows/Readme.txt 2018-06-09 13:03:34 UTC (rev 1518) @@ -7,7 +7,7 @@ 1) Install Qt 5.x open source SDK for Windows including the mingw compiler. Note: If the installation under Wine produces some warnings, click on Ignore button. -2) Go to C:\Qt\Qt5.5.0\Tools\mingw492_32\bin and rename mingw32-make.exe to +2) Go to C:\Qt\Tools\mingw530_32\bin and rename mingw32-make.exe to make.exe: copy mingw32-make.exe make.exe 3) Install cmake 3.x from the official site and add cmake to path. @@ -18,12 +18,12 @@ Canorus Windows builds: ======================= 1) Add gcc, g++ and make, and qmake to PATH: - set PATH=%PATH%;C:\Qt\Qt5.5.0\Tools\mingw492_32\bin;C:\Qt\Qt5.5.0\5.5\mingw492_32\bin + set PATH=%PATH%;C:\Qt\Tools\mingw530_32\bin;C:\Qt\5.9.5\mingw53_32\bin 2) Configure Canorus with cmake and set CMAKE_INSTALL_PREFIX to windows/canorus directory: - cmake -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release -D QT_QMAKE_EXECUTABLE=C:\Qt\Qt5.5.0\5.5\mingw492_32\bin\qmake.exe -D CMAKE_INSTALL_PREFIX=windows\canorus . - + c:\cmake-3.11.3-win64-x64\bin\cmake.exe -G "MinGW Makefiles" -DCMAKE_MAKE_PROGRAM=C:\Qt\Tools\mingw530_32\bin\mingw32-make.exe -DCMAKE_BUILD_TYPE=Release -D QT_QMAKE_EXECUTABLE=C:\Qt\5.9.5\mingw53_32\bin\qmake.exe -D CMAKE_INSTALL_PREFIX=windows\canorus . + 3) If you want to enable scripting support, you should append the following to the cmake command: -D SWIG_DIR=C:\swigwin-3.0.7 -D SWIG_EXECUTABLE=C:\swigwin-3.0.7\swig.exe -D PYTHON_LIBRARIES=C:\python25\libs -D PYTHON_LIBRARY=C:\python25\python25.dll -D PYTHON_INCLUDE_PATH=C:\python25\include This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <su...@us...> - 2018-06-09 11:57:57
|
Revision: 1517 http://sourceforge.net/p/canorus/code/1517 Author: suamor Date: 2018-06-09 11:57:52 +0000 (Sat, 09 Jun 2018) Log Message: ----------- Fix #11 by making dialog resizable and enabling resize grub button Modified Paths: -------------- trunk/src/ui/propertiesdialog.cpp trunk/src/ui/propertiesdialog.ui Modified: trunk/src/ui/propertiesdialog.cpp =================================================================== --- trunk/src/ui/propertiesdialog.cpp 2018-06-09 11:54:03 UTC (rev 1516) +++ trunk/src/ui/propertiesdialog.cpp 2018-06-09 11:57:52 UTC (rev 1517) @@ -9,6 +9,7 @@ #include <QDateTime> #include <QHeaderView> // needed to hide header widget from document tree #include <QDate> +#include <QDebug> #include "ui/propertiesdialog.h" @@ -46,6 +47,7 @@ uiDocumentTree->header()->hide(); buildTree(); + setWindowFlags(Qt::Window); } CAPropertiesDialog::~CAPropertiesDialog() { @@ -148,6 +150,8 @@ uiDocumentTree->addTopLevelItem( docItem ); uiDocumentTree->expandAll(); + + qDebug() << "Header 0: " << uiDocumentTree->header()->sectionSize(0) << "Header 1: " << uiDocumentTree->header()->sectionSize(0); } // updates to the current item Modified: trunk/src/ui/propertiesdialog.ui =================================================================== --- trunk/src/ui/propertiesdialog.ui 2018-06-09 11:54:03 UTC (rev 1516) +++ trunk/src/ui/propertiesdialog.ui 2018-06-09 11:57:52 UTC (rev 1517) @@ -13,6 +13,9 @@ <property name="windowTitle"> <string>Properties</string> </property> + <property name="sizeGripEnabled"> + <bool>true</bool> + </property> <layout class="QGridLayout" name="gridLayout"> <item row="2" column="0"> <widget class="QDialogButtonBox" name="uiButtonBox"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <su...@us...> - 2018-06-09 11:54:07
|
Revision: 1516 http://sourceforge.net/p/canorus/code/1516 Author: suamor Date: 2018-06-09 11:54:03 +0000 (Sat, 09 Jun 2018) Log Message: ----------- Add working directory to have find translation files in build folder Modified Paths: -------------- trunk/src/CMakeLists.txt Modified: trunk/src/CMakeLists.txt =================================================================== --- trunk/src/CMakeLists.txt 2018-06-09 11:19:42 UTC (rev 1515) +++ trunk/src/CMakeLists.txt 2018-06-09 11:54:03 UTC (rev 1516) @@ -718,6 +718,7 @@ ADD_CUSTOM_COMMAND( TARGET canorus PRE_BUILD + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} COMMAND ${Qt5_LUPDATE_EXECUTABLE} ARGS -noobsolete ${Canorus_UIC_Srcs} ${Canorus_Srcs} -ts ${Canorus_Translation_Srcs} lang/template.ts ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <su...@us...> - 2018-06-09 11:19:45
|
Revision: 1515 http://sourceforge.net/p/canorus/code/1515 Author: suamor Date: 2018-06-09 11:19:42 +0000 (Sat, 09 Jun 2018) Log Message: ----------- Updated german translation Modified Paths: -------------- trunk/src/lang/de.ts Modified: trunk/src/lang/de.ts =================================================================== --- trunk/src/lang/de.ts 2018-06-08 21:09:58 UTC (rev 1514) +++ trunk/src/lang/de.ts 2018-06-09 11:19:42 UTC (rev 1515) @@ -1,67 +1,76 @@ <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> -<TS version="2.0" language="de_DE"> +<TS version="2.1" language="de_DE"> <context> <name>CAActionsEditor</name> <message> - <location filename="../widgets/actionseditor.cpp" line="160"/> + <location filename="../widgets/actionseditor.cpp" line="167"/> <source>Shortcut</source> <translation>Tastenkürzel</translation> </message> <message> - <location filename="../widgets/actionseditor.cpp" line="160"/> + <location filename="../widgets/actionseditor.cpp" line="167"/> <source>Description</source> <translation>Beschreibung</translation> </message> <message> - <location filename="../widgets/actionseditor.cpp" line="160"/> + <location filename="../widgets/actionseditor.cpp" line="167"/> <source>Name</source> <translation>Name</translation> </message> <message> + <location filename="../widgets/actionseditor.cpp" line="443"/> + <location filename="../widgets/actionseditor.cpp" line="511"/> + <source>Shortcut files</source> + <translation>Tastenkürzel-Datei</translation> + </message> + <message> <location filename="../widgets/actionseditor.cpp" line="167"/> - <source>&Save shortcuts</source> - <translation>Tastenkürzel &speichern</translation> + <source>Midi Command</source> + <translation type="Midi Kommando"></translation> </message> <message> - <location filename="../widgets/actionseditor.cpp" line="168"/> - <source>&Load shortcuts</source> - <translation>Tastenkürzel &laden</translation> + <location filename="../widgets/actionseditor.cpp" line="167"/> + <source>Combined</source> + <translation type="Kombiniert"></translation> </message> <message> <location filename="../widgets/actionseditor.cpp" line="172"/> - <source>&Save midi commands</source> - <translation>Midi-Befehle &speichern</translation> + <source>&Save shortcuts...</source> + <translation>Kürzel &speichern</translation> </message> <message> <location filename="../widgets/actionseditor.cpp" line="173"/> - <source>&Load midi commands</source> - <translation>Midi-Befehle &laden</translation> + <source>&Load shortcuts...</source> + <translation>Kürzel &laden</translation> </message> <message> - <location filename="../widgets/actionseditor.cpp" line="430"/> - <location filename="../widgets/actionseditor.cpp" line="503"/> - <source>Shortcut files</source> - <translation>Tastenkürzel-Datei</translation> + <location filename="../widgets/actionseditor.cpp" line="176"/> + <source>&Change shortcut...</source> + <translation>&Kürzel ändern</translation> </message> <message> - <location filename="../widgets/actionseditor.cpp" line="436"/> - <location filename="../widgets/actionseditor.cpp" line="507"/> - <source>Midi command files</source> - <translation>Midi-Befehlsdatei</translation> + <location filename="../widgets/actionseditor.cpp" line="443"/> + <source>Midi Key Sequence files</source> + <translation>Midi Tastensequenzdateien</translation> </message> <message> - <location filename="../widgets/actionseditor.cpp" line="440"/> + <location filename="../widgets/actionseditor.cpp" line="443"/> + <source>Combined Key Sequence files</source> + <translation>Kombinierte Tastensequenzdateien</translation> + </message> + <message> + <location filename="../widgets/actionseditor.cpp" line="446"/> <source>Choose a filename</source> <translation>Wähle Dateiname</translation> </message> <message> - <location filename="../widgets/actionseditor.cpp" line="450"/> + <location filename="../widgets/actionseditor.cpp" line="458"/> <source>Confirm overwrite?</source> <translation>Datei überschreiben?</translation> </message> <message> - <location filename="../widgets/actionseditor.cpp" line="451"/> + <location filename="../widgets/actionseditor.cpp" line="459"/> <source>The file %1 already exists. Do you want to overwrite?</source> <translation>Die Datei %1 existiert. @@ -68,23 +77,23 @@ Willst du sie überschreiben?</translation> </message> <message> - <location filename="../widgets/actionseditor.cpp" line="463"/> - <location filename="../widgets/actionseditor.cpp" line="516"/> + <location filename="../widgets/actionseditor.cpp" line="474"/> + <location filename="../widgets/actionseditor.cpp" line="523"/> <source>Error</source> - <translation>Error</translation> + <translation>Fehler</translation> </message> <message> - <location filename="../widgets/actionseditor.cpp" line="464"/> + <location filename="../widgets/actionseditor.cpp" line="475"/> <source>The file couldn't be saved</source> <translation>Datei konnte nicht gespeichert werden</translation> </message> <message> - <location filename="../widgets/actionseditor.cpp" line="509"/> + <location filename="../widgets/actionseditor.cpp" line="513"/> <source>Choose a file</source> <translation>Dateiauswahl</translation> </message> <message> - <location filename="../widgets/actionseditor.cpp" line="517"/> + <location filename="../widgets/actionseditor.cpp" line="524"/> <source>The file couldn't be loaded</source> <translation>Die Datei konnte nicht geladen werden</translation> </message> @@ -92,17 +101,17 @@ <context> <name>CAAutoRecovery</name> <message> - <location filename="../core/autorecovery.cpp" line="122"/> + <location filename="../core/autorecovery.cpp" line="123"/> <source>- Document %1 last modified on %2.</source> <translation>- Dokument %1 zuletzt geändert am %2.</translation> </message> <message> - <location filename="../core/autorecovery.cpp" line="140"/> + <location filename="../core/autorecovery.cpp" line="141"/> <source>Document recovery</source> <translation>Dokument Wiederherstellung</translation> </message> <message> - <location filename="../core/autorecovery.cpp" line="141"/> + <location filename="../core/autorecovery.cpp" line="142"/> <source>Previous session of Canorus was unexpectedly closed. The following documents were successfully recovered: @@ -115,19 +124,19 @@ <context> <name>CADocumentProperties</name> <message> - <location filename="../ui/propertiesdialog.cpp" line="216"/> + <location filename="../ui/propertiesdialog.cpp" line="220"/> <source>CC, Some rights reserved</source> <comment>copyright</comment> <translation>CC, einige Rechte vorbehalten</translation> </message> <message> - <location filename="../ui/propertiesdialog.cpp" line="217"/> + <location filename="../ui/propertiesdialog.cpp" line="221"/> <source>Public domain</source> <comment>copyright</comment> <translation>Public domain</translation> </message> <message> - <location filename="../ui/propertiesdialog.cpp" line="218"/> + <location filename="../ui/propertiesdialog.cpp" line="222"/> <source>All rights reserved</source> <comment>copyright</comment> <translation>Alle Rechte vorbehalten</translation> @@ -173,7 +182,7 @@ <context> <name>CAKeySignatureCtl</name> <message> - <location filename="../scorectl/keysignaturectl.cpp" line="68"/> + <location filename="../scorectl/keysignaturectl.cpp" line="69"/> <source>change key signature</source> <comment>undo</comment> <translatorcomment>rückgängig machen</translatorcomment> @@ -191,7 +200,7 @@ <context> <name>CALilyPondExport</name> <message> - <location filename="../export/lilypondexport.cpp" line="834"/> + <location filename="../export/lilypondexport.cpp" line="836"/> <source>arr.</source> <comment>arrangement</comment> <translatorcomment>Arrangement</translatorcomment> @@ -226,1090 +235,1090 @@ <context> <name>CAMainWin</name> <message> - <location filename="../ui/mainwin.cpp" line="248"/> + <location filename="../ui/mainwin.cpp" line="256"/> <source>Insert ToolBar</source> <translation>Einfügewerkzeuge</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="249"/> + <location filename="../ui/mainwin.cpp" line="257"/> <source>Select Context</source> <translation>Setze Kontext</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="260"/> + <location filename="../ui/mainwin.cpp" line="268"/> <source>Select Clef</source> <translation>Schlüsselauswahl</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="272"/> + <location filename="../ui/mainwin.cpp" line="280"/> <source>Select Time Signature</source> <translation>Setze Taktmaß</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="281"/> + <location filename="../ui/mainwin.cpp" line="289"/> <source>Select Barline</source> <translation>Taktlinie</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="339"/> + <location filename="../ui/mainwin.cpp" line="347"/> <source>Context ToolBar</source> <translation>Kontextauswahl</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="353"/> + <location filename="../ui/mainwin.cpp" line="361"/> <source>Voice ToolBar</source> <translation>Stimmenauswahl</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="364"/> + <location filename="../ui/mainwin.cpp" line="372"/> <source>Select Voice Stem Direction</source> <translation>Setze Notenhalsrichtung</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="370"/> + <location filename="../ui/mainwin.cpp" line="378"/> <source>Playable ToolBar</source> <translation>Wähle Noten und Pausen</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="371"/> + <location filename="../ui/mainwin.cpp" line="379"/> <source>Select Length</source> <translation>Bestimme Notendauer</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="382"/> + <location filename="../ui/mainwin.cpp" line="390"/> <source>Select Note Stem Direction</source> <translation>Setze Notenhalsrichtung</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="4101"/> + <location filename="../ui/mainwin.cpp" line="4238"/> <source>About Qt</source> <translation>Über Qt</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="4115"/> + <location filename="../ui/mainwin.cpp" line="4252"/> <source>About Canorus</source> <translation>Über Canorus</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="1790"/> - <location filename="../ui/mainwin.cpp" line="5396"/> + <location filename="../ui/mainwin.cpp" line="1792"/> + <location filename="../ui/mainwin.cpp" line="5558"/> <source>Staff%1</source> <translation>System%1</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="1380"/> + <location filename="../ui/mainwin.cpp" line="1403"/> <source>Voice%1</source> <translation>Stimme%1</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="1398"/> - <location filename="../ui/mainwin.cpp" line="1405"/> - <location filename="../ui/mainwin.cpp" line="1433"/> - <location filename="../ui/mainwin.cpp" line="3319"/> + <location filename="../ui/mainwin.cpp" line="1421"/> + <location filename="../ui/mainwin.cpp" line="1428"/> + <location filename="../ui/mainwin.cpp" line="1456"/> + <location filename="../ui/mainwin.cpp" line="3420"/> <source>Canorus</source> <translation>Canorus</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="1406"/> + <location filename="../ui/mainwin.cpp" line="1429"/> <source>Are you sure do you want to delete voice %1 and all its notes?</source> <translation>Sind sie sicher, die Stimme %1 mit ihren Noten zu löschen?</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="1434"/> + <location filename="../ui/mainwin.cpp" line="1457"/> <source>Are you sure do you want to delete context %1 and all its contents?</source> <translation>Sind sie sicher, den Kontext %1 mit Inhalt zu löschen?</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="342"/> + <location filename="../ui/mainwin.cpp" line="350"/> <source>Context name</source> <translation>Kontextname</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="356"/> + <location filename="../ui/mainwin.cpp" line="364"/> <source>Current Voice number</source> <translation>Aktuelle Stimme</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="363"/> + <location filename="../ui/mainwin.cpp" line="371"/> <source>Voice name</source> <translation>Stimmbezeichnung</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="718"/> + <location filename="../ui/mainwin.cpp" line="727"/> <source>Voice stem direction</source> <translation>Halsrichtung der Stimme</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="684"/> + <location filename="../ui/mainwin.cpp" line="693"/> <source>Playable length</source> <translation>Notendauer</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="695"/> + <location filename="../ui/mainwin.cpp" line="704"/> <source>Note stem direction</source> <translation>Notenhalsrichtung</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="335"/> + <location filename="../ui/mainwin.cpp" line="343"/> <source>Sheet ToolBar</source> <translation>Seitenwerkzeuge</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="1399"/> + <location filename="../ui/mainwin.cpp" line="1422"/> <source>Cannot delete the last voice in the staff!</source> <translation>Die letzte Stimme des Systems kann nicht gelöscht werden.</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="405"/> + <location filename="../ui/mainwin.cpp" line="413"/> <source>Time Signature ToolBar</source> <translation>Taktmaßauswahl</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="410"/> + <location filename="../ui/mainwin.cpp" line="418"/> <source>Number of beats</source> <translation>Zahl der Taktschläge</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="417"/> + <location filename="../ui/mainwin.cpp" line="425"/> <source>Beat</source> <translation>Takt</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="255"/> + <location filename="../ui/mainwin.cpp" line="263"/> <source>Select Slur Type</source> <translation>Wähle Bogen</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="262"/> + <location filename="../ui/mainwin.cpp" line="270"/> <source>Treble Clef</source> <translation>Violinschlüssel</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="264"/> + <location filename="../ui/mainwin.cpp" line="272"/> <source>Bass Clef</source> <translation>Bassschlüssel</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="269"/> + <location filename="../ui/mainwin.cpp" line="277"/> <source>Alto Clef</source> <translation>Altschlüssel</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="257"/> + <location filename="../ui/mainwin.cpp" line="265"/> <source>Tie</source> <translation>Haltebogen</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="258"/> + <location filename="../ui/mainwin.cpp" line="266"/> <source>Slur</source> <translation>Legatobogen</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="259"/> + <location filename="../ui/mainwin.cpp" line="267"/> <source>Phrasing Slur</source> <translation>Phrasierungsbogen</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="283"/> + <location filename="../ui/mainwin.cpp" line="291"/> <source>Single Barline</source> <translation>einfacher Taktstrich</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="284"/> + <location filename="../ui/mainwin.cpp" line="292"/> <source>Double Barline</source> <translation>Doppeltaktstrich</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="285"/> + <location filename="../ui/mainwin.cpp" line="293"/> <source>End Barline</source> <translation>Schlußstrich</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="286"/> + <location filename="../ui/mainwin.cpp" line="294"/> <source>Dotted Barline</source> <translation>punktierter Taktstrich</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="287"/> + <location filename="../ui/mainwin.cpp" line="295"/> <source>Repeat Open</source> <translation>Wiederholungsanfang</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="288"/> + <location filename="../ui/mainwin.cpp" line="296"/> <source>Repeat Closed</source> <translation>Wiederholungsende</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="366"/> + <location filename="../ui/mainwin.cpp" line="374"/> <source>Voice Stems Neutral</source> <translation>In Stimme Halsrichtung neutral</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="367"/> + <location filename="../ui/mainwin.cpp" line="375"/> <source>Voice Stems Up</source> <translation>In Stimme Halsrichtung nach oben</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="368"/> + <location filename="../ui/mainwin.cpp" line="376"/> <source>Voice Stems Down</source> <translation>In Stimme Halsrichtung nach unten</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="384"/> + <location filename="../ui/mainwin.cpp" line="392"/> <source>Note Stem Neutral</source> <translation>Halsrichtung neutral</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="385"/> + <location filename="../ui/mainwin.cpp" line="393"/> <source>Note Stem Up</source> <translation>Halsrichtung nach oben</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="386"/> + <location filename="../ui/mainwin.cpp" line="394"/> <source>Note Stem Down</source> <translation>Halsrichtung nach unten</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="387"/> + <location filename="../ui/mainwin.cpp" line="395"/> <source>Note Stem Preferred</source> <translation>bevorzugte Halsrichtung</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="289"/> + <location filename="../ui/mainwin.cpp" line="297"/> <source>Repeat Closed-Open</source> <translation>Wiederholung Ende und Anfang</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="445"/> - <location filename="../ui/mainwin.cpp" line="463"/> + <location filename="../ui/mainwin.cpp" line="453"/> <location filename="../ui/mainwin.cpp" line="471"/> + <location filename="../ui/mainwin.cpp" line="479"/> <source>Tonic</source> <translation>Tonika</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="446"/> - <location filename="../ui/mainwin.cpp" line="464"/> - <location filename="../ui/mainwin.cpp" line="473"/> + <location filename="../ui/mainwin.cpp" line="454"/> + <location filename="../ui/mainwin.cpp" line="472"/> + <location filename="../ui/mainwin.cpp" line="481"/> <source>Subdominant</source> <translation>Subdominante</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="447"/> - <location filename="../ui/mainwin.cpp" line="465"/> - <location filename="../ui/mainwin.cpp" line="475"/> + <location filename="../ui/mainwin.cpp" line="455"/> + <location filename="../ui/mainwin.cpp" line="473"/> + <location filename="../ui/mainwin.cpp" line="483"/> <source>Dominant</source> <translation>Dominante</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="448"/> - <location filename="../ui/mainwin.cpp" line="476"/> + <location filename="../ui/mainwin.cpp" line="456"/> + <location filename="../ui/mainwin.cpp" line="484"/> <source>II</source> <translation>II</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="449"/> - <location filename="../ui/mainwin.cpp" line="477"/> + <location filename="../ui/mainwin.cpp" line="457"/> + <location filename="../ui/mainwin.cpp" line="485"/> <source>III</source> <translation>III</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="450"/> - <location filename="../ui/mainwin.cpp" line="478"/> + <location filename="../ui/mainwin.cpp" line="458"/> + <location filename="../ui/mainwin.cpp" line="486"/> <source>VI</source> <translation>VI</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="451"/> - <location filename="../ui/mainwin.cpp" line="479"/> + <location filename="../ui/mainwin.cpp" line="459"/> + <location filename="../ui/mainwin.cpp" line="487"/> <source>VII</source> <translation>VII</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="452"/> + <location filename="../ui/mainwin.cpp" line="460"/> <source>Cadenze</source> <translation>Kadenz</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="453"/> - <location filename="../ui/mainwin.cpp" line="466"/> - <location filename="../ui/mainwin.cpp" line="472"/> + <location filename="../ui/mainwin.cpp" line="461"/> + <location filename="../ui/mainwin.cpp" line="474"/> + <location filename="../ui/mainwin.cpp" line="480"/> <source>minor Tonic</source> <translation>Molltonika</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="454"/> - <location filename="../ui/mainwin.cpp" line="467"/> - <location filename="../ui/mainwin.cpp" line="474"/> + <location filename="../ui/mainwin.cpp" line="462"/> + <location filename="../ui/mainwin.cpp" line="475"/> + <location filename="../ui/mainwin.cpp" line="482"/> <source>minor Subdominant</source> <translation>Mollsubdominante</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="455"/> + <location filename="../ui/mainwin.cpp" line="463"/> <source>Napolitan</source> <translation>Neapolitaner</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="456"/> + <location filename="../ui/mainwin.cpp" line="464"/> <source>Phrygian</source> <translation>Phrygisch</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="457"/> + <location filename="../ui/mainwin.cpp" line="465"/> <source>Lydian</source> <translation>Lydisch</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="458"/> + <location filename="../ui/mainwin.cpp" line="466"/> <source>IV</source> <translation>IV</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="459"/> + <location filename="../ui/mainwin.cpp" line="467"/> <source>V</source> <translation>V</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="443"/> + <location filename="../ui/mainwin.cpp" line="451"/> <source>Select Function Name</source> <translation>Wähle Funktionsbezeichnung</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="461"/> + <location filename="../ui/mainwin.cpp" line="469"/> <source>Select Chord Area</source> <translation>Wähle Akkordbereich</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="469"/> + <location filename="../ui/mainwin.cpp" line="477"/> <source>Select Tonic Degree</source> <translation>Wähle Tonstufe</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="251"/> + <location filename="../ui/mainwin.cpp" line="259"/> <source>New Staff</source> <translation>Neues System</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="252"/> + <location filename="../ui/mainwin.cpp" line="260"/> <source>New Lyrics context</source> <translation>Neuer Textkontext</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="1807"/> - <location filename="../ui/mainwin.cpp" line="5410"/> + <location filename="../ui/mainwin.cpp" line="1809"/> + <location filename="../ui/mainwin.cpp" line="5572"/> <source>LyricsContext%1</source> <translation>Textkontext%1</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="345"/> + <location filename="../ui/mainwin.cpp" line="353"/> <source>Stanza number</source> <translation>Strophennummer</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="350"/> + <location filename="../ui/mainwin.cpp" line="358"/> <source>Associated voice</source> <translation>zugehörige Stimme</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="1357"/> + <location filename="../ui/mainwin.cpp" line="1380"/> <source>new sheet</source> <comment>undo</comment> <translation>Neues Blatt</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="1378"/> + <location filename="../ui/mainwin.cpp" line="1401"/> <source>new voice</source> <comment>undo</comment> <translation>Neue Stimme</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="1412"/> + <location filename="../ui/mainwin.cpp" line="1435"/> <source>voice removal</source> <comment>undo</comment> <translation>Stimme löschen</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="1440"/> + <location filename="../ui/mainwin.cpp" line="1463"/> <source>context removal</source> <comment>undo</comment> <translation>Kontext löschen</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="1786"/> + <location filename="../ui/mainwin.cpp" line="1788"/> <source>new staff</source> <comment>undo</comment> <translation>Neues System</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="1798"/> + <location filename="../ui/mainwin.cpp" line="1800"/> <source>new lyrics context</source> <comment>undo</comment> <translation>neuer Textkontext</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="2129"/> + <location filename="../ui/mainwin.cpp" line="2160"/> <source>insert barline</source> <comment>undo</comment> <translation>Taktlinie einfügen</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="2161"/> + <location filename="../ui/mainwin.cpp" line="2189"/> <source>rise note</source> <comment>undo</comment> <translation>Note erhöhen</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="2199"/> + <location filename="../ui/mainwin.cpp" line="2224"/> <source>lower note</source> <comment>undo</comment> <translation>Note erniedrigen</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="2244"/> + <location filename="../ui/mainwin.cpp" line="2293"/> <source>add sharp</source> <comment>undo</comment> <translation>Kreuz hinzufügen</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="2278"/> + <location filename="../ui/mainwin.cpp" line="2327"/> <source>add flat</source> <comment>undo</comment> <translation>B hinzufügen</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="2305"/> + <location filename="../ui/mainwin.cpp" line="2354"/> <source>set dotted</source> <comment>undo</comment> <translation>Punktieren</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="5138"/> + <location filename="../ui/mainwin.cpp" line="5295"/> <source>deletion of elements</source> <comment>undo</comment> <translation>Elemente löschen</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="2483"/> + <location filename="../ui/mainwin.cpp" line="2556"/> <source>insertion of music element</source> <comment>undo</comment> <translation>Noten und Pausen einfügen</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="3398"/> + <location filename="../ui/mainwin.cpp" line="3499"/> <source>change voice name</source> <comment>undo</comment> <translation>Stimmenamen ändern</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="3554"/> + <location filename="../ui/mainwin.cpp" line="3708"/> <source>lyrics edit</source> <comment>undo</comment> <translation>Text editieren</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="4016"/> + <location filename="../ui/mainwin.cpp" line="4153"/> <source>commit CanorusML source</source> <comment>undo</comment> <translation>CanorusML Daten übernehmen</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="4035"/> - <location filename="../ui/mainwin.cpp" line="4071"/> + <location filename="../ui/mainwin.cpp" line="4172"/> + <location filename="../ui/mainwin.cpp" line="4208"/> <source>commit LilyPond source</source> <comment>undo</comment> <translation>LilyPond Daten übernehmen</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="4192"/> + <location filename="../ui/mainwin.cpp" line="4346"/> <source>deletion of the sheet</source> <comment>undo</comment> <translation>Blatt löschen</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="4251"/> + <location filename="../ui/mainwin.cpp" line="4405"/> <source>change sheet name</source> <comment>undo</comment> <translation>Blattbezeichnung ändern</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="4271"/> + <location filename="../ui/mainwin.cpp" line="4425"/> <source>change context name</source> <comment>undo</comment> <translation>Kontextnamen ändern</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="4290"/> + <location filename="../ui/mainwin.cpp" line="4444"/> <source>change stanza number</source> <comment>undo</comment> <translation>Strophennummer ändern</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="4302"/> + <location filename="../ui/mainwin.cpp" line="4456"/> <source>change associated voice</source> <comment>undo</comment> <translation>zugehörige Stimme ändern</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="4313"/> + <location filename="../ui/mainwin.cpp" line="4467"/> <source>change voice stem direction</source> <comment>undo</comment> <translation>Halsrichtung in der Stimme ändern</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="4330"/> + <location filename="../ui/mainwin.cpp" line="4484"/> <source>change note stem direction</source> <comment>undo</comment> <translation>Notenhalsrichtung ändern</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="263"/> + <location filename="../ui/mainwin.cpp" line="271"/> <source>French Clef</source> <translation>französischer Violinschlüssel</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="265"/> + <location filename="../ui/mainwin.cpp" line="273"/> <source>Varbaritone Clef</source> <translation>Baritonschlüssel</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="266"/> + <location filename="../ui/mainwin.cpp" line="274"/> <source>Subbass Clef</source> <translation>Subbassschlüssel</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="267"/> + <location filename="../ui/mainwin.cpp" line="275"/> <source>Soprano Clef</source> <translation>Sopranschlüssel</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="268"/> + <location filename="../ui/mainwin.cpp" line="276"/> <source>Mezzosoprano Clef</source> <translation>Mezzosopranschlüssel</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="270"/> + <location filename="../ui/mainwin.cpp" line="278"/> <source>Tenor Clef</source> <translation>Tenorschlüssel</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="271"/> + <location filename="../ui/mainwin.cpp" line="279"/> <source>Baritone Clef</source> <translation>Baritonschlüssel</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="359"/> + <location filename="../ui/mainwin.cpp" line="367"/> <source>Voice instrument</source> <translation>Stimmeninstrument</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="419"/> + <location filename="../ui/mainwin.cpp" line="427"/> <source>Clef ToolBar</source> <translation>Schlüsselauswahl</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="426"/> + <location filename="../ui/mainwin.cpp" line="434"/> <source>Clef offset</source> <translation>Schlüsselverschiebung</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="606"/> + <location filename="../ui/mainwin.cpp" line="616"/> <source>Undo</source> <translation>Rückgängig</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="613"/> + <location filename="../ui/mainwin.cpp" line="623"/> <source>Redo</source> <translation>Wiederherstellen</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="3380"/> + <location filename="../ui/mainwin.cpp" line="3481"/> <source>change clef offset</source> <comment>undo</comment> <translation>Schlüsselverschiebung ändern</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="4955"/> + <location filename="../ui/mainwin.cpp" line="5112"/> <source>cut</source> <comment>undo</comment> <translation>Ausschneiden</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="5370"/> + <location filename="../ui/mainwin.cpp" line="5531"/> <source>paste</source> <comment>undo</comment> <translation>Einfügen</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="460"/> <location filename="../ui/mainwin.cpp" line="468"/> + <location filename="../ui/mainwin.cpp" line="476"/> <source>None</source> <translation>Keine</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="3685"/> + <location filename="../ui/mainwin.cpp" line="3818"/> <source>change function</source> <comment>undo</comment> <translation>Funktionsbeschreibung ändern</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="3708"/> + <location filename="../ui/mainwin.cpp" line="3841"/> <source>change chord area</source> <comment>undo</comment> <translation>Akkordbereich ändern</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="3731"/> + <location filename="../ui/mainwin.cpp" line="3864"/> <source>change tonic degree</source> <comment>undo</comment> <translation>Tonstufe ändern</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="3753"/> + <location filename="../ui/mainwin.cpp" line="3886"/> <source>set/unset ellipse</source> <comment>undo</comment> <translation>Ellipse ein/aus</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="290"/> + <location filename="../ui/mainwin.cpp" line="298"/> <source>Select Mark</source> <translation>Wähle Markierung</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="292"/> + <location filename="../ui/mainwin.cpp" line="300"/> <source>Tempo</source> <translation>Tempo</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="293"/> + <location filename="../ui/mainwin.cpp" line="301"/> <source>Ritardando</source> <translation>Ritardando</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="294"/> + <location filename="../ui/mainwin.cpp" line="302"/> <source>Accellerando</source> <translation></translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="295"/> + <location filename="../ui/mainwin.cpp" line="303"/> <source>Dynamic</source> <translation>Dynamik</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="296"/> + <location filename="../ui/mainwin.cpp" line="304"/> <source>Crescendo</source> <translation></translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="297"/> + <location filename="../ui/mainwin.cpp" line="305"/> <source>Decrescendo</source> <translation></translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="299"/> + <location filename="../ui/mainwin.cpp" line="307"/> <source>Arbitrary Text</source> <translation>Text</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="302"/> + <location filename="../ui/mainwin.cpp" line="310"/> <source>Bookmark</source> <translation>Lesezeichen</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="303"/> + <location filename="../ui/mainwin.cpp" line="311"/> <source>Rehersal Mark</source> <translation>Probezeichen</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="298"/> + <location filename="../ui/mainwin.cpp" line="306"/> <source>Fermata</source> <translation>Fermate</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="300"/> + <location filename="../ui/mainwin.cpp" line="308"/> <source>Repeat Mark</source> <translation>Wiederholungszeichen</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="305"/> - <location filename="../ui/mainwin.cpp" line="520"/> + <location filename="../ui/mainwin.cpp" line="313"/> + <location filename="../ui/mainwin.cpp" line="528"/> <source>Instrument Change</source> <translation>Instrumentenwechsel</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="304"/> + <location filename="../ui/mainwin.cpp" line="312"/> <source>Fingering</source> <translation>Fingersatz</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="253"/> + <location filename="../ui/mainwin.cpp" line="261"/> <source>New Figured Bass context</source> <translation>Neuer Generalbass-Context</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="306"/> + <location filename="../ui/mainwin.cpp" line="314"/> <source>Articulation Mark</source> <translation>Artikulierungszeichen</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="308"/> + <location filename="../ui/mainwin.cpp" line="316"/> <source>Accent</source> <translation>Akzent</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="309"/> + <location filename="../ui/mainwin.cpp" line="317"/> <source>Marcato</source> <translation></translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="310"/> + <location filename="../ui/mainwin.cpp" line="318"/> <source>Stacatissimo</source> <translation></translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="311"/> + <location filename="../ui/mainwin.cpp" line="319"/> <source>Espressivo</source> <translation></translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="312"/> + <location filename="../ui/mainwin.cpp" line="320"/> <source>Staccato</source> <translation></translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="313"/> + <location filename="../ui/mainwin.cpp" line="321"/> <source>Tenuto</source> <translation></translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="314"/> + <location filename="../ui/mainwin.cpp" line="322"/> <source>Portato</source> <translation></translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="315"/> + <location filename="../ui/mainwin.cpp" line="323"/> <source>UpBow</source> <translation>Aufstrich</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="316"/> + <location filename="../ui/mainwin.cpp" line="324"/> <source>DownBow</source> <translation>Abstrich</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="317"/> + <location filename="../ui/mainwin.cpp" line="325"/> <source>Flageloet</source> <translation></translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="318"/> + <location filename="../ui/mainwin.cpp" line="326"/> <source>Open</source> <translation>Offen</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="319"/> + <location filename="../ui/mainwin.cpp" line="327"/> <source>Stopped</source> <translation>abgebremst</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="320"/> + <location filename="../ui/mainwin.cpp" line="328"/> <source>Turn</source> <translation>Doppelschlag</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="321"/> + <location filename="../ui/mainwin.cpp" line="329"/> <source>ReverseTurn</source> <translation>umgekehrter Doppelschalg</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="322"/> + <location filename="../ui/mainwin.cpp" line="330"/> <source>Trill</source> <translation>Triller</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="323"/> + <location filename="../ui/mainwin.cpp" line="331"/> <source>Prall</source> <translation>Praller</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="324"/> + <location filename="../ui/mainwin.cpp" line="332"/> <source>Mordent</source> <translation></translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="325"/> + <location filename="../ui/mainwin.cpp" line="333"/> <source>Prall-Prall</source> <translation>Doppelpraller</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="326"/> + <location filename="../ui/mainwin.cpp" line="334"/> <source>Prall-Mordent</source> <translation>Prallmordent</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="327"/> + <location filename="../ui/mainwin.cpp" line="335"/> <source>Up-Prall</source> <translation></translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="328"/> + <location filename="../ui/mainwin.cpp" line="336"/> <source>Down-Prall</source> <translation></translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="329"/> + <location filename="../ui/mainwin.cpp" line="337"/> <source>Up-Mordent</source> <translation>Mordent aufwärts</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="330"/> + <location filename="../ui/mainwin.cpp" line="338"/> <source>Down-Mordent</source> <translation>Mordetnt abwärts</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="331"/> + <location filename="../ui/mainwin.cpp" line="339"/> <source>Prall-Down</source> <translation>Praller abwärts</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="332"/> + <location filename="../ui/mainwin.cpp" line="340"/> <source>Prall-Up</source> <translation>Praller aufwärts</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="333"/> + <location filename="../ui/mainwin.cpp" line="341"/> <source>Line-Prall</source> <translation></translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="428"/> + <location filename="../ui/mainwin.cpp" line="436"/> <source>Figured bass ToolBar</source> <translation>Generalbass Werkzeuge</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="429"/> + <location filename="../ui/mainwin.cpp" line="437"/> <source>Set/Unset Figured bass number</source> <translation>Setze/Rücksetze Generalbass-Zahl</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="434"/> + <location filename="../ui/mainwin.cpp" line="442"/> <source>Set/Unset Figured bass accidentals</source> <translation></translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="436"/> + <location filename="../ui/mainwin.cpp" line="444"/> <source>Double flat</source> <translation>Doppel-Be</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="437"/> + <location filename="../ui/mainwin.cpp" line="445"/> <source>Flat</source> <translation>Be</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="438"/> + <location filename="../ui/mainwin.cpp" line="446"/> <source>Neutral</source> <translation>Neutral</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="439"/> + <location filename="../ui/mainwin.cpp" line="447"/> <source>Sharp</source> <translation>Kreuz</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="440"/> + <location filename="../ui/mainwin.cpp" line="448"/> <source>Double sharp</source> <translation>Doppelkreuz</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="628"/> + <location filename="../ui/mainwin.cpp" line="637"/> <source>Insert context</source> <translation>Kontext einfügen</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="634"/> + <location filename="../ui/mainwin.cpp" line="643"/> <source>Insert slur</source> <translation>Bogen einfügen</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="638"/> + <location filename="../ui/mainwin.cpp" line="647"/> <source>Insert clef</source> <translation>Schlüssel einfügen</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="643"/> + <location filename="../ui/mainwin.cpp" line="652"/> <source>Insert time signature</source> <translation>Taktmaß einfügen</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="647"/> + <location filename="../ui/mainwin.cpp" line="656"/> <source>Insert barline</source> <translation>Taktstrich einfügen</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="651"/> + <location filename="../ui/mainwin.cpp" line="660"/> <source>Insert mark</source> - <translation>Markierung einfügen</translation> + <translation>Zeichen einfügen</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="655"/> + <location filename="../ui/mainwin.cpp" line="664"/> <source>Insert articulation mark</source> <translation>Artikulierungszeichen einfügen</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="484"/> + <location filename="../ui/mainwin.cpp" line="492"/> <source>Dynamic marks ToolBar</source> <translation>Auswahl Dynamikzeichen</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="485"/> + <location filename="../ui/mainwin.cpp" line="493"/> <source>Select Dynamic</source> <translation>Dynamikzeichen auswählen</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="487"/> + <location filename="../ui/mainwin.cpp" line="495"/> <source>Piano</source> <comment>dynamics</comment> <translation></translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="488"/> - <location filename="../ui/mainwin.cpp" line="489"/> - <location filename="../ui/mainwin.cpp" line="490"/> - <location filename="../ui/mainwin.cpp" line="491"/> + <location filename="../ui/mainwin.cpp" line="496"/> + <location filename="../ui/mainwin.cpp" line="497"/> + <location filename="../ui/mainwin.cpp" line="498"/> + <location filename="../ui/mainwin.cpp" line="499"/> <source>Pianissimo</source> <comment>dynamics</comment> <translation></translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="492"/> + <location filename="../ui/mainwin.cpp" line="500"/> <source>Forte</source> <comment>dynamics</comment> <translation></translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="493"/> - <location filename="../ui/mainwin.cpp" line="494"/> - <location filename="../ui/mainwin.cpp" line="495"/> - <location filename="../ui/mainwin.cpp" line="496"/> + <location filename="../ui/mainwin.cpp" line="501"/> + <location filename="../ui/mainwin.cpp" line="502"/> + <location filename="../ui/mainwin.cpp" line="503"/> + <location filename="../ui/mainwin.cpp" line="504"/> <source>Fortissimo</source> <comment>dynamics</comment> <translation></translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="497"/> + <location filename="../ui/mainwin.cpp" line="505"/> <source>Mezzo Forte</source> <comment>dynamics</comment> <translation></translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="498"/> + <location filename="../ui/mainwin.cpp" line="506"/> <source>Mezzo Piano</source> <comment>dynamics</comment> <translation></translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="499"/> + <location filename="../ui/mainwin.cpp" line="507"/> <source>Forte Piano</source> <comment>dynamics</comment> <translation></translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="500"/> + <location filename="../ui/mainwin.cpp" line="508"/> <source>Sforzando Forte</source> <comment>dynamics</comment> <translation></translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="501"/> + <location filename="../ui/mainwin.cpp" line="509"/> <source>Sforzando Piano</source> <comment>dynamics</comment> <translation></translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="502"/> + <location filename="../ui/mainwin.cpp" line="510"/> <source>Sforzando</source> <comment>dynamics</comment> <translation></translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="503"/> + <location filename="../ui/mainwin.cpp" line="511"/> <source>Rinforzando</source> <comment>dynamics</comment> <translation></translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="504"/> + <location filename="../ui/mainwin.cpp" line="512"/> <source>Sforzando Pianissimo</source> <comment>dynamics</comment> <translation></translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="505"/> + <location filename="../ui/mainwin.cpp" line="513"/> <source>Sforzando Fortissimo</source> <comment>dynamics</comment> <translation></translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="506"/> + <location filename="../ui/mainwin.cpp" line="514"/> <source>Custom</source> <comment>dynamics</comment> <translation>spezifisch</translation> </message> <message> - <location filename="../ui/mainwin.cpp" line="509"/> + <l... [truncated message content] |
From: <ma...@us...> - 2018-06-08 21:10:06
|
Revision: 1514 http://sourceforge.net/p/canorus/code/1514 Author: matevz Date: 2018-06-08 21:09:58 +0000 (Fri, 08 Jun 2018) Log Message: ----------- Show MIDI settings dialog on startup, if the number of MIDI devices changed from the previous session. Modified Paths: -------------- trunk/src/core/settings.cpp trunk/src/core/settings.h Modified: trunk/src/core/settings.cpp =================================================================== --- trunk/src/core/settings.cpp 2018-06-08 20:39:16 UTC (rev 1513) +++ trunk/src/core/settings.cpp 2018-06-08 21:09:58 UTC (rev 1514) @@ -44,6 +44,8 @@ const int CASettings::DEFAULT_MIDI_IN_PORT = -1; const int CASettings::DEFAULT_MIDI_OUT_PORT = -1; +const int CASettings::DEFAULT_MIDI_IN_NUM_DEVICES = 0; +const int CASettings::DEFAULT_MIDI_OUT_NUM_DEVICES = 0; const CATypesetter::CATypesetterType CASettings::DEFAULT_TYPESETTER = CATypesetter::LilyPond; #ifdef Q_OS_WIN @@ -156,6 +158,8 @@ #endif setValue( "rtmidi/midioutport", midiOutPort() ); setValue( "rtmidi/midiinport", midiInPort() ); + setValue( "rtmidi/midioutnumdevices", midiOutNumDevices() ); + setValue( "rtmidi/midiinnumdevices", midiInNumDevices() ); setValue( "printing/typesetter", typesetter() ); setValue( "printing/typesetterlocation", typesetterLocation() ); @@ -297,6 +301,19 @@ settingsPage = -1; } + if ( contains("rtmidi/midiinnumdevices") ) { +#ifndef SWIGCPP + if (value("rtmidi/midiinnumdevices").toInt() != CACanorus::midiDevice()->getInputPorts().count()) + settingsPage = -1; + setMidiInNumDevices( CACanorus::midiDevice()->getInputPorts().count() ); +#endif + } else { + setMidiInNumDevices( DEFAULT_MIDI_IN_NUM_DEVICES ); + settingsPage = -1; + } + + + if ( contains("rtmidi/midioutport") #ifndef SWIGCPP && value("rtmidi/midioutport").toInt() < CACanorus::midiDevice()->getOutputPorts().count() @@ -308,6 +325,17 @@ settingsPage = -1; } + if ( contains("rtmidi/midioutnumdevices") ) { +#ifndef SWIGCPP + if (value("rtmidi/midioutnumdevices").toInt() != CACanorus::midiDevice()->getOutputPorts().count()) + settingsPage = -1; + setMidiOutNumDevices( CACanorus::midiDevice()->getOutputPorts().count() ); +#endif + } else { + setMidiOutNumDevices( DEFAULT_MIDI_OUT_NUM_DEVICES ); + settingsPage = -1; + } + // Printing settings if ( contains("printing/typesetter") ) setTypesetter( static_cast<CATypesetter::CATypesetterType>(value("printing/typesetter").toInt()) ); Modified: trunk/src/core/settings.h =================================================================== --- trunk/src/core/settings.h 2018-06-08 20:39:16 UTC (rev 1513) +++ trunk/src/core/settings.h 2018-06-08 21:09:58 UTC (rev 1514) @@ -113,9 +113,15 @@ inline int midiInPort() { return _midiInPort; } void setMidiInPort( int in ); static const int DEFAULT_MIDI_IN_PORT; + inline int midiInNumDevices() { return _midiInNumDevices; } + void setMidiInNumDevices( int inNum ) { _midiInNumDevices = inNum; } + static const int DEFAULT_MIDI_IN_NUM_DEVICES; inline int midiOutPort() { return _midiOutPort; } inline void setMidiOutPort( int out ) { _midiOutPort = out; } static const int DEFAULT_MIDI_OUT_PORT; + inline int midiOutNumDevices() { return _midiOutNumDevices; } + void setMidiOutNumDevices( int outNum ) { _midiOutNumDevices = outNum; } + static const int DEFAULT_MIDI_OUT_NUM_DEVICES; /////////////////////// // Printing settings // @@ -204,6 +210,8 @@ /////////////////////// int _midiOutPort; // -1 disabled, 0+ port number int _midiInPort; // -1 disabled, 0+ port number + int _midiOutNumDevices; // last number of MIDI out ports + int _midiInNumDevices; // last number of MIDI in ports /////////////////////// // Printing settings // This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ma...@us...> - 2018-06-08 20:39:23
|
Revision: 1513 http://sourceforge.net/p/canorus/code/1513 Author: matevz Date: 2018-06-08 20:39:16 +0000 (Fri, 08 Jun 2018) Log Message: ----------- Fixed Swig ADD_SWIG_MODULE obsolete warning in cmake. Removed some swig debugging output when running cmake. Modified Paths: -------------- trunk/src/CMakeLists.txt Modified: trunk/src/CMakeLists.txt =================================================================== --- trunk/src/CMakeLists.txt 2018-06-08 20:28:18 UTC (rev 1512) +++ trunk/src/CMakeLists.txt 2018-06-08 20:39:16 UTC (rev 1513) @@ -38,16 +38,15 @@ ####################### # The following lines detect scripting environments (SWIG, Ruby, Python etc.) FIND_PACKAGE(SWIG 3.0.8 QUIET) -MESSAGE("Swig version ${SWIG_VERSION}") IF(SWIG_FOUND AND NOT NO_SWIG) SET(USE_SWIG True) - MESSAGE("SWIG found, using scripting extensions.") + MESSAGE("SWIG version ${SWIG_VERSION} found, using scripting extensions.") ELSE(SWIG_FOUND AND NOT NO_SWIG) # Try again with version 2 FIND_PACKAGE(SWIG 2.0.12 QUIET) IF(SWIG_FOUND AND NOT NO_SWIG) SET(USE_SWIG True) - MESSAGE("SWIG found, using scripting extensions.") + MESSAGE("SWIG version ${SWIG_VERSION} found, using scripting extensions.") ELSE(SWIG_FOUND AND NOT NO_SWIG) MESSAGE("SWIG version >=2.0.12 or >= 3.0.3 *not* found, version is ${SWIG_VERSION}, disabling SWIG!") SET(NO_RUBY True) @@ -604,9 +603,9 @@ SET(CANORUS_RUBY_WRAP_CXX ${CMAKE_CURRENT_SOURCE_DIR}/canorusrubyRUBY_wrap.cxx) SET_SOURCE_FILES_PROPERTIES(${CANORUS_RUBY_WRAP_CXX} PROPERTIES GENERATED TRUE) - SWIG_ADD_MODULE(CanorusRuby ruby - ${Canorus_Swig_Srcs} - ${CMAKE_CURRENT_SOURCE_DIR}/scripting/canorusruby.i + SWIG_ADD_LIBRARY(CanorusRuby + LANGUAGE ruby + SOURCES ${Canorus_Swig_Srcs} ${CMAKE_CURRENT_SOURCE_DIR}/scripting/canorusruby.i ) SWIG_LINK_LIBRARIES(CanorusRuby ${RUBY_LIBRARY} Qt5::Widgets Qt5::Core Qt5::Gui Qt5::Svg Qt5::Xml Qt5::PrintSupport) SET_TARGET_PROPERTIES( ${SWIG_MODULE_CanorusRuby_REAL_NAME} PROPERTIES COMPILE_FLAGS "-DSWIGCPP" ) @@ -619,9 +618,9 @@ SET(CANORUS_PYTHON_WRAP_CXX ${CMAKE_CURRENT_SOURCE_DIR}/canoruspythonPYTHON_wrap.cxx) SET_SOURCE_FILES_PROPERTIES(${CANORUS_PYTHON_WRAP_CXX} PROPERTIES GENERATED TRUE) - SWIG_ADD_MODULE(CanorusPython python # Warning! CMake renames CanorusPython automatically to _CanorusPython - ${Canorus_Swig_Srcs} - ${CMAKE_CURRENT_SOURCE_DIR}/scripting/canoruspython.i + SWIG_ADD_LIBRARY(CanorusPython + LANGUAGE python + SOURCES ${Canorus_Swig_Srcs} ${CMAKE_CURRENT_SOURCE_DIR}/scripting/canoruspython.i ) SWIG_LINK_LIBRARIES(CanorusPython ${PYTHON_LIBRARY} Qt5::Widgets Qt5::Core Qt5::Gui Qt5::Svg Qt5::Xml Qt5::PrintSupport) SET_TARGET_PROPERTIES( ${SWIG_MODULE_CanorusPython_REAL_NAME} PROPERTIES COMPILE_FLAGS "-DSWIGCPP" ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ma...@us...> - 2018-06-08 20:28:35
|
Revision: 1512 http://sourceforge.net/p/canorus/code/1512 Author: matevz Date: 2018-06-08 20:28:18 +0000 (Fri, 08 Jun 2018) Log Message: ----------- Fixed deletion of .ts files when calling make clean. FIxed installation of .qm files. Removed some debugging messages during cmake. Modified Paths: -------------- trunk/src/CMakeLists.txt Modified: trunk/src/CMakeLists.txt =================================================================== --- trunk/src/CMakeLists.txt 2018-06-08 20:25:59 UTC (rev 1511) +++ trunk/src/CMakeLists.txt 2018-06-08 20:28:18 UTC (rev 1512) @@ -492,8 +492,6 @@ # Set translation files FILE(GLOB Canorus_Translation_Srcs "lang/*.ts") # lang/*.ts -> Canorus_Translation_Srcs -#STRING(REGEX REPLACE "\\.ts" ".qm" Canorus_Translation_Bins "${Canorus_Translation_Srcs}") # Set Canorus_Translation_Bins to same values as Canorus_Translation_Srcs with different extensions -FILE(GLOB Canorus_Translation_Bins ${CMAKE_BINARY_DIR}"/*.qm") # lang/*.ts -> Canorus_Translation_Srcs SET(Canorus_Fonts # Music fonts needed by Canorus fonts/CenturySchL-BoldItal.ttf # Century family needed for numbers and signs @@ -715,19 +713,23 @@ ############### # Translation # ############### -qt5_create_translation(CANORUS_QM_FILES ${Canorus_UIC_Srcs} ${Canorus_Srcs} ${Canorus_Translation_Srcs} lang/template.ts) -# Workaround for issue of duplicate ts files getting generated -# Please write on the Canorus Dev List for a better -SET(TSFOLDER ${CMAKE_SOURCE_DIR}/src/lang) -FILE(REMOVE ${TSFOLDER}/*_*.ts) -qt5_add_translation(CANORUS_QM_FILES ${Canorus_Translation_Srcs} ) -ADD_CUSTOM_TARGET(canorus_qm DEPENDS ${CANORUS_QM_FILES}) +# Do not use qt5_create_translation since make clean will delete all previous +# .ts files. Use custom command instead: +#qt5_create_translation(Canorus_Translation_Bins ${Canorus_UIC_Srcs} ${Canorus_Srcs} lang/template.ts) +ADD_CUSTOM_COMMAND( + TARGET canorus + PRE_BUILD + COMMAND ${Qt5_LUPDATE_EXECUTABLE} + ARGS -noobsolete ${Canorus_UIC_Srcs} ${Canorus_Srcs} -ts ${Canorus_Translation_Srcs} lang/template.ts +) +qt5_add_translation(Canorus_Translation_Bins ${Canorus_Translation_Srcs}) + +ADD_CUSTOM_TARGET(canorus_qm DEPENDS ${Canorus_Translation_Bins}) ADD_DEPENDENCIES(canorus canorus_qm) ############### # Dev Install # ############### -message("CANORUS_DEV_INSTALL " ${CANORUS_DEV_INSTALL} " CANORUS_INSTALL_PREFIX " ${CANORUS_INSTALL_PREFIX}) IF(${CANORUS_DEV_INSTALL} MATCHES True) ADD_CUSTOM_COMMAND( TARGET canorus This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ma...@us...> - 2018-06-08 20:26:03
|
Revision: 1511 http://sourceforge.net/p/canorus/code/1511 Author: matevz Date: 2018-06-08 20:25:59 +0000 (Fri, 08 Jun 2018) Log Message: ----------- Added hint at the beggining of CMakeLists.txt how to configure Canorus in debug mode from CLI. Modified Paths: -------------- trunk/CMakeLists.txt Modified: trunk/CMakeLists.txt =================================================================== --- trunk/CMakeLists.txt 2018-06-08 19:57:15 UTC (rev 1510) +++ trunk/CMakeLists.txt 2018-06-08 20:25:59 UTC (rev 1511) @@ -5,6 +5,7 @@ # Assume that Debug build is only done by developers -> install in build folder # However be aware that this only works in a separate build folder! +#SET(CMAKE_BUILD_TYPE "Debug") IF("${CMAKE_BUILD_TYPE}" MATCHES "Debug") SET(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/install) SET(CANORUS_DEV_INSTALL True) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <its...@us...> - 2018-06-08 19:57:18
|
Revision: 1510 http://sourceforge.net/p/canorus/code/1510 Author: itsgeorg Date: 2018-06-08 19:57:15 +0000 (Fri, 08 Jun 2018) Log Message: ----------- Volta hack description removed. Modified Paths: -------------- trunk/src/export/lilypondexport.cpp Modified: trunk/src/export/lilypondexport.cpp =================================================================== --- trunk/src/export/lilypondexport.cpp 2018-06-08 17:34:40 UTC (rev 1509) +++ trunk/src/export/lilypondexport.cpp 2018-06-08 19:57:15 UTC (rev 1510) @@ -800,9 +800,10 @@ writeDocumentHeader(); - // Write the volta helper function in case we need it + /* Write the volta helper function in case we need it if (!_voltaFunctionWritten) voltaFunction(); + */ // Export voices as Lilypond variables: \StaffOneVoiceOne = \relative c { ... } for ( int c = 0; c < sheet->contextList().size(); ++c ) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ma...@us...> - 2018-06-08 17:34:45
|
Revision: 1509 http://sourceforge.net/p/canorus/code/1509 Author: matevz Date: 2018-06-08 17:34:40 +0000 (Fri, 08 Jun 2018) Log Message: ----------- Added missing jumptoview resources to CMakeLists.txt. Modified Paths: -------------- trunk/src/CMakeLists.txt Modified: trunk/src/CMakeLists.txt =================================================================== --- trunk/src/CMakeLists.txt 2018-06-08 13:43:35 UTC (rev 1508) +++ trunk/src/CMakeLists.txt 2018-06-08 17:34:40 UTC (rev 1509) @@ -138,6 +138,7 @@ ui/midirecorder.ui ui/transposeview.ui + ui/jumptoview.ui ) # Define the MOC source files used by Canorus @@ -150,6 +151,7 @@ ui/settingsdialog.h ui/propertiesdialog.h ui/transposeview.h + ui/jumptoview.h ui/singleaction.h widgets/lcdnumber.h @@ -324,6 +326,7 @@ ui/settingsdialog.cpp ui/propertiesdialog.cpp ui/transposeview.cpp + ui/jumptoview.cpp ui/singleaction.cpp ui/actionstorage.cpp This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ma...@us...> - 2018-06-08 13:43:43
|
Revision: 1508 http://sourceforge.net/p/canorus/code/1508 Author: matevz Date: 2018-06-08 13:43:35 +0000 (Fri, 08 Jun 2018) Log Message: ----------- Forgot to update actionstorage.cpp for feature #24. Modified Paths: -------------- trunk/src/ui/actionstorage.cpp Modified: trunk/src/ui/actionstorage.cpp =================================================================== --- trunk/src/ui/actionstorage.cpp 2018-06-08 12:18:53 UTC (rev 1507) +++ trunk/src/ui/actionstorage.cpp 2018-06-08 13:43:35 UTC (rev 1508) @@ -45,7 +45,7 @@ storeAction(mainWin.uiSelectAll); storeAction(mainWin.uiInvertSelection); storeAction(mainWin.uiZoomToWidth); - storeAction(mainWin.uiGotoBar); + storeAction(mainWin.uiJumpTo); storeAction(mainWin.uiShowStatusBar); storeAction(mainWin.uiFullscreen); storeAction(mainWin.uiInsertTimeSig); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ma...@us...> - 2018-06-08 12:19:17
|
Revision: 1507 http://sourceforge.net/p/canorus/code/1507 Author: matevz Date: 2018-06-08 12:18:53 +0000 (Fri, 08 Jun 2018) Log Message: ----------- Fixed wrong debugging output for Volta repeat marks. Modified Paths: -------------- trunk/src/layout/drawablemark.cpp Modified: trunk/src/layout/drawablemark.cpp =================================================================== --- trunk/src/layout/drawablemark.cpp 2018-06-08 12:06:02 UTC (rev 1506) +++ trunk/src/layout/drawablemark.cpp 2018-06-08 12:18:53 UTC (rev 1507) @@ -291,7 +291,7 @@ case CARepeatMark::DalCoda: p->drawText( s.x, s.y, QString(CACanorus::fetaCodepoint("scripts.coda")) ); break; case CARepeatMark::VarCoda: case CARepeatMark::DalVarCoda: p->drawText( s.x, s.y, QString(CACanorus::fetaCodepoint("scripts.varcoda")) ); break; - case CARepeatMark::Volta: + case CARepeatMark::Volta: break; case CARepeatMark::Undefined: fprintf(stderr,"Warning: CADrawableMark::draw - Unhandled RM-Type %d",static_cast<CARepeatMark*>(mark())->repeatMarkType()); break; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ma...@us...> - 2018-06-08 12:06:17
|
Revision: 1506 http://sourceforge.net/p/canorus/code/1506 Author: matevz Date: 2018-06-08 12:06:02 +0000 (Fri, 08 Jun 2018) Log Message: ----------- Fixed feature #32 replace repeat mark icon by volta. Modified Paths: -------------- trunk/src/core/muselementfactory.cpp trunk/src/ui/mainwin.cpp Modified: trunk/src/core/muselementfactory.cpp =================================================================== --- trunk/src/core/muselementfactory.cpp 2018-06-08 11:56:59 UTC (rev 1505) +++ trunk/src/core/muselementfactory.cpp 2018-06-08 12:06:02 UTC (rev 1506) @@ -97,7 +97,7 @@ _crescendoFinalVolume = 50; _crescendoType = CACrescendo::Crescendo; - _repeatMarkType = CARepeatMark::Segno; + _repeatMarkType = CARepeatMark::Volta; _repeatMarkVoltaNumber = 1; _fingeringFinger = CAFingering::First; Modified: trunk/src/ui/mainwin.cpp =================================================================== --- trunk/src/ui/mainwin.cpp 2018-06-08 11:56:59 UTC (rev 1505) +++ trunk/src/ui/mainwin.cpp 2018-06-08 12:06:02 UTC (rev 1506) @@ -305,7 +305,7 @@ uiMarkType->addButton( QIcon("images:mark/dynamic/decrescendo.svg"), CAMark::Crescendo*(-1), tr("Decrescendo") ); uiMarkType->addButton( QIcon("images:mark/fermata/normal.svg"), CAMark::Fermata, tr("Fermata") ); uiMarkType->addButton( QIcon("images:mark/text.svg"), CAMark::Text, tr("Arbitrary Text") ); - uiMarkType->addButton( QIcon("images:mark/repeatmark/coda.svg"), CAMark::RepeatMark, tr("Repeat Mark") ); + uiMarkType->addButton( QIcon("images:mark/repeatmark/volta1.svg"), CAMark::RepeatMark, tr("Repeat Mark") ); uiMarkType->addButton( QIcon("images:mark/pedal.svg"), CAMark::Pedal, tr("Pedal Mark") ); uiMarkType->addButton( QIcon("images:mark/bookmark.svg"), CAMark::BookMark, tr("Bookmark") ); uiMarkType->addButton( QIcon("images:mark/rehersalmark.svg"), CAMark::RehersalMark, tr("Rehersal Mark") ); @@ -554,6 +554,9 @@ uiRepeatMarkToolBar = new QToolBar( tr("Repeat Mark ToolBar"), this ); uiRepeatMarkType = new CAMenuToolButton( tr("Repeat Mark Type"), 3, this ); uiRepeatMarkType->setObjectName("uiRepeatMarkType"); + uiRepeatMarkType->addButton( QIcon("images:mark/repeatmark/volta1.svg"), -2, tr("Volta 1st", "repeat mark") ); // -1 can't be used?! + uiRepeatMarkType->addButton( QIcon("images:mark/repeatmark/volta2.svg"), -3, tr("Volta 2nd", "repeat mark") ); + uiRepeatMarkType->addButton( QIcon("images:mark/repeatmark/volta3.svg"), -4, tr("Volta 3rd", "repeat mark") ); uiRepeatMarkType->addButton( QIcon("images:mark/repeatmark/segno.svg"), CARepeatMark::Segno, tr("Segno", "repeat mark") ); uiRepeatMarkType->addButton( QIcon("images:mark/repeatmark/coda.svg"), CARepeatMark::Coda, tr("Coda", "repeat mark") ); uiRepeatMarkType->addButton( QIcon("images:mark/repeatmark/varcoda.svg"), CARepeatMark::VarCoda, tr("VarCoda", "repeat mark") ); @@ -560,9 +563,6 @@ uiRepeatMarkType->addButton( QIcon("images:mark/repeatmark/dalsegno.svg"), CARepeatMark::DalSegno, tr("Dal Segno", "repeat mark") ); uiRepeatMarkType->addButton( QIcon("images:mark/repeatmark/dalcoda.svg"), CARepeatMark::DalCoda, tr("Dal Coda", "repeat mark") ); uiRepeatMarkType->addButton( QIcon("images:mark/repeatmark/dalvarcoda.svg"), CARepeatMark::DalVarCoda, tr("Dal VarCoda", "repeat mark") ); - uiRepeatMarkType->addButton( QIcon("images:mark/repeatmark/volta1.svg"), -2, tr("Volta 1st", "repeat mark") ); // -1 can't be used?! - uiRepeatMarkType->addButton( QIcon("images:mark/repeatmark/volta2.svg"), -3, tr("Volta 2nd", "repeat mark") ); - uiRepeatMarkType->addButton( QIcon("images:mark/repeatmark/volta3.svg"), -4, tr("Volta 3rd", "repeat mark") ); uiFingeringToolBar = new QToolBar( tr("Fingering ToolBar"), this ); uiFinger = new CAMenuToolButton( tr("Finger"), 5, this ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ma...@us...> - 2018-06-08 11:57:20
|
Revision: 1505 http://sourceforge.net/p/canorus/code/1505 Author: matevz Date: 2018-06-08 11:56:59 +0000 (Fri, 08 Jun 2018) Log Message: ----------- Implemented feature #24 Go to bar. Refactoring in the bar numbering computation for drawing scoreview ruler. Modified Paths: -------------- trunk/src/ui/mainwin.cpp trunk/src/ui/mainwin.h trunk/src/ui/mainwin.ui trunk/src/widgets/scoreview.cpp trunk/src/widgets/scoreview.h Added Paths: ----------- trunk/src/ui/jumptoview.cpp trunk/src/ui/jumptoview.h trunk/src/ui/jumptoview.ui Added: trunk/src/ui/jumptoview.cpp =================================================================== --- trunk/src/ui/jumptoview.cpp (rev 0) +++ trunk/src/ui/jumptoview.cpp 2018-06-08 11:56:59 UTC (rev 1505) @@ -0,0 +1,54 @@ +/*! + Copyright (c) 2018, Matevž Jekovec, Canorus development team + All Rights Reserved. See AUTHORS for a complete list of authors. + + Licensed under the GNU GENERAL PUBLIC LICENSE. See COPYING for details. +*/ + +#include "ui/jumptoview.h" +#include "ui/mainwin.h" +#include "widgets/scoreview.h" + +#include "layout/drawablebarline.h" + +CAJumpToView::CAJumpToView( CAMainWin *p ) +: QDialog( p ) { + setupUi( this ); + setupCustomUi(); +} + +CAJumpToView::~CAJumpToView() { +} + +void CAJumpToView::setupCustomUi() { +} + +void CAJumpToView::show() { +// CAScoreView *v = static_cast<CAMainWin*>(parent())->currentScoreView(); + +// QDockWidget::show(); + QDialog::show(); +} + +void CAJumpToView::accept() { + int barNumber = uiJumpToBarNum->text().toInt(); + + if ( dynamic_cast<CAMainWin*>(parent()) && + static_cast<CAMainWin*>(parent())->currentScoreView() ) { + CAScoreView *v = static_cast<CAMainWin*>(parent())->currentScoreView(); + QMap<int, CADrawableBarline*> dBarlineMap = v->computeBarlinePositions(); + + if (!dBarlineMap.isEmpty()) { + // if barNumber is outside barlines enumeration, take the first/last barline available + if (barNumber < dBarlineMap.firstKey() || barNumber >= dBarlineMap.lastKey()) { + return; + } + + // shift the view + v->setWorldX(dBarlineMap[barNumber]->xPos() - v->worldWidth()/2.0); + v->repaint(); + + QDialog::accept(); + } + } +} Added: trunk/src/ui/jumptoview.h =================================================================== --- trunk/src/ui/jumptoview.h (rev 0) +++ trunk/src/ui/jumptoview.h 2018-06-08 11:56:59 UTC (rev 1505) @@ -0,0 +1,31 @@ +/*! + Copyright (c) 2018, Matevž Jekovec, Canorus development team + All Rights Reserved. See AUTHORS for a complete list of authors. + + Licensed under the GNU GENERAL PUBLIC LICENSE. See COPYING for details. +*/ + +#ifndef JUMPTOVIEW_H_ +#define JUMPTOVIEW_H_ + +#include <QDialog> + +#include "ui_jumptoview.h" + +class CAMainWin; + +class CAJumpToView : public QDialog, private Ui::uiJumpToView { + Q_OBJECT +public: + CAJumpToView( CAMainWin *parent ); + virtual ~CAJumpToView(); + +public slots: + void show(); + void accept(); + +private: + void setupCustomUi(); +}; + +#endif /* JUMPTOVIEW_H_ */ Added: trunk/src/ui/jumptoview.ui =================================================================== --- trunk/src/ui/jumptoview.ui (rev 0) +++ trunk/src/ui/jumptoview.ui 2018-06-08 11:56:59 UTC (rev 1505) @@ -0,0 +1,91 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>uiJumpToView</class> + <widget class="QDialog" name="uiJumpToView"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>211</width> + <height>106</height> + </rect> + </property> + <property name="windowTitle"> + <string>Jump to...</string> + </property> + <layout class="QVBoxLayout" name="verticalLayout"> + <item> + <layout class="QHBoxLayout" name="horizontalLayout"> + <item> + <widget class="QLabel" name="label"> + <property name="text"> + <string>Jump to bar:</string> + </property> + </widget> + </item> + <item> + <widget class="QLineEdit" name="uiJumpToBarNum"/> + </item> + </layout> + </item> + <item> + <spacer name="verticalSpacer"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>40</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QDialogButtonBox" name="buttonBox"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="standardButtons"> + <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set> + </property> + </widget> + </item> + </layout> + </widget> + <resources/> + <connections> + <connection> + <sender>buttonBox</sender> + <signal>accepted()</signal> + <receiver>uiJumpToView</receiver> + <slot>accept()</slot> + <hints> + <hint type="sourcelabel"> + <x>248</x> + <y>254</y> + </hint> + <hint type="destinationlabel"> + <x>157</x> + <y>274</y> + </hint> + </hints> + </connection> + <connection> + <sender>buttonBox</sender> + <signal>rejected()</signal> + <receiver>uiJumpToView</receiver> + <slot>reject()</slot> + <hints> + <hint type="sourcelabel"> + <x>316</x> + <y>260</y> + </hint> + <hint type="destinationlabel"> + <x>286</x> + <y>274</y> + </hint> + </hints> + </connection> + </connections> +</ui> Modified: trunk/src/ui/mainwin.cpp =================================================================== --- trunk/src/ui/mainwin.cpp 2018-06-08 11:43:24 UTC (rev 1504) +++ trunk/src/ui/mainwin.cpp 2018-06-08 11:56:59 UTC (rev 1505) @@ -32,6 +32,7 @@ #include "ui/settingsdialog.h" #include "ui/propertiesdialog.h" #include "ui/transposeview.h" +#include "ui/jumptoview.h" #include "ui/actionstorage.h" #include "scoreui/keysignatureui.h" @@ -185,15 +186,18 @@ _resourceView = new CAResourceView( nullptr, nullptr ); _resourceView->hide(); - _midiRecorderView = nullptr; + // Tools + _midiRecorderView = nullptr; _transposeView = new CATransposeView( this ); addDockWidget( Qt::RightDockWidgetArea, _transposeView ); _transposeView->hide(); + _jumpToView = new CAJumpToView( this ); + _permanentStatusBar = statusBar(); - setDocument( nullptr ); + setDocument( nullptr ); _poExp = nullptr; CACanorus::addMainWin( this ); } @@ -4286,6 +4290,12 @@ } } +void CAMainWin::on_uiJumpTo_triggered() { + if (document() && currentSheet()) { + _jumpToView->show(); + } +} + void CAMainWin::on_uiLilyPondSource_triggered() { CAContext *context = currentContext(); if ( !context ) Modified: trunk/src/ui/mainwin.h =================================================================== --- trunk/src/ui/mainwin.h 2018-06-08 11:43:24 UTC (rev 1504) +++ trunk/src/ui/mainwin.h 2018-06-08 11:56:59 UTC (rev 1505) @@ -58,6 +58,7 @@ class CAPreviewCtl; class CAPyConsole; class CATransposeView; +class CAJumpToView; class CAMidiRecorderView; class CAKeybdInput; class CAExport; @@ -275,6 +276,7 @@ // Tools void on_uiSettings_triggered(); void on_uiTranspose_triggered(); + void on_uiJumpTo_triggered(); void on_uiMidiRecorder_triggered(); // Voice @@ -346,6 +348,7 @@ CAExport *_poExp; // abstract export instance CAResourceView *_resourceView; CATransposeView *_transposeView; + CAJumpToView *_jumpToView; CAMidiRecorderView *_midiRecorderView; QStatusBar *_permanentStatusBar; Modified: trunk/src/ui/mainwin.ui =================================================================== --- trunk/src/ui/mainwin.ui 2018-06-08 11:43:24 UTC (rev 1504) +++ trunk/src/ui/mainwin.ui 2018-06-08 11:56:59 UTC (rev 1505) @@ -23,9 +23,18 @@ </property> <widget class="QWidget" name="uiCentralWidget"> <layout class="QGridLayout"> - <property name="margin"> + <property name="leftMargin"> <number>6</number> </property> + <property name="topMargin"> + <number>6</number> + </property> + <property name="rightMargin"> + <number>6</number> + </property> + <property name="bottomMargin"> + <number>6</number> + </property> <property name="spacing"> <number>4</number> </property> @@ -53,7 +62,7 @@ <x>0</x> <y>0</y> <width>905</width> - <height>26</height> + <height>30</height> </rect> </property> <widget class="QMenu" name="uiMenuEdit"> @@ -74,7 +83,7 @@ <property name="title"> <string>&Tools</string> </property> - <addaction name="uiGotoBar"/> + <addaction name="uiJumpTo"/> <addaction name="uiTranspose"/> <addaction name="uiNoteCount"/> <addaction name="uiMidiRecorder"/> @@ -436,15 +445,12 @@ <string>Fit to &width</string> </property> </action> - <action name="uiGotoBar"> - <property name="enabled"> - <bool>false</bool> - </property> + <action name="uiJumpTo"> <property name="text"> <string>&Goto bar...</string> </property> <property name="shortcut"> - <string>Ctrl+G</string> + <string>Ctrl+J</string> </property> </action> <action name="uiShowStatusBar"> @@ -937,7 +943,7 @@ </action> <action name="actionRecent_documents"> <property name="text"> - <string>recent documents dummy</string> + <string>&recent documents dummy</string> </property> </action> <action name="uiMidiRecorder"> Modified: trunk/src/widgets/scoreview.cpp =================================================================== --- trunk/src/widgets/scoreview.cpp 2018-06-08 11:43:24 UTC (rev 1504) +++ trunk/src/widgets/scoreview.cpp 2018-06-08 11:56:59 UTC (rev 1505) @@ -504,6 +504,58 @@ } /*! + Creates a map of a bar number -> drawable barline in the score of a staff + with most barlines and enumerates them. + + This function is usually called when drawing a ruler or jumping to specific bar. + + \param dotted Also include dotted barlines in the list (which are usually ignored in the bar count) + \return Map of bar number -> drawable barline of the staff with most barlines +*/ +QMap<int, CADrawableBarline*> CAScoreView::computeBarlinePositions(bool dotted) { + QList<CADrawableContext*> dContextList = _drawableCList.list(); + QMap<int, CADrawableBarline*> result; + + // determine staff with most barlines + CADrawableStaff *dStaff = 0; + for (int i=0; i<dContextList.size(); i++) { + if ((dContextList[i]->drawableContextType()==CADrawableContext::DrawableStaff) && + (!dStaff || dStaff->drawableBarlineList().size()<static_cast<CADrawableStaff*>(dContextList[i])->drawableBarlineList().size())) { + dStaff = static_cast<CADrawableStaff*>(dContextList[i]); + } + } + + QList<CADrawableBarline *> drawableBarlineList = dStaff->drawableBarlineList(); + + // remove dotted barlines, if dotted=false + if (!dotted) { + for (int i=0; i<drawableBarlineList.size(); i++) { // filter out dotted barlines + if (drawableBarlineList[i]->barline()->barlineType()==CABarline::Dotted) { + drawableBarlineList.removeAt(i); + i--; + } + } + } + + if(dStaff && !drawableBarlineList.isEmpty()) + { + // determine the bar number + do we have a pickup measure in the beginning + CADrawableTimeSignature *firstDTimeSig = (dStaff->drawableTimeSignatureList().size()?dStaff->drawableTimeSignatureList()[0]:0); + int barlineOffset = 2; + if (firstDTimeSig && + drawableBarlineList[0]->barline()->timeStart() < firstDTimeSig->timeSignature()->barDuration() ) { + barlineOffset = 1; + } + + for (int i=0; i<drawableBarlineList.size(); i++) { + result[i+barlineOffset] = drawableBarlineList[i]; + } + } + + return result; +} + +/*! If the given coordinates hit any of the contexts, returns that context. */ CAContext *CAScoreView::contextCollision(double x, double y) { @@ -976,56 +1028,31 @@ if (CACanorus::settings()->showRuler()) { p.fillRect(0, 0, width(), RULER_HEIGHT, QColor::fromRgb(200, 200, 200, 128)); p.setPen(Qt::lightGray); - // find a staff with most barlines - QList<CADrawableContext*> dContextList = _drawableCList.list(); - CADrawableStaff *dStaff = 0; - for (int i=0; i<dContextList.size(); i++) { - if ((dContextList[i]->drawableContextType()==CADrawableContext::DrawableStaff) && - (!dStaff || dStaff->drawableBarlineList().size()<static_cast<CADrawableStaff*>(dContextList[i])->drawableBarlineList().size())) { - dStaff = static_cast<CADrawableStaff*>(dContextList[i]); - } - } - + QFont font("FreeSans"); font.setPixelSize( qRound(RULER_HEIGHT*0.8) ); p.setFont(font); p.setPen(Qt::black); - - // draw the barline marks - QList<CADrawableBarline *> drawableBarlineList = dStaff->drawableBarlineList(); - for (int i=0; i<drawableBarlineList.size(); i++) { // filter out dotted barlines - if (drawableBarlineList[i]->barline()->barlineType()==CABarline::Dotted) { - drawableBarlineList.removeAt(i); - i--; + QMap<int, CADrawableBarline*> dBarlineMap = computeBarlinePositions(false); + + if (!dBarlineMap.isEmpty()) { + int curBarlineNumber; + for (curBarlineNumber=dBarlineMap.firstKey(); curBarlineNumber<=dBarlineMap.lastKey() && dBarlineMap[curBarlineNumber]->xPos()<_worldX; curBarlineNumber++); + + for (; curBarlineNumber<=dBarlineMap.lastKey() && + dBarlineMap[curBarlineNumber]->xPos()>_worldX && + dBarlineMap[curBarlineNumber]->xPos()+dBarlineMap[curBarlineNumber]->width()<_worldX+_worldW; + curBarlineNumber++) { + CADrawableBarline *curDBarline = dBarlineMap[curBarlineNumber]; + if (dBarlineMap.contains(curBarlineNumber+1)) { // don't draw the last bar number + double center = qRound((curDBarline->xPos()-_worldX)*_zoom); + p.drawText( center-1, RULER_HEIGHT-2, QString::number(curBarlineNumber) ); + } } } - if(dStaff) - { - CABarline *curBarline = dStaff->getBarline(_worldX+_worldW); - CADrawableBarline *curDBarline = (curBarline?static_cast<CADrawableBarline*>(_mapDrawable.values( dStaff->getBarline(_worldX+width()/_zoom) )[0]):0); - - // determine the barline number + do we have a pickup measure in the beginning - int dBarlineIdx = drawableBarlineList.indexOf(curDBarline); - CADrawableTimeSignature *firstDTimeSig = (dStaff->drawableTimeSignatureList().size()?dStaff->drawableTimeSignatureList()[0]:0); - int barlineOffset = 2; - if (curDBarline && firstDTimeSig && - drawableBarlineList[0]->barline()->timeStart() < firstDTimeSig->timeSignature()->barDuration() ) { - barlineOffset = 1; - } - - while ( curDBarline && curDBarline->xPos()>_worldX ) { - int center = qRound((curDBarline->xPos()-_worldX)*_zoom); - if (dBarlineIdx!=drawableBarlineList.size()-1) { // don't draw the last bar number - p.drawText( center-1, RULER_HEIGHT-2, QString::number(dBarlineIdx+barlineOffset) ); - } - - dBarlineIdx--; - curDBarline = (dBarlineIdx>=0?drawableBarlineList[dBarlineIdx]:0); - } - } - // TODO: draw the time marks + // TODO: draw the time marks on the left as in NoteEdit } // draw note checker errors Modified: trunk/src/widgets/scoreview.h =================================================================== --- trunk/src/widgets/scoreview.h 2018-06-08 11:43:24 UTC (rev 1504) +++ trunk/src/widgets/scoreview.h 2018-06-08 11:56:59 UTC (rev 1505) @@ -30,6 +30,7 @@ class CADrawableMusElement; class CADrawableContext; class CADrawableNote; +class CADrawableBarline; class CAMusElement; class CAContext; class CASheet; @@ -140,6 +141,7 @@ CADrawableContext *nearestDownContext(double x, double y); int calculateTime(double x, double y); + QMap<int, CADrawableBarline*> computeBarlinePositions(bool dotted=false); CAContext *contextCollision(double x, double y); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <su...@us...> - 2018-06-08 11:43:28
|
Revision: 1504 http://sourceforge.net/p/canorus/code/1504 Author: suamor Date: 2018-06-08 11:43:24 +0000 (Fri, 08 Jun 2018) Log Message: ----------- Do not show Debug Output when Release is build Prevent debug messages shown in release in mainwin Fix warnings concerning nullptr and unused method parameters Modified Paths: -------------- trunk/CMakeLists.txt trunk/src/ui/mainwin.cpp Modified: trunk/CMakeLists.txt =================================================================== --- trunk/CMakeLists.txt 2018-06-08 08:52:24 UTC (rev 1503) +++ trunk/CMakeLists.txt 2018-06-08 11:43:24 UTC (rev 1504) @@ -11,6 +11,7 @@ ELSE("${CMAKE_BUILD_TYPE}" MATCHES "Debug") # Release IF(${CANORUS_DEV_INSTALL} MATCHES True) SET(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/install) + SET(QT_NO_DEBUG_OUTPUT) ENDIF(${CANORUS_DEV_INSTALL} MATCHES True) ENDIF("${CMAKE_BUILD_TYPE}" MATCHES "Debug") Modified: trunk/src/ui/mainwin.cpp =================================================================== --- trunk/src/ui/mainwin.cpp 2018-06-08 08:52:24 UTC (rev 1503) +++ trunk/src/ui/mainwin.cpp 2018-06-08 11:43:24 UTC (rev 1504) @@ -136,10 +136,10 @@ \sa CAView, CACanorus */ -QFileDialog *CAMainWin::uiOpenDialog = 0; -QFileDialog *CAMainWin::uiSaveDialog = 0; -QFileDialog *CAMainWin::uiImportDialog = 0; -QFileDialog *CAMainWin::uiExportDialog = 0; +QFileDialog *CAMainWin::uiOpenDialog = nullptr; +QFileDialog *CAMainWin::uiSaveDialog = nullptr; +QFileDialog *CAMainWin::uiImportDialog = nullptr; +QFileDialog *CAMainWin::uiExportDialog = nullptr; /*! Default constructor. @@ -149,9 +149,9 @@ : QMainWindow( oParent ), _mode(NoDocumentMode), _mainWinProgressCtl(this), - _playbackView(0), - _repaintTimer(0), - _playback(0) + _playbackView(nullptr), + _repaintTimer(nullptr), + _playback(nullptr) { setAttribute( Qt::WA_DeleteOnClose ); _iNumAllowed = 1; @@ -182,10 +182,10 @@ // Setup the midi keyboad input processing object _keybdInput = new CAKeybdInput( this ); - _resourceView = new CAResourceView( 0, 0 ); + _resourceView = new CAResourceView( nullptr, nullptr ); _resourceView->hide(); - _midiRecorderView = 0; + _midiRecorderView = nullptr; _transposeView = new CATransposeView( this ); addDockWidget( Qt::RightDockWidgetArea, _transposeView ); @@ -193,8 +193,8 @@ _permanentStatusBar = statusBar(); - setDocument( 0 ); - _poExp = 0; + setDocument( nullptr ); + _poExp = nullptr; CACanorus::addMainWin( this ); } @@ -610,11 +610,11 @@ // Standard Toolbar uiUndo->setDefaultAction( uiStandardToolBar->insertWidget( uiCut, uiUndo ) ); uiUndo->defaultAction()->setText(tr("Undo")); - uiUndo->defaultAction()->setShortcut(QApplication::translate("uiMainWindow", "Ctrl+Z", 0 /*, QApplication::UnicodeUTF8*/)); + uiUndo->defaultAction()->setShortcut(QApplication::translate("uiMainWindow", "Ctrl+Z", nullptr /*, QApplication::UnicodeUTF8*/)); uiMenuEdit->insertAction( uiCut, uiUndo->defaultAction() ); QList<QKeySequence> redoShortcuts; - redoShortcuts << QApplication::translate("uiMainWindow", "Ctrl+Y", 0 /*, QApplication::UnicodeUTF8*/ ); - redoShortcuts << QApplication::translate("uiMainWindow", "Ctrl+Shift+Z", 0 /*, QApplication::UnicodeUTF8*/ ); + redoShortcuts << QApplication::translate("uiMainWindow", "Ctrl+Y", nullptr /*, QApplication::UnicodeUTF8*/ ); + redoShortcuts << QApplication::translate("uiMainWindow", "Ctrl+Shift+Z", nullptr /*, QApplication::UnicodeUTF8*/ ); uiRedo->setDefaultAction( uiStandardToolBar->insertWidget( uiCut, uiRedo ) ); uiRedo->defaultAction()->setText(tr("Redo")); uiRedo->defaultAction()->setShortcuts(redoShortcuts); @@ -945,10 +945,10 @@ It does not add the sheet to the document. */ void CAMainWin::addSheet(CASheet *s) { - CAScoreView *v = new CAScoreView(s, 0); + CAScoreView *v = new CAScoreView(s, nullptr); initView( v ); - CAViewContainer *vpc = new CAViewContainer( 0 ); + CAViewContainer *vpc = new CAViewContainer( nullptr ); vpc->addView( v ); _viewContainerList << vpc; _sheetMap[vpc] = s; @@ -985,7 +985,7 @@ delete _viewList.takeFirst(); _sheetMap.clear(); - setCurrentView( 0 ); + setCurrentView( nullptr ); if (_midiRecorderView) { delete _midiRecorderView; @@ -998,7 +998,7 @@ Called when the current sheet is switched in the tab widget. \warning This method is only called when the index of the selected tab changes. If you remove the current tab and the next selected tab gets the same index, this slot isn't called! */ -void CAMainWin::on_uiTabWidget_currentChanged(int idx) { +void CAMainWin::on_uiTabWidget_currentChanged(int) { setCurrentViewContainer( static_cast<CAViewContainer*>(uiTabWidget->currentWidget()) ); if (currentViewContainer()) setCurrentView( currentViewContainer()->currentView() ); @@ -1111,7 +1111,7 @@ clearUI(); delete document(); } - setDocument( 0 ); + setDocument( nullptr ); uiCloseDocument->setEnabled(false); rebuildUI(); } @@ -1120,7 +1120,7 @@ Shows the current score in CanorusML syntax in a new or the current View. */ void CAMainWin::on_uiCanorusMLSource_triggered() { - CASourceView *v = new CASourceView(document(), 0); + CASourceView *v = new CASourceView(document(), nullptr); initView( v ); currentViewContainer()->addView( v ); @@ -1162,7 +1162,7 @@ } void CAMainWin::on_uiNewView_triggered() { - CAView *v = currentView()->clone( 0 ); + CAView *v = currentView()->clone( nullptr ); initView( v ); connect(v, SIGNAL(closed(CAView*)), this, SLOT(floatViewClosed(CAView*))); v->show(); @@ -1222,7 +1222,7 @@ */ CASheet *CAMainWin::currentSheet() { if (!currentView()) { - return 0; + return nullptr; } switch (currentView()->viewType()) { @@ -1243,7 +1243,7 @@ } } - return 0; + return nullptr; } /*! @@ -1256,7 +1256,7 @@ ) { return static_cast<CAScoreView*>(currentView())->currentContext()->context(); } else - return 0; + return nullptr; } /*! @@ -1267,7 +1267,7 @@ return currentScoreView()->selectedVoice(); } - return 0; + return nullptr; } /*! @@ -1300,7 +1300,7 @@ newDocument(); } -void CAMainWin::on_uiUndo_toggled( bool checked, int row ) { +void CAMainWin::on_uiUndo_toggled( bool, int row ) { stopPlayback(); if ( document() ) { int curVoiceIdx = -1; @@ -1318,7 +1318,7 @@ } } - CACanorus::rebuildUI( document(), 0 ); + CACanorus::rebuildUI( document(), nullptr ); if (curVoiceIdx>=0 && curVoiceIdx<currentSheet()->voiceList().size()) { setCurrentVoice( currentSheet()->voiceList()[curVoiceIdx] ); } @@ -1325,7 +1325,7 @@ } } -void CAMainWin::on_uiRedo_toggled( bool checked, int row ) { +void CAMainWin::on_uiRedo_toggled( bool, int row ) { stopPlayback(); if ( document() ) { int curVoiceIdx = -1; @@ -1343,7 +1343,7 @@ } } - CACanorus::rebuildUI( document(), 0 ); + CACanorus::rebuildUI( document(), nullptr ); if (curVoiceIdx>=0 && curVoiceIdx<currentSheet()->voiceList().size()) { setCurrentVoice( currentSheet()->voiceList()[curVoiceIdx] ); @@ -1466,7 +1466,7 @@ } } -void CAMainWin::on_uiContextType_toggled(bool checked, int buttonId) { +void CAMainWin::on_uiContextType_toggled(bool checked, int) { if (checked) { musElementFactory()->setMusElementType( CAMusElement::Undefined ); setMode( InsertMode ); @@ -1692,7 +1692,7 @@ v->selectCElement(coords.x(), coords.y()); QList<CADrawableMusElement*> l = v->musElementsAt( coords.x(), coords.y() ); - CADrawableMusElement *newlySelectedElement=0; + CADrawableMusElement *newlySelectedElement=nullptr; int idx=-1; if (l.size() > 0) { // multiple elements can share the same coordinates @@ -1735,8 +1735,8 @@ case EditMode: { v->clearSelectionRegionList(); - CADrawableMusElement *dElt = 0; - CAMusElement *elt = 0; + CADrawableMusElement *dElt = nullptr; + CAMusElement *elt = nullptr; if ( v->selection().size() ) { dElt = v->selection().front(); @@ -1744,23 +1744,26 @@ if (!elt) break; // debug - std::cout << "drawableMusElement: " << dElt << ", x,y=" << dElt->xPos() << "," << dElt->yPos() << ", w,h=" << dElt->width() << "," << dElt->height() << ", dContext=" << dElt->drawableContext() << std::endl; - std::cout << "musElement: " << elt << ", timeStart=" << elt->timeStart() << ", timeEnd=" << elt->timeEnd() << ", context=" << elt->context(); + QString debugStr; + QTextStream outStr(&debugStr); + outStr << "drawableMusElement: " << dElt << ", x,y=" << dElt->xPos() << "," << dElt->yPos() << ", w,h=" << dElt->width() << "," << dElt->height() << ", dContext=" << dElt->drawableContext() << endl; + outStr << "musElement: " << elt << ", timeStart=" << elt->timeStart() << ", timeEnd=" << elt->timeEnd() << ", context=" << elt->context(); if (elt->isPlayable()) { - std::cout << ", voice=" << ((CAPlayable*)elt)->voice() << ", voiceNr=" << ((CAPlayable*)elt)->voice()->voiceNumber() << ", idxInVoice=" << ((CAPlayable*)elt)->voice()->musElementList().indexOf(elt); - std::cout << ", voiceStaff=" << ((CAPlayable*)elt)->voice()->staff(); + outStr << ", voice=" << ((CAPlayable*)elt)->voice() << ", voiceNr=" << ((CAPlayable*)elt)->voice()->voiceNumber() << ", idxInVoice=" << ((CAPlayable*)elt)->voice()->musElementList().indexOf(elt); + outStr << ", voiceStaff=" << ((CAPlayable*)elt)->voice()->staff(); if (static_cast<CAPlayable*>(elt)->tuplet()) { - std::cout << ", tuplet=" << static_cast<CAPlayable*>(elt)->tuplet(); + outStr << ", tuplet=" << static_cast<CAPlayable*>(elt)->tuplet(); } if (elt->musElementType()==CAMusElement::Note) - std::cout << ", pitch=" << static_cast<CANote*>(elt)->diatonicPitch().noteName(); + outStr << ", pitch=" << static_cast<CANote*>(elt)->diatonicPitch().noteName(); } if (elt->musElementType()==CAMusElement::Slur) { - std::cout << "noteStart=" << static_cast<CASlur*>(elt)->noteStart() << ", noteEnd=" << static_cast<CASlur*>(elt)->noteStart(); + outStr << "noteStart=" << static_cast<CASlur*>(elt)->noteStart() << ", noteEnd=" << static_cast<CASlur*>(elt)->noteStart(); } - std::cout << std::endl; + outStr << endl; + qDebug().noquote() << debugStr; } // lyrics, texts, bookmarks @@ -1774,13 +1777,13 @@ // Insert context if (uiContextType->isChecked()) { // Add new Context - CAContext *newContext; + CAContext *newContext=nullptr; CADrawableContext *dupContext = v->nearestUpContext(coords.x(), coords.y()); switch(uiContextType->currentId()) { case CAContext::Staff: { CACanorus::undo()->createUndoCommand( document(), tr("new staff", "undo")); v->sheet()->insertContextAfter( - dupContext?dupContext->context():0, + dupContext?dupContext->context():nullptr, newContext = new CAStaff( tr("Staff%1").arg(v->sheet()->staffList().size()+1), v->sheet() @@ -1797,11 +1800,11 @@ stanza = static_cast<CALyricsContext*>(dupContext->context())->stanzaNumber()+1;*/ v->sheet()->insertContextAfter( - dupContext?dupContext->context():0, + dupContext?dupContext->context():nullptr, newContext = new CALyricsContext( tr("LyricsContext%1").arg(v->sheet()->contextList().size()+1), 1, - (v->sheet()->voiceList().size()?v->sheet()->voiceList().at(0):0) + (v->sheet()->voiceList().size()?v->sheet()->voiceList().at(0):nullptr) ) ); @@ -1810,7 +1813,7 @@ case CAContext::FiguredBassContext: { CACanorus::undo()->createUndoCommand( document(), tr("new figured bass context", "undo")); v->sheet()->insertContextAfter( - dupContext?dupContext->context():0, + dupContext?dupContext->context():nullptr, newContext = new CAFiguredBassContext( tr("FiguredBassContext%1").arg(v->sheet()->contextList().size()+1), v->sheet() @@ -1821,7 +1824,7 @@ case CAContext::FunctionMarkContext: { CACanorus::undo()->createUndoCommand( document(), tr("new function mark context", "undo")); v->sheet()->insertContextAfter( - dupContext?dupContext->context():0, + dupContext?dupContext->context():nullptr, newContext = new CAFunctionMarkContext( tr("FunctionMarkContext%1").arg(v->sheet()->contextList().size()+1), v->sheet() @@ -1875,7 +1878,7 @@ break; } - CAPluginManager::action("onScoreViewClick", document(), 0, 0, this); + CAPluginManager::action("onScoreViewClick", document(), nullptr, nullptr, this); updateToolBars(); v->repaint(); @@ -1977,7 +1980,7 @@ \sa CAScoreView::selectAllCurBar() */ -void CAMainWin::scoreViewDoubleClick( QMouseEvent *e, const QPoint coords ) { +void CAMainWin::scoreViewDoubleClick( QMouseEvent *e, const QPoint ) { if (mode() == EditMode) { static_cast<CAScoreView*>(sender())->selectAllCurBar(); static_cast<CAScoreView*>(sender())->repaint(); @@ -1990,7 +1993,7 @@ \sa CAScoreView::selectAllCurContext() */ -void CAMainWin::scoreViewTripleClick( QMouseEvent *e, const QPoint coords ) { +void CAMainWin::scoreViewTripleClick( QMouseEvent *e, const QPoint ) { if (mode() == EditMode) { static_cast<CAScoreView*>(sender())->selectAllCurContext(); static_cast<CAScoreView*>(sender())->repaint(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ma...@us...> - 2018-06-08 08:52:29
|
Revision: 1503 http://sourceforge.net/p/canorus/code/1503 Author: matevz Date: 2018-06-08 08:52:24 +0000 (Fri, 08 Jun 2018) Log Message: ----------- Do not count dotted barlines when enumerating bars. Modified Paths: -------------- trunk/src/widgets/scoreview.cpp Modified: trunk/src/widgets/scoreview.cpp =================================================================== --- trunk/src/widgets/scoreview.cpp 2018-06-08 08:42:46 UTC (rev 1502) +++ trunk/src/widgets/scoreview.cpp 2018-06-08 08:52:24 UTC (rev 1503) @@ -992,6 +992,15 @@ p.setPen(Qt::black); // draw the barline marks + + QList<CADrawableBarline *> drawableBarlineList = dStaff->drawableBarlineList(); + for (int i=0; i<drawableBarlineList.size(); i++) { // filter out dotted barlines + if (drawableBarlineList[i]->barline()->barlineType()==CABarline::Dotted) { + drawableBarlineList.removeAt(i); + i--; + } + } + if(dStaff) { CABarline *curBarline = dStaff->getBarline(_worldX+_worldW); @@ -998,22 +1007,22 @@ CADrawableBarline *curDBarline = (curBarline?static_cast<CADrawableBarline*>(_mapDrawable.values( dStaff->getBarline(_worldX+width()/_zoom) )[0]):0); // determine the barline number + do we have a pickup measure in the beginning - int dBarlineIdx = dStaff->drawableBarlineList().indexOf(curDBarline); + int dBarlineIdx = drawableBarlineList.indexOf(curDBarline); CADrawableTimeSignature *firstDTimeSig = (dStaff->drawableTimeSignatureList().size()?dStaff->drawableTimeSignatureList()[0]:0); int barlineOffset = 2; if (curDBarline && firstDTimeSig && - dStaff->drawableBarlineList()[0]->barline()->timeStart() < firstDTimeSig->timeSignature()->barDuration() ) { + drawableBarlineList[0]->barline()->timeStart() < firstDTimeSig->timeSignature()->barDuration() ) { barlineOffset = 1; } while ( curDBarline && curDBarline->xPos()>_worldX ) { int center = qRound((curDBarline->xPos()-_worldX)*_zoom); - if (dBarlineIdx!=dStaff->drawableBarlineList().size()-1) { // don't draw the last bar number + if (dBarlineIdx!=drawableBarlineList.size()-1) { // don't draw the last bar number p.drawText( center-1, RULER_HEIGHT-2, QString::number(dBarlineIdx+barlineOffset) ); } dBarlineIdx--; - curDBarline = (dBarlineIdx>=0?dStaff->drawableBarlineList()[dBarlineIdx]:0); + curDBarline = (dBarlineIdx>=0?drawableBarlineList[dBarlineIdx]:0); } } // TODO: draw the time marks This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ma...@us...> - 2018-06-08 08:42:54
|
Revision: 1502 http://sourceforge.net/p/canorus/code/1502 Author: matevz Date: 2018-06-08 08:42:46 +0000 (Fri, 08 Jun 2018) Log Message: ----------- Dotted barline should not introduce a new bar. Modified Paths: -------------- trunk/src/core/notechecker.cpp Modified: trunk/src/core/notechecker.cpp =================================================================== --- trunk/src/core/notechecker.cpp 2018-06-08 08:34:42 UTC (rev 1501) +++ trunk/src/core/notechecker.cpp 2018-06-08 08:42:46 UTC (rev 1502) @@ -12,6 +12,7 @@ #include "score/staff.h" #include "score/playablelength.h" #include "score/timesignature.h" +#include "score/barline.h" #include "score/notecheckererror.h" /*! @@ -49,6 +50,10 @@ int lastTimeSigRequiredDuration = static_cast<CATimeSignature*>(timeSigs[lastTimeSigIdx])->barDuration(); int lastBarlineTime = -1; for (int j=0; j<barlines.size(); j++) { + if (static_cast<CABarline*>(barlines[j])->barlineType()==CABarline::Dotted) { + continue; + } + if (((lastTimeSigIdx+1)<timeSigs.size()) && barlines[j]->timeStart()>timeSigs[lastTimeSigIdx]->timeStart() ) { // go to next time sig lastTimeSigIdx++; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ma...@us...> - 2018-06-08 08:34:48
|
Revision: 1501 http://sourceforge.net/p/canorus/code/1501 Author: matevz Date: 2018-06-08 08:34:42 +0000 (Fri, 08 Jun 2018) Log Message: ----------- Fixed bug #27 accidentals not shown in the second voice over barline. Modified Paths: -------------- trunk/src/layout/layoutengine.cpp Modified: trunk/src/layout/layoutengine.cpp =================================================================== --- trunk/src/layout/layoutengine.cpp 2018-06-07 21:01:35 UTC (rev 1500) +++ trunk/src/layout/layoutengine.cpp 2018-06-08 08:34:42 UTC (rev 1501) @@ -363,6 +363,13 @@ } } + // Synchronize minimum X-es between the contexts - all the noteheads or barlines should be horizontally aligned. + for (int i=0; i<streams; i++) maxX = (streamsX[i] > maxX) ? streamsX[i] : maxX; + for (int i=0; i<streams; i++) + if (musStreamList[i].size() && + musStreamList[i].last()->musElementType()!=CAMusElement::FunctionMark) + streamsX[i] = maxX; + // Place accidentals and key names of the function marks, if needed. // These elements are so called Support elements. They can't be selected and they're not really connected usually to any logical element, but they're needed when drawing. int maxWidth = 0; @@ -379,7 +386,7 @@ drawableContext = drawableContextMap[elt->context()]; if (elt->musElementType()==CAMusElement::Note && - ((CADrawableStaff*)drawableContext)->getAccs(streamsX[i], static_cast<CANote*>(elt)->diatonicPitch().noteName()) != static_cast<CANote*>(elt)->diatonicPitch().accs() + ((CADrawableStaff*)drawableContext)->getAccs(streamsX[i], static_cast<CANote*>(elt)->diatonicPitch().noteName()) != static_cast<CANote*>(elt)->diatonicPitch().accs() ) { newElt = new CADrawableAccidental( ((CANote*)elt)->diatonicPitch().accs(), @@ -1059,4 +1066,4 @@ new CADrawableNoteCheckerError(ncErrors[i], dMusElt) ); } -} \ No newline at end of file +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ma...@us...> - 2018-06-07 21:01:38
|
Revision: 1500 http://sourceforge.net/p/canorus/code/1500 Author: matevz Date: 2018-06-07 21:01:35 +0000 (Thu, 07 Jun 2018) Log Message: ----------- Set both source and destionation key signature to autodetected values when transposing. Modified Paths: -------------- trunk/src/ui/transposeview.cpp Modified: trunk/src/ui/transposeview.cpp =================================================================== --- trunk/src/ui/transposeview.cpp 2018-06-07 20:55:52 UTC (rev 1499) +++ trunk/src/ui/transposeview.cpp 2018-06-07 21:01:35 UTC (rev 1500) @@ -71,17 +71,13 @@ } if (k) { // key signature is placed - uiKeySigFrom->setCurrentIndex( - uiKeySigFrom->findData( - CADiatonicKey::diatonicKeyToString(k->diatonicKey()) - ) - ); + int idx = uiKeySigFrom->findData(CADiatonicKey::diatonicKeyToString(k->diatonicKey())); + uiKeySigFrom->setCurrentIndex(idx); + uiKeySigTo->setCurrentIndex(idx); } else { // set the key signature to empty (C-Major by default) - uiKeySigFrom->setCurrentIndex( - uiKeySigFrom->findData( - CADiatonicKey::diatonicKeyToString(CADiatonicKey()) - ) - ); + int idx = uiKeySigFrom->findData(CADiatonicKey::diatonicKeyToString(CADiatonicKey())); + uiKeySigFrom->setCurrentIndex(idx); + uiKeySigTo->setCurrentIndex(idx); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ma...@us...> - 2018-06-07 20:56:00
|
Revision: 1499 http://sourceforge.net/p/canorus/code/1499 Author: matevz Date: 2018-06-07 20:55:52 +0000 (Thu, 07 Jun 2018) Log Message: ----------- Fixed bug #3 [ Bug #12746 ] order of keys. Modified Paths: -------------- trunk/src/scoreui/keysignatureui.cpp Modified: trunk/src/scoreui/keysignatureui.cpp =================================================================== --- trunk/src/scoreui/keysignatureui.cpp 2018-06-07 20:41:05 UTC (rev 1498) +++ trunk/src/scoreui/keysignatureui.cpp 2018-06-07 20:55:52 UTC (rev 1499) @@ -97,36 +97,42 @@ \sa CADrawableKeySignature::comboBoxRowToDiatonicKey(), CADrawableKeySignature::populateComboBoxDirection() */ void CAKeySignatureUI::populateComboBox( QComboBox *c ) { + c->addItem( QIcon("images:general/none.svg"), QObject::tr("C major"), CADiatonicKey::diatonicKeyToString(CADiatonicKey(0, CADiatonicKey::Major)) ); + c->addItem( QIcon("images:accidental/accs7.svg"), QObject::tr("C-sharp major"), CADiatonicKey::diatonicKeyToString(CADiatonicKey(7, CADiatonicKey::Major)) ); c->addItem( QIcon("images:accidental/accs-7.svg"), QObject::tr("C-flat major"), CADiatonicKey::diatonicKeyToString(CADiatonicKey(-7, CADiatonicKey::Major)) ); - c->addItem( QIcon("images:accidental/accs-7.svg"), QObject::tr("a-flat minor"), CADiatonicKey::diatonicKeyToString(CADiatonicKey(-7, CADiatonicKey::Minor)) ); - c->addItem( QIcon("images:accidental/accs-6.svg"), QObject::tr("G-flat major"), CADiatonicKey::diatonicKeyToString(CADiatonicKey(-6, CADiatonicKey::Major)) ); - c->addItem( QIcon("images:accidental/accs-6.svg"), QObject::tr("e-flat minor"), CADiatonicKey::diatonicKeyToString(CADiatonicKey(-6, CADiatonicKey::Minor)) ); + c->addItem( QIcon("images:accidental/accs-3.svg"), QObject::tr("c minor"), CADiatonicKey::diatonicKeyToString(CADiatonicKey(-3, CADiatonicKey::Minor)) ); + c->addItem( QIcon("images:accidental/accs4.svg"), QObject::tr("c-sharp minor"), CADiatonicKey::diatonicKeyToString(CADiatonicKey(4, CADiatonicKey::Minor)) ); + + c->addItem( QIcon("images:accidental/accs2.svg"), QObject::tr("D major"), CADiatonicKey::diatonicKeyToString(CADiatonicKey(2, CADiatonicKey::Major)) ); c->addItem( QIcon("images:accidental/accs-5.svg"), QObject::tr("D-flat major"), CADiatonicKey::diatonicKeyToString(CADiatonicKey(-5, CADiatonicKey::Major)) ); - c->addItem( QIcon("images:accidental/accs-5.svg"), QObject::tr("b-flat minor"), CADiatonicKey::diatonicKeyToString(CADiatonicKey(-5, CADiatonicKey::Minor)) ); - c->addItem( QIcon("images:accidental/accs-4.svg"), QObject::tr("A-flat major"), CADiatonicKey::diatonicKeyToString(CADiatonicKey(-4, CADiatonicKey::Major)) ); - c->addItem( QIcon("images:accidental/accs-4.svg"), QObject::tr("f minor"), CADiatonicKey::diatonicKeyToString(CADiatonicKey(-4, CADiatonicKey::Minor)) ); + c->addItem( QIcon("images:accidental/accs-1.svg"), QObject::tr("d minor"), CADiatonicKey::diatonicKeyToString(CADiatonicKey(-1, CADiatonicKey::Minor)) ); + c->addItem( QIcon("images:accidental/accs6.svg"), QObject::tr("d-sharp minor"), CADiatonicKey::diatonicKeyToString(CADiatonicKey(6, CADiatonicKey::Minor)) ); + + c->addItem( QIcon("images:accidental/accs4.svg"), QObject::tr("E major"), CADiatonicKey::diatonicKeyToString(CADiatonicKey(4, CADiatonicKey::Major)) ); c->addItem( QIcon("images:accidental/accs-3.svg"), QObject::tr("E-flat major"), CADiatonicKey::diatonicKeyToString(CADiatonicKey(-3, CADiatonicKey::Major)) ); - c->addItem( QIcon("images:accidental/accs-3.svg"), QObject::tr("c minor"), CADiatonicKey::diatonicKeyToString(CADiatonicKey(-3, CADiatonicKey::Minor)) ); - c->addItem( QIcon("images:accidental/accs-2.svg"), QObject::tr("B-flat major"), CADiatonicKey::diatonicKeyToString(CADiatonicKey(-2, CADiatonicKey::Major)) ); - c->addItem( QIcon("images:accidental/accs-2.svg"), QObject::tr("g minor"), CADiatonicKey::diatonicKeyToString(CADiatonicKey(-2, CADiatonicKey::Minor)) ); + c->addItem( QIcon("images:accidental/accs1.svg"), QObject::tr("e minor"), CADiatonicKey::diatonicKeyToString(CADiatonicKey(1, CADiatonicKey::Minor)) ); + c->addItem( QIcon("images:accidental/accs-6.svg"), QObject::tr("e-flat minor"), CADiatonicKey::diatonicKeyToString(CADiatonicKey(-6, CADiatonicKey::Minor)) ); + c->addItem( QIcon("images:accidental/accs-1.svg"), QObject::tr("F major"), CADiatonicKey::diatonicKeyToString(CADiatonicKey(-1, CADiatonicKey::Major)) ); - c->addItem( QIcon("images:accidental/accs-1.svg"), QObject::tr("d minor"), CADiatonicKey::diatonicKeyToString(CADiatonicKey(-1, CADiatonicKey::Minor)) ); - c->addItem( QIcon("images:general/none.svg"), QObject::tr("C major"), CADiatonicKey::diatonicKeyToString(CADiatonicKey(0, CADiatonicKey::Major)) ); - c->addItem( QIcon("images:general/none.svg"), QObject::tr("a minor"), CADiatonicKey::diatonicKeyToString(CADiatonicKey(0, CADiatonicKey::Minor)) ); + c->addItem( QIcon("images:accidental/accs6.svg"), QObject::tr("F-sharp major"), CADiatonicKey::diatonicKeyToString(CADiatonicKey(6, CADiatonicKey::Major)) ); + c->addItem( QIcon("images:accidental/accs-4.svg"), QObject::tr("f minor"), CADiatonicKey::diatonicKeyToString(CADiatonicKey(-4, CADiatonicKey::Minor)) ); + c->addItem( QIcon("images:accidental/accs3.svg"), QObject::tr("f-sharp minor"), CADiatonicKey::diatonicKeyToString(CADiatonicKey(3, CADiatonicKey::Minor)) ); + c->addItem( QIcon("images:accidental/accs1.svg"), QObject::tr("G major"), CADiatonicKey::diatonicKeyToString(CADiatonicKey(1, CADiatonicKey::Major)) ); - c->addItem( QIcon("images:accidental/accs1.svg"), QObject::tr("e minor"), CADiatonicKey::diatonicKeyToString(CADiatonicKey(1, CADiatonicKey::Minor)) ); - c->addItem( QIcon("images:accidental/accs2.svg"), QObject::tr("D major"), CADiatonicKey::diatonicKeyToString(CADiatonicKey(2, CADiatonicKey::Major)) ); - c->addItem( QIcon("images:accidental/accs2.svg"), QObject::tr("b minor"), CADiatonicKey::diatonicKeyToString(CADiatonicKey(2, CADiatonicKey::Minor)) ); + c->addItem( QIcon("images:accidental/accs-6.svg"), QObject::tr("G-flat major"), CADiatonicKey::diatonicKeyToString(CADiatonicKey(-6, CADiatonicKey::Major)) ); + c->addItem( QIcon("images:accidental/accs-2.svg"), QObject::tr("g minor"), CADiatonicKey::diatonicKeyToString(CADiatonicKey(-2, CADiatonicKey::Minor)) ); + c->addItem( QIcon("images:accidental/accs5.svg"), QObject::tr("g-sharp minor"), CADiatonicKey::diatonicKeyToString(CADiatonicKey(5, CADiatonicKey::Minor)) ); + c->addItem( QIcon("images:accidental/accs3.svg"), QObject::tr("A major"), CADiatonicKey::diatonicKeyToString(CADiatonicKey(3, CADiatonicKey::Major)) ); - c->addItem( QIcon("images:accidental/accs3.svg"), QObject::tr("f-sharp minor"), CADiatonicKey::diatonicKeyToString(CADiatonicKey(3, CADiatonicKey::Minor)) ); - c->addItem( QIcon("images:accidental/accs4.svg"), QObject::tr("E major"), CADiatonicKey::diatonicKeyToString(CADiatonicKey(4, CADiatonicKey::Major)) ); - c->addItem( QIcon("images:accidental/accs4.svg"), QObject::tr("c-sharp minor"), CADiatonicKey::diatonicKeyToString(CADiatonicKey(4, CADiatonicKey::Minor)) ); + c->addItem( QIcon("images:accidental/accs-4.svg"), QObject::tr("A-flat major"), CADiatonicKey::diatonicKeyToString(CADiatonicKey(-4, CADiatonicKey::Major)) ); + c->addItem( QIcon("images:general/none.svg"), QObject::tr("a minor"), CADiatonicKey::diatonicKeyToString(CADiatonicKey(0, CADiatonicKey::Minor)) ); + c->addItem( QIcon("images:accidental/accs7.svg"), QObject::tr("a-sharp minor"), CADiatonicKey::diatonicKeyToString(CADiatonicKey(7, CADiatonicKey::Minor)) ); + c->addItem( QIcon("images:accidental/accs-7.svg"), QObject::tr("a-flat minor"), CADiatonicKey::diatonicKeyToString(CADiatonicKey(-7, CADiatonicKey::Minor)) ); + c->addItem( QIcon("images:accidental/accs5.svg"), QObject::tr("B major"), CADiatonicKey::diatonicKeyToString(CADiatonicKey(5, CADiatonicKey::Major)) ); - c->addItem( QIcon("images:accidental/accs5.svg"), QObject::tr("g-sharp minor"), CADiatonicKey::diatonicKeyToString(CADiatonicKey(5, CADiatonicKey::Minor)) ); - c->addItem( QIcon("images:accidental/accs6.svg"), QObject::tr("F-sharp major"), CADiatonicKey::diatonicKeyToString(CADiatonicKey(6, CADiatonicKey::Major)) ); - c->addItem( QIcon("images:accidental/accs6.svg"), QObject::tr("d-sharp minor"), CADiatonicKey::diatonicKeyToString(CADiatonicKey(6, CADiatonicKey::Minor)) ); - c->addItem( QIcon("images:accidental/accs7.svg"), QObject::tr("C-sharp major"), CADiatonicKey::diatonicKeyToString(CADiatonicKey(7, CADiatonicKey::Major)) ); - c->addItem( QIcon("images:accidental/accs7.svg"), QObject::tr("a-sharp minor"), CADiatonicKey::diatonicKeyToString(CADiatonicKey(7, CADiatonicKey::Minor)) ); + c->addItem( QIcon("images:accidental/accs-2.svg"), QObject::tr("B-flat major"), CADiatonicKey::diatonicKeyToString(CADiatonicKey(-2, CADiatonicKey::Major)) ); + c->addItem( QIcon("images:accidental/accs2.svg"), QObject::tr("b minor"), CADiatonicKey::diatonicKeyToString(CADiatonicKey(2, CADiatonicKey::Minor)) ); + c->addItem( QIcon("images:accidental/accs-5.svg"), QObject::tr("b-flat minor"), CADiatonicKey::diatonicKeyToString(CADiatonicKey(-5, CADiatonicKey::Minor)) ); } /*! This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ma...@us...> - 2018-06-07 20:41:10
|
Revision: 1498 http://sourceforge.net/p/canorus/code/1498 Author: matevz Date: 2018-06-07 20:41:05 +0000 (Thu, 07 Jun 2018) Log Message: ----------- Refactoring: Moved key signature manipulation UI from CADrawableKeySignature to new CAKeySignatureUI. Made ordering of key signature items oblivious to number of accidentals. Modified Paths: -------------- trunk/src/layout/drawablekeysignature.cpp trunk/src/layout/drawablekeysignature.h trunk/src/scorectl/keysignaturectl.cpp trunk/src/scoreui/keysignatureui.cpp trunk/src/scoreui/keysignatureui.h trunk/src/ui/mainwin.cpp trunk/src/ui/transposeview.cpp Modified: trunk/src/layout/drawablekeysignature.cpp =================================================================== --- trunk/src/layout/drawablekeysignature.cpp 2018-06-07 20:33:48 UTC (rev 1497) +++ trunk/src/layout/drawablekeysignature.cpp 2018-06-07 20:41:05 UTC (rev 1498) @@ -182,73 +182,3 @@ CADrawableKeySignature* CADrawableKeySignature::clone(CADrawableContext* newContext) { return (new CADrawableKeySignature(keySignature(), static_cast<CADrawableStaff*>((newContext)?newContext:_drawableContext), xPos(), _drawableContext->yPos())); } - -/*! - This function adds key signatures to the given combobox in order - major-minor-major-... from most flats to most sharps. - - This function usually called when initializing the main window. - - \sa CADrawableKeySignature::comboBoxRowToDiatonicKey(), CADrawableKeySignature::populateComboBoxDirection() - */ -void CADrawableKeySignature::populateComboBox( QComboBox *c ) { - c->addItem( QIcon("images:accidental/accs-7.svg"), QObject::tr("C-flat major") ); - c->addItem( QIcon("images:accidental/accs-7.svg"), QObject::tr("a-flat minor") ); - c->addItem( QIcon("images:accidental/accs-6.svg"), QObject::tr("G-flat major") ); - c->addItem( QIcon("images:accidental/accs-6.svg"), QObject::tr("e-flat minor") ); - c->addItem( QIcon("images:accidental/accs-5.svg"), QObject::tr("D-flat major") ); - c->addItem( QIcon("images:accidental/accs-5.svg"), QObject::tr("b-flat minor") ); - c->addItem( QIcon("images:accidental/accs-4.svg"), QObject::tr("A-flat major") ); - c->addItem( QIcon("images:accidental/accs-4.svg"), QObject::tr("f minor") ); - c->addItem( QIcon("images:accidental/accs-3.svg"), QObject::tr("E-flat major") ); - c->addItem( QIcon("images:accidental/accs-3.svg"), QObject::tr("c minor") ); - c->addItem( QIcon("images:accidental/accs-2.svg"), QObject::tr("B-flat major") ); - c->addItem( QIcon("images:accidental/accs-2.svg"), QObject::tr("g minor") ); - c->addItem( QIcon("images:accidental/accs-1.svg"), QObject::tr("F major") ); - c->addItem( QIcon("images:accidental/accs-1.svg"), QObject::tr("d minor") ); - c->addItem( QIcon("images:general/none.svg"), QObject::tr("C major") ); - c->addItem( QIcon("images:general/none.svg"), QObject::tr("a minor") ); - c->addItem( QIcon("images:accidental/accs1.svg"), QObject::tr("G major") ); - c->addItem( QIcon("images:accidental/accs1.svg"), QObject::tr("e minor") ); - c->addItem( QIcon("images:accidental/accs2.svg"), QObject::tr("D major") ); - c->addItem( QIcon("images:accidental/accs2.svg"), QObject::tr("b minor") ); - c->addItem( QIcon("images:accidental/accs3.svg"), QObject::tr("A major") ); - c->addItem( QIcon("images:accidental/accs3.svg"), QObject::tr("f-sharp minor") ); - c->addItem( QIcon("images:accidental/accs4.svg"), QObject::tr("E major") ); - c->addItem( QIcon("images:accidental/accs4.svg"), QObject::tr("c-sharp minor") ); - c->addItem( QIcon("images:accidental/accs5.svg"), QObject::tr("B major") ); - c->addItem( QIcon("images:accidental/accs5.svg"), QObject::tr("g-sharp minor") ); - c->addItem( QIcon("images:accidental/accs6.svg"), QObject::tr("F-sharp major") ); - c->addItem( QIcon("images:accidental/accs6.svg"), QObject::tr("d-sharp minor") ); - c->addItem( QIcon("images:accidental/accs7.svg"), QObject::tr("C-sharp major") ); - c->addItem( QIcon("images:accidental/accs7.svg"), QObject::tr("a-sharp minor") ); -} - -/*! - This function returns the selected diatonic key dependent on the selected row. - - \sa CADrawableKeySignature::populateComboBox(), CADrawableKeySignature::populateComboBoxDirection() - */ -CADiatonicKey CADrawableKeySignature::comboBoxRowToDiatonicKey( int row ) { - signed char accs = qRound((row-14.5) / 2); - CADiatonicKey::CAGender gender = (row%2)==0 ? CADiatonicKey::Major : CADiatonicKey::Minor; - - return CADiatonicKey( accs, gender ); -} - -/*! - Adds directions Up and Down with icons to the given combo box. - - \sa CADrawableKeySignature::comboBoxRowToDiatonicKey(), CADrawableKeySignature::populateComboBox() - */ -void CADrawableKeySignature::populateComboBoxDirection( QComboBox *c ) { - c->addItem( QIcon("images:general/up.svg"), QObject::tr("Up") ); - c->addItem( QIcon("images:general/down.svg"), QObject::tr("Down") ); -} - -/*! - Returns the item index in the combo box corresponding to the given diatonic key \a k. - */ -int CADrawableKeySignature::diatonicKeyToRow( CADiatonicKey k ) { - return (k.numberOfAccs()+7)*2 + ((k.gender()==CADiatonicKey::Minor)?1:0); -} Modified: trunk/src/layout/drawablekeysignature.h =================================================================== --- trunk/src/layout/drawablekeysignature.h 2018-06-07 20:33:48 UTC (rev 1497) +++ trunk/src/layout/drawablekeysignature.h 2018-06-07 20:41:05 UTC (rev 1498) @@ -26,11 +26,6 @@ CADrawableKeySignature *clone(CADrawableContext* newContext = 0); inline CAKeySignature *keySignature() { return (CAKeySignature*)_musElement; } - static void populateComboBox( QComboBox *c ); - static CADiatonicKey comboBoxRowToDiatonicKey( int row ); - static int diatonicKeyToRow( CADiatonicKey k ); - static void populateComboBoxDirection( QComboBox *c ); - private: QList<CADrawableAccidental*> _drawableAccidentalList; ///List of actual drawable accidentals }; Modified: trunk/src/scorectl/keysignaturectl.cpp =================================================================== --- trunk/src/scorectl/keysignaturectl.cpp 2018-06-07 20:33:48 UTC (rev 1497) +++ trunk/src/scorectl/keysignaturectl.cpp 2018-06-07 20:41:05 UTC (rev 1498) @@ -56,7 +56,8 @@ Changes the number of accidentals. */ void CAKeySignatureCtl::on_uiKeySig_activated( int row ) { - CADiatonicKey key = CADrawableKeySignature::comboBoxRowToDiatonicKey( row ); + + CADiatonicKey key(static_cast<QComboBox*>(sender())->itemData(row).toString()); if (_poMainWin->mode()==CAMainWin::InsertMode) { _poMainWin->musElementFactory()->setDiatonicKeyNumberOfAccs( key.numberOfAccs() ); @@ -92,4 +93,3 @@ _poMainWin->setMode( CAMainWin::InsertMode, _oHash ); } } - Modified: trunk/src/scoreui/keysignatureui.cpp =================================================================== --- trunk/src/scoreui/keysignatureui.cpp 2018-06-07 20:33:48 UTC (rev 1497) +++ trunk/src/scoreui/keysignatureui.cpp 2018-06-07 20:41:05 UTC (rev 1498) @@ -38,7 +38,7 @@ uiKeySigToolBar = new QToolBar( tr("Key Signature ToolBar"), poMainWin ); uiKeySig = new QComboBox( poMainWin ); uiKeySig->setObjectName("uiKeySig"); - CADrawableKeySignature::populateComboBox( uiKeySig ); + CAKeySignatureUI::populateComboBox( uiKeySig ); if( poMainWin == 0 ) qCritical("KeySignatureUI: No mainwindow instance available!"); // KeySig Toolbar @@ -66,9 +66,11 @@ */ void CAKeySignatureUI::updateKeySigToolBar() { if (_poMainWin->isInsertKeySigChecked() && _poMainWin->mode()==CAMainWin::InsertMode) { - uiKeySig->setCurrentIndex(( - _poMainWin->musElementFactory()->diatonicKeyNumberOfAccs()+7)*2 + - ((_poMainWin->musElementFactory()->diatonicKeyGender()==CADiatonicKey::Minor)?1:0) ); + uiKeySig->setCurrentIndex( + uiKeySig->findData( + CADiatonicKey::diatonicKeyToString(CADiatonicKey(_poMainWin->musElementFactory()->diatonicKeyNumberOfAccs(), _poMainWin->musElementFactory()->diatonicKeyGender() )) + ) + ); uiKeySigToolBar->show(); } else if ( _poMainWin->mode()==CAMainWin::EditMode && _poMainWin->currentScoreView() && _poMainWin->currentScoreView()->selection().size() && @@ -77,7 +79,7 @@ if (v && v->selection().size()) { CAKeySignature *keySig = dynamic_cast<CAKeySignature*>(v->selection().at(0)->musElement()); if (keySig) { - uiKeySig->setCurrentIndex( CADrawableKeySignature::diatonicKeyToRow( keySig->diatonicKey() ) ); + uiKeySig->setCurrentIndex( uiKeySig->findData( CADiatonicKey::diatonicKeyToString(keySig->diatonicKey()) ) ); uiKeySigToolBar->show(); } else uiKeySigToolBar->hide(); @@ -86,3 +88,53 @@ uiKeySigToolBar->hide(); } +/*! + This function adds key signatures to the given combobox in order + major-minor-major-... from most flats to most sharps. + + This function usually called when initializing the main window. + + \sa CADrawableKeySignature::comboBoxRowToDiatonicKey(), CADrawableKeySignature::populateComboBoxDirection() + */ +void CAKeySignatureUI::populateComboBox( QComboBox *c ) { + c->addItem( QIcon("images:accidental/accs-7.svg"), QObject::tr("C-flat major"), CADiatonicKey::diatonicKeyToString(CADiatonicKey(-7, CADiatonicKey::Major)) ); + c->addItem( QIcon("images:accidental/accs-7.svg"), QObject::tr("a-flat minor"), CADiatonicKey::diatonicKeyToString(CADiatonicKey(-7, CADiatonicKey::Minor)) ); + c->addItem( QIcon("images:accidental/accs-6.svg"), QObject::tr("G-flat major"), CADiatonicKey::diatonicKeyToString(CADiatonicKey(-6, CADiatonicKey::Major)) ); + c->addItem( QIcon("images:accidental/accs-6.svg"), QObject::tr("e-flat minor"), CADiatonicKey::diatonicKeyToString(CADiatonicKey(-6, CADiatonicKey::Minor)) ); + c->addItem( QIcon("images:accidental/accs-5.svg"), QObject::tr("D-flat major"), CADiatonicKey::diatonicKeyToString(CADiatonicKey(-5, CADiatonicKey::Major)) ); + c->addItem( QIcon("images:accidental/accs-5.svg"), QObject::tr("b-flat minor"), CADiatonicKey::diatonicKeyToString(CADiatonicKey(-5, CADiatonicKey::Minor)) ); + c->addItem( QIcon("images:accidental/accs-4.svg"), QObject::tr("A-flat major"), CADiatonicKey::diatonicKeyToString(CADiatonicKey(-4, CADiatonicKey::Major)) ); + c->addItem( QIcon("images:accidental/accs-4.svg"), QObject::tr("f minor"), CADiatonicKey::diatonicKeyToString(CADiatonicKey(-4, CADiatonicKey::Minor)) ); + c->addItem( QIcon("images:accidental/accs-3.svg"), QObject::tr("E-flat major"), CADiatonicKey::diatonicKeyToString(CADiatonicKey(-3, CADiatonicKey::Major)) ); + c->addItem( QIcon("images:accidental/accs-3.svg"), QObject::tr("c minor"), CADiatonicKey::diatonicKeyToString(CADiatonicKey(-3, CADiatonicKey::Minor)) ); + c->addItem( QIcon("images:accidental/accs-2.svg"), QObject::tr("B-flat major"), CADiatonicKey::diatonicKeyToString(CADiatonicKey(-2, CADiatonicKey::Major)) ); + c->addItem( QIcon("images:accidental/accs-2.svg"), QObject::tr("g minor"), CADiatonicKey::diatonicKeyToString(CADiatonicKey(-2, CADiatonicKey::Minor)) ); + c->addItem( QIcon("images:accidental/accs-1.svg"), QObject::tr("F major"), CADiatonicKey::diatonicKeyToString(CADiatonicKey(-1, CADiatonicKey::Major)) ); + c->addItem( QIcon("images:accidental/accs-1.svg"), QObject::tr("d minor"), CADiatonicKey::diatonicKeyToString(CADiatonicKey(-1, CADiatonicKey::Minor)) ); + c->addItem( QIcon("images:general/none.svg"), QObject::tr("C major"), CADiatonicKey::diatonicKeyToString(CADiatonicKey(0, CADiatonicKey::Major)) ); + c->addItem( QIcon("images:general/none.svg"), QObject::tr("a minor"), CADiatonicKey::diatonicKeyToString(CADiatonicKey(0, CADiatonicKey::Minor)) ); + c->addItem( QIcon("images:accidental/accs1.svg"), QObject::tr("G major"), CADiatonicKey::diatonicKeyToString(CADiatonicKey(1, CADiatonicKey::Major)) ); + c->addItem( QIcon("images:accidental/accs1.svg"), QObject::tr("e minor"), CADiatonicKey::diatonicKeyToString(CADiatonicKey(1, CADiatonicKey::Minor)) ); + c->addItem( QIcon("images:accidental/accs2.svg"), QObject::tr("D major"), CADiatonicKey::diatonicKeyToString(CADiatonicKey(2, CADiatonicKey::Major)) ); + c->addItem( QIcon("images:accidental/accs2.svg"), QObject::tr("b minor"), CADiatonicKey::diatonicKeyToString(CADiatonicKey(2, CADiatonicKey::Minor)) ); + c->addItem( QIcon("images:accidental/accs3.svg"), QObject::tr("A major"), CADiatonicKey::diatonicKeyToString(CADiatonicKey(3, CADiatonicKey::Major)) ); + c->addItem( QIcon("images:accidental/accs3.svg"), QObject::tr("f-sharp minor"), CADiatonicKey::diatonicKeyToString(CADiatonicKey(3, CADiatonicKey::Minor)) ); + c->addItem( QIcon("images:accidental/accs4.svg"), QObject::tr("E major"), CADiatonicKey::diatonicKeyToString(CADiatonicKey(4, CADiatonicKey::Major)) ); + c->addItem( QIcon("images:accidental/accs4.svg"), QObject::tr("c-sharp minor"), CADiatonicKey::diatonicKeyToString(CADiatonicKey(4, CADiatonicKey::Minor)) ); + c->addItem( QIcon("images:accidental/accs5.svg"), QObject::tr("B major"), CADiatonicKey::diatonicKeyToString(CADiatonicKey(5, CADiatonicKey::Major)) ); + c->addItem( QIcon("images:accidental/accs5.svg"), QObject::tr("g-sharp minor"), CADiatonicKey::diatonicKeyToString(CADiatonicKey(5, CADiatonicKey::Minor)) ); + c->addItem( QIcon("images:accidental/accs6.svg"), QObject::tr("F-sharp major"), CADiatonicKey::diatonicKeyToString(CADiatonicKey(6, CADiatonicKey::Major)) ); + c->addItem( QIcon("images:accidental/accs6.svg"), QObject::tr("d-sharp minor"), CADiatonicKey::diatonicKeyToString(CADiatonicKey(6, CADiatonicKey::Minor)) ); + c->addItem( QIcon("images:accidental/accs7.svg"), QObject::tr("C-sharp major"), CADiatonicKey::diatonicKeyToString(CADiatonicKey(7, CADiatonicKey::Major)) ); + c->addItem( QIcon("images:accidental/accs7.svg"), QObject::tr("a-sharp minor"), CADiatonicKey::diatonicKeyToString(CADiatonicKey(7, CADiatonicKey::Minor)) ); +} + +/*! + Adds directions Up and Down with icons to the given combo box. + + \sa CADrawableKeySignature::comboBoxRowToDiatonicKey(), CADrawableKeySignature::populateComboBox() + */ +void CAKeySignatureUI::populateComboBoxDirection( QComboBox *c ) { + c->addItem( QIcon("images:general/up.svg"), QObject::tr("Up") ); + c->addItem( QIcon("images:general/down.svg"), QObject::tr("Down") ); +} Modified: trunk/src/scoreui/keysignatureui.h =================================================================== --- trunk/src/scoreui/keysignatureui.h 2018-06-07 20:33:48 UTC (rev 1497) +++ trunk/src/scoreui/keysignatureui.h 2018-06-07 20:41:05 UTC (rev 1498) @@ -30,6 +30,9 @@ void updateKeySigToolBar(); inline CAKeySignatureCtl &ctl() { return *_poKeySignatureCtl; } + static void populateComboBox( QComboBox *c ); + static void populateComboBoxDirection( QComboBox *c ); + protected: CAMainWin *_poMainWin; CAKeySignatureCtl *_poKeySignatureCtl; Modified: trunk/src/ui/mainwin.cpp =================================================================== --- trunk/src/ui/mainwin.cpp 2018-06-07 20:33:48 UTC (rev 1497) +++ trunk/src/ui/mainwin.cpp 2018-06-07 20:41:05 UTC (rev 1498) @@ -483,7 +483,7 @@ uiFMTonicDegree->addButton( QIcon("images:functionmark/fmvii.svg"), CAFunctionMark::VII, tr("VII") ); uiFMKeySig = new QComboBox( this ); uiFMKeySig->setObjectName("uiFMKeySig"); - CADrawableKeySignature::populateComboBox( uiFMKeySig ); + CAKeySignatureUI::populateComboBox( uiFMKeySig ); uiDynamicToolBar = new QToolBar( tr("Dynamic marks ToolBar"), this ); uiDynamicText = new CAMenuToolButton( tr("Select Dynamic"), 5, this ); @@ -4916,7 +4916,11 @@ uiFMTonicDegree->setCurrentId( fm->tonicDegree()*(fm->isTonicDegreeMinor()?-1:1) ); uiFMEllipse->setChecked( fm->isPartOfEllipse() ); - uiFMKeySig->setCurrentIndex( CADrawableKeySignature::diatonicKeyToRow(fm->key()) ); + uiFMKeySig->setCurrentIndex( + uiFMKeySig->findData( + CADiatonicKey::diatonicKeyToString(fm->key()) + ) + ); uiFMToolBar->show(); } else { Modified: trunk/src/ui/transposeview.cpp =================================================================== --- trunk/src/ui/transposeview.cpp 2018-06-07 20:33:48 UTC (rev 1497) +++ trunk/src/ui/transposeview.cpp 2018-06-07 20:41:05 UTC (rev 1498) @@ -7,6 +7,7 @@ #include "ui/transposeview.h" #include "ui/mainwin.h" +#include "scoreui/keysignatureui.h" #include "core/undo.h" #include "canorus.h" @@ -27,9 +28,9 @@ void CATransposeView::setupCustomUi() { // populate Key signatures - CADrawableKeySignature::populateComboBox( uiKeySigFrom ); - CADrawableKeySignature::populateComboBox( uiKeySigTo ); - CADrawableKeySignature::populateComboBoxDirection( uiKeySigDir ); + CAKeySignatureUI::populateComboBox( uiKeySigFrom ); + CAKeySignatureUI::populateComboBox( uiKeySigTo ); + CAKeySignatureUI::populateComboBoxDirection( uiKeySigDir ); // populate Intervals for (int i=1; i<9; i++) { @@ -36,7 +37,7 @@ // also triggers currentIndexChanged() and populates uiIntervalQuality uiIntervalQuantity->addItem( CAInterval::quantityToReadable(i) ); } - CADrawableKeySignature::populateComboBoxDirection( uiIntervalDir ); + CAKeySignatureUI::populateComboBoxDirection( uiIntervalDir ); connect( uiByKeySig, SIGNAL(toggled(bool)), this, SLOT(updateUi(bool)) ); connect( uiByInterval, SIGNAL(toggled(bool)), this, SLOT(updateUi(bool)) ); @@ -70,9 +71,17 @@ } if (k) { // key signature is placed - uiKeySigFrom->setCurrentIndex( CADrawableKeySignature::diatonicKeyToRow( k->diatonicKey() ) ); + uiKeySigFrom->setCurrentIndex( + uiKeySigFrom->findData( + CADiatonicKey::diatonicKeyToString(k->diatonicKey()) + ) + ); } else { // set the key signature to empty (C-Major by default) - uiKeySigFrom->setCurrentIndex( CADrawableKeySignature::diatonicKeyToRow( CADiatonicKey() ) ); + uiKeySigFrom->setCurrentIndex( + uiKeySigFrom->findData( + CADiatonicKey::diatonicKeyToString(CADiatonicKey()) + ) + ); } } @@ -148,8 +157,8 @@ // do the transpose dependent on the current transpose mode if ( uiByKeySig->isChecked() ) { - t.transposeByKeySig( CADrawableKeySignature::comboBoxRowToDiatonicKey(uiKeySigFrom->currentIndex()), - CADrawableKeySignature::comboBoxRowToDiatonicKey(uiKeySigTo->currentIndex()), + t.transposeByKeySig( CADiatonicKey(uiKeySigFrom->currentData().toString()), + CADiatonicKey(uiKeySigTo->currentData().toString()), uiKeySigDir->currentIndex()?(-1):1 ); } else if ( uiByInterval->isChecked() ) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |