Skip to content

Commit

Permalink
Fade and highlight - refactor global setup dialogs #710
Browse files Browse the repository at this point in the history
  • Loading branch information
trevorsandy committed May 8, 2023
1 parent 0138bed commit c64fb48
Show file tree
Hide file tree
Showing 20 changed files with 236 additions and 153 deletions.
2 changes: 1 addition & 1 deletion builds/linux/obs/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Last Update: July 19, 2020
# Copyright (C) 2017 - 2023 by Trevor SANDY
pkgname=lpub3d
pkgver=2.4.6.3341
pkgver=2.4.6.3342
pkgrel=1
pkgdesc="An LDraw Building Instruction Editor"
url="https://github.com/trevorsandy/lpub3d.git"
Expand Down
2 changes: 1 addition & 1 deletion builds/linux/obs/alldeps/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Last Update: July 19, 2020
# Copyright (C) 2017 - 2023 by Trevor SANDY
pkgname=lpub3d
pkgver=2.4.6.3341
pkgver=2.4.6.3342
pkgrel=1
pkgdesc="An LDraw Building Instruction Editor"
url="https://github.com/trevorsandy/lpub3d.git"
Expand Down
6 changes: 3 additions & 3 deletions builds/linux/obs/alldeps/debian/changelog
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
lpub3d (2.4.6.3341) debian; urgency=medium
lpub3d (2.4.6.3342) debian; urgency=medium

* LPub3D version 2.4.6.230.3341_20230508 for Linux
* LPub3D version 2.4.6.231.3342_20230508 for Linux

-- Trevor SANDY <[email protected]> Mon, 08 May 2023 15:15:14 +0200
-- Trevor SANDY <[email protected]> Mon, 08 May 2023 15:15:39 +0200
2 changes: 1 addition & 1 deletion builds/linux/obs/alldeps/debian/lpub3d.dsc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Format: 1.0
Source: lpub3d
Binary: lpub3d
Architecture: any
Version: 2.4.6.3341
Version: 2.4.6.3342
Maintainer: Trevor SANDY <[email protected]>
Homepage: https://trevorsandy.github.io/lpub3d/
Standards-Version: 3.9.7
Expand Down
4 changes: 2 additions & 2 deletions builds/linux/obs/alldeps/lpub3d.spec
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ BuildRequires: fdupes
Summary: An LDraw Building Instruction Editor
Name: lpub3d
Icon: lpub3d.xpm
Version: 2.4.6.3341
Version: 2.4.6.3342
Release: <B_CNT>%{?dist}
URL: https://trevorsandy.github.io/lpub3d
Vendor: Trevor SANDY
Expand Down Expand Up @@ -797,7 +797,7 @@ update-desktop-database || true
%endif

%changelog
* Mon May 08 2023 - trevor.dot.sandy.at.gmail.dot.com 2.4.6.3341
* Mon May 08 2023 - trevor.dot.sandy.at.gmail.dot.com 2.4.6.3342
- LPub3D 2.4.4 enhancements and fixes - see RELEASE_NOTES for details

* Tue May 31 2022 - trevor dot sandy at gmail dot com 2.4.4.2670
Expand Down
6 changes: 3 additions & 3 deletions builds/linux/obs/debian/changelog
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
lpub3d (2.4.6.3341) debian; urgency=medium
lpub3d (2.4.6.3342) debian; urgency=medium

* LPub3D version 2.4.6.230.3341_20230508 for Linux
* LPub3D version 2.4.6.231.3342_20230508 for Linux

-- Trevor SANDY <[email protected]> Mon, 08 May 2023 15:15:15 +0200
-- Trevor SANDY <[email protected]> Mon, 08 May 2023 15:15:40 +0200
2 changes: 1 addition & 1 deletion builds/linux/obs/debian/lpub3d.dsc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Format: 1.0
Source: lpub3d
Binary: lpub3d
Architecture: any
Version: 2.4.6.3341
Version: 2.4.6.3342
Maintainer: Trevor SANDY <[email protected]>
Homepage: https://trevorsandy.github.io/lpub3d/
Standards-Version: 3.9.7
Expand Down
4 changes: 2 additions & 2 deletions builds/linux/obs/lpub3d.spec
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ BuildRequires: fdupes
Summary: An LDraw Building Instruction Editor
Name: lpub3d
Icon: lpub3d.xpm
Version: 2.4.6.3341
Version: 2.4.6.3342
Release: 1%{?dist}
URL: https://trevorsandy.github.io/lpub3d
Vendor: Trevor SANDY
Expand Down Expand Up @@ -313,7 +313,7 @@ update-desktop-database || true
%endif

