mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-30 07:40:51 +01:00
merge
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2006-2020 The QElectroTech Team
|
||||
Copyright 2006-2021 The QElectroTech Team
|
||||
This file is part of QElectroTech.
|
||||
|
||||
QElectroTech is free software: you can redistribute it and/or modify
|
||||
@@ -18,19 +18,22 @@
|
||||
#ifndef PART_TERMINAL_H
|
||||
#define PART_TERMINAL_H
|
||||
|
||||
#include "../../properties/terminaldata.h"
|
||||
#include "customelementgraphicpart.h"
|
||||
#include "QUuid"
|
||||
#include "terminaldata.h"
|
||||
|
||||
#include <QUuid>
|
||||
|
||||
/**
|
||||
This class represents a terminal which may be used to compose the drawing of
|
||||
an electrical element within the element editor.
|
||||
*/
|
||||
class PartTerminal : public CustomElementGraphicPart {
|
||||
class PartTerminal : public CustomElementGraphicPart
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
Q_PROPERTY(Qet::Orientation orientation READ orientation WRITE setOrientation)
|
||||
Q_PROPERTY(QString name READ name WRITE setName)
|
||||
Q_PROPERTY(TerminalData::Type terminal_type READ terminalType WRITE setTerminalType)
|
||||
|
||||
public:
|
||||
// constructors, destructor
|
||||
@@ -42,6 +45,7 @@ class PartTerminal : public CustomElementGraphicPart {
|
||||
signals:
|
||||
void orientationChanged();
|
||||
void nameChanged();
|
||||
void terminalTypeChanged();
|
||||
|
||||
// methods
|
||||
public:
|
||||
@@ -51,7 +55,6 @@ class PartTerminal : public CustomElementGraphicPart {
|
||||
@return the QGraphicsItem type
|
||||
*/
|
||||
int type() const override { return Type; }
|
||||
QString name() const override { return d -> m_name; }
|
||||
QString xmlName() const override { return(QString("terminal")); }
|
||||
bool fromXml(const QDomElement &) override;
|
||||
QDomElement toXml(QDomDocument &) const override;
|
||||
@@ -74,7 +77,12 @@ class PartTerminal : public CustomElementGraphicPart {
|
||||
Qet::Orientation orientation() const {return d -> m_orientation;}
|
||||
void setOrientation(Qet::Orientation ori);
|
||||
|
||||
QString name() const override { return d -> m_name; }
|
||||
void setName(QString& name);
|
||||
|
||||
TerminalData::Type terminalType() const {return d->m_type;}
|
||||
void setTerminalType(TerminalData::Type type);
|
||||
|
||||
void setNewUuid();
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user