diff --git a/src/container/calculator.h b/src/container/calculator.h index 6618e310a..00b0fe7ef 100644 --- a/src/container/calculator.h +++ b/src/container/calculator.h @@ -42,8 +42,8 @@ public: * @brief Calculator class constructor. * @param data pointer to a variable container. */ - explicit Calculator(const VContainer *data):errorMsg(0), token(QString()), tok(0), token_type(0), prog(QString()), - index(0), data(data), debugFormula(QString()){} + explicit Calculator(const VContainer *data):errorMsg(nullptr), token(QString()), tok(0), token_type(0), + prog(QString()), index(0), data(data), debugFormula(QString()){} /** * @brief eval calculate formula. * @param prog string of formula. diff --git a/src/container/vcontainer.h b/src/container/vcontainer.h index 0fb81df09..eee7edbda 100644 --- a/src/container/vcontainer.h +++ b/src/container/vcontainer.h @@ -76,7 +76,7 @@ public: template const T GeometricObject(quint32 id) const { - VGObject *gObj = 0; + VGObject *gObj = nullptr; if (gObjects.contains(id)) { gObj = gObjects.value(id); diff --git a/src/dialogs/app/configdialog.cpp b/src/dialogs/app/configdialog.cpp index 1cfdb228b..283ed3da3 100644 --- a/src/dialogs/app/configdialog.cpp +++ b/src/dialogs/app/configdialog.cpp @@ -29,7 +29,7 @@ #include "configdialog.h" 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; Q_CHECK_PTR(contentsWidget); diff --git a/src/dialogs/app/configdialog.h b/src/dialogs/app/configdialog.h index 9acc653aa..d1bfef44f 100644 --- a/src/dialogs/app/configdialog.h +++ b/src/dialogs/app/configdialog.h @@ -40,7 +40,7 @@ class ConfigDialog : public QDialog { Q_OBJECT public: - explicit ConfigDialog(QWidget *parent = 0); + explicit ConfigDialog(QWidget *parent = nullptr); public slots: void changePage(QListWidgetItem *current, QListWidgetItem *previous); protected: diff --git a/src/dialogs/app/dialoghistory.h b/src/dialogs/app/dialoghistory.h index 3a6f797c7..9b1337df4 100644 --- a/src/dialogs/app/dialoghistory.h +++ b/src/dialogs/app/dialoghistory.h @@ -50,7 +50,7 @@ public: * @param doc dom document container * @param parent parent widget */ - DialogHistory(VContainer *data, VPattern *doc, QWidget *parent = 0); + DialogHistory(VContainer *data, VPattern *doc, QWidget *parent = nullptr); virtual ~DialogHistory(); public slots: /** diff --git a/src/dialogs/app/dialogincrements.cpp b/src/dialogs/app/dialogincrements.cpp index 048fce127..796c4ee21 100644 --- a/src/dialogs/app/dialogincrements.cpp +++ b/src/dialogs/app/dialogincrements.cpp @@ -419,8 +419,8 @@ void DialogIncrements::AddIncrementToFile(quint32 id, QString name, qreal base, void DialogIncrements::cellChanged ( qint32 row, qint32 column ) { - QTableWidgetItem *item = 0; - QTableWidgetItem *itemName = 0; + QTableWidgetItem *item = nullptr; + QTableWidgetItem *itemName = nullptr; quint32 id; QDomElement domElement; this->row = row; diff --git a/src/dialogs/app/dialogincrements.h b/src/dialogs/app/dialogincrements.h index 7ed6977b3..7ea4841a4 100644 --- a/src/dialogs/app/dialogincrements.h +++ b/src/dialogs/app/dialogincrements.h @@ -50,7 +50,7 @@ public: * @param doc dom document container * @param parent parent widget */ - DialogIncrements(VContainer *data, VPattern *doc, QWidget *parent = 0); + DialogIncrements(VContainer *data, VPattern *doc, QWidget *parent = nullptr); ~DialogIncrements(); public slots: /** diff --git a/src/dialogs/app/dialogindividualmeasurements.h b/src/dialogs/app/dialogindividualmeasurements.h index 0e87bb685..bcde13c66 100644 --- a/src/dialogs/app/dialogindividualmeasurements.h +++ b/src/dialogs/app/dialogindividualmeasurements.h @@ -40,7 +40,7 @@ class DialogIndividualMeasurements : public QDialog Q_OBJECT public: - explicit DialogIndividualMeasurements(QWidget *parent = 0); + explicit DialogIndividualMeasurements(QWidget *parent = nullptr); ~DialogIndividualMeasurements(); QString name() const; QString tablePath() const; diff --git a/src/dialogs/app/dialogmeasurements.h b/src/dialogs/app/dialogmeasurements.h index 73945dda9..2a098c32c 100644 --- a/src/dialogs/app/dialogmeasurements.h +++ b/src/dialogs/app/dialogmeasurements.h @@ -49,7 +49,7 @@ class DialogMeasurements : public QDialog { Q_OBJECT public: - explicit DialogMeasurements(QWidget *parent = 0); + explicit DialogMeasurements(QWidget *parent = nullptr); ~DialogMeasurements(); Measurements::Type type() const; private: diff --git a/src/dialogs/app/dialogpatternproperties.h b/src/dialogs/app/dialogpatternproperties.h index 5efd8a28a..9bd8c11f9 100644 --- a/src/dialogs/app/dialogpatternproperties.h +++ b/src/dialogs/app/dialogpatternproperties.h @@ -40,7 +40,7 @@ class DialogPatternProperties : public QDialog { Q_OBJECT public: - DialogPatternProperties(VPattern *doc, QWidget *parent = 0); + DialogPatternProperties(VPattern *doc, QWidget *parent = nullptr); virtual ~DialogPatternProperties(); signals: void haveChange(); diff --git a/src/dialogs/app/dialogstandardmeasurements.h b/src/dialogs/app/dialogstandardmeasurements.h index 2a7156f50..d89ed2593 100644 --- a/src/dialogs/app/dialogstandardmeasurements.h +++ b/src/dialogs/app/dialogstandardmeasurements.h @@ -39,7 +39,7 @@ class DialogStandardMeasurements : public QDialog { Q_OBJECT public: - explicit DialogStandardMeasurements(QWidget *parent = 0); + explicit DialogStandardMeasurements(QWidget *parent = nullptr); ~DialogStandardMeasurements(); QString name() const; QString tablePath() const; diff --git a/src/dialogs/app/pages.h b/src/dialogs/app/pages.h index dc52a36f4..ef8e96e1c 100644 --- a/src/dialogs/app/pages.h +++ b/src/dialogs/app/pages.h @@ -35,7 +35,7 @@ class ConfigurationPage : public QWidget { Q_OBJECT public: - ConfigurationPage(QWidget *parent = 0); + ConfigurationPage(QWidget *parent = nullptr); void Apply(); public slots: void LangChenged(); @@ -54,7 +54,7 @@ class PatternPage : public QWidget { Q_OBJECT public: - PatternPage(QWidget *parent = 0); + PatternPage(QWidget *parent = nullptr); void Apply(); private: Q_DISABLE_COPY(PatternPage) diff --git a/src/dialogs/tools/dialogalongline.h b/src/dialogs/tools/dialogalongline.h index 693328fb0..0edbf7f55 100644 --- a/src/dialogs/tools/dialogalongline.h +++ b/src/dialogs/tools/dialogalongline.h @@ -48,7 +48,7 @@ public: * @param data container with data * @param parent parent widget */ - DialogAlongLine(const VContainer *data, QWidget *parent = 0); + DialogAlongLine(const VContainer *data, QWidget *parent = nullptr); ~DialogAlongLine(); /** * @brief getPointName return name of point diff --git a/src/dialogs/tools/dialogarc.cpp b/src/dialogs/tools/dialogarc.cpp index de4898881..d8fcacda1 100644 --- a/src/dialogs/tools/dialogarc.cpp +++ b/src/dialogs/tools/dialogarc.cpp @@ -34,7 +34,7 @@ DialogArc::DialogArc(const VContainer *data, QWidget *parent) :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); diff --git a/src/dialogs/tools/dialogarc.h b/src/dialogs/tools/dialogarc.h index f1366f9e1..03343cc39 100644 --- a/src/dialogs/tools/dialogarc.h +++ b/src/dialogs/tools/dialogarc.h @@ -48,7 +48,7 @@ public: * @param data container with data * @param parent parent widget */ - DialogArc(const VContainer *data, QWidget *parent = 0); + DialogArc(const VContainer *data, QWidget *parent = nullptr); ~DialogArc(); /** * @brief GetCenter return id of center point diff --git a/src/dialogs/tools/dialogbisector.h b/src/dialogs/tools/dialogbisector.h index ba581956d..5488ce972 100644 --- a/src/dialogs/tools/dialogbisector.h +++ b/src/dialogs/tools/dialogbisector.h @@ -48,7 +48,7 @@ public: * @param data container with data * @param parent parent widget */ - DialogBisector(const VContainer *data, QWidget *parent = 0); + DialogBisector(const VContainer *data, QWidget *parent = nullptr); ~DialogBisector(); /** * @brief getPointName return name of point diff --git a/src/dialogs/tools/dialogcutarc.h b/src/dialogs/tools/dialogcutarc.h index 4e296c416..9b9d285c3 100644 --- a/src/dialogs/tools/dialogcutarc.h +++ b/src/dialogs/tools/dialogcutarc.h @@ -48,7 +48,7 @@ public: * @param data container with data * @param parent parent widget */ - DialogCutArc(const VContainer *data, QWidget *parent = 0); + DialogCutArc(const VContainer *data, QWidget *parent = nullptr); ~DialogCutArc(); /** * @brief getPointName return name point on arc diff --git a/src/dialogs/tools/dialogcutspline.h b/src/dialogs/tools/dialogcutspline.h index c7e9ef3f5..f5e507e2c 100644 --- a/src/dialogs/tools/dialogcutspline.h +++ b/src/dialogs/tools/dialogcutspline.h @@ -48,7 +48,7 @@ public: * @param data container with data * @param parent parent widget */ - DialogCutSpline(const VContainer *data, QWidget *parent = 0); + DialogCutSpline(const VContainer *data, QWidget *parent = nullptr); ~DialogCutSpline(); /** * @brief getPointName return name of point diff --git a/src/dialogs/tools/dialogcutsplinepath.h b/src/dialogs/tools/dialogcutsplinepath.h index 0137e7f6c..0accc6d67 100644 --- a/src/dialogs/tools/dialogcutsplinepath.h +++ b/src/dialogs/tools/dialogcutsplinepath.h @@ -48,7 +48,7 @@ public: * @param data container with data * @param parent parent widget */ - DialogCutSplinePath(const VContainer *data, QWidget *parent = 0); + DialogCutSplinePath(const VContainer *data, QWidget *parent = nullptr); ~DialogCutSplinePath(); /** * @brief getPointName return name of point diff --git a/src/dialogs/tools/dialogdetail.h b/src/dialogs/tools/dialogdetail.h index fec51637f..bf39910b1 100644 --- a/src/dialogs/tools/dialogdetail.h +++ b/src/dialogs/tools/dialogdetail.h @@ -44,7 +44,7 @@ public: * @param data container with data * @param parent parent widget */ - DialogDetail(const VContainer *data, QWidget *parent = 0); + DialogDetail(const VContainer *data, QWidget *parent = nullptr); /** * @brief getDetails return detail * @return detail diff --git a/src/dialogs/tools/dialogendline.h b/src/dialogs/tools/dialogendline.h index 8bfcc1d6b..05ce3c82c 100644 --- a/src/dialogs/tools/dialogendline.h +++ b/src/dialogs/tools/dialogendline.h @@ -48,7 +48,7 @@ public: * @param data container with data * @param parent parent widget */ - DialogEndLine(const VContainer *data, QWidget *parent = 0); + DialogEndLine(const VContainer *data, QWidget *parent = nullptr); ~DialogEndLine(); /** * @brief getPointName return name of point diff --git a/src/dialogs/tools/dialogheight.h b/src/dialogs/tools/dialogheight.h index 9c718d626..8fd4f9a25 100644 --- a/src/dialogs/tools/dialogheight.h +++ b/src/dialogs/tools/dialogheight.h @@ -48,7 +48,7 @@ public: * @param data container with data * @param parent parent widget */ - DialogHeight(const VContainer *data, QWidget *parent = 0); + DialogHeight(const VContainer *data, QWidget *parent = nullptr); ~DialogHeight(); /** * @brief getPointName return name of point diff --git a/src/dialogs/tools/dialogline.h b/src/dialogs/tools/dialogline.h index ec53ffcdf..2df217fce 100644 --- a/src/dialogs/tools/dialogline.h +++ b/src/dialogs/tools/dialogline.h @@ -48,7 +48,7 @@ public: * @param data container with data * @param parent parent widget */ - DialogLine(const VContainer *data, QWidget *parent = 0); + DialogLine(const VContainer *data, QWidget *parent = nullptr); ~DialogLine(); /** * @brief getFirstPoint return id first point diff --git a/src/dialogs/tools/dialoglineintersect.h b/src/dialogs/tools/dialoglineintersect.h index dc0edbf22..421f5d0aa 100644 --- a/src/dialogs/tools/dialoglineintersect.h +++ b/src/dialogs/tools/dialoglineintersect.h @@ -48,7 +48,7 @@ public: * @param data container with data * @param parent parent widget */ - DialogLineIntersect(const VContainer *data, QWidget *parent = 0); + DialogLineIntersect(const VContainer *data, QWidget *parent = nullptr); ~DialogLineIntersect(); /** * @brief getP1Line1 return id first point of first line diff --git a/src/dialogs/tools/dialognormal.h b/src/dialogs/tools/dialognormal.h index 11aef3280..9d747b9b9 100644 --- a/src/dialogs/tools/dialognormal.h +++ b/src/dialogs/tools/dialognormal.h @@ -48,7 +48,7 @@ public: * @param data container with data * @param parent parent widget */ - DialogNormal(const VContainer *data, QWidget *parent = 0); + DialogNormal(const VContainer *data, QWidget *parent = nullptr); ~DialogNormal(); /** * @brief getPointName return name of point diff --git a/src/dialogs/tools/dialogpointofcontact.h b/src/dialogs/tools/dialogpointofcontact.h index f6a80ab6c..b569cae72 100644 --- a/src/dialogs/tools/dialogpointofcontact.h +++ b/src/dialogs/tools/dialogpointofcontact.h @@ -44,7 +44,7 @@ public: * @param data container with data * @param parent parent widget */ - DialogPointOfContact(const VContainer *data, QWidget *parent = 0); + DialogPointOfContact(const VContainer *data, QWidget *parent = nullptr); /** * @brief getPointName return name of point * @return name diff --git a/src/dialogs/tools/dialogpointofintersection.h b/src/dialogs/tools/dialogpointofintersection.h index dfa8d51c4..2a60ca2ad 100644 --- a/src/dialogs/tools/dialogpointofintersection.h +++ b/src/dialogs/tools/dialogpointofintersection.h @@ -48,7 +48,7 @@ public: * @param data container with data * @param parent parent widget */ - DialogPointOfIntersection(const VContainer *data, QWidget *parent = 0); + DialogPointOfIntersection(const VContainer *data, QWidget *parent = nullptr); ~DialogPointOfIntersection(); /** * @brief getPointName return name of point diff --git a/src/dialogs/tools/dialogshoulderpoint.h b/src/dialogs/tools/dialogshoulderpoint.h index 642f742d3..30342ee81 100644 --- a/src/dialogs/tools/dialogshoulderpoint.h +++ b/src/dialogs/tools/dialogshoulderpoint.h @@ -48,7 +48,7 @@ public: * @param data container with data * @param parent parent widget */ - DialogShoulderPoint(const VContainer *data, QWidget *parent = 0); + DialogShoulderPoint(const VContainer *data, QWidget *parent = nullptr); ~DialogShoulderPoint(); /** * @brief getPointName return name of point diff --git a/src/dialogs/tools/dialogsinglepoint.h b/src/dialogs/tools/dialogsinglepoint.h index f3d4d6e33..a4f994043 100644 --- a/src/dialogs/tools/dialogsinglepoint.h +++ b/src/dialogs/tools/dialogsinglepoint.h @@ -48,7 +48,7 @@ public: * @param data container with data * @param parent parent widget */ - DialogSinglePoint(const VContainer *data, QWidget *parent = 0); + DialogSinglePoint(const VContainer *data, QWidget *parent = nullptr); ~DialogSinglePoint(); /** * @brief setData set name and point diff --git a/src/dialogs/tools/dialogspline.h b/src/dialogs/tools/dialogspline.h index 40e0bebac..e42cc1388 100644 --- a/src/dialogs/tools/dialogspline.h +++ b/src/dialogs/tools/dialogspline.h @@ -48,7 +48,7 @@ public: * @param data container with data * @param parent parent widget */ - DialogSpline(const VContainer *data, QWidget *parent = 0); + DialogSpline(const VContainer *data, QWidget *parent = nullptr); ~DialogSpline(); /** * @brief getP1 return id first point of spline diff --git a/src/dialogs/tools/dialogsplinepath.h b/src/dialogs/tools/dialogsplinepath.h index 5024c143a..ad1fcb708 100644 --- a/src/dialogs/tools/dialogsplinepath.h +++ b/src/dialogs/tools/dialogsplinepath.h @@ -49,7 +49,7 @@ public: * @param data container with data * @param parent parent widget */ - DialogSplinePath(const VContainer *data, QWidget *parent = 0); + DialogSplinePath(const VContainer *data, QWidget *parent = nullptr); ~DialogSplinePath(); /** * @brief GetPath return spline path diff --git a/src/dialogs/tools/dialogtool.cpp b/src/dialogs/tools/dialogtool.cpp index 353ef34f4..d2b23fc1b 100644 --- a/src/dialogs/tools/dialogtool.cpp +++ b/src/dialogs/tools/dialogtool.cpp @@ -34,11 +34,12 @@ #include DialogTool::DialogTool(const VContainer *data, QWidget *parent) - :QDialog(parent), data(data), isInitialized(false), flagName(true), flagFormula(true), timerFormula(0), bOk(0), - spinBoxAngle(0), lineEditFormula(0), listWidget(0), labelResultCalculation(0), labelDescription(0), - labelEditNamePoint(0), labelEditFormula(0), radioButtonSizeGrowth(0), radioButtonStandardTable(0), - radioButtonIncrements(0), radioButtonLengthLine(0), radioButtonLengthArc(0), radioButtonLengthCurve(0), - lineStyles(QStringList()) + :QDialog(parent), data(data), isInitialized(false), flagName(true), flagFormula(true), timerFormula(nullptr), + bOk(nullptr), spinBoxAngle(nullptr), lineEditFormula(nullptr), listWidget(nullptr), + labelResultCalculation(nullptr), labelDescription(nullptr), labelEditNamePoint(nullptr), + labelEditFormula(nullptr), radioButtonSizeGrowth(nullptr), radioButtonStandardTable(nullptr), + radioButtonIncrements(nullptr), radioButtonLengthLine(nullptr), radioButtonLengthArc(nullptr), + radioButtonLengthCurve(nullptr), lineStyles(QStringList()) { Q_CHECK_PTR(data); timerFormula = new QTimer(this); diff --git a/src/dialogs/tools/dialogtool.h b/src/dialogs/tools/dialogtool.h index 4e1cf2079..ee1abf5df 100644 --- a/src/dialogs/tools/dialogtool.h +++ b/src/dialogs/tools/dialogtool.h @@ -63,7 +63,7 @@ public: * @param data container with data * @param parent parent widget */ - DialogTool(const VContainer *data, QWidget *parent = 0); + DialogTool(const VContainer *data, QWidget *parent = nullptr); virtual ~DialogTool() {} signals: /** diff --git a/src/dialogs/tools/dialogtriangle.h b/src/dialogs/tools/dialogtriangle.h index c1667fc43..cbacec9ac 100644 --- a/src/dialogs/tools/dialogtriangle.h +++ b/src/dialogs/tools/dialogtriangle.h @@ -48,7 +48,7 @@ public: * @param data container with data * @param parent parent widget */ - DialogTriangle(const VContainer *data, QWidget *parent = 0); + DialogTriangle(const VContainer *data, QWidget *parent = nullptr); ~DialogTriangle(); /** * @brief getAxisP1Id return id first point of axis diff --git a/src/dialogs/tools/dialoguniondetails.h b/src/dialogs/tools/dialoguniondetails.h index a525c0aba..e972de851 100644 --- a/src/dialogs/tools/dialoguniondetails.h +++ b/src/dialogs/tools/dialoguniondetails.h @@ -48,7 +48,7 @@ public: * @param data container with data * @param parent parent widget */ - DialogUnionDetails(const VContainer *data, QWidget *parent = 0); + DialogUnionDetails(const VContainer *data, QWidget *parent = nullptr); ~DialogUnionDetails(); /** * @brief getD1 return id first detail diff --git a/src/exception/vexception.h b/src/exception/vexception.h index e25f6b9f1..ea0145ce7 100644 --- a/src/exception/vexception.h +++ b/src/exception/vexception.h @@ -79,7 +79,7 @@ public: * @brief CriticalMessageBox show Critical 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: /** * @brief what string with error diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index ccbf524ff..f72d42447 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -48,11 +48,11 @@ MainWindow::MainWindow(QWidget *parent) - :QMainWindow(parent), ui(new Ui::MainWindow), pattern(0), doc(0), tool(Tool::ArrowTool), currentScene(0), - sceneDraw(0), sceneDetails(0), mouseCoordinate(0), helpLabel(0), view(0), isInitialized(false), dialogTable(0), - dialogTool(0), dialogHistory(0), comboBoxDraws(0), curFile(QString()), mode(Draw::Calculation), - currentDrawIndex(0), currentToolBoxIndex(0), drawMode(true), recentFileActs{0,0,0,0,0}, separatorAct(0), - autoSaveTimer(0) + :QMainWindow(parent), ui(new Ui::MainWindow), pattern(nullptr), doc(nullptr), tool(Tool::ArrowTool), + currentScene(nullptr), sceneDraw(nullptr), sceneDetails(nullptr), mouseCoordinate(nullptr), helpLabel(nullptr), + view(nullptr), isInitialized(false), dialogTable(0), dialogTool(nullptr), dialogHistory(nullptr), + comboBoxDraws(nullptr), curFile(QString()), mode(Draw::Calculation), currentDrawIndex(0), currentToolBoxIndex(0), + drawMode(true), recentFileActs{0,0,0,0,0}, separatorAct(nullptr), autoSaveTimer(nullptr) { CreateActions(); CreateMenus(); @@ -650,7 +650,7 @@ void MainWindow::mouseMove(const QPointF &scenePos) void MainWindow::CancelTool() { delete dialogTool; - dialogTool = 0; + dialogTool = nullptr; switch ( tool ) { case Tool::ArrowTool: @@ -1031,7 +1031,7 @@ void MainWindow::ClosedActionTable() { ui->actionTable->setChecked(false); delete dialogTable; - dialogTable = 0; + dialogTable = nullptr; } void MainWindow::ActionHistory(bool checked) @@ -1336,7 +1336,7 @@ void MainWindow::InitAutoSave() { //Autosaving file each 5 minutes delete autoSaveTimer; - autoSaveTimer = 0; + autoSaveTimer = nullptr; QSettings settings(QSettings::IniFormat, QSettings::UserScope, QApplication::organizationName(), QApplication::applicationName()); diff --git a/src/mainwindow.h b/src/mainwindow.h index 0421cf7df..9cc622812 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -55,7 +55,7 @@ public: * @brief MainWindow constructor. * @param parent parent widget. */ - explicit MainWindow(QWidget *parent = 0); + explicit MainWindow(QWidget *parent = nullptr); ~MainWindow(); /** * @brief LoadPattern open pattern file. diff --git a/src/tablewindow.cpp b/src/tablewindow.cpp index 755050913..c4d489b34 100644 --- a/src/tablewindow.cpp +++ b/src/tablewindow.cpp @@ -34,9 +34,9 @@ #include "options.h" TableWindow::TableWindow(QWidget *parent) - :QMainWindow(parent), numberDetal(0), colission(0), ui(new Ui::TableWindow), - listDetails(QVector()), outItems(false), collidingItems(false), tableScene(0), - paper(0), shadowPaper(0), listOutItems(0), listCollidingItems(QList()), + :QMainWindow(parent), numberDetal(nullptr), colission(nullptr), ui(new Ui::TableWindow), + listDetails(QVector()), outItems(false), collidingItems(false), tableScene(nullptr), + paper(nullptr), shadowPaper(nullptr), listOutItems(nullptr), listCollidingItems(QList()), indexDetail(0), sceneRect(QRectF()), fileName(QString()), description(QString()) { ui->setupUi(this); diff --git a/src/tablewindow.h b/src/tablewindow.h index 00e6a6a0c..026bda81d 100644 --- a/src/tablewindow.h +++ b/src/tablewindow.h @@ -57,7 +57,7 @@ public: * @brief TableWindow constructor. * @param parent parent widget. */ - explicit TableWindow(QWidget *parent = 0); + explicit TableWindow(QWidget *parent = nullptr); ~TableWindow(); public slots: /** diff --git a/src/tools/drawTools/vdrawtool.cpp b/src/tools/drawTools/vdrawtool.cpp index c2afef8d2..69e864c3b 100644 --- a/src/tools/drawTools/vdrawtool.cpp +++ b/src/tools/drawTools/vdrawtool.cpp @@ -32,7 +32,7 @@ qreal VDrawTool::factor = 1; VDrawTool::VDrawTool(VPattern *doc, VContainer *data, quint32 id) :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::ChangedNameDraw, this, &VDrawTool::ChangedNameDraw); @@ -85,7 +85,7 @@ void VDrawTool::FullUpdateFromGui(int result) } } delete dialog; - dialog = 0; + dialog = nullptr; } void VDrawTool::SetFactor(qreal factor) diff --git a/src/tools/drawTools/vdrawtool.h b/src/tools/drawTools/vdrawtool.h index ff41eca7c..73c440a52 100644 --- a/src/tools/drawTools/vdrawtool.h +++ b/src/tools/drawTools/vdrawtool.h @@ -134,7 +134,7 @@ protected: { QMenu menu; QAction *actionOption = menu.addAction(tr("Options")); - QAction *actionRemove = 0; + QAction *actionRemove = nullptr; if (showRemove) { actionRemove = menu.addAction(tr("Delete")); diff --git a/src/tools/drawTools/vtoolalongline.h b/src/tools/drawTools/vtoolalongline.h index 0a3248eba..e254004c7 100644 --- a/src/tools/drawTools/vtoolalongline.h +++ b/src/tools/drawTools/vtoolalongline.h @@ -52,7 +52,7 @@ public: */ VToolAlongLine(VPattern *doc, VContainer *data, quint32 id, const QString &formula, 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. */ diff --git a/src/tools/drawTools/vtoolarc.h b/src/tools/drawTools/vtoolarc.h index 64452b7ca..65dd734b7 100644 --- a/src/tools/drawTools/vtoolarc.h +++ b/src/tools/drawTools/vtoolarc.h @@ -49,7 +49,7 @@ public: * @param parent parent object */ 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. */ diff --git a/src/tools/drawTools/vtoolbisector.h b/src/tools/drawTools/vtoolbisector.h index 86ee1adeb..02ba4e90d 100644 --- a/src/tools/drawTools/vtoolbisector.h +++ b/src/tools/drawTools/vtoolbisector.h @@ -53,7 +53,7 @@ public: VToolBisector(VPattern *doc, VContainer *data, const quint32 &id, const QString &typeLine, const QString &formula, const quint32 &firstPointId, const quint32 &secondPointId, const quint32 &thirdPointId, const Tool::Sources &typeCreation, - QGraphicsItem * parent = 0); + QGraphicsItem * parent = nullptr); /** * @brief FindPoint find bisector point. * @param firstPoint first point of angle. diff --git a/src/tools/drawTools/vtoolcutarc.h b/src/tools/drawTools/vtoolcutarc.h index d6f8d3478..4e845f170 100644 --- a/src/tools/drawTools/vtoolcutarc.h +++ b/src/tools/drawTools/vtoolcutarc.h @@ -53,7 +53,7 @@ public: */ VToolCutArc(VPattern *doc, VContainer *data, const quint32 &id, const QString &formula, 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. */ diff --git a/src/tools/drawTools/vtoolcutspline.cpp b/src/tools/drawTools/vtoolcutspline.cpp index 162080406..25c4d850a 100644 --- a/src/tools/drawTools/vtoolcutspline.cpp +++ b/src/tools/drawTools/vtoolcutspline.cpp @@ -108,7 +108,7 @@ void VToolCutSpline::Create(const quint32 _id, const QString &pointName, if (typeCreation == Tool::FromGui) { VPointF *p = new VPointF(point.x(), point.y(), pointName, mx, my); - Q_CHECK_PTR(p != 0); + Q_CHECK_PTR(p); id = data->AddGObject(p); VSpline *spline1 = new VSpline(spl->GetP1(), spl1p2, spl1p3, *p, spl->GetKcurve()); diff --git a/src/tools/drawTools/vtoolcutspline.h b/src/tools/drawTools/vtoolcutspline.h index 87405ee45..6baf52e85 100644 --- a/src/tools/drawTools/vtoolcutspline.h +++ b/src/tools/drawTools/vtoolcutspline.h @@ -51,7 +51,7 @@ public: */ VToolCutSpline(VPattern *doc, VContainer *data, const quint32 &id, const QString &formula, 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. */ diff --git a/src/tools/drawTools/vtoolcutsplinepath.h b/src/tools/drawTools/vtoolcutsplinepath.h index 0a7f40b43..2f9707bef 100644 --- a/src/tools/drawTools/vtoolcutsplinepath.h +++ b/src/tools/drawTools/vtoolcutsplinepath.h @@ -54,7 +54,7 @@ public: */ VToolCutSplinePath(VPattern *doc, VContainer *data, const quint32 &id, const QString &formula, 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. */ diff --git a/src/tools/drawTools/vtoolendline.h b/src/tools/drawTools/vtoolendline.h index b85715035..98eebac48 100644 --- a/src/tools/drawTools/vtoolendline.h +++ b/src/tools/drawTools/vtoolendline.h @@ -52,7 +52,7 @@ public: */ VToolEndLine(VPattern *doc, VContainer *data, const quint32 &id, const QString &typeLine, 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. */ diff --git a/src/tools/drawTools/vtoolheight.h b/src/tools/drawTools/vtoolheight.h index 1c0f222ba..5adb588b1 100644 --- a/src/tools/drawTools/vtoolheight.h +++ b/src/tools/drawTools/vtoolheight.h @@ -52,7 +52,7 @@ public: */ VToolHeight(VPattern *doc, VContainer *data, const quint32 &id, const QString &typeLine, 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. */ diff --git a/src/tools/drawTools/vtoolline.h b/src/tools/drawTools/vtoolline.h index 7bf8d8367..056b88a0b 100644 --- a/src/tools/drawTools/vtoolline.h +++ b/src/tools/drawTools/vtoolline.h @@ -53,7 +53,7 @@ public: */ VToolLine(VPattern *doc, VContainer *data, quint32 id, quint32 firstPoint, 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. */ diff --git a/src/tools/drawTools/vtoollineintersect.h b/src/tools/drawTools/vtoollineintersect.h index e0101aa71..00fb946f8 100644 --- a/src/tools/drawTools/vtoollineintersect.h +++ b/src/tools/drawTools/vtoollineintersect.h @@ -52,7 +52,7 @@ public: */ VToolLineIntersect(VPattern *doc, VContainer *data, const quint32 &id, const quint32 &p1Line1, 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. */ diff --git a/src/tools/drawTools/vtoollinepoint.cpp b/src/tools/drawTools/vtoollinepoint.cpp index 9d72fe009..d8b739890 100644 --- a/src/tools/drawTools/vtoollinepoint.cpp +++ b/src/tools/drawTools/vtoollinepoint.cpp @@ -32,7 +32,7 @@ VToolLinePoint::VToolLinePoint(VPattern *doc, VContainer *data, const quint32 &i const QString &typeLine, const QString &formula, const quint32 &basePointId, const qreal &angle, QGraphicsItem *parent) :VToolPoint(doc, data, id, parent), formula(formula), angle(angle), basePointId(basePointId), - mainLine(0) + mainLine(nullptr) { this->typeLine = typeLine; Q_ASSERT_X(basePointId > 0, Q_FUNC_INFO, "basePointId <= 0"); diff --git a/src/tools/drawTools/vtoollinepoint.h b/src/tools/drawTools/vtoollinepoint.h index 9f367a985..52628620a 100644 --- a/src/tools/drawTools/vtoollinepoint.h +++ b/src/tools/drawTools/vtoollinepoint.h @@ -51,7 +51,7 @@ public: */ VToolLinePoint(VPattern *doc, VContainer *data, const quint32 &id, const QString &typeLine, const QString &formula, const quint32 &basePointId, const qreal &angle, - QGraphicsItem * parent = 0); + QGraphicsItem * parent = nullptr); public slots: /** * @brief ChangedActivDraw disable or enable context menu after change active pattern peace. diff --git a/src/tools/drawTools/vtoolnormal.h b/src/tools/drawTools/vtoolnormal.h index 8efeea75b..dc6241e68 100644 --- a/src/tools/drawTools/vtoolnormal.h +++ b/src/tools/drawTools/vtoolnormal.h @@ -54,7 +54,7 @@ public: VToolNormal(VPattern *doc, VContainer *data, const quint32 &id, const QString &typeLine, const QString &formula, const qreal &angle, const quint32 &firstPointId, const quint32 &secondPointId, const Tool::Sources &typeCreation, - QGraphicsItem * parent = 0); + QGraphicsItem * parent = nullptr); /** * @brief setDialog set dialog when user want change tool option. */ diff --git a/src/tools/drawTools/vtoolpoint.h b/src/tools/drawTools/vtoolpoint.h index 1a5f0223c..4622d6bc9 100644 --- a/src/tools/drawTools/vtoolpoint.h +++ b/src/tools/drawTools/vtoolpoint.h @@ -46,7 +46,7 @@ public: * @param id object id in container. * @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(){} static const QString TagName; public slots: diff --git a/src/tools/drawTools/vtoolpointofcontact.h b/src/tools/drawTools/vtoolpointofcontact.h index 45e28d64a..76d0d90b7 100644 --- a/src/tools/drawTools/vtoolpointofcontact.h +++ b/src/tools/drawTools/vtoolpointofcontact.h @@ -52,7 +52,7 @@ public: VToolPointOfContact(VPattern *doc, VContainer *data, const quint32 &id, const QString &arcRadius, const quint32 ¢er, 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. */ diff --git a/src/tools/drawTools/vtoolpointofintersection.h b/src/tools/drawTools/vtoolpointofintersection.h index 8d26f069e..d6df58072 100644 --- a/src/tools/drawTools/vtoolpointofintersection.h +++ b/src/tools/drawTools/vtoolpointofintersection.h @@ -50,7 +50,7 @@ public: */ VToolPointOfIntersection(VPattern *doc, VContainer *data, const quint32 &id, 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. */ diff --git a/src/tools/drawTools/vtoolshoulderpoint.h b/src/tools/drawTools/vtoolshoulderpoint.h index e7414f8f3..2de3803be 100644 --- a/src/tools/drawTools/vtoolshoulderpoint.h +++ b/src/tools/drawTools/vtoolshoulderpoint.h @@ -54,7 +54,7 @@ public: VToolShoulderPoint(VPattern *doc, VContainer *data, const quint32 &id, const QString &typeLine, const QString &formula, const quint32 &p1Line, const quint32 &p2Line, const quint32 &pShoulder, const Tool::Sources &typeCreation, - QGraphicsItem * parent = 0); + QGraphicsItem * parent = nullptr); /** * @brief setDialog set dialog when user want change tool option. */ diff --git a/src/tools/drawTools/vtoolsinglepoint.h b/src/tools/drawTools/vtoolsinglepoint.h index c09751f46..c869e81f6 100644 --- a/src/tools/drawTools/vtoolsinglepoint.h +++ b/src/tools/drawTools/vtoolsinglepoint.h @@ -48,7 +48,7 @@ public: * @param parent parent object. */ 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. */ diff --git a/src/tools/drawTools/vtoolspline.h b/src/tools/drawTools/vtoolspline.h index 5b40d582f..dd675d78c 100644 --- a/src/tools/drawTools/vtoolspline.h +++ b/src/tools/drawTools/vtoolspline.h @@ -50,7 +50,7 @@ public: * @param parent parent object. */ 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. */ diff --git a/src/tools/drawTools/vtoolsplinepath.h b/src/tools/drawTools/vtoolsplinepath.h index 4374934e1..286585b00 100644 --- a/src/tools/drawTools/vtoolsplinepath.h +++ b/src/tools/drawTools/vtoolsplinepath.h @@ -49,7 +49,7 @@ public: * @param parent parent object. */ 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. */ diff --git a/src/tools/drawTools/vtooltriangle.h b/src/tools/drawTools/vtooltriangle.h index 03913eed0..ffdb63e30 100644 --- a/src/tools/drawTools/vtooltriangle.h +++ b/src/tools/drawTools/vtooltriangle.h @@ -52,7 +52,7 @@ public: */ VToolTriangle(VPattern *doc, VContainer *data, const quint32 &id, const quint32 &axisP1Id, 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. */ diff --git a/src/tools/nodeDetails/vabstractnode.h b/src/tools/nodeDetails/vabstractnode.h index 8fc0ced14..b91bde905 100644 --- a/src/tools/nodeDetails/vabstractnode.h +++ b/src/tools/nodeDetails/vabstractnode.h @@ -47,7 +47,7 @@ public: * @param parent parent object. */ 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() {} static const QString AttrIdObject; static const QString AttrIdTool; diff --git a/src/tools/nodeDetails/vnodearc.h b/src/tools/nodeDetails/vnodearc.h index 34ff14e4c..2564b429b 100644 --- a/src/tools/nodeDetails/vnodearc.h +++ b/src/tools/nodeDetails/vnodearc.h @@ -48,9 +48,8 @@ public: * @param typeCreation way we create this tool. * @param parent parent object. */ - VNodeArc(VPattern *doc, VContainer *data, quint32 id, quint32 idArc, - const Tool::Sources &typeCreation, const quint32 &idTool = 0, QObject *qoParent = 0, - QGraphicsItem * parent = 0); + VNodeArc(VPattern *doc, VContainer *data, quint32 id, quint32 idArc, const Tool::Sources &typeCreation, + const quint32 &idTool = 0, QObject *qoParent = nullptr, QGraphicsItem * parent = nullptr); /** * @brief Create help create tool. * @param doc dom document container. @@ -61,7 +60,7 @@ public: * @param typeCreation way we create this tool. */ 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 ToolType; /** diff --git a/src/tools/nodeDetails/vnodepoint.cpp b/src/tools/nodeDetails/vnodepoint.cpp index 4a10d8508..5bbcb6b74 100644 --- a/src/tools/nodeDetails/vnodepoint.cpp +++ b/src/tools/nodeDetails/vnodepoint.cpp @@ -37,7 +37,7 @@ VNodePoint::VNodePoint(VPattern *doc, VContainer *data, quint32 id, quint32 idPo const Tool::Sources &typeCreation, const quint32 &idTool, QObject *qoParent, QGraphicsItem *parent) :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); lineName = new QGraphicsLineItem(this); diff --git a/src/tools/nodeDetails/vnodepoint.h b/src/tools/nodeDetails/vnodepoint.h index cea90ffd3..951d4e0af 100644 --- a/src/tools/nodeDetails/vnodepoint.h +++ b/src/tools/nodeDetails/vnodepoint.h @@ -49,8 +49,8 @@ public: * @param parent parent object. */ VNodePoint(VPattern *doc, VContainer *data, quint32 id, quint32 idPoint, - const Tool::Sources &typeCreation, const quint32 &idTool = 0, QObject *qoParent = 0, - QGraphicsItem * parent = 0 ); + const Tool::Sources &typeCreation, const quint32 &idTool = 0, QObject *qoParent = nullptr, + QGraphicsItem * parent = nullptr ); /** * @brief Create help create tool. * @param doc dom document container. @@ -62,7 +62,7 @@ public: */ static void Create(VPattern *doc, VContainer *data, quint32 id, quint32 idPoint, 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 ToolType; /** diff --git a/src/tools/nodeDetails/vnodespline.cpp b/src/tools/nodeDetails/vnodespline.cpp index 13c04cf02..8b68df85e 100644 --- a/src/tools/nodeDetails/vnodespline.cpp +++ b/src/tools/nodeDetails/vnodespline.cpp @@ -56,7 +56,7 @@ VNodeSpline *VNodeSpline::Create(VPattern *doc, VContainer *data, quint32 id, qu const quint32 &idTool, QObject *parent) { VAbstractTool::AddRecord(id, Tool::NodeSpline, doc); - VNodeSpline *spl = 0; + VNodeSpline *spl = nullptr; if (parse == Document::FullParse) { spl = new VNodeSpline(doc, data, id, idSpline, typeCreation, idTool, parent); diff --git a/src/tools/nodeDetails/vnodespline.h b/src/tools/nodeDetails/vnodespline.h index a7b1b1729..1384ea97e 100644 --- a/src/tools/nodeDetails/vnodespline.h +++ b/src/tools/nodeDetails/vnodespline.h @@ -49,8 +49,8 @@ public: * @param parent parent object. */ VNodeSpline(VPattern *doc, VContainer *data, quint32 id, quint32 idSpline, - const Tool::Sources &typeCreation, const quint32 &idTool = 0, QObject *qoParent = 0, - QGraphicsItem * parent = 0); + const Tool::Sources &typeCreation, const quint32 &idTool = 0, QObject *qoParent = nullptr, + QGraphicsItem * parent = nullptr); /** * @brief Create help create tool. * @param doc dom document container. @@ -63,7 +63,7 @@ public: */ static VNodeSpline *Create(VPattern *doc, VContainer *data, quint32 id, quint32 idSpline, 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 ToolType; /** diff --git a/src/tools/nodeDetails/vnodesplinepath.h b/src/tools/nodeDetails/vnodesplinepath.h index 248773d6f..3d96c306a 100644 --- a/src/tools/nodeDetails/vnodesplinepath.h +++ b/src/tools/nodeDetails/vnodesplinepath.h @@ -49,8 +49,8 @@ public: * @param parent parent object. */ VNodeSplinePath(VPattern *doc, VContainer *data, quint32 id, quint32 idSpline, - const Tool::Sources &typeCreation, const quint32 &idTool = 0, QObject *qoParent = 0, - QGraphicsItem * parent = 0); + const Tool::Sources &typeCreation, const quint32 &idTool = 0, + QObject *qoParent = nullptr, QGraphicsItem * parent = nullptr); /** * @brief Create help create tool. * @param doc dom document container. diff --git a/src/tools/vabstracttool.h b/src/tools/vabstracttool.h index 0b2351d4c..48b613971 100644 --- a/src/tools/vabstracttool.h +++ b/src/tools/vabstracttool.h @@ -47,7 +47,7 @@ public: * @param id object id in container. * @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(){} /** * @brief NewSceneRect calculate scene rect what contains all items and doesn't less that size of scene view. diff --git a/src/tools/vdatatool.h b/src/tools/vdatatool.h index d2b941393..69ef0a00f 100644 --- a/src/tools/vdatatool.h +++ b/src/tools/vdatatool.h @@ -44,7 +44,7 @@ public: * @param data container with variables * @param parent parent object */ - VDataTool(VContainer *data, QObject *parent = 0); + VDataTool(VContainer *data, QObject *parent = nullptr); virtual ~VDataTool(){} /** * @brief operator = assignment operator. diff --git a/src/tools/vtooldetail.cpp b/src/tools/vtooldetail.cpp index 3beb3072f..5ad9740b4 100644 --- a/src/tools/vtooldetail.cpp +++ b/src/tools/vtooldetail.cpp @@ -49,7 +49,7 @@ const QString VToolDetail::NodeSplinePath = QStringLiteral("NodeSplinePath"); VToolDetail::VToolDetail(VPattern *doc, VContainer *data, const quint32 &id, const Tool::Sources &typeCreation, 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); for (ptrdiff_t i = 0; i< detail.CountNode(); ++i) diff --git a/src/tools/vtooldetail.h b/src/tools/vtooldetail.h index aaf11337c..c15d4da54 100644 --- a/src/tools/vtooldetail.h +++ b/src/tools/vtooldetail.h @@ -50,7 +50,7 @@ public: * @param parent parent object */ VToolDetail(VPattern *doc, VContainer *data, const quint32 &id, const Tool::Sources &typeCreation, - VMainGraphicsScene *scene, QGraphicsItem * parent = 0); + VMainGraphicsScene *scene, QGraphicsItem * parent = nullptr); ~VToolDetail(); /** * @brief setDialog set dialog when user want change tool option. diff --git a/src/tools/vtooluniondetails.h b/src/tools/vtooluniondetails.h index aae979e7b..32505d861 100644 --- a/src/tools/vtooluniondetails.h +++ b/src/tools/vtooluniondetails.h @@ -53,7 +53,7 @@ public: */ VToolUnionDetails(VPattern *doc, VContainer *data, const quint32 &id, const VDetail &d1, const VDetail &d2, 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. */ diff --git a/src/widgets/doubledelegate.h b/src/widgets/doubledelegate.h index fde48b36b..f515b14cb 100644 --- a/src/widgets/doubledelegate.h +++ b/src/widgets/doubledelegate.h @@ -43,7 +43,7 @@ public: * @brief DoubleSpinBoxDelegate constructor. * @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 * style option are used to control how the editor widget appears. diff --git a/src/widgets/textdelegate.h b/src/widgets/textdelegate.h index 5bdac8a6e..442ca1a3d 100644 --- a/src/widgets/textdelegate.h +++ b/src/widgets/textdelegate.h @@ -43,7 +43,7 @@ public: * @brief TextDelegate constructor. * @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 * style option are used to control how the editor widget appears. diff --git a/src/widgets/vcontrolpointspline.cpp b/src/widgets/vcontrolpointspline.cpp index bf1dc0be8..c8ba29692 100644 --- a/src/widgets/vcontrolpointspline.cpp +++ b/src/widgets/vcontrolpointspline.cpp @@ -34,7 +34,8 @@ VControlPointSpline::VControlPointSpline(const qint32 &indexSpline, SplinePoint::Position position, const QPointF &controlPoint, const QPointF &splinePoint, 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 QRectF rec = QRectF(0, 0, radius*2, radius*2); diff --git a/src/widgets/vcontrolpointspline.h b/src/widgets/vcontrolpointspline.h index 60e8b5b54..550420bfb 100644 --- a/src/widgets/vcontrolpointspline.h +++ b/src/widgets/vcontrolpointspline.h @@ -50,7 +50,7 @@ public: */ VControlPointSpline(const qint32 &indexSpline, SplinePoint::Position position, const QPointF &controlPoint, const QPointF &splinePoint, - QGraphicsItem * parent = 0); + QGraphicsItem * parent = nullptr); signals: /** * @brief ControlPointChangePosition emit when control point change position. diff --git a/src/widgets/vgraphicssimpletextitem.h b/src/widgets/vgraphicssimpletextitem.h index f21454f4d..4c6967a60 100644 --- a/src/widgets/vgraphicssimpletextitem.h +++ b/src/widgets/vgraphicssimpletextitem.h @@ -42,13 +42,13 @@ public: * @brief VGraphicsSimpleTextItem default constructor. * @param parent parent object. */ - VGraphicsSimpleTextItem(QGraphicsItem * parent = 0); + VGraphicsSimpleTextItem(QGraphicsItem * parent = nullptr); /** * @brief VGraphicsSimpleTextItem constructor. * @param text text. * @param parent parent object. */ - VGraphicsSimpleTextItem( const QString & text, QGraphicsItem * parent = 0 ); + VGraphicsSimpleTextItem( const QString & text, QGraphicsItem * parent = nullptr ); /** * @brief FontSize return label font size. * @return font size. diff --git a/src/widgets/vitem.cpp b/src/widgets/vitem.cpp index 8d548a648..bbbf2d11e 100644 --- a/src/widgets/vitem.cpp +++ b/src/widgets/vitem.cpp @@ -33,17 +33,17 @@ #include 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), - paper(0) + paper(nullptr) { } @@ -51,7 +51,7 @@ VItem::VItem(int numInList, QGraphicsItem *parent):QGraphicsPathItem (parent), n void VItem::checkItemChange() { QRectF rect; - if (paper == 0) + if (paper == nullptr) { qDebug()<<"Don't set paper for detail!!!!"; rect = this->scene()->sceneRect(); diff --git a/src/widgets/vitem.h b/src/widgets/vitem.h index 0b8523045..4822e0f4b 100644 --- a/src/widgets/vitem.h +++ b/src/widgets/vitem.h @@ -48,14 +48,14 @@ public: * @param numInList index in list of details. * @param parent parent object. */ - VItem (int numInList, QGraphicsItem * parent = 0); + VItem (int numInList, QGraphicsItem * parent = nullptr); /** * @brief VItem constructor. * @param path detail path. * @param numInList index in list of details. * @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. * @param angle angle in degree. diff --git a/src/widgets/vmaingraphicsscene.h b/src/widgets/vmaingraphicsscene.h index a25b4a74f..3b3f6afa4 100644 --- a/src/widgets/vmaingraphicsscene.h +++ b/src/widgets/vmaingraphicsscene.h @@ -48,7 +48,7 @@ public: * @param sceneRect scene rect. * @param parent parent object. */ - VMainGraphicsScene(const QRectF & sceneRect, QObject * parent = 0); + VMainGraphicsScene(const QRectF & sceneRect, QObject * parent = nullptr); /** * @brief getHorScrollBar return scene horizontal scrollbar. * @return horizontal scrollbar. diff --git a/src/widgets/vmaingraphicsview.h b/src/widgets/vmaingraphicsview.h index 175f35025..55cdfd648 100644 --- a/src/widgets/vmaingraphicsview.h +++ b/src/widgets/vmaingraphicsview.h @@ -42,7 +42,7 @@ public: * @brief VMainGraphicsView constructor. * @param parent parent object. */ - explicit VMainGraphicsView(QWidget *parent = 0); + explicit VMainGraphicsView(QWidget *parent = nullptr); signals: /** * @brief NewFactor send new scale factor. diff --git a/src/widgets/vsimplearc.cpp b/src/widgets/vsimplearc.cpp index f6cf369eb..91ebef9b9 100644 --- a/src/widgets/vsimplearc.cpp +++ b/src/widgets/vsimplearc.cpp @@ -31,7 +31,7 @@ VSimpleArc::VSimpleArc(quint32 id, Qt::GlobalColor *currentColor, qreal *factor, QObject *parent) :QObject(parent), QGraphicsPathItem(), id (id), factor(factor), currentColor(currentColor) { - if (factor == 0) + if (factor == nullptr) { setPen(QPen(Qt::black, widthHairLine)); } @@ -55,7 +55,7 @@ void VSimpleArc::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) void VSimpleArc::hoverMoveEvent(QGraphicsSceneHoverEvent *event) { Q_UNUSED(event); - if (factor == 0) + if (factor == nullptr) { this->setPen(QPen(*currentColor, widthMainLine)); } @@ -68,7 +68,7 @@ void VSimpleArc::hoverMoveEvent(QGraphicsSceneHoverEvent *event) void VSimpleArc::hoverLeaveEvent(QGraphicsSceneHoverEvent *event) { Q_UNUSED(event); - if (factor == 0) + if (factor == nullptr) { this->setPen(QPen(*currentColor, widthHairLine)); } diff --git a/src/widgets/vsimplearc.h b/src/widgets/vsimplearc.h index 32665a254..914e93daf 100644 --- a/src/widgets/vsimplearc.h +++ b/src/widgets/vsimplearc.h @@ -55,7 +55,7 @@ public: * @param factor scale factor. * @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: /** * @brief Choosed send id when clicked. diff --git a/src/widgets/vsimplespline.cpp b/src/widgets/vsimplespline.cpp index 3e5d2d063..320bb37b8 100644 --- a/src/widgets/vsimplespline.cpp +++ b/src/widgets/vsimplespline.cpp @@ -32,7 +32,7 @@ VSimpleSpline::VSimpleSpline(quint32 id, Qt::GlobalColor *currentColor, qreal *factor, QObject *parent) :QObject(parent), QGraphicsPathItem(), id (id), factor(factor), currentColor(currentColor) { - if (factor == 0) + if (factor == nullptr) { setPen(QPen(Qt::black, widthHairLine)); } @@ -56,7 +56,7 @@ void VSimpleSpline::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) void VSimpleSpline::hoverMoveEvent(QGraphicsSceneHoverEvent *event) { Q_UNUSED(event); - if (factor == 0) + if (factor == nullptr) { this->setPen(QPen(*currentColor, widthMainLine)); } @@ -69,7 +69,7 @@ void VSimpleSpline::hoverMoveEvent(QGraphicsSceneHoverEvent *event) void VSimpleSpline::hoverLeaveEvent(QGraphicsSceneHoverEvent *event) { Q_UNUSED(event); - if (factor == 0) + if (factor == nullptr) { this->setPen(QPen(*currentColor, widthHairLine)); } diff --git a/src/widgets/vsimplespline.h b/src/widgets/vsimplespline.h index 4853c1cbe..51045182e 100644 --- a/src/widgets/vsimplespline.h +++ b/src/widgets/vsimplespline.h @@ -55,7 +55,7 @@ public: * @param currentColor current color. * @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: /** * @brief Choosed send id when clicked. diff --git a/src/widgets/vtablegraphicsview.h b/src/widgets/vtablegraphicsview.h index 7d7ebd5c9..abd79573a 100644 --- a/src/widgets/vtablegraphicsview.h +++ b/src/widgets/vtablegraphicsview.h @@ -43,7 +43,7 @@ public: */ enum typeMove_e { Left, Right, Up, Down }; - VTableGraphicsView(QGraphicsScene* pScene, QWidget *parent = 0); + VTableGraphicsView(QGraphicsScene* pScene, QWidget *parent = nullptr); signals: /** * @brief itemChect emit after change selection state detail. diff --git a/src/xml/vdomdocument.cpp b/src/xml/vdomdocument.cpp index de4449ec4..e22d956e5 100644 --- a/src/xml/vdomdocument.cpp +++ b/src/xml/vdomdocument.cpp @@ -40,7 +40,7 @@ class MessageHandler : public QAbstractMessageHandler { public: - MessageHandler() : QAbstractMessageHandler(0), m_messageType(QtMsgType()), m_description(QString()), + MessageHandler() : QAbstractMessageHandler(), m_messageType(QtMsgType()), m_description(QString()), m_sourceLocation(QSourceLocation()){} QString statusMessage() const; qint64 line() const; diff --git a/src/xml/vpattern.h b/src/xml/vpattern.h index 454786598..67298f618 100644 --- a/src/xml/vpattern.h +++ b/src/xml/vpattern.h @@ -52,7 +52,7 @@ class VPattern : public QObject, public VDomDocument { Q_OBJECT 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. */