%changelog
* Mon May 08 2023 - trevor.dot.sandy.at.gmail.dot.com 2.4.6.3341
* Mon May 08 2023 - trevor.dot.sandy.at.gmail.dot.com 2.4.6.3342
- LPub3D 2.4.4 enhancements and fixes - see RELEASE_NOTES for details

* Tue May 31 2022 - trevor dot sandy at gmail dot com 2.4.4.2670
Expand Down
2 changes: 1 addition & 1 deletion builds/utilities/version.info
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2 4 6 230 3341 60d8e217e
2 4 6 231 3342 0138bed1e
6 changes: 3 additions & 3 deletions gitversion.pri
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ equals(GIT_DIR, undefined) {

# Check if we do not have a valid version number (i.e. no version tag found)
isEmpty(GIT_VERSION) {
GIT_REVISION = 230
GIT_REVISION = 231
GIT_SHA = $$system($$GIT_BASE_COMMAND rev-parse --short HEAD 2> $$NULL_DEVICE)
GIT_COMMIT = $$system($$GIT_BASE_COMMAND rev-list --count HEAD 2> $$NULL_DEVICE)
GIT_VERSION = v$${VERSION}-$${GIT_REVISION}-$${GIT_SHA}
Expand Down Expand Up @@ -69,7 +69,7 @@ equals(GIT_DIR, undefined) {
# Get commit count
GIT_COMMIT = $$system($$GIT_BASE_COMMAND rev-list --count HEAD 2> $$NULL_DEVICE)
isEmpty(GIT_COMMIT) {
GIT_COMMIT = 3341
GIT_COMMIT = 3342
message("~~~ ERROR! GIT_COMMIT NOT DEFINED, USING $$GIT_COMMIT ~~~")
}

Expand Down Expand Up @@ -117,7 +117,7 @@ if (equals(USE_GIT_VER_FILE, true)|equals(USE_VERSION_INFO_VAR, true)) {
GIT_VERSION = $$cat($$GIT_VER_FILE, lines)
} else {
message("~~~ ERROR! $$GIT_DIR_ENV VERSION_INFO FILE $$GIT_VER_FILE NOT FOUND ~~~")
GIT_VERSION = $${VERSION}.230.3341.60d8e217e
GIT_VERSION = $${VERSION}.231.3342.0138bed1e
message("~~~ GIT_DIR [$$GIT_DIR_ENV, USING VERSION] $$GIT_VERSION ~~~")
GIT_VERSION ~= s/\./" "
}
Expand Down
113 changes: 59 additions & 54 deletions mainApp/commonmenus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2487,66 +2487,30 @@ void CommonMenus::setWhatsThis()
{
QObject::tr(
" Configure and edit your instructions document\n"
" fade previous steps settings.\n\n"
" You can configure your fade previous steps display,\n"
" setup and final model step settings.%1\n")
" fade previous steps or step parts settings.\n\n"
" You can configure your fade previous steps or step\n"
" parts display, setup and final model step settings.%1\n")
.arg(
#ifdef QT_DEBUG_MODE
QLatin1String("\n\n WT_SETUP_FADE_STEPS")
#else
""
#endif
)
},
// WT_SETUP_FADE_STEPS_SETUP
{
QObject::tr(
" Turn on or off the capability to define fade previous\n"
" steps locally (versus globally). This is to say, you\n"
" can apply fade previous steps from the step where\n"
" the LPub meta command is defined to enable this \n"
" feature to the step where it is defined to disable it.\n\n"
" This setting is disabled if Enable Fade Previous Steps\n"
" is checked.%1\n")
.arg(
#ifdef QT_DEBUG_MODE
QLatin1String("\n\n WT_SETUP_FADE_STEPS_SETUP")
#else
""
#endif
)
},
// WT_SETUP_HIGHLIGHT_STEP
{
QObject::tr(
" Configure and edit your instructions document\n"
" highlight current step settings.\n\n"
" highlight current step or step parts settings.\n\n"
" You can configure your highlight current step\n"
" display, setup and final model step settings.%1\n")
" or step parts display, setup and final model\n"
" step settings.%1\n")
.arg(
#ifdef QT_DEBUG_MODE
QLatin1String("\n\n WT_SETUP_HIGHLIGHT_STEP")
#else
""
#endif
)
},
// WT_SETUP_HIGHLIGHT_STEP_SETUP
{
QObject::tr(
" Turn on or off the capability to define highlight\n"
" current step locally (versus globally). This is to\n"
" say, you can apply highlight current step from the\n"
" step where the LPub meta command is defined to enable\n"
" this feature to the step where it is defined to disable\n"
" it.\n\n"
" This setting is disabled if Enable Highlight Current\n"
" Step is checked.%1\n")
.arg(
#ifdef QT_DEBUG_MODE
QLatin1String("\n\n WT_SETUP_HIGHLIGHT_STEP_SETUP")
#else
""
#endif
)
},
Expand Down Expand Up @@ -7962,9 +7926,31 @@ void CommonMenus::setWhatsThis()
// WT_GUI_FADE_PREVIOUS_STEPS
{
QObject::tr(
" Turn on or off fade previous steps globally.\n\n"
" You can configure fade previous steps with the\n"
" following options:\n"
" Turn on or off fade previous steps or step parts globally.\n\n"
" You can fade step parts locally using the !FADE command.\n"
" You can configure fade previous steps or step parts with\n"
" the following options:\n"
" - Use LPub Fade Steps: this option will generate faded\n"
" submodels and modify part lines color value before\n"
" submitting them to the renderer. When not using the\n"
" Native renderer, this option is obligatory.\n"
" When unchecked, %1 will use the Native renderer fade\n"
" behaviour. Parts and submodels are not manipulated, so\n"
" when unchecked, step navigation is more performant.\n\n"
" - Setup LPub Fade Steps: Turn on or off the capability\n"
" to define fade previous steps or step parts locally\n"
" (versus globally). This is to say, you can apply fade\n"
" previous steps from the step where the LPub meta command\n"
" is placed to enable this feature to the step where it\n"
" is placed to disable it.\n"
" For display model steps, this command is automatically\n"
" disabled at the end of the step.\n"
" This option requires Use LPub Fade Steps and is\n"
" disabled if Enable Fade Steps is checked.\n\n"
" - Use Fade Color: all faded parts are assigned the color\n"
" specified for fade color as described above.\n"
" When not checked, faded parts will display their\n"
" assigned part color faded to the specified opacity.\n\n"
" - Fade Color: set the fade color using the LDraw\n"
" colors drop-down control.\n"
" Fade color selection defaults to standard LDraw colors.\n"
Expand All @@ -7974,16 +7960,13 @@ void CommonMenus::setWhatsThis()
" color safe name (spaces replaced with '_') versus a\n"
" hex [A]RGB value as there are multiple LDraw colours\n"
" that use the same hex [A]RGB value.\n\n"
" - Use Fade Color: all faded parts are assigned the color\n"
" specified for fade color as described above.\n"
" When not checked, faded parts will display their\n"
" assigned part color faded to the specified opacity.\n\n"
" - Fade Percent: sets the fade color transparency\n"
" between 0 and 100 percent where 0 is fully\n"
" transparent and 100 is fully opaque.\n"
" This value is translated to the fade color\n"
" opacity and alpha channel - for example, 60% fade\n"
" is 40% opacity, 102/255 alpha channel and 66 hex.%1\n")
" is 40% opacity, 102/255 alpha channel and 66 hex.%2\n")
.arg(QLatin1String(VER_PRODUCTNAME_STR))
.arg(
#ifdef QT_DEBUG_MODE
QLatin1String("\n\n WT_GUI_FADE_PREVIOUS_STEPS")
Expand All @@ -7995,9 +7978,30 @@ void CommonMenus::setWhatsThis()
// WT_GUI_HIGHLIGHT_CURRENT_STEP
{
QObject::tr(
" Turn on or off highlight current step globally.\n\n"
" You can configure highlight current step with the\n"
" following options:\n"
" Turn on or off highlight current step or step parts\n"
" globally.\n\n"
" You can highlight step parts locally using the\n"
" !SILHOUETTE command.\n"
" You can configure highlight current step or step parts\n"
" with the following options:\n"
" - Use LPub Highlight Step: this option will generate\n"
" highlighted submodels and modify part lines color\n"
" value before submitting them to the renderer. When\n"
" not using the Native renderer, this option is\n"
" obligatory. When unchecked, %1 will use the Native\n"
" renderer highlight behaviour. Parts and submodels\n"
" are not manipulated, so when unchecked, step\n"
" navigation is more performant.\n\n"
" - Setup LPub Highlight Step: Turn on or off the\n"
" capability to define highlight current step or step\n"
" parts locally (versus globally). This is to say, you\n"
" can apply highlight step from the step where the LPub\n"
" meta command is placed to enable this feature to the\n"
" step where it is placed to disable it.\n"
" For display model steps, this command is automatically\n"
" disabled at the end of the step.\n"
" This option requires Use LPub Highlight Step and is\n"
" disabled if Enable Highlight Step is checked.\n\n"
" - Highlight Color: set the highlight color using\n"
" the color picker.\n"
" Any color can be selected for the highlight color.\n\n"
Expand All @@ -8006,7 +8010,8 @@ void CommonMenus::setWhatsThis()
" The mininimum allowed spin box value is 0\n"
" and the maximum is 10.\n"
" Spin box values are incremented by 1 step\n"
" unit.%1\n")
" unit.%2\n")
.arg(QLatin1String(VER_PRODUCTNAME_STR))
.arg(
#ifdef QT_DEBUG_MODE
QLatin1String("\n\n WT_GUI_HIGHLIGHT_CURRENT_STEP")
Expand Down
2 changes: 0 additions & 2 deletions mainApp/commonmenus.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,7 @@ enum WT_Type
WT_SETUP_CALLOUT_DIVIDER_POINTERS,
WT_SETUP_CALLOUT_POINTERS,
WT_SETUP_FADE_STEPS,
WT_SETUP_FADE_STEPS_SETUP,
WT_SETUP_HIGHLIGHT_STEP,
WT_SETUP_HIGHLIGHT_STEP_SETUP,
WT_SETUP_MULTI_STEP,
WT_SETUP_MULTI_STEP_ADJUST_STEP,
WT_SETUP_MULTI_STEP_ASSEMBLY,
Expand Down
2 changes: 1 addition & 1 deletion mainApp/docs/README.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
LPub3D 2.4.6.230.3341 (08 05 2023 15:15:15)
LPub3D 2.4.6.231.3342 (08 05 2023 15:15:41)

Features, enhancements, fixes and changes
------------
Expand Down
2 changes: 1 addition & 1 deletion mainApp/docs/RELEASE_NOTES.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<table class="tg">
<tr>
<th class="tg-0pky">
<h4><a id="LPub3D_0"></a>LPub3D 2.4.6.230.3341 (08 05 2023 15:15:15)</h4>
<h4><a id="LPub3D_0"></a>LPub3D 2.4.6.231.3342 (08 05 2023 15:15:41)</h4>
<hr>
<p>
<span class="tg-1pky">LPub3D Official release.</span><br>
Expand Down
4 changes: 2 additions & 2 deletions mainApp/extras/LPub3D_Npp_UDL.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
;;
;; Author......: Trevor SANDY
;; Name........: LPub3D_Npp_UDL.xml
;; Version.....: 2.4.6.230.3341
;; Last Update.: Mon, 08 May 2023 15:15:15 +0200
;; Version.....: 2.4.6.231.3342
;; Last Update.: Mon, 08 May 2023 15:15:40 +0200
;; License.....: GPLv3
;; Homepage....: https://trevorsandy.github.io/lpub3d
;; Copyright (C) 2021 - 2023 by Trevor SANDY
Expand Down
20 changes: 6 additions & 14 deletions mainApp/fadestepglobals.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,16 +84,10 @@ GlobalFadeStepDialog::GlobalFadeStepDialog(
layout->addWidget(box);
fadeStepsChild = new FadeStepsGui(fadeStepsMeta,box);
data->children.append(fadeStepsChild);
connect (fadeStepsChild->getCheckBox(), SIGNAL(clicked(bool)), this, SLOT(enableControls(bool)));
connect (fadeStepsChild->getCheckBox(), SIGNAL(clicked(bool)), this, SLOT(reloadDisplayPage(bool)));

box = new QGroupBox(tr("Fade Previous Steps Setup"));
box->setWhatsThis(lpubWT(WT_SETUP_FADE_STEPS_SETUP,box->title()));
box->setToolTip(tr("Setup fade steps. Check to enable fade previous steps locally."));
layout->addWidget(box);
fadeStepsSetupChild = new CheckBoxGui(tr("Setup Fade Previous Steps"),&fadeStepsMeta->setup,box);
data->children.append(fadeStepsSetupChild);
connect (fadeStepsSetupChild->getCheckBox(), SIGNAL(clicked(bool)), this, SLOT(reloadDisplayPage(bool)));
connect (fadeStepsChild->getFadeCheckBox(), SIGNAL(clicked(bool)), this, SLOT(enableControls(bool)));
connect (fadeStepsChild->getFadeCheckBox(), SIGNAL(clicked(bool)), this, SLOT(reloadDisplayPage(bool)));
connect (fadeStepsChild->getSetupCheckBox(), SIGNAL(clicked(bool)), this, SLOT(reloadDisplayPage(bool)));
connect (fadeStepsChild->getLPubFadeCheckBox(), SIGNAL(clicked(bool)), this, SLOT(reloadDisplayPage(bool)));

box = new QGroupBox("Final Model Step");
box->setToolTip(tr("Automatically, append an un-faded final step to the top level model file."));
Expand All @@ -102,7 +96,8 @@ GlobalFadeStepDialog::GlobalFadeStepDialog(
data->children.append(finalModelEnabledChild);
connect (finalModelEnabledChild->getCheckBox(), SIGNAL(clicked(bool)), this, SLOT(reloadDisplayPage(bool)));

emit fadeStepsChild->getCheckBox()->clicked(fadeStepsChild->getCheckBox()->isChecked());
// enable final model dialog
emit fadeStepsChild->getFadeCheckBox()->clicked(fadeStepsChild->getFadeCheckBox()->isChecked());

QDialogButtonBox *buttonBox = new QDialogButtonBox();
buttonBox->addButton(QDialogButtonBox::Ok);
Expand All @@ -116,9 +111,6 @@ GlobalFadeStepDialog::GlobalFadeStepDialog(

void GlobalFadeStepDialog::enableControls(bool b)
{
if (b)
fadeStepsSetupChild->getCheckBox()->setChecked(!b);
fadeStepsSetupChild->getCheckBox()->setEnabled(!b);
finalModelEnabledChild->getCheckBox()->setEnabled(b);
}

Expand Down
2 changes: 0 additions & 2 deletions mainApp/globals.h
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,6 @@ class GlobalFadeStepDialog : public QDialog
private:
GlobalFadeStepPrivate *data;
FadeStepsGui *fadeStepsChild;
CheckBoxGui *fadeStepsSetupChild;
FinalModelEnabledGui *finalModelEnabledChild;

public:
Expand Down Expand Up @@ -365,7 +364,6 @@ class GlobalHighlightStepDialog : public QDialog
private:
GlobalHighlightStepPrivate *data;
HighlightStepGui *highlightStepChild;
CheckBoxGui *highlightStepSetupChild;
FinalModelEnabledGui *finalModelEnabledChild;

public:
Expand Down
Loading

0 comments on commit c64fb48

Please sign in to comment.