QSkinny 0.8.0
C++/Qt UI toolkit
Loading...
Searching...
No Matches
QskSubWindowAreaSkinlet.cpp
1/******************************************************************************
2 * QSkinny - Copyright (C) The authors
3 * SPDX-License-Identifier: BSD-3-Clause
4 *****************************************************************************/
5
6#include "QskSubWindowAreaSkinlet.h"
7#include "QskSubWindowArea.h"
8
9QskSubWindowAreaSkinlet::QskSubWindowAreaSkinlet( QskSkin* skin )
10 : Inherited( skin )
11{
12 setNodeRoles( { PanelRole } );
13}
14
15QskSubWindowAreaSkinlet::~QskSubWindowAreaSkinlet() = default;
16
17QRectF QskSubWindowAreaSkinlet::subControlRect( const QskSkinnable* skinnable,
18 const QRectF& contentsRect, QskAspect::Subcontrol subControl ) const
19{
20 if ( subControl == QskSubWindowArea::Panel )
21 return contentsRect;
22
23 return Inherited::subControlRect( skinnable, contentsRect, subControl );
24}
25
26QSGNode* QskSubWindowAreaSkinlet::updateSubNode(
27 const QskSkinnable* skinnable, quint8 nodeRole, QSGNode* node ) const
28{
29 switch ( nodeRole )
30 {
31 case PanelRole:
32 return updateBoxNode( skinnable, node, QskSubWindowArea::Panel );
33 }
34
35 return Inherited::updateSubNode( skinnable, nodeRole, node );
36}
37
38#include "moc_QskSubWindowAreaSkinlet.cpp"
Subcontrol
For use within the rendering or lay-outing of a specific QskSkinnable.
Definition QskAspect.h:104