18#include "TimeUnitLabel.hpp"
19#include "src/utils.hpp"
22#include "InformationDock.hpp"
27 setWindowTitle(tr(
"Details"));
30InformationDock::~InformationDock() {
31 delete this->element_;
32 for(
auto &item : this->strategies_) {
41 for (
auto &item: strategies_) {
42 auto widget = item.first;
43 auto strategy = item.second;
44 if(strategy->update(
static_cast<QFormLayout *
>(widget->layout()), element_)) {
46 setWindowTitle(
"Details - " + QString::fromStdString(strategy->title()));
52void InformationDock::zoomIntoViewPressed() {
67 auto widget =
new QWidget();
68 auto layout =
new QFormLayout(widget);
69 layout->setAlignment(Qt::AlignLeading | Qt::AlignTop);
73 auto zoomIntoViewButton =
new QPushButton(tr(
"Zoom into &view"));
74 connect(zoomIntoViewButton, SIGNAL(clicked()),
this, SLOT(zoomIntoViewPressed()));
75 layout->addWidget(zoomIntoViewButton);
77 widget->setLayout(layout);
79 strategies_.emplace_back(widget, s);
A base class for all elements with a start and end time.
virtual types::TraceTime getDuration() const
Returns the duration of the current object.
virtual types::TraceTime getEndTime() const =0
Returns the end time of the current object.
virtual types::TraceTime getStartTime() const =0
Returns the start time of the current object.