Used macros Q_DISABLE_COPY for classes.

--HG--
branch : feature
This commit is contained in:
dismine 2013-09-26 21:50:52 +03:00
parent 7d9dac37b6
commit 1488823b34
22 changed files with 22 additions and 44 deletions

View File

@ -48,8 +48,7 @@ public:
*/
qreal eval(QString prog, QString *errorMsg);
private:
Calculator(const Calculator &calc);
const Calculator &operator=(const Calculator &calc);
Q_DISABLE_COPY(Calculator)
QString *errorMsg;
/**
* @brief token теперішня лексема.

View File

@ -52,6 +52,7 @@ public slots:
virtual void ChoosedObject(qint64 id, Scene::Type type);
virtual void DialogAccepted();
private:
Q_DISABLE_COPY(DialogAlongLine)
Ui::DialogAlongLine *ui;
qint32 number;
QString pointName;
@ -59,8 +60,6 @@ private:
QString formula;
qint64 firstPointId;
qint64 secondPointId;
DialogAlongLine(const DialogAlongLine &dialog);
const DialogAlongLine &operator=(const DialogAlongLine& dialog);
};
#endif // DIALOGALONGLINE_H

View File

@ -61,6 +61,7 @@ public slots:
protected:
virtual void CheckState();
private:
Q_DISABLE_COPY(DialogArc)
Ui::DialogArc *ui;
bool flagRadius;
bool flagF1;
@ -76,8 +77,6 @@ private:
void EvalF1();
void EvalF2();
void ShowLineArcs();
DialogArc(const DialogArc &dialog);
const DialogArc &operator=(const DialogArc& dialog);
};
#endif // DIALOGARC_H

View File

@ -58,6 +58,7 @@ public slots:
virtual void ChoosedObject(qint64 id, Scene::Type type);
virtual void DialogAccepted();
private:
Q_DISABLE_COPY(DialogBisector)
Ui::DialogBisector *ui;
qint32 number;
QString pointName;
@ -66,8 +67,6 @@ private:
qint64 firstPointId;
qint64 secondPointId;
qint64 thirdPointId;
DialogBisector(const DialogBisector &dialog);
const DialogBisector &operator=(const DialogBisector& dialog);
};
#endif // DIALOGBISECTOR_H

View File

@ -55,14 +55,13 @@ public slots:
virtual void ChoosedObject(qint64 id, Scene::Type type);
virtual void DialogAccepted();
private:
Q_DISABLE_COPY(DialogEndLine)
Ui::DialogEndLine *ui;
QString pointName;
QString typeLine;
QString formula;
qreal angle;
qint64 basePointId;
DialogEndLine(const DialogEndLine &dialog);
const DialogEndLine &operator=(const DialogEndLine& dialog);
};
#endif // DIALOGENDLINE_H

View File

@ -46,6 +46,7 @@ signals:
protected:
virtual void closeEvent ( QCloseEvent * event );
private:
Q_DISABLE_COPY(DialogHistory)
Ui::DialogHistory *ui;
VDomDocument *doc;
qint32 cursorRow;
@ -54,8 +55,6 @@ private:
QString Record(const VToolRecord &tool);
void InitialTable();
void ShowPoint();
DialogHistory(const DialogHistory &dialog);
const DialogHistory &operator=(const DialogHistory& dialog);
};
#endif // DIALOGHISTORY_H

View File

@ -47,6 +47,7 @@ signals:
void FullUpdateTree();
void haveLiteChange();
private:
Q_DISABLE_COPY(DialogIncrements)
Ui::DialogIncrements *ui;
VContainer *data; // need because we must change data
VDomDocument *doc;
@ -62,8 +63,6 @@ private:
void FillLengthArcs();
void AddIncrementToFile(qint64 id, QString name, qint32 base, qreal ksize, qreal kgrowth,
QString description);
DialogIncrements(const DialogIncrements &dialog);
const DialogIncrements &operator=(const DialogIncrements& dialog);
};
#endif // DIALOGINCREMENTS_H

View File

@ -47,12 +47,11 @@ public slots:
void ChoosedObject(qint64 id, Scene::Type type);
virtual void DialogAccepted();
private:
Q_DISABLE_COPY(DialogLine)
Ui::DialogLine *ui;
qint32 number;
qint64 firstPoint;
qint64 secondPoint;
DialogLine(const DialogLine &dialog);
const DialogLine &operator=(const DialogLine& dialog);
};
#endif // DIALOGLINE_H

View File

@ -53,6 +53,7 @@ public slots:
void P1Line2Changed( int index);
void P2Line2Changed( int index);
private:
Q_DISABLE_COPY(DialogLineIntersect)
Ui::DialogLineIntersect *ui;
qint32 number;
QString pointName;
@ -63,8 +64,6 @@ private:
bool flagPoint;
virtual void CheckState();
bool CheckIntersecion();
DialogLineIntersect(const DialogLineIntersect &dialog);
const DialogLineIntersect &operator=(const DialogLineIntersect& dialog);
};
#endif // DIALOGLINEINTERSECT_H

View File

@ -57,6 +57,7 @@ public slots:
virtual void ChoosedObject(qint64 id, Scene::Type type);
virtual void DialogAccepted();
private:
Q_DISABLE_COPY(DialogNormal)
Ui::DialogNormal *ui;
qint32 number;
QString pointName;
@ -65,8 +66,6 @@ private:
qreal angle;
qint64 firstPointId;
qint64 secondPointId;
DialogNormal(const DialogNormal &dialog);
const DialogNormal &operator=(const DialogNormal& dialog);
};
#endif // DIALOGNORMAL_H

View File

@ -54,6 +54,7 @@ public slots:
virtual void ChoosedObject(qint64 id, Scene::Type type);
virtual void DialogAccepted();
private:
Q_DISABLE_COPY(DialogPointOfContact)
Ui::DialogPointOfContact ui;
qint32 number;
QString pointName;
@ -61,8 +62,6 @@ private:
qint64 center;
qint64 firstPoint;
qint64 secondPoint;
DialogPointOfContact(const DialogPointOfContact &dialog);
const DialogPointOfContact &operator=(const DialogPointOfContact& dialog);
};
#endif // DIALOGPOINTOFCONTACT_H

View File

@ -54,6 +54,7 @@ public slots:
virtual void ChoosedObject(qint64 id, Scene::Type type);
virtual void DialogAccepted();
private:
Q_DISABLE_COPY(DialogShoulderPoint)
Ui::DialogShoulderPoint *ui;
qint32 number;
QString pointName;
@ -62,8 +63,6 @@ private:
qint64 p1Line;
qint64 p2Line;
qint64 pShoulder;
DialogShoulderPoint(const DialogShoulderPoint &dialog);
const DialogShoulderPoint &operator=(const DialogShoulderPoint& dialog);
};
#endif // DIALOGSHOULDERPOINT_H

View File

@ -42,11 +42,10 @@ public slots:
void mousePress(QPointF scenePos);
virtual void DialogAccepted();
private:
Q_DISABLE_COPY(DialogSinglePoint)
Ui::DialogSinglePoint *ui;
QString name;
QPointF point;
DialogSinglePoint(const DialogSinglePoint &dialog);
const DialogSinglePoint &operator=(const DialogSinglePoint& dialog);
};
#endif // DIALOGSINGLEPOINT_H

View File

@ -54,6 +54,7 @@ public slots:
virtual void ChoosedObject(qint64 id, Scene::Type type);
virtual void DialogAccepted();
private:
Q_DISABLE_COPY(DialogSpline)
Ui::DialogSpline *ui;
qint32 number;
qint64 p1; // перша точка
@ -63,8 +64,6 @@ private:
qreal kAsm1;
qreal kAsm2;
qreal kCurve;
DialogSpline(const DialogSpline &dialog);
const DialogSpline &operator=(const DialogSpline& dialog);
};
#endif // DIALOGSPLINE_H

View File

@ -49,14 +49,13 @@ public slots:
void KAsm1Changed(qreal d);
void KAsm2Changed(qreal d);
private:
Q_DISABLE_COPY(DialogSplinePath)
Ui::DialogSplinePath *ui;
VSplinePath path;
void NewItem(qint64 id, qreal kAsm1, qreal angle, qreal kAsm2);
void DataPoint(qint64 id, qreal kAsm1, qreal angle1, qreal kAsm2, qreal angle2);
void EnableFields();
void SetAngle(qint32 angle);
DialogSplinePath(const DialogSplinePath &dialog);
const DialogSplinePath &operator=(const DialogSplinePath& dialog);
};
#endif // DIALOGSPLINEPATH_H

View File

@ -69,6 +69,7 @@ public slots:
virtual void ValChenged(int row);
void UpdateList();
protected:
Q_DISABLE_COPY(DialogTool)
const VContainer *data;
bool isInitialized;
bool flagName;
@ -102,8 +103,6 @@ protected:
void Eval(QLineEdit *edit, bool &flag, QTimer *timer, QLabel *label);
void setCurrentPointId(QComboBox *box, qint64 &pointId, const qint64 &value, const qint64 &id) const;
qint64 getCurrentPointId(QComboBox *box) const;
DialogTool(const DialogTool &dialog);
DialogTool &operator=(const DialogTool &dialog);
};
#endif // DIALOGTOOL_H

View File

@ -111,6 +111,7 @@ protected:
virtual void closeEvent( QCloseEvent * event );
void Clear();
private:
Q_DISABLE_COPY(MainWindow)
Ui::MainWindow *ui;
Tools::Enum tool;
VMainGraphicsScene *currentScene;
@ -140,8 +141,6 @@ private:
QString fileName;
bool changeInFile;
Draw::Mode mode;
MainWindow(const MainWindow &window);
const MainWindow &operator=(const MainWindow &window);
void ToolBarOption();
void ToolBarDraws();
void CanselTool();

View File

@ -125,6 +125,7 @@ protected:
void showEvent ( QShowEvent * event );
void keyPressEvent ( QKeyEvent * event );
private:
Q_DISABLE_COPY(TableWindow)
/**
* @brief ui Змінна для доступу до об'єктів вікна.
*/
@ -181,8 +182,6 @@ private:
* @brief sceneRect Мінімальний розмір листа паперу що буде показуватися на сцені.
*/
QRectF sceneRect;
TableWindow(const TableWindow &window);
const TableWindow &operator=(const TableWindow& window);
void SvgFile(const QString &name)const;
void PngFile(const QString &name)const;
void PsFile(const QString &name)const;

