QElectroTech 0.100.0-dev
Loading...
Searching...
No Matches
shapegraphicsitempropertieswidget.h
Go to the documentation of this file.
1/*
2 Copyright 2006-2024 The QElectroTech Team
3 This file is part of QElectroTech.
4
5 QElectroTech is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 2 of the License, or
8 (at your option) any later version.
9
10 QElectroTech is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
17*/
18#ifndef SHAPEGRAPHICSITEMPROPERTIESWIDGET_H
19#define SHAPEGRAPHICSITEMPROPERTIESWIDGET_H
20
21#include "../PropertiesEditor/propertieseditorwidget.h"
22
23namespace Ui {
25}
26
27class QetShapeItem;
28
34{
35 Q_OBJECT
36
37 public:
38 explicit ShapeGraphicsItemPropertiesWidget(QetShapeItem *item, QWidget *parent = nullptr);
39 ShapeGraphicsItemPropertiesWidget(QList<QetShapeItem *> items_list, QWidget *parent =nullptr);
41
42 void setItem(QetShapeItem *shape);
43 void setItems(QList<QetShapeItem *> shapes_list);
44
45 public slots:
46 void apply() override;
47 void reset() override;
48 public:
49 QUndoCommand* associatedUndo() const override;
50 QString title() const override { return tr("Éditer les propriétés d'une primitive "); }
51 void updateUi() override;
52 bool setLiveEdit(bool live_edit) override;
53
54 private:
57
58 private slots:
60
61 private:
62 Ui::ShapeGraphicsItemPropertiesWidget *ui;
64 QList <QPointer<QetShapeItem>> m_shapes_list;
65 QList <QMetaObject::Connection> m_connect_list,
67};
68
69#endif // SHAPEGRAPHICSITEMPROPERTIESWIDGET_H
The PropertiesEditorWidget class This class extend QWidget method to have a common way to edit proper...
Definition propertieseditorwidget.h:31
The QetShapeItem class this class is used to draw a basic shape (line, rectangle, ellipse) into a dia...
Definition qetshapeitem.h:37
The ShapeGraphicsItemPropertiesWidget class Provide a widget to edit the properties of a QetShapeItem...
Definition shapegraphicsitempropertieswidget.h:34
QList< QPointer< QetShapeItem > > m_shapes_list
Definition shapegraphicsitempropertieswidget.h:64
void setItems(QList< QetShapeItem * > shapes_list)
ShapeGraphicsItemPropertiesWidget::setItems Set a list of shapes to be edited.
Definition shapegraphicsitempropertieswidget.cpp:87
~ShapeGraphicsItemPropertiesWidget() override
ShapeGraphicsItemPropertiesWidget::~ShapeGraphicsItemPropertiesWidget Destructor.
Definition shapegraphicsitempropertieswidget.cpp:55
Ui::ShapeGraphicsItemPropertiesWidget * ui
Definition shapegraphicsitempropertieswidget.h:62
void setItem(QetShapeItem *shape)
ShapeGraphicsItemPropertiesWidget::setItem Set shape as the current edited item.
Definition shapegraphicsitempropertieswidget.cpp:65
void on_m_lock_pos_cb_clicked()
Definition shapegraphicsitempropertieswidget.cpp:513
void apply() override
ShapeGraphicsItemPropertiesWidget::apply Apply the current change, by pushing an undo command to the ...
Definition shapegraphicsitempropertieswidget.cpp:115
QString title() const override
PropertiesEditorWidget::title.
Definition shapegraphicsitempropertieswidget.h:50
QList< QMetaObject::Connection > m_connect_list
Definition shapegraphicsitempropertieswidget.h:65
void setUpEditConnection()
ShapeGraphicsItemPropertiesWidget::setUpEditConnection Disconnect the previous connection,...
Definition shapegraphicsitempropertieswidget.cpp:469
bool setLiveEdit(bool live_edit) override
ShapeGraphicsItemPropertiesWidget::setLiveEdit.
Definition shapegraphicsitempropertieswidget.cpp:449
void updateUi() override
ShapeGraphicsItemPropertiesWidget::updateUi.
Definition shapegraphicsitempropertieswidget.cpp:352
QList< QMetaObject::Connection > m_edit_connection
Definition shapegraphicsitempropertieswidget.h:66
void reset() override
ShapeGraphicsItemPropertiesWidget::reset Reset the change.
Definition shapegraphicsitempropertieswidget.cpp:146
QUndoCommand * associatedUndo() const override
ShapeGraphicsItemPropertiesWidget::associatedUndo.
Definition shapegraphicsitempropertieswidget.cpp:157
void clearEditConnection()
Definition shapegraphicsitempropertieswidget.cpp:505
QetShapeItem * m_shape
Definition shapegraphicsitempropertieswidget.h:63
Definition autonumberingdockwidget.h:26