Issue #159: Renaming applications

This commit is contained in:
Jakub Melka
2024-03-16 17:02:44 +01:00
parent a70f45c8a9
commit 28807b4f12
450 changed files with 1440 additions and 1416 deletions

View File

@@ -0,0 +1,34 @@
# Copyright (C) 2022 Jakub Melka
#
# This file is part of PDF4QT.
#
# PDF4QT is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# with the written consent of the copyright owner, any later version.
#
# PDF4QT is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with PDF4QT. If not, see <https://www.gnu.org/licenses/>.
add_library(DimensionsPlugin SHARED
dimensionsplugin.cpp
dimensiontool.cpp
settingsdialog.cpp
settingsdialog.ui
icons.qrc
)
target_link_libraries(DimensionsPlugin PRIVATE Pdf4QtLibCore Pdf4QtLibWidgets Qt6::Core Qt6::Gui Qt6::Widgets)
set_target_properties(DimensionsPlugin PROPERTIES
VERSION ${PDF4QT_VERSION}
SOVERSION ${PDF4QT_VERSION}
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${PDF4QT_PLUGINS_DIR}
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${PDF4QT_PLUGINS_DIR})
install(TARGETS DimensionsPlugin RUNTIME DESTINATION ${PDF4QT_PLUGINS_DIR} LIBRARY DESTINATION ${PDF4QT_PLUGINS_DIR})

View File

@@ -0,0 +1,7 @@
{
"Name" : "Dimensions",
"Author" : "Jakub Melka",
"Version" : "1.0.0",
"License" : "LGPL v3",
"Description" : "Measure distances, area, perimeter in a document page."
}

View File

@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Vrstva_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="24px" height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
<path fill="#292D32" d="M22.692,20.229c-0.165-0.108-0.377-0.162-0.645-0.162c-3.578,0.004-7.157,0.005-10.734,0.005H3.138
l3.556-6.157c0.927,0.659,1.672,1.441,2.273,2.39c0.533,0.841,0.922,1.797,1.153,2.842c0.092,0.414,0.41,0.692,0.792,0.692
c0.054,0,0.108-0.006,0.161-0.018c0.208-0.043,0.383-0.16,0.492-0.329c0.123-0.189,0.16-0.434,0.104-0.688
c-0.552-2.548-1.906-4.624-4.027-6.171c-0.049-0.035-0.096-0.072-0.144-0.108l-0.002-0.002l5.107-8.847
c0.044-0.076,0.088-0.152,0.123-0.232c0.09-0.205,0.09-0.43,0.001-0.635c-0.089-0.202-0.259-0.36-0.468-0.433
c-0.406-0.14-0.759,0.026-1.021,0.482l-1.183,2.046C7.886,8.666,5.713,12.427,3.542,16.19c-0.571,0.992-1.139,1.986-1.707,2.98
l-0.776,1.358c-0.183,0.422-0.053,0.801,0.366,1.045c0.147,0.066,0.322,0.099,0.534,0.099c6.704-0.006,13.402-0.006,20.116-0.001
c0.322,0,0.556-0.09,0.728-0.259C22.948,21.247,23.266,20.768,22.692,20.229z"/>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Vrstva_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="24px" height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
<polygon fill="#292D32" points="9.078,17.047 6.161,11.995 9.078,6.941 14.914,6.941 17.83,11.995 14.914,17.047 "/>
<path fill="#292D32" d="M11.81,3.28c-0.54-0.55-1.09-1.11-1.65-1.65c-0.12-0.11-0.29-0.18-0.45-0.2C9.47,1.41,9.29,1.55,9.19,1.77
C9.08,2.02,9.15,2.24,9.33,2.42c0.21,0.23,0.45,0.43,0.68,0.65c0,0.01,0.07,0.05,0.07,0.07v0.03H9.14c-0.75,0-1.6,0.48-1.98,1.12
L5.53,7.01L3.752,9.992c0,0-0.002,0.003-0.002,0.003l-0.024,0.041c-0.036,0.067-0.09,0.217-0.039,0.467
c0.039,0.084,0.095,0.162,0.173,0.217l0.07,0.04c0.04,0.02,0.08,0.04,0.13,0.05c0.27,0.06,0.48-0.04,0.66-0.33
c0.14-0.23,0.29-0.46,0.44-0.7L8.1,4.86c0.06-0.1,0.14-0.19,0.25-0.27C8.58,4.4,8.89,4.27,9.14,4.27h0.91L9.34,5.05
c0,0-0.136,0.166-0.175,0.381C9.163,5.57,9.197,5.707,9.31,5.82c0.23,0.24,0.57,0.24,0.84-0.02c0.05-0.05,0.1-0.1,0.15-0.15
c0.51-0.5,1.01-1,1.5-1.5C12.07,3.87,12.08,3.56,11.81,3.28z"/>
<path fill="#292D32" d="M12.192,20.703c0.541,0.549,1.09,1.109,1.65,1.649c0.12,0.11,0.29,0.18,0.45,0.2
c0.239,0.02,0.42-0.12,0.521-0.34c0.109-0.25,0.039-0.471-0.141-0.65c-0.21-0.23-0.449-0.43-0.68-0.65c0-0.01-0.07-0.05-0.07-0.07
v-0.029h0.939c0.75,0,1.601-0.48,1.98-1.12l1.631-2.72l1.777-2.982c0,0,0.002-0.003,0.002-0.004l0.023-0.04
c0.037-0.067,0.091-0.218,0.039-0.468c-0.039-0.084-0.094-0.161-0.172-0.217l-0.07-0.039c-0.041-0.02-0.08-0.04-0.131-0.051
c-0.27-0.06-0.479,0.041-0.66,0.33c-0.139,0.23-0.289,0.461-0.439,0.701l-2.939,4.92c-0.061,0.1-0.141,0.189-0.25,0.27
c-0.23,0.189-0.541,0.32-0.791,0.32h-0.909l0.71-0.78c0,0,0.137-0.166,0.175-0.381c0.002-0.14-0.032-0.276-0.146-0.39
c-0.229-0.24-0.569-0.24-0.84,0.021c-0.05,0.05-0.1,0.1-0.149,0.149c-0.511,0.5-1.011,1-1.5,1.5
C11.933,20.112,11.923,20.422,12.192,20.703z"/>
<path fill="#292D32" d="M21.922,8.51c-0.07-0.23-0.25-0.36-0.5-0.38c-0.271-0.02-0.45,0.12-0.561,0.34
c-0.15,0.28-0.27,0.57-0.4,0.86c0,0,0,0.01-0.01,0.01l-1.39-2.33l-1.63-2.72c-0.01-0.01-0.01-0.02-0.021-0.03
c-0.38-0.61-1.189-1.07-1.92-1.09h-0.04l-1.16,0.01h-0.05c0,0-0.489,0.006-0.52,0.46v0.08c0.01,0.05,0.01,0.09,0.029,0.14
c0.091,0.26,0.28,0.39,0.62,0.4c0.271,0,0.551,0.01,0.83,0.01h0.25c0.25,0,0.561,0.13,0.79,0.32c0.11,0.08,0.19,0.17,0.25,0.27
l2.91,4.87l-0.06,0.02l-0.971-0.42c0,0-0.199-0.07-0.42-0.04c-0.13,0.04-0.24,0.12-0.319,0.26c-0.15,0.3-0.04,0.62,0.29,0.79
c0.069,0.03,0.13,0.06,0.189,0.09c0.64,0.33,1.28,0.64,1.91,0.94c0.35,0.16,0.64,0.08,0.82-0.27c0.35-0.69,0.699-1.39,1.029-2.1
C21.941,8.86,21.951,8.67,21.922,8.51z"/>
<path fill="#292D32" d="M2.137,15.534c0.073,0.228,0.253,0.355,0.503,0.373c0.271,0.019,0.449-0.123,0.559-0.345
c0.147-0.281,0.264-0.573,0.392-0.861c0,0,0-0.01,0.01-0.012l1.409,2.318l1.653,2.705c0.01,0.013,0.01,0.022,0.021,0.032
c0.385,0.606,1.198,1.059,1.928,1.073l0.04-0.002l1.161-0.02h0.05c0,0,0.489-0.012,0.517-0.464l-0.002-0.08
c-0.01-0.05-0.009-0.09-0.029-0.141c-0.094-0.258-0.284-0.387-0.625-0.394c-0.271,0.003-0.551-0.006-0.83-0.004l-0.25,0.002
c-0.25,0.003-0.562-0.124-0.793-0.312c-0.111-0.08-0.192-0.17-0.252-0.27l-2.951-4.845l0.06-0.021l0.974,0.411
c0,0,0.2,0.068,0.42,0.038c0.129-0.041,0.239-0.123,0.317-0.263c0.147-0.301,0.035-0.62-0.297-0.787
c-0.07-0.03-0.131-0.061-0.19-0.089c-0.642-0.324-1.285-0.63-1.917-0.924c-0.352-0.157-0.641-0.076-0.818,0.277
c-0.345,0.692-0.688,1.395-1.012,2.106C2.115,15.183,2.107,15.372,2.137,15.534z"/>
</svg>

After

Width:  |  Height:  |  Size: 3.7 KiB

View File

@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Vrstva_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="24px" height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
<path fill="#292D32" d="M23.298,16.09c-0.03-0.068-0.071-0.135-0.125-0.188l-1.758-1.754c-0.226-0.229-0.597-0.229-0.822,0
c-0.225,0.226-0.225,0.595,0,0.822l0.732,0.729H8.435V3.103l0.729,0.731c0.227,0.226,0.596,0.227,0.822,0
c0.227-0.226,0.227-0.596,0-0.822L8.232,1.255C8.179,1.202,8.113,1.16,8.044,1.129C7.974,1.1,7.897,1.084,7.821,1.084
c-0.078,0-0.155,0.017-0.223,0.046C7.525,1.16,7.462,1.203,7.41,1.255L5.656,3.012c-0.114,0.112-0.169,0.26-0.169,0.41
c0,0.148,0.055,0.296,0.171,0.41c0.226,0.227,0.595,0.226,0.82,0l0.73-0.73v12.597H2.676l0.731-0.729
c0.226-0.229,0.226-0.598,0-0.822c-0.226-0.229-0.596-0.229-0.822,0l-1.757,1.754c-0.053,0.053-0.094,0.117-0.126,0.188
c-0.029,0.07-0.044,0.146-0.044,0.223c0,0.08,0.016,0.155,0.046,0.225c0.03,0.072,0.072,0.136,0.125,0.188l1.757,1.754
c0.112,0.113,0.261,0.17,0.41,0.17c0.148,0,0.296-0.057,0.411-0.172c0.228-0.227,0.226-0.596,0-0.82l-0.731-0.729l4.534-0.002v3.973
l-0.729-0.73c-0.227-0.227-0.596-0.227-0.822,0c-0.227,0.227-0.227,0.596,0,0.822l1.754,1.757c0.054,0.053,0.119,0.094,0.188,0.126
c0.07,0.027,0.147,0.045,0.224,0.045c0.078,0,0.155-0.018,0.224-0.047c0.072-0.03,0.136-0.071,0.188-0.124l1.754-1.757
c0.114-0.112,0.169-0.262,0.169-0.411c0-0.147-0.055-0.296-0.171-0.41c-0.226-0.228-0.596-0.226-0.821,0l-0.73,0.729v-3.973h12.891
l-0.729,0.73c-0.228,0.226-0.228,0.595,0,0.82c0.112,0.115,0.262,0.172,0.409,0.172c0.15,0,0.3-0.057,0.41-0.17l1.759-1.754
c0.053-0.053,0.094-0.115,0.125-0.188c0.028-0.068,0.045-0.146,0.045-0.224C23.343,16.236,23.327,16.16,23.298,16.09z M7.222,20.91
h0.021v0.021L7.222,20.91z M8.401,20.932V20.91h0.021L8.401,20.932z"/>
<circle fill="#292D32" cx="18.262" cy="6.125" r="4.063"/>
<g>
<path fill="#FFFFFF" d="M18.396,8.154c0.25,0,0.501,0,0.753,0c0.318,0,0.637,0,0.957,0c0.031,0,0.064,0.003,0.095,0.013
c0.069,0.028,0.105,0.085,0.098,0.157c-0.006,0.069-0.045,0.119-0.114,0.135C20.147,8.47,20.11,8.47,20.077,8.47
c-0.64,0-1.282,0-1.924,0c-0.416,0-0.834,0.003-1.252,0c-0.049,0-0.107-0.026-0.143-0.062c-0.244-0.238-0.482-0.481-0.725-0.726
c-0.357-0.356-0.357-0.815,0-1.173c0.818-0.823,1.641-1.644,2.463-2.462c0.357-0.358,0.821-0.356,1.178,0
c0.273,0.275,0.547,0.547,0.817,0.818c0.354,0.354,0.355,0.817,0.001,1.172c-0.68,0.679-1.358,1.359-2.043,2.039
c-0.02,0.019-0.047,0.031-0.072,0.051C18.384,8.136,18.39,8.145,18.396,8.154z M18.679,7.402c0.018-0.017,0.033-0.031,0.047-0.044
c0.521-0.514,1.036-1.032,1.556-1.55c0.219-0.221,0.219-0.493,0-0.714c-0.274-0.276-0.553-0.552-0.83-0.826
c-0.229-0.232-0.495-0.232-0.726-0.004c-0.512,0.512-1.021,1.022-1.535,1.536c-0.02,0.021-0.039,0.036-0.053,0.057
C17.649,6.372,18.161,6.883,18.679,7.402z M16.899,6.086c-0.225,0.224-0.449,0.45-0.668,0.674
c-0.199,0.198-0.199,0.473-0.004,0.674c0.227,0.229,0.455,0.453,0.684,0.683c0.023,0.021,0.061,0.037,0.092,0.037
c0.293,0.001,0.584,0.003,0.873,0c0.033,0,0.074-0.023,0.1-0.043c0.146-0.145,0.291-0.292,0.438-0.438
c0.016-0.015,0.025-0.031,0.035-0.043C17.929,7.113,17.417,6.604,16.899,6.086z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.4 KiB

