NULL (0) replaced with nullptr.

--HG--
branch : feature
This commit is contained in:
dismine 2014-02-26 11:22:05 +02:00
parent 42c54aa503
commit 4fcd7d9b25
92 changed files with 127 additions and 126 deletions

View File

@ -42,8 +42,8 @@ public:
* @brief Calculator class constructor. * @brief Calculator class constructor.
* @param data pointer to a variable container. * @param data pointer to a variable container.
*/ */
explicit Calculator(const VContainer *data):errorMsg(0), token(QString()), tok(0), token_type(0), prog(QString()), explicit Calculator(const VContainer *data):errorMsg(nullptr), token(QString()), tok(0), token_type(0),
index(0), data(data), debugFormula(QString()){} prog(QString()), index(0), data(data), debugFormula(QString()){}
/** /**
* @brief eval calculate formula. * @brief eval calculate formula.
* @param prog string of formula. * @param prog string of formula.

View File

@ -76,7 +76,7 @@ public:
template <typename T> template <typename T>
const T GeometricObject(quint32 id) const const T GeometricObject(quint32 id) const
{ {
VGObject *gObj = 0; VGObject *gObj = nullptr;
if (gObjects.contains(id)) if (gObjects.contains(id))
{ {
gObj = gObjects.value(id); gObj = gObjects.value(id);

View File

@ -29,7 +29,7 @@
#include "configdialog.h" #include "configdialog.h"
ConfigDialog::ConfigDialog(QWidget *parent) : ConfigDialog::ConfigDialog(QWidget *parent) :
QDialog(parent), contentsWidget(0), pagesWidget(0), configurationPage(0), patternPage(0) QDialog(parent), contentsWidget(nullptr), pagesWidget(nullptr), configurationPage(nullptr), patternPage(nullptr)
{ {
contentsWidget = new QListWidget; contentsWidget = new QListWidget;
Q_CHECK_PTR(contentsWidget); Q_CHECK_PTR(contentsWidget);

View File

@ -40,7 +40,7 @@ class ConfigDialog : public QDialog
{ {
Q_OBJECT Q_OBJECT
public: public:
explicit ConfigDialog(QWidget *parent = 0); explicit ConfigDialog(QWidget *parent = nullptr);
public slots: public slots:
void changePage(QListWidgetItem *current, QListWidgetItem *previous); void changePage(QListWidgetItem *current, QListWidgetItem *previous);
protected: protected:

View File

@ -50,7 +50,7 @@ public:
* @param doc dom document container * @param doc dom document container
* @param parent parent widget * @param parent parent widget
*/ */
DialogHistory(VContainer *data, VPattern *doc, QWidget *parent = 0); DialogHistory(VContainer *data, VPattern *doc, QWidget *parent = nullptr);
virtual ~DialogHistory(); virtual ~DialogHistory();
public slots: public slots:
/** /**

View File

@ -419,8 +419,8 @@ void DialogIncrements::AddIncrementToFile(quint32 id, QString name, qreal base,
void DialogIncrements::cellChanged ( qint32 row, qint32 column ) void DialogIncrements::cellChanged ( qint32 row, qint32 column )
{ {
QTableWidgetItem *item = 0; QTableWidgetItem *item = nullptr;
QTableWidgetItem *itemName = 0; QTableWidgetItem *itemName = nullptr;
quint32 id; quint32 id;
QDomElement domElement; QDomElement domElement;
this->row = row; this->row = row;

View File

@ -50,7 +50,7 @@ public:
* @param doc dom document container * @param doc dom document container
* @param parent parent widget * @param parent parent widget
*/ */
DialogIncrements(VContainer *data, VPattern *doc, QWidget *parent = 0); DialogIncrements(VContainer *data, VPattern *doc, QWidget *parent = nullptr);
~DialogIncrements(); ~DialogIncrements();
public slots: public slots:
/** /**

View File

@ -40,7 +40,7 @@ class DialogIndividualMeasurements : public QDialog
Q_OBJECT Q_OBJECT
public: public:
explicit DialogIndividualMeasurements(QWidget *parent = 0); explicit DialogIndividualMeasurements(QWidget *parent = nullptr);
~DialogIndividualMeasurements(); ~DialogIndividualMeasurements();
QString name() const; QString name() const;
QString tablePath() const; QString tablePath() const;

View File

@ -49,7 +49,7 @@ class DialogMeasurements : public QDialog
{ {
Q_OBJECT Q_OBJECT
public: public:
explicit DialogMeasurements(QWidget *parent = 0); explicit DialogMeasurements(QWidget *parent = nullptr);
~DialogMeasurements(); ~DialogMeasurements();
Measurements::Type type() const; Measurements::Type type() const;
private: private:

View File

@ -40,7 +40,7 @@ class DialogPatternProperties : public QDialog
{ {
Q_OBJECT Q_OBJECT
public: public:
DialogPatternProperties(VPattern *doc, QWidget *parent = 0); DialogPatternProperties(VPattern *doc, QWidget *parent = nullptr);
virtual ~DialogPatternProperties(); virtual ~DialogPatternProperties();
signals: signals:
void haveChange(); void haveChange();

View File

@ -39,7 +39,7 @@ class DialogStandardMeasurements : public QDialog
{ {
Q_OBJECT Q_OBJECT
public: public:
explicit DialogStandardMeasurements(QWidget *parent = 0); explicit DialogStandardMeasurements(QWidget *parent = nullptr);
~DialogStandardMeasurements(); ~DialogStandardMeasurements();
QString name() const; QString name() const;
QString tablePath() const; QString tablePath() const;

View File

@ -35,7 +35,7 @@ class ConfigurationPage : public QWidget
{ {
Q_OBJECT Q_OBJECT
public: public:
ConfigurationPage(QWidget *parent = 0); ConfigurationPage(QWidget *parent = nullptr);
void Apply(); void Apply();
public slots: public slots:
void LangChenged(); void LangChenged();
@ -54,7 +54,7 @@ class PatternPage : public QWidget
{ {
Q_OBJECT Q_OBJECT
public: public:
PatternPage(QWidget *parent = 0); PatternPage(QWidget *parent = nullptr);
void Apply(); void Apply();
private: private:
Q_DISABLE_COPY(PatternPage) Q_DISABLE_COPY(PatternPage)

View File

@ -48,7 +48,7 @@ public:
* @param data container with data * @param data container with data
* @param parent parent widget * @param parent parent widget
*/ */
DialogAlongLine(const VContainer *data, QWidget *parent = 0); DialogAlongLine(const VContainer *data, QWidget *parent = nullptr);
~DialogAlongLine(); ~DialogAlongLine();
/** /**
* @brief getPointName return name of point * @brief getPointName return name of point

View File

@ -34,7 +34,7 @@
DialogArc::DialogArc(const VContainer *data, QWidget *parent) DialogArc::DialogArc(const VContainer *data, QWidget *parent)
:DialogTool(data, parent), ui(new Ui::DialogArc), flagRadius(false), flagF1(false), flagF2(false), :DialogTool(data, parent), ui(new Ui::DialogArc), flagRadius(false), flagF1(false), flagF2(false),
timerRadius(0), timerF1(0), timerF2(0), center(0), radius(QString()), f1(QString()), f2(QString()) timerRadius(nullptr), timerF1(nullptr), timerF2(nullptr), center(0), radius(QString()), f1(QString()), f2(QString())
{ {
ui->setupUi(this); ui->setupUi(this);

View File

@ -48,7 +48,7 @@ public:
* @param data container with data * @param data container with data
* @param parent parent widget * @param parent parent widget
*/ */
DialogArc(const VContainer *data, QWidget *parent = 0); DialogArc(const VContainer *data, QWidget *parent = nullptr);
~DialogArc(); ~DialogArc();
/** /**
* @brief GetCenter return id of center point * @brief GetCenter return id of center point

View File

@ -48,7 +48,7 @@ public:
* @param data container with data * @param data container with data
* @param parent parent widget * @param parent parent widget
*/ */
DialogBisector(const VContainer *data, QWidget *parent = 0); DialogBisector(const VContainer *data, QWidget *parent = nullptr);
~DialogBisector(); ~DialogBisector();
/** /**
* @brief getPointName return name of point * @brief getPointName return name of point

View File

@ -48,7 +48,7 @@ public:
* @param data container with data * @param data container with data
* @param parent parent widget * @param parent parent widget
*/ */
DialogCutArc(const VContainer *data, QWidget *parent = 0); DialogCutArc(const VContainer *data, QWidget *parent = nullptr);
~DialogCutArc(); ~DialogCutArc();
/** /**
* @brief getPointName return name point on arc * @brief getPointName return name point on arc

View File

@ -48,7 +48,7 @@ public:
* @param data container with data * @param data container with data
* @param parent parent widget * @param parent parent widget
*/ */
DialogCutSpline(const VContainer *data, QWidget *parent = 0); DialogCutSpline(const VContainer *data, QWidget *parent = nullptr);
~DialogCutSpline(); ~DialogCutSpline();
/** /**
* @brief getPointName return name of point * @brief getPointName return name of point

View File

@ -48,7 +48,7 @@ public:
* @param data container with data * @param data container with data
* @param parent parent widget * @param parent parent widget
*/ */
DialogCutSplinePath(const VContainer *data, QWidget *parent = 0); DialogCutSplinePath(const VContainer *data, QWidget *parent = nullptr);
~DialogCutSplinePath(); ~DialogCutSplinePath();
/** /**
* @brief getPointName return name of point * @brief getPointName return name of point

View File

@ -44,7 +44,7 @@ public:
* @param data container with data * @param data container with data
* @param parent parent widget * @param parent parent widget
*/ */
DialogDetail(const VContainer *data, QWidget *parent = 0); DialogDetail(const VContainer *data, QWidget *parent = nullptr);
/** /**
* @brief getDetails return detail * @brief getDetails return detail
* @return detail * @return detail

View File

@ -48,7 +48,7 @@ public:
* @param data container with data * @param data container with data
* @param parent parent widget * @param parent parent widget
*/ */
DialogEndLine(const VContainer *data, QWidget *parent = 0); DialogEndLine(const VContainer *data, QWidget *parent = nullptr);
~DialogEndLine(); ~DialogEndLine();
/** /**
* @brief getPointName return name of point * @brief getPointName return name of point

View File

@ -48,7 +48,7 @@ public:
* @param data container with data * @param data container with data
* @param parent parent widget * @param parent parent widget
*/ */
DialogHeight(const VContainer *data, QWidget *parent = 0); DialogHeight(const VContainer *data, QWidget *parent = nullptr);
~DialogHeight(); ~DialogHeight();
/** /**
* @brief getPointName return name of point * @brief getPointName return name of point

View File

@ -48,7 +48,7 @@ public:
* @param data container with data * @param data container with data
* @param parent parent widget * @param parent parent widget
*/ */
DialogLine(const VContainer *data, QWidget *parent = 0); DialogLine(const VContainer *data, QWidget *parent = nullptr);
~DialogLine(); ~DialogLine();
/** /**
* @brief getFirstPoint return id first point * @brief getFirstPoint return id first point

View File

@ -48,7 +48,7 @@ public:
* @param data container with data * @param data container with data
* @param parent parent widget * @param parent parent widget
*/ */
DialogLineIntersect(const VContainer *data, QWidget *parent = 0); DialogLineIntersect(const VContainer *data, QWidget *parent = nullptr);
~DialogLineIntersect(); ~DialogLineIntersect();
/** /**
* @brief getP1Line1 return id first point of first line * @brief getP1Line1 return id first point of first line

View File

@ -48,7 +48,7 @@ public:
* @param data container with data * @param data container with data
* @param parent parent widget * @param parent parent widget
*/ */
DialogNormal(const VContainer *data, QWidget *parent = 0); DialogNormal(const VContainer *data, QWidget *parent = nullptr);
~DialogNormal(); ~DialogNormal();
/** /**
* @brief getPointName return name of point * @brief getPointName return name of point

View File

@ -44,7 +44,7 @@ public:
* @param data container with data * @param data container with data
* @param parent parent widget * @param parent parent widget
*/ */
DialogPointOfContact(const VContainer *data, QWidget *parent = 0); DialogPointOfContact(const VContainer *data, QWidget *parent = nullptr);
/** /**
* @brief getPointName return name of point * @brief getPointName return name of point
* @return name * @return name

View File

@ -48,7 +48,7 @@ public:
* @param data container with data * @param data container with data
* @param parent parent widget * @param parent parent widget
*/ */
DialogPointOfIntersection(const VContainer *data, QWidget *parent = 0); DialogPointOfIntersection(const VContainer *data, QWidget *parent = nullptr);
~DialogPointOfIntersection(); ~DialogPointOfIntersection();
/** /**
* @brief getPointName return name of point * @brief getPointName return name of point

View File

@ -48,7 +48,7 @@ public:
* @param data container with data * @param data container with data
* @param parent parent widget * @param parent parent widget
*/ */
DialogShoulderPoint(const VContainer *data, QWidget *parent = 0); DialogShoulderPoint(const VContainer *data, QWidget *parent = nullptr);
~DialogShoulderPoint(); ~DialogShoulderPoint();
/** /**
* @brief getPointName return name of point * @brief getPointName return name of point

View File

@ -48,7 +48,7 @@ public:
* @param data container with data * @param data container with data
* @param parent parent widget * @param parent parent widget
*/ */
DialogSinglePoint(const VContainer *data, QWidget *parent = 0); DialogSinglePoint(const VContainer *data, QWidget *parent = nullptr);
~DialogSinglePoint(); ~DialogSinglePoint();
/** /**
* @brief setData set name and point * @brief setData set name and point

View File

@ -48,7 +48,7 @@ public:
* @param data container with data * @param data container with data
* @param parent parent widget * @param parent parent widget
*/ */
DialogSpline(const VContainer *data, QWidget *parent = 0); DialogSpline(const VContainer *data, QWidget *parent = nullptr);
~DialogSpline(); ~DialogSpline();
/** /**
* @brief getP1 return id first point of spline * @brief getP1 return id first point of spline

View File

@ -49,7 +49,7 @@ public:
* @param data container with data * @param data container with data
* @param parent parent widget * @param parent parent widget
*/ */
DialogSplinePath(const VContainer *data, QWidget *parent = 0); DialogSplinePath(const VContainer *data, QWidget *parent = nullptr);
~DialogSplinePath(); ~DialogSplinePath();
/** /**
* @brief GetPath return spline path * @brief GetPath return spline path

View File

@ -34,11 +34,12 @@
#include <QtWidgets> #include <QtWidgets>
DialogTool::DialogTool(const VContainer *data, QWidget *parent) DialogTool::DialogTool(const VContainer *data, QWidget *parent)
:QDialog(parent), data(data), isInitialized(false), flagName(true), flagFormula(true), timerFormula(0), bOk(0), :QDialog(parent), data(data), isInitialized(false), flagName(true), flagFormula(true), timerFormula(nullptr),
spinBoxAngle(0), lineEditFormula(0), listWidget(0), labelResultCalculation(0), labelDescription(0), bOk(nullptr), spinBoxAngle(nullptr), lineEditFormula(nullptr), listWidget(nullptr),
labelEditNamePoint(0), labelEditFormula(0), radioButtonSizeGrowth(0), radioButtonStandardTable(0), labelResultCalculation(nullptr), labelDescription(nullptr), labelEditNamePoint(nullptr),
radioButtonIncrements(0), radioButtonLengthLine(0), radioButtonLengthArc(0), radioButtonLengthCurve(0), labelEditFormula(nullptr), radioButtonSizeGrowth(nullptr), radioButtonStandardTable(nullptr),
lineStyles(QStringList()) radioButtonIncrements(nullptr), radioButtonLengthLine(nullptr), radioButtonLengthArc(nullptr),
radioButtonLengthCurve(nullptr), lineStyles(QStringList())
{ {
Q_CHECK_PTR(data); Q_CHECK_PTR(data);
timerFormula = new QTimer(this); timerFormula = new QTimer(this);

View File

@ -63,7 +63,7 @@ public:
* @param data container with data * @param data container with data
* @param parent parent widget * @param parent parent widget
*/ */
DialogTool(const VContainer *data, QWidget *parent = 0); DialogTool(const VContainer *data, QWidget *parent = nullptr);
virtual ~DialogTool() {} virtual ~DialogTool() {}
signals: signals:
/** /**

View File

@ -48,7 +48,7 @@ public:
* @param data container with data * @param data container with data
* @param parent parent widget * @param parent parent widget
*/ */
DialogTriangle(const VContainer *data, QWidget *parent = 0); DialogTriangle(const VContainer *data, QWidget *parent = nullptr);
~DialogTriangle(); ~DialogTriangle();
/** /**
* @brief getAxisP1Id return id first point of axis * @brief getAxisP1Id return id first point of axis

View File

@ -48,7 +48,7 @@ public:
* @param data container with data * @param data container with data
* @param parent parent widget * @param parent parent widget
*/ */
DialogUnionDetails(const VContainer *data, QWidget *parent = 0); DialogUnionDetails(const VContainer *data, QWidget *parent = nullptr);
~DialogUnionDetails(); ~DialogUnionDetails();
/** /**
* @brief getD1 return id first detail * @brief getD1 return id first detail

View File

@ -79,7 +79,7 @@ public:
* @brief CriticalMessageBox show Critical Message Box. * @brief CriticalMessageBox show Critical Message Box.
* @param situation main text message box. * @param situation main text message box.
*/ */
virtual void CriticalMessageBox(const QString &situation, QWidget *parent = 0) const; virtual void CriticalMessageBox(const QString &situation, QWidget *parent = nullptr) const;
protected: protected:
/** /**
* @brief what string with error * @brief what string with error

View File

@ -48,11 +48,11 @@
MainWindow::MainWindow(QWidget *parent) MainWindow::MainWindow(QWidget *parent)
:QMainWindow(parent), ui(new Ui::MainWindow), pattern(0), doc(0), tool(Tool::ArrowTool), currentScene(0), :QMainWindow(parent), ui(new Ui::MainWindow), pattern(nullptr), doc(nullptr), tool(Tool::ArrowTool),
sceneDraw(0), sceneDetails(0), mouseCoordinate(0), helpLabel(0), view(0), isInitialized(false), dialogTable(0), currentScene(nullptr), sceneDraw(nullptr), sceneDetails(nullptr), mouseCoordinate(nullptr), helpLabel(nullptr),
dialogTool(0), dialogHistory(0), comboBoxDraws(0), curFile(QString()), mode(Draw::Calculation), view(nullptr), isInitialized(false), dialogTable(0), dialogTool(nullptr), dialogHistory(nullptr),
currentDrawIndex(0), currentToolBoxIndex(0), drawMode(true), recentFileActs{0,0,0,0,0}, separatorAct(0), comboBoxDraws(nullptr), curFile(QString()), mode(Draw::Calculation), currentDrawIndex(0), currentToolBoxIndex(0),
autoSaveTimer(0) drawMode(true), recentFileActs{0,0,0,0,0}, separatorAct(nullptr), autoSaveTimer(nullptr)
{ {
CreateActions(); CreateActions();
CreateMenus(); CreateMenus();
@ -650,7 +650,7 @@ void MainWindow::mouseMove(const QPointF &scenePos)
void MainWindow::CancelTool() void MainWindow::CancelTool()
{ {
delete dialogTool; delete dialogTool;
dialogTool = 0; dialogTool = nullptr;
switch ( tool ) switch ( tool )
{ {
case Tool::ArrowTool: case Tool::ArrowTool:
@ -1031,7 +1031,7 @@ void MainWindow::ClosedActionTable()
{ {
ui->actionTable->setChecked(false); ui->actionTable->setChecked(false);
delete dialogTable; delete dialogTable;
dialogTable = 0; dialogTable = nullptr;
} }
void MainWindow::ActionHistory(bool checked) void MainWindow::ActionHistory(bool checked)
@ -1336,7 +1336,7 @@ void MainWindow::InitAutoSave()
{ {
//Autosaving file each 5 minutes //Autosaving file each 5 minutes
delete autoSaveTimer; delete autoSaveTimer;
autoSaveTimer = 0; autoSaveTimer = nullptr;
QSettings settings(QSettings::IniFormat, QSettings::UserScope, QApplication::organizationName(), QSettings settings(QSettings::IniFormat, QSettings::UserScope, QApplication::organizationName(),
QApplication::applicationName()); QApplication::applicationName());

View File

@ -55,7 +55,7 @@ public:
* @brief MainWindow constructor. * @brief MainWindow constructor.
* @param parent parent widget. * @param parent parent widget.
*/ */
explicit MainWindow(QWidget *parent = 0); explicit MainWindow(QWidget *parent = nullptr);
~MainWindow(); ~MainWindow();
/** /**
* @brief LoadPattern open pattern file. * @brief LoadPattern open pattern file.

View File

@ -34,9 +34,9 @@
#include "options.h" #include "options.h"
TableWindow::TableWindow(QWidget *parent) TableWindow::TableWindow(QWidget *parent)
:QMainWindow(parent), numberDetal(0), colission(0), ui(new Ui::TableWindow), :QMainWindow(parent), numberDetal(nullptr), colission(nullptr), ui(new Ui::TableWindow),
listDetails(QVector<VItem*>()), outItems(false), collidingItems(false), tableScene(0), listDetails(QVector<VItem*>()), outItems(false), collidingItems(false), tableScene(nullptr),
paper(0), shadowPaper(0), listOutItems(0), listCollidingItems(QList<QGraphicsItem*>()), paper(nullptr), shadowPaper(nullptr), listOutItems(nullptr), listCollidingItems(QList<QGraphicsItem*>()),
indexDetail(0), sceneRect(QRectF()), fileName(QString()), description(QString()) indexDetail(0), sceneRect(QRectF()), fileName(QString()), description(QString())
{ {
ui->setupUi(this); ui->setupUi(this);

View File

@ -57,7 +57,7 @@ public:
* @brief TableWindow constructor. * @brief TableWindow constructor.
* @param parent parent widget. * @param parent parent widget.
*/ */
explicit TableWindow(QWidget *parent = 0); explicit TableWindow(QWidget *parent = nullptr);
~TableWindow(); ~TableWindow();
public slots: public slots:
/** /**

View File

@ -32,7 +32,7 @@ qreal VDrawTool::factor = 1;
VDrawTool::VDrawTool(VPattern *doc, VContainer *data, quint32 id) VDrawTool::VDrawTool(VPattern *doc, VContainer *data, quint32 id)
:VAbstractTool(doc, data, id), ignoreContextMenuEvent(false), ignoreFullUpdate(false), :VAbstractTool(doc, data, id), ignoreContextMenuEvent(false), ignoreFullUpdate(false),
nameActivDraw(doc->GetNameActivDraw()), dialog(0) nameActivDraw(doc->GetNameActivDraw()), dialog(nullptr)
{ {
connect(this->doc, &VPattern::ChangedActivDraw, this, &VDrawTool::ChangedActivDraw); connect(this->doc, &VPattern::ChangedActivDraw, this, &VDrawTool::ChangedActivDraw);
connect(this->doc, &VPattern::ChangedNameDraw, this, &VDrawTool::ChangedNameDraw); connect(this->doc, &VPattern::ChangedNameDraw, this, &VDrawTool::ChangedNameDraw);
@ -85,7 +85,7 @@ void VDrawTool::FullUpdateFromGui(int result)
} }
} }
delete dialog; delete dialog;
dialog = 0; dialog = nullptr;
} }
void VDrawTool::SetFactor(qreal factor) void VDrawTool::SetFactor(qreal factor)

View File

@ -134,7 +134,7 @@ protected:
{ {
QMenu menu; QMenu menu;
QAction *actionOption = menu.addAction(tr("Options")); QAction *actionOption = menu.addAction(tr("Options"));
QAction *actionRemove = 0; QAction *actionRemove = nullptr;
if (showRemove) if (showRemove)
{ {
actionRemove = menu.addAction(tr("Delete")); actionRemove = menu.addAction(tr("Delete"));

View File

@ -52,7 +52,7 @@ public:
*/ */
VToolAlongLine(VPattern *doc, VContainer *data, quint32 id, const QString &formula, VToolAlongLine(VPattern *doc, VContainer *data, quint32 id, const QString &formula,
const quint32 &firstPointId, const quint32 &secondPointId, const QString &typeLine, const quint32 &firstPointId, const quint32 &secondPointId, const QString &typeLine,
const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); const Tool::Sources &typeCreation, QGraphicsItem * parent = nullptr);
/** /**
* @brief setDialog set dialog when user want change tool option. * @brief setDialog set dialog when user want change tool option.
*/ */

