Merge branch 'develop' into feature/manual-layout
This commit is contained in:
commit
6f3e65e30e
|
@ -105,7 +105,11 @@ before_script:
|
||||||
qmake ../Valentina.pro -r -spec linux-clang CONFIG+=noDebugSymbols CONFIG+=checkWarnings CONFIG+=noTests;
|
qmake ../Valentina.pro -r -spec linux-clang CONFIG+=noDebugSymbols CONFIG+=checkWarnings CONFIG+=noTests;
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
qmake ../Valentina.pro -r CONFIG+=noDebugSymbols CONFIG+=no_ccache CONFIG+=checkWarnings CONFIG+=noTests;
|
if [[ "$LEGACY" = false ]]; then
|
||||||
|
qmake ../Valentina.pro -r CONFIG+=noDebugSymbols CONFIG+=no_ccache CONFIG+=checkWarnings CONFIG+=noTests;
|
||||||
|
else
|
||||||
|
qmake ../Valentina.pro -r CONFIG+=noDebugSymbols CONFIG+=no_ccache CONFIG+=noTests;
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
script:
|
script:
|
||||||
- "$CXX --version"
|
- "$CXX --version"
|
||||||
|
|
56
common.pri
56
common.pri
|
@ -329,44 +329,30 @@ defineReplace(FindLatestTagDistance){
|
||||||
# In debug mode on Unix system we use all usefull for us compilers keys for checking errors.
|
# In debug mode on Unix system we use all usefull for us compilers keys for checking errors.
|
||||||
# Also trying make all possible for speed up build time.
|
# Also trying make all possible for speed up build time.
|
||||||
unix {
|
unix {
|
||||||
|
LIBS_USED_FOR_QT = \
|
||||||
|
QtCore \
|
||||||
|
QtSvg \
|
||||||
|
QtXml \
|
||||||
|
QtPrintSupport \
|
||||||
|
QtXmlPatterns \
|
||||||
|
QtWidgets \
|
||||||
|
QtGui \
|
||||||
|
QtNetwork \
|
||||||
|
QtTest \
|
||||||
|
QtConcurrent
|
||||||
|
|
||||||
!macx{
|
# Key -isystem disable checking errors in system headers. Marking ignore for warnings in Qt headers.
|
||||||
# Key -isystem disable checking errors in system headers. Mark ignore warnings Qt headers.
|
!macx{
|
||||||
ISYSTEM += \
|
ISYSTEM += -isystem "$$[QT_INSTALL_HEADERS]"
|
||||||
-isystem "$$[QT_INSTALL_HEADERS]" \
|
|
||||||
-isystem "$$[QT_INSTALL_HEADERS]/QtWidgets" \
|
|
||||||
-isystem "$$[QT_INSTALL_HEADERS]/QtXml" \
|
|
||||||
-isystem "$$[QT_INSTALL_HEADERS]/QtGui" \
|
|
||||||
-isystem "$$[QT_INSTALL_HEADERS]/QtXmlPatterns" \
|
|
||||||
-isystem "$$[QT_INSTALL_HEADERS]/QtCore" \
|
|
||||||
-isystem "$$[QT_INSTALL_HEADERS]/QtPrintSupport" \
|
|
||||||
-isystem "$$[QT_INSTALL_HEADERS]/QtSvg" \
|
|
||||||
-isystem "$$[QT_INSTALL_HEADERS]/QtNetwork" \
|
|
||||||
-isystem "$$[QT_INSTALL_HEADERS]/QtTest" \
|
|
||||||
-isystem "$$[QT_INSTALL_HEADERS]/QtConcurrent"
|
|
||||||
|
|
||||||
|
for(somelib, $$list($$LIBS_USED_FOR_QT)) {
|
||||||
|
ISYSTEM += -isystem "$$[QT_INSTALL_HEADERS]/$${somelib}"
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
ISYSTEM += \
|
for(somelib, $$list($$LIBS_USED_FOR_QT)) {
|
||||||
-isystem "$$[QT_INSTALL_LIBS]/QtWidgets.framework/Headers/" \
|
ISYSTEM += -isystem "$$[QT_INSTALL_LIBS]/$${somelib}.framework/Versions/5/Headers"
|
||||||
-isystem "$$[QT_INSTALL_LIBS]/QtWidgets.framework/Versions/5/Headers/" \
|
ISYSTEM += -isystem "$$[QT_INSTALL_LIBS]/$${somelib}.framework/Headers"
|
||||||
-isystem "$$[QT_INSTALL_LIBS]/QtXml.framework/Headers/" \
|
}
|
||||||
-isystem "$$[QT_INSTALL_LIBS]/QtXml.framework/Versions/5/Headers/" \
|
|
||||||
-isystem "$$[QT_INSTALL_LIBS]/QtGui.framework/Headers/" \
|
|
||||||
-isystem "$$[QT_INSTALL_LIBS]/QtGui.framework/Versions/5/Headers/" \
|
|
||||||
-isystem "$$[QT_INSTALL_LIBS]/QtXmlPatterns.framework/Headers/" \
|
|
||||||
-isystem "$$[QT_INSTALL_LIBS]/QtXmlPatterns.framework/Versions/5/Headers/" \
|
|
||||||
-isystem "$$[QT_INSTALL_LIBS]/QtCore.framework/Headers/" \
|
|
||||||
-isystem "$$[QT_INSTALL_LIBS]/QtCore.framework/Versions/5/Headers/" \
|
|
||||||
-isystem "$$[QT_INSTALL_LIBS]/QtPrintSupport.framework/Headers/" \
|
|
||||||
-isystem "$$[QT_INSTALL_LIBS]/QtPrintSupport.framework/Versions/5/Headers/" \
|
|
||||||
-isystem "$$[QT_INSTALL_LIBS]/QtSvg.framework/Headers/" \
|
|
||||||
-isystem "$$[QT_INSTALL_LIBS]/QtSvg.framework/Versions/5/Headers/" \
|
|
||||||
-isystem "$$[QT_INSTALL_LIBS]/QtNetwork.framework/Headers/" \
|
|
||||||
-isystem "$$[QT_INSTALL_LIBS]/QtNetwork.framework/Versions/5/Headers/" \
|
|
||||||
-isystem "$$[QT_INSTALL_LIBS]/QtTest.framework/Headers/" \
|
|
||||||
-isystem "$$[QT_INSTALL_LIBS]/QtTest.framework/Versions/5/Headers/" \
|
|
||||||
-isystem "$$[QT_INSTALL_LIBS]/QtConcurrent.framework/Headers/" \
|
|
||||||
-isystem "$$[QT_INSTALL_LIBS]/QtConcurrent.framework/Versions/5/Headers/"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Usefull GCC warnings keys.
|
# Usefull GCC warnings keys.
|
||||||
|
|
|
@ -128,22 +128,10 @@ void InsertGlobalContours(const QList<QGraphicsScene *> &scenes, const QList<QGr
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
MainWindowsNoGUI::MainWindowsNoGUI(QWidget *parent)
|
MainWindowsNoGUI::MainWindowsNoGUI(QWidget *parent)
|
||||||
: VAbstractMainWindow(parent),
|
: VAbstractMainWindow(parent),
|
||||||
listDetails(),
|
pattern(new VContainer(qApp->TrVars(), qApp->patternUnitsP(), valentinaNamespace))
|
||||||
currentScene(nullptr),
|
|
||||||
tempSceneLayout(nullptr),
|
|
||||||
pattern(new VContainer(qApp->TrVars(), qApp->patternUnitsP(), valentinaNamespace)),
|
|
||||||
doc(nullptr),
|
|
||||||
undoAction(nullptr),
|
|
||||||
redoAction(nullptr),
|
|
||||||
actionDockWidgetToolOptions(nullptr),
|
|
||||||
actionDockWidgetGroups(nullptr),
|
|
||||||
isNoScaling(false),
|
|
||||||
isNeedAutosave(false),
|
|
||||||
#if defined(Q_OS_WIN32) && QT_VERSION >= QT_VERSION_CHECK(5, 7, 0)
|
#if defined(Q_OS_WIN32) && QT_VERSION >= QT_VERSION_CHECK(5, 7, 0)
|
||||||
m_taskbarButton(new QWinTaskbarButton(this)),
|
,m_taskbarButton(new QWinTaskbarButton(this))
|
||||||
m_taskbarProgress(nullptr),
|
|
||||||
#endif
|
#endif
|
||||||
m_dialogSaveLayout()
|
|
||||||
{
|
{
|
||||||
InitTempLayoutScene();
|
InitTempLayoutScene();
|
||||||
|
|
||||||
|
|
|
@ -86,41 +86,41 @@ public slots:
|
||||||
protected slots:
|
protected slots:
|
||||||
void ExportFMeasurementsToCSV();
|
void ExportFMeasurementsToCSV();
|
||||||
protected:
|
protected:
|
||||||
QVector<VLayoutPiece> listDetails;
|
QVector<VLayoutPiece> listDetails{};
|
||||||
|
|
||||||
/** @brief currentScene pointer to current scene. */
|
/** @brief currentScene pointer to current scene. */
|
||||||
QGraphicsScene *currentScene;
|
QGraphicsScene *currentScene{nullptr};
|
||||||
|
|
||||||
QGraphicsScene *tempSceneLayout;
|
QGraphicsScene *tempSceneLayout{nullptr};
|
||||||
|
|
||||||
/** @brief pattern container with data (points, arcs, splines, spline paths, variables) */
|
/** @brief pattern container with data (points, arcs, splines, spline paths, variables) */
|
||||||
VContainer *pattern;
|
VContainer *pattern;
|
||||||
|
|
||||||
/** @brief doc dom document container */
|
/** @brief doc dom document container */
|
||||||
VPattern *doc;
|
VPattern *doc{nullptr};
|
||||||
|
|
||||||
QList<QGraphicsItem *> gcontours{};
|
QList<QGraphicsItem *> gcontours{};
|
||||||
|
|
||||||
QVector<QVector<VLayoutPiece> > detailsOnLayout{};
|
QVector<QVector<VLayoutPiece> > detailsOnLayout{};
|
||||||
|
|
||||||
QAction *undoAction;
|
QAction *undoAction{nullptr};
|
||||||
QAction *redoAction;
|
QAction *redoAction{nullptr};
|
||||||
QAction *actionDockWidgetToolOptions;
|
QAction *actionDockWidgetToolOptions{nullptr};
|
||||||
QAction *actionDockWidgetGroups;
|
QAction *actionDockWidgetGroups{nullptr};
|
||||||
|
|
||||||
bool isNoScaling;
|
bool isNoScaling{false};
|
||||||
bool isNeedAutosave;
|
bool isNeedAutosave{false};
|
||||||
VPrintLayout *m_layoutSettings{new VPrintLayout(this)};
|
VPrintLayout *m_layoutSettings{new VPrintLayout(this)};
|
||||||
|
|
||||||
QSharedPointer<DialogSaveLayout> m_dialogSaveLayout;
|
|
||||||
|
|
||||||
/** @brief mouseCoordinate pointer to label who show mouse coordinate. */
|
/** @brief mouseCoordinate pointer to label who show mouse coordinate. */
|
||||||
QPointer<QLabel> m_mouseCoordinate{nullptr};
|
QPointer<QLabel> m_mouseCoordinate{nullptr};
|
||||||
QPointer<QLabel> m_unreadPatternMessage{nullptr};
|
QPointer<QLabel> m_unreadPatternMessage{nullptr};
|
||||||
|
|
||||||
|
QSharedPointer<DialogSaveLayout> m_dialogSaveLayout{};
|
||||||
|
|
||||||
#if defined(Q_OS_WIN) && QT_VERSION >= QT_VERSION_CHECK(5, 7, 0)
|
#if defined(Q_OS_WIN) && QT_VERSION >= QT_VERSION_CHECK(5, 7, 0)
|
||||||
QWinTaskbarButton *m_taskbarButton;
|
QWinTaskbarButton *m_taskbarButton;
|
||||||
QWinTaskbarProgress *m_taskbarProgress;
|
QWinTaskbarProgress *m_taskbarProgress{nullptr};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static QVector<VLayoutPiece> PrepareDetailsForLayout(const QVector<DetailForLayout> &details);
|
static QVector<VLayoutPiece> PrepareDetailsForLayout(const QVector<DetailForLayout> &details);
|
||||||
|
|
|
@ -62,7 +62,7 @@ include(warnings.pri)
|
||||||
|
|
||||||
CONFIG(release, debug|release){
|
CONFIG(release, debug|release){
|
||||||
# Release mode
|
# Release mode
|
||||||
CONFIG += silent
|
!macx:CONFIG += silent
|
||||||
|
|
||||||
!unix:*g++*{
|
!unix:*g++*{
|
||||||
QMAKE_CXXFLAGS += -fno-omit-frame-pointer # Need for exchndl.dll
|
QMAKE_CXXFLAGS += -fno-omit-frame-pointer # Need for exchndl.dll
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
# File with common stuff for whole project
|
# File with common stuff for whole project
|
||||||
include(../../../common.pri)
|
include(../../../common.pri)
|
||||||
|
|
||||||
QT += core gui widgets printsupport xml concurrent
|
QT += core gui widgets printsupport xml concurrent svg
|
||||||
|
|
||||||
# Name of library
|
# Name of library
|
||||||
TARGET = vlayout
|
TARGET = vlayout
|
||||||
|
|
|
@ -182,7 +182,7 @@ void VLayoutExporter::ExportToPDF(QGraphicsScene *scene) const
|
||||||
printer.setOutputFileName(m_fileName);
|
printer.setOutputFileName(m_fileName);
|
||||||
printer.setDocName(QFileInfo(m_fileName).fileName());
|
printer.setDocName(QFileInfo(m_fileName).fileName());
|
||||||
printer.setResolution(static_cast<int>(PrintDPI));
|
printer.setResolution(static_cast<int>(PrintDPI));
|
||||||
printer.setOrientation(QPrinter::Portrait);
|
printer.setPageOrientation(QPageLayout::Portrait);
|
||||||
printer.setFullPage(m_ignorePrinterMargins);
|
printer.setFullPage(m_ignorePrinterMargins);
|
||||||
|
|
||||||
qreal width = FromPixel(m_imageRect.width() * m_xScale + m_margins.left() + m_margins.right(), Unit::Mm);
|
qreal width = FromPixel(m_imageRect.width() * m_xScale + m_margins.left() + m_margins.right(), Unit::Mm);
|
||||||
|
|
|
@ -44,8 +44,8 @@ class VPrintLayout : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
VPrintLayout(QObject *parent = nullptr);
|
explicit VPrintLayout(QObject *parent = nullptr);
|
||||||
~VPrintLayout();
|
virtual ~VPrintLayout();
|
||||||
|
|
||||||
auto FileName() const -> QString;
|
auto FileName() const -> QString;
|
||||||
void SetFileName(const QString &fileName);
|
void SetFileName(const QString &fileName);
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
#ifndef TESTVAPPLICATION_H
|
#ifndef TESTVAPPLICATION_H
|
||||||
#define TESTVAPPLICATION_H
|
#define TESTVAPPLICATION_H
|
||||||
|
|
||||||
#include "vabstractapplication.h"
|
#include "vabstractvalapplication.h"
|
||||||
#include "projectversion.h"
|
#include "projectversion.h"
|
||||||
#include "../vmisc/vcommonsettings.h"
|
#include "../vmisc/vcommonsettings.h"
|
||||||
|
|
||||||
|
@ -50,12 +50,12 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class TestVApplication : public VAbstractApplication
|
class TestVApplication : public VAbstractValApplication
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
TestVApplication(int &argc, char ** argv)
|
TestVApplication(int &argc, char ** argv)
|
||||||
: VAbstractApplication(argc, argv),
|
: VAbstractValApplication(argc, argv),
|
||||||
m_trVars(nullptr)
|
m_trVars(nullptr)
|
||||||
{
|
{
|
||||||
setApplicationName("ValentinaTest");
|
setApplicationName("ValentinaTest");
|
||||||
|
|
Loading…
Reference in New Issue
Block a user