View File

@@ -0,0 +1,374 @@
// Copyright (C) 2020-2021 Jakub Melka
//
// This file is part of PDF4QT.
//
// PDF4QT is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// with the written consent of the copyright owner, any later version.
//
// PDF4QT is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with PDF4QT. If not, see <https://www.gnu.org/licenses/>.
#include "dimensionsplugin.h"
#include "pdfdrawwidget.h"
#include "pdfwidgetutils.h"
#include "settingsdialog.h"
#include <QPainter>
#include <QFontMetricsF>
namespace pdfplugin
{
DimensionsPlugin::DimensionsPlugin() :
pdf::PDFPlugin(nullptr),
m_dimensionTools(),
m_showDimensionsAction(nullptr),
m_clearDimensionsAction(nullptr),
m_settingsAction(nullptr)
{
}
void DimensionsPlugin::setWidget(pdf::PDFWidget* widget)
{
Q_ASSERT(!m_widget);
BaseClass::setWidget(widget);
QAction* horizontalDimensionAction = new QAction(QIcon(":/pdfplugins/dimensiontool/linear-horizontal.svg"), tr("Horizontal Dimension"), this);
QAction* verticalDimensionAction = new QAction(QIcon(":/pdfplugins/dimensiontool/linear-vertical.svg"), tr("Vertical Dimension"), this);
QAction* linearDimensionAction = new QAction(QIcon(":/pdfplugins/dimensiontool/linear.svg"), tr("Linear Dimension"), this);
QAction* perimeterDimensionAction = new QAction(QIcon(":/pdfplugins/dimensiontool/perimeter.svg"), tr("Perimeter"), this);
QAction* rectanglePerimeterDimensionAction = new QAction(QIcon(":/pdfplugins/dimensiontool/rectangle-perimeter.svg"), tr("Rectangle Perimeter"), this);
QAction* areaDimensionAction = new QAction(QIcon(":/pdfplugins/dimensiontool/area.svg"), tr("Area"), this);
QAction* rectangleAreaDimensionAction = new QAction(QIcon(":/pdfplugins/dimensiontool/rectangle-area.svg"), tr("Rectangle Area"), this);
QAction* angleAction = new QAction(QIcon(":/pdfplugins/dimensiontool/angle.svg"), tr("Angle"), this);
horizontalDimensionAction->setObjectName("dimensiontool_LinearHorizontalAction");
verticalDimensionAction->setObjectName("dimensiontool_LinearVerticalAction");
linearDimensionAction->setObjectName("dimensiontool_LinearAction");
perimeterDimensionAction->setObjectName("dimensiontool_PerimeterAction");
rectanglePerimeterDimensionAction->setObjectName("dimensiontool_RectanglePerimeterAction");
areaDimensionAction->setObjectName("dimensiontool_AreaAction");
rectangleAreaDimensionAction->setObjectName("dimensiontool_RectangleAreaAction");
angleAction->setObjectName("dimensiontool_AngleAction");
horizontalDimensionAction->setCheckable(true);
verticalDimensionAction->setCheckable(true);
linearDimensionAction->setCheckable(true);
perimeterDimensionAction->setCheckable(true);
rectanglePerimeterDimensionAction->setCheckable(true);
areaDimensionAction->setCheckable(true);
rectangleAreaDimensionAction->setCheckable(true);
angleAction->setCheckable(true);
m_dimensionTools[DimensionTool::LinearHorizontal] = new DimensionTool(DimensionTool::LinearHorizontal, widget->getDrawWidgetProxy(), horizontalDimensionAction, this);
m_dimensionTools[DimensionTool::LinearVertical] = new DimensionTool(DimensionTool::LinearVertical, widget->getDrawWidgetProxy(), verticalDimensionAction, this);
m_dimensionTools[DimensionTool::Linear] = new DimensionTool(DimensionTool::Linear, widget->getDrawWidgetProxy(), linearDimensionAction, this);
m_dimensionTools[DimensionTool::Perimeter] = new DimensionTool(DimensionTool::Perimeter, widget->getDrawWidgetProxy(), perimeterDimensionAction, this);
m_dimensionTools[DimensionTool::RectanglePerimeter] = new DimensionTool(DimensionTool::RectanglePerimeter, widget->getDrawWidgetProxy(), rectanglePerimeterDimensionAction, this);
m_dimensionTools[DimensionTool::Area] = new DimensionTool(DimensionTool::Area, widget->getDrawWidgetProxy(), areaDimensionAction, this);
m_dimensionTools[DimensionTool::RectangleArea] = new DimensionTool(DimensionTool::RectangleArea, widget->getDrawWidgetProxy(), rectangleAreaDimensionAction, this);
m_dimensionTools[DimensionTool::Angle] = new DimensionTool(DimensionTool::Angle, widget->getDrawWidgetProxy(), angleAction, this);
pdf::PDFToolManager* toolManager = widget->getToolManager();
for (DimensionTool* tool : m_dimensionTools)
{
toolManager->addTool(tool);
connect(tool, &DimensionTool::dimensionCreated, this, &DimensionsPlugin::onDimensionCreated);
}
m_showDimensionsAction = new QAction(QIcon(":/pdfplugins/dimensiontool/show-dimensions.svg"), tr("Show Dimensions"), this);
m_clearDimensionsAction = new QAction(QIcon(":/pdfplugins/dimensiontool/clear-dimensions.svg"), tr("Clear Dimensions"), this);
m_settingsAction = new QAction(QIcon(":/pdfplugins/dimensiontool/settings.svg"), tr("Settings"), this);
m_showDimensionsAction->setCheckable(true);
m_showDimensionsAction->setChecked(true);
connect(m_showDimensionsAction, &QAction::triggered, this, &DimensionsPlugin::onShowDimensionsTriggered);
connect(m_clearDimensionsAction, &QAction::triggered, this, &DimensionsPlugin::onClearDimensionsTriggered);
connect(m_settingsAction, &QAction::triggered, this, &DimensionsPlugin::onSettingsTriggered);
m_lengthUnit = DimensionUnit::getLengthUnits().front();
m_areaUnit = DimensionUnit::getAreaUnits().front();
m_angleUnit = DimensionUnit::getAngleUnits().front();
m_widget->getDrawWidgetProxy()->registerDrawInterface(this);
updateActions();
}
void DimensionsPlugin::setDocument(const pdf::PDFModifiedDocument& document)
{
BaseClass::setDocument(document);
if (document.hasReset())
{
m_dimensions.clear();
updateActions();
}
}
std::vector<QAction*> DimensionsPlugin::getActions() const
{
std::vector<QAction*> result;
for (DimensionTool* tool : m_dimensionTools)
{
if (tool)
{
result.push_back(tool->getAction());
}
}
if (!result.empty())
{
result.push_back(nullptr);
result.push_back(m_showDimensionsAction);
result.push_back(m_clearDimensionsAction);
result.push_back(m_settingsAction);
}
return result;
}
void DimensionsPlugin::drawPage(QPainter* painter,
pdf::PDFInteger pageIndex,
const pdf::PDFPrecompiledPage* compiledPage,
pdf::PDFTextLayoutGetter& layoutGetter,
const QTransform& pagePointToDevicePointMatrix,
QList<pdf::PDFRenderError>& errors) const
{
Q_UNUSED(compiledPage);
Q_UNUSED(layoutGetter);
Q_UNUSED(errors);
if (!m_showDimensionsAction || !m_showDimensionsAction->isChecked() || m_dimensions.empty())
{
// Nothing to draw
return;
}
QLocale locale;
painter->setRenderHint(QPainter::Antialiasing, true);
for (const Dimension& dimension : m_dimensions)
{
if (pageIndex != dimension.getPageIndex())
{
continue;
}
switch (dimension.getType())
{
case Dimension::Linear:
{
QPointF p1 = pagePointToDevicePointMatrix.map(dimension.getPolygon().front());
QPointF p2 = pagePointToDevicePointMatrix.map(dimension.getPolygon().back());
// Swap so p1 is to the left of the page, before p2 (for correct determination of angle)
if (p1.x() > p2.x())
{
qSwap(p1, p2);
}
QLineF line(p1, p2);
if (qFuzzyIsNull(line.length()))
{
// If we have zero line, then do nothing
continue;
}
QLineF unitVectorLine = line.normalVector().unitVector();
QPointF unitVector = unitVectorLine.p2() - unitVectorLine.p1();
qreal extensionLineSize = pdf::PDFWidgetUtils::scaleDPI_y(painter->device(), 5);
painter->setPen(Qt::black);
painter->drawLine(line);
QLineF extensionLineLeft(p1 - unitVector * extensionLineSize, p1 + unitVector * extensionLineSize);
QLineF extensionLineRight(p2 - unitVector * extensionLineSize, p2 + unitVector * extensionLineSize);
painter->drawLine(extensionLineLeft);
painter->drawLine(extensionLineRight);
QPointF textPoint = line.center();
qreal angle = line.angle();
QFontMetricsF fontMetrics(painter->font());
QRectF textRect(-line.length() * 0.5, -fontMetrics.lineSpacing(), line.length(), fontMetrics.lineSpacing());
QString text = QString("%1 %2").arg(locale.toString(dimension.getMeasuredValue() * m_lengthUnit.scale, 'f', 2), m_lengthUnit.symbol);
painter->save();
painter->translate(textPoint);
painter->rotate(-angle);
painter->drawText(textRect, Qt::AlignCenter | Qt::TextDontClip, text);
painter->restore();
break;
}
case Dimension::Perimeter:
case Dimension::Area:
{
const bool isArea = dimension.getType() == Dimension::Type::Area;
const std::vector<QPointF>& polygon = dimension.getPolygon();
qreal lineSize = pdf::PDFWidgetUtils::scaleDPI_x(painter->device(), 1);
qreal pointSize = pdf::PDFWidgetUtils::scaleDPI_x(painter->device(), 5);
painter->save();
QPen pen(Qt::black);
pen.setWidthF(lineSize);
pen.setCosmetic(true);
QColor brushColor = Qt::black;
brushColor.setAlphaF(0.1f);
painter->setPen(qMove(pen));
painter->setBrush(QBrush(brushColor, isArea ? Qt::SolidPattern : Qt::DiagCrossPattern));
painter->setTransform(QTransform(pagePointToDevicePointMatrix), true);
painter->drawPolygon(polygon.data(), int(polygon.size()), Qt::OddEvenFill);
painter->restore();
QPen penPoint(Qt::black);
penPoint.setCapStyle(Qt::RoundCap);
penPoint.setWidthF(pointSize);
painter->setPen(penPoint);
QPointF centerPoint(0, 0);
for (const QPointF& point : polygon)
{
QPointF mappedPoint = pagePointToDevicePointMatrix.map(point);
centerPoint += mappedPoint;
painter->drawPoint(mappedPoint);
}
centerPoint *= 1.0 / qreal(polygon.size());
QString text;
if (isArea)
{
text = tr("A = %1 %2").arg(locale.toString(dimension.getMeasuredValue() * m_areaUnit.scale, 'f', 2), m_areaUnit.symbol);
}
else
{
text = tr("p = %1 %2").arg(locale.toString(dimension.getMeasuredValue() * m_lengthUnit.scale, 'f', 2), m_lengthUnit.symbol);
}
painter->drawText(centerPoint, text);
break;
}
case Dimension::Angular:
{
const std::vector<QPointF>& polygon = dimension.getPolygon();
QLineF line1(pagePointToDevicePointMatrix.map(polygon[1]), pagePointToDevicePointMatrix.map(polygon.front()));
QLineF line2(pagePointToDevicePointMatrix.map(polygon[1]), pagePointToDevicePointMatrix.map(polygon.back()));
qreal lineSize = pdf::PDFWidgetUtils::scaleDPI_x(painter->device(), 1);
qreal pointSize = pdf::PDFWidgetUtils::scaleDPI_x(painter->device(), 5);
qreal maxLength = qMax(line1.length(), line2.length());
line1.setLength(maxLength);
line2.setLength(maxLength);
QPen pen(Qt::black);
pen.setWidthF(lineSize);
painter->setPen(qMove(pen));
painter->drawLine(line1);
painter->drawLine(line2);
qreal startAngle = line1.angle() * 16;
qreal angleLength = dimension.getMeasuredValue() * 16;
QRectF rect(-maxLength * 0.5, -maxLength * 0.5, maxLength, maxLength);
rect.translate(line1.p1());
painter->drawArc(rect, startAngle - angleLength, angleLength);
QPen penPoint(Qt::black);
penPoint.setCapStyle(Qt::RoundCap);
penPoint.setWidthF(pointSize);
painter->setPen(penPoint);
painter->drawPoint(line1.p1());
painter->drawPoint(line1.p2());
painter->drawPoint(line2.p2());
QTransform textMatrix;
textMatrix.translate(line1.x1(), line1.y1());
textMatrix.rotate(-line1.angle() + dimension.getMeasuredValue() * 0.5);
QPointF textPoint = textMatrix.map(QPointF(maxLength * 0.25, 0.0));
QString text = QString("%1 %2").arg(locale.toString(dimension.getMeasuredValue() * m_angleUnit.scale, 'f', 2), m_angleUnit.symbol);
painter->drawText(textPoint, text);
break;
}
default:
Q_ASSERT(false);
break;
}
}
}
void DimensionsPlugin::onShowDimensionsTriggered()
{
updateGraphics();
}
void DimensionsPlugin::onClearDimensionsTriggered()
{
m_dimensions.clear();
updateActions();
updateGraphics();
}
void DimensionsPlugin::onSettingsTriggered()
{
SettingsDialog dialog(m_widget, m_lengthUnit, m_areaUnit, m_angleUnit);
dialog.exec();
updateGraphics();
}
void DimensionsPlugin::onDimensionCreated(Dimension dimension)
{
m_dimensions.emplace_back(qMove(dimension));
updateActions();
updateGraphics();
}
void DimensionsPlugin::updateActions()
{
if (m_showDimensionsAction)
{
m_showDimensionsAction->setEnabled(!m_dimensions.empty());
}
if (m_clearDimensionsAction)
{
m_clearDimensionsAction->setEnabled(!m_dimensions.empty());
}
}
void DimensionsPlugin::updateGraphics()
{
if (m_widget)
{
m_widget->getDrawWidget()->getWidget()->update();
}
}
}

