Qucs-GUI  0.0.19
/home/travis/build/Qucs/qucs/qucs/qucs/paintings/painting.h
Go to the documentation of this file.
00001 /***************************************************************************
00002                                 painting.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 PAINTING_H
00019 #define PAINTING_H
00020 
00021 #include "element.h"
00022 #include "viewpainter.h"
00023 
00024 
00025 class Painting : public Element  {
00026 public:
00027   Painting();
00028  ~Painting() {};
00029 
00030   virtual void getCenter(int&, int &) {};
00031   virtual bool getSelected(float, float, float) { return false; };
00032 
00033   virtual Painting* newOne();
00034   virtual bool load(const QString&) { return true; };
00035   virtual QString save();
00036   virtual QString saveCpp();
00037   virtual QString saveJSON();
00038   virtual void paint(ViewPainter*) {};
00039   virtual void MouseMoving(Schematic*, int, int, int, int,
00040                            Schematic*, int, int, bool) {};
00041   virtual bool MousePressing() { return false; };
00042   virtual void Bounding(int&, int&, int&, int&);
00043   virtual bool resizeTouched(float, float, float) { return false; };
00044   virtual void MouseResizeMoving(int, int, Schematic*) {};
00045 
00046   virtual void rotate() {};
00047   virtual void mirrorX() {};
00048   virtual void mirrorY() {};
00049   virtual bool Dialog() { return false; };
00050 
00051   QString toPenString (int);
00052   QString toBrushString (int);
00053   QString Name; // name of painting, e.g. for saving
00054   int  State;   // state for different mouse operations
00055 };
00056 
00057 #endif
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines