Tool box redesign.
|
@ -32,6 +32,7 @@
|
||||||
- Support for single-line fonts.
|
- Support for single-line fonts.
|
||||||
- Export to HP-GL format.
|
- Export to HP-GL format.
|
||||||
- Fix crash after using tool Union of details.
|
- Fix crash after using tool Union of details.
|
||||||
|
- Tool box redesign.
|
||||||
|
|
||||||
# Valentina 0.7.52 September 12, 2022
|
# Valentina 0.7.52 September 12, 2022
|
||||||
- Fix crash when default locale is ru.
|
- Fix crash when default locale is ru.
|
||||||
|
|
|
@ -133,9 +133,6 @@ PreferencesConfigurationPage::PreferencesConfigurationPage(QWidget *parent)
|
||||||
// Theme
|
// Theme
|
||||||
ui->darkModeCheck->setChecked(settings->GetDarkMode());
|
ui->darkModeCheck->setChecked(settings->GetDarkMode());
|
||||||
|
|
||||||
// Tool panel
|
|
||||||
ui->checkBoxToolPanelScaling->setChecked(settings->GetToolPanelScaling());
|
|
||||||
|
|
||||||
// Native dialogs
|
// Native dialogs
|
||||||
ui->checkBoxDontUseNativeDialog->setChecked(settings->IsDontUseNativeDialog());
|
ui->checkBoxDontUseNativeDialog->setChecked(settings->IsDontUseNativeDialog());
|
||||||
|
|
||||||
|
@ -196,11 +193,6 @@ auto PreferencesConfigurationPage::Apply() -> QStringList
|
||||||
preferences.append(tr("dark mode"));
|
preferences.append(tr("dark mode"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (settings->GetToolPanelScaling() != ui->checkBoxToolPanelScaling->isChecked())
|
|
||||||
{
|
|
||||||
settings->SetToolPanelScaling(ui->checkBoxToolPanelScaling->isChecked());
|
|
||||||
}
|
|
||||||
|
|
||||||
if (settings->IsDontUseNativeDialog() != ui->checkBoxDontUseNativeDialog->isChecked())
|
if (settings->IsDontUseNativeDialog() != ui->checkBoxDontUseNativeDialog->isChecked())
|
||||||
{
|
{
|
||||||
settings->SetDontUseNativeDialog(ui->checkBoxDontUseNativeDialog->isChecked());
|
settings->SetDontUseNativeDialog(ui->checkBoxDontUseNativeDialog->isChecked());
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>624</width>
|
<width>624</width>
|
||||||
<height>898</height>
|
<height>869</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||||
|
@ -296,16 +296,6 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<widget class="QCheckBox" name="checkBoxToolPanelScaling">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Change the position of the tool panel to optimize for big screen resolutions. By default, the tool panel will take all available space.</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Tool panel scaling</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="checkBoxDontUseNativeDialog">
|
<widget class="QCheckBox" name="checkBoxDontUseNativeDialog">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
|
|
|
@ -133,7 +133,6 @@ private slots:
|
||||||
void PreviousPatternPiece();
|
void PreviousPatternPiece();
|
||||||
void NextPatternPiece();
|
void NextPatternPiece();
|
||||||
void ToolBarStyles();
|
void ToolBarStyles();
|
||||||
void ToolBoxSizePolicy();
|
|
||||||
void ShowPaper(int index);
|
void ShowPaper(int index);
|
||||||
void Preferences();
|
void Preferences();
|
||||||
#if defined(Q_OS_MAC)
|
#if defined(Q_OS_MAC)
|
||||||
|
@ -295,9 +294,6 @@ private:
|
||||||
/** @brief currentDrawIndex save current selected pattern peace. */
|
/** @brief currentDrawIndex save current selected pattern peace. */
|
||||||
qint32 m_currentDrawIndex{0};
|
qint32 m_currentDrawIndex{0};
|
||||||
|
|
||||||
/** @brief currentToolBoxIndex save current set of tools. */
|
|
||||||
qint32 m_currentToolBoxIndex{0};
|
|
||||||
|
|
||||||
/** @brief drawMode true if we current draw scene. */
|
/** @brief drawMode true if we current draw scene. */
|
||||||
bool m_drawMode{true};
|
bool m_drawMode{true};
|
||||||
|
|
||||||
|
@ -320,8 +316,6 @@ private:
|
||||||
VWidgetBackgroundImages *m_backgroundImagesWidget{nullptr};
|
VWidgetBackgroundImages *m_backgroundImagesWidget{nullptr};
|
||||||
QSharedPointer<VLockGuard<char>> m_lock{nullptr};
|
QSharedPointer<VLockGuard<char>> m_lock{nullptr};
|
||||||
|
|
||||||
QList<QToolButton *> m_toolButtonPointerList{};
|
|
||||||
|
|
||||||
QProgressBar *m_progressBar;
|
QProgressBar *m_progressBar;
|
||||||
QLabel *m_statusLabel;
|
QLabel *m_statusLabel;
|
||||||
|
|
||||||
|
@ -354,6 +348,7 @@ private:
|
||||||
void ToolBarStages();
|
void ToolBarStages();
|
||||||
void ToolBarDraws();
|
void ToolBarDraws();
|
||||||
void ToolBarTools();
|
void ToolBarTools();
|
||||||
|
void ToolBarDrawTools();
|
||||||
void InitToolButtons();
|
void InitToolButtons();
|
||||||
void CancelTool();
|
void CancelTool();
|
||||||
|
|
||||||
|
|
|
@ -46,6 +46,7 @@
|
||||||
#include "dialogs/dialoglayoutprogress.h"
|
#include "dialogs/dialoglayoutprogress.h"
|
||||||
#include "dialogs/dialoglayoutsettings.h"
|
#include "dialogs/dialoglayoutsettings.h"
|
||||||
#include "dialogs/dialogsavelayout.h"
|
#include "dialogs/dialogsavelayout.h"
|
||||||
|
#include <QAction>
|
||||||
|
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||||
#include "../vmisc/vtextcodec.h"
|
#include "../vmisc/vtextcodec.h"
|
||||||
|
@ -158,7 +159,7 @@ MainWindowsNoGUI::~MainWindowsNoGUI()
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void MainWindowsNoGUI::ToolLayoutSettings(bool checked)
|
void MainWindowsNoGUI::ToolLayoutSettings(bool checked)
|
||||||
{
|
{
|
||||||
QToolButton *tButton = qobject_cast<QToolButton *>(this->sender());
|
auto *tButton = qobject_cast<QAction *>(this->sender());
|
||||||
SCASSERT(tButton != nullptr)
|
SCASSERT(tButton != nullptr)
|
||||||
|
|
||||||
if (checked)
|
if (checked)
|
||||||
|
@ -498,8 +499,7 @@ void MainWindowsNoGUI::ExportData(const QVector<VLayoutPiece> &listDetails)
|
||||||
QString::number(i + 1) +
|
QString::number(i + 1) +
|
||||||
VLayoutExporter::ExportFormatSuffix(m_dialogSaveLayout->Format());
|
VLayoutExporter::ExportFormatSuffix(m_dialogSaveLayout->Format());
|
||||||
|
|
||||||
auto *paper =
|
auto *paper = qgraphicsitem_cast<QGraphicsRectItem *>(m_layoutSettings->LayoutPapers().at(i));
|
||||||
qgraphicsitem_cast<QGraphicsRectItem *>(m_layoutSettings->LayoutPapers().at(i));
|
|
||||||
SCASSERT(paper != nullptr)
|
SCASSERT(paper != nullptr)
|
||||||
|
|
||||||
ExportApparelLayout(detailsOnLayout.at(i), name, paper->rect().size().toSize());
|
ExportApparelLayout(detailsOnLayout.at(i), name, paper->rect().size().toSize());
|
||||||
|
|
|
@ -37,22 +37,12 @@
|
||||||
<file>icon/16x16/roll.png</file>
|
<file>icon/16x16/roll.png</file>
|
||||||
<file>icon/16x16/progress.gif</file>
|
<file>icon/16x16/progress.gif</file>
|
||||||
<file>icon/32x32/export_to_picture_document.png</file>
|
<file>icon/32x32/export_to_picture_document.png</file>
|
||||||
<file>icon/16x16/toolsectionline.png</file>
|
|
||||||
<file>icon/16x16/toolsectioncurve.png</file>
|
|
||||||
<file>icon/16x16/toolsectionarc.png</file>
|
|
||||||
<file>icon/16x16/toolsectionpoint.png</file>
|
|
||||||
<file>icon/16x16/toolsectiondetail.png</file>
|
|
||||||
<file>icon/16x16/toolsectionlayout.png</file>
|
|
||||||
<file>icon/24x24/fast_forward_left_to_right_arrow.png</file>
|
<file>icon/24x24/fast_forward_left_to_right_arrow.png</file>
|
||||||
<file>icon/24x24/fast_forward_right_to_left_arrow.png</file>
|
<file>icon/24x24/fast_forward_right_to_left_arrow.png</file>
|
||||||
<file>icon/24x24/left_to_right_arrow.png</file>
|
<file>icon/24x24/left_to_right_arrow.png</file>
|
||||||
<file>icon/24x24/right_to_left_arrow.png</file>
|
<file>icon/24x24/right_to_left_arrow.png</file>
|
||||||
<file>icon/32x32/clockwise.png</file>
|
<file>icon/32x32/clockwise.png</file>
|
||||||
<file>icon/32x32/syncM.png</file>
|
<file>icon/32x32/syncM.png</file>
|
||||||
<file>icon/16x16/toolsectionarc@2x.png</file>
|
|
||||||
<file>icon/16x16/toolsectioncurve@2x.png</file>
|
|
||||||
<file>icon/16x16/toolsectionline@2x.png</file>
|
|
||||||
<file>icon/16x16/toolsectionpoint@2x.png</file>
|
|
||||||
<file>icon/16x16/operations.png</file>
|
<file>icon/16x16/operations.png</file>
|
||||||
<file>icon/16x16/operations@2x.png</file>
|
<file>icon/16x16/operations@2x.png</file>
|
||||||
<file>icon/16x16/closed_eye.png</file>
|
<file>icon/16x16/closed_eye.png</file>
|
||||||
|
@ -63,8 +53,6 @@
|
||||||
<file>icon/16x16/allow_detail@2x.png</file>
|
<file>icon/16x16/allow_detail@2x.png</file>
|
||||||
<file>icon/16x16/forbid_detail.png</file>
|
<file>icon/16x16/forbid_detail.png</file>
|
||||||
<file>icon/16x16/forbid_detail@2x.png</file>
|
<file>icon/16x16/forbid_detail@2x.png</file>
|
||||||
<file>icon/16x16/toolsectionelarc.png</file>
|
|
||||||
<file>icon/16x16/toolsectionelarc@2x.png</file>
|
|
||||||
<file>icon/32x32/grainline.png</file>
|
<file>icon/32x32/grainline.png</file>
|
||||||
<file>icon/32x32/grainline@2x.png</file>
|
<file>icon/32x32/grainline@2x.png</file>
|
||||||
<file>icon/32x32/labels.png</file>
|
<file>icon/32x32/labels.png</file>
|
||||||
|
|
Before Width: | Height: | Size: 273 B |
Before Width: | Height: | Size: 372 B |
Before Width: | Height: | Size: 264 B |
Before Width: | Height: | Size: 483 B |
Before Width: | Height: | Size: 155 B |
Before Width: | Height: | Size: 305 B |
Before Width: | Height: | Size: 733 B |
Before Width: | Height: | Size: 794 B |
Before Width: | Height: | Size: 100 B |
Before Width: | Height: | Size: 102 B |
Before Width: | Height: | Size: 152 B |
Before Width: | Height: | Size: 160 B |
|
@ -62,8 +62,6 @@ Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingConfigurationLabelLanguage,
|
||||||
// NOLINTNEXTLINE
|
// NOLINTNEXTLINE
|
||||||
Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingAutoRefreshPatternMessage,
|
Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingAutoRefreshPatternMessage,
|
||||||
(QLatin1String("configuration/autoRefreshPatternMessage")))
|
(QLatin1String("configuration/autoRefreshPatternMessage")))
|
||||||
// NOLINTNEXTLINE
|
|
||||||
Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingToolPanelScaling, (QLatin1String("configuration/toolPanelScaling")))
|
|
||||||
|
|
||||||
Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingPathsLayout, (QLatin1String("paths/layout"))) // NOLINT
|
Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingPathsLayout, (QLatin1String("paths/layout"))) // NOLINT
|
||||||
Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingPathsLabelTemplate, (QLatin1String("paths/labels"))) // NOLINT
|
Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingPathsLabelTemplate, (QLatin1String("paths/labels"))) // NOLINT
|
||||||
|
@ -752,18 +750,6 @@ void VValentinaSettings::SetAutoRefreshPatternMessage(bool value)
|
||||||
setValue(*settingAutoRefreshPatternMessage, value);
|
setValue(*settingAutoRefreshPatternMessage, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
|
||||||
auto VValentinaSettings::GetToolPanelScaling() const -> bool
|
|
||||||
{
|
|
||||||
return value(*settingToolPanelScaling, false).toBool();
|
|
||||||
}
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
|
||||||
void VValentinaSettings::SetToolPanelScaling(const bool &value)
|
|
||||||
{
|
|
||||||
setValue(*settingToolPanelScaling, value);
|
|
||||||
}
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
auto VValentinaSettings::GetLayoutExportFormat() const -> qint8
|
auto VValentinaSettings::GetLayoutExportFormat() const -> qint8
|
||||||
{
|
{
|
||||||
|
|
|
@ -170,9 +170,6 @@ public:
|
||||||
auto GetAutoRefreshPatternMessage() const -> bool;
|
auto GetAutoRefreshPatternMessage() const -> bool;
|
||||||
void SetAutoRefreshPatternMessage(bool value);
|
void SetAutoRefreshPatternMessage(bool value);
|
||||||
|
|
||||||
auto GetToolPanelScaling() const -> bool;
|
|
||||||
void SetToolPanelScaling(const bool &value);
|
|
||||||
|
|
||||||
auto GetLayoutExportFormat() const -> qint8;
|
auto GetLayoutExportFormat() const -> qint8;
|
||||||
void SetLayoutExportFormat(qint8 format);
|
void SetLayoutExportFormat(qint8 format);
|
||||||
|
|
||||||
|
|
36
src/libs/vwidgets/vtoolbuttonpopup.cpp
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
/************************************************************************
|
||||||
|
**
|
||||||
|
** @file vtoolbuttonpopup.cpp
|
||||||
|
** @author Roman Telezhynskyi <dismine(at)gmail.com>
|
||||||
|
** @date 8 7, 2023
|
||||||
|
**
|
||||||
|
** @brief
|
||||||
|
** @copyright
|
||||||
|
** This source code is part of the Valentina project, a pattern making
|
||||||
|
** program, whose allow create and modeling patterns of clothing.
|
||||||
|
** Copyright (C) 2023 Valentina project
|
||||||
|
** <https://gitlab.com/smart-pattern/valentina> All Rights Reserved.
|
||||||
|
**
|
||||||
|
** Valentina is free software: you can redistribute it and/or modify
|
||||||
|
** it under the terms of the GNU General Public License as published by
|
||||||
|
** the Free Software Foundation, either version 3 of the License, or
|
||||||
|
** (at your option) any later version.
|
||||||
|
**
|
||||||
|
** Valentina is distributed in the hope that it will be useful,
|
||||||
|
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
** GNU General Public License for more details.
|
||||||
|
**
|
||||||
|
** You should have received a copy of the GNU General Public License
|
||||||
|
** along with Valentina. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
**
|
||||||
|
*************************************************************************/
|
||||||
|
#include "vtoolbuttonpopup.h"
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
VToolButtonPopup::VToolButtonPopup(QWidget *parent)
|
||||||
|
: QToolButton(parent)
|
||||||
|
{
|
||||||
|
setPopupMode(QToolButton::MenuButtonPopup);
|
||||||
|
QObject::connect(this, &QToolButton::triggered, this, &QToolButton::setDefaultAction);
|
||||||
|
}
|
49
src/libs/vwidgets/vtoolbuttonpopup.h
Normal file
|
@ -0,0 +1,49 @@
|
||||||
|
/************************************************************************
|
||||||
|
**
|
||||||
|
** @file vtoolbuttonpopup.h
|
||||||
|
** @author Roman Telezhynskyi <dismine(at)gmail.com>
|
||||||
|
** @date 8 7, 2023
|
||||||
|
**
|
||||||
|
** @brief
|
||||||
|
** @copyright
|
||||||
|
** This source code is part of the Valentina project, a pattern making
|
||||||
|
** program, whose allow create and modeling patterns of clothing.
|
||||||
|
** Copyright (C) 2023 Valentina project
|
||||||
|
** <https://gitlab.com/smart-pattern/valentina> All Rights Reserved.
|
||||||
|
**
|
||||||
|
** Valentina is free software: you can redistribute it and/or modify
|
||||||
|
** it under the terms of the GNU General Public License as published by
|
||||||
|
** the Free Software Foundation, either version 3 of the License, or
|
||||||
|
** (at your option) any later version.
|
||||||
|
**
|
||||||
|
** Valentina is distributed in the hope that it will be useful,
|
||||||
|
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
** GNU General Public License for more details.
|
||||||
|
**
|
||||||
|
** You should have received a copy of the GNU General Public License
|
||||||
|
** along with Valentina. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
**
|
||||||
|
*************************************************************************/
|
||||||
|
#ifndef VTOOLBUTTONPOPUP_H
|
||||||
|
#define VTOOLBUTTONPOPUP_H
|
||||||
|
|
||||||
|
#include <QToolButton>
|
||||||
|
|
||||||
|
#if QT_VERSION < QT_VERSION_CHECK(5, 13, 0)
|
||||||
|
#include "../vmisc/defglobal.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
class VToolButtonPopup : public QToolButton
|
||||||
|
{
|
||||||
|
Q_OBJECT // NOLINT
|
||||||
|
|
||||||
|
public:
|
||||||
|
explicit VToolButtonPopup(QWidget *parent = nullptr);
|
||||||
|
~VToolButtonPopup() override = default;
|
||||||
|
|
||||||
|
private:
|
||||||
|
Q_DISABLE_COPY_MOVE(VToolButtonPopup) // NOLINT
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // VTOOLBUTTONPOPUP_H
|
|
@ -29,7 +29,8 @@ SOURCES += \
|
||||||
$$PWD/vlineedit.cpp \
|
$$PWD/vlineedit.cpp \
|
||||||
$$PWD/vplaintextedit.cpp \
|
$$PWD/vplaintextedit.cpp \
|
||||||
$$PWD/vhighlighter.cpp \
|
$$PWD/vhighlighter.cpp \
|
||||||
$$PWD/vpiecegrainline.cpp
|
$$PWD/vpiecegrainline.cpp \
|
||||||
|
$$PWD/vtoolbuttonpopup.cpp
|
||||||
|
|
||||||
*msvc*:SOURCES += $$PWD/stable.cpp
|
*msvc*:SOURCES += $$PWD/stable.cpp
|
||||||
|
|
||||||
|
@ -63,4 +64,6 @@ HEADERS += \
|
||||||
$$PWD/vplaintextedit.h \
|
$$PWD/vplaintextedit.h \
|
||||||
$$PWD/vhighlighter.h \
|
$$PWD/vhighlighter.h \
|
||||||
$$PWD/vpiecegrainline.h \
|
$$PWD/vpiecegrainline.h \
|
||||||
$$PWD/vpiecegrainline_p.h
|
$$PWD/vpiecegrainline_p.h \
|
||||||
|
$$PWD/vtoolbuttonpopup.h
|
||||||
|
|
||||||
|
|
|
@ -19,6 +19,8 @@ VLib {
|
||||||
"velidedlabel.cpp",
|
"velidedlabel.cpp",
|
||||||
"vmaingraphicsscene.cpp",
|
"vmaingraphicsscene.cpp",
|
||||||
"vmaingraphicsview.cpp",
|
"vmaingraphicsview.cpp",
|
||||||
|
"vtoolbuttonpopup.cpp",
|
||||||
|
"vtoolbuttonpopup.h",
|
||||||
"vwidgetpopup.cpp",
|
"vwidgetpopup.cpp",
|
||||||
"vcontrolpointspline.cpp",
|
"vcontrolpointspline.cpp",
|
||||||
"vgraphicssimpletextitem.cpp",
|
"vgraphicssimpletextitem.cpp",
|
||||||
|
@ -69,7 +71,7 @@ VLib {
|
||||||
"vhighlighter.h",
|
"vhighlighter.h",
|
||||||
"vpiecegrainline.h",
|
"vpiecegrainline.h",
|
||||||
"vpiecegrainline.cpp",
|
"vpiecegrainline.cpp",
|
||||||
"vpiecegrainline_p.h"
|
"vpiecegrainline_p.h",
|
||||||
]
|
]
|
||||||
|
|
||||||
Export {
|
Export {
|
||||||
|
|