View File

@@ -0,0 +1,73 @@
// Copyright (C) 2020-2021 Jakub Melka
//
// This file is part of PDF4QT.
//
// PDF4QT is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// with the written consent of the copyright owner, any later version.
//
// PDF4QT is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with PDF4QT. If not, see <https://www.gnu.org/licenses/>.
#ifndef DIMENSIONSPLUGIN_H
#define DIMENSIONSPLUGIN_H
#include "pdfplugin.h"
#include "dimensiontool.h"
#include <QObject>
namespace pdfplugin
{
class DimensionsPlugin : public pdf::PDFPlugin, public pdf::IDocumentDrawInterface
{
Q_OBJECT
Q_PLUGIN_METADATA(IID "PDF4QT.DimensionsPlugin" FILE "DimensionsPlugin.json")
private:
using BaseClass = pdf::PDFPlugin;
public:
DimensionsPlugin();
virtual void setWidget(pdf::PDFWidget* widget) override;
virtual void setDocument(const pdf::PDFModifiedDocument& document) override;
virtual std::vector<QAction*> getActions() const override;
virtual void drawPage(QPainter* painter,
pdf::PDFInteger pageIndex,
const pdf::PDFPrecompiledPage* compiledPage,
pdf::PDFTextLayoutGetter& layoutGetter,
const QTransform& pagePointToDevicePointMatrix,
QList<pdf::PDFRenderError>& errors) const override;
private:
void onShowDimensionsTriggered();
void onClearDimensionsTriggered();
void onSettingsTriggered();
void onDimensionCreated(Dimension dimension);
void updateActions();
void updateGraphics();
std::array<DimensionTool*, DimensionTool::LastStyle> m_dimensionTools;
std::vector<Dimension> m_dimensions;
QAction* m_showDimensionsAction;
QAction* m_clearDimensionsAction;
QAction* m_settingsAction;
DimensionUnit m_lengthUnit;
DimensionUnit m_areaUnit;
DimensionUnit m_angleUnit;
};
} // namespace pdfplugin
#endif // DIMENSIONSPLUGIN_H

View File

@@ -0,0 +1,309 @@
// Copyright (C) 2020-2021 Jakub Melka
//
// This file is part of PDF4QT.
//
// PDF4QT is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// with the written consent of the copyright owner, any later version.
//
// PDF4QT is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with PDF4QT. If not, see <https://www.gnu.org/licenses/>.
#include "dimensiontool.h"
#include "pdfwidgetutils.h"
#include "pdfdrawwidget.h"
#include <QPainter>
DimensionTool::DimensionTool(Style style, pdf::PDFDrawWidgetProxy* proxy, QAction* action, QObject* parent) :
BaseClass(proxy, action, parent),
m_style(style),
m_previewPointPixelSize(0),
m_pickTool(nullptr)
{
const bool isRectanglePicking = style == RectanglePerimeter || style == RectangleArea;
const pdf::PDFPickTool::Mode pickingMode = isRectanglePicking ? pdf::PDFPickTool::Mode::Rectangles : pdf::PDFPickTool::Mode::Points;
m_pickTool = new pdf::PDFPickTool(proxy, pickingMode, this);
addTool(m_pickTool);
connect(m_pickTool, &pdf::PDFPickTool::pointPicked, this, &DimensionTool::onPointPicked);
connect(m_pickTool, &pdf::PDFPickTool::rectanglePicked, this, &DimensionTool::onRectanglePicked);
m_previewPointPixelSize = pdf::PDFWidgetUtils::scaleDPI_x(proxy->getWidget(), 5);
}
void DimensionTool::drawPage(QPainter* painter,
pdf::PDFInteger pageIndex,
const pdf::PDFPrecompiledPage* compiledPage,
pdf::PDFTextLayoutGetter& layoutGetter,
const QTransform& pagePointToDevicePointMatrix,
QList<pdf::PDFRenderError>& errors) const
{
Q_UNUSED(compiledPage);
Q_UNUSED(layoutGetter);
Q_UNUSED(errors);
if (m_pickTool->getPageIndex() != pageIndex)
{
// Other page, nothing to draw
return;
}
if (m_style == RectanglePerimeter || m_style == RectangleArea)
{
// Nothing to draw, picking tool is already drawing picked rectangle
return;
}
painter->setPen(Qt::black);
const std::vector<QPointF>& points = m_pickTool->getPickedPoints();
for (size_t i = 1; i < points.size(); ++i)
{
painter->drawLine(pagePointToDevicePointMatrix.map(points[i - 1]), pagePointToDevicePointMatrix.map(points[i]));
}
if (!points.empty())
{
QTransform inverted = pagePointToDevicePointMatrix.inverted();
QPointF adjustedPoint = adjustPagePoint(inverted.map(m_pickTool->getSnappedPoint()));
painter->drawLine(pagePointToDevicePointMatrix.map(points.back()), pagePointToDevicePointMatrix.map(adjustedPoint));
}
QPen pen = painter->pen();
pen.setWidth(m_previewPointPixelSize);
pen.setCapStyle(Qt::RoundCap);
painter->setPen(pen);
for (size_t i = 0; i < points.size(); ++i)
{
painter->drawPoint(pagePointToDevicePointMatrix.map(points[i]));
}
}
void DimensionTool::onPointPicked(pdf::PDFInteger pageIndex, QPointF pagePoint)
{
Q_UNUSED(pagePoint);
if (Dimension::isComplete(getDimensionType(), m_pickTool->getPickedPoints()))
{
// Create a new dimension...
std::vector<QPointF> points = m_pickTool->getPickedPoints();
for (QPointF& point : points)
{
point = adjustPagePoint(point);
}
pdf::PDFReal measuredValue = getMeasuredValue(pageIndex, points);
Q_EMIT dimensionCreated(Dimension(getDimensionType(), pageIndex, measuredValue, qMove(points)));
m_pickTool->resetTool();
}
if ((m_style == Perimeter || m_style == Area) && m_pickTool->getPickedPoints().size() == 1)
{
m_pickTool->setCustomSnapPoints(pageIndex, m_pickTool->getPickedPoints());
}
}
void DimensionTool::onRectanglePicked(pdf::PDFInteger pageIndex, QRectF pageRectangle)
{
if (pageRectangle.isEmpty())
{
return;
}
std::vector<QPointF> points = { pageRectangle.topLeft(), pageRectangle.topRight(), pageRectangle.bottomRight(), pageRectangle.bottomLeft(), pageRectangle.topLeft() };
Q_ASSERT(Dimension::isComplete(getDimensionType(), points));
pdf::PDFReal measuredValue = getMeasuredValue(pageIndex, points);
Q_EMIT dimensionCreated(Dimension(getDimensionType(), pageIndex, measuredValue, qMove(points)));
}
QPointF DimensionTool::adjustPagePoint(QPointF pagePoint) const
{
switch (m_style)
{
case Style::LinearHorizontal:
{
const std::vector<QPointF>& pickedPoints = m_pickTool->getPickedPoints();
if (!pickedPoints.empty())
{
const pdf::PDFPage* page = getDocument()->getCatalog()->getPage(m_pickTool->getPageIndex());
const bool rotated = page->getPageRotation() == pdf::PageRotation::Rotate90 || page->getPageRotation() == pdf::PageRotation::Rotate270;
if (rotated)
{
pagePoint.setX(pickedPoints.front().x());
}
else
{
pagePoint.setY(pickedPoints.front().y());
}
}
break;
}
case Style::LinearVertical:
{
const std::vector<QPointF>& pickedPoints = m_pickTool->getPickedPoints();
if (!pickedPoints.empty())
{
const pdf::PDFPage* page = getDocument()->getCatalog()->getPage(m_pickTool->getPageIndex());
const bool rotated = page->getPageRotation() == pdf::PageRotation::Rotate90 || page->getPageRotation() == pdf::PageRotation::Rotate270;
if (!rotated)
{
pagePoint.setX(pickedPoints.front().x());
}
else
{
pagePoint.setY(pickedPoints.front().y());
}
}
break;
}
default:
break;
}
return pagePoint;
}
Dimension::Type DimensionTool::getDimensionType() const
{
switch (m_style)
{
case DimensionTool::LinearHorizontal:
case DimensionTool::LinearVertical:
case DimensionTool::Linear:
return Dimension::Type::Linear;
case DimensionTool::Perimeter:
case DimensionTool::RectanglePerimeter:
return Dimension::Type::Perimeter;
case DimensionTool::Area:
case DimensionTool::RectangleArea:
return Dimension::Type::Area;
case DimensionTool::Angle:
return Dimension::Type::Angular;
}
Q_ASSERT(false);
return Dimension::Type::Linear;
}
pdf::PDFReal DimensionTool::getMeasuredValue(pdf::PDFInteger pageIndex, const std::vector<QPointF>& pickedPoints) const
{
const pdf::PDFPage* page = getDocument()->getCatalog()->getPage(pageIndex);
Q_ASSERT(page);
switch (getDimensionType())
{
case Dimension::Linear:
case Dimension::Perimeter:
{
pdf::PDFReal length = 0.0;
for (size_t i = 1; i < pickedPoints.size(); ++i)
{
QPointF vector = pickedPoints[i] - pickedPoints[i - 1];
length += qSqrt(QPointF::dotProduct(vector, vector));
}
return length * page->getUserUnit();
}
case Dimension::Area:
{
pdf::PDFReal area = 0.0;
// We calculate the area using standard formula for polygons.
// We determine integral over perimeter (for each edge of the polygon).
for (size_t i = 1; i < pickedPoints.size(); ++i)
{
const QPointF& p1 = pickedPoints[i - 1];
const QPointF& p2 = pickedPoints[i];
area += p1.x() * p2.y() - p1.y() * p2.x();
}
area = qAbs(area) * 0.5;
return area * page->getUserUnit() * page->getUserUnit();
}
case Dimension::Angular:
{
Q_ASSERT(pickedPoints.size() == 3);
QLineF line1(pickedPoints[1], pickedPoints.front());
QLineF line2(pickedPoints[1], pickedPoints.back());
return line1.angleTo(line2);
}
default:
Q_ASSERT(false);
break;
}
return 0.0;
}
bool Dimension::isComplete(Type type, const std::vector<QPointF>& polygon)
{
switch (type)
{
case Dimension::Linear:
return polygon.size() == 2;
case Dimension::Perimeter:
case Dimension::Area:
return polygon.size() > 2 && polygon.front() == polygon.back();
case Dimension::Angular:
return polygon.size() == 3;
default:
Q_ASSERT(false);
break;
}
return false;
}
DimensionUnits DimensionUnit::getLengthUnits()
{
DimensionUnits units;
units.emplace_back(1.0, DimensionTool::tr("pt"));
units.emplace_back(pdf::PDF_POINT_TO_INCH, DimensionTool::tr("in"));
units.emplace_back(pdf::PDF_POINT_TO_MM, DimensionTool::tr("mm"));
units.emplace_back(pdf::PDF_POINT_TO_MM * 0.1, DimensionTool::tr("cm"));
return units;
}
DimensionUnits DimensionUnit::getAreaUnits()
{
DimensionUnits units;
units.emplace_back(1.0, DimensionTool::tr("sq. pt"));
units.emplace_back(pdf::PDF_POINT_TO_INCH * pdf::PDF_POINT_TO_INCH, DimensionTool::tr("sq. in"));
units.emplace_back(pdf::PDF_POINT_TO_MM * pdf::PDF_POINT_TO_MM, DimensionTool::tr("sq. mm"));
units.emplace_back(pdf::PDF_POINT_TO_MM * 0.1 * pdf::PDF_POINT_TO_MM * 0.1, DimensionTool::tr("sq. cm"));
return units;
}
DimensionUnits DimensionUnit::getAngleUnits()
{
DimensionUnits units;
units.emplace_back(1.0, DimensionTool::tr("°"));
units.emplace_back(qDegreesToRadians(1.0), DimensionTool::tr("rad"));
return units;
}

