77 lines
2.0 KiB
C++
Executable File
77 lines
2.0 KiB
C++
Executable File
/**
|
|
* @RDE_HEADER@
|
|
* passive container for view which only draws QPushButtons to save ressources
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
* Created by Mike Wille, SLSE, 2014-10-01
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "EventList.h"
|
|
#include "LineMap.h"
|
|
#include "Range.h"
|
|
|
|
#include <QObject>
|
|
|
|
|
|
class QPainter;
|
|
class QStyleOptionViewItem;
|
|
|
|
|
|
namespace LtsTimelineClassic
|
|
{
|
|
|
|
/**
|
|
* @brief passive container for view which only draws QPushButtons to save ressources
|
|
* contains many Events (EventWidget)
|
|
* only paints the widgets (widgets are not user-accessible)
|
|
*/
|
|
class PassiveEventContainer: public QObject
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
/**
|
|
* @brief sets all required values in class and with the given event list
|
|
* @param eventList event list to manage by this pevcon
|
|
* @param parent parent
|
|
*/
|
|
explicit PassiveEventContainer(bool ignoreKnownRanges, QObject *parent = nullptr);
|
|
|
|
~PassiveEventContainer();
|
|
|
|
/**
|
|
* @brief draws all widgets on itself (which lies directly on the view) by considering the parameters
|
|
* @param painter painter to draw all containers on the view
|
|
* @param option style options of coherant row & column
|
|
* @param max last event in timeline in seconds since epoch
|
|
* @param min first event in timeline in seconds since epoch
|
|
* @param scrollBarPosition scrollbar positiion in seconds since epoch
|
|
* @param zoomFactor zoom factor in percent points
|
|
*/
|
|
void paint(QPainter *painter, const QStyleOptionViewItem &option, const LineMap &lineMap, const QVector<Range> &knownRanges) const;
|
|
|
|
/**
|
|
* @brief returns event list of pevcon (to create a new acecon which needs a event list)
|
|
* @return event list
|
|
*/
|
|
EventGraphicList getEventGraphicList() const;
|
|
|
|
/**
|
|
* @brief sets event list of pevcon
|
|
* @eventList new event list
|
|
*/
|
|
void setEventList(const EventGraphicList &eventGraphicList);
|
|
|
|
private:
|
|
EventGraphicList m_eventGraphicList;
|
|
bool m_ignoreKnownRanges;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
Q_DECLARE_METATYPE(LtsTimelineClassic::PassiveEventContainer *)
|