diff --git a/plugins/declarative/declarativeareaseries.cpp b/plugins/declarative/declarativeareaseries.cpp index 35b9ac3..1ffdb61 100644 --- a/plugins/declarative/declarativeareaseries.cpp +++ b/plugins/declarative/declarativeareaseries.cpp @@ -30,22 +30,22 @@ DeclarativeAreaSeries::DeclarativeAreaSeries(QObject *parent) : { } -void DeclarativeAreaSeries::setUpperSeries(DeclarativeLineSeries* series) +void DeclarativeAreaSeries::setUpperSeries(DeclarativeLineSeries *series) { QAreaSeries::setUpperSeries(series); } -DeclarativeLineSeries* DeclarativeAreaSeries::upperSeries() const +DeclarativeLineSeries *DeclarativeAreaSeries::upperSeries() const { return qobject_cast(QAreaSeries::upperSeries()); } -void DeclarativeAreaSeries::setLowerSeries(DeclarativeLineSeries* series) +void DeclarativeAreaSeries::setLowerSeries(DeclarativeLineSeries *series) { QAreaSeries::setLowerSeries(series); } -DeclarativeLineSeries* DeclarativeAreaSeries::lowerSeries() const +DeclarativeLineSeries *DeclarativeAreaSeries::lowerSeries() const { return qobject_cast(QAreaSeries::lowerSeries()); } diff --git a/plugins/declarative/declarativeareaseries.h b/plugins/declarative/declarativeareaseries.h index 8d2bf28..79fc755 100644 --- a/plugins/declarative/declarativeareaseries.h +++ b/plugins/declarative/declarativeareaseries.h @@ -37,10 +37,10 @@ class DeclarativeAreaSeries : public QAreaSeries public: explicit DeclarativeAreaSeries(QObject *parent = 0); - void setUpperSeries(DeclarativeLineSeries* series); - DeclarativeLineSeries* upperSeries() const; - void setLowerSeries(DeclarativeLineSeries* series); - DeclarativeLineSeries* lowerSeries() const; + void setUpperSeries(DeclarativeLineSeries *series); + DeclarativeLineSeries *upperSeries() const; + void setLowerSeries(DeclarativeLineSeries *series); + DeclarativeLineSeries *lowerSeries() const; QAbstractAxis *axisX() { return m_axisX; } void setAxisX(QAbstractAxis *axis) { m_axisX = axis; emit axisXChanged(axis); } QAbstractAxis *axisY() { return m_axisY; } diff --git a/plugins/declarative/declarativebarseries.cpp b/plugins/declarative/declarativebarseries.cpp index e071f97..e307279 100644 --- a/plugins/declarative/declarativebarseries.cpp +++ b/plugins/declarative/declarativebarseries.cpp @@ -25,8 +25,8 @@ QTCOMMERCIALCHART_BEGIN_NAMESPACE -DeclarativeBarSet::DeclarativeBarSet(QObject *parent) : - QBarSet("", parent) +DeclarativeBarSet::DeclarativeBarSet(QObject *parent) + : QBarSet("", parent) { connect(this, SIGNAL(valuesAdded(int,int)), this, SLOT(handleCountChanged(int,int))); connect(this, SIGNAL(valuesRemoved(int,int)), this, SLOT(handleCountChanged(int,int))); @@ -90,10 +90,10 @@ void DeclarativeBarSeries::componentComplete() foreach (QObject *child, children()) { if (qobject_cast(child)) { QAbstractBarSeries::append(qobject_cast(child)); - } else if(qobject_cast(child)) { + } else if (qobject_cast(child)) { QVBarModelMapper *mapper = qobject_cast(child); mapper->setSeries(this); - } else if(qobject_cast(child)) { + } else if (qobject_cast(child)) { QHBarModelMapper *mapper = qobject_cast(child); mapper->setSeries(this); } @@ -114,7 +114,7 @@ void DeclarativeBarSeries::appendSeriesChildren(QDeclarativeListProperty setList = barSets(); + QList setList = barSets(); if (index >= 0 && index < setList.count()) return qobject_cast(setList[index]); @@ -149,10 +149,10 @@ void DeclarativeStackedBarSeries::componentComplete() foreach (QObject *child, children()) { if (qobject_cast(child)) { QAbstractBarSeries::append(qobject_cast(child)); - } else if(qobject_cast(child)) { + } else if (qobject_cast(child)) { QVBarModelMapper *mapper = qobject_cast(child); mapper->setSeries(this); - } else if(qobject_cast(child)) { + } else if (qobject_cast(child)) { QHBarModelMapper *mapper = qobject_cast(child); mapper->setSeries(this); } @@ -174,7 +174,7 @@ void DeclarativeStackedBarSeries::appendSeriesChildren(QDeclarativeListProperty< DeclarativeBarSet *DeclarativeStackedBarSeries::at(int index) { - QList setList = barSets(); + QList setList = barSets(); if (index >= 0 && index < setList.count()) return qobject_cast(setList[index]); @@ -209,10 +209,10 @@ void DeclarativePercentBarSeries::componentComplete() foreach (QObject *child, children()) { if (qobject_cast(child)) { QAbstractBarSeries::append(qobject_cast(child)); - } else if(qobject_cast(child)) { + } else if (qobject_cast(child)) { QVBarModelMapper *mapper = qobject_cast(child); mapper->setSeries(this); - } else if(qobject_cast(child)) { + } else if (qobject_cast(child)) { QHBarModelMapper *mapper = qobject_cast(child); mapper->setSeries(this); } @@ -233,7 +233,7 @@ void DeclarativePercentBarSeries::appendSeriesChildren(QDeclarativeListProperty< DeclarativeBarSet *DeclarativePercentBarSeries::at(int index) { - QList setList = barSets(); + QList setList = barSets(); if (index >= 0 && index < setList.count()) return qobject_cast(setList[index]); @@ -268,10 +268,10 @@ void DeclarativeHorizontalBarSeries::componentComplete() foreach (QObject *child, children()) { if (qobject_cast(child)) { QAbstractBarSeries::append(qobject_cast(child)); - } else if(qobject_cast(child)) { + } else if (qobject_cast(child)) { QVBarModelMapper *mapper = qobject_cast(child); mapper->setSeries(this); - } else if(qobject_cast(child)) { + } else if (qobject_cast(child)) { QHBarModelMapper *mapper = qobject_cast(child); mapper->setSeries(this); } @@ -292,7 +292,7 @@ void DeclarativeHorizontalBarSeries::appendSeriesChildren(QDeclarativeListProper DeclarativeBarSet *DeclarativeHorizontalBarSeries::at(int index) { - QList setList = barSets(); + QList setList = barSets(); if (index >= 0 && index < setList.count()) return qobject_cast(setList[index]); @@ -327,10 +327,10 @@ void DeclarativeHorizontalStackedBarSeries::componentComplete() foreach (QObject *child, children()) { if (qobject_cast(child)) { QAbstractBarSeries::append(qobject_cast(child)); - } else if(qobject_cast(child)) { + } else if (qobject_cast(child)) { QVBarModelMapper *mapper = qobject_cast(child); mapper->setSeries(this); - } else if(qobject_cast(child)) { + } else if (qobject_cast(child)) { QHBarModelMapper *mapper = qobject_cast(child); mapper->setSeries(this); } @@ -351,7 +351,7 @@ void DeclarativeHorizontalStackedBarSeries::appendSeriesChildren(QDeclarativeLis DeclarativeBarSet *DeclarativeHorizontalStackedBarSeries::at(int index) { - QList setList = barSets(); + QList setList = barSets(); if (index >= 0 && index < setList.count()) return qobject_cast(setList[index]); @@ -386,10 +386,10 @@ void DeclarativeHorizontalPercentBarSeries::componentComplete() foreach (QObject *child, children()) { if (qobject_cast(child)) { QAbstractBarSeries::append(qobject_cast(child)); - } else if(qobject_cast(child)) { + } else if (qobject_cast(child)) { QVBarModelMapper *mapper = qobject_cast(child); mapper->setSeries(this); - } else if(qobject_cast(child)) { + } else if (qobject_cast(child)) { QHBarModelMapper *mapper = qobject_cast(child); mapper->setSeries(this); } @@ -410,7 +410,7 @@ void DeclarativeHorizontalPercentBarSeries::appendSeriesChildren(QDeclarativeLis DeclarativeBarSet *DeclarativeHorizontalPercentBarSeries::at(int index) { - QList setList = barSets(); + QList setList = barSets(); if (index >= 0 && index < setList.count()) return qobject_cast(setList[index]); diff --git a/plugins/declarative/declarativebarseries.h b/plugins/declarative/declarativebarseries.h index 8c4599a..e4056e9 100644 --- a/plugins/declarative/declarativebarseries.h +++ b/plugins/declarative/declarativebarseries.h @@ -104,8 +104,8 @@ public Q_SLOTS: static void appendSeriesChildren(QDeclarativeListProperty *list, QObject *element); private: - QAbstractAxis* m_axisX; - QAbstractAxis* m_axisY; + QAbstractAxis *m_axisX; + QAbstractAxis *m_axisY; }; class DeclarativeStackedBarSeries : public QStackedBarSeries, public QDeclarativeParserStatus @@ -144,8 +144,8 @@ public Q_SLOTS: static void appendSeriesChildren(QDeclarativeListProperty *list, QObject *element); private: - QAbstractAxis* m_axisX; - QAbstractAxis* m_axisY; + QAbstractAxis *m_axisX; + QAbstractAxis *m_axisY; }; class DeclarativePercentBarSeries : public QPercentBarSeries, public QDeclarativeParserStatus @@ -184,8 +184,8 @@ public Q_SLOTS: static void appendSeriesChildren(QDeclarativeListProperty *list, QObject *element); private: - QAbstractAxis* m_axisX; - QAbstractAxis* m_axisY; + QAbstractAxis *m_axisX; + QAbstractAxis *m_axisY; }; class DeclarativeHorizontalBarSeries : public QHorizontalBarSeries, public QDeclarativeParserStatus @@ -224,8 +224,8 @@ public Q_SLOTS: static void appendSeriesChildren(QDeclarativeListProperty *list, QObject *element); private: - QAbstractAxis* m_axisX; - QAbstractAxis* m_axisY; + QAbstractAxis *m_axisX; + QAbstractAxis *m_axisY; }; class DeclarativeHorizontalStackedBarSeries : public QHorizontalStackedBarSeries, public QDeclarativeParserStatus @@ -264,8 +264,8 @@ public Q_SLOTS: static void appendSeriesChildren(QDeclarativeListProperty *list, QObject *element); private: - QAbstractAxis* m_axisX; - QAbstractAxis* m_axisY; + QAbstractAxis *m_axisX; + QAbstractAxis *m_axisY; }; class DeclarativeHorizontalPercentBarSeries : public QHorizontalPercentBarSeries, public QDeclarativeParserStatus @@ -304,8 +304,8 @@ public Q_SLOTS: static void appendSeriesChildren(QDeclarativeListProperty *list, QObject *element); private: - QAbstractAxis* m_axisX; - QAbstractAxis* m_axisY; + QAbstractAxis *m_axisX; + QAbstractAxis *m_axisY; }; QTCOMMERCIALCHART_END_NAMESPACE diff --git a/plugins/declarative/declarativecategoryaxis.cpp b/plugins/declarative/declarativecategoryaxis.cpp index 73266e3..3337519 100644 --- a/plugins/declarative/declarativecategoryaxis.cpp +++ b/plugins/declarative/declarativecategoryaxis.cpp @@ -81,7 +81,7 @@ void DeclarativeCategoryAxis::remove(const QString &label) QCategoryAxis::remove(label); } -void DeclarativeCategoryAxis::replace(const QString& oldLabel, const QString& newLabel) +void DeclarativeCategoryAxis::replace(const QString &oldLabel, const QString &newLabel) { QCategoryAxis::replaceLabel(oldLabel, newLabel); } diff --git a/plugins/declarative/declarativecategoryaxis.h b/plugins/declarative/declarativecategoryaxis.h index 84aeb25..d06fc0b 100644 --- a/plugins/declarative/declarativecategoryaxis.h +++ b/plugins/declarative/declarativecategoryaxis.h @@ -68,7 +68,7 @@ public: // from QDeclarativeParserStatus public Q_SLOTS: Q_INVOKABLE void append(const QString &label, qreal categoryEndValue); Q_INVOKABLE void remove(const QString &label); - Q_INVOKABLE void replace(const QString& oldLabel, const QString& newLabel); + Q_INVOKABLE void replace(const QString &oldLabel, const QString &newLabel); static void appendAxisChildren(QDeclarativeListProperty *list, QObject *element); private: diff --git a/plugins/declarative/declarativechart.cpp b/plugins/declarative/declarativechart.cpp index 8dbde57..50e8bd4 100644 --- a/plugins/declarative/declarativechart.cpp +++ b/plugins/declarative/declarativechart.cpp @@ -368,7 +368,7 @@ void DeclarativeChart::componentComplete() QDeclarativeItem::componentComplete(); } -void DeclarativeChart::handleAxisXSet(QAbstractAxis* axis) +void DeclarativeChart::handleAxisXSet(QAbstractAxis *axis) { // qDebug() << "DeclarativeChart::handleAxisXSet" << sender() << axis; if (axis && qobject_cast(sender())) @@ -377,7 +377,7 @@ void DeclarativeChart::handleAxisXSet(QAbstractAxis* axis) qWarning() << "Trying to set axisX to null."; } -void DeclarativeChart::handleAxisYSet(QAbstractAxis* axis) +void DeclarativeChart::handleAxisYSet(QAbstractAxis *axis) { // qDebug() << "DeclarativeChart::handleAxisYSet" << sender() << axis; if (axis && qobject_cast(sender())) @@ -473,7 +473,7 @@ QFont DeclarativeChart::titleFont() const return m_chart->titleFont(); } -void DeclarativeChart::setTitleFont(const QFont& font) +void DeclarativeChart::setTitleFont(const QFont &font) { m_chart->setTitleFont(font); } @@ -669,17 +669,17 @@ void DeclarativeChart::createDefaultAxes() qWarning() << "ChartView.createDefaultAxes() is deprecated. Axes are created automatically."; } -void DeclarativeChart::createDefaultAxes(QAbstractSeries* series) +void DeclarativeChart::createDefaultAxes(QAbstractSeries *series) { foreach (QAbstractSeries *s, m_chart->series()) { // If there is already an x axis of the correct type, re-use it if (!m_chart->axisX(series) && s != series && m_chart->axisX(s) - && m_chart->axisX(s)->type() == series->d_ptr->defaultAxisType(Qt::Horizontal)) + && m_chart->axisX(s)->type() == series->d_ptr->defaultAxisType(Qt::Horizontal)) m_chart->setAxisX(m_chart->axisX(s), series); // If there is already a y axis of the correct type, re-use it if (!m_chart->axisY(series) && s != series && m_chart->axisY(s) - && m_chart->axisY(s)->type() == series->d_ptr->defaultAxisType(Qt::Vertical)) + && m_chart->axisY(s)->type() == series->d_ptr->defaultAxisType(Qt::Vertical)) m_chart->setAxisY(m_chart->axisY(s), series); } diff --git a/plugins/declarative/declarativechart.h b/plugins/declarative/declarativechart.h index d08d77c..5b9ca8e 100644 --- a/plugins/declarative/declarativechart.h +++ b/plugins/declarative/declarativechart.h @@ -72,7 +72,7 @@ public: enum Animation { NoAnimation = 0x0, GridAxisAnimations = 0x1, - SeriesAnimations =0x2, + SeriesAnimations = 0x2, AllAnimations = 0x3 }; @@ -108,7 +108,7 @@ public: QString title(); QLegend *legend(); QFont titleFont() const; - void setTitleFont(const QFont& font); + void setTitleFont(const QFont &font); void setTitleColor(QColor color); QColor titleColor(); void setBackgroundColor(QColor color); @@ -120,7 +120,7 @@ public: qreal bottomMargin(); qreal leftMargin(); qreal rightMargin(); - void createDefaultAxes(QAbstractSeries* series); + void createDefaultAxes(QAbstractSeries *series); //TODO this is depreciated: DeclarativeMargins *minimumMargins() { return m_margins; } @@ -153,8 +153,8 @@ Q_SIGNALS: void minimumMarginsChanged(); Q_REVISION(2) void marginsChanged(); void plotAreaChanged(QRectF plotArea); - void seriesAdded(QAbstractSeries* series); - void seriesRemoved(QAbstractSeries* series); + void seriesAdded(QAbstractSeries *series); + void seriesRemoved(QAbstractSeries *series); public Q_SLOTS: void changeMinimumMargins(int top, int bottom, int left, int right); diff --git a/plugins/declarative/declarativepieseries.cpp b/plugins/declarative/declarativepieseries.cpp index 8925ee3..c8fac60 100644 --- a/plugins/declarative/declarativepieseries.cpp +++ b/plugins/declarative/declarativepieseries.cpp @@ -41,10 +41,10 @@ void DeclarativePieSeries::componentComplete() foreach (QObject *child, children()) { if (qobject_cast(child)) { QPieSeries::append(qobject_cast(child)); - } else if(qobject_cast(child)) { + } else if (qobject_cast(child)) { QVPieModelMapper *mapper = qobject_cast(child); mapper->setSeries(this); - } else if(qobject_cast(child)) { + } else if (qobject_cast(child)) { QHPieModelMapper *mapper = qobject_cast(child); mapper->setSeries(this); } @@ -65,14 +65,14 @@ void DeclarativePieSeries::appendSeriesChildren(QDeclarativeListProperty sliceList = slices(); + QList sliceList = slices(); if (index >= 0 && index < sliceList.count()) return sliceList[index]; return 0; } -QPieSlice* DeclarativePieSeries::find(QString label) +QPieSlice *DeclarativePieSeries::find(QString label) { foreach (QPieSlice *slice, slices()) { if (slice->label() == label) @@ -81,7 +81,7 @@ QPieSlice* DeclarativePieSeries::find(QString label) return 0; } -QPieSlice* DeclarativePieSeries::append(QString label, qreal value) +QPieSlice *DeclarativePieSeries::append(QString label, qreal value) { QPieSlice *slice = new QPieSlice(this); slice->setLabel(label); @@ -100,13 +100,13 @@ void DeclarativePieSeries::clear() QPieSeries::clear(); } -void DeclarativePieSeries::handleAdded(QList slices) +void DeclarativePieSeries::handleAdded(QList slices) { foreach (QPieSlice *slice, slices) emit sliceAdded(slice); } -void DeclarativePieSeries::handleRemoved(QList slices) +void DeclarativePieSeries::handleRemoved(QList slices) { foreach (QPieSlice *slice, slices) emit sliceRemoved(slice); diff --git a/plugins/declarative/declarativepieseries.h b/plugins/declarative/declarativepieseries.h index 5a7d5cb..9a6c981 100644 --- a/plugins/declarative/declarativepieseries.h +++ b/plugins/declarative/declarativepieseries.h @@ -54,13 +54,13 @@ public: void componentComplete(); Q_SIGNALS: - void sliceAdded(QPieSlice* slice); - void sliceRemoved(QPieSlice* slice); + void sliceAdded(QPieSlice *slice); + void sliceRemoved(QPieSlice *slice); public Q_SLOTS: static void appendSeriesChildren(QDeclarativeListProperty *list, QObject *element); - void handleAdded(QList slices); - void handleRemoved(QList slices); + void handleAdded(QList slices); + void handleRemoved(QList slices); }; QTCOMMERCIALCHART_END_NAMESPACE diff --git a/plugins/declarative/declarativexyseries.cpp b/plugins/declarative/declarativexyseries.cpp index 715f808..8018c5d 100644 --- a/plugins/declarative/declarativexyseries.cpp +++ b/plugins/declarative/declarativexyseries.cpp @@ -47,10 +47,10 @@ void DeclarativeXySeries::componentComplete() if (qobject_cast(child)) { DeclarativeXYPoint *point = qobject_cast(child); series->append(point->x(), point->y()); - } else if(qobject_cast(child)) { + } else if (qobject_cast(child)) { QVXYModelMapper *mapper = qobject_cast(child); mapper->setSeries(series); - } else if(qobject_cast(child)) { + } else if (qobject_cast(child)) { QHXYModelMapper *mapper = qobject_cast(child); mapper->setSeries(series); } diff --git a/plugins/declarative/plugin.cpp b/plugins/declarative/plugin.cpp index 006cebd..108d8fe 100644 --- a/plugins/declarative/plugin.cpp +++ b/plugins/declarative/plugin.cpp @@ -62,7 +62,7 @@ class ChartQmlPlugin : public QDeclarativeExtensionPlugin Q_PLUGIN_METADATA(IID "org.qt-project.foo") #endif - public: +public: virtual void registerTypes(const char *uri) { Q_ASSERT(QLatin1String(uri) == QLatin1String("QtCommercial.Chart")); diff --git a/plugins/designer/qchartsplugin.cpp b/plugins/designer/qchartsplugin.cpp index 497de6a..2806f0d 100644 --- a/plugins/designer/qchartsplugin.cpp +++ b/plugins/designer/qchartsplugin.cpp @@ -42,16 +42,15 @@ QString QChartsPlugin::name() const QString QChartsPlugin::includeFile() const { - #ifdef linux +#ifdef linux QString myNewLine = "\n"; - #endif - #ifdef WIN32 +#endif +#ifdef WIN32 QString myNewLine = "\n\r"; - #endif - #ifdef __APPLE__ +#endif +#ifdef __APPLE__ QString myNewLine = "\n"; - #endif - +#endif return "" + myNewLine + "#include "; } @@ -80,7 +79,7 @@ bool QChartsPlugin::isContainer() const return false; } -QWidget* QChartsPlugin::createWidget(QWidget *parent) +QWidget *QChartsPlugin::createWidget(QWidget *parent) { return new QChartView(new QChart(), parent); } diff --git a/plugins/designer/qchartsplugin.h b/plugins/designer/qchartsplugin.h index 1f73bca..8121cb0 100644 --- a/plugins/designer/qchartsplugin.h +++ b/plugins/designer/qchartsplugin.h @@ -23,7 +23,7 @@ #include -class QChartsPlugin: public QObject,public QDesignerCustomWidgetInterface +class QChartsPlugin: public QObject, public QDesignerCustomWidgetInterface { #ifdef QT5_QUICK_1