Minsky
schema3::ItemBase Struct Reference

#include <schema3.h>

Inheritance diagram for schema3::ItemBase:
Inheritance graph
Collaboration diagram for schema3::ItemBase:
Collaboration graph

Public Member Functions

 ItemBase ()
 
 ItemBase (int id, const minsky::Item &it, const std::vector< int > &ports)
 
 ItemBase (const schema2::Item &it, const std::string &type="Item")
 
- Public Member Functions inherited from minsky::PlotOptions< Note >
 PlotOptions ()=default
 
 PlotOptions (const Note &x)
 
PlotOptionsoperator= (const PlotWidget &plot)
 
void applyPlotOptions (PlotWidget &plot) const
 

Public Attributes

int id =-1
 
std::string type
 
float x =0
 
float y =0
 position in canvas, or within group More...
 
float itemTabX =nan("")
 
float itemTabY =nan("")
 
float scaleFactor =1
 scale factor of item on canvas, or within group More...
 
double rotation =0
 rotation of icon, in degrees More...
 
float width =10
 
float height =10
 
std::vector< int > ports
 
bool bookmark =false
 
- Public Attributes inherited from minsky::PlotOptions< Note >
Optional< std::string > name
 
Optional< bool > logx
 
Optional< bool > logy
 
Optional< bool > ypercent
 
Optional< bool > grid
 
Optional< bool > subgrid
 
Optional< minsky::PlotWidget::PlotType > plotType
 
Optional< std::string > xlabel
 
Optional< std::string > ylabel
 
Optional< std::string > y1label
 
Optional< int > nxTicks
 
Optional< int > nyTicks
 
Optional< double > xtickAngle
 
Optional< double > exp_threshold
 
double xmin
 
double xmax
 
double ymin
 
double ymax
 
double y1min
 
double y1max
 
unsigned symbolEvery
 
Optional< ecolab::Plot::Side > legend
 
Optional< LegendGeometrylegendGeometry
 
Optional< std::vector< ecolab::Plot::LineStyle > > palette
 
Optional< std::vector< std::string > > horizontalMarkers
 
Optional< std::vector< std::string > > verticalMarkers
 

Detailed Description

Definition at line 66 of file schema3.h.

Constructor & Destructor Documentation

◆ ItemBase() [1/3]

schema3::ItemBase::ItemBase ( )
inline

Definition at line 77 of file schema3.h.

77 {}

◆ ItemBase() [2/3]

schema3::ItemBase::ItemBase ( int  id,
const minsky::Item it,
const std::vector< int > &  ports 
)
inline

Definition at line 78 of file schema3.h.

78  :
79  minsky::PlotOptions<Note>(Note(it)), id(id), type(it.classType()),
80  x(it.m_x), y(it.m_y), scaleFactor(it.m_sf),
81  rotation(it.rotation()), width(it.iWidth()), height(it.iHeight()), ports(ports), bookmark(it.bookmark) {}
std::vector< int > ports
Definition: schema3.h:75
float iHeight() const
Definition: item.h:224
float m_sf
scale factor of item on canvas, or within group
Definition: item.h:174
float iWidth() const
Definition: item.h:217
float scaleFactor
scale factor of item on canvas, or within group
Definition: schema3.h:72
bool bookmark
Is this item also a bookmark?
Definition: noteBase.h:33
double rotation
rotation of icon, in degrees
Definition: schema3.h:73
virtual std::string classType() const
Definition: item.h:234
float m_y
position in canvas, or within group
Definition: item.h:173
float m_x
Definition: item.h:173
std::string type
Definition: schema3.h:69
float y
position in canvas, or within group
Definition: schema3.h:70
double rotation() const
Definition: item.h:211

◆ ItemBase() [3/3]

schema3::ItemBase::ItemBase ( const schema2::Item it,
const std::string &  type = "Item" 
)
inline

Definition at line 82 of file schema3.h.

82  :
83  minsky::PlotOptions<Note>(it), id(it.id), type(type), x(it.x), y(it.y),
84  rotation(it.rotation), width(it.width? *it.width: 0), height(it.height?*it.height:0),
85  ports(it.ports) {}
float y
position in canvas, or within group
Definition: schema2.h:72
std::vector< int > ports
Definition: schema3.h:75
Optional< float > height
Definition: schema2.h:96
double rotation
rotation of icon, in degrees
Definition: schema2.h:74
Optional< float > width
Definition: schema2.h:96
std::vector< int > ports
Definition: schema2.h:75
double rotation
rotation of icon, in degrees
Definition: schema3.h:73
std::string type
Definition: schema3.h:69
float y
position in canvas, or within group
Definition: schema3.h:70

Member Data Documentation

◆ bookmark

bool schema3::ItemBase::bookmark =false

Definition at line 76 of file schema3.h.

Referenced by schema3::populateItem().

◆ height

float schema3::ItemBase::height =10

Definition at line 74 of file schema3.h.

Referenced by schema3::populateItem().

◆ id

int schema3::ItemBase::id =-1

Definition at line 68 of file schema3.h.

◆ itemTabX

float schema3::ItemBase::itemTabX =nan("")

Definition at line 71 of file schema3.h.

◆ itemTabY

float schema3::ItemBase::itemTabY =nan("")

Definition at line 71 of file schema3.h.

◆ ports

std::vector<int> schema3::ItemBase::ports

Definition at line 75 of file schema3.h.

Referenced by schema3::populateItem().

◆ rotation

double schema3::ItemBase::rotation =0

rotation of icon, in degrees

Definition at line 73 of file schema3.h.

Referenced by schema3::populateItem().

◆ scaleFactor

float schema3::ItemBase::scaleFactor =1

scale factor of item on canvas, or within group

Definition at line 72 of file schema3.h.

Referenced by schema3::populateItem().

◆ type

std::string schema3::ItemBase::type

Definition at line 69 of file schema3.h.

◆ width

float schema3::ItemBase::width =10

Definition at line 74 of file schema3.h.

Referenced by schema3::populateItem().

◆ x

float schema3::ItemBase::x =0

Definition at line 70 of file schema3.h.

Referenced by schema3::populateItem().

◆ y

float schema3::ItemBase::y =0

position in canvas, or within group

Definition at line 70 of file schema3.h.

Referenced by schema3::populateItem().


The documentation for this struct was generated from the following file: