Add Auto creation option commands/buttons

This commit is contained in:
manongjohn 2021-05-30 20:23:23 -04:00
parent a6b6269c7c
commit 09d2f8bd89
16 changed files with 779 additions and 2 deletions

View file

@ -137,7 +137,13 @@ enum class PredefinedRect {
// ADD_LEVEL_AREA, // ADD_LEVEL_AREA,
// ADD_LEVEL, // ADD_LEVEL,
FOOTER_NOTE_OBJ_AREA, FOOTER_NOTE_OBJ_AREA,
FOOTER_NOTE_AREA FOOTER_NOTE_AREA,
AUTO_CREATE_AREA,
AUTO_CREATE,
CREATE_IN_HOLD_AREA,
CREATE_IN_HOLD,
AUTO_STRETCH_AREA,
AUTO_STRETCH
}; };
enum class PredefinedLine { enum class PredefinedLine {
LOCKED, //! dotted vertical line when cell is locked LOCKED, //! dotted vertical line when cell is locked

View file

@ -0,0 +1,88 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="16px"
height="16px"
version="1.1"
xml:space="preserve"
style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"
id="svg20"
sodipodi:docname="auto_create.svg"
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"><metadata
id="metadata26"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
id="defs24" /><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="1013"
id="namedview22"
showgrid="true"
inkscape:zoom="41.7193"
inkscape:cx="3.1136136"
inkscape:cy="9.6692213"
inkscape:window-x="-9"
inkscape:window-y="-9"
inkscape:window-maximized="1"
inkscape:current-layer="new_vector_level"><inkscape:grid
type="xygrid"
id="grid833" /></sodipodi:namedview>
<g
transform="matrix(1,0,0,1,-170,-210)"
id="g18">
<g
id="new_vector_level"
transform="matrix(1,0,0,1,60,-20)">
<g
transform="translate(0,4e-6)"
style="clip-rule:evenodd;fill-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2"
id="g862"><path
inkscape:transform-center-y="0.00014613676"
inkscape:transform-center-x="-2.0056737e-05"
d="m 121.58689,242.58595 -2.59663,-1.18837 -0.91763,2.7042 -0.99579,-2.67641 -2.56102,1.2633 1.18838,-2.59663 -2.7042,-0.91763 2.6764,-0.99579 -1.26329,-2.56102 2.59663,1.18837 0.91763,-2.70419 0.99579,2.6764 2.56102,-1.2633 -1.18838,2.59664 2.7042,0.91762 -2.6764,0.99579 z"
inkscape:randomized="0"
inkscape:rounded="0"
inkscape:flatsided="false"
sodipodi:arg2="1.163572"
sodipodi:arg1="0.7708729"
sodipodi:r2="2.5002637"
sodipodi:r1="5.0005274"
sodipodi:cy="239.10178"
sodipodi:cx="118"
sodipodi:sides="8"
id="path884"
style="clip-rule:evenodd;opacity:1;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
sodipodi:type="star" /><g
id="bg-1"
transform="matrix(-0.110345,0,0,0.121212,142.22074,211.09094)"
style="clip-rule:evenodd;fill-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2"><rect
x="147"
y="156"
width="145"
height="132"
style="fill:#878787;fill-opacity:0"
id="rect2-3" /></g><g
transform="translate(-19.999963,220.00003)"
id="g7-2"
style="clip-rule:evenodd;fill-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2"><path
inkscape:connector-curvature="0"
d="M 143.025,25 C 144.116,25 145,24.116 145,23.025 V 12.984 c 0,-0.527 -0.209,-1.031 -0.581,-1.403 C 144.047,11.209 143.543,11 143.016,11 c -2.663,0 -7.369,0 -10.032,0 -0.527,0 -1.031,0.209 -1.403,0.581 -0.372,0.372 -0.581,0.876 -0.581,1.403 v 10.032 c 0,0.527 0.209,1.031 0.581,1.403 0.372,0.372 0.876,0.581 1.403,0.581 2.666,0 7.378,0 10.041,0 z m 0.014,-1 C 143.57,24 144,23.57 144,23.039 V 13.017 c 0,-0.269 -0.107,-0.528 -0.298,-0.719 C 143.511,12.107 143.252,12 142.983,12 h -9.966 c -0.269,0 -0.528,0.107 -0.719,0.298 -0.191,0.191 -0.298,0.45 -0.298,0.719 v 9.966 c 0,0.269 0.107,0.528 0.298,0.719 0.191,0.191 0.45,0.298 0.719,0.298 z M 136,13.5 c 0,-0.133 -0.053,-0.26 -0.146,-0.354 C 135.76,13.053 135.633,13 135.5,13 c -0.555,0 -1.445,0 -2,0 -0.133,0 -0.26,0.053 -0.354,0.146 C 133.053,13.24 133,13.367 133,13.5 c 0,0.133 0.053,0.26 0.146,0.354 0.094,0.093 0.221,0.146 0.354,0.146 0.555,0 1.445,0 2,0 0.133,0 0.26,-0.053 0.354,-0.146 C 135.947,13.76 136,13.633 136,13.5 Z m 3,0 c 0,-0.133 -0.053,-0.26 -0.146,-0.354 C 138.76,13.053 138.633,13 138.5,13 c -0.305,0 -0.695,0 -1,0 -0.133,0 -0.26,0.053 -0.354,0.146 C 137.053,13.24 137,13.367 137,13.5 c 0,0.133 0.053,0.26 0.146,0.354 0.094,0.093 0.221,0.146 0.354,0.146 0.305,0 0.695,0 1,0 0.133,0 0.26,-0.053 0.354,-0.146 C 138.947,13.76 139,13.633 139,13.5 Z m 4,0 c 0,-0.133 -0.053,-0.26 -0.146,-0.354 C 142.76,13.053 142.633,13 142.5,13 c -0.555,0 -1.445,0 -2,0 -0.133,0 -0.26,0.053 -0.354,0.146 C 140.053,13.24 140,13.367 140,13.5 c 0,0.133 0.053,0.26 0.146,0.354 0.094,0.093 0.221,0.146 0.354,0.146 0.555,0 1.445,0 2,0 0.133,0 0.26,-0.053 0.354,-0.146 C 142.947,13.76 143,13.633 143,13.5 Z"
id="path5-1" /></g></g></g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.9 KiB

View file

@ -0,0 +1,86 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="16px"
height="16px"
version="1.1"
xml:space="preserve"
style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"
id="svg20"
sodipodi:docname="auto_create_on.svg"
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"><metadata
id="metadata26"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
id="defs24" /><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="1013"
id="namedview22"
showgrid="true"
inkscape:zoom="41.7193"
inkscape:cx="3.1136136"
inkscape:cy="8.2870124"
inkscape:window-x="-9"
inkscape:window-y="-9"
inkscape:window-maximized="1"
inkscape:current-layer="new_vector_level"><inkscape:grid
type="xygrid"
id="grid833" /></sodipodi:namedview>
<g
transform="matrix(1,0,0,1,-170,-210)"
id="g18">
<g
id="new_vector_level"
transform="matrix(1,0,0,1,60,-20)">
<g
id="g862"><path
inkscape:transform-center-y="0.00014613676"
inkscape:transform-center-x="-2.0056737e-05"
d="m 121.58689,242.58595 -2.59663,-1.18837 -0.91763,2.7042 -0.99579,-2.67641 -2.56102,1.2633 1.18838,-2.59663 -2.7042,-0.91763 2.6764,-0.99579 -1.26329,-2.56102 2.59663,1.18837 0.91763,-2.70419 0.99579,2.6764 2.56102,-1.2633 -1.18838,2.59664 2.7042,0.91762 -2.6764,0.99579 z"
inkscape:randomized="0"
inkscape:rounded="0"
inkscape:flatsided="false"
sodipodi:arg2="1.163572"
sodipodi:arg1="0.7708729"
sodipodi:r2="2.5002637"
sodipodi:r1="5.0005274"
sodipodi:cy="239.10178"
sodipodi:cx="118"
sodipodi:sides="8"
id="path884"
style="clip-rule:evenodd;opacity:1;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
sodipodi:type="star" /><g
id="bg-1"
transform="matrix(-0.110345,0,0,0.121212,142.22074,211.09094)"
style="clip-rule:evenodd;fill-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2"><rect
x="147"
y="156"
width="145"
height="132"
style="fill:#878787;fill-opacity:0"
id="rect2-3" /></g><g
transform="translate(-19.999963,220.00003)"
id="g7-2"
style="clip-rule:evenodd;fill-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2"><path
inkscape:connector-curvature="0"
d="M 143.025,25 C 144.116,25 145,24.116 145,23.025 V 12.984 c 0,-0.527 -0.209,-1.031 -0.581,-1.403 C 144.047,11.209 143.543,11 143.016,11 c -2.663,0 -7.369,0 -10.032,0 -0.527,0 -1.031,0.209 -1.403,0.581 -0.372,0.372 -0.581,0.876 -0.581,1.403 v 10.032 c 0,0.527 0.209,1.031 0.581,1.403 0.372,0.372 0.876,0.581 1.403,0.581 2.666,0 7.378,0 10.041,0 z m 0.014,-1 C 143.57,24 144,23.57 144,23.039 V 13.017 c 0,-0.269 -0.107,-0.528 -0.298,-0.719 C 143.511,12.107 143.252,12 142.983,12 h -9.966 c -0.269,0 -0.528,0.107 -0.719,0.298 -0.191,0.191 -0.298,0.45 -0.298,0.719 v 9.966 c 0,0.269 0.107,0.528 0.298,0.719 0.191,0.191 0.45,0.298 0.719,0.298 z M 136,13.5 c 0,-0.133 -0.053,-0.26 -0.146,-0.354 C 135.76,13.053 135.633,13 135.5,13 c -0.555,0 -1.445,0 -2,0 -0.133,0 -0.26,0.053 -0.354,0.146 C 133.053,13.24 133,13.367 133,13.5 c 0,0.133 0.053,0.26 0.146,0.354 0.094,0.093 0.221,0.146 0.354,0.146 0.555,0 1.445,0 2,0 0.133,0 0.26,-0.053 0.354,-0.146 C 135.947,13.76 136,13.633 136,13.5 Z m 3,0 c 0,-0.133 -0.053,-0.26 -0.146,-0.354 C 138.76,13.053 138.633,13 138.5,13 c -0.305,0 -0.695,0 -1,0 -0.133,0 -0.26,0.053 -0.354,0.146 C 137.053,13.24 137,13.367 137,13.5 c 0,0.133 0.053,0.26 0.146,0.354 0.094,0.093 0.221,0.146 0.354,0.146 0.305,0 0.695,0 1,0 0.133,0 0.26,-0.053 0.354,-0.146 C 138.947,13.76 139,13.633 139,13.5 Z m 4,0 c 0,-0.133 -0.053,-0.26 -0.146,-0.354 C 142.76,13.053 142.633,13 142.5,13 c -0.555,0 -1.445,0 -2,0 -0.133,0 -0.26,0.053 -0.354,0.146 C 140.053,13.24 140,13.367 140,13.5 c 0,0.133 0.053,0.26 0.146,0.354 0.094,0.093 0.221,0.146 0.354,0.146 0.555,0 1.445,0 2,0 0.133,0 0.26,-0.053 0.354,-0.146 C 142.947,13.76 143,13.633 143,13.5 Z"
id="path5-1" /></g></g></g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.8 KiB

View file

@ -0,0 +1,88 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="16px"
height="16px"
version="1.1"
xml:space="preserve"
style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"
id="svg20"
sodipodi:docname="auto_stretch.svg"
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"><metadata
id="metadata26"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
id="defs24" /><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="1013"
id="namedview22"
showgrid="true"
inkscape:zoom="41.7193"
inkscape:cx="3.1136136"
inkscape:cy="9.6692213"
inkscape:window-x="-9"
inkscape:window-y="-9"
inkscape:window-maximized="1"
inkscape:current-layer="new_vector_level"><inkscape:grid
type="xygrid"
id="grid833" /></sodipodi:namedview>
<g
transform="matrix(1,0,0,1,-170,-210)"
id="g18">
<g
id="new_vector_level"
transform="matrix(1,0,0,1,60,-20)">
<g
id="g907"><g
id="bg-1"
transform="matrix(-0.110345,0,0,0.121212,142.22074,211.09094)"
style="clip-rule:evenodd;fill-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2"><rect
x="147"
y="156"
width="145"
height="132"
style="fill:#878787;fill-opacity:0"
id="rect2-3" /></g><g
transform="translate(-19.99996,220.00003)"
id="g7-2"
style="clip-rule:evenodd;fill-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2"><path
inkscape:connector-curvature="0"
d="M 143.025,25 C 144.116,25 145,24.116 145,23.025 V 12.984 c 0,-0.527 -0.209,-1.031 -0.581,-1.403 C 144.047,11.209 143.543,11 143.016,11 c -2.663,0 -7.369,0 -10.032,0 -0.527,0 -1.031,0.209 -1.403,0.581 -0.372,0.372 -0.581,0.876 -0.581,1.403 v 10.032 c 0,0.527 0.209,1.031 0.581,1.403 0.372,0.372 0.876,0.581 1.403,0.581 2.666,0 7.378,0 10.041,0 z m 0.014,-1 C 143.57,24 144,23.57 144,23.039 V 13.017 c 0,-0.269 -0.107,-0.528 -0.298,-0.719 C 143.511,12.107 143.252,12 142.983,12 h -9.966 c -0.269,0 -0.528,0.107 -0.719,0.298 -0.191,0.191 -0.298,0.45 -0.298,0.719 v 9.966 c 0,0.269 0.107,0.528 0.298,0.719 0.191,0.191 0.45,0.298 0.719,0.298 z M 136,13.5 c 0,-0.133 -0.053,-0.26 -0.146,-0.354 C 135.76,13.053 135.633,13 135.5,13 c -0.555,0 -1.445,0 -2,0 -0.133,0 -0.26,0.053 -0.354,0.146 C 133.053,13.24 133,13.367 133,13.5 c 0,0.133 0.053,0.26 0.146,0.354 0.094,0.093 0.221,0.146 0.354,0.146 0.555,0 1.445,0 2,0 0.133,0 0.26,-0.053 0.354,-0.146 C 135.947,13.76 136,13.633 136,13.5 Z m 3,0 c 0,-0.133 -0.053,-0.26 -0.146,-0.354 C 138.76,13.053 138.633,13 138.5,13 c -0.305,0 -0.695,0 -1,0 -0.133,0 -0.26,0.053 -0.354,0.146 C 137.053,13.24 137,13.367 137,13.5 c 0,0.133 0.053,0.26 0.146,0.354 0.094,0.093 0.221,0.146 0.354,0.146 0.305,0 0.695,0 1,0 0.133,0 0.26,-0.053 0.354,-0.146 C 138.947,13.76 139,13.633 139,13.5 Z m 4,0 c 0,-0.133 -0.053,-0.26 -0.146,-0.354 C 142.76,13.053 142.633,13 142.5,13 c -0.555,0 -1.445,0 -2,0 -0.133,0 -0.26,0.053 -0.354,0.146 C 140.053,13.24 140,13.367 140,13.5 c 0,0.133 0.053,0.26 0.146,0.354 0.094,0.093 0.221,0.146 0.354,0.146 0.555,0 1.445,0 2,0 0.133,0 0.26,-0.053 0.354,-0.146 C 142.947,13.76 143,13.633 143,13.5 Z"
id="path5-1" /></g><g
transform="matrix(-1.33333,0,0,1,133.33304,227.00003)"
id="g11-2"
style="clip-rule:evenodd;fill-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2"><path
inkscape:connector-curvature="0"
d="M 13,14.008 V 9.992 c 0,-0.188 0.08,-0.36 0.206,-0.444 0.126,-0.084 0.277,-0.065 0.389,0.047 0.601,0.601 1.511,1.511 2.022,2.022 0.091,0.091 0.144,0.232 0.144,0.383 0,0.151 -0.053,0.292 -0.144,0.383 -0.511,0.511 -1.421,1.421 -2.022,2.022 -0.112,0.112 -0.263,0.131 -0.389,0.047 C 13.08,14.368 13,14.196 13,14.008 Z"
id="path9-2" /></g><g
transform="matrix(0,1,1,0,59.00004,102.00003)"
id="g15"
style="clip-rule:evenodd;fill-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2"><path
inkscape:connector-curvature="0"
d="m 138,56.526 c 0,-0.14 -0.055,-0.274 -0.154,-0.372 C 137.748,56.055 137.614,56 137.474,56 c -0.292,0 -0.656,0 -0.948,0 -0.14,0 -0.274,0.055 -0.372,0.154 -0.099,0.098 -0.154,0.232 -0.154,0.372 0,1.136 0,3.812 0,4.948 0,0.14 0.055,0.274 0.154,0.372 0.098,0.099 0.232,0.154 0.372,0.154 0.292,0 0.656,0 0.948,0 0.14,0 0.274,-0.055 0.372,-0.154 0.099,-0.098 0.154,-0.232 0.154,-0.372 0,-1.136 0,-3.812 0,-4.948 z"
id="path13" /></g><g
transform="matrix(1.33333,0,0,1,102.66646,227.00003)"
id="g11-2-0"
style="clip-rule:evenodd;fill-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2"><path
inkscape:connector-curvature="0"
d="M 13,14.008 V 9.992 c 0,-0.188 0.08,-0.36 0.206,-0.444 0.126,-0.084 0.277,-0.065 0.389,0.047 0.601,0.601 1.511,1.511 2.022,2.022 0.091,0.091 0.144,0.232 0.144,0.383 0,0.151 -0.053,0.292 -0.144,0.383 -0.511,0.511 -1.421,1.421 -2.022,2.022 -0.112,0.112 -0.263,0.131 -0.389,0.047 C 13.08,14.368 13,14.196 13,14.008 Z"
id="path9-2-8" /></g></g></g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 5.6 KiB

View file

@ -0,0 +1,84 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="16px"
height="16px"
version="1.1"
xml:space="preserve"
style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"
id="svg20"
sodipodi:docname="auto_stretch_on.svg"
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"><metadata
id="metadata26"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
id="defs24"><pattern
y="0"
x="0"
height="6"
width="6"
patternUnits="userSpaceOnUse"
id="EMFhbasepattern" /></defs><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="1013"
id="namedview22"
showgrid="true"
inkscape:zoom="41.7193"
inkscape:cx="3.1136136"
inkscape:cy="9.6692213"
inkscape:window-x="-9"
inkscape:window-y="-9"
inkscape:window-maximized="1"
inkscape:current-layer="svg20"><inkscape:grid
type="xygrid"
id="grid833" /></sodipodi:namedview>
<g
id="g972"><g
id="bg-1"
transform="matrix(-0.110345,0,0,0.121212,32.22074,-18.909056)"
style="clip-rule:evenodd;fill-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2"><rect
x="147"
y="156"
width="145"
height="132"
style="fill:#878787;fill-opacity:0"
id="rect2-3" /></g><g
transform="translate(-129.99996,-9.999966)"
id="g7-2"
style="clip-rule:evenodd;fill-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2"><path
inkscape:connector-curvature="0"
d="M 143.025,25 C 144.116,25 145,24.116 145,23.025 V 12.984 c 0,-0.527 -0.209,-1.031 -0.581,-1.403 C 144.047,11.209 143.543,11 143.016,11 c -2.663,0 -7.369,0 -10.032,0 -0.527,0 -1.031,0.209 -1.403,0.581 -0.372,0.372 -0.581,0.876 -0.581,1.403 v 10.032 c 0,0.527 0.209,1.031 0.581,1.403 0.372,0.372 0.876,0.581 1.403,0.581 2.666,0 7.378,0 10.041,0 z m 0.014,-1 C 143.57,24 144,23.57 144,23.039 V 13.017 c 0,-0.269 -0.107,-0.528 -0.298,-0.719 C 143.511,12.107 143.252,12 142.983,12 h -9.966 c -0.269,0 -0.528,0.107 -0.719,0.298 -0.191,0.191 -0.298,0.45 -0.298,0.719 v 9.966 c 0,0.269 0.107,0.528 0.298,0.719 0.191,0.191 0.45,0.298 0.719,0.298 z M 136,13.5 c 0,-0.133 -0.053,-0.26 -0.146,-0.354 C 135.76,13.053 135.633,13 135.5,13 c -0.555,0 -1.445,0 -2,0 -0.133,0 -0.26,0.053 -0.354,0.146 C 133.053,13.24 133,13.367 133,13.5 c 0,0.133 0.053,0.26 0.146,0.354 0.094,0.093 0.221,0.146 0.354,0.146 0.555,0 1.445,0 2,0 0.133,0 0.26,-0.053 0.354,-0.146 C 135.947,13.76 136,13.633 136,13.5 Z m 3,0 c 0,-0.133 -0.053,-0.26 -0.146,-0.354 C 138.76,13.053 138.633,13 138.5,13 c -0.305,0 -0.695,0 -1,0 -0.133,0 -0.26,0.053 -0.354,0.146 C 137.053,13.24 137,13.367 137,13.5 c 0,0.133 0.053,0.26 0.146,0.354 0.094,0.093 0.221,0.146 0.354,0.146 0.305,0 0.695,0 1,0 0.133,0 0.26,-0.053 0.354,-0.146 C 138.947,13.76 139,13.633 139,13.5 Z m 4,0 c 0,-0.133 -0.053,-0.26 -0.146,-0.354 C 142.76,13.053 142.633,13 142.5,13 c -0.555,0 -1.445,0 -2,0 -0.133,0 -0.26,0.053 -0.354,0.146 C 140.053,13.24 140,13.367 140,13.5 c 0,0.133 0.053,0.26 0.146,0.354 0.094,0.093 0.221,0.146 0.354,0.146 0.555,0 1.445,0 2,0 0.133,0 0.26,-0.053 0.354,-0.146 C 142.947,13.76 143,13.633 143,13.5 Z"
id="path5-1" /></g><g
transform="matrix(-1.33333,0,0,1,23.33304,-2.9999663)"
id="g11-2"
style="clip-rule:evenodd;fill-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2"><path
inkscape:connector-curvature="0"
d="M 13,14.008 V 9.992 c 0,-0.188 0.08,-0.36 0.206,-0.444 0.126,-0.084 0.277,-0.065 0.389,0.047 0.601,0.601 1.511,1.511 2.022,2.022 0.091,0.091 0.144,0.232 0.144,0.383 0,0.151 -0.053,0.292 -0.144,0.383 -0.511,0.511 -1.421,1.421 -2.022,2.022 -0.112,0.112 -0.263,0.131 -0.389,0.047 C 13.08,14.368 13,14.196 13,14.008 Z"
id="path9-2" /></g><g
transform="matrix(0,1,1,0,-50.99996,-127.99996)"
id="g15"
style="clip-rule:evenodd;fill-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2"><path
inkscape:connector-curvature="0"
d="m 138,56.526 c 0,-0.14 -0.055,-0.274 -0.154,-0.372 C 137.748,56.055 137.614,56 137.474,56 c -0.292,0 -0.656,0 -0.948,0 -0.14,0 -0.274,0.055 -0.372,0.154 -0.099,0.098 -0.154,0.232 -0.154,0.372 0,1.136 0,3.812 0,4.948 0,0.14 0.055,0.274 0.154,0.372 0.098,0.099 0.232,0.154 0.372,0.154 0.292,0 0.656,0 0.948,0 0.14,0 0.274,-0.055 0.372,-0.154 0.099,-0.098 0.154,-0.232 0.154,-0.372 0,-1.136 0,-3.812 0,-4.948 z"
id="path13" /></g><g
transform="matrix(1.33333,0,0,1,-7.33354,-2.9999663)"
id="g11-2-0"
style="clip-rule:evenodd;fill-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2"><path
inkscape:connector-curvature="0"
d="M 13,14.008 V 9.992 c 0,-0.188 0.08,-0.36 0.206,-0.444 0.126,-0.084 0.277,-0.065 0.389,0.047 0.601,0.601 1.511,1.511 2.022,2.022 0.091,0.091 0.144,0.232 0.144,0.383 0,0.151 -0.053,0.292 -0.144,0.383 -0.511,0.511 -1.421,1.421 -2.022,2.022 -0.112,0.112 -0.263,0.131 -0.389,0.047 C 13.08,14.368 13,14.196 13,14.008 Z"
id="path9-2-8" /></g></g></svg>

After

Width:  |  Height:  |  Size: 5.6 KiB

View file

@ -0,0 +1,76 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="16px"
height="16px"
version="1.1"
xml:space="preserve"
style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"
id="svg20"
sodipodi:docname="create_in_hold.svg"
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"><metadata
id="metadata26"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
id="defs24" /><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="1013"
id="namedview22"
showgrid="true"
inkscape:zoom="41.7193"
inkscape:cx="6.6245639"
inkscape:cy="7.9681097"
inkscape:window-x="-9"
inkscape:window-y="-9"
inkscape:window-maximized="1"
inkscape:current-layer="g18"><inkscape:grid
type="xygrid"
id="grid833" /></sodipodi:namedview>
<g
transform="matrix(1,0,0,1,-170,-210)"
id="g18">
<g
id="new_vector_level"
transform="matrix(1,0,0,1,60,-20)">
<g
style="clip-rule:evenodd;fill-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2"
id="g7-2-5"
transform="matrix(0.69903672,0,0,0.69524211,35.926889,227.68498)"><path
style="stroke-width:0.91642898"
d="m 112.28184,10.521543 c -0.53849,0 -1.05322,0.171827 -1.43334,0.477577 -0.3801,0.30575 -0.59233,0.718655 -0.59233,1.151802 v 8.245216 c 0,0.43315 0.21223,0.848861 0.59233,1.154612 0.38012,0.305751 0.89485,0.477576 1.43334,0.477576 h 10.26244 c 1.11481,0 2.01729,-0.727053 2.01729,-1.623759 v -8.253645 c 0,-0.433147 -0.21501,-0.846052 -0.59513,-1.151802 -0.38012,-0.30575 -0.89483,-0.477577 -1.43333,-0.477577 z m -0.59513,1.438348 h 2.86108 v 1.438348 h -2.86108 z m 5.15218,0 h 1.43054 v 1.438348 h -1.43054 z m 3.43106,0 h 2.86108 v 1.438348 h -2.86108 z"
id="path5-1-8"
inkscape:connector-curvature="0" /></g><g
style="clip-rule:evenodd;fill-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2"
transform="matrix(-0.110345,0,0,0.121212,142.22074,211.09094)"
id="bg-1"><rect
id="rect2-3"
style="fill:#878787;fill-opacity:0"
height="132"
width="145"
y="156"
x="147" /></g><g
style="clip-rule:evenodd;fill-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2"
id="g7-2"
transform="translate(-19.999963,220.00003)"><path
id="path5-1"
d="M 143.025,25 C 144.116,25 145,24.116 145,23.025 V 12.984 c 0,-0.527 -0.209,-1.031 -0.581,-1.403 C 144.047,11.209 143.543,11 143.016,11 c -2.663,0 -7.369,0 -10.032,0 -0.527,0 -1.031,0.209 -1.403,0.581 -0.372,0.372 -0.581,0.876 -0.581,1.403 v 10.032 c 0,0.527 0.209,1.031 0.581,1.403 0.372,0.372 0.876,0.581 1.403,0.581 2.666,0 7.378,0 10.041,0 z m 0.014,-1 C 143.57,24 144,23.57 144,23.039 V 13.017 c 0,-0.269 -0.107,-0.528 -0.298,-0.719 C 143.511,12.107 143.252,12 142.983,12 h -9.966 c -0.269,0 -0.528,0.107 -0.719,0.298 -0.191,0.191 -0.298,0.45 -0.298,0.719 v 9.966 c 0,0.269 0.107,0.528 0.298,0.719 0.191,0.191 0.45,0.298 0.719,0.298 z M 136,13.5 c 0,-0.133 -0.053,-0.26 -0.146,-0.354 C 135.76,13.053 135.633,13 135.5,13 c -0.555,0 -1.445,0 -2,0 -0.133,0 -0.26,0.053 -0.354,0.146 C 133.053,13.24 133,13.367 133,13.5 c 0,0.133 0.053,0.26 0.146,0.354 0.094,0.093 0.221,0.146 0.354,0.146 0.555,0 1.445,0 2,0 0.133,0 0.26,-0.053 0.354,-0.146 C 135.947,13.76 136,13.633 136,13.5 Z m 3,0 c 0,-0.133 -0.053,-0.26 -0.146,-0.354 C 138.76,13.053 138.633,13 138.5,13 c -0.305,0 -0.695,0 -1,0 -0.133,0 -0.26,0.053 -0.354,0.146 C 137.053,13.24 137,13.367 137,13.5 c 0,0.133 0.053,0.26 0.146,0.354 0.094,0.093 0.221,0.146 0.354,0.146 0.305,0 0.695,0 1,0 0.133,0 0.26,-0.053 0.354,-0.146 C 138.947,13.76 139,13.633 139,13.5 Z m 4,0 c 0,-0.133 -0.053,-0.26 -0.146,-0.354 C 142.76,13.053 142.633,13 142.5,13 c -0.555,0 -1.445,0 -2,0 -0.133,0 -0.26,0.053 -0.354,0.146 C 140.053,13.24 140,13.367 140,13.5 c 0,0.133 0.053,0.26 0.146,0.354 0.094,0.093 0.221,0.146 0.354,0.146 0.555,0 1.445,0 2,0 0.133,0 0.26,-0.053 0.354,-0.146 C 142.947,13.76 143,13.633 143,13.5 Z"
inkscape:connector-curvature="0" /></g></g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.6 KiB

View file

@ -0,0 +1,88 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="16px"
height="16px"
version="1.1"
xml:space="preserve"
style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"
id="svg20"
sodipodi:docname="create_in_hold_on.svg"
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"><metadata
id="metadata26"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
id="defs24" /><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="1013"
id="namedview22"
showgrid="true"
inkscape:zoom="41.7193"
inkscape:cx="6.6457109"
inkscape:cy="7.9681097"
inkscape:window-x="-9"
inkscape:window-y="-9"
inkscape:window-maximized="1"
inkscape:current-layer="new_vector_level"><inkscape:grid
type="xygrid"
id="grid833" /></sodipodi:namedview>
<g
transform="matrix(1,0,0,1,-170,-210)"
id="g18">
<g
id="new_vector_level"
transform="matrix(1,0,0,1,60,-20)">
<g
style="clip-rule:evenodd;fill-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2"
transform="matrix(-0.110345,0,0,0.121212,142.22074,211.09094)"
id="bg-1"><rect
id="rect2-3"
style="fill:#878787;fill-opacity:0"
height="132"
width="145"
y="156"
x="147" /></g><g
style="clip-rule:evenodd;fill-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2"
id="new_vector_level-5"
transform="translate(0,4e-6)"><g
style="clip-rule:evenodd;fill-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2"
id="g7-2-5"
transform="matrix(0.69903672,0,0,0.69524211,35.926889,227.68498)"><path
style="stroke-width:0.91642898"
d="m 112.28184,10.521543 c -0.53849,0 -1.05322,0.171827 -1.43334,0.477577 -0.3801,0.30575 -0.59233,0.718655 -0.59233,1.151802 v 8.245216 c 0,0.43315 0.21223,0.848861 0.59233,1.154612 0.38012,0.305751 0.89485,0.477576 1.43334,0.477576 h 10.26244 c 1.11481,0 2.01729,-0.727053 2.01729,-1.623759 v -8.253645 c 0,-0.433147 -0.21501,-0.846052 -0.59513,-1.151802 -0.38012,-0.30575 -0.89483,-0.477577 -1.43333,-0.477577 z m -0.59513,1.438348 h 2.86108 v 1.438348 h -2.86108 z m 5.15218,0 h 1.43054 v 1.438348 h -1.43054 z m 3.43106,0 h 2.86108 v 1.438348 h -2.86108 z"
id="path5-1-8"
inkscape:connector-curvature="0" /></g><g
style="clip-rule:evenodd;fill-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2"
transform="matrix(-0.110345,0,0,0.121212,142.22074,211.09094)"
id="bg-1-8"><rect
id="rect2-3-0"
style="fill:#878787;fill-opacity:0"
height="132"
width="145"
y="156"
x="147" /></g><g
style="clip-rule:evenodd;fill-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2"
id="g7-2-8"
transform="translate(-19.999963,220.00003)"><path
id="path5-1-0"
d="M 143.025,25 C 144.116,25 145,24.116 145,23.025 V 12.984 c 0,-0.527 -0.209,-1.031 -0.581,-1.403 C 144.047,11.209 143.543,11 143.016,11 c -2.663,0 -7.369,0 -10.032,0 -0.527,0 -1.031,0.209 -1.403,0.581 -0.372,0.372 -0.581,0.876 -0.581,1.403 v 10.032 c 0,0.527 0.209,1.031 0.581,1.403 0.372,0.372 0.876,0.581 1.403,0.581 2.666,0 7.378,0 10.041,0 z m 0.014,-1 C 143.57,24 144,23.57 144,23.039 V 13.017 c 0,-0.269 -0.107,-0.528 -0.298,-0.719 C 143.511,12.107 143.252,12 142.983,12 h -9.966 c -0.269,0 -0.528,0.107 -0.719,0.298 -0.191,0.191 -0.298,0.45 -0.298,0.719 v 9.966 c 0,0.269 0.107,0.528 0.298,0.719 0.191,0.191 0.45,0.298 0.719,0.298 z M 136,13.5 c 0,-0.133 -0.053,-0.26 -0.146,-0.354 C 135.76,13.053 135.633,13 135.5,13 c -0.555,0 -1.445,0 -2,0 -0.133,0 -0.26,0.053 -0.354,0.146 C 133.053,13.24 133,13.367 133,13.5 c 0,0.133 0.053,0.26 0.146,0.354 0.094,0.093 0.221,0.146 0.354,0.146 0.555,0 1.445,0 2,0 0.133,0 0.26,-0.053 0.354,-0.146 C 135.947,13.76 136,13.633 136,13.5 Z m 3,0 c 0,-0.133 -0.053,-0.26 -0.146,-0.354 C 138.76,13.053 138.633,13 138.5,13 c -0.305,0 -0.695,0 -1,0 -0.133,0 -0.26,0.053 -0.354,0.146 C 137.053,13.24 137,13.367 137,13.5 c 0,0.133 0.053,0.26 0.146,0.354 0.094,0.093 0.221,0.146 0.354,0.146 0.305,0 0.695,0 1,0 0.133,0 0.26,-0.053 0.354,-0.146 C 138.947,13.76 139,13.633 139,13.5 Z m 4,0 c 0,-0.133 -0.053,-0.26 -0.146,-0.354 C 142.76,13.053 142.633,13 142.5,13 c -0.555,0 -1.445,0 -2,0 -0.133,0 -0.26,0.053 -0.354,0.146 C 140.053,13.24 140,13.367 140,13.5 c 0,0.133 0.053,0.26 0.146,0.354 0.094,0.093 0.221,0.146 0.354,0.146 0.555,0 1.445,0 2,0 0.133,0 0.26,-0.053 0.354,-0.146 C 142.947,13.76 143,13.633 143,13.5 Z"
inkscape:connector-curvature="0" /></g></g></g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 5.2 KiB

View file

@ -16,6 +16,8 @@
#include "toonzqt/gutil.h" #include "toonzqt/gutil.h"
#include <QToolButton>
using XsheetGUI::ColumnArea; using XsheetGUI::ColumnArea;
LayerFooterPanel::LayerFooterPanel(XsheetViewer *viewer, QWidget *parent, LayerFooterPanel::LayerFooterPanel(XsheetViewer *viewer, QWidget *parent,
@ -37,8 +39,54 @@ LayerFooterPanel::LayerFooterPanel(XsheetViewer *viewer, QWidget *parent,
m_frameZoomSlider->setValue(m_viewer->getFrameZoomFactor()); m_frameZoomSlider->setValue(m_viewer->getFrameZoomFactor());
m_frameZoomSlider->setToolTip(tr("Zoom in/out of timeline")); m_frameZoomSlider->setToolTip(tr("Zoom in/out of timeline"));
m_autoCreateButton = new QToolButton(this);
m_createInHoldButton = new QToolButton(this);
m_autoStretchButton = new QToolButton(this);
m_autoCreateButton->setObjectName("ToolbarToolButton");
m_autoCreateButton->setFixedSize(o->rect(PredefinedRect::AUTO_CREATE).size());
m_autoCreateButton->setIconSize(QSize(15, 15));
m_autoCreateButton->setIcon(createQIcon("auto_create"));
m_autoCreateButton->setToolTip(
tr("Toggles the auto-creation of frames when drawing in blank cells on "
"the timeline/xsheet."));
m_autoCreateButton->setCheckable(true);
m_createInHoldButton->setObjectName("ToolbarToolButton");
m_createInHoldButton->setFixedSize(
o->rect(PredefinedRect::CREATE_IN_HOLD).size());
m_createInHoldButton->setIconSize(QSize(15, 15));
m_createInHoldButton->setIcon(createQIcon("create_in_hold"));
m_createInHoldButton->setToolTip(
tr("Toggles the auto-creation of frames when drawing in held cells on "
"the timeline/xsheet."));
m_createInHoldButton->setCheckable(true);
m_autoStretchButton->setObjectName("ToolbarToolButton");
m_autoStretchButton->setFixedSize(
o->rect(PredefinedRect::AUTO_STRETCH).size());
m_autoStretchButton->setIconSize(QSize(15, 15));
m_autoStretchButton->setIcon(createQIcon("auto_stretch"));
m_autoStretchButton->setToolTip(
tr("Toggles the auto-stretch of a frame to the next frame."));
m_autoStretchButton->setCheckable(true);
connect(m_frameZoomSlider, SIGNAL(valueChanged(int)), this, connect(m_frameZoomSlider, SIGNAL(valueChanged(int)), this,
SLOT(onFrameZoomSliderValueChanged(int))); SLOT(onFrameZoomSliderValueChanged(int)));
connect(m_autoCreateButton, &QToolButton::clicked, [=]() {
CommandManager::instance()->getAction("MI_ToggleAutoCreate")->trigger();
});
connect(m_createInHoldButton, &QToolButton::clicked, [=]() {
CommandManager::instance()
->getAction("MI_ToggleCreationInHoldCells")
->trigger();
});
connect(m_autoStretchButton, &QToolButton::clicked, [=]() {
CommandManager::instance()->getAction("MI_ToggleAutoStretch")->trigger();
});
} }
LayerFooterPanel::~LayerFooterPanel() {} LayerFooterPanel::~LayerFooterPanel() {}
@ -100,6 +148,22 @@ void LayerFooterPanel::paintEvent(QPaintEvent *event) {
// svgToPixmap(":Resources/new_level_rollover.svg"); // svgToPixmap(":Resources/new_level_rollover.svg");
// const QRect addLevelImgRect = o->rect(PredefinedRect::ADD_LEVEL); // const QRect addLevelImgRect = o->rect(PredefinedRect::ADD_LEVEL);
m_autoCreateButton->setGeometry(o->rect(PredefinedRect::AUTO_CREATE));
m_autoCreateButton->setChecked(CommandManager::instance()
->getAction("MI_ToggleAutoCreate")
->isChecked());
m_createInHoldButton->setGeometry(o->rect(PredefinedRect::CREATE_IN_HOLD));
m_createInHoldButton->setChecked(
CommandManager::instance()
->getAction("MI_ToggleCreationInHoldCells")
->isChecked());
m_autoStretchButton->setGeometry(o->rect(PredefinedRect::AUTO_STRETCH));
m_autoStretchButton->setChecked(CommandManager::instance()
->getAction("MI_ToggleAutoStretch")
->isChecked());
p.setRenderHint(QPainter::SmoothPixmapTransform, true); p.setRenderHint(QPainter::SmoothPixmapTransform, true);
if (m_zoomInHighlighted) if (m_zoomInHighlighted)
p.drawPixmap(zoomInImgRect, zoomInRollover); p.drawPixmap(zoomInImgRect, zoomInRollover);
@ -120,6 +184,8 @@ void LayerFooterPanel::paintEvent(QPaintEvent *event) {
QLine line = {leftSide(shorter(zoomOutImgRect)).translated(-4, 0)}; QLine line = {leftSide(shorter(zoomOutImgRect)).translated(-4, 0)};
p.drawLine(line); p.drawLine(line);
QLine line2 = {leftSide(shorter(noteObjRect)).translated(-4, 0)};
p.drawLine(line2);
} }
void LayerFooterPanel::showOrHide(const Orientation *o) { void LayerFooterPanel::showOrHide(const Orientation *o) {

View file

@ -28,6 +28,7 @@ class LayerFooterPanel final : public QWidget {
bool m_zoomInHighlighted = false; bool m_zoomInHighlighted = false;
bool m_zoomOutHighlighted = false; bool m_zoomOutHighlighted = false;
// bool m_addLevelHighlighted = false; // bool m_addLevelHighlighted = false;
QToolButton *m_autoCreateButton, *m_createInHoldButton, *m_autoStretchButton;
private: private:
XsheetViewer *m_viewer; XsheetViewer *m_viewer;

View file

@ -2460,6 +2460,21 @@ void MainWindow::defineActions() {
QT_TR_NOOP("&Save As Default Palette"), "", "", QT_TR_NOOP("&Save As Default Palette"), "", "",
tr("Save the current style palette as the default " tr("Save the current style palette as the default "
"for new levels of the current level type.")); "for new levels of the current level type."));
createToggle(MI_ToggleAutoCreate, QT_TR_NOOP("Toggle Auto-Creation"), "",
Preferences::instance()->isAutoCreateEnabled(),
MiscCommandType, "auto_create",
tr("Toggles the auto-creation of frames when drawing in blank "
"cells on the timeline/xsheet."));
createToggle(MI_ToggleCreationInHoldCells,
QT_TR_NOOP("Toggle Creation In Hold Cells"), "",
Preferences::instance()->isCreationInHoldCellsEnabled(),
MiscCommandType, "create_in_hold",
tr("Toggles the auto-creation of frames when drawing in held "
"cells on the timeline/xsheet."));
createToggle(MI_ToggleAutoStretch, QT_TR_NOOP("Toggle Auto-Stretch"), "",
Preferences::instance()->isAutoStretchEnabled(),
MiscCommandType, "auto_stretch",
tr("Toggles the auto-stretch of a frame to the next frame"));
// Tools // Tools

View file

@ -467,4 +467,9 @@
#define MI_FlipPrevGuideStroke "MI_FlipPrevGuideStroke" #define MI_FlipPrevGuideStroke "MI_FlipPrevGuideStroke"
#define MI_ExportXDTS "MI_ExportXDTS" #define MI_ExportXDTS "MI_ExportXDTS"
#define MI_ToggleAutoCreate "MI_ToggleAutoCreate"
#define MI_ToggleCreationInHoldCells "MI_ToggleCreationInHoldCells"
#define MI_ToggleAutoStretch "MI_ToggleAutoStretch"
#endif #endif

View file

@ -312,6 +312,12 @@
<file>icons/dark/actions/16/save_all_levels.svg</file> <file>icons/dark/actions/16/save_all_levels.svg</file>
<file>icons/dark/actions/16/replace_level.svg</file> <file>icons/dark/actions/16/replace_level.svg</file>
<file>icons/dark/actions/16/export_level.svg</file> <file>icons/dark/actions/16/export_level.svg</file>
<file>icons/dark/actions/16/auto_create.svg</file>
<file>icons/dark/actions/16/auto_create_on.svg</file>
<file>icons/dark/actions/16/auto_stretch.svg</file>
<file>icons/dark/actions/16/auto_stretch_on.svg</file>
<file>icons/dark/actions/16/create_in_hold.svg</file>
<file>icons/dark/actions/16/create_in_hold_on.svg</file>
<file>icons/dark/actions/16/on_1s.svg</file> <file>icons/dark/actions/16/on_1s.svg</file>
<file>icons/dark/actions/16/on_2s.svg</file> <file>icons/dark/actions/16/on_2s.svg</file>

View file

@ -235,6 +235,58 @@ public:
} }
} insertSceneFrameCommand; } insertSceneFrameCommand;
//=============================================================================
class ToggleAutoCreateCommand final : public MenuItemHandler {
public:
ToggleAutoCreateCommand() : MenuItemHandler(MI_ToggleAutoCreate) {}
void execute() override {
bool currentAutoCreateEnabled =
Preferences::instance()->isAutoCreateEnabled();
if (CommandManager::instance()
->getAction(MI_ToggleAutoCreate)
->isChecked() == currentAutoCreateEnabled)
return;
Preferences::instance()->setValue(EnableAutocreation,
!currentAutoCreateEnabled);
}
} ToggleAutoCreateCommand;
//=============================================================================
class ToggleCreationInHoldCellsCommand final : public MenuItemHandler {
public:
ToggleCreationInHoldCellsCommand()
: MenuItemHandler(MI_ToggleCreationInHoldCells) {}
void execute() override {
bool currentCreationInHoldCells =
Preferences::instance()->isCreationInHoldCellsEnabled();
if (CommandManager::instance()
->getAction(MI_ToggleCreationInHoldCells)
->isChecked() == currentCreationInHoldCells)
return;
Preferences::instance()->setValue(EnableCreationInHoldCells,
!currentCreationInHoldCells);
}
} ToggleCreationInHoldCellsCommand;
//=============================================================================
class ToggleAutoStretchCommand final : public MenuItemHandler {
public:
ToggleAutoStretchCommand() : MenuItemHandler(MI_ToggleAutoStretch) {}
void execute() override {
bool currentAutoStretchEnabled =
Preferences::instance()->isAutoStretchEnabled();
if (CommandManager::instance()
->getAction(MI_ToggleAutoStretch)
->isChecked() == currentAutoStretchEnabled)
return;
Preferences::instance()->setValue(EnableAutoStretch,
!currentAutoStretchEnabled);
}
} ToggleAutoStretchCommand;
//***************************************************************************** //*****************************************************************************
// RemoveSceneFrame command // RemoveSceneFrame command
//***************************************************************************** //*****************************************************************************

View file

@ -459,8 +459,12 @@ NoteArea::NoteArea(XsheetViewer *parent, Qt::WFlags flags)
, m_noteButton(nullptr) , m_noteButton(nullptr)
, m_precNoteButton(nullptr) , m_precNoteButton(nullptr)
, m_nextNoteButton(nullptr) , m_nextNoteButton(nullptr)
, m_autoCreateButton(nullptr)
, m_createInHoldButton(nullptr)
, m_autoStretchButton(nullptr)
, m_frameDisplayStyleCombo(nullptr) , m_frameDisplayStyleCombo(nullptr)
, m_layerHeaderPanel(nullptr) { , m_layerHeaderPanel(nullptr) {
const Orientation *o = m_viewer->orientation();
setFrameStyle(QFrame::StyledPanel); setFrameStyle(QFrame::StyledPanel);
setObjectName("cornerWidget"); setObjectName("cornerWidget");
@ -470,6 +474,9 @@ NoteArea::NoteArea(XsheetViewer *parent, Qt::WFlags flags)
m_precNoteButton = new QToolButton(this); m_precNoteButton = new QToolButton(this);
m_nextNoteButton = new QToolButton(this); m_nextNoteButton = new QToolButton(this);
m_newLevelButton = new QToolButton(this); m_newLevelButton = new QToolButton(this);
m_autoCreateButton = new QToolButton(this);
m_createInHoldButton = new QToolButton(this);
m_autoStretchButton = new QToolButton(this);
m_frameDisplayStyleCombo = new QComboBox(this); m_frameDisplayStyleCombo = new QComboBox(this);
m_layerHeaderPanel = new LayerHeaderPanel(m_viewer, this); m_layerHeaderPanel = new LayerHeaderPanel(m_viewer, this);
@ -511,6 +518,34 @@ NoteArea::NoteArea(XsheetViewer *parent, Qt::WFlags flags)
m_nextNoteButton->setIcon(createQIcon("nextkey")); m_nextNoteButton->setIcon(createQIcon("nextkey"));
m_nextNoteButton->setToolTip(tr("Next Memo")); m_nextNoteButton->setToolTip(tr("Next Memo"));
m_autoCreateButton->setObjectName("ToolbarToolButton");
m_autoCreateButton->setFixedSize(o->rect(PredefinedRect::AUTO_CREATE).size());
m_autoCreateButton->setIconSize(QSize(16, 16));
m_autoCreateButton->setIcon(createQIcon("auto_create"));
m_autoCreateButton->setToolTip(
tr("Toggles the auto-creation of frames when drawing in blank cells on "
"the timeline/xsheet."));
m_autoCreateButton->setCheckable(true);
m_createInHoldButton->setObjectName("ToolbarToolButton");
m_createInHoldButton->setFixedSize(
o->rect(PredefinedRect::CREATE_IN_HOLD).size());
m_createInHoldButton->setIconSize(QSize(16, 16));
m_createInHoldButton->setIcon(createQIcon("create_in_hold"));
m_createInHoldButton->setToolTip(
tr("Toggles the auto-creation of frames when drawing in held cells on "
"the timeline/xsheet."));
m_createInHoldButton->setCheckable(true);
m_autoStretchButton->setObjectName("ToolbarToolButton");
m_autoStretchButton->setFixedSize(
o->rect(PredefinedRect::AUTO_STRETCH).size());
m_autoStretchButton->setIconSize(QSize(16, 16));
m_autoStretchButton->setIcon(createQIcon("auto_stretch"));
m_autoStretchButton->setToolTip(
tr("Toggles the auto-stretch of a frame to the next frame."));
m_autoStretchButton->setCheckable(true);
QStringList frameDisplayStyles; QStringList frameDisplayStyles;
frameDisplayStyles << tr("Frame") << tr("Sec Frame") << tr("6sec Sheet") frameDisplayStyles << tr("Frame") << tr("Sec Frame") << tr("6sec Sheet")
<< tr("3sec Sheet"); << tr("3sec Sheet");
@ -536,6 +571,21 @@ NoteArea::NoteArea(XsheetViewer *parent, Qt::WFlags flags)
CommandManager::instance()->execute("MI_NewLevel"); CommandManager::instance()->execute("MI_NewLevel");
}); });
ret =
ret && connect(m_autoCreateButton, &QToolButton::clicked, [=]() {
CommandManager::instance()->getAction("MI_ToggleAutoCreate")->trigger();
});
ret = ret && connect(m_createInHoldButton, &QToolButton::clicked, [=]() {
CommandManager::instance()
->getAction("MI_ToggleCreationInHoldCells")
->trigger();
});
ret = ret && connect(m_autoStretchButton, &QToolButton::clicked, [=]() {
CommandManager::instance()
->getAction("MI_ToggleAutoStretch")
->trigger();
});
ret = ret =
ret && connect(m_frameDisplayStyleCombo, SIGNAL(currentIndexChanged(int)), ret && connect(m_frameDisplayStyleCombo, SIGNAL(currentIndexChanged(int)),
this, SLOT(onFrameDisplayStyleChanged(int))); this, SLOT(onFrameDisplayStyleChanged(int)));
@ -559,6 +609,9 @@ void NoteArea::removeLayout() {
currentLayout->removeWidget(m_precNoteButton); currentLayout->removeWidget(m_precNoteButton);
currentLayout->removeWidget(m_nextNoteButton); currentLayout->removeWidget(m_nextNoteButton);
currentLayout->removeWidget(m_newLevelButton); currentLayout->removeWidget(m_newLevelButton);
currentLayout->removeWidget(m_autoCreateButton);
currentLayout->removeWidget(m_createInHoldButton);
currentLayout->removeWidget(m_autoStretchButton);
currentLayout->removeWidget(m_frameDisplayStyleCombo); currentLayout->removeWidget(m_frameDisplayStyleCombo);
currentLayout->removeWidget(m_layerHeaderPanel); currentLayout->removeWidget(m_layerHeaderPanel);
delete currentLayout; delete currentLayout;
@ -588,6 +641,16 @@ void NoteArea::createLayout() {
mainLayout->addStretch(1); mainLayout->addStretch(1);
QHBoxLayout *AutoCreatebuttonsLayout = new QHBoxLayout();
AutoCreatebuttonsLayout->setMargin(0);
AutoCreatebuttonsLayout->setSpacing(0);
{
AutoCreatebuttonsLayout->addWidget(m_autoCreateButton, 0);
AutoCreatebuttonsLayout->addWidget(m_createInHoldButton, 0);
AutoCreatebuttonsLayout->addWidget(m_autoStretchButton, 0);
}
mainLayout->addLayout(AutoCreatebuttonsLayout, 0);
QHBoxLayout *buttonsLayout = new QHBoxLayout(); QHBoxLayout *buttonsLayout = new QHBoxLayout();
buttonsLayout->setMargin(0); buttonsLayout->setMargin(0);
buttonsLayout->setSpacing(0); buttonsLayout->setSpacing(0);
@ -611,10 +674,16 @@ void NoteArea::createLayout() {
m_precNoteButton->hide(); m_precNoteButton->hide();
m_nextNoteButton->hide(); m_nextNoteButton->hide();
m_noteButton->hide(); m_noteButton->hide();
m_autoCreateButton->hide();
m_createInHoldButton->hide();
m_autoStretchButton->hide();
} else { } else {
m_precNoteButton->show(); m_precNoteButton->show();
m_nextNoteButton->show(); m_nextNoteButton->show();
m_noteButton->show(); m_noteButton->show();
m_autoCreateButton->show();
m_createInHoldButton->show();
m_autoStretchButton->show();
} }
} }
@ -636,6 +705,19 @@ void NoteArea::updateButtons() {
} }
} }
void NoteArea::paintEvent(QPaintEvent *event) {
m_autoCreateButton->setChecked(CommandManager::instance()
->getAction("MI_ToggleAutoCreate")
->isChecked());
m_createInHoldButton->setChecked(
CommandManager::instance()
->getAction("MI_ToggleCreationInHoldCells")
->isChecked());
m_autoStretchButton->setChecked(CommandManager::instance()
->getAction("MI_ToggleAutoStretch")
->isChecked());
}
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// void NoteArea::flipOrientation() { m_viewer->flipOrientation(); } // void NoteArea::flipOrientation() { m_viewer->flipOrientation(); }

