mirror of
https://github.com/ra3xdh/qucs_s
synced 2025-03-28 21:13:26 +00:00

This class inherits from Component and is meant to be inherited by all simulation components to share the symbol drawing logic.
20 lines
551 B
C++
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 |