Qucs-GUI  0.0.18
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Static Public Member Functions | Protected Member Functions
vacomponent Class Reference

#include <vacomponent.h>

Inheritance diagram for vacomponent:
Component Element

Public Member Functions

 vacomponent (QString filename)
 vacomponent::vacomponent More...
 
 ~vacomponent ()
 
ComponentnewOne (QString filename)
 vacomponent::newOne is used to mouse drop new items into the schematic. More...
 
- Public Member Functions inherited from Component
 Component ()
 
virtual ~Component ()
 
virtual ComponentnewOne ()
 
virtual void recreate (Schematic *)
 
QString getNetlist ()
 
QString get_VHDL_Code (int)
 
QString get_Verilog_Code (int)
 
void paint (ViewPainter *)
 
void paintScheme (Schematic *)
 
void print (ViewPainter *, float)
 
void setCenter (int, int, bool relative=false)
 
void getCenter (int &, int &)
 
int textSize (int &, int &)
 
void Bounding (int &, int &, int &, int &)
 
void entireBounds (int &, int &, int &, int &, float)
 
bool getSelected (int, int)
 
int getTextSelected (int, int, float)
 
void rotate ()
 
void mirrorX ()
 
void mirrorY ()
 
QString save ()
 
bool load (const QString &)
 
virtual QString getSubcircuitFile ()
 
virtual void setSchematic (Schematic *p)
 
- Public Member Functions inherited from Element
 Element ()
 
virtual ~Element ()
 

Static Public Member Functions

static Elementinfo (QString &, QString &, bool getNewOne=false, QString filename="")
 vacomponent::info is used to either get information or create objects. More...
 

Protected Member Functions

void createSymbol (QString filename)
 vacomponent::createSymbol Constructor call this to create the symbol. More...
 
- Protected Member Functions inherited from Component
virtual QString netlist ()
 
virtual QString vhdlCode (int)
 
virtual QString verilogCode (int)
 
int analyseLine (const QString &, int)
 
bool getIntegers (const QString &, int *i1=0, int *i2=0, int *i3=0, int *i4=0, int *i5=0, int *i6=0)
 
bool getPen (const QString &, QPen &, int)
 
bool getBrush (const QString &, QBrush &, int)
 
void copyComponent (Component *)
 
PropertygetProperty (const QString &)
 

Additional Inherited Members

- Data Fields inherited from Component
bool mirroredX
 
int rotated
 
Q3PtrList< LineLines
 
Q3PtrList< struct ArcArcs
 
Q3PtrList< AreaRects
 
Q3PtrList< AreaEllips
 
Q3PtrList< PortPorts
 
Q3PtrList< TextTexts
 
Q3PtrList< PropertyProps
 
int isActive
 
int tx
 
int ty
 
bool showName
 
QString Model
 
QString Name
 
QString Description
 
- Data Fields inherited from Element
bool isSelected
 
int Type
 
int cx
 
int cy
 
int x1
 
int y1
 
int x2
 
int y2
 
- Protected Attributes inherited from Component
SchematiccontainingSchematic
 

Detailed Description

Definition at line 36 of file vacomponent.h.

Constructor & Destructor Documentation

vacomponent::vacomponent ( QString  filename)

vacomponent::vacomponent

Parameters
filenameFile (JSON) containing the symbol paintins and properties.
Todo:
check if JSON is error free
Todo:
Need to destroy engine?
Todo:
append units to description
Todo:
what if there are no properties?

TODO adjust location of text

Definition at line 32 of file vacomponent.cpp.

vacomponent::~vacomponent ( )
inline

Definition at line 40 of file vacomponent.h.

Member Function Documentation

void vacomponent::createSymbol ( QString  filename)
protected

vacomponent::createSymbol Constructor call this to create the symbol.

Parameters
filenameFile (JSON) containing the symbol paintins and properties. It reads the JSON file and parses the symbol paintings. Data is appended to to the appropriate lists, Lines, Rects, Ellips, ...

Definition at line 135 of file vacomponent.cpp.

Element * vacomponent::info ( QString &  Name,
QString &  BitmapFile,
bool  getNewOne = false,
QString  filename = "" 
)
static

vacomponent::info is used to either get information or create objects.

Parameters
NameModel name, returned by reference
BitmapFileBitmap file for the dock, returned by reference
getNewOneif set return new object based on JSON file
filenameFile (JSON) containing the symbol paintins and properties.
Returns
Null or a new Element if getNewOne is true Used to get Name and BitmapFile. It can also create new objects from symbol file.

Default BitmapFile is [modulename] The BitmapFile JSON entry can be modified in

See Also
LoadDialog::slotChangeIcon()

Definition at line 110 of file vacomponent.cpp.

Component * vacomponent::newOne ( QString  filename)

vacomponent::newOne is used to mouse drop new items into the schematic.

Parameters
filenameFile (JSON) containing the symbol paintins and properties.
Returns
Component based on the filename Used by mouseactions to drop new items into the schematic.

Definition at line 90 of file vacomponent.cpp.


The documentation for this class was generated from the following files: