From 9b6711d0aa34c40fb3a614166a3d478deb4b40d5 Mon Sep 17 00:00:00 2001 From: Peter Hartmann Date: Wed, 7 Apr 2021 16:51:55 +0200 Subject: [PATCH] remove ShadowBox, it is not used --- examples/iot-dashboard/Box.cpp | 42 ---------------------------- examples/iot-dashboard/Box.h | 14 ---------- examples/iot-dashboard/MainContent.h | 1 - 3 files changed, 57 deletions(-) diff --git a/examples/iot-dashboard/Box.cpp b/examples/iot-dashboard/Box.cpp index 9cf26b35..990790cd 100644 --- a/examples/iot-dashboard/Box.cpp +++ b/examples/iot-dashboard/Box.cpp @@ -10,32 +10,6 @@ QSK_SUBCONTROL( Box, Panel ) -ShadowBox::ShadowBox( QQuickItem* parent ) - : QskControl( parent ) -// , m_control( control ) - , m_rectangle( new ShadowedRectangle( this ) ) -{ -// setAutoLayoutChildren( true ); - - m_rectangle->shadow()->setColor( Qt::black ); - m_rectangle->shadow()->setSize( 15 ); - m_rectangle->setColor( Qt::white ); // ### opacity should only be for the shadow, not the background -// m_rectangle->setOpacity( 0.1 ); -// m_rectangle->setSize( m_control->preferredSize() ); - m_rectangle->corners()->setTopLeft( 6 ); - m_rectangle->corners()->setTopRight( 6 ); - m_rectangle->corners()->setBottomLeft( 6 ); - m_rectangle->corners()->setBottomRight( 6 ); -} - -void ShadowBox::updateLayout() -{ -// const auto s = m_rectangle->shadow()->size(); -// qDebug() << m_control->geometry() << geometry(); -// m_control->setPosition( {15, 0} ); // ### why? -// m_control->setZ( 1 ); -} - Box::Box( const QString& title, QQuickItem* parent ) : QskLinearBox( Qt::Vertical, parent ) , m_title( title ) @@ -48,26 +22,10 @@ Box::Box( const QString& title, QQuickItem* parent ) setPaddingHint( Panel, 15 ); setPanel( true ); setBoxShapeHint( QskBox::Panel, 6 ); -// setBoxBorderMetricsHint( QskBox::Panel, 2 ); QskBoxBorderColors borderColors( "#dddddd" ); borderColors.setAlpha( 100 ); setBoxBorderColorsHint( QskBox::Panel, borderColors ); - -// auto* r = new ShadowedRectangle( this ); -// r->shadow()->setColor( Qt::black ); -// r->shadow()->setSize( 15 ); -// r->setPosition( {0, 0} ); -// r->setOpacity( 0.1 ); -// r->setSize( {100, 50} ); -// r->corners()->setTopLeft( 6 ); -// r->corners()->setTopRight( 6 ); -// r->corners()->setBottomLeft( 6 ); -// r->corners()->setBottomRight( 6 ); -//// r->setRadius( 5 ); -// auto* t = new QskTextLabel( "bla", r ); - - m_label->setFontRole( Skin::TitleFont ); if( m_label->text().isEmpty() ) diff --git a/examples/iot-dashboard/Box.h b/examples/iot-dashboard/Box.h index c45b3dd2..172d1de2 100644 --- a/examples/iot-dashboard/Box.h +++ b/examples/iot-dashboard/Box.h @@ -7,20 +7,6 @@ class QskTextLabel; -class ShadowBox : public QskControl -{ - Q_OBJECT - public: - ShadowBox( QQuickItem* parent = nullptr ); - - protected: - void updateLayout() override; - - private: -// QskControl* m_control; - ShadowedRectangle* m_rectangle; -}; - class Box : public QskLinearBox { Q_OBJECT diff --git a/examples/iot-dashboard/MainContent.h b/examples/iot-dashboard/MainContent.h index 5d798b4c..0ad9ea66 100644 --- a/examples/iot-dashboard/MainContent.h +++ b/examples/iot-dashboard/MainContent.h @@ -4,7 +4,6 @@ #include #include -class ShadowBox; class ShadowedRectangle; class ShadowPositioner : public QskControl