Qucs-GUI
0.0.19
|
00001 /*************************************************************************** 00002 rectangle.h 00003 ------------- 00004 begin : Sat Nov 22 2003 00005 copyright : (C) 2003 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 RECTANGLE_H 00019 #define RECTANGLE_H 00020 00021 #include "painting.h" 00022 00023 #include <QPen> 00024 00025 00026 class Rectangle : public Painting { 00027 public: 00028 Rectangle(bool _filled=false); 00029 ~Rectangle(); 00030 00031 void paintScheme(Schematic*); 00032 void getCenter(int&, int&); 00033 void setCenter(int, int, bool relative=false); 00034 00035 Painting* newOne(); 00036 static Element* info(QString&, char* &, bool getNewOne=false); 00037 static Element* info_filled(QString&, char* &, bool getNewOne=false); 00038 bool load(const QString&); 00039 QString save(); 00040 QString saveCpp(); 00041 QString saveJSON(); 00042 void paint(ViewPainter*); 00043 void MouseMoving(Schematic*, int, int, int, int, Schematic*, int, int, bool); 00044 bool MousePressing(); 00045 bool getSelected(float, float, float); 00046 bool resizeTouched(float, float, float); 00047 void MouseResizeMoving(int, int, Schematic*); 00048 00049 void rotate(); 00050 void mirrorX(); 00051 void mirrorY(); 00052 bool Dialog(); 00053 00054 QPen Pen; 00055 QBrush Brush; // filling style/color 00056 bool filled; // filled or not (for "getSelected" etc.) 00057 }; 00058 00059 #endif