View File

@@ -0,0 +1,132 @@
// Copyright (C) 2020-2021 Jakub Melka
//
// This file is part of PDF4QT.
//
// PDF4QT is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// with the written consent of the copyright owner, any later version.
//
// PDF4QT is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with PDF4QT. If not, see <https://www.gnu.org/licenses/>.
#ifndef DIMENSIONTOOL_H
#define DIMENSIONTOOL_H
#include "pdfwidgettool.h"
#include <QAction>
#include <QPolygonF>
struct DimensionUnit;
using DimensionUnits = std::vector<DimensionUnit>;
struct DimensionUnit
{
explicit inline DimensionUnit() = default;
explicit inline DimensionUnit(pdf::PDFReal scale, QString symbol) :
scale(scale),
symbol(qMove(symbol))
{
}
pdf::PDFReal scale = 1.0;
QString symbol;
static DimensionUnits getLengthUnits();
static DimensionUnits getAreaUnits();
static DimensionUnits getAngleUnits();
};
class Dimension
{
public:
enum Type
{
Linear,
Perimeter,
Area,
Angular
};
inline explicit Dimension() = default;
inline explicit Dimension(Type type, pdf::PDFInteger pageIndex, pdf::PDFReal measuredValue, std::vector<QPointF> polygon) :
m_type(type),
m_pageIndex(pageIndex),
m_measuredValue(measuredValue),
m_polygon(qMove(polygon))
{
}
Type getType() const { return m_type; }
pdf::PDFInteger getPageIndex() const { return m_pageIndex; }
pdf::PDFReal getMeasuredValue() const { return m_measuredValue; }
const std::vector<QPointF>& getPolygon() const { return m_polygon; }
/// Returns true, if definition fo given type is complete
static bool isComplete(Type type, const std::vector<QPointF>& polygon);
private:
Type m_type = Linear;
pdf::PDFInteger m_pageIndex = -1;
pdf::PDFReal m_measuredValue = 0.0;
std::vector<QPointF> m_polygon;
};
class DimensionTool : public pdf::PDFWidgetTool
{
Q_OBJECT
private:
using BaseClass = pdf::PDFWidgetTool;
public:
enum Style
{
LinearHorizontal,
LinearVertical,
Linear,
Perimeter,
RectanglePerimeter,
Area,
RectangleArea,
Angle,
LastStyle
};
explicit DimensionTool(Style style, pdf::PDFDrawWidgetProxy* proxy, QAction* action, QObject* parent);
void drawPage(QPainter* painter,
pdf::PDFInteger pageIndex,
const pdf::PDFPrecompiledPage* compiledPage,
pdf::PDFTextLayoutGetter& layoutGetter,
const QTransform& pagePointToDevicePointMatrix,
QList<pdf::PDFRenderError>& errors) const override;
signals:
void dimensionCreated(Dimension dimension);
private:
void onPointPicked(pdf::PDFInteger pageIndex, QPointF pagePoint);
void onRectanglePicked(pdf::PDFInteger pageIndex, QRectF pageRectangle);
QPointF adjustPagePoint(QPointF pagePoint) const;
Dimension::Type getDimensionType() const;
pdf::PDFReal getMeasuredValue(pdf::PDFInteger pageIndex, const std::vector<QPointF>& pickedPoints) const;
Style m_style;
int m_previewPointPixelSize;
pdf::PDFPickTool* m_pickTool;
};
#endif // DIMENSIONTOOL_H

View File

@@ -0,0 +1,15 @@
<RCC>
<qresource prefix="/pdfplugins/dimensiontool">
<file>area.svg</file>
<file>linear.svg</file>
<file>linear-horizontal.svg</file>
<file>linear-vertical.svg</file>
<file>perimeter.svg</file>
<file>clear-dimensions.svg</file>
<file>settings.svg</file>
<file>show-dimensions.svg</file>
<file>angle.svg</file>
<file>rectangle-area.svg</file>
<file>rectangle-perimeter.svg</file>
</qresource>
</RCC>

