From 3956f123f53d0878aedcb475fd92b4849f953f6e Mon Sep 17 00:00:00 2001 From: Uwe Rathmann Date: Wed, 4 Aug 2021 10:11:12 +0200 Subject: [PATCH] using pragma once for the examples --- examples/automotive/ButtonBar.h | 5 +---- examples/automotive/MainWindow.h | 5 +---- examples/automotive/SkinFactory.h | 5 +---- examples/automotive/Speedometer.h | 5 +---- examples/automotive/SpeedometerDisplay.h | 5 +---- examples/automotive/SpeedometerSkinlet.h | 5 +---- examples/boxes/Box.h | 5 +---- examples/colorswitch/Theme.h | 5 +---- examples/frames/Frame.h | 5 +---- examples/gallery/Page.h | 5 +---- examples/gallery/label/LabelPage.h | 5 +---- examples/gallery/progressbar/ProgressBarPage.h | 5 +---- examples/gallery/slider/CustomSlider.h | 5 +---- examples/gallery/slider/CustomSliderSkinlet.h | 5 +---- examples/gallery/slider/OtherSlider.h | 6 +----- examples/gallery/slider/SliderPage.h | 5 +---- examples/gallery/switchbutton/SwitchButtonPage.h | 5 +---- examples/gbenchmark/Benchmark.h | 5 +---- examples/iotdashboard/Box.h | 5 +---- examples/iotdashboard/BoxWithButtons.h | 5 +---- examples/iotdashboard/CircularProgressBar.h | 7 ++----- examples/iotdashboard/Diagram.h | 12 +++++------- examples/iotdashboard/DiagramSkinlet.h | 5 +---- examples/iotdashboard/LightIntensity.h | 5 +---- examples/iotdashboard/MainContent.h | 5 +---- examples/iotdashboard/MainWindow.h | 5 +---- examples/iotdashboard/MenuBar.h | 5 +---- examples/iotdashboard/MyDevices.h | 5 +---- examples/iotdashboard/PieChart.h | 5 +---- examples/iotdashboard/PieChartPainted.h | 9 +++------ examples/iotdashboard/PieChartSkinlet.h | 11 +++++------ examples/iotdashboard/RoundedIcon.h | 5 +---- examples/iotdashboard/Skin.h | 5 +---- examples/iotdashboard/TopBar.h | 5 +---- examples/iotdashboard/UpAndDownButton.h | 5 +---- examples/iotdashboard/Usage.h | 5 +---- examples/iotdashboard/UsageDiagram.h | 6 +----- examples/iotdashboard/nodes/DiagramDataNode.h | 8 +++----- examples/iotdashboard/nodes/DiagramSegmentsNode.h | 8 +++----- examples/layouts/ButtonBox.h | 5 +---- examples/layouts/DynamicConstraintsPage.h | 5 +---- examples/layouts/FlowLayoutPage.h | 5 +---- examples/layouts/GridLayoutPage.h | 5 +---- examples/layouts/LinearLayoutPage.h | 5 +---- examples/layouts/StackLayoutPage.h | 5 +---- examples/layouts/TestRectangle.h | 5 +---- examples/mycontrols/MySkin.h | 5 +---- examples/mycontrols/MyToggleButton.h | 5 +---- examples/mycontrols/MyToggleButtonSkinlet.h | 5 +---- examples/qvgviewer/MainWindow.h | 5 +---- playground/anchors/AnchorBox.h | 6 +----- playground/dialogbuttons/Window.h | 5 +---- playground/grids/GridAccessor.h | 5 +---- playground/grids/GridGraphics.h | 7 ++----- playground/grids/GridQuick.h | 5 +---- playground/grids/GridSkinny.h | 7 ++----- playground/grids/GridWidgets.h | 7 ++----- playground/grids/TestBox.h | 5 +---- playground/images/Image.h | 5 +---- playground/invoker/Callback.h | 5 +---- playground/invoker/Invoker.h | 5 +---- playground/shadows/BoxShadowNode.cpp | 5 +++++ playground/shadows/BoxShadowNode.h | 10 ++++++---- playground/shadows/ShadowedBox.cpp | 5 +++++ playground/shadows/ShadowedBox.h | 10 ++++++---- 65 files changed, 101 insertions(+), 268 deletions(-) diff --git a/examples/automotive/ButtonBar.h b/examples/automotive/ButtonBar.h index 84f68473..a30f1e9d 100644 --- a/examples/automotive/ButtonBar.h +++ b/examples/automotive/ButtonBar.h @@ -3,8 +3,7 @@ * This file may be used under the terms of the 3-clause BSD License *****************************************************************************/ -#ifndef BUTTON_BAR_H -#define BUTTON_BAR_H +#pragma once #include @@ -19,5 +18,3 @@ class ButtonBar : public QskLinearBox protected: QSizeF layoutSizeHint( Qt::SizeHint, const QSizeF& ) const override; }; - -#endif diff --git a/examples/automotive/MainWindow.h b/examples/automotive/MainWindow.h index f76ea1a2..11a2f96f 100644 --- a/examples/automotive/MainWindow.h +++ b/examples/automotive/MainWindow.h @@ -3,8 +3,7 @@ * This file may be used under the terms of the 3-clause BSD License *****************************************************************************/ -#ifndef MAINWINDOW_H -#define MAINWINDOW_H +#pragma once #include @@ -15,5 +14,3 @@ class MainWindow : public QskWindow public: MainWindow(); }; - -#endif diff --git a/examples/automotive/SkinFactory.h b/examples/automotive/SkinFactory.h index 87ce3c94..00d63dce 100644 --- a/examples/automotive/SkinFactory.h +++ b/examples/automotive/SkinFactory.h @@ -3,8 +3,7 @@ * This file may be used under the terms of the 3-clause BSD License *****************************************************************************/ -#ifndef SKIN_FACTORY_H -#define SKIN_FACTORY_H +#pragma once #include @@ -25,5 +24,3 @@ class SkinFactory : public QskSkinFactory public Q_SLOTS: void rotateSkin(); }; - -#endif diff --git a/examples/automotive/Speedometer.h b/examples/automotive/Speedometer.h index edfa2d0f..b27b8248 100644 --- a/examples/automotive/Speedometer.h +++ b/examples/automotive/Speedometer.h @@ -3,8 +3,7 @@ * This file may be used under the terms of the 3-clause BSD License *****************************************************************************/ -#ifndef SPEEDOMETER_H -#define SPEEDOMETER_H +#pragma once #include @@ -23,5 +22,3 @@ class Speedometer : public QskBoundedValueInput private: QVector< QString > m_tickLabels; }; - -#endif diff --git a/examples/automotive/SpeedometerDisplay.h b/examples/automotive/SpeedometerDisplay.h index 901327fc..34801b10 100644 --- a/examples/automotive/SpeedometerDisplay.h +++ b/examples/automotive/SpeedometerDisplay.h @@ -3,8 +3,7 @@ * This file may be used under the terms of the 3-clause BSD License *****************************************************************************/ -#ifndef SPEEDOMETERDISPLAY_H -#define SPEEDOMETERDISPLAY_H +#pragma once #include @@ -13,5 +12,3 @@ class SpeedometerDisplay : public QskLinearBox public: SpeedometerDisplay( QQuickItem* parent = nullptr ); }; - -#endif diff --git a/examples/automotive/SpeedometerSkinlet.h b/examples/automotive/SpeedometerSkinlet.h index 897a3fd4..caf563b9 100644 --- a/examples/automotive/SpeedometerSkinlet.h +++ b/examples/automotive/SpeedometerSkinlet.h @@ -3,8 +3,7 @@ * This file may be used under the terms of the 3-clause BSD License *****************************************************************************/ -#ifndef SPEEDOMETERSKINLET_H -#define SPEEDOMETERSKINLET_H +#pragma once #include @@ -39,5 +38,3 @@ class SpeedometerSkinlet : public QskSkinlet QSGNode* updateLabelsNode( const Speedometer*, QSGNode* ) const; QSGNode* updateNeedleNode( const Speedometer*, QSGNode* ) const; }; - -#endif diff --git a/examples/boxes/Box.h b/examples/boxes/Box.h index 7aad6e82..caf1f405 100644 --- a/examples/boxes/Box.h +++ b/examples/boxes/Box.h @@ -3,8 +3,7 @@ * This file may be used under the terms of the 3-clause BSD License *****************************************************************************/ -#ifndef BOX_H -#define BOX_H +#pragma once #include #include @@ -59,5 +58,3 @@ class Box : public QskBox void setGradient( const QskGradient& gradient ); void setGradient( const QskGradient::Orientation, QskRgbPalette::Theme ); }; - -#endif diff --git a/examples/colorswitch/Theme.h b/examples/colorswitch/Theme.h index 37ad6d84..a01300f3 100644 --- a/examples/colorswitch/Theme.h +++ b/examples/colorswitch/Theme.h @@ -3,8 +3,7 @@ * This file may be used under the terms of the 3-clause BSD License *****************************************************************************/ -#ifndef THEME_H -#define THEME_H 1 +#pragma once #include #include @@ -34,5 +33,3 @@ class Theme : public QObject QColor m_accent; }; - -#endif diff --git a/examples/frames/Frame.h b/examples/frames/Frame.h index 6dc819f1..55c2f687 100644 --- a/examples/frames/Frame.h +++ b/examples/frames/Frame.h @@ -3,8 +3,7 @@ * This file may be used under the terms of the QSkinny License, Version 1.0 *****************************************************************************/ -#ifndef FRAME_H -#define FRAME_H +#pragma once #include "QskControl.h" @@ -70,5 +69,3 @@ class Frame : public QskControl qreal m_frameWidth; qreal m_radius; }; - -#endif diff --git a/examples/gallery/Page.h b/examples/gallery/Page.h index d186bcad..431ba883 100644 --- a/examples/gallery/Page.h +++ b/examples/gallery/Page.h @@ -3,8 +3,7 @@ * This file may be used under the terms of the 3-clause BSD License *****************************************************************************/ -#ifndef PAGE_H -#define PAGE_H +#pragma once #include @@ -14,5 +13,3 @@ class Page : public QskLinearBox Page( Qt::Orientation, QQuickItem* parent = nullptr ); void setGradient( const QskGradient& ); }; - -#endif diff --git a/examples/gallery/label/LabelPage.h b/examples/gallery/label/LabelPage.h index 5d03e7fb..e661e8f2 100644 --- a/examples/gallery/label/LabelPage.h +++ b/examples/gallery/label/LabelPage.h @@ -3,8 +3,7 @@ * This file may be used under the terms of the 3-clause BSD License *****************************************************************************/ -#ifndef LABEL_PAGE_H -#define LABEL_PAGE_H +#pragma once #include "Page.h" @@ -13,5 +12,3 @@ class LabelPage : public Page public: LabelPage( QQuickItem* = nullptr ); }; - -#endif diff --git a/examples/gallery/progressbar/ProgressBarPage.h b/examples/gallery/progressbar/ProgressBarPage.h index 59906012..4a9df81f 100644 --- a/examples/gallery/progressbar/ProgressBarPage.h +++ b/examples/gallery/progressbar/ProgressBarPage.h @@ -3,8 +3,7 @@ * This file may be used under the terms of the 3-clause BSD License *****************************************************************************/ -#ifndef PROGRESS_BAR_PAGE_H -#define PROGRESS_BAR_PAGE_H +#pragma once #include "Page.h" @@ -16,5 +15,3 @@ class ProgressBarPage : public Page private: void populate(); }; - -#endif diff --git a/examples/gallery/slider/CustomSlider.h b/examples/gallery/slider/CustomSlider.h index 7a8a119c..a1bc8983 100644 --- a/examples/gallery/slider/CustomSlider.h +++ b/examples/gallery/slider/CustomSlider.h @@ -3,8 +3,7 @@ * This file may be used under the terms of the 3-clause BSD License *****************************************************************************/ -#ifndef CUSTOM_SLIDER_H -#define CUSTOM_SLIDER_H +#pragma once #include @@ -19,5 +18,3 @@ class CustomSlider : public QskSlider QRectF focusIndicatorRect() const override; }; - -#endif diff --git a/examples/gallery/slider/CustomSliderSkinlet.h b/examples/gallery/slider/CustomSliderSkinlet.h index b9e232b1..f7ac3f53 100644 --- a/examples/gallery/slider/CustomSliderSkinlet.h +++ b/examples/gallery/slider/CustomSliderSkinlet.h @@ -3,8 +3,7 @@ * This file may be used under the terms of the 3-clause BSD License *****************************************************************************/ -#ifndef CUSTOM_SLIDER_SKINLET_H -#define CUSTOM_SLIDER_SKINLET_H +#pragma once #include @@ -44,5 +43,3 @@ class CustomSliderSkinlet : public QskSliderSkinlet QRectF decorationRect( const QskSlider*, const QRectF& ) const; QRectF handleRect( const QskSlider*, const QRectF& ) const; }; - -#endif diff --git a/examples/gallery/slider/OtherSlider.h b/examples/gallery/slider/OtherSlider.h index 4befd463..17dde84d 100644 --- a/examples/gallery/slider/OtherSlider.h +++ b/examples/gallery/slider/OtherSlider.h @@ -3,8 +3,7 @@ * This file may be used under the terms of the 3-clause BSD License *****************************************************************************/ -#ifndef OTHER_SLIDER_H -#define OTHER_SLIDER_H +#pragma once #include @@ -12,8 +11,5 @@ class OtherSlider : public QskSlider { public: // Slider overriding many hints from the skin. - OtherSlider( QQuickItem* = nullptr ); }; - -#endif diff --git a/examples/gallery/slider/SliderPage.h b/examples/gallery/slider/SliderPage.h index d92ebf9d..6af6b7fb 100644 --- a/examples/gallery/slider/SliderPage.h +++ b/examples/gallery/slider/SliderPage.h @@ -3,8 +3,7 @@ * This file may be used under the terms of the 3-clause BSD License *****************************************************************************/ -#ifndef SLIDER_PAGE_H -#define SLIDER_PAGE_H +#pragma once #include "Page.h" @@ -16,5 +15,3 @@ class SliderPage : public Page private: void populate(); }; - -#endif diff --git a/examples/gallery/switchbutton/SwitchButtonPage.h b/examples/gallery/switchbutton/SwitchButtonPage.h index b7ef82fe..377092da 100644 --- a/examples/gallery/switchbutton/SwitchButtonPage.h +++ b/examples/gallery/switchbutton/SwitchButtonPage.h @@ -3,8 +3,7 @@ * This file may be used under the terms of the 3-clause BSD License *****************************************************************************/ -#ifndef SWITCH_BUTTON_PAGE_H -#define SWITCH_BUTTON_PAGE_H +#pragma once #include "Page.h" @@ -16,5 +15,3 @@ class SwitchButtonPage : public Page private: void populate(); }; - -#endif diff --git a/examples/gbenchmark/Benchmark.h b/examples/gbenchmark/Benchmark.h index 897c161e..4a6efc78 100644 --- a/examples/gbenchmark/Benchmark.h +++ b/examples/gbenchmark/Benchmark.h @@ -3,8 +3,7 @@ * This file may be used under the terms of the 3-clause BSD License *****************************************************************************/ -#ifndef BENCHMARK_ -#define BENCHMARK_ 1 +#pragma once class QString; @@ -12,5 +11,3 @@ namespace Benchmark { bool run( const QString& svgDir ); } - -#endif diff --git a/examples/iotdashboard/Box.h b/examples/iotdashboard/Box.h index 818fd615..eff2b763 100644 --- a/examples/iotdashboard/Box.h +++ b/examples/iotdashboard/Box.h @@ -3,8 +3,7 @@ * This file may be used under the terms of the 3-clause BSD License *****************************************************************************/ -#ifndef BOX_H -#define BOX_H +#pragma once #include @@ -26,5 +25,3 @@ class Box : public QskLinearBox QString m_title; QskTextLabel* m_label; }; - -#endif // BOX_H diff --git a/examples/iotdashboard/BoxWithButtons.h b/examples/iotdashboard/BoxWithButtons.h index 21ffb238..b61052d8 100644 --- a/examples/iotdashboard/BoxWithButtons.h +++ b/examples/iotdashboard/BoxWithButtons.h @@ -3,8 +3,7 @@ * This file may be used under the terms of the 3-clause BSD License *****************************************************************************/ -#ifndef BOXWITHBUTTONS_H -#define BOXWITHBUTTONS_H +#pragma once #include "Box.h" #include "RoundedIcon.h" @@ -101,5 +100,3 @@ class Humidity : public BoxWithButtons { } }; - -#endif // BOXWITHBUTTONS_H diff --git a/examples/iotdashboard/CircularProgressBar.h b/examples/iotdashboard/CircularProgressBar.h index e6e3a4cb..10acfc15 100644 --- a/examples/iotdashboard/CircularProgressBar.h +++ b/examples/iotdashboard/CircularProgressBar.h @@ -3,8 +3,7 @@ * This file may be used under the terms of the 3-clause BSD License *****************************************************************************/ -#ifndef CIRCULARPROGRESSBAR_H -#define CIRCULARPROGRESSBAR_H +#pragma once #include @@ -14,7 +13,7 @@ class CircularProgressBar : public QQuickPaintedItem { public: - CircularProgressBar( const QskGradient& gradient, int progress, QQuickItem* parent = nullptr ); + CircularProgressBar( const QskGradient&, int progress, QQuickItem* parent = nullptr ); virtual void paint( QPainter* painter ) override; @@ -55,5 +54,3 @@ class CircularProgressBar : public QQuickPaintedItem double m_width = 20; int m_progress; }; - -#endif // CIRCULARPROGRESSBAR_H diff --git a/examples/iotdashboard/Diagram.h b/examples/iotdashboard/Diagram.h index 848a78d7..c48e4b91 100644 --- a/examples/iotdashboard/Diagram.h +++ b/examples/iotdashboard/Diagram.h @@ -3,8 +3,7 @@ * This file may be used under the terms of the QSkinny License, Version 1.0 *****************************************************************************/ -#ifndef DIAGRAM_H -#define DIAGRAM_H +#pragma once #include #include @@ -16,7 +15,8 @@ class Diagram : public QskControl using Inherited = QskControl; public: - QSK_SUBCONTROLS( Chart, Segments, ChartLine1, ChartArea1, ChartLine2, ChartArea2, ChartLine3, ChartArea3 ) + QSK_SUBCONTROLS( Chart, Segments, ChartLine1, ChartArea1, + ChartLine2, ChartArea2, ChartLine3, ChartArea3 ) enum Type { @@ -30,7 +30,7 @@ class Diagram : public QskControl ~Diagram() override; QVector< QVector< QPointF > > dataPoints() const; - void addDataPoints( const QVector< QPointF >& dataPoints, const Types& types ); + void addDataPoints( const QVector< QPointF >&, const Types& ); Types typesAt( uint pos ) const; @@ -41,7 +41,7 @@ class Diagram : public QskControl void setXGridLines( int lines ); Qsk::Position chartPosition() const; - void setChartPosition( Qsk::Position position ); + void setChartPosition( Qsk::Position ); protected: QSizeF contentsSizeHint( Qt::SizeHint, const QSizeF& ) const override; @@ -52,5 +52,3 @@ class Diagram : public QskControl }; Q_DECLARE_OPERATORS_FOR_FLAGS( Diagram::Types ) - -#endif // DIAGRAM_H diff --git a/examples/iotdashboard/DiagramSkinlet.h b/examples/iotdashboard/DiagramSkinlet.h index bfc5057e..86c1254c 100644 --- a/examples/iotdashboard/DiagramSkinlet.h +++ b/examples/iotdashboard/DiagramSkinlet.h @@ -3,8 +3,7 @@ * This file may be used under the terms of the QSkinny License, Version 1.0 *****************************************************************************/ -#ifndef DIAGRAM_SKINLET_H -#define DIAGRAM_SKINLET_H +#pragma once #include @@ -38,5 +37,3 @@ class DiagramSkinlet : public QskSkinlet QSGNode* updateChartNode( const Diagram*, QSGNode* ) const; QSGNode* updateSeparatorNode( const Diagram*, QSGNode* ) const; }; - -#endif // DIAGRAM_SKINLET_H diff --git a/examples/iotdashboard/LightIntensity.h b/examples/iotdashboard/LightIntensity.h index e4cd7e2f..34c9d57d 100644 --- a/examples/iotdashboard/LightIntensity.h +++ b/examples/iotdashboard/LightIntensity.h @@ -3,8 +3,7 @@ * This file may be used under the terms of the 3-clause BSD License *****************************************************************************/ -#ifndef LIGHTINTENSITY_H -#define LIGHTINTENSITY_H +#pragma once #include "Box.h" @@ -117,5 +116,3 @@ class LightIntensity : public Box public: LightIntensity( QQuickItem* parent ); }; - -#endif // LIGHTINTENSITY_H diff --git a/examples/iotdashboard/MainContent.h b/examples/iotdashboard/MainContent.h index da032aff..183bfda7 100644 --- a/examples/iotdashboard/MainContent.h +++ b/examples/iotdashboard/MainContent.h @@ -3,8 +3,7 @@ * This file may be used under the terms of the 3-clause BSD License *****************************************************************************/ -#ifndef MAINCONTENT_H -#define MAINCONTENT_H +#pragma once #include #include @@ -71,5 +70,3 @@ class MainContent : public QskLinearBox QList< QskLinearBox* > m_columns; ShadowPositioner* m_shadowPositioner; }; - -#endif // MAINCONTENT_H diff --git a/examples/iotdashboard/MainWindow.h b/examples/iotdashboard/MainWindow.h index 92428336..51d2e0fd 100644 --- a/examples/iotdashboard/MainWindow.h +++ b/examples/iotdashboard/MainWindow.h @@ -3,8 +3,7 @@ * This file may be used under the terms of the 3-clause BSD License *****************************************************************************/ -#ifndef MAINWINDOW_H -#define MAINWINDOW_H +#pragma once #include @@ -24,5 +23,3 @@ class MainWindow : public QskWindow MenuBar* m_menuBar; MainContent* m_mainContent; }; - -#endif // MAINWINDOW_H diff --git a/examples/iotdashboard/MenuBar.h b/examples/iotdashboard/MenuBar.h index 03f86bc3..046a001b 100644 --- a/examples/iotdashboard/MenuBar.h +++ b/examples/iotdashboard/MenuBar.h @@ -3,8 +3,7 @@ * This file may be used under the terms of the 3-clause BSD License *****************************************************************************/ -#ifndef MENUBAR_H -#define MENUBAR_H +#pragma once #include #include @@ -115,5 +114,3 @@ class MenuBar final : public QskLinearBox QList< MenuItem* > m_entries; uint m_activeEntry = 0; }; - -#endif // MENUBAR_H diff --git a/examples/iotdashboard/MyDevices.h b/examples/iotdashboard/MyDevices.h index 361bd7fd..c2f2fee9 100644 --- a/examples/iotdashboard/MyDevices.h +++ b/examples/iotdashboard/MyDevices.h @@ -3,8 +3,7 @@ * This file may be used under the terms of the 3-clause BSD License *****************************************************************************/ -#ifndef MYDEVICES_H -#define MYDEVICES_H +#pragma once #include "Box.h" @@ -13,5 +12,3 @@ class MyDevices : public Box public: MyDevices( QQuickItem* parent ); }; - -#endif // MYDEVICES_H diff --git a/examples/iotdashboard/PieChart.h b/examples/iotdashboard/PieChart.h index dd76994c..32901ad9 100644 --- a/examples/iotdashboard/PieChart.h +++ b/examples/iotdashboard/PieChart.h @@ -3,8 +3,7 @@ * This file may be used under the terms of the 3-clause BSD License *****************************************************************************/ -#ifndef PIECHART_H -#define PIECHART_H +#pragma once #include @@ -27,5 +26,3 @@ class PieChart : public QskControl QVector< float > m_angles; QVector< QString > m_labels; }; - -#endif // PIECHART_H diff --git a/examples/iotdashboard/PieChartPainted.h b/examples/iotdashboard/PieChartPainted.h index 98872b56..68c097ed 100644 --- a/examples/iotdashboard/PieChartPainted.h +++ b/examples/iotdashboard/PieChartPainted.h @@ -3,11 +3,9 @@ * This file may be used under the terms of the 3-clause BSD License *****************************************************************************/ -#ifndef PIECHARTPAINTED_H -#define PIECHARTPAINTED_H +#pragma once #include - #include "CircularProgressBar.h" class ProgressBarAnimator; @@ -20,7 +18,8 @@ class PieChartPainted : public QskControl public: QSK_SUBCONTROLS( Panel ) - PieChartPainted( const QColor& color, const QskGradient& gradient, int progress, int value, QQuickItem* parent = nullptr ); + PieChartPainted( const QColor&, const QskGradient&, + int progress, int value, QQuickItem* parent = nullptr ); QskAspect::Subcontrol effectiveSubcontrol( QskAspect::Subcontrol subControl ) const override final; @@ -35,5 +34,3 @@ class PieChartPainted : public QskControl QskTextLabel* m_progressLabel; ProgressBarAnimator* m_animator; }; - -#endif // PIECHARTPAINTED_H diff --git a/examples/iotdashboard/PieChartSkinlet.h b/examples/iotdashboard/PieChartSkinlet.h index c0742742..b06c0066 100644 --- a/examples/iotdashboard/PieChartSkinlet.h +++ b/examples/iotdashboard/PieChartSkinlet.h @@ -3,8 +3,7 @@ * This file may be used under the terms of the 3-clause BSD License *****************************************************************************/ -#ifndef PIECHART_SKINLET_H -#define PIECHART_SKINLET_H +#pragma once #include @@ -23,14 +22,14 @@ class PieChartSkinlet : public QskSkinlet Q_INVOKABLE PieChartSkinlet( QskSkin* skin = nullptr ); - QRectF subControlRect( const QskSkinnable*, const QRectF&, QskAspect::Subcontrol ) const override; + QRectF subControlRect( const QskSkinnable*, + const QRectF&, QskAspect::Subcontrol ) const override; protected: - virtual QSGNode* updateSubNode( const QskSkinnable*, quint8 nodeRole, QSGNode* node ) const override; + virtual QSGNode* updateSubNode( const QskSkinnable*, + quint8 nodeRole, QSGNode* node ) const override; private: QSGNode* updatePanelNode( const PieChart*, QSGNode* ) const; QSGNode* updateLabelsNode( const PieChart*, QSGNode* ) const; }; - -#endif // PIECHART_SKINLET_H diff --git a/examples/iotdashboard/RoundedIcon.h b/examples/iotdashboard/RoundedIcon.h index 303ff394..4557b119 100644 --- a/examples/iotdashboard/RoundedIcon.h +++ b/examples/iotdashboard/RoundedIcon.h @@ -3,8 +3,7 @@ * This file may be used under the terms of the 3-clause BSD License *****************************************************************************/ -#ifndef ROUNDEDICON_H -#define ROUNDEDICON_H +#pragma once #include #include @@ -41,5 +40,3 @@ class RoundedIcon : public QskBox QString m_iconName; QskGraphicLabel* m_graphicLabel = nullptr; }; - -#endif // ROUNDEDICON_H diff --git a/examples/iotdashboard/Skin.h b/examples/iotdashboard/Skin.h index e632a891..f6b0f1ea 100644 --- a/examples/iotdashboard/Skin.h +++ b/examples/iotdashboard/Skin.h @@ -3,8 +3,7 @@ * This file may be used under the terms of the 3-clause BSD License *****************************************************************************/ -#ifndef SKIN_H -#define SKIN_H +#pragma once #include #include @@ -78,5 +77,3 @@ class NighttimeSkin : public Skin { } }; - -#endif // SKIN_H diff --git a/examples/iotdashboard/TopBar.h b/examples/iotdashboard/TopBar.h index 1a55b32f..eee1daed 100644 --- a/examples/iotdashboard/TopBar.h +++ b/examples/iotdashboard/TopBar.h @@ -3,8 +3,7 @@ * This file may be used under the terms of the 3-clause BSD License *****************************************************************************/ -#ifndef TOPBAR_H -#define TOPBAR_H +#pragma once #include #include @@ -106,5 +105,3 @@ class TopBar : public QskLinearBox private: QList< TopBarItem* > m_entries; }; - -#endif diff --git a/examples/iotdashboard/UpAndDownButton.h b/examples/iotdashboard/UpAndDownButton.h index 5a4051d3..5dd8469e 100644 --- a/examples/iotdashboard/UpAndDownButton.h +++ b/examples/iotdashboard/UpAndDownButton.h @@ -3,8 +3,7 @@ * This file may be used under the terms of the 3-clause BSD License *****************************************************************************/ -#ifndef UPANDDOWNBUTTON_H -#define UPANDDOWNBUTTON_H +#pragma once #include #include @@ -30,5 +29,3 @@ class UpAndDownButton : public QskLinearBox public: UpAndDownButton( QQuickItem* parent ); }; - -#endif // UPANDDOWNBUTTON_H diff --git a/examples/iotdashboard/Usage.h b/examples/iotdashboard/Usage.h index aebdbe4b..a738db38 100644 --- a/examples/iotdashboard/Usage.h +++ b/examples/iotdashboard/Usage.h @@ -3,8 +3,7 @@ * This file may be used under the terms of the 3-clause BSD License *****************************************************************************/ -#ifndef USAGE_H -#define USAGE_H +#pragma once #include "Box.h" @@ -40,5 +39,3 @@ class Usage : public Box public: Usage( QQuickItem* parent ); }; - -#endif // USAGE_H diff --git a/examples/iotdashboard/UsageDiagram.h b/examples/iotdashboard/UsageDiagram.h index a36fd1bc..77f083b2 100644 --- a/examples/iotdashboard/UsageDiagram.h +++ b/examples/iotdashboard/UsageDiagram.h @@ -3,13 +3,11 @@ * This file may be used under the terms of the 3-clause BSD License *****************************************************************************/ -#ifndef USAGEDIAGRAM_H -#define USAGEDIAGRAM_H +#pragma once #include "Box.h" #include - #include class Diagram; @@ -157,5 +155,3 @@ class UsageDiagram : public Box QskLinearBox* m_captionBox; QskGridBox* m_weekdays; }; - -#endif // USAGEDIAGRAM_H diff --git a/examples/iotdashboard/nodes/DiagramDataNode.h b/examples/iotdashboard/nodes/DiagramDataNode.h index 00232184..65bb6c0b 100644 --- a/examples/iotdashboard/nodes/DiagramDataNode.h +++ b/examples/iotdashboard/nodes/DiagramDataNode.h @@ -3,8 +3,7 @@ * This file may be used under the terms of the QSkinny License, Version 1.0 *****************************************************************************/ -#ifndef DIAGRAMDATANODE_H -#define DIAGRAMDATANODE_H +#pragma once #include @@ -23,7 +22,8 @@ class DiagramDataNode : public QSGGeometryNode DiagramDataNode(); - void update( const QRectF& rect, Type type, const QColor& color, const QVector< QPointF >& dataPoints, const qreal yMax, Qsk::Position position, int lineWidth ); + void update( const QRectF&, Type, const QColor&, + const QVector< QPointF >&, const qreal yMax, Qsk::Position, int lineWidth ); private: QSGFlatColorMaterial m_material; @@ -37,5 +37,3 @@ class DiagramDataNode : public QSGGeometryNode Qsk::Position m_position; int m_lineWidth; }; - -#endif diff --git a/examples/iotdashboard/nodes/DiagramSegmentsNode.h b/examples/iotdashboard/nodes/DiagramSegmentsNode.h index 9cea4d00..70058ac4 100644 --- a/examples/iotdashboard/nodes/DiagramSegmentsNode.h +++ b/examples/iotdashboard/nodes/DiagramSegmentsNode.h @@ -3,8 +3,7 @@ * This file may be used under the terms of the QSkinny License, Version 1.0 *****************************************************************************/ -#ifndef DIAGRAMSEGMENTSNODE_H -#define DIAGRAMSEGMENTSNODE_H +#pragma once #include #include @@ -15,7 +14,8 @@ class DiagramSegmentsNode : public QSGGeometryNode public: DiagramSegmentsNode(); - void update( const QRectF& rect, const QColor& color, const QVector< QVector< QPointF > >& dataPoints, int xGridLines ); + void update( const QRectF&, const QColor&, + const QVector< QVector< QPointF > >&, int xGridLines ); private: QSGFlatColorMaterial m_material; @@ -26,5 +26,3 @@ class DiagramSegmentsNode : public QSGGeometryNode QVector< QVector< QPointF > > m_dataPoints; int m_xGridLines; }; - -#endif diff --git a/examples/layouts/ButtonBox.h b/examples/layouts/ButtonBox.h index 166603a3..8f486995 100644 --- a/examples/layouts/ButtonBox.h +++ b/examples/layouts/ButtonBox.h @@ -3,8 +3,7 @@ * This file may be used under the terms of the 3-clause BSD License *****************************************************************************/ -#ifndef BUTTON_BOX -#define BUTTON_BOX 1 +#pragma once #include #include @@ -17,5 +16,3 @@ class ButtonBox : public QskLinearBox void addButton( const QString& text, std::function< void() > func, bool autoRepeat = false ); }; - -#endif diff --git a/examples/layouts/DynamicConstraintsPage.h b/examples/layouts/DynamicConstraintsPage.h index 68ce1a36..12890c00 100644 --- a/examples/layouts/DynamicConstraintsPage.h +++ b/examples/layouts/DynamicConstraintsPage.h @@ -3,8 +3,7 @@ * This file may be used under the terms of the 3-clause BSD License *****************************************************************************/ -#ifndef DYNAMIC_CONSTRAINTS_PAGE -#define DYNAMIC_CONSTRAINTS_PAGE 1 +#pragma once #include @@ -13,5 +12,3 @@ class DynamicConstraintsPage : public QskLinearBox public: DynamicConstraintsPage( QQuickItem* parent = nullptr ); }; - -#endif diff --git a/examples/layouts/FlowLayoutPage.h b/examples/layouts/FlowLayoutPage.h index 7f0e0001..4226abfc 100644 --- a/examples/layouts/FlowLayoutPage.h +++ b/examples/layouts/FlowLayoutPage.h @@ -3,8 +3,7 @@ * This file may be used under the terms of the 3-clause BSD License *****************************************************************************/ -#ifndef FLOW_LAYOUT_PAGE -#define FLOW_LAYOUT_PAGE 1 +#pragma once #include @@ -13,5 +12,3 @@ class FlowLayoutPage : public QskLinearBox public: FlowLayoutPage( QQuickItem* parent = nullptr ); }; - -#endif diff --git a/examples/layouts/GridLayoutPage.h b/examples/layouts/GridLayoutPage.h index de08d3d4..e8480663 100644 --- a/examples/layouts/GridLayoutPage.h +++ b/examples/layouts/GridLayoutPage.h @@ -3,8 +3,7 @@ * This file may be used under the terms of the 3-clause BSD License *****************************************************************************/ -#ifndef GRID_LAYOUT_PAGE -#define GRID_LAYOUT_PAGE +#pragma once #include @@ -13,5 +12,3 @@ class GridLayoutPage : public QskControl public: GridLayoutPage( QQuickItem* parent = nullptr ); }; - -#endif diff --git a/examples/layouts/LinearLayoutPage.h b/examples/layouts/LinearLayoutPage.h index a6b6b5a6..2607ac71 100644 --- a/examples/layouts/LinearLayoutPage.h +++ b/examples/layouts/LinearLayoutPage.h @@ -3,8 +3,7 @@ * This file may be used under the terms of the 3-clause BSD License *****************************************************************************/ -#ifndef LINERAR_LAYOUT_PAGE -#define LINEAR_LAYOUT_PAGE 1 +#pragma once #include @@ -13,5 +12,3 @@ class LinearLayoutPage : public QskLinearBox public: LinearLayoutPage( QQuickItem* parent = nullptr ); }; - -#endif diff --git a/examples/layouts/StackLayoutPage.h b/examples/layouts/StackLayoutPage.h index f662e69c..0a6bc2eb 100644 --- a/examples/layouts/StackLayoutPage.h +++ b/examples/layouts/StackLayoutPage.h @@ -3,8 +3,7 @@ * This file may be used under the terms of the 3-clause BSD License *****************************************************************************/ -#ifndef STACK_LAYOUT_PAGE -#define STACK_LAYOUT_PAGE 1 +#pragma once #include @@ -13,5 +12,3 @@ class StackLayoutPage : public QskLinearBox public: StackLayoutPage( QQuickItem* parent = nullptr ); }; - -#endif diff --git a/examples/layouts/TestRectangle.h b/examples/layouts/TestRectangle.h index ca0896c0..767193cb 100644 --- a/examples/layouts/TestRectangle.h +++ b/examples/layouts/TestRectangle.h @@ -3,8 +3,7 @@ * This file may be used under the terms of the 3-clause BSD License *****************************************************************************/ -#ifndef TEST_RECTANGLE -#define TEST_RECTANGLE +#pragma once #include @@ -24,5 +23,3 @@ class TestRectangle : public QskTextLabel private: QString m_colorName; }; - -#endif diff --git a/examples/mycontrols/MySkin.h b/examples/mycontrols/MySkin.h index 68364665..a107de1b 100644 --- a/examples/mycontrols/MySkin.h +++ b/examples/mycontrols/MySkin.h @@ -3,8 +3,7 @@ * This file may be used under the terms of the 3-clause BSD License *****************************************************************************/ -#ifndef MY_SKIN_H -#define MY_SKIN_H +#pragma once #include @@ -17,5 +16,3 @@ class MySkinFactory : public QskSkinFactory QStringList skinNames() const override; QskSkin* createSkin( const QString& skinName ) override; }; - -#endif diff --git a/examples/mycontrols/MyToggleButton.h b/examples/mycontrols/MyToggleButton.h index c69fa0a9..68b58d32 100644 --- a/examples/mycontrols/MyToggleButton.h +++ b/examples/mycontrols/MyToggleButton.h @@ -3,8 +3,7 @@ * This file may be used under the terms of the 3-clause BSD License *****************************************************************************/ -#ifndef MY_TOGGLE_BUTTON_H -#define MY_TOGGLE_BUTTON_H +#pragma once #include @@ -49,5 +48,3 @@ class MyToggleButton : public QskAbstractButton class PrivateData; std::unique_ptr< PrivateData > m_data; }; - -#endif diff --git a/examples/mycontrols/MyToggleButtonSkinlet.h b/examples/mycontrols/MyToggleButtonSkinlet.h index 80bae2c5..0390b2b6 100644 --- a/examples/mycontrols/MyToggleButtonSkinlet.h +++ b/examples/mycontrols/MyToggleButtonSkinlet.h @@ -3,8 +3,7 @@ * This file may be used under the terms of the 3-clause BSD License *****************************************************************************/ -#ifndef MY_TOGGLE_BUTTON_SKINLET_H -#define MY_TOGGLE_BUTTON_SKINLET_H +#pragma once #include @@ -44,5 +43,3 @@ class MyToggleButtonSkinlet : public QskSkinlet QSGNode* updateSubNode( const QskSkinnable*, quint8 nodeRole, QSGNode* ) const override; }; - -#endif diff --git a/examples/qvgviewer/MainWindow.h b/examples/qvgviewer/MainWindow.h index 631f9424..3f6e7aea 100644 --- a/examples/qvgviewer/MainWindow.h +++ b/examples/qvgviewer/MainWindow.h @@ -3,8 +3,7 @@ * This file may be used under the terms of the 3-clause BSD License *****************************************************************************/ -#ifndef MAIN_WINDOW_H_ -#define MAIN_WINDOW_H_ +#pragma once #include @@ -25,5 +24,3 @@ class MainWindow : public QskWindow private: QskTabView* m_tabView; }; - -#endif diff --git a/playground/anchors/AnchorBox.h b/playground/anchors/AnchorBox.h index dbc603bf..bbb04acc 100644 --- a/playground/anchors/AnchorBox.h +++ b/playground/anchors/AnchorBox.h @@ -3,8 +3,7 @@ * This file may be used under the terms of the QSkinny License, Version 1.0 *****************************************************************************/ -#ifndef ANCHOR_BOX_H -#define ANCHOR_BOX_H +#pragma once #include "QskControl.h" @@ -42,6 +41,3 @@ class AnchorBox : public QskControl class PrivateData; std::unique_ptr< PrivateData > m_data; }; - -#endif - diff --git a/playground/dialogbuttons/Window.h b/playground/dialogbuttons/Window.h index f5d7a361..a2a763f7 100644 --- a/playground/dialogbuttons/Window.h +++ b/playground/dialogbuttons/Window.h @@ -3,8 +3,7 @@ * This file may be used under the terms of the 3-clause BSD License *****************************************************************************/ -#ifndef WINDOW_H -#define WINDOW_H 1 +#pragma once #include #include @@ -34,5 +33,3 @@ class Window : public QskWindow QskLinearBox* m_layoutBox; Qt::Orientation m_orientation; }; - -#endif diff --git a/playground/grids/GridAccessor.h b/playground/grids/GridAccessor.h index f6f0da81..c99f36b7 100644 --- a/playground/grids/GridAccessor.h +++ b/playground/grids/GridAccessor.h @@ -3,8 +3,7 @@ * This file may be used under the terms of the 3-clause BSD License *****************************************************************************/ -#ifndef GRID_ACCESSOR_H -#define GRID_ACCESSOR_H +#pragma once #include @@ -61,5 +60,3 @@ class GridAccessor virtual QSize preferredSize() const = 0; }; - -#endif diff --git a/playground/grids/GridGraphics.h b/playground/grids/GridGraphics.h index fcb9ceab..729f6206 100644 --- a/playground/grids/GridGraphics.h +++ b/playground/grids/GridGraphics.h @@ -3,15 +3,14 @@ * This file may be used under the terms of the 3-clause BSD License *****************************************************************************/ -#ifndef GRID_GRAPHICS_H -#define GRID_GRAPHICS_H +#pragma once #include "GridAccessor.h" #include class QGraphicsGridLayout; -class GridGraphics : public QGraphicsView, public GridAccessor +class GridGraphics final : public QGraphicsView, public GridAccessor { public: GridGraphics( QWidget* parent = nullptr ); @@ -39,5 +38,3 @@ class GridGraphics : public QGraphicsView, public GridAccessor private: QGraphicsGridLayout* m_layout; }; - -#endif diff --git a/playground/grids/GridQuick.h b/playground/grids/GridQuick.h index 760556f4..5f0ff501 100644 --- a/playground/grids/GridQuick.h +++ b/playground/grids/GridQuick.h @@ -3,8 +3,7 @@ * This file may be used under the terms of the 3-clause BSD License *****************************************************************************/ -#ifndef GRID_QUICK_H -#define GRID_QUICK_H +#pragma once #include "GridAccessor.h" #include @@ -39,5 +38,3 @@ class GridQuick : public QQuickWidget, public GridAccessor private: QQuickItem* m_grid; }; - -#endif diff --git a/playground/grids/GridSkinny.h b/playground/grids/GridSkinny.h index 7cb562fa..d9ff5f27 100644 --- a/playground/grids/GridSkinny.h +++ b/playground/grids/GridSkinny.h @@ -3,15 +3,14 @@ * This file may be used under the terms of the 3-clause BSD License *****************************************************************************/ -#ifndef GRID_SKINNY_H -#define GRID_SKINNY_H +#pragma once #include "GridAccessor.h" #include class QskGridBox; -class GridSkinny : public QQuickWidget, public GridAccessor +class GridSkinny final : public QQuickWidget, public GridAccessor { public: GridSkinny( QWidget* parent = nullptr ); @@ -36,5 +35,3 @@ class GridSkinny : public QQuickWidget, public GridAccessor private: QskGridBox* m_grid; }; - -#endif diff --git a/playground/grids/GridWidgets.h b/playground/grids/GridWidgets.h index d2f56746..d761f447 100644 --- a/playground/grids/GridWidgets.h +++ b/playground/grids/GridWidgets.h @@ -3,15 +3,14 @@ * This file may be used under the terms of the 3-clause BSD License *****************************************************************************/ -#ifndef GRID_WIDGETS_H -#define GRID_WIDGETS_H +#pragma once #include "GridAccessor.h" #include class QGridLayout; -class GridWidgets : public QWidget, public GridAccessor +class GridWidgets final : public QWidget, public GridAccessor { public: GridWidgets( QWidget* parent = nullptr ); @@ -36,5 +35,3 @@ class GridWidgets : public QWidget, public GridAccessor private: QGridLayout* m_layout; }; - -#endif diff --git a/playground/grids/TestBox.h b/playground/grids/TestBox.h index 025787d2..47f29f6d 100644 --- a/playground/grids/TestBox.h +++ b/playground/grids/TestBox.h @@ -3,8 +3,7 @@ * This file may be used under the terms of the 3-clause BSD License *****************************************************************************/ -#ifndef TEST_BOX_H -#define TEST_BOX_H +#pragma once #include "GridAccessor.h" #include @@ -62,5 +61,3 @@ class TestBox : public QWidget, public GridAccessor int m_columnCount = 2; }; - -#endif diff --git a/playground/images/Image.h b/playground/images/Image.h index d5997e14..b3c9df96 100644 --- a/playground/images/Image.h +++ b/playground/images/Image.h @@ -3,8 +3,7 @@ * This file may be used under the terms of the 3-clause BSD License *****************************************************************************/ -#ifndef IMAGE_H -#define IMAGE_H +#pragma once #include "QskGlobal.h" @@ -78,5 +77,3 @@ class Image : public QQuickImage class PrivateData; std::unique_ptr< PrivateData > m_data; }; - -#endif diff --git a/playground/invoker/Callback.h b/playground/invoker/Callback.h index 2991199e..bcd35f15 100644 --- a/playground/invoker/Callback.h +++ b/playground/invoker/Callback.h @@ -3,8 +3,7 @@ * This file may be used under the terms of the 3-clause BSD License *****************************************************************************/ -#ifndef CALLBACK_H -#define CALLBACK_H 1 +#pragma once #include @@ -40,5 +39,3 @@ inline const QskMetaInvokable& Callback::invokable() const { return m_invokable; } - -#endif diff --git a/playground/invoker/Invoker.h b/playground/invoker/Invoker.h index 32f86724..b3446730 100644 --- a/playground/invoker/Invoker.h +++ b/playground/invoker/Invoker.h @@ -3,8 +3,7 @@ * This file may be used under the terms of the 3-clause BSD License *****************************************************************************/ -#ifndef INVOKER_H -#define INVOKER_H 1 +#pragma once #include "Callback.h" #include @@ -33,5 +32,3 @@ inline void Invoker::addFunctionCall( const QskMetaFunction& function ) { addFunctionCall( this, function ); } - -#endif diff --git a/playground/shadows/BoxShadowNode.cpp b/playground/shadows/BoxShadowNode.cpp index 2756da32..4fb8adfe 100644 --- a/playground/shadows/BoxShadowNode.cpp +++ b/playground/shadows/BoxShadowNode.cpp @@ -1,3 +1,8 @@ +/****************************************************************************** + * QSkinny - Copyright (C) 2016 Uwe Rathmann + * This file may be used under the terms of the 3-clause BSD License + *****************************************************************************/ + #include "BoxShadowNode.h" #include "QskBoxShapeMetrics.h" diff --git a/playground/shadows/BoxShadowNode.h b/playground/shadows/BoxShadowNode.h index c1ea5157..e6dc46d4 100644 --- a/playground/shadows/BoxShadowNode.h +++ b/playground/shadows/BoxShadowNode.h @@ -1,5 +1,9 @@ -#ifndef BOX_SHADOW_NODE_H -#define BOX_SHADOW_NODE_H +/****************************************************************************** + * QSkinny - Copyright (C) 2016 Uwe Rathmann + * This file may be used under the terms of the 3-clause BSD License + *****************************************************************************/ + +#pragma once #include @@ -24,5 +28,3 @@ class BoxShadowNode : public QSGGeometryNode private: Q_DECLARE_PRIVATE( BoxShadowNode ) }; - -#endif diff --git a/playground/shadows/ShadowedBox.cpp b/playground/shadows/ShadowedBox.cpp index 98b4e367..f6246e3f 100644 --- a/playground/shadows/ShadowedBox.cpp +++ b/playground/shadows/ShadowedBox.cpp @@ -1,3 +1,8 @@ +/****************************************************************************** + * QSkinny - Copyright (C) 2016 Uwe Rathmann + * This file may be used under the terms of the 3-clause BSD License + *****************************************************************************/ + #include "ShadowedBox.h" #include "BoxShadowNode.h" diff --git a/playground/shadows/ShadowedBox.h b/playground/shadows/ShadowedBox.h index 3ca728b7..0682aefb 100644 --- a/playground/shadows/ShadowedBox.h +++ b/playground/shadows/ShadowedBox.h @@ -1,5 +1,9 @@ -#ifndef SHADOWED_BOX_H -#define SHADOWED_BOX_H +/****************************************************************************** + * QSkinny - Copyright (C) 2016 Uwe Rathmann + * This file may be used under the terms of the 3-clause BSD License + *****************************************************************************/ + +#pragma once #include #include @@ -42,5 +46,3 @@ class ShadowedBox : public QskControl QskGradient m_gradient; QskBoxShapeMetrics m_shape; }; - -#endif