QElectroTech
0.70
sources
ui
imagepropertieswidget.h
Go to the documentation of this file.
1
/*
2
Copyright 2006-2019 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
23
class
DiagramImageItem
;
24
25
namespace
Ui
{
26
class
ImagePropertiesWidget
;
27
}
28
33
class
ImagePropertiesWidget
:
public
PropertiesEditorWidget
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);
52
void
on_m_lock_pos_cb_clicked
();
53
54
private
:
55
Ui::ImagePropertiesWidget *
ui
;
56
DiagramImageItem
*
m_image
;
57
bool
m_movable
;
58
qreal
m_scale
;
59
};
60
61
#endif // IMAGEPROPERTIESWIDGET_H
ImagePropertiesWidget
The ImagePropertiesWidget class This class provide a widget to edit the propertie of a DiagramImageIt...
Definition:
imagepropertieswidget.h:33
ImagePropertiesWidget::updateUi
void updateUi() override
ImagePropertiesWidget::updateUi Udpdate the ui, notably when the image to edit change.
Definition:
imagepropertieswidget.cpp:149
Ui
Definition:
autonumberingdockwidget.h:25
ImagePropertiesWidget::setImageItem
void setImageItem(DiagramImageItem *image)
ImagePropertiesWidget::setImageItem Set the image to edit properties.
Definition:
imagepropertieswidget.cpp:53
PropertiesEditorWidget
The PropertiesEditorWidget class This class extend QWidget method for have common way to edit propert...
Definition:
propertieseditorwidget.h:30
ImagePropertiesWidget::on_m_lock_pos_cb_clicked
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:171
ImagePropertiesWidget::m_image
DiagramImageItem * m_image
Definition:
imagepropertieswidget.h:56
ImagePropertiesWidget::reset
void reset() override
ImagePropertiesWidget::reset Reset the change.
Definition:
imagepropertieswidget.cpp:94
propertieseditorwidget.h
ImagePropertiesWidget::~ImagePropertiesWidget
~ImagePropertiesWidget() override
ImagePropertiesWidget::~ImagePropertiesWidget Destructor.
Definition:
imagepropertieswidget.cpp:44
ImagePropertiesWidget::setLiveEdit
bool setLiveEdit(bool live_edit) override
ImagePropertiesWidget::setLiveEdit.
Definition:
imagepropertieswidget.cpp:109
ImagePropertiesWidget::m_movable
bool m_movable
Definition:
imagepropertieswidget.h:57
ImagePropertiesWidget::m_scale
qreal m_scale
Definition:
imagepropertieswidget.h:58
ImagePropertiesWidget::ui
Ui::ImagePropertiesWidget * ui
Definition:
imagepropertieswidget.h:55
ImagePropertiesWidget::ImagePropertiesWidget
ImagePropertiesWidget(DiagramImageItem *image=nullptr, QWidget *parent=nullptr)
ImagePropertiesWidget::ImagePropertiesWidget Constructor.
Definition:
imagepropertieswidget.cpp:30
ImagePropertiesWidget::apply
void apply() override
ImagePropertiesWidget::apply Apply the change.
Definition:
imagepropertieswidget.cpp:72
ImagePropertiesWidget::associatedUndo
QUndoCommand * associatedUndo() const override
ImagePropertiesWidget::associatedUndo.
Definition:
imagepropertieswidget.cpp:133
ImagePropertiesWidget::on_m_scale_slider_valueChanged
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:161
DiagramImageItem
Definition:
diagramimageitem.h:31
Generated by
1.8.15