View File

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Vrstva_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="24px" height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
<g>
<g>
<rect x="20.604" y="6.987" fill="#292D32" width="1.391" height="10.025"/>
</g>
<circle fill="#292D32" cx="3.356" cy="12" r="1.351"/>
<path fill="#292D32" d="M19.561,11.768c-0.034-0.072-0.076-0.147-0.137-0.201L17.545,9.69c-0.242-0.249-0.639-0.249-0.882,0
c-0.244,0.24-0.244,0.635,0,0.878l0.786,0.778h-6.362H5.693v1.314h11.761l-0.779,0.78c-0.246,0.242-0.246,0.64,0,0.876
c0.119,0.125,0.279,0.183,0.439,0.183s0.313-0.058,0.436-0.183l1.878-1.881c0.06-0.051,0.109-0.117,0.137-0.196
c0.039-0.068,0.052-0.153,0.052-0.238C19.608,11.925,19.591,11.842,19.561,11.768z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Vrstva_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="24px" height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
<g>
<g>
<rect x="6.987" y="2.006" fill="#292D32" width="10.025" height="1.391"/>
</g>
<circle fill="#292D32" cx="12" cy="20.644" r="1.351"/>
<path fill="#292D32" d="M11.768,4.439c-0.072,0.034-0.147,0.076-0.201,0.137L9.69,6.455c-0.249,0.242-0.249,0.639,0,0.882
c0.24,0.244,0.635,0.244,0.878,0l0.778-0.786v6.362v5.394h1.314V6.546l0.78,0.779c0.242,0.246,0.64,0.246,0.876,0
C14.442,7.206,14.5,7.046,14.5,6.886s-0.058-0.313-0.183-0.436l-1.881-1.878c-0.051-0.06-0.117-0.109-0.196-0.137
c-0.068-0.039-0.153-0.052-0.238-0.052C11.925,4.392,11.842,4.409,11.768,4.439z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Vrstva_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="24px" height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
<g>
<rect x="20.256" y="13.168" fill="#292D32" width="1.055" height="7.6"/>
<g>
<path fill="#292D32" d="M19.465,16.791c-0.025-0.055-0.057-0.111-0.104-0.152l-1.424-1.422c-0.184-0.189-0.484-0.189-0.668,0
c-0.186,0.182-0.186,0.48,0,0.666l0.596,0.59H7.395V6.245l0.594,0.594c0.186,0.181,0.481,0.183,0.666,0s0.185-0.484,0-0.667
L7.232,4.745C7.188,4.703,7.134,4.666,7.08,4.644C7.022,4.62,6.959,4.605,6.899,4.605c-0.066,0-0.128,0.015-0.184,0.039
C6.657,4.666,6.607,4.703,6.566,4.745L5.141,6.171C5.05,6.263,5.004,6.381,5.004,6.504c0,0.122,0.046,0.242,0.138,0.334
c0.184,0.181,0.485,0.181,0.669,0l0.592-0.594v10.228H2.689v0.996h3.713v3.729H7.4v-3.729h10.469l-0.592,0.592
c-0.186,0.184-0.186,0.484,0,0.664c0.092,0.094,0.213,0.139,0.334,0.139s0.236-0.045,0.33-0.139l1.424-1.426
c0.045-0.039,0.082-0.09,0.104-0.148c0.029-0.053,0.039-0.117,0.039-0.182C19.502,16.91,19.488,16.848,19.465,16.791z"/>
</g>
<rect x="3.097" y="2.803" fill="#292D32" width="7.6" height="1.054"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Vrstva_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="24px" height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
<g>
<path fill="#292D32" d="M11.781,3.289c-0.541-0.55-1.09-1.11-1.65-1.65c-0.12-0.11-0.29-0.18-0.45-0.2
c-0.239-0.02-0.42,0.12-0.521,0.34c-0.109,0.25-0.039,0.47,0.141,0.65c0.21,0.23,0.449,0.43,0.68,0.65c0,0.01,0.07,0.05,0.07,0.07
v0.03H9.112c-0.75,0-1.601,0.48-1.98,1.12L5.5,7.019l-1.777,2.982l-0.002,0.003l-0.023,0.041c-0.037,0.067-0.09,0.217-0.039,0.467
c0.039,0.084,0.095,0.162,0.172,0.218l0.07,0.039c0.041,0.02,0.08,0.04,0.131,0.051c0.27,0.06,0.479-0.041,0.66-0.331
c0.139-0.23,0.289-0.46,0.439-0.7l2.939-4.92c0.061-0.1,0.141-0.19,0.25-0.27c0.23-0.19,0.541-0.32,0.791-0.32h0.909l-0.71,0.78
c0,0-0.136,0.166-0.175,0.381C9.134,5.579,9.168,5.716,9.282,5.829c0.229,0.24,0.569,0.24,0.84-0.02c0.05-0.05,0.1-0.1,0.149-0.15
c0.51-0.5,1.01-1,1.5-1.5C12.041,3.879,12.051,3.569,11.781,3.289z"/>
<path fill="#292D32" d="M12.162,20.712c0.541,0.549,1.091,1.109,1.65,1.648c0.12,0.11,0.29,0.181,0.45,0.201
c0.239,0.02,0.42-0.121,0.521-0.341c0.109-0.25,0.039-0.471-0.141-0.649c-0.21-0.23-0.449-0.431-0.68-0.65
c0-0.01-0.07-0.051-0.07-0.07v-0.029h0.939c0.75,0,1.601-0.479,1.979-1.119l1.632-2.721L20.22,14c0,0,0.002-0.003,0.002-0.005
l0.022-0.039c0.037-0.067,0.092-0.219,0.039-0.469c-0.039-0.084-0.094-0.16-0.172-0.217l-0.07-0.039
c-0.041-0.02-0.079-0.039-0.131-0.051c-0.27-0.061-0.479,0.041-0.66,0.33c-0.139,0.23-0.288,0.461-0.438,0.701l-2.938,4.92
c-0.062,0.1-0.141,0.189-0.25,0.27c-0.23,0.189-0.541,0.32-0.791,0.32h-0.909l0.71-0.779c0,0,0.137-0.166,0.175-0.381
c0.002-0.141-0.032-0.277-0.146-0.391c-0.229-0.24-0.569-0.24-0.84,0.021c-0.051,0.049-0.101,0.1-0.149,0.148
c-0.511,0.5-1.011,1-1.5,1.5C11.904,20.12,11.894,20.431,12.162,20.712z"/>
<path fill="#292D32" d="M21.893,8.519c-0.07-0.23-0.25-0.36-0.5-0.38c-0.271-0.02-0.449,0.12-0.561,0.34
c-0.15,0.28-0.271,0.57-0.4,0.86c0,0,0,0.01-0.01,0.01l-1.391-2.33l-1.629-2.72c-0.011-0.01-0.011-0.02-0.021-0.03
c-0.381-0.61-1.189-1.07-1.92-1.09h-0.04l-1.16,0.01h-0.05c0,0-0.489,0.006-0.52,0.46v0.08c0.01,0.05,0.01,0.09,0.028,0.14
c0.091,0.26,0.28,0.39,0.62,0.4c0.271,0,0.551,0.01,0.83,0.01h0.25c0.25,0,0.561,0.13,0.789,0.32c0.111,0.08,0.191,0.17,0.25,0.27
l2.91,4.87l-0.06,0.02l-0.971-0.42c0,0-0.199-0.07-0.421-0.04c-0.129,0.04-0.239,0.12-0.318,0.26c-0.15,0.3-0.04,0.62,0.29,0.79
c0.069,0.03,0.13,0.06,0.188,0.09c0.641,0.33,1.281,0.64,1.91,0.94c0.351,0.159,0.641,0.08,0.82-0.271
c0.35-0.689,0.699-1.39,1.029-2.1C21.912,8.869,21.922,8.679,21.893,8.519z"/>
<path fill="#292D32" d="M2.108,15.543c0.073,0.228,0.253,0.354,0.503,0.373c0.271,0.019,0.448-0.123,0.559-0.345
c0.146-0.281,0.264-0.574,0.392-0.861c0,0,0-0.01,0.011-0.012l1.408,2.317l1.653,2.705c0.01,0.013,0.01,0.022,0.021,0.032
c0.385,0.605,1.198,1.059,1.928,1.072l0.041-0.002l1.16-0.02h0.051c0,0,0.488-0.012,0.517-0.464l-0.002-0.08
c-0.01-0.05-0.009-0.09-0.028-0.142c-0.095-0.258-0.285-0.387-0.625-0.394c-0.271,0.003-0.552-0.006-0.83-0.004l-0.25,0.002
c-0.25,0.003-0.563-0.124-0.793-0.312c-0.111-0.08-0.192-0.17-0.252-0.271L4.62,14.296l0.06-0.021l0.974,0.412
c0,0,0.2,0.067,0.42,0.037c0.129-0.041,0.239-0.123,0.317-0.263c0.147-0.302,0.035-0.62-0.297-0.787
c-0.069-0.03-0.131-0.062-0.19-0.089c-0.642-0.324-1.285-0.631-1.916-0.924c-0.353-0.157-0.642-0.076-0.818,0.277
c-0.346,0.691-0.688,1.395-1.012,2.105C2.086,15.192,2.078,15.381,2.108,15.543z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.7 KiB

View File

@@ -0,0 +1,76 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Vrstva_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="24px" height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
<g>
<path fill-rule="evenodd" clip-rule="evenodd" fill="#292D32" d="M20.93,10.003c-0.024-0.015-0.048-0.028-0.072-0.043
c0-0.087,0-0.174,0-0.262c0-1.56,0.009-3.119-0.008-4.679c-0.004-0.301-0.053-0.624-0.173-0.896
c-0.315-0.713-0.925-0.983-1.678-0.982c-1.714,0.001-3.428,0-5.143,0.001c-0.088,0-0.177,0.003-0.264,0.019
c-0.312,0.059-0.509,0.373-0.43,0.681c0.073,0.289,0.28,0.437,0.63,0.437c1.729,0.002,3.457,0,5.186,0.001
c0.538,0,0.741,0.206,0.741,0.75c0.001,1.581,0.001,3.163,0,4.745c0,0.069-0.007,0.139-0.011,0.21
c-0.028-0.006-0.037-0.004-0.041-0.008c-0.222-0.216-0.438-0.435-0.663-0.646c-0.272-0.256-0.597-0.257-0.848-0.013
c-0.216,0.21-0.216,0.563,0.026,0.813c0.555,0.568,1.116,1.131,1.685,1.686c0.266,0.258,0.58,0.251,0.845-0.009
c0.558-0.545,1.112-1.094,1.655-1.652c0.1-0.104,0.17-0.262,0.196-0.404c0.044-0.235-0.098-0.443-0.318-0.552
c-0.253-0.123-0.479-0.061-0.668,0.122C21.354,9.539,21.146,9.775,20.93,10.003z M14.029,19.717
c-0.01-0.019-0.021-0.036-0.032-0.054c0.22-0.215,0.44-0.427,0.656-0.646c0.216-0.221,0.263-0.45,0.151-0.682
c-0.188-0.394-0.632-0.457-0.969-0.126c-0.546,0.536-1.086,1.078-1.623,1.623c-0.293,0.297-0.287,0.612,0.008,0.908
c0.487,0.491,0.978,0.979,1.467,1.468c0.078,0.077,0.154,0.159,0.24,0.228c0.236,0.187,0.535,0.178,0.746-0.015
c0.217-0.198,0.257-0.516,0.069-0.76c-0.135-0.173-0.301-0.321-0.453-0.479c-0.093-0.096-0.187-0.189-0.323-0.329
c0.158,0,0.246,0,0.334,0c1.559,0,3.118,0,4.677,0.001c0.438,0.001,0.848-0.08,1.203-0.351c0.499-0.381,0.678-0.902,0.678-1.508
c-0.002-1.714,0-3.428-0.002-5.142c0-0.096,0.017-0.21-0.028-0.282c-0.089-0.141-0.19-0.312-0.33-0.375
c-0.402-0.181-0.775,0.104-0.776,0.57c-0.004,1.736-0.001,3.473-0.002,5.209c0,0.537-0.206,0.74-0.751,0.74
c-1.573,0.001-3.147,0.001-4.722,0.001C14.175,19.717,14.103,19.717,14.029,19.717z M4.283,14.022
c0.022-0.012,0.043-0.023,0.065-0.035c0.213,0.223,0.423,0.448,0.641,0.666c0.152,0.153,0.334,0.242,0.558,0.188
c0.483-0.117,0.61-0.637,0.24-1.014c-0.521-0.53-1.049-1.053-1.575-1.578c-0.345-0.343-0.642-0.341-0.99,0.004
c-0.512,0.508-1.023,1.017-1.532,1.526c-0.072,0.072-0.141,0.153-0.189,0.241c-0.15,0.271-0.057,0.589,0.207,0.747
c0.25,0.151,0.503,0.118,0.742-0.115c0.218-0.212,0.425-0.437,0.637-0.657c0.021,0.011,0.041,0.021,0.062,0.032
c0,0.085,0,0.17,0,0.254c0,1.56-0.009,3.119,0.007,4.678c0.004,0.309,0.054,0.64,0.177,0.918c0.316,0.714,0.929,0.978,1.681,0.977
c1.706-0.001,3.412,0,5.119-0.001c0.088,0,0.178-0.002,0.264-0.017c0.345-0.06,0.543-0.399,0.43-0.732
c-0.089-0.263-0.282-0.387-0.621-0.387c-1.729-0.001-3.457,0-5.186-0.001c-0.525,0-0.734-0.209-0.734-0.735
c0-1.589,0-3.178,0-4.767C4.283,14.149,4.283,14.086,4.283,14.022z M10.009,3.068C9.993,3.093,9.979,3.116,9.965,3.141
c-0.088,0-0.176,0-0.263,0c-1.56,0-3.118,0.002-4.678-0.001C4.58,3.139,4.161,3.223,3.804,3.504C3.322,3.884,3.144,4.4,3.145,4.999
c0.003,1.714,0,3.428,0.002,5.142c0,0.088,0.004,0.177,0.019,0.264c0.038,0.215,0.168,0.354,0.376,0.416
c0.404,0.124,0.739-0.151,0.739-0.615c0.002-1.722,0.001-3.442,0.001-5.164c0-0.567,0.198-0.763,0.773-0.763c1.566,0,3.132,0,4.7,0
c0.076,0,0.152,0,0.229,0c-0.198,0.268-0.42,0.479-0.634,0.699c-0.267,0.273-0.279,0.6-0.044,0.846
c0.231,0.241,0.574,0.241,0.844-0.022c0.557-0.546,1.108-1.098,1.653-1.654c0.27-0.273,0.271-0.59,0.007-0.862
c-0.544-0.558-1.092-1.113-1.653-1.653C10.045,1.523,9.865,1.45,9.71,1.433C9.469,1.406,9.294,1.551,9.193,1.773
C9.082,2.02,9.15,2.239,9.326,2.42C9.544,2.645,9.78,2.853,10.009,3.068z"/>
<path fill-rule="evenodd" clip-rule="evenodd" fill="#292D32" d="M20.93,10.003c0.216-0.228,0.424-0.464,0.648-0.683
c0.188-0.183,0.415-0.245,0.668-0.122c0.221,0.108,0.362,0.316,0.318,0.552c-0.026,0.143-0.097,0.301-0.196,0.404
c-0.543,0.559-1.098,1.107-1.655,1.652c-0.265,0.26-0.579,0.267-0.845,0.009c-0.568-0.555-1.13-1.117-1.685-1.686
c-0.242-0.249-0.242-0.603-0.026-0.813c0.251-0.244,0.575-0.243,0.848,0.013c0.225,0.211,0.441,0.43,0.663,0.646
c0.004,0.004,0.013,0.002,0.041,0.008c0.004-0.071,0.011-0.141,0.011-0.21c0.001-1.582,0.001-3.164,0-4.745
c0-0.544-0.203-0.75-0.741-0.75c-1.729-0.001-3.457,0.001-5.186-0.001c-0.35,0-0.557-0.147-0.63-0.437
c-0.079-0.308,0.118-0.622,0.43-0.681c0.087-0.016,0.176-0.019,0.264-0.019c1.715-0.001,3.429,0,5.143-0.001
c0.753-0.001,1.362,0.27,1.678,0.982c0.12,0.272,0.169,0.596,0.173,0.896c0.017,1.56,0.008,3.119,0.008,4.679
c0,0.088,0,0.175,0,0.262C20.882,9.975,20.905,9.988,20.93,10.003z"/>
<path fill-rule="evenodd" clip-rule="evenodd" fill="#292D32" d="M14.029,19.717c0.073,0,0.146,0,0.218,0
c1.574,0,3.148,0,4.722-0.001c0.545,0,0.751-0.203,0.751-0.74c0.001-1.736-0.002-3.473,0.002-5.209
c0.001-0.467,0.374-0.751,0.776-0.57c0.14,0.063,0.241,0.234,0.33,0.375c0.045,0.072,0.028,0.187,0.028,0.282
c0.002,1.714,0,3.428,0.002,5.142c0,0.605-0.179,1.127-0.678,1.508c-0.355,0.271-0.766,0.352-1.203,0.351
c-1.559-0.001-3.118-0.001-4.677-0.001c-0.088,0-0.176,0-0.334,0c0.137,0.14,0.23,0.233,0.323,0.329
c0.152,0.158,0.318,0.307,0.453,0.479c0.188,0.244,0.147,0.562-0.069,0.76c-0.211,0.192-0.51,0.201-0.746,0.015
c-0.086-0.068-0.162-0.15-0.24-0.228c-0.489-0.489-0.979-0.977-1.467-1.468c-0.295-0.296-0.301-0.611-0.008-0.908
c0.537-0.545,1.077-1.087,1.623-1.623c0.337-0.331,0.78-0.268,0.969,0.126c0.111,0.231,0.064,0.461-0.151,0.682
c-0.216,0.22-0.437,0.432-0.656,0.646C14.009,19.681,14.02,19.698,14.029,19.717z"/>
<path fill-rule="evenodd" clip-rule="evenodd" fill="#292D32" d="M4.283,14.022c0,0.063,0,0.127,0,0.191c0,1.589,0,3.178,0,4.767
c0,0.526,0.209,0.735,0.734,0.735c1.729,0.001,3.457,0,5.186,0.001c0.339,0,0.532,0.124,0.621,0.387
c0.113,0.333-0.085,0.673-0.43,0.732c-0.086,0.015-0.176,0.017-0.264,0.017c-1.707,0.001-3.413,0-5.119,0.001
c-0.752,0.001-1.365-0.263-1.681-0.977c-0.124-0.278-0.173-0.609-0.177-0.918c-0.017-1.559-0.007-3.118-0.007-4.678
c0-0.084,0-0.169,0-0.254c-0.021-0.011-0.041-0.021-0.062-0.032c-0.212,0.221-0.418,0.445-0.637,0.657
c-0.239,0.233-0.492,0.267-0.742,0.115C1.442,14.609,1.35,14.291,1.5,14.021c0.049-0.088,0.117-0.169,0.189-0.241
c0.508-0.51,1.02-1.019,1.532-1.526c0.348-0.345,0.645-0.347,0.99-0.004c0.526,0.525,1.055,1.048,1.575,1.578
c0.37,0.377,0.244,0.896-0.24,1.014c-0.223,0.055-0.406-0.034-0.558-0.188c-0.218-0.218-0.427-0.443-0.641-0.666
C4.326,13.999,4.305,14.011,4.283,14.022z"/>
<path fill-rule="evenodd" clip-rule="evenodd" fill="#292D32" d="M10.009,3.068C9.78,2.853,9.544,2.645,9.326,2.42
C9.15,2.239,9.082,2.02,9.193,1.773C9.294,1.551,9.469,1.406,9.71,1.433c0.155,0.018,0.335,0.091,0.447,0.198
c0.562,0.54,1.109,1.096,1.653,1.653c0.265,0.272,0.263,0.589-0.007,0.862c-0.545,0.557-1.097,1.108-1.653,1.654
c-0.27,0.264-0.612,0.264-0.844,0.022C9.071,5.577,9.084,5.251,9.351,4.978c0.214-0.22,0.436-0.432,0.634-0.699
c-0.076,0-0.152,0-0.229,0c-1.567,0-3.134,0-4.7,0c-0.575,0-0.773,0.195-0.773,0.763c0,1.722,0.001,3.442-0.001,5.164
c0,0.464-0.335,0.739-0.739,0.615c-0.208-0.063-0.338-0.201-0.376-0.416c-0.015-0.087-0.019-0.176-0.019-0.264
C3.146,8.427,3.148,6.713,3.145,4.999C3.144,4.4,3.322,3.884,3.804,3.504C4.161,3.223,4.58,3.139,5.024,3.14
c1.56,0.003,3.118,0.001,4.678,0.001c0.087,0,0.175,0,0.263,0C9.979,3.116,9.993,3.093,10.009,3.068z"/>
</g>
<rect x="6.938" y="6.938" fill="#292D32" width="10.125" height="10.125"/>
</svg>

