Qucs-GUI  0.0.18
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
rectangle.h
Go to the documentation of this file.
1 /***************************************************************************
2  rectangle.h
3  -------------
4  begin : Sat Nov 22 2003
5  copyright : (C) 2003 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 RECTANGLE_H
19 #define RECTANGLE_H
20 
21 #include "painting.h"
22 
23 #include <QPen>
24 
25 
26 class Rectangle : public Painting {
27 public:
28  Rectangle(bool _filled=false);
29  ~Rectangle();
30 
31  void paintScheme(Schematic*);
32  void getCenter(int&, int&);
33  void setCenter(int, int, bool relative=false);
34 
35  Painting* newOne();
36  static Element* info(QString&, char* &, bool getNewOne=false);
37  static Element* info_filled(QString&, char* &, bool getNewOne=false);
38  bool load(const QString&);
39  QString save();
40  QString saveCpp();
41  QString saveJSON();
42  void paint(ViewPainter*);
43  void MouseMoving(Schematic*, int, int, int, int, Schematic*, int, int, bool);
44  bool MousePressing();
45  bool getSelected(float, float, float);
46  bool resizeTouched(float, float, float);
47  void MouseResizeMoving(int, int, Schematic*);
48 
49  void rotate();
50  void mirrorX();
51  void mirrorY();
52  bool Dialog();
53 
54  QPen Pen;
55  QBrush Brush; // filling style/color
56  bool filled; // filled or not (for "getSelected" etc.)
57 };
58 
59 #endif
void mirrorX()
Definition: rectangle.cpp:355
QBrush Brush
Definition: rectangle.h:55
bool load(const QString &)
Definition: rectangle.cpp:115
Rectangle(bool _filled=false)
Definition: rectangle.cpp:27
static Element * info(QString &, char *&, bool getNewOne=false)
Definition: rectangle.cpp:95
bool MousePressing()
Definition: rectangle.cpp:294
bool resizeTouched(float, float, float)
Definition: rectangle.cpp:215
static Element * info_filled(QString &, char *&, bool getNewOne=false)
Definition: rectangle.cpp:105
void MouseMoving(Schematic *, int, int, int, int, Schematic *, int, int, bool)
Definition: rectangle.cpp:259
Painting * newOne()
Definition: rectangle.cpp:89
QPen Pen
Definition: rectangle.h:54
void getCenter(int &, int &)
Definition: rectangle.cpp:74
void mirrorY()
Definition: rectangle.cpp:362
QString saveCpp()
Definition: rectangle.cpp:182
void paintScheme(Schematic *)
Definition: rectangle.cpp:68
void MouseResizeMoving(int, int, Schematic *)
Definition: rectangle.cpp:237
bool filled
Definition: rectangle.h:56
QString saveJSON()
Definition: rectangle.cpp:197
bool getSelected(float, float, float)
Definition: rectangle.cpp:315
Superclass of all schematic drawing elements.
Definition: element.h:142
void paint(ViewPainter *)
Definition: rectangle.cpp:44
bool Dialog()
Definition: rectangle.cpp:370
void rotate()
Definition: rectangle.cpp:344
QString save()
Definition: rectangle.cpp:168
void setCenter(int, int, bool relative=false)
Definition: rectangle.cpp:82