summaryrefslogtreecommitdiffstats
path: root/kugar/lib/mlineobject.h
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-01-20 01:29:50 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-01-20 01:29:50 +0000
commit8362bf63dea22bbf6736609b0f49c152f975eb63 (patch)
tree0eea3928e39e50fae91d4e68b21b1e6cbae25604 /kugar/lib/mlineobject.h
downloadkoffice-8362bf63dea22bbf6736609b0f49c152f975eb63.tar.gz
koffice-8362bf63dea22bbf6736609b0f49c152f975eb63.zip
Added old abandoned KDE3 version of koffice
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1077364 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kugar/lib/mlineobject.h')
-rw-r--r--kugar/lib/mlineobject.h83
1 files changed, 83 insertions, 0 deletions
diff --git a/kugar/lib/mlineobject.h b/kugar/lib/mlineobject.h
new file mode 100644
index 000000000..f3260dddc
--- /dev/null
+++ b/kugar/lib/mlineobject.h
@@ -0,0 +1,83 @@
+/***************************************************************************
+ mlineobject.h - Kugar report line object
+ -------------------
+ begin : Wed Feb 23 2000
+ copyright : (C) 2000 by Mutiny Bay Software
+ email : info@mutinybaysoftware.com
+***************************************************************************/
+
+#ifndef MLINEOBJECT_H
+#define MLINEOBJECT_H
+
+#include <qobject.h>
+#include <qpainter.h>
+#include <qpaintdevice.h>
+#include <qcolor.h>
+
+/**Kugar report line object
+ *@author Mutiny Bay Software
+ */
+
+namespace Kugar
+{
+
+class MLineObject : public QObject
+{
+
+public:
+ /** Line style constants */
+ enum Style { NoPen = 0, SolidLine, DashLine,
+ DotLine, DashDotLine, DashDotDotLine };
+
+ /** Constructor */
+ MLineObject();
+ /** Copy constructor */
+ MLineObject( const MLineObject& mLineObject );
+ /** Assignment operator */
+ MLineObject operator=( const MLineObject& mLineObject );
+ /** Destructor */
+ virtual ~MLineObject();
+
+protected:
+ /** Object's x start position */
+ int xpos1;
+ /** Object's y start postition */
+ int ypos1;
+ /** Object's x end position */
+ int xpos2;
+ /** Object's y end position */
+ int ypos2;
+
+ /** Object's width */
+ int penWidth;
+ /** Object's color */
+ QColor penColor;
+ /** Object's style */
+ int penStyle;
+
+public:
+ /** Sets the start and end points for the line */
+ void setLine( int xStart, int yStart, int xEnd, int yEnd );
+ /** Sets the object's width */
+ void setWidth( int width );
+ /** Sets the object's style */
+ void setStyle( int style );
+ /** Sets the object's color */
+ void setColor( int r, int g, int b );
+ /** Draws the object to the specified painter & x/y offsets */
+ virtual void draw( QPainter* p, int xoffset, int yoffset );
+
+protected:
+ /** Draws the object to the specified painter & x/y offsets */
+ void drawBase( QPainter* p, int xoffset, int yoffset );
+
+private:
+ /** Copies member data from one object to another.
+ * Used by the copy constructor and assignment operator
+ */
+ void copy( const MLineObject* mLineObject );
+};
+
+}
+
+#endif