Version: 9.16.0
GuiEditor.hxx
Go to the documentation of this file.
1// Copyright (C) 2006-2026 CEA, EDF
2//
3// This library is free software; you can redistribute it and/or
4// modify it under the terms of the GNU Lesser General Public
5// License as published by the Free Software Foundation; either
6// version 2.1 of the License, or (at your option) any later version.
7//
8// This library is distributed in the hope that it will be useful,
9// but WITHOUT ANY WARRANTY; without even the implied warranty of
10// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11// Lesser General Public License for more details.
12//
13// You should have received a copy of the GNU Lesser General Public
14// License along with this library; if not, write to the Free Software
15// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16//
17// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18//
19
20#ifndef _GUIEDITOR_HXX_
21#define _GUIEDITOR_HXX_
22
23
24#include <QWidget>
25#include <QString>
26#include <string>
27
28namespace YACS
29{
30 namespace ENGINE
31 {
32 class Catalog;
33 };
34
35 namespace HMI
36 {
37 class Subject;
38 class SubjectNode;
39 class SubjectElementaryNode;
40 class SubjectComposedNode;
41 class SubjectDataPort;
42 class ItemMimeData;
43
45 {
46 public:
47 GuiEditor();
48 virtual ~GuiEditor();
49
50 void CreateNodeFromCatalog(const ItemMimeData* myData,
52 bool createNewComponentInstance);
53 void AddTypeFromCatalog(const ItemMimeData* myData);
54 SubjectNode* CreateNode(std::string typeNode);
55 void CreateBloc();
56 void CreateForLoop();
57 void CreateForEachLoop(std::string type );
58 void CreateWhileLoop();
59 void CreateSwitch();
61 void CreateContainer();
62 void CreateHPContainer();
64
66 std::string name,
67 YACS::ENGINE::Catalog *catalog,
68 std::string type = "double",
69 SubjectDataPort* before = 0);
70
72 std::string name,
73 YACS::ENGINE::Catalog *catalog,
74 std::string type = "double",
75 SubjectDataPort* before = 0);
76 void DeleteSubject();
77 void DeleteSubject(Subject* parent,
78 Subject* toRemove);
79
80 void CutSubject();
81 void CopySubject();
82 void PasteSubject();
83 void PutSubjectInBloc();
84 std::string PutGraphInBloc();
85 void PutGraphInNode(std::string typeNode);
86 void shrinkExpand(Qt::KeyboardModifiers kbModifiers = Qt::NoModifier);
87 void rebuildLinks();
88 void arrangeNodes(bool isRecursive);
89 void arrangeProc();
90 void showUndo(QWidget *parent = 0);
91 void showRedo(QWidget *parent = 0);
92 QString asciiFilter(const QString & name);
93
94 protected:
97 std::string service,
98 std::string compoName,
99 bool createNewComponentInstance);
100 std::string _table;
101 };
102 }
103}
104
105#endif
class for YACS catalogs.
Definition: Catalog.hxx:42
void shrinkExpand(Qt::KeyboardModifiers kbModifiers=Qt::NoModifier)
Definition: GuiEditor.cxx:392
void showRedo(QWidget *parent=0)
Definition: GuiEditor.cxx:706
void AddTypeFromCatalog(const ItemMimeData *myData)
Definition: GuiEditor.cxx:203
SubjectNode * _createNode(YACS::ENGINE::Catalog *catalog, SubjectComposedNode *cnode, std::string service, std::string compoName, bool createNewComponentInstance)
Definition: GuiEditor.cxx:121
QString asciiFilter(const QString &name)
Definition: GuiEditor.cxx:716
virtual ~GuiEditor()
Definition: GuiEditor.cxx:78
SubjectNode * CreateNode(std::string typeNode)
Definition: GuiEditor.cxx:98
SubjectDataPort * CreateOutputPort(SubjectElementaryNode *seNode, std::string name, YACS::ENGINE::Catalog *catalog, std::string type="double", SubjectDataPort *before=0)
Definition: GuiEditor.cxx:354
void arrangeNodes(bool isRecursive)
Definition: GuiEditor.cxx:659
std::string _table
Definition: GuiEditor.hxx:100
void CreateNodeFromCatalog(const ItemMimeData *myData, SubjectComposedNode *cnode, bool createNewComponentInstance)
Definition: GuiEditor.cxx:83
void CreateForEachLoop(std::string type)
Definition: GuiEditor.cxx:231
void showUndo(QWidget *parent=0)
Definition: GuiEditor.cxx:699
SubjectDataPort * CreateInputPort(SubjectElementaryNode *seNode, std::string name, YACS::ENGINE::Catalog *catalog, std::string type="double", SubjectDataPort *before=0)
Definition: GuiEditor.cxx:319
std::string PutGraphInBloc()
Definition: GuiEditor.cxx:581
void CreateComponentInstance()
Definition: GuiEditor.cxx:301
void PutGraphInNode(std::string typeNode)
Definition: GuiEditor.cxx:563