20 #include <QStringList>
96 qDebug() <<
"Module::registerDynamicComponents()";
103 while (i.hasNext()) {
117 m->
category = QObject::tr(
"verilog-a user devices");
123 QString Name, Model, vaBitmap;
161 #define REGISTER_MOD_1(cat,val) \
162 registerModule (cat, &val::info)
163 #define REGISTER_MOD_2(cat,val,inf1,inf2) \
164 registerModule (cat, &val::inf1); \
165 registerModule (cat, &val::inf2)
166 #define REGISTER_MOD_3(cat,val,inf1,inf2,inf3) \
167 registerModule (cat, &val::inf1); \
168 registerModule (cat, &val::inf2); \
169 registerModule (cat, &val::inf3)
171 #define REGISTER_COMP_1(cat,val) \
172 registerComponent (cat, &val::info)
173 #define REGISTER_COMP_2(cat,val,inf1,inf2) \
174 registerComponent (cat, &val::inf1); \
175 registerComponent (cat, &val::inf2)
176 #define REGISTER_COMP_3(cat,val,inf1,inf2,inf3) \
177 registerComponent (cat, &val::inf1); \
178 registerComponent (cat, &val::inf2); \
179 registerComponent (cat, &val::inf3)
181 #define REGISTER_LUMPED_1(val) \
182 REGISTER_COMP_1 (QObject::tr("lumped components"),val)
183 #define REGISTER_LUMPED_2(val,inf1,inf2) \
184 REGISTER_COMP_2 (QObject::tr("lumped components"),val,inf1,inf2)
185 #define REGISTER_SOURCE_1(val) \
186 REGISTER_COMP_1 (QObject::tr("sources"),val)
187 #define REGISTER_PROBE_1(val) \
188 REGISTER_COMP_1 (QObject::tr("probes"),val)
189 #define REGISTER_TRANS_1(val) \
190 REGISTER_COMP_1 (QObject::tr("transmission lines"),val)
191 #define REGISTER_NONLINEAR_1(val) \
192 REGISTER_COMP_1 (QObject::tr("nonlinear components"),val)
193 #define REGISTER_NONLINEAR_2(val,inf1,inf2) \
194 REGISTER_COMP_2 (QObject::tr("nonlinear components"),val,inf1,inf2)
195 #define REGISTER_NONLINEAR_3(val,inf1,inf2,inf3) \
196 REGISTER_COMP_3 (QObject::tr("nonlinear components"),val,inf1,inf2,inf3)
197 #define REGISTER_VERILOGA_1(val) \
198 REGISTER_COMP_1 (QObject::tr("verilog-a devices"),val)
199 #define REGISTER_VERILOGA_2(val,inf1,inf2) \
200 REGISTER_COMP_2 (QObject::tr("verilog-a devices"),val,inf1,inf2)
201 #define REGISTER_DIGITAL_1(val) \
202 REGISTER_COMP_1 (QObject::tr("digital components"),val)
203 #define REGISTER_FILE_1(val) \
204 REGISTER_COMP_1 (QObject::tr("file components"),val)
205 #define REGISTER_FILE_3(val,inf1,inf2,inf3) \
206 REGISTER_COMP_3 (QObject::tr("file components"),val,inf1,inf2,inf3)
207 #define REGISTER_SIMULATION_1(val) \
208 REGISTER_COMP_1 (QObject::tr("simulations"),val)
209 #define REGISTER_DIAGRAM_1(val) \
210 REGISTER_MOD_1 (QObject::tr("diagrams"),val)
211 #define REGISTER_DIAGRAM_2(val,inf1,inf2) \
212 REGISTER_MOD_2 (QObject::tr("diagrams"),val,inf1,inf2)
213 #define REGISTER_PAINT_1(val) \
214 REGISTER_MOD_1 (QObject::tr("paintings"),val)
215 #define REGISTER_PAINT_2(val,inf1,inf2) \
216 REGISTER_MOD_2 (QObject::tr("paintings"),val,inf1,inf2)
217 #define REGISTER_EXTERNAL_1(val) \
218 REGISTER_COMP_1 (QObject::tr("external sim components"),val)
467 res.append (cat->
Name);
476 Q3PtrList<Module> res;
479 if (category == cat->
Name)
490 for (
int i = 0; cat; cat =
Categories.next (), i++) {
491 if (category == cat->
Name)
#define REGISTER_DIAGRAM_2(val, inf1, inf2)
static void registerModule(QString, pInfoFunc)
Defines drawing elements for schematics.
#define REGISTER_DIGITAL_1(val)
static Component * getComponent(QString)
Q3PtrList< Module > Content
#define REGISTER_PAINT_1(val)
#define REGISTER_VERILOGA_2(val, inf1, inf2)
static void registerModules(void)
static Q3Dict< Module > Modules
Element *(* pInfoFunc)(QString &, char *&, bool)
static void unregisterModules(void)
static QStringList getCategories(void)
static int getModulesNr(QString)
#define REGISTER_SOURCE_1(val)
#define REGISTER_TRANS_1(val)
static void intoCategory(Module *)
#define REGISTER_LUMPED_1(val)
#define REGISTER_LUMPED_2(val, inf1, inf2)
#define REGISTER_NONLINEAR_1(val)
static Q3PtrList< Module > getModules(QString)
#define REGISTER_PROBE_1(val)
static Element * info(QString &, QString &, bool getNewOne=false, QString filename="")
vacomponent::info is used to either get information or create objects.
static QMap< QString, QString > vaComponents
#define REGISTER_FILE_3(val, inf1, inf2, inf3)
static void registerComponent(QString, pInfoFunc)
#define REGISTER_FILE_1(val)
#define REGISTER_PAINT_2(val, inf1, inf2)
static void registerDynamicComponents(void)
#define REGISTER_NONLINEAR_3(val, inf1, inf2, inf3)
static Q3PtrList< Category > Categories
#define REGISTER_EXTERNAL_1(val)
#define REGISTER_SIMULATION_1(val)
#define REGISTER_VERILOGA_1(val)
#define REGISTER_NONLINEAR_2(val, inf1, inf2)
#define REGISTER_DIAGRAM_1(val)