##// END OF EJS Templates
Added HTML support for various text items...
Added HTML support for various text items - HTML tags can now be used in chart titles, legends, and labels - '\n' does no longer cause line break in multi-line text items. HTML tag <br/> can be used for line break now. - Setting pen for axis titles and labels is deprecated - When setting brush for titles and labels, only the color is relevant - Logic for identifying label format specifiers was improved, so adding additional information to labels via label format string is now more viable. Task-number: QTRD-1912 Change-Id: I8fa56df56fd656e2a3e427eff4abf3481435eec7 Reviewed-by: Mika Salmela <mika.salmela@digia.com>

File last commit:

r2483:f494279b6366
r2539:74f3dbde7a75
Show More
abstractchartlayout_p.h
82 lines | 2.9 KiB | text/x-c | CLexer
/ src / layout / abstractchartlayout_p.h
Michal Klocek
Adds missing license headers
r1535 /****************************************************************************
**
Miikka Heikkinen
Fixed the copyright year 2012 -> 2013
r2432 ** Copyright (C) 2013 Digia Plc
Michal Klocek
Adds missing license headers
r1535 ** All rights reserved.
** For any questions to Digia, please use contact form at http://qt.digia.com
**
** This file is part of the Qt Commercial Charts Add-on.
**
** $QT_BEGIN_LICENSE$
** Licensees holding valid Qt Commercial licenses may use this file in
** accordance with the Qt Commercial License Agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Digia.
**
** If you have questions regarding the use of this file, please use
** contact form at http://qt.digia.com
** $QT_END_LICENSE$
**
****************************************************************************/
Miikka Heikkinen
Added copyright headers to *.h/*.cpp files missing them...
r2435 // W A R N I N G
// -------------
//
// This file is not part of the QtCommercial Chart API. It exists purely as an
// implementation detail. This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
Miikka Heikkinen
Add Polar chart support...
r2483 #ifndef ABSTRACTCHARTLAYOUT_H
#define ABSTRACTCHARTLAYOUT_H
Michal Klocek
Refactors layout managment...
r1534 #include <QGraphicsLayout>
Michal Klocek
Implements minimumMargins...
r1883 #include <QMargins>
Michal Klocek
Refactors layout managment...
r1534 #include "qchartglobal.h"
QTCOMMERCIALCHART_BEGIN_NAMESPACE
Michal Klocek
Refactors layout...
r1965 class ChartTitle;
Miikka Heikkinen
Add Polar chart support...
r2483 class ChartAxisElement;
class ChartPresenter;
Michal Klocek
Refactors layout...
r1965 class QLegend;
class ChartBackground;
Michal Klocek
Refactors layout managment...
r1534
Miikka Heikkinen
Add Polar chart support...
r2483 class AbstractChartLayout : public QGraphicsLayout
Michal Klocek
Refactors layout managment...
r1534 {
public:
Miikka Heikkinen
Add Polar chart support...
r2483 AbstractChartLayout(ChartPresenter *presenter);
virtual ~AbstractChartLayout();
Michal Klocek
Refactors layout managment...
r1534
Miikka Heikkinen
Add Polar chart support...
r2483 virtual void setMargins(const QMargins &margins);
virtual QMargins margins() const;
virtual void setGeometry(const QRectF &rect);
Michal Klocek
Refactors layout managment...
r1534
Miikka Heikkinen
Add Polar chart support...
r2483 protected:
virtual QRectF calculateBackgroundGeometry(const QRectF &geometry, ChartBackground *background) const;
virtual QRectF calculateBackgroundMinimum(const QRectF &minimum) const;
virtual QRectF calculateContentGeometry(const QRectF &geometry) const;
virtual QRectF calculateContentMinimum(const QRectF &minimum) const;
virtual QRectF calculateTitleGeometry(const QRectF &geometry, ChartTitle *title) const;
virtual QRectF calculateTitleMinimum(const QRectF &minimum, ChartTitle *title) const;
virtual QRectF calculateLegendGeometry(const QRectF &geometry, QLegend *legend) const;
virtual QRectF calculateLegendMinimum(const QRectF &minimum, QLegend *legend) const;
Michal Klocek
Refactors layout managment...
r1534
Miikka Heikkinen
Add Polar chart support...
r2483 virtual QRectF calculateAxisGeometry(const QRectF &geometry, const QList<ChartAxisElement *>& axes) const = 0;
virtual QRectF calculateAxisMinimum(const QRectF &minimum, const QList<ChartAxisElement *>& axes) const = 0;
Michal Klocek
Refactors layout managment...
r1534
Miikka Heikkinen
Add Polar chart support...
r2483 // from QGraphicsLayout
Jani Honkonen
src folder: another massive victory for coding style police
r2131 QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint = QSizeF()) const;
Michal Klocek
Refactors layout managment...
r1534 int count() const { return 0; }
Jani Honkonen
src folder: another massive victory for coding style police
r2131 QGraphicsLayoutItem *itemAt(int) const { return 0; };
void removeAt(int) {};
Michal Klocek
Refactors layout managment...
r1534
Jani Honkonen
src folder: another massive victory for coding style police
r2131 ChartPresenter *m_presenter;
Michal Klocek
Refactors layout...
r1965 QMargins m_margins;
QRectF m_minChartRect;
QRectF m_minAxisRect;
Michal Klocek
Refactors layout managment...
r1534 };
QTCOMMERCIALCHART_END_NAMESPACE
Miikka Heikkinen
Add Polar chart support...
r2483 #endif // ABSTRACTCHARTLAYOUT_H