My Project  0.0.16
QUCS Mapping
 All Classes Namespaces 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.h>
24 #include <qptrlist.h>
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(QPainter*);
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  void paint(ViewPainter*);
51  bool getSelected(float, float, float);
52 
53  void rotate();
54  void mirrorX();
55  void mirrorY();
56  bool Dialog();
57 
58  QString Prefix;
59  QPtrList<SubParameter> Parameter;
60 };
61 
62 #endif