1 #ifndef TOOLS_GRAPH_ANALYSIS_GUI_MARGIN_AREA_HPP 2 #define TOOLS_GRAPH_ANALYSIS_GUI_MARGIN_AREA_HPP 18 , mpGraphWidget(widget)
37 throw std::runtime_error(
"graph_analysis::gui::MarginArea::sizeHint: given MarginArea type is not supported");
44 QPainter painter(
this);
48 painter.fillRect(event->rect(), Qt::red);
49 painter.drawText(0,50,50,20, Qt::AlignLeft,
"LEFT");
52 painter.fillRect(event->rect(), Qt::blue);
53 painter.drawText(0,50,50,20, Qt::AlignRight,
"RIGHT");
56 painter.fillRect(event->rect(), Qt::yellow);
57 painter.drawText(50,0,50,20, Qt::AlignTop,
"TOP");
60 painter.fillRect(event->rect(), Qt::green);
61 painter.drawText(50,0,50,20, Qt::AlignBottom,
"BOTTOM");
78 #endif // TOOLS_GRAPH_ANALYSIS_GUI_MARGIN_AREA_HPP MarginArea(GraphWidget *widget, Type type)
Definition: MarginArea.hpp:16
Definition: MarginArea.hpp:14
Type
Definition: MarginArea.hpp:14
Definition: MarginArea.hpp:11
Definition: MarginArea.hpp:14
Main namespace of the graph analysis library.
Definition: BFS.cpp:3
void paintEvent(QPaintEvent *event)
Definition: MarginArea.hpp:42
QSize sizeHint() const
Definition: MarginArea.hpp:23
Definition: MarginArea.hpp:14
Definition: MarginArea.hpp:14
Definition: MarginArea.hpp:14