Files

65 lines
1.4 KiB
C++

/*
* Copyright (c) 2025 Fraunhofer IESE. All rights reserved.
*
* Authors:
* Iron Prando da Silva
*/
#pragma once
#include "businessObjects/timespan.h"
#include "presentation/tracedrawingproperties.h"
#include <QPainter>
#include <QString>
#include <QStringList>
#include <memory>
#include <qwt_scale_map.h>
class Phase;
enum DependencyType
{
IntraBank,
IntraBankGroup,
IntraBankInGroup,
IntraRank,
IntraLogicalRank,
IntraPhysicalRank,
IntraDIMMRank,
InterRank,
InterDIMMRank,
};
class PhaseDependency
{
public:
PhaseDependency(DependencyType type, QString timeDependency, std::shared_ptr<Phase> dependency);
PhaseDependency(DependencyType type, QString timeDependency);
~PhaseDependency();
bool isVisible() { return !mIsInvisible; }
bool draw(QPoint& end,
const TraceDrawingProperties& drawingProperties,
QPainter* painter,
const QwtScaleMap& xMap,
const QwtScaleMap& yMap);
static QString dependencyTypeName(DependencyType);
protected:
DependencyType mType;
QString mTimeDependency;
std::shared_ptr<Phase> mDependency;
bool mIsInvisible = false;
void mDraw(QPoint& end,
double depY,
const TraceDrawingProperties& drawingProperties,
QPainter* painter,
const QwtScaleMap& xMap,
const QwtScaleMap& yMap);
};