QT6: QStyleOptionGraphicsItem

This commit is contained in:
Simon De Backer
2020-10-03 15:48:40 +02:00
parent 2e2a652343
commit c1e93fc442
9 changed files with 261 additions and 192 deletions

View File

@@ -1,17 +1,17 @@
/*
Copyright 2006-2020 The QElectroTech Team
This file is part of QElectroTech.
QElectroTech is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
QElectroTech is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -55,7 +55,10 @@ class PartTerminal : public CustomElementGraphicPart {
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;
void paint(
QPainter *painter,
const QStyleOptionGraphicsItem *,
QWidget *) override;
QPainterPath shape() const override;
QPainterPath shadowShape() const override {return shape();}
@@ -70,7 +73,7 @@ class PartTerminal : public CustomElementGraphicPart {
void setName(QString& name);
void setNewUuid();
private:
void updateSecondPoint();
TerminalData* d; // pointer to the terminal data