DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
SchemaGraphicsScene.cpp
Go to the documentation of this file.
1
2#include <QGraphicsSceneDragDropEvent>
3#include <QEvent>
4#include <QMimeData>
5#include <QWidget>
6
7#include <QMenu>
8#include <QApplication>
18
19using namespace dunedaq::oks;
20
22 : QGraphicsScene ( parent ),
23 m_line ( nullptr ),
24 m_context_menu ( nullptr ),
25 CurrentObject ( nullptr ),
26 m_current_arrow ( nullptr ),
27 m_inherited_properties_visible(false),
28 m_highlight_active(false),
29 m_modified(false)
30{
32 setSceneRect ( QRectF ( 0, 0, 10000, 10000 ) );
33}
34
38
40{
41 // Add new class
42 m_add_class = new QAction ( "&Add new class", this );
43 connect ( m_add_class, SIGNAL ( triggered() ), this, SLOT ( new_class_slot() ) );
44
45 // Edit current class
46 m_edit_class = new QAction ( "&Edit class", this );
47 connect ( m_edit_class, SIGNAL ( triggered() ), this, SLOT ( EditClassSlot() ) );
48
49 // Toggle inherited properties of all classes in view
50 m_toggle_indirect_infos = new QAction ( "&Toggle inherited properties", this );
51 connect ( m_toggle_indirect_infos, SIGNAL ( triggered() ), this, SLOT ( ToggleIndirectInfos() ) );
52
53 // Toggle highlighting of all classes in active schema
54 m_toggle_highlight_active = new QAction ( "Toggle &highlighting of classes in active schema", this );
55 connect ( m_toggle_highlight_active, SIGNAL ( triggered() ), this, SLOT ( ToggleHighlightActive() ) );
56
57 m_add_note = new QAction ( "Add note to view", this );
58 connect ( m_add_note, SIGNAL ( triggered() ), this, SLOT ( new_note_slot() ) );
59
60 m_edit_note = new QAction ( "Edit note", this );
61 connect ( m_edit_note, SIGNAL ( triggered() ), this, SLOT ( edit_note_slot() ) );
62
63 m_remove_note = new QAction ( "Remove note", this );
64 connect ( m_remove_note, SIGNAL ( triggered() ), this, SLOT ( remove_note_slot() ) );
65
66 // Show superclasses of the current class
67 m_add_direct_super_classes = new QAction ( "Add direct &superclasses to view", this );
68 connect ( m_add_direct_super_classes, SIGNAL ( triggered() ), this, SLOT ( AddDirectSuperClassesSlot() ) );
69
70 // Show relationship classes of the current clas
71 m_add_direct_relationship_classes = new QAction ( "Add &direct relationship classes to view", this );
72 connect ( m_add_direct_relationship_classes, SIGNAL ( triggered() ), this, SLOT ( AddDirectRelationshipClassesSlot() ) );
73
74 // Show superclasses of the current class
75 m_add_all_super_classes = new QAction ( "Add all &superclasses to view", this );
76 connect ( m_add_all_super_classes, SIGNAL ( triggered() ), this, SLOT ( AddAllSuperClassesSlot() ) );
77
78 // Show subclasses of the current clas
79 m_add_all_sub_classes = new QAction ( "Add all s&ubclasses to view", this );
80 connect ( m_add_all_sub_classes, SIGNAL ( triggered() ), this, SLOT ( AddAllSubClassesSlot() ) );
81
82 // Show indirect relationship classes of the current class
83 m_add_all_relationship_classes = new QAction ( "Add a&ll relationship classes to view", this );
84 connect ( m_add_all_relationship_classes, SIGNAL ( triggered() ), this, SLOT ( AddAllRelationshipClassesSlot() ) );
85
86 // Remove class
87 m_remove_class = new QAction ( "&Remove Class from view", this );
88 connect ( m_remove_class, SIGNAL ( triggered() ), this, SLOT ( RemoveClassSlot() ) );
89
90 // Remove arrow
91 m_remove_arrow = new QAction ( "&Remove Arrow", this );
92 connect ( m_remove_arrow, SIGNAL ( triggered() ), this, SLOT ( RemoveArrowSlot() ) );
93}
94
95void dbse::SchemaGraphicsScene::dragEnterEvent ( QGraphicsSceneDragDropEvent * event )
96{
97 if ( event->mimeData()->hasFormat ( "application/vnd.text.list" ) )
98 {
99 event->accept();
100 }
101}
102
103void dbse::SchemaGraphicsScene::dragMoveEvent ( QGraphicsSceneDragDropEvent * event )
104{
105 if ( event->mimeData()->hasFormat ( "application/vnd.text.list" ) )
106 {
107 event->accept();
108 }
109}
110
111void dbse::SchemaGraphicsScene::dropEvent ( QGraphicsSceneDragDropEvent * event )
112{
113 QByteArray encodedData = event->mimeData()->data ( "application/vnd.text.list" );
114 QDataStream stream ( &encodedData, QIODevice::ReadOnly );
115 QStringList SchemaClasses;
116
117 while ( !stream.atEnd() )
118 {
119 QString ClassName;
120 stream >> ClassName;
121 SchemaClasses.append ( ClassName );
122 }
123
124 QList<QPointF> Positions;
125
126 for ( int i = 0; i < SchemaClasses.size(); ++i )
127 {
128 Positions.push_back ( event->scenePos() );
129 }
130
131 AddItemsToScene ( SchemaClasses, Positions );
132}
133
134void dbse::SchemaGraphicsScene::contextMenuEvent ( QGraphicsSceneContextMenuEvent * event )
135{
136 if ( m_context_menu == nullptr ) {
137 m_context_menu = new QMenu();
138 m_context_menu->addAction ( m_add_class );
139 m_context_menu->addAction ( m_add_note );
140 m_context_menu->addAction ( m_toggle_indirect_infos );
141 m_context_menu->addAction ( m_toggle_highlight_active );
142
143 m_seperator_pos = m_context_menu->actions().size();
144 m_context_menu->addSeparator();
145
146 m_class_pos = m_context_menu->actions().size();
147 m_context_menu->addAction ( m_edit_class );
148 m_context_menu->addAction ( m_remove_class );
149 m_context_menu->addAction ( m_add_direct_super_classes );
150 m_context_menu->addAction ( m_add_direct_relationship_classes );
151 m_context_menu->addAction ( m_add_all_super_classes );
152 m_context_menu->addAction ( m_add_all_sub_classes );
153 m_context_menu->addAction ( m_add_all_sub_classes );
154 m_context_menu->addAction ( m_add_all_relationship_classes );
155
156 m_arrow_pos = m_context_menu->actions().size();
157 m_context_menu->addAction ( m_remove_arrow );
158
159 m_note_pos = m_context_menu->actions().size();
160 m_context_menu->addAction ( m_edit_note );
161 m_context_menu->addAction ( m_remove_note );
162 }
163
164 for (int item=0; item<m_seperator_pos; item++) {
165 m_context_menu->actions().at ( item )->setVisible ( true );
166 }
167
168 // Set all other items invisible
169 int nitems = m_context_menu->actions().size();
170 for (int item=m_seperator_pos; item<nitems; item++) {
171 m_context_menu->actions().at ( item )->setVisible ( false );
172 }
173
174 if ( itemAt ( event->scenePos(), QTransform() ) ) {
175 // Something under mouse pointer, set additional items visible
176 // depending on what it is
177 m_context_menu->actions().at ( m_seperator_pos )->setVisible ( true );
178
179 auto object = dynamic_cast<SchemaGraphicObject *> (
180 itemAt ( event->scenePos(), QTransform() ) );
181 auto arrow = dynamic_cast<SchemaGraphicSegmentedArrow *> (
182 itemAt ( event->scenePos(), QTransform() ) );
183 auto note = dynamic_cast<SchemaGraphicNote *> (
184 itemAt ( event->scenePos(), QTransform() ) );
185
186 if ( object != nullptr) {
187 CurrentObject = object;
188 auto filename =
189 CurrentObject->GetClass()->get_file()->get_full_file_name();
191 m_context_menu->actions().at ( m_class_pos )->setVisible ( writable );
192 m_context_menu->actions().at ( m_class_pos+1 )->setVisible ( writable );
193 for (int item=m_class_pos+2; item<m_arrow_pos; item++) {
194 m_context_menu->actions().at ( item )->setVisible ( true );
195 }
196 }
197 else if ( arrow != nullptr ) {
198 m_context_menu->actions().at ( m_arrow_pos )->setVisible ( true );
199 m_current_arrow = arrow;
200 }
201 else if ( note != nullptr) {
202 for (int item=m_note_pos; item<nitems; item++) {
203 m_context_menu->actions().at ( item )->setVisible ( true );
204 }
205 m_current_note = note;
206 }
207 }
208 m_current_pos = event->scenePos();
209 m_context_menu->exec ( event->screenPos() );
210}
211
213 QStringList SchemaClasses,
214 QList<QPointF> Positions )
215{
216 QStringList missingItems{};
217
218 for ( QString & ClassName : SchemaClasses )
219 {
220 if ( !ItemMap.contains ( ClassName ) )
221 {
222
223 if ( !KernelWrapper::GetInstance().FindClass ( ClassName.toStdString() ) ) {
224 std::cout << "ERROR: class " << ClassName.toStdString() << " not found" << std::endl;
225 missingItems.append(ClassName);
226 continue;
227 }
228
229 SchemaGraphicObject * Object = new SchemaGraphicObject ( ClassName );
230 Object->setPos ( Positions.at ( SchemaClasses.indexOf ( ClassName ) ) );
231 Object->set_inherited_properties_visibility(m_inherited_properties_visible);
232 Object->set_highlight_active(m_highlight_active);
233 addItem ( Object );
235 ItemMap.insert ( ClassName, Object );
236 }
237 }
238
239 for ( QString & ClassName : ItemMap.keys() )
240 {
241 OksClass * ClassInfo = KernelWrapper::GetInstance().FindClass ( ClassName.toStdString() );
242
243 const std::list<OksRelationship *> * DirectRelationshipList =
244 ClassInfo->direct_relationships();
245 const std::list<std::string *> * DirectSuperClassesList = ClassInfo->direct_super_classes();
246
247 std::map<std::string, unsigned int> arrow_count;
248
250 if ( DirectRelationshipList != nullptr )
251 {
252 for ( OksRelationship * ClassRelationship : * ( DirectRelationshipList ) )
253 {
254 auto rct = ClassRelationship->get_class_type()->get_name();
255 QString RelationshipClassType = QString::fromStdString (rct);
256
257 if ( ItemMap.contains ( RelationshipClassType ) ) //&& !ItemMap[ClassName]->HasArrow (
258 //ItemMap[RelationshipClassType] ) )
259 {
260 QString SchemaCardinality =
263 ItemMap[ClassName], ItemMap[RelationshipClassType],
264 arrow_count[rct],
265 false,
266 ClassRelationship->get_is_composite(),
267 QString::fromStdString ( ClassRelationship->get_name() ), SchemaCardinality );
268 ItemMap[ClassName]->AddArrow ( NewArrow );
269 ItemMap[RelationshipClassType]->AddArrow ( NewArrow );
270 addItem ( NewArrow );
271 //NewArrow->SetLabelScene(this);
272 NewArrow->setZValue ( -1000.0 );
273 NewArrow->UpdatePosition();
274 arrow_count[rct]++;
275 }
276 }
277 }
278
280 if ( DirectSuperClassesList != nullptr )
281 {
282 for ( std::string * SuperClassNameStd : * ( DirectSuperClassesList ) )
283 {
284 QString SuperClassName = QString::fromStdString ( *SuperClassNameStd );
285
286 if ( ItemMap.contains ( SuperClassName ) ) // && !ItemMap[ClassName]->HasArrow (
287 // ItemMap[SuperClassName] ) )
288 {
290 ItemMap[ClassName],
291 ItemMap[SuperClassName],
292 arrow_count[*SuperClassNameStd],
293 true,
294 false, "", "" );
295 ItemMap[ClassName]->AddArrow ( NewArrow );
296 ItemMap[SuperClassName]->AddArrow ( NewArrow );
297 addItem ( NewArrow );
298 //NewArrow->SetLabelScene(this);
299 NewArrow->setZValue ( -1000.0 );
300 NewArrow->UpdatePosition();
301 arrow_count[*SuperClassNameStd]++;
302 }
303 }
304 }
305 }
306 modified(true);
307 return missingItems;
308}
309
311 removeItem ( item );
312 modified(true);
313}
314
316 QList<QPointF> positions ) {
317 for ( int index = 0; index<notes.size(); index++) {
318 auto note = new SchemaGraphicNote (
319 QString("#" + QString::number(m_next_note++)),
320 notes.at(index) );
321 note->setPos ( positions.at ( index ) );
322 addItem(note);
323 }
324
325}
327 if (note == nullptr) {
328 return;
329 }
330 RemoveItemFromScene (note);
331}
332
334{
335 if ( Object == nullptr )
336 {
337 return;
338 }
339
340 Object->RemoveArrows();
341 RemoveItemFromScene ( Object );
342 ItemMap.remove ( Object->GetClassName() );
343}
344
346{
347 ItemMap.clear();
348}
349
350void dbse::SchemaGraphicsScene::mousePressEvent ( QGraphicsSceneMouseEvent * mouseEvent )
351{
352 if ( itemAt ( mouseEvent->scenePos(), QTransform() ) ) {
353 // Save position of item under mouse so we can see if it has been
354 // moved in mouseReleaseEvent
355 m_mouse_item_pos = itemAt(mouseEvent->scenePos(), QTransform())->pos();
356 }
357 if ( mouseEvent->button() != Qt::LeftButton )
358 {
359 return;
360 }
361
362 if ( mouseEvent->widget()->cursor().shape() == Qt::CrossCursor )
363 {
364 m_line = new QGraphicsLineItem ( QLineF ( mouseEvent->scenePos(), mouseEvent->scenePos() ) );
365 m_line->setPen ( QPen ( Qt::black, 2 ) );
366 addItem ( m_line );
367 modified(true);
368 return;
369 }
370
371 QGraphicsScene::mousePressEvent ( mouseEvent );
372}
373
374void dbse::SchemaGraphicsScene::mouseMoveEvent ( QGraphicsSceneMouseEvent * mouseEvent )
375{
376 if ( m_line != nullptr )
377 {
378 QLineF newLine ( m_line->line().p1(), mouseEvent->scenePos() );
379 m_line->setLine ( newLine );
380 }
381 else
382 {
383 QGraphicsScene::mouseMoveEvent ( mouseEvent );
384 }
385}
386
388 modified(false);
389}
390
392 m_modified = state;
393 emit sceneModified(state);
394}
395
397 modified(true);
398}
399void dbse::SchemaGraphicsScene::mouseReleaseEvent ( QGraphicsSceneMouseEvent * mouseEvent )
400{
401 if ( itemAt ( mouseEvent->scenePos(), QTransform() ) ) {
402 auto item = itemAt(mouseEvent->scenePos(), QTransform() );
403 if (!m_mouse_item_pos.isNull()) {
404 modified(m_mouse_item_pos != item->pos());
405 m_mouse_item_pos = QPointF();
406 }
407 }
408 if ( m_line != nullptr )
409 {
410 QList<QGraphicsItem *> startItems = items ( m_line->line().p1() );
411
412 if ( startItems.count() && startItems.first() == m_line )
413 {
414 startItems.removeFirst();
415 }
416
417 QList<QGraphicsItem *> endItems = items ( m_line->line().p2() );
418
419 if ( endItems.count() && endItems.first() == m_line )
420 {
421 endItems.removeFirst();
422 }
423
424 RemoveItemFromScene ( m_line );
425 delete m_line;
426
427 if ( startItems.count() > 0 && endItems.count() > 0
428 && startItems.first() != endItems.first() )
429 {
430
431 bool Inheritance = KernelWrapper::GetInstance().GetInheritanceMode();
432 SchemaGraphicObject * startItem = qgraphicsitem_cast<SchemaGraphicObject *> (
433 startItems.first() );
434 SchemaGraphicObject * endItem = qgraphicsitem_cast<SchemaGraphicObject *> (
435 endItems.first() );
436
437 if ( Inheritance )
438 {
439 startItem->GetClass()->add_super_class ( endItem->GetClassName().toStdString() );
442 startItem, endItem,
443 0,
444 Inheritance,
445 true, "", "" );
446 startItem->AddArrow ( newArrow );
447 endItem->AddArrow ( newArrow );
448 newArrow->setZValue ( -1000.0 );
449 addItem ( newArrow );
450 //newArrow->SetLabelScene(this);
451 newArrow->UpdatePosition();
452 }
453 else
454 {
456 startItem->GetClass(), endItem->GetClassName() );
457 connect ( Editor, SIGNAL ( MakeGraphConnection ( QString, QString, QString ) ), this,
458 SLOT ( DrawArrow ( QString, QString, QString ) ) );
459 Editor->show();
460 }
461 }
462 }
463
464 m_line = nullptr;
465 QGraphicsScene::mouseReleaseEvent ( mouseEvent );
466}
467
469 m_current_note->open_editor();
470}
471
473 remove_note_object(m_current_note);
474}
475
477 addItem(note);
478 modified(true);
479}
483
485 auto note = new SchemaGraphicNote (
486 QString("#") + QString::number(m_next_note++), QString());
487 note->setPos(m_current_pos);
488 auto editor = new SchemaNoteEditor(note);
489 connect(editor, SIGNAL(note_accepted(SchemaGraphicNote*)), this, SLOT(add_note_slot(SchemaGraphicNote*)));
490 connect(editor, SIGNAL(cancelled(SchemaGraphicNote*)), this, SLOT(cancel_note_slot(SchemaGraphicNote*)));
491 editor->show();
492}
493
495 disconnect(m_addclass_connection);
496
497 auto object = new SchemaGraphicObject(class_name);
498 object->setPos(m_current_pos);
499 object->set_inherited_properties_visibility(m_inherited_properties_visible);
500 object->set_highlight_active(m_highlight_active);
501 addItem (object);
503 ItemMap.insert(class_name, object);
504}
506 m_addclass_connection = connect (
507 &KernelWrapper::GetInstance(), SIGNAL ( ClassCreated(QString) ),
508 this, SLOT ( add_class_slot(QString) ) );
510}
511
513{
514 bool WidgetFound = false;
515 QString ClassName = QString::fromStdString ( CurrentObject->GetClass()->get_name() );
516
517 for ( QWidget * Editor : QApplication::allWidgets() )
518 {
519 SchemaClassEditor * Widget = dynamic_cast<SchemaClassEditor *> ( Editor );
520
521 if ( Widget != nullptr )
522 {
523 if ( ( Widget->objectName() ).compare ( ClassName ) == 0 )
524 {
525 Widget->raise();
526 Widget->setVisible ( true );
527 Widget->activateWindow();
528 WidgetFound = true;
529 }
530 }
531 }
532
533 if ( !WidgetFound )
534 {
535 SchemaClassEditor * Editor = new SchemaClassEditor ( CurrentObject->GetClass() );
536 Editor->show();
537 }
538}
539
541 m_highlight_active = !m_highlight_active;
542
543 for ( SchemaGraphicObject * item : ItemMap.values() ) {
544 item->set_highlight_active(m_highlight_active);
545 }
546
547 this->update();
548
549}
550
552 m_inherited_properties_visible = !m_inherited_properties_visible;
553
554 for ( SchemaGraphicObject * item : ItemMap.values() ) {
555 item->set_inherited_properties_visibility(m_inherited_properties_visible);
556 }
557
558 this->update();
559
560}
561
563
564 QString class_name = QString::fromStdString ( CurrentObject->GetClass()->get_name() );
565 OksClass * class_info = KernelWrapper::GetInstance().FindClass ( class_name.toStdString() );
566
567 QStringList super_class_list;
568 QList<QPointF> positions;
569
570 const std::list<std::string *>* direct_classes = class_info->direct_super_classes();
571 if(direct_classes != nullptr) {
572 for(std::string * cl_name : *direct_classes) {
573 super_class_list.push_back(QString::fromStdString(*cl_name));
574 positions.push_back({0,0});
575 }
576 }
577
578 this->AddItemsToScene ( super_class_list, positions );
579
580}
581
583
584 QString class_name = QString::fromStdString ( CurrentObject->GetClass()->get_name() );
585 OksClass * class_info = KernelWrapper::GetInstance().FindClass ( class_name.toStdString() );
586
587 QStringList super_class_list;
588 QList<QPointF> positions;
589
590 const OksClass::FList* all_classes = class_info->all_super_classes();
591 if(all_classes != nullptr) {
592 for(const OksClass* cl : *all_classes) {
593 super_class_list.push_back(QString::fromStdString(cl->get_name()));
594 positions.push_back({0,0});
595 }
596 }
597
598
599 this->AddItemsToScene ( super_class_list, positions );
600
601}
602
604
605 QString class_name = QString::fromStdString ( CurrentObject->GetClass()->get_name() );
606 OksClass * class_info = KernelWrapper::GetInstance().FindClass ( class_name.toStdString() );
607
608 QStringList sub_class_list;
609 QList<QPointF> positions;
610
611 const OksClass::FList* all_classes = class_info->all_sub_classes();
612 if(all_classes != nullptr) {
613 for(const OksClass* cl : *all_classes) {
614 sub_class_list.push_back(QString::fromStdString(cl->get_name()));
615 positions.push_back({0,0});
616 }
617 }
618
619 this->AddItemsToScene ( sub_class_list, positions );
620
621}
622
624
625 QString class_name = QString::fromStdString ( CurrentObject->GetClass()->get_name() );
626 OksClass * class_info = KernelWrapper::GetInstance().FindClass ( class_name.toStdString() );
627
628 QStringList relationship_classes;
629 QList<QPointF> positions;
630
631 const std::list<OksRelationship *> * direct_relationship_list = class_info->direct_relationships();
632 if ( direct_relationship_list != nullptr ) {
633 for(const OksRelationship* rl : *direct_relationship_list) {
634 relationship_classes.push_back(QString::fromStdString(rl->get_type()));
635 positions.push_back({0,0});
636 }
637
638 }
639
640 this->AddItemsToScene ( relationship_classes, positions );
641
642}
643
645
646 QString class_name = QString::fromStdString ( CurrentObject->GetClass()->get_name() );
647 OksClass * class_info = KernelWrapper::GetInstance().FindClass ( class_name.toStdString() );
648
649 QStringList relationship_classes;
650 QList<QPointF> positions;
651
652 const std::list<OksRelationship *> * all_relationship_list = class_info->all_relationships();
653 if ( all_relationship_list != nullptr ) {
654 for(const OksRelationship* rl : *all_relationship_list) {
655 relationship_classes.push_back(QString::fromStdString(rl->get_type()));
656 positions.push_back({0,0});
657 }
658
659 }
660
661 this->AddItemsToScene ( relationship_classes, positions );
662}
663
665{
666 if ( CurrentObject == nullptr )
667 {
668 return;
669 }
670
671 CurrentObject->RemoveArrows();
672 RemoveItemFromScene ( CurrentObject );
673 ItemMap.remove ( CurrentObject->GetClassName() );
674}
675
677{
678 RemoveItemFromScene ( m_current_arrow );
679 m_current_arrow->GetStartItem()->RemoveArrow ( m_current_arrow );
680 m_current_arrow->GetEndItem()->RemoveArrow ( m_current_arrow );
681 m_current_arrow->RemoveArrow();
682}
683
684void dbse::SchemaGraphicsScene::DrawArrow ( QString ClassName, QString RelationshipType,
685 QString RelationshipName )
686{
687 if ( !ItemMap.contains ( ClassName ) || !ItemMap.contains ( RelationshipType ) )
688 {
689 return;
690 }
691
692 SchemaGraphicObject * startItem = ItemMap[ClassName];
693 SchemaGraphicObject * endItem = ItemMap[RelationshipType];
694
695 OksClass * SchemaClass = KernelWrapper::GetInstance().FindClass ( ClassName.toStdString() );
696 OksRelationship * SchemaRelationship = SchemaClass->find_direct_relationship (
697 RelationshipName.toStdString() );
698
699 if ( SchemaRelationship != nullptr )
700 {
701 QString RelationshipCardinality =
704 startItem, endItem,
705 0,
706 false, SchemaRelationship->get_is_composite(),
707 QString::fromStdString ( SchemaRelationship->get_name() ), RelationshipCardinality );
708 startItem->AddArrow ( newArrow );
709 endItem->AddArrow ( newArrow );
710 newArrow->setZValue ( -1000.0 );
711 addItem ( newArrow );
712 //newArrow->SetLabelScene(this);
713 newArrow->UpdatePosition();
714 }
715}
static KernelWrapper & GetInstance()
QString GetCardinalityStringRelationship(dunedaq::oks::OksRelationship *SchemaRelationship) const
dunedaq::oks::OksClass * FindClass(std::string ClassName) const
bool IsFileWritable(const std::string &FileName) const
void AddArrow(SchemaGraphicSegmentedArrow *Arrow)
Arrow API.
void set_highlight_active(bool highlight)
dunedaq::oks::OksClass * GetClass() const
void set_inherited_properties_visibility(bool visible)
Graphic API.
QStringList AddItemsToScene(QStringList SchemaClasses, QList< QPointF > Positions)
SchemaGraphicsScene(QObject *parent=nullptr)
void mouseReleaseEvent(QGraphicsSceneMouseEvent *mouseEvent)
void dragEnterEvent(QGraphicsSceneDragDropEvent *event)
Drag & Drop.
void contextMenuEvent(QGraphicsSceneContextMenuEvent *event)
void mousePressEvent(QGraphicsSceneMouseEvent *mouseEvent)
void add_note_slot(SchemaGraphicNote *)
void dropEvent(QGraphicsSceneDragDropEvent *event)
void add_notes(QStringList notes, QList< QPointF > positions)
void mouseMoveEvent(QGraphicsSceneMouseEvent *mouseEvent)
void DrawArrow(QString ClassName, QString RelationshipType, QString RelationshipName)
void remove_note_object(SchemaGraphicNote *obj)
void RemoveItemFromScene(QGraphicsItem *item)
void dragMoveEvent(QGraphicsSceneDragDropEvent *event)
void RemoveClassObject(SchemaGraphicObject *Object)
void cancel_note_slot(SchemaGraphicNote *)
The OKS class.
Definition class.hpp:200
const FList * all_sub_classes() const noexcept
Definition class.hpp:466
OksRelationship * find_direct_relationship(const std::string &name) const noexcept
Find direct relationship.
Definition class.cpp:1173
void add_super_class(const std::string &name)
Definition class.cpp:878
const FList * all_super_classes() const noexcept
Definition class.hpp:408
const std::list< OksRelationship * > * direct_relationships() const noexcept
Definition class.hpp:590
const std::list< std::string * > * direct_super_classes() const noexcept
Definition class.hpp:413
std::list< OksClass *, boost::fast_pool_allocator< OksClass * > > FList
Definition class.hpp:235
const std::list< OksRelationship * > * all_relationships() const noexcept
Definition class.hpp:585
bool get_is_composite() const noexcept
const std::string & get_name() const noexcept