mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-01-08 06:42:34 +01:00
Modernize-use-nullptr refactors code
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5008 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -93,8 +93,8 @@ bool ArcEditor::setPart(CustomElementPart *new_part)
|
||||
disconnect(part, &PartArc::spanAngleChanged, this, &ArcEditor::updateForm);
|
||||
disconnect(part, &PartArc::startAngleChanged, this, &ArcEditor::updateForm);
|
||||
}
|
||||
part = 0;
|
||||
style_ -> setPart(0);
|
||||
part = nullptr;
|
||||
style_ -> setPart(nullptr);
|
||||
return(true);
|
||||
}
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ class ArcEditor : public ElementItemEditor
|
||||
|
||||
// constructors, destructor
|
||||
public:
|
||||
ArcEditor(QETElementEditor *, PartArc * = 0, QWidget * = 0);
|
||||
ArcEditor(QETElementEditor *, PartArc * = nullptr, QWidget * = nullptr);
|
||||
virtual ~ArcEditor();
|
||||
private:
|
||||
ArcEditor(const ArcEditor &);
|
||||
|
||||
@@ -86,7 +86,7 @@ DeletePartsCommand::DeletePartsCommand(
|
||||
const QList<QGraphicsItem *> parts,
|
||||
QUndoCommand *parent
|
||||
) :
|
||||
ElementEditionCommand(QObject::tr("suppression", "undo caption"), scene, 0, parent),
|
||||
ElementEditionCommand(QObject::tr("suppression", "undo caption"), scene, nullptr, parent),
|
||||
deleted_parts(parts)
|
||||
{
|
||||
foreach(QGraphicsItem *qgi, deleted_parts) {
|
||||
@@ -131,7 +131,7 @@ PastePartsCommand::PastePartsCommand(
|
||||
const ElementContent &c,
|
||||
QUndoCommand *parent
|
||||
) :
|
||||
ElementEditionCommand(view ? view -> scene() : 0, view, parent),
|
||||
ElementEditionCommand(view ? view -> scene() : nullptr, view, parent),
|
||||
content_(c),
|
||||
uses_offset(false),
|
||||
first_redo(true)
|
||||
@@ -227,7 +227,7 @@ MovePartsCommand::MovePartsCommand(
|
||||
const QList<QGraphicsItem *> parts,
|
||||
QUndoCommand *parent
|
||||
) :
|
||||
ElementEditionCommand(QObject::tr("déplacement", "undo caption"), scene, 0, parent),
|
||||
ElementEditionCommand(QObject::tr("déplacement", "undo caption"), scene, nullptr, parent),
|
||||
movement(m),
|
||||
first_redo(true)
|
||||
{
|
||||
@@ -267,7 +267,7 @@ AddPartCommand::AddPartCommand(
|
||||
QGraphicsItem *p,
|
||||
QUndoCommand *parent
|
||||
) :
|
||||
ElementEditionCommand(QString(QObject::tr("ajout %1", "undo caption")).arg(name), scene, 0, parent),
|
||||
ElementEditionCommand(QString(QObject::tr("ajout %1", "undo caption")).arg(name), scene, nullptr, parent),
|
||||
part(p),
|
||||
first_redo(true)
|
||||
{
|
||||
@@ -315,7 +315,7 @@ ChangeNamesCommand::ChangeNamesCommand(
|
||||
const NamesList &after,
|
||||
QUndoCommand *parent
|
||||
) :
|
||||
ElementEditionCommand(QObject::tr("modification noms", "undo caption"), element_scene, 0, parent),
|
||||
ElementEditionCommand(QObject::tr("modification noms", "undo caption"), element_scene, nullptr, parent),
|
||||
names_before(before),
|
||||
names_after(after)
|
||||
{
|
||||
@@ -346,7 +346,7 @@ ChangeZValueCommand::ChangeZValueCommand(
|
||||
ChangeZValueCommand::Option o,
|
||||
QUndoCommand *parent
|
||||
) :
|
||||
ElementEditionCommand(elmt, 0, parent),
|
||||
ElementEditionCommand(elmt, nullptr, parent),
|
||||
option(o)
|
||||
{
|
||||
// retrieve all primitives but terminals
|
||||
@@ -466,7 +466,7 @@ void ChangeZValueCommand::applySendBackward(const QList<QGraphicsItem *> &items_
|
||||
@param parent QUndoCommand parent
|
||||
*/
|
||||
ChangeInformationsCommand::ChangeInformationsCommand(ElementScene *elmt, const QString &old_infos, const QString &new_infos, QUndoCommand *parent) :
|
||||
ElementEditionCommand(QObject::tr("modification informations complementaires", "undo caption"), elmt, 0, parent),
|
||||
ElementEditionCommand(QObject::tr("modification informations complementaires", "undo caption"), elmt, nullptr, parent),
|
||||
old_informations_(old_infos),
|
||||
new_informations_(new_infos)
|
||||
{
|
||||
@@ -492,7 +492,7 @@ void ChangeInformationsCommand::redo() {
|
||||
@param parent Parent QUndoCommand
|
||||
*/
|
||||
ScalePartsCommand::ScalePartsCommand(ElementScene *scene, QUndoCommand * parent) :
|
||||
ElementEditionCommand(scene, 0, parent),
|
||||
ElementEditionCommand(scene, nullptr, parent),
|
||||
first_redo(true)
|
||||
{}
|
||||
|
||||
@@ -594,7 +594,7 @@ void ScalePartsCommand::adjustText() {
|
||||
* @param parent: parent undo
|
||||
*/
|
||||
ChangePropertiesCommand::ChangePropertiesCommand(ElementScene *scene, QString type, DiagramContext info, QUndoCommand *parent) :
|
||||
ElementEditionCommand(scene, 0, parent)
|
||||
ElementEditionCommand(scene, nullptr, parent)
|
||||
{
|
||||
m_type << scene->m_elmt_type << type;
|
||||
m_info << scene->m_elmt_kindInfo << info;
|
||||
|
||||
@@ -33,8 +33,8 @@ class ElementEditionCommand : public QUndoCommand
|
||||
{
|
||||
// constructors, destructor
|
||||
public:
|
||||
ElementEditionCommand(ElementScene * = 0, ElementView * = 0, QUndoCommand * = 0);
|
||||
ElementEditionCommand(const QString &, ElementScene * = 0, ElementView * = 0, QUndoCommand * = 0);
|
||||
ElementEditionCommand(ElementScene * = nullptr, ElementView * = nullptr, QUndoCommand * = nullptr);
|
||||
ElementEditionCommand(const QString &, ElementScene * = nullptr, ElementView * = nullptr, QUndoCommand * = nullptr);
|
||||
virtual ~ElementEditionCommand();
|
||||
private:
|
||||
ElementEditionCommand(const ElementEditionCommand &);
|
||||
@@ -60,7 +60,7 @@ class ElementEditionCommand : public QUndoCommand
|
||||
class DeletePartsCommand : public ElementEditionCommand {
|
||||
// constructors, destructor
|
||||
public:
|
||||
DeletePartsCommand(ElementScene *, const QList<QGraphicsItem *>, QUndoCommand * = 0);
|
||||
DeletePartsCommand(ElementScene *, const QList<QGraphicsItem *>, QUndoCommand * = nullptr);
|
||||
virtual ~DeletePartsCommand();
|
||||
private:
|
||||
DeletePartsCommand(const DeletePartsCommand &);
|
||||
@@ -82,7 +82,7 @@ class DeletePartsCommand : public ElementEditionCommand {
|
||||
class PastePartsCommand : public ElementEditionCommand {
|
||||
// constructors, destructor
|
||||
public:
|
||||
PastePartsCommand(ElementView *, const ElementContent &, QUndoCommand * = 0);
|
||||
PastePartsCommand(ElementView *, const ElementContent &, QUndoCommand * = nullptr);
|
||||
virtual ~PastePartsCommand();
|
||||
private:
|
||||
PastePartsCommand(const PastePartsCommand &);
|
||||
@@ -113,7 +113,7 @@ class PastePartsCommand : public ElementEditionCommand {
|
||||
class CutPartsCommand : public DeletePartsCommand {
|
||||
// constructors, destructor
|
||||
public:
|
||||
CutPartsCommand(ElementScene *, const QList<QGraphicsItem *>, QUndoCommand * = 0);
|
||||
CutPartsCommand(ElementScene *, const QList<QGraphicsItem *>, QUndoCommand * = nullptr);
|
||||
virtual ~CutPartsCommand();
|
||||
private:
|
||||
CutPartsCommand(const CutPartsCommand &);
|
||||
@@ -125,7 +125,7 @@ class CutPartsCommand : public DeletePartsCommand {
|
||||
class MovePartsCommand : public ElementEditionCommand {
|
||||
// constructors, destructor
|
||||
public:
|
||||
MovePartsCommand(const QPointF &, ElementScene *, const QList<QGraphicsItem *>, QUndoCommand * = 0);
|
||||
MovePartsCommand(const QPointF &, ElementScene *, const QList<QGraphicsItem *>, QUndoCommand * = nullptr);
|
||||
virtual ~MovePartsCommand();
|
||||
private:
|
||||
MovePartsCommand(const MovePartsCommand &);
|
||||
@@ -151,7 +151,7 @@ class MovePartsCommand : public ElementEditionCommand {
|
||||
class AddPartCommand : public ElementEditionCommand {
|
||||
// constructors, destructor
|
||||
public:
|
||||
AddPartCommand(const QString &, ElementScene *, QGraphicsItem *, QUndoCommand * = 0);
|
||||
AddPartCommand(const QString &, ElementScene *, QGraphicsItem *, QUndoCommand * = nullptr);
|
||||
virtual ~AddPartCommand();
|
||||
private:
|
||||
AddPartCommand(const AddPartCommand &);
|
||||
@@ -175,7 +175,7 @@ class AddPartCommand : public ElementEditionCommand {
|
||||
class ChangeNamesCommand : public ElementEditionCommand {
|
||||
// constructors, destructor
|
||||
public:
|
||||
ChangeNamesCommand(ElementScene *, const NamesList &, const NamesList &, QUndoCommand * = 0);
|
||||
ChangeNamesCommand(ElementScene *, const NamesList &, const NamesList &, QUndoCommand * = nullptr);
|
||||
virtual ~ChangeNamesCommand();
|
||||
private:
|
||||
ChangeNamesCommand(const ChangeNamesCommand &);
|
||||
@@ -207,7 +207,7 @@ class ChangeZValueCommand : public ElementEditionCommand {
|
||||
Lower, ///< Send primitives one layer below their current one; zValues are decremented
|
||||
SendBackward ///< Send primitives to the background so they have the lowest zValue
|
||||
};
|
||||
ChangeZValueCommand(ElementScene *, Option, QUndoCommand * = 0);
|
||||
ChangeZValueCommand(ElementScene *, Option, QUndoCommand * = nullptr);
|
||||
virtual ~ChangeZValueCommand();
|
||||
private:
|
||||
ChangeZValueCommand(const ChangeZValueCommand &);
|
||||
@@ -239,7 +239,7 @@ class ChangeZValueCommand : public ElementEditionCommand {
|
||||
class ChangeInformationsCommand : public ElementEditionCommand {
|
||||
// constructors, destructor
|
||||
public:
|
||||
ChangeInformationsCommand(ElementScene *, const QString &, const QString &, QUndoCommand * = 0);
|
||||
ChangeInformationsCommand(ElementScene *, const QString &, const QString &, QUndoCommand * = nullptr);
|
||||
virtual ~ChangeInformationsCommand();
|
||||
private:
|
||||
ChangeInformationsCommand(const ChangeInformationsCommand &);
|
||||
@@ -263,7 +263,7 @@ class ChangeInformationsCommand : public ElementEditionCommand {
|
||||
class ScalePartsCommand : public ElementEditionCommand {
|
||||
// constructors, destructor
|
||||
public:
|
||||
ScalePartsCommand(ElementScene * = 0, QUndoCommand * = 0);
|
||||
ScalePartsCommand(ElementScene * = nullptr, QUndoCommand * = nullptr);
|
||||
virtual ~ScalePartsCommand();
|
||||
private:
|
||||
ScalePartsCommand(const ScalePartsCommand &);
|
||||
@@ -296,7 +296,7 @@ class ScalePartsCommand : public ElementEditionCommand {
|
||||
|
||||
class ChangePropertiesCommand : public ElementEditionCommand {
|
||||
public:
|
||||
ChangePropertiesCommand (ElementScene *scene, QString type, DiagramContext info, QUndoCommand *parent=0);
|
||||
ChangePropertiesCommand (ElementScene *scene, QString type, DiagramContext info, QUndoCommand *parent=nullptr);
|
||||
virtual ~ChangePropertiesCommand ();
|
||||
|
||||
virtual void undo();
|
||||
|
||||
@@ -61,5 +61,5 @@ void ElementItemEditor::setElementTypeName(const QString &name) {
|
||||
@see setPart
|
||||
*/
|
||||
void ElementItemEditor::detach() {
|
||||
setPart(0);
|
||||
setPart(nullptr);
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ class ElementItemEditor : public QWidget
|
||||
Q_OBJECT
|
||||
// constructors, destructor
|
||||
public:
|
||||
ElementItemEditor(QETElementEditor *, QWidget * = 0);
|
||||
ElementItemEditor(QETElementEditor *, QWidget * = nullptr);
|
||||
virtual ~ElementItemEditor() {};
|
||||
private:
|
||||
ElementItemEditor(const ElementItemEditor &);
|
||||
|
||||
@@ -222,14 +222,14 @@ void ElementPrimitiveDecorator::mouseReleaseEvent(QGraphicsSceneMouseEvent *even
|
||||
{
|
||||
Q_UNUSED(event)
|
||||
|
||||
ElementEditionCommand *command = 0;
|
||||
ElementEditionCommand *command = nullptr;
|
||||
|
||||
if (current_operation_square_ == QET::MoveArea)
|
||||
{
|
||||
QPointF movement = mapToScene(modified_bounding_rect_.topLeft()) - mapToScene(original_bounding_rect_.topLeft());
|
||||
if (!movement.isNull())
|
||||
{
|
||||
MovePartsCommand *move_command = new MovePartsCommand(movement, 0, graphicsItems());
|
||||
MovePartsCommand *move_command = new MovePartsCommand(movement, nullptr, graphicsItems());
|
||||
command = move_command;
|
||||
}
|
||||
|
||||
@@ -282,7 +282,7 @@ void ElementPrimitiveDecorator::keyReleaseEvent(QKeyEvent *e) {
|
||||
moving_by_keys_ && !e -> isAutoRepeat()
|
||||
) {
|
||||
// cree un objet d'annulation pour le mouvement qui vient de se finir
|
||||
emit(actionFinished(new MovePartsCommand(keys_movement_, 0, graphicsItems())));
|
||||
emit(actionFinished(new MovePartsCommand(keys_movement_, nullptr, graphicsItems())));
|
||||
keys_movement_ = QPointF();
|
||||
moving_by_keys_ = false;
|
||||
}
|
||||
@@ -378,7 +378,7 @@ CustomElementPart *ElementPrimitiveDecorator::singleItem() const {
|
||||
if (decorated_items_.count() == 1) {
|
||||
return(decorated_items_.first());
|
||||
}
|
||||
return(0);
|
||||
return(nullptr);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -538,7 +538,7 @@ void ElementPrimitiveDecorator::handlerMouseReleaseEvent(QetGraphicsHandlerItem
|
||||
Q_UNUSED(qghi);
|
||||
Q_UNUSED(event);
|
||||
|
||||
ElementEditionCommand *command = 0;
|
||||
ElementEditionCommand *command = nullptr;
|
||||
if (current_operation_square_ > QET::NoOperation)
|
||||
{
|
||||
ScalePartsCommand *scale_command = new ScalePartsCommand();
|
||||
|
||||
@@ -42,7 +42,7 @@ class ElementPrimitiveDecorator : public QGraphicsObject
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
ElementPrimitiveDecorator(QGraphicsItem * = 0);
|
||||
ElementPrimitiveDecorator(QGraphicsItem * = nullptr);
|
||||
virtual ~ElementPrimitiveDecorator();
|
||||
|
||||
enum { Type = UserType + 2200 };
|
||||
@@ -50,7 +50,7 @@ class ElementPrimitiveDecorator : public QGraphicsObject
|
||||
// methods
|
||||
QRectF internalBoundingRect() const;
|
||||
virtual QRectF boundingRect () const;
|
||||
virtual void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget * = 0);
|
||||
virtual void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget * = nullptr);
|
||||
virtual int type() const { return Type; }
|
||||
void setItems(const QList<QGraphicsItem *> &);
|
||||
void setItems(const QList<CustomElementPart *> &);
|
||||
|
||||
@@ -55,7 +55,7 @@ class ElementScene : public QGraphicsScene
|
||||
|
||||
// constructors, destructor
|
||||
public:
|
||||
ElementScene(QETElementEditor *, QObject * = 0);
|
||||
ElementScene(QETElementEditor *, QObject * = nullptr);
|
||||
virtual ~ElementScene();
|
||||
|
||||
private:
|
||||
@@ -113,7 +113,7 @@ class ElementScene : public QGraphicsScene
|
||||
virtual void setGrid(int, int);
|
||||
virtual const QDomDocument toXml(bool = true);
|
||||
virtual QRectF boundingRectFromXml(const QDomDocument &);
|
||||
virtual void fromXml(const QDomDocument &, const QPointF & = QPointF(), bool = true, ElementContent * = 0);
|
||||
virtual void fromXml(const QDomDocument &, const QPointF & = QPointF(), bool = true, ElementContent * = nullptr);
|
||||
virtual void reset();
|
||||
virtual QList<CustomElementPart *> primitives() const;
|
||||
virtual QList<QGraphicsItem *> zItems(ItemOptions options = ItemOptions(SortByZValue | IncludeTerminals | SelectedOrNot)) const;
|
||||
@@ -141,10 +141,10 @@ class ElementScene : public QGraphicsScene
|
||||
|
||||
private:
|
||||
QRectF elementContentBoundingRect(const ElementContent &) const;
|
||||
bool applyInformations(const QDomDocument &, QString * = 0);
|
||||
ElementContent loadContent(const QDomDocument &, QString * = 0);
|
||||
ElementContent addContent(const ElementContent &, QString * = 0);
|
||||
ElementContent addContentAtPos(const ElementContent &, const QPointF &, QString * = 0);
|
||||
bool applyInformations(const QDomDocument &, QString * = nullptr);
|
||||
ElementContent loadContent(const QDomDocument &, QString * = nullptr);
|
||||
ElementContent addContent(const ElementContent &, QString * = nullptr);
|
||||
ElementContent addContentAtPos(const ElementContent &, const QPointF &, QString * = nullptr);
|
||||
void addPrimitive(QGraphicsItem *);
|
||||
void initPasteArea();
|
||||
static bool zValueLessThan(QGraphicsItem *, QGraphicsItem *);
|
||||
|
||||
@@ -30,7 +30,7 @@ class ElementView : public QGraphicsView {
|
||||
|
||||
// constructors, destructor
|
||||
public:
|
||||
ElementView(ElementScene *, QWidget * = 0);
|
||||
ElementView(ElementScene *, QWidget * = nullptr);
|
||||
virtual ~ElementView();
|
||||
|
||||
private:
|
||||
|
||||
@@ -83,8 +83,8 @@ bool EllipseEditor::setPart(CustomElementPart *new_part)
|
||||
{
|
||||
if (part)
|
||||
disconnect(part, &PartEllipse::rectChanged, this, &EllipseEditor::updateForm);
|
||||
part = 0;
|
||||
style_ -> setPart(0);
|
||||
part = nullptr;
|
||||
style_ -> setPart(nullptr);
|
||||
return(true);
|
||||
}
|
||||
if (PartEllipse *part_ellipse = dynamic_cast<PartEllipse *>(new_part))
|
||||
|
||||
@@ -33,7 +33,7 @@ class EllipseEditor : public ElementItemEditor
|
||||
|
||||
// constructors, destructor
|
||||
public:
|
||||
EllipseEditor(QETElementEditor *, PartEllipse * = 0, QWidget * = 0);
|
||||
EllipseEditor(QETElementEditor *, PartEllipse * = nullptr, QWidget * = nullptr);
|
||||
virtual ~EllipseEditor();
|
||||
private:
|
||||
EllipseEditor(const EllipseEditor &);
|
||||
|
||||
@@ -41,7 +41,7 @@ class AbstractPartEllipse : public CustomElementGraphicPart
|
||||
|
||||
// constructors, destructor
|
||||
public:
|
||||
AbstractPartEllipse(QETElementEditor *editor, QGraphicsItem * parent = 0);
|
||||
AbstractPartEllipse(QETElementEditor *editor, QGraphicsItem * parent = nullptr);
|
||||
virtual ~AbstractPartEllipse();
|
||||
|
||||
private:
|
||||
|
||||
@@ -64,7 +64,7 @@ class CustomElementGraphicPart : public QGraphicsObject, public CustomElementPar
|
||||
// constructors, destructor
|
||||
public:
|
||||
|
||||
CustomElementGraphicPart(QETElementEditor *editor, QGraphicsItem *parent = 0);
|
||||
CustomElementGraphicPart(QETElementEditor *editor, QGraphicsItem *parent = nullptr);
|
||||
virtual ~CustomElementGraphicPart();
|
||||
|
||||
static void drawCross (const QPointF ¢er, QPainter *painter);
|
||||
|
||||
@@ -33,7 +33,7 @@ class PartArc : public AbstractPartEllipse
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
PartArc(QETElementEditor *editor, QGraphicsItem *parent = 0);
|
||||
PartArc(QETElementEditor *editor, QGraphicsItem *parent = nullptr);
|
||||
virtual ~PartArc();
|
||||
|
||||
private:
|
||||
@@ -46,7 +46,7 @@ class PartArc : public AbstractPartEllipse
|
||||
* @return the QGraphicsItem type
|
||||
*/
|
||||
virtual int type() const { return Type; }
|
||||
virtual void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget * = 0);
|
||||
virtual void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget * = nullptr);
|
||||
|
||||
//Name and XML
|
||||
virtual QString name() const { return(QObject::tr("arc", "element part name")); }
|
||||
|
||||
@@ -33,7 +33,7 @@ class PartEllipse : public AbstractPartEllipse
|
||||
|
||||
// constructors, destructor
|
||||
public:
|
||||
PartEllipse(QETElementEditor *editor, QGraphicsItem * parent = 0);
|
||||
PartEllipse(QETElementEditor *editor, QGraphicsItem * parent = nullptr);
|
||||
virtual ~PartEllipse();
|
||||
|
||||
private:
|
||||
@@ -47,7 +47,7 @@ class PartEllipse : public AbstractPartEllipse
|
||||
* @return the QGraphicsItem type
|
||||
*/
|
||||
virtual int type() const { return Type; }
|
||||
virtual void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget * = 0);
|
||||
virtual void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget * = nullptr);
|
||||
|
||||
//Name and XML
|
||||
virtual QString name() const { return(QObject::tr("ellipse", "element part name")); }
|
||||
|
||||
@@ -45,7 +45,7 @@ class PartLine : public CustomElementGraphicPart
|
||||
|
||||
// constructors, destructor
|
||||
public:
|
||||
PartLine(QETElementEditor *, QGraphicsItem * = 0);
|
||||
PartLine(QETElementEditor *, QGraphicsItem * = nullptr);
|
||||
virtual ~PartLine();
|
||||
private:
|
||||
PartLine(const PartLine &);
|
||||
@@ -67,7 +67,7 @@ class PartLine : public CustomElementGraphicPart
|
||||
* @return the QGraphicsItem type
|
||||
*/
|
||||
virtual int type() const { return Type; }
|
||||
virtual void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget * = 0);
|
||||
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;
|
||||
|
||||
@@ -38,7 +38,7 @@ class PartPolygon : public CustomElementGraphicPart
|
||||
|
||||
// constructors, destructor
|
||||
public:
|
||||
PartPolygon(QETElementEditor *editor, QGraphicsItem *parent = 0);
|
||||
PartPolygon(QETElementEditor *editor, QGraphicsItem *parent = nullptr);
|
||||
virtual ~PartPolygon();
|
||||
|
||||
private:
|
||||
|
||||
@@ -36,7 +36,7 @@ class PartRectangle : public CustomElementGraphicPart
|
||||
|
||||
// constructors, destructor
|
||||
public:
|
||||
PartRectangle(QETElementEditor *, QGraphicsItem *parent = 0);
|
||||
PartRectangle(QETElementEditor *, QGraphicsItem *parent = nullptr);
|
||||
virtual ~PartRectangle();
|
||||
|
||||
private:
|
||||
@@ -53,7 +53,7 @@ class PartRectangle : public CustomElementGraphicPart
|
||||
* @return the QGraphicsItem type
|
||||
*/
|
||||
virtual int type () const { return Type; }
|
||||
virtual void paint (QPainter *, const QStyleOptionGraphicsItem *, QWidget * = 0);
|
||||
virtual void paint (QPainter *, const QStyleOptionGraphicsItem *, QWidget * = nullptr);
|
||||
virtual QString name () const { return(QObject::tr("rectangle", "element part name")); }
|
||||
|
||||
virtual QString xmlName () const { return(QString("rect")); }
|
||||
|
||||
@@ -35,7 +35,7 @@ class PartTerminal : public CustomElementGraphicPart
|
||||
|
||||
public:
|
||||
// constructors, destructor
|
||||
PartTerminal(QETElementEditor *editor, QGraphicsItem *parent = 0);
|
||||
PartTerminal(QETElementEditor *editor, QGraphicsItem *parent = nullptr);
|
||||
virtual ~PartTerminal();
|
||||
private:
|
||||
PartTerminal(const PartTerminal &);
|
||||
|
||||
@@ -31,7 +31,7 @@ class PartText : public QGraphicsTextItem, public CustomElementPart {
|
||||
|
||||
// constructors, destructor
|
||||
public:
|
||||
PartText(QETElementEditor *, QGraphicsItem * = 0);
|
||||
PartText(QETElementEditor *, QGraphicsItem * = nullptr);
|
||||
virtual ~PartText();
|
||||
|
||||
private:
|
||||
|
||||
@@ -35,7 +35,7 @@ class PartTextField : public QGraphicsTextItem, public CustomElementPart
|
||||
|
||||
// constructors, destructor
|
||||
public:
|
||||
PartTextField(QETElementEditor *, QGraphicsItem * = 0);
|
||||
PartTextField(QETElementEditor *, QGraphicsItem * = nullptr);
|
||||
virtual ~PartTextField();
|
||||
|
||||
private:
|
||||
|
||||
@@ -110,8 +110,8 @@ bool LineEditor::setPart(CustomElementPart *new_part)
|
||||
disconnect(part, &PartLine::firstEndLengthChanged, this, &LineEditor::updateForm);
|
||||
disconnect(part, &PartLine::secondEndLengthChanged, this, &LineEditor::updateForm);
|
||||
}
|
||||
part = 0;
|
||||
style_ -> setPart(0);
|
||||
part = nullptr;
|
||||
style_ -> setPart(nullptr);
|
||||
return(true);
|
||||
}
|
||||
if (PartLine *part_line = dynamic_cast<PartLine *>(new_part))
|
||||
|
||||
@@ -33,7 +33,7 @@ class LineEditor : public ElementItemEditor
|
||||
Q_OBJECT
|
||||
// constructors, destructor
|
||||
public:
|
||||
LineEditor(QETElementEditor *, PartLine * = 0, QWidget * = 0);
|
||||
LineEditor(QETElementEditor *, PartLine * = nullptr, QWidget * = nullptr);
|
||||
virtual ~LineEditor();
|
||||
private:
|
||||
LineEditor(const LineEditor &);
|
||||
|
||||
@@ -130,8 +130,8 @@ bool PolygonEditor::setPart(CustomElementPart *new_part)
|
||||
disconnect(part, &PartPolygon::polygonChanged, this, &PolygonEditor::updateForm);
|
||||
disconnect(part, &PartPolygon::closedChange, this, &PolygonEditor::updateForm);
|
||||
}
|
||||
part = 0;
|
||||
style_ -> setPart(0);
|
||||
part = nullptr;
|
||||
style_ -> setPart(nullptr);
|
||||
return(true);
|
||||
}
|
||||
if (PartPolygon *part_polygon = dynamic_cast<PartPolygon *>(new_part))
|
||||
|
||||
@@ -35,7 +35,7 @@ class PolygonEditor : public ElementItemEditor {
|
||||
|
||||
// constructors, destructor
|
||||
public:
|
||||
PolygonEditor(QETElementEditor *, PartPolygon * = 0, QWidget * = 0);
|
||||
PolygonEditor(QETElementEditor *, PartPolygon * = nullptr, QWidget * = nullptr);
|
||||
virtual ~PolygonEditor();
|
||||
|
||||
private:
|
||||
|
||||
@@ -1267,11 +1267,11 @@ bool QETElementEditor::canClose() {
|
||||
*/
|
||||
QWidget *QETElementEditor::clearToolsDock() {
|
||||
if (QWidget *previous_widget = tools_dock_scroll_area_ -> takeWidget()) {
|
||||
previous_widget -> setParent(0);
|
||||
previous_widget -> setParent(nullptr);
|
||||
previous_widget -> hide();
|
||||
return(previous_widget);
|
||||
}
|
||||
return(0);
|
||||
return(nullptr);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -36,7 +36,7 @@ class QETElementEditor : public QETMainWindow {
|
||||
|
||||
// constructor, destructor
|
||||
public:
|
||||
QETElementEditor(QWidget * = 0);
|
||||
QETElementEditor(QWidget * = nullptr);
|
||||
virtual ~QETElementEditor();
|
||||
private:
|
||||
QETElementEditor(const QETElementEditor &);
|
||||
@@ -109,7 +109,7 @@ class QETElementEditor : public QETMainWindow {
|
||||
void readSettings();
|
||||
void writeSettings();
|
||||
static QPointF pasteOffset();
|
||||
static QString getOpenElementFileName(QWidget * = 0, const QString & = QString());
|
||||
static QString getOpenElementFileName(QWidget * = nullptr, const QString & = QString());
|
||||
void contextMenu(QPoint p);
|
||||
|
||||
signals:
|
||||
|
||||
@@ -82,8 +82,8 @@ bool RectangleEditor::setPart(CustomElementPart *new_part)
|
||||
{
|
||||
if (part)
|
||||
disconnect(part, &PartRectangle::rectChanged, this, &RectangleEditor::updateForm);
|
||||
part = 0;
|
||||
style_ -> setPart(0);
|
||||
part = nullptr;
|
||||
style_ -> setPart(nullptr);
|
||||
return(true);
|
||||
}
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ class RectangleEditor : public ElementItemEditor
|
||||
|
||||
// constructors, destructor
|
||||
public:
|
||||
RectangleEditor(QETElementEditor *, PartRectangle * = 0, QWidget * = 0);
|
||||
RectangleEditor(QETElementEditor *, PartRectangle * = nullptr, QWidget * = nullptr);
|
||||
virtual ~RectangleEditor();
|
||||
private:
|
||||
RectangleEditor(const RectangleEditor &);
|
||||
|
||||
@@ -36,7 +36,7 @@ class StyleEditor : public ElementItemEditor
|
||||
Q_OBJECT
|
||||
// constructors, destructor
|
||||
public:
|
||||
StyleEditor(QETElementEditor *, CustomElementGraphicPart * = 0, QWidget * = 0);
|
||||
StyleEditor(QETElementEditor *, CustomElementGraphicPart * = nullptr, QWidget * = nullptr);
|
||||
virtual ~StyleEditor();
|
||||
|
||||
private:
|
||||
|
||||
@@ -88,7 +88,7 @@ bool TerminalEditor::setPart(CustomElementPart *new_part)
|
||||
{
|
||||
if (part)
|
||||
disconnect(part, &PartTerminal::orientationChanged, this, &TerminalEditor::updateForm);
|
||||
part = 0;
|
||||
part = nullptr;
|
||||
return(true);
|
||||
}
|
||||
if (PartTerminal *part_terminal = dynamic_cast<PartTerminal *>(new_part))
|
||||
|
||||
@@ -31,7 +31,7 @@ class TerminalEditor : public ElementItemEditor {
|
||||
Q_OBJECT
|
||||
// Constructors, destructor
|
||||
public:
|
||||
TerminalEditor(QETElementEditor *, PartTerminal * = 0, QWidget * = 0);
|
||||
TerminalEditor(QETElementEditor *, PartTerminal * = nullptr, QWidget * = nullptr);
|
||||
virtual ~TerminalEditor();
|
||||
private:
|
||||
TerminalEditor(const TerminalEditor &);
|
||||
|
||||
@@ -107,7 +107,7 @@ bool TextEditor::setPart(CustomElementPart *new_part)
|
||||
{
|
||||
if (!new_part)
|
||||
{
|
||||
part = 0;
|
||||
part = nullptr;
|
||||
return(true);
|
||||
}
|
||||
if (PartText *part_text = dynamic_cast<PartText *>(new_part))
|
||||
|
||||
@@ -38,7 +38,7 @@ class TextEditor : public ElementItemEditor
|
||||
|
||||
// Constructors, destructor
|
||||
public:
|
||||
TextEditor(QETElementEditor *, PartText * = 0, QWidget * = 0);
|
||||
TextEditor(QETElementEditor *, PartText * = nullptr, QWidget * = nullptr);
|
||||
virtual ~TextEditor();
|
||||
private:
|
||||
TextEditor(const TextEditor &);
|
||||
|
||||
@@ -106,7 +106,7 @@ bool TextFieldEditor::setPart(CustomElementPart *new_part)
|
||||
{
|
||||
if (!new_part)
|
||||
{
|
||||
part = 0;
|
||||
part = nullptr;
|
||||
return(true);
|
||||
}
|
||||
if (PartTextField *part_textfield = dynamic_cast<PartTextField *>(new_part))
|
||||
|
||||
@@ -37,7 +37,7 @@ class TextFieldEditor : public ElementItemEditor
|
||||
|
||||
// Constructors, destructor
|
||||
public:
|
||||
TextFieldEditor(QETElementEditor *, PartTextField * = 0, QWidget * = 0);
|
||||
TextFieldEditor(QETElementEditor *, PartTextField * = nullptr, QWidget * = nullptr);
|
||||
virtual ~TextFieldEditor();
|
||||
private:
|
||||
TextFieldEditor(const TextFieldEditor &);
|
||||
|
||||
@@ -37,7 +37,7 @@ class ElementPropertiesEditorWidget : public QDialog
|
||||
|
||||
//METHODS
|
||||
public:
|
||||
explicit ElementPropertiesEditorWidget(QString &basic_type, DiagramContext &dc, QWidget *parent = 0);
|
||||
explicit ElementPropertiesEditorWidget(QString &basic_type, DiagramContext &dc, QWidget *parent = nullptr);
|
||||
~ElementPropertiesEditorWidget();
|
||||
|
||||
void upDateInterface();
|
||||
|
||||
Reference in New Issue
Block a user