making contentsSizeHint protected
This commit is contained in:
parent
b1a2236a90
commit
2500111ee5
@ -29,8 +29,6 @@ class MyToggleButton : public QskAbstractButton
|
||||
void setIconAt( int index, const QString& icon );
|
||||
QString iconAt( int index ) const;
|
||||
|
||||
QSizeF contentsSizeHint() const override;
|
||||
|
||||
qreal heightForWidth( qreal width ) const override;
|
||||
qreal widthForHeight( qreal height ) const override;
|
||||
|
||||
@ -47,6 +45,7 @@ class MyToggleButton : public QskAbstractButton
|
||||
|
||||
protected:
|
||||
void updateLayout() override;
|
||||
QSizeF contentsSizeHint() const override;
|
||||
|
||||
private:
|
||||
class PrivateData;
|
||||
|
@ -18,6 +18,8 @@ class Slider : public QskSlider
|
||||
Slider( QQuickItem* parent = nullptr );
|
||||
|
||||
QRectF focusIndicatorRect() const override;
|
||||
|
||||
protected:
|
||||
QSizeF contentsSizeHint() const override;
|
||||
};
|
||||
|
||||
|
@ -29,6 +29,8 @@ class QSK_EXPORT QskBox : public QskControl
|
||||
bool hasPanel() const;
|
||||
|
||||
QRectF layoutRectForSize( const QSizeF& ) const override;
|
||||
|
||||
protected:
|
||||
QSizeF contentsSizeHint() const override;
|
||||
|
||||
Q_SIGNALS:
|
||||
|
@ -193,6 +193,7 @@ class QSK_EXPORT QskControl : public QskQuickItem, public QskSkinnable
|
||||
virtual void updateResources();
|
||||
virtual void updateLayout();
|
||||
|
||||
protected:
|
||||
virtual QSizeF contentsSizeHint() const;
|
||||
|
||||
private:
|
||||
|
@ -80,8 +80,6 @@ class QSK_EXPORT QskGraphicLabel : public QskControl
|
||||
qreal heightForWidth( qreal width ) const override;
|
||||
qreal widthForHeight( qreal height ) const override;
|
||||
|
||||
QSizeF contentsSizeHint() const override;
|
||||
|
||||
bool isEmpty() const;
|
||||
|
||||
void setGraphicRole( int role );
|
||||
@ -101,6 +99,8 @@ class QSK_EXPORT QskGraphicLabel : public QskControl
|
||||
protected:
|
||||
void changeEvent( QEvent* ) override;
|
||||
void updateLayout() override;
|
||||
|
||||
QSizeF contentsSizeHint() const override;
|
||||
virtual QskGraphic loadSource( const QUrl& ) const;
|
||||
|
||||
private:
|
||||
|
@ -79,8 +79,6 @@ class QSK_EXPORT QskListView : public QskScrollView
|
||||
virtual QskAspect::Subcontrol textSubControlAt( int row, int col ) const;
|
||||
#endif
|
||||
|
||||
QSizeF contentsSizeHint() const override;
|
||||
|
||||
public Q_SLOTS:
|
||||
void setSelectedRow( int row );
|
||||
|
||||
@ -100,6 +98,7 @@ class QSK_EXPORT QskListView : public QskScrollView
|
||||
void mouseReleaseEvent( QMouseEvent* ) override;
|
||||
|
||||
void updateScrollableSize();
|
||||
QSizeF contentsSizeHint() const override;
|
||||
|
||||
void componentComplete() override;
|
||||
|
||||
|
@ -40,8 +40,6 @@ class QSK_EXPORT QskPageIndicator : public QskControl
|
||||
Qt::Orientation orientation() const;
|
||||
void setOrientation( Qt::Orientation );
|
||||
|
||||
QSizeF contentsSizeHint() const override;
|
||||
|
||||
Q_SIGNALS:
|
||||
void countChanged();
|
||||
void currentIndexChanged();
|
||||
@ -51,6 +49,9 @@ class QSK_EXPORT QskPageIndicator : public QskControl
|
||||
void setCount( int count );
|
||||
void setCurrentIndex( qreal index );
|
||||
|
||||
protected:
|
||||
QSizeF contentsSizeHint() const override;
|
||||
|
||||
private:
|
||||
class PrivateData;
|
||||
std::unique_ptr< PrivateData > m_data;
|
||||
|
@ -63,8 +63,6 @@ class QSK_EXPORT QskPushButton : public QskAbstractButton
|
||||
bool isFlat() const;
|
||||
|
||||
QFont font() const;
|
||||
|
||||
QSizeF contentsSizeHint() const override;
|
||||
QRectF layoutRectForSize( const QSizeF& ) const override;
|
||||
|
||||
public Q_SLOTS:
|
||||
@ -92,6 +90,8 @@ class QSK_EXPORT QskPushButton : public QskAbstractButton
|
||||
void changeEvent( QEvent* ) override;
|
||||
|
||||
void updateLayout() override;
|
||||
QSizeF contentsSizeHint() const override;
|
||||
|
||||
virtual QskGraphic loadGraphic( const QUrl& ) const;
|
||||
|
||||
private:
|
||||
|
@ -34,13 +34,15 @@ class QSK_EXPORT QskSeparator : public QskControl
|
||||
void setThickness( qreal thickness );
|
||||
qreal thickness() const;
|
||||
|
||||
QSizeF contentsSizeHint() const override;
|
||||
QskAspect::Placement effectivePlacement() const override;
|
||||
|
||||
Q_SIGNALS:
|
||||
void orientationChanged( Qt::Orientation );
|
||||
void thicknessChanged();
|
||||
|
||||
protected:
|
||||
QSizeF contentsSizeHint() const override;
|
||||
|
||||
private:
|
||||
Qt::Orientation m_orientation;
|
||||
};
|
||||
|
@ -41,7 +41,6 @@ class QSK_EXPORT QskSlider : public QskRangeControl
|
||||
void setTracking( bool );
|
||||
bool isTracking() const;
|
||||
|
||||
QSizeF contentsSizeHint() const override;
|
||||
QskAspect::Placement effectivePlacement() const override;
|
||||
|
||||
Q_SIGNALS:
|
||||
@ -54,6 +53,8 @@ class QSK_EXPORT QskSlider : public QskRangeControl
|
||||
void mouseMoveEvent( QMouseEvent* e ) override;
|
||||
void mouseReleaseEvent( QMouseEvent* e ) override;
|
||||
|
||||
QSizeF contentsSizeHint() const override;
|
||||
|
||||
QSizeF handleSize() const;
|
||||
QRectF handleRect() const;
|
||||
|
||||
|
@ -38,8 +38,6 @@ class QSK_EXPORT QskStatusIndicator : public QskControl
|
||||
qreal heightForWidth( qreal width ) const override;
|
||||
qreal widthForHeight( qreal height ) const override;
|
||||
|
||||
QSizeF contentsSizeHint() const override;
|
||||
|
||||
int status() const;
|
||||
bool hasStatus( int status ) const;
|
||||
|
||||
@ -53,6 +51,8 @@ class QSK_EXPORT QskStatusIndicator : public QskControl
|
||||
void changeEvent( QEvent* ) override;
|
||||
void updateLayout() override;
|
||||
|
||||
QSizeF contentsSizeHint() const override;
|
||||
|
||||
private:
|
||||
qreal sizeConstraint( Qt::Orientation, qreal ) const;
|
||||
|
||||
|
@ -77,8 +77,6 @@ class QSK_EXPORT QskSubWindow : public QskPopup
|
||||
bool testWindowButton( WindowButton ) const;
|
||||
|
||||
QRectF titleBarRect() const;
|
||||
|
||||
QSizeF contentsSizeHint() const override;
|
||||
QRectF layoutRectForSize( const QSizeF& ) const override;
|
||||
|
||||
Q_SIGNALS:
|
||||
@ -91,9 +89,10 @@ class QSK_EXPORT QskSubWindow : public QskPopup
|
||||
|
||||
protected:
|
||||
bool event( QEvent* ) override;
|
||||
|
||||
void updateLayout() override;
|
||||
|
||||
QSizeF contentsSizeHint() const override;
|
||||
|
||||
void itemChange( QQuickItem::ItemChange,
|
||||
const QQuickItem::ItemChangeData& ) override;
|
||||
|
||||
|
@ -36,7 +36,6 @@ class QSK_EXPORT QskTabButton : public QskAbstractButton
|
||||
void setTextOptions( const QskTextOptions& );
|
||||
QskTextOptions textOptions() const;
|
||||
|
||||
QSizeF contentsSizeHint() const override;
|
||||
QRectF layoutRectForSize( const QSizeF& ) const override;
|
||||
|
||||
QskAspect::Placement effectivePlacement() const override;
|
||||
@ -50,6 +49,7 @@ class QSK_EXPORT QskTabButton : public QskAbstractButton
|
||||
|
||||
protected:
|
||||
void changeEvent( QEvent* ) override;
|
||||
QSizeF contentsSizeHint() const override;
|
||||
|
||||
private:
|
||||
class PrivateData;
|
||||
|
@ -66,8 +66,6 @@ class QSK_EXPORT QskTabView : public QskControl
|
||||
|
||||
QRectF tabRect() const;
|
||||
|
||||
QSizeF contentsSizeHint() const override;
|
||||
|
||||
public Q_SLOTS:
|
||||
void setCurrentIndex( int index );
|
||||
|
||||
@ -80,6 +78,8 @@ class QSK_EXPORT QskTabView : public QskControl
|
||||
bool event( QEvent* event ) override;
|
||||
void updateLayout() override;
|
||||
|
||||
QSizeF contentsSizeHint() const override;
|
||||
|
||||
private:
|
||||
class PrivateData;
|
||||
std::unique_ptr< PrivateData > m_data;
|
||||
|
@ -146,8 +146,6 @@ class QSK_EXPORT QskTextInput : public QskControl
|
||||
|
||||
void ensureVisible( int position );
|
||||
|
||||
QSizeF contentsSizeHint() const override;
|
||||
|
||||
public Q_SLOTS:
|
||||
void setText( const QString& );
|
||||
void setEditing( bool );
|
||||
@ -200,6 +198,8 @@ class QSK_EXPORT QskTextInput : public QskControl
|
||||
void keyReleaseEvent( QKeyEvent* ) override;
|
||||
|
||||
void updateLayout() override;
|
||||
QSizeF contentsSizeHint() const override;
|
||||
|
||||
void updateNode( QSGNode* ) override;
|
||||
|
||||
private:
|
||||
|
@ -60,8 +60,6 @@ class QSK_EXPORT QskTextLabel : public QskControl
|
||||
void setAlignment( Qt::Alignment );
|
||||
Qt::Alignment alignment() const;
|
||||
|
||||
QSizeF contentsSizeHint() const override;
|
||||
|
||||
qreal heightForWidth( qreal width ) const override;
|
||||
qreal widthForHeight( qreal height ) const override;
|
||||
|
||||
@ -79,6 +77,7 @@ class QSK_EXPORT QskTextLabel : public QskControl
|
||||
|
||||
protected:
|
||||
void changeEvent( QEvent* ) override;
|
||||
QSizeF contentsSizeHint() const override;
|
||||
|
||||
private:
|
||||
class PrivateData;
|
||||
|
@ -128,7 +128,7 @@ QSizeF QskDialogButtonBox::contentsSizeHint() const
|
||||
m_data->dirtyLayout = false;
|
||||
}
|
||||
|
||||
return outerBoxSize( Panel, m_data->layoutBox->contentsSizeHint() );
|
||||
return outerBoxSize( Panel, m_data->layoutBox->sizeHint() );
|
||||
}
|
||||
|
||||
void QskDialogButtonBox::invalidateLayout()
|
||||
|
@ -58,8 +58,6 @@ class QSK_EXPORT QskDialogButtonBox : public QskBox
|
||||
|
||||
QskDialog::Action clickedAction() const;
|
||||
|
||||
QSizeF contentsSizeHint() const override;
|
||||
|
||||
QskAspect::Subcontrol effectiveSubcontrol(
|
||||
QskAspect::Subcontrol ) const override;
|
||||
|
||||
@ -81,6 +79,8 @@ class QSK_EXPORT QskDialogButtonBox : public QskBox
|
||||
bool event( QEvent* event ) override;
|
||||
void updateLayout() override;
|
||||
|
||||
QSizeF contentsSizeHint() const override;
|
||||
|
||||
virtual QskPushButton* createButton( QskDialog::Action ) const;
|
||||
|
||||
void invalidateLayout();
|
||||
|
@ -54,8 +54,6 @@ class QSK_EXPORT QskDialogSubWindow : public QskSubWindow
|
||||
qreal heightForWidth( qreal width ) const override;
|
||||
qreal widthForHeight( qreal height ) const override;
|
||||
|
||||
QSizeF contentsSizeHint() const override;
|
||||
|
||||
Q_SIGNALS:
|
||||
void finished( QskDialog::DialogCode );
|
||||
void accepted();
|
||||
@ -74,6 +72,8 @@ class QSK_EXPORT QskDialogSubWindow : public QskSubWindow
|
||||
void updateLayout() override;
|
||||
void aboutToShow() override;
|
||||
|
||||
QSizeF contentsSizeHint() const override;
|
||||
|
||||
virtual QskDialogButtonBox* createButtonBox();
|
||||
|
||||
private:
|
||||
|
@ -38,8 +38,6 @@ class QSK_EXPORT QskVirtualKeyboard : public QskBox
|
||||
qreal heightForWidth( qreal width ) const override;
|
||||
qreal widthForHeight( qreal height ) const override;
|
||||
|
||||
QSizeF contentsSizeHint() const override;
|
||||
|
||||
QskAspect::Subcontrol effectiveSubcontrol(
|
||||
QskAspect::Subcontrol ) const override;
|
||||
|
||||
@ -51,6 +49,7 @@ class QSK_EXPORT QskVirtualKeyboard : public QskBox
|
||||
|
||||
protected:
|
||||
void updateLayout() override;
|
||||
QSizeF contentsSizeHint() const override;
|
||||
|
||||
private:
|
||||
void buttonPressed();
|
||||
|
@ -99,8 +99,6 @@ class QSK_EXPORT QskGridBox : public QskBox
|
||||
Q_INVOKABLE void setRowFixedHeight( int row, qreal height );
|
||||
Q_INVOKABLE void setColumnFixedWidth( int column, qreal width );
|
||||
|
||||
QSizeF contentsSizeHint() const override;
|
||||
|
||||
qreal heightForWidth( qreal width ) const override;
|
||||
qreal widthForHeight( qreal height ) const override;
|
||||
|
||||
@ -118,6 +116,8 @@ class QSK_EXPORT QskGridBox : public QskBox
|
||||
void itemChange( ItemChange, const ItemChangeData& ) override;
|
||||
void updateLayout() override;
|
||||
|
||||
QSizeF contentsSizeHint() const override;
|
||||
|
||||
private:
|
||||
class PrivateData;
|
||||
std::unique_ptr< PrivateData > m_data;
|
||||
|
@ -54,8 +54,6 @@ class QSK_EXPORT QskLinearBox : public QskIndexedLayoutBox
|
||||
void removeItem( const QQuickItem* );
|
||||
void removeAt( int index );
|
||||
|
||||
QSizeF contentsSizeHint() const override;
|
||||
|
||||
qreal heightForWidth( qreal width ) const override;
|
||||
qreal widthForHeight( qreal height ) const override;
|
||||
|
||||
@ -110,6 +108,8 @@ class QSK_EXPORT QskLinearBox : public QskIndexedLayoutBox
|
||||
void itemChange( ItemChange, const ItemChangeData& ) override;
|
||||
void updateLayout() override;
|
||||
|
||||
QSizeF contentsSizeHint() const override;
|
||||
|
||||
void autoAddItem( QQuickItem* ) override final;
|
||||
void autoRemoveItem( QQuickItem* ) override final;
|
||||
|
||||
|
@ -51,7 +51,6 @@ class QSK_EXPORT QskStackBox : public QskIndexedLayoutBox
|
||||
const QskStackBoxAnimator* animator() const;
|
||||
QskStackBoxAnimator* animator();
|
||||
|
||||
QSizeF contentsSizeHint() const override;
|
||||
qreal heightForWidth( qreal width ) const override;
|
||||
qreal widthForHeight( qreal height ) const override;
|
||||
|
||||
@ -73,6 +72,8 @@ class QSK_EXPORT QskStackBox : public QskIndexedLayoutBox
|
||||
bool event( QEvent* ) override;
|
||||
void updateLayout() override;
|
||||
|
||||
QSizeF contentsSizeHint() const override;
|
||||
|
||||
void autoAddItem( QQuickItem* ) override final;
|
||||
void autoRemoveItem( QQuickItem* ) override final;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user