QElectroTech  0.8-dev
multipastedialog.h
Go to the documentation of this file.
1 /*
2  Copyright 2006-2020 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 MULTIPASTEDIALOG_H
19 #define MULTIPASTEDIALOG_H
20 
21 #include <QDialog>
22 #include "diagramcontent.h"
23 #include "QDomDocument"
24 
25 class Diagram;
26 
27 namespace Ui {
28  class MultiPasteDialog;
29 }
30 
31 class MultiPasteDialog : public QDialog
32 {
33  Q_OBJECT
34 
35  public:
36  explicit MultiPasteDialog(Diagram *diagram, QWidget *parent = nullptr);
38  void updatePreview();
39 
40  private slots:
42 
43  private:
44  Ui::MultiPasteDialog *ui;
45  Diagram *m_diagram = nullptr;
47  QPointF m_origin;
48  QDomDocument m_document;
49  bool m_accept = false;
50  QList<DiagramContent> m_pasted_content_list;
51 };
52 
53 #endif // MULTIPASTEDIALOG_H
MultiPasteDialog::m_pasted_content_list
QList< DiagramContent > m_pasted_content_list
Definition: multipastedialog.h:50
MultiPasteDialog::m_pasted_content
DiagramContent m_pasted_content
Definition: multipastedialog.h:46
diagramcommands.h
Diagram::adjustSceneRect
void adjustSceneRect()
Diagram::adjustSceneRect Recalcul and adjust the size of the scene.
Definition: diagram.cpp:2166
Diagram::fromXml
bool fromXml(QDomDocument &, QPointF=QPointF(), bool=true, DiagramContent *=nullptr)
Diagram::fromXml Imports the described schema into an XML document. If a position is specified,...
Definition: diagram.cpp:1029
Diagram::toXml
QDomDocument toXml(bool=true)
Diagram::toXml Exports all or part of the schema.
Definition: diagram.cpp:721
Diagram::freezeNewConductors
bool freezeNewConductors()
Diagram::freezeNewConductors.
Definition: diagram.cpp:2158
MultiPasteDialog::on_m_button_box_accepted
void on_m_button_box_accepted()
Definition: multipastedialog.cpp:94
multipastedialog.h
DiagramContent
Definition: diagramcontent.h:46
DiagramContent::clear
void clear()
DiagramContent::clear Remove all items from the diagram content.
Definition: diagramcontent.cpp:227
QETProject::setCurrentConductorAutoNum
void setCurrentConductorAutoNum(QString autoNum)
QETProject::setCurrentConductorAutoNum.
Definition: qetproject.cpp:568
autonum::numerotationContextToFormula
QString numerotationContextToFormula(const NumerotationContext &nc)
numerotationContextToFormula
Definition: assignvariables.cpp:473
MultiPasteDialog::m_origin
QPointF m_origin
Definition: multipastedialog.h:47
ConductorAutoNumerotation::numerate
void numerate()
ConductorAutoNumerotation::numerate execute the automatic numerotation.
Definition: conductorautonumerotation.cpp:56
Diagram::project
QETProject * project() const
Diagram::project.
Definition: diagram.cpp:2326
Diagram
The Diagram class This class represents an electric diagram. It manages its various child elements,...
Definition: diagram.h:56
QET::Icons::Conductor
QIcon Conductor
Definition: qeticons.cpp:35
MultiPasteDialog::updatePreview
void updatePreview()
Definition: multipastedialog.cpp:63
Diagram::removeItem
virtual void removeItem(QGraphicsItem *item)
Diagram::removeItem Reimplemented from QGraphicsScene::removeItem(QGraphicsItem *item) Do some specif...
Definition: diagram.cpp:1581
MultiPasteDialog::m_diagram
Diagram * m_diagram
Definition: multipastedialog.h:45
MultiPasteDialog::MultiPasteDialog
MultiPasteDialog(Diagram *diagram, QWidget *parent=nullptr)
Definition: multipastedialog.cpp:26
QETProject::setCurrrentElementAutonum
void setCurrrentElementAutonum(QString autoNum)
QETProject::setCurrrentElementAutonum.
Definition: qetproject.cpp:539
MultiPasteDialog::m_accept
bool m_accept
Definition: multipastedialog.h:49
AddItemCommand
The AddItemCommand class This command add an item in a diagram The item to add is template,...
Definition: diagramcommands.h:42
element.h
QETProject::isFreezeNewConductors
bool isFreezeNewConductors()
QETProject::isFreezeNewConductors.
Definition: qetproject.cpp:707
Element
Definition: element.h:41
Diagram::undoStack
QUndoStack & undoStack()
Diagram::undoStack.
Definition: diagram.h:397
QETProject::conductorAutoNum
QHash< QString, NumerotationContext > conductorAutoNum() const
QETProject::conductorAutoNum.
Definition: qetproject.cpp:493
DiagramContent::count
int count(int=All) const
DiagramContent::count.
Definition: diagramcontent.cpp:401
diagramcontent.h
conductorautonumerotation.h
ConductorAutoNumerotation
The ConductorAutoNumerotation class.
Definition: conductorautonumerotation.h:33
Ui
Definition: autonumberingdockwidget.h:25
Conductor::setFreezeLabel
void setFreezeLabel(bool freeze)
Conductor::setFreezeLabel Freeze this conductor label if true Unfreeze this conductor label if false.
Definition: conductor.cpp:2035
MultiPasteDialog::m_document
QDomDocument m_document
Definition: multipastedialog.h:48
MultiPasteDialog
Definition: multipastedialog.h:32
MultiPasteDialog::ui
Ui::MultiPasteDialog * ui
Definition: multipastedialog.h:44
PasteDiagramCommand
The PasteDiagramCommand class This command pastes some content onto a particular diagram.
Definition: diagramcommands.h:88
DiagramContent::items
QList< QGraphicsItem * > items(int=All) const
DiagramContent::items.
Definition: diagramcontent.cpp:374
MultiPasteDialog::~MultiPasteDialog
~MultiPasteDialog()
Definition: multipastedialog.cpp:46
Conductor
Definition: conductor.h:43
QETProject::elementAutoNum
QHash< QString, NumerotationContext > elementAutoNum() const
QETProject::elementAutoNum.
Definition: qetproject.cpp:501
QET::Icons::br
QIcon br
Definition: qeticons.cpp:185
QET::Icons::tr
QIcon tr
Definition: qeticons.cpp:206
diagram.h