level settings for multiple selection

This commit is contained in:
shun-iwasawa 2019-12-04 20:45:51 +09:00
parent e12bfdc57a
commit 29ceb28f22
12 changed files with 8947 additions and 464 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,58 @@
<?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"
xml:space="preserve"
style="enable-background:new 0 0 16 16;"
viewBox="0 0 16 16"
y="0px"
x="0px"
id="svg4489"
version="1.1"
sodipodi:docname="checkpartially.svg"
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="871"
inkscape:window-height="781"
id="namedview7"
showgrid="true"
inkscape:zoom="14.75"
inkscape:cx="8"
inkscape:cy="5.2881356"
inkscape:window-x="548"
inkscape:window-y="67"
inkscape:window-maximized="0"
inkscape:current-layer="svg4489"><inkscape:grid
type="xygrid"
id="grid814" /></sodipodi:namedview><metadata
id="metadata11"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
id="defs9" />
<style
id="style2"
type="text/css">
.st0{fill:none;stroke:#000000;stroke-width:4;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:1.5;stroke-opacity:0.5122;}
.st1{fill:none;stroke:#FFFFFF;stroke-width:4;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:1.5;}
</style>
<path
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
d="M 5,3 C 3.8954762,3.0001104 3.0001104,3.8954762 3,5 v 6 c 1.104e-4,1.104524 0.8954762,1.99989 2,2 h 6 c 1.104524,-1.1e-4 1.99989,-0.895476 2,-2 V 5 C 12.99989,3.8954762 12.104524,3.0001104 11,3 Z"
id="rect816"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccccccc" /></svg>

After

Width:  |  Height:  |  Size: 3.3 KiB

View file

@ -0,0 +1,58 @@
<?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"
xml:space="preserve"
style="enable-background:new 0 0 16 16;"
viewBox="0 0 16 16"
y="0px"
x="0px"
id="svg4489"
version="1.1"
sodipodi:docname="checkpartially_disabled.svg"
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="871"
inkscape:window-height="781"
id="namedview7"
showgrid="true"
inkscape:zoom="14.75"
inkscape:cx="8"
inkscape:cy="5.2881356"
inkscape:window-x="548"
inkscape:window-y="67"
inkscape:window-maximized="0"
inkscape:current-layer="svg4489"><inkscape:grid
type="xygrid"
id="grid814" /></sodipodi:namedview><metadata
id="metadata11"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
id="defs9" />
<style
id="style2"
type="text/css">
.st0{fill:none;stroke:#000000;stroke-width:4;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:1.5;stroke-opacity:0.5122;}
.st1{fill:none;stroke:#FFFFFF;stroke-width:4;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:1.5;}
</style>
<path
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#000000;fill-opacity:0.3137255;fill-rule:nonzero;stroke:none;stroke-width:4;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
d="M 5,3 C 3.8954762,3.0001104 3.0001104,3.8954762 3,5 v 6 c 1.104e-4,1.104524 0.8954762,1.99989 2,2 h 6 c 1.104524,-1.1e-4 1.99989,-0.895476 2,-2 V 5 C 12.99989,3.8954762 12.104524,3.0001104 11,3 Z"
id="rect816"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccccccc" /></svg>

After

Width:  |  Height:  |  Size: 3.3 KiB

View file

@ -0,0 +1,58 @@
<?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"
xml:space="preserve"
style="enable-background:new 0 0 16 16;"
viewBox="0 0 16 16"
y="0px"
x="0px"
id="svg4489"
version="1.1"
sodipodi:docname="checkpartially.svg"
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="871"
inkscape:window-height="781"
id="namedview7"
showgrid="true"
inkscape:zoom="14.75"
inkscape:cx="8"
inkscape:cy="5.2881356"
inkscape:window-x="548"
inkscape:window-y="67"
inkscape:window-maximized="0"
inkscape:current-layer="svg4489"><inkscape:grid
type="xygrid"
id="grid814" /></sodipodi:namedview><metadata
id="metadata11"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
id="defs9" />
<style
id="style2"
type="text/css">
.st0{fill:none;stroke:#000000;stroke-width:4;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:1.5;stroke-opacity:0.5122;}
.st1{fill:none;stroke:#FFFFFF;stroke-width:4;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:1.5;}
</style>
<path
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
d="M 5,3 C 3.8954762,3.0001104 3.0001104,3.8954762 3,5 v 6 c 1.104e-4,1.104524 0.8954762,1.99989 2,2 h 6 c 1.104524,-1.1e-4 1.99989,-0.895476 2,-2 V 5 C 12.99989,3.8954762 12.104524,3.0001104 11,3 Z"
id="rect816"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccccccc" /></svg>

After

Width:  |  Height:  |  Size: 3.3 KiB

View file

@ -0,0 +1,58 @@
<?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"
xml:space="preserve"
style="enable-background:new 0 0 16 16;"
viewBox="0 0 16 16"
y="0px"
x="0px"
id="svg4489"
version="1.1"
sodipodi:docname="checkpartially_disabled.svg"
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="871"
inkscape:window-height="781"
id="namedview7"
showgrid="true"
inkscape:zoom="14.75"
inkscape:cx="8"
inkscape:cy="5.2881356"
inkscape:window-x="548"
inkscape:window-y="67"
inkscape:window-maximized="0"
inkscape:current-layer="svg4489"><inkscape:grid
type="xygrid"
id="grid814" /></sodipodi:namedview><metadata
id="metadata11"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
id="defs9" />
<style
id="style2"
type="text/css">
.st0{fill:none;stroke:#000000;stroke-width:4;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:1.5;stroke-opacity:0.5122;}
.st1{fill:none;stroke:#FFFFFF;stroke-width:4;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:1.5;}
</style>
<path
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#9a9a9a;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
d="M 5,3 C 3.8954762,3.0001104 3.0001104,3.8954762 3,5 v 6 c 1.104e-4,1.104524 0.8954762,1.99989 2,2 h 6 c 1.104524,-1.1e-4 1.99989,-0.895476 2,-2 V 5 C 12.99989,3.8954762 12.104524,3.0001104 11,3 Z"
id="rect816"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccccccc" /></svg>

After

Width:  |  Height:  |  Size: 3.3 KiB

View file

@ -151,6 +151,19 @@ QPlainTextEdit
image: url('@{img-url}/checkmark_disabled.svg');
}
}
&:indeterminate {
background-color: @checkbox-bg-color-checked;
border-color: @checkbox-border-color-checked;
image: url('@{img-url}/checkpartially.svg');
&:hover {
&:extend(.CheckBox::indicator:hover);
}
&:disabled {
background-color: @checkbox-bg-color-disabled;
border-color: @checkbox-border-color-disabled;
image: url('@{img-url}/checkpartially_disabled.svg');
}
}
&:disabled {
background-color: @checkbox-bg-color-disabled;
border-color: @checkbox-border-color-disabled;

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff

View file

@ -10,6 +10,8 @@
#include "toonz/txshchildlevel.h"
#include "toonz/txshsoundlevel.h"
#include <QSet>
// forward declaration
class QLabel;
class QComboBox;
@ -25,7 +27,36 @@ class IntLineEdit;
class DoubleLineEdit;
class MeasuredDoubleLineEdit;
class CheckBox;
}
} // namespace DVGui
enum SelectedLevelType {
None = 0x0,
ToonzRaster = 0x1,
Raster = 0x2,
Mesh = 0x4,
ToonzVector = 0x8,
Palette = 0x10,
SubXsheet = 0x20,
Sound = 0x40,
Others = 0x80,
MultiSelection = 0x100,
HideOnPixelMode = 0x200,
NoSelection = 0x400,
SimpleLevel = ToonzRaster | Raster | Mesh | ToonzVector,
HasDPILevel = ToonzRaster | Raster | Mesh,
AllTypes = SimpleLevel | Palette | SubXsheet | Sound
};
struct LevelSettingsValues {
QString name, path, scanPath, typeStr, imageDpi, imageRes;
int dpiType = -1, softness = -1, subsampling = -1;
TPointD dpi = TPointD(0, 0);
Qt::CheckState doPremulti = Qt::Unchecked, whiteTransp = Qt::Unchecked,
doAntialias = Qt::Unchecked, isDirty = Qt::Unchecked;
double width = 0.0, height = 0.0;
};
//=============================================================================
// LevelSettingsPopup
@ -34,39 +65,34 @@ class CheckBox;
class LevelSettingsPopup final : public DVGui::Dialog {
Q_OBJECT
TXshSimpleLevelP m_sl;
TXshPaletteLevelP m_pl;
TXshChildLevelP m_cl;
TXshSoundLevelP m_sdl;
QSet<TXshLevelP> m_selectedLevels;
QMap<QWidget *, unsigned int> m_activateFlags;
DVGui::LineEdit *m_nameFld;
DVGui::FileField *m_pathFld;
QLabel *m_scanPathLabel;
DVGui::FileField *m_scanPathFld;
QLabel *m_typeLabel;
QComboBox *m_dpiTypeOm;
QLabel *m_dpiLabel;
DVGui::DoubleLineEdit *m_dpiFld;
DVGui::CheckBox *m_squarePixCB;
QLabel *m_widthLabel;
DVGui::MeasuredDoubleLineEdit *m_widthFld;
QLabel *m_heightLabel;
DVGui::MeasuredDoubleLineEdit *m_heightFld;
QPushButton *m_useCameraDpiBtn;
QLabel *m_cameraDpiLabel;
QLabel *m_imageDpiLabel;
QLabel *m_imageResLabel;
QLabel *m_cameraDpiTitle;
QLabel *m_imageDpiTitle;
QLabel *m_imageResTitle;
DVGui::CheckBox *m_doPremultiply;
DVGui::CheckBox *m_whiteTransp;
DVGui::CheckBox *m_doAntialias;
QLabel *m_softnessLabel;
DVGui::IntLineEdit *m_antialiasSoftness;
QLabel *m_subsamplingLabel;
DVGui::IntLineEdit *m_subsamplingFld;
SelectedLevelType getType(TXshLevelP);
LevelSettingsValues getValues(TXshLevelP);
public:
LevelSettingsPopup();
@ -74,7 +100,7 @@ protected:
void showEvent(QShowEvent *e) override;
void hideEvent(QHideEvent *e) override;
public slots:
protected slots:
void onCastSelectionChanged();
void onSelectionSwitched(TSelection *oldSelection, TSelection *newSelection);
@ -89,13 +115,12 @@ public slots:
void onSquarePixelChanged(int);
void useCameraDpi();
void onSubsamplingChanged();
void onDoPremultiplyChanged(int);
void onDoAntialiasChanged(int);
void onDoPremultiplyClicked();
void onDoAntialiasClicked();
void onAntialiasSoftnessChanged();
void onWhiteTranspChanged(int);
protected slots:
void onWhiteTranspClicked();
void onSceneChanged();
void onPreferenceChanged(const QString &);
};
#endif // LEVELSETTINGSPOPUP_H

View file

@ -417,6 +417,7 @@ void PreferencesPopup::onPixelsOnlyChanged() {
defLevelHeight->setDecimals(4);
defLevelWidth->setDecimals(4);
}
TApp::instance()->getCurrentScene()->notifyPreferenceChanged("pixelsOnly");
}
//-----------------------------------------------------------------------------