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); qreal eval(QString prog, QString *errorMsg);
private: private:
Calculator(const Calculator &calc); Q_DISABLE_COPY(Calculator)
const Calculator &operator=(const Calculator &calc);
QString *errorMsg; QString *errorMsg;
/** /**
* @brief token теперішня лексема. * @brief token теперішня лексема.

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -125,6 +125,7 @@ protected:
void showEvent ( QShowEvent * event ); void showEvent ( QShowEvent * event );
void keyPressEvent ( QKeyEvent * event ); void keyPressEvent ( QKeyEvent * event );
private: private:
Q_DISABLE_COPY(TableWindow)
/** /**
* @brief ui Змінна для доступу до об'єктів вікна. * @brief ui Змінна для доступу до об'єктів вікна.
*/ */
@ -181,8 +182,6 @@ private:
* @brief sceneRect Мінімальний розмір листа паперу що буде показуватися на сцені. * @brief sceneRect Мінімальний розмір листа паперу що буде показуватися на сцені.
*/ */
QRectF sceneRect; QRectF sceneRect;
TableWindow(const TableWindow &window);
const TableWindow &operator=(const TableWindow& window);
void SvgFile(const QString &name)const; void SvgFile(const QString &name)const;
void PngFile(const QString &name)const; void PngFile(const QString &name)const;
void PsFile(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); void AddAttribute(QDomElement &domElement, const QString &name, const QString &value);
const VContainer *getData() const; const VContainer *getData() const;
private: private:
VAbstractTool(const VAbstractTool &tool); Q_DISABLE_COPY(VAbstractTool)
const VAbstractTool &operator=(const VAbstractTool &tool);
}; };
#endif // VABSTRACTTOOL_H #endif // VABSTRACTTOOL_H

View File

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

View File

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

View File

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