QElectroTech 0.100.0-dev
Loading...
Searching...
No Matches
imagepropertieswidget.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 IMAGEPROPERTIESWIDGET_H
19#define IMAGEPROPERTIESWIDGET_H
20
21#include "../PropertiesEditor/propertieseditorwidget.h"
22
24
25namespace Ui {
27}
28
34{
35 Q_OBJECT
36
37 public:
38 explicit ImagePropertiesWidget(DiagramImageItem *image = nullptr, QWidget *parent = nullptr);
39 ~ImagePropertiesWidget() override;
40 void setImageItem (DiagramImageItem *image);
41
42 void apply() override;
43 void reset() override;
44 bool setLiveEdit(bool live_edit) override;
45 QUndoCommand* associatedUndo() const override;
46
47 private:
48 void updateUi() override;
49
50 private slots:
51 void on_m_scale_slider_valueChanged(int value);
53
54 private:
55 Ui::ImagePropertiesWidget *ui;
58 qreal m_scale;
59};
60
61#endif // IMAGEPROPERTIESWIDGET_H
Definition diagramimageitem.h:31
The ImagePropertiesWidget class This class provides a widget to edit the properties of a DiagramImage...
Definition imagepropertieswidget.h:34
void apply() override
ImagePropertiesWidget::apply Apply the change.
Definition imagepropertieswidget.cpp:74
void on_m_lock_pos_cb_clicked()
ImagePropertiesWidget::on_m_lock_pos_cb_clicked Set movable or not the image according to correspondi...
Definition imagepropertieswidget.cpp:173
~ImagePropertiesWidget() override
ImagePropertiesWidget::~ImagePropertiesWidget Destructor.
Definition imagepropertieswidget.cpp:45
void reset() override
ImagePropertiesWidget::reset Reset the change.
Definition imagepropertieswidget.cpp:96
bool setLiveEdit(bool live_edit) override
ImagePropertiesWidget::setLiveEdit.
Definition imagepropertieswidget.cpp:111
DiagramImageItem * m_image
Definition imagepropertieswidget.h:56
bool m_movable
Definition imagepropertieswidget.h:57
void setImageItem(DiagramImageItem *image)
ImagePropertiesWidget::setImageItem Set the image to edit properties.
Definition imagepropertieswidget.cpp:55
QUndoCommand * associatedUndo() const override
ImagePropertiesWidget::associatedUndo.
Definition imagepropertieswidget.cpp:135
Ui::ImagePropertiesWidget * ui
Definition imagepropertieswidget.h:55
void on_m_scale_slider_valueChanged(int value)
ImagePropertiesWidget::on_m_scale_slider_valueChanged Update the size of image when move slider.
Definition imagepropertieswidget.cpp:163
qreal m_scale
Definition imagepropertieswidget.h:58
void updateUi() override
ImagePropertiesWidget::updateUi Udpdate the ui, notably when the image to edit change.
Definition imagepropertieswidget.cpp:151
The PropertiesEditorWidget class This class extend QWidget method to have a common way to edit proper...
Definition propertieseditorwidget.h:31
Definition autonumberingdockwidget.h:26