Qucs-GUI  0.0.18
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
painting.h
Go to the documentation of this file.
1 /***************************************************************************
2  painting.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 PAINTING_H
19 #define PAINTING_H
20 
21 #include "element.h"
22 #include "viewpainter.h"
23 //class QPainter;
24 //class Schematic;
25 
26 
27 class Painting : public Element {
28 public:
29  Painting();
30  ~Painting() {};
31 
32  virtual void getCenter(int&, int &) {};
33  virtual bool getSelected(float, float, float) { return false; };
34 
35  virtual Painting* newOne();
36  virtual bool load(const QString&) { return true; };
37  virtual QString save();
38  virtual QString saveCpp();
39  virtual QString saveJSON();
40  virtual void paint(ViewPainter*) {};
41  virtual void MouseMoving(Schematic*, int, int, int, int,
42  Schematic*, int, int, bool) {};
43  virtual bool MousePressing() { return false; };
44  virtual void Bounding(int&, int&, int&, int&);
45  virtual bool resizeTouched(float, float, float) { return false; };
46  virtual void MouseResizeMoving(int, int, Schematic*) {};
47 
48  virtual void rotate() {};
49  virtual void mirrorX() {};
50  virtual void mirrorY() {};
51  virtual bool Dialog() { return false; };
52 
53  QString toPenString (int);
54  QString toBrushString (int);
55  QString Name; // name of painting, e.g. for saving
56  int State; // state for different mouse operations
57 };
58 
59 #endif
virtual Painting * newOne()
Definition: painting.cpp:28
Painting()
Definition: painting.cpp:22
Defines drawing elements for schematics.
virtual bool getSelected(float, float, float)
Definition: painting.h:33
QString toPenString(int)
Definition: painting.cpp:54
int State
Definition: painting.h:56
virtual QString save()
Definition: painting.cpp:39
virtual void rotate()
Definition: painting.h:48
virtual QString saveJSON()
Definition: painting.cpp:49
virtual bool resizeTouched(float, float, float)
Definition: painting.h:45
virtual void mirrorX()
Definition: painting.h:49
QString Name
Definition: painting.h:55
virtual void getCenter(int &, int &)
Definition: painting.h:32
Superclass of all schematic drawing elements.
Definition: element.h:142
virtual bool MousePressing()
Definition: painting.h:43
virtual bool Dialog()
Definition: painting.h:51
virtual void MouseResizeMoving(int, int, Schematic *)
Definition: painting.h:46
virtual void MouseMoving(Schematic *, int, int, int, int, Schematic *, int, int, bool)
Definition: painting.h:41
virtual void paint(ViewPainter *)
Definition: painting.h:40
~Painting()
Definition: painting.h:30
virtual QString saveCpp()
Definition: painting.cpp:44
QString toBrushString(int)
Definition: painting.cpp:67
virtual void mirrorY()
Definition: painting.h:50
virtual void Bounding(int &, int &, int &, int &)
Definition: painting.cpp:33
virtual bool load(const QString &)
Definition: painting.h:36