kpresenter
KPrObjectProperties.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef KPOBJECTPROPERTIES_H
00022 #define KPOBJECTPROPERTIES_H
00023
00024 #include "KPrCommand.h"
00025
00026 class KPrObjectProperties
00027 {
00028 public:
00029 enum PropertyType {
00030 PtPen = 1,
00031 PtLineEnds = 2,
00032 PtBrush = 4,
00033 PtPie = 8,
00034 PtPicture = 16,
00035 PtPolygon = 32,
00036 PtRectangle = 64,
00037 PtText = 128,
00038 PtOther = 256,
00039 PtPenWidth = 512
00040 };
00041
00042 KPrObjectProperties( const QPtrList<KPrObject> &objects );
00043 ~KPrObjectProperties();
00044
00045 int getPropertyFlags() { return m_flags; }
00046
00048 KoPenCmd::Pen getPen() const { return m_pen; }
00050 KPrBrushCmd::Brush getBrush() const { return m_brush; }
00052 KPrRectValueCmd::RectValues getRectValues() const { return m_rectValues; }
00054 KPrPolygonSettingCmd::PolygonSettings getPolygonSettings() const { return m_polygonSettings; }
00056 KPrPieValueCmd::PieValues getPieValues() const { return m_pieValues; }
00057
00058 KPrPictureSettingCmd::PictureSettings getPictureSettings() const { return m_pictureSettings; }
00059 const QPixmap &getPixmap() const { return m_pixmap; }
00061 MarginsStruct getMarginsStruct() { return m_marginsStruct; }
00062 PropValue getProtectContent() { return m_protectContent; }
00063
00064 protected:
00065 void getProperties( const QPtrList<KPrObject> &objects );
00066
00067 void getPenProperties( KPrObject *object );
00068 void getLineEndsProperties( KPrObject *object );
00069 void getBrushProperties( KPrObject *object );
00070 void getRectProperties( KPrObject *object );
00071 void getPolygonSettings( KPrObject *object );
00072 void getPieProperties( KPrObject *object );
00073 void getPictureProperties( KPrObject *object );
00074 void getTextProperties( KPrObject *object );
00075
00076 private:
00077 QPtrList<KPrObject> m_objects;
00078 int m_flags;
00079
00081 KoPenCmd::Pen m_pen;
00083 KPrBrushCmd::Brush m_brush;
00085 KPrRectValueCmd::RectValues m_rectValues;
00087 KPrPolygonSettingCmd::PolygonSettings m_polygonSettings;
00089 KPrPieValueCmd::PieValues m_pieValues;
00091 KPrPictureSettingCmd::PictureSettings m_pictureSettings;
00092 QPixmap m_pixmap;
00094 MarginsStruct m_marginsStruct;
00095 PropValue m_protectContent;
00096 };
00097
00098 #endif
|