After

Width:  |  Height:  |  Size: 7.5 KiB

View File

@@ -0,0 +1,75 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Vrstva_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="24px" height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
<g>
<path fill-rule="evenodd" clip-rule="evenodd" fill="#292D32" d="M20.93,10.003c-0.024-0.014-0.048-0.028-0.072-0.042
c0-0.087,0-0.174,0-0.262c0-1.56,0.009-3.12-0.008-4.679c-0.004-0.301-0.053-0.625-0.173-0.896
c-0.315-0.713-0.925-0.983-1.678-0.982c-1.714,0-3.428,0-5.143,0c-0.088,0-0.177,0.003-0.264,0.019
c-0.312,0.059-0.509,0.373-0.43,0.68c0.073,0.29,0.28,0.437,0.63,0.437c1.729,0.002,3.457,0,5.186,0.001
c0.538,0,0.741,0.207,0.741,0.75c0.001,1.581,0.001,3.163,0,4.745c0,0.069-0.007,0.138-0.011,0.209
c-0.028-0.005-0.037-0.004-0.041-0.008c-0.222-0.215-0.438-0.435-0.663-0.646c-0.272-0.255-0.597-0.257-0.848-0.013
c-0.216,0.21-0.216,0.564,0.026,0.813c0.555,0.568,1.116,1.131,1.685,1.686c0.266,0.258,0.58,0.251,0.845-0.009
c0.558-0.545,1.112-1.094,1.655-1.653c0.1-0.104,0.17-0.261,0.196-0.404c0.044-0.235-0.098-0.443-0.318-0.551
c-0.253-0.124-0.479-0.061-0.668,0.122C21.354,9.539,21.146,9.775,20.93,10.003z M14.029,19.717
c-0.01-0.019-0.021-0.036-0.032-0.054c0.22-0.215,0.44-0.427,0.656-0.646c0.216-0.221,0.263-0.45,0.151-0.682
c-0.188-0.394-0.632-0.457-0.969-0.126c-0.546,0.536-1.086,1.078-1.623,1.623c-0.293,0.297-0.287,0.612,0.008,0.908
c0.487,0.491,0.978,0.979,1.467,1.468c0.078,0.077,0.154,0.159,0.24,0.228c0.236,0.187,0.535,0.178,0.746-0.015
c0.217-0.198,0.257-0.516,0.069-0.76c-0.135-0.173-0.301-0.321-0.453-0.479c-0.093-0.096-0.187-0.189-0.323-0.329
c0.158,0,0.246,0,0.334,0c1.559,0,3.118,0,4.677,0.001c0.438,0.001,0.848-0.08,1.203-0.351c0.499-0.381,0.678-0.902,0.678-1.508
c-0.002-1.714,0-3.428-0.002-5.142c0-0.096,0.017-0.21-0.028-0.282c-0.089-0.141-0.19-0.312-0.33-0.375
c-0.402-0.181-0.775,0.104-0.776,0.57c-0.004,1.736-0.001,3.473-0.002,5.209c0,0.537-0.206,0.74-0.751,0.74
c-1.573,0.001-3.147,0.001-4.722,0.001C14.175,19.717,14.103,19.717,14.029,19.717z M4.283,14.022
c0.022-0.012,0.043-0.023,0.065-0.035c0.213,0.223,0.423,0.448,0.641,0.666c0.152,0.153,0.334,0.242,0.558,0.188
c0.483-0.117,0.61-0.637,0.24-1.014c-0.521-0.53-1.049-1.053-1.575-1.578c-0.345-0.343-0.642-0.341-0.99,0.004
c-0.512,0.507-1.023,1.016-1.532,1.526c-0.072,0.072-0.141,0.153-0.189,0.241c-0.15,0.271-0.057,0.589,0.207,0.747
c0.25,0.151,0.503,0.118,0.742-0.115c0.218-0.212,0.425-0.437,0.637-0.657c0.021,0.011,0.041,0.021,0.062,0.032
c0,0.085,0,0.17,0,0.254c0,1.56-0.009,3.119,0.007,4.678c0.004,0.309,0.054,0.64,0.177,0.918c0.316,0.714,0.929,0.978,1.681,0.977
c1.706-0.001,3.412,0,5.119-0.001c0.088,0,0.178-0.002,0.264-0.017c0.345-0.06,0.543-0.399,0.43-0.732
c-0.089-0.263-0.282-0.387-0.621-0.387c-1.729-0.001-3.457,0-5.186-0.001c-0.525,0-0.734-0.209-0.734-0.735
c0-1.589,0-3.178,0-4.767C4.283,14.149,4.283,14.086,4.283,14.022z M10.009,3.068C9.993,3.093,9.979,3.116,9.965,3.141
c-0.088,0-0.176,0-0.263,0c-1.56,0-3.118,0.001-4.678-0.001C4.58,3.139,4.161,3.223,3.804,3.504
c-0.482,0.38-0.661,0.897-0.659,1.495c0.003,1.714,0,3.428,0.002,5.142c0,0.088,0.004,0.177,0.019,0.264
c0.038,0.215,0.168,0.354,0.376,0.417c0.404,0.124,0.739-0.152,0.739-0.616c0.002-1.721,0.001-3.442,0.001-5.164
c0-0.568,0.198-0.763,0.773-0.763c1.566,0,3.132,0,4.7,0c0.076,0,0.152,0,0.229,0c-0.198,0.268-0.42,0.479-0.634,0.699
c-0.267,0.273-0.279,0.6-0.044,0.846c0.231,0.241,0.574,0.241,0.844-0.023c0.557-0.545,1.108-1.097,1.653-1.654
c0.27-0.273,0.271-0.59,0.007-0.862c-0.544-0.558-1.092-1.113-1.653-1.654c-0.112-0.107-0.292-0.18-0.447-0.198
c-0.241-0.027-0.416,0.118-0.517,0.34C9.082,2.02,9.15,2.239,9.326,2.42C9.544,2.645,9.78,2.853,10.009,3.068z"/>
<path fill-rule="evenodd" clip-rule="evenodd" fill="#292D32" d="M20.93,10.003c0.216-0.228,0.424-0.464,0.648-0.682
c0.188-0.183,0.415-0.246,0.668-0.122c0.221,0.108,0.362,0.316,0.318,0.551c-0.026,0.143-0.097,0.301-0.196,0.404
c-0.543,0.559-1.098,1.107-1.655,1.653c-0.265,0.26-0.579,0.267-0.845,0.009c-0.568-0.555-1.13-1.118-1.685-1.686
c-0.242-0.249-0.242-0.602-0.026-0.813c0.251-0.244,0.575-0.243,0.848,0.013c0.225,0.211,0.441,0.43,0.663,0.646
c0.004,0.004,0.013,0.002,0.041,0.008c0.004-0.071,0.011-0.141,0.011-0.209c0.001-1.582,0.001-3.164,0-4.745
c0-0.544-0.203-0.75-0.741-0.75c-1.729-0.001-3.457,0.001-5.186-0.001c-0.35,0-0.557-0.147-0.63-0.437
c-0.079-0.308,0.118-0.622,0.43-0.68c0.087-0.016,0.176-0.019,0.264-0.019c1.715,0,3.429,0,5.143,0
c0.753-0.001,1.362,0.27,1.678,0.982c0.12,0.272,0.169,0.595,0.173,0.896c0.017,1.559,0.008,3.119,0.008,4.679
c0,0.088,0,0.175,0,0.262C20.882,9.975,20.905,9.989,20.93,10.003z"/>
<path fill-rule="evenodd" clip-rule="evenodd" fill="#292D32" d="M14.029,19.717c0.073,0,0.146,0,0.218,0
c1.574,0,3.148,0,4.722-0.001c0.545,0,0.751-0.203,0.751-0.74c0.001-1.736-0.002-3.473,0.002-5.209
c0.001-0.467,0.374-0.751,0.776-0.57c0.14,0.063,0.241,0.234,0.33,0.375c0.045,0.072,0.028,0.187,0.028,0.282
c0.002,1.714,0,3.428,0.002,5.142c0,0.605-0.179,1.127-0.678,1.508c-0.355,0.271-0.766,0.352-1.203,0.351
c-1.559-0.001-3.118-0.001-4.677-0.001c-0.088,0-0.176,0-0.334,0c0.137,0.14,0.23,0.233,0.323,0.329
c0.152,0.158,0.318,0.307,0.453,0.479c0.188,0.244,0.147,0.562-0.069,0.76c-0.211,0.192-0.51,0.201-0.746,0.015
c-0.086-0.068-0.162-0.15-0.24-0.228c-0.489-0.489-0.979-0.977-1.467-1.468c-0.295-0.296-0.301-0.611-0.008-0.908
c0.537-0.545,1.077-1.087,1.623-1.623c0.337-0.331,0.78-0.268,0.969,0.126c0.111,0.231,0.064,0.461-0.151,0.682
c-0.216,0.22-0.437,0.432-0.656,0.646C14.009,19.681,14.02,19.698,14.029,19.717z"/>
<path fill-rule="evenodd" clip-rule="evenodd" fill="#292D32" d="M4.283,14.022c0,0.063,0,0.127,0,0.191c0,1.589,0,3.178,0,4.767
c0,0.526,0.209,0.735,0.734,0.735c1.729,0.001,3.457,0,5.186,0.001c0.339,0,0.532,0.124,0.621,0.387
c0.113,0.333-0.085,0.673-0.43,0.732c-0.086,0.015-0.176,0.017-0.264,0.017c-1.707,0.001-3.413,0-5.119,0.001
c-0.752,0.001-1.365-0.263-1.681-0.977c-0.124-0.278-0.173-0.609-0.177-0.918c-0.017-1.559-0.007-3.118-0.007-4.678
c0-0.084,0-0.169,0-0.254c-0.021-0.011-0.041-0.021-0.062-0.032c-0.212,0.221-0.418,0.445-0.637,0.657
c-0.239,0.233-0.492,0.267-0.742,0.115C1.442,14.609,1.35,14.291,1.5,14.021c0.049-0.088,0.117-0.169,0.189-0.241
c0.508-0.51,1.02-1.019,1.532-1.526c0.348-0.345,0.645-0.347,0.99-0.004c0.526,0.525,1.055,1.047,1.575,1.578
c0.37,0.377,0.244,0.896-0.24,1.014c-0.223,0.055-0.406-0.034-0.558-0.188c-0.218-0.218-0.427-0.443-0.641-0.666
C4.326,13.999,4.305,14.011,4.283,14.022z"/>
<path fill-rule="evenodd" clip-rule="evenodd" fill="#292D32" d="M10.009,3.068C9.78,2.853,9.544,2.645,9.326,2.42
C9.15,2.239,9.082,2.02,9.193,1.773c0.101-0.222,0.275-0.367,0.517-0.34c0.155,0.018,0.335,0.09,0.447,0.198
c0.562,0.541,1.109,1.096,1.653,1.654c0.265,0.272,0.263,0.589-0.007,0.862c-0.545,0.557-1.097,1.108-1.653,1.654
c-0.27,0.264-0.612,0.264-0.844,0.023C9.071,5.578,9.084,5.251,9.351,4.978c0.214-0.22,0.436-0.431,0.634-0.699
c-0.076,0-0.152,0-0.229,0c-1.567,0-3.134,0-4.7,0c-0.575,0-0.773,0.195-0.773,0.763c0,1.721,0.001,3.442-0.001,5.164
c0,0.464-0.335,0.739-0.739,0.616c-0.208-0.063-0.338-0.202-0.376-0.417c-0.015-0.086-0.019-0.176-0.019-0.264
C3.146,8.427,3.148,6.713,3.145,4.999C3.144,4.401,3.322,3.884,3.804,3.504C4.161,3.223,4.58,3.139,5.024,3.14
c1.56,0.002,3.118,0.001,4.678,0.001c0.087,0,0.175,0,0.263,0C9.979,3.116,9.993,3.093,10.009,3.068z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 7.4 KiB

