mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-09-13 20:23:04 +02:00
Modernize-use-override refactors code
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5009 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
parent
9f9b127c04
commit
31f36b8625
@ -45,7 +45,7 @@ class ECHSFileToFile : public ECHStrategy
|
||||
{
|
||||
public:
|
||||
ECHSFileToFile (ElementsLocation &source, ElementsLocation &destination);
|
||||
ElementsLocation copy();
|
||||
ElementsLocation copy() override;
|
||||
|
||||
private:
|
||||
ElementsLocation copyDirectory(ElementsLocation &source, ElementsLocation &destination, QString rename = QString());
|
||||
@ -60,7 +60,7 @@ class ECHSXmlToFile : public ECHStrategy
|
||||
{
|
||||
public:
|
||||
ECHSXmlToFile (ElementsLocation &source, ElementsLocation &destination);
|
||||
ElementsLocation copy();
|
||||
ElementsLocation copy() override;
|
||||
|
||||
private:
|
||||
ElementsLocation copyDirectory(ElementsLocation &source, ElementsLocation &destination, QString rename = QString());
|
||||
@ -76,7 +76,7 @@ class ECHSToXml : public ECHStrategy
|
||||
{
|
||||
public:
|
||||
ECHSToXml (ElementsLocation &source, ElementsLocation &destination);
|
||||
ElementsLocation copy();
|
||||
ElementsLocation copy() override;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -32,7 +32,7 @@ class ElementCollectionItem : public QStandardItem
|
||||
ElementCollectionItem();
|
||||
|
||||
enum {Type = UserType+1};
|
||||
virtual int type() const { return Type; }
|
||||
int type() const override { return Type; }
|
||||
|
||||
virtual bool isDir() const = 0;
|
||||
virtual bool isElement() const = 0;
|
||||
|
@ -35,11 +35,11 @@ class ElementsCollectionModel : public QStandardItemModel
|
||||
public:
|
||||
ElementsCollectionModel(QObject *parent = Q_NULLPTR);
|
||||
|
||||
virtual QVariant data(const QModelIndex &index, int role) const;
|
||||
virtual QMimeData *mimeData(const QModelIndexList &indexes) const;
|
||||
virtual QStringList mimeTypes() const;
|
||||
virtual bool canDropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) const;
|
||||
virtual bool dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent);
|
||||
QVariant data(const QModelIndex &index, int role) const override;
|
||||
QMimeData *mimeData(const QModelIndexList &indexes) const override;
|
||||
QStringList mimeTypes() const override;
|
||||
bool canDropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) const override;
|
||||
bool dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) override;
|
||||
|
||||
void loadCollections(bool common_collection, bool custom_collection, QList<QETProject *> projects);
|
||||
|
||||
|
@ -54,7 +54,7 @@ class ElementsCollectionWidget : public QWidget
|
||||
void setCurrentLocation(const ElementsLocation &location);
|
||||
|
||||
protected:
|
||||
virtual void leaveEvent(QEvent *event);
|
||||
void leaveEvent(QEvent *event) override;
|
||||
|
||||
private:
|
||||
void setUpAction();
|
||||
|
@ -34,7 +34,7 @@ class ElementsTreeView : public QTreeView
|
||||
ElementsTreeView(QWidget *parent = nullptr);
|
||||
|
||||
protected:
|
||||
virtual void startDrag(Qt::DropActions supportedActions);
|
||||
void startDrag(Qt::DropActions supportedActions) override;
|
||||
virtual void startElementDrag(const ElementsLocation &location);
|
||||
};
|
||||
|
||||
|
@ -31,24 +31,24 @@ class FileElementCollectionItem : public ElementCollectionItem
|
||||
FileElementCollectionItem();
|
||||
|
||||
enum { Type = UserType+2 };
|
||||
virtual int type() const { return Type;}
|
||||
int type() const override { return Type;}
|
||||
|
||||
bool setRootPath(QString path, bool set_data = true, bool hide_element = false);
|
||||
QString fileSystemPath() const;
|
||||
QString dirPath() const;
|
||||
|
||||
virtual bool isDir() const;
|
||||
virtual bool isElement() const;
|
||||
virtual QString localName();
|
||||
virtual QString name() const;
|
||||
virtual QString collectionPath() const;
|
||||
virtual bool isCollectionRoot() const;
|
||||
bool isDir() const override;
|
||||
bool isElement() const override;
|
||||
QString localName() override;
|
||||
QString name() const override;
|
||||
QString collectionPath() const override;
|
||||
bool isCollectionRoot() const override;
|
||||
bool isCommonCollection() const;
|
||||
bool isCustomCollection() const;
|
||||
virtual void addChildAtPath(const QString &collection_name);
|
||||
void addChildAtPath(const QString &collection_name) override;
|
||||
|
||||
void setUpData();
|
||||
void setUpIcon();
|
||||
void setUpData() override;
|
||||
void setUpIcon() override;
|
||||
|
||||
void hire();
|
||||
|
||||
|
@ -31,7 +31,7 @@ class RenameDialog : public QDialog
|
||||
|
||||
public:
|
||||
explicit RenameDialog(QString path, QWidget *parent = nullptr);
|
||||
~RenameDialog();
|
||||
~RenameDialog() override;
|
||||
|
||||
QString newName() const {return m_new_name;}
|
||||
QET::Action selectedAction() const {return m_action;}
|
||||
|
@ -33,21 +33,21 @@ class XmlProjectElementCollectionItem : public ElementCollectionItem
|
||||
XmlProjectElementCollectionItem();
|
||||
|
||||
enum {Type = UserType+3};
|
||||
virtual int type() const { return Type; }
|
||||
int type() const override { return Type; }
|
||||
|
||||
virtual bool isDir() const;
|
||||
virtual bool isElement() const;
|
||||
virtual QString localName();
|
||||
virtual QString name() const;
|
||||
virtual QString collectionPath() const;
|
||||
bool isDir() const override;
|
||||
bool isElement() const override;
|
||||
QString localName() override;
|
||||
QString name() const override;
|
||||
QString collectionPath() const override;
|
||||
virtual QString embeddedPath() const;
|
||||
virtual bool isCollectionRoot() const;
|
||||
virtual void addChildAtPath(const QString &collection_name);
|
||||
bool isCollectionRoot() const override;
|
||||
void addChildAtPath(const QString &collection_name) override;
|
||||
QETProject * project() const;
|
||||
|
||||
void setProject (QETProject *project, bool set_data = true, bool hide_element = false);
|
||||
void setUpData();
|
||||
void setUpIcon();
|
||||
void setUpData() override;
|
||||
void setUpIcon() override;
|
||||
|
||||
private:
|
||||
void populate(bool set_data = true, bool hide_element = false);
|
||||
|
@ -32,7 +32,7 @@ class PropertiesEditorDockWidget : public QDockWidget
|
||||
|
||||
public:
|
||||
explicit PropertiesEditorDockWidget(QWidget *parent = nullptr);
|
||||
~PropertiesEditorDockWidget();
|
||||
~PropertiesEditorDockWidget() override;
|
||||
|
||||
virtual void clear();
|
||||
virtual void apply();
|
||||
|
@ -39,10 +39,10 @@ class QPropertyUndoCommand : public QUndoCommand
|
||||
void setNewValue(const QVariant &new_value);
|
||||
void enableAnimation (bool animate = true);
|
||||
|
||||
int id() const{return 10000;}
|
||||
virtual bool mergeWith(const QUndoCommand *other);
|
||||
void redo();
|
||||
void undo();
|
||||
int id() const override{return 10000;}
|
||||
bool mergeWith(const QUndoCommand *other) override;
|
||||
void redo() override;
|
||||
void undo() override;
|
||||
|
||||
private:
|
||||
QObject *m_object;
|
||||
|
@ -31,15 +31,15 @@ class QetGraphicsHandlerItem : public QGraphicsItem
|
||||
{
|
||||
public:
|
||||
QetGraphicsHandlerItem(qreal size = 15);
|
||||
virtual QRectF boundingRect() const;
|
||||
QRectF boundingRect() const override;
|
||||
|
||||
enum { Type = UserType + 1200};
|
||||
virtual int type() const {return Type;}
|
||||
int type() const override {return Type;}
|
||||
|
||||
void setColor(QColor color);
|
||||
|
||||
protected:
|
||||
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
|
||||
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override;
|
||||
|
||||
private:
|
||||
qreal m_size,
|
||||
|
@ -28,7 +28,7 @@ class AboutQET : public QDialog {
|
||||
// constructors, destructor
|
||||
public:
|
||||
AboutQET(QWidget * = nullptr);
|
||||
virtual ~AboutQET();
|
||||
~AboutQET() override;
|
||||
|
||||
private:
|
||||
AboutQET(AboutQET &);
|
||||
|
@ -64,99 +64,99 @@ class UnitNum: public NumStrategy
|
||||
{
|
||||
public:
|
||||
UnitNum (Diagram *);
|
||||
QString toRepresentedString(const QString) const;
|
||||
NumerotationContext next (const NumerotationContext &, const int) const;
|
||||
NumerotationContext previous (const NumerotationContext &, const int) const;
|
||||
QString toRepresentedString(const QString) const override;
|
||||
NumerotationContext next (const NumerotationContext &, const int) const override;
|
||||
NumerotationContext previous (const NumerotationContext &, const int) const override;
|
||||
};
|
||||
|
||||
class UnitFNum: public NumStrategy
|
||||
{
|
||||
public:
|
||||
UnitFNum (Diagram *);
|
||||
QString toRepresentedString(const QString) const;
|
||||
NumerotationContext next (const NumerotationContext &, const int) const;
|
||||
NumerotationContext previous (const NumerotationContext &, const int) const;
|
||||
QString toRepresentedString(const QString) const override;
|
||||
NumerotationContext next (const NumerotationContext &, const int) const override;
|
||||
NumerotationContext previous (const NumerotationContext &, const int) const override;
|
||||
};
|
||||
|
||||
class TenNum: public NumStrategy
|
||||
{
|
||||
public:
|
||||
TenNum (Diagram *);
|
||||
QString toRepresentedString(const QString) const;
|
||||
NumerotationContext next (const NumerotationContext &, const int) const;
|
||||
NumerotationContext previous (const NumerotationContext &, const int) const;
|
||||
QString toRepresentedString(const QString) const override;
|
||||
NumerotationContext next (const NumerotationContext &, const int) const override;
|
||||
NumerotationContext previous (const NumerotationContext &, const int) const override;
|
||||
};
|
||||
|
||||
class TenFNum: public NumStrategy
|
||||
{
|
||||
public:
|
||||
TenFNum (Diagram *);
|
||||
QString toRepresentedString(const QString) const;
|
||||
NumerotationContext next (const NumerotationContext &, const int) const;
|
||||
NumerotationContext previous (const NumerotationContext &, const int) const;
|
||||
QString toRepresentedString(const QString) const override;
|
||||
NumerotationContext next (const NumerotationContext &, const int) const override;
|
||||
NumerotationContext previous (const NumerotationContext &, const int) const override;
|
||||
};
|
||||
|
||||
class HundredNum: public NumStrategy
|
||||
{
|
||||
public:
|
||||
HundredNum (Diagram *);
|
||||
QString toRepresentedString(const QString) const;
|
||||
NumerotationContext next (const NumerotationContext &, const int) const;
|
||||
NumerotationContext previous (const NumerotationContext &, const int) const;
|
||||
QString toRepresentedString(const QString) const override;
|
||||
NumerotationContext next (const NumerotationContext &, const int) const override;
|
||||
NumerotationContext previous (const NumerotationContext &, const int) const override;
|
||||
};
|
||||
|
||||
class HundredFNum: public NumStrategy
|
||||
{
|
||||
public:
|
||||
HundredFNum (Diagram *);
|
||||
QString toRepresentedString(const QString) const;
|
||||
NumerotationContext next (const NumerotationContext &, const int) const;
|
||||
NumerotationContext previous (const NumerotationContext &, const int) const;
|
||||
QString toRepresentedString(const QString) const override;
|
||||
NumerotationContext next (const NumerotationContext &, const int) const override;
|
||||
NumerotationContext previous (const NumerotationContext &, const int) const override;
|
||||
};
|
||||
|
||||
class StringNum: public NumStrategy
|
||||
{
|
||||
public:
|
||||
StringNum (Diagram *);
|
||||
QString toRepresentedString(const QString) const;
|
||||
NumerotationContext next (const NumerotationContext &, const int) const;
|
||||
NumerotationContext previous (const NumerotationContext &, const int) const;
|
||||
QString toRepresentedString(const QString) const override;
|
||||
NumerotationContext next (const NumerotationContext &, const int) const override;
|
||||
NumerotationContext previous (const NumerotationContext &, const int) const override;
|
||||
};
|
||||
|
||||
class IdFolioNum: public NumStrategy
|
||||
{
|
||||
public:
|
||||
IdFolioNum (Diagram *);
|
||||
QString toRepresentedString(const QString) const;
|
||||
NumerotationContext next (const NumerotationContext &, const int) const;
|
||||
NumerotationContext previous (const NumerotationContext &, const int) const;
|
||||
QString toRepresentedString(const QString) const override;
|
||||
NumerotationContext next (const NumerotationContext &, const int) const override;
|
||||
NumerotationContext previous (const NumerotationContext &, const int) const override;
|
||||
};
|
||||
|
||||
class FolioNum: public NumStrategy
|
||||
{
|
||||
public:
|
||||
FolioNum (Diagram *);
|
||||
QString toRepresentedString(const QString) const;
|
||||
NumerotationContext next (const NumerotationContext &, const int) const;
|
||||
NumerotationContext previous (const NumerotationContext &, const int) const;
|
||||
QString toRepresentedString(const QString) const override;
|
||||
NumerotationContext next (const NumerotationContext &, const int) const override;
|
||||
NumerotationContext previous (const NumerotationContext &, const int) const override;
|
||||
};
|
||||
|
||||
class MachineNum: public NumStrategy
|
||||
{
|
||||
public:
|
||||
MachineNum (Diagram *);
|
||||
QString toRepresentedString(const QString) const;
|
||||
NumerotationContext next (const NumerotationContext &, const int) const;
|
||||
NumerotationContext previous (const NumerotationContext &, const int) const;
|
||||
QString toRepresentedString(const QString) const override;
|
||||
NumerotationContext next (const NumerotationContext &, const int) const override;
|
||||
NumerotationContext previous (const NumerotationContext &, const int) const override;
|
||||
};
|
||||
|
||||
class LocmachNum: public NumStrategy
|
||||
{
|
||||
public:
|
||||
LocmachNum (Diagram *);
|
||||
QString toRepresentedString(const QString) const;
|
||||
NumerotationContext next (const NumerotationContext &, const int) const;
|
||||
NumerotationContext previous (const NumerotationContext &, const int) const;
|
||||
QString toRepresentedString(const QString) const override;
|
||||
NumerotationContext next (const NumerotationContext &, const int) const override;
|
||||
NumerotationContext previous (const NumerotationContext &, const int) const override;
|
||||
};
|
||||
|
||||
|
||||
@ -164,27 +164,27 @@ class ElementLineNum: public NumStrategy
|
||||
{
|
||||
public:
|
||||
ElementLineNum (Diagram *);
|
||||
QString toRepresentedString(const QString) const;
|
||||
NumerotationContext next (const NumerotationContext &, const int) const;
|
||||
NumerotationContext previous (const NumerotationContext &, const int) const;
|
||||
QString toRepresentedString(const QString) const override;
|
||||
NumerotationContext next (const NumerotationContext &, const int) const override;
|
||||
NumerotationContext previous (const NumerotationContext &, const int) const override;
|
||||
};
|
||||
|
||||
class ElementColumnNum: public NumStrategy
|
||||
{
|
||||
public:
|
||||
ElementColumnNum (Diagram *);
|
||||
QString toRepresentedString(const QString) const;
|
||||
NumerotationContext next (const NumerotationContext &, const int) const;
|
||||
NumerotationContext previous (const NumerotationContext &, const int) const;
|
||||
QString toRepresentedString(const QString) const override;
|
||||
NumerotationContext next (const NumerotationContext &, const int) const override;
|
||||
NumerotationContext previous (const NumerotationContext &, const int) const override;
|
||||
};
|
||||
|
||||
class ElementPrefixNum: public NumStrategy
|
||||
{
|
||||
public:
|
||||
ElementPrefixNum (Diagram *);
|
||||
QString toRepresentedString(const QString) const;
|
||||
NumerotationContext next (const NumerotationContext &, const int) const;
|
||||
NumerotationContext previous (const NumerotationContext &, const int) const;
|
||||
QString toRepresentedString(const QString) const override;
|
||||
NumerotationContext next (const NumerotationContext &, const int) const override;
|
||||
NumerotationContext previous (const NumerotationContext &, const int) const override;
|
||||
};
|
||||
|
||||
|
||||
|
@ -32,7 +32,7 @@ class AutoNumberingDockWidget : public QDockWidget
|
||||
|
||||
public:
|
||||
explicit AutoNumberingDockWidget(QWidget *parent = nullptr);
|
||||
~AutoNumberingDockWidget();
|
||||
~AutoNumberingDockWidget() override;
|
||||
|
||||
void setContext();
|
||||
void setProject(QETProject*, ProjectView*);
|
||||
|
@ -35,7 +35,7 @@ class AutoNumberingManagementW : public QWidget
|
||||
//METHODS
|
||||
public:
|
||||
explicit AutoNumberingManagementW(QETProject *project, QWidget *parent = nullptr);
|
||||
~AutoNumberingManagementW();
|
||||
~AutoNumberingManagementW() override;
|
||||
Ui::AutoNumberingManagementW *ui;
|
||||
void setProjectContext ();
|
||||
void contextToFormula ();
|
||||
|
@ -36,7 +36,7 @@ class FolioAutonumberingW : public QWidget
|
||||
//METHODS
|
||||
public:
|
||||
explicit FolioAutonumberingW(QETProject *project, QWidget *parent = nullptr);
|
||||
~FolioAutonumberingW();
|
||||
~FolioAutonumberingW() override;
|
||||
|
||||
void setContext (QList <QString> autonums);
|
||||
NumerotationContext toNumContext() const;
|
||||
|
@ -39,7 +39,7 @@ class FormulaAutonumberingW : public QWidget
|
||||
//METHODS
|
||||
public:
|
||||
explicit FormulaAutonumberingW(QWidget *parent = nullptr);
|
||||
~FormulaAutonumberingW();
|
||||
~FormulaAutonumberingW() override;
|
||||
QString formula();
|
||||
void setContext(QString);
|
||||
void clearContext();
|
||||
|
@ -39,7 +39,7 @@ class NumPartEditorW : public QWidget
|
||||
public:
|
||||
explicit NumPartEditorW(int type, QWidget *parent = nullptr);
|
||||
NumPartEditorW (NumerotationContext &, int, int type, QWidget *parent=nullptr);
|
||||
~NumPartEditorW();
|
||||
~NumPartEditorW() override;
|
||||
|
||||
enum type {unit,unitfolio,ten,tenfolio, hundred, hundredfolio,
|
||||
string,idfolio,folio,machine,locmach,
|
||||
|
@ -39,7 +39,7 @@ class SelectAutonumW : public QWidget
|
||||
public:
|
||||
explicit SelectAutonumW(int type, QWidget *parent = nullptr);
|
||||
explicit SelectAutonumW(const NumerotationContext &context, int type, QWidget *parent = nullptr);
|
||||
~SelectAutonumW();
|
||||
~SelectAutonumW() override;
|
||||
|
||||
void setContext (const NumerotationContext &context);
|
||||
NumerotationContext toNumContext() const;
|
||||
|
@ -38,7 +38,7 @@ class BorderTitleBlock : public QObject
|
||||
|
||||
public:
|
||||
BorderTitleBlock(QObject * = nullptr);
|
||||
virtual ~BorderTitleBlock();
|
||||
~BorderTitleBlock() override;
|
||||
|
||||
private:
|
||||
BorderTitleBlock(const BorderTitleBlock &);
|
||||
|
@ -33,7 +33,7 @@ class ConfigDialog : public QDialog {
|
||||
// constructors, destructor
|
||||
public:
|
||||
ConfigDialog(QWidget * = nullptr);
|
||||
virtual ~ConfigDialog();
|
||||
~ConfigDialog() override;
|
||||
private:
|
||||
ConfigDialog(const ConfigDialog &);
|
||||
|
||||
|
@ -33,7 +33,7 @@ class ConfigPage : public QWidget {
|
||||
*/
|
||||
ConfigPage(QWidget *parent) : QWidget(parent) {};
|
||||
/// Destructor
|
||||
virtual ~ConfigPage() {};
|
||||
~ConfigPage() override {};
|
||||
/// Apply the configuration after user input
|
||||
virtual void applyConf() = 0;
|
||||
/// @return the configuration page title
|
||||
|
@ -39,7 +39,7 @@ class NewDiagramPage : public ConfigPage {
|
||||
// constructors, destructor
|
||||
public:
|
||||
NewDiagramPage(QETProject *project = nullptr, QWidget * = nullptr, ProjectPropertiesDialog *teste = nullptr);
|
||||
virtual ~NewDiagramPage();
|
||||
~NewDiagramPage() override;
|
||||
private:
|
||||
NewDiagramPage(const NewDiagramPage &);
|
||||
public slots:
|
||||
@ -51,9 +51,9 @@ public slots:
|
||||
|
||||
// methods
|
||||
public:
|
||||
void applyConf();
|
||||
QString title() const;
|
||||
QIcon icon() const;
|
||||
void applyConf() override;
|
||||
QString title() const override;
|
||||
QIcon icon() const override;
|
||||
|
||||
// attributes
|
||||
private:
|
||||
@ -77,15 +77,15 @@ class GeneralConfigurationPage : public ConfigPage {
|
||||
// constructors, destructor
|
||||
public:
|
||||
GeneralConfigurationPage(QWidget * = nullptr);
|
||||
virtual ~GeneralConfigurationPage();
|
||||
~GeneralConfigurationPage() override;
|
||||
private:
|
||||
GeneralConfigurationPage(const GeneralConfigurationPage &);
|
||||
|
||||
// methods
|
||||
public:
|
||||
void applyConf();
|
||||
QString title() const;
|
||||
QIcon icon() const;
|
||||
void applyConf() override;
|
||||
QString title() const override;
|
||||
QIcon icon() const override;
|
||||
|
||||
private:
|
||||
void fillLang(QSettings &);
|
||||
@ -122,15 +122,15 @@ class ExportConfigPage : public ConfigPage {
|
||||
// constructors, destructor
|
||||
public:
|
||||
ExportConfigPage(QWidget * = nullptr);
|
||||
virtual ~ExportConfigPage();
|
||||
~ExportConfigPage() override;
|
||||
private:
|
||||
ExportConfigPage(const ExportConfigPage &);
|
||||
|
||||
// methods
|
||||
public:
|
||||
void applyConf();
|
||||
QString title() const;
|
||||
QIcon icon() const;
|
||||
void applyConf() override;
|
||||
QString title() const override;
|
||||
QIcon icon() const override;
|
||||
|
||||
// attributes
|
||||
public:
|
||||
@ -145,15 +145,15 @@ class PrintConfigPage : public ConfigPage {
|
||||
// constructors, destructor
|
||||
public:
|
||||
PrintConfigPage(QWidget * = nullptr);
|
||||
virtual ~PrintConfigPage();
|
||||
~PrintConfigPage() override;
|
||||
private:
|
||||
PrintConfigPage(const PrintConfigPage &);
|
||||
|
||||
// methods
|
||||
public:
|
||||
void applyConf();
|
||||
QString title() const;
|
||||
QIcon icon() const;
|
||||
void applyConf() override;
|
||||
QString title() const override;
|
||||
QIcon icon() const override;
|
||||
|
||||
// attributes
|
||||
public:
|
||||
|
@ -53,7 +53,7 @@ class Diagram : public QGraphicsScene
|
||||
// constructors, destructor
|
||||
public:
|
||||
Diagram(QETProject *project);
|
||||
virtual ~Diagram();
|
||||
~Diagram() override;
|
||||
private:
|
||||
Diagram(const Diagram &diagram);
|
||||
|
||||
@ -114,15 +114,15 @@ class Diagram : public QGraphicsScene
|
||||
|
||||
// METHODS
|
||||
protected:
|
||||
virtual void drawBackground(QPainter *, const QRectF &);
|
||||
void drawBackground(QPainter *, const QRectF &) override;
|
||||
|
||||
virtual void mouseDoubleClickEvent (QGraphicsSceneMouseEvent *event);
|
||||
virtual void mousePressEvent (QGraphicsSceneMouseEvent *event);
|
||||
virtual void mouseMoveEvent (QGraphicsSceneMouseEvent *event);
|
||||
virtual void mouseReleaseEvent (QGraphicsSceneMouseEvent *event);
|
||||
virtual void wheelEvent (QGraphicsSceneWheelEvent *event);
|
||||
virtual void keyPressEvent (QKeyEvent *);
|
||||
virtual void keyReleaseEvent (QKeyEvent *);
|
||||
void mouseDoubleClickEvent (QGraphicsSceneMouseEvent *event) override;
|
||||
void mousePressEvent (QGraphicsSceneMouseEvent *event) override;
|
||||
void mouseMoveEvent (QGraphicsSceneMouseEvent *event) override;
|
||||
void mouseReleaseEvent (QGraphicsSceneMouseEvent *event) override;
|
||||
void wheelEvent (QGraphicsSceneWheelEvent *event) override;
|
||||
void keyPressEvent (QKeyEvent *) override;
|
||||
void keyReleaseEvent (QKeyEvent *) override;
|
||||
|
||||
public:
|
||||
void setEventInterface (DiagramEventInterface *event_interface);
|
||||
|
@ -53,17 +53,17 @@ class AddItemCommand : public QUndoCommand {
|
||||
m_diagram -> qgiManager().manage(m_item);
|
||||
}
|
||||
|
||||
virtual ~AddItemCommand() {
|
||||
~AddItemCommand() override {
|
||||
m_diagram -> qgiManager().release(m_item);
|
||||
}
|
||||
|
||||
virtual void undo() {
|
||||
void undo() override {
|
||||
m_diagram -> showMe();
|
||||
m_diagram -> removeItem(m_item);
|
||||
QUndoCommand::undo();
|
||||
}
|
||||
|
||||
virtual void redo() {
|
||||
void redo() override {
|
||||
m_diagram -> showMe();
|
||||
m_diagram -> addItem(m_item);
|
||||
m_item -> setPos(m_pos);
|
||||
@ -88,14 +88,14 @@ class PasteDiagramCommand : public QUndoCommand {
|
||||
// constructors, destructor
|
||||
public:
|
||||
PasteDiagramCommand(Diagram *, const DiagramContent &, QUndoCommand * = nullptr);
|
||||
virtual ~PasteDiagramCommand();
|
||||
~PasteDiagramCommand() override;
|
||||
private:
|
||||
PasteDiagramCommand(const PasteDiagramCommand &);
|
||||
|
||||
// methods
|
||||
public:
|
||||
virtual void undo();
|
||||
virtual void redo();
|
||||
void undo() override;
|
||||
void redo() override;
|
||||
|
||||
// attributes
|
||||
private:
|
||||
@ -116,7 +116,7 @@ class CutDiagramCommand : public DeleteQGraphicsItemCommand {
|
||||
// constructors, destructor
|
||||
public:
|
||||
CutDiagramCommand(Diagram *, const DiagramContent &, QUndoCommand * = nullptr);
|
||||
virtual ~CutDiagramCommand();
|
||||
~CutDiagramCommand() override;
|
||||
private:
|
||||
CutDiagramCommand(const CutDiagramCommand &);
|
||||
};
|
||||
@ -128,14 +128,14 @@ class MoveElementsCommand : public QUndoCommand {
|
||||
// constructors, destructor
|
||||
public:
|
||||
MoveElementsCommand(Diagram *, const DiagramContent &, const QPointF &m, QUndoCommand * = nullptr);
|
||||
virtual ~MoveElementsCommand();
|
||||
~MoveElementsCommand() override;
|
||||
private:
|
||||
MoveElementsCommand(const MoveElementsCommand &);
|
||||
|
||||
// methods
|
||||
public:
|
||||
virtual void undo();
|
||||
virtual void redo();
|
||||
void undo() override;
|
||||
void redo() override;
|
||||
virtual void move(const QPointF &);
|
||||
|
||||
private:
|
||||
@ -163,14 +163,14 @@ class MoveConductorsTextsCommand : public QUndoCommand {
|
||||
// constructors, destructor
|
||||
public:
|
||||
MoveConductorsTextsCommand(Diagram *, QUndoCommand * = nullptr);
|
||||
virtual ~MoveConductorsTextsCommand();
|
||||
~MoveConductorsTextsCommand() override;
|
||||
private:
|
||||
MoveConductorsTextsCommand(const MoveConductorsTextsCommand &);
|
||||
|
||||
// methods
|
||||
public:
|
||||
virtual void undo();
|
||||
virtual void redo();
|
||||
void undo() override;
|
||||
void redo() override;
|
||||
virtual void addTextMovement(ConductorTextItem *, const QPointF &, const QPointF &, bool = false);
|
||||
|
||||
private:
|
||||
@ -193,14 +193,14 @@ class ChangeDiagramTextCommand : public QUndoCommand {
|
||||
// constructors, destructor
|
||||
public:
|
||||
ChangeDiagramTextCommand(DiagramTextItem *, const QString &before, const QString &after, QUndoCommand * = nullptr);
|
||||
virtual ~ChangeDiagramTextCommand();
|
||||
~ChangeDiagramTextCommand() override;
|
||||
private:
|
||||
ChangeDiagramTextCommand(const ChangeDiagramTextCommand &);
|
||||
|
||||
// methods
|
||||
public:
|
||||
virtual void undo();
|
||||
virtual void redo();
|
||||
void undo() override;
|
||||
void redo() override;
|
||||
|
||||
// attributes
|
||||
private:
|
||||
@ -222,14 +222,14 @@ class RotateElementsCommand : public QUndoCommand {
|
||||
// constructors, destructor
|
||||
public:
|
||||
RotateElementsCommand(const QList<Element *> &elements, const QList<DiagramTextItem *> &, const QList<DiagramImageItem *> &, QUndoCommand * = nullptr);
|
||||
virtual ~RotateElementsCommand();
|
||||
~RotateElementsCommand() override;
|
||||
private:
|
||||
RotateElementsCommand(const RotateElementsCommand &);
|
||||
|
||||
// methods
|
||||
public:
|
||||
virtual void undo();
|
||||
virtual void redo();
|
||||
void undo() override;
|
||||
void redo() override;
|
||||
|
||||
// attributes
|
||||
private:
|
||||
@ -255,14 +255,14 @@ class RotateTextsCommand : public QUndoCommand
|
||||
// constructors, destructor
|
||||
public:
|
||||
RotateTextsCommand(const QList<DiagramTextItem *> &, double, QUndoCommand * = nullptr);
|
||||
virtual ~RotateTextsCommand() override;
|
||||
~RotateTextsCommand() override;
|
||||
private:
|
||||
RotateTextsCommand(const RotateTextsCommand &);
|
||||
|
||||
// methods
|
||||
public:
|
||||
virtual void undo() override;
|
||||
virtual void redo() override;
|
||||
void undo() override;
|
||||
void redo() override;
|
||||
|
||||
private:
|
||||
void defineCommandName();
|
||||
@ -285,14 +285,14 @@ class ChangeConductorCommand : public QUndoCommand {
|
||||
// constructors, destructor
|
||||
public:
|
||||
ChangeConductorCommand(Conductor *, const ConductorProfile &, const ConductorProfile &, Qt::Corner, QUndoCommand * = nullptr);
|
||||
virtual ~ChangeConductorCommand();
|
||||
~ChangeConductorCommand() override;
|
||||
private:
|
||||
ChangeConductorCommand(const ChangeConductorCommand &);
|
||||
|
||||
// methods
|
||||
public:
|
||||
virtual void undo();
|
||||
virtual void redo();
|
||||
void undo() override;
|
||||
void redo() override;
|
||||
virtual void setConductorTextItemMove(const QPointF &, const QPointF &);
|
||||
|
||||
// attributes
|
||||
@ -321,14 +321,14 @@ class ResetConductorCommand : public QUndoCommand {
|
||||
// constructors, destructor
|
||||
public:
|
||||
ResetConductorCommand(const QHash<Conductor *, ConductorProfilesGroup> &, QUndoCommand * = nullptr);
|
||||
virtual ~ResetConductorCommand();
|
||||
~ResetConductorCommand() override;
|
||||
private:
|
||||
ResetConductorCommand(const ResetConductorCommand &);
|
||||
|
||||
// methods
|
||||
public:
|
||||
virtual void undo();
|
||||
virtual void redo();
|
||||
void undo() override;
|
||||
void redo() override;
|
||||
|
||||
// attributes
|
||||
private:
|
||||
@ -344,14 +344,14 @@ class ChangeTitleBlockCommand : public QUndoCommand {
|
||||
// constructors, destructor
|
||||
public:
|
||||
ChangeTitleBlockCommand(Diagram *, const TitleBlockProperties &, const TitleBlockProperties &, QUndoCommand * = nullptr);
|
||||
virtual ~ChangeTitleBlockCommand();
|
||||
~ChangeTitleBlockCommand() override;
|
||||
private:
|
||||
ChangeTitleBlockCommand(const ChangeTitleBlockCommand &);
|
||||
|
||||
// methods
|
||||
public:
|
||||
virtual void undo();
|
||||
virtual void redo();
|
||||
void undo() override;
|
||||
void redo() override;
|
||||
|
||||
// attributes
|
||||
private:
|
||||
@ -370,14 +370,14 @@ class ChangeBorderCommand : public QUndoCommand {
|
||||
// constructors, destructor
|
||||
public:
|
||||
ChangeBorderCommand(Diagram *, const BorderProperties &, const BorderProperties &, QUndoCommand * = nullptr);
|
||||
virtual ~ChangeBorderCommand();
|
||||
~ChangeBorderCommand() override;
|
||||
private:
|
||||
ChangeBorderCommand(const ChangeBorderCommand &);
|
||||
|
||||
// methods
|
||||
public:
|
||||
virtual void undo();
|
||||
virtual void redo();
|
||||
void undo() override;
|
||||
void redo() override;
|
||||
|
||||
// attributes
|
||||
private:
|
||||
|
@ -30,7 +30,7 @@ class DiagramContextWidget : public QWidget {
|
||||
// Constructor, destructor
|
||||
public:
|
||||
DiagramContextWidget(QWidget *parent = nullptr);
|
||||
virtual ~DiagramContextWidget();
|
||||
~DiagramContextWidget() override;
|
||||
private:
|
||||
DiagramContextWidget(const DiagramContextWidget &);
|
||||
|
||||
|
@ -34,14 +34,14 @@ class DiagramEventAddElement : public DiagramEventInterface
|
||||
|
||||
public:
|
||||
DiagramEventAddElement(ElementsLocation &location, Diagram *diagram, QPointF pos = QPointF(0,0));
|
||||
virtual ~DiagramEventAddElement();
|
||||
~DiagramEventAddElement() override;
|
||||
|
||||
virtual bool mouseMoveEvent (QGraphicsSceneMouseEvent *event);
|
||||
virtual bool mousePressEvent (QGraphicsSceneMouseEvent *event);
|
||||
virtual bool mouseReleaseEvent (QGraphicsSceneMouseEvent *event);
|
||||
virtual bool mouseDoubleClickEvent (QGraphicsSceneMouseEvent *event);
|
||||
virtual bool keyPressEvent (QKeyEvent *event);
|
||||
virtual void init();
|
||||
bool mouseMoveEvent (QGraphicsSceneMouseEvent *event) override;
|
||||
bool mousePressEvent (QGraphicsSceneMouseEvent *event) override;
|
||||
bool mouseReleaseEvent (QGraphicsSceneMouseEvent *event) override;
|
||||
bool mouseDoubleClickEvent (QGraphicsSceneMouseEvent *event) override;
|
||||
bool keyPressEvent (QKeyEvent *event) override;
|
||||
void init() override;
|
||||
|
||||
private:
|
||||
bool buildElement();
|
||||
|
@ -33,12 +33,12 @@ class DiagramEventAddImage : public DiagramEventInterface
|
||||
|
||||
public:
|
||||
DiagramEventAddImage(Diagram *diagram);
|
||||
virtual ~DiagramEventAddImage();
|
||||
~DiagramEventAddImage() override;
|
||||
|
||||
virtual bool mousePressEvent (QGraphicsSceneMouseEvent *event);
|
||||
virtual bool mouseMoveEvent (QGraphicsSceneMouseEvent *event);
|
||||
virtual bool mouseDoubleClickEvent (QGraphicsSceneMouseEvent *event);
|
||||
virtual bool wheelEvent (QGraphicsSceneWheelEvent *event);
|
||||
bool mousePressEvent (QGraphicsSceneMouseEvent *event) override;
|
||||
bool mouseMoveEvent (QGraphicsSceneMouseEvent *event) override;
|
||||
bool mouseDoubleClickEvent (QGraphicsSceneMouseEvent *event) override;
|
||||
bool wheelEvent (QGraphicsSceneWheelEvent *event) override;
|
||||
|
||||
bool isNull () const;
|
||||
private:
|
||||
|
@ -32,12 +32,12 @@ class DiagramEventAddShape : public DiagramEventInterface
|
||||
public:
|
||||
DiagramEventAddShape(Diagram *diagram, QetShapeItem::ShapeType shape_type);
|
||||
|
||||
virtual ~DiagramEventAddShape();
|
||||
virtual bool mousePressEvent (QGraphicsSceneMouseEvent *event);
|
||||
virtual bool mouseMoveEvent (QGraphicsSceneMouseEvent *event);
|
||||
virtual bool mouseReleaseEvent (QGraphicsSceneMouseEvent *event);
|
||||
virtual bool mouseDoubleClickEvent (QGraphicsSceneMouseEvent *event);
|
||||
virtual void init();
|
||||
~DiagramEventAddShape() override;
|
||||
bool mousePressEvent (QGraphicsSceneMouseEvent *event) override;
|
||||
bool mouseMoveEvent (QGraphicsSceneMouseEvent *event) override;
|
||||
bool mouseReleaseEvent (QGraphicsSceneMouseEvent *event) override;
|
||||
bool mouseDoubleClickEvent (QGraphicsSceneMouseEvent *event) override;
|
||||
void init() override;
|
||||
|
||||
private:
|
||||
void updateHelpCross (const QPointF &p);
|
||||
|
@ -32,9 +32,9 @@ class DiagramEventAddText : public DiagramEventInterface
|
||||
|
||||
public:
|
||||
DiagramEventAddText(Diagram *diagram);
|
||||
virtual ~DiagramEventAddText();
|
||||
~DiagramEventAddText() override;
|
||||
|
||||
virtual bool mousePressEvent (QGraphicsSceneMouseEvent *event);
|
||||
bool mousePressEvent (QGraphicsSceneMouseEvent *event) override;
|
||||
};
|
||||
|
||||
#endif // DIAGRAMEVENTADDTEXT_H
|
||||
|
@ -51,7 +51,7 @@ class DiagramEventInterface : public QObject
|
||||
|
||||
public:
|
||||
DiagramEventInterface(Diagram *diagram);
|
||||
virtual ~DiagramEventInterface() = 0;
|
||||
~DiagramEventInterface() override = 0;
|
||||
virtual bool mouseDoubleClickEvent (QGraphicsSceneMouseEvent *event);
|
||||
virtual bool mousePressEvent (QGraphicsSceneMouseEvent *event);
|
||||
virtual bool mouseMoveEvent (QGraphicsSceneMouseEvent *event);
|
||||
|
@ -25,7 +25,7 @@ class DiagramFolioList : public Diagram
|
||||
{
|
||||
public:
|
||||
DiagramFolioList(QETProject *project);
|
||||
virtual ~DiagramFolioList();
|
||||
~DiagramFolioList() override;
|
||||
virtual QList<QLineF *> lines() const {return list_lines_;}
|
||||
virtual QList<QRectF *> rectangles() const {return list_rectangles_;}
|
||||
void setId(int i) {id = i;}
|
||||
@ -34,7 +34,7 @@ class DiagramFolioList : public Diagram
|
||||
static qreal colWidths[7];
|
||||
|
||||
protected:
|
||||
void drawBackground(QPainter *, const QRectF &);
|
||||
void drawBackground(QPainter *, const QRectF &) override;
|
||||
|
||||
private:
|
||||
void fillRow(QPainter *, const QRectF &, QString, QString, QString, QString, QString, QString, QString);
|
||||
|
@ -37,7 +37,7 @@ class DiagramPrintDialog : public QWidget
|
||||
// Constructors, destructor
|
||||
public:
|
||||
DiagramPrintDialog(QETProject *, QWidget * = nullptr);
|
||||
virtual ~DiagramPrintDialog();
|
||||
~DiagramPrintDialog() override;
|
||||
private:
|
||||
DiagramPrintDialog(const DiagramPrintDialog &);
|
||||
|
||||
|
@ -30,7 +30,7 @@ class DiagramsChooser : public QScrollArea {
|
||||
// constructors, destructor
|
||||
public:
|
||||
DiagramsChooser(QETProject *, QWidget * = nullptr);
|
||||
virtual ~DiagramsChooser();
|
||||
~DiagramsChooser() override;
|
||||
private:
|
||||
DiagramsChooser(const DiagramsChooser &);
|
||||
|
||||
|
@ -42,7 +42,7 @@ class DiagramView : public QGraphicsView
|
||||
// constructors, destructor
|
||||
public:
|
||||
DiagramView(Diagram *diagram, QWidget * = nullptr);
|
||||
virtual ~DiagramView();
|
||||
~DiagramView() override;
|
||||
|
||||
private:
|
||||
DiagramView(const DiagramView &);
|
||||
@ -75,26 +75,26 @@ class DiagramView : public QGraphicsView
|
||||
void setEventInterface (DVEventInterface *event_interface);
|
||||
|
||||
protected:
|
||||
virtual void mouseDoubleClickEvent(QMouseEvent *);
|
||||
virtual void contextMenuEvent(QContextMenuEvent *);
|
||||
virtual void wheelEvent(QWheelEvent *);
|
||||
virtual void focusInEvent(QFocusEvent *);
|
||||
virtual void keyPressEvent(QKeyEvent *);
|
||||
virtual void keyReleaseEvent(QKeyEvent *);
|
||||
virtual bool event(QEvent *);
|
||||
void mouseDoubleClickEvent(QMouseEvent *) override;
|
||||
void contextMenuEvent(QContextMenuEvent *) override;
|
||||
void wheelEvent(QWheelEvent *) override;
|
||||
void focusInEvent(QFocusEvent *) override;
|
||||
void keyPressEvent(QKeyEvent *) override;
|
||||
void keyReleaseEvent(QKeyEvent *) override;
|
||||
bool event(QEvent *) override;
|
||||
virtual bool switchToVisualisationModeIfNeeded(QInputEvent *e);
|
||||
virtual bool switchToSelectionModeIfNeeded(QInputEvent *e);
|
||||
virtual bool isCtrlShifting(QInputEvent *);
|
||||
virtual bool selectedItemHasFocus();
|
||||
|
||||
private:
|
||||
void mousePressEvent(QMouseEvent *);
|
||||
void mouseMoveEvent(QMouseEvent *);
|
||||
void mouseReleaseEvent(QMouseEvent *);
|
||||
void dragEnterEvent(QDragEnterEvent *);
|
||||
void dragLeaveEvent(QDragLeaveEvent *);
|
||||
void dragMoveEvent(QDragMoveEvent *);
|
||||
void dropEvent(QDropEvent *);
|
||||
void mousePressEvent(QMouseEvent *) override;
|
||||
void mouseMoveEvent(QMouseEvent *) override;
|
||||
void mouseReleaseEvent(QMouseEvent *) override;
|
||||
void dragEnterEvent(QDragEnterEvent *) override;
|
||||
void dragLeaveEvent(QDragLeaveEvent *) override;
|
||||
void dragMoveEvent(QDragMoveEvent *) override;
|
||||
void dropEvent(QDropEvent *) override;
|
||||
void handleElementDrop(QDropEvent *);
|
||||
void handleTitleBlockDrop(QDropEvent *);
|
||||
void handleTextDrop(QDropEvent *);
|
||||
|
@ -41,7 +41,7 @@ class DVEventInterface : public QObject
|
||||
|
||||
public:
|
||||
DVEventInterface(DiagramView *dv);
|
||||
virtual ~DVEventInterface () = 0;
|
||||
~DVEventInterface () override = 0;
|
||||
virtual bool mouseDoubleClickEvent (QMouseEvent *event);
|
||||
virtual bool mousePressEvent (QMouseEvent *event);
|
||||
virtual bool mouseMoveEvent (QMouseEvent *event);
|
||||
|
@ -35,7 +35,7 @@ class ArcEditor : public ElementItemEditor
|
||||
// constructors, destructor
|
||||
public:
|
||||
ArcEditor(QETElementEditor *, PartArc * = nullptr, QWidget * = nullptr);
|
||||
virtual ~ArcEditor();
|
||||
~ArcEditor() override;
|
||||
private:
|
||||
ArcEditor(const ArcEditor &);
|
||||
|
||||
@ -49,14 +49,14 @@ class ArcEditor : public ElementItemEditor
|
||||
|
||||
// methods
|
||||
public:
|
||||
virtual bool setPart(CustomElementPart *);
|
||||
virtual CustomElementPart *currentPart() const;
|
||||
bool setPart(CustomElementPart *) override;
|
||||
CustomElementPart *currentPart() const override;
|
||||
|
||||
public slots:
|
||||
void updateArcS();
|
||||
void updateArcA();
|
||||
void updateArcRect();
|
||||
void updateForm();
|
||||
void updateForm() override;
|
||||
|
||||
private:
|
||||
void activeConnections(bool);
|
||||
|
@ -35,7 +35,7 @@ class ElementEditionCommand : public QUndoCommand
|
||||
public:
|
||||
ElementEditionCommand(ElementScene * = nullptr, ElementView * = nullptr, QUndoCommand * = nullptr);
|
||||
ElementEditionCommand(const QString &, ElementScene * = nullptr, ElementView * = nullptr, QUndoCommand * = nullptr);
|
||||
virtual ~ElementEditionCommand();
|
||||
~ElementEditionCommand() override;
|
||||
private:
|
||||
ElementEditionCommand(const ElementEditionCommand &);
|
||||
|
||||
@ -61,14 +61,14 @@ class DeletePartsCommand : public ElementEditionCommand {
|
||||
// constructors, destructor
|
||||
public:
|
||||
DeletePartsCommand(ElementScene *, const QList<QGraphicsItem *>, QUndoCommand * = nullptr);
|
||||
virtual ~DeletePartsCommand();
|
||||
~DeletePartsCommand() override;
|
||||
private:
|
||||
DeletePartsCommand(const DeletePartsCommand &);
|
||||
|
||||
// methods
|
||||
public:
|
||||
virtual void undo();
|
||||
virtual void redo();
|
||||
void undo() override;
|
||||
void redo() override;
|
||||
|
||||
// attributes
|
||||
private:
|
||||
@ -83,14 +83,14 @@ class PastePartsCommand : public ElementEditionCommand {
|
||||
// constructors, destructor
|
||||
public:
|
||||
PastePartsCommand(ElementView *, const ElementContent &, QUndoCommand * = nullptr);
|
||||
virtual ~PastePartsCommand();
|
||||
~PastePartsCommand() override;
|
||||
private:
|
||||
PastePartsCommand(const PastePartsCommand &);
|
||||
|
||||
// methods
|
||||
public:
|
||||
virtual void undo();
|
||||
virtual void redo();
|
||||
void undo() override;
|
||||
void redo() override;
|
||||
virtual void setOffset(int, const QPointF &, int, const QPointF &);
|
||||
|
||||
// attributes
|
||||
@ -114,7 +114,7 @@ class CutPartsCommand : public DeletePartsCommand {
|
||||
// constructors, destructor
|
||||
public:
|
||||
CutPartsCommand(ElementScene *, const QList<QGraphicsItem *>, QUndoCommand * = nullptr);
|
||||
virtual ~CutPartsCommand();
|
||||
~CutPartsCommand() override;
|
||||
private:
|
||||
CutPartsCommand(const CutPartsCommand &);
|
||||
};
|
||||
@ -126,14 +126,14 @@ class MovePartsCommand : public ElementEditionCommand {
|
||||
// constructors, destructor
|
||||
public:
|
||||
MovePartsCommand(const QPointF &, ElementScene *, const QList<QGraphicsItem *>, QUndoCommand * = nullptr);
|
||||
virtual ~MovePartsCommand();
|
||||
~MovePartsCommand() override;
|
||||
private:
|
||||
MovePartsCommand(const MovePartsCommand &);
|
||||
|
||||
// methods
|
||||
public:
|
||||
virtual void undo();
|
||||
virtual void redo();
|
||||
void undo() override;
|
||||
void redo() override;
|
||||
|
||||
// attributes
|
||||
private:
|
||||
@ -152,14 +152,14 @@ class AddPartCommand : public ElementEditionCommand {
|
||||
// constructors, destructor
|
||||
public:
|
||||
AddPartCommand(const QString &, ElementScene *, QGraphicsItem *, QUndoCommand * = nullptr);
|
||||
virtual ~AddPartCommand();
|
||||
~AddPartCommand() override;
|
||||
private:
|
||||
AddPartCommand(const AddPartCommand &);
|
||||
|
||||
// methods
|
||||
public:
|
||||
virtual void undo();
|
||||
virtual void redo();
|
||||
void undo() override;
|
||||
void redo() override;
|
||||
|
||||
// attributes
|
||||
private:
|
||||
@ -176,14 +176,14 @@ class ChangeNamesCommand : public ElementEditionCommand {
|
||||
// constructors, destructor
|
||||
public:
|
||||
ChangeNamesCommand(ElementScene *, const NamesList &, const NamesList &, QUndoCommand * = nullptr);
|
||||
virtual ~ChangeNamesCommand();
|
||||
~ChangeNamesCommand() override;
|
||||
private:
|
||||
ChangeNamesCommand(const ChangeNamesCommand &);
|
||||
|
||||
// methods
|
||||
public:
|
||||
virtual void undo();
|
||||
virtual void redo();
|
||||
void undo() override;
|
||||
void redo() override;
|
||||
|
||||
// attributes
|
||||
private:
|
||||
@ -208,14 +208,14 @@ class ChangeZValueCommand : public ElementEditionCommand {
|
||||
SendBackward ///< Send primitives to the background so they have the lowest zValue
|
||||
};
|
||||
ChangeZValueCommand(ElementScene *, Option, QUndoCommand * = nullptr);
|
||||
virtual ~ChangeZValueCommand();
|
||||
~ChangeZValueCommand() override;
|
||||
private:
|
||||
ChangeZValueCommand(const ChangeZValueCommand &);
|
||||
|
||||
// methods
|
||||
public:
|
||||
virtual void undo();
|
||||
virtual void redo();
|
||||
void undo() override;
|
||||
void redo() override;
|
||||
|
||||
private:
|
||||
void applyBringForward(const QList<QGraphicsItem *> &);
|
||||
@ -240,14 +240,14 @@ class ChangeInformationsCommand : public ElementEditionCommand {
|
||||
// constructors, destructor
|
||||
public:
|
||||
ChangeInformationsCommand(ElementScene *, const QString &, const QString &, QUndoCommand * = nullptr);
|
||||
virtual ~ChangeInformationsCommand();
|
||||
~ChangeInformationsCommand() override;
|
||||
private:
|
||||
ChangeInformationsCommand(const ChangeInformationsCommand &);
|
||||
|
||||
// methods
|
||||
public:
|
||||
virtual void undo();
|
||||
virtual void redo();
|
||||
void undo() override;
|
||||
void redo() override;
|
||||
|
||||
// attributes
|
||||
private:
|
||||
@ -264,14 +264,14 @@ class ScalePartsCommand : public ElementEditionCommand {
|
||||
// constructors, destructor
|
||||
public:
|
||||
ScalePartsCommand(ElementScene * = nullptr, QUndoCommand * = nullptr);
|
||||
virtual ~ScalePartsCommand();
|
||||
~ScalePartsCommand() override;
|
||||
private:
|
||||
ScalePartsCommand(const ScalePartsCommand &);
|
||||
|
||||
// methods
|
||||
public:
|
||||
virtual void undo();
|
||||
virtual void redo();
|
||||
void undo() override;
|
||||
void redo() override;
|
||||
ElementScene *elementScene() const;
|
||||
void setScaledPrimitives(const QList<CustomElementPart *> &);
|
||||
QList<CustomElementPart *> scaledPrimitives() const;
|
||||
@ -297,10 +297,10 @@ class ScalePartsCommand : public ElementEditionCommand {
|
||||
class ChangePropertiesCommand : public ElementEditionCommand {
|
||||
public:
|
||||
ChangePropertiesCommand (ElementScene *scene, QString type, DiagramContext info, QUndoCommand *parent=nullptr);
|
||||
virtual ~ChangePropertiesCommand ();
|
||||
~ChangePropertiesCommand () override;
|
||||
|
||||
virtual void undo();
|
||||
virtual void redo();
|
||||
void undo() override;
|
||||
void redo() override;
|
||||
|
||||
private:
|
||||
QList <QString> m_type;
|
||||
|
@ -36,7 +36,7 @@ class ElementItemEditor : public QWidget
|
||||
// constructors, destructor
|
||||
public:
|
||||
ElementItemEditor(QETElementEditor *, QWidget * = nullptr);
|
||||
virtual ~ElementItemEditor() {};
|
||||
~ElementItemEditor() override {};
|
||||
private:
|
||||
ElementItemEditor(const ElementItemEditor &);
|
||||
|
||||
|
@ -43,15 +43,15 @@ class ElementPrimitiveDecorator : public QGraphicsObject
|
||||
|
||||
public:
|
||||
ElementPrimitiveDecorator(QGraphicsItem * = nullptr);
|
||||
virtual ~ElementPrimitiveDecorator();
|
||||
~ElementPrimitiveDecorator() override;
|
||||
|
||||
enum { Type = UserType + 2200 };
|
||||
|
||||
// methods
|
||||
QRectF internalBoundingRect() const;
|
||||
virtual QRectF boundingRect () const;
|
||||
virtual void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget * = nullptr);
|
||||
virtual int type() const { return Type; }
|
||||
QRectF boundingRect () const override;
|
||||
void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget * = nullptr) override;
|
||||
int type() const override { return Type; }
|
||||
void setItems(const QList<QGraphicsItem *> &);
|
||||
void setItems(const QList<CustomElementPart *> &);
|
||||
QList<CustomElementPart *> items() const;
|
||||
@ -64,18 +64,18 @@ class ElementPrimitiveDecorator : public QGraphicsObject
|
||||
void actionFinished(ElementEditionCommand *);
|
||||
|
||||
protected:
|
||||
void mousePressEvent(QGraphicsSceneMouseEvent *);
|
||||
void mouseMoveEvent(QGraphicsSceneMouseEvent *);
|
||||
void mouseReleaseEvent(QGraphicsSceneMouseEvent *);
|
||||
void keyPressEvent(QKeyEvent *);
|
||||
void keyReleaseEvent(QKeyEvent *);
|
||||
void mousePressEvent(QGraphicsSceneMouseEvent *) override;
|
||||
void mouseMoveEvent(QGraphicsSceneMouseEvent *) override;
|
||||
void mouseReleaseEvent(QGraphicsSceneMouseEvent *) override;
|
||||
void keyPressEvent(QKeyEvent *) override;
|
||||
void keyReleaseEvent(QKeyEvent *) override;
|
||||
QPointF deltaForRoundScaling(const QRectF &, const QRectF &, qreal);
|
||||
QPointF snapConstPointToGrid(const QPointF &) const;
|
||||
void snapPointToGrid(QPointF &) const;
|
||||
bool mustSnapToGrid(QGraphicsSceneMouseEvent *);
|
||||
QET::ScalingMethod scalingMethod(QGraphicsSceneMouseEvent *);
|
||||
virtual QVariant itemChange(GraphicsItemChange change, const QVariant &value);
|
||||
virtual bool sceneEventFilter(QGraphicsItem *watched, QEvent *event);
|
||||
QVariant itemChange(GraphicsItemChange change, const QVariant &value) override;
|
||||
bool sceneEventFilter(QGraphicsItem *watched, QEvent *event) override;
|
||||
|
||||
private:
|
||||
void init();
|
||||
|
@ -56,7 +56,7 @@ class ElementScene : public QGraphicsScene
|
||||
// constructors, destructor
|
||||
public:
|
||||
ElementScene(QETElementEditor *, QObject * = nullptr);
|
||||
virtual ~ElementScene();
|
||||
~ElementScene() override;
|
||||
|
||||
private:
|
||||
ElementScene(const ElementScene &);
|
||||
@ -130,14 +130,14 @@ class ElementScene : public QGraphicsScene
|
||||
QETElementEditor* editor() const;
|
||||
|
||||
protected:
|
||||
virtual void mouseMoveEvent (QGraphicsSceneMouseEvent *);
|
||||
virtual void mousePressEvent (QGraphicsSceneMouseEvent *);
|
||||
virtual void mouseReleaseEvent (QGraphicsSceneMouseEvent *);
|
||||
virtual void mouseDoubleClickEvent (QGraphicsSceneMouseEvent *event);
|
||||
virtual void keyPressEvent (QKeyEvent *event);
|
||||
virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent *event);
|
||||
void mouseMoveEvent (QGraphicsSceneMouseEvent *) override;
|
||||
void mousePressEvent (QGraphicsSceneMouseEvent *) override;
|
||||
void mouseReleaseEvent (QGraphicsSceneMouseEvent *) override;
|
||||
void mouseDoubleClickEvent (QGraphicsSceneMouseEvent *event) override;
|
||||
void keyPressEvent (QKeyEvent *event) override;
|
||||
void contextMenuEvent(QGraphicsSceneContextMenuEvent *event) override;
|
||||
|
||||
virtual void drawForeground(QPainter *, const QRectF &);
|
||||
void drawForeground(QPainter *, const QRectF &) override;
|
||||
|
||||
private:
|
||||
QRectF elementContentBoundingRect(const ElementContent &) const;
|
||||
|
@ -31,7 +31,7 @@ class ElementView : public QGraphicsView {
|
||||
// constructors, destructor
|
||||
public:
|
||||
ElementView(ElementScene *, QWidget * = nullptr);
|
||||
virtual ~ElementView();
|
||||
~ElementView() override;
|
||||
|
||||
private:
|
||||
ElementView(const ElementView &);
|
||||
@ -43,13 +43,13 @@ class ElementView : public QGraphicsView {
|
||||
QRectF viewedSceneRect() const;
|
||||
|
||||
protected:
|
||||
void mousePressEvent(QMouseEvent *);
|
||||
void mouseMoveEvent(QMouseEvent *);
|
||||
void mouseReleaseEvent(QMouseEvent *);
|
||||
void mousePressEvent(QMouseEvent *) override;
|
||||
void mouseMoveEvent(QMouseEvent *) override;
|
||||
void mouseReleaseEvent(QMouseEvent *) override;
|
||||
bool gestureEvent(QGestureEvent *event);
|
||||
bool event(QEvent *event);
|
||||
void wheelEvent(QWheelEvent *);
|
||||
virtual void drawBackground(QPainter *, const QRectF &);
|
||||
bool event(QEvent *event) override;
|
||||
void wheelEvent(QWheelEvent *) override;
|
||||
void drawBackground(QPainter *, const QRectF &) override;
|
||||
|
||||
private:
|
||||
QRectF applyMovement(const QRectF &, const QPointF &);
|
||||
|
@ -34,7 +34,7 @@ class EllipseEditor : public ElementItemEditor
|
||||
// constructors, destructor
|
||||
public:
|
||||
EllipseEditor(QETElementEditor *, PartEllipse * = nullptr, QWidget * = nullptr);
|
||||
virtual ~EllipseEditor();
|
||||
~EllipseEditor() override;
|
||||
private:
|
||||
EllipseEditor(const EllipseEditor &);
|
||||
|
||||
@ -47,12 +47,12 @@ class EllipseEditor : public ElementItemEditor
|
||||
|
||||
// methods
|
||||
public:
|
||||
virtual bool setPart(CustomElementPart *);
|
||||
virtual CustomElementPart *currentPart() const;
|
||||
bool setPart(CustomElementPart *) override;
|
||||
CustomElementPart *currentPart() const override;
|
||||
|
||||
public slots:
|
||||
void editingFinished();
|
||||
void updateForm();
|
||||
void updateForm() override;
|
||||
|
||||
private:
|
||||
void activeConnections(bool);
|
||||
|
@ -32,12 +32,12 @@ class ESEventAddArc : public ESEventInterface
|
||||
{
|
||||
public:
|
||||
ESEventAddArc(ElementScene *scene);
|
||||
virtual ~ESEventAddArc();
|
||||
~ESEventAddArc() override;
|
||||
|
||||
virtual bool mousePressEvent (QGraphicsSceneMouseEvent *event);
|
||||
virtual bool mouseMoveEvent (QGraphicsSceneMouseEvent *event);
|
||||
virtual bool mouseReleaseEvent (QGraphicsSceneMouseEvent *event);
|
||||
virtual bool keyPressEvent (QKeyEvent *event);
|
||||
bool mousePressEvent (QGraphicsSceneMouseEvent *event) override;
|
||||
bool mouseMoveEvent (QGraphicsSceneMouseEvent *event) override;
|
||||
bool mouseReleaseEvent (QGraphicsSceneMouseEvent *event) override;
|
||||
bool keyPressEvent (QKeyEvent *event) override;
|
||||
|
||||
private:
|
||||
void updateArc ();
|
||||
|
@ -33,11 +33,11 @@ class ESEventAddEllipse : public ESEventInterface
|
||||
{
|
||||
public:
|
||||
ESEventAddEllipse(ElementScene *scene);
|
||||
~ESEventAddEllipse();
|
||||
~ESEventAddEllipse() override;
|
||||
|
||||
virtual bool mousePressEvent (QGraphicsSceneMouseEvent *event);
|
||||
virtual bool mouseMoveEvent (QGraphicsSceneMouseEvent *event);
|
||||
virtual bool mouseReleaseEvent (QGraphicsSceneMouseEvent *event);
|
||||
bool mousePressEvent (QGraphicsSceneMouseEvent *event) override;
|
||||
bool mouseMoveEvent (QGraphicsSceneMouseEvent *event) override;
|
||||
bool mouseReleaseEvent (QGraphicsSceneMouseEvent *event) override;
|
||||
|
||||
private:
|
||||
PartEllipse *m_ellipse;
|
||||
|
@ -32,11 +32,11 @@ class ESEventAddLine : public ESEventInterface
|
||||
{
|
||||
public:
|
||||
ESEventAddLine(ElementScene *scene);
|
||||
virtual ~ESEventAddLine();
|
||||
~ESEventAddLine() override;
|
||||
|
||||
virtual bool mousePressEvent (QGraphicsSceneMouseEvent *event);
|
||||
virtual bool mouseMoveEvent (QGraphicsSceneMouseEvent *event);
|
||||
virtual bool mouseReleaseEvent (QGraphicsSceneMouseEvent *event);
|
||||
bool mousePressEvent (QGraphicsSceneMouseEvent *event) override;
|
||||
bool mouseMoveEvent (QGraphicsSceneMouseEvent *event) override;
|
||||
bool mouseReleaseEvent (QGraphicsSceneMouseEvent *event) override;
|
||||
|
||||
private:
|
||||
PartLine *m_line;
|
||||
|
@ -32,12 +32,12 @@ class ESEventAddPolygon : public ESEventInterface
|
||||
{
|
||||
public:
|
||||
ESEventAddPolygon(ElementScene *scene);
|
||||
virtual ~ESEventAddPolygon();
|
||||
~ESEventAddPolygon() override;
|
||||
|
||||
virtual bool mousePressEvent (QGraphicsSceneMouseEvent *event);
|
||||
virtual bool mouseMoveEvent (QGraphicsSceneMouseEvent *event);
|
||||
virtual bool mouseReleaseEvent (QGraphicsSceneMouseEvent *event);
|
||||
virtual bool mouseDoubleClickEvent (QGraphicsSceneMouseEvent *event);
|
||||
bool mousePressEvent (QGraphicsSceneMouseEvent *event) override;
|
||||
bool mouseMoveEvent (QGraphicsSceneMouseEvent *event) override;
|
||||
bool mouseReleaseEvent (QGraphicsSceneMouseEvent *event) override;
|
||||
bool mouseDoubleClickEvent (QGraphicsSceneMouseEvent *event) override;
|
||||
|
||||
private:
|
||||
PartPolygon *m_polygon;
|
||||
|
@ -29,11 +29,11 @@ class ESEventAddRect : public ESEventInterface
|
||||
{
|
||||
public:
|
||||
ESEventAddRect(ElementScene *scene);
|
||||
virtual ~ESEventAddRect();
|
||||
~ESEventAddRect() override;
|
||||
|
||||
virtual bool mousePressEvent (QGraphicsSceneMouseEvent *event);
|
||||
virtual bool mouseMoveEvent (QGraphicsSceneMouseEvent *event);
|
||||
virtual bool mouseReleaseEvent (QGraphicsSceneMouseEvent *event);
|
||||
bool mousePressEvent (QGraphicsSceneMouseEvent *event) override;
|
||||
bool mouseMoveEvent (QGraphicsSceneMouseEvent *event) override;
|
||||
bool mouseReleaseEvent (QGraphicsSceneMouseEvent *event) override;
|
||||
|
||||
private:
|
||||
PartRectangle *m_rect;
|
||||
|
@ -32,11 +32,11 @@ class ESEventAddTerminal : public ESEventInterface
|
||||
{
|
||||
public:
|
||||
ESEventAddTerminal(ElementScene *scene);
|
||||
virtual ~ESEventAddTerminal();
|
||||
~ESEventAddTerminal() override;
|
||||
|
||||
virtual bool mouseMoveEvent (QGraphicsSceneMouseEvent *event);
|
||||
virtual bool mouseReleaseEvent (QGraphicsSceneMouseEvent *event);
|
||||
virtual bool keyPressEvent (QKeyEvent *event);
|
||||
bool mouseMoveEvent (QGraphicsSceneMouseEvent *event) override;
|
||||
bool mouseReleaseEvent (QGraphicsSceneMouseEvent *event) override;
|
||||
bool keyPressEvent (QKeyEvent *event) override;
|
||||
|
||||
private:
|
||||
PartTerminal *m_terminal;
|
||||
|
@ -32,10 +32,10 @@ class ESEventAddText : public ESEventInterface
|
||||
{
|
||||
public:
|
||||
ESEventAddText(ElementScene *scene);
|
||||
virtual ~ESEventAddText();
|
||||
~ESEventAddText() override;
|
||||
|
||||
virtual bool mouseMoveEvent (QGraphicsSceneMouseEvent *event);
|
||||
virtual bool mouseReleaseEvent (QGraphicsSceneMouseEvent *event);
|
||||
bool mouseMoveEvent (QGraphicsSceneMouseEvent *event) override;
|
||||
bool mouseReleaseEvent (QGraphicsSceneMouseEvent *event) override;
|
||||
|
||||
private:
|
||||
PartText *m_text;
|
||||
|
@ -32,10 +32,10 @@ class ESEventAddTextField : public ESEventInterface
|
||||
{
|
||||
public:
|
||||
ESEventAddTextField(ElementScene *scene);
|
||||
virtual ~ESEventAddTextField();
|
||||
~ESEventAddTextField() override;
|
||||
|
||||
virtual bool mouseMoveEvent (QGraphicsSceneMouseEvent *event);
|
||||
virtual bool mouseReleaseEvent (QGraphicsSceneMouseEvent *event);
|
||||
bool mouseMoveEvent (QGraphicsSceneMouseEvent *event) override;
|
||||
bool mouseReleaseEvent (QGraphicsSceneMouseEvent *event) override;
|
||||
|
||||
private:
|
||||
PartTextField *m_text;
|
||||
|
@ -42,7 +42,7 @@ class AbstractPartEllipse : public CustomElementGraphicPart
|
||||
// constructors, destructor
|
||||
public:
|
||||
AbstractPartEllipse(QETElementEditor *editor, QGraphicsItem * parent = nullptr);
|
||||
virtual ~AbstractPartEllipse();
|
||||
~AbstractPartEllipse() override;
|
||||
|
||||
private:
|
||||
AbstractPartEllipse(const AbstractPartEllipse &);
|
||||
@ -54,17 +54,17 @@ class AbstractPartEllipse : public CustomElementGraphicPart
|
||||
|
||||
// methods
|
||||
public:
|
||||
virtual void startUserTransformation (const QRectF &);
|
||||
virtual void handleUserTransformation (const QRectF &, const QRectF &);
|
||||
void startUserTransformation (const QRectF &) override;
|
||||
void handleUserTransformation (const QRectF &, const QRectF &) override;
|
||||
|
||||
//Coordinates
|
||||
virtual QRectF boundingRect() const;
|
||||
virtual QRectF sceneGeometricRect() const;
|
||||
QRectF boundingRect() const override;
|
||||
QRectF sceneGeometricRect() const override;
|
||||
virtual QPointF sceneTopLeft() const;
|
||||
|
||||
QRectF rect() const;
|
||||
virtual void setRect (const QRectF &rect);
|
||||
virtual bool isUseless() const;
|
||||
bool isUseless() const override;
|
||||
|
||||
int startAngle() const {return m_start_angle;}
|
||||
virtual void setStartAngle (const int &start_angle);
|
||||
|
@ -65,7 +65,7 @@ class CustomElementGraphicPart : public QGraphicsObject, public CustomElementPar
|
||||
public:
|
||||
|
||||
CustomElementGraphicPart(QETElementEditor *editor, QGraphicsItem *parent = nullptr);
|
||||
virtual ~CustomElementGraphicPart();
|
||||
~CustomElementGraphicPart() override;
|
||||
|
||||
static void drawCross (const QPointF ¢er, QPainter *painter);
|
||||
|
||||
@ -89,8 +89,8 @@ class CustomElementGraphicPart : public QGraphicsObject, public CustomElementPar
|
||||
|
||||
|
||||
//Rediriged to QObject Q_PROPERTY system
|
||||
virtual void setProperty (const char *name, const QVariant &value) {QObject::setProperty(name, value);}
|
||||
virtual QVariant property (const char *name) const {return QObject::property(name);}
|
||||
void setProperty (const char *name, const QVariant &value) override {QObject::setProperty(name, value);}
|
||||
QVariant property (const char *name) const override {return QObject::property(name);}
|
||||
|
||||
virtual QPainterPath shadowShape ()const = 0;
|
||||
|
||||
@ -101,14 +101,14 @@ class CustomElementGraphicPart : public QGraphicsObject, public CustomElementPar
|
||||
void applyStylesToQPainter(QPainter &) const;
|
||||
void drawShadowShape (QPainter *painter);
|
||||
|
||||
QVariant itemChange(GraphicsItemChange change, const QVariant &value);
|
||||
void hoverEnterEvent(QGraphicsSceneHoverEvent *event);
|
||||
void hoverMoveEvent (QGraphicsSceneHoverEvent *event);
|
||||
void hoverLeaveEvent(QGraphicsSceneHoverEvent *event);
|
||||
QVariant itemChange(GraphicsItemChange change, const QVariant &value) override;
|
||||
void hoverEnterEvent(QGraphicsSceneHoverEvent *event) override;
|
||||
void hoverMoveEvent (QGraphicsSceneHoverEvent *event) override;
|
||||
void hoverLeaveEvent(QGraphicsSceneHoverEvent *event) override;
|
||||
|
||||
virtual void mousePressEvent(QGraphicsSceneMouseEvent *event);
|
||||
virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
|
||||
virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
|
||||
void mousePressEvent(QGraphicsSceneMouseEvent *event) override;
|
||||
void mouseMoveEvent(QGraphicsSceneMouseEvent *event) override;
|
||||
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) override;
|
||||
|
||||
// attributes
|
||||
bool m_hovered;
|
||||
|
@ -34,7 +34,7 @@ class PartArc : public AbstractPartEllipse
|
||||
|
||||
public:
|
||||
PartArc(QETElementEditor *editor, QGraphicsItem *parent = nullptr);
|
||||
virtual ~PartArc();
|
||||
~PartArc() override;
|
||||
|
||||
private:
|
||||
PartArc(const PartArc &);
|
||||
@ -45,25 +45,25 @@ class PartArc : public AbstractPartEllipse
|
||||
* Enable the use of qgraphicsitem_cast to safely cast a QGraphicsItem into a PartArc.
|
||||
* @return the QGraphicsItem type
|
||||
*/
|
||||
virtual int type() const { return Type; }
|
||||
virtual void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget * = nullptr);
|
||||
int type() const override { return Type; }
|
||||
void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget * = nullptr) override;
|
||||
|
||||
//Name and XML
|
||||
virtual QString name() const { return(QObject::tr("arc", "element part name")); }
|
||||
virtual QString xmlName() const { return(QString("arc")); }
|
||||
virtual const QDomElement toXml (QDomDocument &) const;
|
||||
virtual void fromXml (const QDomElement &);
|
||||
QString name() const override { return(QObject::tr("arc", "element part name")); }
|
||||
QString xmlName() const override { return(QString("arc")); }
|
||||
const QDomElement toXml (QDomDocument &) const override;
|
||||
void fromXml (const QDomElement &) override;
|
||||
|
||||
virtual QPainterPath shape() const;
|
||||
virtual QPainterPath shadowShape() const;
|
||||
virtual void setRect(const QRectF &rect) {AbstractPartEllipse::setRect(rect); adjusteHandlerPos();}
|
||||
virtual void setStartAngle(const int &start_angle) {AbstractPartEllipse::setStartAngle(start_angle); adjusteHandlerPos();}
|
||||
virtual void setSpanAngle(const int &span_angle) {AbstractPartEllipse::setSpanAngle(span_angle); adjusteHandlerPos();}
|
||||
QPainterPath shape() const override;
|
||||
QPainterPath shadowShape() const override;
|
||||
void setRect(const QRectF &rect) override {AbstractPartEllipse::setRect(rect); adjusteHandlerPos();}
|
||||
void setStartAngle(const int &start_angle) override {AbstractPartEllipse::setStartAngle(start_angle); adjusteHandlerPos();}
|
||||
void setSpanAngle(const int &span_angle) override {AbstractPartEllipse::setSpanAngle(span_angle); adjusteHandlerPos();}
|
||||
|
||||
protected:
|
||||
virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
|
||||
virtual QVariant itemChange(GraphicsItemChange change, const QVariant &value);
|
||||
virtual bool sceneEventFilter(QGraphicsItem *watched, QEvent *event);
|
||||
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) override;
|
||||
QVariant itemChange(GraphicsItemChange change, const QVariant &value) override;
|
||||
bool sceneEventFilter(QGraphicsItem *watched, QEvent *event) override;
|
||||
|
||||
private:
|
||||
void switchResizeMode();
|
||||
|
@ -34,7 +34,7 @@ class PartEllipse : public AbstractPartEllipse
|
||||
// constructors, destructor
|
||||
public:
|
||||
PartEllipse(QETElementEditor *editor, QGraphicsItem * parent = nullptr);
|
||||
virtual ~PartEllipse();
|
||||
~PartEllipse() override;
|
||||
|
||||
private:
|
||||
PartEllipse(const PartEllipse &);
|
||||
@ -46,22 +46,22 @@ class PartEllipse : public AbstractPartEllipse
|
||||
* Enable the use of qgraphicsitem_cast to safely cast a QGraphicsItem into a PartEllipse.
|
||||
* @return the QGraphicsItem type
|
||||
*/
|
||||
virtual int type() const { return Type; }
|
||||
virtual void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget * = nullptr);
|
||||
int type() const override { return Type; }
|
||||
void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget * = nullptr) override;
|
||||
|
||||
//Name and XML
|
||||
virtual QString name() const { return(QObject::tr("ellipse", "element part name")); }
|
||||
virtual QString xmlName() const { return(QString("ellipse")); }
|
||||
virtual const QDomElement toXml (QDomDocument &) const;
|
||||
virtual void fromXml (const QDomElement &);
|
||||
virtual QPainterPath shape() const;
|
||||
virtual QPainterPath shadowShape() const;
|
||||
virtual void setRect(const QRectF &rect) {AbstractPartEllipse::setRect(rect); adjusteHandlerPos();}
|
||||
QString name() const override { return(QObject::tr("ellipse", "element part name")); }
|
||||
QString xmlName() const override { return(QString("ellipse")); }
|
||||
const QDomElement toXml (QDomDocument &) const override;
|
||||
void fromXml (const QDomElement &) override;
|
||||
QPainterPath shape() const override;
|
||||
QPainterPath shadowShape() const override;
|
||||
void setRect(const QRectF &rect) override {AbstractPartEllipse::setRect(rect); adjusteHandlerPos();}
|
||||
|
||||
protected:
|
||||
virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
|
||||
virtual QVariant itemChange(GraphicsItemChange change, const QVariant &value);
|
||||
virtual bool sceneEventFilter(QGraphicsItem *watched, QEvent *event);
|
||||
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) override;
|
||||
QVariant itemChange(GraphicsItemChange change, const QVariant &value) override;
|
||||
bool sceneEventFilter(QGraphicsItem *watched, QEvent *event) override;
|
||||
|
||||
private:
|
||||
void switchResizeMode();
|
||||
|
@ -46,7 +46,7 @@ class PartLine : public CustomElementGraphicPart
|
||||
// constructors, destructor
|
||||
public:
|
||||
PartLine(QETElementEditor *, QGraphicsItem * = nullptr);
|
||||
virtual ~PartLine();
|
||||
~PartLine() override;
|
||||
private:
|
||||
PartLine(const PartLine &);
|
||||
|
||||
@ -66,21 +66,21 @@ class PartLine : public CustomElementGraphicPart
|
||||
* Enable the use of qgraphicsitem_cast to safely cast a QGraphicsItem into a PartLine.
|
||||
* @return the QGraphicsItem type
|
||||
*/
|
||||
virtual int type() const { return Type; }
|
||||
virtual void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget * = nullptr);
|
||||
virtual QString name() const { return(QObject::tr("ligne", "element part name")); }
|
||||
virtual QString xmlName() const { return(QString("line")); }
|
||||
virtual const QDomElement toXml(QDomDocument &) const;
|
||||
virtual void fromXml(const QDomElement &);
|
||||
int type() const override { return Type; }
|
||||
void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget * = nullptr) override;
|
||||
QString name() const override { return(QObject::tr("ligne", "element part name")); }
|
||||
QString xmlName() const override { return(QString("line")); }
|
||||
const QDomElement toXml(QDomDocument &) const override;
|
||||
void fromXml(const QDomElement &) override;
|
||||
virtual QPointF sceneP1() const;
|
||||
virtual QPointF sceneP2() const;
|
||||
virtual QPainterPath shape() const;
|
||||
virtual QPainterPath shadowShape() const;
|
||||
virtual QRectF boundingRect() const;
|
||||
virtual bool isUseless() const;
|
||||
virtual QRectF sceneGeometricRect() const;
|
||||
virtual void startUserTransformation(const QRectF &);
|
||||
virtual void handleUserTransformation(const QRectF &, const QRectF &);
|
||||
QPainterPath shape() const override;
|
||||
QPainterPath shadowShape() const override;
|
||||
QRectF boundingRect() const override;
|
||||
bool isUseless() const override;
|
||||
QRectF sceneGeometricRect() const override;
|
||||
void startUserTransformation(const QRectF &) override;
|
||||
void handleUserTransformation(const QRectF &, const QRectF &) override;
|
||||
static uint requiredLengthForEndType(const Qet::EndType &);
|
||||
static QList<QPointF> fourEndPoints(const QPointF &, const QPointF &, const qreal &);
|
||||
|
||||
@ -96,8 +96,8 @@ class PartLine : public CustomElementGraphicPart
|
||||
void setSecondEndLength(const qreal &l);
|
||||
|
||||
protected:
|
||||
virtual QVariant itemChange(GraphicsItemChange change, const QVariant &value);
|
||||
virtual bool sceneEventFilter(QGraphicsItem *watched, QEvent *event);
|
||||
QVariant itemChange(GraphicsItemChange change, const QVariant &value) override;
|
||||
bool sceneEventFilter(QGraphicsItem *watched, QEvent *event) override;
|
||||
|
||||
private:
|
||||
void adjusteHandlerPos();
|
||||
|
@ -39,7 +39,7 @@ class PartPolygon : public CustomElementGraphicPart
|
||||
// constructors, destructor
|
||||
public:
|
||||
PartPolygon(QETElementEditor *editor, QGraphicsItem *parent = nullptr);
|
||||
virtual ~PartPolygon();
|
||||
~PartPolygon() override;
|
||||
|
||||
private:
|
||||
PartPolygon(const PartPolygon &);
|
||||
@ -55,23 +55,23 @@ class PartPolygon : public CustomElementGraphicPart
|
||||
* Enable the use of qgraphicsitem_cast to safely cast a QGraphicsItem into a PartPolygon.
|
||||
* @return the QGraphicsItem type
|
||||
*/
|
||||
virtual int type() const { return Type; }
|
||||
void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *);
|
||||
int type() const override { return Type; }
|
||||
void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *) override;
|
||||
|
||||
virtual QString name() const { return(QObject::tr("polygone", "element part name")); }
|
||||
virtual QString xmlName() const { return(QString("polygon")); }
|
||||
void fromXml(const QDomElement &);
|
||||
const QDomElement toXml(QDomDocument &) const;
|
||||
QString name() const override { return(QObject::tr("polygone", "element part name")); }
|
||||
QString xmlName() const override { return(QString("polygon")); }
|
||||
void fromXml(const QDomElement &) override;
|
||||
const QDomElement toXml(QDomDocument &) const override;
|
||||
|
||||
virtual QPainterPath shape () const;
|
||||
virtual QPainterPath shadowShape() const;
|
||||
virtual QRectF boundingRect() const;
|
||||
virtual bool isUseless() const;
|
||||
virtual QRectF sceneGeometricRect() const;
|
||||
QPainterPath shape () const override;
|
||||
QPainterPath shadowShape() const override;
|
||||
QRectF boundingRect() const override;
|
||||
bool isUseless() const override;
|
||||
QRectF sceneGeometricRect() const override;
|
||||
|
||||
virtual void startUserTransformation(const QRectF &);
|
||||
virtual void handleUserTransformation(const QRectF &, const QRectF &);
|
||||
virtual QET::ScalingMethod preferredScalingMethod() const;
|
||||
void startUserTransformation(const QRectF &) override;
|
||||
void handleUserTransformation(const QRectF &, const QRectF &) override;
|
||||
QET::ScalingMethod preferredScalingMethod() const override;
|
||||
|
||||
QPolygonF polygon () const;
|
||||
void setPolygon (const QPolygonF &polygon);
|
||||
@ -84,8 +84,8 @@ class PartPolygon : public CustomElementGraphicPart
|
||||
void setClosed (bool close);
|
||||
|
||||
protected:
|
||||
virtual QVariant itemChange(GraphicsItemChange change, const QVariant &value);
|
||||
virtual bool sceneEventFilter(QGraphicsItem *watched, QEvent *event);
|
||||
QVariant itemChange(GraphicsItemChange change, const QVariant &value) override;
|
||||
bool sceneEventFilter(QGraphicsItem *watched, QEvent *event) override;
|
||||
|
||||
private:
|
||||
void adjusteHandlerPos();
|
||||
|
@ -37,7 +37,7 @@ class PartRectangle : public CustomElementGraphicPart
|
||||
// constructors, destructor
|
||||
public:
|
||||
PartRectangle(QETElementEditor *, QGraphicsItem *parent = nullptr);
|
||||
virtual ~PartRectangle();
|
||||
~PartRectangle() override;
|
||||
|
||||
private:
|
||||
PartRectangle(const PartRectangle &);
|
||||
@ -52,32 +52,32 @@ class PartRectangle : public CustomElementGraphicPart
|
||||
* Enable the use of qgraphicsitem_cast to safely cast a QGraphicsItem into a PartRectangle.
|
||||
* @return the QGraphicsItem type
|
||||
*/
|
||||
virtual int type () const { return Type; }
|
||||
virtual void paint (QPainter *, const QStyleOptionGraphicsItem *, QWidget * = nullptr);
|
||||
virtual QString name () const { return(QObject::tr("rectangle", "element part name")); }
|
||||
int type () const override { return Type; }
|
||||
void paint (QPainter *, const QStyleOptionGraphicsItem *, QWidget * = nullptr) override;
|
||||
QString name () const override { return(QObject::tr("rectangle", "element part name")); }
|
||||
|
||||
virtual QString xmlName () const { return(QString("rect")); }
|
||||
virtual const QDomElement toXml (QDomDocument &) const;
|
||||
virtual void fromXml (const QDomElement &);
|
||||
QString xmlName () const override { return(QString("rect")); }
|
||||
const QDomElement toXml (QDomDocument &) const override;
|
||||
void fromXml (const QDomElement &) override;
|
||||
|
||||
QRectF rect() const;
|
||||
void setRect(const QRectF &rect);
|
||||
|
||||
virtual QRectF sceneGeometricRect() const;
|
||||
QRectF sceneGeometricRect() const override;
|
||||
virtual QPointF sceneTopLeft() const;
|
||||
|
||||
virtual QPainterPath shape () const;
|
||||
virtual QPainterPath shadowShape() const;
|
||||
virtual QRectF boundingRect() const;
|
||||
virtual bool isUseless() const;
|
||||
QPainterPath shape () const override;
|
||||
QPainterPath shadowShape() const override;
|
||||
QRectF boundingRect() const override;
|
||||
bool isUseless() const override;
|
||||
|
||||
virtual void startUserTransformation(const QRectF &);
|
||||
virtual void handleUserTransformation(const QRectF &, const QRectF &);
|
||||
void startUserTransformation(const QRectF &) override;
|
||||
void handleUserTransformation(const QRectF &, const QRectF &) override;
|
||||
|
||||
protected:
|
||||
virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
|
||||
virtual QVariant itemChange(GraphicsItemChange change, const QVariant &value);
|
||||
virtual bool sceneEventFilter(QGraphicsItem *watched, QEvent *event);
|
||||
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) override;
|
||||
QVariant itemChange(GraphicsItemChange change, const QVariant &value) override;
|
||||
bool sceneEventFilter(QGraphicsItem *watched, QEvent *event) override;
|
||||
|
||||
private:
|
||||
void switchResizeMode();
|
||||
|
@ -36,7 +36,7 @@ class PartTerminal : public CustomElementGraphicPart
|
||||
public:
|
||||
// constructors, destructor
|
||||
PartTerminal(QETElementEditor *editor, QGraphicsItem *parent = nullptr);
|
||||
virtual ~PartTerminal();
|
||||
~PartTerminal() override;
|
||||
private:
|
||||
PartTerminal(const PartTerminal &);
|
||||
|
||||
@ -56,20 +56,20 @@ class PartTerminal : public CustomElementGraphicPart
|
||||
* Enable the use of qgraphicsitem_cast to safely cast a QGraphicsItem into a PartTerminal.
|
||||
* @return the QGraphicsItem type
|
||||
*/
|
||||
virtual int type() const { return Type; }
|
||||
virtual QString name() const { return(QObject::tr("borne", "element part name")); }
|
||||
virtual QString xmlName() const { return(QString("terminal")); }
|
||||
virtual void fromXml(const QDomElement &);
|
||||
virtual const QDomElement toXml(QDomDocument &) const;
|
||||
virtual void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *);
|
||||
int type() const override { return Type; }
|
||||
QString name() const override { return(QObject::tr("borne", "element part name")); }
|
||||
QString xmlName() const override { return(QString("terminal")); }
|
||||
void fromXml(const QDomElement &) override;
|
||||
const QDomElement toXml(QDomDocument &) const override;
|
||||
void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *) override;
|
||||
|
||||
virtual QPainterPath shape() const;
|
||||
virtual QPainterPath shadowShape() const {return shape();}
|
||||
virtual QRectF boundingRect() const;
|
||||
virtual bool isUseless() const;
|
||||
virtual QRectF sceneGeometricRect() const;
|
||||
virtual void startUserTransformation(const QRectF &);
|
||||
virtual void handleUserTransformation(const QRectF &, const QRectF &);
|
||||
QPainterPath shape() const override;
|
||||
QPainterPath shadowShape() const override {return shape();}
|
||||
QRectF boundingRect() const override;
|
||||
bool isUseless() const override;
|
||||
QRectF sceneGeometricRect() const override;
|
||||
void startUserTransformation(const QRectF &) override;
|
||||
void handleUserTransformation(const QRectF &, const QRectF &) override;
|
||||
|
||||
Qet::Orientation orientation() const {return m_orientation;}
|
||||
void setOrientation(Qet::Orientation ori);
|
||||
|
@ -32,7 +32,7 @@ class PartText : public QGraphicsTextItem, public CustomElementPart {
|
||||
// constructors, destructor
|
||||
public:
|
||||
PartText(QETElementEditor *, QGraphicsItem * = nullptr);
|
||||
virtual ~PartText();
|
||||
~PartText() override;
|
||||
|
||||
private:
|
||||
PartText(const PartText &);
|
||||
@ -45,20 +45,20 @@ class PartText : public QGraphicsTextItem, public CustomElementPart {
|
||||
PartText.
|
||||
@return the QGraphicsItem type
|
||||
*/
|
||||
virtual int type() const { return Type; }
|
||||
virtual QString name() const { return(QObject::tr("texte", "element part name")); }
|
||||
virtual QString xmlName() const { return(QString("text")); }
|
||||
void fromXml(const QDomElement &);
|
||||
const QDomElement toXml(QDomDocument &) const;
|
||||
int type() const override { return Type; }
|
||||
QString name() const override { return(QObject::tr("texte", "element part name")); }
|
||||
QString xmlName() const override { return(QString("text")); }
|
||||
void fromXml(const QDomElement &) override;
|
||||
const QDomElement toXml(QDomDocument &) const override;
|
||||
void setRotation(qreal angle) {(QGraphicsObject::setRotation(QET::correctAngle(angle)));}
|
||||
virtual bool isUseless() const;
|
||||
virtual QRectF sceneGeometricRect() const;
|
||||
virtual void startUserTransformation(const QRectF &);
|
||||
virtual void handleUserTransformation(const QRectF &, const QRectF &);
|
||||
bool isUseless() const override;
|
||||
QRectF sceneGeometricRect() const override;
|
||||
void startUserTransformation(const QRectF &) override;
|
||||
void handleUserTransformation(const QRectF &, const QRectF &) override;
|
||||
|
||||
///PROPERTY
|
||||
void setProperty(const char *name, const QVariant &value) {QGraphicsTextItem::setProperty(name, value);}
|
||||
QVariant property(const char *name) const {return QGraphicsTextItem::property(name);}
|
||||
void setProperty(const char *name, const QVariant &value) override {QGraphicsTextItem::setProperty(name, value);}
|
||||
QVariant property(const char *name) const override {return QGraphicsTextItem::property(name);}
|
||||
// Size value
|
||||
Q_PROPERTY(qreal size READ size WRITE setSize)
|
||||
qreal size () const {return font().pointSize();}
|
||||
@ -81,15 +81,15 @@ class PartText : public QGraphicsTextItem, public CustomElementPart {
|
||||
void endEdition();
|
||||
|
||||
protected:
|
||||
virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
|
||||
virtual void mousePressEvent(QGraphicsSceneMouseEvent *event);
|
||||
virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
|
||||
virtual void focusInEvent(QFocusEvent *);
|
||||
virtual void focusOutEvent(QFocusEvent *);
|
||||
virtual void keyPressEvent(QKeyEvent *);
|
||||
virtual void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *);
|
||||
virtual QVariant itemChange(GraphicsItemChange, const QVariant &);
|
||||
QRectF boundingRect() const;
|
||||
void mouseMoveEvent(QGraphicsSceneMouseEvent *event) override;
|
||||
void mousePressEvent(QGraphicsSceneMouseEvent *event) override;
|
||||
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) override;
|
||||
void focusInEvent(QFocusEvent *) override;
|
||||
void focusOutEvent(QFocusEvent *) override;
|
||||
void keyPressEvent(QKeyEvent *) override;
|
||||
void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *) override;
|
||||
QVariant itemChange(GraphicsItemChange, const QVariant &) override;
|
||||
QRectF boundingRect() const override;
|
||||
|
||||
private:
|
||||
QPointF margin() const;
|
||||
|
@ -36,7 +36,7 @@ class PartTextField : public QGraphicsTextItem, public CustomElementPart
|
||||
// constructors, destructor
|
||||
public:
|
||||
PartTextField(QETElementEditor *, QGraphicsItem * = nullptr);
|
||||
virtual ~PartTextField();
|
||||
~PartTextField() override;
|
||||
|
||||
private:
|
||||
PartTextField(const PartTextField &);
|
||||
@ -53,19 +53,19 @@ class PartTextField : public QGraphicsTextItem, public CustomElementPart
|
||||
PartTextField.
|
||||
@return the QGraphicsItem type
|
||||
*/
|
||||
virtual int type() const { return Type; }
|
||||
virtual QString name() const { return(QObject::tr("champ de texte", "element part name")); }
|
||||
virtual QString xmlName() const { return(QString("input")); }
|
||||
void fromXml(const QDomElement &);
|
||||
const QDomElement toXml(QDomDocument &) const;
|
||||
virtual bool isUseless() const;
|
||||
virtual QRectF sceneGeometricRect() const;
|
||||
virtual void startUserTransformation(const QRectF &);
|
||||
virtual void handleUserTransformation(const QRectF &, const QRectF &);
|
||||
int type() const override { return Type; }
|
||||
QString name() const override { return(QObject::tr("champ de texte", "element part name")); }
|
||||
QString xmlName() const override { return(QString("input")); }
|
||||
void fromXml(const QDomElement &) override;
|
||||
const QDomElement toXml(QDomDocument &) const override;
|
||||
bool isUseless() const override;
|
||||
QRectF sceneGeometricRect() const override;
|
||||
void startUserTransformation(const QRectF &) override;
|
||||
void handleUserTransformation(const QRectF &, const QRectF &) override;
|
||||
|
||||
///PROPERTY
|
||||
virtual void setProperty(const char *name, const QVariant &value) {QGraphicsTextItem::setProperty(name, value);}
|
||||
virtual QVariant property(const char *name) const {return QGraphicsTextItem::property(name);}
|
||||
void setProperty(const char *name, const QVariant &value) override {QGraphicsTextItem::setProperty(name, value);}
|
||||
QVariant property(const char *name) const override {return QGraphicsTextItem::property(name);}
|
||||
|
||||
// displayed text
|
||||
Q_PROPERTY(QString text READ toPlainText WRITE setPlainText)
|
||||
@ -97,15 +97,15 @@ class PartTextField : public QGraphicsTextItem, public CustomElementPart
|
||||
void endEdition();
|
||||
|
||||
protected:
|
||||
virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
|
||||
virtual void mousePressEvent(QGraphicsSceneMouseEvent *event);
|
||||
virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
|
||||
virtual void focusInEvent(QFocusEvent *);
|
||||
virtual void focusOutEvent(QFocusEvent *);
|
||||
virtual void keyPressEvent(QKeyEvent *);
|
||||
virtual void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *);
|
||||
virtual QVariant itemChange(GraphicsItemChange, const QVariant &);
|
||||
QRectF boundingRect() const;
|
||||
void mouseMoveEvent(QGraphicsSceneMouseEvent *event) override;
|
||||
void mousePressEvent(QGraphicsSceneMouseEvent *event) override;
|
||||
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) override;
|
||||
void focusInEvent(QFocusEvent *) override;
|
||||
void focusOutEvent(QFocusEvent *) override;
|
||||
void keyPressEvent(QKeyEvent *) override;
|
||||
void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *) override;
|
||||
QVariant itemChange(GraphicsItemChange, const QVariant &) override;
|
||||
QRectF boundingRect() const override;
|
||||
|
||||
private:
|
||||
QPointF margin() const;
|
||||
|
@ -34,7 +34,7 @@ class LineEditor : public ElementItemEditor
|
||||
// constructors, destructor
|
||||
public:
|
||||
LineEditor(QETElementEditor *, PartLine * = nullptr, QWidget * = nullptr);
|
||||
virtual ~LineEditor();
|
||||
~LineEditor() override;
|
||||
private:
|
||||
LineEditor(const LineEditor &);
|
||||
|
||||
@ -49,8 +49,8 @@ class LineEditor : public ElementItemEditor
|
||||
|
||||
// methods
|
||||
public:
|
||||
virtual bool setPart(CustomElementPart *);
|
||||
virtual CustomElementPart *currentPart() const;
|
||||
bool setPart(CustomElementPart *) override;
|
||||
CustomElementPart *currentPart() const override;
|
||||
QPointF editedP1() const;
|
||||
QPointF editedP2() const;
|
||||
|
||||
@ -60,7 +60,7 @@ class LineEditor : public ElementItemEditor
|
||||
void updateLineEndType2();
|
||||
void updateLineEndLength2();
|
||||
void lineEditingFinished();
|
||||
void updateForm();
|
||||
void updateForm() override;
|
||||
|
||||
private:
|
||||
void activeConnections(bool);
|
||||
|
@ -36,7 +36,7 @@ class PolygonEditor : public ElementItemEditor {
|
||||
// constructors, destructor
|
||||
public:
|
||||
PolygonEditor(QETElementEditor *, PartPolygon * = nullptr, QWidget * = nullptr);
|
||||
virtual ~PolygonEditor();
|
||||
~PolygonEditor() override;
|
||||
|
||||
private:
|
||||
PolygonEditor(const PolygonEditor &);
|
||||
@ -50,8 +50,8 @@ class PolygonEditor : public ElementItemEditor {
|
||||
|
||||
// methods
|
||||
public:
|
||||
virtual bool setPart(CustomElementPart *);
|
||||
virtual CustomElementPart *currentPart() const;
|
||||
bool setPart(CustomElementPart *) override;
|
||||
CustomElementPart *currentPart() const override;
|
||||
|
||||
private:
|
||||
QVector<QPointF> getPointsFromTree();
|
||||
@ -59,7 +59,7 @@ class PolygonEditor : public ElementItemEditor {
|
||||
public slots:
|
||||
void updatePolygonPoints();
|
||||
void updatePolygonClosedState();
|
||||
void updateForm();
|
||||
void updateForm() override;
|
||||
void validColumn(QTreeWidgetItem *qtwi, int column);
|
||||
|
||||
private:
|
||||
|
@ -37,7 +37,7 @@ class QETElementEditor : public QETMainWindow {
|
||||
// constructor, destructor
|
||||
public:
|
||||
QETElementEditor(QWidget * = nullptr);
|
||||
virtual ~QETElementEditor();
|
||||
~QETElementEditor() override;
|
||||
private:
|
||||
QETElementEditor(const QETElementEditor &);
|
||||
void setupActions();
|
||||
@ -116,8 +116,8 @@ class QETElementEditor : public QETMainWindow {
|
||||
void saveToLocation(ElementsLocation loc);
|
||||
|
||||
protected:
|
||||
void closeEvent(QCloseEvent *);
|
||||
virtual void firstActivation(QEvent *);
|
||||
void closeEvent(QCloseEvent *) override;
|
||||
void firstActivation(QEvent *) override;
|
||||
|
||||
private:
|
||||
bool canClose();
|
||||
|
@ -34,7 +34,7 @@ class RectangleEditor : public ElementItemEditor
|
||||
// constructors, destructor
|
||||
public:
|
||||
RectangleEditor(QETElementEditor *, PartRectangle * = nullptr, QWidget * = nullptr);
|
||||
virtual ~RectangleEditor();
|
||||
~RectangleEditor() override;
|
||||
private:
|
||||
RectangleEditor(const RectangleEditor &);
|
||||
|
||||
@ -47,12 +47,12 @@ class RectangleEditor : public ElementItemEditor
|
||||
|
||||
// methods
|
||||
public:
|
||||
virtual bool setPart(CustomElementPart *);
|
||||
virtual CustomElementPart *currentPart() const;
|
||||
bool setPart(CustomElementPart *) override;
|
||||
CustomElementPart *currentPart() const override;
|
||||
QPointF editedTopLeft () const;
|
||||
|
||||
public slots:
|
||||
void updateForm();
|
||||
void updateForm() override;
|
||||
void editingFinished();
|
||||
|
||||
private:
|
||||
|
@ -37,7 +37,7 @@ class StyleEditor : public ElementItemEditor
|
||||
// constructors, destructor
|
||||
public:
|
||||
StyleEditor(QETElementEditor *, CustomElementGraphicPart * = nullptr, QWidget * = nullptr);
|
||||
virtual ~StyleEditor();
|
||||
~StyleEditor() override;
|
||||
|
||||
private:
|
||||
StyleEditor(const StyleEditor &);
|
||||
@ -53,14 +53,14 @@ class StyleEditor : public ElementItemEditor
|
||||
|
||||
// methods
|
||||
public:
|
||||
virtual bool setPart(CustomElementPart *);
|
||||
virtual bool setParts(QList<CustomElementPart *>);
|
||||
virtual CustomElementPart *currentPart() const;
|
||||
bool setPart(CustomElementPart *) override;
|
||||
bool setParts(QList<CustomElementPart *>) override;
|
||||
CustomElementPart *currentPart() const override;
|
||||
|
||||
static bool isStyleEditable (QList <CustomElementPart *> cep_list);
|
||||
|
||||
public slots:
|
||||
void updateForm();
|
||||
void updateForm() override;
|
||||
void updatePartAntialiasing();
|
||||
void updatePartColor();
|
||||
void updatePartLineStyle();
|
||||
|
@ -32,7 +32,7 @@ class TerminalEditor : public ElementItemEditor {
|
||||
// Constructors, destructor
|
||||
public:
|
||||
TerminalEditor(QETElementEditor *, PartTerminal * = nullptr, QWidget * = nullptr);
|
||||
virtual ~TerminalEditor();
|
||||
~TerminalEditor() override;
|
||||
private:
|
||||
TerminalEditor(const TerminalEditor &);
|
||||
|
||||
@ -45,13 +45,13 @@ class TerminalEditor : public ElementItemEditor {
|
||||
|
||||
// methods
|
||||
public:
|
||||
virtual bool setPart(CustomElementPart *);
|
||||
virtual CustomElementPart *currentPart() const;
|
||||
bool setPart(CustomElementPart *) override;
|
||||
CustomElementPart *currentPart() const override;
|
||||
|
||||
public slots:
|
||||
void updateTerminalO();
|
||||
void updatePos();
|
||||
void updateForm();
|
||||
void updateForm() override;
|
||||
|
||||
private:
|
||||
void activeConnections(bool);
|
||||
|
@ -39,7 +39,7 @@ class TextEditor : public ElementItemEditor
|
||||
// Constructors, destructor
|
||||
public:
|
||||
TextEditor(QETElementEditor *, PartText * = nullptr, QWidget * = nullptr);
|
||||
virtual ~TextEditor();
|
||||
~TextEditor() override;
|
||||
private:
|
||||
TextEditor(const TextEditor &);
|
||||
|
||||
@ -56,8 +56,8 @@ class TextEditor : public ElementItemEditor
|
||||
|
||||
// methods
|
||||
public:
|
||||
virtual bool setPart(CustomElementPart *);
|
||||
virtual CustomElementPart *currentPart() const;
|
||||
bool setPart(CustomElementPart *) override;
|
||||
CustomElementPart *currentPart() const override;
|
||||
|
||||
public slots:
|
||||
void updateTextT();
|
||||
@ -65,7 +65,7 @@ class TextEditor : public ElementItemEditor
|
||||
void updateTextC();
|
||||
void updateTextRotationAngle();
|
||||
void updatePos();
|
||||
void updateForm();
|
||||
void updateForm() override;
|
||||
|
||||
private:
|
||||
void activeConnections(bool);
|
||||
|
@ -38,7 +38,7 @@ class TextFieldEditor : public ElementItemEditor
|
||||
// Constructors, destructor
|
||||
public:
|
||||
TextFieldEditor(QETElementEditor *, PartTextField * = nullptr, QWidget * = nullptr);
|
||||
virtual ~TextFieldEditor();
|
||||
~TextFieldEditor() override;
|
||||
private:
|
||||
TextFieldEditor(const TextFieldEditor &);
|
||||
|
||||
@ -55,8 +55,8 @@ class TextFieldEditor : public ElementItemEditor
|
||||
|
||||
// methods
|
||||
public:
|
||||
virtual bool setPart(CustomElementPart *);
|
||||
virtual CustomElementPart *currentPart() const;
|
||||
bool setPart(CustomElementPart *) override;
|
||||
CustomElementPart *currentPart() const override;
|
||||
|
||||
public slots:
|
||||
void updateTextFieldT();
|
||||
@ -65,7 +65,7 @@ class TextFieldEditor : public ElementItemEditor
|
||||
void updateTextFieldRotationAngle();
|
||||
void updateTagg();
|
||||
void updatePos();
|
||||
void updateForm();
|
||||
void updateForm() override;
|
||||
|
||||
private:
|
||||
void activeConnections(bool);
|
||||
|
@ -38,7 +38,7 @@ class ElementPropertiesEditorWidget : public QDialog
|
||||
//METHODS
|
||||
public:
|
||||
explicit ElementPropertiesEditorWidget(QString &basic_type, DiagramContext &dc, QWidget *parent = nullptr);
|
||||
~ElementPropertiesEditorWidget();
|
||||
~ElementPropertiesEditorWidget() override;
|
||||
|
||||
void upDateInterface();
|
||||
|
||||
|
@ -36,7 +36,7 @@ class ElementsCategoryEditor : public QDialog
|
||||
|
||||
public:
|
||||
ElementsCategoryEditor(const ElementsLocation &location, bool edit = true, QWidget *parent = nullptr);
|
||||
virtual ~ElementsCategoryEditor();
|
||||
~ElementsCategoryEditor() override;
|
||||
|
||||
ElementsLocation createdLocation() const;
|
||||
|
||||
|
@ -32,7 +32,7 @@ class ElementsCollectionCache : public QObject
|
||||
public:
|
||||
// constructor, destructor
|
||||
ElementsCollectionCache(const QString &database_path, QObject * = nullptr);
|
||||
virtual ~ElementsCollectionCache();
|
||||
~ElementsCollectionCache() override;
|
||||
|
||||
// methods
|
||||
public:
|
||||
|
@ -37,7 +37,7 @@ class ElementsPanel : public GenericPanel {
|
||||
// constructors, destructor
|
||||
public:
|
||||
ElementsPanel(QWidget * = nullptr);
|
||||
virtual ~ElementsPanel();
|
||||
~ElementsPanel() override;
|
||||
|
||||
private:
|
||||
ElementsPanel(const ElementsPanel &);
|
||||
@ -66,7 +66,7 @@ class ElementsPanel : public GenericPanel {
|
||||
void ensureHierarchyIsVisible(const QList<QTreeWidgetItem *> &);
|
||||
|
||||
protected:
|
||||
void startDrag(Qt::DropActions);
|
||||
void startDrag(Qt::DropActions) override;
|
||||
void startTitleBlockTemplateDrag(const TitleBlockTemplateLocation &);
|
||||
bool matchesFilter(const QTreeWidgetItem *, QString) const;
|
||||
|
||||
@ -75,8 +75,8 @@ class ElementsPanel : public GenericPanel {
|
||||
|
||||
private:
|
||||
virtual QTreeWidgetItem *addProject (QETProject *);
|
||||
virtual QTreeWidgetItem *updateTemplatesCollectionItem(QTreeWidgetItem *, TitleBlockTemplatesCollection *, PanelOptions = AddAllChild, bool = false);
|
||||
virtual QTreeWidgetItem *updateTemplateItem (QTreeWidgetItem *, const TitleBlockTemplateLocation &, PanelOptions, bool = false);
|
||||
QTreeWidgetItem *updateTemplatesCollectionItem(QTreeWidgetItem *, TitleBlockTemplatesCollection *, PanelOptions = AddAllChild, bool = false) override;
|
||||
QTreeWidgetItem *updateTemplateItem (QTreeWidgetItem *, const TitleBlockTemplateLocation &, PanelOptions, bool = false) override;
|
||||
|
||||
// attributes
|
||||
private:
|
||||
|
@ -31,7 +31,7 @@ class ElementsPanelWidget : public QWidget {
|
||||
// constructors, destructor
|
||||
public:
|
||||
ElementsPanelWidget(QWidget * = nullptr);
|
||||
virtual ~ElementsPanelWidget();
|
||||
~ElementsPanelWidget() override;
|
||||
|
||||
private:
|
||||
ElementsPanelWidget(const ElementsPanelWidget &);
|
||||
@ -86,7 +86,7 @@ class ElementsPanelWidget : public QWidget {
|
||||
void filterEdited(const QString &);
|
||||
|
||||
protected:
|
||||
virtual void keyPressEvent (QKeyEvent *e);
|
||||
void keyPressEvent (QKeyEvent *e) override;
|
||||
|
||||
private:
|
||||
QString previous_filter_;
|
||||
|
@ -33,7 +33,7 @@ class ExportDialog : public QDialog {
|
||||
// constructors, destructor
|
||||
public:
|
||||
ExportDialog(QETProject *, QWidget * = nullptr);
|
||||
virtual ~ExportDialog();
|
||||
~ExportDialog() override;
|
||||
|
||||
private:
|
||||
ExportDialog(const ExportDialog &);
|
||||
|
@ -30,7 +30,7 @@ class ExportPropertiesWidget : public QWidget {
|
||||
public:
|
||||
ExportPropertiesWidget(QWidget * = nullptr);
|
||||
ExportPropertiesWidget(const ExportProperties &, QWidget * = nullptr);
|
||||
virtual ~ExportPropertiesWidget();
|
||||
~ExportPropertiesWidget() override;
|
||||
private:
|
||||
ExportPropertiesWidget(const ExportPropertiesWidget &);
|
||||
|
||||
|
@ -56,7 +56,7 @@ class GenericPanel : public QTreeWidget {
|
||||
// Constructors, destructor
|
||||
public:
|
||||
GenericPanel(QWidget * = nullptr);
|
||||
virtual ~GenericPanel();
|
||||
~GenericPanel() override;
|
||||
|
||||
public:
|
||||
// convenience methods to obtain what an item represents
|
||||
@ -132,7 +132,7 @@ class GenericPanel : public QTreeWidget {
|
||||
template<typename T> T valueForItem(QTreeWidgetItem *) const;
|
||||
void unregisterItem(QTreeWidgetItem *);
|
||||
|
||||
bool event(QEvent *);
|
||||
bool event(QEvent *) override;
|
||||
|
||||
signals:
|
||||
bool firstActivated();
|
||||
|
@ -29,7 +29,7 @@ class NamesListWidget : public QWidget {
|
||||
// constructors, destructor
|
||||
public:
|
||||
NamesListWidget(QWidget * = nullptr);
|
||||
virtual ~NamesListWidget();
|
||||
~NamesListWidget() override;
|
||||
|
||||
private:
|
||||
NamesListWidget(const NamesListWidget &);
|
||||
|
@ -42,7 +42,7 @@ class NewElementWizard : public QWizard
|
||||
// constructors, destructor
|
||||
public:
|
||||
NewElementWizard(QWidget * = nullptr, Qt::WindowFlags = nullptr);
|
||||
virtual ~NewElementWizard();
|
||||
~NewElementWizard() override;
|
||||
|
||||
void preselectedLocation(const ElementsLocation &location);
|
||||
|
||||
@ -66,7 +66,7 @@ class NewElementWizard : public QWizard
|
||||
QWizardPage *buildStep3();
|
||||
bool validStep1();
|
||||
bool validStep2();
|
||||
bool validateCurrentPage();
|
||||
bool validateCurrentPage() override;
|
||||
void createNewElement();
|
||||
};
|
||||
#endif
|
||||
|
@ -41,7 +41,7 @@ class ProjectConfigPage : public ConfigPage {
|
||||
// Constructor, destructor
|
||||
public:
|
||||
ProjectConfigPage(QETProject *, QWidget * = nullptr);
|
||||
virtual ~ProjectConfigPage();
|
||||
~ProjectConfigPage() override;
|
||||
private:
|
||||
ProjectConfigPage(const ProjectConfigPage &);
|
||||
|
||||
@ -49,7 +49,7 @@ class ProjectConfigPage : public ConfigPage {
|
||||
public:
|
||||
virtual QETProject *project() const;
|
||||
virtual QETProject *setProject(QETProject *project, bool = true);
|
||||
virtual void applyConf();
|
||||
void applyConf() override;
|
||||
/**
|
||||
Apply configuration to the project after user input. This method is
|
||||
automatically called when the ConfigDialog is validated, and only if the
|
||||
@ -91,22 +91,22 @@ class ProjectMainConfigPage : public ProjectConfigPage {
|
||||
// Constructor, destructor
|
||||
public:
|
||||
ProjectMainConfigPage(QETProject *, QWidget * = nullptr);
|
||||
virtual ~ProjectMainConfigPage();
|
||||
~ProjectMainConfigPage() override;
|
||||
private:
|
||||
ProjectMainConfigPage(const ProjectMainConfigPage &);
|
||||
|
||||
// methods
|
||||
public:
|
||||
QString title() const;
|
||||
QIcon icon() const;
|
||||
void applyProjectConf();
|
||||
QString title() const override;
|
||||
QIcon icon() const override;
|
||||
void applyProjectConf() override;
|
||||
QString projectTitle() const;
|
||||
|
||||
protected:
|
||||
void initWidgets();
|
||||
void initLayout();
|
||||
void readValuesFromProject();
|
||||
void adjustReadOnly();
|
||||
void initWidgets() override;
|
||||
void initLayout() override;
|
||||
void readValuesFromProject() override;
|
||||
void adjustReadOnly() override;
|
||||
|
||||
// attributes
|
||||
protected:
|
||||
@ -124,15 +124,15 @@ class ProjectAutoNumConfigPage : public ProjectConfigPage {
|
||||
public:
|
||||
ProjectAutoNumConfigPage (QETProject *project, QWidget *parent = nullptr);
|
||||
|
||||
virtual QString title() const;
|
||||
virtual QIcon icon() const;
|
||||
virtual void applyProjectConf();
|
||||
QString title() const override;
|
||||
QIcon icon() const override;
|
||||
void applyProjectConf() override;
|
||||
virtual void changeToTab(int);
|
||||
protected:
|
||||
virtual void initWidgets();
|
||||
virtual void initLayout() {}
|
||||
virtual void readValuesFromProject();
|
||||
virtual void adjustReadOnly();
|
||||
void initWidgets() override;
|
||||
void initLayout() override {}
|
||||
void readValuesFromProject() override;
|
||||
void adjustReadOnly() override;
|
||||
private:
|
||||
void buildConnections();
|
||||
private slots:
|
||||
|
@ -42,7 +42,7 @@ class ProjectView : public QWidget
|
||||
// constructors, destructor
|
||||
public:
|
||||
ProjectView(QETProject *, QWidget * = nullptr);
|
||||
virtual ~ProjectView();
|
||||
~ProjectView() override;
|
||||
private:
|
||||
ProjectView(const ProjectView &);
|
||||
|
||||
@ -52,7 +52,7 @@ class ProjectView : public QWidget
|
||||
void setProject(QETProject *);
|
||||
QList<DiagramView *> diagram_views() const;
|
||||
DiagramView *currentDiagram() const;
|
||||
void closeEvent(QCloseEvent *);
|
||||
void closeEvent(QCloseEvent *) override;
|
||||
void changeTabUp();
|
||||
void changeTabDown();
|
||||
void changeFirstTab();
|
||||
|
@ -40,10 +40,10 @@ class XRefProperties : public PropertiesInterface
|
||||
Label
|
||||
};
|
||||
|
||||
virtual void toSettings (QSettings &settings, const QString = QString()) const;
|
||||
virtual void fromSettings (const QSettings &settings, const QString = QString());
|
||||
virtual void toXml (QDomElement &xml_element) const;
|
||||
virtual void fromXml (const QDomElement &xml_element);
|
||||
void toSettings (QSettings &settings, const QString = QString()) const override;
|
||||
void fromSettings (const QSettings &settings, const QString = QString()) override;
|
||||
void toXml (QDomElement &xml_element) const override;
|
||||
void fromXml (const QDomElement &xml_element) override;
|
||||
|
||||
static QHash<QString, XRefProperties> defaultProperties();
|
||||
|
||||
|
@ -55,7 +55,7 @@ class QETApp : public QETSingleApplication {
|
||||
// constructors, destructor
|
||||
public:
|
||||
QETApp(int &, char **);
|
||||
virtual ~QETApp();
|
||||
~QETApp() override;
|
||||
|
||||
private:
|
||||
QETApp(const QETApp &);
|
||||
|
@ -32,7 +32,7 @@ class QETArguments : public QObject {
|
||||
QETArguments(const QList<QString> &, QObject * = nullptr);
|
||||
QETArguments(const QETArguments &);
|
||||
QETArguments &operator=(const QETArguments &);
|
||||
virtual ~QETArguments();
|
||||
~QETArguments() override;
|
||||
|
||||
// methods
|
||||
public:
|
||||
|
@ -44,7 +44,7 @@ class QETDiagramEditor : public QETMainWindow {
|
||||
// constructors, destructor
|
||||
public:
|
||||
QETDiagramEditor(const QStringList & = QStringList(), QWidget * = nullptr);
|
||||
virtual ~QETDiagramEditor();
|
||||
~QETDiagramEditor() override;
|
||||
|
||||
private:
|
||||
QETDiagramEditor(const QETDiagramEditor &);
|
||||
@ -61,7 +61,7 @@ class QETDiagramEditor : public QETMainWindow {
|
||||
|
||||
// methods
|
||||
public:
|
||||
void closeEvent (QCloseEvent *);
|
||||
void closeEvent (QCloseEvent *) override;
|
||||
QList<ProjectView *> openedProjects () const;
|
||||
void addProjectView (ProjectView *);
|
||||
bool openAndAddProject (const QString &, bool = true, bool = true);
|
||||
@ -72,7 +72,7 @@ class QETDiagramEditor : public QETMainWindow {
|
||||
bool drawGrid() const;
|
||||
|
||||
protected:
|
||||
virtual bool event(QEvent *);
|
||||
bool event(QEvent *) override;
|
||||
|
||||
private:
|
||||
bool addProject(QETProject *, bool = true);
|
||||
|
@ -34,7 +34,7 @@ class CommentItem : public QGraphicsObject
|
||||
public:
|
||||
explicit CommentItem(Element *elmt);
|
||||
|
||||
virtual QRectF boundingRect() const;
|
||||
QRectF boundingRect() const override;
|
||||
|
||||
signals:
|
||||
|
||||
@ -43,8 +43,8 @@ class CommentItem : public QGraphicsObject
|
||||
void updateLabel();
|
||||
|
||||
protected:
|
||||
virtual void paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
|
||||
virtual void mouseDoubleClickEvent (QGraphicsSceneMouseEvent * event );
|
||||
void paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override;
|
||||
void mouseDoubleClickEvent (QGraphicsSceneMouseEvent * event ) override;
|
||||
virtual bool setTextParent ();
|
||||
|
||||
private:
|
||||
|
@ -53,7 +53,7 @@ class Conductor : public QObject, public QGraphicsPathItem
|
||||
|
||||
public:
|
||||
Conductor(Terminal *, Terminal *);
|
||||
virtual ~Conductor();
|
||||
~Conductor() override;
|
||||
|
||||
bool isValid() const;
|
||||
|
||||
@ -72,7 +72,7 @@ class Conductor : public QObject, public QGraphicsPathItem
|
||||
* Enable the use of qgraphicsitem_cast to safely cast a QGraphicsItem into a conductor.
|
||||
* @return the QGraphicsItem type
|
||||
*/
|
||||
virtual int type() const { return Type; }
|
||||
int type() const override { return Type; }
|
||||
Diagram *diagram() const;
|
||||
ConductorTextItem *textItem() const;
|
||||
void updatePath(const QRectF & = QRectF());
|
||||
@ -82,9 +82,9 @@ class Conductor : public QObject, public QGraphicsPathItem
|
||||
void updatePathAnimate(const int = 1) {updatePath();}
|
||||
int fakePath() {return 1;}
|
||||
|
||||
void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *);
|
||||
QRectF boundingRect() const;
|
||||
virtual QPainterPath shape() const;
|
||||
void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *) override;
|
||||
QRectF boundingRect() const override;
|
||||
QPainterPath shape() const override;
|
||||
virtual QPainterPath nearShape() const;
|
||||
qreal length() const;
|
||||
ConductorSegment *middleSegment();
|
||||
@ -132,13 +132,13 @@ class Conductor : public QObject, public QGraphicsPathItem
|
||||
void displayedTextChanged();
|
||||
|
||||
protected:
|
||||
virtual void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event);
|
||||
virtual void mousePressEvent(QGraphicsSceneMouseEvent *event);
|
||||
virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
|
||||
virtual void hoverEnterEvent(QGraphicsSceneHoverEvent *event);
|
||||
virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent *event);
|
||||
virtual QVariant itemChange(GraphicsItemChange, const QVariant &);
|
||||
virtual bool sceneEventFilter(QGraphicsItem *watched, QEvent *event);
|
||||
void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event) override;
|
||||
void mousePressEvent(QGraphicsSceneMouseEvent *event) override;
|
||||
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) override;
|
||||
void hoverEnterEvent(QGraphicsSceneHoverEvent *event) override;
|
||||
void hoverLeaveEvent(QGraphicsSceneHoverEvent *event) override;
|
||||
QVariant itemChange(GraphicsItemChange, const QVariant &) override;
|
||||
bool sceneEventFilter(QGraphicsItem *watched, QEvent *event) override;
|
||||
|
||||
private:
|
||||
void adjusteHandlerPos();
|
||||
|
@ -34,16 +34,16 @@ class ConductorTextItem : public DiagramTextItem
|
||||
public:
|
||||
ConductorTextItem(Conductor * = nullptr);
|
||||
ConductorTextItem(const QString &, Conductor * = nullptr);
|
||||
virtual ~ConductorTextItem();
|
||||
~ConductorTextItem() override;
|
||||
private:
|
||||
ConductorTextItem(const ConductorTextItem &);
|
||||
|
||||
public:
|
||||
enum { Type = UserType + 1006 };
|
||||
Conductor *parentConductor() const;
|
||||
virtual void fromXml(const QDomElement &);
|
||||
void fromXml(const QDomElement &) override;
|
||||
virtual void toXml (QDomElement &xml) const;
|
||||
virtual int type() const { return Type; }
|
||||
int type() const override { return Type; }
|
||||
virtual bool wasMovedByUser() const;
|
||||
virtual bool wasRotateByUser() const;
|
||||
virtual void forceMovedByUser(bool);
|
||||
@ -52,12 +52,12 @@ class ConductorTextItem : public DiagramTextItem
|
||||
virtual void setPos(qreal x, qreal y);
|
||||
|
||||
protected:
|
||||
virtual void mousePressEvent (QGraphicsSceneMouseEvent *event);
|
||||
virtual void mouseMoveEvent (QGraphicsSceneMouseEvent *event);
|
||||
virtual void mouseReleaseEvent (QGraphicsSceneMouseEvent *event);
|
||||
virtual void hoverEnterEvent(QGraphicsSceneHoverEvent *);
|
||||
virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent *);
|
||||
virtual void hoverMoveEvent(QGraphicsSceneHoverEvent *);
|
||||
void mousePressEvent (QGraphicsSceneMouseEvent *event) override;
|
||||
void mouseMoveEvent (QGraphicsSceneMouseEvent *event) override;
|
||||
void mouseReleaseEvent (QGraphicsSceneMouseEvent *event) override;
|
||||
void hoverEnterEvent(QGraphicsSceneHoverEvent *) override;
|
||||
void hoverLeaveEvent(QGraphicsSceneHoverEvent *) override;
|
||||
void hoverMoveEvent(QGraphicsSceneHoverEvent *) override;
|
||||
|
||||
// attributes
|
||||
private:
|
||||
|
@ -42,10 +42,10 @@ class CrossRefItem : public QGraphicsObject
|
||||
//Methods
|
||||
public:
|
||||
explicit CrossRefItem(Element *elmt);
|
||||
~CrossRefItem();
|
||||
~CrossRefItem() override;
|
||||
|
||||
enum { Type = UserType + 1009 };
|
||||
virtual int type() const { return Type; }
|
||||
int type() const override { return Type; }
|
||||
|
||||
enum CONTACTS {
|
||||
NO = 1,
|
||||
@ -58,8 +58,8 @@ class CrossRefItem : public QGraphicsObject
|
||||
Delay = 48
|
||||
};
|
||||
|
||||
QRectF boundingRect () const;
|
||||
virtual QPainterPath shape () const;
|
||||
QRectF boundingRect () const override;
|
||||
QPainterPath shape () const override;
|
||||
QString elementPositionText (const Element *elmt, const bool &add_prefix = false) const;
|
||||
|
||||
public slots:
|
||||
@ -68,11 +68,11 @@ class CrossRefItem : public QGraphicsObject
|
||||
void autoPos ();
|
||||
|
||||
protected:
|
||||
virtual void paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
|
||||
virtual void mouseDoubleClickEvent (QGraphicsSceneMouseEvent * event );
|
||||
virtual void hoverEnterEvent(QGraphicsSceneHoverEvent *event);
|
||||
virtual void hoverMoveEvent(QGraphicsSceneHoverEvent *event);
|
||||
virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent *event);
|
||||
void paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override;
|
||||
void mouseDoubleClickEvent (QGraphicsSceneMouseEvent * event ) override;
|
||||
void hoverEnterEvent(QGraphicsSceneHoverEvent *event) override;
|
||||
void hoverMoveEvent(QGraphicsSceneHoverEvent *event) override;
|
||||
void hoverLeaveEvent(QGraphicsSceneHoverEvent *event) override;
|
||||
|
||||
private:
|
||||
void buildHeaderContact ();
|
||||
|
@ -38,7 +38,7 @@ class CustomElement : public FixedElement
|
||||
public:
|
||||
CustomElement (const ElementsLocation &, QGraphicsItem * = nullptr, int * = nullptr);
|
||||
|
||||
virtual ~CustomElement();
|
||||
~CustomElement() override;
|
||||
|
||||
private:
|
||||
CustomElement(const CustomElement &);
|
||||
@ -62,20 +62,20 @@ class CustomElement : public FixedElement
|
||||
|
||||
// methods
|
||||
public:
|
||||
virtual QList<Terminal *> terminals() const;
|
||||
virtual QList<Conductor *> conductors() const;
|
||||
virtual QList<ElementTextItem *> texts() const;
|
||||
virtual QList<QLineF *> lines() const;
|
||||
virtual QList<QRectF *> rectangles() const;
|
||||
virtual QList<QRectF *> circles() const;
|
||||
virtual QList<QVector<QPointF> *> polygons() const;
|
||||
virtual QList<QVector<qreal> *> arcs() const;
|
||||
virtual int terminalsCount() const;
|
||||
virtual void paint(QPainter *, const QStyleOptionGraphicsItem *);
|
||||
QString typeId() const;
|
||||
QList<Terminal *> terminals() const override;
|
||||
QList<Conductor *> conductors() const override;
|
||||
QList<ElementTextItem *> texts() const override;
|
||||
QList<QLineF *> lines() const override;
|
||||
QList<QRectF *> rectangles() const override;
|
||||
QList<QRectF *> circles() const override;
|
||||
QList<QVector<QPointF> *> polygons() const override;
|
||||
QList<QVector<qreal> *> arcs() const override;
|
||||
int terminalsCount() const override;
|
||||
void paint(QPainter *, const QStyleOptionGraphicsItem *) override;
|
||||
QString typeId() const override;
|
||||
ElementsLocation location() const;
|
||||
QString name() const;
|
||||
ElementTextItem* taggedText(const QString &tagg) const;
|
||||
QString name() const override;
|
||||
ElementTextItem* taggedText(const QString &tagg) const override;
|
||||
|
||||
protected:
|
||||
virtual bool buildFromXml(const QDomElement &, int * = nullptr);
|
||||
|
@ -35,7 +35,7 @@ class DiagramImageItem : public QetGraphicsItem {
|
||||
public:
|
||||
DiagramImageItem(QetGraphicsItem * = nullptr);
|
||||
DiagramImageItem(const QPixmap &pixmap, QetGraphicsItem * = nullptr);
|
||||
virtual ~DiagramImageItem();
|
||||
~DiagramImageItem() override;
|
||||
|
||||
// attributes
|
||||
public:
|
||||
@ -48,17 +48,17 @@ class DiagramImageItem : public QetGraphicsItem {
|
||||
DiagramImageItem
|
||||
@return the QGraphicsItem type
|
||||
*/
|
||||
virtual int type() const { return Type; }
|
||||
int type() const override { return Type; }
|
||||
|
||||
virtual bool fromXml(const QDomElement &);
|
||||
virtual QDomElement toXml(QDomDocument &) const;
|
||||
virtual void editProperty();
|
||||
void editProperty() override;
|
||||
void setPixmap(const QPixmap &pixmap);
|
||||
virtual QRectF boundingRect() const;
|
||||
virtual QString name() const;
|
||||
QRectF boundingRect() const override;
|
||||
QString name() const override;
|
||||
|
||||
protected:
|
||||
virtual void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *);
|
||||
void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *) override;
|
||||
|
||||
protected:
|
||||
QPixmap pixmap_;
|
||||
|
@ -49,7 +49,7 @@ class DiagramTextItem : public QGraphicsTextItem
|
||||
|
||||
public:
|
||||
enum { Type = UserType + 1004 };
|
||||
virtual int type() const override { return Type; }
|
||||
int type() const override { return Type; }
|
||||
|
||||
Diagram *diagram() const;
|
||||
virtual void fromXml(const QDomElement &) = 0;
|
||||
@ -73,18 +73,18 @@ class DiagramTextItem : public QGraphicsTextItem
|
||||
void setNoEditable(bool e = true) {m_no_editable = e;}
|
||||
|
||||
protected:
|
||||
virtual void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *) override;
|
||||
virtual void focusInEvent(QFocusEvent *) override;
|
||||
virtual void focusOutEvent(QFocusEvent *) override;
|
||||
void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *) override;
|
||||
void focusInEvent(QFocusEvent *) override;
|
||||
void focusOutEvent(QFocusEvent *) override;
|
||||
|
||||
virtual void mouseDoubleClickEvent (QGraphicsSceneMouseEvent *event) override;
|
||||
virtual void mousePressEvent (QGraphicsSceneMouseEvent *event) override;
|
||||
virtual void mouseMoveEvent (QGraphicsSceneMouseEvent *event) override;
|
||||
virtual void mouseReleaseEvent (QGraphicsSceneMouseEvent *event) override;
|
||||
void mouseDoubleClickEvent (QGraphicsSceneMouseEvent *event) override;
|
||||
void mousePressEvent (QGraphicsSceneMouseEvent *event) override;
|
||||
void mouseMoveEvent (QGraphicsSceneMouseEvent *event) override;
|
||||
void mouseReleaseEvent (QGraphicsSceneMouseEvent *event) override;
|
||||
|
||||
virtual void hoverEnterEvent(QGraphicsSceneHoverEvent *) override;
|
||||
virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent *) override;
|
||||
virtual void hoverMoveEvent(QGraphicsSceneHoverEvent *) override;
|
||||
void hoverEnterEvent(QGraphicsSceneHoverEvent *) override;
|
||||
void hoverLeaveEvent(QGraphicsSceneHoverEvent *) override;
|
||||
void hoverMoveEvent(QGraphicsSceneHoverEvent *) override;
|
||||
|
||||
virtual void applyRotation(const qreal &);
|
||||
|
||||
|
@ -44,7 +44,7 @@ class DynamicElementTextItem : public DiagramTextItem
|
||||
ElementInfo
|
||||
};
|
||||
enum {Type = UserType + 1010};
|
||||
virtual int type() const override {return Type;}
|
||||
int type() const override {return Type;}
|
||||
|
||||
signals:
|
||||
void taggChanged(QString tagg);
|
||||
@ -53,13 +53,13 @@ class DynamicElementTextItem : public DiagramTextItem
|
||||
|
||||
public:
|
||||
DynamicElementTextItem(Element *parent_element);
|
||||
virtual ~DynamicElementTextItem() override;
|
||||
~DynamicElementTextItem() override;
|
||||
private:
|
||||
DynamicElementTextItem(const DynamicElementTextItem &);
|
||||
|
||||
public:
|
||||
virtual QDomElement toXml(QDomDocument &dom_doc) const override;
|
||||
virtual void fromXml(const QDomElement &dom_elmt) override;
|
||||
QDomElement toXml(QDomDocument &dom_doc) const override;
|
||||
void fromXml(const QDomElement &dom_elmt) override;
|
||||
|
||||
Element *ParentElement() const;
|
||||
|
||||
@ -72,8 +72,8 @@ class DynamicElementTextItem : public DiagramTextItem
|
||||
static QString xmlTaggName() {return QString("dynamic_elmt_text");}
|
||||
|
||||
protected:
|
||||
virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *event) override;
|
||||
virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) override;
|
||||
void mouseMoveEvent(QGraphicsSceneMouseEvent *event) override;
|
||||
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) override;
|
||||
|
||||
private:
|
||||
Element *m_parent_element = nullptr;
|
||||
|
@ -42,7 +42,7 @@ class Element : public QetGraphicsItem
|
||||
// constructors, destructor
|
||||
public:
|
||||
Element(QGraphicsItem * = nullptr);
|
||||
virtual ~Element();
|
||||
~Element() override;
|
||||
private:
|
||||
Element(const Element &);
|
||||
|
||||
@ -53,7 +53,7 @@ class Element : public QetGraphicsItem
|
||||
* @return the QGraphicsItem type
|
||||
*/
|
||||
enum { Type = UserType + 1000 };
|
||||
virtual int type() const { return Type; }
|
||||
int type() const override { return Type; }
|
||||
|
||||
/**
|
||||
* @brief The kind enum
|
||||
@ -164,13 +164,13 @@ class Element : public QetGraphicsItem
|
||||
/// @return This element type ID
|
||||
virtual QString typeId() const = 0;
|
||||
/// @return the human name for this element
|
||||
virtual QString name() const = 0;
|
||||
QString name() const override = 0;
|
||||
|
||||
virtual bool isHighlighted() const;
|
||||
virtual void setHighlighted(bool);
|
||||
void displayHelpLine(bool b = true);
|
||||
void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *);
|
||||
QRectF boundingRect() const;
|
||||
void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *) override;
|
||||
QRectF boundingRect() const override;
|
||||
QSize setSize(int, int);
|
||||
QSize size() const;
|
||||
QPixmap pixmap();
|
||||
@ -183,8 +183,8 @@ class Element : public QetGraphicsItem
|
||||
void select();
|
||||
void deselect();
|
||||
|
||||
virtual void rotateBy(const qreal &);
|
||||
virtual void editProperty();
|
||||
void rotateBy(const qreal &) override;
|
||||
void editProperty() override;
|
||||
|
||||
// methods related to XML import/export
|
||||
static bool valideXml(QDomElement &);
|
||||
@ -210,10 +210,10 @@ class Element : public QetGraphicsItem
|
||||
void etiToElementLabels(ElementTextItem*);
|
||||
|
||||
protected:
|
||||
virtual void mouseMoveEvent ( QGraphicsSceneMouseEvent *event );
|
||||
virtual void mouseReleaseEvent ( QGraphicsSceneMouseEvent *event );
|
||||
virtual void hoverEnterEvent ( QGraphicsSceneHoverEvent * );
|
||||
virtual void hoverLeaveEvent ( QGraphicsSceneHoverEvent * );
|
||||
void mouseMoveEvent ( QGraphicsSceneMouseEvent *event ) override;
|
||||
void mouseReleaseEvent ( QGraphicsSceneMouseEvent *event ) override;
|
||||
void hoverEnterEvent ( QGraphicsSceneHoverEvent * ) override;
|
||||
void hoverLeaveEvent ( QGraphicsSceneHoverEvent * ) override;
|
||||
|
||||
private:
|
||||
bool m_mouse_over;
|
||||
|
@ -33,12 +33,12 @@ class ElementTextItem : public DiagramTextItem {
|
||||
public:
|
||||
ElementTextItem(Element * = nullptr);
|
||||
ElementTextItem(const QString &, Element * = nullptr);
|
||||
virtual ~ElementTextItem();
|
||||
~ElementTextItem() override;
|
||||
|
||||
// attributes
|
||||
public:
|
||||
enum { Type = UserType + 1003 };
|
||||
virtual int type () const { return Type; }
|
||||
int type () const override { return Type; }
|
||||
|
||||
private:
|
||||
Element *parent_element_;
|
||||
@ -50,8 +50,8 @@ class ElementTextItem : public DiagramTextItem {
|
||||
// methods
|
||||
public:
|
||||
Element *parentElement () const;
|
||||
void fromXml ( const QDomElement & );
|
||||
QDomElement toXml ( QDomDocument & ) const;
|
||||
void fromXml ( const QDomElement & ) override;
|
||||
QDomElement toXml ( QDomDocument & ) const override;
|
||||
void setOriginalPos ( const QPointF & );
|
||||
QPointF originalPos () const;
|
||||
void setOriginalRotationAngle ( const qreal & );
|
||||
@ -66,11 +66,11 @@ class ElementTextItem : public DiagramTextItem {
|
||||
void adjustItemPosition(int = 0);
|
||||
|
||||
protected:
|
||||
virtual void mouseDoubleClickEvent ( QGraphicsSceneMouseEvent *event );
|
||||
virtual void mouseMoveEvent ( QGraphicsSceneMouseEvent *event );
|
||||
virtual void mouseReleaseEvent ( QGraphicsSceneMouseEvent *event );
|
||||
virtual void hoverEnterEvent ( QGraphicsSceneHoverEvent *event );
|
||||
virtual void hoverLeaveEvent ( QGraphicsSceneHoverEvent *event );
|
||||
void mouseDoubleClickEvent ( QGraphicsSceneMouseEvent *event ) override;
|
||||
void mouseMoveEvent ( QGraphicsSceneMouseEvent *event ) override;
|
||||
void mouseReleaseEvent ( QGraphicsSceneMouseEvent *event ) override;
|
||||
void hoverEnterEvent ( QGraphicsSceneHoverEvent *event ) override;
|
||||
void hoverLeaveEvent ( QGraphicsSceneHoverEvent *event ) override;
|
||||
|
||||
private:
|
||||
void build ();
|
||||
|
@ -30,15 +30,15 @@ class FixedElement : public Element {
|
||||
// constructors, destructor
|
||||
public:
|
||||
FixedElement(QGraphicsItem * = nullptr);
|
||||
virtual ~FixedElement();
|
||||
~FixedElement() override;
|
||||
|
||||
// methods
|
||||
public:
|
||||
int minTerminalsCount() const;
|
||||
int maxTerminalsCount() const;
|
||||
virtual int terminalsCount() const = 0;
|
||||
virtual void paint(QPainter *, const QStyleOptionGraphicsItem *) = 0;
|
||||
virtual QString typeId() const = 0;
|
||||
virtual QString name() const = 0;
|
||||
int minTerminalsCount() const override;
|
||||
int maxTerminalsCount() const override;
|
||||
int terminalsCount() const override = 0;
|
||||
void paint(QPainter *, const QStyleOptionGraphicsItem *) override = 0;
|
||||
QString typeId() const override = 0;
|
||||
QString name() const override = 0;
|
||||
};
|
||||
#endif
|
||||
|
@ -37,12 +37,12 @@ class GhostElement : public CustomElement {
|
||||
// constructor, destructor
|
||||
public:
|
||||
GhostElement(const ElementsLocation &, QGraphicsItem * = nullptr);
|
||||
virtual ~GhostElement();
|
||||
~GhostElement() override;
|
||||
|
||||
// methods
|
||||
public:
|
||||
virtual bool fromXml(QDomElement &, QHash<int, Terminal *> &, bool = false);
|
||||
virtual kind linkType() const {return Simple;}
|
||||
bool fromXml(QDomElement &, QHash<int, Terminal *> &, bool = false) override;
|
||||
kind linkType() const override {return Simple;}
|
||||
|
||||
protected:
|
||||
QRectF minimalBoundingRect() const;
|
||||
|
@ -30,7 +30,7 @@ class IndependentTextItem : public DiagramTextItem {
|
||||
public:
|
||||
IndependentTextItem();
|
||||
IndependentTextItem(const QString &);
|
||||
virtual ~IndependentTextItem();
|
||||
~IndependentTextItem() override;
|
||||
|
||||
// attributes
|
||||
public:
|
||||
@ -43,9 +43,9 @@ class IndependentTextItem : public DiagramTextItem {
|
||||
IndependentTextItem.
|
||||
@return le type de QGraphicsItem
|
||||
*/
|
||||
virtual int type() const { return Type; }
|
||||
virtual void fromXml(const QDomElement &);
|
||||
virtual QDomElement toXml(QDomDocument &) const;
|
||||
int type() const override { return Type; }
|
||||
void fromXml(const QDomElement &) override;
|
||||
QDomElement toXml(QDomDocument &) const override;
|
||||
|
||||
private:
|
||||
QPointF mouse_to_origin_movement_;
|
||||
|
@ -34,12 +34,12 @@ class MasterElement : public CustomElement
|
||||
|
||||
public:
|
||||
explicit MasterElement(const ElementsLocation &, QGraphicsItem * = nullptr, int * = nullptr);
|
||||
~MasterElement();
|
||||
~MasterElement() override;
|
||||
|
||||
virtual void linkToElement (Element *elmt);
|
||||
virtual void unlinkAllElements ();
|
||||
virtual void unlinkElement (Element *elmt);
|
||||
virtual void initLink (QETProject *project);
|
||||
void linkToElement (Element *elmt) override;
|
||||
void unlinkAllElements () override;
|
||||
void unlinkElement (Element *elmt) override;
|
||||
void initLink (QETProject *project) override;
|
||||
|
||||
public slots:
|
||||
void updateLabel(DiagramContext old_info, DiagramContext new_info);
|
||||
|
@ -29,7 +29,7 @@ class QetGraphicsItem : public QGraphicsObject
|
||||
public:
|
||||
//constructor destructor
|
||||
QetGraphicsItem(QGraphicsItem *parent = nullptr);
|
||||
virtual ~QetGraphicsItem() = 0;
|
||||
~QetGraphicsItem() override = 0;
|
||||
|
||||
//public methode
|
||||
Diagram *diagram () const;
|
||||
@ -46,10 +46,10 @@ class QetGraphicsItem : public QGraphicsObject
|
||||
|
||||
//protected method
|
||||
protected:
|
||||
virtual void mousePressEvent(QGraphicsSceneMouseEvent *e);
|
||||
virtual void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *e);
|
||||
virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *e);
|
||||
virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *e);
|
||||
void mousePressEvent(QGraphicsSceneMouseEvent *e) override;
|
||||
void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *e) override;
|
||||
void mouseMoveEvent(QGraphicsSceneMouseEvent *e) override;
|
||||
void mouseReleaseEvent(QGraphicsSceneMouseEvent *e) override;
|
||||
|
||||
protected:
|
||||
bool is_movable_;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user