Qucs-GUI  0.0.18
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
id_text.h
Go to the documentation of this file.
1 /***************************************************************************
2  id_text.h
3  -----------
4  begin : Thu Oct 14 2004
5  copyright : (C) 2004 by Michael Margraf
6  email : michael.margraf@alumni.tu-berlin.de
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 ID_TEXT_H
19 #define ID_TEXT_H
20 
21 #include "painting.h"
22 
23 #include <QString>
24 #include <Q3PtrList>
25 
26 struct SubParameter {
27  SubParameter(bool display_, const QString& Name_, const QString& Descr_)
28  : display(display_), Name(Name_), Description(Descr_) { Type = ""; };
29  SubParameter(bool display_, const QString& Name_, const QString& Descr_,
30  const QString& Type_)
31  : display(display_), Name(Name_), Description(Descr_), Type(Type_) {};
32 
33  bool display;
34  QString Name, Description, Type;
35 };
36 
37 
38 class ID_Text : public Painting {
39 public:
40  ID_Text(int cx_=0, int cy_=0);
41  ~ID_Text();
42 
43  void paintScheme(Schematic*);
44  void getCenter(int&, int&);
45  void setCenter(int, int, bool relative=false);
46 
47  bool load(const QString&);
48  QString save();
49  QString saveCpp();
50  QString saveJSON();
51  void paint(ViewPainter*);
52  bool getSelected(float, float, float);
53 
54  void rotate();
55  void mirrorX();
56  void mirrorY();
57  bool Dialog();
58 
59  QString Prefix;
60  Q3PtrList<SubParameter> Parameter;
61 };
62 
63 #endif
QString Prefix
Definition: id_text.h:59
QString Description
Definition: id_text.h:34
void paint(ViewPainter *)
Definition: id_text.cpp:39
bool load(const QString &)
Definition: id_text.cpp:93
bool Dialog()
Definition: id_text.cpp:190
void mirrorX()
Definition: id_text.cpp:177
QString save()
Definition: id_text.cpp:127
void setCenter(int, int, bool relative=false)
Definition: id_text.cpp:86
bool getSelected(float, float, float)
Definition: id_text.cpp:159
void mirrorY()
Definition: id_text.cpp:183
QString saveCpp()
Definition: id_text.cpp:143
void paintScheme(Schematic *)
Definition: id_text.cpp:72
SubParameter(bool display_, const QString &Name_, const QString &Descr_)
Definition: id_text.h:27
SubParameter(bool display_, const QString &Name_, const QString &Descr_, const QString &Type_)
Definition: id_text.h:29
void rotate()
Definition: id_text.cpp:171
~ID_Text()
Definition: id_text.cpp:34
ID_Text(int cx_=0, int cy_=0)
Definition: id_text.cpp:22
QString Type
Definition: id_text.h:34
QString Name
Definition: id_text.h:34
bool display
Definition: id_text.h:31
Q3PtrList< SubParameter > Parameter
Definition: id_text.h:60
QString saveJSON()
Definition: id_text.cpp:151
void getCenter(int &, int &)
Definition: id_text.cpp:78