View File

@ -49,7 +49,7 @@ public:
* @param parent parent object * @param parent parent object
*/ */
VToolArc(VPattern *doc, VContainer *data, quint32 id, const Tool::Sources &typeCreation, VToolArc(VPattern *doc, VContainer *data, quint32 id, const Tool::Sources &typeCreation,
QGraphicsItem * parent = 0); QGraphicsItem * parent = nullptr);
/** /**
* @brief setDialog set dialog when user want change tool option. * @brief setDialog set dialog when user want change tool option.
*/ */

View File

@ -53,7 +53,7 @@ public:
VToolBisector(VPattern *doc, VContainer *data, const quint32 &id, const QString &typeLine, VToolBisector(VPattern *doc, VContainer *data, const quint32 &id, const QString &typeLine,
const QString &formula, const quint32 &firstPointId, const quint32 &secondPointId, const QString &formula, const quint32 &firstPointId, const quint32 &secondPointId,
const quint32 &thirdPointId, const Tool::Sources &typeCreation, const quint32 &thirdPointId, const Tool::Sources &typeCreation,
QGraphicsItem * parent = 0); QGraphicsItem * parent = nullptr);
/** /**
* @brief FindPoint find bisector point. * @brief FindPoint find bisector point.
* @param firstPoint first point of angle. * @param firstPoint first point of angle.

View File

@ -53,7 +53,7 @@ public:
*/ */
VToolCutArc(VPattern *doc, VContainer *data, const quint32 &id, const QString &formula, VToolCutArc(VPattern *doc, VContainer *data, const quint32 &id, const QString &formula,
const quint32 &arcId, const quint32 &arc1id, const quint32 &arc2id, const quint32 &arcId, const quint32 &arc1id, const quint32 &arc2id,
const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); const Tool::Sources &typeCreation, QGraphicsItem * parent = nullptr);
/** /**
* @brief setDialog set dialog when user want change tool option. * @brief setDialog set dialog when user want change tool option.
*/ */

