Squashed commit of the following:
commit f429d3ab4e82ab06bfd40577aef8e2d5fdfd59fd Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Wed Aug 4 14:40:36 2021 +0200 subcontrolProxy introduced
This commit is contained in:
parent
0bfb08b20b
commit
d947920abe
|
@ -21,17 +21,7 @@ class IndicatorLabel final : public QskGraphicLabel
|
||||||
{
|
{
|
||||||
// so the skins are able to colorize them
|
// so the skins are able to colorize them
|
||||||
setGraphicRole( SkinFactory::Indicator );
|
setGraphicRole( SkinFactory::Indicator );
|
||||||
}
|
setSubcontrolProxy( QskGraphicLabel::Graphic, ButtonBar::Indicator );
|
||||||
|
|
||||||
QskAspect::Subcontrol effectiveSubcontrol(
|
|
||||||
QskAspect::Subcontrol subControl ) const override
|
|
||||||
{
|
|
||||||
// so that we can set specific colors in the skin
|
|
||||||
|
|
||||||
if ( subControl == QskGraphicLabel::Graphic )
|
|
||||||
return ButtonBar::Indicator;
|
|
||||||
|
|
||||||
return subControl;
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -6,31 +6,27 @@
|
||||||
#include "Box.h"
|
#include "Box.h"
|
||||||
#include "Skin.h"
|
#include "Skin.h"
|
||||||
|
|
||||||
#include <QskBoxBorderColors.h>
|
|
||||||
#include <QskBoxBorderMetrics.h>
|
|
||||||
#include <QskBoxShapeMetrics.h>
|
|
||||||
#include <QskTextLabel.h>
|
#include <QskTextLabel.h>
|
||||||
|
|
||||||
QSK_SUBCONTROL( Box, Panel )
|
QSK_SUBCONTROL( Box, Panel )
|
||||||
|
|
||||||
Box::Box( const QString& title, QQuickItem* parent )
|
Box::Box( const QString& title, QQuickItem* parent )
|
||||||
: QskLinearBox( Qt::Vertical, parent )
|
: QskLinearBox( Qt::Vertical, parent )
|
||||||
, m_title( title )
|
|
||||||
, m_label( new QskTextLabel( m_title, this ) )
|
|
||||||
{
|
{
|
||||||
setAutoAddChildren( true );
|
setAutoAddChildren( true );
|
||||||
setAutoLayoutChildren( true );
|
setAutoLayoutChildren( true );
|
||||||
setPanel( true );
|
setPanel( true );
|
||||||
|
|
||||||
m_label->setFontRole( Skin::TitleFont );
|
auto label = new QskTextLabel( title, this );
|
||||||
|
label->setFontRole( Skin::TitleFont );
|
||||||
|
|
||||||
if( m_label->text().isEmpty() )
|
if( label->text().isEmpty() )
|
||||||
{
|
{
|
||||||
m_label->setVisible( false );
|
label->setVisible( false );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QskAspect::Subcontrol Box::effectiveSubcontrol( QskAspect::Subcontrol subControl ) const
|
QskAspect::Subcontrol Box::substitutedSubcontrol( QskAspect::Subcontrol subControl ) const
|
||||||
{
|
{
|
||||||
if( subControl == QskBox::Panel )
|
if( subControl == QskBox::Panel )
|
||||||
{
|
{
|
||||||
|
|
|
@ -16,12 +16,10 @@ class Box : public QskLinearBox
|
||||||
public:
|
public:
|
||||||
QSK_SUBCONTROLS( Panel )
|
QSK_SUBCONTROLS( Panel )
|
||||||
|
|
||||||
Box( const QString& title, QQuickItem* parent );
|
Box( const QString& title, QQuickItem* parent = nullptr );
|
||||||
|
|
||||||
QskAspect::Subcontrol effectiveSubcontrol(
|
protected:
|
||||||
QskAspect::Subcontrol subControl ) const override;
|
|
||||||
|
|
||||||
private:
|
QskAspect::Subcontrol substitutedSubcontrol(
|
||||||
QString m_title;
|
QskAspect::Subcontrol ) const override;
|
||||||
QskTextLabel* m_label;
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -12,21 +12,22 @@
|
||||||
#include <QskTextLabel.h>
|
#include <QskTextLabel.h>
|
||||||
|
|
||||||
QSK_SUBCONTROL( ButtonValueLabel, Text )
|
QSK_SUBCONTROL( ButtonValueLabel, Text )
|
||||||
|
|
||||||
QSK_SUBCONTROL( TitleAndValueBox, Panel )
|
QSK_SUBCONTROL( TitleAndValueBox, Panel )
|
||||||
|
|
||||||
QSK_SUBCONTROL( BoxWithButtons, Panel )
|
QSK_SUBCONTROL( BoxWithButtons, Panel )
|
||||||
|
|
||||||
QSK_SUBCONTROL( IndoorTemperature, Panel )
|
QSK_SUBCONTROL( IndoorTemperature, Panel )
|
||||||
QSK_SUBCONTROL( Humidity, Panel )
|
QSK_SUBCONTROL( Humidity, Panel )
|
||||||
|
|
||||||
BoxWithButtons::BoxWithButtons( const QString& title, const QString& value, bool isBright, QQuickItem* parent )
|
BoxWithButtons::BoxWithButtons( const QString& title, const QString& value,
|
||||||
: Box( "", parent )
|
bool isBright, QQuickItem* parent )
|
||||||
|
: Box( QString(), parent )
|
||||||
{
|
{
|
||||||
setPanel( true );
|
setPanel( true );
|
||||||
|
setSubcontrolProxy( QskBox::Panel, Panel );
|
||||||
|
|
||||||
setSizePolicy( Qt::Vertical, QskSizePolicy::Maximum );
|
setSizePolicy( Qt::Vertical, QskSizePolicy::Maximum );
|
||||||
|
|
||||||
auto* layout = new QskLinearBox( Qt::Horizontal, this );
|
auto layout = new QskLinearBox( Qt::Horizontal, this );
|
||||||
layout->setSpacing( 20 );
|
layout->setSpacing( 20 );
|
||||||
|
|
||||||
QString iconFile = title.toLower();
|
QString iconFile = title.toLower();
|
||||||
|
|
|
@ -21,17 +21,7 @@ class ButtonValueLabel : public QskTextLabel
|
||||||
ButtonValueLabel( const QString& text, QQuickItem* parent )
|
ButtonValueLabel( const QString& text, QQuickItem* parent )
|
||||||
: QskTextLabel( text, parent )
|
: QskTextLabel( text, parent )
|
||||||
{
|
{
|
||||||
}
|
setSubcontrolProxy( QskTextLabel::Text, Text );
|
||||||
|
|
||||||
QskAspect::Subcontrol effectiveSubcontrol(
|
|
||||||
QskAspect::Subcontrol subControl ) const override final
|
|
||||||
{
|
|
||||||
if( subControl == QskTextLabel::Text )
|
|
||||||
{
|
|
||||||
return Text;
|
|
||||||
}
|
|
||||||
|
|
||||||
return subControl;
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -46,17 +36,7 @@ class TitleAndValueBox : public QskLinearBox
|
||||||
: QskLinearBox( orientation, parent )
|
: QskLinearBox( orientation, parent )
|
||||||
{
|
{
|
||||||
setPanel( true );
|
setPanel( true );
|
||||||
}
|
setSubcontrolProxy( QskLinearBox::Panel, Panel );
|
||||||
|
|
||||||
QskAspect::Subcontrol effectiveSubcontrol(
|
|
||||||
QskAspect::Subcontrol subControl ) const override final
|
|
||||||
{
|
|
||||||
if( subControl == QskLinearBox::Panel )
|
|
||||||
{
|
|
||||||
return Panel;
|
|
||||||
}
|
|
||||||
|
|
||||||
return subControl;
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -65,18 +45,8 @@ class BoxWithButtons : public Box
|
||||||
public:
|
public:
|
||||||
QSK_SUBCONTROLS( Panel )
|
QSK_SUBCONTROLS( Panel )
|
||||||
|
|
||||||
BoxWithButtons( const QString& title, const QString& value, bool isBright, QQuickItem* parent = nullptr );
|
BoxWithButtons( const QString& title, const QString& value,
|
||||||
|
bool isBright, QQuickItem* parent = nullptr );
|
||||||
QskAspect::Subcontrol effectiveSubcontrol(
|
|
||||||
QskAspect::Subcontrol subControl ) const override
|
|
||||||
{
|
|
||||||
if( subControl == QskBox::Panel )
|
|
||||||
{
|
|
||||||
return Panel;
|
|
||||||
}
|
|
||||||
|
|
||||||
return subControl;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class IndoorTemperature : public BoxWithButtons
|
class IndoorTemperature : public BoxWithButtons
|
||||||
|
|
|
@ -150,6 +150,8 @@ LightDisplay::LightDisplay( QQuickItem* parent )
|
||||||
, m_dimmer( new LightDimmer( gradientHint( ColdPart ), gradientHint( WarmPart ), this ) )
|
, m_dimmer( new LightDimmer( gradientHint( ColdPart ), gradientHint( WarmPart ), this ) )
|
||||||
, m_animator( new DimmerAnimator( this, m_dimmer ) )
|
, m_animator( new DimmerAnimator( this, m_dimmer ) )
|
||||||
{
|
{
|
||||||
|
setSubcontrolProxy( QskBox::Panel, LightDisplay::Panel );
|
||||||
|
|
||||||
m_leftLabel->setSizePolicy( Qt::Horizontal, QskSizePolicy::Maximum );
|
m_leftLabel->setSizePolicy( Qt::Horizontal, QskSizePolicy::Maximum );
|
||||||
m_centreLabel->setSizePolicy( Qt::Horizontal, QskSizePolicy::Maximum );
|
m_centreLabel->setSizePolicy( Qt::Horizontal, QskSizePolicy::Maximum );
|
||||||
m_centreLabel->setZ( 1 );
|
m_centreLabel->setZ( 1 );
|
||||||
|
@ -167,16 +169,6 @@ LightDisplay::LightDisplay( QQuickItem* parent )
|
||||||
} );
|
} );
|
||||||
}
|
}
|
||||||
|
|
||||||
QskAspect::Subcontrol LightDisplay::effectiveSubcontrol( QskAspect::Subcontrol subControl ) const
|
|
||||||
{
|
|
||||||
if( subControl == QskBox::Panel )
|
|
||||||
{
|
|
||||||
return LightDisplay::Panel;
|
|
||||||
}
|
|
||||||
|
|
||||||
return subControl;
|
|
||||||
}
|
|
||||||
|
|
||||||
void LightDisplay::updateLayout()
|
void LightDisplay::updateLayout()
|
||||||
{
|
{
|
||||||
const qreal w = width() - ( m_leftLabel->width() + m_rightLabel->width() );
|
const qreal w = width() - ( m_leftLabel->width() + m_rightLabel->width() );
|
||||||
|
|
|
@ -25,17 +25,7 @@ class LightIntensityValueLabel : public QskTextLabel
|
||||||
LightIntensityValueLabel( const QString& text, QQuickItem* parent )
|
LightIntensityValueLabel( const QString& text, QQuickItem* parent )
|
||||||
: QskTextLabel( text, parent )
|
: QskTextLabel( text, parent )
|
||||||
{
|
{
|
||||||
}
|
setSubcontrolProxy( QskTextLabel::Text, Text );
|
||||||
|
|
||||||
QskAspect::Subcontrol effectiveSubcontrol(
|
|
||||||
QskAspect::Subcontrol subControl ) const override final
|
|
||||||
{
|
|
||||||
if( subControl == QskTextLabel::Text )
|
|
||||||
{
|
|
||||||
return Text;
|
|
||||||
}
|
|
||||||
|
|
||||||
return subControl;
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -44,7 +34,8 @@ class LightDimmer : public QQuickPaintedItem
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
LightDimmer( const QskGradient& coldGradient, const QskGradient& warmGradient, QQuickItem* parent );
|
LightDimmer( const QskGradient& coldGradient,
|
||||||
|
const QskGradient& warmGradient, QQuickItem* parent );
|
||||||
|
|
||||||
double thickness() const
|
double thickness() const
|
||||||
{
|
{
|
||||||
|
@ -77,13 +68,13 @@ class LightDimmer : public QQuickPaintedItem
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
virtual void paint( QPainter* painter ) override;
|
||||||
|
|
||||||
double m_thickness = 17.57;
|
double m_thickness = 17.57;
|
||||||
QColor m_backgroundColor;
|
QColor m_backgroundColor;
|
||||||
QRadialGradient m_ringGradient;
|
QRadialGradient m_ringGradient;
|
||||||
QskGradient m_coldGradient;
|
QskGradient m_coldGradient;
|
||||||
QskGradient m_warmGradient;
|
QskGradient m_warmGradient;
|
||||||
|
|
||||||
virtual void paint( QPainter* painter ) override;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class LightDisplay : public QskControl
|
class LightDisplay : public QskControl
|
||||||
|
@ -95,9 +86,6 @@ class LightDisplay : public QskControl
|
||||||
|
|
||||||
LightDisplay( QQuickItem* parent );
|
LightDisplay( QQuickItem* parent );
|
||||||
|
|
||||||
QskAspect::Subcontrol effectiveSubcontrol(
|
|
||||||
QskAspect::Subcontrol subControl ) const override final;
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void updateLayout() override;
|
void updateLayout() override;
|
||||||
|
|
||||||
|
|
|
@ -85,11 +85,13 @@ void ShadowPositioner::updateLayout()
|
||||||
MainContent::MainContent( QQuickItem* parent )
|
MainContent::MainContent( QQuickItem* parent )
|
||||||
: QskLinearBox( Qt::Vertical, parent )
|
: QskLinearBox( Qt::Vertical, parent )
|
||||||
{
|
{
|
||||||
|
setPanel( true );
|
||||||
|
setSubcontrolProxy( QskBox::Panel, MainContent::Panel );
|
||||||
|
|
||||||
setAutoAddChildren( false );
|
setAutoAddChildren( false );
|
||||||
setSizePolicy( QskSizePolicy::Expanding, QskSizePolicy::Expanding );
|
setSizePolicy( QskSizePolicy::Expanding, QskSizePolicy::Expanding );
|
||||||
setDefaultAlignment( Qt::AlignTop );
|
setDefaultAlignment( Qt::AlignTop );
|
||||||
setSpacing( 24 );
|
setSpacing( 24 );
|
||||||
setPanel( true );
|
|
||||||
|
|
||||||
auto* topBar = new TopBar( this );
|
auto* topBar = new TopBar( this );
|
||||||
addItem( topBar );
|
addItem( topBar );
|
||||||
|
@ -126,16 +128,6 @@ MainContent::MainContent( QQuickItem* parent )
|
||||||
m_shadowPositioner->setGridBox( gridBox );
|
m_shadowPositioner->setGridBox( gridBox );
|
||||||
}
|
}
|
||||||
|
|
||||||
QskAspect::Subcontrol MainContent::effectiveSubcontrol( QskAspect::Subcontrol subControl ) const
|
|
||||||
{
|
|
||||||
if( subControl == QskBox::Panel )
|
|
||||||
{
|
|
||||||
return MainContent::Panel;
|
|
||||||
}
|
|
||||||
|
|
||||||
return subControl;
|
|
||||||
}
|
|
||||||
|
|
||||||
void MainContent::geometryChangeEvent( QskGeometryChangeEvent* event )
|
void MainContent::geometryChangeEvent( QskGeometryChangeEvent* event )
|
||||||
{
|
{
|
||||||
QskLinearBox::geometryChangeEvent( event );
|
QskLinearBox::geometryChangeEvent( event );
|
||||||
|
|
|
@ -37,17 +37,7 @@ class MainContentGridBox : public QskGridBox
|
||||||
MainContentGridBox( QQuickItem* parent = nullptr )
|
MainContentGridBox( QQuickItem* parent = nullptr )
|
||||||
: QskGridBox( parent )
|
: QskGridBox( parent )
|
||||||
{
|
{
|
||||||
}
|
setSubcontrolProxy( QskGridBox::Panel, Panel );
|
||||||
|
|
||||||
QskAspect::Subcontrol effectiveSubcontrol(
|
|
||||||
QskAspect::Subcontrol subControl ) const override final
|
|
||||||
{
|
|
||||||
if( subControl == QskGridBox::Panel )
|
|
||||||
{
|
|
||||||
return Panel;
|
|
||||||
}
|
|
||||||
|
|
||||||
return subControl;
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -60,9 +50,6 @@ class MainContent : public QskLinearBox
|
||||||
|
|
||||||
MainContent( QQuickItem* parent );
|
MainContent( QQuickItem* parent );
|
||||||
|
|
||||||
QskAspect::Subcontrol effectiveSubcontrol(
|
|
||||||
QskAspect::Subcontrol subControl ) const override final;
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void geometryChangeEvent( QskGeometryChangeEvent* ) override;
|
void geometryChangeEvent( QskGeometryChangeEvent* ) override;
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,9 @@ MenuItem::MenuItem( const QString& name, QQuickItem* parent )
|
||||||
setSpacing( 6 );
|
setSpacing( 6 );
|
||||||
|
|
||||||
setAcceptHoverEvents( true );
|
setAcceptHoverEvents( true );
|
||||||
|
|
||||||
setPanel( true );
|
setPanel( true );
|
||||||
|
setSubcontrolProxy( QskBox::Panel, MenuItem::Panel );
|
||||||
|
|
||||||
QString fileName = ":/images/" + name.toLower() + ".png";
|
QString fileName = ":/images/" + name.toLower() + ".png";
|
||||||
QImage image( fileName );
|
QImage image( fileName );
|
||||||
|
@ -43,21 +45,12 @@ MenuItem::MenuItem( const QString& name, QQuickItem* parent )
|
||||||
new MenuBarLabel( name, this );
|
new MenuBarLabel( name, this );
|
||||||
}
|
}
|
||||||
|
|
||||||
QskAspect::Subcontrol MenuItem::effectiveSubcontrol( QskAspect::Subcontrol subControl ) const
|
|
||||||
{
|
|
||||||
if( subControl == QskBox::Panel )
|
|
||||||
{
|
|
||||||
return MenuItem::Panel;
|
|
||||||
}
|
|
||||||
|
|
||||||
return subControl;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
MenuBar::MenuBar( QQuickItem* parent )
|
MenuBar::MenuBar( QQuickItem* parent )
|
||||||
: QskLinearBox( Qt::Vertical, parent )
|
: QskLinearBox( Qt::Vertical, parent )
|
||||||
{
|
{
|
||||||
setPanel( true );
|
setPanel( true );
|
||||||
|
setSubcontrolProxy( QskBox::Panel, MenuBar::Panel );
|
||||||
|
|
||||||
setSizePolicy( QskSizePolicy::Minimum, QskSizePolicy::Preferred );
|
setSizePolicy( QskSizePolicy::Minimum, QskSizePolicy::Preferred );
|
||||||
setSpacing( 8 );
|
setSpacing( 8 );
|
||||||
|
|
||||||
|
@ -83,14 +76,4 @@ MenuBar::MenuBar( QQuickItem* parent )
|
||||||
new MenuItem( "Logout", this );
|
new MenuItem( "Logout", this );
|
||||||
}
|
}
|
||||||
|
|
||||||
QskAspect::Subcontrol MenuBar::effectiveSubcontrol( QskAspect::Subcontrol subControl ) const
|
|
||||||
{
|
|
||||||
if( subControl == QskBox::Panel )
|
|
||||||
{
|
|
||||||
return MenuBar::Panel;
|
|
||||||
}
|
|
||||||
|
|
||||||
return subControl;
|
|
||||||
}
|
|
||||||
|
|
||||||
#include "moc_MenuBar.cpp"
|
#include "moc_MenuBar.cpp"
|
||||||
|
|
|
@ -19,17 +19,7 @@ class MenuBarTopLabel final : public QskGraphicLabel
|
||||||
MenuBarTopLabel( const QskGraphic& graphic, QQuickItem* parent = nullptr )
|
MenuBarTopLabel( const QskGraphic& graphic, QQuickItem* parent = nullptr )
|
||||||
: QskGraphicLabel( graphic, parent )
|
: QskGraphicLabel( graphic, parent )
|
||||||
{
|
{
|
||||||
}
|
setSubcontrolProxy( QskGraphicLabel::Graphic, Graphic );
|
||||||
|
|
||||||
QskAspect::Subcontrol effectiveSubcontrol(
|
|
||||||
QskAspect::Subcontrol subControl ) const override
|
|
||||||
{
|
|
||||||
if( subControl == QskGraphicLabel::Graphic )
|
|
||||||
{
|
|
||||||
return Graphic;
|
|
||||||
}
|
|
||||||
|
|
||||||
return subControl;
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -43,17 +33,7 @@ class MenuBarGraphicLabel final : public QskGraphicLabel
|
||||||
MenuBarGraphicLabel( const QskGraphic& graphic, QQuickItem* parent = nullptr )
|
MenuBarGraphicLabel( const QskGraphic& graphic, QQuickItem* parent = nullptr )
|
||||||
: QskGraphicLabel( graphic, parent )
|
: QskGraphicLabel( graphic, parent )
|
||||||
{
|
{
|
||||||
}
|
setSubcontrolProxy( QskGraphicLabel::Graphic, Graphic );
|
||||||
|
|
||||||
QskAspect::Subcontrol effectiveSubcontrol(
|
|
||||||
QskAspect::Subcontrol subControl ) const override
|
|
||||||
{
|
|
||||||
if( subControl == QskGraphicLabel::Graphic )
|
|
||||||
{
|
|
||||||
return Graphic;
|
|
||||||
}
|
|
||||||
|
|
||||||
return subControl;
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -67,17 +47,7 @@ class MenuBarLabel final : public QskTextLabel
|
||||||
MenuBarLabel( const QString& text, QQuickItem* parent = nullptr )
|
MenuBarLabel( const QString& text, QQuickItem* parent = nullptr )
|
||||||
: QskTextLabel( text, parent )
|
: QskTextLabel( text, parent )
|
||||||
{
|
{
|
||||||
}
|
setSubcontrolProxy( QskTextLabel::Text, Text );
|
||||||
|
|
||||||
QskAspect::Subcontrol effectiveSubcontrol(
|
|
||||||
QskAspect::Subcontrol subControl ) const override
|
|
||||||
{
|
|
||||||
if( subControl == QskTextLabel::Text )
|
|
||||||
{
|
|
||||||
return Text;
|
|
||||||
}
|
|
||||||
|
|
||||||
return subControl;
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -91,8 +61,6 @@ class MenuItem final : public QskLinearBox
|
||||||
|
|
||||||
MenuItem( const QString& name, QQuickItem* parent );
|
MenuItem( const QString& name, QQuickItem* parent );
|
||||||
|
|
||||||
QskAspect::Subcontrol effectiveSubcontrol( QskAspect::Subcontrol ) const override;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QString m_name;
|
QString m_name;
|
||||||
};
|
};
|
||||||
|
@ -106,9 +74,6 @@ class MenuBar final : public QskLinearBox
|
||||||
|
|
||||||
MenuBar( QQuickItem* parent );
|
MenuBar( QQuickItem* parent );
|
||||||
|
|
||||||
QskAspect::Subcontrol effectiveSubcontrol(
|
|
||||||
QskAspect::Subcontrol ) const override;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QList< QString > m_entryStrings;
|
QList< QString > m_entryStrings;
|
||||||
QList< MenuItem* > m_entries;
|
QList< MenuItem* > m_entries;
|
||||||
|
|
|
@ -88,6 +88,7 @@ PieChartPainted::PieChartPainted( const QColor& color, const QskGradient& gradie
|
||||||
, m_animator( new ProgressBarAnimator( this, m_progressBar ) )
|
, m_animator( new ProgressBarAnimator( this, m_progressBar ) )
|
||||||
{
|
{
|
||||||
setAutoLayoutChildren( true );
|
setAutoLayoutChildren( true );
|
||||||
|
setSubcontrolProxy( QskBox::Panel, PieChartPainted::Panel );
|
||||||
|
|
||||||
auto progressText = QString::number( progress ) + " %";
|
auto progressText = QString::number( progress ) + " %";
|
||||||
m_progressLabel->setText( progressText );
|
m_progressLabel->setText( progressText );
|
||||||
|
@ -97,20 +98,8 @@ PieChartPainted::PieChartPainted( const QColor& color, const QskGradient& gradie
|
||||||
const QColor c = this->color( Panel );
|
const QColor c = this->color( Panel );
|
||||||
m_progressBar->setBackgroundColor( c );
|
m_progressBar->setBackgroundColor( c );
|
||||||
|
|
||||||
connect( qskSetup, &QskSetup::skinChanged, [this]()
|
connect( qskSetup, &QskSetup::skinChanged,
|
||||||
{
|
[this]() { m_animator->start(); } );
|
||||||
m_animator->start();
|
|
||||||
} );
|
|
||||||
}
|
|
||||||
|
|
||||||
QskAspect::Subcontrol PieChartPainted::effectiveSubcontrol( QskAspect::Subcontrol subControl ) const
|
|
||||||
{
|
|
||||||
if( subControl == QskBox::Panel )
|
|
||||||
{
|
|
||||||
return PieChartPainted::Panel;
|
|
||||||
}
|
|
||||||
|
|
||||||
return subControl;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QSizeF PieChartPainted::contentsSizeHint( Qt::SizeHint /*sizeHint*/, const QSizeF& /*size*/ ) const
|
QSizeF PieChartPainted::contentsSizeHint( Qt::SizeHint /*sizeHint*/, const QSizeF& /*size*/ ) const
|
||||||
|
|
|
@ -9,9 +9,7 @@
|
||||||
#include "CircularProgressBar.h"
|
#include "CircularProgressBar.h"
|
||||||
|
|
||||||
class ProgressBarAnimator;
|
class ProgressBarAnimator;
|
||||||
|
|
||||||
class QskTextLabel;
|
class QskTextLabel;
|
||||||
class QQuickPaintedItem;
|
|
||||||
|
|
||||||
class PieChartPainted : public QskControl
|
class PieChartPainted : public QskControl
|
||||||
{
|
{
|
||||||
|
@ -21,9 +19,7 @@ class PieChartPainted : public QskControl
|
||||||
PieChartPainted( const QColor&, const QskGradient&,
|
PieChartPainted( const QColor&, const QskGradient&,
|
||||||
int progress, int value, QQuickItem* parent = nullptr );
|
int progress, int value, QQuickItem* parent = nullptr );
|
||||||
|
|
||||||
QskAspect::Subcontrol effectiveSubcontrol(
|
protected:
|
||||||
QskAspect::Subcontrol subControl ) const override final;
|
|
||||||
|
|
||||||
virtual QSizeF contentsSizeHint( Qt::SizeHint, const QSizeF& ) const override;
|
virtual QSizeF contentsSizeHint( Qt::SizeHint, const QSizeF& ) const override;
|
||||||
void updateLayout() override;
|
void updateLayout() override;
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,6 @@ QSK_STATE( RoundedIcon, Small, ( QskAspect::FirstUserState << 2 ) )
|
||||||
|
|
||||||
RoundedIcon::RoundedIcon( const QString& iconName, bool isBright, bool isSmall, QQuickItem* parent )
|
RoundedIcon::RoundedIcon( const QString& iconName, bool isBright, bool isSmall, QQuickItem* parent )
|
||||||
: QskBox( parent )
|
: QskBox( parent )
|
||||||
, m_iconName( iconName )
|
|
||||||
{
|
{
|
||||||
setPanel( true );
|
setPanel( true );
|
||||||
setPolishOnResize( true );
|
setPolishOnResize( true );
|
||||||
|
@ -48,6 +47,14 @@ RoundedIcon::RoundedIcon( const QString& iconName, bool isBright, bool isSmall,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QskAspect::Subcontrol RoundedIcon::substitutedSubcontrol( QskAspect::Subcontrol subControl ) const
|
||||||
|
{
|
||||||
|
if( subControl == QskBox::Panel )
|
||||||
|
return Panel;
|
||||||
|
|
||||||
|
return subControl;
|
||||||
|
}
|
||||||
|
|
||||||
void RoundedIcon::updateLayout()
|
void RoundedIcon::updateLayout()
|
||||||
{
|
{
|
||||||
if( m_graphicLabel )
|
if( m_graphicLabel )
|
||||||
|
|
|
@ -21,22 +21,13 @@ class RoundedIcon : public QskBox
|
||||||
RoundedIcon( const QString& iconName, bool isBright, bool isSmall,
|
RoundedIcon( const QString& iconName, bool isBright, bool isSmall,
|
||||||
QQuickItem* parent = nullptr );
|
QQuickItem* parent = nullptr );
|
||||||
|
|
||||||
QskAspect::Subcontrol effectiveSubcontrol(
|
|
||||||
QskAspect::Subcontrol subControl ) const override
|
|
||||||
{
|
|
||||||
if( subControl == QskBox::Panel )
|
|
||||||
{
|
|
||||||
return Panel;
|
|
||||||
}
|
|
||||||
|
|
||||||
return subControl;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
QskAspect::Subcontrol substitutedSubcontrol(
|
||||||
|
QskAspect::Subcontrol ) const override;
|
||||||
|
|
||||||
void updateLayout() override;
|
void updateLayout() override;
|
||||||
virtual QSizeF contentsSizeHint( Qt::SizeHint, const QSizeF& ) const override;
|
virtual QSizeF contentsSizeHint( Qt::SizeHint, const QSizeF& ) const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QString m_iconName;
|
|
||||||
QskGraphicLabel* m_graphicLabel = nullptr;
|
QskGraphicLabel* m_graphicLabel = nullptr;
|
||||||
};
|
};
|
||||||
|
|
|
@ -47,6 +47,8 @@ TopBarItem::TopBarItem( int index, const QString& name, const QskGradient& gradi
|
||||||
: QskLinearBox( Qt::Vertical, parent )
|
: QskLinearBox( Qt::Vertical, parent )
|
||||||
, m_name( name )
|
, m_name( name )
|
||||||
{
|
{
|
||||||
|
setSubcontrolProxy( QskLinearBox::Panel, Panel );
|
||||||
|
|
||||||
setAutoLayoutChildren( true );
|
setAutoLayoutChildren( true );
|
||||||
setAutoAddChildren( true );
|
setAutoAddChildren( true );
|
||||||
setSpacing( 15 );
|
setSpacing( 15 );
|
||||||
|
@ -78,6 +80,8 @@ TopBar::TopBar( QQuickItem* parent )
|
||||||
: QskLinearBox( Qt::Horizontal, parent )
|
: QskLinearBox( Qt::Horizontal, parent )
|
||||||
{
|
{
|
||||||
setPanel( true );
|
setPanel( true );
|
||||||
|
setSubcontrolProxy( QskBox::Panel, Panel );
|
||||||
|
|
||||||
setAutoLayoutChildren( true );
|
setAutoLayoutChildren( true );
|
||||||
setAutoAddChildren( true );
|
setAutoAddChildren( true );
|
||||||
setSizePolicy( QskSizePolicy::Preferred, QskSizePolicy::Fixed );
|
setSizePolicy( QskSizePolicy::Preferred, QskSizePolicy::Fixed );
|
||||||
|
|
|
@ -20,17 +20,7 @@ class TimeTitleLabel : public QskTextLabel
|
||||||
TimeTitleLabel( const QString& text, QQuickItem* parent = nullptr )
|
TimeTitleLabel( const QString& text, QQuickItem* parent = nullptr )
|
||||||
: QskTextLabel( text, parent )
|
: QskTextLabel( text, parent )
|
||||||
{
|
{
|
||||||
}
|
setSubcontrolProxy( QskTextLabel::Text, Text );
|
||||||
|
|
||||||
QskAspect::Subcontrol effectiveSubcontrol(
|
|
||||||
QskAspect::Subcontrol subControl ) const override final
|
|
||||||
{
|
|
||||||
if( subControl == QskTextLabel::Text )
|
|
||||||
{
|
|
||||||
return Text;
|
|
||||||
}
|
|
||||||
|
|
||||||
return subControl;
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -44,17 +34,7 @@ class TimeLabel : public QskTextLabel
|
||||||
TimeLabel( const QString& text, QQuickItem* parent = nullptr )
|
TimeLabel( const QString& text, QQuickItem* parent = nullptr )
|
||||||
: QskTextLabel( text, parent )
|
: QskTextLabel( text, parent )
|
||||||
{
|
{
|
||||||
}
|
setSubcontrolProxy( QskTextLabel::Text, Text );
|
||||||
|
|
||||||
QskAspect::Subcontrol effectiveSubcontrol(
|
|
||||||
QskAspect::Subcontrol subControl ) const override final
|
|
||||||
{
|
|
||||||
if( subControl == QskTextLabel::Text )
|
|
||||||
{
|
|
||||||
return Text;
|
|
||||||
}
|
|
||||||
|
|
||||||
return subControl;
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -65,18 +45,8 @@ class TopBarItem : public QskLinearBox
|
||||||
public:
|
public:
|
||||||
QSK_SUBCONTROLS( Item1, Item2, Item3, Item4 )
|
QSK_SUBCONTROLS( Item1, Item2, Item3, Item4 )
|
||||||
|
|
||||||
TopBarItem( int index, const QString& name, const QskGradient& gradient, int progress, int value, QQuickItem* parent );
|
TopBarItem( int index, const QString& name, const QskGradient& gradient,
|
||||||
|
int progress, int value, QQuickItem* parent );
|
||||||
QskAspect::Subcontrol effectiveSubcontrol(
|
|
||||||
QskAspect::Subcontrol subControl ) const override final
|
|
||||||
{
|
|
||||||
if( subControl == QskLinearBox::Panel )
|
|
||||||
{
|
|
||||||
return Panel;
|
|
||||||
}
|
|
||||||
|
|
||||||
return subControl;
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QString m_name;
|
QString m_name;
|
||||||
|
@ -91,17 +61,6 @@ class TopBar : public QskLinearBox
|
||||||
|
|
||||||
TopBar( QQuickItem* parent );
|
TopBar( QQuickItem* parent );
|
||||||
|
|
||||||
QskAspect::Subcontrol effectiveSubcontrol(
|
|
||||||
QskAspect::Subcontrol subControl ) const override final
|
|
||||||
{
|
|
||||||
if( subControl == QskLinearBox::Panel )
|
|
||||||
{
|
|
||||||
return Panel;
|
|
||||||
}
|
|
||||||
|
|
||||||
return subControl;
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QList< TopBarItem* > m_entries;
|
QList< TopBarItem* > m_entries;
|
||||||
};
|
};
|
||||||
|
|
|
@ -19,6 +19,7 @@ QSK_STATE( RoundButton, Top, ( QskAspect::FirstUserState << 1 ) )
|
||||||
RoundButton::RoundButton( QskAspect::Placement placement, QQuickItem* parent )
|
RoundButton::RoundButton( QskAspect::Placement placement, QQuickItem* parent )
|
||||||
: QskPushButton( parent )
|
: QskPushButton( parent )
|
||||||
{
|
{
|
||||||
|
setSubcontrolProxy( QskPushButton::Panel, RoundButton::Panel );
|
||||||
setSizePolicy( QskSizePolicy::Fixed, QskSizePolicy::Expanding );
|
setSizePolicy( QskSizePolicy::Fixed, QskSizePolicy::Expanding );
|
||||||
|
|
||||||
QskGraphic graphic;
|
QskGraphic graphic;
|
||||||
|
@ -39,16 +40,6 @@ RoundButton::RoundButton( QskAspect::Placement placement, QQuickItem* parent )
|
||||||
setGraphic( graphic );
|
setGraphic( graphic );
|
||||||
}
|
}
|
||||||
|
|
||||||
QskAspect::Subcontrol RoundButton::effectiveSubcontrol( QskAspect::Subcontrol subControl ) const
|
|
||||||
{
|
|
||||||
if( subControl == QskPushButton::Panel )
|
|
||||||
{
|
|
||||||
return RoundButton::Panel;
|
|
||||||
}
|
|
||||||
|
|
||||||
return subControl;
|
|
||||||
}
|
|
||||||
|
|
||||||
UpAndDownButton::UpAndDownButton( QQuickItem* parent )
|
UpAndDownButton::UpAndDownButton( QQuickItem* parent )
|
||||||
: QskLinearBox( Qt::Vertical, parent )
|
: QskLinearBox( Qt::Vertical, parent )
|
||||||
{
|
{
|
||||||
|
|
|
@ -17,9 +17,6 @@ class RoundButton : QskPushButton
|
||||||
QSK_STATES( Top )
|
QSK_STATES( Top )
|
||||||
|
|
||||||
RoundButton( QskAspect::Placement placement, QQuickItem* parent );
|
RoundButton( QskAspect::Placement placement, QQuickItem* parent );
|
||||||
|
|
||||||
QskAspect::Subcontrol effectiveSubcontrol(
|
|
||||||
QskAspect::Subcontrol subControl ) const override final;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class UpAndDownButton : public QskLinearBox
|
class UpAndDownButton : public QskLinearBox
|
||||||
|
|
|
@ -6,8 +6,6 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "Box.h"
|
#include "Box.h"
|
||||||
|
|
||||||
#include <QskLinearBox.h>
|
|
||||||
#include <QskTextLabel.h>
|
#include <QskTextLabel.h>
|
||||||
|
|
||||||
class UsageSpacer : public QskTextLabel
|
class UsageSpacer : public QskTextLabel
|
||||||
|
@ -20,17 +18,7 @@ class UsageSpacer : public QskTextLabel
|
||||||
UsageSpacer( QQuickItem* parent = nullptr )
|
UsageSpacer( QQuickItem* parent = nullptr )
|
||||||
: QskTextLabel( "_____", parent )
|
: QskTextLabel( "_____", parent )
|
||||||
{
|
{
|
||||||
}
|
setSubcontrolProxy( QskTextLabel::Text, Text );
|
||||||
|
|
||||||
QskAspect::Subcontrol effectiveSubcontrol(
|
|
||||||
QskAspect::Subcontrol subControl ) const override final
|
|
||||||
{
|
|
||||||
if( subControl == QskTextLabel::Text )
|
|
||||||
{
|
|
||||||
return Text;
|
|
||||||
}
|
|
||||||
|
|
||||||
return subControl;
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -67,18 +67,20 @@ CaptionItem::CaptionItem( QskAspect::State state, QQuickItem* parent )
|
||||||
static constexpr int segments = 7;
|
static constexpr int segments = 7;
|
||||||
|
|
||||||
UsageDiagram::UsageDiagram( QQuickItem* parent )
|
UsageDiagram::UsageDiagram( QQuickItem* parent )
|
||||||
: Box( "", parent )
|
: Box( QString(), parent )
|
||||||
, m_diagram( new Diagram( this ) )
|
, m_diagram( new Diagram( this ) )
|
||||||
, m_weekdays( new QskGridBox( this ) )
|
, m_weekdays( new QskGridBox( this ) )
|
||||||
{
|
{
|
||||||
setAutoAddChildren( false );
|
setAutoAddChildren( false );
|
||||||
setAutoLayoutChildren( true );
|
setAutoLayoutChildren( true );
|
||||||
|
|
||||||
|
setSubcontrolProxy( QskBox::Panel, Panel );
|
||||||
|
|
||||||
int number = 100;
|
int number = 100;
|
||||||
|
|
||||||
// These values are calculated with a boost::math::cubic_b_spline.
|
// These values are calculated with a boost::math::cubic_b_spline.
|
||||||
// We just output the values here to get rid of the dependency:
|
// We just output the values here to get rid of the dependency:
|
||||||
std::vector< std::vector< qreal > > yValues =
|
const std::vector< std::vector< qreal > > yValues =
|
||||||
{
|
{
|
||||||
{64.00, 64.00, 64.00, 64.00, 64.00, 64.00, 64.00, 64.00, 64.00, 64.00, 64.00, 63.99, 63.96, 63.85, 63.64, 63.30, 62.79, 62.09, 61.14, 59.93, 58.42, 56.59, 54.50, 52.23, 49.84, 47.42, 45.03, 42.76, 40.68, 38.85, 37.36, 36.27, 35.55, 35.19, 35.14, 35.39, 35.91, 36.65, 37.60, 38.73, 40.00, 41.39, 42.87, 44.41, 46.00, 47.60, 49.19, 50.76, 52.26, 53.68, 55.00, 56.19, 57.24, 58.15, 58.90, 59.51, 59.95, 60.23, 60.33, 60.26, 60.00, 59.56, 58.94, 58.17, 57.27, 56.24, 55.12, 53.92, 52.65, 51.34, 50.00, 48.65, 47.32, 46.03, 44.79, 43.65, 42.61, 41.70, 40.95, 40.37, 40.00, 39.85, 39.94, 40.26, 40.84, 41.67, 42.77, 44.15, 45.80, 47.75, 50.00, 52.54, 55.30, 58.19, 61.13, 64.04, 66.82, 69.40, 71.67, 73.57},
|
{64.00, 64.00, 64.00, 64.00, 64.00, 64.00, 64.00, 64.00, 64.00, 64.00, 64.00, 63.99, 63.96, 63.85, 63.64, 63.30, 62.79, 62.09, 61.14, 59.93, 58.42, 56.59, 54.50, 52.23, 49.84, 47.42, 45.03, 42.76, 40.68, 38.85, 37.36, 36.27, 35.55, 35.19, 35.14, 35.39, 35.91, 36.65, 37.60, 38.73, 40.00, 41.39, 42.87, 44.41, 46.00, 47.60, 49.19, 50.76, 52.26, 53.68, 55.00, 56.19, 57.24, 58.15, 58.90, 59.51, 59.95, 60.23, 60.33, 60.26, 60.00, 59.56, 58.94, 58.17, 57.27, 56.24, 55.12, 53.92, 52.65, 51.34, 50.00, 48.65, 47.32, 46.03, 44.79, 43.65, 42.61, 41.70, 40.95, 40.37, 40.00, 39.85, 39.94, 40.26, 40.84, 41.67, 42.77, 44.15, 45.80, 47.75, 50.00, 52.54, 55.30, 58.19, 61.13, 64.04, 66.82, 69.40, 71.67, 73.57},
|
||||||
{36.00, 36.01, 36.11, 36.37, 36.88, 37.73, 38.98, 40.73, 43.07, 46.06, 49.80, 54.31, 59.38, 64.73, 70.09, 75.20, 79.77, 83.55, 86.24, 87.59, 87.33, 85.26, 81.61, 76.64, 70.67, 63.98, 56.86, 49.61, 42.52, 35.89, 30.00, 25.09, 21.14, 18.08, 15.83, 14.31, 13.45, 13.16, 13.37, 14.01, 15.00, 16.26, 17.73, 19.36, 21.07, 22.82, 24.55, 26.19, 27.68, 28.97, 30.00, 30.73, 31.25, 31.65, 32.04, 32.52, 33.21, 34.19, 35.58, 37.48, 40.00, 43.17, 46.80, 50.61, 54.33, 57.71, 60.47, 62.35, 63.07, 62.38, 60.00, 55.79, 50.12, 43.46, 36.31, 29.13, 22.43, 16.68, 12.37, 9.98, 10.00, 12.73, 17.76, 24.50, 32.36, 40.75, 49.09, 56.77, 63.21, 67.81, 70.00, 69.37, 66.28, 61.29, 54.96, 47.85, 40.51, 33.50, 27.37, 22.68},
|
{36.00, 36.01, 36.11, 36.37, 36.88, 37.73, 38.98, 40.73, 43.07, 46.06, 49.80, 54.31, 59.38, 64.73, 70.09, 75.20, 79.77, 83.55, 86.24, 87.59, 87.33, 85.26, 81.61, 76.64, 70.67, 63.98, 56.86, 49.61, 42.52, 35.89, 30.00, 25.09, 21.14, 18.08, 15.83, 14.31, 13.45, 13.16, 13.37, 14.01, 15.00, 16.26, 17.73, 19.36, 21.07, 22.82, 24.55, 26.19, 27.68, 28.97, 30.00, 30.73, 31.25, 31.65, 32.04, 32.52, 33.21, 34.19, 35.58, 37.48, 40.00, 43.17, 46.80, 50.61, 54.33, 57.71, 60.47, 62.35, 63.07, 62.38, 60.00, 55.79, 50.12, 43.46, 36.31, 29.13, 22.43, 16.68, 12.37, 9.98, 10.00, 12.73, 17.76, 24.50, 32.36, 40.75, 49.09, 56.77, 63.21, 67.81, 70.00, 69.37, 66.28, 61.29, 54.96, 47.85, 40.51, 33.50, 27.37, 22.68},
|
||||||
|
|
|
@ -25,22 +25,9 @@ class WeekdayLabel : public QskTextLabel
|
||||||
: QskTextLabel( text, parent )
|
: QskTextLabel( text, parent )
|
||||||
{
|
{
|
||||||
setPanel( true );
|
setPanel( true );
|
||||||
}
|
|
||||||
|
|
||||||
QskAspect::Subcontrol effectiveSubcontrol(
|
setSubcontrolProxy( QskTextLabel::Panel, Panel );
|
||||||
QskAspect::Subcontrol subControl ) const override final
|
setSubcontrolProxy( QskTextLabel::Text, Text );
|
||||||
{
|
|
||||||
if( subControl == QskTextLabel::Panel )
|
|
||||||
{
|
|
||||||
return Panel;
|
|
||||||
}
|
|
||||||
|
|
||||||
if( subControl == QskTextLabel::Text )
|
|
||||||
{
|
|
||||||
return Text;
|
|
||||||
}
|
|
||||||
|
|
||||||
return subControl;
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -54,17 +41,7 @@ class WeekdayBox : public QskBox
|
||||||
WeekdayBox( QQuickItem* parent ):
|
WeekdayBox( QQuickItem* parent ):
|
||||||
QskBox( true, parent )
|
QskBox( true, parent )
|
||||||
{
|
{
|
||||||
}
|
setSubcontrolProxy( QskBox::Panel, WeekdayBox::Panel );
|
||||||
|
|
||||||
QskAspect::Subcontrol effectiveSubcontrol(
|
|
||||||
QskAspect::Subcontrol subControl ) const override final
|
|
||||||
{
|
|
||||||
if( subControl == QskBox::Panel )
|
|
||||||
{
|
|
||||||
return WeekdayBox::Panel;
|
|
||||||
}
|
|
||||||
|
|
||||||
return subControl;
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -78,17 +55,7 @@ class CaptionColorBox : public QskBox
|
||||||
CaptionColorBox( QQuickItem* parent ):
|
CaptionColorBox( QQuickItem* parent ):
|
||||||
QskBox( true, parent )
|
QskBox( true, parent )
|
||||||
{
|
{
|
||||||
}
|
setSubcontrolProxy( QskBox::Panel, Panel );
|
||||||
|
|
||||||
QskAspect::Subcontrol effectiveSubcontrol(
|
|
||||||
QskAspect::Subcontrol subControl ) const override final
|
|
||||||
{
|
|
||||||
if( subControl == QskBox::Panel )
|
|
||||||
{
|
|
||||||
return Panel;
|
|
||||||
}
|
|
||||||
|
|
||||||
return subControl;
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -114,17 +81,7 @@ class CaptionBox : public QskLinearBox
|
||||||
QskLinearBox( Qt::Horizontal, parent )
|
QskLinearBox( Qt::Horizontal, parent )
|
||||||
{
|
{
|
||||||
setPanel( true );
|
setPanel( true );
|
||||||
}
|
setSubcontrolProxy( QskBox::Panel, Panel );
|
||||||
|
|
||||||
QskAspect::Subcontrol effectiveSubcontrol(
|
|
||||||
QskAspect::Subcontrol subControl ) const override final
|
|
||||||
{
|
|
||||||
if( subControl == QskBox::Panel )
|
|
||||||
{
|
|
||||||
return Panel;
|
|
||||||
}
|
|
||||||
|
|
||||||
return subControl;
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -137,19 +94,9 @@ class UsageDiagram : public Box
|
||||||
|
|
||||||
UsageDiagram( QQuickItem* parent );
|
UsageDiagram( QQuickItem* parent );
|
||||||
|
|
||||||
|
protected:
|
||||||
void updateLayout() override;
|
void updateLayout() override;
|
||||||
|
|
||||||
QskAspect::Subcontrol effectiveSubcontrol(
|
|
||||||
QskAspect::Subcontrol subControl ) const override final
|
|
||||||
{
|
|
||||||
if( subControl == QskBox::Panel )
|
|
||||||
{
|
|
||||||
return Panel;
|
|
||||||
}
|
|
||||||
|
|
||||||
return subControl;
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Diagram* m_diagram;
|
Diagram* m_diagram;
|
||||||
QskLinearBox* m_captionBox;
|
QskLinearBox* m_captionBox;
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
#include "QskGradient.h"
|
#include "QskGradient.h"
|
||||||
|
|
||||||
#include <qfont.h>
|
#include <qfont.h>
|
||||||
|
#include <map>
|
||||||
|
|
||||||
#define DEBUG_MAP 0
|
#define DEBUG_MAP 0
|
||||||
#define DEBUG_ANIMATOR 0
|
#define DEBUG_ANIMATOR 0
|
||||||
|
@ -206,13 +207,6 @@ static inline QskAspect qskSubstitutedAspect(
|
||||||
class QskSkinnable::PrivateData
|
class QskSkinnable::PrivateData
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
PrivateData()
|
|
||||||
: skinlet( nullptr )
|
|
||||||
, skinState( QskAspect::NoState )
|
|
||||||
, hasLocalSkinlet( false )
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
~PrivateData()
|
~PrivateData()
|
||||||
{
|
{
|
||||||
if ( hasLocalSkinlet )
|
if ( hasLocalSkinlet )
|
||||||
|
@ -223,12 +217,16 @@ class QskSkinnable::PrivateData
|
||||||
}
|
}
|
||||||
|
|
||||||
QskSkinHintTable hintTable;
|
QskSkinHintTable hintTable;
|
||||||
|
|
||||||
QskHintAnimatorTable animators;
|
QskHintAnimatorTable animators;
|
||||||
|
|
||||||
const QskSkinlet* skinlet;
|
typedef std::map< QskAspect::Subcontrol, QskAspect::Subcontrol > ProxyMap;
|
||||||
|
ProxyMap* subcontrolProxies = nullptr;
|
||||||
|
|
||||||
QskAspect::State skinState;
|
const QskSkinlet* skinlet = nullptr;
|
||||||
bool hasLocalSkinlet : 1;
|
|
||||||
|
QskAspect::State skinState = QskAspect::NoState;
|
||||||
|
bool hasLocalSkinlet = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
QskSkinnable::QskSkinnable()
|
QskSkinnable::QskSkinnable()
|
||||||
|
@ -284,6 +282,53 @@ const QskSkinlet* QskSkinnable::effectiveSkinlet() const
|
||||||
return m_data->skinlet;
|
return m_data->skinlet;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void QskSkinnable::setSubcontrolProxy(
|
||||||
|
QskAspect::Subcontrol subControl, QskAspect::Subcontrol proxy )
|
||||||
|
{
|
||||||
|
if ( subControl == QskAspect::Control )
|
||||||
|
return; // nonsense, we ignore this
|
||||||
|
|
||||||
|
if ( proxy == QskAspect::Control || subControl == proxy )
|
||||||
|
{
|
||||||
|
resetSubcontrolProxy( subControl );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( m_data->subcontrolProxies == nullptr )
|
||||||
|
m_data->subcontrolProxies = new PrivateData::ProxyMap();
|
||||||
|
|
||||||
|
(*m_data->subcontrolProxies)[ subControl ] = proxy;
|
||||||
|
}
|
||||||
|
|
||||||
|
void QskSkinnable::resetSubcontrolProxy( QskAspect::Subcontrol subcontrol )
|
||||||
|
{
|
||||||
|
if ( auto& proxies = m_data->subcontrolProxies )
|
||||||
|
{
|
||||||
|
auto it = proxies->find( subcontrol );
|
||||||
|
if ( it != proxies->end() )
|
||||||
|
{
|
||||||
|
proxies->erase( it );
|
||||||
|
if ( proxies->empty() )
|
||||||
|
{
|
||||||
|
delete proxies;
|
||||||
|
proxies = nullptr;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
QskAspect::Subcontrol QskSkinnable::subcontrolProxy( QskAspect::Subcontrol subControl ) const
|
||||||
|
{
|
||||||
|
if ( const auto proxies = m_data->subcontrolProxies )
|
||||||
|
{
|
||||||
|
auto it = proxies->find( subControl );
|
||||||
|
if ( it != proxies->end() )
|
||||||
|
return it->second;
|
||||||
|
}
|
||||||
|
|
||||||
|
return QskAspect::Control;
|
||||||
|
}
|
||||||
|
|
||||||
QskSkinHintTable& QskSkinnable::hintTable()
|
QskSkinHintTable& QskSkinnable::hintTable()
|
||||||
{
|
{
|
||||||
return m_data->hintTable;
|
return m_data->hintTable;
|
||||||
|
@ -1162,6 +1207,19 @@ void QskSkinnable::updateNode( QSGNode* parentNode )
|
||||||
|
|
||||||
QskAspect::Subcontrol QskSkinnable::effectiveSubcontrol(
|
QskAspect::Subcontrol QskSkinnable::effectiveSubcontrol(
|
||||||
QskAspect::Subcontrol subControl ) const
|
QskAspect::Subcontrol subControl ) const
|
||||||
|
{
|
||||||
|
if ( const auto proxies = m_data->subcontrolProxies )
|
||||||
|
{
|
||||||
|
auto it = proxies->find( subControl );
|
||||||
|
if ( it != proxies->end() )
|
||||||
|
return it->second;
|
||||||
|
}
|
||||||
|
|
||||||
|
return substitutedSubcontrol( subControl );
|
||||||
|
}
|
||||||
|
|
||||||
|
QskAspect::Subcontrol QskSkinnable::substitutedSubcontrol(
|
||||||
|
QskAspect::Subcontrol subControl ) const
|
||||||
{
|
{
|
||||||
// derived classes might want to redirect a sub-control
|
// derived classes might want to redirect a sub-control
|
||||||
return subControl;
|
return subControl;
|
||||||
|
|
|
@ -79,6 +79,10 @@ class QSK_EXPORT QskSkinnable
|
||||||
|
|
||||||
QskColorFilter effectiveGraphicFilter( QskAspect ) const;
|
QskColorFilter effectiveGraphicFilter( QskAspect ) const;
|
||||||
|
|
||||||
|
void setSubcontrolProxy( QskAspect::Subcontrol, QskAspect::Subcontrol proxy );
|
||||||
|
void resetSubcontrolProxy( QskAspect::Subcontrol );
|
||||||
|
QskAspect::Subcontrol subcontrolProxy( QskAspect::Subcontrol ) const;
|
||||||
|
|
||||||
bool setAnimationHint( QskAspect, QskAnimationHint );
|
bool setAnimationHint( QskAspect, QskAnimationHint );
|
||||||
QskAnimationHint animationHint( QskAspect, QskSkinHintStatus* = nullptr ) const;
|
QskAnimationHint animationHint( QskAspect, QskSkinHintStatus* = nullptr ) const;
|
||||||
|
|
||||||
|
@ -110,7 +114,7 @@ class QSK_EXPORT QskSkinnable
|
||||||
void startTransition( QskAspect,
|
void startTransition( QskAspect,
|
||||||
QskAnimationHint, QVariant from, QVariant to );
|
QskAnimationHint, QVariant from, QVariant to );
|
||||||
|
|
||||||
virtual QskAspect::Subcontrol effectiveSubcontrol( QskAspect::Subcontrol ) const;
|
QskAspect::Subcontrol effectiveSubcontrol( QskAspect::Subcontrol ) const;
|
||||||
|
|
||||||
QskControl* controlCast();
|
QskControl* controlCast();
|
||||||
const QskControl* controlCast() const;
|
const QskControl* controlCast() const;
|
||||||
|
@ -201,6 +205,8 @@ class QSK_EXPORT QskSkinnable
|
||||||
virtual void updateNode( QSGNode* );
|
virtual void updateNode( QSGNode* );
|
||||||
virtual bool isTransitionAccepted( QskAspect ) const;
|
virtual bool isTransitionAccepted( QskAspect ) const;
|
||||||
|
|
||||||
|
virtual QskAspect::Subcontrol substitutedSubcontrol( QskAspect::Subcontrol ) const;
|
||||||
|
|
||||||
QskSkinHintTable& hintTable();
|
QskSkinHintTable& hintTable();
|
||||||
const QskSkinHintTable& hintTable() const;
|
const QskSkinHintTable& hintTable() const;
|
||||||
|
|
||||||
|
|
|
@ -671,7 +671,7 @@ void QskTabBar::handleButtonClick()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QskAspect::Subcontrol QskTabBar::effectiveSubcontrol(
|
QskAspect::Subcontrol QskTabBar::substitutedSubcontrol(
|
||||||
QskAspect::Subcontrol subControl ) const
|
QskAspect::Subcontrol subControl ) const
|
||||||
{
|
{
|
||||||
if ( subControl == QskBox::Panel )
|
if ( subControl == QskBox::Panel )
|
||||||
|
|
|
@ -90,9 +90,6 @@ class QSK_EXPORT QskTabBar : public QskBox
|
||||||
|
|
||||||
QskAspect::Placement effectivePlacement() const override;
|
QskAspect::Placement effectivePlacement() const override;
|
||||||
|
|
||||||
QskAspect::Subcontrol effectiveSubcontrol(
|
|
||||||
QskAspect::Subcontrol ) const override;
|
|
||||||
|
|
||||||
public Q_SLOTS:
|
public Q_SLOTS:
|
||||||
void setCurrentIndex( int index );
|
void setCurrentIndex( int index );
|
||||||
|
|
||||||
|
@ -108,6 +105,9 @@ class QSK_EXPORT QskTabBar : public QskBox
|
||||||
protected:
|
protected:
|
||||||
void componentComplete() override;
|
void componentComplete() override;
|
||||||
|
|
||||||
|
QskAspect::Subcontrol substitutedSubcontrol(
|
||||||
|
QskAspect::Subcontrol ) const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void adjustCurrentIndex();
|
void adjustCurrentIndex();
|
||||||
void handleButtonClick();
|
void handleButtonClick();
|
||||||
|
|
|
@ -27,7 +27,7 @@ QskDialogButton::~QskDialogButton()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
QskAspect::Subcontrol QskDialogButton::effectiveSubcontrol(
|
QskAspect::Subcontrol QskDialogButton::substitutedSubcontrol(
|
||||||
QskAspect::Subcontrol subControl ) const
|
QskAspect::Subcontrol subControl ) const
|
||||||
{
|
{
|
||||||
if ( subControl == QskPushButton::Panel )
|
if ( subControl == QskPushButton::Panel )
|
||||||
|
|
|
@ -29,15 +29,15 @@ class QSK_EXPORT QskDialogButton : public QskPushButton
|
||||||
void setAction( QskDialog::Action );
|
void setAction( QskDialog::Action );
|
||||||
QskDialog::Action action() const;
|
QskDialog::Action action() const;
|
||||||
|
|
||||||
QskAspect::Subcontrol effectiveSubcontrol(
|
|
||||||
QskAspect::Subcontrol ) const override;
|
|
||||||
|
|
||||||
Q_SIGNALS:
|
Q_SIGNALS:
|
||||||
void actionChanged();
|
void actionChanged();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void changeEvent( QEvent* ) override;
|
void changeEvent( QEvent* ) override;
|
||||||
|
|
||||||
|
QskAspect::Subcontrol substitutedSubcontrol(
|
||||||
|
QskAspect::Subcontrol ) const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QskDialog::Action m_action;
|
QskDialog::Action m_action;
|
||||||
};
|
};
|
||||||
|
|
|
@ -111,7 +111,7 @@ Qt::Orientation QskDialogButtonBox::orientation() const
|
||||||
return m_data->layoutBox->orientation();
|
return m_data->layoutBox->orientation();
|
||||||
}
|
}
|
||||||
|
|
||||||
QskAspect::Subcontrol QskDialogButtonBox::effectiveSubcontrol(
|
QskAspect::Subcontrol QskDialogButtonBox::substitutedSubcontrol(
|
||||||
QskAspect::Subcontrol subControl ) const
|
QskAspect::Subcontrol subControl ) const
|
||||||
{
|
{
|
||||||
if ( subControl == QskBox::Panel )
|
if ( subControl == QskBox::Panel )
|
||||||
|
|
|
@ -57,9 +57,6 @@ class QSK_EXPORT QskDialogButtonBox : public QskBox
|
||||||
|
|
||||||
QskDialog::Action clickedAction() const;
|
QskDialog::Action clickedAction() const;
|
||||||
|
|
||||||
QskAspect::Subcontrol effectiveSubcontrol(
|
|
||||||
QskAspect::Subcontrol ) const override;
|
|
||||||
|
|
||||||
void setDefaultButton( QskPushButton* );
|
void setDefaultButton( QskPushButton* );
|
||||||
QskPushButton* defaultButton() const;
|
QskPushButton* defaultButton() const;
|
||||||
|
|
||||||
|
@ -83,6 +80,9 @@ class QSK_EXPORT QskDialogButtonBox : public QskBox
|
||||||
virtual QskPushButton* createButton( QskDialog::Action ) const;
|
virtual QskPushButton* createButton( QskDialog::Action ) const;
|
||||||
void invalidateLayout();
|
void invalidateLayout();
|
||||||
|
|
||||||
|
QskAspect::Subcontrol substitutedSubcontrol(
|
||||||
|
QskAspect::Subcontrol ) const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void onButtonClicked();
|
void onButtonClicked();
|
||||||
void rearrangeButtons();
|
void rearrangeButtons();
|
||||||
|
|
|
@ -28,7 +28,8 @@ namespace
|
||||||
initSizePolicy( QskSizePolicy::Ignored, QskSizePolicy::Fixed );
|
initSizePolicy( QskSizePolicy::Ignored, QskSizePolicy::Fixed );
|
||||||
}
|
}
|
||||||
|
|
||||||
QskAspect::Subcontrol effectiveSubcontrol(
|
protected:
|
||||||
|
QskAspect::Subcontrol substitutedSubcontrol(
|
||||||
QskAspect::Subcontrol subControl ) const override
|
QskAspect::Subcontrol subControl ) const override
|
||||||
{
|
{
|
||||||
if ( subControl == QskTextInput::Panel )
|
if ( subControl == QskTextInput::Panel )
|
||||||
|
@ -40,7 +41,6 @@ namespace
|
||||||
return subControl;
|
return subControl;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
|
||||||
void focusInEvent( QFocusEvent* ) override
|
void focusInEvent( QFocusEvent* ) override
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -174,7 +174,7 @@ QQuickItem* QskInputPanelBox::inputProxy() const
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
QskAspect::Subcontrol QskInputPanelBox::effectiveSubcontrol(
|
QskAspect::Subcontrol QskInputPanelBox::substitutedSubcontrol(
|
||||||
QskAspect::Subcontrol subControl ) const
|
QskAspect::Subcontrol subControl ) const
|
||||||
{
|
{
|
||||||
if ( subControl == QskBox::Panel )
|
if ( subControl == QskBox::Panel )
|
||||||
|
|
|
@ -52,9 +52,6 @@ class QSK_EXPORT QskInputPanelBox : public QskBox
|
||||||
|
|
||||||
QString inputPrompt() const;
|
QString inputPrompt() const;
|
||||||
|
|
||||||
QskAspect::Subcontrol effectiveSubcontrol(
|
|
||||||
QskAspect::Subcontrol ) const override;
|
|
||||||
|
|
||||||
Q_SIGNALS:
|
Q_SIGNALS:
|
||||||
void panelHintsChanged();
|
void panelHintsChanged();
|
||||||
void inputPromptChanged( const QString& );
|
void inputPromptChanged( const QString& );
|
||||||
|
@ -69,6 +66,9 @@ class QSK_EXPORT QskInputPanelBox : public QskBox
|
||||||
protected:
|
protected:
|
||||||
void keyPressEvent( QKeyEvent* ) override;
|
void keyPressEvent( QKeyEvent* ) override;
|
||||||
|
|
||||||
|
QskAspect::Subcontrol substitutedSubcontrol(
|
||||||
|
QskAspect::Subcontrol ) const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
class PrivateData;
|
class PrivateData;
|
||||||
std::unique_ptr< PrivateData > m_data;
|
std::unique_ptr< PrivateData > m_data;
|
||||||
|
|
|
@ -43,7 +43,7 @@ namespace
|
||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
|
|
||||||
QskAspect::Subcontrol effectiveSubcontrol(
|
QskAspect::Subcontrol substitutedSubcontrol(
|
||||||
QskAspect::Subcontrol subControl ) const override
|
QskAspect::Subcontrol subControl ) const override
|
||||||
{
|
{
|
||||||
if ( subControl == QskPushButton::Panel )
|
if ( subControl == QskPushButton::Panel )
|
||||||
|
@ -97,13 +97,13 @@ QskInputPredictionBar::~QskInputPredictionBar()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
QskAspect::Subcontrol QskInputPredictionBar::effectiveSubcontrol(
|
QskAspect::Subcontrol QskInputPredictionBar::substitutedSubcontrol(
|
||||||
QskAspect::Subcontrol subControl ) const
|
QskAspect::Subcontrol subControl ) const
|
||||||
{
|
{
|
||||||
if ( subControl == QskBox::Panel )
|
if ( subControl == QskBox::Panel )
|
||||||
return QskInputPredictionBar::Panel;
|
return QskInputPredictionBar::Panel;
|
||||||
|
|
||||||
return subControl;
|
return Inherited::substitutedSubcontrol( subControl );
|
||||||
}
|
}
|
||||||
|
|
||||||
void QskInputPredictionBar::setPrediction( const QStringList& candidates )
|
void QskInputPredictionBar::setPrediction( const QStringList& candidates )
|
||||||
|
|
|
@ -20,9 +20,6 @@ class QSK_EXPORT QskInputPredictionBar : public QskBox
|
||||||
QskInputPredictionBar( QQuickItem* parent = nullptr );
|
QskInputPredictionBar( QQuickItem* parent = nullptr );
|
||||||
~QskInputPredictionBar() override;
|
~QskInputPredictionBar() override;
|
||||||
|
|
||||||
QskAspect::Subcontrol effectiveSubcontrol(
|
|
||||||
QskAspect::Subcontrol subControl ) const override;
|
|
||||||
|
|
||||||
QStringList candidates() const;
|
QStringList candidates() const;
|
||||||
|
|
||||||
Q_SIGNALS:
|
Q_SIGNALS:
|
||||||
|
@ -32,6 +29,9 @@ class QSK_EXPORT QskInputPredictionBar : public QskBox
|
||||||
void setPrediction( const QStringList& );
|
void setPrediction( const QStringList& );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
QskAspect::Subcontrol substitutedSubcontrol(
|
||||||
|
QskAspect::Subcontrol ) const override;
|
||||||
|
|
||||||
void buttonClicked();
|
void buttonClicked();
|
||||||
void setScrollOffset( int );
|
void setScrollOffset( int );
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ namespace
|
||||||
setFocusPolicy( Qt::TabFocus );
|
setFocusPolicy( Qt::TabFocus );
|
||||||
}
|
}
|
||||||
|
|
||||||
QskAspect::Subcontrol effectiveSubcontrol(
|
QskAspect::Subcontrol substitutedSubcontrol(
|
||||||
QskAspect::Subcontrol subControl ) const override
|
QskAspect::Subcontrol subControl ) const override
|
||||||
{
|
{
|
||||||
auto keyBoard = static_cast< const QskVirtualKeyboard* >( parent() );
|
auto keyBoard = static_cast< const QskVirtualKeyboard* >( parent() );
|
||||||
|
@ -47,7 +47,7 @@ namespace
|
||||||
if ( subControl == QskPushButton::Text )
|
if ( subControl == QskPushButton::Text )
|
||||||
return keyBoard->effectiveSubcontrol( QskVirtualKeyboard::ButtonText );
|
return keyBoard->effectiveSubcontrol( QskVirtualKeyboard::ButtonText );
|
||||||
|
|
||||||
return QskPushButton::effectiveSubcontrol( subControl );
|
return QskPushButton::substitutedSubcontrol( subControl );
|
||||||
}
|
}
|
||||||
|
|
||||||
int row() const { return m_row; }
|
int row() const { return m_row; }
|
||||||
|
@ -272,7 +272,7 @@ QskVirtualKeyboard::~QskVirtualKeyboard()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
QskAspect::Subcontrol QskVirtualKeyboard::effectiveSubcontrol(
|
QskAspect::Subcontrol QskVirtualKeyboard::substitutedSubcontrol(
|
||||||
QskAspect::Subcontrol subControl ) const
|
QskAspect::Subcontrol subControl ) const
|
||||||
{
|
{
|
||||||
if ( subControl == QskBox::Panel )
|
if ( subControl == QskBox::Panel )
|
||||||
|
@ -287,7 +287,7 @@ QskAspect::Subcontrol QskVirtualKeyboard::effectiveSubcontrol(
|
||||||
return QskPushButton::Text;
|
return QskPushButton::Text;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return subControl;
|
return Inherited::substitutedSubcontrol( subControl );
|
||||||
}
|
}
|
||||||
|
|
||||||
QskVirtualKeyboard::Mode QskVirtualKeyboard::mode() const
|
QskVirtualKeyboard::Mode QskVirtualKeyboard::mode() const
|
||||||
|
|
|
@ -35,9 +35,6 @@ class QSK_EXPORT QskVirtualKeyboard : public QskBox
|
||||||
|
|
||||||
void updateLocale( const QLocale& );
|
void updateLocale( const QLocale& );
|
||||||
|
|
||||||
QskAspect::Subcontrol effectiveSubcontrol(
|
|
||||||
QskAspect::Subcontrol ) const override;
|
|
||||||
|
|
||||||
bool hasKey( int keyCode ) const;
|
bool hasKey( int keyCode ) const;
|
||||||
|
|
||||||
Q_SIGNALS:
|
Q_SIGNALS:
|
||||||
|
@ -48,6 +45,9 @@ class QSK_EXPORT QskVirtualKeyboard : public QskBox
|
||||||
void updateLayout() override;
|
void updateLayout() override;
|
||||||
QSizeF layoutSizeHint( Qt::SizeHint, const QSizeF& ) const override;
|
QSizeF layoutSizeHint( Qt::SizeHint, const QSizeF& ) const override;
|
||||||
|
|
||||||
|
QskAspect::Subcontrol substitutedSubcontrol(
|
||||||
|
QskAspect::Subcontrol ) const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void buttonPressed();
|
void buttonPressed();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue