Fixed Clang warnings.
--HG-- branch : develop
This commit is contained in:
parent
acb8b57b24
commit
6f56b46d26
|
@ -301,6 +301,7 @@ CLANG_DEBUG_CXXFLAGS += \
|
||||||
-Wbad-array-new-length \
|
-Wbad-array-new-length \
|
||||||
-Wbad-function-cast \
|
-Wbad-function-cast \
|
||||||
-Wbind-to-temporary-copy \
|
-Wbind-to-temporary-copy \
|
||||||
|
-Wno-c++98-compat-bind-to-temporary-copy \
|
||||||
-Wbitfield-constant-conversion \
|
-Wbitfield-constant-conversion \
|
||||||
-Wbitwise-op-parentheses \
|
-Wbitwise-op-parentheses \
|
||||||
-Wbool-conversion \
|
-Wbool-conversion \
|
||||||
|
@ -446,6 +447,7 @@ CLANG_DEBUG_CXXFLAGS += \
|
||||||
-Wliteral-conversion \
|
-Wliteral-conversion \
|
||||||
-Wliteral-range \
|
-Wliteral-range \
|
||||||
-Wlocal-type-template-args \
|
-Wlocal-type-template-args \
|
||||||
|
-Wno-c++98-compat-local-type-template-args \
|
||||||
-Wlogical-not-parentheses \
|
-Wlogical-not-parentheses \
|
||||||
-Wlogical-op-parentheses \
|
-Wlogical-op-parentheses \
|
||||||
-Wlong-long \
|
-Wlong-long \
|
||||||
|
|
|
@ -57,7 +57,7 @@ public:
|
||||||
virtual bool notify(QObject * receiver, QEvent * event) Q_DECL_OVERRIDE;
|
virtual bool notify(QObject * receiver, QEvent * event) Q_DECL_OVERRIDE;
|
||||||
|
|
||||||
bool IsTestMode() const;
|
bool IsTestMode() const;
|
||||||
virtual bool IsAppInGUIMode() const;
|
virtual bool IsAppInGUIMode() const Q_DECL_OVERRIDE;
|
||||||
TMainWindow *MainWindow();
|
TMainWindow *MainWindow();
|
||||||
QList<TMainWindow*> MainWindows();
|
QList<TMainWindow*> MainWindows();
|
||||||
|
|
||||||
|
|
|
@ -71,14 +71,14 @@ public:
|
||||||
void StartLogging();
|
void StartLogging();
|
||||||
QTextStream *LogFile();
|
QTextStream *LogFile();
|
||||||
|
|
||||||
virtual const VTranslateVars *TrVars();
|
virtual const VTranslateVars *TrVars() Q_DECL_OVERRIDE;
|
||||||
|
|
||||||
#if defined(Q_OS_WIN) && defined(Q_CC_GNU)
|
#if defined(Q_OS_WIN) && defined(Q_CC_GNU)
|
||||||
static void DrMingw();
|
static void DrMingw();
|
||||||
void CollectReports() const;
|
void CollectReports() const;
|
||||||
#endif // defined(Q_OS_WIN) && defined(Q_CC_GNU)
|
#endif // defined(Q_OS_WIN) && defined(Q_CC_GNU)
|
||||||
bool static IsGUIMode();
|
bool static IsGUIMode();
|
||||||
virtual bool IsAppInGUIMode() const;
|
virtual bool IsAppInGUIMode() const Q_DECL_OVERRIDE;
|
||||||
|
|
||||||
virtual void OpenSettings() Q_DECL_OVERRIDE;
|
virtual void OpenSettings() Q_DECL_OVERRIDE;
|
||||||
VSettings *ValentinaSettings();
|
VSettings *ValentinaSettings();
|
||||||
|
|
|
@ -43,7 +43,7 @@ public:
|
||||||
virtual QVariant data (int column = DPC_Name, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE;
|
virtual QVariant data (int column = DPC_Name, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE;
|
||||||
|
|
||||||
//! Returns item flags
|
//! Returns item flags
|
||||||
Qt::ItemFlags flags(int column = DPC_Name) const;
|
virtual Qt::ItemFlags flags(int column = DPC_Name) const Q_DECL_OVERRIDE;
|
||||||
|
|
||||||
//! Returns an editor widget, or NULL if it doesn't supply one
|
//! Returns an editor widget, or NULL if it doesn't supply one
|
||||||
//! \param parent The widget to which the editor will be added as a child
|
//! \param parent The widget to which the editor will be added as a child
|
||||||
|
|
|
@ -52,7 +52,7 @@ public:
|
||||||
VFormula GetFormula() const;
|
VFormula GetFormula() const;
|
||||||
|
|
||||||
//! Needed for proper event handling
|
//! Needed for proper event handling
|
||||||
bool eventFilter(QObject *obj, QEvent *ev);
|
virtual bool eventFilter(QObject *obj, QEvent *ev) Q_DECL_OVERRIDE;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
//! This is emitted, when the user changes the color
|
//! This is emitted, when the user changes the color
|
||||||
|
|
|
@ -93,7 +93,7 @@ public:
|
||||||
static const QString AttrReadOnly;
|
static const QString AttrReadOnly;
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void LiteParseTree(const Document &parse);
|
virtual void LiteParseTree(const Document &parse) Q_DECL_OVERRIDE;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void customEvent(QEvent * event) Q_DECL_OVERRIDE;
|
virtual void customEvent(QEvent * event) Q_DECL_OVERRIDE;
|
||||||
|
|
|
@ -54,7 +54,7 @@ public:
|
||||||
QString WhatUtf8() const V_NOEXCEPT_EXPR (true);
|
QString WhatUtf8() const V_NOEXCEPT_EXPR (true);
|
||||||
void AddMoreInformation(const QString &info);
|
void AddMoreInformation(const QString &info);
|
||||||
QString MoreInformation() const;
|
QString MoreInformation() const;
|
||||||
virtual const char* what() const V_NOEXCEPT_EXPR (true);
|
virtual const char* what() const V_NOEXCEPT_EXPR (true) Q_DECL_OVERRIDE;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
/** @brief error string with error */
|
/** @brief error string with error */
|
||||||
|
|
|
@ -48,7 +48,7 @@ protected:
|
||||||
virtual QString MinVerStr() const Q_DECL_OVERRIDE;
|
virtual QString MinVerStr() const Q_DECL_OVERRIDE;
|
||||||
virtual QString MaxVerStr() const Q_DECL_OVERRIDE;
|
virtual QString MaxVerStr() const Q_DECL_OVERRIDE;
|
||||||
|
|
||||||
QString XSDSchema(int ver) const;
|
virtual QString XSDSchema(int ver) const Q_DECL_OVERRIDE;
|
||||||
virtual void ApplyPatches() Q_DECL_OVERRIDE;
|
virtual void ApplyPatches() Q_DECL_OVERRIDE;
|
||||||
virtual void DowngradeToCurrentMaxVersion() Q_DECL_OVERRIDE;
|
virtual void DowngradeToCurrentMaxVersion() Q_DECL_OVERRIDE;
|
||||||
|
|
||||||
|
|
|
@ -48,7 +48,7 @@ protected:
|
||||||
virtual QString MinVerStr() const Q_DECL_OVERRIDE;
|
virtual QString MinVerStr() const Q_DECL_OVERRIDE;
|
||||||
virtual QString MaxVerStr() const Q_DECL_OVERRIDE;
|
virtual QString MaxVerStr() const Q_DECL_OVERRIDE;
|
||||||
|
|
||||||
QString XSDSchema(int ver) const;
|
virtual QString XSDSchema(int ver) const Q_DECL_OVERRIDE;
|
||||||
virtual void ApplyPatches() Q_DECL_OVERRIDE;
|
virtual void ApplyPatches() Q_DECL_OVERRIDE;
|
||||||
virtual void DowngradeToCurrentMaxVersion() Q_DECL_OVERRIDE;
|
virtual void DowngradeToCurrentMaxVersion() Q_DECL_OVERRIDE;
|
||||||
|
|
||||||
|
|
|
@ -48,7 +48,7 @@ protected:
|
||||||
virtual QString MinVerStr() const Q_DECL_OVERRIDE;
|
virtual QString MinVerStr() const Q_DECL_OVERRIDE;
|
||||||
virtual QString MaxVerStr() const Q_DECL_OVERRIDE;
|
virtual QString MaxVerStr() const Q_DECL_OVERRIDE;
|
||||||
|
|
||||||
QString XSDSchema(int ver) const;
|
virtual QString XSDSchema(int ver) const Q_DECL_OVERRIDE;
|
||||||
virtual void ApplyPatches() Q_DECL_OVERRIDE;
|
virtual void ApplyPatches() Q_DECL_OVERRIDE;
|
||||||
virtual void DowngradeToCurrentMaxVersion() Q_DECL_OVERRIDE;
|
virtual void DowngradeToCurrentMaxVersion() Q_DECL_OVERRIDE;
|
||||||
|
|
||||||
|
|
|
@ -844,6 +844,19 @@ struct DXFLIB_EXPORT DL_TextData
|
||||||
angle(angle)
|
angle(angle)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
DL_TextData(const DL_TextData &d)
|
||||||
|
: ipx(d.ipx), ipy(d.ipy), ipz(d.ipz),
|
||||||
|
apx(d.apx), apy(d.apy), apz(d.apz),
|
||||||
|
height(d.height), xScaleFactor(d.xScaleFactor),
|
||||||
|
textGenerationFlags(d.textGenerationFlags),
|
||||||
|
hJustification(d.hJustification),
|
||||||
|
vJustification(d.vJustification),
|
||||||
|
text(d.text),
|
||||||
|
style(d.style),
|
||||||
|
angle(d.angle)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
virtual ~DL_TextData()
|
virtual ~DL_TextData()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
|
@ -67,8 +67,6 @@ public:
|
||||||
/**
|
/**
|
||||||
* Constructor for DXF extrusion.
|
* Constructor for DXF extrusion.
|
||||||
*
|
*
|
||||||
* @param direction Vector of axis along which the entity shall be extruded
|
|
||||||
* this is also the Z axis of the Entity coordinate system
|
|
||||||
* @param elevation Distance of the entities XY plane from the origin of the
|
* @param elevation Distance of the entities XY plane from the origin of the
|
||||||
* world coordinate system
|
* world coordinate system
|
||||||
*/
|
*/
|
||||||
|
@ -103,7 +101,7 @@ public:
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return direction vector.
|
* @param dir vector.
|
||||||
*/
|
*/
|
||||||
void getDirection(double dir[]) const
|
void getDirection(double dir[]) const
|
||||||
{
|
{
|
||||||
|
|
|
@ -79,7 +79,7 @@ void DL_WriterA::dxfReal(int gc, double value) const
|
||||||
// Cut away those zeros at the end:
|
// Cut away those zeros at the end:
|
||||||
bool dot = false;
|
bool dot = false;
|
||||||
int end = -1;
|
int end = -1;
|
||||||
for (quint32 i=0, sz = strlen(str); i<sz; ++i)
|
for (quint32 i=0, sz = static_cast<quint32>(strlen(str)); i<sz; ++i)
|
||||||
{
|
{
|
||||||
if (str[i]=='.')
|
if (str[i]=='.')
|
||||||
{
|
{
|
||||||
|
|
|
@ -43,7 +43,7 @@ public:
|
||||||
VMeasurements(Unit unit, int baseSize, int baseHeight, VContainer *data);
|
VMeasurements(Unit unit, int baseSize, int baseHeight, VContainer *data);
|
||||||
virtual ~VMeasurements() Q_DECL_OVERRIDE;
|
virtual ~VMeasurements() Q_DECL_OVERRIDE;
|
||||||
|
|
||||||
void setXMLContent(const QString &fileName);
|
virtual void setXMLContent(const QString &fileName) Q_DECL_OVERRIDE;
|
||||||
|
|
||||||
void AddEmpty(const QString &name, const QString &formula = QString());
|
void AddEmpty(const QString &name, const QString &formula = QString());
|
||||||
void AddEmptyAfter(const QString &after, const QString &name, const QString &formula = QString());
|
void AddEmptyAfter(const QString &after, const QString &name, const QString &formula = QString());
|
||||||
|
|
|
@ -71,12 +71,12 @@ public:
|
||||||
|
|
||||||
QString GetFormulaLength () const;
|
QString GetFormulaLength () const;
|
||||||
void SetFormulaLength (const QString &formula, qreal value);
|
void SetFormulaLength (const QString &formula, qreal value);
|
||||||
qreal GetLength () const;
|
virtual qreal GetLength () const Q_DECL_OVERRIDE;
|
||||||
|
|
||||||
QPointF GetP1() const;
|
QPointF GetP1() const;
|
||||||
QPointF GetP2 () const;
|
QPointF GetP2 () const;
|
||||||
qreal AngleArc() const;
|
qreal AngleArc() const;
|
||||||
QVector<QPointF> GetPoints () const;
|
virtual QVector<QPointF> GetPoints () const Q_DECL_OVERRIDE;
|
||||||
QPointF CutArc (const qreal &length, VArc &arc1, VArc &arc2) const;
|
QPointF CutArc (const qreal &length, VArc &arc1, VArc &arc2) const;
|
||||||
QPointF CutArc (const qreal &length) const;
|
QPointF CutArc (const qreal &length) const;
|
||||||
virtual void setId(const quint32 &id) Q_DECL_OVERRIDE;
|
virtual void setId(const quint32 &id) Q_DECL_OVERRIDE;
|
||||||
|
|
|
@ -81,14 +81,14 @@ public:
|
||||||
|
|
||||||
QString GetFormulaLength () const;
|
QString GetFormulaLength () const;
|
||||||
void SetFormulaLength (const QString &formula, qreal value);
|
void SetFormulaLength (const QString &formula, qreal value);
|
||||||
qreal GetLength () const;
|
virtual qreal GetLength () const Q_DECL_OVERRIDE;
|
||||||
|
|
||||||
QPointF GetP1() const;
|
QPointF GetP1() const;
|
||||||
QPointF GetP2 () const;
|
QPointF GetP2 () const;
|
||||||
|
|
||||||
qreal AngleArc() const;
|
qreal AngleArc() const;
|
||||||
QVector<qreal> GetAngles () const;
|
QVector<qreal> GetAngles () const;
|
||||||
QVector<QPointF> GetPoints () const;
|
virtual QVector<QPointF> GetPoints () const Q_DECL_OVERRIDE;
|
||||||
QPointF CutArc (const qreal &length, VEllipticalArc &arc1, VEllipticalArc &arc2) const;
|
QPointF CutArc (const qreal &length, VEllipticalArc &arc1, VEllipticalArc &arc2) const;
|
||||||
QPointF CutArc (const qreal &length) const;
|
QPointF CutArc (const qreal &length) const;
|
||||||
virtual void setId(const quint32 &id) Q_DECL_OVERRIDE;
|
virtual void setId(const quint32 &id) Q_DECL_OVERRIDE;
|
||||||
|
|
|
@ -96,8 +96,6 @@ VSpline::VSpline (VPointF p1, QPointF p2, QPointF p3, VPointF p4, quint32 idObje
|
||||||
* @param c1LengthFormula formula length from first point to first control point.
|
* @param c1LengthFormula formula length from first point to first control point.
|
||||||
* @param c2Length length from second point to first control point.
|
* @param c2Length length from second point to first control point.
|
||||||
* @param c2LengthFormula formula length from second point to first control point.
|
* @param c2LengthFormula formula length from second point to first control point.
|
||||||
* @param idObject
|
|
||||||
* @param mode
|
|
||||||
*/
|
*/
|
||||||
VSpline::VSpline(VPointF p1, VPointF p4, qreal angle1, const QString &angle1Formula, qreal angle2,
|
VSpline::VSpline(VPointF p1, VPointF p4, qreal angle1, const QString &angle1Formula, qreal angle2,
|
||||||
const QString &angle2Formula, qreal c1Length, const QString &c1LengthFormula, qreal c2Length,
|
const QString &angle2Formula, qreal c1Length, const QString &c1LengthFormula, qreal c2Length,
|
||||||
|
|
|
@ -299,7 +299,7 @@ void VLayoutGenerator::GatherPages()
|
||||||
VLayoutPaper paper(PageHeight(), PageWidth());
|
VLayoutPaper paper(PageHeight(), PageWidth());
|
||||||
paper.SetShift(shift);
|
paper.SetShift(shift);
|
||||||
paper.SetLayoutWidth(bank->GetLayoutWidth());
|
paper.SetLayoutWidth(bank->GetLayoutWidth());
|
||||||
paper.SetPaperIndex(i);
|
paper.SetPaperIndex(static_cast<quint32>(i));
|
||||||
paper.SetRotate(rotate);
|
paper.SetRotate(rotate);
|
||||||
paper.SetRotationIncrease(rotationIncrease);
|
paper.SetRotationIncrease(rotationIncrease);
|
||||||
paper.SetSaveLength(saveLength);
|
paper.SetSaveLength(saveLength);
|
||||||
|
@ -361,7 +361,7 @@ void VLayoutGenerator::UnitePages()
|
||||||
VLayoutPaper paper(qFloor(papersLength.at(i)), PageWidth());
|
VLayoutPaper paper(qFloor(papersLength.at(i)), PageWidth());
|
||||||
paper.SetShift(shift);
|
paper.SetShift(shift);
|
||||||
paper.SetLayoutWidth(bank->GetLayoutWidth());
|
paper.SetLayoutWidth(bank->GetLayoutWidth());
|
||||||
paper.SetPaperIndex(i);
|
paper.SetPaperIndex(static_cast<quint32>(i));
|
||||||
paper.SetRotate(rotate);
|
paper.SetRotate(rotate);
|
||||||
paper.SetRotationIncrease(rotationIncrease);
|
paper.SetRotationIncrease(rotationIncrease);
|
||||||
paper.SetSaveLength(saveLength);
|
paper.SetSaveLength(saveLength);
|
||||||
|
|
|
@ -61,7 +61,7 @@ public:
|
||||||
virtual QVariant data (int column = DPC_Name, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE;
|
virtual QVariant data (int column = DPC_Name, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE;
|
||||||
|
|
||||||
//! Returns item flags
|
//! Returns item flags
|
||||||
Qt::ItemFlags flags(int column = DPC_Name) const;
|
virtual Qt::ItemFlags flags(int column = DPC_Name) const Q_DECL_OVERRIDE;
|
||||||
|
|
||||||
//! Returns the Vector3d
|
//! Returns the Vector3d
|
||||||
virtual Vector3D getVector() const;
|
virtual Vector3D getVector() const;
|
||||||
|
|
|
@ -59,7 +59,7 @@ public:
|
||||||
static QString GetColorString(const QColor& color);
|
static QString GetColorString(const QColor& color);
|
||||||
|
|
||||||
//! Needed for proper event handling
|
//! Needed for proper event handling
|
||||||
bool eventFilter(QObject *obj, QEvent *ev);
|
virtual bool eventFilter(QObject *obj, QEvent *ev) Q_DECL_OVERRIDE;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
//! This is emitted, when the user changes the color
|
//! This is emitted, when the user changes the color
|
||||||
|
|
|
@ -45,7 +45,7 @@ public:
|
||||||
QString getFile() const;
|
QString getFile() const;
|
||||||
|
|
||||||
//! Needed for proper event handling
|
//! Needed for proper event handling
|
||||||
bool eventFilter(QObject* obj, QEvent* ev);
|
virtual bool eventFilter(QObject* obj, QEvent* ev) Q_DECL_OVERRIDE;
|
||||||
|
|
||||||
//! Returns the directory/file setting
|
//! Returns the directory/file setting
|
||||||
//! \return True, if a directory dialog is being shown, false if a file dialog
|
//! \return True, if a directory dialog is being shown, false if a file dialog
|
||||||
|
@ -82,10 +82,10 @@ private slots:
|
||||||
void onToolButtonClicked();
|
void onToolButtonClicked();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void dragEnterEvent(QDragEnterEvent* event);
|
virtual void dragEnterEvent(QDragEnterEvent* event) Q_DECL_OVERRIDE;
|
||||||
void dragMoveEvent(QDragMoveEvent* event);
|
virtual void dragMoveEvent(QDragMoveEvent* event) Q_DECL_OVERRIDE;
|
||||||
void dragLeaveEvent(QDragLeaveEvent* event);
|
virtual void dragLeaveEvent(QDragLeaveEvent* event) Q_DECL_OVERRIDE;
|
||||||
void dropEvent(QDropEvent* event);
|
virtual void dropEvent(QDropEvent* event) Q_DECL_OVERRIDE;
|
||||||
|
|
||||||
//! This function checks the mime data, if it is compatible with the filters
|
//! This function checks the mime data, if it is compatible with the filters
|
||||||
virtual bool checkMimeData(const QMimeData* data, QString& getFile) const;
|
virtual bool checkMimeData(const QMimeData* data, QString& getFile) const;
|
||||||
|
|
|
@ -41,7 +41,7 @@ public:
|
||||||
virtual ~VShortcutEditWidget() Q_DECL_OVERRIDE;
|
virtual ~VShortcutEditWidget() Q_DECL_OVERRIDE;
|
||||||
|
|
||||||
//! Needed for proper event handling
|
//! Needed for proper event handling
|
||||||
bool eventFilter(QObject* obj, QEvent* evenvt);
|
virtual bool eventFilter(QObject* obj, QEvent* evenvt) Q_DECL_OVERRIDE;
|
||||||
|
|
||||||
//! Returns the currently set shortcut
|
//! Returns the currently set shortcut
|
||||||
QString getShortcutAsString() const;
|
QString getShortcutAsString() const;
|
||||||
|
|
|
@ -84,7 +84,7 @@ private slots:
|
||||||
void dataSubmitted(VProperty* property);
|
void dataSubmitted(VProperty* property);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void showEvent(QShowEvent* event);
|
virtual void showEvent(QShowEvent* event) Q_DECL_OVERRIDE;
|
||||||
|
|
||||||
//! Rebuilds the widegt only if it is visible
|
//! Rebuilds the widegt only if it is visible
|
||||||
void updatePropertyList();
|
void updatePropertyList();
|
||||||
|
|
|
@ -75,7 +75,7 @@ public:
|
||||||
virtual VProperty* getProperty(const QString& id);
|
virtual VProperty* getProperty(const QString& id);
|
||||||
|
|
||||||
//! Returns the item flags for the given index
|
//! Returns the item flags for the given index
|
||||||
virtual Qt::ItemFlags flags (const QModelIndex& index) const;
|
virtual Qt::ItemFlags flags (const QModelIndex& index) const Q_DECL_OVERRIDE;
|
||||||
|
|
||||||
//! Sets the role data for the item at index to value
|
//! Sets the role data for the item at index to value
|
||||||
virtual bool setData (const QModelIndex& index, const QVariant& value, int role = Qt::EditRole) Q_DECL_OVERRIDE;
|
virtual bool setData (const QModelIndex& index, const QVariant& value, int role = Qt::EditRole) Q_DECL_OVERRIDE;
|
||||||
|
|
|
@ -192,8 +192,8 @@ void DialogCubicBezier::PointNameChanged()
|
||||||
|
|
||||||
if (not data->IsUnique(spline.name()))
|
if (not data->IsUnique(spline.name()))
|
||||||
{
|
{
|
||||||
newDuplicate = DNumber(spline.name());
|
newDuplicate = static_cast<qint32>(DNumber(spline.name()));
|
||||||
spline.SetDuplicate(newDuplicate);
|
spline.SetDuplicate(static_cast<quint32>(newDuplicate));
|
||||||
}
|
}
|
||||||
ui->lineEditSplineName->setText(spline.name());
|
ui->lineEditSplineName->setText(spline.name());
|
||||||
}
|
}
|
||||||
|
|
|
@ -229,8 +229,8 @@ void DialogCubicBezierPath::currentPointChanged(int index)
|
||||||
|
|
||||||
if (not data->IsUnique(newPath.name()))
|
if (not data->IsUnique(newPath.name()))
|
||||||
{
|
{
|
||||||
newDuplicate = DNumber(newPath.name());
|
newDuplicate = static_cast<qint32>(DNumber(newPath.name()));
|
||||||
newPath.SetDuplicate(newDuplicate);
|
newPath.SetDuplicate(static_cast<quint32>(newDuplicate));
|
||||||
}
|
}
|
||||||
|
|
||||||
ui->lineEditSplPathName->setText(newPath.name());
|
ui->lineEditSplPathName->setText(newPath.name());
|
||||||
|
|
|
@ -483,8 +483,8 @@ void DialogSpline::PointNameChanged()
|
||||||
|
|
||||||
if (not data->IsUnique(spline.name()))
|
if (not data->IsUnique(spline.name()))
|
||||||
{
|
{
|
||||||
newDuplicate = DNumber(spline.name());
|
newDuplicate = static_cast<qint32>(DNumber(spline.name()));
|
||||||
spline.SetDuplicate(newDuplicate);
|
spline.SetDuplicate(static_cast<quint32>(newDuplicate));
|
||||||
}
|
}
|
||||||
ui->lineEditSplineName->setText(spline.name());
|
ui->lineEditSplineName->setText(spline.name());
|
||||||
}
|
}
|
||||||
|
|
|
@ -677,8 +677,8 @@ void DialogSplinePath::currentPointChanged(int index)
|
||||||
|
|
||||||
if (not data->IsUnique(newPath.name()))
|
if (not data->IsUnique(newPath.name()))
|
||||||
{
|
{
|
||||||
newDuplicate = DNumber(newPath.name());
|
newDuplicate = static_cast<qint32>(DNumber(newPath.name()));
|
||||||
newPath.SetDuplicate(newDuplicate);
|
newPath.SetDuplicate(static_cast<quint32>(newDuplicate));
|
||||||
}
|
}
|
||||||
|
|
||||||
ui->lineEditSplPathName->setText(newPath.name());
|
ui->lineEditSplPathName->setText(newPath.name());
|
||||||
|
|
|
@ -250,7 +250,7 @@ protected:
|
||||||
*/
|
*/
|
||||||
virtual void SaveData() {}
|
virtual void SaveData() {}
|
||||||
void MoveCursorToEnd(QPlainTextEdit *plainTextEdit);
|
void MoveCursorToEnd(QPlainTextEdit *plainTextEdit);
|
||||||
bool eventFilter(QObject *object, QEvent *event);
|
virtual bool eventFilter(QObject *object, QEvent *event) Q_DECL_OVERRIDE;
|
||||||
quint32 DNumber(const QString &baseName) const;
|
quint32 DNumber(const QString &baseName) const;
|
||||||
private:
|
private:
|
||||||
void FillList(QComboBox *box, const QMap<QString, quint32> &list)const;
|
void FillList(QComboBox *box, const QMap<QString, quint32> &list)const;
|
||||||
|
|
|
@ -63,7 +63,7 @@ public slots:
|
||||||
virtual void ChosenObject(quint32 id, const SceneObject &type) Q_DECL_OVERRIDE;
|
virtual void ChosenObject(quint32 id, const SceneObject &type) Q_DECL_OVERRIDE;
|
||||||
virtual void PointNameChanged() Q_DECL_OVERRIDE;
|
virtual void PointNameChanged() Q_DECL_OVERRIDE;
|
||||||
protected:
|
protected:
|
||||||
virtual void ShowVisualization();
|
virtual void ShowVisualization() Q_DECL_OVERRIDE;
|
||||||
/**
|
/**
|
||||||
* @brief SaveData Put dialog data in local variables
|
* @brief SaveData Put dialog data in local variables
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -51,7 +51,7 @@ public:
|
||||||
int getIndexD1() const;
|
int getIndexD1() const;
|
||||||
int getIndexD2() const;
|
int getIndexD2() const;
|
||||||
public slots:
|
public slots:
|
||||||
void ChosenObject(quint32 id, const SceneObject &type);
|
virtual void ChosenObject(quint32 id, const SceneObject &type) Q_DECL_OVERRIDE;
|
||||||
private:
|
private:
|
||||||
Q_DISABLE_COPY(DialogUnionDetails)
|
Q_DISABLE_COPY(DialogUnionDetails)
|
||||||
|
|
||||||
|
|
|
@ -289,7 +289,7 @@ void VToolSplinePath::SetSplinePathAttributes(QDomElement &domElement, const VSp
|
||||||
/**
|
/**
|
||||||
* @brief UpdatePathPoints update spline path in pattern file.
|
* @brief UpdatePathPoints update spline path in pattern file.
|
||||||
* @param doc dom document container.
|
* @param doc dom document container.
|
||||||
* @param node tag in file.
|
* @param element tag in file.
|
||||||
* @param path spline path.
|
* @param path spline path.
|
||||||
*/
|
*/
|
||||||
void VToolSplinePath::UpdatePathPoints(VAbstractPattern *doc, QDomElement &element, const VSplinePath &path)
|
void VToolSplinePath::UpdatePathPoints(VAbstractPattern *doc, QDomElement &element, const VSplinePath &path)
|
||||||
|
|
|
@ -63,7 +63,7 @@ signals:
|
||||||
protected:
|
protected:
|
||||||
virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event ) Q_DECL_OVERRIDE;
|
virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event ) Q_DECL_OVERRIDE;
|
||||||
virtual void AddToFile() Q_DECL_OVERRIDE;
|
virtual void AddToFile() Q_DECL_OVERRIDE;
|
||||||
QVariant itemChange ( GraphicsItemChange change, const QVariant &value );
|
virtual QVariant itemChange ( GraphicsItemChange change, const QVariant &value ) Q_DECL_OVERRIDE;
|
||||||
virtual void DeleteTool(bool ask = true) Q_DECL_OVERRIDE;
|
virtual void DeleteTool(bool ask = true) Q_DECL_OVERRIDE;
|
||||||
virtual void SaveDialog(QDomElement &domElement) Q_DECL_OVERRIDE;
|
virtual void SaveDialog(QDomElement &domElement) Q_DECL_OVERRIDE;
|
||||||
virtual void hoverEnterEvent ( QGraphicsSceneHoverEvent * event ) Q_DECL_OVERRIDE;
|
virtual void hoverEnterEvent ( QGraphicsSceneHoverEvent * event ) Q_DECL_OVERRIDE;
|
||||||
|
|
|
@ -69,7 +69,7 @@ protected:
|
||||||
QColor currentColor;
|
QColor currentColor;
|
||||||
|
|
||||||
void AddToModeling(const QDomElement &domElement);
|
void AddToModeling(const QDomElement &domElement);
|
||||||
virtual void SetVisualization() {}
|
virtual void SetVisualization() Q_DECL_OVERRIDE {}
|
||||||
|
|
||||||
virtual void ShowNode()=0;
|
virtual void ShowNode()=0;
|
||||||
virtual void HideNode()=0;
|
virtual void HideNode()=0;
|
||||||
|
|
|
@ -44,7 +44,6 @@ const QString VNodeArc::ToolType = QStringLiteral("modeling");
|
||||||
* @param typeCreation way we create this tool.
|
* @param typeCreation way we create this tool.
|
||||||
* @param idTool tool id.
|
* @param idTool tool id.
|
||||||
* @param qoParent QObject parent
|
* @param qoParent QObject parent
|
||||||
* @param parent parent object.
|
|
||||||
*/
|
*/
|
||||||
VNodeArc::VNodeArc(VAbstractPattern *doc, VContainer *data, quint32 id, quint32 idArc, const Source &typeCreation,
|
VNodeArc::VNodeArc(VAbstractPattern *doc, VContainer *data, quint32 id, quint32 idArc, const Source &typeCreation,
|
||||||
const quint32 &idTool, QObject *qoParent)
|
const quint32 &idTool, QObject *qoParent)
|
||||||
|
@ -63,7 +62,6 @@ VNodeArc::VNodeArc(VAbstractPattern *doc, VContainer *data, quint32 id, quint32
|
||||||
* @param parse parser file mode.
|
* @param parse parser file mode.
|
||||||
* @param typeCreation way we create this tool.
|
* @param typeCreation way we create this tool.
|
||||||
* @param idTool tool id.
|
* @param idTool tool id.
|
||||||
* @param parent QObject parent
|
|
||||||
*/
|
*/
|
||||||
void VNodeArc::Create(VAbstractPattern *doc, VContainer *data, quint32 id, quint32 idArc,
|
void VNodeArc::Create(VAbstractPattern *doc, VContainer *data, quint32 id, quint32 idArc,
|
||||||
const Document &parse, const Source &typeCreation, const quint32 &idTool)
|
const Document &parse, const Source &typeCreation, const quint32 &idTool)
|
||||||
|
|
|
@ -77,7 +77,6 @@ VNodePoint::VNodePoint(VAbstractPattern *doc, VContainer *data, quint32 id, quin
|
||||||
* @param parse parser file mode.
|
* @param parse parser file mode.
|
||||||
* @param typeCreation way we create this tool.
|
* @param typeCreation way we create this tool.
|
||||||
* @param idTool tool id.
|
* @param idTool tool id.
|
||||||
* @param parent QObject parent
|
|
||||||
*/
|
*/
|
||||||
void VNodePoint::Create(VAbstractPattern *doc, VContainer *data, VMainGraphicsScene *scene,
|
void VNodePoint::Create(VAbstractPattern *doc, VContainer *data, VMainGraphicsScene *scene,
|
||||||
quint32 id, quint32 idPoint, const Document &parse,
|
quint32 id, quint32 idPoint, const Document &parse,
|
||||||
|
|
|
@ -44,7 +44,6 @@ const QString VNodeSpline::ToolType = QStringLiteral("modelingSpline");
|
||||||
* @param typeCreation way we create this tool.
|
* @param typeCreation way we create this tool.
|
||||||
* @param idTool id node.
|
* @param idTool id node.
|
||||||
* @param qoParent QObject parent.
|
* @param qoParent QObject parent.
|
||||||
* @param parent QGraphicsItem parent.
|
|
||||||
*/
|
*/
|
||||||
VNodeSpline::VNodeSpline(VAbstractPattern *doc, VContainer *data, quint32 id, quint32 idSpline,
|
VNodeSpline::VNodeSpline(VAbstractPattern *doc, VContainer *data, quint32 id, quint32 idSpline,
|
||||||
const Source &typeCreation, const quint32 &idTool, QObject *qoParent)
|
const Source &typeCreation, const quint32 &idTool, QObject *qoParent)
|
||||||
|
|
|
@ -45,7 +45,6 @@ const QString VNodeSplinePath::ToolType = QStringLiteral("modelingPath");
|
||||||
* @param typeCreation way we create this tool.
|
* @param typeCreation way we create this tool.
|
||||||
* @param idTool tool id.
|
* @param idTool tool id.
|
||||||
* @param qoParent QObject parent.
|
* @param qoParent QObject parent.
|
||||||
* @param parent parent object.
|
|
||||||
*/
|
*/
|
||||||
VNodeSplinePath::VNodeSplinePath(VAbstractPattern *doc, VContainer *data, quint32 id, quint32 idSpline,
|
VNodeSplinePath::VNodeSplinePath(VAbstractPattern *doc, VContainer *data, quint32 id, quint32 idSpline,
|
||||||
const Source &typeCreation, const quint32 &idTool, QObject *qoParent)
|
const Source &typeCreation, const quint32 &idTool, QObject *qoParent)
|
||||||
|
@ -64,7 +63,6 @@ VNodeSplinePath::VNodeSplinePath(VAbstractPattern *doc, VContainer *data, quint3
|
||||||
* @param parse parser file mode.
|
* @param parse parser file mode.
|
||||||
* @param typeCreation way we create this tool.
|
* @param typeCreation way we create this tool.
|
||||||
* @param idTool tool id.
|
* @param idTool tool id.
|
||||||
* @param parent QObject parent.
|
|
||||||
*/
|
*/
|
||||||
void VNodeSplinePath::Create(VAbstractPattern *doc, VContainer *data, quint32 id,
|
void VNodeSplinePath::Create(VAbstractPattern *doc, VContainer *data, quint32 id,
|
||||||
quint32 idSpline, const Document &parse, const Source &typeCreation, const quint32 &idTool)
|
quint32 idSpline, const Document &parse, const Source &typeCreation, const quint32 &idTool)
|
||||||
|
|
|
@ -90,7 +90,6 @@ VToolUnionDetails::VToolUnionDetails(VAbstractPattern *doc, VContainer *data, co
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
/**
|
/**
|
||||||
* @brief AddToNewDetail create united detail adding one node per time.
|
* @brief AddToNewDetail create united detail adding one node per time.
|
||||||
* @param tool tool that make union.
|
|
||||||
* @param doc dom document container.
|
* @param doc dom document container.
|
||||||
* @param data container with variables.
|
* @param data container with variables.
|
||||||
* @param newDetail united detail.
|
* @param newDetail united detail.
|
||||||
|
@ -278,7 +277,6 @@ void VToolUnionDetails::AddToNewDetail(VMainGraphicsScene *scene, VAbstractPatte
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
/**
|
/**
|
||||||
* @brief UpdatePoints update data for united details.
|
* @brief UpdatePoints update data for united details.
|
||||||
* @param idDetail id united detail.
|
|
||||||
* @param data container with variables.
|
* @param data container with variables.
|
||||||
* @param det detail what we union.
|
* @param det detail what we union.
|
||||||
* @param i index node in detail.
|
* @param i index node in detail.
|
||||||
|
|
|
@ -65,7 +65,7 @@ signals:
|
||||||
void PointChoosed();
|
void PointChoosed();
|
||||||
void PointSelected(bool selected);
|
void PointSelected(bool selected);
|
||||||
protected:
|
protected:
|
||||||
QVariant itemChange ( GraphicsItemChange change, const QVariant &value );
|
virtual QVariant itemChange ( GraphicsItemChange change, const QVariant &value ) Q_DECL_OVERRIDE;
|
||||||
virtual void hoverEnterEvent ( QGraphicsSceneHoverEvent *event ) Q_DECL_OVERRIDE;
|
virtual void hoverEnterEvent ( QGraphicsSceneHoverEvent *event ) Q_DECL_OVERRIDE;
|
||||||
virtual void hoverLeaveEvent ( QGraphicsSceneHoverEvent *event ) Q_DECL_OVERRIDE;
|
virtual void hoverLeaveEvent ( QGraphicsSceneHoverEvent *event ) Q_DECL_OVERRIDE;
|
||||||
virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent *event ) Q_DECL_OVERRIDE;
|
virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent *event ) Q_DECL_OVERRIDE;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user