QElectroTech 0.200.1-dev
Loading...
Searching...
No Matches
diagrameventaddpdf.h
Go to the documentation of this file.
1/*
2 Copyright 2006-2026 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 DIAGRAMEVENTADDPDF_H
19#define DIAGRAMEVENTADDPDF_H
20
21// PDF page import needs the QtPdf module (QET_HAS_QTPDF, set by CMake
22// only when QtPdf is present AND Qt >= 6.4, for QPdfDocument::pagePointSize()).
23#ifdef QET_HAS_QTPDF
24
26
27class Diagram;
29
37class DiagramEventAddPdf : public DiagramEventInterface
38{
39 Q_OBJECT
40
41 public:
42 DiagramEventAddPdf(Diagram *diagram);
43 ~DiagramEventAddPdf() override;
44
45 void mousePressEvent (QGraphicsSceneMouseEvent *event) override;
46 void mouseMoveEvent (QGraphicsSceneMouseEvent *event) override;
47 void mouseDoubleClickEvent (QGraphicsSceneMouseEvent *event) override;
48 void wheelEvent (QGraphicsSceneWheelEvent *event) override;
49
50 bool isNull() const;
51
52 private:
53 void openDialog();
54
55 DiagramImageItem *m_image;
56 bool m_is_added;
57};
58
59#endif // QET_HAS_QTPDF
60
61#endif // DIAGRAMEVENTADDPDF_H
The DiagramEventInterface class isRunning() return true if action is running (do something)....
Definition diagrameventinterface.h:47
virtual void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event)
Definition diagrameventinterface.cpp:35
virtual void mousePressEvent(QGraphicsSceneMouseEvent *event)
Definition diagrameventinterface.cpp:39
virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *event)
Definition diagrameventinterface.cpp:43
virtual void wheelEvent(QGraphicsSceneWheelEvent *event)
Definition diagrameventinterface.cpp:51
The Diagram class This class represents an electric diagram. It manages its various child elements,...
Definition diagram.h:54
Definition diagramimageitem.h:40