solidshape.h

00001 /***************************************************************************
00002  *   Copyright (C) 2005 by David Saxton                                    *
00003  *   david@bluehaze.org                                                    *
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU General Public License as published by  *
00007  *   the Free Software Foundation; either version 2 of the License, or     *
00008  *   (at your option) any later version.                                   *
00009  ***************************************************************************/
00010 
00011 #ifndef SOLIDSHAPE_H
00012 #define SOLIDSHAPE_H
00013 
00014 #include <drawpart.h>
00015 
00016 class RectangularOverlay;
00017 
00022 class DPRectangle : public DrawPart
00023 {
00024         public:
00025                 DPRectangle( ItemDocument *itemDocument, bool newItem, const char *id = 0 );
00026                 ~DPRectangle();
00027 
00028                 static Item* construct( ItemDocument *itemDocument, bool newItem, const char *id );
00029                 static LibraryItem *libraryItem();
00030 
00031                 virtual void setSelected( bool yes );
00032         
00033                 virtual QSize minimumSize() const;
00034 
00035         protected:
00036                 virtual void drawShape( QPainter &p );
00037                 void dataChanged();
00038                 virtual void postResize();
00039                 
00042                 QRect drawRect() const;
00043         
00044         private:
00045                 RectangularOverlay *m_pRectangularOverlay;
00046 };
00047 
00052 class DPEllipse : public DPRectangle
00053 {
00054         public:
00055                 DPEllipse( ItemDocument *itemDocument, bool newItem, const char *id = 0 );
00056                 ~DPEllipse();
00057 
00058                 static Item* construct( ItemDocument *itemDocument, bool newItem, const char *id );
00059                 static LibraryItem *libraryItem();
00060 
00061         protected:
00062                 virtual void postResize();
00063         
00064         private:
00065                 virtual void drawShape( QPainter &p );
00066 };
00067 
00068 #endif

Generated on Tue May 8 17:05:32 2007 for KTechLab by  doxygen 1.5.1