~ubuntu-branches/ubuntu/karmic/kst/karmic

« back to all changes in this revision

Viewing changes to kst/kst/kstborderedviewobject.h

  • Committer: Bazaar Package Importer
  • Author(s): Daniel T Chen
  • Date: 2006-06-30 19:11:30 UTC
  • mfrom: (1.2.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20060630191130-acumuar75bz4puty
Tags: 1.2.1-1ubuntu1
Merge from debian unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
#define KSTBORDEREDVIEWOBJECT_H
20
20
 
21
21
#include "kstviewobject.h"
 
22
#include "kst_export.h"
22
23
 
23
24
 
24
25
/***************************************************************************
57
58
class KstBorderedViewObject;
58
59
typedef KstSharedPtr<KstBorderedViewObject> KstBorderedViewObjectPtr;
59
60
 
60
 
class KstBorderedViewObject : public KstViewObject {
 
61
class KST_EXPORT KstBorderedViewObject : public KstViewObject {
61
62
  Q_OBJECT
 
63
  Q_PROPERTY(QColor borderColor READ borderColor WRITE setBorderColor)
 
64
  Q_PROPERTY(int borderWidth READ borderWidth WRITE setBorderWidth)
 
65
  Q_PROPERTY(QColor foregroundColor READ foregroundColor WRITE setForegroundColor)
 
66
  Q_PROPERTY(QColor backgroundColor READ backgroundColor WRITE setBackgroundColor) 
 
67
  Q_PROPERTY(int margin READ margin WRITE setMargin) 
 
68
  Q_PROPERTY(int padding READ padding WRITE setPadding) 
62
69
  protected:
63
70
    KstBorderedViewObject(const QString& type);
64
71
  public:
67
74
    virtual ~KstBorderedViewObject();
68
75
 
69
76
    virtual void save(QTextStream& ts, const QString& indent = QString::null);
70
 
    virtual void saveTag(QTextStream& ts, const QString& indent = QString::null);
 
77
    virtual void saveAttributes(QTextStream& ts, const QString& indent = QString::null);
71
78
 
72
79
    void setBorderColor(const QColor& c);
73
80
    const QColor& borderColor() const;
84
91
    // See above for gross details
85
92
    virtual QRect contentsRect() const;
86
93
    virtual void setContentsRect(QRect& rect);
87
 
 
88
 
  public slots:
89
 
    virtual void paint(KstPaintType type, QPainter& p);
 
94
    
 
95
    virtual QMap<QString, QVariant> widgetHints(const QString& propertyName) const;
 
96
    
 
97
    // just calls KstViewObject functions - Q_PROPERTY doesn't work in KstViewObject?
 
98
    virtual void setForegroundColor(const QColor& color);
 
99
    virtual QColor foregroundColor() const;
 
100
    virtual void setBackgroundColor(const QColor& color);
 
101
    virtual QColor backgroundColor() const;
 
102
 
 
103
    virtual void paintSelf(KstPainter& p, const QRegion& bounds);
 
104
 
 
105
    QRect contentsRectForDevice(const KstPainter& painter) const;
90
106
 
91
107
  protected:
92
108
    virtual void readBinary(QDataStream& str);
93
109
    virtual void writeBinary(QDataStream& str);
 
110
    void saveAttributesOnly(QTextStream& ts, const QString& indent = QString::null);
94
111
 
95
112
  private:
96
113
    QColor _borderColor;