Support for dark theme for custom icons.
|
@ -33,6 +33,7 @@
|
|||
#include <QPainter>
|
||||
|
||||
#include "../layout/vppiece.h"
|
||||
#include "../vmisc/theme/vscenestylesheet.h"
|
||||
|
||||
#include <QLoggingCategory>
|
||||
|
||||
|
@ -44,18 +45,17 @@ Q_LOGGING_CATEGORY(pCarrouselPiece, "p.carrouselPiece") // NOLINT
|
|||
|
||||
QT_WARNING_POP
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
VPCarrouselPiece::VPCarrouselPiece(const VPPiecePtr &piece, QListWidget* parent) :
|
||||
QListWidgetItem(parent, Type),
|
||||
VPCarrouselPiece::VPCarrouselPiece(const VPPiecePtr &piece, QListWidget *parent)
|
||||
: QListWidgetItem(parent, Type),
|
||||
m_piece(piece)
|
||||
{
|
||||
SCASSERT(m_piece != nullptr)
|
||||
int width = 120 - 8;
|
||||
QFontMetrics metrix = QFontMetrics(QFont());
|
||||
QString clippedText = metrix.elidedText(piece->GetName(), Qt::ElideRight, width);
|
||||
setIcon(CreatePieceIcon(QSize(120, 120)));
|
||||
const int width = 120 - 8;
|
||||
QString clippedText = QFontMetrics(font()).elidedText(piece->GetName(), Qt::ElideRight, width);
|
||||
RefreshPieceIcon();
|
||||
setText(clippedText);
|
||||
setToolTip(piece->GetName());
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
@ -74,6 +74,12 @@ void VPCarrouselPiece::RefreshSelection()
|
|||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VPCarrouselPiece::RefreshPieceIcon()
|
||||
{
|
||||
setIcon(CreatePieceIcon(QSize(120, 120)));
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
auto VPCarrouselPiece::CreatePieceIcon(const QSize &size, bool isDragIcon) const -> QIcon
|
||||
{
|
||||
|
@ -93,25 +99,19 @@ auto VPCarrouselPiece::CreatePieceIcon(const QSize &size, bool isDragIcon) const
|
|||
QVector<QIcon::Mode> iconModes;
|
||||
iconModes.append(QIcon::Normal);
|
||||
|
||||
if(not isDragIcon)
|
||||
if (not isDragIcon)
|
||||
{
|
||||
iconModes.append(QIcon::Selected);
|
||||
}
|
||||
|
||||
QIcon icon;
|
||||
|
||||
for(auto iconMode : iconModes)
|
||||
const VManualLayoutStyle &style = VSceneStylesheet::ManualLayoutStyle();
|
||||
|
||||
for (auto iconMode : iconModes)
|
||||
{
|
||||
QPixmap pixmap(size);
|
||||
|
||||
if(not isDragIcon)
|
||||
{
|
||||
pixmap.fill(QColor(Qt::white));
|
||||
}
|
||||
else
|
||||
{
|
||||
pixmap.fill(QColor(Qt::transparent));
|
||||
}
|
||||
pixmap.fill(not isDragIcon ? style.CarrouselPieceBackgroundColor() : QColor(Qt::transparent));
|
||||
|
||||
QPainter painter;
|
||||
painter.begin(&pixmap);
|
||||
|
@ -122,34 +122,28 @@ auto VPCarrouselPiece::CreatePieceIcon(const QSize &size, bool isDragIcon) const
|
|||
|
||||
painter.translate(spacing, spacing);
|
||||
|
||||
qreal scaleFactorX = canvasSize * 100 / (size.width() - spacing*2) / 100;
|
||||
qreal scaleFactorY = canvasSize * 100 / (size.height() - spacing*2) / 100;
|
||||
painter.scale(1./scaleFactorX, 1./scaleFactorY);
|
||||
painter.setPen(QPen(Qt::black, 0.8*qMax(scaleFactorX, scaleFactorY)));
|
||||
qreal scaleFactorX = canvasSize * 100 / (size.width() - spacing * 2) / 100;
|
||||
qreal scaleFactorY = canvasSize * 100 / (size.height() - spacing * 2) / 100;
|
||||
painter.scale(1. / scaleFactorX, 1. / scaleFactorY);
|
||||
painter.setPen(QPen(style.CarrouselPieceColor(), 0.8 * qMax(scaleFactorX, scaleFactorY)));
|
||||
|
||||
if(not isDragIcon)
|
||||
if (not isDragIcon)
|
||||
{
|
||||
painter.translate(dx, dy);
|
||||
}
|
||||
else
|
||||
{
|
||||
painter.translate(-boundingRect.topLeft().x()+spacing, -boundingRect.topLeft().y()+spacing);
|
||||
painter.translate(-boundingRect.topLeft().x() + spacing, -boundingRect.topLeft().y() + spacing);
|
||||
}
|
||||
|
||||
if(iconMode == QIcon::Selected)
|
||||
{
|
||||
painter.setBrush(QBrush(QColor(255,160,160,60)));
|
||||
}
|
||||
else
|
||||
{
|
||||
painter.setBrush(QBrush(Qt::white));
|
||||
}
|
||||
painter.setBrush(QBrush(iconMode == QIcon::Selected ? style.CarrouselPieceSelectedColor()
|
||||
: style.CarrouselPieceForegroundColor()));
|
||||
|
||||
piece->DrawMiniature(painter);
|
||||
|
||||
painter.end();
|
||||
|
||||
icon.addPixmap(pixmap,iconMode);
|
||||
icon.addPixmap(pixmap, iconMode);
|
||||
}
|
||||
|
||||
return icon;
|
||||
|
|
|
@ -58,6 +58,8 @@ public:
|
|||
*/
|
||||
void RefreshSelection();
|
||||
|
||||
void RefreshPieceIcon();
|
||||
|
||||
/**
|
||||
* @brief CreatePieceIcon Creates an icon of the piece of given size
|
||||
* @param size of the icon
|
||||
|
|
|
@ -27,24 +27,25 @@
|
|||
*************************************************************************/
|
||||
#include "vpcarrouselpiecelist.h"
|
||||
|
||||
#include <QApplication>
|
||||
#include <QDrag>
|
||||
#include <QDragMoveEvent>
|
||||
#include <QPainter>
|
||||
#include <QApplication>
|
||||
#include <QLoggingCategory>
|
||||
#include <QMenu>
|
||||
#include <QPainter>
|
||||
|
||||
#include "../layout/vplayout.h"
|
||||
#include "../layout/vppiece.h"
|
||||
#include "../layout/vpsheet.h"
|
||||
#include "../undocommands/vpundomovepieceonsheet.h"
|
||||
#include "../vmisc/theme/vtheme.h"
|
||||
#include "vpcarrousel.h"
|
||||
#include "vpcarrouselpiece.h"
|
||||
#include "vpmimedatapiece.h"
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
|
||||
#include "../vmisc/backport/qoverload.h"
|
||||
#endif // QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
|
||||
#include "vpmimedatapiece.h"
|
||||
#include "../layout/vpsheet.h"
|
||||
#include "../layout/vplayout.h"
|
||||
#include "../undocommands/vpundomovepieceonsheet.h"
|
||||
#include "../layout/vppiece.h"
|
||||
|
||||
#include <QLoggingCategory>
|
||||
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_CLANG("-Wmissing-prototypes")
|
||||
|
@ -55,14 +56,29 @@ Q_LOGGING_CATEGORY(pCarrouselPieceList, "p.carrouselPieceList") // NOLINT
|
|||
QT_WARNING_POP
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
VPCarrouselPieceList::VPCarrouselPieceList(QWidget* parent) :
|
||||
QListWidget(parent)
|
||||
VPCarrouselPieceList::VPCarrouselPieceList(QWidget *parent)
|
||||
: QListWidget(parent)
|
||||
{
|
||||
setStyleSheet("QListWidget::item{border: 2px solid transparent; color: black;} "
|
||||
"QListWidget::item:selected {border: 2px solid rgb(255,160,160);}");
|
||||
InitStyleSheet();
|
||||
setContextMenuPolicy(Qt::DefaultContextMenu);
|
||||
setSelectionMode(QAbstractItemView::MultiSelection);
|
||||
setViewMode(QListView::IconMode);
|
||||
|
||||
// Because we cannot control icon color with stylesheet we must wait until scene style update. It happens after
|
||||
// the palette change signal.
|
||||
connect(VTheme::Instance(), &VTheme::ThemeSettingsChanged, this,
|
||||
[this]()
|
||||
{
|
||||
for (int i = 0; i < count(); ++i)
|
||||
{
|
||||
if (auto *pieceItem = dynamic_cast<VPCarrouselPiece *>(item(i)))
|
||||
{
|
||||
pieceItem->RefreshPieceIcon();
|
||||
}
|
||||
}
|
||||
|
||||
InitStyleSheet();
|
||||
});
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
@ -76,20 +92,22 @@ void VPCarrouselPieceList::Refresh()
|
|||
{
|
||||
clear();
|
||||
|
||||
if(not m_pieceList.isEmpty())
|
||||
if (m_pieceList.isEmpty())
|
||||
{
|
||||
// create the corresponding carrousel pieces
|
||||
for (const auto &piece : qAsConst(m_pieceList)) // NOLINT(clang-analyzer-cplusplus.NewDeleteLeaks)
|
||||
{
|
||||
if (not piece.isNull())
|
||||
{
|
||||
// update the label of the piece
|
||||
auto* carrouselpiece = new VPCarrouselPiece(piece, this);
|
||||
carrouselpiece->setSelected(piece->IsSelected());
|
||||
}
|
||||
}
|
||||
sortItems();
|
||||
return;
|
||||
}
|
||||
|
||||
// create the corresponding carrousel pieces
|
||||
for (const auto &piece : qAsConst(m_pieceList)) // NOLINT(clang-analyzer-cplusplus.NewDeleteLeaks)
|
||||
{
|
||||
if (not piece.isNull())
|
||||
{
|
||||
// update the label of the piece
|
||||
auto *carrouselpiece = new VPCarrouselPiece(piece, this);
|
||||
carrouselpiece->setSelected(piece->IsSelected());
|
||||
}
|
||||
}
|
||||
sortItems();
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
@ -111,8 +129,8 @@ void VPCarrouselPieceList::mousePressEvent(QMouseEvent *event)
|
|||
if (!(event->modifiers() & Qt::ControlModifier))
|
||||
{
|
||||
// clearSelection doesn't work properly here so we go through the elements.
|
||||
const QList<QListWidgetItem*> items = selectedItems();
|
||||
for(auto *item: items)
|
||||
const QList<QListWidgetItem *> items = selectedItems();
|
||||
for (auto *item : items)
|
||||
{
|
||||
item->setSelected(false);
|
||||
}
|
||||
|
@ -142,10 +160,10 @@ void VPCarrouselPieceList::startDrag(Qt::DropActions supportedActions)
|
|||
{
|
||||
Q_UNUSED(supportedActions)
|
||||
|
||||
QListWidgetItem* _item = currentItem();
|
||||
if(_item->type() == VPCarrouselPiece::Type)
|
||||
QListWidgetItem *_item = currentItem();
|
||||
if (_item->type() == VPCarrouselPiece::Type)
|
||||
{
|
||||
auto *pieceItem = dynamic_cast<VPCarrouselPiece *> (_item);
|
||||
auto *pieceItem = dynamic_cast<VPCarrouselPiece *>(_item);
|
||||
SCASSERT(pieceItem != nullptr)
|
||||
|
||||
if (m_carrousel == nullptr)
|
||||
|
@ -169,7 +187,7 @@ void VPCarrouselPieceList::startDrag(Qt::DropActions supportedActions)
|
|||
|
||||
drag->setDragCursor(VPMimeDataPiece::DragCursor(pixmap), Qt::MoveAction);
|
||||
drag->setMimeData(mimeData);
|
||||
if(drag->exec() == Qt::MoveAction)
|
||||
if (drag->exec() == Qt::MoveAction)
|
||||
{
|
||||
m_carrousel->Refresh();
|
||||
piece->SetSelected(false);
|
||||
|
@ -184,7 +202,7 @@ void VPCarrouselPieceList::startDrag(Qt::DropActions supportedActions)
|
|||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VPCarrouselPieceList::dragMoveEvent(QDragMoveEvent* e)
|
||||
void VPCarrouselPieceList::dragMoveEvent(QDragMoveEvent *e)
|
||||
{
|
||||
qCDebug(pCarrouselPieceList, "drag move");
|
||||
e->acceptProposedAction();
|
||||
|
@ -193,13 +211,13 @@ void VPCarrouselPieceList::dragMoveEvent(QDragMoveEvent* e)
|
|||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VPCarrouselPieceList::contextMenuEvent(QContextMenuEvent *event)
|
||||
{
|
||||
QListWidgetItem* _item = currentItem();
|
||||
if(_item == nullptr || _item->type() != VPCarrouselPiece::Type)
|
||||
QListWidgetItem *_item = currentItem();
|
||||
if (_item == nullptr || _item->type() != VPCarrouselPiece::Type)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
auto *pieceItem = dynamic_cast<VPCarrouselPiece *> (_item);
|
||||
auto *pieceItem = dynamic_cast<VPCarrouselPiece *>(_item);
|
||||
SCASSERT(pieceItem != nullptr)
|
||||
|
||||
VPPiecePtr piece = pieceItem->GetPiece();
|
||||
|
@ -212,7 +230,7 @@ void VPCarrouselPieceList::contextMenuEvent(QContextMenuEvent *event)
|
|||
|
||||
QMenu menu;
|
||||
|
||||
QVector<QAction*> moveToActions;
|
||||
QVector<QAction *> moveToActions;
|
||||
|
||||
if (not piece->Sheet().isNull())
|
||||
{
|
||||
|
@ -227,7 +245,7 @@ void VPCarrouselPieceList::contextMenuEvent(QContextMenuEvent *event)
|
|||
{
|
||||
if (not sheet.isNull())
|
||||
{
|
||||
QAction* moveToSheet = moveMenu->addAction(sheet->GetName());
|
||||
QAction *moveToSheet = moveMenu->addAction(sheet->GetName());
|
||||
moveToSheet->setData(QVariant::fromValue(sheet));
|
||||
moveToActions.append(moveToSheet);
|
||||
}
|
||||
|
@ -244,13 +262,13 @@ void VPCarrouselPieceList::contextMenuEvent(QContextMenuEvent *event)
|
|||
QAction *removeAction = menu.addAction(tr("Remove from Sheet"));
|
||||
removeAction->setVisible(false);
|
||||
|
||||
if(not m_pieceList.isEmpty() && ConstFirst(m_pieceList)->Sheet() == nullptr)
|
||||
if (not m_pieceList.isEmpty() && ConstFirst(m_pieceList)->Sheet() == nullptr)
|
||||
{
|
||||
moveAction->setVisible(true);
|
||||
deleteAction->setVisible(true);
|
||||
}
|
||||
|
||||
if(not m_pieceList.isEmpty() && ConstFirst(m_pieceList)->Sheet() != nullptr)
|
||||
if (not m_pieceList.isEmpty() && ConstFirst(m_pieceList)->Sheet() != nullptr)
|
||||
{
|
||||
removeAction->setVisible(true);
|
||||
}
|
||||
|
@ -287,16 +305,31 @@ void VPCarrouselPieceList::contextMenuEvent(QContextMenuEvent *event)
|
|||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VPCarrouselPieceList::InitStyleSheet()
|
||||
{
|
||||
if (VTheme::ColorSheme() == VColorSheme::Dark)
|
||||
{
|
||||
setStyleSheet("QListWidget::item{border: 2px solid transparent;}"
|
||||
"QListWidget::item:selected {border: 2px solid rgb(255,160,160);}");
|
||||
}
|
||||
else
|
||||
{
|
||||
setStyleSheet("QListWidget::item{border: 2px solid transparent; color: black;} "
|
||||
"QListWidget::item:selected {border: 2px solid rgb(255,160,160);}");
|
||||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VPCarrouselPieceList::on_SelectionChangedExternal()
|
||||
{
|
||||
blockSignals(true);
|
||||
for(int i = 0; i < count(); ++i)
|
||||
for (int i = 0; i < count(); ++i)
|
||||
{
|
||||
QListWidgetItem* _item = item(i);
|
||||
if(_item->type() == VPCarrouselPiece::Type)
|
||||
QListWidgetItem *_item = item(i);
|
||||
if (_item->type() == VPCarrouselPiece::Type)
|
||||
{
|
||||
auto *itemPiece = dynamic_cast<VPCarrouselPiece *> (_item);
|
||||
auto *itemPiece = dynamic_cast<VPCarrouselPiece *>(_item);
|
||||
SCASSERT(itemPiece != nullptr)
|
||||
itemPiece->RefreshSelection();
|
||||
}
|
||||
|
|
|
@ -33,12 +33,12 @@
|
|||
|
||||
#include "vpcarrousel.h"
|
||||
|
||||
|
||||
class VPCarrouselPieceList : public QListWidget
|
||||
{
|
||||
Q_OBJECT // NOLINT
|
||||
|
||||
public:
|
||||
explicit VPCarrouselPieceList(QWidget* parent);
|
||||
explicit VPCarrouselPieceList(QWidget *parent);
|
||||
~VPCarrouselPieceList() override = default;
|
||||
|
||||
/**
|
||||
|
@ -66,7 +66,7 @@ public slots:
|
|||
|
||||
protected:
|
||||
void startDrag(Qt::DropActions supportedActions) override;
|
||||
void dragMoveEvent(QDragMoveEvent* e) override;
|
||||
void dragMoveEvent(QDragMoveEvent *e) override;
|
||||
|
||||
void mousePressEvent(QMouseEvent *event) override;
|
||||
void mouseMoveEvent(QMouseEvent *event) override;
|
||||
|
@ -79,6 +79,8 @@ private:
|
|||
QList<VPPiecePtr> m_pieceList{};
|
||||
QPoint m_dragStart{};
|
||||
VPCarrousel *m_carrousel{nullptr};
|
||||
|
||||
void InitStyleSheet();
|
||||
};
|
||||
|
||||
#endif // VPCARROUSELPIECELIST_H
|
||||
|
|
|
@ -87,7 +87,7 @@
|
|||
<item>
|
||||
<widget class="QToolButton" name="toolButtonSheetPortraitOritation">
|
||||
<property name="text">
|
||||
<string notr="true">...</string>
|
||||
<string notr="true"></string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../../../../libs/vmisc/share/resources/icon.qrc">
|
||||
|
@ -107,7 +107,7 @@
|
|||
<item>
|
||||
<widget class="QToolButton" name="toolButtonSheetLandscapeOrientation">
|
||||
<property name="text">
|
||||
<string notr="true">...</string>
|
||||
<string notr="true"></string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../../../../libs/vmisc/share/resources/icon.qrc">
|
||||
|
@ -475,7 +475,7 @@
|
|||
<item>
|
||||
<widget class="QToolButton" name="toolButtonTilePortraitOrientation">
|
||||
<property name="text">
|
||||
<string notr="true">...</string>
|
||||
<string notr="true"></string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../../../../libs/vmisc/share/resources/icon.qrc">
|
||||
|
@ -495,7 +495,7 @@
|
|||
<item>
|
||||
<widget class="QToolButton" name="toolButtonTileLandscapeOrientation">
|
||||
<property name="text">
|
||||
<string notr="true">...</string>
|
||||
<string notr="true"></string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../../../../libs/vmisc/share/resources/icon.qrc">
|
||||
|
|
|
@ -33,6 +33,8 @@
|
|||
#include "../scene/vpgraphicstilegrid.h"
|
||||
#include "../vpapplication.h"
|
||||
#include "../vwidgets/vmaingraphicsscene.h"
|
||||
#include "theme/vscenestylesheet.h"
|
||||
#include "theme/vstylesheetstyle.h"
|
||||
#include "vplayout.h"
|
||||
#include "vppiece.h"
|
||||
|
||||
|
@ -121,6 +123,9 @@ void VPSheetSceneData::RefreshPieces()
|
|||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VPSheetSceneData::PrepareForExport()
|
||||
{
|
||||
VStylesheetStyle::SetExportColorScheme(ExportColorScheme::BackAndWhite);
|
||||
VSceneStylesheet::ResetStyles();
|
||||
|
||||
m_graphicsSheet->SetShowBorder(false);
|
||||
m_graphicsSheet->SetShowMargin(false);
|
||||
|
||||
|
@ -161,6 +166,9 @@ void VPSheetSceneData::PrepareForExport()
|
|||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VPSheetSceneData::CleanAfterExport()
|
||||
{
|
||||
VStylesheetStyle::SetExportColorScheme(ExportColorScheme::Default);
|
||||
VSceneStylesheet::ResetStyles();
|
||||
|
||||
m_graphicsSheet->SetShowBorder(true);
|
||||
m_graphicsSheet->SetShowMargin(true);
|
||||
|
||||
|
|
|
@ -59,6 +59,7 @@ auto main(int argc, char *argv[]) -> int
|
|||
Q_INIT_RESOURCE(flags); // NOLINT
|
||||
Q_INIT_RESOURCE(breeze); // NOLINT
|
||||
Q_INIT_RESOURCE(cursor); // NOLINT
|
||||
Q_INIT_RESOURCE(scenestyle); // NOLINT
|
||||
#if defined(Q_OS_MACX)
|
||||
Q_INIT_RESOURCE(mac_theme); // NOLINT
|
||||
#else
|
||||
|
|
|
@ -50,6 +50,7 @@
|
|||
#include "../vmisc/svgfont/vsvgfont.h"
|
||||
#include "../vmisc/svgfont/vsvgfontdatabase.h"
|
||||
#include "../vmisc/svgfont/vsvgfontengine.h"
|
||||
#include "../vmisc/theme/vscenestylesheet.h"
|
||||
#include "../vpapplication.h"
|
||||
#include "compatibility.h"
|
||||
#include "undocommands/vpundomovepieceonsheet.h"
|
||||
|
@ -72,14 +73,6 @@ QT_WARNING_POP
|
|||
|
||||
namespace
|
||||
{
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_CLANG("-Wunused-member-function")
|
||||
|
||||
Q_GLOBAL_STATIC_WITH_ARGS(QColor, mainColor, (Qt::black)) // NOLINT
|
||||
Q_GLOBAL_STATIC_WITH_ARGS(QColor, errorColor, (Qt::red)) // NOLINT
|
||||
|
||||
QT_WARNING_POP
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
inline auto LineMatrix(const VPPiecePtr &piece, const QPointF &topLeft, qreal angle, const QPointF &linePos,
|
||||
int maxLineWidth) -> QTransform
|
||||
|
@ -789,11 +782,11 @@ void VPGraphicsPiece::PaintStickyPath(QPainter *painter)
|
|||
if (painter != nullptr)
|
||||
{
|
||||
painter->save();
|
||||
painter->setBrush(QBrush(Qt::BDiagPattern));
|
||||
painter->setBrush(QBrush(VSceneStylesheet::ManualLayoutStyle().PieceOkColor(), Qt::BDiagPattern));
|
||||
|
||||
QPen pen = painter->pen();
|
||||
pen.setStyle(Qt::DashLine);
|
||||
pen.setColor(*mainColor);
|
||||
pen.setColor(VSceneStylesheet::ManualLayoutStyle().PieceOkColor());
|
||||
painter->setPen(pen);
|
||||
|
||||
painter->drawPath(m_stickyPath);
|
||||
|
@ -876,13 +869,13 @@ auto VPGraphicsPiece::PieceColor() const -> QColor
|
|||
VPPiecePtr piece = m_piece.toStrongRef();
|
||||
if (piece.isNull())
|
||||
{
|
||||
return *mainColor;
|
||||
return VSceneStylesheet::ManualLayoutStyle().PieceOkColor();
|
||||
}
|
||||
|
||||
VPLayoutPtr layout = piece->Layout();
|
||||
if (layout.isNull())
|
||||
{
|
||||
return *mainColor;
|
||||
return VSceneStylesheet::ManualLayoutStyle().PieceOkColor();
|
||||
}
|
||||
|
||||
bool outOfBound = false;
|
||||
|
@ -899,16 +892,16 @@ auto VPGraphicsPiece::PieceColor() const -> QColor
|
|||
|
||||
if (outOfBound || superposition)
|
||||
{
|
||||
return *errorColor;
|
||||
return VSceneStylesheet::ManualLayoutStyle().PieceErrorColor();
|
||||
}
|
||||
|
||||
return *mainColor;
|
||||
return VSceneStylesheet::ManualLayoutStyle().PieceOkColor();
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
auto VPGraphicsPiece::NoBrush() const -> QBrush
|
||||
{
|
||||
return m_hoverMode ? QBrush(QColor(199, 244, 249, 60)) : QBrush(Qt::NoBrush);
|
||||
return m_hoverMode ? QBrush(VSceneStylesheet::ManualLayoutStyle().PieceHoverColor()) : QBrush(Qt::NoBrush);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
#include <QFileInfo>
|
||||
#include <QGraphicsScene>
|
||||
#include <QGraphicsSceneMouseEvent>
|
||||
#include <QGraphicsView>
|
||||
#include <QGuiApplication>
|
||||
#include <QIcon>
|
||||
#include <QPainter>
|
||||
|
@ -43,10 +44,9 @@
|
|||
#include "../undocommands/vpundooriginmove.h"
|
||||
#include "../undocommands/vpundopiecerotate.h"
|
||||
#include "../vmisc/compatibility.h"
|
||||
#include "../vmisc/theme/vscenestylesheet.h"
|
||||
#include "../vmisc/theme/vtheme.h"
|
||||
#include "../vwidgets/global.h"
|
||||
#include "qgraphicsscene.h"
|
||||
#include "qgraphicsview.h"
|
||||
#include "qnamespace.h"
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(5, 5, 0)
|
||||
#include "../vmisc/diagnostic.h"
|
||||
|
@ -59,14 +59,6 @@ constexpr qreal penWidth = 2;
|
|||
const qreal centerRadius1 = 5;
|
||||
const qreal centerRadius2 = 10;
|
||||
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_CLANG("-Wunused-member-function")
|
||||
|
||||
Q_GLOBAL_STATIC_WITH_ARGS(const QColor, defaultColor, (Qt::black)) // NOLINT
|
||||
Q_GLOBAL_STATIC_WITH_ARGS(const QColor, hoverColor, (Qt::green)) // NOLINT
|
||||
|
||||
QT_WARNING_POP
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
auto TransformationOrigin(const VPLayoutPtr &layout, const QRectF &boundingRect) -> VPTransformationOrigon
|
||||
{
|
||||
|
@ -94,8 +86,7 @@ auto TransformationOrigin(const VPLayoutPtr &layout, const QRectF &boundingRect)
|
|||
//---------------------------------------------------------------------------------------------------------------------
|
||||
VPGraphicsTransformationOrigin::VPGraphicsTransformationOrigin(const VPLayoutPtr &layout, QGraphicsItem *parent)
|
||||
: QGraphicsObject(parent),
|
||||
m_layout(layout),
|
||||
m_color(*defaultColor)
|
||||
m_layout(layout)
|
||||
{
|
||||
SCASSERT(m_layout != nullptr)
|
||||
setCursor(Qt::OpenHandCursor);
|
||||
|
@ -147,14 +138,14 @@ void VPGraphicsTransformationOrigin::paint(QPainter *painter, const QStyleOption
|
|||
|
||||
const qreal scale = SceneScale(scene());
|
||||
|
||||
QPen pen(m_color, penWidth / scale, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin);
|
||||
QPen pen(CurrentColor(), penWidth / scale, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin);
|
||||
|
||||
painter->setPen(pen);
|
||||
|
||||
if (m_originVisible)
|
||||
{
|
||||
painter->save();
|
||||
painter->setBrush(QBrush(m_color));
|
||||
painter->setBrush(QBrush(CurrentColor()));
|
||||
painter->drawPath(Center1());
|
||||
painter->restore();
|
||||
|
||||
|
@ -221,14 +212,14 @@ void VPGraphicsTransformationOrigin::mouseReleaseEvent(QGraphicsSceneMouseEvent
|
|||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VPGraphicsTransformationOrigin::hoverEnterEvent(QGraphicsSceneHoverEvent *event)
|
||||
{
|
||||
m_color = *hoverColor;
|
||||
m_hoverMode = true;
|
||||
QGraphicsObject::hoverEnterEvent(event);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VPGraphicsTransformationOrigin::hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
|
||||
{
|
||||
m_color = *defaultColor;
|
||||
m_hoverMode = false;
|
||||
QGraphicsObject::hoverEnterEvent(event);
|
||||
}
|
||||
|
||||
|
@ -249,7 +240,7 @@ auto VPGraphicsTransformationOrigin::RotationCenter(QPainter *painter) const ->
|
|||
if (painter != nullptr)
|
||||
{
|
||||
painter->save();
|
||||
painter->setBrush(QBrush(m_color));
|
||||
painter->setBrush(QBrush(CurrentColor()));
|
||||
painter->drawPath(Center1());
|
||||
painter->restore();
|
||||
}
|
||||
|
@ -304,6 +295,13 @@ auto VPGraphicsTransformationOrigin::Center2() const -> QPainterPath
|
|||
return center2;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
auto VPGraphicsTransformationOrigin::CurrentColor() const -> QColor
|
||||
{
|
||||
return m_hoverMode ? VSceneStylesheet::ManualLayoutStyle().PieceHandleHoverColor()
|
||||
: VSceneStylesheet::ManualLayoutStyle().PieceHandleColor();
|
||||
}
|
||||
|
||||
// VPGraphicsPieceControls
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
VPGraphicsPieceControls::VPGraphicsPieceControls(const VPLayoutPtr &layout, QGraphicsItem *parent)
|
||||
|
@ -571,34 +569,30 @@ void VPGraphicsPieceControls::InitPixmaps()
|
|||
m_handleHoverPixmaps.clear();
|
||||
m_handlePaths.clear();
|
||||
|
||||
auto InitPixmap = [this](VPHandleCornerType type, const QString &fileName)
|
||||
auto InitPixmap = [this](VPHandleCornerType type, const QString &imageName)
|
||||
{
|
||||
const QFileInfo fileInfo(fileName);
|
||||
const QString imageName = fileInfo.baseName();
|
||||
const QString fileName = QStringLiteral("32x32/%1.png").arg(imageName);
|
||||
const QString fileNameHover = QStringLiteral("32x32/%1-hover.png").arg(imageName);
|
||||
|
||||
const QString fileNameHover =
|
||||
QStringLiteral("%1/%2-hover.%3").arg(fileInfo.absolutePath(), imageName, fileInfo.suffix());
|
||||
const QString resource = QStringLiteral("icon");
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 5, 0)
|
||||
if (QGuiApplication::primaryScreen()->devicePixelRatio() >= 2)
|
||||
{
|
||||
const QString fileName2x =
|
||||
QStringLiteral("%1/%2@2x.%3").arg(fileInfo.absolutePath(), imageName, fileInfo.suffix());
|
||||
const QString fileName2x = QStringLiteral("32x32/%1@2x.png").arg(imageName);
|
||||
const QString fileName2xHover = QStringLiteral("32x32/%1-hover@2x.png").arg(imageName);
|
||||
|
||||
const QString fileName2xHover =
|
||||
QStringLiteral("%1/%2-hover@2x.%3").arg(fileInfo.absolutePath(), imageName, fileInfo.suffix());
|
||||
|
||||
m_handlePixmaps.insert(type, QPixmap(fileName2x));
|
||||
m_handleHoverPixmaps.insert(type, QPixmap(fileName2xHover));
|
||||
m_handlePixmaps.insert(type, VTheme::GetPixmapResource(resource, fileName2x));
|
||||
m_handleHoverPixmaps.insert(type, VTheme::GetPixmapResource(resource, fileName2xHover));
|
||||
}
|
||||
else
|
||||
{
|
||||
m_handlePixmaps.insert(type, QPixmap(fileName));
|
||||
m_handleHoverPixmaps.insert(type, QPixmap(fileNameHover));
|
||||
m_handlePixmaps.insert(type, VTheme::GetPixmapResource(resource, fileName));
|
||||
m_handleHoverPixmaps.insert(type, VTheme::GetPixmapResource(resource, fileNameHover));
|
||||
}
|
||||
#else
|
||||
m_handlePixmaps.insert(type, QPixmap(fileName));
|
||||
m_handleHoverPixmaps.insert(type, QPixmap(fileNameHover));
|
||||
m_handlePixmaps.insert(type, VTheme::GetPixmapResource(resource, fileName));
|
||||
m_handleHoverPixmaps.insert(type, VTheme::GetPixmapResource(resource, fileNameHover));
|
||||
#endif
|
||||
QPainterPath p = PixmapToPainterPath(m_handlePixmaps.value(type));
|
||||
p.setFillRule(Qt::WindingFill);
|
||||
|
@ -606,10 +600,10 @@ void VPGraphicsPieceControls::InitPixmaps()
|
|||
m_handlePaths.insert(type, p);
|
||||
};
|
||||
|
||||
InitPixmap(VPHandleCornerType::TopLeft, QStringLiteral("://icon/32x32/rotate-top-left.png"));
|
||||
InitPixmap(VPHandleCornerType::TopRight, QStringLiteral("://icon/32x32/rotate-top-right.png"));
|
||||
InitPixmap(VPHandleCornerType::BottomRight, QStringLiteral("://icon/32x32/rotate-bottom-right.png"));
|
||||
InitPixmap(VPHandleCornerType::BottomLeft, QStringLiteral("://icon/32x32/rotate-bottom-left.png"));
|
||||
InitPixmap(VPHandleCornerType::TopLeft, QStringLiteral("rotate-top-left"));
|
||||
InitPixmap(VPHandleCornerType::TopRight, QStringLiteral("rotate-top-right"));
|
||||
InitPixmap(VPHandleCornerType::BottomRight, QStringLiteral("rotate-bottom-right"));
|
||||
InitPixmap(VPHandleCornerType::BottomLeft, QStringLiteral("rotate-bottom-left"));
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -31,8 +31,8 @@
|
|||
#include <QColor>
|
||||
#include <QGraphicsObject>
|
||||
|
||||
#include "scenedef.h"
|
||||
#include "../layout/layoutdef.h"
|
||||
#include "scenedef.h"
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(5, 13, 0)
|
||||
#include "../vmisc/defglobal.h"
|
||||
|
@ -62,12 +62,16 @@ enum class VPHandleCornerType
|
|||
class VPGraphicsTransformationOrigin : public QGraphicsObject
|
||||
{
|
||||
Q_OBJECT // NOLINT
|
||||
|
||||
public:
|
||||
explicit VPGraphicsTransformationOrigin(const VPLayoutPtr &layout, QGraphicsItem * parent = nullptr);
|
||||
explicit VPGraphicsTransformationOrigin(const VPLayoutPtr &layout, QGraphicsItem *parent = nullptr);
|
||||
~VPGraphicsTransformationOrigin() override = default;
|
||||
|
||||
auto type() const -> int override {return Type;}
|
||||
enum { Type = UserType + static_cast<int>(PGraphicsItem::TransformationOrigin)};
|
||||
auto type() const -> int override { return Type; }
|
||||
enum
|
||||
{
|
||||
Type = UserType + static_cast<int>(PGraphicsItem::TransformationOrigin)
|
||||
};
|
||||
|
||||
public slots:
|
||||
void SetTransformationOrigin();
|
||||
|
@ -79,8 +83,8 @@ protected:
|
|||
auto shape() const -> QPainterPath override;
|
||||
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override;
|
||||
|
||||
void mousePressEvent(QGraphicsSceneMouseEvent * event) override;
|
||||
void mouseMoveEvent(QGraphicsSceneMouseEvent * event) override;
|
||||
void mousePressEvent(QGraphicsSceneMouseEvent *event) override;
|
||||
void mouseMoveEvent(QGraphicsSceneMouseEvent *event) override;
|
||||
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) override;
|
||||
|
||||
void hoverEnterEvent(QGraphicsSceneHoverEvent *event) override;
|
||||
|
@ -90,25 +94,31 @@ private:
|
|||
// cppcheck-suppress unknownMacro
|
||||
Q_DISABLE_COPY_MOVE(VPGraphicsTransformationOrigin) // NOLINT
|
||||
|
||||
bool m_originVisible{true};
|
||||
bool m_originVisible{true};
|
||||
VPLayoutWeakPtr m_layout{};
|
||||
QColor m_color;
|
||||
bool m_allowChangeMerge{false};
|
||||
bool m_hoverMode{false};
|
||||
bool m_allowChangeMerge{false};
|
||||
|
||||
auto RotationCenter(QPainter *painter = nullptr) const -> QPainterPath;
|
||||
auto Center1() const -> QPainterPath;
|
||||
auto Center2() const -> QPainterPath;
|
||||
|
||||
auto CurrentColor() const -> QColor;
|
||||
};
|
||||
|
||||
class VPGraphicsPieceControls : public QGraphicsObject
|
||||
{
|
||||
Q_OBJECT // NOLINT
|
||||
|
||||
public:
|
||||
explicit VPGraphicsPieceControls(const VPLayoutPtr &layout, QGraphicsItem * parent = nullptr);
|
||||
explicit VPGraphicsPieceControls(const VPLayoutPtr &layout, QGraphicsItem *parent = nullptr);
|
||||
~VPGraphicsPieceControls() override = default;
|
||||
|
||||
auto type() const -> int override {return Type;}
|
||||
enum { Type = UserType + static_cast<int>(PGraphicsItem::Handles)};
|
||||
auto type() const -> int override { return Type; }
|
||||
enum
|
||||
{
|
||||
Type = UserType + static_cast<int>(PGraphicsItem::Handles)
|
||||
};
|
||||
|
||||
void SetIgnorePieceTransformation(bool newIgnorePieceTransformation);
|
||||
|
||||
|
@ -135,17 +145,17 @@ protected:
|
|||
private:
|
||||
Q_DISABLE_COPY_MOVE(VPGraphicsPieceControls) // NOLINT
|
||||
|
||||
QRectF m_pieceRect{};
|
||||
QPointF m_rotationStartPoint{};
|
||||
qreal m_rotationSum{0};
|
||||
bool m_controlsVisible{false};
|
||||
QRectF m_pieceRect{};
|
||||
QPointF m_rotationStartPoint{};
|
||||
qreal m_rotationSum{0};
|
||||
bool m_controlsVisible{false};
|
||||
VPLayoutWeakPtr m_layout{};
|
||||
VPHandleCorner m_handleCorner{VPHandleCorner::Invalid};
|
||||
VPHandleCorner m_handleCorner{VPHandleCorner::Invalid};
|
||||
VPTransformationOrigon m_savedOrigin{};
|
||||
bool m_originSaved{false};
|
||||
bool allowChangeMerge{false};
|
||||
bool m_originSaved{false};
|
||||
bool allowChangeMerge{false};
|
||||
QList<VPPiecePtr> m_selectedPieces{};
|
||||
bool m_ignorePieceTransformation{false};
|
||||
bool m_ignorePieceTransformation{false};
|
||||
|
||||
QMap<VPHandleCornerType, QPixmap> m_handlePixmaps{};
|
||||
QMap<VPHandleCornerType, QPixmap> m_handleHoverPixmaps{};
|
||||
|
|
|
@ -29,14 +29,17 @@
|
|||
#include "vpgraphicssheet.h"
|
||||
#include "../layout/vplayout.h"
|
||||
#include "../layout/vpsheet.h"
|
||||
#include "qnamespace.h"
|
||||
#include "theme/vscenestylesheet.h"
|
||||
|
||||
#include <QtMath>
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
VPGraphicsSheet::VPGraphicsSheet(const VPLayoutPtr &layout, QGraphicsItem *parent):
|
||||
QGraphicsItem(parent),
|
||||
VPGraphicsSheet::VPGraphicsSheet(const VPLayoutPtr &layout, QGraphicsItem *parent)
|
||||
: QGraphicsItem(parent),
|
||||
m_layout(layout)
|
||||
{}
|
||||
{
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VPGraphicsSheet::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
|
||||
|
@ -44,36 +47,56 @@ void VPGraphicsSheet::paint(QPainter *painter, const QStyleOptionGraphicsItem *o
|
|||
Q_UNUSED(widget);
|
||||
Q_UNUSED(option);
|
||||
|
||||
QPen pen(QColor(0,179,255), 1, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin);
|
||||
pen.setCosmetic(true);
|
||||
QBrush noBrush(Qt::NoBrush);
|
||||
painter->setPen(pen);
|
||||
painter->setBrush(noBrush);
|
||||
|
||||
QRectF sheetRect = GetSheetRect();
|
||||
|
||||
if(m_showMargin)
|
||||
{
|
||||
painter->drawRect(GetMarginsRect());
|
||||
}
|
||||
|
||||
if(m_showBorder)
|
||||
{
|
||||
pen.setColor(Qt::black);
|
||||
|
||||
painter->setPen(pen);
|
||||
painter->drawRect(sheetRect);
|
||||
}
|
||||
bool ignoreMargins = true;
|
||||
|
||||
VPLayoutPtr layout = m_layout.toStrongRef();
|
||||
|
||||
if(not layout.isNull() && layout->LayoutSettings().GetShowGrid())
|
||||
if (!layout.isNull())
|
||||
{
|
||||
pen.setColor(QColor(204,204,204));
|
||||
VPSheetPtr sheet = layout->GetFocusedSheet();
|
||||
if (!sheet.isNull())
|
||||
{
|
||||
ignoreMargins = sheet->IgnoreMargins();
|
||||
}
|
||||
}
|
||||
|
||||
if (m_showMargin && !ignoreMargins)
|
||||
{
|
||||
QPen pen(VSceneStylesheet::ManualLayoutStyle().SheetMarginColor(), 1.5, Qt::SolidLine, Qt::RoundCap,
|
||||
Qt::RoundJoin);
|
||||
pen.setCosmetic(true);
|
||||
|
||||
painter->save();
|
||||
painter->setPen(pen);
|
||||
painter->drawRect(GetMarginsRect());
|
||||
painter->restore();
|
||||
}
|
||||
|
||||
QRectF sheetRect = GetSheetRect();
|
||||
|
||||
if (m_showBorder)
|
||||
{
|
||||
QPen pen(VSceneStylesheet::ManualLayoutStyle().SheetBorderColor(), 1.5, Qt::SolidLine, Qt::RoundCap,
|
||||
Qt::RoundJoin);
|
||||
pen.setCosmetic(true);
|
||||
|
||||
painter->save();
|
||||
painter->setPen(pen);
|
||||
painter->drawRect(sheetRect);
|
||||
painter->restore();
|
||||
}
|
||||
|
||||
if (not layout.isNull() && layout->LayoutSettings().GetShowGrid())
|
||||
{
|
||||
QPen pen(VSceneStylesheet::ManualLayoutStyle().SheetGridColor(), 1.5, Qt::SolidLine, Qt::RoundCap,
|
||||
Qt::RoundJoin);
|
||||
pen.setCosmetic(true);
|
||||
|
||||
painter->save();
|
||||
painter->setPen(pen);
|
||||
|
||||
qreal colWidth = layout->LayoutSettings().GetGridColWidth();
|
||||
if(colWidth > 0)
|
||||
if (colWidth > 0)
|
||||
{
|
||||
qreal colX = colWidth;
|
||||
while (colX < sheetRect.right())
|
||||
|
@ -85,7 +108,7 @@ void VPGraphicsSheet::paint(QPainter *painter, const QStyleOptionGraphicsItem *o
|
|||
}
|
||||
|
||||
qreal rowHeight = layout->LayoutSettings().GetGridRowHeight();
|
||||
if(rowHeight > 0)
|
||||
if (rowHeight > 0)
|
||||
{
|
||||
qreal rowY = rowHeight;
|
||||
|
||||
|
@ -96,6 +119,7 @@ void VPGraphicsSheet::paint(QPainter *painter, const QStyleOptionGraphicsItem *o
|
|||
rowY += rowHeight;
|
||||
}
|
||||
}
|
||||
painter->restore();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#include "vpgraphicstilegrid.h"
|
||||
|
||||
#include "../vptilefactory.h"
|
||||
#include "../layout/vplayout.h"
|
||||
#include "../layout/vpsheet.h"
|
||||
#include "../vmisc/vmath.h"
|
||||
#include "../vmisc/theme/vscenestylesheet.h"
|
||||
#include "../vptilefactory.h"
|
||||
#include "../vwidgets/global.h"
|
||||
|
||||
#include <QFileInfo>
|
||||
|
@ -29,8 +29,8 @@ auto SheetMargins(const VPSheetPtr &sheet) -> QMarginsF
|
|||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
auto OptimizeFontSizeToFitTextInRect(QPainter *painter, const QRectF &drawRect, const QString &text,
|
||||
int flags = Qt::TextDontClip|Qt::TextWordWrap, double goalError = 0.01,
|
||||
int maxIterationNumber=10) -> QFont
|
||||
int flags = Qt::TextDontClip | Qt::TextWordWrap, double goalError = 0.01,
|
||||
int maxIterationNumber = 10) -> QFont
|
||||
{
|
||||
QFont font;
|
||||
|
||||
|
@ -44,8 +44,8 @@ auto OptimizeFontSizeToFitTextInRect(QPainter *painter, const QRectF &drawRect,
|
|||
|
||||
double minError = std::numeric_limits<double>::max();
|
||||
double error = std::numeric_limits<double>::max();
|
||||
int iterationNumber=0;
|
||||
while((error > goalError) && (iterationNumber<maxIterationNumber))
|
||||
int iterationNumber = 0;
|
||||
while ((error > goalError) && (iterationNumber < maxIterationNumber))
|
||||
{
|
||||
iterationNumber++;
|
||||
QRect fontBoundRect = painter->fontMetrics().boundingRect(drawRect.toRect(), flags, text);
|
||||
|
@ -58,15 +58,15 @@ auto OptimizeFontSizeToFitTextInRect(QPainter *painter, const QRectF &drawRect,
|
|||
double xFactor = drawRect.width() / fontBoundRect.width();
|
||||
double yFactor = drawRect.height() / fontBoundRect.height();
|
||||
double factor;
|
||||
if (xFactor<1 && yFactor<1)
|
||||
if (xFactor < 1 && yFactor < 1)
|
||||
{
|
||||
factor = std::min(xFactor, yFactor);
|
||||
}
|
||||
else if (xFactor>1 && yFactor>1)
|
||||
else if (xFactor > 1 && yFactor > 1)
|
||||
{
|
||||
factor = std::max(xFactor, yFactor);
|
||||
}
|
||||
else if (xFactor<1 && yFactor>1)
|
||||
else if (xFactor < 1 && yFactor > 1)
|
||||
{
|
||||
factor = xFactor;
|
||||
}
|
||||
|
@ -75,8 +75,8 @@ auto OptimizeFontSizeToFitTextInRect(QPainter *painter, const QRectF &drawRect,
|
|||
factor = yFactor;
|
||||
}
|
||||
|
||||
error = qFabs(factor-1);
|
||||
if (factor > 1 )
|
||||
error = qFabs(factor - 1);
|
||||
if (factor > 1)
|
||||
{
|
||||
if (error < minError)
|
||||
{
|
||||
|
@ -88,7 +88,7 @@ auto OptimizeFontSizeToFitTextInRect(QPainter *painter, const QRectF &drawRect,
|
|||
}
|
||||
}
|
||||
font = painter->font();
|
||||
qreal size = font.pointSizeF()*factor;
|
||||
qreal size = font.pointSizeF() * factor;
|
||||
if (size <= 0)
|
||||
{
|
||||
size = 0.00000001;
|
||||
|
@ -100,11 +100,11 @@ auto OptimizeFontSizeToFitTextInRect(QPainter *painter, const QRectF &drawRect,
|
|||
|
||||
return font;
|
||||
}
|
||||
} // namespace
|
||||
} // namespace
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
VPGraphicsTileGrid::VPGraphicsTileGrid(const VPLayoutPtr &layout, const QUuid &sheetUuid, QGraphicsItem *parent):
|
||||
QGraphicsItem(parent),
|
||||
VPGraphicsTileGrid::VPGraphicsTileGrid(const VPLayoutPtr &layout, const QUuid &sheetUuid, QGraphicsItem *parent)
|
||||
: QGraphicsItem(parent),
|
||||
m_layout(layout),
|
||||
m_sheetUuid(sheetUuid)
|
||||
{
|
||||
|
@ -114,7 +114,7 @@ VPGraphicsTileGrid::VPGraphicsTileGrid(const VPLayoutPtr &layout, const QUuid &s
|
|||
auto VPGraphicsTileGrid::boundingRect() const -> QRectF
|
||||
{
|
||||
VPLayoutPtr layout = m_layout.toStrongRef();
|
||||
if(not layout.isNull() && layout->LayoutSettings().GetShowTiles())
|
||||
if (not layout.isNull() && layout->LayoutSettings().GetShowTiles())
|
||||
{
|
||||
VPSheetPtr sheet = layout->GetSheet(m_sheetUuid);
|
||||
|
||||
|
@ -130,11 +130,10 @@ auto VPGraphicsTileGrid::boundingRect() const -> QRectF
|
|||
qreal width = layout->TileFactory()->DrawingAreaWidth() - VPTileFactory::tileStripeWidth;
|
||||
qreal height = layout->TileFactory()->DrawingAreaHeight() - VPTileFactory::tileStripeWidth;
|
||||
|
||||
QRectF rect(sheetMargins.left(), sheetMargins.top(),
|
||||
layout->TileFactory()->ColNb(sheet) * (width / xScale),
|
||||
QRectF rect(sheetMargins.left(), sheetMargins.top(), layout->TileFactory()->ColNb(sheet) * (width / xScale),
|
||||
layout->TileFactory()->RowNb(sheet) * (height / yScale));
|
||||
|
||||
constexpr qreal halfPenWidth = penWidth/2.;
|
||||
constexpr qreal halfPenWidth = penWidth / 2.;
|
||||
|
||||
return rect.adjusted(-halfPenWidth, -halfPenWidth, halfPenWidth, halfPenWidth);
|
||||
}
|
||||
|
@ -149,12 +148,13 @@ void VPGraphicsTileGrid::paint(QPainter *painter, const QStyleOptionGraphicsItem
|
|||
Q_UNUSED(option);
|
||||
|
||||
VPLayoutPtr layout = m_layout.toStrongRef();
|
||||
if(layout.isNull() || not layout->LayoutSettings().GetShowTiles())
|
||||
if (layout.isNull() || not layout->LayoutSettings().GetShowTiles())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
QPen pen(QColor(255,0,0,127), penWidth, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin);
|
||||
QPen pen(VSceneStylesheet::ManualLayoutStyle().SheetTileGridColor(), penWidth, Qt::SolidLine, Qt::RoundCap,
|
||||
Qt::RoundJoin);
|
||||
pen.setCosmetic(true);
|
||||
pen.setStyle(Qt::DashLine);
|
||||
QBrush noBrush(Qt::NoBrush);
|
||||
|
@ -166,17 +166,15 @@ void VPGraphicsTileGrid::paint(QPainter *painter, const QStyleOptionGraphicsItem
|
|||
|
||||
VWatermarkData watermarkData = layout->TileFactory()->WatermarkData();
|
||||
|
||||
auto PaintWatermark = [painter, layout, xScale, yScale, watermarkData]
|
||||
(const QRectF &img)
|
||||
auto PaintWatermark = [painter, layout, xScale, yScale, watermarkData](const QRectF &img)
|
||||
{
|
||||
if (not layout->LayoutSettings().WatermarkPath().isEmpty() &&
|
||||
layout->LayoutSettings().GetShowWatermark() && watermarkData.opacity > 0)
|
||||
if (not layout->LayoutSettings().WatermarkPath().isEmpty() && layout->LayoutSettings().GetShowWatermark() &&
|
||||
watermarkData.opacity > 0)
|
||||
{
|
||||
if (watermarkData.showImage && not watermarkData.path.isEmpty())
|
||||
{
|
||||
VPTileFactory::PaintWatermarkImage(painter, img, watermarkData,
|
||||
layout->LayoutSettings().WatermarkPath(),
|
||||
xScale, yScale);
|
||||
layout->LayoutSettings().WatermarkPath(), true, xScale, yScale);
|
||||
}
|
||||
|
||||
if (watermarkData.showText && not watermarkData.text.isEmpty())
|
||||
|
@ -195,14 +193,13 @@ void VPGraphicsTileGrid::paint(QPainter *painter, const QStyleOptionGraphicsItem
|
|||
const int nbCol = layout->TileFactory()->ColNb(sheet);
|
||||
const int nbRow = layout->TileFactory()->RowNb(sheet);
|
||||
|
||||
QFont font = OptimizeFontSizeToFitTextInRect(painter,
|
||||
QRectF(sheetMargins.left(), sheetMargins.top(), width/3., height/3.),
|
||||
QString::number(nbRow * nbCol));
|
||||
QFont font = OptimizeFontSizeToFitTextInRect(
|
||||
painter, QRectF(sheetMargins.left(), sheetMargins.top(), width / 3., height / 3.),
|
||||
QString::number(nbRow * nbCol));
|
||||
|
||||
const qreal scale = SceneScale(scene());
|
||||
|
||||
auto PaintTileNumber = [painter, layout, nbCol, font, scale]
|
||||
(const QRectF &img, int i, int j)
|
||||
auto PaintTileNumber = [painter, layout, nbCol, font, scale](const QRectF &img, int i, int j)
|
||||
{
|
||||
if (layout->LayoutSettings().GetShowTileNumber() && font.pointSizeF() * scale >= minTextFontSize)
|
||||
{
|
||||
|
@ -211,30 +208,30 @@ void VPGraphicsTileGrid::paint(QPainter *painter, const QStyleOptionGraphicsItem
|
|||
painter->setFont(font);
|
||||
|
||||
QPen pen = painter->pen();
|
||||
pen.setColor(Qt::black);
|
||||
pen.setColor(VSceneStylesheet::ManualLayoutStyle().SheetTileNumberColor());
|
||||
painter->setPen(pen);
|
||||
|
||||
painter->drawText(img, Qt::AlignCenter, QString::number(j*nbCol + i+1));
|
||||
painter->drawText(img, Qt::AlignCenter, QString::number(j * nbCol + i + 1));
|
||||
|
||||
painter->restore();
|
||||
}
|
||||
};
|
||||
|
||||
for(int j=0;j<=nbRow;++j)
|
||||
for (int j = 0; j <= nbRow; ++j)
|
||||
{
|
||||
// horizontal lines
|
||||
painter->drawLine(QPointF(sheetMargins.left(), sheetMargins.top()+j*height),
|
||||
QPointF(sheetMargins.left()+nbCol*width, sheetMargins.top()+j*height));
|
||||
painter->drawLine(QPointF(sheetMargins.left(), sheetMargins.top() + j * height),
|
||||
QPointF(sheetMargins.left() + nbCol * width, sheetMargins.top() + j * height));
|
||||
|
||||
for(int i=0;i<=nbCol;++i)
|
||||
for (int i = 0; i <= nbCol; ++i)
|
||||
{
|
||||
// vertical lines
|
||||
painter->drawLine(QPointF(sheetMargins.left()+i*width, sheetMargins.top()),
|
||||
QPointF(sheetMargins.left()+i*width, sheetMargins.top() + nbRow*height));
|
||||
painter->drawLine(QPointF(sheetMargins.left() + i * width, sheetMargins.top()),
|
||||
QPointF(sheetMargins.left() + i * width, sheetMargins.top() + nbRow * height));
|
||||
|
||||
if (j < nbRow && i < nbCol)
|
||||
{
|
||||
QRectF img(sheetMargins.left()+i*width, sheetMargins.top()+j*height, width, height);
|
||||
QRectF img(sheetMargins.left() + i * width, sheetMargins.top() + j * height, width, height);
|
||||
|
||||
PaintWatermark(img);
|
||||
PaintTileNumber(img, i, j);
|
||||
|
|
|
@ -2,25 +2,30 @@
|
|||
<qresource prefix="/">
|
||||
<file>puzzleicon/64x64/logo.png</file>
|
||||
<file>puzzleicon/64x64/iconLayout.png</file>
|
||||
<file>puzzleicon/64x64/iconCurrentPiece.png</file>
|
||||
<file>puzzleicon/64x64/iconLayers.png</file>
|
||||
<file>puzzleicon/64x64/iconTiles.png</file>
|
||||
<file>puzzleicon/64x64/iconProperties.png</file>
|
||||
<file>puzzleicon/svg/icon_scissors.svg</file>
|
||||
<file>puzzleicon/svg/icon_scissors_vertical.svg</file>
|
||||
<file>puzzleicon/svg/icon_scissors_horizontal.svg</file>
|
||||
<file>puzzleicon/16x16/roll.png</file>
|
||||
<file>puzzleicon/16x16/template.png</file>
|
||||
<file>puzzleicon/svg/icon_rotate_90_anticlockwise.svg</file>
|
||||
<file>puzzleicon/svg/icon_rotate_90_clockwise.svg</file>
|
||||
<file>puzzleicon/svg/icon_rotate_grainline_horizontal.svg</file>
|
||||
<file>puzzleicon/svg/icon_rotate_grainline_vertical.svg</file>
|
||||
<file>puzzleicon/32X32/horizontal_grainline.png</file>
|
||||
<file>puzzleicon/32X32/horizontal_grainline@2x.png</file>
|
||||
<file>puzzleicon/32X32/vertical_grainline.png</file>
|
||||
<file>puzzleicon/32X32/vertical_grainline@2x.png</file>
|
||||
<file>puzzleicon/svg/no_watermark_image.svg</file>
|
||||
<file>puzzleicon/svg/watermark_placeholder.svg</file>
|
||||
<file>puzzleicon/svg/watermark_placeholder_grayscale.svg</file>
|
||||
<file>puzzleicon/light/64x64/iconCurrentPiece@2x.png</file>
|
||||
<file>puzzleicon/light/64x64/iconCurrentPiece.png</file>
|
||||
<file>puzzleicon/dark/64x64/iconCurrentPiece@2x.png</file>
|
||||
<file>puzzleicon/dark/64x64/iconCurrentPiece.png</file>
|
||||
<file>puzzleicon/light/64x64/iconTiles@2x.png</file>
|
||||
<file>puzzleicon/light/64x64/iconTiles.png</file>
|
||||
<file>puzzleicon/dark/64x64/iconTiles@2x.png</file>
|
||||
<file>puzzleicon/dark/64x64/iconTiles.png</file>
|
||||
<file>puzzleicon/svg/light/no_watermark_image.svg</file>
|
||||
<file>puzzleicon/svg/dark/no_watermark_image.svg</file>
|
||||
<file>puzzleicon/light/32x32/horizontal_grainline@2x.png</file>
|
||||
<file>puzzleicon/light/32x32/horizontal_grainline.png</file>
|
||||
<file>puzzleicon/light/32x32/vertical_grainline@2x.png</file>
|
||||
<file>puzzleicon/light/32x32/vertical_grainline.png</file>
|
||||
<file>puzzleicon/dark/32x32/vertical_grainline@2x.png</file>
|
||||
<file>puzzleicon/dark/32x32/vertical_grainline.png</file>
|
||||
<file>puzzleicon/dark/32x32/horizontal_grainline.png</file>
|
||||
<file>puzzleicon/dark/32x32/horizontal_grainline@2x.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
|
Before Width: | Height: | Size: 241 B |
Before Width: | Height: | Size: 372 B |
Before Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 4.8 KiB |
Before Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 878 B |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 968 B |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 615 B |
After Width: | Height: | Size: 757 B |
After Width: | Height: | Size: 765 B |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 831 B |
After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 899 B After Width: | Height: | Size: 899 B |
Before Width: | Height: | Size: 1008 B After Width: | Height: | Size: 1008 B |
|
@ -0,0 +1,56 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
||||
|
||||
<svg
|
||||
width="800px"
|
||||
height="800px"
|
||||
viewBox="0 0 24 24"
|
||||
id="up-right-down-left-sign"
|
||||
data-name="Multi Color"
|
||||
class="icon multi-color"
|
||||
version="1.1"
|
||||
sodipodi:docname="horizontal_grainline.svg"
|
||||
inkscape:version="1.3 (1:1.3+202307231459+0e150ed6c4)"
|
||||
inkscape:export-filename="../../dark/32x32/horizontal_grainline.png"
|
||||
inkscape:export-xdpi="3.8399999"
|
||||
inkscape:export-ydpi="3.8399999"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<defs
|
||||
id="defs1" />
|
||||
<sodipodi:namedview
|
||||
id="namedview1"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
inkscape:zoom="0.70625"
|
||||
inkscape:cx="474.33628"
|
||||
inkscape:cy="356.81416"
|
||||
inkscape:window-width="2560"
|
||||
inkscape:window-height="1372"
|
||||
inkscape:window-x="1920"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="up-right-down-left-sign" />
|
||||
<title
|
||||
style="stroke-width: 2;"
|
||||
id="title1">up right down left sign</title>
|
||||
<path
|
||||
id="secondary-fill"
|
||||
d="m 22.810211,13.034586 -4.450546,4.549621 0.08705,-3.460677 -3.107313,-0.09106 0.0824,-3.76836 3.119693,0.09142 0.08705,-3.4606779 4.215267,4.8035619 a 0.87570185,0.94516261 0 0 1 -0.03361,1.33617 z"
|
||||
style="fill:#2ca9bc;stroke-width:1.81954" />
|
||||
<path
|
||||
id="tertiary-fill"
|
||||
d="m 1.7646672,12.41787 4.215267,4.803562 0.08705,-3.460677 3.107314,0.09106 0.107163,-3.767635 -3.119692,-0.09142 0.08705,-3.4606784 -4.450546,4.5496224 a 0.87570185,0.94516261 0 0 0 -0.03362,1.336169 z"
|
||||
style="fill:#b7b7b7;stroke-width:1.81954" />
|
||||
<path
|
||||
id="primary-stroke"
|
||||
d="m 22.551934,12.754279 -4.327728,4.666603 -0.0052,-3.461768 -12.3850028,-0.03275 0.0052,3.461768 -4.341774,-4.689529 a 0.94516261,0.87570185 88.473019 0 1 -0.002,-1.33659 l 4.327738,-4.6666038 0.0052,3.4617688 12.3850018,0.03275 -0.0052,-3.4617686 4.341773,4.6895296 a 0.94516261,0.87570185 88.473019 0 1 0.002,1.336591 z"
|
||||
style="fill:none;fill-opacity:1;stroke:#dedede;stroke-width:1.81954;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1" />
|
||||
</svg>
|
After Width: | Height: | Size: 2.5 KiB |
|
@ -0,0 +1,78 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
width="128"
|
||||
height="128"
|
||||
viewBox="0 0 33.866666 33.866668"
|
||||
version="1.1"
|
||||
id="svg2509"
|
||||
inkscape:version="1.3 (1:1.3+202307231459+0e150ed6c4)"
|
||||
sodipodi:docname="icon_current_piece.svg"
|
||||
inkscape:export-filename="../../64x64/dark/iconCurrentPiece@2x.png"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-ydpi="96"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/">
|
||||
<defs
|
||||
id="defs2503" />
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="5.6"
|
||||
inkscape:cx="81.607143"
|
||||
inkscape:cy="37.321429"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="g2570"
|
||||
showgrid="false"
|
||||
units="px"
|
||||
inkscape:window-width="2560"
|
||||
inkscape:window-height="1372"
|
||||
inkscape:window-x="1920"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#d1d1d1" />
|
||||
<metadata
|
||||
id="metadata2506">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Ebene 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(0,-263.13332)">
|
||||
<g
|
||||
transform="matrix(0.26453414,0,0,0.26453414,63.37226,-244.46879)"
|
||||
font-size="14.6667"
|
||||
font-weight="400"
|
||||
font-style="normal"
|
||||
id="g2570"
|
||||
style="font-style:normal;font-weight:400;font-size:14.66670036px;font-family:Ubuntu;fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:square;stroke-linejoin:bevel;stroke-opacity:1">
|
||||
<path
|
||||
d="m -140.95302,1932.7404 0.69118,112.062 h -69.00486 l -0.19139,-25.9137 0.22275,-27.7193 1.69724,-0.6159 1.52048,-0.7014 0.70479,-0.4067 1.0218,-0.6852 1.26935,-1.0451 1.16075,-1.1592 1.06104,-1.2554 0.96326,-1.3272 0.86777,-1.3738 0.77496,-1.3924 0.68291,-1.3795 0.8777,-2.0097 1.26386,-3.522 0.55623,-1.7804 0.21606,-0.9228 0.19427,-1.1523 0.16148,-1.3687 0.11878,-1.5657 0.0676,-1.7466 0.0104,-1.913 -0.058,-2.0662 -0.1324,-2.205 -0.21343,-2.3325 -0.30178,-2.446 -0.39726,-2.5483 -0.49959,-2.6371 -0.60908,-2.7146 -0.72542,-2.7795 -0.84877,-2.8318 -0.97525,-2.8616 -1.05725,-2.761 -0.93355,-2.1985 34.72106,-11.6806 2.50212,3.437 1.09172,1.3233 1.06182,1.1453 1.04965,0.9815 1.05753,0.8335 1.08979,0.7051 1.15089,0.594 1.2433,0.4976 1.36638,0.4114 1.51656,0.3326 1.68999,0.2582 1.88344,0.1898 2.09146,0.1299 3.55478,0.1052 2.77287,0.021"
|
||||
id="path2568"
|
||||
inkscape:connector-curvature="0"
|
||||
style="vector-effect:none;fill:#dedede;fill-opacity:1;fill-rule:nonzero;stroke:#3daee9;stroke-width:4.14862871;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
sodipodi:nodetypes="ccccccccccccccccccccccccccccccccccccccccccccccccccccc" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 3.4 KiB |
|
@ -0,0 +1,94 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
width="128"
|
||||
height="128"
|
||||
viewBox="0 0 33.866666 33.866668"
|
||||
version="1.1"
|
||||
id="svg8"
|
||||
sodipodi:docname="icon_tiles.svg"
|
||||
inkscape:export-filename="../../dark/64x64/iconTiles@2x.png"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-ydpi="96"
|
||||
inkscape:version="1.3 (1:1.3+202307231459+0e150ed6c4)"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/">
|
||||
<defs
|
||||
id="defs2" />
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="3.959798"
|
||||
inkscape:cx="48.73986"
|
||||
inkscape:cy="56.316004"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
units="px"
|
||||
inkscape:window-width="2560"
|
||||
inkscape:window-height="1372"
|
||||
inkscape:window-x="1920"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#d1d1d1" />
|
||||
<metadata
|
||||
id="metadata5">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Ebene 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(0,-263.13332)">
|
||||
<rect
|
||||
style="fill:#ffffff;fill-opacity:1;stroke:#3daee9;stroke-width:1.05013251;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect815"
|
||||
width="25.9415"
|
||||
height="32.816536"
|
||||
x="3.9646497"
|
||||
y="263.65839" />
|
||||
<rect
|
||||
style="fill:none;fill-opacity:1;stroke:#ff0000;stroke-width:0.98678774;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect815-3"
|
||||
width="0.071545608"
|
||||
height="30.772118"
|
||||
x="16.89756"
|
||||
y="264.67615" />
|
||||
<rect
|
||||
style="fill:none;fill-opacity:1;stroke:#ff0000;stroke-width:0.9272486;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect815-3-6"
|
||||
width="0.081191778"
|
||||
height="23.942709"
|
||||
x="274.76807"
|
||||
y="-28.642822"
|
||||
transform="matrix(9.5379316e-4,0.99999955,-0.99999794,0.00202899,0,0)" />
|
||||
<rect
|
||||
style="fill:none;fill-opacity:1;stroke:#ff0000;stroke-width:0.9272486;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect815-3-6-7"
|
||||
width="0.081191778"
|
||||
height="23.942709"
|
||||
x="285.62363"
|
||||
y="-28.632275"
|
||||
transform="matrix(9.5379382e-4,0.99999955,-0.99999794,0.00202899,0,0)" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 3.0 KiB |
|
@ -0,0 +1,83 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
id="Capa_1"
|
||||
enable-background="new 0 0 512 512"
|
||||
height="512"
|
||||
viewBox="0 0 512 512"
|
||||
width="512"
|
||||
version="1.1"
|
||||
sodipodi:docname="no_watermark_image.svg"
|
||||
inkscape:version="1.3 (1:1.3+202307231459+0e150ed6c4)"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<defs
|
||||
id="defs10" />
|
||||
<sodipodi:namedview
|
||||
id="namedview10"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
inkscape:zoom="1.5606068"
|
||||
inkscape:cx="347.94159"
|
||||
inkscape:cy="194.15525"
|
||||
inkscape:window-width="2560"
|
||||
inkscape:window-height="1372"
|
||||
inkscape:window-x="1920"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="Capa_1" />
|
||||
<g
|
||||
id="g10">
|
||||
<g
|
||||
id="g6">
|
||||
<path
|
||||
d="m 502.681,198.27 v 68.85 l -2.48,1.68 -24.29,16.48 -58.97,-40 -58.97,40 -58.97,-40 -58.97,40 -58.96,-40 -58.97,40 -26.76,-18.15 V 47.38 c 0,-22.03 17.85,-39.88 39.87,-39.88 h 176.7 c 15.88,0 67.31,43.85 112.77,90.03 41.48,42.15 78,86.24 78,100.74 z"
|
||||
fill="#ddeafb"
|
||||
id="path1" />
|
||||
<path
|
||||
d="m 475.911,332.15 26.77,-18.16 v 150.63 c 0,22.03 -17.85,39.88 -39.87,39.88 h -327.6 c -18.82,0 -34.59,-13.04 -38.78,-30.58 l -0.16,-22.8 -0.93,-135.78 V 314 l 26.76,18.15 58.97,-40 58.96,40 58.97,-40 58.97,40 58.97,-40 z"
|
||||
fill="#ddeafb"
|
||||
id="path2" />
|
||||
<path
|
||||
d="m 502.681,198.27 v 68.85 l -2.48,1.68 C 484.431,174.72 399.591,167.68 370.261,138.35 l 54.42,-40.82 c 41.48,42.15 78,86.24 78,100.74 z"
|
||||
fill="#cbe2ff"
|
||||
id="path3" />
|
||||
<path
|
||||
d="m 311.906,7.5 h -97.57 c 0.11,0 0.22,0.01 0.34,0.01 119.72,3 125.26,100.52 157.15,132.41 l 40.82,-54.42 c -42.15,-41.48 -86.24,-78 -100.74,-78 z"
|
||||
fill="#cbe2ff"
|
||||
id="path4" />
|
||||
<path
|
||||
d="m 502.681,198.276 v 16.868 c 0,-35.514 -28.798,-64.312 -64.312,-64.312 h -39.143 c -22.019,0 -39.877,-17.858 -39.877,-39.877 V 71.812 C 359.349,36.298 330.551,7.5 295.037,7.5 h 16.868 c 30.373,0 59.512,12.068 80.989,33.545 l 76.242,76.242 c 21.476,21.476 33.545,50.615 33.545,80.989 z"
|
||||
fill="#bed8fb"
|
||||
id="path5" />
|
||||
<circle
|
||||
cx="96.445"
|
||||
cy="141.864"
|
||||
fill="#dd636e"
|
||||
r="87.125999"
|
||||
id="circle5" />
|
||||
<path
|
||||
d="m 107.749,228.264 c -3.7,0.48 -7.48,0.73 -11.31,0.73 -48.12,0 -87.12,-39.01 -87.12,-87.13 0,-48.11 39,-87.12 87.12,-87.12 3.83,0 7.61,0.25 11.31,0.73 -42.78,5.54 -75.82,42.11 -75.82,86.39 0,44.29 33.04,80.86 75.82,86.4 z"
|
||||
fill="#da4a54"
|
||||
id="path6" />
|
||||
</g>
|
||||
<path
|
||||
d="m 510.181,198.276 c 0,-32.598 -12.693,-63.244 -35.741,-86.292 L 398.198,35.742 C 375.148,12.693 344.503,0 311.905,0 h -0.006 -176.7 c -26.12,0 -47.37,21.255 -47.37,47.38 v 0.257 c -48.153,4.369 -86.01,44.956 -86.01,94.223 0,49.273 37.856,89.864 86.01,94.233 v 31.027 c 0,2.486 1.232,4.811 3.29,6.207 l 26.769,18.16 c 2.543,1.725 5.88,1.724 8.421,0 l 54.761,-37.144 54.749,37.144 c 2.543,1.725 5.88,1.724 8.421,0 l 54.76,-37.144 54.76,37.144 c 2.541,1.725 5.879,1.724 8.42,0 l 54.761,-37.144 54.76,37.144 c 1.271,0.862 2.74,1.293 4.21,1.293 1.47,0 2.939,-0.431 4.21,-1.293 l 26.76,-18.15 c 2.058,-1.396 3.29,-3.721 3.29,-6.207 z M 387.59,46.348 463.832,122.59 c 12.185,12.184 21.069,26.788 26.205,42.729 -13.069,-13.549 -31.401,-21.988 -51.669,-21.988 h -39.143 c -17.853,0 -32.377,-14.524 -32.377,-32.377 V 71.812 c 0,-20.268 -8.438,-38.599 -21.987,-51.669 15.942,5.137 30.545,14.021 42.729,26.205 z m 88.319,229.87 -54.76,-37.144 c -2.541,-1.724 -5.879,-1.724 -8.42,0 l -54.761,37.144 -54.76,-37.144 c -2.541,-1.724 -5.879,-1.724 -8.42,0 l -54.76,37.144 -54.749,-37.144 c -2.543,-1.725 -5.88,-1.724 -8.421,0 l -54.761,37.144 -19.27,-13.072 V 236.27 c 49.21,-3.293 88.24,-44.375 88.24,-94.41 0,-29.062 -13.078,-56.098 -35.881,-74.177 -3.244,-2.573 -7.963,-2.029 -10.536,1.218 -2.573,3.246 -2.028,7.963 1.218,10.536 19.191,15.217 30.199,37.969 30.199,62.423 0,43.908 -35.718,79.63 -79.62,79.63 -43.908,0 -79.63,-35.722 -79.63,-79.63 0,-43.903 35.722,-79.62 79.63,-79.62 7.619,0 15.133,1.069 22.331,3.177 3.979,1.166 8.142,-1.115 9.306,-5.089 1.165,-3.975 -1.114,-8.141 -5.089,-9.306 -6.547,-1.918 -13.307,-3.107 -20.168,-3.564 V 47.38 c 0,-17.854 14.521,-32.38 32.37,-32.38 h 159.838 c 31.326,0 56.812,25.486 56.812,56.812 v 39.143 c 0,26.124 21.253,47.377 47.377,47.377 h 39.143 c 31.171,0 56.551,25.237 56.801,56.35 v 48.472 z"
|
||||
id="path7"
|
||||
style="stroke:none;stroke-opacity:1;fill:#3daee9;fill-opacity:1" />
|
||||
<path
|
||||
d="m 507.608,308.351 c -2.641,-2.287 -6.383,-2.434 -9.149,-0.558 l -22.55,15.294 -54.76,-37.144 c -2.541,-1.725 -5.878,-1.724 -8.421,0 l -19.519,13.243 c -3.399,2.306 -4.586,6.937 -2.382,10.403 2.279,3.586 7.05,4.555 10.543,2.187 l 15.569,-10.563 54.76,37.144 c 2.541,1.725 5.879,1.724 8.42,0 l 15.05,-10.208 V 464.62 c 0,17.883 -14.497,32.38 -32.38,32.38 h -327.59 c -0.462,0 -0.921,-0.01 -1.379,-0.029 -16.775,-0.699 -29.846,-14.883 -29.961,-31.673 l -0.941,-137.098 14.97,10.156 c 2.543,1.725 5.88,1.724 8.421,0 l 54.761,-37.144 54.749,37.144 c 2.543,1.725 5.88,1.724 8.421,0 l 54.76,-37.144 54.76,37.144 c 2.54,1.724 5.877,1.724 8.419,0.001 l 11.172,-7.575 c 3.399,-2.304 4.586,-6.933 2.384,-10.399 -2.279,-3.587 -7.052,-4.559 -10.543,-2.192 l -7.221,4.896 -54.761,-37.145 c -2.541,-1.724 -5.879,-1.724 -8.42,0 l -54.76,37.144 -54.749,-37.144 c -2.543,-1.725 -5.88,-1.724 -8.421,0 l -54.761,37.144 -22.379,-15.18 c -1.84,-1.248 -4.138,-1.747 -6.287,-1.175 -3.377,0.899 -5.604,3.914 -5.604,7.259 v 1.402 l 1.09,154.58 c 0,17.853 14.019,42.029 46.28,42.029 h 327.6 c 26.162,0 47.37,-21.208 47.37,-47.37 V 314.215 c 0,-2.225 -0.879,-4.407 -2.561,-5.864 z"
|
||||
id="path8"
|
||||
style="fill:#3daee9;fill-opacity:1" />
|
||||
<path
|
||||
d="M 131.2,96.501 96.445,131.256 61.689,96.501 c -2.93,-2.929 -7.678,-2.929 -10.607,0 -2.929,2.929 -2.929,7.677 0,10.606 l 34.756,34.756 -34.756,34.757 c -2.929,2.929 -2.929,7.677 0,10.606 1.465,1.465 3.385,2.197 5.304,2.197 1.919,0 3.839,-0.732 5.304,-2.197 l 34.755,-34.755 34.755,34.755 c 1.465,1.465 3.385,2.197 5.304,2.197 1.919,0 3.839,-0.732 5.304,-2.197 2.929,-2.929 2.929,-7.677 0,-10.606 l -34.756,-34.756 34.756,-34.756 c 2.929,-2.929 2.929,-7.677 0,-10.606 -2.93,-2.93 -7.678,-2.93 -10.608,-10e-4 z"
|
||||
id="path9"
|
||||
style="fill:#3daee9;fill-opacity:1" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 6.6 KiB |
|
@ -0,0 +1,56 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
||||
|
||||
<svg
|
||||
width="800px"
|
||||
height="800px"
|
||||
viewBox="0 0 24 24"
|
||||
id="up-right-down-left-sign"
|
||||
data-name="Multi Color"
|
||||
class="icon multi-color"
|
||||
version="1.1"
|
||||
sodipodi:docname="vertical_grainline.svg"
|
||||
inkscape:version="1.3 (1:1.3+202307231459+0e150ed6c4)"
|
||||
inkscape:export-filename="../../dark/32x32/vertical_grainline@2x.png"
|
||||
inkscape:export-xdpi="7.6799998"
|
||||
inkscape:export-ydpi="7.6799998"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<defs
|
||||
id="defs1" />
|
||||
<sodipodi:namedview
|
||||
id="namedview1"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
inkscape:zoom="0.70625"
|
||||
inkscape:cx="474.33628"
|
||||
inkscape:cy="356.81416"
|
||||
inkscape:window-width="2560"
|
||||
inkscape:window-height="1372"
|
||||
inkscape:window-x="1920"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="up-right-down-left-sign" />
|
||||
<title
|
||||
style="stroke-width: 2;"
|
||||
id="title1">up right down left sign</title>
|
||||
<path
|
||||
id="secondary-fill"
|
||||
d="m 13.000124,1.2716182 4.549621,4.450546 -3.460677,-0.08705 -0.09106,3.107313 -3.76836,-0.0824 0.09142,-3.119693 -3.4606779,-0.08705 4.8035619,-4.215267 a 0.94516261,0.87570185 0 0 1 1.33617,0.03361 z"
|
||||
style="fill:#2ca9bc;stroke-width:1.81954" />
|
||||
<path
|
||||
id="tertiary-fill"
|
||||
d="m 12.383408,22.317162 4.803562,-4.215267 -3.460677,-0.08705 0.09106,-3.107314 -3.767635,-0.107163 -0.09142,3.119692 -3.4606784,-0.08705 4.5496221,4.450546 a 0.94516261,0.87570185 0 0 0 1.336169,0.03362 z"
|
||||
style="fill:#b7b7b7;stroke-width:1.81954" />
|
||||
<path
|
||||
id="primary-stroke"
|
||||
d="m 12.719817,1.5298952 4.666603,4.327728 -3.461768,0.0052 -0.03275,12.3850028 3.461768,-0.0052 -4.689529,4.341774 a 0.87570185,0.94516261 88.473019 0 1 -1.33659,0.002 l -4.6666038,-4.327738 3.4617688,-0.0052 0.03275,-12.3850018 -3.4617686,0.0052 4.6895296,-4.341773 a 0.87570185,0.94516261 88.473019 0 1 1.336591,-0.002 z"
|
||||
style="fill:none;fill-opacity:1;stroke:#dedede;stroke-width:1.81954;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1" />
|
||||
</svg>
|
After Width: | Height: | Size: 2.5 KiB |
|
@ -1,64 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="128"
|
||||
height="128"
|
||||
viewBox="0 0 33.866666 33.866668"
|
||||
version="1.1"
|
||||
id="svg8"
|
||||
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
|
||||
sodipodi:docname="icon_grainline_horizontal.svg">
|
||||
<defs
|
||||
id="defs2" />
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="5.6"
|
||||
inkscape:cx="131.4404"
|
||||
inkscape:cy="23.984595"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
units="px"
|
||||
inkscape:window-width="2492"
|
||||
inkscape:window-height="1376"
|
||||
inkscape:window-x="68"
|
||||
inkscape:window-y="27"
|
||||
inkscape:window-maximized="1" />
|
||||
<metadata
|
||||
id="metadata5">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Ebene 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(0,-263.13333)">
|
||||
<path
|
||||
style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.08413111px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="m 5.5252585,275.18217 0.051298,3.99382 22.7141635,-0.0537 0.01533,-3.8659 5.496769,4.82839 -5.511316,4.79342 -0.03376,-3.83055 -22.7010593,-0.0398 0.042982,3.95521 -5.53642339,-4.9772 z"
|
||||
id="path815"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="ccccccccccc" />
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 2.1 KiB |
|
@ -1,64 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="128"
|
||||
height="128"
|
||||
viewBox="0 0 33.866666 33.866668"
|
||||
version="1.1"
|
||||
id="svg8"
|
||||
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
|
||||
sodipodi:docname="icon_grainline_vertical.svg">
|
||||
<defs
|
||||
id="defs2" />
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="5.6"
|
||||
inkscape:cx="10.587649"
|
||||
inkscape:cy="31.675878"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
units="px"
|
||||
inkscape:window-width="2492"
|
||||
inkscape:window-height="1376"
|
||||
inkscape:window-x="68"
|
||||
inkscape:window-y="27"
|
||||
inkscape:window-maximized="1" />
|
||||
<metadata
|
||||
id="metadata5">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Ebene 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(0,-263.13333)">
|
||||
<path
|
||||
style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.08413111px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="m 21.94176,268.65855 -3.993828,0.0513 0.05369,22.71416 3.865904,0.0153 -4.828397,5.49677 -4.79342,-5.51132 3.830552,-0.0338 0.03977,-22.70106 -3.955217,0.043 4.977207,-5.53642 z"
|
||||
id="path815"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="ccccccccccc" />
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 2.1 KiB |
|
@ -1,75 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="128"
|
||||
height="128"
|
||||
viewBox="0 0 33.866666 33.866668"
|
||||
version="1.1"
|
||||
id="svg8"
|
||||
sodipodi:docname="icon_landscape.svg"
|
||||
inkscape:export-filename="/home/ronan/Desktop/icon_layout.png"
|
||||
inkscape:export-xdpi="48"
|
||||
inkscape:export-ydpi="48"
|
||||
inkscape:version="0.92.4 (5da689c313, 2019-01-14)">
|
||||
<defs
|
||||
id="defs2" />
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="3.959798"
|
||||
inkscape:cx="129.97931"
|
||||
inkscape:cy="45.737629"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
units="px"
|
||||
inkscape:window-width="2492"
|
||||
inkscape:window-height="1376"
|
||||
inkscape:window-x="68"
|
||||
inkscape:window-y="27"
|
||||
inkscape:window-maximized="1" />
|
||||
<metadata
|
||||
id="metadata5">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Ebene 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(0,-263.13332)">
|
||||
<path
|
||||
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:1.05013251;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 33.343664,293.0374 v -17.62724 l -4.39397,-4.25101 -4.14294,-4.06324 H 0.52713435 v 25.94149 z"
|
||||
id="rect815"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="ccccccc" />
|
||||
<path
|
||||
style="fill:#ffffff;fill-opacity:0;stroke:#000000;stroke-width:1.05799997;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
inkscape:transform-center-x="-0.55548508"
|
||||
inkscape:transform-center-y="0.97501237"
|
||||
d="m 24.948494,267.23765 -0.0243,8.13814 8.41946,0.0344"
|
||||
id="path848"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="ccc" />
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 2.5 KiB |
|
@ -1,79 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
version="1.1"
|
||||
id="svg893"
|
||||
width="128"
|
||||
height="128"
|
||||
viewBox="0 0 128 128"
|
||||
sodipodi:docname="icon_rotate_90_anticlockwise.svg"
|
||||
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)"
|
||||
inkscape:export-filename="/home/ronan/Workspace_cpp/valentina/src/app/puzzle/share/resources/puzzleicon/64x64/cursorRotate@2x.png"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-ydpi="96">
|
||||
<metadata
|
||||
id="metadata899">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs897" />
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1043"
|
||||
id="namedview895"
|
||||
showgrid="false"
|
||||
inkscape:zoom="1.9070797"
|
||||
inkscape:cx="-10.361902"
|
||||
inkscape:cy="69.818165"
|
||||
inkscape:window-x="1920"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="g901"
|
||||
showguides="false"
|
||||
inkscape:lockguides="false"
|
||||
inkscape:document-rotation="0" />
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
inkscape:label="Image"
|
||||
id="g901">
|
||||
<path
|
||||
id="path1502"
|
||||
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;font-feature-settings:normal;font-variation-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;shape-margin:0;inline-size:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:16.3619;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate;stop-color:#000000;stop-opacity:1"
|
||||
d="M 55.896493,2.9375026 C 33.6579,6.5065667 18.949296,20.13637 11.102943,39.261394 L 0.54579357,31.704504 9.2043998,61.438917 33.336678,43.163337 20.178057,41.964226 C 26.09616,28.336396 41.286906,13.618412 57.166066,10.475466 83.491044,5.26499 118.31674,25.305285 118.92695,54.737111 c 3.26906,-0.0857 5.15084,-0.118802 8.51053,-0.256065 C 127.26422,20.979551 89.86429,-2.5139775 55.896493,2.9375026 Z"
|
||||
sodipodi:nodetypes="scccccsccs" />
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-style:normal;font-weight:normal;font-size:80.5149px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1.25804"
|
||||
x="27.286873"
|
||||
y="104.23756"
|
||||
id="text1480"
|
||||
transform="scale(0.94780675,1.0550674)"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan1478"
|
||||
x="27.286873"
|
||||
y="104.23756"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:80.5149px;font-family:Garuda;-inkscape-font-specification:Garuda;stroke-width:1.25804">90</tspan></text>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 4.3 KiB |
|
@ -1,79 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
version="1.1"
|
||||
id="svg893"
|
||||
width="128"
|
||||
height="128"
|
||||
viewBox="0 0 128 128"
|
||||
sodipodi:docname="icon_rotate_90_clockwise.svg"
|
||||
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)"
|
||||
inkscape:export-filename="/home/ronan/Workspace_cpp/valentina/src/app/puzzle/share/resources/puzzleicon/64x64/iconRotate90Clockwise@2x.png"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-ydpi="96">
|
||||
<metadata
|
||||
id="metadata899">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs897" />
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1043"
|
||||
id="namedview895"
|
||||
showgrid="false"
|
||||
inkscape:zoom="1.9070797"
|
||||
inkscape:cx="-10.361902"
|
||||
inkscape:cy="69.818165"
|
||||
inkscape:window-x="1920"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="g901"
|
||||
showguides="false"
|
||||
inkscape:lockguides="false"
|
||||
inkscape:document-rotation="0" />
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
inkscape:label="Image"
|
||||
id="g901">
|
||||
<path
|
||||
id="path1502"
|
||||
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;font-feature-settings:normal;font-variation-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;shape-margin:0;inline-size:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:16.3619;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate;stop-color:#000000;stop-opacity:1"
|
||||
d="M 72.086781,2.9375026 C 94.325374,6.5065667 109.03398,20.13637 116.88033,39.261394 l 10.55715,-7.55689 -8.65861,29.734413 -24.132274,-18.27558 13.158624,-1.199111 C 101.88711,28.336396 86.696368,13.618412 70.817208,10.475466 44.49223,5.26499 9.6665336,25.305285 9.0563236,54.737111 5.7872636,54.651411 3.9054836,54.618309 0.54579357,54.481046 0.71905357,20.979551 38.118984,-2.5139775 72.086781,2.9375026 Z"
|
||||
sodipodi:nodetypes="scccccsccs" />
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-style:normal;font-weight:normal;font-size:80.5149px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1.25804"
|
||||
x="18.815292"
|
||||
y="103.3251"
|
||||
id="text1480"
|
||||
transform="scale(0.94780675,1.0550674)"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan1478"
|
||||
x="18.815292"
|
||||
y="103.3251"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:80.5149px;font-family:Garuda;-inkscape-font-specification:Garuda;stroke-width:1.25804">90</tspan></text>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 4.3 KiB |
|
@ -1,77 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
version="1.1"
|
||||
id="svg893"
|
||||
width="128"
|
||||
height="128"
|
||||
viewBox="0 0 128 128"
|
||||
sodipodi:docname="icon_rotate_grainline_horizontal_clockwise.svg"
|
||||
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)"
|
||||
inkscape:export-filename="/home/ronan/Workspace_cpp/valentina/src/app/puzzle/share/resources/puzzleicon/64x64/iconRotateGrainlineHorizontal@2x.png"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-ydpi="96">
|
||||
<metadata
|
||||
id="metadata899">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs897" />
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1043"
|
||||
id="namedview895"
|
||||
showgrid="false"
|
||||
inkscape:zoom="1.9070797"
|
||||
inkscape:cx="73.591374"
|
||||
inkscape:cy="127.65689"
|
||||
inkscape:window-x="1920"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="g901"
|
||||
showguides="false"
|
||||
inkscape:lockguides="false"
|
||||
inkscape:document-rotation="0" />
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
inkscape:label="Image"
|
||||
id="g901">
|
||||
<g
|
||||
id="g2862"
|
||||
style="fill:#000000">
|
||||
<path
|
||||
id="path1502-1"
|
||||
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;font-feature-settings:normal;font-variation-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;shape-margin:0;inline-size:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:15.9493;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate;stop-color:#000000;stop-opacity:1"
|
||||
d="M 60.996394,0.20303699 C 58.149666,0.24970079 55.302575,0.50557789 52.47989,0.98233389 31.348865,4.5513981 17.373357,18.181529 9.9177848,37.306553 L -0.11309389,29.747959 8.1138972,59.484287 31.044802,41.206943 18.540073,40.007724 C 24.163438,26.379894 38.59788,11.662388 53.686194,8.5194431 56.908693,7.8481862 60.45821,7.3123197 63.862041,7.4453147 c 0,0 -0.0094,-3.1734682 -0.01877,-7.21884021 -0.947752,-0.030357 -1.897966,-0.038992 -2.846876,-0.023437 z m 2.865647,7.24227771 c 3.40383,-0.132995 6.956636,0.4028716 10.179135,1.0741284 15.088313,3.1429449 29.522754,17.8604509 35.146114,31.4882809 l -12.502866,1.199219 22.930896,18.277344 8.22699,-29.736328 -10.03088,7.558594 C 110.35586,18.181529 96.378506,4.5513978 75.24748,0.98233389 71.4839,0.34665889 67.634281,0.10504749 63.84327,0.22647449 63.83387,4.2718465 63.86204,7.4453147 63.862041,7.4453147 Z"
|
||||
sodipodi:nodetypes="sscccccsccscscccccscc" />
|
||||
</g>
|
||||
<path
|
||||
style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.267085px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="m 101.4024,97.530244 -0.16286,-12.678896 -72.108879,0.170445 -0.0485,12.272785 -17.45021,-15.328335 17.49634,-15.217299 0.10731,12.160556 72.067279,0.126254 -0.13651,-12.556319 17.57604,15.800751 z"
|
||||
id="path815"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="ccccccccccc" />
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 4.7 KiB |
|
@ -1,77 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
version="1.1"
|
||||
id="svg893"
|
||||
width="128"
|
||||
height="128"
|
||||
viewBox="0 0 128 128"
|
||||
sodipodi:docname="icon_rotate_grainline_vertical_clockwise.svg"
|
||||
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)"
|
||||
inkscape:export-filename="/home/ronan/Workspace_cpp/valentina/src/app/puzzle/share/resources/puzzleicon/64x64/iconRotateGrainlineVertical@2x.png"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-ydpi="96">
|
||||
<metadata
|
||||
id="metadata899">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs897" />
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1043"
|
||||
id="namedview895"
|
||||
showgrid="false"
|
||||
inkscape:zoom="1.9070797"
|
||||
inkscape:cx="73.591374"
|
||||
inkscape:cy="127.65689"
|
||||
inkscape:window-x="1920"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="g901"
|
||||
showguides="false"
|
||||
inkscape:lockguides="false"
|
||||
inkscape:document-rotation="0" />
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
inkscape:label="Image"
|
||||
id="g901">
|
||||
<g
|
||||
id="g2862"
|
||||
style="fill:#000000">
|
||||
<path
|
||||
id="path1502-1"
|
||||
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;font-feature-settings:normal;font-variation-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;shape-margin:0;inline-size:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:15.9493;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate;stop-color:#000000;stop-opacity:1"
|
||||
d="M 60.996394,0.20303699 C 58.149666,0.24970079 55.302575,0.50557789 52.47989,0.98233389 31.348865,4.5513981 17.373357,18.181529 9.9177848,37.306553 L -0.11309389,29.747959 8.1138972,59.484287 31.044802,41.206943 18.540073,40.007724 C 24.163438,26.379894 38.59788,11.662388 53.686194,8.5194431 56.908693,7.8481862 60.45821,7.3123197 63.862041,7.4453147 c 0,0 -0.0094,-3.1734682 -0.01877,-7.21884021 -0.947752,-0.030357 -1.897966,-0.038992 -2.846876,-0.023437 z m 2.865647,7.24227771 c 3.40383,-0.132995 6.956636,0.4028716 10.179135,1.0741284 15.088313,3.1429449 29.522754,17.8604509 35.146114,31.4882809 l -12.502866,1.199219 22.930896,18.277344 8.22699,-29.736328 -10.03088,7.558594 C 110.35586,18.181529 96.378506,4.5513978 75.24748,0.98233389 71.4839,0.34665889 67.634281,0.10504749 63.84327,0.22647449 63.83387,4.2718465 63.86204,7.4453147 63.862041,7.4453147 Z"
|
||||
sodipodi:nodetypes="sscccccsccscscccccscc" />
|
||||
</g>
|
||||
<path
|
||||
style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.267085px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="m 78.712585,37.789626 -12.678895,0.162859 0.170444,72.108875 12.272786,0.0485 -15.328336,17.45021 -15.217299,-17.49634 12.160556,-0.10731 0.126255,-72.06728 -12.556319,0.13651 15.800751,-17.576041 z"
|
||||
id="path815"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="ccccccccccc" />
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 4.7 KiB |
|
@ -0,0 +1,56 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
||||
|
||||
<svg
|
||||
width="800px"
|
||||
height="800px"
|
||||
viewBox="0 0 24 24"
|
||||
id="up-right-down-left-sign"
|
||||
data-name="Multi Color"
|
||||
class="icon multi-color"
|
||||
version="1.1"
|
||||
sodipodi:docname="horizontal_grainline.svg"
|
||||
inkscape:version="1.3 (1:1.3+202307231459+0e150ed6c4)"
|
||||
inkscape:export-filename="../../light/32x32/horizontal_grainline@2x.png"
|
||||
inkscape:export-xdpi="7.6799998"
|
||||
inkscape:export-ydpi="7.6799998"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<defs
|
||||
id="defs1" />
|
||||
<sodipodi:namedview
|
||||
id="namedview1"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
inkscape:zoom="0.70625"
|
||||
inkscape:cx="474.33628"
|
||||
inkscape:cy="356.81416"
|
||||
inkscape:window-width="2560"
|
||||
inkscape:window-height="1372"
|
||||
inkscape:window-x="1920"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="up-right-down-left-sign" />
|
||||
<title
|
||||
style="stroke-width: 2;"
|
||||
id="title1">up right down left sign</title>
|
||||
<path
|
||||
id="secondary-fill"
|
||||
d="m 22.506955,12.992108 -4.450546,4.549621 0.08705,-3.460677 -3.107313,-0.09106 0.0824,-3.76836 3.119693,0.09142 0.08705,-3.4606781 4.215267,4.8035621 a 0.87570185,0.94516261 0 0 1 -0.03361,1.33617 z"
|
||||
style="fill:#2ca9bc;stroke-width:1.81954" />
|
||||
<path
|
||||
id="tertiary-fill"
|
||||
d="m 1.4614105,12.375392 4.215267,4.803562 0.08705,-3.460677 3.107314,0.09106 0.107163,-3.767635 -3.119692,-0.09142 0.08705,-3.4606784 -4.450546,4.5496223 a 0.87570185,0.94516261 0 0 0 -0.03362,1.336169 z"
|
||||
style="fill:#b7b7b7;stroke-width:1.81954" />
|
||||
<path
|
||||
id="primary-stroke"
|
||||
d="m 22.529244,12.711801 -4.327728,4.666603 -0.0052,-3.461768 -12.3850035,-0.03275 0.0052,3.461768 -4.341774,-4.689529 a 0.94516261,0.87570185 88.473019 0 1 -0.002,-1.33659 l 4.327738,-4.666604 0.0052,3.461769 12.3850025,0.03275 -0.0052,-3.4617688 4.341773,4.6895298 a 0.94516261,0.87570185 88.473019 0 1 0.002,1.336591 z"
|
||||
style="fill:none;fill-opacity:1;stroke:#000000;stroke-width:1.81954;stroke-linecap:round;stroke-linejoin:round" />
|
||||
</svg>
|
After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.2 KiB |
|
@ -14,7 +14,7 @@
|
|||
viewBox="0 0 33.866666 33.866668"
|
||||
version="1.1"
|
||||
id="svg8"
|
||||
sodipodi:docname="icon_portrait.svg"
|
||||
sodipodi:docname="icon_layers.svg"
|
||||
inkscape:export-filename="/home/ronan/Desktop/icon_layout.png"
|
||||
inkscape:export-xdpi="48"
|
||||
inkscape:export-ydpi="48"
|
||||
|
@ -28,9 +28,9 @@
|
|||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="3.959798"
|
||||
inkscape:cx="74.673459"
|
||||
inkscape:cy="45.737629"
|
||||
inkscape:zoom="0.7"
|
||||
inkscape:cx="-330.80339"
|
||||
inkscape:cy="-397.46436"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
|
@ -48,7 +48,7 @@
|
|||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
<dc:title />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
|
@ -57,19 +57,26 @@
|
|||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(0,-263.13332)">
|
||||
<path
|
||||
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:1.05013251;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="M 3.9646542,263.65839 H 21.591894 l 4.25101,4.39397 4.06324,4.14294 v 24.27962 H 3.9646542 Z"
|
||||
<rect
|
||||
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:1.19349599;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect815"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="ccccccc" />
|
||||
<path
|
||||
style="fill:#ffffff;fill-opacity:0;stroke:#000000;stroke-width:1.05799997;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
inkscape:transform-center-x="0.97501255"
|
||||
inkscape:transform-center-y="-0.55548525"
|
||||
d="m 29.764404,272.05356 -8.13814,0.0243 -0.0344,-8.41946"
|
||||
id="path848"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="ccc" />
|
||||
width="17.856504"
|
||||
height="17.856504"
|
||||
x="0.59674788"
|
||||
y="263.73007" />
|
||||
<rect
|
||||
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:1.19349599;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect815-5"
|
||||
width="17.856504"
|
||||
height="17.856504"
|
||||
x="8.4442673"
|
||||
y="270.30368" />
|
||||
<rect
|
||||
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:1.19349599;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect815-3"
|
||||
width="17.856504"
|
||||
height="17.856504"
|
||||
x="15.413412"
|
||||
y="278.54672" />
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.0 KiB |
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.5 KiB |
|
@ -0,0 +1,56 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
||||
|
||||
<svg
|
||||
width="800px"
|
||||
height="800px"
|
||||
viewBox="0 0 24 24"
|
||||
id="up-right-down-left-sign"
|
||||
data-name="Multi Color"
|
||||
class="icon multi-color"
|
||||
version="1.1"
|
||||
sodipodi:docname="vertical_grainline.svg"
|
||||
inkscape:version="1.3 (1:1.3+202307231459+0e150ed6c4)"
|
||||
inkscape:export-filename="../../light/32x32/vertical_grainline@2x.png"
|
||||
inkscape:export-xdpi="7.6799998"
|
||||
inkscape:export-ydpi="7.6799998"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<defs
|
||||
id="defs1" />
|
||||
<sodipodi:namedview
|
||||
id="namedview1"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
inkscape:zoom="0.70625"
|
||||
inkscape:cx="474.33628"
|
||||
inkscape:cy="356.81416"
|
||||
inkscape:window-width="2560"
|
||||
inkscape:window-height="1372"
|
||||
inkscape:window-x="1920"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="up-right-down-left-sign" />
|
||||
<title
|
||||
style="stroke-width: 2;"
|
||||
id="title1">up right down left sign</title>
|
||||
<path
|
||||
id="secondary-fill"
|
||||
d="m 13.280695,1.5521887 4.549621,4.4505461 -3.460677,-0.087053 -0.09106,3.1073127 -3.76836,-0.082404 0.09142,-3.1196927 -3.4606786,-0.087054 4.8035626,-4.2152666 a 0.94516261,0.87570185 0 0 1 1.33617,0.033611 z"
|
||||
style="fill:#2ca9bc;stroke-width:1.81954" />
|
||||
<path
|
||||
id="tertiary-fill"
|
||||
d="m 12.663979,22.597733 4.803562,-4.215267 -3.460677,-0.08705 0.09106,-3.107314 -3.767635,-0.107163 -0.09142,3.119692 -3.4606784,-0.08705 4.5496224,4.450546 a 0.94516261,0.87570185 0 0 0 1.336169,0.03362 z"
|
||||
style="fill:#b7b7b7;stroke-width:1.81954" />
|
||||
<path
|
||||
id="primary-stroke"
|
||||
d="m 13.000388,1.5298995 4.666603,4.3277288 -3.461768,0.0052 -0.03275,12.3850027 3.461768,-0.0052 -4.689529,4.341774 a 0.87570185,0.94516261 88.473019 0 1 -1.33659,0.002 l -4.6666045,-4.327738 3.4617695,-0.0052 0.03275,-12.3850016 -3.4617693,0.0052 4.6895303,-4.3417736 a 0.87570185,0.94516261 88.473019 0 1 1.336591,-0.00201 z"
|
||||
style="fill:none;stroke:#000000;stroke-width:1.81954;stroke-linecap:round;stroke-linejoin:round;fill-opacity:1" />
|
||||
</svg>
|
After Width: | Height: | Size: 2.5 KiB |
49
src/app/puzzle/share/resources/puzzleicon/svg/roll.svg
Normal file
|
@ -0,0 +1,49 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
||||
|
||||
<svg
|
||||
height="800px"
|
||||
width="800px"
|
||||
version="1.1"
|
||||
id="Layer_1"
|
||||
viewBox="0 0 511.882 511.882"
|
||||
xml:space="preserve"
|
||||
sodipodi:docname="roll.svg"
|
||||
inkscape:export-filename="../16x16/roll@2x.png"
|
||||
inkscape:export-xdpi="3.8399999"
|
||||
inkscape:export-ydpi="3.8399999"
|
||||
inkscape:version="1.3 (1:1.3+202307231459+0e150ed6c4)"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"><defs
|
||||
id="defs4" /><sodipodi:namedview
|
||||
id="namedview4"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
inkscape:zoom="1.4125"
|
||||
inkscape:cx="400"
|
||||
inkscape:cy="400"
|
||||
inkscape:window-width="2560"
|
||||
inkscape:window-height="1372"
|
||||
inkscape:window-x="1920"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="Layer_1" /> <path
|
||||
style="fill:#CCD1D9;"
|
||||
d="M474.551,31.993c0-5.89-4.779-10.654-10.652-10.654c5.873,0,10.652-4.78,10.652-10.669 c0-5.89-4.779-10.67-10.652-10.67H122.64v490.56h341.258c5.873,0,10.652-4.78,10.652-10.67c0-5.889-4.779-10.653-10.652-10.653 c5.873,0,10.652-4.78,10.652-10.67c0-5.889-4.779-10.669-10.652-10.669c5.873,0,10.652-4.765,10.652-10.654 c0-5.889-4.779-10.669-10.652-10.669c5.873,0,10.652-4.78,10.652-10.67c0-5.889-4.779-10.653-10.652-10.653 c5.873,0,10.652-4.78,10.652-10.67c0-5.889-4.779-10.669-10.652-10.669c5.873,0,10.652-4.765,10.652-10.654 c0-5.889-4.779-10.669-10.652-10.669c5.873,0,10.652-4.78,10.652-10.669c0-5.89-4.779-10.654-10.652-10.654 c5.873,0,10.652-4.78,10.652-10.67c0-5.889-4.779-10.669-10.652-10.669c5.873,0,10.652-4.765,10.652-10.653 c0-5.89-4.779-10.67-10.652-10.67c5.873,0,10.652-4.78,10.652-10.67c0-5.889-4.779-10.653-10.652-10.653 c5.873,0,10.652-4.78,10.652-10.669c0-5.89-4.779-10.67-10.652-10.67c5.873,0,10.652-4.765,10.652-10.654 s-4.779-10.669-10.652-10.669c5.873,0,10.652-4.78,10.652-10.669s-4.779-10.654-10.652-10.654c5.873,0,10.652-4.78,10.652-10.669 s-4.779-10.669-10.652-10.669c5.873,0,10.652-4.765,10.652-10.654s-4.779-10.669-10.652-10.669c5.873,0,10.652-4.78,10.652-10.669 c0-5.89-4.779-10.654-10.652-10.654c5.873,0,10.652-4.78,10.652-10.669c0-5.89-4.779-10.67-10.652-10.67 c5.873,0,10.652-4.765,10.652-10.653c0-5.89-4.779-10.67-10.652-10.67c5.873,0,10.652-4.78,10.652-10.669 c0-5.89-4.779-10.654-10.652-10.654c5.873,0,10.652-4.78,10.652-10.669c0-5.89-4.779-10.67-10.652-10.67 c5.873,0,10.652-4.765,10.652-10.653c0-5.89-4.779-10.67-10.652-10.67C469.771,42.662,474.551,37.881,474.551,31.993z"
|
||||
id="path1" /> <path
|
||||
style="fill:#E6E9ED;"
|
||||
d="M37.332,42.662v426.574c0,23.557,38.194,42.646,85.309,42.646s85.309-19.09,85.309-42.646V42.662 H37.332z"
|
||||
id="path2" /> <path
|
||||
style="fill:#F5F7FA;"
|
||||
d="M207.949,42.662C207.949,19.105,169.755,0,122.64,0S37.332,19.105,37.332,42.662 c0,23.558,38.194,42.662,85.309,42.662S207.949,66.219,207.949,42.662z"
|
||||
id="path3" /> <path
|
||||
style="fill:#434A54;"
|
||||
d="M133.309,42.662c0,5.89-4.78,10.67-10.669,10.67s-10.669-4.78-10.669-10.67 c0-5.889,4.78-10.669,10.669-10.669S133.309,36.773,133.309,42.662z"
|
||||
id="path4" /> </svg>
|
After Width: | Height: | Size: 3.4 KiB |
|
@ -30,6 +30,7 @@
|
|||
#include <QCloseEvent>
|
||||
#include <QFileDialog>
|
||||
#include <QFileSystemWatcher>
|
||||
#include <QLoggingCategory>
|
||||
#include <QPrintDialog>
|
||||
#include <QPrintPreviewDialog>
|
||||
#include <QPrinterInfo>
|
||||
|
@ -39,10 +40,12 @@
|
|||
#include <QUndoStack>
|
||||
#include <QtMath>
|
||||
#include <chrono>
|
||||
#include <thread>
|
||||
|
||||
#include "../ifc/exception/vexception.h"
|
||||
#include "../ifc/xml/vlayoutconverter.h"
|
||||
#include "../vdxf/libdxfrw/drw_base.h"
|
||||
#include "../vganalytics/vganalytics.h"
|
||||
#include "../vlayout/dialogs/watermarkwindow.h"
|
||||
#include "../vlayout/vlayoutexporter.h"
|
||||
#include "../vlayout/vprintlayout.h"
|
||||
|
@ -51,11 +54,13 @@
|
|||
#include "../vmisc/dialogs/dialogselectlanguage.h"
|
||||
#include "../vmisc/lambdaconstants.h"
|
||||
#include "../vmisc/projectversion.h"
|
||||
#include "../vmisc/theme/vtheme.h"
|
||||
#include "../vmisc/vsysexits.h"
|
||||
#include "../vwidgets/vmaingraphicsscene.h"
|
||||
#include "dialogs/dialogpuzzlepreferences.h"
|
||||
#include "dialogs/dialogsavemanuallayout.h"
|
||||
#include "dialogs/vpdialogabout.h"
|
||||
#include "layout/vppiece.h"
|
||||
#include "layout/vpsheet.h"
|
||||
#include "ui_vpmainwindow.h"
|
||||
#include "undocommands/vpundoaddsheet.h"
|
||||
|
@ -63,14 +68,13 @@
|
|||
#include "undocommands/vpundopiecerotate.h"
|
||||
#include "undocommands/vpundopiecezvaluemove.h"
|
||||
#include "vpapplication.h"
|
||||
#include "vptilefactory.h"
|
||||
#include "xml/vplayoutfilereader.h"
|
||||
#include "xml/vplayoutfilewriter.h"
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
|
||||
#include "../vmisc/backport/qoverload.h"
|
||||
#endif // QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
|
||||
#include "../vganalytics/vganalytics.h"
|
||||
#include "layout/vppiece.h"
|
||||
#include "vptilefactory.h"
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(5, 12, 0)
|
||||
#include "../vmisc/backport/qscopeguard.h"
|
||||
|
@ -78,10 +82,6 @@
|
|||
#include <QScopeGuard>
|
||||
#endif
|
||||
|
||||
#include <QLoggingCategory>
|
||||
#include <chrono>
|
||||
#include <thread>
|
||||
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_CLANG("-Wmissing-prototypes")
|
||||
QT_WARNING_DISABLE_INTEL(1418)
|
||||
|
@ -1715,11 +1715,9 @@ auto VPMainWindow::MaybeSave() -> bool
|
|||
// TODO: Implement maybe save check
|
||||
if (this->isWindowModified())
|
||||
{
|
||||
QScopedPointer<QMessageBox> messageBox(new QMessageBox(tr("Unsaved changes"),
|
||||
tr("Layout has been modified.\n"
|
||||
"Do you want to save your changes?"),
|
||||
QMessageBox::Warning, QMessageBox::Yes, QMessageBox::No,
|
||||
QMessageBox::Cancel, this, Qt::Sheet));
|
||||
QScopedPointer<QMessageBox> messageBox(new QMessageBox(
|
||||
tr("Unsaved changes"), tr("Layout has been modified. Do you want to save your changes?"),
|
||||
QMessageBox::Warning, QMessageBox::Yes, QMessageBox::No, QMessageBox::Cancel, this, Qt::Sheet));
|
||||
|
||||
messageBox->setDefaultButton(QMessageBox::Yes);
|
||||
messageBox->setEscapeButton(QMessageBox::Cancel);
|
||||
|
@ -2758,7 +2756,7 @@ auto VPMainWindow::DrawTilesScheme(QPrinter *printer, QPainter *painter, const V
|
|||
if (watermarkData.showImage && not watermarkData.path.isEmpty())
|
||||
{
|
||||
VPTileFactory::PaintWatermarkImage(painter, target, watermarkData,
|
||||
m_layout->LayoutSettings().WatermarkPath());
|
||||
m_layout->LayoutSettings().WatermarkPath(), false);
|
||||
}
|
||||
|
||||
if (watermarkData.showText && not watermarkData.text.isEmpty())
|
||||
|
@ -3346,6 +3344,29 @@ void VPMainWindow::RotatePieces()
|
|||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VPMainWindow::InitIcons()
|
||||
{
|
||||
const QString resource = QStringLiteral("puzzleicon");
|
||||
|
||||
auto SetTabIcon = [resource, this](QWidget *tab, const QString &iconName)
|
||||
{
|
||||
const int index = ui->tabWidgetProperties->indexOf(tab);
|
||||
if (index != -1)
|
||||
{
|
||||
ui->tabWidgetProperties->setTabIcon(index, VTheme::GetIconResource(resource, iconName));
|
||||
}
|
||||
};
|
||||
|
||||
SetTabIcon(ui->tabCurrentPieceProperty, QStringLiteral("64x64/iconCurrentPiece.png"));
|
||||
SetTabIcon(ui->tabTilesProperty, QStringLiteral("64x64/iconTiles.png"));
|
||||
|
||||
ui->toolButtonGrainlineHorizontalOrientation->setIcon(
|
||||
VTheme::GetIconResource(resource, QStringLiteral("32x32/horizontal_grainline.png")));
|
||||
ui->toolButtonGrainlineVerticalOrientation->setIcon(
|
||||
VTheme::GetIconResource(resource, QStringLiteral("32x32/vertical_grainline.png")));
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VPMainWindow::on_actionNew_triggered() // NOLINT(readability-convert-member-functions-to-static)
|
||||
{
|
||||
|
@ -3396,6 +3417,11 @@ void VPMainWindow::changeEvent(QEvent *event)
|
|||
UpdateWindowTitle();
|
||||
}
|
||||
|
||||
if (event->type() == QEvent::PaletteChange)
|
||||
{
|
||||
InitIcons();
|
||||
}
|
||||
|
||||
// remember to call base class implementation
|
||||
QMainWindow::changeEvent(event);
|
||||
}
|
||||
|
|
|
@ -28,24 +28,24 @@
|
|||
#ifndef VPMAINWINDOW_H
|
||||
#define VPMAINWINDOW_H
|
||||
|
||||
#include <QDoubleSpinBox>
|
||||
#include <QMainWindow>
|
||||
#include <QMessageBox>
|
||||
#include <QDoubleSpinBox>
|
||||
#include <QPointer>
|
||||
|
||||
#include "../vmisc/def.h"
|
||||
#include "carousel/vpcarrousel.h"
|
||||
#include "scene/vpmaingraphicsview.h"
|
||||
#include "layout/vplayout.h"
|
||||
#include "../vlayout/vlayoutpiece.h"
|
||||
#include "vpcommandline.h"
|
||||
#include "../vwidgets/vabstractmainwindow.h"
|
||||
#include "../vmisc/vlockguard.h"
|
||||
#include "../vlayout/dialogs/vabstractlayoutdialog.h"
|
||||
#include "../vlayout/vlayoutpiece.h"
|
||||
#include "../vmisc/def.h"
|
||||
#include "../vmisc/vlockguard.h"
|
||||
#include "../vwidgets/vabstractmainwindow.h"
|
||||
#include "carousel/vpcarrousel.h"
|
||||
#include "layout/vplayout.h"
|
||||
#include "scene/vpmaingraphicsview.h"
|
||||
#include "vpcommandline.h"
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
class VPMainWindow;
|
||||
class VPMainWindow;
|
||||
}
|
||||
|
||||
class QFileSystemWatcher;
|
||||
|
@ -70,7 +70,7 @@ public:
|
|||
* @param path path to layout
|
||||
* @return true if success
|
||||
*/
|
||||
auto LoadFile(const QString& path) -> bool;
|
||||
auto LoadFile(const QString &path) -> bool;
|
||||
|
||||
void LayoutWasSaved(bool saved);
|
||||
void SetCurrentFile(const QString &fileName);
|
||||
|
@ -106,7 +106,7 @@ public slots:
|
|||
|
||||
protected:
|
||||
void closeEvent(QCloseEvent *event) override;
|
||||
void changeEvent(QEvent* event) override;
|
||||
void changeEvent(QEvent *event) override;
|
||||
auto RecentFileList() const -> QStringList override;
|
||||
|
||||
private slots:
|
||||
|
@ -122,14 +122,14 @@ private slots:
|
|||
* triggered.
|
||||
* The slot is automatically connected through name convention.
|
||||
*/
|
||||
bool on_actionSave_triggered(); //NOLINT(modernize-use-trailing-return-type)
|
||||
bool on_actionSave_triggered(); // NOLINT(modernize-use-trailing-return-type)
|
||||
|
||||
/**
|
||||
* @brief on_actionSaveAs_triggered When the menu action File > Save As
|
||||
* is triggered.
|
||||
* The slot is automatically connected through name convention.
|
||||
*/
|
||||
bool on_actionSaveAs_triggered(); //NOLINT(modernize-use-trailing-return-type)
|
||||
bool on_actionSaveAs_triggered(); // NOLINT(modernize-use-trailing-return-type)
|
||||
|
||||
/**
|
||||
* @brief on_actionImportRawLayout_triggered When the menu action
|
||||
|
@ -284,8 +284,8 @@ private slots:
|
|||
|
||||
#if defined(Q_OS_MAC)
|
||||
void AboutToShowDockMenu();
|
||||
#endif //defined(Q_OS_MAC)
|
||||
|
||||
#endif // defined(Q_OS_MAC)
|
||||
|
||||
void AskDefaultSettings();
|
||||
|
||||
void HorizontalScaleChanged(double value);
|
||||
|
@ -315,9 +315,9 @@ private:
|
|||
/**
|
||||
* @brief mouseCoordinate pointer to label who show mouse coordinate.
|
||||
*/
|
||||
QLabel* m_mouseCoordinate{nullptr};
|
||||
QLabel *m_mouseCoordinate{nullptr};
|
||||
|
||||
QLabel* m_statusLabel{nullptr};
|
||||
QLabel *m_statusLabel{nullptr};
|
||||
|
||||
QString curFile{};
|
||||
|
||||
|
@ -342,9 +342,9 @@ private:
|
|||
struct VPLayoutPrinterPage
|
||||
{
|
||||
VPSheetPtr sheet{};
|
||||
bool tilesScheme{false};
|
||||
int tileRow{-1};
|
||||
int tileCol{-1};
|
||||
bool tilesScheme{false};
|
||||
int tileRow{-1};
|
||||
int tileCol{-1};
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -425,9 +425,9 @@ private:
|
|||
void SetPropertyTabTilesData();
|
||||
|
||||
/**
|
||||
* @brief SetPropertyTabLayoutData Sets the values of UI elements
|
||||
* in the Layout Tab to the values saved in m_layout
|
||||
*/
|
||||
* @brief SetPropertyTabLayoutData Sets the values of UI elements
|
||||
* in the Layout Tab to the values saved in m_layout
|
||||
*/
|
||||
void SetPropertyTabLayoutData();
|
||||
|
||||
void ReadSettings();
|
||||
|
@ -473,7 +473,7 @@ private:
|
|||
|
||||
void ExportData(const VPExportData &data);
|
||||
static void ExportApparelLayout(const VPExportData &data, const QVector<VLayoutPiece> &details, const QString &name,
|
||||
const QSize &size) ;
|
||||
const QSize &size);
|
||||
void ExportFlatLayout(const VPExportData &data);
|
||||
void ExportScene(const VPExportData &data);
|
||||
static void ExportUnifiedPdfFile(const VPExportData &data);
|
||||
|
@ -494,7 +494,7 @@ private:
|
|||
auto CheckSuperpositionOfPieces(const VPPiecePtr &piece, bool &pieceSuperpositionChecked) -> bool;
|
||||
|
||||
void PrintLayoutSheets(QPrinter *printer, const QList<VPSheetPtr> &sheets);
|
||||
static auto PrintLayoutSheetPage(QPrinter *printer, QPainter &painter, const VPSheetPtr& sheet) -> bool;
|
||||
static auto PrintLayoutSheetPage(QPrinter *printer, QPainter &painter, const VPSheetPtr &sheet) -> bool;
|
||||
void PrintLayoutTiledSheets(QPrinter *printer, const QList<VPSheetPtr> &sheets);
|
||||
auto PrepareLayoutTilePages(const QList<VPSheetPtr> &sheets) -> QVector<VPLayoutPrinterPage>;
|
||||
auto PrintLayoutTiledSheetPage(QPrinter *printer, QPainter &painter, const VPLayoutPrinterPage &page,
|
||||
|
@ -509,6 +509,8 @@ private:
|
|||
void TranslatePieceRelatively(const VPPiecePtr &piece, const QRectF &rect, vsizetype selectedPiecesCount, qreal dx,
|
||||
qreal dy);
|
||||
void RotatePieces();
|
||||
|
||||
void InitIcons();
|
||||
};
|
||||
|
||||
#endif // VPMAINWINDOW_H
|
||||
|
|
|
@ -233,7 +233,7 @@
|
|||
</property>
|
||||
<attribute name="icon">
|
||||
<iconset resource="share/resources/puzzleicon.qrc">
|
||||
<normaloff>:/puzzleicon/64x64/iconCurrentPiece.png</normaloff>:/puzzleicon/64x64/iconCurrentPiece.png</iconset>
|
||||
<normaloff>:/puzzleicon/light/64x64/iconCurrentPiece.png</normaloff>:/puzzleicon/light/64x64/iconCurrentPiece.png</iconset>
|
||||
</attribute>
|
||||
<attribute name="title">
|
||||
<string/>
|
||||
|
@ -870,7 +870,7 @@
|
|||
<item>
|
||||
<widget class="QToolButton" name="toolButtonSheetPortraitOritation">
|
||||
<property name="text">
|
||||
<string notr="true">...</string>
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../../libs/vmisc/share/resources/icon.qrc">
|
||||
|
@ -893,7 +893,7 @@
|
|||
<item>
|
||||
<widget class="QToolButton" name="toolButtonSheetLandscapeOrientation">
|
||||
<property name="text">
|
||||
<string notr="true">...</string>
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../../libs/vmisc/share/resources/icon.qrc">
|
||||
|
@ -950,11 +950,11 @@
|
|||
<string>Force the grainline orientation to always be horizontal</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true">...</string>
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="share/resources/puzzleicon.qrc">
|
||||
<normaloff>:/puzzleicon/32X32/horizontal_grainline.png</normaloff>:/puzzleicon/32X32/horizontal_grainline.png</iconset>
|
||||
<normaloff>:/puzzleicon/light/32x32/horizontal_grainline.png</normaloff>:/puzzleicon/light/32x32/horizontal_grainline.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
|
@ -973,11 +973,11 @@
|
|||
<string>Force the grainline orientation to always be vertical</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true">...</string>
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="share/resources/puzzleicon.qrc">
|
||||
<normaloff>:/puzzleicon/32X32/vertical_grainline.png</normaloff>:/puzzleicon/32X32/vertical_grainline.png</iconset>
|
||||
<normaloff>:/puzzleicon/light/32x32/vertical_grainline.png</normaloff>:/puzzleicon/light/32x32/vertical_grainline.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
|
@ -1203,7 +1203,7 @@
|
|||
<widget class="QWidget" name="tabTilesProperty">
|
||||
<attribute name="icon">
|
||||
<iconset resource="share/resources/puzzleicon.qrc">
|
||||
<normaloff>:/puzzleicon/64x64/iconTiles.png</normaloff>:/puzzleicon/64x64/iconTiles.png</iconset>
|
||||
<normaloff>:/puzzleicon/light/64x64/iconTiles.png</normaloff>:/puzzleicon/light/64x64/iconTiles.png</iconset>
|
||||
</attribute>
|
||||
<attribute name="title">
|
||||
<string/>
|
||||
|
@ -1316,7 +1316,7 @@
|
|||
<item>
|
||||
<widget class="QToolButton" name="toolButtonTilePortraitOrientation">
|
||||
<property name="text">
|
||||
<string notr="true">...</string>
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../../libs/vmisc/share/resources/icon.qrc">
|
||||
|
@ -1339,7 +1339,7 @@
|
|||
<item>
|
||||
<widget class="QToolButton" name="toolButtonTileLandscapeOrientation">
|
||||
<property name="text">
|
||||
<string notr="true">...</string>
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../../libs/vmisc/share/resources/icon.qrc">
|
||||
|
@ -1857,7 +1857,7 @@
|
|||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true">...</string>
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../../libs/vmisc/share/resources/icon.qrc">
|
||||
|
@ -2427,8 +2427,8 @@
|
|||
</resources>
|
||||
<connections/>
|
||||
<buttongroups>
|
||||
<buttongroup name="buttonGroupRotationDirection"/>
|
||||
<buttongroup name="buttonGroupSheetOrientation"/>
|
||||
<buttongroup name="buttonGroupTileOrientation"/>
|
||||
<buttongroup name="buttonGroupRotationDirection"/>
|
||||
</buttongroups>
|
||||
</ui>
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#include "../vwidgets/vmaingraphicsscene.h"
|
||||
#include "layout/vplayout.h"
|
||||
#include "layout/vpsheet.h"
|
||||
#include "theme/vtheme.h"
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(5, 5, 0)
|
||||
#include "../vmisc/diagnostic.h"
|
||||
|
@ -390,7 +391,7 @@ void VPTileFactory::DrawWatermark(QPainter *painter) const
|
|||
|
||||
if (m_watermarkData.showImage && not m_watermarkData.path.isEmpty())
|
||||
{
|
||||
PaintWatermarkImage(painter, img, m_watermarkData, layout->LayoutSettings().WatermarkPath());
|
||||
PaintWatermarkImage(painter, img, m_watermarkData, layout->LayoutSettings().WatermarkPath(), false);
|
||||
}
|
||||
|
||||
if (m_watermarkData.showText && not m_watermarkData.text.isEmpty())
|
||||
|
@ -690,16 +691,25 @@ void VPTileFactory::PaintWatermarkText(QPainter *painter, const QRectF &img, con
|
|||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VPTileFactory::PaintWatermarkImage(QPainter *painter, const QRectF &img, const VWatermarkData &watermarkData,
|
||||
const QString &watermarkPath, qreal xScale, qreal yScale)
|
||||
const QString &watermarkPath, bool folowColorScheme, qreal xScale, qreal yScale)
|
||||
{
|
||||
SCASSERT(painter != nullptr)
|
||||
|
||||
const qreal opacity = watermarkData.opacity / 100.;
|
||||
auto BrokenImage = [img, watermarkData, watermarkPath, opacity]()
|
||||
auto BrokenImage = [img, watermarkData, watermarkPath, opacity, folowColorScheme]()
|
||||
{
|
||||
QString colorScheme = QStringLiteral("light");
|
||||
|
||||
if (folowColorScheme)
|
||||
{
|
||||
colorScheme =
|
||||
(VTheme::ColorSheme() == VColorSheme::Light ? QStringLiteral("light") : QStringLiteral("dark"));
|
||||
}
|
||||
|
||||
QPixmap watermark;
|
||||
QString imagePath = QStringLiteral("puzzle=path%1+opacity%2_broken")
|
||||
.arg(AbsoluteMPath(watermarkPath, watermarkData.path), QString::number(opacity));
|
||||
QString imagePath =
|
||||
QStringLiteral("puzzle=colorScheme%1+path%2+opacity%3_broken")
|
||||
.arg(colorScheme, AbsoluteMPath(watermarkPath, watermarkData.path), QString::number(opacity));
|
||||
|
||||
if (not QPixmapCache::find(imagePath, &watermark))
|
||||
{
|
||||
|
@ -712,7 +722,7 @@ void VPTileFactory::PaintWatermarkImage(QPainter *painter, const QRectF &img, co
|
|||
QPainter imagePainter(&watermark);
|
||||
imagePainter.setOpacity(opacity);
|
||||
|
||||
svgRenderer->load(QStringLiteral("://puzzleicon/svg/no_watermark_image.svg"));
|
||||
svgRenderer->load(QStringLiteral("://puzzleicon/svg/%1/no_watermark_image.svg").arg(colorScheme));
|
||||
svgRenderer->render(&imagePainter, imageRect);
|
||||
|
||||
QPixmapCache::insert(imagePath, watermark);
|
||||
|
|
|
@ -102,7 +102,8 @@ public:
|
|||
static void PaintWatermarkText(QPainter *painter, const QRectF &img, const VWatermarkData &watermarkData,
|
||||
qreal xScale = 1.0, qreal yScale = 1.0);
|
||||
static void PaintWatermarkImage(QPainter *painter, const QRectF &img, const VWatermarkData &watermarkData,
|
||||
const QString &watermarkPath, qreal xScale = 1.0, qreal yScale = 1.0);
|
||||
const QString &watermarkPath, bool folowColorScheme, qreal xScale = 1.0,
|
||||
qreal yScale = 1.0);
|
||||
|
||||
private:
|
||||
// cppcheck-suppress unknownMacro
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>220</width>
|
||||
<height>104</height>
|
||||
<width>342</width>
|
||||
<height>107</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
|
@ -36,11 +36,14 @@
|
|||
<item row="0" column="1">
|
||||
<widget class="QComboBox" name="comboBoxMType">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="sizeAdjustPolicy">
|
||||
<enum>QComboBox::AdjustToContents</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
|
@ -53,11 +56,14 @@
|
|||
<item row="1" column="1">
|
||||
<widget class="QComboBox" name="comboBoxUnit">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="sizeAdjustPolicy">
|
||||
<enum>QComboBox::AdjustToContents</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
|
|
|
@ -49,7 +49,7 @@ auto FilterByMinimum(const QVector<qreal> &base, qreal restriction) -> QVector<q
|
|||
|
||||
QVector<qreal> filtered;
|
||||
filtered.reserve(base.size());
|
||||
for(const auto &b : base)
|
||||
for (const auto &b : base)
|
||||
{
|
||||
if (b > restriction || VFuzzyComparePossibleNulls(b, restriction))
|
||||
{
|
||||
|
@ -69,7 +69,7 @@ auto FilterByMaximum(const QVector<qreal> &base, qreal restriction) -> QVector<q
|
|||
|
||||
QVector<qreal> filtered;
|
||||
filtered.reserve(base.size());
|
||||
for(const auto &b : base)
|
||||
for (const auto &b : base)
|
||||
{
|
||||
if (b < restriction || VFuzzyComparePossibleNulls(b, restriction))
|
||||
{
|
||||
|
@ -100,6 +100,8 @@ void InitMinMax(qreal &min, qreal &max, const MeasurementDimension_p &dimension,
|
|||
void SetCellIcon(QTableWidgetItem *item, const QVector<qreal> &validRows, qreal rowValue, qreal columnValue,
|
||||
const VDimensionRestriction &restriction, qreal min, qreal max)
|
||||
{
|
||||
const QIcon closeIcon = QIcon(QStringLiteral("://icon/24x24/close.png"));
|
||||
|
||||
if (VFuzzyContains(validRows, rowValue))
|
||||
{
|
||||
const bool leftRestriction = columnValue > min || VFuzzyComparePossibleNulls(columnValue, min);
|
||||
|
@ -107,32 +109,32 @@ void SetCellIcon(QTableWidgetItem *item, const QVector<qreal> &validRows, qreal
|
|||
|
||||
if (leftRestriction && rightRestriction)
|
||||
{
|
||||
item->setIcon(QIcon(VFuzzyContains(restriction.GetExcludeValues(), columnValue)
|
||||
? QStringLiteral("://icon/24x24/close.png")
|
||||
: QStringLiteral("://icon/24x24/star.png")));
|
||||
item->setIcon(VFuzzyContains(restriction.GetExcludeValues(), columnValue)
|
||||
? closeIcon
|
||||
: QIcon(QStringLiteral("://icon/24x24/star.png")));
|
||||
}
|
||||
else
|
||||
{
|
||||
item->setIcon(QIcon(QStringLiteral("://icon/24x24/close.png")));
|
||||
item->setIcon(closeIcon);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
item->setIcon(QIcon(QStringLiteral("://icon/24x24/close.png")));
|
||||
item->setIcon(closeIcon);
|
||||
|
||||
Qt::ItemFlags flags = item->flags();
|
||||
flags &= ~(Qt::ItemIsEnabled);
|
||||
item->setFlags(flags);
|
||||
}
|
||||
}
|
||||
} // namespace
|
||||
} // namespace
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
DialogRestrictDimension::DialogRestrictDimension(const QList<MeasurementDimension_p> &dimensions,
|
||||
const QMap<QString, VDimensionRestriction> &restrictions,
|
||||
RestrictDimension restrictionType, bool fullCircumference,
|
||||
QWidget *parent) :
|
||||
QDialog(parent),
|
||||
QWidget *parent)
|
||||
: QDialog(parent),
|
||||
ui(new Ui::DialogRestrictDimension),
|
||||
m_restrictionType(restrictionType),
|
||||
m_fullCircumference(fullCircumference),
|
||||
|
@ -185,7 +187,7 @@ void DialogRestrictDimension::changeEvent(QEvent *event)
|
|||
{
|
||||
MeasurementDimension_p dimension = m_dimensions.at(index);
|
||||
|
||||
name->setText(dimension->Name()+QChar(':'));
|
||||
name->setText(dimension->Name() + QChar(':'));
|
||||
name->setToolTip(VAbstartMeasurementDimension::DimensionToolTip(dimension, m_fullCircumference));
|
||||
|
||||
InitDimensionGradation(dimension, control);
|
||||
|
@ -449,7 +451,7 @@ void DialogRestrictDimension::InitDimensionsBaseValues()
|
|||
if (m_dimensions.size() > index)
|
||||
{
|
||||
MeasurementDimension_p dimension = m_dimensions.at(index);
|
||||
name->setText(dimension->Name()+QChar(':'));
|
||||
name->setText(dimension->Name() + QChar(':'));
|
||||
name->setToolTip(VAbstartMeasurementDimension::DimensionToolTip(dimension, m_fullCircumference));
|
||||
|
||||
InitDimensionGradation(dimension, control);
|
||||
|
@ -614,16 +616,16 @@ void DialogRestrictDimension::RefreshTable()
|
|||
|
||||
if (m_restrictionType == RestrictDimension::First)
|
||||
{
|
||||
for(int column=0; column < basesColumn.size(); ++column)
|
||||
for (int column = 0; column < basesColumn.size(); ++column)
|
||||
{
|
||||
AddCell(0, column, 0, basesColumn.at(column));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for(int row=0; row < basesRow.size(); ++row)
|
||||
for (int row = 0; row < basesRow.size(); ++row)
|
||||
{
|
||||
for(int column=0; column < basesColumn.size(); ++column)
|
||||
for (int column = 0; column < basesColumn.size(); ++column)
|
||||
{
|
||||
AddCell(row, column, basesRow.at(row), basesColumn.at(column));
|
||||
}
|
||||
|
@ -765,8 +767,8 @@ void DialogRestrictDimension::FillBase(double base, const MeasurementDimension_p
|
|||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
auto DialogRestrictDimension::FillDimensionXBases(const QVector<qreal> &bases,
|
||||
const MeasurementDimension_p &dimension) -> QStringList
|
||||
auto DialogRestrictDimension::FillDimensionXBases(const QVector<qreal> &bases, const MeasurementDimension_p &dimension)
|
||||
-> QStringList
|
||||
{
|
||||
const bool showUnits = dimension->IsBodyMeasurement() || dimension->Type() == MeasurementDimension::X;
|
||||
const QString units = showUnits ? UnitsToStr(dimension->Units(), true) : QString();
|
||||
|
@ -774,7 +776,7 @@ auto DialogRestrictDimension::FillDimensionXBases(const QVector<qreal> &bases,
|
|||
|
||||
QStringList labels;
|
||||
|
||||
for(auto base : bases)
|
||||
for (auto base : bases)
|
||||
{
|
||||
if (VFuzzyContains(dimensionLabels, base) && not VFuzzyValue(dimensionLabels, base).isEmpty())
|
||||
{
|
||||
|
@ -799,7 +801,7 @@ auto DialogRestrictDimension::FillDimensionYBases(const QVector<qreal> &bases,
|
|||
|
||||
QStringList labels;
|
||||
|
||||
for(auto base : bases)
|
||||
for (auto base : bases)
|
||||
{
|
||||
if (VFuzzyContains(dimensionLabels, base) && not VFuzzyValue(dimensionLabels, base).isEmpty())
|
||||
{
|
||||
|
@ -809,7 +811,7 @@ auto DialogRestrictDimension::FillDimensionYBases(const QVector<qreal> &bases,
|
|||
{
|
||||
if (dimension->IsBodyMeasurement())
|
||||
{
|
||||
labels.append(QStringLiteral("%1 %2").arg(m_fullCircumference ? base*2 : base).arg(units));
|
||||
labels.append(QStringLiteral("%1 %2").arg(m_fullCircumference ? base * 2 : base).arg(units));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -831,7 +833,7 @@ auto DialogRestrictDimension::FillDimensionWZBases(const QVector<qreal> &bases,
|
|||
|
||||
QStringList labels;
|
||||
|
||||
for(auto base : bases)
|
||||
for (auto base : bases)
|
||||
{
|
||||
if (VFuzzyContains(dimensionLabels, base) && not VFuzzyValue(dimensionLabels, base).isEmpty())
|
||||
{
|
||||
|
@ -839,7 +841,7 @@ auto DialogRestrictDimension::FillDimensionWZBases(const QVector<qreal> &bases,
|
|||
}
|
||||
else
|
||||
{
|
||||
labels.append(QStringLiteral("%1 %2").arg(m_fullCircumference ? base*2 : base).arg(units));
|
||||
labels.append(QStringLiteral("%1 %2").arg(m_fullCircumference ? base * 2 : base).arg(units));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -918,7 +920,7 @@ auto DialogRestrictDimension::StartRow() const -> int
|
|||
|
||||
QVector<qreal> validRows = DimensionRestrictedValues(dimensionB);
|
||||
|
||||
for(int i=0; i < basesRow.size(); ++i)
|
||||
for (int i = 0; i < basesRow.size(); ++i)
|
||||
{
|
||||
if (VFuzzyContains(validRows, basesRow.at(i)))
|
||||
{
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
|
||||
#include "dialogtapepreferences.h"
|
||||
#include "../mapplication.h"
|
||||
#include "../vtools/dialogs/dialogtoolbox.h"
|
||||
#include "configpages/tapepreferencesconfigurationpage.h"
|
||||
#include "configpages/tapepreferencespathpage.h"
|
||||
#include "ui_dialogtapepreferences.h"
|
||||
|
@ -120,19 +121,7 @@ void DialogTapePreferences::changeEvent(QEvent *event)
|
|||
|
||||
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));
|
||||
InitDialogButtonBoxIcons(ui->buttonBox);
|
||||
}
|
||||
|
||||
// remember to call base class implementation
|
||||
|
|
|
@ -52,11 +52,12 @@ auto main(int argc, char *argv[]) -> int
|
|||
auto FreeMemory = qScopeGuard([exe_dir] { free(exe_dir); });
|
||||
#endif // defined(APPIMAGE) && defined(Q_OS_LINUX)
|
||||
|
||||
Q_INIT_RESOURCE(tapeicon); // NOLINT
|
||||
Q_INIT_RESOURCE(icon); // NOLINT
|
||||
Q_INIT_RESOURCE(schema); // NOLINT
|
||||
Q_INIT_RESOURCE(flags); // NOLINT
|
||||
Q_INIT_RESOURCE(breeze); // NOLINT
|
||||
Q_INIT_RESOURCE(tapeicon); // NOLINT
|
||||
Q_INIT_RESOURCE(icon); // NOLINT
|
||||
Q_INIT_RESOURCE(schema); // NOLINT
|
||||
Q_INIT_RESOURCE(flags); // NOLINT
|
||||
Q_INIT_RESOURCE(breeze); // NOLINT
|
||||
Q_INIT_RESOURCE(scenestyle); // NOLINT
|
||||
#if defined(Q_OS_MACX)
|
||||
Q_INIT_RESOURCE(mac_theme); // NOLINT
|
||||
#else
|
||||
|
|
|
@ -38,6 +38,7 @@
|
|||
#include "../vmisc/theme/vapplicationstyle.h"
|
||||
#include "../vmisc/theme/vtheme.h"
|
||||
#include "../vmisc/vsysexits.h"
|
||||
#include "qtpreprocessorsupport.h"
|
||||
#include "tmainwindow.h"
|
||||
#include "version.h"
|
||||
|
||||
|
@ -611,6 +612,14 @@ auto MApplication::diagramsPath() -> QString
|
|||
return file.absoluteFilePath();
|
||||
}
|
||||
|
||||
#ifdef QBS_BUILD
|
||||
file = QFileInfo(QCoreApplication::applicationDirPath() + "/../../.." + PKGDATADIR + dPath);
|
||||
if (file.exists())
|
||||
{
|
||||
return file.absoluteFilePath();
|
||||
}
|
||||
#endif // QBS_BUILD
|
||||
|
||||
#if defined(APPIMAGE) && defined(Q_OS_LINUX)
|
||||
/* Fix path to diagrams when run inside AppImage. */
|
||||
return AppImageRoot() + PKGDATADIR + dPath;
|
||||
|
|
|
@ -3,13 +3,17 @@
|
|||
<file>tapeicon/64x64/logo.png</file>
|
||||
<file>tapeicon/16x16/info.png</file>
|
||||
<file>tapeicon/16x16/measurement.png</file>
|
||||
<file>tapeicon/24x24/fx.png</file>
|
||||
<file>tapeicon/24x24/orange_plus.png</file>
|
||||
<file>tapeicon/24x24/red_plus.png</file>
|
||||
<file>tapeicon/24x24/padlock_locked.png</file>
|
||||
<file>tapeicon/24x24/padlock_opened.png</file>
|
||||
<file>tapeicon/24x24/mannequin.png</file>
|
||||
<file>tapeicon/24x24/separator@2x.png</file>
|
||||
<file>tapeicon/24x24/separator.png</file>
|
||||
<file>tapeicon/24x24/padlock_locked@2x.png</file>
|
||||
<file>tapeicon/24x24/padlock_opened@2x.png</file>
|
||||
<file>tapeicon/light/24x24/mannequin@2x.png</file>
|
||||
<file>tapeicon/light/24x24/mannequin.png</file>
|
||||
<file>tapeicon/dark/24x24/mannequin@2x.png</file>
|
||||
<file>tapeicon/dark/24x24/mannequin.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
|
Before Width: | Height: | Size: 697 B |
Before Width: | Height: | Size: 520 B |
Before Width: | Height: | Size: 479 B After Width: | Height: | Size: 572 B |
After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 517 B After Width: | Height: | Size: 561 B |
After Width: | Height: | Size: 1018 B |
BIN
src/app/tape/share/resources/tapeicon/dark/24x24/mannequin.png
Normal file
After Width: | Height: | Size: 948 B |
After Width: | Height: | Size: 1.8 KiB |
BIN
src/app/tape/share/resources/tapeicon/light/24x24/mannequin.png
Normal file
After Width: | Height: | Size: 707 B |
After Width: | Height: | Size: 1.3 KiB |
43
src/app/tape/share/resources/tapeicon/svg/dark/mannequin.svg
Normal file
|
@ -0,0 +1,43 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
||||
|
||||
<svg
|
||||
fill="#000000"
|
||||
version="1.1"
|
||||
id="Capa_1"
|
||||
width="800px"
|
||||
height="800px"
|
||||
viewBox="0 0 164.882 164.883"
|
||||
xml:space="preserve"
|
||||
sodipodi:docname="mannequin.svg"
|
||||
inkscape:version="1.3 (1:1.3+202307231459+0e150ed6c4)"
|
||||
inkscape:export-filename="../../dark/24x24/mannequin@2x.png"
|
||||
inkscape:export-xdpi="5.7600002"
|
||||
inkscape:export-ydpi="5.7600002"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"><defs
|
||||
id="defs1" /><sodipodi:namedview
|
||||
id="namedview1"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
inkscape:zoom="1.4125"
|
||||
inkscape:cx="400"
|
||||
inkscape:cy="400"
|
||||
inkscape:window-width="2560"
|
||||
inkscape:window-height="1372"
|
||||
inkscape:window-x="1920"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="Capa_1" /> <g
|
||||
id="g1"
|
||||
style="fill:#dedede;fill-opacity:1"> <path
|
||||
d="M161.77,36.535h-34.86c5.286-11.953,11.972-19.461,12.045-19.543c1.157-1.272,1.065-3.249-0.207-4.402 c-1.267-1.16-3.239-1.065-4.396,0.201c-0.347,0.38-8.403,9.31-14.236,23.744H60.471c-1.72,0-3.118,1.395-3.118,3.118v39.948 c0,1.72,1.397,3.118,3.118,3.118h55.966c2.058,8.284,5.56,16.425,10.576,24.22c1.103,1.699,2.394,3.77,3.733,5.985 c-15.145,6.102-32.2,9.384-49.545,9.384c-0.006,0-0.012,0-0.018,0c-18,0-35.591-3.532-51.152-10.072 c1.178-1.941,2.338-3.763,3.31-5.297c32.15-49.922-6.933-93.712-7.338-94.147c-1.16-1.273-3.126-1.355-4.402-0.207 c-1.272,1.16-1.367,3.13-0.207,4.408c1.492,1.641,36.222,40.743,6.704,86.573c-6.043,9.377-17.284,26.84-15.396,46.722 c0.149,1.613,1.51,2.819,3.1,2.819c0.101,0,0.201,0,0.298-0.013c1.717-0.158,2.98-1.687,2.807-3.397 c-1.136-11.947,3.255-23.176,7.968-31.943c16.492,7.039,35.204,10.783,54.297,10.783c0.006,0,0.012,0,0.019,0 c18.44,0,36.586-3.525,52.649-10.113c4.561,8.67,8.708,19.625,7.6,31.268c-0.158,1.711,1.096,3.239,2.801,3.397 c0.109,0.013,0.201,0.013,0.305,0.013c1.595,0,2.953-1.206,3.093-2.82c1.906-19.881-9.353-37.344-15.393-46.728 c-4.348-6.747-7.441-13.743-9.39-20.846h38.909c1.718,0,3.118-1.397,3.118-3.118V39.638 C164.888,37.918,163.494,36.535,161.77,36.535z M158.653,76.478h-6.51V63.732c0-1.72-1.4-3.117-3.117-3.117 c-1.724,0-3.117,1.397-3.117,3.117v12.745h-8.708V63.732c0-1.72-1.395-3.117-3.117-3.117c-1.718,0-3.118,1.397-3.118,3.117v12.745 h-8.701V63.732c0-1.72-1.406-3.117-3.118-3.117c-1.723,0-3.117,1.397-3.117,3.117v12.745h-8.714V63.732 c0-1.72-1.395-3.117-3.117-3.117c-1.718,0-3.118,1.397-3.118,3.117v12.745h-8.688V63.732c0-1.72-1.404-3.117-3.118-3.117 c-1.723,0-3.118,1.397-3.118,3.117v12.745h-8.705V63.732c0-1.72-1.397-3.117-3.117-3.117c-1.717,0-3.118,1.397-3.118,3.117v12.745 h-7.639V42.765h95.07v33.713H158.653z M80.176,108.765c-3.635,0-6.585-2.953-6.585-6.582c0-3.635,2.95-6.582,6.585-6.582 s6.576,2.947,6.576,6.582C86.746,105.812,83.811,108.765,80.176,108.765z M10.564,68.022v-6.658H0V44.808h10.564v-6.658 l14.94,14.939L10.564,68.022z"
|
||||
id="path1"
|
||||
style="fill:#dedede;fill-opacity:1" /> </g> </svg>
|
After Width: | Height: | Size: 3.3 KiB |
|
@ -0,0 +1,41 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
||||
|
||||
<svg
|
||||
fill="#000000"
|
||||
version="1.1"
|
||||
id="Capa_1"
|
||||
width="800px"
|
||||
height="800px"
|
||||
viewBox="0 0 164.882 164.883"
|
||||
xml:space="preserve"
|
||||
sodipodi:docname="mannequin.svg"
|
||||
inkscape:export-filename="../../light/24x24/mannequin@2x.png"
|
||||
inkscape:export-xdpi="5.7600002"
|
||||
inkscape:export-ydpi="5.7600002"
|
||||
inkscape:version="1.3 (1:1.3+202307231459+0e150ed6c4)"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"><defs
|
||||
id="defs1" /><sodipodi:namedview
|
||||
id="namedview1"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
inkscape:zoom="1.4125"
|
||||
inkscape:cx="400"
|
||||
inkscape:cy="400"
|
||||
inkscape:window-width="2560"
|
||||
inkscape:window-height="1372"
|
||||
inkscape:window-x="1920"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="Capa_1" /> <g
|
||||
id="g1"> <path
|
||||
d="M161.77,36.535h-34.86c5.286-11.953,11.972-19.461,12.045-19.543c1.157-1.272,1.065-3.249-0.207-4.402 c-1.267-1.16-3.239-1.065-4.396,0.201c-0.347,0.38-8.403,9.31-14.236,23.744H60.471c-1.72,0-3.118,1.395-3.118,3.118v39.948 c0,1.72,1.397,3.118,3.118,3.118h55.966c2.058,8.284,5.56,16.425,10.576,24.22c1.103,1.699,2.394,3.77,3.733,5.985 c-15.145,6.102-32.2,9.384-49.545,9.384c-0.006,0-0.012,0-0.018,0c-18,0-35.591-3.532-51.152-10.072 c1.178-1.941,2.338-3.763,3.31-5.297c32.15-49.922-6.933-93.712-7.338-94.147c-1.16-1.273-3.126-1.355-4.402-0.207 c-1.272,1.16-1.367,3.13-0.207,4.408c1.492,1.641,36.222,40.743,6.704,86.573c-6.043,9.377-17.284,26.84-15.396,46.722 c0.149,1.613,1.51,2.819,3.1,2.819c0.101,0,0.201,0,0.298-0.013c1.717-0.158,2.98-1.687,2.807-3.397 c-1.136-11.947,3.255-23.176,7.968-31.943c16.492,7.039,35.204,10.783,54.297,10.783c0.006,0,0.012,0,0.019,0 c18.44,0,36.586-3.525,52.649-10.113c4.561,8.67,8.708,19.625,7.6,31.268c-0.158,1.711,1.096,3.239,2.801,3.397 c0.109,0.013,0.201,0.013,0.305,0.013c1.595,0,2.953-1.206,3.093-2.82c1.906-19.881-9.353-37.344-15.393-46.728 c-4.348-6.747-7.441-13.743-9.39-20.846h38.909c1.718,0,3.118-1.397,3.118-3.118V39.638 C164.888,37.918,163.494,36.535,161.77,36.535z M158.653,76.478h-6.51V63.732c0-1.72-1.4-3.117-3.117-3.117 c-1.724,0-3.117,1.397-3.117,3.117v12.745h-8.708V63.732c0-1.72-1.395-3.117-3.117-3.117c-1.718,0-3.118,1.397-3.118,3.117v12.745 h-8.701V63.732c0-1.72-1.406-3.117-3.118-3.117c-1.723,0-3.117,1.397-3.117,3.117v12.745h-8.714V63.732 c0-1.72-1.395-3.117-3.117-3.117c-1.718,0-3.118,1.397-3.118,3.117v12.745h-8.688V63.732c0-1.72-1.404-3.117-3.118-3.117 c-1.723,0-3.118,1.397-3.118,3.117v12.745h-8.705V63.732c0-1.72-1.397-3.117-3.117-3.117c-1.717,0-3.118,1.397-3.118,3.117v12.745 h-7.639V42.765h95.07v33.713H158.653z M80.176,108.765c-3.635,0-6.585-2.953-6.585-6.582c0-3.635,2.95-6.582,6.585-6.582 s6.576,2.947,6.576,6.582C86.746,105.812,83.811,108.765,80.176,108.765z M10.564,68.022v-6.658H0V44.808h10.564v-6.658 l14.94,14.939L10.564,68.022z"
|
||||
id="path1" /> </g> </svg>
|
After Width: | Height: | Size: 3.3 KiB |
104
src/app/tape/share/resources/tapeicon/svg/padlock_locked.svg
Normal file
|
@ -0,0 +1,104 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
width="24"
|
||||
height="24"
|
||||
viewBox="0 0 24 24.000001"
|
||||
version="1.1"
|
||||
id="svg5"
|
||||
inkscape:version="1.3 (1:1.3+202307231459+0e150ed6c4)"
|
||||
sodipodi:docname="padlock_locked.svg"
|
||||
inkscape:export-filename="../24x24/padlock_locked@2x.png"
|
||||
inkscape:export-xdpi="192"
|
||||
inkscape:export-ydpi="192"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<sodipodi:namedview
|
||||
id="namedview7"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#000000"
|
||||
borderopacity="0.25"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
inkscape:document-units="px"
|
||||
showgrid="false"
|
||||
inkscape:zoom="33.75"
|
||||
inkscape:cx="11.97037"
|
||||
inkscape:cy="12"
|
||||
inkscape:window-width="2560"
|
||||
inkscape:window-height="1372"
|
||||
inkscape:window-x="1920"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg5" />
|
||||
<defs
|
||||
id="defs2">
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
id="linearGradient4736">
|
||||
<stop
|
||||
style="stop-color:#e69a10;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop4732" />
|
||||
<stop
|
||||
style="stop-color:#ffd283;stop-opacity:1;"
|
||||
offset="1"
|
||||
id="stop4734" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient2292"
|
||||
id="linearGradient2600"
|
||||
x1="16"
|
||||
y1="17"
|
||||
x2="6"
|
||||
y2="1"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="translate(1,1)" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient4736"
|
||||
id="linearGradient4730"
|
||||
x1="14.999781"
|
||||
y1="21"
|
||||
x2="6.9997807"
|
||||
y2="9.000001"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="translate(2.0002201,1)" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
id="linearGradient2292">
|
||||
<stop
|
||||
style="stop-color:#9e670a;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop2288" />
|
||||
<stop
|
||||
style="stop-color:#e3cb9f;stop-opacity:1;"
|
||||
offset="1"
|
||||
id="stop2290" />
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<path
|
||||
id="rect899"
|
||||
style="opacity:1;fill:url(#linearGradient2600);fill-opacity:1;stroke-width:2;stroke-linecap:round"
|
||||
d="M 12,2 C 9.2300028,2 7,4.2300028 7,7 v 6 c 0,2.769997 2.2300028,5 5,5 2.769997,0 5,-2.230003 5,-5 V 7 C 17,4.2300028 14.769997,2 12,2 Z m 0,2 c 1.661998,0 3,1.3380017 3,3 v 6 c 0,1.661998 -1.338002,3 -3,3 -1.661998,0 -3,-1.338002 -3,-3 V 7 C 9,5.3380017 10.338002,4 12,4 Z"
|
||||
sodipodi:nodetypes="ssssssssssssss" />
|
||||
<rect
|
||||
style="opacity:1;fill:url(#linearGradient4730);fill-opacity:1;stroke-width:2;stroke-linecap:round"
|
||||
id="rect789"
|
||||
width="14"
|
||||
height="12"
|
||||
x="5"
|
||||
y="10.000001"
|
||||
ry="1" />
|
||||
<path
|
||||
id="rect1645"
|
||||
style="opacity:0.1;fill:#000000"
|
||||
d="m 6,10.000001 c -0.5539994,0 -1,0.446001 -1,1 v 1 h 14 v -1 c 0,-0.553999 -0.446001,-1 -1,-1 z m -1,10 v 1 c 0,0.553999 0.4460006,1 1,1 h 12 c 0.553999,0 1,-0.446001 1,-1 v -1 z" />
|
||||
</svg>
|
After Width: | Height: | Size: 3.4 KiB |
103
src/app/tape/share/resources/tapeicon/svg/padlock_opened.svg
Normal file
|
@ -0,0 +1,103 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
width="24"
|
||||
height="24"
|
||||
viewBox="0 0 24 24.000001"
|
||||
version="1.1"
|
||||
id="svg5"
|
||||
inkscape:version="1.3 (1:1.3+202307231459+0e150ed6c4)"
|
||||
sodipodi:docname="padlock_opened.svg"
|
||||
inkscape:export-filename="../24x24/padlock_opened@2x.png"
|
||||
inkscape:export-xdpi="192"
|
||||
inkscape:export-ydpi="192"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<sodipodi:namedview
|
||||
id="namedview7"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#000000"
|
||||
borderopacity="0.25"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
inkscape:document-units="px"
|
||||
showgrid="false"
|
||||
inkscape:zoom="33.75"
|
||||
inkscape:cx="11.17037"
|
||||
inkscape:cy="12"
|
||||
inkscape:window-width="2560"
|
||||
inkscape:window-height="1372"
|
||||
inkscape:window-x="1920"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg5" />
|
||||
<defs
|
||||
id="defs2">
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
id="linearGradient4736">
|
||||
<stop
|
||||
style="stop-color:#e69a10;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop4732" />
|
||||
<stop
|
||||
style="stop-color:#ffd283;stop-opacity:1;"
|
||||
offset="1"
|
||||
id="stop4734" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient2292"
|
||||
id="linearGradient2600"
|
||||
x1="16"
|
||||
y1="17"
|
||||
x2="6"
|
||||
y2="1"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="translate(1,1)" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient4736"
|
||||
id="linearGradient4730"
|
||||
x1="14.999781"
|
||||
y1="21"
|
||||
x2="6.9997807"
|
||||
y2="9.000001"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="translate(2.0002201,1)" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
id="linearGradient2292">
|
||||
<stop
|
||||
style="stop-color:#9e670a;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop2288" />
|
||||
<stop
|
||||
style="stop-color:#e3cb9f;stop-opacity:1;"
|
||||
offset="1"
|
||||
id="stop2290" />
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<path
|
||||
id="rect899"
|
||||
style="opacity:1;fill:url(#linearGradient2600);fill-opacity:1;stroke-width:2;stroke-linecap:round"
|
||||
d="M 12 2 C 9.2300056 2 7 4.2300056 7 7 L 9 7 C 9 5.3380034 10.338004 4 12 4 C 13.661996 4 15 5.3380034 15 7 L 15 13 C 15 14.661996 13.661996 16 12 16 C 10.338004 16 9 14.661996 9 13 L 9 10 L 7 10 L 7 13 C 7 15.769994 9.2300056 18 12 18 C 14.769994 18 17 15.769994 17 13 L 17 7 C 17 4.2300056 14.769994 2 12 2 z " />
|
||||
<rect
|
||||
style="opacity:1;fill:url(#linearGradient4730);fill-opacity:1;stroke-width:2;stroke-linecap:round"
|
||||
id="rect789"
|
||||
width="14"
|
||||
height="12"
|
||||
x="5"
|
||||
y="10.000001"
|
||||
ry="1" />
|
||||
<path
|
||||
id="rect1645"
|
||||
style="opacity:0.1;fill:#000000"
|
||||
d="m 6,10.000001 c -0.5539994,0 -1,0.446001 -1,1 v 1 h 14 v -1 c 0,-0.553999 -0.446001,-1 -1,-1 z m -1,10 v 1 c 0,0.553999 0.4460006,1 1,1 h 12 c 0.553999,0 1,-0.446001 1,-1 v -1 z" />
|
||||
</svg>
|
After Width: | Height: | Size: 3.4 KiB |
|
@ -31,16 +31,21 @@
|
|||
#include "../ifc/xml/vpatternconverter.h"
|
||||
#include "../ifc/xml/vvitconverter.h"
|
||||
#include "../ifc/xml/vvstconverter.h"
|
||||
#include "../qmuparser/qmudef.h"
|
||||
#include "../vganalytics/vganalytics.h"
|
||||
#include "../vmisc/compatibility.h"
|
||||
#include "../vmisc/dialogs/dialogaskcollectstatistic.h"
|
||||
#include "../vmisc/dialogs/dialogexporttocsv.h"
|
||||
#include "../vmisc/dialogs/dialogselectlanguage.h"
|
||||
#include "../vmisc/qxtcsvmodel.h"
|
||||
#include "../vmisc/theme/vtheme.h"
|
||||
#include "../vmisc/vsysexits.h"
|
||||
#include "../vpatterndb/calculator.h"
|
||||
#include "../vpatterndb/measurements.h"
|
||||
#include "../vpatterndb/pmsystems.h"
|
||||
#include "../vpatterndb/variables/vmeasurement.h"
|
||||
#include "../vpatterndb/vcontainer.h"
|
||||
#include "../vtools/dialogs/support/dialogeditwrongformula.h"
|
||||
#include "def.h"
|
||||
#include "dialogs/dialogabouttape.h"
|
||||
#include "dialogs/dialogdimensioncustomnames.h"
|
||||
|
@ -51,17 +56,15 @@
|
|||
#include "dialogs/dialogrestrictdimension.h"
|
||||
#include "dialogs/dialogsetupmultisize.h"
|
||||
#include "dialogs/dialogtapepreferences.h"
|
||||
#include "mapplication.h" // Should be last because of definning qApp
|
||||
#include "qtpreprocessorsupport.h"
|
||||
#include "ui_tmainwindow.h"
|
||||
#include "vlitepattern.h"
|
||||
#include "vtapesettings.h"
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
|
||||
#include "../vmisc/backport/qoverload.h"
|
||||
#endif // QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
|
||||
#include "../qmuparser/qmudef.h"
|
||||
#include "../vganalytics/vganalytics.h"
|
||||
#include "../vmisc/dialogs/dialogselectlanguage.h"
|
||||
#include "../vtools/dialogs/support/dialogeditwrongformula.h"
|
||||
#include "mapplication.h" // Should be last because of definning qApp
|
||||
#include "vlitepattern.h"
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||
#include "../vmisc/vtextcodec.h"
|
||||
|
@ -267,6 +270,8 @@ TMainWindow::TMainWindow(QWidget *parent)
|
|||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
InitIcons();
|
||||
|
||||
VAbstractApplication::VApp()->Settings()->GetOsSeparator() ? setLocale(QLocale()) : setLocale(QLocale::c());
|
||||
|
||||
ui->lineEditName->setClearButtonEnabled(true);
|
||||
|
@ -800,6 +805,11 @@ void TMainWindow::changeEvent(QEvent *event)
|
|||
}
|
||||
}
|
||||
|
||||
if (event->type() == QEvent::PaletteChange)
|
||||
{
|
||||
InitIcons();
|
||||
}
|
||||
|
||||
// remember to call base class implementation
|
||||
QMainWindow::changeEvent(event);
|
||||
}
|
||||
|
@ -1927,11 +1937,6 @@ void TMainWindow::ShowMDiagram(const QString &name)
|
|||
"<p align=\"center\"><b>%2</b>. <i>%3</i></p></body></html>")
|
||||
.arg(DialogMDataBase::ImgTag(number), number, trv->GuiText(name)));
|
||||
}
|
||||
// This part is very ugly, can't find better way to resize dockWidget.
|
||||
ui->labelDiagram->adjustSize();
|
||||
// And also those 50 px. DockWidget has some border. And i can't find how big it is.
|
||||
// Can lead to problem in future.
|
||||
ui->dockWidgetDiagram->setMaximumWidth(ui->labelDiagram->width() + 50);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
@ -3184,11 +3189,9 @@ auto TMainWindow::MaybeSave() -> bool
|
|||
return true; // Don't ask if file was created without modifications.
|
||||
}
|
||||
|
||||
QScopedPointer<QMessageBox> messageBox(new QMessageBox(tr("Unsaved changes"),
|
||||
tr("Measurements have been modified.\n"
|
||||
"Do you want to save your changes?"),
|
||||
QMessageBox::Warning, QMessageBox::Yes, QMessageBox::No,
|
||||
QMessageBox::Cancel, this, Qt::Sheet));
|
||||
QScopedPointer<QMessageBox> messageBox(new QMessageBox(
|
||||
tr("Unsaved changes"), tr("Measurements have been modified. Do you want to save your changes?"),
|
||||
QMessageBox::Warning, QMessageBox::Yes, QMessageBox::No, QMessageBox::Cancel, this, Qt::Sheet));
|
||||
|
||||
messageBox->setDefaultButton(QMessageBox::Yes);
|
||||
messageBox->setEscapeButton(QMessageBox::Cancel);
|
||||
|
@ -3310,12 +3313,13 @@ void TMainWindow::RefreshTable(bool freshCall)
|
|||
}
|
||||
}
|
||||
|
||||
if (freshCall)
|
||||
{
|
||||
ui->tableWidget->resizeColumnsToContents();
|
||||
ui->tableWidget->resizeRowsToContents();
|
||||
}
|
||||
ui->tableWidget->horizontalHeader()->setStretchLastSection(true);
|
||||
Q_UNUSED(freshCall)
|
||||
// if (freshCall)
|
||||
// {
|
||||
// ui->tableWidget->resizeColumnsToContents();
|
||||
// ui->tableWidget->resizeRowsToContents();
|
||||
// }
|
||||
// ui->tableWidget->horizontalHeader()->setStretchLastSection(true);
|
||||
ui->tableWidget->blockSignals(false);
|
||||
|
||||
ui->actionExportToCSV->setEnabled(ui->tableWidget->rowCount() > 0);
|
||||
|
@ -3656,15 +3660,8 @@ void TMainWindow::Open(const QString &pathTo, const QString &filter)
|
|||
void TMainWindow::UpdatePadlock(bool ro)
|
||||
{
|
||||
ui->actionReadOnly->setChecked(ro);
|
||||
if (ro)
|
||||
{
|
||||
ui->actionReadOnly->setIcon(QIcon("://tapeicon/24x24/padlock_locked.png"));
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->actionReadOnly->setIcon(QIcon("://tapeicon/24x24/padlock_opened.png"));
|
||||
}
|
||||
|
||||
ui->actionReadOnly->setIcon(ro ? QIcon("://tapeicon/24x24/padlock_locked.png")
|
||||
: QIcon("://tapeicon/24x24/padlock_opened.png"));
|
||||
ui->actionReadOnly->setDisabled(m_mIsReadOnly);
|
||||
}
|
||||
|
||||
|
@ -4378,6 +4375,17 @@ auto TMainWindow::OrderedMeasurments() const -> QMap<int, QSharedPointer<VMeasur
|
|||
return orderedTable;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void TMainWindow::InitIcons()
|
||||
{
|
||||
QString iconResource = QStringLiteral("icon");
|
||||
ui->toolButtonExpr->setIcon(VTheme::GetIconResource(iconResource, QStringLiteral("24x24/fx.png")));
|
||||
|
||||
QString tapeIconResource = QStringLiteral("tapeicon");
|
||||
ui->actionMeasurementDiagram->setIcon(
|
||||
VTheme::GetIconResource(tapeIconResource, QStringLiteral("24x24/mannequin.png")));
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void TMainWindow::SetDecimals()
|
||||
{
|
||||
|
|
|
@ -31,15 +31,15 @@
|
|||
|
||||
#include <QTableWidget>
|
||||
|
||||
#include "../vformat/vmeasurements.h"
|
||||
#include "../vmisc/def.h"
|
||||
#include "../vmisc/vlockguard.h"
|
||||
#include "../vformat/vmeasurements.h"
|
||||
#include "../vmisc/vtablesearch.h"
|
||||
#include "../vwidgets/vabstractmainwindow.h"
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
class TMainWindow;
|
||||
class TMainWindow;
|
||||
} // namespace Ui
|
||||
|
||||
class QLabel;
|
||||
|
@ -69,7 +69,7 @@ public:
|
|||
|
||||
protected:
|
||||
void closeEvent(QCloseEvent *event) override;
|
||||
void changeEvent(QEvent* event) override;
|
||||
void changeEvent(QEvent *event) override;
|
||||
auto eventFilter(QObject *object, QEvent *event) -> bool override;
|
||||
void ExportToCSVData(const QString &fileName, bool withHeader, int mib, const QChar &separator) final;
|
||||
auto RecentFileList() const -> QStringList override;
|
||||
|
@ -83,7 +83,7 @@ private slots:
|
|||
void Preferences();
|
||||
void ToolBarStyles();
|
||||
|
||||
bool FileSave(); // NOLINT(modernize-use-trailing-return-type)
|
||||
bool FileSave(); // NOLINT(modernize-use-trailing-return-type)
|
||||
bool FileSaveAs(); // NOLINT(modernize-use-trailing-return-type)
|
||||
void AboutToShowWindowMenu();
|
||||
void ShowWindow() const;
|
||||
|
@ -92,12 +92,12 @@ private slots:
|
|||
#if defined(Q_OS_MAC)
|
||||
void AboutToShowDockMenu();
|
||||
void OpenAt(QAction *where);
|
||||
#endif //defined(Q_OS_MAC)
|
||||
#endif // defined(Q_OS_MAC)
|
||||
|
||||
void SaveCustomerName();
|
||||
void SaveEmail();
|
||||
void SaveGender(int index);
|
||||
void SaveBirthDate(const QDate & date);
|
||||
void SaveBirthDate(const QDate &date);
|
||||
void SaveNotes();
|
||||
void SavePMSystem(int index);
|
||||
|
||||
|
@ -145,27 +145,27 @@ private slots:
|
|||
|
||||
void EditDimensionLabels();
|
||||
void DimensionCustomNames();
|
||||
|
||||
|
||||
void AskDefaultSettings();
|
||||
|
||||
private:
|
||||
// cppcheck-suppress unknownMacro
|
||||
Q_DISABLE_COPY_MOVE(TMainWindow) // NOLINT
|
||||
Ui::TMainWindow *ui;
|
||||
VMeasurements *m_m{nullptr};
|
||||
VContainer *m_data{nullptr};
|
||||
Unit m_mUnit{Unit::Cm};
|
||||
Unit m_pUnit{Unit::Cm};
|
||||
VMeasurements *m_m{nullptr};
|
||||
VContainer *m_data{nullptr};
|
||||
Unit m_mUnit{Unit::Cm};
|
||||
Unit m_pUnit{Unit::Cm};
|
||||
MeasurementsType m_mType{MeasurementsType::Individual};
|
||||
qreal m_currentDimensionA{0};
|
||||
qreal m_currentDimensionB{0};
|
||||
qreal m_currentDimensionC{0};
|
||||
QString m_curFile{};
|
||||
QComboBox *m_gradationDimensionA{nullptr};
|
||||
QComboBox *m_gradationDimensionB{nullptr};
|
||||
QComboBox *m_gradationDimensionC{nullptr};
|
||||
QComboBox *m_comboBoxUnits{nullptr};
|
||||
int m_formulaBaseHeight;
|
||||
qreal m_currentDimensionA{0};
|
||||
qreal m_currentDimensionB{0};
|
||||
qreal m_currentDimensionC{0};
|
||||
QString m_curFile{};
|
||||
QComboBox *m_gradationDimensionA{nullptr};
|
||||
QComboBox *m_gradationDimensionB{nullptr};
|
||||
QComboBox *m_gradationDimensionC{nullptr};
|
||||
QComboBox *m_comboBoxUnits{nullptr};
|
||||
int m_formulaBaseHeight;
|
||||
QSharedPointer<VLockGuard<char>> m_lock{nullptr};
|
||||
QSharedPointer<VTableSearch> m_search{};
|
||||
QLabel *m_labelGradationDimensionA{nullptr};
|
||||
|
@ -183,12 +183,12 @@ private:
|
|||
{
|
||||
MultisizeMeasurement() = default;
|
||||
|
||||
QString name{}; // NOLINT(misc-non-private-member-variables-in-classes)
|
||||
qreal base{0}; // NOLINT(misc-non-private-member-variables-in-classes)
|
||||
qreal shiftA{0}; // NOLINT(misc-non-private-member-variables-in-classes)
|
||||
qreal shiftB{0}; // NOLINT(misc-non-private-member-variables-in-classes)
|
||||
qreal shiftC{0}; // NOLINT(misc-non-private-member-variables-in-classes)
|
||||
QString fullName{}; // NOLINT(misc-non-private-member-variables-in-classes)
|
||||
QString name{}; // NOLINT(misc-non-private-member-variables-in-classes)
|
||||
qreal base{0}; // NOLINT(misc-non-private-member-variables-in-classes)
|
||||
qreal shiftA{0}; // NOLINT(misc-non-private-member-variables-in-classes)
|
||||
qreal shiftB{0}; // NOLINT(misc-non-private-member-variables-in-classes)
|
||||
qreal shiftC{0}; // NOLINT(misc-non-private-member-variables-in-classes)
|
||||
QString fullName{}; // NOLINT(misc-non-private-member-variables-in-classes)
|
||||
QString description{}; // NOLINT(misc-non-private-member-variables-in-classes)
|
||||
};
|
||||
|
||||
|
@ -225,7 +225,7 @@ private:
|
|||
auto MaybeSave() -> bool;
|
||||
|
||||
auto AddCell(const QString &text, int row, int column, int aligment, bool ok = true) -> QTableWidgetItem *;
|
||||
auto AddSeparatorCell(const QString &text, int row, int column, int aligment, bool ok = true) -> QTableWidgetItem*;
|
||||
auto AddSeparatorCell(const QString &text, int row, int column, int aligment, bool ok = true) -> QTableWidgetItem *;
|
||||
|
||||
void RefreshData(bool freshCall = false);
|
||||
void RefreshTable(bool freshCall = false);
|
||||
|
@ -254,8 +254,7 @@ private:
|
|||
|
||||
void CreateWindowMenu(QMenu *menu);
|
||||
|
||||
template <class T>
|
||||
void HackWidget(T **widget);
|
||||
template <class T> void HackWidget(T **widget);
|
||||
void HackDimensionBaseValue();
|
||||
void HackDimensionShifts();
|
||||
|
||||
|
@ -265,8 +264,8 @@ private:
|
|||
|
||||
void ImportIndividualMeasurements(const QxtCsvModel &csv, const QVector<int> &map, bool withHeader);
|
||||
void ImportMultisizeMeasurements(const QxtCsvModel &csv, const QVector<int> &map, bool withHeader);
|
||||
auto ImportMultisizeMeasurement(const QxtCsvModel &csv, int i, const QVector<int> &map,
|
||||
vsizetype dimensionsCount, QSet<QString> &importedNames) -> MultisizeMeasurement;
|
||||
auto ImportMultisizeMeasurement(const QxtCsvModel &csv, int i, const QVector<int> &map, vsizetype dimensionsCount,
|
||||
QSet<QString> &importedNames) -> MultisizeMeasurement;
|
||||
|
||||
void SetCurrentPatternUnit();
|
||||
|
||||
|
@ -276,7 +275,9 @@ private:
|
|||
|
||||
auto DimensionRestrictedValues(int index, const MeasurementDimension_p &dimension) -> QVector<double>;
|
||||
|
||||
auto OrderedMeasurments() const -> QMap<int, QSharedPointer<VMeasurement> >;
|
||||
auto OrderedMeasurments() const -> QMap<int, QSharedPointer<VMeasurement>>;
|
||||
|
||||
void InitIcons();
|
||||
};
|
||||
|
||||
#endif // TMAINWINDOW_H
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1188</width>
|
||||
<height>836</height>
|
||||
<width>1463</width>
|
||||
<height>899</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
|
@ -19,8 +19,8 @@
|
|||
</property>
|
||||
<widget class="QWidget" name="centralWidget">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
||||
<horstretch>15</horstretch>
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
|
@ -43,6 +43,12 @@
|
|||
</item>
|
||||
<item>
|
||||
<widget class="QTabWidget" name="tabWidget">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string/>
|
||||
</property>
|
||||
|
@ -258,7 +264,7 @@
|
|||
<string><html><head/><body><p>Find Previous <span style=" color:#888a85;">%1</span></p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true">...</string>
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset theme="go-up">
|
||||
|
@ -278,7 +284,7 @@
|
|||
<string><html><head/><body><p>Find Next %1</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true">...</string>
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset theme="go-down">
|
||||
|
@ -301,7 +307,7 @@
|
|||
</property>
|
||||
<widget class="QTableWidget" name="tableWidget">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>2</verstretch>
|
||||
</sizepolicy>
|
||||
|
@ -392,7 +398,7 @@
|
|||
<string>Move measurement top</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true">...</string>
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset theme="go-top">
|
||||
|
@ -409,7 +415,7 @@
|
|||
<string>Move measurement up</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true">...</string>
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset theme="go-up">
|
||||
|
@ -426,7 +432,7 @@
|
|||
<string>Move measurement down</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true">...</string>
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset theme="go-down">
|
||||
|
@ -443,7 +449,7 @@
|
|||
<string>Move measurement bottom</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true">...</string>
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset theme="go-bottom">
|
||||
|
@ -473,7 +479,7 @@
|
|||
<string>Delete measurement</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true">...</string>
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset theme="list-remove">
|
||||
|
@ -623,11 +629,11 @@
|
|||
<string>Function Wizard</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true">...</string>
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="share/resources/tapeicon.qrc">
|
||||
<normaloff>:/tapeicon/24x24/fx.png</normaloff>:/tapeicon/24x24/fx.png</iconset>
|
||||
<iconset resource="../../libs/vmisc/share/resources/icon.qrc">
|
||||
<normaloff>:/icon/light/24x24/fx.png</normaloff>:/icon/light/24x24/fx.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
|
@ -1136,7 +1142,7 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1188</width>
|
||||
<width>1463</width>
|
||||
<height>22</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
@ -1247,7 +1253,7 @@
|
|||
</widget>
|
||||
<widget class="QDockWidget" name="dockWidgetDiagram">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>1</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
|
@ -1527,7 +1533,7 @@
|
|||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="share/resources/tapeicon.qrc">
|
||||
<normaloff>:/tapeicon/24x24/mannequin.png</normaloff>:/tapeicon/24x24/mannequin.png</iconset>
|
||||
<normaloff>:/tapeicon/light/24x24/mannequin.png</normaloff>:/tapeicon/light/24x24/mannequin.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Measurement diagram</string>
|
||||
|
@ -1654,6 +1660,7 @@
|
|||
</customwidgets>
|
||||
<resources>
|
||||
<include location="share/resources/tapeicon.qrc"/>
|
||||
<include location="../../libs/vmisc/share/resources/icon.qrc"/>
|
||||
</resources>
|
||||
<connections>
|
||||
<connection>
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
#include "../qmuparser/qmudef.h"
|
||||
#include "../vgeometry/vcubicbezier.h"
|
||||
#include "../vgeometry/vcubicbezierpath.h"
|
||||
#include "../vgeometry/vsplinepath.h"
|
||||
#include "../vmisc/def.h"
|
||||
#include "../vpatterndb/vformula.h"
|
||||
#include "../vpropertyexplorer/plugins/vboolproperty.h"
|
||||
|
@ -47,6 +48,7 @@
|
|||
#include "../vwidgets/vgraphicssimpletextitem.h"
|
||||
#include "../vwidgets/vsimplecurve.h"
|
||||
#include "../vwidgets/vsimplepoint.h"
|
||||
#include "qobject.h"
|
||||
#include "vformulaproperty.h"
|
||||
|
||||
#include "../vtools/tools/drawTools/operation/flipping/vtoolflippingbyaxis.h"
|
||||
|
@ -88,9 +90,11 @@
|
|||
#include "../vmisc/diagnostic.h"
|
||||
#endif // QT_VERSION < QT_VERSION_CHECK(5, 5, 0)
|
||||
|
||||
#include <QComboBox>
|
||||
#include <QDebug>
|
||||
#include <QDockWidget>
|
||||
#include <QHBoxLayout>
|
||||
#include <QPalette>
|
||||
#include <QRegularExpression>
|
||||
#include <QScrollArea>
|
||||
|
||||
|
@ -537,6 +541,14 @@ void VToolOptionsPropertyBrowser::userChangedData(VPE::VProperty *property)
|
|||
VAbstractValApplication::VApp()->getSceneView()->update();
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
auto VToolOptionsPropertyBrowser::ComboBoxPalette() const -> QPalette
|
||||
{
|
||||
QComboBox comboBox;
|
||||
comboBox.setPalette(m_formView->palette());
|
||||
return comboBox.palette();
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VToolOptionsPropertyBrowser::itemClicked(QGraphicsItem *item)
|
||||
{
|
||||
|
@ -2727,9 +2739,12 @@ void VToolOptionsPropertyBrowser::ShowOptionsToolEndLine(QGraphicsItem *item)
|
|||
i->ShowVisualization(true);
|
||||
m_formView->setTitle(tr("Point at distance and angle"));
|
||||
|
||||
QPalette comboBoxPalette = ComboBoxPalette();
|
||||
|
||||
AddPropertyObjectName(i, tr("Point label:"));
|
||||
AddPropertyParentPointName(i->BasePointName(), tr("Base point:"), AttrBasePoint);
|
||||
AddPropertyLineType(i, tr("Line type:"), LineStylesPics());
|
||||
AddPropertyLineType(i, tr("Line type:"),
|
||||
LineStylesPics(comboBoxPalette.color(QPalette::Base), comboBoxPalette.color(QPalette::Text)));
|
||||
AddPropertyLineColor(i, tr("Line color:"), VAbstractTool::ColorsList(), AttrLineColor);
|
||||
AddPropertyFormula(tr("Length:"), i->GetFormulaLength(), AttrLength);
|
||||
AddPropertyFormula(tr("Angle:"), i->GetFormulaAngle(), AttrAngle);
|
||||
|
@ -2743,10 +2758,13 @@ void VToolOptionsPropertyBrowser::ShowOptionsToolAlongLine(QGraphicsItem *item)
|
|||
i->ShowVisualization(true);
|
||||
m_formView->setTitle(tr("Point at distance along line"));
|
||||
|
||||
QPalette comboBoxPalette = ComboBoxPalette();
|
||||
|
||||
AddPropertyObjectName(i, tr("Point label:"));
|
||||
AddPropertyParentPointName(i->BasePointName(), tr("First point:"), AttrBasePoint);
|
||||
AddPropertyParentPointName(i->SecondPointName(), tr("Second point:"), AttrSecondPoint);
|
||||
AddPropertyLineType(i, tr("Line type:"), LineStylesPics());
|
||||
AddPropertyLineType(i, tr("Line type:"),
|
||||
LineStylesPics(comboBoxPalette.color(QPalette::Base), comboBoxPalette.color(QPalette::Text)));
|
||||
AddPropertyLineColor(i, tr("Line color:"), VAbstractTool::ColorsList(), AttrLineColor);
|
||||
AddPropertyFormula(tr("Length:"), i->GetFormulaLength(), AttrLength);
|
||||
AddPropertyText(tr("Notes:"), i->GetNotes(), AttrNotes);
|
||||
|
@ -2759,13 +2777,17 @@ void VToolOptionsPropertyBrowser::ShowOptionsToolArc(QGraphicsItem *item)
|
|||
i->ShowVisualization(true);
|
||||
m_formView->setTitle(tr("Arc"));
|
||||
|
||||
QPalette comboBoxPalette = ComboBoxPalette();
|
||||
|
||||
AddPropertyObjectName(i, tr("Name:"), true);
|
||||
AddPropertyParentPointName(i->CenterPointName(), tr("Center point:"), AttrCenter);
|
||||
AddPropertyFormula(tr("Radius:"), i->GetFormulaRadius(), AttrRadius);
|
||||
AddPropertyFormula(tr("First angle:"), i->GetFormulaF1(), AttrAngle1);
|
||||
AddPropertyFormula(tr("Second angle:"), i->GetFormulaF2(), AttrAngle2);
|
||||
AddPropertyAlias(i, tr("Alias:"));
|
||||
AddPropertyCurvePenStyle(i, tr("Pen style:"), CurvePenStylesPics());
|
||||
AddPropertyCurvePenStyle(
|
||||
i, tr("Pen style:"),
|
||||
CurvePenStylesPics(comboBoxPalette.color(QPalette::Base), comboBoxPalette.color(QPalette::Text)));
|
||||
AddPropertyLineColor(i, tr("Color:"), VAbstractTool::ColorsList(), AttrColor);
|
||||
AddPropertyApproximationScale(tr("Approximation scale:"), i->GetApproximationScale());
|
||||
AddPropertyText(tr("Notes:"), i->GetNotes(), AttrNotes);
|
||||
|
@ -2778,13 +2800,17 @@ void VToolOptionsPropertyBrowser::ShowOptionsToolArcWithLength(QGraphicsItem *it
|
|||
i->ShowVisualization(true);
|
||||
m_formView->setTitle(tr("Arc with given length"));
|
||||
|
||||
QPalette comboBoxPalette = ComboBoxPalette();
|
||||
|
||||
AddPropertyObjectName(i, tr("Name:"), true);
|
||||
AddPropertyParentPointName(i->CenterPointName(), tr("Center point:"), AttrCenter);
|
||||
AddPropertyFormula(tr("Radius:"), i->GetFormulaRadius(), AttrRadius);
|
||||
AddPropertyFormula(tr("First angle:"), i->GetFormulaF1(), AttrAngle1);
|
||||
AddPropertyFormula(tr("Length:"), i->GetFormulaLength(), AttrLength);
|
||||
AddPropertyAlias(i, tr("Alias:"));
|
||||
AddPropertyCurvePenStyle(i, tr("Pen style:"), CurvePenStylesPics());
|
||||
AddPropertyCurvePenStyle(
|
||||
i, tr("Pen style:"),
|
||||
CurvePenStylesPics(comboBoxPalette.color(QPalette::Base), comboBoxPalette.color(QPalette::Text)));
|
||||
AddPropertyLineColor(i, tr("Color:"), VAbstractTool::ColorsList(), AttrColor);
|
||||
AddPropertyApproximationScale(tr("Approximation scale:"), i->GetApproximationScale());
|
||||
AddPropertyText(tr("Notes:"), i->GetNotes(), AttrNotes);
|
||||
|
@ -2797,11 +2823,14 @@ void VToolOptionsPropertyBrowser::ShowOptionsToolBisector(QGraphicsItem *item)
|
|||
i->ShowVisualization(true);
|
||||
m_formView->setTitle(tr("Point along bisector"));
|
||||
|
||||
QPalette comboBoxPalette = ComboBoxPalette();
|
||||
|
||||
AddPropertyObjectName(i, tr("Point label:"));
|
||||
AddPropertyParentPointName(i->FirstPointName(), tr("First point:"), AttrFirstPoint);
|
||||
AddPropertyParentPointName(i->BasePointName(), tr("Second point:"), AttrBasePoint);
|
||||
AddPropertyParentPointName(i->ThirdPointName(), tr("Third point:"), AttrThirdPoint);
|
||||
AddPropertyLineType(i, tr("Line type:"), LineStylesPics());
|
||||
AddPropertyLineType(i, tr("Line type:"),
|
||||
LineStylesPics(comboBoxPalette.color(QPalette::Base), comboBoxPalette.color(QPalette::Text)));
|
||||
AddPropertyLineColor(i, tr("Line color:"), VAbstractTool::ColorsList(), AttrLineColor);
|
||||
AddPropertyFormula(tr("Length:"), i->GetFormulaLength(), AttrLength);
|
||||
AddPropertyText(tr("Notes:"), i->GetNotes(), AttrNotes);
|
||||
|
@ -2876,11 +2905,14 @@ void VToolOptionsPropertyBrowser::ShowOptionsToolHeight(QGraphicsItem *item)
|
|||
i->ShowVisualization(true);
|
||||
m_formView->setTitle(tr("Perpendicular point along line"));
|
||||
|
||||
QPalette comboBoxPalette = ComboBoxPalette();
|
||||
|
||||
AddPropertyObjectName(i, tr("Point label:"));
|
||||
AddPropertyParentPointName(i->BasePointName(), tr("Base point:"), AttrBasePoint);
|
||||
AddPropertyParentPointName(i->FirstLinePointName(), tr("First line point:"), AttrP1Line);
|
||||
AddPropertyParentPointName(i->SecondLinePointName(), tr("Second line point:"), AttrP2Line);
|
||||
AddPropertyLineType(i, tr("Line type:"), LineStylesPics());
|
||||
AddPropertyLineType(i, tr("Line type:"),
|
||||
LineStylesPics(comboBoxPalette.color(QPalette::Base), comboBoxPalette.color(QPalette::Text)));
|
||||
AddPropertyLineColor(i, tr("Line color:"), VAbstractTool::ColorsList(), AttrLineColor);
|
||||
AddPropertyText(tr("Notes:"), i->GetNotes(), AttrNotes);
|
||||
}
|
||||
|
@ -2892,9 +2924,12 @@ void VToolOptionsPropertyBrowser::ShowOptionsToolLine(QGraphicsItem *item)
|
|||
i->ShowVisualization(true);
|
||||
m_formView->setTitle(tr("Line between points"));
|
||||
|
||||
QPalette comboBoxPalette = ComboBoxPalette();
|
||||
|
||||
AddPropertyParentPointName(i->FirstPointName(), tr("First point:"), AttrFirstPoint);
|
||||
AddPropertyParentPointName(i->SecondPointName(), tr("Second point:"), AttrSecondPoint);
|
||||
QMap<QString, QIcon> styles = LineStylesPics();
|
||||
QMap<QString, QIcon> styles =
|
||||
LineStylesPics(comboBoxPalette.color(QPalette::Base), comboBoxPalette.color(QPalette::Text));
|
||||
styles.remove(TypeLineNone);
|
||||
AddPropertyLineType(i, tr("Line type:"), styles);
|
||||
AddPropertyLineColor(i, tr("Line color:"), VAbstractTool::ColorsList(), AttrLineColor);
|
||||
|
@ -2923,11 +2958,14 @@ void VToolOptionsPropertyBrowser::ShowOptionsToolNormal(QGraphicsItem *item)
|
|||
i->ShowVisualization(true);
|
||||
m_formView->setTitle(tr("Point along perpendicular"));
|
||||
|
||||
QPalette comboBoxPalette = ComboBoxPalette();
|
||||
|
||||
AddPropertyFormula(tr("Length:"), i->GetFormulaLength(), AttrLength);
|
||||
AddPropertyObjectName(i, tr("Point label:"));
|
||||
AddPropertyParentPointName(i->BasePointName(), tr("First point:"), AttrBasePoint);
|
||||
AddPropertyParentPointName(i->SecondPointName(), tr("Second point:"), AttrSecondPoint);
|
||||
AddPropertyLineType(i, tr("Line type:"), LineStylesPics());
|
||||
AddPropertyLineType(i, tr("Line type:"),
|
||||
LineStylesPics(comboBoxPalette.color(QPalette::Base), comboBoxPalette.color(QPalette::Text)));
|
||||
AddPropertyLineColor(i, tr("Line color:"), VAbstractTool::ColorsList(), AttrLineColor);
|
||||
|
||||
auto *itemAngle = new VPE::VDoubleProperty(tr("Additional angle degrees:"));
|
||||
|
@ -3049,11 +3087,14 @@ void VToolOptionsPropertyBrowser::ShowOptionsToolShoulderPoint(QGraphicsItem *it
|
|||
i->ShowVisualization(true);
|
||||
m_formView->setTitle(tr("Special point on shoulder"));
|
||||
|
||||
QPalette comboBoxPalette = ComboBoxPalette();
|
||||
|
||||
AddPropertyObjectName(i, tr("Point label:"));
|
||||
AddPropertyParentPointName(i->BasePointName(), tr("First point:"), AttrBasePoint);
|
||||
AddPropertyParentPointName(i->SecondPointName(), tr("Second point:"), AttrSecondPoint);
|
||||
AddPropertyParentPointName(i->ShoulderPointName(), tr("Third point:"), AttrThirdPoint);
|
||||
AddPropertyLineType(i, tr("Line type:"), LineStylesPics());
|
||||
AddPropertyLineType(i, tr("Line type:"),
|
||||
LineStylesPics(comboBoxPalette.color(QPalette::Base), comboBoxPalette.color(QPalette::Text)));
|
||||
AddPropertyLineColor(i, tr("Line color:"), VAbstractTool::ColorsList(), AttrLineColor);
|
||||
AddPropertyFormula(tr("Length:"), i->GetFormulaLength(), AttrLength);
|
||||
AddPropertyText(tr("Notes:"), i->GetNotes(), AttrNotes);
|
||||
|
@ -3098,8 +3139,12 @@ void VToolOptionsPropertyBrowser::ShowOptionsToolSpline(QGraphicsItem *item)
|
|||
length2.Eval();
|
||||
AddPropertyFormula(tr("C2: length:"), length2, AttrLength2);
|
||||
|
||||
QPalette comboBoxPalette = ComboBoxPalette();
|
||||
|
||||
AddPropertyAlias(i, tr("Alias:"));
|
||||
AddPropertyCurvePenStyle(i, tr("Pen style:"), CurvePenStylesPics());
|
||||
AddPropertyCurvePenStyle(
|
||||
i, tr("Pen style:"),
|
||||
CurvePenStylesPics(comboBoxPalette.color(QPalette::Base), comboBoxPalette.color(QPalette::Text)));
|
||||
AddPropertyLineColor(i, tr("Color:"), VAbstractTool::ColorsList(), AttrColor);
|
||||
AddPropertyApproximationScale(tr("Approximation scale:"), spl.GetApproximationScale());
|
||||
AddPropertyText(tr("Notes:"), i->GetNotes(), AttrNotes);
|
||||
|
@ -3112,13 +3157,17 @@ void VToolOptionsPropertyBrowser::ShowOptionsToolCubicBezier(QGraphicsItem *item
|
|||
i->ShowVisualization(true);
|
||||
m_formView->setTitle(tr("Cubic bezier curve"));
|
||||
|
||||
QPalette comboBoxPalette = ComboBoxPalette();
|
||||
|
||||
AddPropertyObjectName(i, tr("Name:"), true);
|
||||
AddPropertyParentPointName(i->FirstPointName(), tr("First point:"), AttrPoint1);
|
||||
AddPropertyParentPointName(i->SecondPointName(), tr("Second point:"), AttrPoint2);
|
||||
AddPropertyParentPointName(i->ThirdPointName(), tr("Third point:"), AttrPoint3);
|
||||
AddPropertyParentPointName(i->ForthPointName(), tr("Fourth point:"), AttrPoint4);
|
||||
AddPropertyAlias(i, tr("Alias:"));
|
||||
AddPropertyCurvePenStyle(i, tr("Pen style:"), CurvePenStylesPics());
|
||||
AddPropertyCurvePenStyle(
|
||||
i, tr("Pen style:"),
|
||||
CurvePenStylesPics(comboBoxPalette.color(QPalette::Base), comboBoxPalette.color(QPalette::Text)));
|
||||
AddPropertyLineColor(i, tr("Color:"), VAbstractTool::ColorsList(), AttrColor);
|
||||
AddPropertyApproximationScale(tr("Approximation scale:"), i->getSpline().GetApproximationScale());
|
||||
AddPropertyText(tr("Notes:"), i->GetNotes(), AttrNotes);
|
||||
|
@ -3131,9 +3180,13 @@ void VToolOptionsPropertyBrowser::ShowOptionsToolSplinePath(QGraphicsItem *item)
|
|||
i->ShowVisualization(true);
|
||||
m_formView->setTitle(tr("Tool for path curve"));
|
||||
|
||||
QPalette comboBoxPalette = ComboBoxPalette();
|
||||
|
||||
AddPropertyObjectName(i, tr("Name:"), true);
|
||||
AddPropertyAlias(i, tr("Alias:"));
|
||||
AddPropertyCurvePenStyle(i, tr("Pen style:"), CurvePenStylesPics());
|
||||
AddPropertyCurvePenStyle(
|
||||
i, tr("Pen style:"),
|
||||
CurvePenStylesPics(comboBoxPalette.color(QPalette::Base), comboBoxPalette.color(QPalette::Text)));
|
||||
AddPropertyLineColor(i, tr("Color:"), VAbstractTool::ColorsList(), AttrColor);
|
||||
AddPropertyApproximationScale(tr("Approximation scale:"), i->getSplinePath().GetApproximationScale());
|
||||
AddPropertyText(tr("Notes:"), i->GetNotes(), AttrNotes);
|
||||
|
@ -3146,9 +3199,13 @@ void VToolOptionsPropertyBrowser::ShowOptionsToolCubicBezierPath(QGraphicsItem *
|
|||
i->ShowVisualization(true);
|
||||
m_formView->setTitle(tr("Tool cubic bezier curve"));
|
||||
|
||||
QPalette comboBoxPalette = ComboBoxPalette();
|
||||
|
||||
AddPropertyObjectName(i, tr("Name:"), true);
|
||||
AddPropertyAlias(i, tr("Alias:"));
|
||||
AddPropertyCurvePenStyle(i, tr("Pen style:"), CurvePenStylesPics());
|
||||
AddPropertyCurvePenStyle(
|
||||
i, tr("Pen style:"),
|
||||
CurvePenStylesPics(comboBoxPalette.color(QPalette::Base), comboBoxPalette.color(QPalette::Text)));
|
||||
AddPropertyLineColor(i, tr("Color:"), VAbstractTool::ColorsList(), AttrColor);
|
||||
AddPropertyApproximationScale(tr("Approximation scale:"), i->getSplinePath().GetApproximationScale());
|
||||
AddPropertyText(tr("Notes:"), i->GetNotes(), AttrNotes);
|
||||
|
@ -3176,11 +3233,14 @@ void VToolOptionsPropertyBrowser::ShowOptionsToolLineIntersectAxis(QGraphicsItem
|
|||
i->ShowVisualization(true);
|
||||
m_formView->setTitle(tr("Point intersection line and axis"));
|
||||
|
||||
QPalette comboBoxPalette = ComboBoxPalette();
|
||||
|
||||
AddPropertyObjectName(i, tr("Point label:"));
|
||||
AddPropertyParentPointName(i->BasePointName(), tr("Axis point:"), AttrBasePoint);
|
||||
AddPropertyParentPointName(i->FirstLinePoint(), tr("First line point:"), AttrFirstPoint);
|
||||
AddPropertyParentPointName(i->SecondLinePoint(), tr("Second line point:"), AttrSecondPoint);
|
||||
AddPropertyLineType(i, tr("Line type:"), LineStylesPics());
|
||||
AddPropertyLineType(i, tr("Line type:"),
|
||||
LineStylesPics(comboBoxPalette.color(QPalette::Base), comboBoxPalette.color(QPalette::Text)));
|
||||
AddPropertyLineColor(i, tr("Line color:"), VAbstractTool::ColorsList(), AttrLineColor);
|
||||
AddPropertyFormula(tr("Angle:"), i->GetFormulaAngle(), AttrAngle);
|
||||
AddPropertyText(tr("Notes:"), i->GetNotes(), AttrNotes);
|
||||
|
@ -3193,10 +3253,13 @@ void VToolOptionsPropertyBrowser::ShowOptionsToolCurveIntersectAxis(QGraphicsIte
|
|||
i->ShowVisualization(true);
|
||||
m_formView->setTitle(tr("Point intersection curve and axis"));
|
||||
|
||||
QPalette comboBoxPalette = ComboBoxPalette();
|
||||
|
||||
AddPropertyObjectName(i, tr("Point label:"));
|
||||
AddPropertyParentPointName(i->BasePointName(), tr("Axis point:"), AttrBasePoint);
|
||||
AddPropertyParentPointName(i->CurveName(), tr("Curve:"), AttrCurve);
|
||||
AddPropertyLineType(i, tr("Line type:"), LineStylesPics());
|
||||
AddPropertyLineType(i, tr("Line type:"),
|
||||
LineStylesPics(comboBoxPalette.color(QPalette::Base), comboBoxPalette.color(QPalette::Text)));
|
||||
AddPropertyLineColor(i, tr("Line color:"), VAbstractTool::ColorsList(), AttrLineColor);
|
||||
AddPropertyFormula(tr("Angle:"), i->GetFormulaAngle(), AttrAngle);
|
||||
AddPropertyText(tr("Notes:"), i->GetNotes(), AttrNotes);
|
||||
|
@ -3316,7 +3379,10 @@ void VToolOptionsPropertyBrowser::UpdateOptionsToolEndLine()
|
|||
m_idToProperty[AttrName]->setValue(i->name());
|
||||
|
||||
{
|
||||
const auto index = VPE::VLineTypeProperty::IndexOfStyle(LineStylesPics(), i->getLineType());
|
||||
QPalette comboBoxPalette = ComboBoxPalette();
|
||||
const auto index = VPE::VLineTypeProperty::IndexOfStyle(
|
||||
LineStylesPics(comboBoxPalette.color(QPalette::Base), comboBoxPalette.color(QPalette::Text)),
|
||||
i->getLineType());
|
||||
m_idToProperty[AttrTypeLine]->setValue(index);
|
||||
}
|
||||
|
||||
|
@ -3347,7 +3413,10 @@ void VToolOptionsPropertyBrowser::UpdateOptionsToolAlongLine()
|
|||
m_idToProperty[AttrName]->setValue(i->name());
|
||||
|
||||
{
|
||||
const auto index = VPE::VLineTypeProperty::IndexOfStyle(LineStylesPics(), i->getLineType());
|
||||
QPalette comboBoxPalette = ComboBoxPalette();
|
||||
const auto index = VPE::VLineTypeProperty::IndexOfStyle(
|
||||
LineStylesPics(comboBoxPalette.color(QPalette::Base), comboBoxPalette.color(QPalette::Text)),
|
||||
i->getLineType());
|
||||
m_idToProperty[AttrTypeLine]->setValue(index);
|
||||
}
|
||||
|
||||
|
@ -3391,7 +3460,10 @@ void VToolOptionsPropertyBrowser::UpdateOptionsToolArc()
|
|||
m_idToProperty[AttrAngle2]->setValue(valueSecondAngle);
|
||||
|
||||
{
|
||||
const auto index = VPE::VLineTypeProperty::IndexOfStyle(CurvePenStylesPics(), i->GetPenStyle());
|
||||
QPalette comboBoxPalette = ComboBoxPalette();
|
||||
const auto index = VPE::VLineTypeProperty::IndexOfStyle(
|
||||
CurvePenStylesPics(comboBoxPalette.color(QPalette::Base), comboBoxPalette.color(QPalette::Text)),
|
||||
i->GetPenStyle());
|
||||
m_idToProperty[AttrPenStyle]->setValue(index);
|
||||
}
|
||||
|
||||
|
@ -3433,7 +3505,10 @@ void VToolOptionsPropertyBrowser::UpdateOptionsToolArcWithLength()
|
|||
m_idToProperty[AttrLength]->setValue(valueLength);
|
||||
|
||||
{
|
||||
const auto index = VPE::VLineTypeProperty::IndexOfStyle(CurvePenStylesPics(), i->GetPenStyle());
|
||||
QPalette comboBoxPalette = ComboBoxPalette();
|
||||
const auto index = VPE::VLineTypeProperty::IndexOfStyle(
|
||||
CurvePenStylesPics(comboBoxPalette.color(QPalette::Base), comboBoxPalette.color(QPalette::Text)),
|
||||
i->GetPenStyle());
|
||||
m_idToProperty[AttrPenStyle]->setValue(index);
|
||||
}
|
||||
|
||||
|
@ -3467,7 +3542,10 @@ void VToolOptionsPropertyBrowser::UpdateOptionsToolBisector()
|
|||
m_idToProperty[AttrLength]->setValue(valueFormula);
|
||||
|
||||
{
|
||||
const auto index = VPE::VLineTypeProperty::IndexOfStyle(LineStylesPics(), i->getLineType());
|
||||
QPalette comboBoxPalette = ComboBoxPalette();
|
||||
const auto index = VPE::VLineTypeProperty::IndexOfStyle(
|
||||
LineStylesPics(comboBoxPalette.color(QPalette::Base), comboBoxPalette.color(QPalette::Text)),
|
||||
i->getLineType());
|
||||
m_idToProperty[AttrTypeLine]->setValue(index);
|
||||
}
|
||||
|
||||
|
@ -3593,7 +3671,10 @@ void VToolOptionsPropertyBrowser::UpdateOptionsToolHeight()
|
|||
m_idToProperty[AttrName]->setValue(i->name());
|
||||
|
||||
{
|
||||
const auto index = VPE::VLineTypeProperty::IndexOfStyle(LineStylesPics(), i->getLineType());
|
||||
QPalette comboBoxPalette = ComboBoxPalette();
|
||||
const auto index = VPE::VLineTypeProperty::IndexOfStyle(
|
||||
LineStylesPics(comboBoxPalette.color(QPalette::Base), comboBoxPalette.color(QPalette::Text)),
|
||||
i->getLineType());
|
||||
m_idToProperty[AttrTypeLine]->setValue(index);
|
||||
}
|
||||
|
||||
|
@ -3623,7 +3704,10 @@ void VToolOptionsPropertyBrowser::UpdateOptionsToolLine()
|
|||
auto *i = qgraphicsitem_cast<VToolLine *>(m_currentItem);
|
||||
|
||||
{
|
||||
const auto index = VPE::VLineTypeProperty::IndexOfStyle(LineStylesPics(), i->getLineType());
|
||||
QPalette comboBoxPalette = ComboBoxPalette();
|
||||
const auto index = VPE::VLineTypeProperty::IndexOfStyle(
|
||||
LineStylesPics(comboBoxPalette.color(QPalette::Base), comboBoxPalette.color(QPalette::Text)),
|
||||
i->getLineType());
|
||||
m_idToProperty[AttrTypeLine]->setValue(index);
|
||||
}
|
||||
|
||||
|
@ -3683,7 +3767,10 @@ void VToolOptionsPropertyBrowser::UpdateOptionsToolNormal()
|
|||
m_idToProperty[AttrAngle]->setValue(i->GetAngle());
|
||||
|
||||
{
|
||||
const auto index = VPE::VLineTypeProperty::IndexOfStyle(LineStylesPics(), i->getLineType());
|
||||
QPalette comboBoxPalette = ComboBoxPalette();
|
||||
const auto index = VPE::VLineTypeProperty::IndexOfStyle(
|
||||
LineStylesPics(comboBoxPalette.color(QPalette::Base), comboBoxPalette.color(QPalette::Text)),
|
||||
i->getLineType());
|
||||
m_idToProperty[AttrTypeLine]->setValue(index);
|
||||
}
|
||||
|
||||
|
@ -3867,7 +3954,10 @@ void VToolOptionsPropertyBrowser::UpdateOptionsToolShoulderPoint()
|
|||
m_idToProperty[AttrName]->setValue(i->name());
|
||||
|
||||
{
|
||||
const auto index = VPE::VLineTypeProperty::IndexOfStyle(LineStylesPics(), i->getLineType());
|
||||
QPalette comboBoxPalette = ComboBoxPalette();
|
||||
const auto index = VPE::VLineTypeProperty::IndexOfStyle(
|
||||
LineStylesPics(comboBoxPalette.color(QPalette::Base), comboBoxPalette.color(QPalette::Text)),
|
||||
i->getLineType());
|
||||
m_idToProperty[AttrTypeLine]->setValue(index);
|
||||
}
|
||||
|
||||
|
@ -3936,7 +4026,10 @@ void VToolOptionsPropertyBrowser::UpdateOptionsToolSpline()
|
|||
m_idToProperty[AttrLength2]->setValue(length2);
|
||||
|
||||
{
|
||||
const auto index = VPE::VLineTypeProperty::IndexOfStyle(CurvePenStylesPics(), i->GetPenStyle());
|
||||
QPalette comboBoxPalette = ComboBoxPalette();
|
||||
const auto index = VPE::VLineTypeProperty::IndexOfStyle(
|
||||
CurvePenStylesPics(comboBoxPalette.color(QPalette::Base), comboBoxPalette.color(QPalette::Text)),
|
||||
i->GetPenStyle());
|
||||
m_idToProperty[AttrPenStyle]->setValue(index);
|
||||
}
|
||||
|
||||
|
@ -3960,7 +4053,10 @@ void VToolOptionsPropertyBrowser::UpdateOptionsToolCubicBezier()
|
|||
m_idToProperty[AttrName]->setValue(i->name());
|
||||
|
||||
{
|
||||
const auto index = VPE::VLineTypeProperty::IndexOfStyle(CurvePenStylesPics(), i->GetPenStyle());
|
||||
QPalette comboBoxPalette = ComboBoxPalette();
|
||||
const auto index = VPE::VLineTypeProperty::IndexOfStyle(
|
||||
CurvePenStylesPics(comboBoxPalette.color(QPalette::Base), comboBoxPalette.color(QPalette::Text)),
|
||||
i->GetPenStyle());
|
||||
m_idToProperty[AttrPenStyle]->setValue(index);
|
||||
}
|
||||
|
||||
|
@ -4000,7 +4096,10 @@ void VToolOptionsPropertyBrowser::UpdateOptionsToolSplinePath()
|
|||
m_idToProperty[AttrName]->setValue(i->name());
|
||||
|
||||
{
|
||||
const auto index = VPE::VLineTypeProperty::IndexOfStyle(CurvePenStylesPics(), i->GetPenStyle());
|
||||
QPalette comboBoxPalette = ComboBoxPalette();
|
||||
const auto index = VPE::VLineTypeProperty::IndexOfStyle(
|
||||
CurvePenStylesPics(comboBoxPalette.color(QPalette::Base), comboBoxPalette.color(QPalette::Text)),
|
||||
i->GetPenStyle());
|
||||
m_idToProperty[AttrPenStyle]->setValue(index);
|
||||
}
|
||||
|
||||
|
@ -4024,7 +4123,10 @@ void VToolOptionsPropertyBrowser::UpdateOptionsToolCubicBezierPath()
|
|||
m_idToProperty[AttrName]->setValue(i->name());
|
||||
|
||||
{
|
||||
const auto index = VPE::VLineTypeProperty::IndexOfStyle(CurvePenStylesPics(), i->GetPenStyle());
|
||||
QPalette comboBoxPalette = ComboBoxPalette();
|
||||
const auto index = VPE::VLineTypeProperty::IndexOfStyle(
|
||||
CurvePenStylesPics(comboBoxPalette.color(QPalette::Base), comboBoxPalette.color(QPalette::Text)),
|
||||
i->GetPenStyle());
|
||||
m_idToProperty[AttrPenStyle]->setValue(index);
|
||||
}
|
||||
|
||||
|
@ -4073,7 +4175,10 @@ void VToolOptionsPropertyBrowser::UpdateOptionsToolLineIntersectAxis()
|
|||
m_idToProperty[AttrName]->setValue(i->name());
|
||||
|
||||
{
|
||||
const auto index = VPE::VLineTypeProperty::IndexOfStyle(LineStylesPics(), i->getLineType());
|
||||
QPalette comboBoxPalette = ComboBoxPalette();
|
||||
const auto index = VPE::VLineTypeProperty::IndexOfStyle(
|
||||
LineStylesPics(comboBoxPalette.color(QPalette::Base), comboBoxPalette.color(QPalette::Text)),
|
||||
i->getLineType());
|
||||
m_idToProperty[AttrTypeLine]->setValue(index);
|
||||
}
|
||||
|
||||
|
@ -4108,7 +4213,10 @@ void VToolOptionsPropertyBrowser::UpdateOptionsToolCurveIntersectAxis()
|
|||
m_idToProperty[AttrName]->setValue(i->name());
|
||||
|
||||
{
|
||||
const auto index = VPE::VLineTypeProperty::IndexOfStyle(LineStylesPics(), i->getLineType());
|
||||
QPalette comboBoxPalette = ComboBoxPalette();
|
||||
const auto index = VPE::VLineTypeProperty::IndexOfStyle(
|
||||
LineStylesPics(comboBoxPalette.color(QPalette::Base), comboBoxPalette.color(QPalette::Text)),
|
||||
i->getLineType());
|
||||
m_idToProperty[AttrTypeLine]->setValue(index);
|
||||
}
|
||||
|
||||
|
|
|
@ -29,12 +29,12 @@
|
|||
#ifndef VTOOLOPTIONSPROPERTYBROWSER_H
|
||||
#define VTOOLOPTIONSPROPERTYBROWSER_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QMap>
|
||||
#include <QObject>
|
||||
|
||||
#include "../vpropertyexplorer/vproperty.h"
|
||||
#include "../vpropertyexplorer/vpropertymodel.h"
|
||||
#include "../vpropertyexplorer/vpropertyformview.h"
|
||||
#include "../vpropertyexplorer/vpropertymodel.h"
|
||||
|
||||
class QDockWidget;
|
||||
class QGraphicsItem;
|
||||
|
@ -44,151 +44,120 @@ class VFormula;
|
|||
class VToolOptionsPropertyBrowser : public QObject
|
||||
{
|
||||
Q_OBJECT // NOLINT
|
||||
|
||||
public:
|
||||
explicit VToolOptionsPropertyBrowser(QDockWidget *parent);
|
||||
~VToolOptionsPropertyBrowser() override =default;
|
||||
~VToolOptionsPropertyBrowser() override = default;
|
||||
|
||||
void ClearPropertyBrowser();
|
||||
|
||||
public slots:
|
||||
void itemClicked(QGraphicsItem *item);
|
||||
void UpdateOptions();
|
||||
void RefreshOptions();
|
||||
|
||||
private slots:
|
||||
void userChangedData(VPE::VProperty* property);
|
||||
void userChangedData(VPE::VProperty *property);
|
||||
|
||||
private:
|
||||
// cppcheck-suppress unknownMacro
|
||||
Q_DISABLE_COPY_MOVE(VToolOptionsPropertyBrowser) // NOLINT
|
||||
|
||||
VPE::VPropertyModel* m_PropertyModel{nullptr};
|
||||
VPE::VPropertyFormView* m_formView{nullptr};
|
||||
VPE::VPropertyModel *m_PropertyModel{nullptr};
|
||||
VPE::VPropertyFormView *m_formView{nullptr};
|
||||
|
||||
QGraphicsItem *m_currentItem{nullptr};
|
||||
QMap<VPE::VProperty *, QString> m_propertyToId{};
|
||||
QMap<QString, VPE::VProperty *> m_idToProperty{};
|
||||
|
||||
auto ComboBoxPalette() const -> QPalette;
|
||||
|
||||
void AddProperty(VPE::VProperty *property, const QString &id);
|
||||
void ShowItemOptions(QGraphicsItem *item);
|
||||
|
||||
template<class Tool>
|
||||
void SetName(VPE::VProperty *property);
|
||||
template <class Tool> void SetName(VPE::VProperty *property);
|
||||
|
||||
template<class Tool>
|
||||
void SetHold(VPE::VProperty *property);
|
||||
template <class Tool> void SetHold(VPE::VProperty *property);
|
||||
|
||||
template<class Tool>
|
||||
void SetVisible(VPE::VProperty *property);
|
||||
template <class Tool> void SetVisible(VPE::VProperty *property);
|
||||
|
||||
template<class Tool>
|
||||
void SetOpacity(VPE::VProperty *property);
|
||||
template <class Tool> void SetOpacity(VPE::VProperty *property);
|
||||
|
||||
template<class Tool>
|
||||
void SetPointName(VPE::VProperty *property);
|
||||
template <class Tool> void SetPointName(VPE::VProperty *property);
|
||||
|
||||
template<class Tool>
|
||||
void SetPointName1(VPE::VProperty *property);
|
||||
template <class Tool> void SetPointName1(VPE::VProperty *property);
|
||||
|
||||
template<class Tool>
|
||||
void SetPointName2(VPE::VProperty *property);
|
||||
template <class Tool> void SetPointName2(VPE::VProperty *property);
|
||||
|
||||
template<class Tool>
|
||||
void SetOperationSuffix(VPE::VProperty *property);
|
||||
template <class Tool> void SetOperationSuffix(VPE::VProperty *property);
|
||||
|
||||
template<class Type>
|
||||
auto GetCrossPoint(const QVariant &value) -> Type;
|
||||
template <class Type> auto GetCrossPoint(const QVariant &value) -> Type;
|
||||
|
||||
template<class Tool>
|
||||
void SetCrossCirclesPoint(VPE::VProperty *property);
|
||||
template <class Tool> void SetCrossCirclesPoint(VPE::VProperty *property);
|
||||
|
||||
template<class Tool>
|
||||
void SetVCrossCurvesPoint(VPE::VProperty *property);
|
||||
template <class Tool> void SetVCrossCurvesPoint(VPE::VProperty *property);
|
||||
|
||||
template<class Tool>
|
||||
void SetHCrossCurvesPoint(VPE::VProperty *property);
|
||||
template <class Tool> void SetHCrossCurvesPoint(VPE::VProperty *property);
|
||||
|
||||
template<class Tool>
|
||||
void SetAxisType(VPE::VProperty *property);
|
||||
template <class Tool> void SetAxisType(VPE::VProperty *property);
|
||||
|
||||
template<class Tool>
|
||||
void SetNotes(VPE::VProperty *property);
|
||||
template <class Tool> void SetNotes(VPE::VProperty *property);
|
||||
|
||||
template<class Tool>
|
||||
void SetAlias(VPE::VProperty *property);
|
||||
template <class Tool> void SetAlias(VPE::VProperty *property);
|
||||
|
||||
template<class Tool>
|
||||
void SetAlias1(VPE::VProperty *property);
|
||||
template <class Tool> void SetAlias1(VPE::VProperty *property);
|
||||
|
||||
template<class Tool>
|
||||
void SetAlias2(VPE::VProperty *property);
|
||||
template <class Tool> void SetAlias2(VPE::VProperty *property);
|
||||
|
||||
template<class Tool>
|
||||
void SetLineType(VPE::VProperty *property);
|
||||
template <class Tool> void SetLineType(VPE::VProperty *property);
|
||||
|
||||
template<class Tool>
|
||||
void SetLineColor(VPE::VProperty *property);
|
||||
template <class Tool> void SetLineColor(VPE::VProperty *property);
|
||||
|
||||
template<class Tool>
|
||||
void SetFormulaLength(VPE::VProperty *property);
|
||||
template <class Tool> void SetFormulaLength(VPE::VProperty *property);
|
||||
|
||||
template<class Tool>
|
||||
void SetFormulaAngle(VPE::VProperty *property);
|
||||
template <class Tool> void SetFormulaAngle(VPE::VProperty *property);
|
||||
|
||||
template<class Tool>
|
||||
void SetFormulaRadius(VPE::VProperty *property);
|
||||
template <class Tool> void SetFormulaRadius(VPE::VProperty *property);
|
||||
|
||||
template<class Tool>
|
||||
void SetFormulaF1(VPE::VProperty *property);
|
||||
template <class Tool> void SetFormulaF1(VPE::VProperty *property);
|
||||
|
||||
template<class Tool>
|
||||
void SetFormulaF2(VPE::VProperty *property);
|
||||
template <class Tool> void SetFormulaF2(VPE::VProperty *property);
|
||||
|
||||
template<class Tool>
|
||||
void SetPenStyle(VPE::VProperty *property);
|
||||
template <class Tool> void SetPenStyle(VPE::VProperty *property);
|
||||
|
||||
template<class Tool>
|
||||
void SetFormulaRotationAngle(VPE::VProperty *property);
|
||||
template <class Tool> void SetFormulaRotationAngle(VPE::VProperty *property);
|
||||
|
||||
template<class Tool>
|
||||
void SetApproximationScale(VPE::VProperty *property);
|
||||
template <class Tool> void SetApproximationScale(VPE::VProperty *property);
|
||||
|
||||
template<class Tool>
|
||||
void AddPropertyObjectName(Tool *i, const QString &propertyName, bool readOnly = false);
|
||||
template <class Tool> void AddPropertyObjectName(Tool *i, const QString &propertyName, bool readOnly = false);
|
||||
|
||||
template<class Tool>
|
||||
void AddPropertyAlias(Tool *i, const QString &propertyName);
|
||||
template <class Tool> void AddPropertyAlias(Tool *i, const QString &propertyName);
|
||||
|
||||
template<class Tool>
|
||||
void AddPropertyAlias1(Tool *i, const QString &propertyName);
|
||||
template <class Tool> void AddPropertyAlias1(Tool *i, const QString &propertyName);
|
||||
|
||||
template<class Tool>
|
||||
void AddPropertyAlias2(Tool *i, const QString &propertyName);
|
||||
template <class Tool> void AddPropertyAlias2(Tool *i, const QString &propertyName);
|
||||
|
||||
template<class Tool>
|
||||
void AddPropertyPointName1(Tool *i, const QString &propertyName);
|
||||
template <class Tool> void AddPropertyPointName1(Tool *i, const QString &propertyName);
|
||||
|
||||
template<class Tool>
|
||||
void AddPropertyPointName2(Tool *i, const QString &propertyName);
|
||||
template <class Tool> void AddPropertyPointName2(Tool *i, const QString &propertyName);
|
||||
|
||||
template<class Tool>
|
||||
void AddPropertyOperationSuffix(Tool *i, const QString &propertyName, bool readOnly = false);
|
||||
template <class Tool> void AddPropertyOperationSuffix(Tool *i, const QString &propertyName, bool readOnly = false);
|
||||
|
||||
template<class Tool>
|
||||
void AddPropertyCrossPoint(Tool *i, const QString &propertyName);
|
||||
template <class Tool> void AddPropertyCrossPoint(Tool *i, const QString &propertyName);
|
||||
|
||||
template<class Tool>
|
||||
void AddPropertyVCrossPoint(Tool *i, const QString &propertyName);
|
||||
template <class Tool> void AddPropertyVCrossPoint(Tool *i, const QString &propertyName);
|
||||
|
||||
template<class Tool>
|
||||
void AddPropertyHCrossPoint(Tool *i, const QString &propertyName);
|
||||
template <class Tool> void AddPropertyHCrossPoint(Tool *i, const QString &propertyName);
|
||||
|
||||
template<class Tool>
|
||||
void AddPropertyAxisType(Tool *i, const QString &propertyName);
|
||||
template <class Tool> void AddPropertyAxisType(Tool *i, const QString &propertyName);
|
||||
|
||||
template<class Tool>
|
||||
template <class Tool>
|
||||
void AddPropertyLineType(Tool *i, const QString &propertyName, const QMap<QString, QIcon> &styles);
|
||||
|
||||
template<class Tool>
|
||||
template <class Tool>
|
||||
void AddPropertyCurvePenStyle(Tool *i, const QString &propertyName, const QMap<QString, QIcon> &styles);
|
||||
|
||||
template<class Tool>
|
||||
template <class Tool>
|
||||
void AddPropertyLineColor(Tool *i, const QString &propertyName, const QMap<QString, QString> &colors,
|
||||
const QString &id);
|
||||
|
||||
|
|
|
@ -29,13 +29,15 @@
|
|||
#include "dialogfinalmeasurements.h"
|
||||
#include "../qmuparser/qmudef.h"
|
||||
#include "../vmisc/compatibility.h"
|
||||
#include "../vmisc/theme/vtheme.h"
|
||||
#include "../vmisc/vabstractvalapplication.h"
|
||||
#include "../vmisc/vvalentinasettings.h"
|
||||
#include "../vpatterndb/calculator.h"
|
||||
#include "../vtools/dialogs/dialogtoolbox.h"
|
||||
#include "../vtools/dialogs/support/dialogeditwrongformula.h"
|
||||
#include "ui_dialogfinalmeasurements.h"
|
||||
|
||||
#include <QMenu>
|
||||
#include <qnumeric.h>
|
||||
|
||||
constexpr int DIALOG_MAX_FORMULA_HEIGHT = 64;
|
||||
|
||||
|
@ -54,6 +56,8 @@ DialogFinalMeasurements::DialogFinalMeasurements(VPattern *doc, QWidget *parent)
|
|||
setWindowFlags(Qt::Window);
|
||||
#endif
|
||||
|
||||
InitIcons();
|
||||
|
||||
m_data.FillPiecesAreas(VAbstractValApplication::VApp()->patternUnits());
|
||||
|
||||
ui->lineEditName->setClearButtonEnabled(true);
|
||||
|
@ -131,6 +135,13 @@ void DialogFinalMeasurements::changeEvent(QEvent *event)
|
|||
UpdateSearchControlsTooltips();
|
||||
FullUpdateFromFile();
|
||||
}
|
||||
|
||||
if (event->type() == QEvent::PaletteChange)
|
||||
{
|
||||
InitIcons();
|
||||
InitDialogButtonBoxIcons(ui->buttonBox);
|
||||
}
|
||||
|
||||
// remember to call base class implementation
|
||||
QDialog::changeEvent(event);
|
||||
}
|
||||
|
@ -906,3 +917,11 @@ void DialogFinalMeasurements::UpdateSearchControlsTooltips()
|
|||
UpdateToolTip(ui->toolButtonFindPrevious);
|
||||
UpdateToolTip(ui->toolButtonFindNext);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void DialogFinalMeasurements::InitIcons()
|
||||
{
|
||||
QString resource = QStringLiteral("icon");
|
||||
|
||||
ui->toolButtonExpr->setIcon(VTheme::GetIconResource(resource, QStringLiteral("24x24/fx.png")));
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
|
||||
namespace Ui
|
||||
{
|
||||
class DialogFinalMeasurements;
|
||||
class DialogFinalMeasurements;
|
||||
}
|
||||
|
||||
class DialogFinalMeasurements : public QDialog
|
||||
|
@ -51,10 +51,10 @@ public:
|
|||
auto FinalMeasurements() const -> QVector<VFinalMeasurement>;
|
||||
|
||||
protected:
|
||||
void closeEvent ( QCloseEvent * event ) override;
|
||||
void changeEvent ( QEvent * event) override;
|
||||
void closeEvent(QCloseEvent *event) override;
|
||||
void changeEvent(QEvent *event) override;
|
||||
auto eventFilter(QObject *object, QEvent *event) -> bool override;
|
||||
void showEvent( QShowEvent *event ) override;
|
||||
void showEvent(QShowEvent *event) override;
|
||||
void resizeEvent(QResizeEvent *event) override;
|
||||
private slots:
|
||||
void ShowFinalMeasurementDetails();
|
||||
|
@ -68,16 +68,17 @@ private slots:
|
|||
void DeployFormula();
|
||||
void Fx();
|
||||
void FullUpdateFromFile();
|
||||
|
||||
private:
|
||||
Q_DISABLE_COPY_MOVE(DialogFinalMeasurements) // NOLINT
|
||||
Ui::DialogFinalMeasurements *ui;
|
||||
/** @brief doc dom document container */
|
||||
VPattern *m_doc;
|
||||
VContainer m_data;
|
||||
QVector<VFinalMeasurement> m_measurements;
|
||||
VPattern *m_doc;
|
||||
VContainer m_data;
|
||||
QVector<VFinalMeasurement> m_measurements;
|
||||
QSharedPointer<VTableSearch> m_search{};
|
||||
int formulaBaseHeight{0};
|
||||
bool m_isInitialized{false};
|
||||
int formulaBaseHeight{0};
|
||||
bool m_isInitialized{false};
|
||||
|
||||
QMenu *m_searchHistory;
|
||||
|
||||
|
@ -98,6 +99,8 @@ private:
|
|||
void InitSearchHistory();
|
||||
void SaveSearchRequest();
|
||||
void UpdateSearchControlsTooltips();
|
||||
|
||||
void InitIcons();
|
||||
};
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -218,7 +218,7 @@
|
|||
<string><html><head/><body><p>Find Previous <span style=" color:#888a85;">%1</span></p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true">...</string>
|
||||
<string notr="true"></string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset theme="go-up">
|
||||
|
@ -238,7 +238,7 @@
|
|||
<string><html><head/><body><p>Find Next %1</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true">...</string>
|
||||
<string notr="true"></string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset theme="go-down">
|
||||
|
@ -377,7 +377,7 @@
|
|||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true">...</string>
|
||||
<string notr="true"></string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset theme="list-add">
|
||||
|
@ -391,7 +391,7 @@
|
|||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true">...</string>
|
||||
<string notr="true"></string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset theme="list-remove">
|
||||
|
@ -522,11 +522,11 @@
|
|||
<string>Formula wizard</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true">...</string>
|
||||
<string notr="true"></string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../../../libs/vmisc/share/resources/icon.qrc">
|
||||
<normaloff>:/icon/24x24/fx.png</normaloff>:/icon/24x24/fx.png</iconset>
|
||||
<normaloff>:/icon/light/24x24/fx.png</normaloff>:/icon/light/24x24/fx.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
|
@ -575,7 +575,7 @@
|
|||
<string>Move measurement up</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true">...</string>
|
||||
<string notr="true"></string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset theme="go-up">
|
||||
|
@ -592,7 +592,7 @@
|
|||
<string>Move measurement down</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true">...</string>
|
||||
<string notr="true"></string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset theme="go-down">
|
||||
|
|
|
@ -228,7 +228,7 @@
|
|||
<string><html><head/><body><p>Find Previous <span style=" color:#888a85;">%1</span></p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true">...</string>
|
||||
<string notr="true"></string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset theme="go-up">
|
||||
|
@ -248,7 +248,7 @@
|
|||
<string><html><head/><body><p>Find Next %1</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true">...</string>
|
||||
<string notr="true"></string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset theme="go-down">
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
#endif // QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
|
||||
#include "../qmuparser/qmudef.h"
|
||||
#include "../qmuparser/qmutokenparser.h"
|
||||
#include "../vmisc/theme/vtheme.h"
|
||||
#include "../vpatterndb/calculator.h"
|
||||
#include "../vpatterndb/variables/varcradius.h"
|
||||
#include "../vpatterndb/variables/vcurveangle.h"
|
||||
|
@ -88,6 +89,8 @@ DialogIncrements::DialogIncrements(VContainer *data, VPattern *doc, QWidget *par
|
|||
setWindowFlags(Qt::Window);
|
||||
#endif
|
||||
|
||||
InitIcons();
|
||||
|
||||
ui->lineEditName->setClearButtonEnabled(true);
|
||||
ui->lineEditNamePC->setClearButtonEnabled(true);
|
||||
|
||||
|
@ -1254,6 +1257,16 @@ void DialogIncrements::InitIncrementUnits(QComboBox *combo)
|
|||
combo->blockSignals(false);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void DialogIncrements::InitIcons()
|
||||
{
|
||||
const QString resource = QStringLiteral("icon");
|
||||
const QString fxIcon = QStringLiteral("24x24/fx.png");
|
||||
|
||||
ui->toolButtonExpr->setIcon(VTheme::GetIconResource(resource, fxIcon));
|
||||
ui->toolButtonExprPC->setIcon(VTheme::GetIconResource(resource, fxIcon));
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* @brief FullUpdateFromFile update information in tables form file
|
||||
|
@ -1941,6 +1954,12 @@ void DialogIncrements::changeEvent(QEvent *event)
|
|||
|
||||
FullUpdateFromFile();
|
||||
}
|
||||
|
||||
if (event->type() == QEvent::PaletteChange)
|
||||
{
|
||||
InitIcons();
|
||||
}
|
||||
|
||||
// remember to call base class implementation
|
||||
QWidget::changeEvent(event);
|
||||
}
|
||||
|
|
|
@ -29,9 +29,9 @@
|
|||
#ifndef DIALOGINCREMENTS_H
|
||||
#define DIALOGINCREMENTS_H
|
||||
|
||||
#include "../vmisc/vtablesearch.h"
|
||||
#include "../vtools/dialogs/tools/dialogtool.h"
|
||||
#include "../xml/vpattern.h"
|
||||
#include "../vmisc/vtablesearch.h"
|
||||
|
||||
#include <QPair>
|
||||
|
||||
|
@ -39,7 +39,7 @@ class VIndividualMeasurements;
|
|||
|
||||
namespace Ui
|
||||
{
|
||||
class DialogIncrements;
|
||||
class DialogIncrements;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -48,6 +48,7 @@ namespace Ui
|
|||
class DialogIncrements : public DialogTool
|
||||
{
|
||||
Q_OBJECT // NOLINT
|
||||
|
||||
public:
|
||||
DialogIncrements(VContainer *data, VPattern *doc, QWidget *parent = nullptr);
|
||||
~DialogIncrements() override;
|
||||
|
@ -61,12 +62,12 @@ public slots:
|
|||
void FullUpdateFromFile();
|
||||
|
||||
protected:
|
||||
void closeEvent ( QCloseEvent * event ) override;
|
||||
void changeEvent ( QEvent * event) override;
|
||||
void closeEvent(QCloseEvent *event) override;
|
||||
void changeEvent(QEvent *event) override;
|
||||
auto eventFilter(QObject *object, QEvent *event) -> bool override;
|
||||
void showEvent( QShowEvent *event ) override;
|
||||
void showEvent(QShowEvent *event) override;
|
||||
void resizeEvent(QResizeEvent *event) override;
|
||||
auto IsValid() const -> bool final {return true;}
|
||||
auto IsValid() const -> bool final { return true; }
|
||||
private slots:
|
||||
void ShowIncrementDetails();
|
||||
void AddIncrement();
|
||||
|
@ -111,11 +112,10 @@ private:
|
|||
QMenu *m_searchHistory;
|
||||
QMenu *m_searchHistoryPC;
|
||||
|
||||
template <typename T>
|
||||
void FillTable(const QMap<QString, T> &varTable, QTableWidget *table);
|
||||
template <typename T> void FillTable(const QMap<QString, T> &varTable, QTableWidget *table);
|
||||
|
||||
static void FillIncrementsTable(QTableWidget *table, const QMap<QString, QSharedPointer<VIncrement> > &increments,
|
||||
bool takePreviewCalculations);
|
||||
static void FillIncrementsTable(QTableWidget *table, const QMap<QString, QSharedPointer<VIncrement>> &increments,
|
||||
bool takePreviewCalculations);
|
||||
|
||||
void FillIncrements();
|
||||
void FillPreviewCalculations();
|
||||
|
@ -129,16 +129,16 @@ private:
|
|||
void ShowUnits();
|
||||
static void ShowHeaderUnits(QTableWidget *table, int column, const QString &unit);
|
||||
|
||||
static auto AddCell(QTableWidget *table, const QString &text, int row, int column, int aligment,
|
||||
bool ok = true) -> QTableWidgetItem*;
|
||||
static auto AddCell(QTableWidget *table, const QString &text, int row, int column, int aligment, bool ok = true)
|
||||
-> QTableWidgetItem *;
|
||||
static auto AddSeparatorCell(QTableWidget *table, const QString &text, int row, int column, int aligment,
|
||||
bool ok = true) -> QTableWidgetItem*;
|
||||
bool ok = true) -> QTableWidgetItem *;
|
||||
|
||||
auto GetCustomName() const -> QString;
|
||||
static auto ClearIncrementName(const QString &name) -> QString;
|
||||
|
||||
static auto EvalIncrementFormula(const QString &formula, bool fromUser, VContainer *data, QLabel *label,
|
||||
bool special) -> bool;
|
||||
bool special) -> bool;
|
||||
void Controls(QTableWidget *table);
|
||||
void EnableDetails(QTableWidget *table, bool enabled);
|
||||
|
||||
|
@ -161,6 +161,8 @@ private:
|
|||
void SavePreviewCalculationsSearchRequest();
|
||||
void UpdateSearchControlsTooltips();
|
||||
static void InitIncrementUnits(QComboBox *combo);
|
||||
|
||||
void InitIcons();
|
||||
};
|
||||
|
||||
#endif // DIALOGINCREMENTS_H
|
||||
|
|
|
@ -249,7 +249,7 @@
|
|||
<string><html><head/><body><p>Find Previous <span style=" color:#888a85;">%1</span></p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true">...</string>
|
||||
<string notr="true"></string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset theme="go-up">
|
||||
|
@ -269,7 +269,7 @@
|
|||
<string><html><head/><body><p>Find Next %1</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true">...</string>
|
||||
<string notr="true"></string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset theme="go-down">
|
||||
|
@ -392,7 +392,7 @@
|
|||
<string>Move measurement up</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true">...</string>
|
||||
<string notr="true"></string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset theme="go-up">
|
||||
|
@ -409,7 +409,7 @@
|
|||
<string>Move measurement down</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true">...</string>
|
||||
<string notr="true"></string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset theme="go-down">
|
||||
|
@ -459,7 +459,7 @@
|
|||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true">...</string>
|
||||
<string notr="true"></string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset theme="list-add">
|
||||
|
@ -476,7 +476,7 @@
|
|||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true">...</string>
|
||||
<string notr="true"></string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset theme="list-remove">
|
||||
|
@ -611,11 +611,11 @@
|
|||
<string>Formula wizard</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true">...</string>
|
||||
<string notr="true"></string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../../../libs/vmisc/share/resources/icon.qrc">
|
||||
<normaloff>:/icon/24x24/fx.png</normaloff>:/icon/24x24/fx.png</iconset>
|
||||
<normaloff>:/icon/light/24x24/fx.png</normaloff>:/icon/light/24x24/fx.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
|
@ -904,7 +904,7 @@
|
|||
<string><html><head/><body><p>Find Previous <span style=" color:#888a85;">%1</span></p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true">...</string>
|
||||
<string notr="true"></string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset theme="go-up">
|
||||
|
@ -924,7 +924,7 @@
|
|||
<string><html><head/><body><p>Find Next %1</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true">...</string>
|
||||
<string notr="true"></string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset theme="go-down">
|
||||
|
@ -1047,7 +1047,7 @@
|
|||
<string>Move measurement up</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true">...</string>
|
||||
<string notr="true"></string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset theme="go-up">
|
||||
|
@ -1064,7 +1064,7 @@
|
|||
<string>Move measurement down</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true">...</string>
|
||||
<string notr="true"></string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset theme="go-down">
|
||||
|
@ -1114,7 +1114,7 @@
|
|||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true">...</string>
|
||||
<string notr="true"></string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset theme="list-add">
|
||||
|
@ -1131,7 +1131,7 @@
|
|||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true">...</string>
|
||||
<string notr="true"></string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset theme="list-remove">
|
||||
|
@ -1259,11 +1259,11 @@
|
|||
<string>Formula wizard</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true">...</string>
|
||||
<string notr="true"></string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../../../libs/vmisc/share/resources/icon.qrc">
|
||||
<normaloff>:/icon/24x24/fx.png</normaloff>:/icon/24x24/fx.png</iconset>
|
||||
<normaloff>:/icon/light/24x24/fx.png</normaloff>:/icon/light/24x24/fx.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
|
|
|
@ -66,7 +66,7 @@
|
|||
<item>
|
||||
<widget class="QToolButton" name="toolButtonAdd">
|
||||
<property name="text">
|
||||
<string notr="true">...</string>
|
||||
<string notr="true"></string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset theme="list-add">
|
||||
|
@ -80,7 +80,7 @@
|
|||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true">...</string>
|
||||
<string notr="true"></string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset theme="list-remove">
|
||||
|
|
|
@ -27,16 +27,17 @@
|
|||
*************************************************************************/
|
||||
|
||||
#include "dialoglayoutprogress.h"
|
||||
#include "ui_dialoglayoutprogress.h"
|
||||
#include "../vmisc/theme/vtheme.h"
|
||||
#include "../vmisc/vabstractvalapplication.h"
|
||||
#include "../vmisc/vvalentinasettings.h"
|
||||
#include "ui_dialoglayoutprogress.h"
|
||||
|
||||
#include <QMessageBox>
|
||||
#include <QPushButton>
|
||||
#include <QMovie>
|
||||
#include <QtDebug>
|
||||
#include <QTime>
|
||||
#include <QPushButton>
|
||||
#include <QShowEvent>
|
||||
#include <QTime>
|
||||
#include <QtDebug>
|
||||
#include <chrono>
|
||||
|
||||
#if (defined(Q_CC_GNU) && Q_CC_GNU < 409) && !defined(Q_CC_CLANG)
|
||||
|
@ -52,46 +53,49 @@ using namespace bpstd::literals::chrono_literals;
|
|||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
DialogLayoutProgress::DialogLayoutProgress(QElapsedTimer timer, qint64 timeout, QWidget *parent)
|
||||
: QDialog(parent),
|
||||
ui(new Ui::DialogLayoutProgress),
|
||||
m_movie(new QMovie(QStringLiteral("://icon/16x16/progress.gif"))),
|
||||
m_timer(timer),
|
||||
m_timeout(timeout),
|
||||
m_progressTimer(new QTimer(this))
|
||||
: QDialog(parent),
|
||||
ui(new Ui::DialogLayoutProgress),
|
||||
m_timer(timer),
|
||||
m_timeout(timeout),
|
||||
m_progressTimer(new QTimer(this))
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
VAbstractValApplication::VApp()->ValentinaSettings()->GetOsSeparator() ? setLocale(QLocale())
|
||||
: setLocale(QLocale::c());
|
||||
|
||||
ui->progressBar->setMaximum(static_cast<int>(timeout/1000));
|
||||
ui->progressBar->setMaximum(static_cast<int>(timeout / 1000));
|
||||
ui->progressBar->setValue(0);
|
||||
|
||||
const QString scheme =
|
||||
(VTheme::ColorSheme() == VColorSheme::Light ? QStringLiteral("light") : QStringLiteral("dark"));
|
||||
m_movie = new QMovie(QStringLiteral("://icon/%1/16x16/progress.gif").arg(scheme));
|
||||
ui->labelProgress->setMovie(m_movie);
|
||||
m_movie->start();
|
||||
|
||||
QPushButton *bCancel = ui->buttonBox->button(QDialogButtonBox::Cancel);
|
||||
SCASSERT(bCancel != nullptr)
|
||||
connect(bCancel, &QPushButton::clicked, this, [this](){emit Abort();});
|
||||
connect(bCancel, &QPushButton::clicked, this, [this]() { emit Abort(); });
|
||||
setModal(true);
|
||||
|
||||
this->setWindowFlags(Qt::Dialog | Qt::WindowTitleHint | Qt::CustomizeWindowHint);
|
||||
|
||||
connect(m_progressTimer, &QTimer::timeout, this, [this]()
|
||||
{
|
||||
const qint64 elapsed = m_timer.elapsed();
|
||||
const int timeout = static_cast<int>(m_timeout - elapsed);
|
||||
QTime t(0, 0);
|
||||
t = t.addMSecs(timeout);
|
||||
ui->labelTimeLeft->setText(tr("Time left: %1").arg(t.toString()));
|
||||
ui->progressBar->setValue(static_cast<int>(elapsed/1000));
|
||||
connect(m_progressTimer, &QTimer::timeout, this,
|
||||
[this]()
|
||||
{
|
||||
const qint64 elapsed = m_timer.elapsed();
|
||||
const int timeout = static_cast<int>(m_timeout - elapsed);
|
||||
QTime t(0, 0);
|
||||
t = t.addMSecs(timeout);
|
||||
ui->labelTimeLeft->setText(tr("Time left: %1").arg(t.toString()));
|
||||
ui->progressBar->setValue(static_cast<int>(elapsed / 1000));
|
||||
|
||||
if (timeout <= 1000)
|
||||
{
|
||||
emit Timeout();
|
||||
m_progressTimer->stop();
|
||||
}
|
||||
});
|
||||
if (timeout <= 1000)
|
||||
{
|
||||
emit Timeout();
|
||||
m_progressTimer->stop();
|
||||
}
|
||||
});
|
||||
m_progressTimer->start(V_SECONDS(1));
|
||||
}
|
||||
|
||||
|
@ -124,8 +128,8 @@ void DialogLayoutProgress::Efficiency(qreal value)
|
|||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void DialogLayoutProgress::showEvent(QShowEvent *event)
|
||||
{
|
||||
QDialog::showEvent( event );
|
||||
if ( event->spontaneous() )
|
||||
QDialog::showEvent(event);
|
||||
if (event->spontaneous())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -139,5 +143,5 @@ void DialogLayoutProgress::showEvent(QShowEvent *event)
|
|||
setMaximumSize(size());
|
||||
setMinimumSize(size());
|
||||
|
||||
m_isInitialized = true;//first show windows are held
|
||||
m_isInitialized = true; // first show windows are held
|
||||
}
|
||||
|
|
|
@ -66,7 +66,7 @@ private:
|
|||
// cppcheck-suppress unknownMacro
|
||||
Q_DISABLE_COPY_MOVE(DialogLayoutProgress) // NOLINT
|
||||
Ui::DialogLayoutProgress *ui;
|
||||
QMovie *m_movie;
|
||||
QMovie *m_movie{nullptr};
|
||||
QElapsedTimer m_timer;
|
||||
qint64 m_timeout;
|
||||
bool m_isInitialized{false};
|
||||
|
|
|
@ -90,7 +90,7 @@
|
|||
<item>
|
||||
<widget class="QToolButton" name="toolButtonPortrait">
|
||||
<property name="text">
|
||||
<string notr="true">...</string>
|
||||
<string notr="true"></string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../../../libs/vmisc/share/resources/icon.qrc">
|
||||
|
@ -113,7 +113,7 @@
|
|||
<item>
|
||||
<widget class="QToolButton" name="toolButtonLandscape">
|
||||
<property name="text">
|
||||
<string notr="true">...</string>
|
||||
<string notr="true"></string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../../../libs/vmisc/share/resources/icon.qrc">
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
#include "dialogpreferences.h"
|
||||
#include "../vmisc/vabstractvalapplication.h"
|
||||
#include "../vmisc/vvalentinasettings.h"
|
||||
#include "../vtools/dialogs/dialogtoolbox.h"
|
||||
#include "configpages/preferencesconfigurationpage.h"
|
||||
#include "configpages/preferencespathpage.h"
|
||||
#include "configpages/preferencespatternpage.h"
|
||||
|
@ -125,19 +126,7 @@ void DialogPreferences::changeEvent(QEvent *event)
|
|||
|
||||
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));
|
||||
InitDialogButtonBoxIcons(ui->buttonBox);
|
||||
}
|
||||
|
||||
// remember to call base class implementation
|
||||
|
|
|
@ -275,7 +275,7 @@
|
|||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true">...</string>
|
||||
<string notr="true"></string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../../../libs/vmisc/share/resources/icon.qrc">
|
||||
|
@ -482,7 +482,7 @@
|
|||
<item>
|
||||
<widget class="QToolButton" name="toolButtonPortrait">
|
||||
<property name="text">
|
||||
<string notr="true">...</string>
|
||||
<string notr="true"></string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../../../libs/vmisc/share/resources/icon.qrc">
|
||||
|
@ -502,7 +502,7 @@
|
|||
<item>
|
||||
<widget class="QToolButton" name="toolButtonLandscape">
|
||||
<property name="text">
|
||||
<string notr="true">...</string>
|
||||
<string notr="true"></string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../../../libs/vmisc/share/resources/icon.qrc">
|
||||
|
|
|
@ -26,23 +26,25 @@
|
|||
**
|
||||
*************************************************************************/
|
||||
#include "vwidgetbackgroundimages.h"
|
||||
#include "qstringliteral.h"
|
||||
#include "theme/vtheme.h"
|
||||
#include "ui_vwidgetbackgroundimages.h"
|
||||
|
||||
#include "../vmisc/def.h"
|
||||
#include "../ifc/xml/vabstractpattern.h"
|
||||
#include "../ifc/xml/vbackgroundpatternimage.h"
|
||||
#include "../vtools/undocommands/image/holdbackgroundimage.h"
|
||||
#include "../vtools/undocommands/image/renamebackgroundimage.h"
|
||||
#include "../vtools/undocommands/image/hidebackgroundimage.h"
|
||||
#include "../vmisc/def.h"
|
||||
#include "../vmisc/lambdaconstants.h"
|
||||
#include "../vmisc/vabstractapplication.h"
|
||||
#include "../vtools/undocommands/image/hideallbackgroundimages.h"
|
||||
#include "../vtools/undocommands/image/hidebackgroundimage.h"
|
||||
#include "../vtools/undocommands/image/holdallbackgroundimages.h"
|
||||
#include "../vtools/undocommands/image/zvaluemovebackgroundimage.h"
|
||||
#include "../vtools/undocommands/image/holdbackgroundimage.h"
|
||||
#include "../vtools/undocommands/image/movebackgroundimage.h"
|
||||
#include "../vtools/undocommands/image/renamebackgroundimage.h"
|
||||
#include "../vtools/undocommands/image/resetbackgroundimage.h"
|
||||
#include "../vtools/undocommands/image/rotatebackgroundimage.h"
|
||||
#include "../vtools/undocommands/image/scalebackgroundimage.h"
|
||||
#include "../vtools/undocommands/image/resetbackgroundimage.h"
|
||||
#include "../vmisc/vabstractapplication.h"
|
||||
#include "../vmisc/lambdaconstants.h"
|
||||
#include "../vtools/undocommands/image/zvaluemovebackgroundimage.h"
|
||||
#if QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
|
||||
#include "../vmisc/backport/qoverload.h"
|
||||
#endif // QT_VERSION < QT_VERSION_CHECK(5, 7, 0)
|
||||
|
@ -64,8 +66,9 @@ void SetImageHold(QTableWidgetItem *item, const VBackgroundPatternImage &image)
|
|||
{
|
||||
if (item)
|
||||
{
|
||||
(image.Hold()) ? item->setIcon(QIcon(QStringLiteral("://icon/16x16/hold_image.png")))
|
||||
: item->setIcon(QIcon(QStringLiteral("://icon/16x16/not_hold_image.png")));
|
||||
const QString resource = QStringLiteral("icon");
|
||||
(image.Hold()) ? item->setIcon(VTheme::GetIconResource(resource, QStringLiteral("16x16/hold_image.png")))
|
||||
: item->setIcon(VTheme::GetIconResource(resource, QStringLiteral("16x16/not_hold_image.png")));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -74,8 +77,9 @@ void SetImageVisibility(QTableWidgetItem *item, const VBackgroundPatternImage &i
|
|||
{
|
||||
if (item)
|
||||
{
|
||||
(image.Visible()) ? item->setIcon(QIcon(QStringLiteral("://icon/16x16/open_eye.png")))
|
||||
: item->setIcon(QIcon(QStringLiteral("://icon/16x16/closed_eye.png")));
|
||||
const QString resource = QStringLiteral("icon");
|
||||
item->setIcon(image.Visible() ? VTheme::GetIconResource(resource, QStringLiteral("16x16/open_eye.png"))
|
||||
: VTheme::GetIconResource(resource, QStringLiteral("16x16/closed_eye.png")));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -149,9 +153,9 @@ auto ScaleUnitConvertor(qreal base, qreal value, ScaleUnit from, ScaleUnit to) -
|
|||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
VWidgetBackgroundImages::VWidgetBackgroundImages(VAbstractPattern *doc, QWidget *parent)
|
||||
: QWidget(parent),
|
||||
ui(new Ui::VWidgetBackgroundImages),
|
||||
m_doc(doc)
|
||||
: QWidget(parent),
|
||||
ui(new Ui::VWidgetBackgroundImages),
|
||||
m_doc(doc)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
|
@ -291,7 +295,7 @@ void VWidgetBackgroundImages::ImageNameChanged(int row, int column)
|
|||
void VWidgetBackgroundImages::ContextMenu(const QPoint &pos)
|
||||
{
|
||||
QTableWidgetItem *item = ui->tableWidget->itemAt(pos);
|
||||
if(item == nullptr)
|
||||
if (item == nullptr)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -401,7 +405,8 @@ void VWidgetBackgroundImages::ContextMenu(const QPoint &pos)
|
|||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VWidgetBackgroundImages::CurrentImageChanged(int currentRow, int currentColumn, int previousRow, int previousColumn)
|
||||
void VWidgetBackgroundImages::CurrentImageChanged(int currentRow, int currentColumn, int previousRow,
|
||||
int previousColumn)
|
||||
{
|
||||
Q_UNUSED(currentColumn)
|
||||
Q_UNUSED(previousColumn)
|
||||
|
@ -528,10 +533,11 @@ void VWidgetBackgroundImages::ApplyImageTransformation()
|
|||
}
|
||||
else if (ui->tabWidgetImageTransformation->indexOf(ui->tabScale) == index)
|
||||
{ // scale
|
||||
qreal sx = WidthScaleUnitConvertor(ui->doubleSpinBoxScaleWidth->value(), CurrentScaleUnit(),
|
||||
ScaleUnit::Percent) / 100;
|
||||
qreal sy = HeightScaleUnitConvertor(ui->doubleSpinBoxScaleHeight->value(), CurrentScaleUnit(),
|
||||
ScaleUnit::Percent) / 100;
|
||||
qreal sx =
|
||||
WidthScaleUnitConvertor(ui->doubleSpinBoxScaleWidth->value(), CurrentScaleUnit(), ScaleUnit::Percent) / 100;
|
||||
qreal sy =
|
||||
HeightScaleUnitConvertor(ui->doubleSpinBoxScaleHeight->value(), CurrentScaleUnit(), ScaleUnit::Percent) /
|
||||
100;
|
||||
|
||||
QTransform imageMatrix = image.Matrix();
|
||||
QPointF originPos = image.BoundingRect().center();
|
||||
|
@ -544,7 +550,6 @@ void VWidgetBackgroundImages::ApplyImageTransformation()
|
|||
|
||||
auto *command = new ScaleBackgroundImage(id, imageMatrix, m_doc);
|
||||
VAbstractApplication::VApp()->getUndoStack()->push(command);
|
||||
|
||||
}
|
||||
else if (ui->tabWidgetImageTransformation->indexOf(ui->tabRotate) == index)
|
||||
{ // rotate
|
||||
|
@ -841,37 +846,37 @@ void VWidgetBackgroundImages::InitImageTranslation()
|
|||
const int maxTranslate = 10000;
|
||||
|
||||
ui->doubleSpinBoxImageHorizontalTranslate->setMinimum(
|
||||
UnitConvertor(minTranslate, Unit::Cm, m_oldImageTranslationUnit));
|
||||
UnitConvertor(minTranslate, Unit::Cm, m_oldImageTranslationUnit));
|
||||
ui->doubleSpinBoxImageHorizontalTranslate->setMaximum(
|
||||
UnitConvertor(maxTranslate, Unit::Cm, m_oldImageTranslationUnit));
|
||||
UnitConvertor(maxTranslate, Unit::Cm, m_oldImageTranslationUnit));
|
||||
ui->doubleSpinBoxImageHorizontalTranslate->setValue(0);
|
||||
|
||||
ui->doubleSpinBoxImageVerticalTranslate->setMinimum(
|
||||
UnitConvertor(minTranslate, Unit::Cm, m_oldImageTranslationUnit));
|
||||
UnitConvertor(minTranslate, Unit::Cm, m_oldImageTranslationUnit));
|
||||
ui->doubleSpinBoxImageVerticalTranslate->setMaximum(
|
||||
UnitConvertor(maxTranslate, Unit::Cm, m_oldImageTranslationUnit));
|
||||
UnitConvertor(maxTranslate, Unit::Cm, m_oldImageTranslationUnit));
|
||||
ui->doubleSpinBoxImageVerticalTranslate->setValue(0);
|
||||
|
||||
connect(ui->comboBoxTranslateUnit, QOverload<int>::of(&QComboBox::currentIndexChanged), this,
|
||||
[this V_LAMBDA_CONSTANTS(minTranslate, maxTranslate)]()
|
||||
{
|
||||
const Unit newUnit = CurrentTranslateUnit();
|
||||
const qreal oldTranslateX = ui->doubleSpinBoxImageHorizontalTranslate->value();
|
||||
const qreal oldTranslateY = ui->doubleSpinBoxImageVerticalTranslate->value();
|
||||
{
|
||||
const Unit newUnit = CurrentTranslateUnit();
|
||||
const qreal oldTranslateX = ui->doubleSpinBoxImageHorizontalTranslate->value();
|
||||
const qreal oldTranslateY = ui->doubleSpinBoxImageVerticalTranslate->value();
|
||||
|
||||
ui->doubleSpinBoxImageHorizontalTranslate->setMinimum(UnitConvertor(minTranslate, Unit::Cm, newUnit));
|
||||
ui->doubleSpinBoxImageHorizontalTranslate->setMaximum(UnitConvertor(maxTranslate, Unit::Cm, newUnit));
|
||||
ui->doubleSpinBoxImageHorizontalTranslate->setMinimum(UnitConvertor(minTranslate, Unit::Cm, newUnit));
|
||||
ui->doubleSpinBoxImageHorizontalTranslate->setMaximum(UnitConvertor(maxTranslate, Unit::Cm, newUnit));
|
||||
|
||||
ui->doubleSpinBoxImageVerticalTranslate->setMinimum(UnitConvertor(minTranslate, Unit::Cm, newUnit));
|
||||
ui->doubleSpinBoxImageVerticalTranslate->setMaximum(UnitConvertor(maxTranslate, Unit::Cm, newUnit));
|
||||
ui->doubleSpinBoxImageVerticalTranslate->setMinimum(UnitConvertor(minTranslate, Unit::Cm, newUnit));
|
||||
ui->doubleSpinBoxImageVerticalTranslate->setMaximum(UnitConvertor(maxTranslate, Unit::Cm, newUnit));
|
||||
|
||||
ui->doubleSpinBoxImageHorizontalTranslate->setValue(
|
||||
ui->doubleSpinBoxImageHorizontalTranslate->setValue(
|
||||
UnitConvertor(oldTranslateX, m_oldImageTranslationUnit, newUnit));
|
||||
ui->doubleSpinBoxImageVerticalTranslate->setValue(
|
||||
ui->doubleSpinBoxImageVerticalTranslate->setValue(
|
||||
UnitConvertor(oldTranslateY, m_oldImageTranslationUnit, newUnit));
|
||||
|
||||
m_oldImageTranslationUnit = newUnit;
|
||||
});
|
||||
m_oldImageTranslationUnit = newUnit;
|
||||
});
|
||||
|
||||
SetCheckBoxValue(ui->checkBoxRelativeTranslation, true);
|
||||
connect(ui->checkBoxRelativeTranslation, &QCheckBox::toggled, this,
|
||||
|
@ -899,40 +904,40 @@ void VWidgetBackgroundImages::InitImageTranslation()
|
|||
ui->doubleSpinBoxScaleHeight->setMaximum(maxScale);
|
||||
ui->doubleSpinBoxScaleHeight->setValue(100);
|
||||
|
||||
connect(ui->comboBoxScaleUnit, QOverload<int>::of(&QComboBox::currentIndexChanged), this,
|
||||
[this V_LAMBDA_CONSTANTS(minScale, maxScale)]()
|
||||
{
|
||||
const ScaleUnit newUnit = CurrentScaleUnit();
|
||||
const qreal oldScaleWidth = ui->doubleSpinBoxScaleWidth->value();
|
||||
const qreal oldScaleHeight = ui->doubleSpinBoxScaleHeight->value();
|
||||
|
||||
ui->doubleSpinBoxScaleWidth->blockSignals(true);
|
||||
|
||||
ui->doubleSpinBoxScaleWidth->setMinimum(WidthScaleUnitConvertor(minScale, ScaleUnit::Percent, newUnit));
|
||||
ui->doubleSpinBoxScaleWidth->setMinimum(WidthScaleUnitConvertor(minScale, ScaleUnit::Percent, newUnit));
|
||||
|
||||
ui->doubleSpinBoxScaleWidth->setValue(
|
||||
WidthScaleUnitConvertor(oldScaleWidth, m_oldImageScaleUnit, newUnit));
|
||||
ui->doubleSpinBoxScaleWidth->blockSignals(false);
|
||||
|
||||
ui->doubleSpinBoxScaleHeight->blockSignals(true);
|
||||
|
||||
ui->doubleSpinBoxScaleHeight->setMaximum(HeightScaleUnitConvertor(maxScale, ScaleUnit::Percent, newUnit));
|
||||
ui->doubleSpinBoxScaleHeight->setMaximum(HeightScaleUnitConvertor(maxScale, ScaleUnit::Percent, newUnit));
|
||||
|
||||
if (ui->checkBoxScaleProportionally->isChecked() && newUnit == ScaleUnit::Percent)
|
||||
connect(
|
||||
ui->comboBoxScaleUnit, QOverload<int>::of(&QComboBox::currentIndexChanged), this,
|
||||
[this V_LAMBDA_CONSTANTS(minScale, maxScale)]()
|
||||
{
|
||||
ui->doubleSpinBoxScaleHeight->setValue(ui->doubleSpinBoxScaleWidth->value());
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->doubleSpinBoxScaleHeight->setValue(
|
||||
HeightScaleUnitConvertor(oldScaleHeight, m_oldImageScaleUnit, newUnit));
|
||||
}
|
||||
ui->doubleSpinBoxScaleHeight->blockSignals(false);
|
||||
const ScaleUnit newUnit = CurrentScaleUnit();
|
||||
const qreal oldScaleWidth = ui->doubleSpinBoxScaleWidth->value();
|
||||
const qreal oldScaleHeight = ui->doubleSpinBoxScaleHeight->value();
|
||||
|
||||
m_oldImageScaleUnit = newUnit;
|
||||
});
|
||||
ui->doubleSpinBoxScaleWidth->blockSignals(true);
|
||||
|
||||
ui->doubleSpinBoxScaleWidth->setMinimum(WidthScaleUnitConvertor(minScale, ScaleUnit::Percent, newUnit));
|
||||
ui->doubleSpinBoxScaleWidth->setMinimum(WidthScaleUnitConvertor(minScale, ScaleUnit::Percent, newUnit));
|
||||
|
||||
ui->doubleSpinBoxScaleWidth->setValue(WidthScaleUnitConvertor(oldScaleWidth, m_oldImageScaleUnit, newUnit));
|
||||
ui->doubleSpinBoxScaleWidth->blockSignals(false);
|
||||
|
||||
ui->doubleSpinBoxScaleHeight->blockSignals(true);
|
||||
|
||||
ui->doubleSpinBoxScaleHeight->setMaximum(HeightScaleUnitConvertor(maxScale, ScaleUnit::Percent, newUnit));
|
||||
ui->doubleSpinBoxScaleHeight->setMaximum(HeightScaleUnitConvertor(maxScale, ScaleUnit::Percent, newUnit));
|
||||
|
||||
if (ui->checkBoxScaleProportionally->isChecked() && newUnit == ScaleUnit::Percent)
|
||||
{
|
||||
ui->doubleSpinBoxScaleHeight->setValue(ui->doubleSpinBoxScaleWidth->value());
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->doubleSpinBoxScaleHeight->setValue(
|
||||
HeightScaleUnitConvertor(oldScaleHeight, m_oldImageScaleUnit, newUnit));
|
||||
}
|
||||
ui->doubleSpinBoxScaleHeight->blockSignals(false);
|
||||
|
||||
m_oldImageScaleUnit = newUnit;
|
||||
});
|
||||
|
||||
connect(ui->doubleSpinBoxScaleHeight, QOverload<double>::of(&QDoubleSpinBox::valueChanged), this,
|
||||
&VWidgetBackgroundImages::ScaleHeightChanged);
|
||||
|
@ -1016,7 +1021,7 @@ void VWidgetBackgroundImages::SetAbsolutePisition(const QUuid &id)
|
|||
QRectF rect = image.BoundingRect();
|
||||
|
||||
ui->doubleSpinBoxImageHorizontalTranslate->setValue(
|
||||
UnitConvertor(rect.topLeft().x(), Unit::Px, CurrentTranslateUnit()));
|
||||
UnitConvertor(rect.topLeft().x(), Unit::Px, CurrentTranslateUnit()));
|
||||
ui->doubleSpinBoxImageVerticalTranslate->setValue(
|
||||
UnitConvertor(rect.topLeft().y(), Unit::Px, CurrentTranslateUnit()));
|
||||
UnitConvertor(rect.topLeft().y(), Unit::Px, CurrentTranslateUnit()));
|
||||
}
|
||||
|
|