View file

@ -126,6 +126,9 @@ class NoteArea final : public QFrame {
QToolButton *m_nextNoteButton; QToolButton *m_nextNoteButton;
QToolButton *m_precNoteButton; QToolButton *m_precNoteButton;
QToolButton *m_newLevelButton; QToolButton *m_newLevelButton;
QToolButton *m_autoCreateButton;
QToolButton *m_createInHoldButton;
QToolButton *m_autoStretchButton;
QComboBox *m_frameDisplayStyleCombo; QComboBox *m_frameDisplayStyleCombo;
@ -151,6 +154,8 @@ protected slots:
void onXsheetOrientationChanged(const Orientation *orientation); void onXsheetOrientationChanged(const Orientation *orientation);
protected: protected:
void paintEvent(QPaintEvent *event) override;
void removeLayout(); void removeLayout();
void createLayout(); void createLayout();
}; };

View file

@ -338,6 +338,20 @@ TopToBottomOrientation::TopToBottomOrientation() {
addRect(PredefinedRect::NOTE_ICON, addRect(PredefinedRect::NOTE_ICON,
QRect(QPoint(0, 0), QSize(CELL_WIDTH - 2, CELL_HEIGHT - 2))); QRect(QPoint(0, 0), QSize(CELL_WIDTH - 2, CELL_HEIGHT - 2)));
QRect autoCreate, createInHold, autoStretch;
autoCreate = QRect(0, 0, 17, 17);
addRect(PredefinedRect::AUTO_CREATE_AREA, autoCreate);
addRect(PredefinedRect::AUTO_CREATE, autoCreate.adjusted(1, 1, 0, 0));
createInHold = QRect(0, 0, 17, 17);
addRect(PredefinedRect::CREATE_IN_HOLD_AREA, createInHold);
addRect(PredefinedRect::CREATE_IN_HOLD, createInHold.adjusted(1, 1, 0, 0));
autoStretch = QRect(0, 0, 17, 17);
addRect(PredefinedRect::AUTO_STRETCH_AREA, autoStretch);
addRect(PredefinedRect::AUTO_STRETCH, autoStretch.adjusted(1, 1, 0, 0));
// Layer header panel // Layer header panel
addRect(PredefinedRect::LAYER_HEADER_PANEL, QRect(0, 0, -1, -1)); // hide addRect(PredefinedRect::LAYER_HEADER_PANEL, QRect(0, 0, -1, -1)); // hide
addRect(PredefinedRect::PANEL_EYE, QRect(0, 0, -1, -1)); // hide addRect(PredefinedRect::PANEL_EYE, QRect(0, 0, -1, -1)); // hide
@ -1115,7 +1129,22 @@ LeftToRightOrientation::LeftToRightOrientation() {
QRect(0, 0, LAYER_HEADER_WIDTH + 2, LAYER_FOOTER_PANEL_HEIGHT)); QRect(0, 0, LAYER_HEADER_WIDTH + 2, LAYER_FOOTER_PANEL_HEIGHT));
addRect(PredefinedRect::LAYER_FOOTER_PANEL, layerFooterPanel); addRect(PredefinedRect::LAYER_FOOTER_PANEL, layerFooterPanel);
QRect zoomSlider, zoomIn, zoomOut, noteArea; // addLevel, QRect zoomSlider, zoomIn, zoomOut, noteArea, autoCreate, createInHold,
autoStretch; // addLevel,
autoCreate = QRect(1, 0, 16, LAYER_FOOTER_PANEL_HEIGHT);
addRect(PredefinedRect::AUTO_CREATE_AREA, autoCreate);
addRect(PredefinedRect::AUTO_CREATE, autoCreate.adjusted(1, 1, 0, 0));
createInHold =
QRect(autoCreate.right() + 1, 0, 16, LAYER_FOOTER_PANEL_HEIGHT);
addRect(PredefinedRect::CREATE_IN_HOLD_AREA, createInHold);
addRect(PredefinedRect::CREATE_IN_HOLD, createInHold.adjusted(1, 1, 0, 0));
autoStretch =
QRect(createInHold.right() + 1, 0, 16, LAYER_FOOTER_PANEL_HEIGHT);
addRect(PredefinedRect::AUTO_STRETCH_AREA, autoStretch);
addRect(PredefinedRect::AUTO_STRETCH, autoStretch.adjusted(1, 1, 0, 0));
zoomSlider = zoomSlider =
QRect(layerFooterPanel.width() - 100, 0, 81, LAYER_FOOTER_PANEL_HEIGHT); QRect(layerFooterPanel.width() - 100, 0, 81, LAYER_FOOTER_PANEL_HEIGHT);