View File

@@ -0,0 +1,68 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Vrstva_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="24px" height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
<path fill="#292D32" d="M17.437,12c0.012,3.003-2.445,5.448-5.447,5.438c-3.015-0.012-5.437-2.445-5.426-5.449
c0-3.003,2.434-5.426,5.437-5.426S17.437,8.984,17.437,12z"/>
<path fill="#292D32" d="M23.049,10.524c-0.326-0.811-1.064-1.283-2.001-1.286c-0.377-0.002-0.373-0.003-0.508-0.357
c-0.097-0.251-0.201-0.5-0.312-0.746c-0.14-0.309-0.147-0.31,0.104-0.554c0.327-0.318,0.563-0.687,0.646-1.141
c0.125-0.674-0.031-1.279-0.492-1.784c-0.354-0.387-0.729-0.758-1.111-1.116c-0.824-0.767-2.023-0.752-2.846,0.02
c-0.123,0.113-0.233,0.297-0.37,0.319c-0.138,0.023-0.3-0.122-0.453-0.185c-0.263-0.108-0.524-0.216-0.793-0.309
c-0.118-0.04-0.158-0.093-0.155-0.216c0.004-0.21,0.01-0.425-0.023-0.632c-0.147-0.888-0.766-1.514-1.653-1.704
c-0.024-0.006-0.052-0.025-0.074-0.038c-0.672,0-1.343,0-2.015,0c-0.116,0.035-0.234,0.068-0.349,0.107
C9.815,1.178,9.258,1.939,9.237,2.819c-0.011,0.502-0.012,0.5-0.48,0.687C8.54,3.591,8.312,3.661,8.117,3.783
C7.892,3.923,7.753,3.871,7.59,3.685c-0.312-0.353-0.701-0.587-1.172-0.67C5.769,2.901,5.179,3.043,4.689,3.483
c-0.4,0.36-0.781,0.745-1.149,1.139C2.777,5.439,2.766,6.654,3.554,7.443c0.3,0.298,0.363,0.521,0.14,0.875
C3.552,8.541,3.477,8.811,3.395,9.065C3.35,9.204,3.284,9.237,3.146,9.242c-0.275,0.008-0.561,0-0.823,0.071
c-0.757,0.208-1.228,0.711-1.448,1.45c-0.022,0.209-0.167,1.69,0.051,2.635c0.302,0.822,1.028,1.349,1.936,1.363
c0.457,0.006,0.454,0.006,0.625,0.438c0.088,0.225,0.18,0.443,0.28,0.662c0.141,0.311,0.148,0.313-0.103,0.557
c-0.326,0.318-0.563,0.688-0.646,1.143c-0.123,0.664,0.025,1.268,0.479,1.768c0.358,0.393,0.736,0.77,1.126,1.131
c0.826,0.768,2.025,0.752,2.848-0.018c0.121-0.115,0.23-0.293,0.37-0.32c0.127-0.025,0.286,0.115,0.433,0.174
c0.263,0.109,0.523,0.223,0.793,0.311c0.14,0.045,0.18,0.109,0.172,0.246c-0.026,0.467,0.029,0.918,0.277,1.328
c0.296,0.49,0.719,0.813,1.275,0.959c0.068,0.021,0.135,0.045,0.201,0.066c0.672,0,1.343,0,2.015,0
c0.267-0.107,0.558-0.178,0.794-0.327c0.67-0.424,0.975-1.058,0.961-1.849c-0.006-0.355,0.002-0.352,0.334-0.479
c0.273-0.104,0.553-0.196,0.805-0.34c0.213-0.121,0.338-0.084,0.49,0.093c0.295,0.336,0.662,0.571,1.104,0.665
c0.7,0.153,1.336-0.002,1.864-0.491c0.379-0.353,0.746-0.72,1.1-1.099c0.766-0.825,0.752-2.021-0.02-2.849
c-0.113-0.12-0.299-0.231-0.318-0.37c-0.021-0.136,0.117-0.298,0.184-0.451c0.104-0.257,0.217-0.509,0.301-0.772
c0.047-0.14,0.108-0.181,0.25-0.174c0.424,0.022,0.842-0.019,1.229-0.226c0.475-0.254,0.791-0.628,0.977-1.106
C23.369,12.076,23.049,10.524,23.049,10.524z M21.891,12.673c-0.004,0.459-0.311,0.769-0.767,0.777
c-0.298,0.004-0.599-0.005-0.897,0.002c-0.371,0.004-0.6,0.176-0.699,0.536c-0.187,0.671-0.447,1.308-0.793,1.912
c-0.201,0.354-0.162,0.611,0.129,0.906c0.201,0.202,0.406,0.399,0.604,0.604c0.332,0.345,0.332,0.769,0,1.108
c-0.313,0.317-0.626,0.631-0.941,0.942c-0.34,0.332-0.768,0.332-1.109,0c-0.209-0.198-0.411-0.411-0.619-0.614
c-0.285-0.277-0.544-0.313-0.893-0.113c-0.598,0.341-1.229,0.6-1.891,0.785c-0.402,0.11-0.561,0.328-0.563,0.748
c-0.002,0.285,0.005,0.57-0.002,0.854c-0.007,0.457-0.315,0.765-0.773,0.769c-0.453,0.004-0.905,0.004-1.358,0
c-0.446-0.004-0.756-0.314-0.764-0.757c-0.006-0.291,0-0.584-0.003-0.877c-0.003-0.405-0.164-0.625-0.55-0.731
c-0.663-0.188-1.293-0.444-1.892-0.784c-0.365-0.21-0.621-0.169-0.925,0.131c-0.202,0.2-0.399,0.407-0.604,0.603
c-0.335,0.321-0.762,0.321-1.092,0c-0.325-0.315-0.645-0.638-0.96-0.959c-0.323-0.334-0.322-0.761,0-1.093
c0.202-0.211,0.413-0.411,0.617-0.618c0.28-0.289,0.32-0.55,0.126-0.892c-0.348-0.614-0.614-1.257-0.801-1.935
c-0.098-0.356-0.328-0.524-0.707-0.526c-0.298-0.007-0.598,0.002-0.896-0.002c-0.444-0.011-0.75-0.321-0.757-0.767
c-0.004-0.232-0.001-0.468-0.001-0.702c0-0.219-0.003-0.437,0.001-0.656c0.007-0.461,0.31-0.768,0.768-0.776
c0.298-0.004,0.598,0.003,0.897-0.002c0.373-0.005,0.599-0.176,0.699-0.538C4.657,9.34,4.92,8.703,5.264,8.098
c0.202-0.354,0.162-0.611-0.128-0.907c-0.2-0.203-0.405-0.4-0.603-0.605C4.202,6.244,4.201,5.818,4.534,5.479
C4.845,5.16,5.16,4.846,5.478,4.534c0.338-0.333,0.764-0.333,1.108-0.002c0.21,0.203,0.411,0.414,0.62,0.618
c0.277,0.271,0.541,0.314,0.872,0.126c0.617-0.351,1.267-0.622,1.952-0.807c0.343-0.093,0.514-0.33,0.518-0.694
c0.005-0.298-0.002-0.597,0.003-0.896c0.006-0.458,0.315-0.765,0.775-0.768c0.444-0.004,0.89-0.004,1.335-0.001
c0.474,0.004,0.78,0.307,0.786,0.777c0.007,0.292,0,0.583,0.003,0.875c0.006,0.387,0.172,0.609,0.549,0.713
c0.663,0.184,1.294,0.442,1.892,0.786c0.364,0.208,0.623,0.168,0.926-0.131c0.203-0.2,0.399-0.405,0.604-0.602
c0.335-0.322,0.761-0.324,1.093-0.001c0.323,0.314,0.644,0.634,0.959,0.958c0.321,0.332,0.323,0.756,0.002,1.093
C19.268,6.794,19.053,7,18.842,7.216c-0.267,0.274-0.303,0.536-0.113,0.872c0.349,0.611,0.614,1.254,0.801,1.933
c0.099,0.357,0.33,0.526,0.707,0.529c0.299,0.004,0.599-0.003,0.896,0.003c0.444,0.008,0.752,0.318,0.758,0.763
C21.896,11.769,21.895,12.22,21.891,12.673z"/>
<g>
<path fill="#FFFFFF" d="M16.358,13.578c-0.012-0.025-0.028-0.053-0.049-0.072l-0.677-0.676c-0.087-0.09-0.23-0.09-0.318,0
c-0.087,0.086-0.087,0.229,0,0.316l0.283,0.281h-4.975v-4.86l0.282,0.282c0.088,0.086,0.229,0.087,0.317,0
c0.088-0.087,0.088-0.23,0-0.317l-0.676-0.678c-0.021-0.02-0.047-0.037-0.073-0.048c-0.027-0.011-0.057-0.018-0.086-0.018
c-0.03,0-0.06,0.007-0.086,0.018c-0.028,0.011-0.052,0.028-0.072,0.048L9.551,8.532c-0.043,0.043-0.064,0.1-0.064,0.158
c0,0.058,0.021,0.115,0.065,0.159c0.087,0.086,0.23,0.086,0.317,0l0.281-0.282v4.86H8.401l0.282-0.281
c0.087-0.088,0.087-0.23,0-0.316c-0.087-0.09-0.23-0.09-0.317,0l-0.678,0.676c-0.021,0.02-0.037,0.045-0.048,0.072
s-0.017,0.057-0.017,0.086c0,0.031,0.006,0.061,0.018,0.088c0.011,0.027,0.028,0.051,0.048,0.07L8.367,14.5
c0.043,0.043,0.101,0.064,0.158,0.064c0.057,0,0.114-0.021,0.159-0.064c0.088-0.088,0.087-0.23,0-0.318L8.401,13.9h1.75v1.533
L9.87,15.15c-0.087-0.086-0.23-0.086-0.318,0c-0.087,0.088-0.087,0.232,0,0.318l0.678,0.678c0.02,0.021,0.045,0.037,0.072,0.049
c0.027,0.012,0.057,0.018,0.087,0.018c0.03,0,0.059-0.006,0.086-0.018c0.028-0.012,0.053-0.027,0.072-0.049l0.677-0.678
c0.044-0.043,0.065-0.102,0.065-0.158c0-0.059-0.021-0.115-0.066-0.16c-0.088-0.086-0.23-0.086-0.316,0l-0.282,0.283V13.9H15.6
l-0.281,0.281c-0.089,0.088-0.089,0.23,0,0.316c0.043,0.045,0.101,0.066,0.157,0.066c0.058,0,0.114-0.021,0.158-0.066l0.677-0.676
c0.021-0.02,0.038-0.043,0.049-0.072c0.013-0.025,0.018-0.055,0.018-0.086C16.376,13.635,16.369,13.605,16.358,13.578z
M10.156,15.438h0.008v0.008L10.156,15.438z M10.61,15.445v-0.008h0.008L10.61,15.445z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 6.8 KiB

