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

« back to all changes in this revision

Viewing changes to kst/kst/kstviewellipse.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:
 
1
/***************************************************************************
 
2
                              kstviewellipse.h
 
3
                             -------------------
 
4
    begin                : Jun 14, 2005
 
5
    copyright            : (C) 2005 The University of Toronto
 
6
    email                :
 
7
 ***************************************************************************/
 
8
 
 
9
/***************************************************************************
 
10
 *                                                                         *
 
11
 *   This program is free software; you can redistribute it and/or modify  *
 
12
 *   it under the terms of the GNU General Public License as published by  *
 
13
 *   the Free Software Foundation; either version 2 of the License, or     *
 
14
 *   (at your option) any later version.                                   *
 
15
 *                                                                         *
 
16
 ***************************************************************************/
 
17
 
 
18
#ifndef KSTVIEWELLIPSE_H
 
19
#define KSTVIEWELLIPSE_H
 
20
 
 
21
#include "kstviewobject.h"
 
22
 
 
23
class KstViewEllipse;
 
24
typedef KstSharedPtr<KstViewEllipse> KstViewEllipsePtr;
 
25
 
 
26
class KstViewEllipse : public KstViewObject {
 
27
  Q_OBJECT
 
28
  Q_PROPERTY(QColor borderColor READ borderColor WRITE setBorderColor)
 
29
  Q_PROPERTY(int borderWidth READ borderWidth WRITE setBorderWidth)
 
30
  Q_PROPERTY(QColor fillColor READ foregroundColor WRITE setForegroundColor)
 
31
  Q_PROPERTY(bool transparentFill READ transparentFill WRITE setTransparentFill)
 
32
  public:
 
33
    KstViewEllipse();
 
34
    KstViewEllipse(const QDomElement& e);
 
35
    virtual ~KstViewEllipse();
 
36
 
 
37
    virtual void setBorderColor(const QColor& to);
 
38
    virtual QColor borderColor() const;
 
39
    virtual void setBorderWidth(int width);
 
40
    virtual int borderWidth() const;
 
41
    
 
42
    // can't have Q_PROPERTY in KstViewObject?
 
43
    virtual void setForegroundColor(const QColor& color);
 
44
    virtual QColor foregroundColor() const;
 
45
    
 
46
    bool transparentFill() const;
 
47
    void setTransparentFill(bool yes);
 
48
 
 
49
    
 
50
    virtual void drawShadow(KstPainter& p, const QPoint& pos);
 
51
 
 
52
    virtual void paintSelf(KstPainter& p, const QRegion& bounds);
 
53
 
 
54
  public:
 
55
    virtual void save(QTextStream& ts, const QString& indent = QString::null);
 
56
    
 
57
    virtual QMap<QString, QVariant> widgetHints(const QString& propertyName) const; 
 
58
    
 
59
    virtual signed int directionFor(const QPoint& pos);
 
60
    
 
61
  private:
 
62
    int _borderWidth;
 
63
    QColor _borderColor;
 
64
    bool _transparentFill;
 
65
};
 
66
 
 
67
typedef KstObjectList<KstViewEllipsePtr> KstViewEllipseList;
 
68
 
 
69
 
 
70
#endif
 
71
// vim: ts=2 sw=2 et