qucs_s/qucs/components/simulation.h
Andrey Kalmykov 5a38fc742d Add SimulationComponent class
This class inherits from Component and is meant to be inherited
by all simulation components to share the symbol drawing logic.
2024-06-24 09:44:28 +02:00

20 lines
551 B
C++

#ifndef SIMULATION_H
#define SIMULATION_H
#include "component.h"
#include <QString>
namespace qucs::component {
class SimulationComponent : public Component {
private:
QString label_text;
void updateComponentBounds(const QRect& label_bounds);
QPen pen() const;
protected:
void initSymbol(const QString& label);
void drawSymbol(QPainter* p) override;
// Override in your subclass if you want other color
// for your simulation component
virtual Qt::GlobalColor color() const { return Qt::darkBlue; }
};
}
#endif