Improve support for dark theme.
Custom dark theme updated. Added support for native dark mode. Added new icon themes. Scene still needs improvement.
4
.gitignore
vendored
|
@ -166,3 +166,7 @@ $RECYCLE.BIN/
|
||||||
*.udb
|
*.udb
|
||||||
|
|
||||||
__pycache__
|
__pycache__
|
||||||
|
|
||||||
|
# Temporary svg cursor files
|
||||||
|
/src/app/valentina/share/resources/cursor/svg/light/
|
||||||
|
/src/app/valentina/share/resources/cursor/svg/dark/
|
||||||
|
|
2
dist/macx/puzzle/Info.plist
vendored
|
@ -66,7 +66,5 @@
|
||||||
</dict>
|
</dict>
|
||||||
</dict>
|
</dict>
|
||||||
</array>
|
</array>
|
||||||
<key>NSRequiresAquaSystemAppearance</key>
|
|
||||||
<true/>
|
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
|
2
dist/macx/tape/Info.plist
vendored
|
@ -102,7 +102,5 @@
|
||||||
</dict>
|
</dict>
|
||||||
</dict>
|
</dict>
|
||||||
</array>
|
</array>
|
||||||
<key>NSRequiresAquaSystemAppearance</key>
|
|
||||||
<true/>
|
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
|
2
dist/macx/valentina/Info.plist
vendored
|
@ -160,7 +160,5 @@
|
||||||
</dict>
|
</dict>
|
||||||
</dict>
|
</dict>
|
||||||
</array>
|
</array>
|
||||||
<key>NSRequiresAquaSystemAppearance</key>
|
|
||||||
<true/>
|
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
|
|
@ -15,19 +15,31 @@
|
||||||
# I have spent hour before understand why i don't see PNG inside SVG in Nautilus.
|
# I have spent hour before understand why i don't see PNG inside SVG in Nautilus.
|
||||||
|
|
||||||
PATTERN=*@2x.png
|
PATTERN=*@2x.png
|
||||||
TOOLICONPATH=../src/app/valentina/share/resources/toolicon/32x32/ # PNG tool icon should be here
|
TOOLICONPATH=../src/app/valentina/share/resources/toolicon/ # PNG tool icon should be here
|
||||||
TOOLICONS=`ls $TOOLICONPATH$PATTERN`
|
OUTPATH=../src/app/valentina/share/resources/cursor
|
||||||
OUTPATH=../src/app/valentina/share/resources/cursor/svg # Seek SVG templates here
|
|
||||||
|
|
||||||
|
COLOR_SCHEMES=("light" "dark")
|
||||||
|
|
||||||
for var in $TOOLICONS
|
for scheme in "${COLOR_SCHEMES[@]}"
|
||||||
do
|
do
|
||||||
basename=${var##*/} # remove the path from a path-string
|
# Create a subdirectory for the current scheme if it doesn't exist
|
||||||
basename=${basename%.png} # remove the extension from a path-string
|
mkdir -p "$OUTPATH/$scheme"
|
||||||
basename=${basename%@2x} # remove optional @2x suffix
|
|
||||||
if [ ! -f $basename@2x.png ]; then # always prefere hidpi version
|
TOOLICONS=`ls $TOOLICONPATH${scheme}/$PATTERN`
|
||||||
sed "s/<<basename>>/$basename@2x/" $OUTPATH/template_cursor.svg > $OUTPATH/${basename}_cursor.svg
|
|
||||||
else
|
for var in $TOOLICONS
|
||||||
sed "s/<<basename>>/$basename/" $OUTPATH/template_cursor.svg > $OUTPATH/${basename}_cursor.svg
|
do
|
||||||
fi
|
basename=${var##*/} # remove the path from a path-string
|
||||||
|
basename=${basename%.png} # remove the extension from a path-string
|
||||||
|
basename=${basename%@2x} # remove optional @2x suffix
|
||||||
|
if [ ! -f $basename@2x.png ]; then # always prefere hidpi version
|
||||||
|
sed "s/<<basename>>/$basename@2x/" $OUTPATH/svg/template_cursor_${scheme}.svg > $OUTPATH/svg/${scheme}/${basename}_cursor.svg
|
||||||
|
else
|
||||||
|
sed "s/<<basename>>/$basename/" $OUTPATH/svg/template_cursor_${scheme}.svg > $OUTPATH/svg/${scheme}/${basename}_cursor.svg
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Generate PNG files from the SVGs
|
||||||
|
inkscape --export-filename "$OUTPATH/$scheme/${basename}_cursor@2x.png" --export-width 64 --export-height 64 "$OUTPATH/svg/$scheme/${basename}_cursor.svg"
|
||||||
|
inkscape --export-filename "$OUTPATH/$scheme/${basename}_cursor.png" --export-width 32 --export-height 32 "$OUTPATH/svg/$scheme/${basename}_cursor.svg"
|
||||||
|
done
|
||||||
done
|
done
|
||||||
|
|
|
@ -34,6 +34,7 @@
|
||||||
#endif // QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
|
#endif // QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
|
||||||
|
|
||||||
#include "../vganalytics/vganalytics.h"
|
#include "../vganalytics/vganalytics.h"
|
||||||
|
#include "../vmisc/theme/vtheme.h"
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
PuzzlePreferencesConfigurationPage::PuzzlePreferencesConfigurationPage(QWidget *parent)
|
PuzzlePreferencesConfigurationPage::PuzzlePreferencesConfigurationPage(QWidget *parent)
|
||||||
|
@ -49,7 +50,12 @@ PuzzlePreferencesConfigurationPage::PuzzlePreferencesConfigurationPage(QWidget *
|
||||||
VPSettings *settings = VPApplication::VApp()->PuzzleSettings();
|
VPSettings *settings = VPApplication::VApp()->PuzzleSettings();
|
||||||
|
|
||||||
// Theme
|
// Theme
|
||||||
ui->darkModeCheck->setChecked(settings->GetDarkMode());
|
SetThemeModeComboBox();
|
||||||
|
int index = ui->comboBoxThemeMode->findData(static_cast<int>(settings->GetThemeMode()));
|
||||||
|
if (index != -1)
|
||||||
|
{
|
||||||
|
ui->comboBoxThemeMode->setCurrentIndex(index);
|
||||||
|
}
|
||||||
|
|
||||||
// Native dialogs
|
// Native dialogs
|
||||||
ui->checkBoxDontUseNativeDialog->setChecked(settings->IsDontUseNativeDialog());
|
ui->checkBoxDontUseNativeDialog->setChecked(settings->IsDontUseNativeDialog());
|
||||||
|
@ -110,10 +116,11 @@ auto PuzzlePreferencesConfigurationPage::Apply() -> QStringList
|
||||||
|
|
||||||
settings->SetToolBarStyle(ui->toolBarStyleCheck->isChecked());
|
settings->SetToolBarStyle(ui->toolBarStyleCheck->isChecked());
|
||||||
|
|
||||||
if (settings->GetDarkMode() != ui->darkModeCheck->isChecked())
|
auto themeMode = static_cast<VThemeMode>(ui->comboBoxThemeMode->currentData().toInt());
|
||||||
|
if (settings->GetThemeMode() != themeMode)
|
||||||
{
|
{
|
||||||
settings->SetDarkMode(ui->darkModeCheck->isChecked());
|
settings->SetThemeMode(themeMode);
|
||||||
preferences.append(tr("dark mode"));
|
VTheme::Instance()->ResetThemeSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (settings->IsDontUseNativeDialog() != ui->checkBoxDontUseNativeDialog->isChecked())
|
if (settings->IsDontUseNativeDialog() != ui->checkBoxDontUseNativeDialog->isChecked())
|
||||||
|
@ -190,3 +197,12 @@ void PuzzlePreferencesConfigurationPage::changeEvent(QEvent *event)
|
||||||
// remember to call base class implementation
|
// remember to call base class implementation
|
||||||
QWidget::changeEvent(event);
|
QWidget::changeEvent(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
void PuzzlePreferencesConfigurationPage::SetThemeModeComboBox()
|
||||||
|
{
|
||||||
|
ui->comboBoxThemeMode->clear();
|
||||||
|
ui->comboBoxThemeMode->addItem(tr("System", "theme"), static_cast<int>(VThemeMode::System));
|
||||||
|
ui->comboBoxThemeMode->addItem(tr("Dark", "theme"), static_cast<int>(VThemeMode::Dark));
|
||||||
|
ui->comboBoxThemeMode->addItem(tr("Light", "theme"), static_cast<int>(VThemeMode::Light));
|
||||||
|
}
|
||||||
|
|
|
@ -57,6 +57,8 @@ private:
|
||||||
Q_DISABLE_COPY_MOVE(PuzzlePreferencesConfigurationPage) // NOLINT
|
Q_DISABLE_COPY_MOVE(PuzzlePreferencesConfigurationPage) // NOLINT
|
||||||
Ui::PuzzlePreferencesConfigurationPage *ui;
|
Ui::PuzzlePreferencesConfigurationPage *ui;
|
||||||
bool m_langChanged{false};
|
bool m_langChanged{false};
|
||||||
|
|
||||||
|
void SetThemeModeComboBox();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // PUZZLEPREFERENCESCONFIGURATIONPAGE_H
|
#endif // PUZZLEPREFERENCESCONFIGURATIONPAGE_H
|
||||||
|
|
|
@ -46,7 +46,7 @@
|
||||||
</property>
|
</property>
|
||||||
<layout class="QFormLayout" name="formLayout">
|
<layout class="QFormLayout" name="formLayout">
|
||||||
<property name="fieldGrowthPolicy">
|
<property name="fieldGrowthPolicy">
|
||||||
<enum>QFormLayout::ExpandingFieldsGrow</enum>
|
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
|
||||||
</property>
|
</property>
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QLabel" name="label_2">
|
<widget class="QLabel" name="label_2">
|
||||||
|
@ -87,11 +87,24 @@
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_5">
|
<layout class="QVBoxLayout" name="verticalLayout_5">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="darkModeCheck">
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
<property name="text">
|
<item>
|
||||||
<string>Activate dark mode</string>
|
<widget class="QLabel" name="label_4">
|
||||||
</property>
|
<property name="sizePolicy">
|
||||||
</widget>
|
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Theme:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QComboBox" name="comboBoxThemeMode"/>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="checkBoxDontUseNativeDialog">
|
<widget class="QCheckBox" name="checkBoxDontUseNativeDialog">
|
||||||
|
@ -237,8 +250,8 @@ This option will take an affect after restart.</string>
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>503</width>
|
<width>497</width>
|
||||||
<height>627</height>
|
<height>633</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_8">
|
<layout class="QVBoxLayout" name="verticalLayout_8">
|
||||||
|
@ -249,7 +262,7 @@ This option will take an affect after restart.</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QFormLayout" name="formLayout_3">
|
<layout class="QFormLayout" name="formLayout_3">
|
||||||
<property name="fieldGrowthPolicy">
|
<property name="fieldGrowthPolicy">
|
||||||
<enum>QFormLayout::ExpandingFieldsGrow</enum>
|
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
|
||||||
</property>
|
</property>
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QLabel" name="label_8">
|
<widget class="QLabel" name="label_8">
|
||||||
|
@ -313,7 +326,7 @@ This option will take an affect after restart.</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QFormLayout" name="formLayout_4">
|
<layout class="QFormLayout" name="formLayout_4">
|
||||||
<property name="fieldGrowthPolicy">
|
<property name="fieldGrowthPolicy">
|
||||||
<enum>QFormLayout::ExpandingFieldsGrow</enum>
|
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
|
||||||
</property>
|
</property>
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QLabel" name="label_11">
|
<widget class="QLabel" name="label_11">
|
||||||
|
@ -377,7 +390,7 @@ This option will take an affect after restart.</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QFormLayout" name="formLayout_5">
|
<layout class="QFormLayout" name="formLayout_5">
|
||||||
<property name="fieldGrowthPolicy">
|
<property name="fieldGrowthPolicy">
|
||||||
<enum>QFormLayout::ExpandingFieldsGrow</enum>
|
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
|
||||||
</property>
|
</property>
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QLabel" name="label_13">
|
<widget class="QLabel" name="label_13">
|
||||||
|
|
|
@ -43,7 +43,7 @@
|
||||||
<item>
|
<item>
|
||||||
<layout class="QFormLayout" name="formLayout">
|
<layout class="QFormLayout" name="formLayout">
|
||||||
<property name="fieldGrowthPolicy">
|
<property name="fieldGrowthPolicy">
|
||||||
<enum>QFormLayout::ExpandingFieldsGrow</enum>
|
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
|
||||||
</property>
|
</property>
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QLabel" name="labelLayoutUnit">
|
<widget class="QLabel" name="labelLayoutUnit">
|
||||||
|
@ -327,6 +327,12 @@
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="labelSheetPiecesGap">
|
<widget class="QLabel" name="labelSheetPiecesGap">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Pieces gap</string>
|
<string>Pieces gap</string>
|
||||||
</property>
|
</property>
|
||||||
|
@ -341,6 +347,12 @@
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label">
|
<widget class="QLabel" name="label">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Line width:</string>
|
<string>Line width:</string>
|
||||||
</property>
|
</property>
|
||||||
|
@ -429,7 +441,7 @@
|
||||||
<item>
|
<item>
|
||||||
<layout class="QFormLayout" name="formLayout_2">
|
<layout class="QFormLayout" name="formLayout_2">
|
||||||
<property name="fieldGrowthPolicy">
|
<property name="fieldGrowthPolicy">
|
||||||
<enum>QFormLayout::ExpandingFieldsGrow</enum>
|
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
|
||||||
</property>
|
</property>
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QLabel" name="label_3">
|
<widget class="QLabel" name="label_3">
|
||||||
|
|
|
@ -27,19 +27,19 @@
|
||||||
*************************************************************************/
|
*************************************************************************/
|
||||||
|
|
||||||
#include "dialogpuzzlepreferences.h"
|
#include "dialogpuzzlepreferences.h"
|
||||||
#include "ui_dialogpuzzlepreferences.h"
|
|
||||||
#include "../vpapplication.h"
|
#include "../vpapplication.h"
|
||||||
#include "configpages/puzzlepreferencesconfigurationpage.h"
|
#include "configpages/puzzlepreferencesconfigurationpage.h"
|
||||||
#include "configpages/puzzlepreferencespathpage.h"
|
|
||||||
#include "configpages/puzzlepreferenceslayoutpage.h"
|
#include "configpages/puzzlepreferenceslayoutpage.h"
|
||||||
|
#include "configpages/puzzlepreferencespathpage.h"
|
||||||
|
#include "ui_dialogpuzzlepreferences.h"
|
||||||
|
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include <QPushButton>
|
#include <QPushButton>
|
||||||
#include <QShowEvent>
|
#include <QShowEvent>
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
DialogPuzzlePreferences::DialogPuzzlePreferences(QWidget *parent) :
|
DialogPuzzlePreferences::DialogPuzzlePreferences(QWidget *parent)
|
||||||
QDialog(parent),
|
: QDialog(parent),
|
||||||
ui(new Ui::DialogPuzzlePreferences),
|
ui(new Ui::DialogPuzzlePreferences),
|
||||||
m_configurationPage(new PuzzlePreferencesConfigurationPage),
|
m_configurationPage(new PuzzlePreferencesConfigurationPage),
|
||||||
m_layoutPage(new PuzzlePreferencesLayoutPage),
|
m_layoutPage(new PuzzlePreferencesLayoutPage),
|
||||||
|
@ -78,8 +78,8 @@ DialogPuzzlePreferences::~DialogPuzzlePreferences()
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void DialogPuzzlePreferences::showEvent(QShowEvent *event)
|
void DialogPuzzlePreferences::showEvent(QShowEvent *event)
|
||||||
{
|
{
|
||||||
QDialog::showEvent( event );
|
QDialog::showEvent(event);
|
||||||
if ( event->spontaneous() )
|
if (event->spontaneous())
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -96,7 +96,7 @@ void DialogPuzzlePreferences::showEvent(QShowEvent *event)
|
||||||
resize(sz);
|
resize(sz);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_isInitialized = true;//first show windows are held
|
m_isInitialized = true; // first show windows are held
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -120,6 +120,24 @@ void DialogPuzzlePreferences::changeEvent(QEvent *event)
|
||||||
// retranslate designer form (single inheritance approach)
|
// retranslate designer form (single inheritance approach)
|
||||||
ui->retranslateUi(this);
|
ui->retranslateUi(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (event->type() == QEvent::PaletteChange)
|
||||||
|
{
|
||||||
|
QStyle *style = QApplication::style();
|
||||||
|
|
||||||
|
QPushButton *bOk = ui->buttonBox->button(QDialogButtonBox::Ok);
|
||||||
|
SCASSERT(bOk != nullptr)
|
||||||
|
bOk->setIcon(style->standardIcon(QStyle::SP_DialogOkButton));
|
||||||
|
|
||||||
|
QPushButton *bApply = ui->buttonBox->button(QDialogButtonBox::Apply);
|
||||||
|
SCASSERT(bApply != nullptr)
|
||||||
|
bApply->setIcon(style->standardIcon(QStyle::SP_DialogApplyButton));
|
||||||
|
|
||||||
|
QPushButton *bCancel = ui->buttonBox->button(QDialogButtonBox::Cancel);
|
||||||
|
SCASSERT(bCancel != nullptr)
|
||||||
|
bCancel->setIcon(style->standardIcon(QStyle::SP_DialogCancelButton));
|
||||||
|
}
|
||||||
|
|
||||||
// remember to call base class implementation
|
// remember to call base class implementation
|
||||||
QDialog::changeEvent(event);
|
QDialog::changeEvent(event);
|
||||||
}
|
}
|
||||||
|
@ -135,8 +153,9 @@ void DialogPuzzlePreferences::Apply()
|
||||||
|
|
||||||
if (not preferences.isEmpty())
|
if (not preferences.isEmpty())
|
||||||
{
|
{
|
||||||
const QString text = tr("Followed %n option(s) require restart to take effect: %1.", "",
|
const QString text =
|
||||||
static_cast<int>(preferences.size())).arg(preferences.join(QStringLiteral(", ")));
|
tr("Followed %n option(s) require restart to take effect: %1.", "", static_cast<int>(preferences.size()))
|
||||||
|
.arg(preferences.join(QStringLiteral(", ")));
|
||||||
QMessageBox::information(this, QCoreApplication::applicationName(), text);
|
QMessageBox::information(this, QCoreApplication::applicationName(), text);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -29,16 +29,16 @@
|
||||||
#include <QMessageBox> // For QT_REQUIRE_VERSION
|
#include <QMessageBox> // For QT_REQUIRE_VERSION
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
|
|
||||||
#include "vpapplication.h"
|
|
||||||
#include "../vmisc/def.h"
|
#include "../vmisc/def.h"
|
||||||
|
#include "vpapplication.h"
|
||||||
|
|
||||||
#if defined(APPIMAGE) && defined(Q_OS_LINUX)
|
#if defined(APPIMAGE) && defined(Q_OS_LINUX)
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(5, 12, 0)
|
#if QT_VERSION < QT_VERSION_CHECK(5, 12, 0)
|
||||||
# include "../vmisc/backport/qscopeguard.h"
|
#include "../vmisc/backport/qscopeguard.h"
|
||||||
#else
|
#else
|
||||||
# include <QScopeGuard>
|
#include <QScopeGuard>
|
||||||
#endif
|
#endif
|
||||||
# include "../vmisc/appimage.h"
|
#include "../vmisc/appimage.h"
|
||||||
#endif // defined(APPIMAGE) && defined(Q_OS_LINUX)
|
#endif // defined(APPIMAGE) && defined(Q_OS_LINUX)
|
||||||
|
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||||
|
@ -50,18 +50,22 @@ auto main(int argc, char *argv[]) -> int
|
||||||
#if defined(APPIMAGE) && defined(Q_OS_LINUX)
|
#if defined(APPIMAGE) && defined(Q_OS_LINUX)
|
||||||
/* Fix path to ICU_DATA when run AppImage.*/
|
/* Fix path to ICU_DATA when run AppImage.*/
|
||||||
char *exe_dir = IcuDataPath("/../share/icu");
|
char *exe_dir = IcuDataPath("/../share/icu");
|
||||||
auto FreeMemory = qScopeGuard([exe_dir] {free(exe_dir);});
|
auto FreeMemory = qScopeGuard([exe_dir] { free(exe_dir); });
|
||||||
#endif // defined(APPIMAGE) && defined(Q_OS_LINUX)
|
#endif // defined(APPIMAGE) && defined(Q_OS_LINUX)
|
||||||
|
|
||||||
Q_INIT_RESOURCE(puzzleicon); // NOLINT
|
Q_INIT_RESOURCE(puzzleicon); // NOLINT
|
||||||
Q_INIT_RESOURCE(theme); // NOLINT
|
Q_INIT_RESOURCE(icon); // NOLINT
|
||||||
Q_INIT_RESOURCE(icon); // NOLINT
|
Q_INIT_RESOURCE(schema); // NOLINT
|
||||||
Q_INIT_RESOURCE(schema); // NOLINT
|
Q_INIT_RESOURCE(flags); // NOLINT
|
||||||
Q_INIT_RESOURCE(flags); // NOLINT
|
Q_INIT_RESOURCE(breeze); // NOLINT
|
||||||
Q_INIT_RESOURCE(style); // NOLINT
|
Q_INIT_RESOURCE(cursor); // NOLINT
|
||||||
Q_INIT_RESOURCE(cursor); // NOLINT
|
#if defined(Q_OS_MACX)
|
||||||
|
Q_INIT_RESOURCE(mac_theme); // NOLINT
|
||||||
|
#else
|
||||||
|
Q_INIT_RESOURCE(win_theme); // NOLINT
|
||||||
|
#endif
|
||||||
|
|
||||||
QT_REQUIRE_VERSION(argc, argv, "5.4.0")// clazy:exclude=qstring-arg,qstring-allocations NOLINT
|
QT_REQUIRE_VERSION(argc, argv, "5.4.0") // clazy:exclude=qstring-arg,qstring-allocations NOLINT
|
||||||
|
|
||||||
#if defined(Q_OS_WIN)
|
#if defined(Q_OS_WIN)
|
||||||
VAbstractApplication::WinAttachConsole();
|
VAbstractApplication::WinAttachConsole();
|
||||||
|
@ -69,9 +73,9 @@ auto main(int argc, char *argv[]) -> int
|
||||||
|
|
||||||
#ifndef Q_OS_MAC // supports natively
|
#ifndef Q_OS_MAC // supports natively
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||||
InitHighDpiScaling(argc, argv);
|
VAbstractApplication::InitHighDpiScaling(argc, argv);
|
||||||
#endif
|
#endif
|
||||||
#endif //ndef Q_OS_MAC
|
#endif // ndef Q_OS_MAC
|
||||||
|
|
||||||
#ifdef Q_OS_MAC
|
#ifdef Q_OS_MAC
|
||||||
#if MACOS_LAYER_BACKING_AFFECTED
|
#if MACOS_LAYER_BACKING_AFFECTED
|
||||||
|
@ -82,7 +86,7 @@ auto main(int argc, char *argv[]) -> int
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||||
XERCES_CPP_NAMESPACE::XMLPlatformUtils::Initialize();
|
XERCES_CPP_NAMESPACE::XMLPlatformUtils::Initialize();
|
||||||
|
|
||||||
auto Terminate = qScopeGuard([](){ XERCES_CPP_NAMESPACE::XMLPlatformUtils::Terminate(); });
|
auto Terminate = qScopeGuard([]() { XERCES_CPP_NAMESPACE::XMLPlatformUtils::Terminate(); });
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
VPApplication app(argc, argv);
|
VPApplication app(argc, argv);
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
*************************************************************************/
|
*************************************************************************/
|
||||||
|
|
||||||
#include "vpapplication.h"
|
#include "vpapplication.h"
|
||||||
|
#include "../fervor/fvupdater.h"
|
||||||
#include "../ifc/exception/vexceptionbadid.h"
|
#include "../ifc/exception/vexceptionbadid.h"
|
||||||
#include "../ifc/exception/vexceptionconversionerror.h"
|
#include "../ifc/exception/vexceptionconversionerror.h"
|
||||||
#include "../ifc/exception/vexceptionemptyparameter.h"
|
#include "../ifc/exception/vexceptionemptyparameter.h"
|
||||||
|
@ -34,6 +35,9 @@
|
||||||
#include "../ifc/exception/vexceptionwrongid.h"
|
#include "../ifc/exception/vexceptionwrongid.h"
|
||||||
#include "../vganalytics/def.h"
|
#include "../vganalytics/def.h"
|
||||||
#include "../vganalytics/vganalytics.h"
|
#include "../vganalytics/vganalytics.h"
|
||||||
|
#include "../vmisc/qt_dispatch/qt_dispatch.h"
|
||||||
|
#include "../vmisc/theme/vapplicationstyle.h"
|
||||||
|
#include "../vmisc/theme/vtheme.h"
|
||||||
#include "../vmisc/vsysexits.h"
|
#include "../vmisc/vsysexits.h"
|
||||||
#include "version.h"
|
#include "version.h"
|
||||||
#include "vpmainwindow.h"
|
#include "vpmainwindow.h"
|
||||||
|
@ -42,11 +46,14 @@
|
||||||
#include "../vmisc/diagnostic.h"
|
#include "../vmisc/diagnostic.h"
|
||||||
#endif // QT_VERSION < QT_VERSION_CHECK(5, 5, 0)
|
#endif // QT_VERSION < QT_VERSION_CHECK(5, 5, 0)
|
||||||
|
|
||||||
#include "../fervor/fvupdater.h"
|
#include <QCommandLineParser>
|
||||||
#include "../vmisc/qt_dispatch/qt_dispatch.h"
|
#include <QFileOpenEvent>
|
||||||
|
#include <QLocalServer>
|
||||||
|
#include <QLocalSocket>
|
||||||
#include <QLoggingCategory>
|
#include <QLoggingCategory>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
|
#include <QPixmapCache>
|
||||||
|
#include <QStyleFactory>
|
||||||
|
|
||||||
QT_WARNING_PUSH
|
QT_WARNING_PUSH
|
||||||
QT_WARNING_DISABLE_CLANG("-Wmissing-prototypes")
|
QT_WARNING_DISABLE_CLANG("-Wmissing-prototypes")
|
||||||
|
@ -56,12 +63,6 @@ Q_LOGGING_CATEGORY(pApp, "p.application") // NOLINT
|
||||||
|
|
||||||
QT_WARNING_POP
|
QT_WARNING_POP
|
||||||
|
|
||||||
#include <QCommandLineParser>
|
|
||||||
#include <QFileOpenEvent>
|
|
||||||
#include <QLocalServer>
|
|
||||||
#include <QLocalSocket>
|
|
||||||
#include <QPixmapCache>
|
|
||||||
|
|
||||||
#if !defined(BUILD_REVISION) && defined(QBS_BUILD)
|
#if !defined(BUILD_REVISION) && defined(QBS_BUILD)
|
||||||
#include <vcsRepoState.h>
|
#include <vcsRepoState.h>
|
||||||
#define BUILD_REVISION VCS_REPO_STATE_REVISION
|
#define BUILD_REVISION VCS_REPO_STATE_REVISION
|
||||||
|
@ -274,12 +275,13 @@ VPApplication::VPApplication(int &argc, char **argv)
|
||||||
// The first inside own bundle where info.plist is works fine, but the second,
|
// The first inside own bundle where info.plist is works fine, but the second,
|
||||||
// when we run inside Valentina's bundle, require direct setting the icon.
|
// when we run inside Valentina's bundle, require direct setting the icon.
|
||||||
setWindowIcon(QIcon(":/puzzleicon/64x64/logo.png"));
|
setWindowIcon(QIcon(":/puzzleicon/64x64/logo.png"));
|
||||||
|
VTheme::Instance()->StoreDefaultThemeName(QIcon::themeName());
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
VPApplication::~VPApplication()
|
VPApplication::~VPApplication()
|
||||||
{
|
{
|
||||||
if (IsAppInGUIMode() && settings->IsCollectStatistic())
|
if (VPApplication::IsAppInGUIMode() && settings->IsCollectStatistic())
|
||||||
{
|
{
|
||||||
auto *statistic = VGAnalytics::Instance();
|
auto *statistic = VGAnalytics::Instance();
|
||||||
|
|
||||||
|
@ -433,16 +435,8 @@ void VPApplication::InitOptions()
|
||||||
|
|
||||||
CheckSystemLocale();
|
CheckSystemLocale();
|
||||||
|
|
||||||
static const char *GENERIC_ICON_TO_CHECK = "document-open";
|
VTheme::SetIconTheme();
|
||||||
if (not QIcon::hasThemeIcon(GENERIC_ICON_TO_CHECK))
|
VTheme::InitThemeMode();
|
||||||
{
|
|
||||||
// If there is no default working icon theme then we should
|
|
||||||
// use an icon theme that we provide via a .qrc file
|
|
||||||
// This case happens under Windows and Mac OS X
|
|
||||||
// This does not happen under GNOME or KDE
|
|
||||||
QIcon::setThemeName(QStringLiteral("win.icon.theme"));
|
|
||||||
}
|
|
||||||
ActivateDarkMode();
|
|
||||||
|
|
||||||
auto *statistic = VGAnalytics::Instance();
|
auto *statistic = VGAnalytics::Instance();
|
||||||
QString clientID = settings->GetClientID();
|
QString clientID = settings->GetClientID();
|
||||||
|
@ -480,26 +474,6 @@ auto VPApplication::PuzzleSettings() -> VPSettings *
|
||||||
return qobject_cast<VPSettings *>(settings);
|
return qobject_cast<VPSettings *>(settings);
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
|
||||||
void VPApplication::ActivateDarkMode()
|
|
||||||
{
|
|
||||||
VPSettings *settings = PuzzleSettings();
|
|
||||||
if (settings->GetDarkMode())
|
|
||||||
{
|
|
||||||
QFile f(QStringLiteral(":qdarkstyle/style.qss"));
|
|
||||||
if (!f.exists())
|
|
||||||
{
|
|
||||||
qDebug() << "Unable to set stylesheet, file not found\n";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
f.open(QFile::ReadOnly | QFile::Text);
|
|
||||||
QTextStream ts(&f);
|
|
||||||
VPApplication::VApp()->setStyleSheet(ts.readAll());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void VPApplication::ParseCommandLine(const SocketConnection &connection, const QStringList &arguments)
|
void VPApplication::ParseCommandLine(const SocketConnection &connection, const QStringList &arguments)
|
||||||
{
|
{
|
||||||
|
@ -525,6 +499,17 @@ void VPApplication::ParseCommandLine(const SocketConnection &connection, const Q
|
||||||
qCDebug(pApp, "Can't establish connection to the server '%s'", qUtf8Printable(serverName));
|
qCDebug(pApp, "Can't establish connection to the server '%s'", qUtf8Printable(serverName));
|
||||||
StartLocalServer(serverName);
|
StartLocalServer(serverName);
|
||||||
LoadTranslation(PuzzleSettings()->GetLocale());
|
LoadTranslation(PuzzleSettings()->GetLocale());
|
||||||
|
|
||||||
|
QString styleOpt = cmd->OptionStyle();
|
||||||
|
if (styleOpt != QLatin1String("native"))
|
||||||
|
{
|
||||||
|
QStyle *style = QStyleFactory::create(styleOpt);
|
||||||
|
if (style != nullptr)
|
||||||
|
{
|
||||||
|
style = new VApplicationStyle(style);
|
||||||
|
setStyle(style);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ProcessArguments(cmd);
|
ProcessArguments(cmd);
|
||||||
|
|
|
@ -29,29 +29,34 @@
|
||||||
#define VPAPPLICATION_H
|
#define VPAPPLICATION_H
|
||||||
|
|
||||||
#include "../vmisc/def.h"
|
#include "../vmisc/def.h"
|
||||||
#include "vpsettings.h"
|
|
||||||
#include "../vmisc/vabstractapplication.h"
|
#include "../vmisc/vabstractapplication.h"
|
||||||
#include "vpcommandline.h"
|
#include "vpcommandline.h"
|
||||||
|
#include "vpsettings.h"
|
||||||
|
|
||||||
template <typename T> class QWeakPointer;
|
template <typename T> class QWeakPointer;
|
||||||
class VPMainWindow;
|
class VPMainWindow;
|
||||||
class QLocalServer;
|
class QLocalServer;
|
||||||
class DialogPuzzlePreferences;
|
class DialogPuzzlePreferences;
|
||||||
|
|
||||||
enum class SocketConnection : bool {Client = false, Server = true};
|
enum class SocketConnection : bool
|
||||||
|
{
|
||||||
|
Client = false,
|
||||||
|
Server = true
|
||||||
|
};
|
||||||
|
|
||||||
class VPApplication : public VAbstractApplication
|
class VPApplication : public VAbstractApplication
|
||||||
{
|
{
|
||||||
Q_OBJECT // NOLINT
|
Q_OBJECT // NOLINT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
VPApplication(int &argc, char **argv);
|
VPApplication(int &argc, char **argv);
|
||||||
~VPApplication() override;
|
~VPApplication() override;
|
||||||
|
|
||||||
auto notify(QObject * receiver, QEvent * event) -> bool override;
|
auto notify(QObject *receiver, QEvent *event) -> bool override;
|
||||||
|
|
||||||
auto IsAppInGUIMode() const -> bool override;
|
auto IsAppInGUIMode() const -> bool override;
|
||||||
auto MainWindow() -> VPMainWindow *;
|
auto MainWindow() -> VPMainWindow *;
|
||||||
auto MainWindows() -> QList<VPMainWindow*>;
|
auto MainWindows() -> QList<VPMainWindow *>;
|
||||||
auto NewMainWindow() -> VPMainWindow *;
|
auto NewMainWindow() -> VPMainWindow *;
|
||||||
auto NewMainWindow(const VPCommandLinePtr &cmd) -> VPMainWindow *;
|
auto NewMainWindow(const VPCommandLinePtr &cmd) -> VPMainWindow *;
|
||||||
|
|
||||||
|
@ -61,7 +66,6 @@ public:
|
||||||
|
|
||||||
void OpenSettings() override;
|
void OpenSettings() override;
|
||||||
auto PuzzleSettings() -> VPSettings *;
|
auto PuzzleSettings() -> VPSettings *;
|
||||||
void ActivateDarkMode();
|
|
||||||
|
|
||||||
void ParseCommandLine(const SocketConnection &connection, const QStringList &arguments);
|
void ParseCommandLine(const SocketConnection &connection, const QStringList &arguments);
|
||||||
void ProcessArguments(const VPCommandLinePtr &cmd);
|
void ProcessArguments(const VPCommandLinePtr &cmd);
|
||||||
|
@ -87,8 +91,8 @@ private slots:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// cppcheck-suppress unknownMacro
|
// cppcheck-suppress unknownMacro
|
||||||
Q_DISABLE_COPY_MOVE(VPApplication) //NOLINT
|
Q_DISABLE_COPY_MOVE(VPApplication) // NOLINT
|
||||||
QList<QPointer<VPMainWindow> > m_mainWindows{};
|
QList<QPointer<VPMainWindow>> m_mainWindows{};
|
||||||
QLocalServer *m_localServer{nullptr};
|
QLocalServer *m_localServer{nullptr};
|
||||||
QWeakPointer<DialogPuzzlePreferences> m_preferencesDialog{};
|
QWeakPointer<DialogPuzzlePreferences> m_preferencesDialog{};
|
||||||
|
|
||||||
|
|
|
@ -26,14 +26,16 @@
|
||||||
**
|
**
|
||||||
*************************************************************************/
|
*************************************************************************/
|
||||||
#include "vpcommandline.h"
|
#include "vpcommandline.h"
|
||||||
#include "vpcommands.h"
|
|
||||||
#include "../vmisc/vsysexits.h"
|
|
||||||
#include "../vmisc/literals.h"
|
#include "../vmisc/literals.h"
|
||||||
|
#include "../vmisc/vsysexits.h"
|
||||||
|
#include "vpcommands.h"
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
|
||||||
std::shared_ptr<VPCommandLine> VPCommandLine::instance = nullptr; // NOLINT(cppcoreguidelines-avoid-non-const-global-variables)
|
std::shared_ptr<VPCommandLine> VPCommandLine::instance =
|
||||||
|
nullptr; // NOLINT(cppcoreguidelines-avoid-non-const-global-variables)
|
||||||
|
|
||||||
#define translate(context, source) QCoreApplication::translate((context), source)// NOLINT(cppcoreguidelines-macro-usage)
|
#define translate(context, source) \
|
||||||
|
QCoreApplication::translate((context), source) // NOLINT(cppcoreguidelines-macro-usage)
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
auto VPCommandLine::OptionRawLayouts() const -> QStringList
|
auto VPCommandLine::OptionRawLayouts() const -> QStringList
|
||||||
|
@ -65,7 +67,19 @@ void VPCommandLine::ShowHelp(int exitCode)
|
||||||
parser.showHelp(exitCode);
|
parser.showHelp(exitCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------------------------------------
|
||||||
|
auto VPCommandLine::OptionStyle() const -> QString
|
||||||
|
{
|
||||||
|
QString value = OptionValue(LONG_OPTION_STYLE);
|
||||||
|
if (value.isEmpty())
|
||||||
|
{
|
||||||
|
return QStringLiteral("native");
|
||||||
|
}
|
||||||
|
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------------------------------------------------
|
||||||
VPCommandLine::VPCommandLine()
|
VPCommandLine::VPCommandLine()
|
||||||
{
|
{
|
||||||
parser.setApplicationDescription(translate("Puzzle", "Valentina's manual layout editor."));
|
parser.setApplicationDescription(translate("Puzzle", "Valentina's manual layout editor."));
|
||||||
|
@ -96,7 +110,7 @@ void VPCommandLine::ProcessInstance(VPCommandLinePtr &instance, const QStringLis
|
||||||
//-------------------------------------------------------------------------------------------
|
//-------------------------------------------------------------------------------------------
|
||||||
void VPCommandLine::InitCommandLineOptions()
|
void VPCommandLine::InitCommandLineOptions()
|
||||||
{
|
{
|
||||||
//keep in mind order here - that is how user will see it, so group-up for usability
|
// keep in mind order here - that is how user will see it, so group-up for usability
|
||||||
//=================================================================================================================
|
//=================================================================================================================
|
||||||
parser.addOptions({
|
parser.addOptions({
|
||||||
{{SINGLE_OPTION_RAW_LAYOUT, LONG_OPTION_RAW_LAYOUT},
|
{{SINGLE_OPTION_RAW_LAYOUT, LONG_OPTION_RAW_LAYOUT},
|
||||||
|
@ -106,6 +120,7 @@ void VPCommandLine::InitCommandLineOptions()
|
||||||
translate("VCommandLine", "Disable high dpi scaling. Call this option if has problem with scaling (by default "
|
translate("VCommandLine", "Disable high dpi scaling. Call this option if has problem with scaling (by default "
|
||||||
"scaling enabled). Alternatively you can use the %1 environment variable.")
|
"scaling enabled). Alternatively you can use the %1 environment variable.")
|
||||||
.arg(QStringLiteral("QT_AUTO_SCREEN_SCALE_FACTOR=0"))},
|
.arg(QStringLiteral("QT_AUTO_SCREEN_SCALE_FACTOR=0"))},
|
||||||
|
{LONG_OPTION_STYLE, tr("Application style") + QString(" `Fusion`, `Windows`, `native`, ..."), "", "native"},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -126,5 +141,3 @@ auto VPCommandLine::OptionValues(const QString &option) const -> QStringList
|
||||||
{
|
{
|
||||||
return parser.values(option);
|
return parser.values(option);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -65,6 +65,8 @@ public:
|
||||||
|
|
||||||
Q_NORETURN void ShowHelp(int exitCode = 0);
|
Q_NORETURN void ShowHelp(int exitCode = 0);
|
||||||
|
|
||||||
|
auto OptionStyle() const -> QString;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
VPCommandLine();
|
VPCommandLine();
|
||||||
|
|
||||||
|
|
|
@ -29,8 +29,9 @@
|
||||||
|
|
||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
|
|
||||||
const QString LONG_OPTION_RAW_LAYOUT = QStringLiteral("rawLayout"); // NOLINT
|
const QString LONG_OPTION_RAW_LAYOUT = QStringLiteral("rawLayout"); // NOLINT
|
||||||
const QString SINGLE_OPTION_RAW_LAYOUT = QStringLiteral("r"); // NOLINT
|
const QString SINGLE_OPTION_RAW_LAYOUT = QStringLiteral("r"); // NOLINT
|
||||||
|
const QString LONG_OPTION_STYLE = QStringLiteral("style"); // NOLINT
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
/**
|
/**
|
||||||
|
@ -39,9 +40,5 @@ const QString SINGLE_OPTION_RAW_LAYOUT = QStringLiteral("r"); // NOLINT
|
||||||
*/
|
*/
|
||||||
auto AllKeys() -> QStringList
|
auto AllKeys() -> QStringList
|
||||||
{
|
{
|
||||||
return
|
return {LONG_OPTION_RAW_LAYOUT, SINGLE_OPTION_RAW_LAYOUT, LONG_OPTION_STYLE};
|
||||||
{
|
|
||||||
LONG_OPTION_RAW_LAYOUT,
|
|
||||||
SINGLE_OPTION_RAW_LAYOUT
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,12 +28,14 @@
|
||||||
#ifndef VPCOMMANDS_H
|
#ifndef VPCOMMANDS_H
|
||||||
#define VPCOMMANDS_H
|
#define VPCOMMANDS_H
|
||||||
|
|
||||||
|
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
|
||||||
extern const QString LONG_OPTION_RAW_LAYOUT;
|
extern const QString LONG_OPTION_RAW_LAYOUT;
|
||||||
extern const QString SINGLE_OPTION_RAW_LAYOUT;
|
extern const QString SINGLE_OPTION_RAW_LAYOUT;
|
||||||
|
|
||||||
|
extern const QString LONG_OPTION_STYLE;
|
||||||
|
extern const QString LONG_OPTION_STYLESHEET;
|
||||||
|
|
||||||
auto AllKeys() -> QStringList;
|
auto AllKeys() -> QStringList;
|
||||||
|
|
||||||
#endif // VPCOMMANDS_H
|
#endif // VPCOMMANDS_H
|
||||||
|
|
|
@ -36,6 +36,7 @@
|
||||||
#endif // QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
|
#endif // QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
|
||||||
#include "../qmuparser/qmudef.h"
|
#include "../qmuparser/qmudef.h"
|
||||||
#include "../vganalytics/vganalytics.h"
|
#include "../vganalytics/vganalytics.h"
|
||||||
|
#include "../vmisc/theme/vtheme.h"
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
TapePreferencesConfigurationPage::TapePreferencesConfigurationPage(QWidget *parent)
|
TapePreferencesConfigurationPage::TapePreferencesConfigurationPage(QWidget *parent)
|
||||||
|
@ -57,7 +58,12 @@ TapePreferencesConfigurationPage::TapePreferencesConfigurationPage(QWidget *pare
|
||||||
ui->osOptionCheck->setChecked(settings->GetOsSeparator());
|
ui->osOptionCheck->setChecked(settings->GetOsSeparator());
|
||||||
|
|
||||||
// Theme
|
// Theme
|
||||||
ui->darkModeCheck->setChecked(settings->GetDarkMode());
|
SetThemeModeComboBox();
|
||||||
|
int index = ui->comboBoxThemeMode->findData(static_cast<int>(settings->GetThemeMode()));
|
||||||
|
if (index != -1)
|
||||||
|
{
|
||||||
|
ui->comboBoxThemeMode->setCurrentIndex(index);
|
||||||
|
}
|
||||||
|
|
||||||
// Native dialogs
|
// Native dialogs
|
||||||
ui->checkBoxDontUseNativeDialog->setChecked(settings->IsDontUseNativeDialog());
|
ui->checkBoxDontUseNativeDialog->setChecked(settings->IsDontUseNativeDialog());
|
||||||
|
@ -78,7 +84,7 @@ TapePreferencesConfigurationPage::TapePreferencesConfigurationPage(QWidget *pare
|
||||||
});
|
});
|
||||||
|
|
||||||
// set default pattern making system
|
// set default pattern making system
|
||||||
int index = ui->systemCombo->findData(settings->GetPMSystemCode());
|
index = ui->systemCombo->findData(settings->GetPMSystemCode());
|
||||||
if (index != -1)
|
if (index != -1)
|
||||||
{
|
{
|
||||||
ui->systemCombo->setCurrentIndex(index);
|
ui->systemCombo->setCurrentIndex(index);
|
||||||
|
@ -113,10 +119,11 @@ auto TapePreferencesConfigurationPage::Apply() -> QStringList
|
||||||
|
|
||||||
settings->SetToolBarStyle(ui->toolBarStyleCheck->isChecked());
|
settings->SetToolBarStyle(ui->toolBarStyleCheck->isChecked());
|
||||||
|
|
||||||
if (settings->GetDarkMode() != ui->darkModeCheck->isChecked())
|
auto themeMode = static_cast<VThemeMode>(ui->comboBoxThemeMode->currentData().toInt());
|
||||||
|
if (settings->GetThemeMode() != themeMode)
|
||||||
{
|
{
|
||||||
settings->SetDarkMode(ui->darkModeCheck->isChecked());
|
settings->SetThemeMode(themeMode);
|
||||||
preferences.append(tr("dark mode"));
|
VTheme::Instance()->ResetThemeSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (settings->IsDontUseNativeDialog() != ui->checkBoxDontUseNativeDialog->isChecked())
|
if (settings->IsDontUseNativeDialog() != ui->checkBoxDontUseNativeDialog->isChecked())
|
||||||
|
@ -183,3 +190,12 @@ void TapePreferencesConfigurationPage::RetranslateUi()
|
||||||
ui->systemCombo->setCurrentIndex(ui->systemCombo->findData(code));
|
ui->systemCombo->setCurrentIndex(ui->systemCombo->findData(code));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
void TapePreferencesConfigurationPage::SetThemeModeComboBox()
|
||||||
|
{
|
||||||
|
ui->comboBoxThemeMode->clear();
|
||||||
|
ui->comboBoxThemeMode->addItem(tr("System", "theme"), static_cast<int>(VThemeMode::System));
|
||||||
|
ui->comboBoxThemeMode->addItem(tr("Dark", "theme"), static_cast<int>(VThemeMode::Dark));
|
||||||
|
ui->comboBoxThemeMode->addItem(tr("Light", "theme"), static_cast<int>(VThemeMode::Light));
|
||||||
|
}
|
||||||
|
|
|
@ -31,6 +31,10 @@
|
||||||
|
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
|
|
||||||
|
#if QT_VERSION < QT_VERSION_CHECK(5, 13, 0)
|
||||||
|
#include "../vmisc/defglobal.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace Ui
|
namespace Ui
|
||||||
{
|
{
|
||||||
class TapePreferencesConfigurationPage;
|
class TapePreferencesConfigurationPage;
|
||||||
|
@ -57,6 +61,7 @@ private:
|
||||||
bool m_systemChanged;
|
bool m_systemChanged;
|
||||||
|
|
||||||
void RetranslateUi();
|
void RetranslateUi();
|
||||||
|
void SetThemeModeComboBox();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // TAPEPREFERENCESCONFIGURATIONPAGE_H
|
#endif // TAPEPREFERENCESCONFIGURATIONPAGE_H
|
||||||
|
|
|
@ -46,7 +46,7 @@
|
||||||
</property>
|
</property>
|
||||||
<layout class="QFormLayout" name="formLayout">
|
<layout class="QFormLayout" name="formLayout">
|
||||||
<property name="fieldGrowthPolicy">
|
<property name="fieldGrowthPolicy">
|
||||||
<enum>QFormLayout::ExpandingFieldsGrow</enum>
|
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
|
||||||
</property>
|
</property>
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QLabel" name="label_2">
|
<widget class="QLabel" name="label_2">
|
||||||
|
@ -85,7 +85,7 @@
|
||||||
</property>
|
</property>
|
||||||
<layout class="QFormLayout" name="formLayout_2">
|
<layout class="QFormLayout" name="formLayout_2">
|
||||||
<property name="fieldGrowthPolicy">
|
<property name="fieldGrowthPolicy">
|
||||||
<enum>QFormLayout::ExpandingFieldsGrow</enum>
|
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
|
||||||
</property>
|
</property>
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QLabel" name="label_6">
|
<widget class="QLabel" name="label_6">
|
||||||
|
@ -182,11 +182,24 @@
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_5">
|
<layout class="QVBoxLayout" name="verticalLayout_5">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="darkModeCheck">
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
<property name="text">
|
<item>
|
||||||
<string>Activate dark mode</string>
|
<widget class="QLabel" name="label_4">
|
||||||
</property>
|
<property name="sizePolicy">
|
||||||
</widget>
|
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Theme:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QComboBox" name="comboBoxThemeMode"/>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="checkBoxDontUseNativeDialog">
|
<widget class="QCheckBox" name="checkBoxDontUseNativeDialog">
|
||||||
|
|
|
@ -31,6 +31,10 @@
|
||||||
|
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
|
|
||||||
|
#if QT_VERSION < QT_VERSION_CHECK(5, 13, 0)
|
||||||
|
#include "../vmisc/defglobal.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace Ui
|
namespace Ui
|
||||||
{
|
{
|
||||||
class TapePreferencesPathPage;
|
class TapePreferencesPathPage;
|
||||||
|
|
|
@ -27,10 +27,10 @@
|
||||||
*************************************************************************/
|
*************************************************************************/
|
||||||
|
|
||||||
#include "dialogtapepreferences.h"
|
#include "dialogtapepreferences.h"
|
||||||
#include "ui_dialogtapepreferences.h"
|
|
||||||
#include "../mapplication.h"
|
#include "../mapplication.h"
|
||||||
#include "configpages/tapepreferencesconfigurationpage.h"
|
#include "configpages/tapepreferencesconfigurationpage.h"
|
||||||
#include "configpages/tapepreferencespathpage.h"
|
#include "configpages/tapepreferencespathpage.h"
|
||||||
|
#include "ui_dialogtapepreferences.h"
|
||||||
|
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include <QPushButton>
|
#include <QPushButton>
|
||||||
|
@ -38,10 +38,10 @@
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
DialogTapePreferences::DialogTapePreferences(QWidget *parent)
|
DialogTapePreferences::DialogTapePreferences(QWidget *parent)
|
||||||
:QDialog(parent),
|
: QDialog(parent),
|
||||||
ui(new Ui::DialogTapePreferences),
|
ui(new Ui::DialogTapePreferences),
|
||||||
m_configurationPage(new TapePreferencesConfigurationPage),
|
m_configurationPage(new TapePreferencesConfigurationPage),
|
||||||
m_pathPage(new TapePreferencesPathPage)
|
m_pathPage(new TapePreferencesPathPage)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
|
||||||
|
@ -75,8 +75,8 @@ DialogTapePreferences::~DialogTapePreferences()
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void DialogTapePreferences::showEvent(QShowEvent *event)
|
void DialogTapePreferences::showEvent(QShowEvent *event)
|
||||||
{
|
{
|
||||||
QDialog::showEvent( event );
|
QDialog::showEvent(event);
|
||||||
if ( event->spontaneous() )
|
if (event->spontaneous())
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -93,7 +93,7 @@ void DialogTapePreferences::showEvent(QShowEvent *event)
|
||||||
resize(sz);
|
resize(sz);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_isInitialized = true;//first show windows are held
|
m_isInitialized = true; // first show windows are held
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -117,6 +117,24 @@ void DialogTapePreferences::changeEvent(QEvent *event)
|
||||||
// retranslate designer form (single inheritance approach)
|
// retranslate designer form (single inheritance approach)
|
||||||
ui->retranslateUi(this);
|
ui->retranslateUi(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (event->type() == QEvent::PaletteChange)
|
||||||
|
{
|
||||||
|
QStyle *style = QApplication::style();
|
||||||
|
|
||||||
|
QPushButton *bOk = ui->buttonBox->button(QDialogButtonBox::Ok);
|
||||||
|
SCASSERT(bOk != nullptr)
|
||||||
|
bOk->setIcon(style->standardIcon(QStyle::SP_DialogOkButton));
|
||||||
|
|
||||||
|
QPushButton *bApply = ui->buttonBox->button(QDialogButtonBox::Apply);
|
||||||
|
SCASSERT(bApply != nullptr)
|
||||||
|
bApply->setIcon(style->standardIcon(QStyle::SP_DialogApplyButton));
|
||||||
|
|
||||||
|
QPushButton *bCancel = ui->buttonBox->button(QDialogButtonBox::Cancel);
|
||||||
|
SCASSERT(bCancel != nullptr)
|
||||||
|
bCancel->setIcon(style->standardIcon(QStyle::SP_DialogCancelButton));
|
||||||
|
}
|
||||||
|
|
||||||
// remember to call base class implementation
|
// remember to call base class implementation
|
||||||
QDialog::changeEvent(event);
|
QDialog::changeEvent(event);
|
||||||
}
|
}
|
||||||
|
@ -131,8 +149,9 @@ void DialogTapePreferences::Apply()
|
||||||
|
|
||||||
if (not preferences.isEmpty())
|
if (not preferences.isEmpty())
|
||||||
{
|
{
|
||||||
const QString text = tr("Followed %n option(s) require restart to take effect: %1.", "",
|
const QString text =
|
||||||
static_cast<int>(preferences.size())).arg(preferences.join(QStringLiteral(", ")));
|
tr("Followed %n option(s) require restart to take effect: %1.", "", static_cast<int>(preferences.size()))
|
||||||
|
.arg(preferences.join(QStringLiteral(", ")));
|
||||||
QMessageBox::information(this, QCoreApplication::applicationName(), text);
|
QMessageBox::information(this, QCoreApplication::applicationName(), text);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -33,11 +33,11 @@
|
||||||
|
|
||||||
#if defined(APPIMAGE) && defined(Q_OS_LINUX)
|
#if defined(APPIMAGE) && defined(Q_OS_LINUX)
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(5, 12, 0)
|
#if QT_VERSION < QT_VERSION_CHECK(5, 12, 0)
|
||||||
# include "../vmisc/backport/qscopeguard.h"
|
#include "../vmisc/backport/qscopeguard.h"
|
||||||
#else
|
#else
|
||||||
# include <QScopeGuard>
|
#include <QScopeGuard>
|
||||||
#endif
|
#endif
|
||||||
# include "../vmisc/appimage.h"
|
#include "../vmisc/appimage.h"
|
||||||
#endif // defined(APPIMAGE) && defined(Q_OS_LINUX)
|
#endif // defined(APPIMAGE) && defined(Q_OS_LINUX)
|
||||||
|
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||||
|
@ -49,17 +49,21 @@ auto main(int argc, char *argv[]) -> int
|
||||||
#if defined(APPIMAGE) && defined(Q_OS_LINUX)
|
#if defined(APPIMAGE) && defined(Q_OS_LINUX)
|
||||||
/* Fix path to ICU_DATA when run AppImage.*/
|
/* Fix path to ICU_DATA when run AppImage.*/
|
||||||
char *exe_dir = IcuDataPath("/../share/icu");
|
char *exe_dir = IcuDataPath("/../share/icu");
|
||||||
auto FreeMemory = qScopeGuard([exe_dir] {free(exe_dir);});
|
auto FreeMemory = qScopeGuard([exe_dir] { free(exe_dir); });
|
||||||
#endif // defined(APPIMAGE) && defined(Q_OS_LINUX)
|
#endif // defined(APPIMAGE) && defined(Q_OS_LINUX)
|
||||||
|
|
||||||
Q_INIT_RESOURCE(tapeicon); // NOLINT
|
Q_INIT_RESOURCE(tapeicon); // NOLINT
|
||||||
Q_INIT_RESOURCE(theme); // NOLINT
|
Q_INIT_RESOURCE(icon); // NOLINT
|
||||||
Q_INIT_RESOURCE(icon); // NOLINT
|
Q_INIT_RESOURCE(schema); // NOLINT
|
||||||
Q_INIT_RESOURCE(schema); // NOLINT
|
Q_INIT_RESOURCE(flags); // NOLINT
|
||||||
Q_INIT_RESOURCE(flags); // NOLINT
|
Q_INIT_RESOURCE(breeze); // NOLINT
|
||||||
Q_INIT_RESOURCE(style); // NOLINT
|
#if defined(Q_OS_MACX)
|
||||||
|
Q_INIT_RESOURCE(mac_theme); // NOLINT
|
||||||
|
#else
|
||||||
|
Q_INIT_RESOURCE(win_theme); // NOLINT
|
||||||
|
#endif
|
||||||
|
|
||||||
QT_REQUIRE_VERSION(argc, argv, "5.4.0")// clazy:exclude=qstring-arg,qstring-allocations NOLINT
|
QT_REQUIRE_VERSION(argc, argv, "5.4.0") // clazy:exclude=qstring-arg,qstring-allocations NOLINT
|
||||||
|
|
||||||
#if defined(Q_OS_WIN)
|
#if defined(Q_OS_WIN)
|
||||||
VAbstractApplication::WinAttachConsole();
|
VAbstractApplication::WinAttachConsole();
|
||||||
|
@ -68,14 +72,14 @@ auto main(int argc, char *argv[]) -> int
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||||
XERCES_CPP_NAMESPACE::XMLPlatformUtils::Initialize();
|
XERCES_CPP_NAMESPACE::XMLPlatformUtils::Initialize();
|
||||||
|
|
||||||
auto Terminate = qScopeGuard([](){ XERCES_CPP_NAMESPACE::XMLPlatformUtils::Terminate(); });
|
auto Terminate = qScopeGuard([]() { XERCES_CPP_NAMESPACE::XMLPlatformUtils::Terminate(); });
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef Q_OS_MAC // supports natively
|
#ifndef Q_OS_MAC // supports natively
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||||
InitHighDpiScaling(argc, argv);
|
VAbstractApplication::InitHighDpiScaling(argc, argv);
|
||||||
#endif
|
#endif
|
||||||
#endif //Q_OS_MAC
|
#endif // Q_OS_MAC
|
||||||
|
|
||||||
#ifdef Q_OS_MAC
|
#ifdef Q_OS_MAC
|
||||||
#if MACOS_LAYER_BACKING_AFFECTED
|
#if MACOS_LAYER_BACKING_AFFECTED
|
||||||
|
|
|
@ -35,6 +35,8 @@
|
||||||
#include "../vganalytics/def.h"
|
#include "../vganalytics/def.h"
|
||||||
#include "../vganalytics/vganalytics.h"
|
#include "../vganalytics/vganalytics.h"
|
||||||
#include "../vmisc/projectversion.h"
|
#include "../vmisc/projectversion.h"
|
||||||
|
#include "../vmisc/theme/vapplicationstyle.h"
|
||||||
|
#include "../vmisc/theme/vtheme.h"
|
||||||
#include "../vmisc/vsysexits.h"
|
#include "../vmisc/vsysexits.h"
|
||||||
#include "tmainwindow.h"
|
#include "tmainwindow.h"
|
||||||
#include "version.h"
|
#include "version.h"
|
||||||
|
@ -57,6 +59,7 @@
|
||||||
#include <QPointer>
|
#include <QPointer>
|
||||||
#include <QResource>
|
#include <QResource>
|
||||||
#include <QSpacerItem>
|
#include <QSpacerItem>
|
||||||
|
#include <QStyleFactory>
|
||||||
#include <QThread>
|
#include <QThread>
|
||||||
#include <QTranslator>
|
#include <QTranslator>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
@ -100,6 +103,8 @@ Q_GLOBAL_STATIC_WITH_ARGS(const QString, SINGLE_OPTION_UNITS, (QChar('u')))
|
||||||
|
|
||||||
Q_GLOBAL_STATIC_WITH_ARGS(const QString, LONG_OPTION_TEST, (QLatin1String("test"))) // NOLINT
|
Q_GLOBAL_STATIC_WITH_ARGS(const QString, LONG_OPTION_TEST, (QLatin1String("test"))) // NOLINT
|
||||||
|
|
||||||
|
Q_GLOBAL_STATIC_WITH_ARGS(const QString, LONG_OPTION_STYLE, (QLatin1String("style"))) // NOLINT
|
||||||
|
|
||||||
QT_WARNING_POP
|
QT_WARNING_POP
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
|
@ -316,6 +321,7 @@ MApplication::MApplication(int &argc, char **argv)
|
||||||
// The first inside own bundle where info.plist is works fine, but the second,
|
// The first inside own bundle where info.plist is works fine, but the second,
|
||||||
// when we run inside Valentina's bundle, require direct setting the icon.
|
// when we run inside Valentina's bundle, require direct setting the icon.
|
||||||
setWindowIcon(QIcon(":/tapeicon/64x64/logo.png"));
|
setWindowIcon(QIcon(":/tapeicon/64x64/logo.png"));
|
||||||
|
VTheme::Instance()->StoreDefaultThemeName(QIcon::themeName());
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -476,16 +482,9 @@ void MApplication::InitOptions()
|
||||||
|
|
||||||
CheckSystemLocale();
|
CheckSystemLocale();
|
||||||
|
|
||||||
static const char *GENERIC_ICON_TO_CHECK = "document-open";
|
VTheme::SetIconTheme();
|
||||||
if (not QIcon::hasThemeIcon(GENERIC_ICON_TO_CHECK))
|
VTheme::InitThemeMode();
|
||||||
{
|
|
||||||
// If there is no default working icon theme then we should
|
|
||||||
// use an icon theme that we provide via a .qrc file
|
|
||||||
// This case happens under Windows and Mac OS X
|
|
||||||
// This does not happen under GNOME or KDE
|
|
||||||
QIcon::setThemeName(QStringLiteral("win.icon.theme"));
|
|
||||||
}
|
|
||||||
ActivateDarkMode();
|
|
||||||
QResource::registerResource(diagramsPath());
|
QResource::registerResource(diagramsPath());
|
||||||
|
|
||||||
auto *statistic = VGAnalytics::Instance();
|
auto *statistic = VGAnalytics::Instance();
|
||||||
|
@ -503,27 +502,6 @@ void MApplication::InitOptions()
|
||||||
statistic->Enable(settings->IsCollectStatistic());
|
statistic->Enable(settings->IsCollectStatistic());
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
|
||||||
// Dark mode
|
|
||||||
void MApplication::ActivateDarkMode()
|
|
||||||
{
|
|
||||||
VTapeSettings *settings = TapeSettings();
|
|
||||||
if (settings->GetDarkMode())
|
|
||||||
{
|
|
||||||
QFile f(QStringLiteral(":qdarkstyle/style.qss"));
|
|
||||||
if (!f.exists())
|
|
||||||
{
|
|
||||||
qDebug() << "Unable to set stylesheet, file not found\n";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
f.open(QFile::ReadOnly | QFile::Text);
|
|
||||||
QTextStream ts(&f);
|
|
||||||
qApp->setStyleSheet(ts.readAll()); // NOLINT(cppcoreguidelines-pro-type-static-cast-downcast)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void MApplication::InitTrVars()
|
void MApplication::InitTrVars()
|
||||||
{
|
{
|
||||||
|
@ -710,6 +688,22 @@ void MApplication::ParseCommandLine(const SocketConnection &connection, const QS
|
||||||
qCDebug(mApp, "Can't establish connection to the server '%s'", qUtf8Printable(serverName));
|
qCDebug(mApp, "Can't establish connection to the server '%s'", qUtf8Printable(serverName));
|
||||||
StartLocalServer(serverName);
|
StartLocalServer(serverName);
|
||||||
LoadTranslation(TapeSettings()->GetLocale());
|
LoadTranslation(TapeSettings()->GetLocale());
|
||||||
|
|
||||||
|
QString styleOpt = parser.value(*LONG_OPTION_STYLE);
|
||||||
|
if (styleOpt.isEmpty())
|
||||||
|
{
|
||||||
|
styleOpt = QLatin1String("native");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (styleOpt != QLatin1String("native"))
|
||||||
|
{
|
||||||
|
QStyle *style = QStyleFactory::create(styleOpt);
|
||||||
|
if (style != nullptr)
|
||||||
|
{
|
||||||
|
style = new VApplicationStyle(style);
|
||||||
|
setStyle(style);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const QStringList args = parser.positionalArguments();
|
const QStringList args = parser.positionalArguments();
|
||||||
|
@ -822,6 +816,7 @@ void MApplication::InitParserOptions(QCommandLineParser &parser)
|
||||||
tr("Disable high dpi scaling. Call this option if has problem with scaling (by default scaling enabled). "
|
tr("Disable high dpi scaling. Call this option if has problem with scaling (by default scaling enabled). "
|
||||||
"Alternatively you can use the %1 environment variable.")
|
"Alternatively you can use the %1 environment variable.")
|
||||||
.arg("QT_AUTO_SCREEN_SCALE_FACTOR=0")},
|
.arg("QT_AUTO_SCREEN_SCALE_FACTOR=0")},
|
||||||
|
{*LONG_OPTION_STYLE, tr("Application style") + QString(" `Fusion`, `Windows`, `native`, ..."), "", "native"},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -29,16 +29,20 @@
|
||||||
#ifndef MAPPLICATION_H
|
#ifndef MAPPLICATION_H
|
||||||
#define MAPPLICATION_H
|
#define MAPPLICATION_H
|
||||||
|
|
||||||
#include "../vpatterndb/vtranslatevars.h"
|
|
||||||
#include "vtapesettings.h"
|
|
||||||
#include "../vmisc/vabstractapplication.h"
|
#include "../vmisc/vabstractapplication.h"
|
||||||
|
#include "../vpatterndb/vtranslatevars.h"
|
||||||
#include "dialogs/dialogmdatabase.h"
|
#include "dialogs/dialogmdatabase.h"
|
||||||
|
#include "vtapesettings.h"
|
||||||
|
|
||||||
class TMainWindow;
|
class TMainWindow;
|
||||||
class QLocalServer;
|
class QLocalServer;
|
||||||
class QCommandLineParser;
|
class QCommandLineParser;
|
||||||
|
|
||||||
enum class SocketConnection : bool {Client = false, Server = true};
|
enum class SocketConnection : bool
|
||||||
|
{
|
||||||
|
Client = false,
|
||||||
|
Server = true
|
||||||
|
};
|
||||||
|
|
||||||
class MApplication : public VAbstractApplication
|
class MApplication : public VAbstractApplication
|
||||||
{
|
{
|
||||||
|
@ -48,12 +52,12 @@ public:
|
||||||
MApplication(int &argc, char **argv);
|
MApplication(int &argc, char **argv);
|
||||||
~MApplication() override;
|
~MApplication() override;
|
||||||
|
|
||||||
auto notify(QObject * receiver, QEvent * event) -> bool override;
|
auto notify(QObject *receiver, QEvent *event) -> bool override;
|
||||||
|
|
||||||
auto IsTestMode() const -> bool;
|
auto IsTestMode() const -> bool;
|
||||||
auto IsAppInGUIMode() const -> bool override;
|
auto IsAppInGUIMode() const -> bool override;
|
||||||
auto MainWindow() -> TMainWindow *;
|
auto MainWindow() -> TMainWindow *;
|
||||||
auto MainWindows() -> QList<TMainWindow*>;
|
auto MainWindows() -> QList<TMainWindow *>;
|
||||||
auto NewMainWindow() -> TMainWindow *;
|
auto NewMainWindow() -> TMainWindow *;
|
||||||
|
|
||||||
void InitOptions();
|
void InitOptions();
|
||||||
|
@ -62,7 +66,6 @@ public:
|
||||||
|
|
||||||
void OpenSettings() override;
|
void OpenSettings() override;
|
||||||
auto TapeSettings() -> VTapeSettings *;
|
auto TapeSettings() -> VTapeSettings *;
|
||||||
void ActivateDarkMode();
|
|
||||||
|
|
||||||
static auto diagramsPath() -> QString;
|
static auto diagramsPath() -> QString;
|
||||||
|
|
||||||
|
@ -90,7 +93,7 @@ private slots:
|
||||||
private:
|
private:
|
||||||
// cppcheck-suppress unknownMacro
|
// cppcheck-suppress unknownMacro
|
||||||
Q_DISABLE_COPY_MOVE(MApplication) // NOLINT
|
Q_DISABLE_COPY_MOVE(MApplication) // NOLINT
|
||||||
QList<QPointer<TMainWindow> > m_mainWindows{};
|
QList<QPointer<TMainWindow>> m_mainWindows{};
|
||||||
QLocalServer *m_localServer{nullptr};
|
QLocalServer *m_localServer{nullptr};
|
||||||
VTranslateVars *m_trVars{nullptr};
|
VTranslateVars *m_trVars{nullptr};
|
||||||
QPointer<DialogMDataBase> m_dataBase{};
|
QPointer<DialogMDataBase> m_dataBase{};
|
||||||
|
@ -107,7 +110,7 @@ private:
|
||||||
static void ParseDimensionAOption(QCommandLineParser &parser, int &dimensionAValue, bool &flagDimensionA);
|
static void ParseDimensionAOption(QCommandLineParser &parser, int &dimensionAValue, bool &flagDimensionA);
|
||||||
static void ParseDimensionBOption(QCommandLineParser &parser, int &dimensionBValue, bool &flagDimensionB);
|
static void ParseDimensionBOption(QCommandLineParser &parser, int &dimensionBValue, bool &flagDimensionB);
|
||||||
static void ParseDimensionCOption(QCommandLineParser &parser, int &dimensionCValue, bool &flagDimensionC);
|
static void ParseDimensionCOption(QCommandLineParser &parser, int &dimensionCValue, bool &flagDimensionC);
|
||||||
static void ParseUnitsOption(QCommandLineParser &parser, Unit &unit , bool &flagUnits);
|
static void ParseUnitsOption(QCommandLineParser &parser, Unit &unit, bool &flagUnits);
|
||||||
};
|
};
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -1946,15 +1946,13 @@ void TMainWindow::DeployFormula()
|
||||||
{
|
{
|
||||||
ui->plainTextEditFormula->setFixedHeight(DIALOG_MAX_FORMULA_HEIGHT);
|
ui->plainTextEditFormula->setFixedHeight(DIALOG_MAX_FORMULA_HEIGHT);
|
||||||
// Set icon from theme (internal for Windows system)
|
// Set icon from theme (internal for Windows system)
|
||||||
ui->pushButtonGrow->setIcon(
|
ui->pushButtonGrow->setIcon(QIcon::fromTheme(QStringLiteral("go-next")));
|
||||||
QIcon::fromTheme(QStringLiteral("go-next"), QIcon(":/icons/win.icon.theme/16x16/actions/go-next.png")));
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ui->plainTextEditFormula->setFixedHeight(m_formulaBaseHeight);
|
ui->plainTextEditFormula->setFixedHeight(m_formulaBaseHeight);
|
||||||
// Set icon from theme (internal for Windows system)
|
// Set icon from theme (internal for Windows system)
|
||||||
ui->pushButtonGrow->setIcon(
|
ui->pushButtonGrow->setIcon(QIcon::fromTheme(QStringLiteral("go-down")));
|
||||||
QIcon::fromTheme(QStringLiteral("go-down"), QIcon(":/icons/win.icon.theme/16x16/actions/go-down.png")));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// I found that after change size of formula field, it was filed for angle formula, field for formula became black.
|
// I found that after change size of formula field, it was filed for angle formula, field for formula became black.
|
||||||
|
|
|
@ -39,6 +39,8 @@
|
||||||
#include "../vganalytics/def.h"
|
#include "../vganalytics/def.h"
|
||||||
#include "../vganalytics/vganalytics.h"
|
#include "../vganalytics/vganalytics.h"
|
||||||
#include "../vmisc/qt_dispatch/qt_dispatch.h"
|
#include "../vmisc/qt_dispatch/qt_dispatch.h"
|
||||||
|
#include "../vmisc/theme/vapplicationstyle.h"
|
||||||
|
#include "../vmisc/theme/vtheme.h"
|
||||||
#include "../vmisc/vsysexits.h"
|
#include "../vmisc/vsysexits.h"
|
||||||
#include "../vmisc/vvalentinasettings.h"
|
#include "../vmisc/vvalentinasettings.h"
|
||||||
|
|
||||||
|
@ -50,12 +52,15 @@
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
#include <QFile>
|
#include <QFile>
|
||||||
#include <QIcon>
|
#include <QIcon>
|
||||||
|
#include <QLoggingCategory>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include <QProcess>
|
#include <QProcess>
|
||||||
#include <QStandardPaths>
|
#include <QStandardPaths>
|
||||||
|
#include <QStyleFactory>
|
||||||
#include <QTemporaryFile>
|
#include <QTemporaryFile>
|
||||||
#include <QThread>
|
#include <QThread>
|
||||||
#include <Qt>
|
#include <QTimer>
|
||||||
|
#include <QUuid>
|
||||||
#include <QtDebug>
|
#include <QtDebug>
|
||||||
|
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||||
|
@ -378,6 +383,7 @@ VApplication::VApplication(int &argc, char **argv)
|
||||||
setApplicationVersion(APP_VERSION_STR);
|
setApplicationVersion(APP_VERSION_STR);
|
||||||
// making sure will create new instance...just in case we will ever do 2 objects of VApplication
|
// making sure will create new instance...just in case we will ever do 2 objects of VApplication
|
||||||
VCommandLine::Reset();
|
VCommandLine::Reset();
|
||||||
|
VTheme::Instance()->StoreDefaultThemeName(QIcon::themeName());
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -523,26 +529,6 @@ auto VApplication::notify(QObject *receiver, QEvent *event) -> bool
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
|
||||||
void VApplication::ActivateDarkMode()
|
|
||||||
{
|
|
||||||
VValentinaSettings *settings = ValentinaSettings();
|
|
||||||
if (settings->GetDarkMode())
|
|
||||||
{
|
|
||||||
QFile f(QStringLiteral(":qdarkstyle/style.qss"));
|
|
||||||
if (!f.exists())
|
|
||||||
{
|
|
||||||
qDebug() << "Unable to set stylesheet, file not found\n";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
f.open(QFile::ReadOnly | QFile::Text);
|
|
||||||
QTextStream ts(&f);
|
|
||||||
qApp->setStyleSheet(ts.readAll()); // NOLINT(cppcoreguidelines-pro-type-static-cast-downcast)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
auto VApplication::TapeFilePath() -> QString
|
auto VApplication::TapeFilePath() -> QString
|
||||||
{
|
{
|
||||||
|
@ -696,18 +682,21 @@ void VApplication::InitOptions()
|
||||||
if (VApplication::IsGUIMode()) // By default console version uses system locale
|
if (VApplication::IsGUIMode()) // By default console version uses system locale
|
||||||
{
|
{
|
||||||
LoadTranslation(ValentinaSettings()->GetLocale());
|
LoadTranslation(ValentinaSettings()->GetLocale());
|
||||||
}
|
|
||||||
|
|
||||||
static const char *GENERIC_ICON_TO_CHECK = "document-open";
|
VTheme::SetIconTheme();
|
||||||
if (not QIcon::hasThemeIcon(GENERIC_ICON_TO_CHECK))
|
VTheme::InitThemeMode();
|
||||||
{
|
|
||||||
// If there is no default working icon theme then we should
|
QString styleOpt = VApplication::CommandLine()->OptStyle();
|
||||||
// use an icon theme that we provide via a .qrc file
|
if (styleOpt != QLatin1String("native"))
|
||||||
// This case happens under Windows and Mac OS X
|
{
|
||||||
// This does not happen under GNOME or KDE
|
QStyle *style = QStyleFactory::create(styleOpt);
|
||||||
QIcon::setThemeName(QStringLiteral("win.icon.theme"));
|
if (style != nullptr)
|
||||||
|
{
|
||||||
|
style = new VApplicationStyle(style);
|
||||||
|
setStyle(style);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
ActivateDarkMode();
|
|
||||||
|
|
||||||
auto *statistic = VGAnalytics::Instance();
|
auto *statistic = VGAnalytics::Instance();
|
||||||
QString clientID = settings->GetClientID();
|
QString clientID = settings->GetClientID();
|
||||||
|
|
|
@ -30,11 +30,11 @@
|
||||||
#define VAPPLICATION_H
|
#define VAPPLICATION_H
|
||||||
|
|
||||||
#include "../vmisc/vabstractvalapplication.h"
|
#include "../vmisc/vabstractvalapplication.h"
|
||||||
|
#include "../vmisc/vlockguard.h"
|
||||||
#include "../vpatterndb/vtranslatevars.h"
|
#include "../vpatterndb/vtranslatevars.h"
|
||||||
#include "vcmdexport.h"
|
#include "vcmdexport.h"
|
||||||
#include "../vmisc/vlockguard.h"
|
|
||||||
|
|
||||||
class VApplication;// use in define
|
class VApplication; // use in define
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief The VApplication class reimplamentation QApplication class.
|
* @brief The VApplication class reimplamentation QApplication class.
|
||||||
|
@ -42,12 +42,13 @@ class VApplication;// use in define
|
||||||
class VApplication : public VAbstractValApplication
|
class VApplication : public VAbstractValApplication
|
||||||
{
|
{
|
||||||
Q_OBJECT // NOLINT
|
Q_OBJECT // NOLINT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
VApplication(int &argc, char ** argv);
|
VApplication(int &argc, char **argv);
|
||||||
~VApplication() override;
|
~VApplication() override;
|
||||||
|
|
||||||
static void NewValentina(const QString &fileName = QString());
|
static void NewValentina(const QString &fileName = QString());
|
||||||
auto notify(QObject * receiver, QEvent * event) -> bool override;
|
auto notify(QObject *receiver, QEvent *event) -> bool override;
|
||||||
|
|
||||||
void InitOptions();
|
void InitOptions();
|
||||||
|
|
||||||
|
@ -62,7 +63,6 @@ public:
|
||||||
static auto LabelLanguages() -> QStringList;
|
static auto LabelLanguages() -> QStringList;
|
||||||
|
|
||||||
void StartLogging();
|
void StartLogging();
|
||||||
void ActivateDarkMode();
|
|
||||||
auto LogFile() -> QTextStream *;
|
auto LogFile() -> QTextStream *;
|
||||||
|
|
||||||
auto TrVars() -> const VTranslateVars * override;
|
auto TrVars() -> const VTranslateVars * override;
|
||||||
|
@ -85,7 +85,7 @@ private:
|
||||||
// cppcheck-suppress unknownMacro
|
// cppcheck-suppress unknownMacro
|
||||||
Q_DISABLE_COPY_MOVE(VApplication) // NOLINT
|
Q_DISABLE_COPY_MOVE(VApplication) // NOLINT
|
||||||
VTranslateVars *m_trVars{nullptr};
|
VTranslateVars *m_trVars{nullptr};
|
||||||
QTimer *m_autoSaveTimer{nullptr};
|
QTimer *m_autoSaveTimer{nullptr};
|
||||||
|
|
||||||
QSharedPointer<VLockGuard<QFile>> m_lockLog{};
|
QSharedPointer<VLockGuard<QFile>> m_lockLog{};
|
||||||
std::shared_ptr<QTextStream> m_out{nullptr};
|
std::shared_ptr<QTextStream> m_out{nullptr};
|
||||||
|
|
|
@ -30,11 +30,11 @@
|
||||||
#include "../dialogs/dialoglayoutsettings.h"
|
#include "../dialogs/dialoglayoutsettings.h"
|
||||||
#include "../dialogs/dialogsavelayout.h"
|
#include "../dialogs/dialogsavelayout.h"
|
||||||
#include "../ifc/xml/vdomdocument.h"
|
#include "../ifc/xml/vdomdocument.h"
|
||||||
|
#include "../vlayout/vlayoutgenerator.h"
|
||||||
#include "../vmisc/commandoptions.h"
|
#include "../vmisc/commandoptions.h"
|
||||||
|
#include "../vmisc/dialogs/dialogexporttocsv.h"
|
||||||
#include "../vmisc/vsysexits.h"
|
#include "../vmisc/vsysexits.h"
|
||||||
#include "../vmisc/vvalentinasettings.h"
|
#include "../vmisc/vvalentinasettings.h"
|
||||||
#include "../vmisc/dialogs/dialogexporttocsv.h"
|
|
||||||
#include "../vlayout/vlayoutgenerator.h"
|
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||||
|
@ -45,7 +45,8 @@
|
||||||
|
|
||||||
VCommandLinePtr VCommandLine::instance = nullptr; // NOLINT(cppcoreguidelines-avoid-non-const-global-variables)
|
VCommandLinePtr VCommandLine::instance = nullptr; // NOLINT(cppcoreguidelines-avoid-non-const-global-variables)
|
||||||
|
|
||||||
#define translate(context, source) QCoreApplication::translate((context), (source)) // NOLINT(cppcoreguidelines-macro-usage)
|
#define translate(context, source) \
|
||||||
|
QCoreApplication::translate((context), (source)) // NOLINT(cppcoreguidelines-macro-usage)
|
||||||
|
|
||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
|
@ -56,7 +57,7 @@ auto Lo2Px(const QString &src, const DialogLayoutSettings &converter, bool *ok)
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
auto Pg2Px(const QString& src, const DialogLayoutSettings& converter, bool *ok) -> qreal
|
auto Pg2Px(const QString &src, const DialogLayoutSettings &converter, bool *ok) -> qreal
|
||||||
{
|
{
|
||||||
return converter.PageToPixels(src.toDouble(ok));
|
return converter.PageToPixels(src.toDouble(ok));
|
||||||
}
|
}
|
||||||
|
@ -87,7 +88,7 @@ auto VCommandLine::FormatSize(const QString &key) const -> VAbstractLayoutDialog
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
auto VCommandLine::DefaultGenerator() const -> VLayoutGeneratorPtr
|
auto VCommandLine::DefaultGenerator() const -> VLayoutGeneratorPtr
|
||||||
{
|
{
|
||||||
//this functions covers all options found into layout setup dialog, nothing to add here, unless dialog extended
|
// this functions covers all options found into layout setup dialog, nothing to add here, unless dialog extended
|
||||||
|
|
||||||
VLayoutGeneratorPtr res(new VLayoutGenerator());
|
VLayoutGeneratorPtr res(new VLayoutGenerator());
|
||||||
DialogLayoutSettings diag(res.get(), nullptr, true);
|
DialogLayoutSettings diag(res.get(), nullptr, true);
|
||||||
|
@ -100,16 +101,16 @@ auto VCommandLine::DefaultGenerator() const -> VLayoutGeneratorPtr
|
||||||
if (!diag.SelectTemplate(OptPaperSize()))
|
if (!diag.SelectTemplate(OptPaperSize()))
|
||||||
{
|
{
|
||||||
qCritical() << translate("VCommandLine", "Unknown page templated selected.") << "\n";
|
qCritical() << translate("VCommandLine", "Unknown page templated selected.") << "\n";
|
||||||
const_cast<VCommandLine*>(this)->parser.showHelp(V_EX_USAGE);
|
const_cast<VCommandLine *>(this)->parser.showHelp(V_EX_USAGE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (IsOptionSet(LONG_OPTION_PAGEH))
|
if (IsOptionSet(LONG_OPTION_PAGEH))
|
||||||
{ //at this point we already sure 3 are set or none
|
{ // at this point we already sure 3 are set or none
|
||||||
|
|
||||||
if (!diag.SelectPaperUnit(OptionValue(LONG_OPTION_PAGEUNITS)))
|
if (!diag.SelectPaperUnit(OptionValue(LONG_OPTION_PAGEUNITS)))
|
||||||
{
|
{
|
||||||
qCritical() << translate("VCommandLine", "Unsupported paper units.") << "\n";
|
qCritical() << translate("VCommandLine", "Unsupported paper units.") << "\n";
|
||||||
const_cast<VCommandLine*>(this)->parser.showHelp(V_EX_USAGE);
|
const_cast<VCommandLine *>(this)->parser.showHelp(V_EX_USAGE);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ok = false;
|
bool ok = false;
|
||||||
|
@ -117,7 +118,7 @@ auto VCommandLine::DefaultGenerator() const -> VLayoutGeneratorPtr
|
||||||
if (not ok)
|
if (not ok)
|
||||||
{
|
{
|
||||||
qCritical() << translate("VCommandLine", "Invalid page height value.") << "\n";
|
qCritical() << translate("VCommandLine", "Invalid page height value.") << "\n";
|
||||||
const_cast<VCommandLine*>(this)->parser.showHelp(V_EX_USAGE);
|
const_cast<VCommandLine *>(this)->parser.showHelp(V_EX_USAGE);
|
||||||
}
|
}
|
||||||
diag.SetPaperHeight(height);
|
diag.SetPaperHeight(height);
|
||||||
|
|
||||||
|
@ -126,7 +127,7 @@ auto VCommandLine::DefaultGenerator() const -> VLayoutGeneratorPtr
|
||||||
if (not ok)
|
if (not ok)
|
||||||
{
|
{
|
||||||
qCritical() << translate("VCommandLine", "Invalid page width value.") << "\n";
|
qCritical() << translate("VCommandLine", "Invalid page width value.") << "\n";
|
||||||
const_cast<VCommandLine*>(this)->parser.showHelp(V_EX_USAGE);
|
const_cast<VCommandLine *>(this)->parser.showHelp(V_EX_USAGE);
|
||||||
}
|
}
|
||||||
diag.SetPaperWidth(width);
|
diag.SetPaperWidth(width);
|
||||||
}
|
}
|
||||||
|
@ -143,7 +144,7 @@ auto VCommandLine::DefaultGenerator() const -> VLayoutGeneratorPtr
|
||||||
if (!diag.SelectLayoutUnit(OptionValue(LONG_OPTION_SHIFTUNITS)))
|
if (!diag.SelectLayoutUnit(OptionValue(LONG_OPTION_SHIFTUNITS)))
|
||||||
{
|
{
|
||||||
qCritical() << translate("VCommandLine", "Unsupported layout units.") << "\n";
|
qCritical() << translate("VCommandLine", "Unsupported layout units.") << "\n";
|
||||||
const_cast<VCommandLine*>(this)->parser.showHelp(V_EX_USAGE);
|
const_cast<VCommandLine *>(this)->parser.showHelp(V_EX_USAGE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -154,7 +155,7 @@ auto VCommandLine::DefaultGenerator() const -> VLayoutGeneratorPtr
|
||||||
if (not ok)
|
if (not ok)
|
||||||
{
|
{
|
||||||
qCritical() << translate("VCommandLine", "Invalid gap width.") << "\n";
|
qCritical() << translate("VCommandLine", "Invalid gap width.") << "\n";
|
||||||
const_cast<VCommandLine*>(this)->parser.showHelp(V_EX_USAGE);
|
const_cast<VCommandLine *>(this)->parser.showHelp(V_EX_USAGE);
|
||||||
}
|
}
|
||||||
diag.SetLayoutWidth(width);
|
diag.SetLayoutWidth(width);
|
||||||
}
|
}
|
||||||
|
@ -184,7 +185,7 @@ auto VCommandLine::DefaultGenerator() const -> VLayoutGeneratorPtr
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
auto VCommandLine::Get(const QCoreApplication& app) -> VCommandLinePtr
|
auto VCommandLine::Get(const QCoreApplication &app) -> VCommandLinePtr
|
||||||
{
|
{
|
||||||
if (instance == nullptr)
|
if (instance == nullptr)
|
||||||
{
|
{
|
||||||
|
@ -192,10 +193,9 @@ auto VCommandLine::Get(const QCoreApplication& app) -> VCommandLinePtr
|
||||||
}
|
}
|
||||||
instance->parser.process(app);
|
instance->parser.process(app);
|
||||||
|
|
||||||
//fixme: in case of additional options/modes which will need to disable GUI - add it here too
|
// fixme: in case of additional options/modes which will need to disable GUI - add it here too
|
||||||
instance->isGuiEnabled = not (instance->IsExportEnabled()
|
instance->isGuiEnabled =
|
||||||
|| instance->IsTestModeEnabled()
|
not(instance->IsExportEnabled() || instance->IsTestModeEnabled() || instance->IsExportFMEnabled());
|
||||||
|| instance->IsExportFMEnabled());
|
|
||||||
|
|
||||||
return instance;
|
return instance;
|
||||||
}
|
}
|
||||||
|
@ -213,7 +213,7 @@ auto VCommandLine::IsTestModeEnabled() const -> bool
|
||||||
if (r && parser.positionalArguments().size() != 1)
|
if (r && parser.positionalArguments().size() != 1)
|
||||||
{
|
{
|
||||||
qCritical() << translate("VCommandLine", "Test option can be used with single input file only.") << "/n";
|
qCritical() << translate("VCommandLine", "Test option can be used with single input file only.") << "/n";
|
||||||
const_cast<VCommandLine*>(this)->parser.showHelp(V_EX_USAGE);
|
const_cast<VCommandLine *>(this)->parser.showHelp(V_EX_USAGE);
|
||||||
}
|
}
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
@ -238,7 +238,7 @@ auto VCommandLine::IsExportEnabled() const -> bool
|
||||||
if (r && parser.positionalArguments().size() != 1)
|
if (r && parser.positionalArguments().size() != 1)
|
||||||
{
|
{
|
||||||
qCritical() << translate("VCommandLine", "Export options can be used with single input file only.") << "/n";
|
qCritical() << translate("VCommandLine", "Export options can be used with single input file only.") << "/n";
|
||||||
const_cast<VCommandLine*>(this)->parser.showHelp(V_EX_USAGE);
|
const_cast<VCommandLine *>(this)->parser.showHelp(V_EX_USAGE);
|
||||||
}
|
}
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
@ -250,7 +250,7 @@ auto VCommandLine::IsExportFMEnabled() const -> bool
|
||||||
if (r && parser.positionalArguments().size() != 1)
|
if (r && parser.positionalArguments().size() != 1)
|
||||||
{
|
{
|
||||||
qCritical() << translate("VCommandLine", "Export options can be used with single input file only.") << "/n";
|
qCritical() << translate("VCommandLine", "Export options can be used with single input file only.") << "/n";
|
||||||
const_cast<VCommandLine*>(this)->parser.showHelp(V_EX_USAGE);
|
const_cast<VCommandLine *>(this)->parser.showHelp(V_EX_USAGE);
|
||||||
}
|
}
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
@ -265,7 +265,7 @@ auto VCommandLine::OptPaperSize() const -> VAbstractLayoutDialog::PaperSizeTempl
|
||||||
auto VCommandLine::OptGroup() const -> Cases
|
auto VCommandLine::OptGroup() const -> Cases
|
||||||
{
|
{
|
||||||
int r = OptionValue(LONG_OPTION_GROUPPING).toInt();
|
int r = OptionValue(LONG_OPTION_GROUPPING).toInt();
|
||||||
if ( r < 0 || r >= static_cast<int>(Cases::UnknownCase))
|
if (r < 0 || r >= static_cast<int>(Cases::UnknownCase))
|
||||||
{
|
{
|
||||||
r = 0;
|
r = 0;
|
||||||
}
|
}
|
||||||
|
@ -276,10 +276,9 @@ auto VCommandLine::OptGroup() const -> Cases
|
||||||
auto VCommandLine::OptMeasurePath() const -> QString
|
auto VCommandLine::OptMeasurePath() const -> QString
|
||||||
{
|
{
|
||||||
QString measure;
|
QString measure;
|
||||||
if (IsOptionSet(LONG_OPTION_MEASUREFILE)
|
if (IsOptionSet(LONG_OPTION_MEASUREFILE) && (IsExportEnabled() || IsTestModeEnabled()))
|
||||||
&& (IsExportEnabled() || IsTestModeEnabled()))
|
// todo: don't want yet to allow user set measure file for general loading,
|
||||||
//todo: don't want yet to allow user set measure file for general loading,
|
// because need to fix multiply opened windows as well
|
||||||
//because need to fix multiply opened windows as well
|
|
||||||
{
|
{
|
||||||
measure = OptionValue(LONG_OPTION_MEASUREFILE);
|
measure = OptionValue(LONG_OPTION_MEASUREFILE);
|
||||||
}
|
}
|
||||||
|
@ -410,14 +409,14 @@ auto VCommandLine::OptUserMaterials() const -> QMap<int, QString>
|
||||||
{
|
{
|
||||||
QMap<int, QString> userMaterials;
|
QMap<int, QString> userMaterials;
|
||||||
const QStringList values = OptionValues(LONG_OPTION_USER_MATERIAL);
|
const QStringList values = OptionValues(LONG_OPTION_USER_MATERIAL);
|
||||||
for(const auto &value : values)
|
for (const auto &value : values)
|
||||||
{
|
{
|
||||||
const QStringList parts = value.split('@');
|
const QStringList parts = value.split('@');
|
||||||
if (parts.size() != 2)
|
if (parts.size() != 2)
|
||||||
{
|
{
|
||||||
qCritical() << translate("VCommandLine", "Invalid user material '%1'. Separator is missing.").arg(value)
|
qCritical() << translate("VCommandLine", "Invalid user material '%1'. Separator is missing.").arg(value)
|
||||||
<< "\n";
|
<< "\n";
|
||||||
const_cast<VCommandLine*>(this)->parser.showHelp(V_EX_USAGE);
|
const_cast<VCommandLine *>(this)->parser.showHelp(V_EX_USAGE);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ok = false;
|
bool ok = false;
|
||||||
|
@ -427,7 +426,7 @@ auto VCommandLine::OptUserMaterials() const -> QMap<int, QString>
|
||||||
{
|
{
|
||||||
qCritical() << translate("VCommandLine", "Invalid user material '%1'. Wrong material number.").arg(value)
|
qCritical() << translate("VCommandLine", "Invalid user material '%1'. Wrong material number.").arg(value)
|
||||||
<< "\n";
|
<< "\n";
|
||||||
const_cast<VCommandLine*>(this)->parser.showHelp(V_EX_USAGE);
|
const_cast<VCommandLine *>(this)->parser.showHelp(V_EX_USAGE);
|
||||||
}
|
}
|
||||||
|
|
||||||
userMaterials.insert(number, ConstLast<QString>(parts));
|
userMaterials.insert(number, ConstLast<QString>(parts));
|
||||||
|
@ -473,13 +472,13 @@ auto VCommandLine::OptDimensionA() const -> int
|
||||||
|
|
||||||
bool ok = false;
|
bool ok = false;
|
||||||
int dimensionAValue = value.toInt(&ok);
|
int dimensionAValue = value.toInt(&ok);
|
||||||
if(ok && dimensionAValue > 0)
|
if (ok && dimensionAValue > 0)
|
||||||
{
|
{
|
||||||
return dimensionAValue;
|
return dimensionAValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
qCritical() << translate("VCommandLine", "Invalid dimension A value.") << "\n";
|
qCritical() << translate("VCommandLine", "Invalid dimension A value.") << "\n";
|
||||||
const_cast<VCommandLine*>(this)->parser.showHelp(V_EX_USAGE);
|
const_cast<VCommandLine *>(this)->parser.showHelp(V_EX_USAGE);
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -489,13 +488,13 @@ auto VCommandLine::OptDimensionB() const -> int
|
||||||
|
|
||||||
bool ok = false;
|
bool ok = false;
|
||||||
int dimensionBValue = value.toInt(&ok);
|
int dimensionBValue = value.toInt(&ok);
|
||||||
if(ok && dimensionBValue > 0)
|
if (ok && dimensionBValue > 0)
|
||||||
{
|
{
|
||||||
return dimensionBValue;
|
return dimensionBValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
qCritical() << translate("VCommandLine", "Invalid dimension B value.") << "\n";
|
qCritical() << translate("VCommandLine", "Invalid dimension B value.") << "\n";
|
||||||
const_cast<VCommandLine*>(this)->parser.showHelp(V_EX_USAGE);
|
const_cast<VCommandLine *>(this)->parser.showHelp(V_EX_USAGE);
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -505,13 +504,13 @@ auto VCommandLine::OptDimensionC() const -> int
|
||||||
|
|
||||||
bool ok = false;
|
bool ok = false;
|
||||||
int dimensionCValue = value.toInt(&ok);
|
int dimensionCValue = value.toInt(&ok);
|
||||||
if(ok && dimensionCValue > 0)
|
if (ok && dimensionCValue > 0)
|
||||||
{
|
{
|
||||||
return dimensionCValue;
|
return dimensionCValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
qCritical() << translate("VCommandLine", "Invalid dimension C value.") << "\n";
|
qCritical() << translate("VCommandLine", "Invalid dimension C value.") << "\n";
|
||||||
const_cast<VCommandLine*>(this)->parser.showHelp(V_EX_USAGE);
|
const_cast<VCommandLine *>(this)->parser.showHelp(V_EX_USAGE);
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -528,7 +527,7 @@ auto VCommandLine::TiledPageMargins() const -> QMarginsF
|
||||||
if (not supportedUnits.contains(value))
|
if (not supportedUnits.contains(value))
|
||||||
{
|
{
|
||||||
qCritical() << translate("VCommandLine", "Unsupported paper units.") << "\n";
|
qCritical() << translate("VCommandLine", "Unsupported paper units.") << "\n";
|
||||||
const_cast<VCommandLine*>(this)->parser.showHelp(V_EX_USAGE);
|
const_cast<VCommandLine *>(this)->parser.showHelp(V_EX_USAGE);
|
||||||
}
|
}
|
||||||
unit = StrToUnits(value);
|
unit = StrToUnits(value);
|
||||||
}
|
}
|
||||||
|
@ -540,7 +539,7 @@ auto VCommandLine::TiledPageMargins() const -> QMarginsF
|
||||||
if (not ok)
|
if (not ok)
|
||||||
{
|
{
|
||||||
qCritical() << translate("VCommandLine", "Invalid tiled page left margin.") << "\n";
|
qCritical() << translate("VCommandLine", "Invalid tiled page left margin.") << "\n";
|
||||||
const_cast<VCommandLine*>(this)->parser.showHelp(V_EX_USAGE);
|
const_cast<VCommandLine *>(this)->parser.showHelp(V_EX_USAGE);
|
||||||
}
|
}
|
||||||
margins.setLeft(margin);
|
margins.setLeft(margin);
|
||||||
}
|
}
|
||||||
|
@ -552,7 +551,7 @@ auto VCommandLine::TiledPageMargins() const -> QMarginsF
|
||||||
if (not ok)
|
if (not ok)
|
||||||
{
|
{
|
||||||
qCritical() << translate("VCommandLine", "Invalid tiled page right margin.") << "\n";
|
qCritical() << translate("VCommandLine", "Invalid tiled page right margin.") << "\n";
|
||||||
const_cast<VCommandLine*>(this)->parser.showHelp(V_EX_USAGE);
|
const_cast<VCommandLine *>(this)->parser.showHelp(V_EX_USAGE);
|
||||||
}
|
}
|
||||||
margins.setLeft(margin);
|
margins.setLeft(margin);
|
||||||
}
|
}
|
||||||
|
@ -564,7 +563,7 @@ auto VCommandLine::TiledPageMargins() const -> QMarginsF
|
||||||
if (not ok)
|
if (not ok)
|
||||||
{
|
{
|
||||||
qCritical() << translate("VCommandLine", "Invalid tiled page top margin.") << "\n";
|
qCritical() << translate("VCommandLine", "Invalid tiled page top margin.") << "\n";
|
||||||
const_cast<VCommandLine*>(this)->parser.showHelp(V_EX_USAGE);
|
const_cast<VCommandLine *>(this)->parser.showHelp(V_EX_USAGE);
|
||||||
}
|
}
|
||||||
margins.setLeft(margin);
|
margins.setLeft(margin);
|
||||||
}
|
}
|
||||||
|
@ -576,7 +575,7 @@ auto VCommandLine::TiledPageMargins() const -> QMarginsF
|
||||||
if (not ok)
|
if (not ok)
|
||||||
{
|
{
|
||||||
qCritical() << translate("VCommandLine", "Invalid tiled page bottom margin.") << "\n";
|
qCritical() << translate("VCommandLine", "Invalid tiled page bottom margin.") << "\n";
|
||||||
const_cast<VCommandLine*>(this)->parser.showHelp(V_EX_USAGE);
|
const_cast<VCommandLine *>(this)->parser.showHelp(V_EX_USAGE);
|
||||||
}
|
}
|
||||||
margins.setLeft(margin);
|
margins.setLeft(margin);
|
||||||
}
|
}
|
||||||
|
@ -597,43 +596,58 @@ auto VCommandLine::OptTiledPageOrientation() const -> PageOrientation
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
auto VCommandLine::OptStyle() const -> QString
|
||||||
|
{
|
||||||
|
QString style = OptionValue(LONG_OPTION_STYLE);
|
||||||
|
if (style.isEmpty())
|
||||||
|
{
|
||||||
|
return QStringLiteral("native");
|
||||||
|
}
|
||||||
|
|
||||||
|
return style;
|
||||||
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------------------------------------------------
|
||||||
void VCommandLine::InitCommandLineOptions()
|
void VCommandLine::InitCommandLineOptions()
|
||||||
{
|
{
|
||||||
//keep in mind order here - that is how user will see it, so group-up for usability
|
// keep in mind order here - that is how user will see it, so group-up for usability
|
||||||
//=================================================================================================================
|
//==================================================================================================================
|
||||||
parser.addOptions({
|
parser.addOptions({
|
||||||
{{SINGLE_OPTION_BASENAME, LONG_OPTION_BASENAME},
|
{{SINGLE_OPTION_BASENAME, LONG_OPTION_BASENAME},
|
||||||
translate("VCommandLine", "The base filename of exported layout files. Use it to enable console export mode."),
|
translate("VCommandLine", "The base filename of exported layout files. Use it to enable console export mode."),
|
||||||
translate("VCommandLine", "The base filename of layout files")},
|
translate("VCommandLine", "The base filename of layout files")},
|
||||||
{{SINGLE_OPTION_DESTINATION, LONG_OPTION_DESTINATION},
|
{{SINGLE_OPTION_DESTINATION, LONG_OPTION_DESTINATION},
|
||||||
translate("VCommandLine", "The path to output destination folder. By default the directory at which the "
|
translate("VCommandLine", "The path to output destination folder. By default the directory at which the "
|
||||||
"application was started."),
|
"application was started."),
|
||||||
translate("VCommandLine", "The destination folder")},
|
translate("VCommandLine", "The destination folder")},
|
||||||
{{SINGLE_OPTION_MEASUREFILE, LONG_OPTION_MEASUREFILE},
|
{{SINGLE_OPTION_MEASUREFILE, LONG_OPTION_MEASUREFILE},
|
||||||
translate("VCommandLine", "Path to custom measure file (export mode)."),
|
translate("VCommandLine", "Path to custom measure file (export mode)."),
|
||||||
translate("VCommandLine", "The measure file")},
|
translate("VCommandLine", "The measure file")},
|
||||||
{{SINGLE_OPTION_NESTING_TIME, LONG_OPTION_NESTING_TIME},
|
{{SINGLE_OPTION_NESTING_TIME, LONG_OPTION_NESTING_TIME},
|
||||||
translate("VCommandLine", "<Time> in minutes given for the algorithm to find best layout. Time must be in "
|
translate("VCommandLine", "<Time> in minutes given for the algorithm to find best layout. Time must be in "
|
||||||
"range from 1 minute to 60 minutes. Default value 1 minute."),
|
"range from 1 minute to 60 minutes. Default value 1 minute."),
|
||||||
translate("VCommandLine", "Time")},
|
translate("VCommandLine", "Time")},
|
||||||
{LONG_OPTION_EFFICIENCY_COEFFICIENT,
|
{LONG_OPTION_EFFICIENCY_COEFFICIENT,
|
||||||
translate("VCommandLine", "Set layout efficiency <coefficient>. Layout efficiency coefficient is the ratio of "
|
translate("VCommandLine", "Set layout efficiency <coefficient>. Layout efficiency coefficient is the ratio of "
|
||||||
"the area occupied by the pieces to the bounding rect of all pieces. If nesting reaches required level the "
|
"the area occupied by the pieces to the bounding rect of all pieces. If nesting "
|
||||||
"process stops. If value is 0 no check will be made. Coefficient must be in range from 0 to 100. Default "
|
"reaches required level "
|
||||||
"value 0."),
|
"the "
|
||||||
|
"process stops. If value is 0 no check will be made. Coefficient must be in range "
|
||||||
|
"from 0 to 100. Default "
|
||||||
|
"value 0."),
|
||||||
translate("VCommandLine", "Coefficient")},
|
translate("VCommandLine", "Coefficient")},
|
||||||
{{SINGLE_OPTION_EXP2FORMAT, LONG_OPTION_EXP2FORMAT},
|
{{SINGLE_OPTION_EXP2FORMAT, LONG_OPTION_EXP2FORMAT},
|
||||||
translate("VCommandLine", "Number corresponding to output format (default = 0, export mode):") +
|
translate("VCommandLine", "Number corresponding to output format (default = 0, export mode):") +
|
||||||
DialogSaveLayout::MakeHelpFormatList(),
|
DialogSaveLayout::MakeHelpFormatList(),
|
||||||
translate("VCommandLine", "Format number"), QChar('0')},
|
translate("VCommandLine", "Format number"),
|
||||||
|
QChar('0')},
|
||||||
{LONG_OPTION_BINARYDXF, translate("VCommandLine", "Export dxf in binary form.")},
|
{LONG_OPTION_BINARYDXF, translate("VCommandLine", "Export dxf in binary form.")},
|
||||||
{LONG_OPTION_NOGRAINLINE, translate("VCommandLine", "Show/hide grainline when export layout.")},
|
{LONG_OPTION_NOGRAINLINE, translate("VCommandLine", "Show/hide grainline when export layout.")},
|
||||||
{LONG_OPTION_TEXT2PATHS, translate("VCommandLine", "Export text as paths.")},
|
{LONG_OPTION_TEXT2PATHS, translate("VCommandLine", "Export text as paths.")},
|
||||||
{LONG_OPTION_EXPORTONLYDETAILS,
|
{LONG_OPTION_EXPORTONLYDETAILS,
|
||||||
translate("VCommandLine", "Export only details. Export details as they positioned in the details mode. Any "
|
translate("VCommandLine", "Export only details. Export details as they positioned in the details mode. Any "
|
||||||
"layout related options will be ignored.")},
|
"layout related options will be ignored.")},
|
||||||
{LONG_OPTION_EXPORTSUCHDETAILS,
|
{LONG_OPTION_EXPORTSUCHDETAILS, translate("VCommandLine", "Export only details that match a piece name regex."),
|
||||||
translate("VCommandLine", "Export only details that match a piece name regex."),
|
|
||||||
translate("VCommandLine", "The name regex")},
|
translate("VCommandLine", "The name regex")},
|
||||||
|
|
||||||
{LONG_OPTION_DIMENSION_A,
|
{LONG_OPTION_DIMENSION_A,
|
||||||
|
@ -650,47 +664,51 @@ void VCommandLine::InitCommandLineOptions()
|
||||||
|
|
||||||
{LONG_OPTION_USER_MATERIAL,
|
{LONG_OPTION_USER_MATERIAL,
|
||||||
translate("VCommandLine", "Use this option to override user material defined in pattern. The value must be in "
|
translate("VCommandLine", "Use this option to override user material defined in pattern. The value must be in "
|
||||||
"form <number>@<user matrial name>. The number should be in range from 1 to %1. For example, 1@Fabric2. The "
|
"form <number>@<user matrial name>. The number should be in range from 1 to %1. For "
|
||||||
"key can be used multiple times. Has no effect in GUI mode.").arg(userMaterialPlaceholdersQuantity),
|
"example, "
|
||||||
|
"1@Fabric2. The "
|
||||||
|
"key can be used multiple times. Has no effect in GUI mode.")
|
||||||
|
.arg(userMaterialPlaceholdersQuantity),
|
||||||
translate("VCommandLine", "User material")},
|
translate("VCommandLine", "User material")},
|
||||||
//=================================================================================================================
|
//==============================================================================================================
|
||||||
{{SINGLE_OPTION_PAGETEMPLATE, LONG_OPTION_PAGETEMPLATE},
|
{{SINGLE_OPTION_PAGETEMPLATE, LONG_OPTION_PAGETEMPLATE},
|
||||||
translate("VCommandLine", "Number corresponding to layout page template (default = 0, export mode):") +
|
translate("VCommandLine", "Number corresponding to layout page template (default = 0, export mode):") +
|
||||||
DialogLayoutSettings::MakeHelpTemplateList(),
|
DialogLayoutSettings::MakeHelpTemplateList(),
|
||||||
translate("VCommandLine", "Template number"), QChar('0')},
|
translate("VCommandLine", "Template number"),
|
||||||
|
QChar('0')},
|
||||||
{LONG_OPTION_LANDSCAPE_ORIENTATION,
|
{LONG_OPTION_LANDSCAPE_ORIENTATION,
|
||||||
translate("VCommandLine", "Switch page template orientation to landscape (export mode). This option has "
|
translate("VCommandLine", "Switch page template orientation to landscape (export mode). This option has "
|
||||||
"effect only for one of predefined page templates.")},
|
"effect only for one of predefined page templates.")},
|
||||||
{{SINGLE_OPTION_PAGEW, LONG_OPTION_PAGEW},
|
{{SINGLE_OPTION_PAGEW, LONG_OPTION_PAGEW},
|
||||||
translate("VCommandLine", "Page width in current units like 12.0 (cannot be used with \"%1\", export mode).")
|
translate("VCommandLine", "Page width in current units like 12.0 (cannot be used with \"%1\", export mode).")
|
||||||
.arg(LONG_OPTION_PAGETEMPLATE),
|
.arg(LONG_OPTION_PAGETEMPLATE),
|
||||||
translate("VCommandLine", "The page width")},
|
translate("VCommandLine", "The page width")},
|
||||||
{{SINGLE_OPTION_PAGEH, LONG_OPTION_PAGEH},
|
{{SINGLE_OPTION_PAGEH, LONG_OPTION_PAGEH},
|
||||||
translate("VCommandLine", "Page height in current units like 12.0 (cannot be used with \"%1\", export mode).")
|
translate("VCommandLine", "Page height in current units like 12.0 (cannot be used with \"%1\", export mode).")
|
||||||
.arg(LONG_OPTION_PAGETEMPLATE),
|
.arg(LONG_OPTION_PAGETEMPLATE),
|
||||||
translate("VCommandLine", "The page height")},
|
translate("VCommandLine", "The page height")},
|
||||||
{{SINGLE_OPTION_PAGEUNITS, LONG_OPTION_PAGEUNITS},
|
{{SINGLE_OPTION_PAGEUNITS, LONG_OPTION_PAGEUNITS},
|
||||||
translate("VCommandLine", "Page measure units (export mode). Valid values: %1.")
|
translate("VCommandLine", "Page measure units (export mode). Valid values: %1.")
|
||||||
.arg(VDomDocument::UnitsHelpString()),
|
.arg(VDomDocument::UnitsHelpString()),
|
||||||
translate("VCommandLine", "The measure unit")},
|
translate("VCommandLine", "The measure unit")},
|
||||||
{{SINGLE_OPTION_IGNORE_MARGINS, LONG_OPTION_IGNORE_MARGINS},
|
{{SINGLE_OPTION_IGNORE_MARGINS, LONG_OPTION_IGNORE_MARGINS},
|
||||||
translate("VCommandLine", "Ignore printer margins (export mode). Use if need full paper space. In case of "
|
translate("VCommandLine", "Ignore printer margins (export mode). Use if need full paper space. In case of "
|
||||||
"later printing you must account for the margins themselves.")},
|
"later printing you must account for the margins themselves.")},
|
||||||
{{SINGLE_OPTION_LEFT_MARGIN, LONG_OPTION_LEFT_MARGIN},
|
{{SINGLE_OPTION_LEFT_MARGIN, LONG_OPTION_LEFT_MARGIN},
|
||||||
translate("VCommandLine", "Page left margin in current units like 3.0 (export mode). If not set will be used "
|
translate("VCommandLine", "Page left margin in current units like 3.0 (export mode). If not set will be used "
|
||||||
"value from default printer. Or 0 if none printers was found."),
|
"value from default printer. Or 0 if none printers was found."),
|
||||||
translate("VCommandLine", "The left margin")},
|
translate("VCommandLine", "The left margin")},
|
||||||
{{SINGLE_OPTION_RIGHT_MARGIN, LONG_OPTION_RIGHT_MARGIN},
|
{{SINGLE_OPTION_RIGHT_MARGIN, LONG_OPTION_RIGHT_MARGIN},
|
||||||
translate("VCommandLine", "Page right margin in current units like 3.0 (export mode). If not set will be used "
|
translate("VCommandLine", "Page right margin in current units like 3.0 (export mode). If not set will be used "
|
||||||
"value from default printer. Or 0 if none printers was found."),
|
"value from default printer. Or 0 if none printers was found."),
|
||||||
translate("VCommandLine", "The right margin")},
|
translate("VCommandLine", "The right margin")},
|
||||||
{{SINGLE_OPTION_TOP_MARGIN, LONG_OPTION_TOP_MARGIN},
|
{{SINGLE_OPTION_TOP_MARGIN, LONG_OPTION_TOP_MARGIN},
|
||||||
translate("VCommandLine", "Page top margin in current units like 3.0 (export mode). If not set will be used "
|
translate("VCommandLine", "Page top margin in current units like 3.0 (export mode). If not set will be used "
|
||||||
"value from default printer. Or 0 if none printers was found."),
|
"value from default printer. Or 0 if none printers was found."),
|
||||||
translate("VCommandLine", "The top margin")},
|
translate("VCommandLine", "The top margin")},
|
||||||
{{SINGLE_OPTION_BOTTOM_MARGIN, LONG_OPTION_BOTTOM_MARGIN},
|
{{SINGLE_OPTION_BOTTOM_MARGIN, LONG_OPTION_BOTTOM_MARGIN},
|
||||||
translate("VCommandLine", "Page bottom margin in current units like 3.0 (export mode). If not set will be "
|
translate("VCommandLine", "Page bottom margin in current units like 3.0 (export mode). If not set will be "
|
||||||
"used value from default printer. Or 0 if none printers was found."),
|
"used value from default printer. Or 0 if none printers was found."),
|
||||||
translate("VCommandLine", "The bottom margin")},
|
translate("VCommandLine", "The bottom margin")},
|
||||||
{LONG_OPTION_EXPXSCALE,
|
{LONG_OPTION_EXPXSCALE,
|
||||||
translate("VCommandLine", "Set horizontal scale factor from 0.01 to 3.0 (default = 1.0, export mode)."),
|
translate("VCommandLine", "Set horizontal scale factor from 0.01 to 3.0 (default = 1.0, export mode)."),
|
||||||
|
@ -698,90 +716,105 @@ void VCommandLine::InitCommandLineOptions()
|
||||||
{LONG_OPTION_EXPYSCALE,
|
{LONG_OPTION_EXPYSCALE,
|
||||||
translate("VCommandLine", "Set vertical scale factor from 0.01 to 3.0 (default = 1.0, export mode)."),
|
translate("VCommandLine", "Set vertical scale factor from 0.01 to 3.0 (default = 1.0, export mode)."),
|
||||||
translate("VCommandLine", "Vertical scale")},
|
translate("VCommandLine", "Vertical scale")},
|
||||||
//=================================================================================================================
|
//==============================================================================================================
|
||||||
{LONG_OPTION_FOLLOW_GRAINLINE,
|
{LONG_OPTION_FOLLOW_GRAINLINE,
|
||||||
translate("VCommandLine", "Order detail to follow grainline direction (export mode).")},
|
translate("VCommandLine", "Order detail to follow grainline direction (export mode).")},
|
||||||
{LONG_OPTION_MANUAL_PRIORITY,
|
{LONG_OPTION_MANUAL_PRIORITY,
|
||||||
translate("VCommandLine", "Follow manual priority over priority by square (export mode).")},
|
translate("VCommandLine", "Follow manual priority over priority by square (export mode).")},
|
||||||
{LONG_OPTION_NEST_QUANTITY,
|
{LONG_OPTION_NEST_QUANTITY, translate("VCommandLine", "Nest quantity copies of each piece (export mode).")},
|
||||||
translate("VCommandLine", "Nest quantity copies of each piece (export mode).")},
|
|
||||||
{{SINGLE_OPTION_CROP_LENGTH, LONG_OPTION_CROP_LENGTH},
|
{{SINGLE_OPTION_CROP_LENGTH, LONG_OPTION_CROP_LENGTH},
|
||||||
translate("VCommandLine", "Auto crop unused length (export mode).")},
|
translate("VCommandLine", "Auto crop unused length (export mode).")},
|
||||||
{LONG_OPTION_CROP_WIDTH,
|
{LONG_OPTION_CROP_WIDTH, translate("VCommandLine", "Auto crop unused width (export mode).")},
|
||||||
translate("VCommandLine", "Auto crop unused width (export mode).")},
|
|
||||||
{{SINGLE_OPTION_UNITE, LONG_OPTION_UNITE},
|
{{SINGLE_OPTION_UNITE, LONG_OPTION_UNITE},
|
||||||
translate("VCommandLine", "Unite pages if possible (export mode). Maximum value limited by QImage that "
|
translate("VCommandLine", "Unite pages if possible (export mode). Maximum value limited by QImage that "
|
||||||
"supports only a maximum of 32768x32768 px images.")},
|
"supports only a maximum of 32768x32768 px images.")},
|
||||||
{LONG_OPTION_PREFER_ONE_SHEET_SOLUTION,
|
{LONG_OPTION_PREFER_ONE_SHEET_SOLUTION,
|
||||||
translate("VCommandLine", "Prefer one sheet layout solution (export mode).")},
|
translate("VCommandLine", "Prefer one sheet layout solution (export mode).")},
|
||||||
//=================================================================================================================
|
//==============================================================================================================
|
||||||
{{SINGLE_OPTION_SAVELENGTH, LONG_OPTION_SAVELENGTH},
|
{{SINGLE_OPTION_SAVELENGTH, LONG_OPTION_SAVELENGTH},
|
||||||
translate("VCommandLine", "Save length of the sheet if set (export mode). The option tells the program to use "
|
translate("VCommandLine", "Save length of the sheet if set (export mode). The option tells the program to use "
|
||||||
"as much as possible width of sheet. Quality of a layout can be worse when this option was used.")},
|
"as much as possible width of sheet. Quality of a layout can be worse when this "
|
||||||
|
"option was used.")},
|
||||||
{{SINGLE_OPTION_SHIFTUNITS, LONG_OPTION_SHIFTUNITS},
|
{{SINGLE_OPTION_SHIFTUNITS, LONG_OPTION_SHIFTUNITS},
|
||||||
translate("VCommandLine", "Layout units (as paper's one except px, export mode). Default units cm."),
|
translate("VCommandLine", "Layout units (as paper's one except px, export mode). Default units cm."),
|
||||||
translate("VCommandLine", "The unit")},
|
translate("VCommandLine", "The unit")},
|
||||||
{{SINGLE_OPTION_GAPWIDTH, LONG_OPTION_GAPWIDTH},
|
{{SINGLE_OPTION_GAPWIDTH, LONG_OPTION_GAPWIDTH},
|
||||||
translate("VCommandLine", "The layout gap width x2, measured in layout units (export mode). Set distance "
|
translate("VCommandLine", "The layout gap width x2, measured in layout units (export mode). Set distance "
|
||||||
"between details and a detail and a sheet."),
|
"between details and a detail and a sheet."),
|
||||||
translate("VCommandLine", "The gap width")},
|
translate("VCommandLine", "The gap width")},
|
||||||
{{SINGLE_OPTION_GROUPPING, LONG_OPTION_GROUPPING},
|
{{SINGLE_OPTION_GROUPPING, LONG_OPTION_GROUPPING},
|
||||||
translate("VCommandLine", "Sets layout groupping cases (export mode): %1.")
|
translate("VCommandLine", "Sets layout groupping cases (export mode): %1.")
|
||||||
.arg(DialogLayoutSettings::MakeGroupsHelp()),
|
.arg(DialogLayoutSettings::MakeGroupsHelp()),
|
||||||
translate("VCommandLine", "Grouping type"), QChar('2')},
|
translate("VCommandLine", "Grouping type"),
|
||||||
|
QChar('2')},
|
||||||
{{SINGLE_OPTION_TEST, LONG_OPTION_TEST},
|
{{SINGLE_OPTION_TEST, LONG_OPTION_TEST},
|
||||||
translate("VCommandLine", "Run the program in a test mode. The program in this mode loads a single pattern "
|
translate("VCommandLine", "Run the program in a test mode. The program in this mode loads a single pattern "
|
||||||
"file and silently quit without showing the main window. The key have priority before key '%1'.")
|
"file and silently quit without showing the main window. The key have priority "
|
||||||
.arg(LONG_OPTION_BASENAME)},
|
"before key '%1'.")
|
||||||
|
.arg(LONG_OPTION_BASENAME)},
|
||||||
{LONG_OPTION_PENDANTIC,
|
{LONG_OPTION_PENDANTIC,
|
||||||
translate("VCommandLine", "Make all parsing warnings into errors. Have effect only in console mode. Use to "
|
translate("VCommandLine",
|
||||||
"force Valentina to immediately terminate if a pattern contains a parsing warning.")},
|
"Make all parsing warnings into errors. Have effect only in console mode. Use to "
|
||||||
|
"force Valentina to immediately terminate if a pattern contains a parsing warning.")},
|
||||||
{LONG_OPTION_NO_HDPI_SCALING,
|
{LONG_OPTION_NO_HDPI_SCALING,
|
||||||
translate("VCommandLine", "Disable high dpi scaling. Call this option if has problem with scaling (by default "
|
translate("VCommandLine", "Disable high dpi scaling. Call this option if has problem with scaling (by default "
|
||||||
"scaling enabled). Alternatively you can use the %1 environment variable.")
|
"scaling enabled). Alternatively you can use the %1 environment variable.")
|
||||||
.arg(QStringLiteral("QT_AUTO_SCREEN_SCALE_FACTOR=0"))},
|
.arg(QStringLiteral("QT_AUTO_SCREEN_SCALE_FACTOR=0"))},
|
||||||
//=================================================================================================================
|
//==============================================================================================================
|
||||||
{LONG_OPTION_CSVWITHHEADER,
|
{LONG_OPTION_CSVWITHHEADER, translate("VCommandLine", "Export to csv with header. By default disabled.")},
|
||||||
translate("VCommandLine", "Export to csv with header. By default disabled.")},
|
|
||||||
{LONG_OPTION_CSVCODEC,
|
{LONG_OPTION_CSVCODEC,
|
||||||
translate("VCommandLine", "Specify codec that will be used to save data. List of supported codecs provided by "
|
translate("VCommandLine", "Specify codec that will be used to save data. List of supported codecs provided by "
|
||||||
"Qt. Default value depend from system. On Windows, the codec will be based on a system locale. On Unix "
|
"Qt. Default value depend from system. On Windows, the codec will be based on a "
|
||||||
"systems, the codec will might fall back to using the iconv library if no builtin codec for the locale can be "
|
"system locale. On Unix "
|
||||||
"found. Valid values for this installation:") + DialogExportToCSV::MakeHelpCodecsList(),
|
"systems, the codec will might fall back to using the iconv library if no builtin "
|
||||||
|
"codec for the locale "
|
||||||
|
"can be "
|
||||||
|
"found. Valid values for this installation:") +
|
||||||
|
DialogExportToCSV::MakeHelpCodecsList(),
|
||||||
translate("VCommandLine", "Codec name"), QString(VTextCodec::codecForLocale()->name())},
|
translate("VCommandLine", "Codec name"), QString(VTextCodec::codecForLocale()->name())},
|
||||||
{LONG_OPTION_CSVSEPARATOR,
|
{LONG_OPTION_CSVSEPARATOR,
|
||||||
translate("VCommandLine", "Specify csv separator character. Default value is '%1'. Valid characters:")
|
translate("VCommandLine", "Specify csv separator character. Default value is '%1'. Valid characters:")
|
||||||
.arg(VCommonSettings::GetDefCSVSeparator()) + DialogExportToCSV::MakeHelpSeparatorList(),
|
.arg(VCommonSettings::GetDefCSVSeparator()) +
|
||||||
|
DialogExportToCSV::MakeHelpSeparatorList(),
|
||||||
translate("VCommandLine", "Separator character"), QString(VCommonSettings::GetDefCSVSeparator())},
|
translate("VCommandLine", "Separator character"), QString(VCommonSettings::GetDefCSVSeparator())},
|
||||||
{LONG_OPTION_CSVEXPORTFM,
|
{LONG_OPTION_CSVEXPORTFM,
|
||||||
translate("VCommandLine", "Calling this command enable exporting final measurements. Specify path to csv file "
|
translate("VCommandLine",
|
||||||
"with final measurements. The path must contain path to directory and name of file. It can be absolute or "
|
"Calling this command enable exporting final measurements. Specify path to csv file "
|
||||||
"relatetive. In case of relative path will be used current working directory to calc a destination path."),
|
"with final measurements. The path must contain path to directory and name of file. "
|
||||||
|
"It can be "
|
||||||
|
"absolute or "
|
||||||
|
"relatetive. In case of relative path will be used current working directory to calc "
|
||||||
|
"a destination "
|
||||||
|
"path."),
|
||||||
translate("VCommandLine", "Path to csv file")},
|
translate("VCommandLine", "Path to csv file")},
|
||||||
//=================================================================================================================
|
//==============================================================================================================
|
||||||
{LONG_OPTION_TILED_PDF_PAGE_TEMPLATE,
|
{LONG_OPTION_TILED_PDF_PAGE_TEMPLATE,
|
||||||
translate("VCommandLine", "Number corresponding to tiled pdf page template (default = 0, export mode with "
|
translate("VCommandLine", "Number corresponding to tiled pdf page template (default = 0, export mode with "
|
||||||
"tiled pdf format):") + DialogLayoutSettings::MakeHelpTiledPdfTemplateList(),
|
"tiled pdf format):") +
|
||||||
|
DialogLayoutSettings::MakeHelpTiledPdfTemplateList(),
|
||||||
translate("VCommandLine", "Template number"), QChar('0')},
|
translate("VCommandLine", "Template number"), QChar('0')},
|
||||||
{LONG_OPTION_TILED_PDF_LEFT_MARGIN,
|
{LONG_OPTION_TILED_PDF_LEFT_MARGIN,
|
||||||
translate("VCommandLine","Tiled page left margin in current units like 3.0 (export mode). If not set will be "
|
translate("VCommandLine", "Tiled page left margin in current units like 3.0 (export mode). If not set will be "
|
||||||
"used default value 1 cm."),
|
"used default value 1 cm."),
|
||||||
translate("VCommandLine", "The left margin")},
|
translate("VCommandLine", "The left margin")},
|
||||||
{LONG_OPTION_TILED_PDF_RIGHT_MARGIN,
|
{LONG_OPTION_TILED_PDF_RIGHT_MARGIN,
|
||||||
translate("VCommandLine", "Tiled page right margin in current units like 3.0 (export mode). If not set will "
|
translate("VCommandLine", "Tiled page right margin in current units like 3.0 (export mode). If not set will "
|
||||||
"be used default value 1 cm."),
|
"be used default value 1 cm."),
|
||||||
translate("VCommandLine", "The right margin")},
|
translate("VCommandLine", "The right margin")},
|
||||||
{LONG_OPTION_TILED_PDF_TOP_MARGIN,
|
{LONG_OPTION_TILED_PDF_TOP_MARGIN,
|
||||||
translate("VCommandLine", "Tiled page top margin in current units like 3.0 (export mode). If not set will be "
|
translate("VCommandLine", "Tiled page top margin in current units like 3.0 (export mode). If not set will be "
|
||||||
"used value default value 1 cm."),
|
"used value default value 1 cm."),
|
||||||
translate("VCommandLine", "The top margin")},
|
translate("VCommandLine", "The top margin")},
|
||||||
{LONG_OPTION_TILED_PDF_BOTTOM_MARGIN,
|
{LONG_OPTION_TILED_PDF_BOTTOM_MARGIN,
|
||||||
translate("VCommandLine", "Tiled page bottom margin in current units like 3.0 (export mode). If not set will "
|
translate("VCommandLine", "Tiled page bottom margin in current units like 3.0 (export mode). If not set will "
|
||||||
"be used value default value 1 cm."),
|
"be used value default value 1 cm."),
|
||||||
translate("VCommandLine", "The bottom margin")},
|
translate("VCommandLine", "The bottom margin")},
|
||||||
{LONG_OPTION_TILED_PDF_LANDSCAPE,
|
{LONG_OPTION_TILED_PDF_LANDSCAPE,
|
||||||
translate("VCommandLine", "Set tiled page orienatation to landscape (export mode). Default value if not set "
|
translate("VCommandLine", "Set tiled page orienatation to landscape (export mode). Default value if not set "
|
||||||
"portrait.")}
|
"portrait.")},
|
||||||
|
//==============================================================================================================
|
||||||
|
{LONG_OPTION_STYLE,
|
||||||
|
translate("VCommandLine", "Application style") + QString(" `Fusion`, `Windows`, `native`, ..."), "", "native"},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -814,9 +847,8 @@ auto VCommandLine::OptNestingTime() const -> int
|
||||||
|
|
||||||
if (not ok || time < 1 || time > 60)
|
if (not ok || time < 1 || time > 60)
|
||||||
{
|
{
|
||||||
qCritical() << translate("VCommandLine", "Time must be in range from 1 minute to 60 minutes.")
|
qCritical() << translate("VCommandLine", "Time must be in range from 1 minute to 60 minutes.") << "\n";
|
||||||
<< "\n";
|
const_cast<VCommandLine *>(this)->parser.showHelp(V_EX_USAGE);
|
||||||
const_cast<VCommandLine*>(this)->parser.showHelp(V_EX_USAGE);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -834,9 +866,8 @@ auto VCommandLine::OptEfficiencyCoefficient() const -> qreal
|
||||||
|
|
||||||
if (not ok || coefficient < 0 || coefficient > 100)
|
if (not ok || coefficient < 0 || coefficient > 100)
|
||||||
{
|
{
|
||||||
qCritical() << translate("VCommandLine", "Coefficient must be in range from 0 to 100.")
|
qCritical() << translate("VCommandLine", "Coefficient must be in range from 0 to 100.") << "\n";
|
||||||
<< "\n";
|
const_cast<VCommandLine *>(this)->parser.showHelp(V_EX_USAGE);
|
||||||
const_cast<VCommandLine*>(this)->parser.showHelp(V_EX_USAGE);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -854,15 +885,14 @@ void VCommandLine::TestPageformat() const
|
||||||
|
|
||||||
if ((a || b) && x)
|
if ((a || b) && x)
|
||||||
{
|
{
|
||||||
qCritical() << translate("VCommandLine", "Cannot use pageformat and page explicit size together.")
|
qCritical() << translate("VCommandLine", "Cannot use pageformat and page explicit size together.") << "\n";
|
||||||
<< "\n";
|
const_cast<VCommandLine *>(this)->parser.showHelp(V_EX_USAGE);
|
||||||
const_cast<VCommandLine*>(this)->parser.showHelp(V_EX_USAGE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((a || b || c) && !(a && b && c))
|
if ((a || b || c) && !(a && b && c))
|
||||||
{
|
{
|
||||||
qCritical() << translate("VCommandLine", "Page height, width, units must be used all 3 at once.") << "\n";
|
qCritical() << translate("VCommandLine", "Page height, width, units must be used all 3 at once.") << "\n";
|
||||||
const_cast<VCommandLine*>(this)->parser.showHelp(V_EX_USAGE);
|
const_cast<VCommandLine *>(this)->parser.showHelp(V_EX_USAGE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -875,7 +905,7 @@ void VCommandLine::TestGapWidth() const
|
||||||
if ((a || b) && !(a && b))
|
if ((a || b) && !(a && b))
|
||||||
{
|
{
|
||||||
qCritical() << translate("VCommandLine", "Gap width must be used together with shift units.") << "\n";
|
qCritical() << translate("VCommandLine", "Gap width must be used together with shift units.") << "\n";
|
||||||
const_cast<VCommandLine*>(this)->parser.showHelp(V_EX_USAGE);
|
const_cast<VCommandLine *>(this)->parser.showHelp(V_EX_USAGE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -890,7 +920,7 @@ void VCommandLine::TestMargins() const
|
||||||
if (a && !(a && b))
|
if (a && !(a && b))
|
||||||
{
|
{
|
||||||
qCritical() << message << "\n";
|
qCritical() << message << "\n";
|
||||||
const_cast<VCommandLine*>(this)->parser.showHelp(V_EX_USAGE);
|
const_cast<VCommandLine *>(this)->parser.showHelp(V_EX_USAGE);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -931,7 +961,7 @@ auto VCommandLine::ParseMargins(const DialogLayoutSettings &diag) const -> QMarg
|
||||||
if (not ok)
|
if (not ok)
|
||||||
{
|
{
|
||||||
qCritical() << translate("VCommandLine", "Invalid layout page left margin.") << "\n";
|
qCritical() << translate("VCommandLine", "Invalid layout page left margin.") << "\n";
|
||||||
const_cast<VCommandLine*>(this)->parser.showHelp(V_EX_USAGE);
|
const_cast<VCommandLine *>(this)->parser.showHelp(V_EX_USAGE);
|
||||||
}
|
}
|
||||||
margins.setLeft(margin);
|
margins.setLeft(margin);
|
||||||
}
|
}
|
||||||
|
@ -943,7 +973,7 @@ auto VCommandLine::ParseMargins(const DialogLayoutSettings &diag) const -> QMarg
|
||||||
if (not ok)
|
if (not ok)
|
||||||
{
|
{
|
||||||
qCritical() << translate("VCommandLine", "Invalid layout page right margin.") << "\n";
|
qCritical() << translate("VCommandLine", "Invalid layout page right margin.") << "\n";
|
||||||
const_cast<VCommandLine*>(this)->parser.showHelp(V_EX_USAGE);
|
const_cast<VCommandLine *>(this)->parser.showHelp(V_EX_USAGE);
|
||||||
}
|
}
|
||||||
margins.setRight(margin);
|
margins.setRight(margin);
|
||||||
}
|
}
|
||||||
|
@ -955,7 +985,7 @@ auto VCommandLine::ParseMargins(const DialogLayoutSettings &diag) const -> QMarg
|
||||||
if (not ok)
|
if (not ok)
|
||||||
{
|
{
|
||||||
qCritical() << translate("VCommandLine", "Invalid layout page top margin.") << "\n";
|
qCritical() << translate("VCommandLine", "Invalid layout page top margin.") << "\n";
|
||||||
const_cast<VCommandLine*>(this)->parser.showHelp(V_EX_USAGE);
|
const_cast<VCommandLine *>(this)->parser.showHelp(V_EX_USAGE);
|
||||||
}
|
}
|
||||||
margins.setTop(margin);
|
margins.setTop(margin);
|
||||||
}
|
}
|
||||||
|
@ -967,7 +997,7 @@ auto VCommandLine::ParseMargins(const DialogLayoutSettings &diag) const -> QMarg
|
||||||
if (not ok)
|
if (not ok)
|
||||||
{
|
{
|
||||||
qCritical() << translate("VCommandLine", "Invalid layout page bottom margin.") << "\n";
|
qCritical() << translate("VCommandLine", "Invalid layout page bottom margin.") << "\n";
|
||||||
const_cast<VCommandLine*>(this)->parser.showHelp(V_EX_USAGE);
|
const_cast<VCommandLine *>(this)->parser.showHelp(V_EX_USAGE);
|
||||||
}
|
}
|
||||||
margins.setBottom(margin);
|
margins.setBottom(margin);
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,11 +29,11 @@
|
||||||
#ifndef VCMDEXPORT_H
|
#ifndef VCMDEXPORT_H
|
||||||
#define VCMDEXPORT_H
|
#define VCMDEXPORT_H
|
||||||
|
|
||||||
|
#include <QCommandLineParser>
|
||||||
|
#include <QCoreApplication>
|
||||||
|
#include <QTextStream>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <QTextStream>
|
|
||||||
#include <QCoreApplication>
|
|
||||||
#include <QCommandLineParser>
|
|
||||||
|
|
||||||
#include "../dialogs/dialoglayoutsettings.h"
|
#include "../dialogs/dialoglayoutsettings.h"
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@ using VLayoutGeneratorPtr = std::shared_ptr<VLayoutGenerator>;
|
||||||
enum class PageOrientation : bool;
|
enum class PageOrientation : bool;
|
||||||
|
|
||||||
//@brief: class used to install export command line options and parse their values
|
//@brief: class used to install export command line options and parse their values
|
||||||
//QCommandLineParser* object must exists until this object alive
|
// QCommandLineParser* object must exists until this object alive
|
||||||
class VCommandLine
|
class VCommandLine
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -52,21 +52,21 @@ public:
|
||||||
//@brief creates object and applies export related options to parser
|
//@brief creates object and applies export related options to parser
|
||||||
|
|
||||||
//@brief tests if user enabled test mode from cmd, throws exception if not exactly 1 input VAL file supplied in
|
//@brief tests if user enabled test mode from cmd, throws exception if not exactly 1 input VAL file supplied in
|
||||||
//case test mode enabled
|
// case test mode enabled
|
||||||
auto IsTestModeEnabled() const -> bool;
|
auto IsTestModeEnabled() const -> bool;
|
||||||
|
|
||||||
//@brief Make all parsing warnings into errors. Have effect only in console mode. Use to force Valentina to
|
//@brief Make all parsing warnings into errors. Have effect only in console mode. Use to force Valentina to
|
||||||
//immediately terminate if a pattern contains a parsing warning.
|
// immediately terminate if a pattern contains a parsing warning.
|
||||||
auto IsPedantic() const -> bool;
|
auto IsPedantic() const -> bool;
|
||||||
|
|
||||||
auto IsNoScalingEnabled() const -> bool;
|
auto IsNoScalingEnabled() const -> bool;
|
||||||
|
|
||||||
//@brief tests if user enabled export from cmd, throws exception if not exactly 1 input VAL file supplied in case
|
//@brief tests if user enabled export from cmd, throws exception if not exactly 1 input VAL file supplied in case
|
||||||
//export enabled
|
// export enabled
|
||||||
auto IsExportEnabled() const -> bool;
|
auto IsExportEnabled() const -> bool;
|
||||||
|
|
||||||
//@brief tests if user enabled export final measurements from cmd, throws exception if not exactly 1 input VAL
|
//@brief tests if user enabled export final measurements from cmd, throws exception if not exactly 1 input VAL
|
||||||
//file supplied in case export enabled
|
// file supplied in case export enabled
|
||||||
auto IsExportFMEnabled() const -> bool;
|
auto IsExportFMEnabled() const -> bool;
|
||||||
|
|
||||||
//@brief returns path to custom measure file or empty string
|
//@brief returns path to custom measure file or empty string
|
||||||
|
@ -76,7 +76,7 @@ public:
|
||||||
auto OptBaseName() const -> QString;
|
auto OptBaseName() const -> QString;
|
||||||
|
|
||||||
//@brief returns the absolute path to output destination directory or path to application's current directory if
|
//@brief returns the absolute path to output destination directory or path to application's current directory if
|
||||||
//not set
|
// not set
|
||||||
auto OptDestinationPath() const -> QString;
|
auto OptDestinationPath() const -> QString;
|
||||||
|
|
||||||
//@brief returns export type set, defaults 0 - svg
|
//@brief returns export type set, defaults 0 - svg
|
||||||
|
@ -106,14 +106,14 @@ public:
|
||||||
//@brief returns list of user defined materials
|
//@brief returns list of user defined materials
|
||||||
auto OptUserMaterials() const -> QMap<int, QString>;
|
auto OptUserMaterials() const -> QMap<int, QString>;
|
||||||
|
|
||||||
//generator creation is moved here ... because most options are for it only, so no need to create extra getters...
|
// generator creation is moved here ... because most options are for it only, so no need to create extra getters...
|
||||||
//@brief creates VLayoutGenerator
|
//@brief creates VLayoutGenerator
|
||||||
auto DefaultGenerator() const -> VLayoutGeneratorPtr;
|
auto DefaultGenerator() const -> VLayoutGeneratorPtr;
|
||||||
|
|
||||||
//@brief gets filenames which should be loaded
|
//@brief gets filenames which should be loaded
|
||||||
auto OptInputFileNames() const -> QStringList;
|
auto OptInputFileNames() const -> QStringList;
|
||||||
|
|
||||||
auto IsGuiEnabled()const -> bool;
|
auto IsGuiEnabled() const -> bool;
|
||||||
|
|
||||||
auto IsSetDimensionA() const -> bool;
|
auto IsSetDimensionA() const -> bool;
|
||||||
auto IsSetDimensionB() const -> bool;
|
auto IsSetDimensionB() const -> bool;
|
||||||
|
@ -122,13 +122,14 @@ public:
|
||||||
auto OptDimensionA() const -> int;
|
auto OptDimensionA() const -> int;
|
||||||
auto OptDimensionB() const -> int;
|
auto OptDimensionB() const -> int;
|
||||||
auto OptDimensionC() const -> int;
|
auto OptDimensionC() const -> int;
|
||||||
|
|
||||||
auto TiledPageMargins() const -> QMarginsF;
|
auto TiledPageMargins() const -> QMarginsF;
|
||||||
auto OptTiledPaperSize() const -> VAbstractLayoutDialog::PaperSizeTemplate;
|
auto OptTiledPaperSize() const -> VAbstractLayoutDialog::PaperSizeTemplate;
|
||||||
auto OptTiledPageOrientation() const -> PageOrientation;
|
auto OptTiledPageOrientation() const -> PageOrientation;
|
||||||
|
|
||||||
protected:
|
auto OptStyle() const -> QString;
|
||||||
|
|
||||||
|
protected:
|
||||||
VCommandLine();
|
VCommandLine();
|
||||||
|
|
||||||
//@brief returns VAbstractLayoutDialog::PaperSizeTemplate
|
//@brief returns VAbstractLayoutDialog::PaperSizeTemplate
|
||||||
|
@ -136,19 +137,20 @@ protected:
|
||||||
|
|
||||||
auto OptGroup() const -> Cases;
|
auto OptGroup() const -> Cases;
|
||||||
|
|
||||||
//@brief: called in destructor of application, so instance destroyed and new maybe created (never happen scenario though)
|
//@brief: called in destructor of application, so instance destroyed and new maybe created (never happen scenario
|
||||||
|
// though)
|
||||||
static void Reset();
|
static void Reset();
|
||||||
|
|
||||||
//@brief called to create single object, by VApplication only
|
//@brief called to create single object, by VApplication only
|
||||||
static auto Get(const QCoreApplication& app) -> VCommandLinePtr;
|
static auto Get(const QCoreApplication &app) -> VCommandLinePtr;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Q_DISABLE_COPY_MOVE(VCommandLine) // NOLINT
|
Q_DISABLE_COPY_MOVE(VCommandLine) // NOLINT
|
||||||
static VCommandLinePtr instance; // NOLINT(cppcoreguidelines-avoid-non-const-global-variables)
|
static VCommandLinePtr instance; // NOLINT(cppcoreguidelines-avoid-non-const-global-variables)
|
||||||
QCommandLineParser parser{};
|
QCommandLineParser parser{};
|
||||||
bool isGuiEnabled{false};
|
bool isGuiEnabled{false};
|
||||||
friend class VApplication;
|
friend class VApplication;
|
||||||
|
|
||||||
auto FormatSize(const QString &key) const -> VAbstractLayoutDialog::PaperSizeTemplate;
|
auto FormatSize(const QString &key) const -> VAbstractLayoutDialog::PaperSizeTemplate;
|
||||||
|
|
||||||
void InitCommandLineOptions();
|
void InitCommandLineOptions();
|
||||||
|
|
|
@ -31,7 +31,9 @@
|
||||||
#include "../vmisc/literals.h"
|
#include "../vmisc/literals.h"
|
||||||
#include "../vmisc/vvalentinasettings.h"
|
#include "../vmisc/vvalentinasettings.h"
|
||||||
#include "../vpatterndb/pmsystems.h"
|
#include "../vpatterndb/pmsystems.h"
|
||||||
|
#include "theme/vtheme.h"
|
||||||
#include "ui_preferencesconfigurationpage.h"
|
#include "ui_preferencesconfigurationpage.h"
|
||||||
|
#include "vcommonsettings.h"
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
|
#if QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
|
||||||
#include "../vmisc/backport/qoverload.h"
|
#include "../vmisc/backport/qoverload.h"
|
||||||
#endif // QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
|
#endif // QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
|
||||||
|
@ -131,7 +133,12 @@ PreferencesConfigurationPage::PreferencesConfigurationPage(QWidget *parent)
|
||||||
ui->toolBarStyleCheck->setChecked(settings->GetToolBarStyle());
|
ui->toolBarStyleCheck->setChecked(settings->GetToolBarStyle());
|
||||||
|
|
||||||
// Theme
|
// Theme
|
||||||
ui->darkModeCheck->setChecked(settings->GetDarkMode());
|
SetThemeModeComboBox();
|
||||||
|
index = ui->comboBoxThemeMode->findData(static_cast<int>(settings->GetThemeMode()));
|
||||||
|
if (index != -1)
|
||||||
|
{
|
||||||
|
ui->comboBoxThemeMode->setCurrentIndex(index);
|
||||||
|
}
|
||||||
|
|
||||||
// Native dialogs
|
// Native dialogs
|
||||||
ui->checkBoxDontUseNativeDialog->setChecked(settings->IsDontUseNativeDialog());
|
ui->checkBoxDontUseNativeDialog->setChecked(settings->IsDontUseNativeDialog());
|
||||||
|
@ -187,10 +194,11 @@ auto PreferencesConfigurationPage::Apply() -> QStringList
|
||||||
settings->SetOsSeparator(ui->osOptionCheck->isChecked());
|
settings->SetOsSeparator(ui->osOptionCheck->isChecked());
|
||||||
settings->SetToolBarStyle(ui->toolBarStyleCheck->isChecked());
|
settings->SetToolBarStyle(ui->toolBarStyleCheck->isChecked());
|
||||||
|
|
||||||
if (settings->GetDarkMode() != ui->darkModeCheck->isChecked())
|
auto themeMode = static_cast<VThemeMode>(ui->comboBoxThemeMode->currentData().toInt());
|
||||||
|
if (settings->GetThemeMode() != themeMode)
|
||||||
{
|
{
|
||||||
settings->SetDarkMode(ui->darkModeCheck->isChecked());
|
settings->SetThemeMode(themeMode);
|
||||||
preferences.append(tr("dark mode"));
|
VTheme::Instance()->ResetThemeSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (settings->IsDontUseNativeDialog() != ui->checkBoxDontUseNativeDialog->isChecked())
|
if (settings->IsDontUseNativeDialog() != ui->checkBoxDontUseNativeDialog->isChecked())
|
||||||
|
@ -279,6 +287,15 @@ void PreferencesConfigurationPage::SetLabelComboBox(const QStringList &list)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
void PreferencesConfigurationPage::SetThemeModeComboBox()
|
||||||
|
{
|
||||||
|
ui->comboBoxThemeMode->clear();
|
||||||
|
ui->comboBoxThemeMode->addItem(tr("System", "theme"), static_cast<int>(VThemeMode::System));
|
||||||
|
ui->comboBoxThemeMode->addItem(tr("Dark", "theme"), static_cast<int>(VThemeMode::Dark));
|
||||||
|
ui->comboBoxThemeMode->addItem(tr("Light", "theme"), static_cast<int>(VThemeMode::Light));
|
||||||
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void PreferencesConfigurationPage::InitUnits()
|
void PreferencesConfigurationPage::InitUnits()
|
||||||
{
|
{
|
||||||
|
|
|
@ -40,7 +40,8 @@ class PreferencesConfigurationPage : public QWidget
|
||||||
{
|
{
|
||||||
Q_OBJECT // NOLINT
|
Q_OBJECT // NOLINT
|
||||||
|
|
||||||
public : explicit PreferencesConfigurationPage(QWidget *parent = nullptr);
|
public:
|
||||||
|
explicit PreferencesConfigurationPage(QWidget *parent = nullptr);
|
||||||
~PreferencesConfigurationPage() override;
|
~PreferencesConfigurationPage() override;
|
||||||
|
|
||||||
auto Apply() -> QStringList;
|
auto Apply() -> QStringList;
|
||||||
|
@ -59,6 +60,7 @@ private:
|
||||||
bool m_labelLangChanged{false};
|
bool m_labelLangChanged{false};
|
||||||
|
|
||||||
void SetLabelComboBox(const QStringList &list);
|
void SetLabelComboBox(const QStringList &list);
|
||||||
|
void SetThemeModeComboBox();
|
||||||
void InitUnits();
|
void InitUnits();
|
||||||
void RetranslateUi();
|
void RetranslateUi();
|
||||||
};
|
};
|
||||||
|
|
|
@ -33,9 +33,9 @@
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>-70</y>
|
||||||
<width>624</width>
|
<width>624</width>
|
||||||
<height>869</height>
|
<height>873</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||||
|
@ -91,7 +91,7 @@
|
||||||
</property>
|
</property>
|
||||||
<layout class="QFormLayout" name="formLayout">
|
<layout class="QFormLayout" name="formLayout">
|
||||||
<property name="fieldGrowthPolicy">
|
<property name="fieldGrowthPolicy">
|
||||||
<enum>QFormLayout::ExpandingFieldsGrow</enum>
|
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
|
||||||
</property>
|
</property>
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QLabel" name="label_2">
|
<widget class="QLabel" name="label_2">
|
||||||
|
@ -101,7 +101,14 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="1">
|
<item row="0" column="1">
|
||||||
<widget class="QComboBox" name="langCombo"/>
|
<widget class="QComboBox" name="langCombo">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0">
|
<item row="1" column="0">
|
||||||
<widget class="QLabel" name="label_14">
|
<widget class="QLabel" name="label_14">
|
||||||
|
@ -160,7 +167,7 @@
|
||||||
</property>
|
</property>
|
||||||
<layout class="QFormLayout" name="formLayout_2">
|
<layout class="QFormLayout" name="formLayout_2">
|
||||||
<property name="fieldGrowthPolicy">
|
<property name="fieldGrowthPolicy">
|
||||||
<enum>QFormLayout::ExpandingFieldsGrow</enum>
|
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
|
||||||
</property>
|
</property>
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QLabel" name="label_6">
|
<widget class="QLabel" name="label_6">
|
||||||
|
@ -287,14 +294,28 @@
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_7">
|
<layout class="QVBoxLayout" name="verticalLayout_7">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="darkModeCheck">
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||||
<property name="text">
|
<item>
|
||||||
<string>Activate dark mode</string>
|
<widget class="QLabel" name="label_16">
|
||||||
</property>
|
<property name="text">
|
||||||
<property name="checked">
|
<string>Theme:</string>
|
||||||
<bool>true</bool>
|
</property>
|
||||||
</property>
|
</widget>
|
||||||
</widget>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QComboBox" name="comboBoxThemeMode">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||||
|
<horstretch>1</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="sizeAdjustPolicy">
|
||||||
|
<enum>QComboBox::AdjustToContents</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="checkBoxDontUseNativeDialog">
|
<widget class="QCheckBox" name="checkBoxDontUseNativeDialog">
|
||||||
|
@ -346,7 +367,7 @@
|
||||||
</property>
|
</property>
|
||||||
<layout class="QFormLayout" name="formLayout_3">
|
<layout class="QFormLayout" name="formLayout_3">
|
||||||
<property name="fieldGrowthPolicy">
|
<property name="fieldGrowthPolicy">
|
||||||
<enum>QFormLayout::ExpandingFieldsGrow</enum>
|
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
|
||||||
</property>
|
</property>
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QLabel" name="label_8">
|
<widget class="QLabel" name="label_8">
|
||||||
|
@ -410,7 +431,7 @@
|
||||||
</property>
|
</property>
|
||||||
<layout class="QFormLayout" name="formLayout_4">
|
<layout class="QFormLayout" name="formLayout_4">
|
||||||
<property name="fieldGrowthPolicy">
|
<property name="fieldGrowthPolicy">
|
||||||
<enum>QFormLayout::ExpandingFieldsGrow</enum>
|
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
|
||||||
</property>
|
</property>
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QLabel" name="label_11">
|
<widget class="QLabel" name="label_11">
|
||||||
|
@ -474,7 +495,7 @@
|
||||||
</property>
|
</property>
|
||||||
<layout class="QFormLayout" name="formLayout_5">
|
<layout class="QFormLayout" name="formLayout_5">
|
||||||
<property name="fieldGrowthPolicy">
|
<property name="fieldGrowthPolicy">
|
||||||
<enum>QFormLayout::ExpandingFieldsGrow</enum>
|
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
|
||||||
</property>
|
</property>
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QLabel" name="label_13">
|
<widget class="QLabel" name="label_13">
|
||||||
|
|
|
@ -138,7 +138,10 @@ PreferencesPatternPage::PreferencesPatternPage(QWidget *parent)
|
||||||
|
|
||||||
InitSingleLineFonts();
|
InitSingleLineFonts();
|
||||||
const qint32 indexFont = ui->comboBoxSingleLineFont->findData(settings->GetLabelSVGFont());
|
const qint32 indexFont = ui->comboBoxSingleLineFont->findData(settings->GetLabelSVGFont());
|
||||||
ui->comboBoxSingleLineFont->setCurrentIndex(indexFont);
|
if (indexFont != -1)
|
||||||
|
{
|
||||||
|
ui->comboBoxSingleLineFont->setCurrentIndex(indexFont);
|
||||||
|
}
|
||||||
|
|
||||||
ui->checkBoxSingleStrokeOutlineFont->setChecked(settings->GetSingleStrokeOutlineFont());
|
ui->checkBoxSingleStrokeOutlineFont->setChecked(settings->GetSingleStrokeOutlineFont());
|
||||||
ui->checkBoxSingleLineFonts->setChecked(settings->GetSingleLineFonts());
|
ui->checkBoxSingleLineFonts->setChecked(settings->GetSingleLineFonts());
|
||||||
|
@ -252,6 +255,18 @@ void PreferencesPatternPage::changeEvent(QEvent *event)
|
||||||
RetranslateUi();
|
RetranslateUi();
|
||||||
ui->retranslateUi(this);
|
ui->retranslateUi(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (event->type() == QEvent::PaletteChange)
|
||||||
|
{
|
||||||
|
QString currentSingleLineFont = ui->comboBoxSingleLineFont->currentData().toString();
|
||||||
|
InitSingleLineFonts();
|
||||||
|
const qint32 indexFont = ui->comboBoxSingleLineFont->findData(currentSingleLineFont);
|
||||||
|
if (indexFont != -1)
|
||||||
|
{
|
||||||
|
ui->comboBoxSingleLineFont->setCurrentIndex(indexFont);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// remember to call base class implementation
|
// remember to call base class implementation
|
||||||
QWidget::changeEvent(event);
|
QWidget::changeEvent(event);
|
||||||
}
|
}
|
||||||
|
@ -344,6 +359,7 @@ void PreferencesPatternPage::InitSingleLineFonts()
|
||||||
ui->comboBoxSingleLineFont->setIconSize(QSize(previewScaledWidthPixels, previewScaledHeightPixels));
|
ui->comboBoxSingleLineFont->setIconSize(QSize(previewScaledWidthPixels, previewScaledHeightPixels));
|
||||||
|
|
||||||
QPen pen(Qt::SolidPattern, 1 * scale, Qt::SolidLine, Qt::RoundCap, Qt::SvgMiterJoin);
|
QPen pen(Qt::SolidPattern, 1 * scale, Qt::SolidLine, Qt::RoundCap, Qt::SvgMiterJoin);
|
||||||
|
pen.setColor(ui->comboBoxSingleLineFont->palette().color(QPalette::Text));
|
||||||
|
|
||||||
VSvgFontDatabase *db = VAbstractApplication::VApp()->SVGFontDatabase();
|
VSvgFontDatabase *db = VAbstractApplication::VApp()->SVGFontDatabase();
|
||||||
QStringList families = db->Families();
|
QStringList families = db->Families();
|
||||||
|
@ -362,7 +378,7 @@ void PreferencesPatternPage::InitSingleLineFonts()
|
||||||
engine.SetFontPixelSize(previewScaledHeightPixels);
|
engine.SetFontPixelSize(previewScaledHeightPixels);
|
||||||
|
|
||||||
QPixmap pixmap(previewScaledWidthPixels, previewScaledHeightPixels);
|
QPixmap pixmap(previewScaledWidthPixels, previewScaledHeightPixels);
|
||||||
pixmap.fill(Qt::white);
|
pixmap.fill(ui->comboBoxSingleLineFont->palette().color(QPalette::Base));
|
||||||
QPainter painter(&pixmap);
|
QPainter painter(&pixmap);
|
||||||
painter.setRenderHint(QPainter::Antialiasing);
|
painter.setRenderHint(QPainter::Antialiasing);
|
||||||
painter.setPen(pen);
|
painter.setPen(pen);
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>-62</y>
|
||||||
<width>519</width>
|
<width>519</width>
|
||||||
<height>1021</height>
|
<height>1021</height>
|
||||||
</rect>
|
</rect>
|
||||||
|
@ -61,7 +61,7 @@ This option will take an affect after restart.</string>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label">
|
<widget class="QLabel" name="label">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
|
@ -73,6 +73,12 @@ This option will take an affect after restart.</string>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QDoubleSpinBox" name="doubleSpinBoxCurveApproximation">
|
<widget class="QDoubleSpinBox" name="doubleSpinBoxCurveApproximation">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>Set default curve approximation scale</string>
|
<string>Set default curve approximation scale</string>
|
||||||
</property>
|
</property>
|
||||||
|
@ -90,19 +96,6 @@ This option will take an affect after restart.</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<spacer name="horizontalSpacer_2">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>40</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
|
@ -146,19 +139,6 @@ This option will take an affect after restart.</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<spacer name="horizontalSpacer_3">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>500</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
|
@ -294,6 +274,12 @@ This option will take an affect after restart.</string>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_8">
|
<layout class="QHBoxLayout" name="horizontalLayout_8">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_8">
|
<widget class="QLabel" name="label_8">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Size:</string>
|
<string>Size:</string>
|
||||||
</property>
|
</property>
|
||||||
|
@ -302,25 +288,18 @@ This option will take an affect after restart.</string>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QComboBox" name="comboBoxLabelFontSize"/>
|
<widget class="QComboBox" name="comboBoxLabelFontSize"/>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<spacer name="horizontalSpacer_5">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>40</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_7">
|
<layout class="QHBoxLayout" name="horizontalLayout_7">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_3">
|
<widget class="QLabel" name="label_3">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Outline font:</string>
|
<string>Outline font:</string>
|
||||||
</property>
|
</property>
|
||||||
|
@ -329,25 +308,18 @@ This option will take an affect after restart.</string>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QFontComboBox" name="fontComboBoxLabelFont"/>
|
<widget class="QFontComboBox" name="fontComboBoxLabelFont"/>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<spacer name="horizontalSpacer_6">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>40</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_9">
|
<layout class="QHBoxLayout" name="horizontalLayout_9">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_9">
|
<widget class="QLabel" name="label_9">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Single-line font:</string>
|
<string>Single-line font:</string>
|
||||||
</property>
|
</property>
|
||||||
|
@ -360,19 +332,6 @@ This option will take an affect after restart.</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<spacer name="horizontalSpacer_7">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>40</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
|
|
|
@ -27,13 +27,13 @@
|
||||||
*************************************************************************/
|
*************************************************************************/
|
||||||
|
|
||||||
#include "dialogfinalmeasurements.h"
|
#include "dialogfinalmeasurements.h"
|
||||||
#include "ui_dialogfinalmeasurements.h"
|
#include "../qmuparser/qmudef.h"
|
||||||
#include "../vmisc/vvalentinasettings.h"
|
|
||||||
#include "../vmisc/compatibility.h"
|
#include "../vmisc/compatibility.h"
|
||||||
#include "../vmisc/vabstractvalapplication.h"
|
#include "../vmisc/vabstractvalapplication.h"
|
||||||
#include "../qmuparser/qmudef.h"
|
#include "../vmisc/vvalentinasettings.h"
|
||||||
#include "../vpatterndb/calculator.h"
|
#include "../vpatterndb/calculator.h"
|
||||||
#include "../vtools/dialogs/support/dialogeditwrongformula.h"
|
#include "../vtools/dialogs/support/dialogeditwrongformula.h"
|
||||||
|
#include "ui_dialogfinalmeasurements.h"
|
||||||
#include <QMenu>
|
#include <QMenu>
|
||||||
#include <qnumeric.h>
|
#include <qnumeric.h>
|
||||||
|
|
||||||
|
@ -41,12 +41,12 @@ constexpr int DIALOG_MAX_FORMULA_HEIGHT = 64;
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
DialogFinalMeasurements::DialogFinalMeasurements(VPattern *doc, QWidget *parent)
|
DialogFinalMeasurements::DialogFinalMeasurements(VPattern *doc, QWidget *parent)
|
||||||
: QDialog(parent),
|
: QDialog(parent),
|
||||||
ui(new Ui::DialogFinalMeasurements),
|
ui(new Ui::DialogFinalMeasurements),
|
||||||
m_doc(doc),
|
m_doc(doc),
|
||||||
m_data(doc->GetCompleteData()),
|
m_data(doc->GetCompleteData()),
|
||||||
m_measurements(doc->GetFinalMeasurements()),
|
m_measurements(doc->GetFinalMeasurements()),
|
||||||
m_searchHistory(new QMenu(this))
|
m_searchHistory(new QMenu(this))
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@ DialogFinalMeasurements::DialogFinalMeasurements(VPattern *doc, QWidget *parent)
|
||||||
connect(m_doc, &VPattern::FullUpdateFromFile, this, &DialogFinalMeasurements::FullUpdateFromFile);
|
connect(m_doc, &VPattern::FullUpdateFromFile, this, &DialogFinalMeasurements::FullUpdateFromFile);
|
||||||
|
|
||||||
ui->lineEditName->setValidator(
|
ui->lineEditName->setValidator(
|
||||||
new QRegularExpressionValidator(QRegularExpression(QStringLiteral("^$|")+NameRegExp()), this));
|
new QRegularExpressionValidator(QRegularExpression(QStringLiteral("^$|") + NameRegExp()), this));
|
||||||
|
|
||||||
connect(ui->tableWidget, &QTableWidget::itemSelectionChanged, this,
|
connect(ui->tableWidget, &QTableWidget::itemSelectionChanged, this,
|
||||||
&DialogFinalMeasurements::ShowFinalMeasurementDetails);
|
&DialogFinalMeasurements::ShowFinalMeasurementDetails);
|
||||||
|
@ -162,14 +162,14 @@ auto DialogFinalMeasurements::eventFilter(QObject *object, QEvent *event) -> boo
|
||||||
// pass the event on to the parent class
|
// pass the event on to the parent class
|
||||||
return QDialog::eventFilter(object, event);
|
return QDialog::eventFilter(object, event);
|
||||||
}
|
}
|
||||||
return false;// pass the event to the widget // clazy:exclude=base-class-event
|
return false; // pass the event to the widget // clazy:exclude=base-class-event
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void DialogFinalMeasurements::showEvent(QShowEvent *event)
|
void DialogFinalMeasurements::showEvent(QShowEvent *event)
|
||||||
{
|
{
|
||||||
QDialog::showEvent(event);
|
QDialog::showEvent(event);
|
||||||
if ( event->spontaneous() )
|
if (event->spontaneous())
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -186,7 +186,7 @@ void DialogFinalMeasurements::showEvent(QShowEvent *event)
|
||||||
resize(sz);
|
resize(sz);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_isInitialized = true;//first show windows are held
|
m_isInitialized = true; // first show windows are held
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -223,7 +223,7 @@ void DialogFinalMeasurements::ShowFinalMeasurementDetails()
|
||||||
ui->plainTextEditFormula->blockSignals(true);
|
ui->plainTextEditFormula->blockSignals(true);
|
||||||
|
|
||||||
const QString formula =
|
const QString formula =
|
||||||
VTranslateVars::TryFormulaToUser(m.formula, VAbstractApplication::VApp()->Settings()->GetOsSeparator());
|
VTranslateVars::TryFormulaToUser(m.formula, VAbstractApplication::VApp()->Settings()->GetOsSeparator());
|
||||||
|
|
||||||
ui->plainTextEditFormula->setPlainText(formula);
|
ui->plainTextEditFormula->setPlainText(formula);
|
||||||
ui->plainTextEditFormula->blockSignals(false);
|
ui->plainTextEditFormula->blockSignals(false);
|
||||||
|
@ -237,7 +237,7 @@ void DialogFinalMeasurements::ShowFinalMeasurementDetails()
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void DialogFinalMeasurements::Add()
|
void DialogFinalMeasurements::Add()
|
||||||
{
|
{
|
||||||
const int currentRow = ui->tableWidget->currentRow()+1;
|
const int currentRow = ui->tableWidget->currentRow() + 1;
|
||||||
|
|
||||||
VFinalMeasurement m;
|
VFinalMeasurement m;
|
||||||
m.name = tr("measurement");
|
m.name = tr("measurement");
|
||||||
|
@ -285,10 +285,10 @@ void DialogFinalMeasurements::MoveUp()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Move(m_measurements, row, row-1);
|
Move(m_measurements, row, row - 1);
|
||||||
UpdateTree();
|
UpdateTree();
|
||||||
|
|
||||||
ui->tableWidget->selectRow(row-1);
|
ui->tableWidget->selectRow(row - 1);
|
||||||
ui->tableWidget->repaint(); // Force repain to fix paint artifacts on Mac OS X
|
ui->tableWidget->repaint(); // Force repain to fix paint artifacts on Mac OS X
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -297,15 +297,15 @@ void DialogFinalMeasurements::MoveDown()
|
||||||
{
|
{
|
||||||
const int row = ui->tableWidget->currentRow();
|
const int row = ui->tableWidget->currentRow();
|
||||||
|
|
||||||
if (row == -1 || row == ui->tableWidget->rowCount()-1 || row >= m_measurements.size())
|
if (row == -1 || row == ui->tableWidget->rowCount() - 1 || row >= m_measurements.size())
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Move(m_measurements, row, row+1);
|
Move(m_measurements, row, row + 1);
|
||||||
UpdateTree();
|
UpdateTree();
|
||||||
|
|
||||||
ui->tableWidget->selectRow(row+1);
|
ui->tableWidget->selectRow(row + 1);
|
||||||
ui->tableWidget->repaint(); // Force repain to fix paint artifacts on Mac OS X
|
ui->tableWidget->repaint(); // Force repain to fix paint artifacts on Mac OS X
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -367,15 +367,15 @@ void DialogFinalMeasurements::SaveFormula()
|
||||||
if (formulaField->text() == text)
|
if (formulaField->text() == text)
|
||||||
{
|
{
|
||||||
QTableWidgetItem *result = ui->tableWidget->item(row, 1);
|
QTableWidgetItem *result = ui->tableWidget->item(row, 1);
|
||||||
//Show unit in dialog lable (cm, mm or inch)
|
// Show unit in dialog lable (cm, mm or inch)
|
||||||
const QString postfix = UnitsToStr(VAbstractValApplication::VApp()->patternUnits());
|
const QString postfix = UnitsToStr(VAbstractValApplication::VApp()->patternUnits());
|
||||||
ui->labelCalculatedValue->setText(result->text() + QChar(QChar::Space) +postfix);
|
ui->labelCalculatedValue->setText(result->text() + QChar(QChar::Space) + postfix);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (text.isEmpty())
|
if (text.isEmpty())
|
||||||
{
|
{
|
||||||
//Show unit in dialog lable (cm, mm or inch)
|
// Show unit in dialog lable (cm, mm or inch)
|
||||||
const QString postfix = UnitsToStr(VAbstractValApplication::VApp()->patternUnits());
|
const QString postfix = UnitsToStr(VAbstractValApplication::VApp()->patternUnits());
|
||||||
ui->labelCalculatedValue->setText(tr("Error") + " (" + postfix + "). " + tr("Empty field."));
|
ui->labelCalculatedValue->setText(tr("Error") + " (" + postfix + "). " + tr("Empty field."));
|
||||||
return;
|
return;
|
||||||
|
@ -388,8 +388,8 @@ void DialogFinalMeasurements::SaveFormula()
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
m_measurements[row].formula = VAbstractApplication::VApp()->TrVars()
|
m_measurements[row].formula = VAbstractApplication::VApp()->TrVars()->FormulaFromUser(
|
||||||
->FormulaFromUser(text, VAbstractApplication::VApp()->Settings()->GetOsSeparator());
|
text, VAbstractApplication::VApp()->Settings()->GetOsSeparator());
|
||||||
}
|
}
|
||||||
catch (qmu::QmuParserError &e) // Just in case something bad will happen
|
catch (qmu::QmuParserError &e) // Just in case something bad will happen
|
||||||
{
|
{
|
||||||
|
@ -415,16 +415,14 @@ void DialogFinalMeasurements::DeployFormula()
|
||||||
if (ui->plainTextEditFormula->height() < DIALOG_MAX_FORMULA_HEIGHT)
|
if (ui->plainTextEditFormula->height() < DIALOG_MAX_FORMULA_HEIGHT)
|
||||||
{
|
{
|
||||||
ui->plainTextEditFormula->setFixedHeight(DIALOG_MAX_FORMULA_HEIGHT);
|
ui->plainTextEditFormula->setFixedHeight(DIALOG_MAX_FORMULA_HEIGHT);
|
||||||
//Set icon from theme (internal for Windows system)
|
// Set icon from theme (internal for Windows system)
|
||||||
ui->pushButtonGrow->setIcon(QIcon::fromTheme(QStringLiteral("go-next"),
|
ui->pushButtonGrow->setIcon(QIcon::fromTheme(QStringLiteral("go-next")));
|
||||||
QIcon(":/icons/win.icon.theme/16x16/actions/go-next.png")));
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ui->plainTextEditFormula->setFixedHeight(formulaBaseHeight);
|
ui->plainTextEditFormula->setFixedHeight(formulaBaseHeight);
|
||||||
//Set icon from theme (internal for Windows system)
|
// Set icon from theme (internal for Windows system)
|
||||||
ui->pushButtonGrow->setIcon(QIcon::fromTheme(QStringLiteral("go-down"),
|
ui->pushButtonGrow->setIcon(QIcon::fromTheme(QStringLiteral("go-down")));
|
||||||
QIcon(":/icons/win.icon.theme/16x16/actions/go-down.png")));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// I found that after change size of formula field, it was filed for angle formula, field for formula became black.
|
// I found that after change size of formula field, it was filed for angle formula, field for formula became black.
|
||||||
|
@ -453,7 +451,7 @@ void DialogFinalMeasurements::Fx()
|
||||||
VAbstractApplication::VApp()->Settings()->GetOsSeparator()));
|
VAbstractApplication::VApp()->Settings()->GetOsSeparator()));
|
||||||
dialog->ShowPieceArea(true);
|
dialog->ShowPieceArea(true);
|
||||||
const QString postfix = UnitsToStr(VAbstractValApplication::VApp()->patternUnits(), true);
|
const QString postfix = UnitsToStr(VAbstractValApplication::VApp()->patternUnits(), true);
|
||||||
dialog->setPostfix(postfix);//Show unit in dialog lable (cm, mm or inch)
|
dialog->setPostfix(postfix); // Show unit in dialog lable (cm, mm or inch)
|
||||||
|
|
||||||
if (dialog->exec() == QDialog::Accepted)
|
if (dialog->exec() == QDialog::Accepted)
|
||||||
{
|
{
|
||||||
|
@ -484,7 +482,7 @@ void DialogFinalMeasurements::FillFinalMeasurements(bool freshCall)
|
||||||
ui->tableWidget->clearContents();
|
ui->tableWidget->clearContents();
|
||||||
|
|
||||||
ui->tableWidget->setRowCount(static_cast<int>(m_measurements.size()));
|
ui->tableWidget->setRowCount(static_cast<int>(m_measurements.size()));
|
||||||
for (int i=0; i < m_measurements.size(); ++i)
|
for (int i = 0; i < m_measurements.size(); ++i)
|
||||||
{
|
{
|
||||||
const VFinalMeasurement &m = m_measurements.at(i);
|
const VFinalMeasurement &m = m_measurements.at(i);
|
||||||
|
|
||||||
|
@ -492,14 +490,12 @@ void DialogFinalMeasurements::FillFinalMeasurements(bool freshCall)
|
||||||
|
|
||||||
bool ok = true;
|
bool ok = true;
|
||||||
const qreal result = EvalFormula(m.formula, ok);
|
const qreal result = EvalFormula(m.formula, ok);
|
||||||
AddCell(VAbstractApplication::VApp()
|
AddCell(VAbstractApplication::VApp()->LocaleToString(result), i, 1, Qt::AlignHCenter | Qt::AlignVCenter,
|
||||||
->LocaleToString(result), i, 1, Qt::AlignHCenter | Qt::AlignVCenter, ok); // calculated value
|
ok); // calculated value
|
||||||
|
|
||||||
const QString formula =
|
const QString formula =
|
||||||
VTranslateVars::TryFormulaFromUser(m.formula,
|
VTranslateVars::TryFormulaFromUser(m.formula, VAbstractApplication::VApp()->Settings()->GetOsSeparator());
|
||||||
VAbstractApplication::VApp()->Settings()->GetOsSeparator());
|
|
||||||
AddCell(formula, i, 2, Qt::AlignVCenter); // formula
|
AddCell(formula, i, 2, Qt::AlignVCenter); // formula
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (freshCall)
|
if (freshCall)
|
||||||
|
@ -556,7 +552,7 @@ void DialogFinalMeasurements::AddCell(const QString &text, int row, int column,
|
||||||
auto DialogFinalMeasurements::EvalUserFormula(const QString &formula, bool fromUser) -> bool
|
auto DialogFinalMeasurements::EvalUserFormula(const QString &formula, bool fromUser) -> bool
|
||||||
{
|
{
|
||||||
const QString postfix =
|
const QString postfix =
|
||||||
UnitsToStr(VAbstractValApplication::VApp()->patternUnits());//Show unit in dialog lable (cm, mm or inch)
|
UnitsToStr(VAbstractValApplication::VApp()->patternUnits()); // Show unit in dialog lable (cm, mm or inch)
|
||||||
if (formula.isEmpty())
|
if (formula.isEmpty())
|
||||||
{
|
{
|
||||||
ui->labelCalculatedValue->setText(tr("Error") + " (" + postfix + "). " + tr("Empty field."));
|
ui->labelCalculatedValue->setText(tr("Error") + " (" + postfix + "). " + tr("Empty field."));
|
||||||
|
@ -570,8 +566,8 @@ auto DialogFinalMeasurements::EvalUserFormula(const QString &formula, bool fromU
|
||||||
// Replace line return character with spaces for calc if exist
|
// Replace line return character with spaces for calc if exist
|
||||||
if (fromUser)
|
if (fromUser)
|
||||||
{
|
{
|
||||||
f = VAbstractApplication::VApp()->TrVars()
|
f = VAbstractApplication::VApp()->TrVars()->FormulaFromUser(
|
||||||
->FormulaFromUser(formula, VAbstractApplication::VApp()->Settings()->GetOsSeparator());
|
formula, VAbstractApplication::VApp()->Settings()->GetOsSeparator());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -588,8 +584,8 @@ auto DialogFinalMeasurements::EvalUserFormula(const QString &formula, bool fromU
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
ui->labelCalculatedValue->setText(
|
ui->labelCalculatedValue->setText(VAbstractApplication::VApp()->LocaleToString(result) + QChar(QChar::Space) +
|
||||||
VAbstractApplication::VApp()->LocaleToString(result) + QChar(QChar::Space) + postfix);
|
postfix);
|
||||||
ui->labelCalculatedValue->setToolTip(tr("Value"));
|
ui->labelCalculatedValue->setToolTip(tr("Value"));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -614,7 +610,7 @@ void DialogFinalMeasurements::Controls()
|
||||||
ui->toolButtonUp->setEnabled(false);
|
ui->toolButtonUp->setEnabled(false);
|
||||||
ui->toolButtonDown->setEnabled(true);
|
ui->toolButtonDown->setEnabled(true);
|
||||||
}
|
}
|
||||||
else if (ui->tableWidget->currentRow() == ui->tableWidget->rowCount()-1)
|
else if (ui->tableWidget->currentRow() == ui->tableWidget->rowCount() - 1)
|
||||||
{
|
{
|
||||||
ui->toolButtonUp->setEnabled(true);
|
ui->toolButtonUp->setEnabled(true);
|
||||||
ui->toolButtonDown->setEnabled(false);
|
ui->toolButtonDown->setEnabled(false);
|
||||||
|
@ -731,105 +727,115 @@ void DialogFinalMeasurements::InitSearch()
|
||||||
|
|
||||||
UpdateSearchControlsTooltips();
|
UpdateSearchControlsTooltips();
|
||||||
|
|
||||||
connect(ui->lineEditFind, &QLineEdit::textEdited, this, [this](const QString &term){m_search->Find(term);});
|
connect(ui->lineEditFind, &QLineEdit::textEdited, this, [this](const QString &term) { m_search->Find(term); });
|
||||||
connect(ui->lineEditFind, &QLineEdit::editingFinished, this, [this]()
|
connect(ui->lineEditFind, &QLineEdit::editingFinished, this,
|
||||||
{
|
[this]()
|
||||||
SaveSearchRequest();
|
{
|
||||||
InitSearchHistory();
|
SaveSearchRequest();
|
||||||
m_search->Find(ui->lineEditFind->text());
|
InitSearchHistory();
|
||||||
});
|
m_search->Find(ui->lineEditFind->text());
|
||||||
connect(ui->toolButtonFindPrevious, &QToolButton::clicked, this, [this]()
|
});
|
||||||
{
|
connect(ui->toolButtonFindPrevious, &QToolButton::clicked, this,
|
||||||
SaveSearchRequest();
|
[this]()
|
||||||
InitSearchHistory();
|
{
|
||||||
m_search->FindPrevious();
|
SaveSearchRequest();
|
||||||
ui->labelResults->setText(QStringLiteral("%1/%2").arg(m_search->MatchIndex()+1).arg(m_search->MatchCount()));
|
InitSearchHistory();
|
||||||
});
|
m_search->FindPrevious();
|
||||||
connect(ui->toolButtonFindNext, &QToolButton::clicked, this, [this]()
|
ui->labelResults->setText(
|
||||||
{
|
QStringLiteral("%1/%2").arg(m_search->MatchIndex() + 1).arg(m_search->MatchCount()));
|
||||||
SaveSearchRequest();
|
});
|
||||||
InitSearchHistory();
|
connect(ui->toolButtonFindNext, &QToolButton::clicked, this,
|
||||||
m_search->FindNext();
|
[this]()
|
||||||
ui->labelResults->setText(QStringLiteral("%1/%2").arg(m_search->MatchIndex()+1).arg(m_search->MatchCount()));
|
{
|
||||||
});
|
SaveSearchRequest();
|
||||||
|
InitSearchHistory();
|
||||||
|
m_search->FindNext();
|
||||||
|
ui->labelResults->setText(
|
||||||
|
QStringLiteral("%1/%2").arg(m_search->MatchIndex() + 1).arg(m_search->MatchCount()));
|
||||||
|
});
|
||||||
|
|
||||||
connect(m_search.data(), &VTableSearch::HasResult, this, [this] (bool state)
|
connect(m_search.data(), &VTableSearch::HasResult, this,
|
||||||
{
|
[this](bool state)
|
||||||
ui->toolButtonFindPrevious->setEnabled(state);
|
{
|
||||||
ui->toolButtonFindNext->setEnabled(state);
|
ui->toolButtonFindPrevious->setEnabled(state);
|
||||||
|
ui->toolButtonFindNext->setEnabled(state);
|
||||||
|
|
||||||
if (state)
|
if (state)
|
||||||
{
|
{
|
||||||
ui->labelResults->setText(
|
ui->labelResults->setText(
|
||||||
QStringLiteral("%1/%2").arg(m_search->MatchIndex()+1).arg(m_search->MatchCount()));
|
QStringLiteral("%1/%2").arg(m_search->MatchIndex() + 1).arg(m_search->MatchCount()));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ui->labelResults->setText(tr("0 results"));
|
ui->labelResults->setText(tr("0 results"));
|
||||||
}
|
}
|
||||||
|
|
||||||
QPalette palette;
|
QPalette palette;
|
||||||
|
|
||||||
if (not state && not ui->lineEditFind->text().isEmpty())
|
if (not state && not ui->lineEditFind->text().isEmpty())
|
||||||
{
|
{
|
||||||
palette.setColor(QPalette::Text, Qt::red);
|
palette.setColor(QPalette::Text, Qt::red);
|
||||||
ui->lineEditFind->setPalette(palette);
|
ui->lineEditFind->setPalette(palette);
|
||||||
|
|
||||||
palette.setColor(QPalette::Active, ui->labelResults->foregroundRole(), Qt::red);
|
palette.setColor(QPalette::Active, ui->labelResults->foregroundRole(), Qt::red);
|
||||||
palette.setColor(QPalette::Inactive, ui->labelResults->foregroundRole(), Qt::red);
|
palette.setColor(QPalette::Inactive, ui->labelResults->foregroundRole(), Qt::red);
|
||||||
ui->labelResults->setPalette(palette);
|
ui->labelResults->setPalette(palette);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ui->lineEditFind->setPalette(palette);
|
ui->lineEditFind->setPalette(palette);
|
||||||
ui->labelResults->setPalette(palette);
|
ui->labelResults->setPalette(palette);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
connect(ui->toolButtonCaseSensitive, &QToolButton::toggled, this, [this](bool checked)
|
connect(ui->toolButtonCaseSensitive, &QToolButton::toggled, this,
|
||||||
{
|
[this](bool checked)
|
||||||
m_search->SetMatchCase(checked);
|
{
|
||||||
m_search->Find(ui->lineEditFind->text());
|
m_search->SetMatchCase(checked);
|
||||||
ui->lineEditFind->setPlaceholderText(m_search->SearchPlaceholder());
|
m_search->Find(ui->lineEditFind->text());
|
||||||
});
|
ui->lineEditFind->setPlaceholderText(m_search->SearchPlaceholder());
|
||||||
|
});
|
||||||
|
|
||||||
connect(ui->toolButtonWholeWord, &QToolButton::toggled, this, [this](bool checked)
|
connect(ui->toolButtonWholeWord, &QToolButton::toggled, this,
|
||||||
{
|
[this](bool checked)
|
||||||
m_search->SetMatchWord(checked);
|
{
|
||||||
m_search->Find(ui->lineEditFind->text());
|
m_search->SetMatchWord(checked);
|
||||||
ui->lineEditFind->setPlaceholderText(m_search->SearchPlaceholder());
|
m_search->Find(ui->lineEditFind->text());
|
||||||
});
|
ui->lineEditFind->setPlaceholderText(m_search->SearchPlaceholder());
|
||||||
|
});
|
||||||
|
|
||||||
connect(ui->toolButtonRegexp, &QToolButton::toggled, this, [this](bool checked)
|
connect(ui->toolButtonRegexp, &QToolButton::toggled, this,
|
||||||
{
|
[this](bool checked)
|
||||||
m_search->SetMatchRegexp(checked);
|
{
|
||||||
|
m_search->SetMatchRegexp(checked);
|
||||||
|
|
||||||
if (checked)
|
if (checked)
|
||||||
{
|
{
|
||||||
ui->toolButtonWholeWord->blockSignals(true);
|
ui->toolButtonWholeWord->blockSignals(true);
|
||||||
ui->toolButtonWholeWord->setChecked(false);
|
ui->toolButtonWholeWord->setChecked(false);
|
||||||
ui->toolButtonWholeWord->blockSignals(false);
|
ui->toolButtonWholeWord->blockSignals(false);
|
||||||
ui->toolButtonWholeWord->setEnabled(false);
|
ui->toolButtonWholeWord->setEnabled(false);
|
||||||
|
|
||||||
ui->toolButtonUseUnicodeProperties->setEnabled(true);
|
ui->toolButtonUseUnicodeProperties->setEnabled(true);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ui->toolButtonWholeWord->setEnabled(true);
|
ui->toolButtonWholeWord->setEnabled(true);
|
||||||
ui->toolButtonUseUnicodeProperties->blockSignals(true);
|
ui->toolButtonUseUnicodeProperties->blockSignals(true);
|
||||||
ui->toolButtonUseUnicodeProperties->setChecked(false);
|
ui->toolButtonUseUnicodeProperties->setChecked(false);
|
||||||
ui->toolButtonUseUnicodeProperties->blockSignals(false);
|
ui->toolButtonUseUnicodeProperties->blockSignals(false);
|
||||||
ui->toolButtonUseUnicodeProperties->setEnabled(false);
|
ui->toolButtonUseUnicodeProperties->setEnabled(false);
|
||||||
}
|
}
|
||||||
m_search->Find(ui->lineEditFind->text());
|
m_search->Find(ui->lineEditFind->text());
|
||||||
ui->lineEditFind->setPlaceholderText(m_search->SearchPlaceholder());
|
ui->lineEditFind->setPlaceholderText(m_search->SearchPlaceholder());
|
||||||
});
|
});
|
||||||
|
|
||||||
connect(ui->toolButtonUseUnicodeProperties, &QToolButton::toggled, this, [this](bool checked)
|
connect(ui->toolButtonUseUnicodeProperties, &QToolButton::toggled, this,
|
||||||
{
|
[this](bool checked)
|
||||||
m_search->SetUseUnicodePreperties(checked);
|
{
|
||||||
m_search->Find(ui->lineEditFind->text());
|
m_search->SetUseUnicodePreperties(checked);
|
||||||
});
|
m_search->Find(ui->lineEditFind->text());
|
||||||
|
});
|
||||||
|
|
||||||
m_searchHistory->setStyleSheet(QStringLiteral("QMenu { menu-scrollable: 1; }"));
|
m_searchHistory->setStyleSheet(QStringLiteral("QMenu { menu-scrollable: 1; }"));
|
||||||
InitSearchHistory();
|
InitSearchHistory();
|
||||||
|
@ -840,23 +846,24 @@ void DialogFinalMeasurements::InitSearch()
|
||||||
void DialogFinalMeasurements::InitSearchHistory()
|
void DialogFinalMeasurements::InitSearchHistory()
|
||||||
{
|
{
|
||||||
QStringList searchHistory =
|
QStringList searchHistory =
|
||||||
VAbstractValApplication::VApp()->ValentinaSettings()->GetFinalMeasurementsSearchHistory();
|
VAbstractValApplication::VApp()->ValentinaSettings()->GetFinalMeasurementsSearchHistory();
|
||||||
m_searchHistory->clear();
|
m_searchHistory->clear();
|
||||||
for (const auto& term : searchHistory)
|
for (const auto &term : searchHistory)
|
||||||
{
|
{
|
||||||
QAction *action = m_searchHistory->addAction(term);
|
QAction *action = m_searchHistory->addAction(term);
|
||||||
action->setData(term);
|
action->setData(term);
|
||||||
connect(action, &QAction::triggered, this, [this]()
|
connect(action, &QAction::triggered, this,
|
||||||
{
|
[this]()
|
||||||
auto *action = qobject_cast<QAction *>(sender());
|
{
|
||||||
if (action != nullptr)
|
auto *action = qobject_cast<QAction *>(sender());
|
||||||
{
|
if (action != nullptr)
|
||||||
QString term = action->data().toString();
|
{
|
||||||
ui->lineEditFind->setText(term);
|
QString term = action->data().toString();
|
||||||
m_search->Find(term);
|
ui->lineEditFind->setText(term);
|
||||||
ui->lineEditFind->setFocus();
|
m_search->Find(term);
|
||||||
}
|
ui->lineEditFind->setFocus();
|
||||||
});
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -864,7 +871,7 @@ void DialogFinalMeasurements::InitSearchHistory()
|
||||||
void DialogFinalMeasurements::SaveSearchRequest()
|
void DialogFinalMeasurements::SaveSearchRequest()
|
||||||
{
|
{
|
||||||
QStringList searchHistory =
|
QStringList searchHistory =
|
||||||
VAbstractValApplication::VApp()->ValentinaSettings()->GetFinalMeasurementsSearchHistory();
|
VAbstractValApplication::VApp()->ValentinaSettings()->GetFinalMeasurementsSearchHistory();
|
||||||
QString term = ui->lineEditFind->text();
|
QString term = ui->lineEditFind->text();
|
||||||
if (term.isEmpty())
|
if (term.isEmpty())
|
||||||
{
|
{
|
||||||
|
|
|
@ -1818,15 +1818,13 @@ void DialogIncrements::DeployFormula()
|
||||||
{
|
{
|
||||||
plainTextEditFormula->setFixedHeight(DIALOG_MAX_FORMULA_HEIGHT);
|
plainTextEditFormula->setFixedHeight(DIALOG_MAX_FORMULA_HEIGHT);
|
||||||
// Set icon from theme (internal for Windows system)
|
// Set icon from theme (internal for Windows system)
|
||||||
pushButtonGrow->setIcon(
|
pushButtonGrow->setIcon(QIcon::fromTheme(QStringLiteral("go-next")));
|
||||||
QIcon::fromTheme(QStringLiteral("go-next"), QIcon(":/icons/win.icon.theme/16x16/actions/go-next.png")));
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
plainTextEditFormula->setFixedHeight(baseHeight);
|
plainTextEditFormula->setFixedHeight(baseHeight);
|
||||||
// Set icon from theme (internal for Windows system)
|
// Set icon from theme (internal for Windows system)
|
||||||
pushButtonGrow->setIcon(
|
pushButtonGrow->setIcon(QIcon::fromTheme(QStringLiteral("go-down")));
|
||||||
QIcon::fromTheme(QStringLiteral("go-down"), QIcon(":/icons/win.icon.theme/16x16/actions/go-down.png")));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// I found that after change size of formula field, it was filed for angle formula, field for formula became black.
|
// I found that after change size of formula field, it was filed for angle formula, field for formula became black.
|
||||||
|
|
|
@ -27,24 +27,25 @@
|
||||||
*************************************************************************/
|
*************************************************************************/
|
||||||
|
|
||||||
#include "dialogpreferences.h"
|
#include "dialogpreferences.h"
|
||||||
#include "ui_dialogpreferences.h"
|
|
||||||
#include "configpages/preferencesconfigurationpage.h"
|
|
||||||
#include "configpages/preferencespatternpage.h"
|
|
||||||
#include "configpages/preferencespathpage.h"
|
|
||||||
#include "../vmisc/vvalentinasettings.h"
|
|
||||||
#include "../vmisc/vabstractvalapplication.h"
|
#include "../vmisc/vabstractvalapplication.h"
|
||||||
|
#include "../vmisc/vvalentinasettings.h"
|
||||||
|
#include "configpages/preferencesconfigurationpage.h"
|
||||||
|
#include "configpages/preferencespathpage.h"
|
||||||
|
#include "configpages/preferencespatternpage.h"
|
||||||
|
#include "ui_dialogpreferences.h"
|
||||||
|
|
||||||
|
#include <QApplication>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include <QPushButton>
|
#include <QPushButton>
|
||||||
#include <QShowEvent>
|
#include <QShowEvent>
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
DialogPreferences::DialogPreferences(QWidget *parent)
|
DialogPreferences::DialogPreferences(QWidget *parent)
|
||||||
: QDialog(parent),
|
: QDialog(parent),
|
||||||
ui(new Ui::DialogPreferences),
|
ui(new Ui::DialogPreferences),
|
||||||
m_configurePage(new PreferencesConfigurationPage),
|
m_configurePage(new PreferencesConfigurationPage),
|
||||||
m_patternPage(new PreferencesPatternPage),
|
m_patternPage(new PreferencesPatternPage),
|
||||||
m_pathPage(new PreferencesPathPage)
|
m_pathPage(new PreferencesPathPage)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
|
||||||
|
@ -79,8 +80,8 @@ DialogPreferences::~DialogPreferences()
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void DialogPreferences::showEvent(QShowEvent *event)
|
void DialogPreferences::showEvent(QShowEvent *event)
|
||||||
{
|
{
|
||||||
QDialog::showEvent( event );
|
QDialog::showEvent(event);
|
||||||
if ( event->spontaneous() )
|
if (event->spontaneous())
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -97,7 +98,7 @@ void DialogPreferences::showEvent(QShowEvent *event)
|
||||||
resize(sz);
|
resize(sz);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_isInitialized = true;//first show windows are held
|
m_isInitialized = true; // first show windows are held
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -121,6 +122,24 @@ void DialogPreferences::changeEvent(QEvent *event)
|
||||||
// retranslate designer form (single inheritance approach)
|
// retranslate designer form (single inheritance approach)
|
||||||
ui->retranslateUi(this);
|
ui->retranslateUi(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (event->type() == QEvent::PaletteChange)
|
||||||
|
{
|
||||||
|
QStyle *style = QApplication::style();
|
||||||
|
|
||||||
|
QPushButton *bOk = ui->buttonBox->button(QDialogButtonBox::Ok);
|
||||||
|
SCASSERT(bOk != nullptr)
|
||||||
|
bOk->setIcon(style->standardIcon(QStyle::SP_DialogOkButton));
|
||||||
|
|
||||||
|
QPushButton *bApply = ui->buttonBox->button(QDialogButtonBox::Apply);
|
||||||
|
SCASSERT(bApply != nullptr)
|
||||||
|
bApply->setIcon(style->standardIcon(QStyle::SP_DialogApplyButton));
|
||||||
|
|
||||||
|
QPushButton *bCancel = ui->buttonBox->button(QDialogButtonBox::Cancel);
|
||||||
|
SCASSERT(bCancel != nullptr)
|
||||||
|
bCancel->setIcon(style->standardIcon(QStyle::SP_DialogCancelButton));
|
||||||
|
}
|
||||||
|
|
||||||
// remember to call base class implementation
|
// remember to call base class implementation
|
||||||
QDialog::changeEvent(event);
|
QDialog::changeEvent(event);
|
||||||
}
|
}
|
||||||
|
@ -147,12 +166,12 @@ void DialogPreferences::Apply()
|
||||||
|
|
||||||
if (not preferences.isEmpty())
|
if (not preferences.isEmpty())
|
||||||
{
|
{
|
||||||
const QString text = tr("Followed %n option(s) require restart to take effect: %1.", "",
|
const QString text =
|
||||||
static_cast<int>(preferences.size())).arg(preferences.join(QStringLiteral(", ")));
|
tr("Followed %n option(s) require restart to take effect: %1.", "", static_cast<int>(preferences.size()))
|
||||||
|
.arg(preferences.join(QStringLiteral(", ")));
|
||||||
QMessageBox::information(this, QCoreApplication::applicationName(), text);
|
QMessageBox::information(this, QCoreApplication::applicationName(), text);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
m_patternPage->InitDefaultSeamAllowance();
|
m_patternPage->InitDefaultSeamAllowance();
|
||||||
|
|
||||||
VAbstractValApplication::VApp()->ValentinaSettings()->GetOsSeparator() ? setLocale(QLocale())
|
VAbstractValApplication::VApp()->ValentinaSettings()->GetOsSeparator() ? setLocale(QLocale())
|
||||||
|
|
|
@ -26,21 +26,22 @@
|
||||||
**
|
**
|
||||||
*************************************************************************/
|
*************************************************************************/
|
||||||
|
|
||||||
#include "mainwindow.h"
|
|
||||||
#include "core/vapplication.h"
|
|
||||||
#include "../fervor/fvupdater.h"
|
#include "../fervor/fvupdater.h"
|
||||||
#include "../vpatterndb/vpiecenode.h"
|
#include "../vpatterndb/vpiecenode.h"
|
||||||
|
#include "core/vapplication.h"
|
||||||
|
#include "mainwindow.h"
|
||||||
|
#include "vabstractapplication.h"
|
||||||
|
|
||||||
#include <QMessageBox> // For QT_REQUIRE_VERSION
|
#include <QMessageBox> // For QT_REQUIRE_VERSION
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
|
|
||||||
#if defined(APPIMAGE) && defined(Q_OS_LINUX)
|
#if defined(APPIMAGE) && defined(Q_OS_LINUX)
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(5, 12, 0)
|
#if QT_VERSION < QT_VERSION_CHECK(5, 12, 0)
|
||||||
# include "../vmisc/backport/qscopeguard.h"
|
#include "../vmisc/backport/qscopeguard.h"
|
||||||
#else
|
#else
|
||||||
# include <QScopeGuard>
|
#include <QScopeGuard>
|
||||||
#endif
|
#endif
|
||||||
# include "../vmisc/appimage.h"
|
#include "../vmisc/appimage.h"
|
||||||
#endif // defined(APPIMAGE) && defined(Q_OS_LINUX)
|
#endif // defined(APPIMAGE) && defined(Q_OS_LINUX)
|
||||||
|
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||||
|
@ -54,19 +55,23 @@ auto main(int argc, char *argv[]) -> int
|
||||||
#if defined(APPIMAGE) && defined(Q_OS_LINUX)
|
#if defined(APPIMAGE) && defined(Q_OS_LINUX)
|
||||||
/* Fix path to ICU_DATA when run AppImage.*/
|
/* Fix path to ICU_DATA when run AppImage.*/
|
||||||
char *exe_dir = IcuDataPath("/../share/icu");
|
char *exe_dir = IcuDataPath("/../share/icu");
|
||||||
auto FreeMemory = qScopeGuard([exe_dir] {free(exe_dir);});
|
auto FreeMemory = qScopeGuard([exe_dir] { free(exe_dir); });
|
||||||
#endif // defined(APPIMAGE) && defined(Q_OS_LINUX)
|
#endif // defined(APPIMAGE) && defined(Q_OS_LINUX)
|
||||||
|
|
||||||
Q_INIT_RESOURCE(cursor); // NOLINT
|
Q_INIT_RESOURCE(cursor); // NOLINT
|
||||||
Q_INIT_RESOURCE(icon); // NOLINT
|
Q_INIT_RESOURCE(icon); // NOLINT
|
||||||
Q_INIT_RESOURCE(schema); // NOLINT
|
Q_INIT_RESOURCE(schema); // NOLINT
|
||||||
Q_INIT_RESOURCE(theme); // NOLINT
|
Q_INIT_RESOURCE(flags); // NOLINT
|
||||||
Q_INIT_RESOURCE(flags); // NOLINT
|
Q_INIT_RESOURCE(icons); // NOLINT
|
||||||
Q_INIT_RESOURCE(icons); // NOLINT
|
|
||||||
Q_INIT_RESOURCE(toolicon); // NOLINT
|
Q_INIT_RESOURCE(toolicon); // NOLINT
|
||||||
Q_INIT_RESOURCE(style); // NOLINT
|
Q_INIT_RESOURCE(breeze); // NOLINT
|
||||||
|
#if defined(Q_OS_MACX)
|
||||||
|
Q_INIT_RESOURCE(mac_theme); // NOLINT
|
||||||
|
#else
|
||||||
|
Q_INIT_RESOURCE(win_theme); // NOLINT
|
||||||
|
#endif
|
||||||
|
|
||||||
QT_REQUIRE_VERSION(argc, argv, "5.4.0")// clazy:exclude=qstring-arg,qstring-allocations NOLINT
|
QT_REQUIRE_VERSION(argc, argv, "5.4.0") // clazy:exclude=qstring-arg,qstring-allocations NOLINT
|
||||||
|
|
||||||
#if defined(Q_OS_WIN)
|
#if defined(Q_OS_WIN)
|
||||||
VAbstractApplication::WinAttachConsole();
|
VAbstractApplication::WinAttachConsole();
|
||||||
|
@ -79,9 +84,9 @@ auto main(int argc, char *argv[]) -> int
|
||||||
|
|
||||||
#ifndef Q_OS_MAC // supports natively
|
#ifndef Q_OS_MAC // supports natively
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||||
InitHighDpiScaling(argc, argv);
|
VAbstractApplication::InitHighDpiScaling(argc, argv);
|
||||||
#endif
|
#endif
|
||||||
#endif //Q_OS_MAC
|
#endif // Q_OS_MAC
|
||||||
|
|
||||||
#ifdef Q_OS_MAC
|
#ifdef Q_OS_MAC
|
||||||
#if MACOS_LAYER_BACKING_AFFECTED
|
#if MACOS_LAYER_BACKING_AFFECTED
|
||||||
|
@ -92,7 +97,7 @@ auto main(int argc, char *argv[]) -> int
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||||
XERCES_CPP_NAMESPACE::XMLPlatformUtils::Initialize();
|
XERCES_CPP_NAMESPACE::XMLPlatformUtils::Initialize();
|
||||||
|
|
||||||
auto Terminate = qScopeGuard([](){ XERCES_CPP_NAMESPACE::XMLPlatformUtils::Terminate(); });
|
auto Terminate = qScopeGuard([]() { XERCES_CPP_NAMESPACE::XMLPlatformUtils::Terminate(); });
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
VApplication app(argc, argv);
|
VApplication app(argc, argv);
|
||||||
|
@ -118,7 +123,7 @@ auto main(int argc, char *argv[]) -> int
|
||||||
app.setMainWindow(&w);
|
app.setMainWindow(&w);
|
||||||
|
|
||||||
int msec = 0;
|
int msec = 0;
|
||||||
//Before we load pattern show window.
|
// Before we load pattern show window.
|
||||||
if (VApplication::IsGUIMode())
|
if (VApplication::IsGUIMode())
|
||||||
{
|
{
|
||||||
w.show();
|
w.show();
|
||||||
|
|
|
@ -54,6 +54,7 @@
|
||||||
#include "../vwidgets/vwidgetpopup.h"
|
#include "../vwidgets/vwidgetpopup.h"
|
||||||
#include "core/vapplication.h"
|
#include "core/vapplication.h"
|
||||||
#include "core/vtooloptionspropertybrowser.h"
|
#include "core/vtooloptionspropertybrowser.h"
|
||||||
|
#include "theme/vtheme.h"
|
||||||
#include "ui_mainwindow.h"
|
#include "ui_mainwindow.h"
|
||||||
#include "vabstractapplication.h"
|
#include "vabstractapplication.h"
|
||||||
#include "vsinglelineoutlinechar.h"
|
#include "vsinglelineoutlinechar.h"
|
||||||
|
@ -826,7 +827,7 @@ void MainWindow::SetToolButton(bool checked, Tool t, const QString &cursor, cons
|
||||||
CancelTool();
|
CancelTool();
|
||||||
emit EnableItemMove(false);
|
emit EnableItemMove(false);
|
||||||
m_currentTool = m_lastUsedTool = t;
|
m_currentTool = m_lastUsedTool = t;
|
||||||
auto cursorResource = cursor;
|
auto cursorResource = VTheme::GetResourceName(QStringLiteral("cursor"), cursor);
|
||||||
if (qApp->devicePixelRatio() >= 2) // NOLINT(cppcoreguidelines-pro-type-static-cast-downcast)
|
if (qApp->devicePixelRatio() >= 2) // NOLINT(cppcoreguidelines-pro-type-static-cast-downcast)
|
||||||
{
|
{
|
||||||
// Try to load HiDPI versions of the cursors if availible
|
// Try to load HiDPI versions of the cursors if availible
|
||||||
|
@ -1030,7 +1031,7 @@ template <typename DrawTool> void MainWindow::ApplyDetailsDialog()
|
||||||
void MainWindow::ToolEndLine(bool checked)
|
void MainWindow::ToolEndLine(bool checked)
|
||||||
{
|
{
|
||||||
ToolSelectPointByRelease();
|
ToolSelectPointByRelease();
|
||||||
SetToolButtonWithApply<DialogEndLine>(checked, Tool::EndLine, QStringLiteral(":/cursor/endline_cursor.png"),
|
SetToolButtonWithApply<DialogEndLine>(checked, Tool::EndLine, QStringLiteral("segment_cursor.png"),
|
||||||
tr("Select point"), &MainWindow::ClosedDrawDialogWithApply<VToolEndLine>,
|
tr("Select point"), &MainWindow::ClosedDrawDialogWithApply<VToolEndLine>,
|
||||||
&MainWindow::ApplyDrawDialog<VToolEndLine>);
|
&MainWindow::ApplyDrawDialog<VToolEndLine>);
|
||||||
}
|
}
|
||||||
|
@ -1043,8 +1044,8 @@ void MainWindow::ToolEndLine(bool checked)
|
||||||
void MainWindow::ToolLine(bool checked)
|
void MainWindow::ToolLine(bool checked)
|
||||||
{
|
{
|
||||||
ToolSelectPointByRelease();
|
ToolSelectPointByRelease();
|
||||||
SetToolButtonWithApply<DialogLine>(checked, Tool::Line, QStringLiteral(":/cursor/line_cursor.png"),
|
SetToolButtonWithApply<DialogLine>(checked, Tool::Line, QStringLiteral("line_cursor.png"), tr("Select first point"),
|
||||||
tr("Select first point"), &MainWindow::ClosedDrawDialogWithApply<VToolLine>,
|
&MainWindow::ClosedDrawDialogWithApply<VToolLine>,
|
||||||
&MainWindow::ApplyDrawDialog<VToolLine>);
|
&MainWindow::ApplyDrawDialog<VToolLine>);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1056,7 +1057,7 @@ void MainWindow::ToolLine(bool checked)
|
||||||
void MainWindow::ToolAlongLine(bool checked)
|
void MainWindow::ToolAlongLine(bool checked)
|
||||||
{
|
{
|
||||||
ToolSelectPointByRelease();
|
ToolSelectPointByRelease();
|
||||||
SetToolButtonWithApply<DialogAlongLine>(checked, Tool::AlongLine, QStringLiteral(":/cursor/alongline_cursor.png"),
|
SetToolButtonWithApply<DialogAlongLine>(checked, Tool::AlongLine, QStringLiteral("along_line_cursor.png"),
|
||||||
tr("Select point"), &MainWindow::ClosedDrawDialogWithApply<VToolAlongLine>,
|
tr("Select point"), &MainWindow::ClosedDrawDialogWithApply<VToolAlongLine>,
|
||||||
&MainWindow::ApplyDrawDialog<VToolAlongLine>);
|
&MainWindow::ApplyDrawDialog<VToolAlongLine>);
|
||||||
}
|
}
|
||||||
|
@ -1066,7 +1067,7 @@ void MainWindow::ToolMidpoint(bool checked)
|
||||||
{
|
{
|
||||||
ToolSelectPointByRelease();
|
ToolSelectPointByRelease();
|
||||||
// Reuse DialogAlongLine and VToolAlongLine but with different cursor
|
// Reuse DialogAlongLine and VToolAlongLine but with different cursor
|
||||||
SetToolButtonWithApply<DialogAlongLine>(checked, Tool::Midpoint, QStringLiteral(":/cursor/midpoint_cursor.png"),
|
SetToolButtonWithApply<DialogAlongLine>(checked, Tool::Midpoint, QStringLiteral("midpoint_cursor.png"),
|
||||||
tr("Select point"), &MainWindow::ClosedDrawDialogWithApply<VToolAlongLine>,
|
tr("Select point"), &MainWindow::ClosedDrawDialogWithApply<VToolAlongLine>,
|
||||||
&MainWindow::ApplyDrawDialog<VToolAlongLine>);
|
&MainWindow::ApplyDrawDialog<VToolAlongLine>);
|
||||||
}
|
}
|
||||||
|
@ -1080,7 +1081,7 @@ void MainWindow::ToolShoulderPoint(bool checked)
|
||||||
{
|
{
|
||||||
ToolSelectPointByRelease();
|
ToolSelectPointByRelease();
|
||||||
SetToolButtonWithApply<DialogShoulderPoint>(
|
SetToolButtonWithApply<DialogShoulderPoint>(
|
||||||
checked, Tool::ShoulderPoint, QStringLiteral(":/cursor/shoulder_cursor.png"), tr("Select point"),
|
checked, Tool::ShoulderPoint, QStringLiteral("shoulder_cursor.png"), tr("Select point"),
|
||||||
&MainWindow::ClosedDrawDialogWithApply<VToolShoulderPoint>, &MainWindow::ApplyDrawDialog<VToolShoulderPoint>);
|
&MainWindow::ClosedDrawDialogWithApply<VToolShoulderPoint>, &MainWindow::ApplyDrawDialog<VToolShoulderPoint>);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1093,7 +1094,7 @@ void MainWindow::ToolNormal(bool checked)
|
||||||
{
|
{
|
||||||
ToolSelectPointByRelease();
|
ToolSelectPointByRelease();
|
||||||
SetToolButtonWithApply<DialogNormal>(
|
SetToolButtonWithApply<DialogNormal>(
|
||||||
checked, Tool::Normal, QStringLiteral(":/cursor/normal_cursor.png"), tr("Select first point of line"),
|
checked, Tool::Normal, QStringLiteral("normal_cursor.png"), tr("Select first point of line"),
|
||||||
&MainWindow::ClosedDrawDialogWithApply<VToolNormal>, &MainWindow::ApplyDrawDialog<VToolNormal>);
|
&MainWindow::ClosedDrawDialogWithApply<VToolNormal>, &MainWindow::ApplyDrawDialog<VToolNormal>);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1106,7 +1107,7 @@ void MainWindow::ToolBisector(bool checked)
|
||||||
{
|
{
|
||||||
ToolSelectPointByRelease();
|
ToolSelectPointByRelease();
|
||||||
SetToolButtonWithApply<DialogBisector>(
|
SetToolButtonWithApply<DialogBisector>(
|
||||||
checked, Tool::Bisector, QStringLiteral(":/cursor/bisector_cursor.png"), tr("Select first point of angle"),
|
checked, Tool::Bisector, QStringLiteral("bisector_cursor.png"), tr("Select first point of angle"),
|
||||||
&MainWindow::ClosedDrawDialogWithApply<VToolBisector>, &MainWindow::ApplyDrawDialog<VToolBisector>);
|
&MainWindow::ClosedDrawDialogWithApply<VToolBisector>, &MainWindow::ApplyDrawDialog<VToolBisector>);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1119,9 +1120,8 @@ void MainWindow::ToolLineIntersect(bool checked)
|
||||||
{
|
{
|
||||||
ToolSelectPointByRelease();
|
ToolSelectPointByRelease();
|
||||||
SetToolButtonWithApply<DialogLineIntersect>(
|
SetToolButtonWithApply<DialogLineIntersect>(
|
||||||
checked, Tool::LineIntersect, QStringLiteral(":/cursor/intersect_cursor.png"),
|
checked, Tool::LineIntersect, QStringLiteral("intersect_cursor.png"), tr("Select first point of first line"),
|
||||||
tr("Select first point of first line"), &MainWindow::ClosedDrawDialogWithApply<VToolLineIntersect>,
|
&MainWindow::ClosedDrawDialogWithApply<VToolLineIntersect>, &MainWindow::ApplyDrawDialog<VToolLineIntersect>);
|
||||||
&MainWindow::ApplyDrawDialog<VToolLineIntersect>);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -1133,7 +1133,7 @@ void MainWindow::ToolSpline(bool checked)
|
||||||
{
|
{
|
||||||
ToolSelectPointByPress();
|
ToolSelectPointByPress();
|
||||||
SetToolButtonWithApply<DialogSpline>(
|
SetToolButtonWithApply<DialogSpline>(
|
||||||
checked, Tool::Spline, QStringLiteral(":/cursor/spline_cursor.png"), tr("Select first point curve"),
|
checked, Tool::Spline, QStringLiteral("spline_cursor.png"), tr("Select first point curve"),
|
||||||
&MainWindow::ClosedDrawDialogWithApply<VToolSpline>, &MainWindow::ApplyDrawDialog<VToolSpline>);
|
&MainWindow::ClosedDrawDialogWithApply<VToolSpline>, &MainWindow::ApplyDrawDialog<VToolSpline>);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1142,7 +1142,7 @@ void MainWindow::ToolCubicBezier(bool checked)
|
||||||
{
|
{
|
||||||
ToolSelectPointByRelease();
|
ToolSelectPointByRelease();
|
||||||
SetToolButtonWithApply<DialogCubicBezier>(
|
SetToolButtonWithApply<DialogCubicBezier>(
|
||||||
checked, Tool::CubicBezier, QStringLiteral(":/cursor/cubic_bezier_cursor.png"), tr("Select first curve point"),
|
checked, Tool::CubicBezier, QStringLiteral("cubic_bezier_cursor.png"), tr("Select first curve point"),
|
||||||
&MainWindow::ClosedDrawDialogWithApply<VToolCubicBezier>, &MainWindow::ApplyDrawDialog<VToolCubicBezier>);
|
&MainWindow::ClosedDrawDialogWithApply<VToolCubicBezier>, &MainWindow::ApplyDrawDialog<VToolCubicBezier>);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1155,7 +1155,7 @@ void MainWindow::ToolCutSpline(bool checked)
|
||||||
{
|
{
|
||||||
ToolSelectSpline();
|
ToolSelectSpline();
|
||||||
SetToolButtonWithApply<DialogCutSpline>(
|
SetToolButtonWithApply<DialogCutSpline>(
|
||||||
checked, Tool::CutSpline, QStringLiteral(":/cursor/spline_cut_point_cursor.png"), tr("Select simple curve"),
|
checked, Tool::CutSpline, QStringLiteral("spline_cut_point_cursor.png"), tr("Select simple curve"),
|
||||||
&MainWindow::ClosedDrawDialogWithApply<VToolCutSpline>, &MainWindow::ApplyDrawDialog<VToolCutSpline>);
|
&MainWindow::ClosedDrawDialogWithApply<VToolCutSpline>, &MainWindow::ApplyDrawDialog<VToolCutSpline>);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1168,7 +1168,7 @@ void MainWindow::ToolArc(bool checked)
|
||||||
{
|
{
|
||||||
ToolSelectPointByRelease();
|
ToolSelectPointByRelease();
|
||||||
SetToolButtonWithApply<DialogArc>(
|
SetToolButtonWithApply<DialogArc>(
|
||||||
checked, Tool::Arc, QStringLiteral(":/cursor/arc_cursor.png"), tr("Select point of center of arc"),
|
checked, Tool::Arc, QStringLiteral("arc_cursor.png"), tr("Select point of center of arc"),
|
||||||
&MainWindow::ClosedDrawDialogWithApply<VToolArc>, &MainWindow::ApplyDrawDialog<VToolArc>);
|
&MainWindow::ClosedDrawDialogWithApply<VToolArc>, &MainWindow::ApplyDrawDialog<VToolArc>);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1180,10 +1180,10 @@ void MainWindow::ToolArc(bool checked)
|
||||||
void MainWindow::ToolEllipticalArc(bool checked)
|
void MainWindow::ToolEllipticalArc(bool checked)
|
||||||
{
|
{
|
||||||
ToolSelectPointByRelease();
|
ToolSelectPointByRelease();
|
||||||
SetToolButtonWithApply<DialogEllipticalArc>(
|
SetToolButtonWithApply<DialogEllipticalArc>(checked, Tool::EllipticalArc, QStringLiteral("el_arc_cursor.png"),
|
||||||
checked, Tool::EllipticalArc, QStringLiteral(":/cursor/el_arc_cursor.png"),
|
tr("Select point of center of elliptical arc"),
|
||||||
tr("Select point of center of elliptical arc"), &MainWindow::ClosedDrawDialogWithApply<VToolEllipticalArc>,
|
&MainWindow::ClosedDrawDialogWithApply<VToolEllipticalArc>,
|
||||||
&MainWindow::ApplyDrawDialog<VToolEllipticalArc>);
|
&MainWindow::ApplyDrawDialog<VToolEllipticalArc>);
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -1195,7 +1195,7 @@ void MainWindow::ToolSplinePath(bool checked)
|
||||||
{
|
{
|
||||||
ToolSelectPointByPress();
|
ToolSelectPointByPress();
|
||||||
SetToolButtonWithApply<DialogSplinePath>(
|
SetToolButtonWithApply<DialogSplinePath>(
|
||||||
checked, Tool::SplinePath, QStringLiteral(":/cursor/splinepath_cursor.png"), tr("Select point of curve path"),
|
checked, Tool::SplinePath, QStringLiteral("splinePath_cursor.png"), tr("Select point of curve path"),
|
||||||
&MainWindow::ClosedDrawDialogWithApply<VToolSplinePath>, &MainWindow::ApplyDrawDialog<VToolSplinePath>);
|
&MainWindow::ClosedDrawDialogWithApply<VToolSplinePath>, &MainWindow::ApplyDrawDialog<VToolSplinePath>);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1204,7 +1204,7 @@ void MainWindow::ToolCubicBezierPath(bool checked)
|
||||||
{
|
{
|
||||||
ToolSelectPointByRelease();
|
ToolSelectPointByRelease();
|
||||||
SetToolButtonWithApply<DialogCubicBezierPath>(
|
SetToolButtonWithApply<DialogCubicBezierPath>(
|
||||||
checked, Tool::CubicBezierPath, QStringLiteral(":/cursor/cubic_bezier_path_cursor.png"),
|
checked, Tool::CubicBezierPath, QStringLiteral("cubic_bezier_path_cursor.png"),
|
||||||
tr("Select point of cubic bezier path"), &MainWindow::ClosedDrawDialogWithApply<VToolCubicBezierPath>,
|
tr("Select point of cubic bezier path"), &MainWindow::ClosedDrawDialogWithApply<VToolCubicBezierPath>,
|
||||||
&MainWindow::ApplyDrawDialog<VToolCubicBezierPath>);
|
&MainWindow::ApplyDrawDialog<VToolCubicBezierPath>);
|
||||||
}
|
}
|
||||||
|
@ -1218,9 +1218,8 @@ void MainWindow::ToolCutSplinePath(bool checked)
|
||||||
{
|
{
|
||||||
ToolSelectSplinePath();
|
ToolSelectSplinePath();
|
||||||
SetToolButtonWithApply<DialogCutSplinePath>(
|
SetToolButtonWithApply<DialogCutSplinePath>(
|
||||||
checked, Tool::CutSplinePath, QStringLiteral(":/cursor/splinepath_cut_point_cursor.png"),
|
checked, Tool::CutSplinePath, QStringLiteral("splinePath_cut_point_cursor.png"), tr("Select curve path"),
|
||||||
tr("Select curve path"), &MainWindow::ClosedDrawDialogWithApply<VToolCutSplinePath>,
|
&MainWindow::ClosedDrawDialogWithApply<VToolCutSplinePath>, &MainWindow::ApplyDrawDialog<VToolCutSplinePath>);
|
||||||
&MainWindow::ApplyDrawDialog<VToolCutSplinePath>);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -1232,9 +1231,8 @@ void MainWindow::ToolPointOfContact(bool checked)
|
||||||
{
|
{
|
||||||
ToolSelectPointByRelease();
|
ToolSelectPointByRelease();
|
||||||
SetToolButtonWithApply<DialogPointOfContact>(
|
SetToolButtonWithApply<DialogPointOfContact>(
|
||||||
checked, Tool::PointOfContact, QStringLiteral(":/cursor/pointcontact_cursor.png"),
|
checked, Tool::PointOfContact, QStringLiteral("point_of_contact_cursor.png"), tr("Select first point of line"),
|
||||||
tr("Select first point of line"), &MainWindow::ClosedDrawDialogWithApply<VToolPointOfContact>,
|
&MainWindow::ClosedDrawDialogWithApply<VToolPointOfContact>, &MainWindow::ApplyDrawDialog<VToolPointOfContact>);
|
||||||
&MainWindow::ApplyDrawDialog<VToolPointOfContact>);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -1245,7 +1243,7 @@ void MainWindow::ToolPointOfContact(bool checked)
|
||||||
void MainWindow::ToolDetail(bool checked)
|
void MainWindow::ToolDetail(bool checked)
|
||||||
{
|
{
|
||||||
ToolSelectAllDrawObjects();
|
ToolSelectAllDrawObjects();
|
||||||
SetToolButtonWithApply<DialogSeamAllowance>(checked, Tool::Piece, QStringLiteral("://cursor/new_detail_cursor.png"),
|
SetToolButtonWithApply<DialogSeamAllowance>(checked, Tool::Piece, QStringLiteral("new_detail_cursor.png"),
|
||||||
tr("Select main path objects clockwise."),
|
tr("Select main path objects clockwise."),
|
||||||
&MainWindow::ClosedDetailsDialogWithApply<VToolSeamAllowance>,
|
&MainWindow::ClosedDetailsDialogWithApply<VToolSeamAllowance>,
|
||||||
&MainWindow::ApplyDetailsDialog<VToolSeamAllowance>);
|
&MainWindow::ApplyDetailsDialog<VToolSeamAllowance>);
|
||||||
|
@ -1256,7 +1254,7 @@ void MainWindow::ToolPiecePath(bool checked)
|
||||||
{
|
{
|
||||||
ToolSelectAllDrawObjects();
|
ToolSelectAllDrawObjects();
|
||||||
SetToolButton<DialogPiecePath>(
|
SetToolButton<DialogPiecePath>(
|
||||||
checked, Tool::PiecePath, QStringLiteral("://cursor/path_cursor.png"),
|
checked, Tool::PiecePath, QStringLiteral("path_cursor.png"),
|
||||||
tr("Select path objects, <b>%1</b> - reverse direction curve").arg(VModifierKey::Shift()),
|
tr("Select path objects, <b>%1</b> - reverse direction curve").arg(VModifierKey::Shift()),
|
||||||
&MainWindow::ClosedDialogPiecePath);
|
&MainWindow::ClosedDialogPiecePath);
|
||||||
}
|
}
|
||||||
|
@ -1265,7 +1263,7 @@ void MainWindow::ToolPiecePath(bool checked)
|
||||||
void MainWindow::ToolPin(bool checked)
|
void MainWindow::ToolPin(bool checked)
|
||||||
{
|
{
|
||||||
ToolSelectPointByRelease();
|
ToolSelectPointByRelease();
|
||||||
SetToolButton<DialogPin>(checked, Tool::Pin, QStringLiteral("://cursor/pin_cursor.png"), tr("Select pin point"),
|
SetToolButton<DialogPin>(checked, Tool::Pin, QStringLiteral("pin_cursor.png"), tr("Select pin point"),
|
||||||
&MainWindow::ClosedDialogPin);
|
&MainWindow::ClosedDialogPin);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1273,7 +1271,7 @@ void MainWindow::ToolPin(bool checked)
|
||||||
void MainWindow::ToolPlaceLabel(bool checked)
|
void MainWindow::ToolPlaceLabel(bool checked)
|
||||||
{
|
{
|
||||||
ToolSelectPointByRelease();
|
ToolSelectPointByRelease();
|
||||||
SetToolButton<DialogPlaceLabel>(checked, Tool::PlaceLabel, QStringLiteral("://cursor/place_label_cursor.png"),
|
SetToolButton<DialogPlaceLabel>(checked, Tool::PlaceLabel, QStringLiteral("place_label_cursor.png"),
|
||||||
tr("Select placelabel center point"), &MainWindow::ClosedDialogPlaceLabel);
|
tr("Select placelabel center point"), &MainWindow::ClosedDialogPlaceLabel);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1285,7 +1283,7 @@ void MainWindow::ToolPlaceLabel(bool checked)
|
||||||
void MainWindow::ToolHeight(bool checked)
|
void MainWindow::ToolHeight(bool checked)
|
||||||
{
|
{
|
||||||
ToolSelectPointByRelease();
|
ToolSelectPointByRelease();
|
||||||
SetToolButtonWithApply<DialogHeight>(checked, Tool::Height, QStringLiteral(":/cursor/height_cursor.png"),
|
SetToolButtonWithApply<DialogHeight>(checked, Tool::Height, QStringLiteral("height_cursor.png"),
|
||||||
tr("Select base point"), &MainWindow::ClosedDrawDialogWithApply<VToolHeight>,
|
tr("Select base point"), &MainWindow::ClosedDrawDialogWithApply<VToolHeight>,
|
||||||
&MainWindow::ApplyDrawDialog<VToolHeight>);
|
&MainWindow::ApplyDrawDialog<VToolHeight>);
|
||||||
}
|
}
|
||||||
|
@ -1299,7 +1297,7 @@ void MainWindow::ToolTriangle(bool checked)
|
||||||
{
|
{
|
||||||
ToolSelectPointByRelease();
|
ToolSelectPointByRelease();
|
||||||
SetToolButtonWithApply<DialogTriangle>(
|
SetToolButtonWithApply<DialogTriangle>(
|
||||||
checked, Tool::Triangle, QStringLiteral(":/cursor/triangle_cursor.png"), tr("Select first point of axis"),
|
checked, Tool::Triangle, QStringLiteral("triangle_cursor.png"), tr("Select first point of axis"),
|
||||||
&MainWindow::ClosedDrawDialogWithApply<VToolTriangle>, &MainWindow::ApplyDrawDialog<VToolTriangle>);
|
&MainWindow::ClosedDrawDialogWithApply<VToolTriangle>, &MainWindow::ApplyDrawDialog<VToolTriangle>);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1312,7 +1310,7 @@ void MainWindow::ToolPointOfIntersection(bool checked)
|
||||||
{
|
{
|
||||||
ToolSelectPointByRelease();
|
ToolSelectPointByRelease();
|
||||||
SetToolButtonWithApply<DialogPointOfIntersection>(
|
SetToolButtonWithApply<DialogPointOfIntersection>(
|
||||||
checked, Tool::PointOfIntersection, QStringLiteral(":/cursor/pointofintersect_cursor.png"),
|
checked, Tool::PointOfIntersection, QStringLiteral("point_of_intersection_cursor.png"),
|
||||||
tr("Select point for X value (vertical)"), &MainWindow::ClosedDrawDialogWithApply<VToolPointOfIntersection>,
|
tr("Select point for X value (vertical)"), &MainWindow::ClosedDrawDialogWithApply<VToolPointOfIntersection>,
|
||||||
&MainWindow::ApplyDrawDialog<VToolPointOfIntersection>);
|
&MainWindow::ApplyDrawDialog<VToolPointOfIntersection>);
|
||||||
}
|
}
|
||||||
|
@ -1325,7 +1323,7 @@ void MainWindow::ToolPointOfIntersection(bool checked)
|
||||||
void MainWindow::ToolUnionDetails(bool checked)
|
void MainWindow::ToolUnionDetails(bool checked)
|
||||||
{
|
{
|
||||||
ToolSelectDetail();
|
ToolSelectDetail();
|
||||||
SetToolButton<DialogUnionDetails>(checked, Tool::UnionDetails, QStringLiteral(":/cursor/union_cursor.png"),
|
SetToolButton<DialogUnionDetails>(checked, Tool::UnionDetails, QStringLiteral("union_cursor.png"),
|
||||||
tr("Select detail"), &MainWindow::ClosedDialogUnionDetails);
|
tr("Select detail"), &MainWindow::ClosedDialogUnionDetails);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1343,9 +1341,8 @@ void MainWindow::ClosedDialogUnionDetails(int result)
|
||||||
void MainWindow::ToolDuplicateDetail(bool checked)
|
void MainWindow::ToolDuplicateDetail(bool checked)
|
||||||
{
|
{
|
||||||
ToolSelectDetail();
|
ToolSelectDetail();
|
||||||
SetToolButton<DialogDuplicateDetail>(checked, Tool::DuplicateDetail,
|
SetToolButton<DialogDuplicateDetail>(checked, Tool::DuplicateDetail, QStringLiteral("duplicate_detail_cursor.png"),
|
||||||
QStringLiteral(":/cursor/duplicate_detail_cursor.png"), tr("Select detail"),
|
tr("Select detail"), &MainWindow::ClosedDialogDuplicateDetail);
|
||||||
&MainWindow::ClosedDialogDuplicateDetail);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -1371,7 +1368,7 @@ void MainWindow::ToolGroup(bool checked)
|
||||||
const QString tooltip = tr("Select one or more objects, hold <b>%1</b> - for multiple selection, "
|
const QString tooltip = tr("Select one or more objects, hold <b>%1</b> - for multiple selection, "
|
||||||
"<b>%2</b> - finish creation")
|
"<b>%2</b> - finish creation")
|
||||||
.arg(VModifierKey::Control(), VModifierKey::EnterKey());
|
.arg(VModifierKey::Control(), VModifierKey::EnterKey());
|
||||||
SetToolButton<DialogGroup>(checked, Tool::Group, QStringLiteral(":/cursor/group_plus_cursor.png"), tooltip,
|
SetToolButton<DialogGroup>(checked, Tool::Group, QStringLiteral("group_plus_cursor.png"), tooltip,
|
||||||
&MainWindow::ClosedDialogGroup);
|
&MainWindow::ClosedDialogGroup);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1382,8 +1379,8 @@ void MainWindow::ToolRotation(bool checked)
|
||||||
const QString tooltip = tr("Select one or more objects, hold <b>%1</b> - for multiple selection, "
|
const QString tooltip = tr("Select one or more objects, hold <b>%1</b> - for multiple selection, "
|
||||||
"<b>%2</b> - confirm selection")
|
"<b>%2</b> - confirm selection")
|
||||||
.arg(VModifierKey::Control(), VModifierKey::EnterKey());
|
.arg(VModifierKey::Control(), VModifierKey::EnterKey());
|
||||||
SetToolButtonWithApply<DialogRotation>(checked, Tool::Rotation, QStringLiteral(":/cursor/rotation_cursor.png"),
|
SetToolButtonWithApply<DialogRotation>(checked, Tool::Rotation, QStringLiteral("rotation_cursor.png"), tooltip,
|
||||||
tooltip, &MainWindow::ClosedDrawDialogWithApply<VToolRotation>,
|
&MainWindow::ClosedDrawDialogWithApply<VToolRotation>,
|
||||||
&MainWindow::ApplyDrawDialog<VToolRotation>);
|
&MainWindow::ApplyDrawDialog<VToolRotation>);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1395,7 +1392,7 @@ void MainWindow::ToolFlippingByLine(bool checked)
|
||||||
"<b>%2</b> - confirm selection")
|
"<b>%2</b> - confirm selection")
|
||||||
.arg(VModifierKey::Control(), VModifierKey::EnterKey());
|
.arg(VModifierKey::Control(), VModifierKey::EnterKey());
|
||||||
SetToolButtonWithApply<DialogFlippingByLine>(
|
SetToolButtonWithApply<DialogFlippingByLine>(
|
||||||
checked, Tool::FlippingByLine, QStringLiteral(":/cursor/flipping_line_cursor.png"), tooltip,
|
checked, Tool::FlippingByLine, QStringLiteral("flipping_line_cursor.png"), tooltip,
|
||||||
&MainWindow::ClosedDrawDialogWithApply<VToolFlippingByLine>, &MainWindow::ApplyDrawDialog<VToolFlippingByLine>);
|
&MainWindow::ClosedDrawDialogWithApply<VToolFlippingByLine>, &MainWindow::ApplyDrawDialog<VToolFlippingByLine>);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1407,7 +1404,7 @@ void MainWindow::ToolFlippingByAxis(bool checked)
|
||||||
"<b>%2</b> - confirm selection")
|
"<b>%2</b> - confirm selection")
|
||||||
.arg(VModifierKey::Control(), VModifierKey::EnterKey());
|
.arg(VModifierKey::Control(), VModifierKey::EnterKey());
|
||||||
SetToolButtonWithApply<DialogFlippingByAxis>(
|
SetToolButtonWithApply<DialogFlippingByAxis>(
|
||||||
checked, Tool::FlippingByAxis, QStringLiteral(":/cursor/flipping_axis_cursor.png"), tooltip,
|
checked, Tool::FlippingByAxis, QStringLiteral("flipping_axis_cursor.png"), tooltip,
|
||||||
&MainWindow::ClosedDrawDialogWithApply<VToolFlippingByAxis>, &MainWindow::ApplyDrawDialog<VToolFlippingByAxis>);
|
&MainWindow::ClosedDrawDialogWithApply<VToolFlippingByAxis>, &MainWindow::ApplyDrawDialog<VToolFlippingByAxis>);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1418,7 +1415,7 @@ void MainWindow::ToolMove(bool checked)
|
||||||
const QString tooltip = tr("Select one or more objects, hold <b>%1</b> - for multiple selection, "
|
const QString tooltip = tr("Select one or more objects, hold <b>%1</b> - for multiple selection, "
|
||||||
"<b>%2</b> - confirm selection")
|
"<b>%2</b> - confirm selection")
|
||||||
.arg(VModifierKey::Control(), VModifierKey::EnterKey());
|
.arg(VModifierKey::Control(), VModifierKey::EnterKey());
|
||||||
SetToolButtonWithApply<DialogMove>(checked, Tool::Move, QStringLiteral(":/cursor/move_cursor.png"), tooltip,
|
SetToolButtonWithApply<DialogMove>(checked, Tool::Move, QStringLiteral("move_cursor.png"), tooltip,
|
||||||
&MainWindow::ClosedDrawDialogWithApply<VToolMove>,
|
&MainWindow::ClosedDrawDialogWithApply<VToolMove>,
|
||||||
&MainWindow::ApplyDrawDialog<VToolMove>);
|
&MainWindow::ApplyDrawDialog<VToolMove>);
|
||||||
}
|
}
|
||||||
|
@ -1572,8 +1569,8 @@ void MainWindow::RemoveBackgroundImage(const QUuid &id)
|
||||||
void MainWindow::ToolCutArc(bool checked)
|
void MainWindow::ToolCutArc(bool checked)
|
||||||
{
|
{
|
||||||
ToolSelectArc();
|
ToolSelectArc();
|
||||||
SetToolButtonWithApply<DialogCutArc>(checked, Tool::CutArc, QStringLiteral(":/cursor/arc_cut_cursor.png"),
|
SetToolButtonWithApply<DialogCutArc>(checked, Tool::CutArc, QStringLiteral("arc_cut_cursor.png"), tr("Select arc"),
|
||||||
tr("Select arc"), &MainWindow::ClosedDrawDialogWithApply<VToolCutArc>,
|
&MainWindow::ClosedDrawDialogWithApply<VToolCutArc>,
|
||||||
&MainWindow::ApplyDrawDialog<VToolCutArc>);
|
&MainWindow::ApplyDrawDialog<VToolCutArc>);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1582,7 +1579,7 @@ void MainWindow::ToolLineIntersectAxis(bool checked)
|
||||||
{
|
{
|
||||||
ToolSelectPointByRelease();
|
ToolSelectPointByRelease();
|
||||||
SetToolButtonWithApply<DialogLineIntersectAxis>(
|
SetToolButtonWithApply<DialogLineIntersectAxis>(
|
||||||
checked, Tool::LineIntersectAxis, QStringLiteral(":/cursor/line_intersect_axis_cursor.png"),
|
checked, Tool::LineIntersectAxis, QStringLiteral("line_intersect_axis_cursor.png"),
|
||||||
tr("Select first point of line"), &MainWindow::ClosedDrawDialogWithApply<VToolLineIntersectAxis>,
|
tr("Select first point of line"), &MainWindow::ClosedDrawDialogWithApply<VToolLineIntersectAxis>,
|
||||||
&MainWindow::ApplyDrawDialog<VToolLineIntersectAxis>);
|
&MainWindow::ApplyDrawDialog<VToolLineIntersectAxis>);
|
||||||
}
|
}
|
||||||
|
@ -1592,8 +1589,8 @@ void MainWindow::ToolCurveIntersectAxis(bool checked)
|
||||||
{
|
{
|
||||||
ToolSelectAllDrawObjects();
|
ToolSelectAllDrawObjects();
|
||||||
SetToolButtonWithApply<DialogCurveIntersectAxis>(
|
SetToolButtonWithApply<DialogCurveIntersectAxis>(
|
||||||
checked, Tool::CurveIntersectAxis, QStringLiteral(":/cursor/curve_intersect_axis_cursor.png"),
|
checked, Tool::CurveIntersectAxis, QStringLiteral("curve_intersect_axis_cursor.png"), tr("Select curve"),
|
||||||
tr("Select curve"), &MainWindow::ClosedDrawDialogWithApply<VToolCurveIntersectAxis>,
|
&MainWindow::ClosedDrawDialogWithApply<VToolCurveIntersectAxis>,
|
||||||
&MainWindow::ApplyDrawDialog<VToolCurveIntersectAxis>);
|
&MainWindow::ApplyDrawDialog<VToolCurveIntersectAxis>);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1602,10 +1599,10 @@ void MainWindow::ToolArcIntersectAxis(bool checked)
|
||||||
{
|
{
|
||||||
ToolSelectAllDrawObjects();
|
ToolSelectAllDrawObjects();
|
||||||
// Reuse ToolCurveIntersectAxis but with different cursor and tool tip
|
// Reuse ToolCurveIntersectAxis but with different cursor and tool tip
|
||||||
SetToolButtonWithApply<DialogCurveIntersectAxis>(
|
SetToolButtonWithApply<DialogCurveIntersectAxis>(checked, Tool::ArcIntersectAxis,
|
||||||
checked, Tool::ArcIntersectAxis, QStringLiteral(":/cursor/arc_intersect_axis_cursor.png"), tr("Select arc"),
|
QStringLiteral("arc_intersect_axis_cursor.png"), tr("Select arc"),
|
||||||
&MainWindow::ClosedDrawDialogWithApply<VToolCurveIntersectAxis>,
|
&MainWindow::ClosedDrawDialogWithApply<VToolCurveIntersectAxis>,
|
||||||
&MainWindow::ApplyDrawDialog<VToolCurveIntersectAxis>);
|
&MainWindow::ApplyDrawDialog<VToolCurveIntersectAxis>);
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -1613,7 +1610,7 @@ void MainWindow::ToolPointOfIntersectionArcs(bool checked)
|
||||||
{
|
{
|
||||||
ToolSelectArc();
|
ToolSelectArc();
|
||||||
SetToolButtonWithApply<DialogPointOfIntersectionArcs>(
|
SetToolButtonWithApply<DialogPointOfIntersectionArcs>(
|
||||||
checked, Tool::PointOfIntersectionArcs, QStringLiteral("://cursor/point_of_intersection_arcs.png"),
|
checked, Tool::PointOfIntersectionArcs, QStringLiteral("point_of_intersection_arcs.png"),
|
||||||
tr("Select first an arc"), &MainWindow::ClosedDrawDialogWithApply<VToolPointOfIntersectionArcs>,
|
tr("Select first an arc"), &MainWindow::ClosedDrawDialogWithApply<VToolPointOfIntersectionArcs>,
|
||||||
&MainWindow::ApplyDrawDialog<VToolPointOfIntersectionArcs>);
|
&MainWindow::ApplyDrawDialog<VToolPointOfIntersectionArcs>);
|
||||||
}
|
}
|
||||||
|
@ -1623,7 +1620,7 @@ void MainWindow::ToolPointOfIntersectionCircles(bool checked)
|
||||||
{
|
{
|
||||||
ToolSelectPointByRelease();
|
ToolSelectPointByRelease();
|
||||||
SetToolButtonWithApply<DialogPointOfIntersectionCircles>(
|
SetToolButtonWithApply<DialogPointOfIntersectionCircles>(
|
||||||
checked, Tool::PointOfIntersectionCircles, QStringLiteral("://cursor/point_of_intersection_circles.png"),
|
checked, Tool::PointOfIntersectionCircles, QStringLiteral("point_of_intersection_circles.png"),
|
||||||
tr("Select first circle center"), &MainWindow::ClosedDrawDialogWithApply<VToolPointOfIntersectionCircles>,
|
tr("Select first circle center"), &MainWindow::ClosedDrawDialogWithApply<VToolPointOfIntersectionCircles>,
|
||||||
&MainWindow::ApplyDrawDialog<VToolPointOfIntersectionCircles>);
|
&MainWindow::ApplyDrawDialog<VToolPointOfIntersectionCircles>);
|
||||||
}
|
}
|
||||||
|
@ -1633,7 +1630,7 @@ void MainWindow::ToolPointOfIntersectionCurves(bool checked)
|
||||||
{
|
{
|
||||||
ToolSelectCurve();
|
ToolSelectCurve();
|
||||||
SetToolButtonWithApply<DialogPointOfIntersectionCurves>(
|
SetToolButtonWithApply<DialogPointOfIntersectionCurves>(
|
||||||
checked, Tool::PointOfIntersectionCurves, QStringLiteral("://cursor/intersection_curves_cursor.png"),
|
checked, Tool::PointOfIntersectionCurves, QStringLiteral("intersection_curves_cursor.png"),
|
||||||
tr("Select first curve"), &MainWindow::ClosedDrawDialogWithApply<VToolPointOfIntersectionCurves>,
|
tr("Select first curve"), &MainWindow::ClosedDrawDialogWithApply<VToolPointOfIntersectionCurves>,
|
||||||
&MainWindow::ApplyDrawDialog<VToolPointOfIntersectionCurves>);
|
&MainWindow::ApplyDrawDialog<VToolPointOfIntersectionCurves>);
|
||||||
}
|
}
|
||||||
|
@ -1643,7 +1640,7 @@ void MainWindow::ToolPointFromCircleAndTangent(bool checked)
|
||||||
{
|
{
|
||||||
ToolSelectPointByRelease();
|
ToolSelectPointByRelease();
|
||||||
SetToolButtonWithApply<DialogPointFromCircleAndTangent>(
|
SetToolButtonWithApply<DialogPointFromCircleAndTangent>(
|
||||||
checked, Tool::PointFromCircleAndTangent, QStringLiteral("://cursor/point_from_circle_and_tangent_cursor.png"),
|
checked, Tool::PointFromCircleAndTangent, QStringLiteral("point_from_circle_and_tangent_cursor.png"),
|
||||||
tr("Select point on tangent"), &MainWindow::ClosedDrawDialogWithApply<VToolPointFromCircleAndTangent>,
|
tr("Select point on tangent"), &MainWindow::ClosedDrawDialogWithApply<VToolPointFromCircleAndTangent>,
|
||||||
&MainWindow::ApplyDrawDialog<VToolPointFromCircleAndTangent>);
|
&MainWindow::ApplyDrawDialog<VToolPointFromCircleAndTangent>);
|
||||||
}
|
}
|
||||||
|
@ -1653,7 +1650,7 @@ void MainWindow::ToolPointFromArcAndTangent(bool checked)
|
||||||
{
|
{
|
||||||
ToolSelectPointArc();
|
ToolSelectPointArc();
|
||||||
SetToolButtonWithApply<DialogPointFromArcAndTangent>(
|
SetToolButtonWithApply<DialogPointFromArcAndTangent>(
|
||||||
checked, Tool::PointFromArcAndTangent, QStringLiteral("://cursor/point_from_arc_and_tangent_cursor.png"),
|
checked, Tool::PointFromArcAndTangent, QStringLiteral("point_from_arc_and_tangent_cursor.png"),
|
||||||
tr("Select point on tangent"), &MainWindow::ClosedDrawDialogWithApply<VToolPointFromArcAndTangent>,
|
tr("Select point on tangent"), &MainWindow::ClosedDrawDialogWithApply<VToolPointFromArcAndTangent>,
|
||||||
&MainWindow::ApplyDrawDialog<VToolPointFromArcAndTangent>);
|
&MainWindow::ApplyDrawDialog<VToolPointFromArcAndTangent>);
|
||||||
}
|
}
|
||||||
|
@ -1663,7 +1660,7 @@ void MainWindow::ToolArcWithLength(bool checked)
|
||||||
{
|
{
|
||||||
ToolSelectPointByRelease();
|
ToolSelectPointByRelease();
|
||||||
SetToolButtonWithApply<DialogArcWithLength>(
|
SetToolButtonWithApply<DialogArcWithLength>(
|
||||||
checked, Tool::ArcWithLength, QStringLiteral("://cursor/arc_with_length_cursor.png"),
|
checked, Tool::ArcWithLength, QStringLiteral("arc_with_length_cursor.png"),
|
||||||
tr("Select point of the center of the arc"), &MainWindow::ClosedDrawDialogWithApply<VToolArcWithLength>,
|
tr("Select point of the center of the arc"), &MainWindow::ClosedDrawDialogWithApply<VToolArcWithLength>,
|
||||||
&MainWindow::ApplyDrawDialog<VToolArcWithLength>);
|
&MainWindow::ApplyDrawDialog<VToolArcWithLength>);
|
||||||
}
|
}
|
||||||
|
@ -1672,10 +1669,9 @@ void MainWindow::ToolArcWithLength(bool checked)
|
||||||
void MainWindow::ToolTrueDarts(bool checked)
|
void MainWindow::ToolTrueDarts(bool checked)
|
||||||
{
|
{
|
||||||
ToolSelectPointByRelease();
|
ToolSelectPointByRelease();
|
||||||
SetToolButtonWithApply<DialogTrueDarts>(checked, Tool::TrueDarts, QStringLiteral("://cursor/true_darts_cursor.png"),
|
SetToolButtonWithApply<DialogTrueDarts>(
|
||||||
tr("Select the first base line point"),
|
checked, Tool::TrueDarts, QStringLiteral("true_darts_cursor.png"), tr("Select the first base line point"),
|
||||||
&MainWindow::ClosedDrawDialogWithApply<VToolTrueDarts>,
|
&MainWindow::ClosedDrawDialogWithApply<VToolTrueDarts>, &MainWindow::ApplyDrawDialog<VToolTrueDarts>);
|
||||||
&MainWindow::ApplyDrawDialog<VToolTrueDarts>);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -1685,8 +1681,8 @@ void MainWindow::ToolInsertNode(bool checked)
|
||||||
const QString tooltip = tr("Select one or more objects, hold <b>%1</b> - for multiple selection, "
|
const QString tooltip = tr("Select one or more objects, hold <b>%1</b> - for multiple selection, "
|
||||||
"<b>%2</b> - finish creation")
|
"<b>%2</b> - finish creation")
|
||||||
.arg(VModifierKey::Control(), VModifierKey::EnterKey());
|
.arg(VModifierKey::Control(), VModifierKey::EnterKey());
|
||||||
SetToolButton<DialogInsertNode>(checked, Tool::InsertNode, QStringLiteral("://cursor/insert_node_cursor.png"),
|
SetToolButton<DialogInsertNode>(checked, Tool::InsertNode, QStringLiteral("insert_node_cursor.png"), tooltip,
|
||||||
tooltip, &MainWindow::ClosedDialogInsertNode);
|
&MainWindow::ClosedDialogInsertNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -1773,6 +1769,12 @@ void MainWindow::changeEvent(QEvent *event)
|
||||||
UpdateWindowTitle();
|
UpdateWindowTitle();
|
||||||
emit m_sceneDetails->LanguageChanged();
|
emit m_sceneDetails->LanguageChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (event->type() == QEvent::PaletteChange)
|
||||||
|
{
|
||||||
|
SetupDrawToolsIcons();
|
||||||
|
}
|
||||||
|
|
||||||
// remember to call base class implementation
|
// remember to call base class implementation
|
||||||
QMainWindow::changeEvent(event);
|
QMainWindow::changeEvent(event);
|
||||||
}
|
}
|
||||||
|
@ -3040,6 +3042,8 @@ void MainWindow::ToolBarTools()
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void MainWindow::ToolBarDrawTools()
|
void MainWindow::ToolBarDrawTools()
|
||||||
{
|
{
|
||||||
|
SetupDrawToolsIcons();
|
||||||
|
|
||||||
// Point tools
|
// Point tools
|
||||||
{
|
{
|
||||||
auto *linePointToolMenu = new QMenu(this);
|
auto *linePointToolMenu = new QMenu(this);
|
||||||
|
@ -3491,6 +3495,66 @@ void MainWindow::CancelTool()
|
||||||
redoAction->setEnabled(VAbstractApplication::VApp()->getUndoStack()->canRedo());
|
redoAction->setEnabled(VAbstractApplication::VApp()->getUndoStack()->canRedo());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
void MainWindow::SetupDrawToolsIcons()
|
||||||
|
{
|
||||||
|
const QString resource = QStringLiteral("toolicon");
|
||||||
|
|
||||||
|
ui->actionLineTool->setIcon(VTheme::GetIconResource(resource, QStringLiteral("line.png")));
|
||||||
|
ui->actionEndLineTool->setIcon(VTheme::GetIconResource(resource, QStringLiteral("segment.png")));
|
||||||
|
ui->actionAlongLineTool->setIcon(VTheme::GetIconResource(resource, QStringLiteral("along_line.png")));
|
||||||
|
ui->actionMidpointTool->setIcon(VTheme::GetIconResource(resource, QStringLiteral("midpoint.png")));
|
||||||
|
ui->actionNormalTool->setIcon(VTheme::GetIconResource(resource, QStringLiteral("normal.png")));
|
||||||
|
ui->actionBisectorTool->setIcon(VTheme::GetIconResource(resource, QStringLiteral("bisector.png")));
|
||||||
|
ui->actionHeightTool->setIcon(VTheme::GetIconResource(resource, QStringLiteral("height.png")));
|
||||||
|
ui->actionPointOfIntersectionTool->setIcon(
|
||||||
|
VTheme::GetIconResource(resource, QStringLiteral("point_of_intersection.png")));
|
||||||
|
ui->actionLineIntersectTool->setIcon(VTheme::GetIconResource(resource, QStringLiteral("intersect.png")));
|
||||||
|
ui->actionShoulderPointTool->setIcon(VTheme::GetIconResource(resource, QStringLiteral("shoulder.png")));
|
||||||
|
ui->actionTriangleTool->setIcon(VTheme::GetIconResource(resource, QStringLiteral("triangle.png")));
|
||||||
|
ui->actionLineIntersectAxisTool->setIcon(
|
||||||
|
VTheme::GetIconResource(resource, QStringLiteral("line_intersect_axis.png")));
|
||||||
|
ui->actionCurveIntersectAxisTool->setIcon(
|
||||||
|
VTheme::GetIconResource(resource, QStringLiteral("curve_intersect_axis.png")));
|
||||||
|
ui->actionArcIntersectAxisTool->setIcon(
|
||||||
|
VTheme::GetIconResource(resource, QStringLiteral("arc_intersect_axis.png")));
|
||||||
|
ui->actionSplineCutPointTool->setIcon(VTheme::GetIconResource(resource, QStringLiteral("spline_cut_point.png")));
|
||||||
|
ui->actionSplinePathCutPointTool->setIcon(
|
||||||
|
VTheme::GetIconResource(resource, QStringLiteral("splinePath_cut_point.png")));
|
||||||
|
ui->actionArcCutPointTool->setIcon(VTheme::GetIconResource(resource, QStringLiteral("arc_cut.png")));
|
||||||
|
ui->actionIntersectionCurvesTool->setIcon(
|
||||||
|
VTheme::GetIconResource(resource, QStringLiteral("intersection_curves.png")));
|
||||||
|
ui->actionPointOfIntersectionArcsTool->setIcon(
|
||||||
|
VTheme::GetIconResource(resource, QStringLiteral("point_of_intersection_arcs.png")));
|
||||||
|
ui->actionPointOfIntersectionCirclesTool->setIcon(
|
||||||
|
VTheme::GetIconResource(resource, QStringLiteral("point_of_intersection_circles.png")));
|
||||||
|
ui->actionPointFromArcAndTangentTool->setIcon(
|
||||||
|
VTheme::GetIconResource(resource, QStringLiteral("point_from_arc_and_tangent.png")));
|
||||||
|
ui->actionPointFromCircleAndTangentTool->setIcon(
|
||||||
|
VTheme::GetIconResource(resource, QStringLiteral("point_from_circle_and_tangent.png")));
|
||||||
|
ui->actionPointOfContactTool->setIcon(VTheme::GetIconResource(resource, QStringLiteral("point_of_contact.png")));
|
||||||
|
ui->actionSplineTool->setIcon(VTheme::GetIconResource(resource, QStringLiteral("spline.png")));
|
||||||
|
ui->actionCubicBezierTool->setIcon(VTheme::GetIconResource(resource, QStringLiteral("cubic_bezier.png")));
|
||||||
|
ui->actionSplinePathTool->setIcon(VTheme::GetIconResource(resource, QStringLiteral("splinePath.png")));
|
||||||
|
ui->actionCubicBezierPathTool->setIcon(VTheme::GetIconResource(resource, QStringLiteral("cubic_bezier_path.png")));
|
||||||
|
ui->actionArcTool->setIcon(VTheme::GetIconResource(resource, QStringLiteral("arc.png")));
|
||||||
|
ui->actionArcWithLengthTool->setIcon(VTheme::GetIconResource(resource, QStringLiteral("arc_with_length.png")));
|
||||||
|
ui->actionEllipticalArcTool->setIcon(VTheme::GetIconResource(resource, QStringLiteral("el_arc.png")));
|
||||||
|
ui->actionGroupTool->setIcon(VTheme::GetIconResource(resource, QStringLiteral("group_plus.png")));
|
||||||
|
ui->actionFlippingByAxisTool->setIcon(VTheme::GetIconResource(resource, QStringLiteral("flipping_axis.png")));
|
||||||
|
ui->actionFlippingByLineTool->setIcon(VTheme::GetIconResource(resource, QStringLiteral("flipping_line.png")));
|
||||||
|
ui->actionRotationTool->setIcon(VTheme::GetIconResource(resource, QStringLiteral("rotation.png")));
|
||||||
|
ui->actionMoveTool->setIcon(VTheme::GetIconResource(resource, QStringLiteral("move.png")));
|
||||||
|
ui->actionTrueDartsTool->setIcon(VTheme::GetIconResource(resource, QStringLiteral("true_darts.png")));
|
||||||
|
ui->actionNewDetailTool->setIcon(VTheme::GetIconResource(resource, QStringLiteral("new_detail.png")));
|
||||||
|
ui->actionUnionDetailsTool->setIcon(VTheme::GetIconResource(resource, QStringLiteral("union.png")));
|
||||||
|
ui->actionDuplicateDetailTool->setIcon(VTheme::GetIconResource(resource, QStringLiteral("duplicate_detail.png")));
|
||||||
|
ui->actionInternalPathTool->setIcon(VTheme::GetIconResource(resource, QStringLiteral("path.png")));
|
||||||
|
ui->actionPinTool->setIcon(VTheme::GetIconResource(resource, QStringLiteral("pin.png")));
|
||||||
|
ui->actionInsertNodeTool->setIcon(VTheme::GetIconResource(resource, QStringLiteral("insert_node.png")));
|
||||||
|
ui->actionPlaceLabelTool->setIcon(VTheme::GetIconResource(resource, QStringLiteral("place_label.png")));
|
||||||
|
}
|
||||||
|
|
||||||
QT_WARNING_POP
|
QT_WARNING_POP
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -352,6 +352,8 @@ private:
|
||||||
void InitToolButtons();
|
void InitToolButtons();
|
||||||
void CancelTool();
|
void CancelTool();
|
||||||
|
|
||||||
|
void SetupDrawToolsIcons();
|
||||||
|
|
||||||
void SetEnableWidgets(bool enable);
|
void SetEnableWidgets(bool enable);
|
||||||
void SetEnableTool(bool enable);
|
void SetEnableTool(bool enable);
|
||||||
void SetLayoutModeActions();
|
void SetLayoutModeActions();
|
||||||
|
|
|
@ -418,7 +418,7 @@
|
||||||
<string>Clear all messages</string>
|
<string>Clear all messages</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string notr="true">...</string>
|
<string notr="true"/>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../libs/vmisc/share/resources/icon.qrc">
|
<iconset resource="../../libs/vmisc/share/resources/icon.qrc">
|
||||||
|
@ -432,7 +432,7 @@
|
||||||
<string>Auto refresh the list with each parse</string>
|
<string>Auto refresh the list with each parse</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string notr="true">...</string>
|
<string notr="true"/>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset theme="view-refresh">
|
<iconset theme="view-refresh">
|
||||||
|
@ -474,7 +474,7 @@
|
||||||
<string>Zoom in</string>
|
<string>Zoom in</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string notr="true">...</string>
|
<string notr="true"/>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset theme="zoom-in">
|
<iconset theme="zoom-in">
|
||||||
|
@ -488,12 +488,18 @@
|
||||||
<string>Zoom out</string>
|
<string>Zoom out</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string notr="true">...</string>
|
<string notr="true"/>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset theme="zoom-out">
|
<iconset theme="zoom-out">
|
||||||
<normaloff>.</normaloff>.</iconset>
|
<normaloff>.</normaloff>.</iconset>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="iconSize">
|
||||||
|
<size>
|
||||||
|
<width>16</width>
|
||||||
|
<height>16</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
|
@ -543,6 +549,12 @@
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>Tools for creating points</string>
|
<string>Tools for creating points</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="iconSize">
|
||||||
|
<size>
|
||||||
|
<width>24</width>
|
||||||
|
<height>24</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
<attribute name="toolBarArea">
|
<attribute name="toolBarArea">
|
||||||
<enum>LeftToolBarArea</enum>
|
<enum>LeftToolBarArea</enum>
|
||||||
</attribute>
|
</attribute>
|
||||||
|
@ -554,6 +566,12 @@
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>Selecting tools</string>
|
<string>Selecting tools</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="iconSize">
|
||||||
|
<size>
|
||||||
|
<width>24</width>
|
||||||
|
<height>24</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
<property name="toolButtonStyle">
|
<property name="toolButtonStyle">
|
||||||
<enum>Qt::ToolButtonIconOnly</enum>
|
<enum>Qt::ToolButtonIconOnly</enum>
|
||||||
</property>
|
</property>
|
||||||
|
@ -572,6 +590,12 @@
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>Tools for creating segments</string>
|
<string>Tools for creating segments</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="iconSize">
|
||||||
|
<size>
|
||||||
|
<width>24</width>
|
||||||
|
<height>24</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
<attribute name="toolBarArea">
|
<attribute name="toolBarArea">
|
||||||
<enum>LeftToolBarArea</enum>
|
<enum>LeftToolBarArea</enum>
|
||||||
</attribute>
|
</attribute>
|
||||||
|
@ -587,6 +611,12 @@
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>Tools for creating curves</string>
|
<string>Tools for creating curves</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="iconSize">
|
||||||
|
<size>
|
||||||
|
<width>24</width>
|
||||||
|
<height>24</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
<attribute name="toolBarArea">
|
<attribute name="toolBarArea">
|
||||||
<enum>LeftToolBarArea</enum>
|
<enum>LeftToolBarArea</enum>
|
||||||
</attribute>
|
</attribute>
|
||||||
|
@ -598,6 +628,12 @@
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>Operation tools</string>
|
<string>Operation tools</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="iconSize">
|
||||||
|
<size>
|
||||||
|
<width>24</width>
|
||||||
|
<height>24</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
<attribute name="toolBarArea">
|
<attribute name="toolBarArea">
|
||||||
<enum>LeftToolBarArea</enum>
|
<enum>LeftToolBarArea</enum>
|
||||||
</attribute>
|
</attribute>
|
||||||
|
@ -612,6 +648,12 @@
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>Tools for creating detail</string>
|
<string>Tools for creating detail</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="iconSize">
|
||||||
|
<size>
|
||||||
|
<width>24</width>
|
||||||
|
<height>24</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
<attribute name="toolBarArea">
|
<attribute name="toolBarArea">
|
||||||
<enum>LeftToolBarArea</enum>
|
<enum>LeftToolBarArea</enum>
|
||||||
</attribute>
|
</attribute>
|
||||||
|
@ -626,6 +668,12 @@
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="iconSize">
|
||||||
|
<size>
|
||||||
|
<width>24</width>
|
||||||
|
<height>24</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
<attribute name="toolBarArea">
|
<attribute name="toolBarArea">
|
||||||
<enum>LeftToolBarArea</enum>
|
<enum>LeftToolBarArea</enum>
|
||||||
</attribute>
|
</attribute>
|
||||||
|
@ -1726,7 +1774,7 @@
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="share/resources/toolicon.qrc">
|
<iconset resource="share/resources/toolicon.qrc">
|
||||||
<normaloff>:/toolicon/32x32/segment.png</normaloff>:/toolicon/32x32/segment.png</iconset>
|
<normaloff>:/toolicon/light/segment.png</normaloff>:/toolicon/light/segment.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Point at distance and angle</string>
|
<string>Point at distance and angle</string>
|
||||||
|
@ -1744,7 +1792,7 @@
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="share/resources/toolicon.qrc">
|
<iconset resource="share/resources/toolicon.qrc">
|
||||||
<normaloff>:/toolicon/32x32/point_of_intersection_arcs.png</normaloff>:/toolicon/32x32/point_of_intersection_arcs.png</iconset>
|
<normaloff>:/toolicon/light/point_of_intersection_arcs.png</normaloff>:/toolicon/light/point_of_intersection_arcs.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Point of intersection arcs</string>
|
<string>Point of intersection arcs</string>
|
||||||
|
@ -1762,7 +1810,7 @@
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="share/resources/toolicon.qrc">
|
<iconset resource="share/resources/toolicon.qrc">
|
||||||
<normaloff>:/toolicon/32x32/arc_intersect_axis.png</normaloff>:/toolicon/32x32/arc_intersect_axis.png</iconset>
|
<normaloff>:/toolicon/light/arc_intersect_axis.png</normaloff>:/toolicon/light/arc_intersect_axis.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Point of intersection arc and axis</string>
|
<string>Point of intersection arc and axis</string>
|
||||||
|
@ -1780,7 +1828,7 @@
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="share/resources/toolicon.qrc">
|
<iconset resource="share/resources/toolicon.qrc">
|
||||||
<normaloff>:/toolicon/32x32/arc_cut.png</normaloff>:/toolicon/32x32/arc_cut.png</iconset>
|
<normaloff>:/toolicon/light/arc_cut.png</normaloff>:/toolicon/light/arc_cut.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Segment an arc</string>
|
<string>Segment an arc</string>
|
||||||
|
@ -1798,7 +1846,7 @@
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="share/resources/toolicon.qrc">
|
<iconset resource="share/resources/toolicon.qrc">
|
||||||
<normaloff>:/toolicon/32x32/arc.png</normaloff>:/toolicon/32x32/arc.png</iconset>
|
<normaloff>:/toolicon/light/arc.png</normaloff>:/toolicon/light/arc.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Arc</string>
|
<string>Arc</string>
|
||||||
|
@ -1816,7 +1864,7 @@
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="share/resources/toolicon.qrc">
|
<iconset resource="share/resources/toolicon.qrc">
|
||||||
<normaloff>:/toolicon/32x32/curve_intersect_axis.png</normaloff>:/toolicon/32x32/curve_intersect_axis.png</iconset>
|
<normaloff>:/toolicon/light/curve_intersect_axis.png</normaloff>:/toolicon/light/curve_intersect_axis.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Point intersect curve and axis</string>
|
<string>Point intersect curve and axis</string>
|
||||||
|
@ -1834,7 +1882,7 @@
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="share/resources/toolicon.qrc">
|
<iconset resource="share/resources/toolicon.qrc">
|
||||||
<normaloff>:/toolicon/32x32/intersection_curves.png</normaloff>:/toolicon/32x32/intersection_curves.png</iconset>
|
<normaloff>:/toolicon/light/intersection_curves.png</normaloff>:/toolicon/light/intersection_curves.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Point intersection curves</string>
|
<string>Point intersection curves</string>
|
||||||
|
@ -1852,7 +1900,7 @@
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="share/resources/toolicon.qrc">
|
<iconset resource="share/resources/toolicon.qrc">
|
||||||
<normaloff>:/toolicon/32x32/cubic_bezier_path.png</normaloff>:/toolicon/32x32/cubic_bezier_path.png</iconset>
|
<normaloff>:/toolicon/light/cubic_bezier_path.png</normaloff>:/toolicon/light/cubic_bezier_path.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Curved path tool which uses point as control handle</string>
|
<string>Curved path tool which uses point as control handle</string>
|
||||||
|
@ -1870,7 +1918,7 @@
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="share/resources/toolicon.qrc">
|
<iconset resource="share/resources/toolicon.qrc">
|
||||||
<normaloff>:/toolicon/32x32/splinePath_cut_point.png</normaloff>:/toolicon/32x32/splinePath_cut_point.png</iconset>
|
<normaloff>:/toolicon/light/splinePath_cut_point.png</normaloff>:/toolicon/light/splinePath_cut_point.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Segment a curved path</string>
|
<string>Segment a curved path</string>
|
||||||
|
@ -1888,7 +1936,7 @@
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="share/resources/toolicon.qrc">
|
<iconset resource="share/resources/toolicon.qrc">
|
||||||
<normaloff>:/toolicon/32x32/along_line.png</normaloff>:/toolicon/32x32/along_line.png</iconset>
|
<normaloff>:/toolicon/light/along_line.png</normaloff>:/toolicon/light/along_line.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Point at distance along line</string>
|
<string>Point at distance along line</string>
|
||||||
|
@ -1906,7 +1954,7 @@
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="share/resources/toolicon.qrc">
|
<iconset resource="share/resources/toolicon.qrc">
|
||||||
<normaloff>:/toolicon/32x32/normal.png</normaloff>:/toolicon/32x32/normal.png</iconset>
|
<normaloff>:/toolicon/light/normal.png</normaloff>:/toolicon/light/normal.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Point along perpendicular</string>
|
<string>Point along perpendicular</string>
|
||||||
|
@ -1924,7 +1972,7 @@
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="share/resources/toolicon.qrc">
|
<iconset resource="share/resources/toolicon.qrc">
|
||||||
<normaloff>:/toolicon/32x32/bisector.png</normaloff>:/toolicon/32x32/bisector.png</iconset>
|
<normaloff>:/toolicon/light/bisector.png</normaloff>:/toolicon/light/bisector.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Point along bisector</string>
|
<string>Point along bisector</string>
|
||||||
|
@ -1942,7 +1990,7 @@
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="share/resources/toolicon.qrc">
|
<iconset resource="share/resources/toolicon.qrc">
|
||||||
<normaloff>:/toolicon/32x32/shoulder.png</normaloff>:/toolicon/32x32/shoulder.png</iconset>
|
<normaloff>:/toolicon/light/shoulder.png</normaloff>:/toolicon/light/shoulder.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Special point on shoulder</string>
|
<string>Special point on shoulder</string>
|
||||||
|
@ -1960,7 +2008,7 @@
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="share/resources/toolicon.qrc">
|
<iconset resource="share/resources/toolicon.qrc">
|
||||||
<normaloff>:/toolicon/32x32/triangle.png</normaloff>:/toolicon/32x32/triangle.png</iconset>
|
<normaloff>:/toolicon/light/triangle.png</normaloff>:/toolicon/light/triangle.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Triangle tool</string>
|
<string>Triangle tool</string>
|
||||||
|
@ -1978,7 +2026,7 @@
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="share/resources/toolicon.qrc">
|
<iconset resource="share/resources/toolicon.qrc">
|
||||||
<normaloff>:/toolicon/32x32/point_of_intersection.png</normaloff>:/toolicon/32x32/point_of_intersection.png</iconset>
|
<normaloff>:/toolicon/light/point_of_intersection.png</normaloff>:/toolicon/light/point_of_intersection.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Point from X and Y of two other points</string>
|
<string>Point from X and Y of two other points</string>
|
||||||
|
@ -1996,7 +2044,7 @@
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="share/resources/toolicon.qrc">
|
<iconset resource="share/resources/toolicon.qrc">
|
||||||
<normaloff>:/toolicon/32x32/height.png</normaloff>:/toolicon/32x32/height.png</iconset>
|
<normaloff>:/toolicon/light/height.png</normaloff>:/toolicon/light/height.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Perpendicular point along line</string>
|
<string>Perpendicular point along line</string>
|
||||||
|
@ -2014,7 +2062,7 @@
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="share/resources/toolicon.qrc">
|
<iconset resource="share/resources/toolicon.qrc">
|
||||||
<normaloff>:/toolicon/32x32/line_intersect_axis.png</normaloff>:/toolicon/32x32/line_intersect_axis.png</iconset>
|
<normaloff>:/toolicon/light/line_intersect_axis.png</normaloff>:/toolicon/light/line_intersect_axis.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Point intersect line and axis</string>
|
<string>Point intersect line and axis</string>
|
||||||
|
@ -2032,7 +2080,7 @@
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="share/resources/toolicon.qrc">
|
<iconset resource="share/resources/toolicon.qrc">
|
||||||
<normaloff>:/toolicon/32x32/midpoint.png</normaloff>:/toolicon/32x32/midpoint.png</iconset>
|
<normaloff>:/toolicon/light/midpoint.png</normaloff>:/toolicon/light/midpoint.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Midpoint between two points</string>
|
<string>Midpoint between two points</string>
|
||||||
|
@ -2050,7 +2098,7 @@
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="share/resources/toolicon.qrc">
|
<iconset resource="share/resources/toolicon.qrc">
|
||||||
<normaloff>:/toolicon/32x32/intersect.png</normaloff>:/toolicon/32x32/intersect.png</iconset>
|
<normaloff>:/toolicon/light/intersect.png</normaloff>:/toolicon/light/intersect.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Point at line intersection</string>
|
<string>Point at line intersection</string>
|
||||||
|
@ -2068,7 +2116,7 @@
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="share/resources/toolicon.qrc">
|
<iconset resource="share/resources/toolicon.qrc">
|
||||||
<normaloff>:/toolicon/32x32/line.png</normaloff>:/toolicon/32x32/line.png</iconset>
|
<normaloff>:/toolicon/light/line.png</normaloff>:/toolicon/light/line.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Line between points</string>
|
<string>Line between points</string>
|
||||||
|
@ -2086,7 +2134,7 @@
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="share/resources/toolicon.qrc">
|
<iconset resource="share/resources/toolicon.qrc">
|
||||||
<normaloff>:/toolicon/32x32/spline.png</normaloff>:/toolicon/32x32/spline.png</iconset>
|
<normaloff>:/toolicon/light/spline.png</normaloff>:/toolicon/light/spline.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Simple curve</string>
|
<string>Simple curve</string>
|
||||||
|
@ -2104,7 +2152,7 @@
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="share/resources/toolicon.qrc">
|
<iconset resource="share/resources/toolicon.qrc">
|
||||||
<normaloff>:/toolicon/32x32/spline_cut_point.png</normaloff>:/toolicon/32x32/spline_cut_point.png</iconset>
|
<normaloff>:/toolicon/light/spline_cut_point.png</normaloff>:/toolicon/light/spline_cut_point.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Segmenting a simple curve</string>
|
<string>Segmenting a simple curve</string>
|
||||||
|
@ -2122,7 +2170,7 @@
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="share/resources/toolicon.qrc">
|
<iconset resource="share/resources/toolicon.qrc">
|
||||||
<normaloff>:/toolicon/32x32/cubic_bezier.png</normaloff>:/toolicon/32x32/cubic_bezier.png</iconset>
|
<normaloff>:/toolicon/light/cubic_bezier.png</normaloff>:/toolicon/light/cubic_bezier.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Curve tool which uses point as control handle</string>
|
<string>Curve tool which uses point as control handle</string>
|
||||||
|
@ -2140,7 +2188,7 @@
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="share/resources/toolicon.qrc">
|
<iconset resource="share/resources/toolicon.qrc">
|
||||||
<normaloff>:/toolicon/32x32/splinePath.png</normaloff>:/toolicon/32x32/splinePath.png</iconset>
|
<normaloff>:/toolicon/light/splinePath.png</normaloff>:/toolicon/light/splinePath.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Curved path</string>
|
<string>Curved path</string>
|
||||||
|
@ -2158,7 +2206,7 @@
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="share/resources/toolicon.qrc">
|
<iconset resource="share/resources/toolicon.qrc">
|
||||||
<normaloff>:/toolicon/32x32/el_arc.png</normaloff>:/toolicon/32x32/el_arc.png</iconset>
|
<normaloff>:/toolicon/light/el_arc.png</normaloff>:/toolicon/light/el_arc.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Elliptical Arc</string>
|
<string>Elliptical Arc</string>
|
||||||
|
@ -2176,7 +2224,7 @@
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="share/resources/toolicon.qrc">
|
<iconset resource="share/resources/toolicon.qrc">
|
||||||
<normaloff>:/toolicon/32x32/arc_with_length.png</normaloff>:/toolicon/32x32/arc_with_length.png</iconset>
|
<normaloff>:/toolicon/light/arc_with_length.png</normaloff>:/toolicon/light/arc_with_length.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Arc with given length</string>
|
<string>Arc with given length</string>
|
||||||
|
@ -2194,7 +2242,7 @@
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="share/resources/toolicon.qrc">
|
<iconset resource="share/resources/toolicon.qrc">
|
||||||
<normaloff>:/toolicon/32x32/point_of_intersection_circles.png</normaloff>:/toolicon/32x32/point_of_intersection_circles.png</iconset>
|
<normaloff>:/toolicon/light/point_of_intersection_circles.png</normaloff>:/toolicon/light/point_of_intersection_circles.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Point of intersection circles</string>
|
<string>Point of intersection circles</string>
|
||||||
|
@ -2212,7 +2260,7 @@
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="share/resources/toolicon.qrc">
|
<iconset resource="share/resources/toolicon.qrc">
|
||||||
<normaloff>:/toolicon/32x32/point_from_arc_and_tangent.png</normaloff>:/toolicon/32x32/point_from_arc_and_tangent.png</iconset>
|
<normaloff>:/toolicon/light/point_from_arc_and_tangent.png</normaloff>:/toolicon/light/point_from_arc_and_tangent.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Point from arc and tangent</string>
|
<string>Point from arc and tangent</string>
|
||||||
|
@ -2230,7 +2278,7 @@
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="share/resources/toolicon.qrc">
|
<iconset resource="share/resources/toolicon.qrc">
|
||||||
<normaloff>:/toolicon/32x32/point_from_circle_and_tangent.png</normaloff>:/toolicon/32x32/point_from_circle_and_tangent.png</iconset>
|
<normaloff>:/toolicon/light/point_from_circle_and_tangent.png</normaloff>:/toolicon/light/point_from_circle_and_tangent.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Point from circle and tangent</string>
|
<string>Point from circle and tangent</string>
|
||||||
|
@ -2248,7 +2296,7 @@
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="share/resources/toolicon.qrc">
|
<iconset resource="share/resources/toolicon.qrc">
|
||||||
<normaloff>:/toolicon/32x32/point_of_contact.png</normaloff>:/toolicon/32x32/point_of_contact.png</iconset>
|
<normaloff>:/toolicon/light/point_of_contact.png</normaloff>:/toolicon/light/point_of_contact.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Point of intersection circle and segment</string>
|
<string>Point of intersection circle and segment</string>
|
||||||
|
@ -2266,7 +2314,7 @@
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="share/resources/toolicon.qrc">
|
<iconset resource="share/resources/toolicon.qrc">
|
||||||
<normaloff>:/toolicon/32x32/flipping_axis.png</normaloff>:/toolicon/32x32/flipping_axis.png</iconset>
|
<normaloff>:/toolicon/light/flipping_axis.png</normaloff>:/toolicon/light/flipping_axis.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Flipping objects by axis</string>
|
<string>Flipping objects by axis</string>
|
||||||
|
@ -2284,7 +2332,7 @@
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="share/resources/toolicon.qrc">
|
<iconset resource="share/resources/toolicon.qrc">
|
||||||
<normaloff>:/toolicon/32x32/flipping_line.png</normaloff>:/toolicon/32x32/flipping_line.png</iconset>
|
<normaloff>:/toolicon/light/flipping_line.png</normaloff>:/toolicon/light/flipping_line.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Flipping objects by line</string>
|
<string>Flipping objects by line</string>
|
||||||
|
@ -2302,7 +2350,7 @@
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="share/resources/toolicon.qrc">
|
<iconset resource="share/resources/toolicon.qrc">
|
||||||
<normaloff>:/toolicon/32x32/rotation.png</normaloff>:/toolicon/32x32/rotation.png</iconset>
|
<normaloff>:/toolicon/light/rotation.png</normaloff>:/toolicon/light/rotation.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Rotate objects</string>
|
<string>Rotate objects</string>
|
||||||
|
@ -2320,7 +2368,7 @@
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="share/resources/toolicon.qrc">
|
<iconset resource="share/resources/toolicon.qrc">
|
||||||
<normaloff>:/toolicon/32x32/move.png</normaloff>:/toolicon/32x32/move.png</iconset>
|
<normaloff>:/toolicon/light/move.png</normaloff>:/toolicon/light/move.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Move objects</string>
|
<string>Move objects</string>
|
||||||
|
@ -2338,7 +2386,7 @@
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="share/resources/toolicon.qrc">
|
<iconset resource="share/resources/toolicon.qrc">
|
||||||
<normaloff>:/toolicon/32x32/group_plus.png</normaloff>:/toolicon/32x32/group_plus.png</iconset>
|
<normaloff>:/toolicon/light/group_plus.png</normaloff>:/toolicon/light/group_plus.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Visibility group</string>
|
<string>Visibility group</string>
|
||||||
|
@ -2356,7 +2404,7 @@
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="share/resources/toolicon.qrc">
|
<iconset resource="share/resources/toolicon.qrc">
|
||||||
<normaloff>:/toolicon/32x32/true_darts.png</normaloff>:/toolicon/32x32/true_darts.png</iconset>
|
<normaloff>:/toolicon/light/true_darts.png</normaloff>:/toolicon/light/true_darts.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>True darts</string>
|
<string>True darts</string>
|
||||||
|
@ -2392,7 +2440,7 @@
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="share/resources/toolicon.qrc">
|
<iconset resource="share/resources/toolicon.qrc">
|
||||||
<normaloff>:/toolicon/32x32/new_detail.png</normaloff>:/toolicon/32x32/new_detail.png</iconset>
|
<normaloff>:/toolicon/light/new_detail.png</normaloff>:/toolicon/light/new_detail.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Workpiece tool</string>
|
<string>Workpiece tool</string>
|
||||||
|
@ -2410,7 +2458,7 @@
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="share/resources/toolicon.qrc">
|
<iconset resource="share/resources/toolicon.qrc">
|
||||||
<normaloff>:/toolicon/32x32/union.png</normaloff>:/toolicon/32x32/union.png</iconset>
|
<normaloff>:/toolicon/light/union.png</normaloff>:/toolicon/light/union.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Union tool</string>
|
<string>Union tool</string>
|
||||||
|
@ -2428,7 +2476,7 @@
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="share/resources/toolicon.qrc">
|
<iconset resource="share/resources/toolicon.qrc">
|
||||||
<normaloff>:/toolicon/32x32/duplicate_detail.png</normaloff>:/toolicon/32x32/duplicate_detail.png</iconset>
|
<normaloff>:/toolicon/light/duplicate_detail.png</normaloff>:/toolicon/light/duplicate_detail.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Duplicate detail tool</string>
|
<string>Duplicate detail tool</string>
|
||||||
|
@ -2446,7 +2494,7 @@
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="share/resources/toolicon.qrc">
|
<iconset resource="share/resources/toolicon.qrc">
|
||||||
<normaloff>:/toolicon/32x32/path.png</normaloff>:/toolicon/32x32/path.png</iconset>
|
<normaloff>:/toolicon/light/path.png</normaloff>:/toolicon/light/path.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Internal path tool</string>
|
<string>Internal path tool</string>
|
||||||
|
@ -2464,7 +2512,7 @@
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="share/resources/toolicon.qrc">
|
<iconset resource="share/resources/toolicon.qrc">
|
||||||
<normaloff>:/toolicon/32x32/pin.png</normaloff>:/toolicon/32x32/pin.png</iconset>
|
<normaloff>:/toolicon/light/pin.png</normaloff>:/toolicon/light/pin.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Pin tool</string>
|
<string>Pin tool</string>
|
||||||
|
@ -2482,7 +2530,7 @@
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="share/resources/toolicon.qrc">
|
<iconset resource="share/resources/toolicon.qrc">
|
||||||
<normaloff>:/toolicon/32x32/insert_node.png</normaloff>:/toolicon/32x32/insert_node.png</iconset>
|
<normaloff>:/toolicon/light/insert_node.png</normaloff>:/toolicon/light/insert_node.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Insert node tool</string>
|
<string>Insert node tool</string>
|
||||||
|
@ -2500,7 +2548,7 @@
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="share/resources/toolicon.qrc">
|
<iconset resource="share/resources/toolicon.qrc">
|
||||||
<normaloff>:/toolicon/32x32/place_label.png</normaloff>:/toolicon/32x32/place_label.png</iconset>
|
<normaloff>:/toolicon/light/place_label.png</normaloff>:/toolicon/light/place_label.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Place label tool</string>
|
<string>Place label tool</string>
|
||||||
|
@ -2530,6 +2578,11 @@
|
||||||
</widget>
|
</widget>
|
||||||
<layoutdefault spacing="6" margin="11"/>
|
<layoutdefault spacing="6" margin="11"/>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
|
<customwidget>
|
||||||
|
<class>VPlainTextEdit</class>
|
||||||
|
<extends>QPlainTextEdit</extends>
|
||||||
|
<header>../vwidgets/vplaintextedit.h</header>
|
||||||
|
</customwidget>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
<class>VMainGraphicsView</class>
|
<class>VMainGraphicsView</class>
|
||||||
<extends>QGraphicsView</extends>
|
<extends>QGraphicsView</extends>
|
||||||
|
@ -2540,11 +2593,6 @@
|
||||||
<extends>QLineEdit</extends>
|
<extends>QLineEdit</extends>
|
||||||
<header>../vwidgets/vlineedit.h</header>
|
<header>../vwidgets/vlineedit.h</header>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
<customwidget>
|
|
||||||
<class>VPlainTextEdit</class>
|
|
||||||
<extends>QPlainTextEdit</extends>
|
|
||||||
<header>../vwidgets/vplaintextedit.h</header>
|
|
||||||
</customwidget>
|
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
<resources>
|
<resources>
|
||||||
<include location="share/resources/toolicon.qrc"/>
|
<include location="share/resources/toolicon.qrc"/>
|
||||||
|
|
|
@ -1,92 +1,178 @@
|
||||||
<RCC>
|
<RCC>
|
||||||
<qresource prefix="/">
|
<qresource prefix="/">
|
||||||
<file>cursor/endline_cursor.png</file>
|
|
||||||
<file>cursor/endline_cursor@2x.png</file>
|
|
||||||
<file>cursor/line_cursor.png</file>
|
|
||||||
<file>cursor/line_cursor@2x.png</file>
|
|
||||||
<file>cursor/alongline_cursor.png</file>
|
|
||||||
<file>cursor/alongline_cursor@2x.png</file>
|
|
||||||
<file>cursor/shoulder_cursor.png</file>
|
|
||||||
<file>cursor/shoulder_cursor@2x.png</file>
|
|
||||||
<file>cursor/normal_cursor.png</file>
|
|
||||||
<file>cursor/normal_cursor@2x.png</file>
|
|
||||||
<file>cursor/bisector_cursor.png</file>
|
|
||||||
<file>cursor/bisector_cursor@2x.png</file>
|
|
||||||
<file>cursor/intersect_cursor.png</file>
|
|
||||||
<file>cursor/intersect_cursor@2x.png</file>
|
|
||||||
<file>cursor/spline_cursor.png</file>
|
|
||||||
<file>cursor/spline_cursor@2x.png</file>
|
|
||||||
<file>cursor/arc_cursor.png</file>
|
|
||||||
<file>cursor/arc_cursor@2x.png</file>
|
|
||||||
<file>cursor/splinepath_cursor.png</file>
|
|
||||||
<file>cursor/splinepath_cursor@2x.png</file>
|
|
||||||
<file>cursor/pointcontact_cursor.png</file>
|
|
||||||
<file>cursor/pointcontact_cursor@2x.png</file>
|
|
||||||
<file>cursor/new_detail_cursor.png</file>
|
|
||||||
<file>cursor/new_detail_cursor@2x.png</file>
|
|
||||||
<file>cursor/height_cursor.png</file>
|
|
||||||
<file>cursor/height_cursor@2x.png</file>
|
|
||||||
<file>cursor/triangle_cursor.png</file>
|
|
||||||
<file>cursor/triangle_cursor@2x.png</file>
|
|
||||||
<file>cursor/pointofintersect_cursor.png</file>
|
|
||||||
<file>cursor/pointofintersect_cursor@2x.png</file>
|
|
||||||
<file>cursor/spline_cut_point_cursor.png</file>
|
|
||||||
<file>cursor/spline_cut_point_cursor@2x.png</file>
|
|
||||||
<file>cursor/splinepath_cut_point_cursor.png</file>
|
|
||||||
<file>cursor/splinepath_cut_point_cursor@2x.png</file>
|
|
||||||
<file>cursor/union_cursor.png</file>
|
|
||||||
<file>cursor/union_cursor@2x.png</file>
|
|
||||||
<file>cursor/arc_cut_cursor.png</file>
|
|
||||||
<file>cursor/arc_cut_cursor@2x.png</file>
|
|
||||||
<file>cursor/cursor-arrow-closehand.png</file>
|
<file>cursor/cursor-arrow-closehand.png</file>
|
||||||
<file>cursor/cursor-arrow-openhand.png</file>
|
<file>cursor/cursor-arrow-openhand.png</file>
|
||||||
<file>cursor/line_intersect_axis_cursor.png</file>
|
<file>cursor/light/segment_cursor.png</file>
|
||||||
<file>cursor/line_intersect_axis_cursor@2x.png</file>
|
<file>cursor/light/segment_cursor@2x.png</file>
|
||||||
<file>cursor/arc_intersect_axis_cursor.png</file>
|
<file>cursor/light/line_cursor.png</file>
|
||||||
<file>cursor/arc_intersect_axis_cursor@2x.png</file>
|
<file>cursor/light/line_cursor@2x.png</file>
|
||||||
<file>cursor/curve_intersect_axis_cursor.png</file>
|
<file>cursor/light/along_line_cursor.png</file>
|
||||||
<file>cursor/curve_intersect_axis_cursor@2x.png</file>
|
<file>cursor/light/along_line_cursor@2x.png</file>
|
||||||
<file>cursor/point_of_intersection_arcs.png</file>
|
<file>cursor/light/shoulder_cursor.png</file>
|
||||||
<file>cursor/point_of_intersection_arcs@2x.png</file>
|
<file>cursor/light/shoulder_cursor@2x.png</file>
|
||||||
<file>cursor/point_of_intersection_circles.png</file>
|
<file>cursor/light/normal_cursor.png</file>
|
||||||
<file>cursor/point_of_intersection_circles@2x.png</file>
|
<file>cursor/light/normal_cursor@2x.png</file>
|
||||||
<file>cursor/point_from_circle_and_tangent_cursor.png</file>
|
<file>cursor/light/bisector_cursor.png</file>
|
||||||
<file>cursor/point_from_circle_and_tangent_cursor@2x.png</file>
|
<file>cursor/light/bisector_cursor@2x.png</file>
|
||||||
<file>cursor/point_from_arc_and_tangent_cursor.png</file>
|
<file>cursor/light/intersect_cursor.png</file>
|
||||||
<file>cursor/point_from_arc_and_tangent_cursor@2x.png</file>
|
<file>cursor/light/intersect_cursor@2x.png</file>
|
||||||
<file>cursor/arc_with_length_cursor.png</file>
|
<file>cursor/light/spline_cursor.png</file>
|
||||||
<file>cursor/arc_with_length_cursor@2x.png</file>
|
<file>cursor/light/spline_cursor@2x.png</file>
|
||||||
<file>cursor/true_darts_cursor.png</file>
|
<file>cursor/light/arc_cursor.png</file>
|
||||||
<file>cursor/true_darts_cursor@2x.png</file>
|
<file>cursor/light/arc_cursor@2x.png</file>
|
||||||
<file>cursor/intersection_curves_cursor.png</file>
|
<file>cursor/light/splinePath_cursor.png</file>
|
||||||
<file>cursor/intersection_curves_cursor@2x.png</file>
|
<file>cursor/light/splinePath_cursor@2x.png</file>
|
||||||
<file>cursor/cubic_bezier_cursor.png</file>
|
<file>cursor/light/point_of_contact_cursor.png</file>
|
||||||
<file>cursor/cubic_bezier_cursor@2x.png</file>
|
<file>cursor/light/point_of_contact_cursor@2x.png</file>
|
||||||
<file>cursor/cubic_bezier_path_cursor.png</file>
|
<file>cursor/light/new_detail_cursor.png</file>
|
||||||
<file>cursor/cubic_bezier_path_cursor@2x.png</file>
|
<file>cursor/light/new_detail_cursor@2x.png</file>
|
||||||
<file>cursor/group_plus_cursor.png</file>
|
<file>cursor/light/height_cursor.png</file>
|
||||||
<file>cursor/group_plus_cursor@2x.png</file>
|
<file>cursor/light/height_cursor@2x.png</file>
|
||||||
<file>cursor/rotation_cursor.png</file>
|
<file>cursor/light/triangle_cursor.png</file>
|
||||||
<file>cursor/rotation_cursor@2x.png</file>
|
<file>cursor/light/triangle_cursor@2x.png</file>
|
||||||
<file>cursor/midpoint_cursor.png</file>
|
<file>cursor/light/point_of_intersection_cursor.png</file>
|
||||||
<file>cursor/midpoint_cursor@2x.png</file>
|
<file>cursor/light/point_of_intersection_cursor@2x.png</file>
|
||||||
<file>cursor/flipping_line_cursor@2x.png</file>
|
<file>cursor/light/spline_cut_point_cursor.png</file>
|
||||||
<file>cursor/flipping_line_cursor.png</file>
|
<file>cursor/light/spline_cut_point_cursor@2x.png</file>
|
||||||
<file>cursor/flipping_axis_cursor.png</file>
|
<file>cursor/light/splinePath_cut_point_cursor.png</file>
|
||||||
<file>cursor/flipping_axis_cursor@2x.png</file>
|
<file>cursor/light/splinePath_cut_point_cursor@2x.png</file>
|
||||||
<file>cursor/move_cursor.png</file>
|
<file>cursor/light/union_cursor.png</file>
|
||||||
<file>cursor/move_cursor@2x.png</file>
|
<file>cursor/light/union_cursor@2x.png</file>
|
||||||
<file>cursor/el_arc_cursor.png</file>
|
<file>cursor/light/arc_cut_cursor.png</file>
|
||||||
<file>cursor/el_arc_cursor@2x.png</file>
|
<file>cursor/light/arc_cut_cursor@2x.png</file>
|
||||||
<file>cursor/path_cursor.png</file>
|
<file>cursor/light/line_intersect_axis_cursor.png</file>
|
||||||
<file>cursor/path_cursor@2x.png</file>
|
<file>cursor/light/line_intersect_axis_cursor@2x.png</file>
|
||||||
<file>cursor/pin_cursor.png</file>
|
<file>cursor/light/arc_intersect_axis_cursor.png</file>
|
||||||
<file>cursor/pin_cursor@2x.png</file>
|
<file>cursor/light/arc_intersect_axis_cursor@2x.png</file>
|
||||||
<file>cursor/insert_node_cursor.png</file>
|
<file>cursor/light/curve_intersect_axis_cursor.png</file>
|
||||||
<file>cursor/insert_node_cursor@2x.png</file>
|
<file>cursor/light/curve_intersect_axis_cursor@2x.png</file>
|
||||||
<file>cursor/place_label_cursor@2x.png</file>
|
<file>cursor/light/point_of_intersection_arcs_cursor.png</file>
|
||||||
<file>cursor/place_label_cursor.png</file>
|
<file>cursor/light/point_of_intersection_arcs_cursor@2x.png</file>
|
||||||
<file>cursor/duplicate_detail_cursor.png</file>
|
<file>cursor/light/point_of_intersection_circles_cursor.png</file>
|
||||||
<file>cursor/duplicate_detail_cursor@2x.png</file>
|
<file>cursor/light/point_of_intersection_circles_cursor@2x.png</file>
|
||||||
|
<file>cursor/light/point_from_circle_and_tangent_cursor.png</file>
|
||||||
|
<file>cursor/light/point_from_circle_and_tangent_cursor@2x.png</file>
|
||||||
|
<file>cursor/light/point_from_arc_and_tangent_cursor.png</file>
|
||||||
|
<file>cursor/light/point_from_arc_and_tangent_cursor@2x.png</file>
|
||||||
|
<file>cursor/light/arc_with_length_cursor.png</file>
|
||||||
|
<file>cursor/light/arc_with_length_cursor@2x.png</file>
|
||||||
|
<file>cursor/light/true_darts_cursor.png</file>
|
||||||
|
<file>cursor/light/true_darts_cursor@2x.png</file>
|
||||||
|
<file>cursor/light/intersection_curves_cursor.png</file>
|
||||||
|
<file>cursor/light/intersection_curves_cursor@2x.png</file>
|
||||||
|
<file>cursor/light/cubic_bezier_cursor.png</file>
|
||||||
|
<file>cursor/light/cubic_bezier_cursor@2x.png</file>
|
||||||
|
<file>cursor/light/cubic_bezier_path_cursor.png</file>
|
||||||
|
<file>cursor/light/cubic_bezier_path_cursor@2x.png</file>
|
||||||
|
<file>cursor/light/group_plus_cursor.png</file>
|
||||||
|
<file>cursor/light/group_plus_cursor@2x.png</file>
|
||||||
|
<file>cursor/light/rotation_cursor.png</file>
|
||||||
|
<file>cursor/light/rotation_cursor@2x.png</file>
|
||||||
|
<file>cursor/light/midpoint_cursor.png</file>
|
||||||
|
<file>cursor/light/midpoint_cursor@2x.png</file>
|
||||||
|
<file>cursor/light/flipping_line_cursor@2x.png</file>
|
||||||
|
<file>cursor/light/flipping_line_cursor.png</file>
|
||||||
|
<file>cursor/light/flipping_axis_cursor.png</file>
|
||||||
|
<file>cursor/light/flipping_axis_cursor@2x.png</file>
|
||||||
|
<file>cursor/light/move_cursor.png</file>
|
||||||
|
<file>cursor/light/move_cursor@2x.png</file>
|
||||||
|
<file>cursor/light/el_arc_cursor.png</file>
|
||||||
|
<file>cursor/light/el_arc_cursor@2x.png</file>
|
||||||
|
<file>cursor/light/path_cursor.png</file>
|
||||||
|
<file>cursor/light/path_cursor@2x.png</file>
|
||||||
|
<file>cursor/light/pin_cursor.png</file>
|
||||||
|
<file>cursor/light/pin_cursor@2x.png</file>
|
||||||
|
<file>cursor/light/insert_node_cursor.png</file>
|
||||||
|
<file>cursor/light/insert_node_cursor@2x.png</file>
|
||||||
|
<file>cursor/light/place_label_cursor@2x.png</file>
|
||||||
|
<file>cursor/light/place_label_cursor.png</file>
|
||||||
|
<file>cursor/light/duplicate_detail_cursor.png</file>
|
||||||
|
<file>cursor/light/duplicate_detail_cursor@2x.png</file>
|
||||||
|
<file>cursor/dark/union_cursor.png</file>
|
||||||
|
<file>cursor/dark/union_cursor@2x.png</file>
|
||||||
|
<file>cursor/dark/true_darts_cursor.png</file>
|
||||||
|
<file>cursor/dark/true_darts_cursor@2x.png</file>
|
||||||
|
<file>cursor/dark/triangle_cursor.png</file>
|
||||||
|
<file>cursor/dark/triangle_cursor@2x.png</file>
|
||||||
|
<file>cursor/dark/splinePath_cut_point_cursor.png</file>
|
||||||
|
<file>cursor/dark/splinePath_cut_point_cursor@2x.png</file>
|
||||||
|
<file>cursor/dark/splinePath_cursor.png</file>
|
||||||
|
<file>cursor/dark/splinePath_cursor@2x.png</file>
|
||||||
|
<file>cursor/dark/spline_cut_point_cursor.png</file>
|
||||||
|
<file>cursor/dark/spline_cut_point_cursor@2x.png</file>
|
||||||
|
<file>cursor/dark/spline_cursor.png</file>
|
||||||
|
<file>cursor/dark/spline_cursor@2x.png</file>
|
||||||
|
<file>cursor/dark/shoulder_cursor.png</file>
|
||||||
|
<file>cursor/dark/shoulder_cursor@2x.png</file>
|
||||||
|
<file>cursor/dark/segment_cursor.png</file>
|
||||||
|
<file>cursor/dark/segment_cursor@2x.png</file>
|
||||||
|
<file>cursor/dark/rotation_cursor.png</file>
|
||||||
|
<file>cursor/dark/rotation_cursor@2x.png</file>
|
||||||
|
<file>cursor/dark/point_of_intersection_circles_cursor.png</file>
|
||||||
|
<file>cursor/dark/point_of_intersection_circles_cursor@2x.png</file>
|
||||||
|
<file>cursor/dark/point_of_intersection_arcs_cursor.png</file>
|
||||||
|
<file>cursor/dark/point_of_intersection_arcs_cursor@2x.png</file>
|
||||||
|
<file>cursor/dark/point_of_intersection_cursor.png</file>
|
||||||
|
<file>cursor/dark/point_of_intersection_cursor@2x.png</file>
|
||||||
|
<file>cursor/dark/point_of_contact_cursor.png</file>
|
||||||
|
<file>cursor/dark/point_of_contact_cursor@2x.png</file>
|
||||||
|
<file>cursor/dark/point_from_circle_and_tangent_cursor.png</file>
|
||||||
|
<file>cursor/dark/point_from_circle_and_tangent_cursor@2x.png</file>
|
||||||
|
<file>cursor/dark/point_from_arc_and_tangent_cursor.png</file>
|
||||||
|
<file>cursor/dark/point_from_arc_and_tangent_cursor@2x.png</file>
|
||||||
|
<file>cursor/dark/place_label_cursor.png</file>
|
||||||
|
<file>cursor/dark/place_label_cursor@2x.png</file>
|
||||||
|
<file>cursor/dark/pin_cursor.png</file>
|
||||||
|
<file>cursor/dark/pin_cursor@2x.png</file>
|
||||||
|
<file>cursor/dark/path_cursor.png</file>
|
||||||
|
<file>cursor/dark/path_cursor@2x.png</file>
|
||||||
|
<file>cursor/dark/normal_cursor.png</file>
|
||||||
|
<file>cursor/dark/normal_cursor@2x.png</file>
|
||||||
|
<file>cursor/dark/new_detail_cursor.png</file>
|
||||||
|
<file>cursor/dark/new_detail_cursor@2x.png</file>
|
||||||
|
<file>cursor/dark/move_cursor.png</file>
|
||||||
|
<file>cursor/dark/move_cursor@2x.png</file>
|
||||||
|
<file>cursor/dark/midpoint_cursor.png</file>
|
||||||
|
<file>cursor/dark/midpoint_cursor@2x.png</file>
|
||||||
|
<file>cursor/dark/line_intersect_axis_cursor.png</file>
|
||||||
|
<file>cursor/dark/line_intersect_axis_cursor@2x.png</file>
|
||||||
|
<file>cursor/dark/line_cursor.png</file>
|
||||||
|
<file>cursor/dark/line_cursor@2x.png</file>
|
||||||
|
<file>cursor/dark/intersection_curves_cursor.png</file>
|
||||||
|
<file>cursor/dark/intersection_curves_cursor@2x.png</file>
|
||||||
|
<file>cursor/dark/intersect_cursor.png</file>
|
||||||
|
<file>cursor/dark/intersect_cursor@2x.png</file>
|
||||||
|
<file>cursor/dark/insert_node_cursor.png</file>
|
||||||
|
<file>cursor/dark/insert_node_cursor@2x.png</file>
|
||||||
|
<file>cursor/dark/height_cursor.png</file>
|
||||||
|
<file>cursor/dark/height_cursor@2x.png</file>
|
||||||
|
<file>cursor/dark/group_plus_cursor.png</file>
|
||||||
|
<file>cursor/dark/group_plus_cursor@2x.png</file>
|
||||||
|
<file>cursor/dark/flipping_line_cursor.png</file>
|
||||||
|
<file>cursor/dark/flipping_line_cursor@2x.png</file>
|
||||||
|
<file>cursor/dark/flipping_axis_cursor.png</file>
|
||||||
|
<file>cursor/dark/flipping_axis_cursor@2x.png</file>
|
||||||
|
<file>cursor/dark/el_arc_cursor.png</file>
|
||||||
|
<file>cursor/dark/el_arc_cursor@2x.png</file>
|
||||||
|
<file>cursor/dark/duplicate_detail_cursor.png</file>
|
||||||
|
<file>cursor/dark/duplicate_detail_cursor@2x.png</file>
|
||||||
|
<file>cursor/dark/curve_intersect_axis_cursor.png</file>
|
||||||
|
<file>cursor/dark/curve_intersect_axis_cursor@2x.png</file>
|
||||||
|
<file>cursor/dark/cubic_bezier_path_cursor.png</file>
|
||||||
|
<file>cursor/dark/cubic_bezier_path_cursor@2x.png</file>
|
||||||
|
<file>cursor/dark/cubic_bezier_cursor.png</file>
|
||||||
|
<file>cursor/dark/cubic_bezier_cursor@2x.png</file>
|
||||||
|
<file>cursor/dark/bisector_cursor.png</file>
|
||||||
|
<file>cursor/dark/bisector_cursor@2x.png</file>
|
||||||
|
<file>cursor/dark/arc_with_length_cursor.png</file>
|
||||||
|
<file>cursor/dark/arc_with_length_cursor@2x.png</file>
|
||||||
|
<file>cursor/dark/arc_intersect_axis_cursor.png</file>
|
||||||
|
<file>cursor/dark/arc_intersect_axis_cursor@2x.png</file>
|
||||||
|
<file>cursor/dark/arc_cut_cursor.png</file>
|
||||||
|
<file>cursor/dark/arc_cut_cursor@2x.png</file>
|
||||||
|
<file>cursor/dark/arc_cursor.png</file>
|
||||||
|
<file>cursor/dark/arc_cursor@2x.png</file>
|
||||||
|
<file>cursor/dark/along_line_cursor.png</file>
|
||||||
|
<file>cursor/dark/along_line_cursor@2x.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
|
Before Width: | Height: | Size: 429 B |
Before Width: | Height: | Size: 890 B |
Before Width: | Height: | Size: 416 B |
Before Width: | Height: | Size: 874 B |
Before Width: | Height: | Size: 412 B |
Before Width: | Height: | Size: 858 B |
Before Width: | Height: | Size: 552 B |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 581 B |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 494 B |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 569 B |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 751 B |
Before Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 589 B |
Before Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 637 B |
After Width: | Height: | Size: 1.2 KiB |
BIN
src/app/valentina/share/resources/cursor/dark/arc_cursor.png
Normal file
After Width: | Height: | Size: 642 B |
BIN
src/app/valentina/share/resources/cursor/dark/arc_cursor@2x.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
src/app/valentina/share/resources/cursor/dark/arc_cut_cursor.png
Normal file
After Width: | Height: | Size: 660 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 792 B |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 937 B |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 758 B |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 788 B |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 1011 B |
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 929 B |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 1004 B |
After Width: | Height: | Size: 2.0 KiB |
BIN
src/app/valentina/share/resources/cursor/dark/el_arc_cursor.png
Normal file
After Width: | Height: | Size: 763 B |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 902 B |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 947 B |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 860 B |
After Width: | Height: | Size: 1.7 KiB |
BIN
src/app/valentina/share/resources/cursor/dark/height_cursor.png
Normal file
After Width: | Height: | Size: 701 B |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 914 B |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 742 B |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 864 B |
After Width: | Height: | Size: 1.9 KiB |
BIN
src/app/valentina/share/resources/cursor/dark/line_cursor.png
Normal file
After Width: | Height: | Size: 645 B |
BIN
src/app/valentina/share/resources/cursor/dark/line_cursor@2x.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 729 B |