~ubuntu-branches/ubuntu/precise/koffice/precise

« back to all changes in this revision

Viewing changes to kchart/kdchart/src/KDChartLayoutItems.h

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2010-09-21 15:36:35 UTC
  • mfrom: (1.4.1 upstream) (60.2.11 maverick)
  • Revision ID: james.westby@ubuntu.com-20100921153635-6tejqkiro2u21ydi
Tags: 1:2.2.2-0ubuntu3
Add kubuntu_03_fix-crash-on-closing-sqlite-connection-2.2.2.diff and
kubuntu_04_support-large-memo-values-for-msaccess-2.2.2.diff as
recommended by upstream http://kexi-
project.org/wiki/wikiview/index.php@Kexi2.2_Patches.html#sqlite_stab
ility

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
    class AbstractDiagram;
45
45
    class PaintContext;
46
46
 
47
 
    /** 
 
47
    /**
48
48
     * Base class for all layout items of KD Chart
49
49
     * \internal
50
50
     */
58
58
 
59
59
        /**
60
60
         * Default impl: just call paint.
61
 
         * 
 
61
         *
62
62
         * Derived classes like KDChart::AbstractArea are providing
63
63
         * additional action here.
64
64
         */
93
93
    };
94
94
 
95
95
    /**
96
 
     * Layout item showing a text 
 
96
     * Layout item showing a text
97
97
     *\internal
98
98
     */
99
99
    class KDCHART_EXPORT TextLayoutItem : public AbstractLayoutItem
112
112
        void setText(const QString & text);
113
113
        QString text() const;
114
114
 
 
115
        void setTextAlignment( Qt::Alignment );
 
116
        Qt::Alignment textAlignment() const;
 
117
 
115
118
        void setTextAttributes( const TextAttributes& a );
116
119
        TextAttributes textAttributes() const;
117
120
 
130
133
        /** pure virtual in QLayoutItem */
131
134
        virtual QRect geometry() const;
132
135
 
 
136
        virtual QSize sizeHintAndRotatedCorners(
 
137
                    QPoint& topLeftPt, QPoint& topRightPt, QPoint& bottomRightPt, QPoint& bottomLeftPt) const;
 
138
        virtual QSize sizeHintUnrotated() const;
 
139
 
133
140
        virtual bool intersects( const TextLayoutItem& other, const QPointF& myPos, const QPointF& otherPos ) const;
134
141
        virtual bool intersects( const TextLayoutItem& other, const QPoint& myPos, const QPoint& otherPos ) const;
135
142
 
142
149
        QPolygon rotatedCorners() const;
143
150
        bool realFontWasRecalculated() const;
144
151
        QSize unrotatedSizeHint( QFont fnt = QFont() ) const;
145
 
        QSize calcSizeHint( QFont fnt ) const;
 
152
        QSize calcSizeHint( QFont fnt,
 
153
                            QPoint& topLeftPt, QPoint& topRightPt, QPoint& bottomRightPt, QPoint& bottomLeftPt ) const;
146
154
 
147
155
        qreal fitFontSizeToGeometry() const;
148
156
 
149
157
        QRect mRect;
150
158
        QString mText;
 
159
        Qt::Alignment mTextAlignment;
151
160
        TextAttributes mAttributes;
152
161
        const QObject* mAutoReferenceArea;
153
162
        KDChartEnums::MeasureOrientation mAutoReferenceOrientation;
154
163
        mutable QSize cachedSizeHint;
 
164
        mutable QPoint cachedTopLeft;
 
165
        mutable QPoint cachedTopRight;
 
166
        mutable QPoint cachedBottomRight;
 
167
        mutable QPoint cachedBottomLeft;
155
168
        mutable qreal cachedFontSize;
156
169
        mutable QFont cachedFont;
157
170
    };
202
215
    };
203
216
 
204
217
    /**
205
 
     * Layout item showing a data point marker 
 
218
     * Layout item showing a data point marker
206
219
     * \internal
207
220
     */
208
221
    class KDCHART_EXPORT MarkerLayoutItem : public AbstractLayoutItem
274
287
            QRect mRect;
275
288
    };
276
289
 
277
 
    /** 
 
290
    /**
278
291
     * Layout item showing a coloured line and a data point marker
279
292
     * \internal
280
293
     */
358
371
            QRect mRect;
359
372
    };
360
373
 
361
 
    /** 
 
374
    /**
362
375
     * @brief An empty layout item
363
376
     * \internal
364
377
     *
366
379
     * the planeLayout grid: one of its reference-layouts is a QVBoxLayout (for
367
380
     * the top, or bottom axes resp.), the other one is a QHBoxLayout (for the
368
381
     * left/right sided axes).
369
 
     * 
 
382
     *
370
383
     * The spacer reserves enough space so all of the AbstractAreas contained
371
384
     * in the two reference-layouts can display not only their in-bounds
372
385
     * content but also their overlapping content reaching out of their area.