View File

@ -65,7 +65,6 @@ protected:
void AddAttribute(QDomElement &domElement, const QString &name, const QString &value);
const VContainer *getData() const;
private:
VAbstractTool(const VAbstractTool &tool);
const VAbstractTool &operator=(const VAbstractTool &tool);
Q_DISABLE_COPY(VAbstractTool)
};
#endif // VABSTRACTTOOL_H

View File

@ -60,12 +60,11 @@ protected:
QVariant itemChange ( GraphicsItemChange change, const QVariant &value );
virtual void mouseReleaseEvent ( QGraphicsSceneMouseEvent * event );
private:
Q_DISABLE_COPY(VToolDetail)
QSharedPointer<DialogDetail> dialogDetail;
VMainGraphicsScene *sceneDetails;
void RefreshGeometry ();
void AddNode(QDomElement &domElement, VNodeDetail &node);
VToolDetail(const VToolDetail &tool);
VToolDetail &operator=(const VToolDetail &tool);
};
#endif // VTOOLDETAIL_H

View File

@ -49,8 +49,7 @@ protected:
virtual void hoverLeaveEvent ( QGraphicsSceneHoverEvent * event );
QVariant itemChange ( GraphicsItemChange change, const QVariant &value );
private:
VControlPointSpline(const VControlPointSpline &pSpl);
const VControlPointSpline &operator=(const VControlPointSpline &pSpl);
Q_DISABLE_COPY(VControlPointSpline)
qint32 indexSpline;
SplinePoint::Position position;
qint32 LineIntersectCircle(QPointF center, qreal radius, QLineF line, QPointF &p1,

View File

@ -82,6 +82,7 @@ public slots:
void haveLiteChange();
void ShowHistoryTool(qint64 id, Qt::GlobalColor color, bool enable);
private:
Q_DISABLE_COPY(VDomDocument)
QMap<QString, QDomElement> map;
QString nameActivDraw;
VContainer *data;
@ -90,8 +91,6 @@ private:
qint64 cursor;
QComboBox *comboBoxDraws;
Draw::Mode *mode;
VDomDocument(const VDomDocument & doc);
const VDomDocument &operator=(const VDomDocument& doc);
bool find(QDomElement node, const QString& id);
bool CheckNameDraw(const QString& name) const;
void SetActivDraw(const QString& name);