From 89695a82d5e3c4ea09b4a9595425d232bf9acc8c Mon Sep 17 00:00:00 2001 From: Uwe Rathmann Date: Sat, 22 Jul 2017 18:17:53 +0200 Subject: [PATCH] README improved --- .gitignore | 2 ++ README.md | 18 +++++++++++++++++- src/controls/QskImage.cpp | 5 ----- src/layouts/QskLayout.cpp | 20 -------------------- 4 files changed, 19 insertions(+), 26 deletions(-) diff --git a/.gitignore b/.gitignore index ccb3c6d3..76c10020 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,9 @@ Makefile +.qmake.stash obj moc rcc lib bin qvg +*.swp diff --git a/README.md b/README.md index aa2b9303..14047e6b 100644 --- a/README.md +++ b/README.md @@ -2,4 +2,20 @@ QSkinny ------- The (Q)Skinny library contains a set of lightweight Qt Quick Controls. -It is implemented to 100% in C++, and can be used from C++ and/or QML application code. + +It is implemented to be 100% usable in C++, but can be used from C++ and/or QML +application code. + +Doing the implementation in C++ allows to make use of the "scene graph" +classes. Building controls from scene graph nodes allows for a lighter implementation +than found with stacking "heavier" objects like QObject or QQuickItem. + +Being "skinny" also means a design that separates concerns between +the API and logic of the controls themselves, the styling of these controls, +and the delegated rendering of the controls to the screen. + +The current selection of implemented controls is driven by the needs of specific +projects and therefore may feel a bit random. Conceptually, though, any type of +control fits into QSkinny, as long as it is usable from C++ (as opposed to only +QML). + diff --git a/src/controls/QskImage.cpp b/src/controls/QskImage.cpp index d0eaa577..08cab760 100644 --- a/src/controls/QskImage.cpp +++ b/src/controls/QskImage.cpp @@ -172,11 +172,6 @@ QSGNode* QskImage::updatePaintNode( QSGNode* oldNode, UpdatePaintNodeData* data if ( !isVisible() ) { m_data->dirtyUpdate = true; - -#if 0 - delete oldNode; - oldNode = nullptr; -#endif return oldNode; } } diff --git a/src/layouts/QskLayout.cpp b/src/layouts/QskLayout.cpp index 4d0c00cc..a37723e7 100644 --- a/src/layouts/QskLayout.cpp +++ b/src/layouts/QskLayout.cpp @@ -205,27 +205,7 @@ void QskLayout::adjustItemAt( int index ) void QskLayout::updateLayout() { if ( m_data->isActive ) - { -#if 0 - // the list of items to be polished is unordered, - // while setting geometries should always be done top down - // to avoid unnecessary ( potentially heavy ) operations - - QQuickItem* item = this; - - while ( QQuickItem* item = item->parentItem() ) - { - if ( parent->isPolishScheduled() ) - { - // putting parent at the end of the list - ... - return; - } - } -#endif - engine().setGeometries( alignedLayoutRect( layoutRect() ) ); - } } QRectF QskLayout::alignedLayoutRect( const QRectF& rect ) const