Qucs-GUI  0.0.18
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
vacomponent.h
Go to the documentation of this file.
1 /***************************************************************************
2  vacomponent.h
3  -------------
4  begin : Thur Feb 21 2014
5  copyright : (C) 2014 by Guilherme Brondani Torri
6  email : guitorri AT gmail DOT com
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #ifndef VACOMPONENT_H
19 #define VACOMPONENT_H
20 
21 #include "component.h"
22 
23 #include <QFile>
24 #include <QTextStream>
25 #include <QScriptEngine>
26 #include <QScriptValue>
27 #include <QScriptValueIterator>
28 
29 #include <QDebug>
30 
36 class vacomponent : public Component
37 {
38  public:
39  vacomponent(QString filename);
40  ~vacomponent() { };
41  Component* newOne(QString filename);
42  static Element* info(QString&, QString &,
43  bool getNewOne=false, QString filename="");
44  protected:
45  void createSymbol(QString filename);
46 
47 };
48 
49 //
50 QString getData(QString filename);
51 double getDouble(QScriptValue data, QString prop);
52 QString getString(QScriptValue data, QString prop);
53 
54 #endif /* vacomponent_H */
virtual Component * newOne()
Definition: component.cpp:70
QString getData(QString filename)
getData Reads the JSON file
void createSymbol(QString filename)
vacomponent::createSymbol Constructor call this to create the symbol.
QString getString(QScriptValue data, QString prop)
getString Helper to get a property out of a JSON script
double getDouble(QScriptValue data, QString prop)
getDouble Helper to get a property out of a JSON script
static Element * info(QString &, QString &, bool getNewOne=false, QString filename="")
vacomponent::info is used to either get information or create objects.
Superclass of all schematic drawing elements.
Definition: element.h:142
vacomponent(QString filename)
vacomponent::vacomponent
Definition: vacomponent.cpp:32