View File

@@ -0,0 +1,66 @@
// Copyright (C) 2020-2021 Jakub Melka
//
// This file is part of PDF4QT.
//
// PDF4QT is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// with the written consent of the copyright owner, any later version.
//
// PDF4QT is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with PDF4QT. If not, see <https://www.gnu.org/licenses/>.
#include "settingsdialog.h"
#include "ui_settingsdialog.h"
#include "pdfwidgetutils.h"
SettingsDialog::SettingsDialog(QWidget* parent, DimensionUnit& lengthUnit, DimensionUnit& areaUnit, DimensionUnit& angleUnit) :
QDialog(parent),
ui(new Ui::SettingsDialog),
m_lengthUnit(lengthUnit),
m_areaUnit(areaUnit),
m_angleUnit(angleUnit)
{
ui->setupUi(this);
m_lengthUnits = DimensionUnit::getLengthUnits();
m_areaUnits = DimensionUnit::getAreaUnits();
m_angleUnits = DimensionUnit::getAngleUnits();
initComboBox(m_lengthUnits, m_lengthUnit, ui->lengthsComboBox);
initComboBox(m_areaUnits, m_areaUnit, ui->areasComboBox);
initComboBox(m_angleUnits, m_angleUnit, ui->anglesComboBox);
setMinimumSize(pdf::PDFWidgetUtils::scaleDPI(this, QSize(320, 160)));
pdf::PDFWidgetUtils::style(this);
}
SettingsDialog::~SettingsDialog()
{
delete ui;
}
void SettingsDialog::initComboBox(const DimensionUnits& units, const DimensionUnit& currentUnit, QComboBox* comboBox)
{
for (const DimensionUnit& unit : units)
{
comboBox->addItem(unit.symbol, unit.symbol);
}
comboBox->setCurrentIndex(comboBox->findText(currentUnit.symbol));
}
void SettingsDialog::accept()
{
m_lengthUnit = m_lengthUnits[ui->lengthsComboBox->currentIndex()];
m_areaUnit = m_areaUnits[ui->areasComboBox->currentIndex()];
m_angleUnit = m_angleUnits[ui->anglesComboBox->currentIndex()];
QDialog::accept();
}

View File

@@ -0,0 +1,58 @@
// Copyright (C) 2020-2021 Jakub Melka
//
// This file is part of PDF4QT.
//
// PDF4QT is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// with the written consent of the copyright owner, any later version.
//
// PDF4QT is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with PDF4QT. If not, see <https://www.gnu.org/licenses/>.
#ifndef SETTINGSDIALOG_H
#define SETTINGSDIALOG_H
#include "dimensiontool.h"
#include <QDialog>
class QComboBox;
namespace Ui
{
class SettingsDialog;
}
class SettingsDialog : public QDialog
{
Q_OBJECT
public:
explicit SettingsDialog(QWidget* parent,
DimensionUnit& lengthUnit,
DimensionUnit& areaUnit,
DimensionUnit& angleUnit);
virtual ~SettingsDialog() override;
virtual void accept() override;
private:
Ui::SettingsDialog* ui;
void initComboBox(const DimensionUnits& units, const DimensionUnit& currentUnit, QComboBox* comboBox);
DimensionUnits m_lengthUnits;
DimensionUnits m_areaUnits;
DimensionUnits m_angleUnits;
DimensionUnit& m_lengthUnit;
DimensionUnit& m_areaUnit;
DimensionUnit& m_angleUnit;
};
#endif // SETTINGSDIALOG_H

View File

@@ -0,0 +1,103 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>SettingsDialog</class>
<widget class="QDialog" name="SettingsDialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>254</width>
<height>165</height>
</rect>
</property>
<property name="windowTitle">
<string>Unit Settings</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QGroupBox" name="unitsGroupBox">
<property name="title">
<string>Units</string>
</property>
<layout class="QFormLayout" name="formLayout">
<item row="0" column="0">
<widget class="QLabel" name="lengthsLabel">
<property name="text">
<string>Lengths</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="lengthsComboBox"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="areasLabel">
<property name="text">
<string>Areas</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QComboBox" name="areasComboBox"/>
</item>
<item row="2" column="0">
<widget class="QLabel" name="anglesLabel">
<property name="text">
<string>Angles</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QComboBox" name="anglesComboBox"/>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections>
<connection>
<sender>buttonBox</sender>
<signal>accepted()</signal>
<receiver>SettingsDialog</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
<x>248</x>
<y>254</y>
</hint>
<hint type="destinationlabel">
<x>157</x>
<y>274</y>
</hint>
</hints>
</connection>
<connection>
<sender>buttonBox</sender>
<signal>rejected()</signal>
<receiver>SettingsDialog</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
<x>316</x>
<y>260</y>
</hint>
<hint type="destinationlabel">
<x>286</x>
<y>274</y>
</hint>
</hints>
</connection>
</connections>
</ui>

View File

@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Vrstva_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="24px" height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
<path fill="#292D32" d="M23.298,16.09c-0.03-0.068-0.071-0.135-0.125-0.188l-1.758-1.754c-0.226-0.229-0.597-0.229-0.822,0
c-0.225,0.226-0.225,0.595,0,0.822l0.732,0.729H8.435V3.103l0.729,0.731c0.227,0.226,0.596,0.227,0.822,0
c0.227-0.226,0.227-0.596,0-0.822L8.232,1.255C8.179,1.202,8.113,1.16,8.044,1.129C7.974,1.1,7.897,1.084,7.821,1.084
c-0.078,0-0.155,0.017-0.223,0.046C7.525,1.16,7.462,1.203,7.41,1.255L5.656,3.012c-0.114,0.112-0.169,0.26-0.169,0.41
c0,0.148,0.055,0.296,0.171,0.41c0.226,0.227,0.595,0.226,0.82,0l0.73-0.73v12.597H2.676l0.731-0.729
c0.226-0.229,0.226-0.598,0-0.822c-0.226-0.229-0.596-0.229-0.822,0l-1.757,1.754c-0.053,0.053-0.094,0.117-0.126,0.188
c-0.029,0.07-0.044,0.146-0.044,0.223c0,0.08,0.016,0.155,0.046,0.225c0.03,0.072,0.072,0.136,0.125,0.188l1.757,1.754
c0.112,0.113,0.261,0.17,0.41,0.17c0.148,0,0.296-0.057,0.411-0.172c0.228-0.227,0.226-0.596,0-0.82l-0.731-0.729l4.534-0.002v3.973
l-0.729-0.73c-0.227-0.227-0.596-0.227-0.822,0c-0.227,0.227-0.227,0.596,0,0.822l1.754,1.757c0.054,0.053,0.119,0.094,0.188,0.126
c0.07,0.027,0.147,0.045,0.224,0.045c0.078,0,0.155-0.018,0.224-0.047c0.072-0.03,0.136-0.071,0.188-0.124l1.754-1.757
c0.114-0.112,0.169-0.262,0.169-0.411c0-0.147-0.055-0.296-0.171-0.41c-0.226-0.228-0.596-0.226-0.821,0l-0.73,0.729v-3.973h12.891
l-0.729,0.73c-0.228,0.226-0.228,0.595,0,0.82c0.112,0.115,0.262,0.172,0.409,0.172c0.15,0,0.3-0.057,0.41-0.17l1.759-1.754
c0.053-0.053,0.094-0.115,0.125-0.188c0.028-0.068,0.045-0.146,0.045-0.224C23.343,16.236,23.327,16.16,23.298,16.09z M7.222,20.91
h0.021v0.021L7.222,20.91z M8.401,20.932V20.91h0.021L8.401,20.932z"/>
<circle fill="#292D32" cx="18.262" cy="6.125" r="4.063"/>
<g>
<path fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFFF" d="M20.803,5.993c-0.264-0.349-0.57-0.656-0.936-0.901
c-0.566-0.379-1.186-0.562-1.871-0.497c-0.35,0.033-0.68,0.134-0.992,0.292c-0.461,0.233-0.844,0.564-1.17,0.962
c-0.061,0.073-0.109,0.157-0.164,0.235c0,0.027,0,0.054,0,0.081c0.018,0.031,0.029,0.065,0.051,0.092
c0.266,0.349,0.57,0.656,0.936,0.9c0.566,0.379,1.186,0.562,1.871,0.497c0.35-0.033,0.68-0.134,0.992-0.292
c0.463-0.233,0.844-0.565,1.172-0.962c0.061-0.073,0.107-0.157,0.162-0.235c0-0.027,0-0.054,0-0.081
C20.838,6.054,20.824,6.02,20.803,5.993z M18.229,7.214c-0.596-0.013-1.066-0.515-1.055-1.125c0.012-0.59,0.516-1.064,1.121-1.053
c0.594,0.012,1.066,0.515,1.055,1.125C19.34,6.749,18.832,7.227,18.229,7.214z"/>
<path fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFFF" d="M18.273,5.538c-0.326-0.002-0.596,0.261-0.598,0.585
c-0.002,0.321,0.26,0.586,0.578,0.588c0.326,0.002,0.594-0.261,0.596-0.587C18.85,5.806,18.59,5.541,18.273,5.538z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.0 KiB