View File

@ -108,7 +108,7 @@ void VToolCutSpline::Create(const quint32 _id, const QString &pointName,
if (typeCreation == Tool::FromGui) if (typeCreation == Tool::FromGui)
{ {
VPointF *p = new VPointF(point.x(), point.y(), pointName, mx, my); VPointF *p = new VPointF(point.x(), point.y(), pointName, mx, my);
Q_CHECK_PTR(p != 0); Q_CHECK_PTR(p);
id = data->AddGObject(p); id = data->AddGObject(p);
VSpline *spline1 = new VSpline(spl->GetP1(), spl1p2, spl1p3, *p, spl->GetKcurve()); VSpline *spline1 = new VSpline(spl->GetP1(), spl1p2, spl1p3, *p, spl->GetKcurve());

View File

@ -51,7 +51,7 @@ public:
*/ */
VToolCutSpline(VPattern *doc, VContainer *data, const quint32 &id, const QString &formula, VToolCutSpline(VPattern *doc, VContainer *data, const quint32 &id, const QString &formula,
const quint32 &splineId, const quint32 &spl1id, const quint32 &spl2id, const quint32 &splineId, const quint32 &spl1id, const quint32 &spl2id,
const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); const Tool::Sources &typeCreation, QGraphicsItem * parent = nullptr);
/** /**
* @brief setDialog set dialog when user want change tool option. * @brief setDialog set dialog when user want change tool option.
*/ */

View File

@ -54,7 +54,7 @@ public:
*/ */
VToolCutSplinePath(VPattern *doc, VContainer *data, const quint32 &id, const QString &formula, VToolCutSplinePath(VPattern *doc, VContainer *data, const quint32 &id, const QString &formula,
const quint32 &splinePathId, const quint32 &splPath1id, const quint32 &splPath2id, const quint32 &splinePathId, const quint32 &splPath1id, const quint32 &splPath2id,
const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); const Tool::Sources &typeCreation, QGraphicsItem * parent = nullptr);
/** /**
* @brief setDialog set dialog when user want change tool option. * @brief setDialog set dialog when user want change tool option.
*/ */

View File

@ -52,7 +52,7 @@ public:
*/ */
VToolEndLine(VPattern *doc, VContainer *data, const quint32 &id, const QString &typeLine, VToolEndLine(VPattern *doc, VContainer *data, const quint32 &id, const QString &typeLine,
const QString &formula, const qreal &angle, const quint32 &basePointId, const QString &formula, const qreal &angle, const quint32 &basePointId,
const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); const Tool::Sources &typeCreation, QGraphicsItem * parent = nullptr);
/** /**
* @brief setDialog set dialog when user want change tool option. * @brief setDialog set dialog when user want change tool option.
*/ */

View File

@ -52,7 +52,7 @@ public:
*/ */
VToolHeight(VPattern *doc, VContainer *data, const quint32 &id, const QString &typeLine, VToolHeight(VPattern *doc, VContainer *data, const quint32 &id, const QString &typeLine,
const quint32 &basePointId, const quint32 &p1LineId, const quint32 &p2LineId, const quint32 &basePointId, const quint32 &p1LineId, const quint32 &p2LineId,
const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); const Tool::Sources &typeCreation, QGraphicsItem * parent = nullptr);
/** /**
* @brief setDialog set dialog when user want change tool option. * @brief setDialog set dialog when user want change tool option.
*/ */

View File

@ -53,7 +53,7 @@ public:
*/ */
VToolLine(VPattern *doc, VContainer *data, quint32 id, quint32 firstPoint, VToolLine(VPattern *doc, VContainer *data, quint32 id, quint32 firstPoint,
quint32 secondPoint, const QString &typeLine, const Tool::Sources &typeCreation, quint32 secondPoint, const QString &typeLine, const Tool::Sources &typeCreation,
QGraphicsItem * parent = 0); QGraphicsItem * parent = nullptr);
/** /**
* @brief setDialog set dialog when user want change tool option. * @brief setDialog set dialog when user want change tool option.
*/ */

View File

@ -52,7 +52,7 @@ public:
*/ */
VToolLineIntersect(VPattern *doc, VContainer *data, const quint32 &id, const quint32 &p1Line1, VToolLineIntersect(VPattern *doc, VContainer *data, const quint32 &id, const quint32 &p1Line1,
const quint32 &p2Line1, const quint32 &p1Line2, const quint32 &p2Line2, const quint32 &p2Line1, const quint32 &p1Line2, const quint32 &p2Line2,
const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); const Tool::Sources &typeCreation, QGraphicsItem * parent = nullptr);
/** /**
* @brief setDialog set dialog when user want change tool option. * @brief setDialog set dialog when user want change tool option.
*/ */

View File

@ -32,7 +32,7 @@ VToolLinePoint::VToolLinePoint(VPattern *doc, VContainer *data, const quint32 &i
const QString &typeLine, const QString &formula, const quint32 &basePointId, const QString &typeLine, const QString &formula, const quint32 &basePointId,
const qreal &angle, QGraphicsItem *parent) const qreal &angle, QGraphicsItem *parent)
:VToolPoint(doc, data, id, parent), formula(formula), angle(angle), basePointId(basePointId), :VToolPoint(doc, data, id, parent), formula(formula), angle(angle), basePointId(basePointId),
mainLine(0) mainLine(nullptr)
{ {
this->typeLine = typeLine; this->typeLine = typeLine;
Q_ASSERT_X(basePointId > 0, Q_FUNC_INFO, "basePointId <= 0"); Q_ASSERT_X(basePointId > 0, Q_FUNC_INFO, "basePointId <= 0");

View File

@ -51,7 +51,7 @@ public:
*/ */
VToolLinePoint(VPattern *doc, VContainer *data, const quint32 &id, const QString &typeLine, VToolLinePoint(VPattern *doc, VContainer *data, const quint32 &id, const QString &typeLine,
const QString &formula, const quint32 &basePointId, const qreal &angle, const QString &formula, const quint32 &basePointId, const qreal &angle,
QGraphicsItem * parent = 0); QGraphicsItem * parent = nullptr);
public slots: public slots:
/** /**
* @brief ChangedActivDraw disable or enable context menu after change active pattern peace. * @brief ChangedActivDraw disable or enable context menu after change active pattern peace.

View File

@ -54,7 +54,7 @@ public:
VToolNormal(VPattern *doc, VContainer *data, const quint32 &id, const QString &typeLine, VToolNormal(VPattern *doc, VContainer *data, const quint32 &id, const QString &typeLine,
const QString &formula, const qreal &angle, const quint32 &firstPointId, const QString &formula, const qreal &angle, const quint32 &firstPointId,
const quint32 &secondPointId, const Tool::Sources &typeCreation, const quint32 &secondPointId, const Tool::Sources &typeCreation,
QGraphicsItem * parent = 0); QGraphicsItem * parent = nullptr);
/** /**
* @brief setDialog set dialog when user want change tool option. * @brief setDialog set dialog when user want change tool option.
*/ */

View File

@ -46,7 +46,7 @@ public:
* @param id object id in container. * @param id object id in container.
* @param parent parent object. * @param parent parent object.
*/ */
VToolPoint(VPattern *doc, VContainer *data, quint32 id, QGraphicsItem * parent = 0); VToolPoint(VPattern *doc, VContainer *data, quint32 id, QGraphicsItem * parent = nullptr);
virtual ~VToolPoint(){} virtual ~VToolPoint(){}
static const QString TagName; static const QString TagName;
public slots: public slots:

View File

@ -52,7 +52,7 @@ public:
VToolPointOfContact(VPattern *doc, VContainer *data, const quint32 &id, VToolPointOfContact(VPattern *doc, VContainer *data, const quint32 &id,
const QString &arcRadius, const quint32 &center, const QString &arcRadius, const quint32 &center,
const quint32 &firstPointId, const quint32 &secondPointId, const quint32 &firstPointId, const quint32 &secondPointId,
const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); const Tool::Sources &typeCreation, QGraphicsItem * parent = nullptr);
/** /**
* @brief setDialog set dialog when user want change tool option. * @brief setDialog set dialog when user want change tool option.
*/ */

View File

@ -50,7 +50,7 @@ public:
*/ */
VToolPointOfIntersection(VPattern *doc, VContainer *data, const quint32 &id, VToolPointOfIntersection(VPattern *doc, VContainer *data, const quint32 &id,
const quint32 &firstPointId, const quint32 &secondPointId, const quint32 &firstPointId, const quint32 &secondPointId,
const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); const Tool::Sources &typeCreation, QGraphicsItem * parent = nullptr);
/** /**
* @brief setDialog set dialog when user want change tool option. * @brief setDialog set dialog when user want change tool option.
*/ */

View File

@ -54,7 +54,7 @@ public:
VToolShoulderPoint(VPattern *doc, VContainer *data, const quint32 &id, const QString &typeLine, VToolShoulderPoint(VPattern *doc, VContainer *data, const quint32 &id, const QString &typeLine,
const QString &formula, const quint32 &p1Line, const quint32 &p2Line, const QString &formula, const quint32 &p1Line, const quint32 &p2Line,
const quint32 &pShoulder, const Tool::Sources &typeCreation, const quint32 &pShoulder, const Tool::Sources &typeCreation,
QGraphicsItem * parent = 0); QGraphicsItem * parent = nullptr);
/** /**
* @brief setDialog set dialog when user want change tool option. * @brief setDialog set dialog when user want change tool option.
*/ */

View File

@ -48,7 +48,7 @@ public:
* @param parent parent object. * @param parent parent object.
*/ */
VToolSinglePoint (VPattern *doc, VContainer *data, quint32 id, const Tool::Sources &typeCreation, VToolSinglePoint (VPattern *doc, VContainer *data, quint32 id, const Tool::Sources &typeCreation,
QGraphicsItem * parent = 0 ); QGraphicsItem * parent = nullptr );
/** /**
* @brief setDialog set dialog when user want change tool option. * @brief setDialog set dialog when user want change tool option.
*/ */

View File

@ -50,7 +50,7 @@ public:
* @param parent parent object. * @param parent parent object.
*/ */
VToolSpline (VPattern *doc, VContainer *data, quint32 id, const Tool::Sources &typeCreation, VToolSpline (VPattern *doc, VContainer *data, quint32 id, const Tool::Sources &typeCreation,
QGraphicsItem * parent = 0 ); QGraphicsItem * parent = nullptr );
/** /**
* @brief setDialog set dialog when user want change tool option. * @brief setDialog set dialog when user want change tool option.
*/ */

View File

@ -49,7 +49,7 @@ public:
* @param parent parent object. * @param parent parent object.
*/ */
VToolSplinePath(VPattern *doc, VContainer *data, quint32 id, const Tool::Sources &typeCreation, VToolSplinePath(VPattern *doc, VContainer *data, quint32 id, const Tool::Sources &typeCreation,
QGraphicsItem * parent = 0); QGraphicsItem * parent = nullptr);
/** /**
* @brief setDialog set dialog when user want change tool option. * @brief setDialog set dialog when user want change tool option.
*/ */

View File

@ -52,7 +52,7 @@ public:
*/ */
VToolTriangle(VPattern *doc, VContainer *data, const quint32 &id, const quint32 &axisP1Id, VToolTriangle(VPattern *doc, VContainer *data, const quint32 &id, const quint32 &axisP1Id,
const quint32 &axisP2Id, const quint32 &firstPointId, const quint32 &secondPointId, const quint32 &axisP2Id, const quint32 &firstPointId, const quint32 &secondPointId,
const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); const Tool::Sources &typeCreation, QGraphicsItem * parent = nullptr);
/** /**
* @brief setDialog set dialog when user want change tool option. * @brief setDialog set dialog when user want change tool option.
*/ */

View File

@ -47,7 +47,7 @@ public:
* @param parent parent object. * @param parent parent object.
*/ */
VAbstractNode(VPattern *doc, VContainer *data, const quint32 &id, const quint32 &idNode, VAbstractNode(VPattern *doc, VContainer *data, const quint32 &id, const quint32 &idNode,
const quint32 &idTool, QObject *parent = 0); const quint32 &idTool, QObject *parent = nullptr);
virtual ~VAbstractNode() {} virtual ~VAbstractNode() {}
static const QString AttrIdObject; static const QString AttrIdObject;
static const QString AttrIdTool; static const QString AttrIdTool;

View File

@ -48,9 +48,8 @@ public:
* @param typeCreation way we create this tool. * @param typeCreation way we create this tool.
* @param parent parent object. * @param parent parent object.
*/ */
VNodeArc(VPattern *doc, VContainer *data, quint32 id, quint32 idArc, VNodeArc(VPattern *doc, VContainer *data, quint32 id, quint32 idArc, const Tool::Sources &typeCreation,
const Tool::Sources &typeCreation, const quint32 &idTool = 0, QObject *qoParent = 0, const quint32 &idTool = 0, QObject *qoParent = nullptr, QGraphicsItem * parent = nullptr);
QGraphicsItem * parent = 0);
/** /**
* @brief Create help create tool. * @brief Create help create tool.
* @param doc dom document container. * @param doc dom document container.
@ -61,7 +60,7 @@ public:
* @param typeCreation way we create this tool. * @param typeCreation way we create this tool.
*/ */
static void Create(VPattern *doc, VContainer *data, quint32 id, quint32 idArc, const Document::Documents &parse, static void Create(VPattern *doc, VContainer *data, quint32 id, quint32 idArc, const Document::Documents &parse,
const Tool::Sources &typeCreation, const quint32 &idTool = 0, QObject *parent = 0); const Tool::Sources &typeCreation, const quint32 &idTool = 0, QObject *parent = nullptr);
static const QString TagName; static const QString TagName;
static const QString ToolType; static const QString ToolType;
/** /**

View File

@ -37,7 +37,7 @@ VNodePoint::VNodePoint(VPattern *doc, VContainer *data, quint32 id, quint32 idPo
const Tool::Sources &typeCreation, const quint32 &idTool, QObject *qoParent, const Tool::Sources &typeCreation, const quint32 &idTool, QObject *qoParent,
QGraphicsItem *parent) QGraphicsItem *parent)
:VAbstractNode(doc, data, id, idPoint, idTool, qoParent), QGraphicsEllipseItem(parent), radius(toPixel(1.5)), :VAbstractNode(doc, data, id, idPoint, idTool, qoParent), QGraphicsEllipseItem(parent), radius(toPixel(1.5)),
namePoint(0), lineName(0) namePoint(nullptr), lineName(nullptr)
{ {
namePoint = new VGraphicsSimpleTextItem(this); namePoint = new VGraphicsSimpleTextItem(this);
lineName = new QGraphicsLineItem(this); lineName = new QGraphicsLineItem(this);

View File

@ -49,8 +49,8 @@ public:
* @param parent parent object. * @param parent parent object.
*/ */
VNodePoint(VPattern *doc, VContainer *data, quint32 id, quint32 idPoint, VNodePoint(VPattern *doc, VContainer *data, quint32 id, quint32 idPoint,
const Tool::Sources &typeCreation, const quint32 &idTool = 0, QObject *qoParent = 0, const Tool::Sources &typeCreation, const quint32 &idTool = 0, QObject *qoParent = nullptr,
QGraphicsItem * parent = 0 ); QGraphicsItem * parent = nullptr );
/** /**
* @brief Create help create tool. * @brief Create help create tool.
* @param doc dom document container. * @param doc dom document container.
@ -62,7 +62,7 @@ public:
*/ */
static void Create(VPattern *doc, VContainer *data, quint32 id, quint32 idPoint, static void Create(VPattern *doc, VContainer *data, quint32 id, quint32 idPoint,
const Document::Documents &parse, const Tool::Sources &typeCreation, const quint32 &idTool = 0, const Document::Documents &parse, const Tool::Sources &typeCreation, const quint32 &idTool = 0,
QObject *parent = 0); QObject *parent = nullptr);
static const QString TagName; static const QString TagName;
static const QString ToolType; static const QString ToolType;
/** /**

View File

@ -56,7 +56,7 @@ VNodeSpline *VNodeSpline::Create(VPattern *doc, VContainer *data, quint32 id, qu
const quint32 &idTool, QObject *parent) const quint32 &idTool, QObject *parent)
{ {
VAbstractTool::AddRecord(id, Tool::NodeSpline, doc); VAbstractTool::AddRecord(id, Tool::NodeSpline, doc);
VNodeSpline *spl = 0; VNodeSpline *spl = nullptr;
if (parse == Document::FullParse) if (parse == Document::FullParse)
{ {
spl = new VNodeSpline(doc, data, id, idSpline, typeCreation, idTool, parent); spl = new VNodeSpline(doc, data, id, idSpline, typeCreation, idTool, parent);

View File

@ -49,8 +49,8 @@ public:
* @param parent parent object. * @param parent parent object.
*/ */
VNodeSpline(VPattern *doc, VContainer *data, quint32 id, quint32 idSpline, VNodeSpline(VPattern *doc, VContainer *data, quint32 id, quint32 idSpline,
const Tool::Sources &typeCreation, const quint32 &idTool = 0, QObject *qoParent = 0, const Tool::Sources &typeCreation, const quint32 &idTool = 0, QObject *qoParent = nullptr,
QGraphicsItem * parent = 0); QGraphicsItem * parent = nullptr);
/** /**
* @brief Create help create tool. * @brief Create help create tool.
* @param doc dom document container. * @param doc dom document container.
@ -63,7 +63,7 @@ public:
*/ */
static VNodeSpline *Create(VPattern *doc, VContainer *data, quint32 id, quint32 idSpline, static VNodeSpline *Create(VPattern *doc, VContainer *data, quint32 id, quint32 idSpline,
const Document::Documents &parse, const Tool::Sources &typeCreation, const Document::Documents &parse, const Tool::Sources &typeCreation,
const quint32 &idTool = 0, QObject *parent = 0); const quint32 &idTool = 0, QObject *parent = nullptr);
static const QString TagName; static const QString TagName;
static const QString ToolType; static const QString ToolType;
/** /**

View File

@ -49,8 +49,8 @@ public:
* @param parent parent object. * @param parent parent object.
*/ */
VNodeSplinePath(VPattern *doc, VContainer *data, quint32 id, quint32 idSpline, VNodeSplinePath(VPattern *doc, VContainer *data, quint32 id, quint32 idSpline,
const Tool::Sources &typeCreation, const quint32 &idTool = 0, QObject *qoParent = 0, const Tool::Sources &typeCreation, const quint32 &idTool = 0,
QGraphicsItem * parent = 0); QObject *qoParent = nullptr, QGraphicsItem * parent = nullptr);
/** /**
* @brief Create help create tool. * @brief Create help create tool.
* @param doc dom document container. * @param doc dom document container.

View File

@ -47,7 +47,7 @@ public:
* @param id object id in container. * @param id object id in container.
* @param parent parent object. * @param parent parent object.
*/ */
VAbstractTool(VPattern *doc, VContainer *data, quint32 id, QObject *parent = 0); VAbstractTool(VPattern *doc, VContainer *data, quint32 id, QObject *parent = nullptr);
virtual ~VAbstractTool(){} virtual ~VAbstractTool(){}
/** /**
* @brief NewSceneRect calculate scene rect what contains all items and doesn't less that size of scene view. * @brief NewSceneRect calculate scene rect what contains all items and doesn't less that size of scene view.

View File

@ -44,7 +44,7 @@ public:
* @param data container with variables * @param data container with variables
* @param parent parent object * @param parent parent object
*/ */
VDataTool(VContainer *data, QObject *parent = 0); VDataTool(VContainer *data, QObject *parent = nullptr);
virtual ~VDataTool(){} virtual ~VDataTool(){}
/** /**
* @brief operator = assignment operator. * @brief operator = assignment operator.

View File

@ -49,7 +49,7 @@ const QString VToolDetail::NodeSplinePath = QStringLiteral("NodeSplinePath");
VToolDetail::VToolDetail(VPattern *doc, VContainer *data, const quint32 &id, const Tool::Sources &typeCreation, VToolDetail::VToolDetail(VPattern *doc, VContainer *data, const quint32 &id, const Tool::Sources &typeCreation,
VMainGraphicsScene *scene, QGraphicsItem *parent) VMainGraphicsScene *scene, QGraphicsItem *parent)
:VAbstractTool(doc, data, id), QGraphicsPathItem(parent), dialog(0), sceneDetails(scene) :VAbstractTool(doc, data, id), QGraphicsPathItem(parent), dialog(nullptr), sceneDetails(scene)
{ {
VDetail detail = data->GetDetail(id); VDetail detail = data->GetDetail(id);
for (ptrdiff_t i = 0; i< detail.CountNode(); ++i) for (ptrdiff_t i = 0; i< detail.CountNode(); ++i)

View File

@ -50,7 +50,7 @@ public:
* @param parent parent object * @param parent parent object
*/ */
VToolDetail(VPattern *doc, VContainer *data, const quint32 &id, const Tool::Sources &typeCreation, VToolDetail(VPattern *doc, VContainer *data, const quint32 &id, const Tool::Sources &typeCreation,
VMainGraphicsScene *scene, QGraphicsItem * parent = 0); VMainGraphicsScene *scene, QGraphicsItem * parent = nullptr);
~VToolDetail(); ~VToolDetail();
/** /**
* @brief setDialog set dialog when user want change tool option. * @brief setDialog set dialog when user want change tool option.

View File

@ -53,7 +53,7 @@ public:
*/ */
VToolUnionDetails(VPattern *doc, VContainer *data, const quint32 &id, const VDetail &d1, const VDetail &d2, VToolUnionDetails(VPattern *doc, VContainer *data, const quint32 &id, const VDetail &d1, const VDetail &d2,
const quint32 &indexD1, const quint32 &indexD2, const Tool::Sources &typeCreation, const quint32 &indexD1, const quint32 &indexD2, const Tool::Sources &typeCreation,
QObject *parent = 0); QObject *parent = nullptr);
/** /**
* @brief setDialog set dialog when user want change tool option. * @brief setDialog set dialog when user want change tool option.
*/ */

View File

@ -43,7 +43,7 @@ public:
* @brief DoubleSpinBoxDelegate constructor. * @brief DoubleSpinBoxDelegate constructor.
* @param parent parent object. * @param parent parent object.
*/ */
DoubleSpinBoxDelegate(QObject *parent = 0): QItemDelegate(parent), lastValue(-10001.0){} DoubleSpinBoxDelegate(QObject *parent = nullptr): QItemDelegate(parent), lastValue(-10001.0){}
/** /**
* @brief createEditorReturns the widget used to edit the item specified by index for editing. The parent widget and * @brief createEditorReturns the widget used to edit the item specified by index for editing. The parent widget and
* style option are used to control how the editor widget appears. * style option are used to control how the editor widget appears.

View File

@ -43,7 +43,7 @@ public:
* @brief TextDelegate constructor. * @brief TextDelegate constructor.
* @param parent parent widget. * @param parent parent widget.
*/ */
explicit TextDelegate(QObject *parent = 0); explicit TextDelegate(QObject *parent = nullptr);
/** /**
* @brief createEditorReturns the widget used to edit the item specified by index for editing. The parent widget and * @brief createEditorReturns the widget used to edit the item specified by index for editing. The parent widget and
* style option are used to control how the editor widget appears. * style option are used to control how the editor widget appears.

View File

@ -34,7 +34,8 @@
VControlPointSpline::VControlPointSpline(const qint32 &indexSpline, SplinePoint::Position position, VControlPointSpline::VControlPointSpline(const qint32 &indexSpline, SplinePoint::Position position,
const QPointF &controlPoint, const QPointF &splinePoint, const QPointF &controlPoint, const QPointF &splinePoint,
QGraphicsItem *parent) QGraphicsItem *parent)
:QGraphicsEllipseItem(parent), radius(toPixel(1.5)), controlLine(0), indexSpline(indexSpline), position(position) :QGraphicsEllipseItem(parent), radius(toPixel(1.5)), controlLine(nullptr), indexSpline(indexSpline),
position(position)
{ {
//create circle //create circle
QRectF rec = QRectF(0, 0, radius*2, radius*2); QRectF rec = QRectF(0, 0, radius*2, radius*2);

View File

@ -50,7 +50,7 @@ public:
*/ */
VControlPointSpline(const qint32 &indexSpline, SplinePoint::Position position, VControlPointSpline(const qint32 &indexSpline, SplinePoint::Position position,
const QPointF &controlPoint, const QPointF &splinePoint, const QPointF &controlPoint, const QPointF &splinePoint,
QGraphicsItem * parent = 0); QGraphicsItem * parent = nullptr);
signals: signals:
/** /**
* @brief ControlPointChangePosition emit when control point change position. * @brief ControlPointChangePosition emit when control point change position.

View File

@ -42,13 +42,13 @@ public:
* @brief VGraphicsSimpleTextItem default constructor. * @brief VGraphicsSimpleTextItem default constructor.
* @param parent parent object. * @param parent parent object.
*/ */
VGraphicsSimpleTextItem(QGraphicsItem * parent = 0); VGraphicsSimpleTextItem(QGraphicsItem * parent = nullptr);
/** /**
* @brief VGraphicsSimpleTextItem constructor. * @brief VGraphicsSimpleTextItem constructor.
* @param text text. * @param text text.
* @param parent parent object. * @param parent parent object.
*/ */
VGraphicsSimpleTextItem( const QString & text, QGraphicsItem * parent = 0 ); VGraphicsSimpleTextItem( const QString & text, QGraphicsItem * parent = nullptr );
/** /**
* @brief FontSize return label font size. * @brief FontSize return label font size.
* @return font size. * @return font size.

View File

@ -33,17 +33,17 @@
#include <QDebug> #include <QDebug>
VItem::VItem (const QPainterPath & path, int numInList, QGraphicsItem * parent ) VItem::VItem (const QPainterPath & path, int numInList, QGraphicsItem * parent )
:QGraphicsPathItem ( path, parent ), numInOutList(numInList), paper(0) :QGraphicsPathItem ( path, parent ), numInOutList(numInList), paper(nullptr)
{ {
} }
VItem::VItem():numInOutList(0), paper(0) VItem::VItem():numInOutList(0), paper(nullptr)
{ {
} }
VItem::VItem(int numInList, QGraphicsItem *parent):QGraphicsPathItem (parent), numInOutList(numInList), VItem::VItem(int numInList, QGraphicsItem *parent):QGraphicsPathItem (parent), numInOutList(numInList),
paper(0) paper(nullptr)
{ {
} }
@ -51,7 +51,7 @@ VItem::VItem(int numInList, QGraphicsItem *parent):QGraphicsPathItem (parent), n
void VItem::checkItemChange() void VItem::checkItemChange()
{ {
QRectF rect; QRectF rect;
if (paper == 0) if (paper == nullptr)
{ {
qDebug()<<"Don't set paper for detail!!!!"; qDebug()<<"Don't set paper for detail!!!!";
rect = this->scene()->sceneRect(); rect = this->scene()->sceneRect();

View File

@ -48,14 +48,14 @@ public:
* @param numInList index in list of details. * @param numInList index in list of details.
* @param parent parent object. * @param parent parent object.
*/ */
VItem (int numInList, QGraphicsItem * parent = 0); VItem (int numInList, QGraphicsItem * parent = nullptr);
/** /**
* @brief VItem constructor. * @brief VItem constructor.
* @param path detail path. * @param path detail path.
* @param numInList index in list of details. * @param numInList index in list of details.
* @param parent parent object. * @param parent parent object.
*/ */
VItem ( const QPainterPath & path, int numInList, QGraphicsItem * parent = 0 ); VItem ( const QPainterPath & path, int numInList, QGraphicsItem * parent = nullptr );
/** /**
* @brief Rotate rotate detail on angle in degree. * @brief Rotate rotate detail on angle in degree.
* @param angle angle in degree. * @param angle angle in degree.

View File

@ -48,7 +48,7 @@ public:
* @param sceneRect scene rect. * @param sceneRect scene rect.
* @param parent parent object. * @param parent parent object.
*/ */
VMainGraphicsScene(const QRectF & sceneRect, QObject * parent = 0); VMainGraphicsScene(const QRectF & sceneRect, QObject * parent = nullptr);
/** /**
* @brief getHorScrollBar return scene horizontal scrollbar. * @brief getHorScrollBar return scene horizontal scrollbar.
* @return horizontal scrollbar. * @return horizontal scrollbar.

View File

@ -42,7 +42,7 @@ public:
* @brief VMainGraphicsView constructor. * @brief VMainGraphicsView constructor.
* @param parent parent object. * @param parent parent object.
*/ */
explicit VMainGraphicsView(QWidget *parent = 0); explicit VMainGraphicsView(QWidget *parent = nullptr);
signals: signals:
/** /**
* @brief NewFactor send new scale factor. * @brief NewFactor send new scale factor.

View File

@ -31,7 +31,7 @@
VSimpleArc::VSimpleArc(quint32 id, Qt::GlobalColor *currentColor, qreal *factor, QObject *parent) VSimpleArc::VSimpleArc(quint32 id, Qt::GlobalColor *currentColor, qreal *factor, QObject *parent)
:QObject(parent), QGraphicsPathItem(), id (id), factor(factor), currentColor(currentColor) :QObject(parent), QGraphicsPathItem(), id (id), factor(factor), currentColor(currentColor)
{ {
if (factor == 0) if (factor == nullptr)
{ {
setPen(QPen(Qt::black, widthHairLine)); setPen(QPen(Qt::black, widthHairLine));
} }
@ -55,7 +55,7 @@ void VSimpleArc::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
void VSimpleArc::hoverMoveEvent(QGraphicsSceneHoverEvent *event) void VSimpleArc::hoverMoveEvent(QGraphicsSceneHoverEvent *event)
{ {
Q_UNUSED(event); Q_UNUSED(event);
if (factor == 0) if (factor == nullptr)
{ {
this->setPen(QPen(*currentColor, widthMainLine)); this->setPen(QPen(*currentColor, widthMainLine));
} }
@ -68,7 +68,7 @@ void VSimpleArc::hoverMoveEvent(QGraphicsSceneHoverEvent *event)
void VSimpleArc::hoverLeaveEvent(QGraphicsSceneHoverEvent *event) void VSimpleArc::hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
{ {
Q_UNUSED(event); Q_UNUSED(event);
if (factor == 0) if (factor == nullptr)
{ {
this->setPen(QPen(*currentColor, widthHairLine)); this->setPen(QPen(*currentColor, widthHairLine));
} }

View File

@ -55,7 +55,7 @@ public:
* @param factor scale factor. * @param factor scale factor.
* @param parent parent object. * @param parent parent object.
*/ */
VSimpleArc(quint32 id, Qt::GlobalColor *currentColor, qreal *factor = 0, QObject *parent = 0); VSimpleArc(quint32 id, Qt::GlobalColor *currentColor, qreal *factor = nullptr, QObject *parent = nullptr);
signals: signals:
/** /**
* @brief Choosed send id when clicked. * @brief Choosed send id when clicked.

View File

@ -32,7 +32,7 @@
VSimpleSpline::VSimpleSpline(quint32 id, Qt::GlobalColor *currentColor, qreal *factor, QObject *parent) VSimpleSpline::VSimpleSpline(quint32 id, Qt::GlobalColor *currentColor, qreal *factor, QObject *parent)
:QObject(parent), QGraphicsPathItem(), id (id), factor(factor), currentColor(currentColor) :QObject(parent), QGraphicsPathItem(), id (id), factor(factor), currentColor(currentColor)
{ {
if (factor == 0) if (factor == nullptr)
{ {
setPen(QPen(Qt::black, widthHairLine)); setPen(QPen(Qt::black, widthHairLine));
} }
@ -56,7 +56,7 @@ void VSimpleSpline::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
void VSimpleSpline::hoverMoveEvent(QGraphicsSceneHoverEvent *event) void VSimpleSpline::hoverMoveEvent(QGraphicsSceneHoverEvent *event)
{ {
Q_UNUSED(event); Q_UNUSED(event);
if (factor == 0) if (factor == nullptr)
{ {
this->setPen(QPen(*currentColor, widthMainLine)); this->setPen(QPen(*currentColor, widthMainLine));
} }
@ -69,7 +69,7 @@ void VSimpleSpline::hoverMoveEvent(QGraphicsSceneHoverEvent *event)
void VSimpleSpline::hoverLeaveEvent(QGraphicsSceneHoverEvent *event) void VSimpleSpline::hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
{ {
Q_UNUSED(event); Q_UNUSED(event);
if (factor == 0) if (factor == nullptr)
{ {
this->setPen(QPen(*currentColor, widthHairLine)); this->setPen(QPen(*currentColor, widthHairLine));
} }

View File

@ -55,7 +55,7 @@ public:
* @param currentColor current color. * @param currentColor current color.
* @param parent parent object. * @param parent parent object.
*/ */
VSimpleSpline(quint32 id, Qt::GlobalColor *currentColor, qreal *factor = 0, QObject *parent = 0); VSimpleSpline(quint32 id, Qt::GlobalColor *currentColor, qreal *factor = nullptr, QObject *parent = 0);
signals: signals:
/** /**
* @brief Choosed send id when clicked. * @brief Choosed send id when clicked.

View File

@ -43,7 +43,7 @@ public:
*/ */
enum typeMove_e { Left, Right, Up, Down }; enum typeMove_e { Left, Right, Up, Down };
VTableGraphicsView(QGraphicsScene* pScene, QWidget *parent = 0); VTableGraphicsView(QGraphicsScene* pScene, QWidget *parent = nullptr);
signals: signals:
/** /**
* @brief itemChect emit after change selection state detail. * @brief itemChect emit after change selection state detail.

View File

@ -40,7 +40,7 @@
class MessageHandler : public QAbstractMessageHandler class MessageHandler : public QAbstractMessageHandler
{ {
public: public:
MessageHandler() : QAbstractMessageHandler(0), m_messageType(QtMsgType()), m_description(QString()), MessageHandler() : QAbstractMessageHandler(), m_messageType(QtMsgType()), m_description(QString()),
m_sourceLocation(QSourceLocation()){} m_sourceLocation(QSourceLocation()){}
QString statusMessage() const; QString statusMessage() const;
qint64 line() const; qint64 line() const;

View File

@ -52,7 +52,7 @@ class VPattern : public QObject, public VDomDocument
{ {
Q_OBJECT Q_OBJECT
public: public:
VPattern(VContainer *data, QComboBox *comboBoxDraws, Draw::Draws *mode, QObject *parent = 0); VPattern(VContainer *data, QComboBox *comboBoxDraws, Draw::Draws *mode, QObject *parent = nullptr);
/** /**
* @brief CreateEmptyFile create minimal empty file. * @brief CreateEmptyFile create minimal empty file.
*/ */