Qucs-GUI  0.0.18
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
module.h
Go to the documentation of this file.
1 //Added by qt3to4:
2 #include <Q3PtrList>
3 #include <Q3Dict>
4 #include <QMap>
5 /***************************************************************************
6  module.h
7  ----------
8  begin : Thu Nov 5 2009
9  copyright : (C) 2009 by Stefan Jahn
10  email : stefan@lkcc.org
11  ***************************************************************************/
12 
13 /***************************************************************************
14  * *
15  * This program is free software; you can redistribute it and/or modify *
16  * it under the terms of the GNU General Public License as published by *
17  * the Free Software Foundation; either version 2 of the License, or *
18  * (at your option) any later version. *
19  * *
20  ***************************************************************************/
21 
22 #ifndef MODULE_H
23 #define MODULE_H
24 
25 // function typedefs for circuits and analyses
26 typedef Element * (* pInfoFunc) (QString&, char * &, bool);
27 typedef Element * (* pInfoVAFunc) (QString&, QString&, bool, QString);
28 typedef Component * (* pCreatorFunc) ();
29 
30 class Module
31 {
32  public:
33  Module ();
34  ~Module ();
35  static void registerModule (QString, pInfoFunc);
36  static void registerComponent (QString, pInfoFunc);
37  static void intoCategory (Module *);
38  static Component * getComponent (QString);
39  static void registerDynamicComponents(void);
40 
41  public:
42  static Q3Dict<Module> Modules;
43  static QMap<QString, QString> vaComponents;
44 
45  public:
46  static void registerModules (void);
47  static void unregisterModules (void);
48 
49  public:
52  QString category;
53 };
54 
55 class Category
56 {
57  public:
58  Category ();
59  Category (const QString);
60  ~Category ();
61 
62  public:
63  static Q3PtrList<Category> Categories;
64 
65  public:
66  static QStringList getCategories (void);
67  static Q3PtrList<Module> getModules (QString);
68  static int getModulesNr (QString);
69 
70  public:
71  QString Name;
72  Q3PtrList<Module> Content;
73 };
74 
75 #endif /* __MODULE_H__ */
Element *(* pInfoVAFunc)(QString &, QString &, bool, QString)
Definition: module.h:27
static void registerModule(QString, pInfoFunc)
Definition: module.cpp:49
QString category
Definition: module.h:52
static Component * getComponent(QString)
Definition: module.cpp:79
Q3PtrList< Module > Content
Definition: module.h:72
static void registerModules(void)
Definition: module.cpp:223
~Category()
Definition: module.cpp:457
~Module()
Definition: module.cpp:44
static Q3Dict< Module > Modules
Definition: module.h:42
Element *(* pInfoFunc)(QString &, char *&, bool)
Definition: module.h:26
static void unregisterModules(void)
Definition: module.cpp:438
static QStringList getCategories(void)
Definition: module.cpp:463
static int getModulesNr(QString)
Definition: module.cpp:488
pInfoFunc info
Definition: module.h:50
static void intoCategory(Module *)
Definition: module.cpp:141
Definition: module.h:30
static Q3PtrList< Module > getModules(QString)
Definition: module.cpp:475
Superclass of all schematic drawing elements.
Definition: element.h:142
static QMap< QString, QString > vaComponents
Definition: module.h:43
pInfoVAFunc infoVA
Definition: module.h:51
static void registerComponent(QString, pInfoFunc)
Definition: module.cpp:58
QString Name
Definition: module.h:71
static void registerDynamicComponents(void)
Definition: module.cpp:94
Category()
Definition: module.cpp:445
Module()
Definition: module.cpp:38
static Q3PtrList< Category > Categories
Definition: module.h:63