Qucs-GUI  0.0.19
/home/travis/build/Qucs/qucs/qucs/qucs/paintings/id_text.h
Go to the documentation of this file.
00001 /***************************************************************************
00002                                 id_text.h
00003                                -----------
00004     begin                : Thu Oct 14 2004
00005     copyright            : (C) 2004 by Michael Margraf
00006     email                : michael.margraf@alumni.tu-berlin.de
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 
00018 #ifndef ID_TEXT_H
00019 #define ID_TEXT_H
00020 
00021 #include "painting.h"
00022 
00023 #include <QString>
00024 #include <QList>
00025 
00026 struct SubParameter {
00027   SubParameter(bool display_, const QString& Name_, const QString& Descr_)
00028      : display(display_), Name(Name_), Description(Descr_) { Type = ""; };
00029   SubParameter(bool display_, const QString& Name_, const QString& Descr_,
00030          const QString& Type_)
00031      : display(display_), Name(Name_), Description(Descr_), Type(Type_) {};
00032 
00033   bool display;
00034   QString Name, Description, Type;
00035 };
00036 
00037 
00038 class ID_Text : public Painting  {
00039 public:
00040   ID_Text(int cx_=0, int cy_=0);
00041  ~ID_Text();
00042 
00043   void paintScheme(Schematic*);
00044   void getCenter(int&, int&);
00045   void setCenter(int, int, bool relative=false);
00046 
00047   bool load(const QString&);
00048   QString save();
00049   QString saveCpp();
00050   QString saveJSON();
00051   void paint(ViewPainter*);
00052   bool getSelected(float, float, float);
00053 
00054   void rotate();
00055   void mirrorX();
00056   void mirrorY();
00057   bool Dialog();
00058 
00059   QString Prefix;
00060   QList<SubParameter *> Parameter;
00061 };
00062 
00063 #endif
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines