MCPcopy Create free account
hub / github.com/OpenDDS/OpenDDS / Viewer

Method Viewer

tools/monitor/Viewer.cpp:54–173  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52namespace Monitor {
53
54 Viewer::Viewer( const Options& options, QMainWindow* parent)
55 : QMainWindow( parent),
56 options_( options),
57 dataSource_( 0),
58 model_( 0),
59 graphView(0),
60 image(0),
61 nodeScene(0)
62 {
63 // Initialize the GUI and connect the signals and slots.
64 this->ui.setupUi( this);
65
66 // no rendering artifacts
67 this->ui.nodeView->setViewportUpdateMode(QGraphicsView::FullViewportUpdate);
68
69 // context menu creation
70 treeMenu.setTitle("Tree View");
71 treeMenu.addAction(EXPAND_ACTION);
72 treeMenu.addAction(SELECTION_TO_NODE_VIEW);
73 treeMenu.addAction(SELECTION_TO_GRAPH_VIEW);
74 treeMenu.addAction(NODE_VIEW_OPTIONS_ACTION);
75 treeMenu.addAction(GRAPH_OPTIONS_ACTION);
76
77 nodeViewMenu.setTitle("Node View");
78 nodeViewMenu.addAction(NODE_VIEW_UPDATE_ACTION);
79 nodeViewMenu.addAction(NODE_VIEW_OPTIONS_ACTION);
80 nodeViewMenu.addAction(NODE_VIEW_TO_FILE);
81
82 nodeMenu.setTitle("Node Options");
83 // TODO: implement node options
84 //nodeMenu.addAction(NODE_EXPAND);
85 //nodeMenu.addAction(NODE_COLLAPSE);
86 //nodeMenu.addAction(NODE_DELETE);
87 //nodeMenu.addAction(NODE_CONNECT);
88 //nodeMenu.addAction(NODE_DISCONNECT);
89 //nodeMenu.addAction(NODE_RESTORE_CONNECTIONS);
90
91 graphMenu.setTitle("Graph View");
92 graphMenu.addAction(GRAPH_UPDATE_ACTION);
93 graphMenu.addAction(GRAPH_OPTIONS_ACTION);
94 graphMenu.addAction(GRAPH_VIEW_TO_FILE);
95
96 // context menu connections
97 this->ui.repoView->setContextMenuPolicy(Qt::CustomContextMenu);
98 this->ui.nodeView->setContextMenuPolicy(Qt::CustomContextMenu);
99 this->ui.scrollArea->setContextMenuPolicy(Qt::CustomContextMenu);
100
101 connect(this->ui.repoView, SIGNAL(customContextMenuRequested(const QPoint&)),
102 this, SLOT(treeContextMenu(const QPoint&)));
103 connect(this->ui.nodeView, SIGNAL(customContextMenuRequested(const QPoint&)),
104 this, SLOT(nodeContextMenu(const QPoint&)));
105 connect(this->ui.scrollArea, SIGNAL(customContextMenuRequested(const QPoint&)),
106 this, SLOT(graphContextMenu(const QPoint&)));
107
108 //
109 // SIGNAL to SLOT connections (GUI to behavior connections).
110 //
111

Callers

nothing calls this directly

Calls 5

closeFunction · 0.85
headerMethod · 0.80
getIorListMethod · 0.80
isEmptyMethod · 0.45
countMethod · 0.45

Tested by

no test coverage detected