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.
* @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.

View File

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

View File

@ -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);

View File

@ -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:

View File

@ -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:
/**

View File

@ -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;

View File

@ -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:
/**

View File

@ -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;

View File

@ -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:

View File

@ -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();

View File

@ -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;

View File

@ -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)

View File

@ -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

View File

@ -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);

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -34,11 +34,12 @@
#include <QtWidgets>
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);

View File

@ -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:
/**

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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());

View File

@ -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.

View File

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

View File

@ -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:
/**

View File

@ -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)

View File

@ -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"));

View File

@ -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.
*/

View File

@ -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.
*/

View File

@ -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.

View File

@ -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.
*/

View File

@ -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());

View File

@ -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.
*/

View File

@ -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.
*/

View File

@ -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.
*/

View File

@ -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.
*/

View File

@ -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.
*/

View File

@ -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.
*/

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 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");

View File

@ -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.

View File

@ -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.
*/

View File

@ -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:

View File

@ -52,7 +52,7 @@ public:
VToolPointOfContact(VPattern *doc, VContainer *data, const quint32 &id,
const QString &arcRadius, const quint32 &center,
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.
*/

View File

@ -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.
*/

View File

@ -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.
*/

View File

@ -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.
*/

View File

@ -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.
*/

View File

@ -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.
*/

View File

@ -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.
*/

View File

@ -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;

View File

@ -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;
/**

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,
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);

View File

@ -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;
/**

View File

@ -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);

View File

@ -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;
/**

View File

@ -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.

View File

@ -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.

View File

@ -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.

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,
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)

View File

@ -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.

View File

@ -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.
*/

View File

@ -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.

View File

@ -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.

View File

@ -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);

View File

@ -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.

View File

@ -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.

View File

@ -33,17 +33,17 @@
#include <QDebug>
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();

View File

@ -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.

View File

@ -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.

View File

@ -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.

View File

@ -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));
}

View File

@ -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.

View File

@ -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));
}

View File

@ -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.

View File

@ -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.

View File

@ -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;

View File

@ -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.
*/