|
Motiv
Marvelous OTF2 Traces Interactive Visualizer
|
A generic InformationDockElementStrategy for specific TimedElements. More...
#include <InformationDockElementBaseStrategy.hpp>


Public Member Functions | |
| virtual T * | applicable (TimedElement *t) |
| Checks if the strategy is applicable for an element and returns the casted element if so. More... | |
| void | setup (QFormLayout *layout) override |
| Sets up the QFormLayout. More... | |
| virtual void | updateView (QFormLayout *layout, T *element) |
| Updates the view. More... | |
| bool | update (QFormLayout *layout, TimedElement *element) override |
| Sets up the QFormLayout. More... | |
| std::string | title () override |
| Returns the title the information dock should show. More... | |
| virtual void | setup (QFormLayout *) |
| Sets up the QFormLayout. More... | |
| virtual bool | update (QFormLayout *, TimedElement *) |
| Updates the view to show details about a newly selected element. More... | |
| virtual std::string | title () |
| Returns the title the information dock should show. More... | |
Static Public Member Functions | |
| static QString | tr (const char *s, const char *c=nullptr, int n=-1) |
Protected Attributes | |
| TimeUnitLabel * | startField = nullptr |
| TimeUnitLabel * | endField = nullptr |
| TimeUnitLabel * | runtimeField = nullptr |
A generic InformationDockElementStrategy for specific TimedElements.
This class abstracts a type check for selected elements. Derived classes can specify with the template parameter for which type of element they visualise information. Derived classes can overwrite the updateView function and get the selected element casted to their accepted type if it is of their accepted type.
| T | Type of TimedElement derived strategies accept |
Definition at line 34 of file InformationDockElementBaseStrategy.hpp.
|
inlinevirtual |
Checks if the strategy is applicable for an element and returns the casted element if so.
By default this function does a dynamic_cast to check whether the strategy is applicable to for the element. A derived class can overwrite this behaviour if there are other options to identify the runtime type.
| t | The newly selected element. |
Definition at line 53 of file InformationDockElementBaseStrategy.hpp.
|
overridevirtual |
Sets up the QFormLayout.
In derived classes this function should be overwritten and fields and rows should be added to the form layout.
| layout | The layout of the detailed window pane |
Reimplemented from InformationDockElementStrategy.
Definition at line 23 of file InformationDockElementBaseStrategy.cpp.
|
overridevirtual |
Returns the title the information dock should show.
Reimplemented from InformationDockElementStrategy.
Definition at line 59 of file InformationDockElementBaseStrategy.cpp.
|
inlinestatic |
Definition at line 39 of file InformationDockElementBaseStrategy.hpp.
|
overridevirtual |
Sets up the QFormLayout.
In derived classes this function should be overwritten and fields and rows should be added to the form layout.
| layout | The layout of the detailed window pane |
Reimplemented from InformationDockElementStrategy.
Definition at line 49 of file InformationDockElementBaseStrategy.cpp.
|
virtual |
Updates the view.
Derived classes should overwrite this function but call the base implementation as it updates the time fields. The element pointer is guaranteed to be not null.
| layout | The layout of the detailed window pane |
| element | The newly selected element |
Definition at line 35 of file InformationDockElementBaseStrategy.cpp.
|
protected |
The end field displaying the end time of the element
Definition at line 83 of file InformationDockElementBaseStrategy.hpp.
|
protected |
The runtime field displaying the runtime of the element
Definition at line 84 of file InformationDockElementBaseStrategy.hpp.
|
protected |
The start field displaying the start time of the element
Definition at line 82 of file InformationDockElementBaseStrategy.hpp.