From 7fdd3322fb9b5965904ac5fdfce50161d9ac794a Mon Sep 17 00:00:00 2001 From: Uwe Rathmann Date: Mon, 24 Jul 2017 07:48:36 +0200 Subject: [PATCH] QskLineEdit/QskImage moved to playground --- examples/colorswitch/colorswitch.qml | 16 -- examples/examples.pri | 4 - examples/examples.pro | 5 - playground/images/Image.cpp | 42 ++-- playground/images/Image.h | 10 +- playground/images/images.pro | 6 +- playground/images/images.qml | 3 +- playground/images/main.cpp | 4 + playground/lineedit/LineEdit.cpp | 278 ++++++++++++------------ playground/lineedit/LineEdit.h | 20 +- playground/lineedit/LineEditSkinlet.cpp | 34 +-- playground/lineedit/LineEditSkinlet.h | 18 +- playground/lineedit/lineedit.pro | 8 +- playground/lineedit/lineedit.qml | 5 +- playground/lineedit/main.cpp | 6 +- qskinny.pro | 4 +- src/common/QskModule.cpp | 5 - src/controls/QskSkin.cpp | 4 - src/skins/squiek/QskSquiekSkin.cpp | 16 -- src/skins/squiek/QskSquiekSkin.h | 1 - src/src.pro | 6 - 21 files changed, 233 insertions(+), 262 deletions(-) diff --git a/examples/colorswitch/colorswitch.qml b/examples/colorswitch/colorswitch.qml index 9896dc73..c3f3c237 100644 --- a/examples/colorswitch/colorswitch.qml +++ b/examples/colorswitch/colorswitch.qml @@ -6,8 +6,6 @@ Main { id: main - inputPanel: embeddedInputPanel - property var accentColors: [ "red", "lightgreen", "#66336699" ] Theme @@ -176,20 +174,6 @@ Main text: slider.value } } - - LineEdit - { - sizePolicy: SizePolicy.Maximum - - text: "editable text" - } - - InputPanel - { - id: embeddedInputPanel - - visible: Qt.inputMethod.visible - } } } diff --git a/examples/examples.pri b/examples/examples.pri index 4bc7119c..a97dfa74 100644 --- a/examples/examples.pri +++ b/examples/examples.pri @@ -5,10 +5,6 @@ QSK_OUT_ROOT = $${OUT_PWD}/../.. QT += quick -# QskImage would need it -#QT += quick quick-private -#CONFIG += no_private_qt_headers_warning - TEMPLATE = app QSK_DIRS = \ diff --git a/examples/examples.pro b/examples/examples.pro index 8657fd0f..98635a05 100644 --- a/examples/examples.pro +++ b/examples/examples.pro @@ -21,11 +21,6 @@ SUBDIRS += \ frames \ gbenchmark \ glabels \ - lineedit \ messageboxQml \ rectangles \ tlabels - -# non controls: qml -SUBDIRS += \ - images diff --git a/playground/images/Image.cpp b/playground/images/Image.cpp index 08cab760..a92197a6 100644 --- a/playground/images/Image.cpp +++ b/playground/images/Image.cpp @@ -3,12 +3,12 @@ * This file may be used under the terms of the QSkinny License, Version 1.0 *****************************************************************************/ -#include "QskImage.h" +#include "Image.h" // QQuickImagePrivate is not exported, so we // we can't derive here -class QskImage::PrivateData +class Image::PrivateData { public: PrivateData(): @@ -26,33 +26,33 @@ public: bool dirtyUpdate : 1; }; -QskImage::QskImage( QQuickItem* parent ): +Image::Image( QQuickItem* parent ): Inherited( parent ), m_data( new PrivateData() ) { } -QskImage::~QskImage() +Image::~Image() { } -void QskImage::setVisible( bool on ) +void Image::setVisible( bool on ) { // QQuickItem::setVisible is no slot Inherited::setVisible( on ); } -void QskImage::show() +void Image::show() { Inherited::setVisible( true ); } -void QskImage::hide() +void Image::hide() { Inherited::setVisible( false ); } -void QskImage::setSourceSizeAdjustment( bool on ) +void Image::setSourceSizeAdjustment( bool on ) { if ( on != m_data->sourceSizeAdjustment ) { @@ -61,12 +61,12 @@ void QskImage::setSourceSizeAdjustment( bool on ) } } -bool QskImage::sourceSizeAdjustment() const +bool Image::sourceSizeAdjustment() const { return m_data->sourceSizeAdjustment; } -void QskImage::setDeferredUpdates( bool on ) +void Image::setDeferredUpdates( bool on ) { if ( on != m_data->deferredUpdates ) { @@ -85,12 +85,12 @@ void QskImage::setDeferredUpdates( bool on ) } } -bool QskImage::deferredUpdates() const +bool Image::deferredUpdates() const { return m_data->deferredUpdates; } -void QskImage::componentComplete() +void Image::componentComplete() { if ( m_data->deferredUpdates && m_data->sourceSizeAdjustment ) { @@ -106,7 +106,7 @@ void QskImage::componentComplete() } } -void QskImage::itemChange( QQuickItem::ItemChange change, +void Image::itemChange( QQuickItem::ItemChange change, const QQuickItem::ItemChangeData& value ) { Inherited::itemChange( change, value ); @@ -124,7 +124,7 @@ void QskImage::itemChange( QQuickItem::ItemChange change, } } -void QskImage::geometryChanged( const QRectF& newGeometry, +void Image::geometryChanged( const QRectF& newGeometry, const QRectF& oldGeometry ) { Inherited::geometryChanged( newGeometry, oldGeometry ); @@ -146,7 +146,7 @@ void QskImage::geometryChanged( const QRectF& newGeometry, } } -void QskImage::updatePolish() +void Image::updatePolish() { if ( m_data->deferredUpdates ) { @@ -165,7 +165,7 @@ void QskImage::updatePolish() Inherited::updatePolish(); } -QSGNode* QskImage::updatePaintNode( QSGNode* oldNode, UpdatePaintNodeData* data ) +QSGNode* Image::updatePaintNode( QSGNode* oldNode, UpdatePaintNodeData* data ) { if ( m_data->deferredUpdates ) { @@ -181,30 +181,30 @@ QSGNode* QskImage::updatePaintNode( QSGNode* oldNode, UpdatePaintNodeData* data return Inherited::updatePaintNode( oldNode, data ); } -bool QskImage::hasHeightForWidth() const +bool Image::hasHeightForWidth() const { // TODO return false; } -qreal QskImage::heightForWidth( qreal width ) const +qreal Image::heightForWidth( qreal width ) const { // TODO Q_UNUSED( width ) return -1.0; } -bool QskImage::hasWidthForHeight() const +bool Image::hasWidthForHeight() const { // TODO return false; } -qreal QskImage::widthForHeight( qreal height ) const +qreal Image::widthForHeight( qreal height ) const { // TODO Q_UNUSED( height ) return -1.0; } -#include "moc_QskImage.cpp" +#include "moc_Image.cpp" diff --git a/playground/images/Image.h b/playground/images/Image.h index 04072dab..443946a2 100644 --- a/playground/images/Image.h +++ b/playground/images/Image.h @@ -3,8 +3,8 @@ * This file may be used under the terms of the QSkinny License, Version 1.0 *****************************************************************************/ -#ifndef QSK_IMAGE_H -#define QSK_IMAGE_H +#ifndef _IMAGE_H +#define _IMAGE_H #include "QskGlobal.h" @@ -21,7 +21,7 @@ #include -class QSK_EXPORT QskImage : public QQuickImage +class Image : public QQuickImage { Q_OBJECT @@ -34,8 +34,8 @@ class QSK_EXPORT QskImage : public QQuickImage using Inherited = QQuickImage; public: - QskImage( QQuickItem* parent = nullptr ); - virtual ~QskImage(); + Image( QQuickItem* parent = nullptr ); + virtual ~Image(); void setSourceSizeAdjustment( bool ); bool sourceSizeAdjustment() const; diff --git a/playground/images/images.pro b/playground/images/images.pro index b746978b..c2b0b8bf 100644 --- a/playground/images/images.pro +++ b/playground/images/images.pro @@ -1,9 +1,13 @@ -include( $${PWD}/../examples.pri ) +include( $${PWD}/../playground.pri ) TARGET = images RESOURCES += \ images.qrc +HEADERS += \ + Image.h + SOURCES += \ + Image.cpp \ main.cpp diff --git a/playground/images/images.qml b/playground/images/images.qml index cd09336f..1ee7fb4f 100644 --- a/playground/images/images.qml +++ b/playground/images/images.qml @@ -1,5 +1,6 @@ import QtQuick 2.0 import Skinny 1.0 as Qsk +import Images 1.0 import "qrc:/qml" Qsk.Window @@ -34,7 +35,7 @@ Qsk.Window // to width/height, but Qsk.Image avoids several pointless // image updates for this use case - Qsk.Image + Image { source: modelData diff --git a/playground/images/main.cpp b/playground/images/main.cpp index 3b77cef7..584dbf29 100644 --- a/playground/images/main.cpp +++ b/playground/images/main.cpp @@ -3,6 +3,8 @@ * This file may be used under the terms of the 3-clause BSD License *****************************************************************************/ +#include "Image.h" + #include #include @@ -22,6 +24,8 @@ int main( int argc, char* argv[] ) const char providerId[] = "shapes"; QskModule::registerTypes(); + qmlRegisterType< Image >( "Images", 1, 0, "Image" ); + Qsk::addGraphicProvider( providerId, new SkinnyShapeProvider() ); QGuiApplication app( argc, argv ); diff --git a/playground/lineedit/LineEdit.cpp b/playground/lineedit/LineEdit.cpp index 9ca13d31..b170b909 100644 --- a/playground/lineedit/LineEdit.cpp +++ b/playground/lineedit/LineEdit.cpp @@ -3,7 +3,8 @@ * This file may be used under the terms of the QSkinny License, Version 1.0 *****************************************************************************/ -#include "QskLineEdit.h" +#include "LineEdit.h" +#include "LineEditSkinlet.h" #include @@ -24,12 +25,12 @@ QSK_QT_PRIVATE_END #define Q_P(ClassName) \ auto p = reinterpret_cast< ClassName* >( this ) -QSK_SUBCONTROL( QskLineEdit, Panel ) -QSK_SUBCONTROL( QskLineEdit, Text ) +QSK_SUBCONTROL( LineEdit, Panel ) +QSK_SUBCONTROL( LineEdit, Text ) -class QskLineEditPrivate : public QQuickTextInputPrivate +class LineEditPrivate : public QQuickTextInputPrivate { - Q_DECLARE_PUBLIC(QskLineEdit) + Q_DECLARE_PUBLIC(LineEdit) using Inherited = QQuickTextInputPrivate; public: @@ -43,20 +44,23 @@ public: } }; -QskLineEdit::QskLineEdit( QQuickItem* parent ): - QskControl( *( new QskLineEditPrivate ), parent ) +LineEdit::LineEdit( QQuickItem* parent ): + QskControl( *( new LineEditPrivate ), parent ) { - Q_D( QskLineEdit ); + Q_D( LineEdit ); d->init(); setActiveFocusOnTab( true ); +#if 1 + setSkinlet( new LineEditSkinlet() ); +#endif } -QskLineEdit::~QskLineEdit() +LineEdit::~LineEdit() { } -void QskLineEdit::updateLayout() +void LineEdit::updateLayout() { Inherited::updateLayout(); @@ -71,62 +75,62 @@ void QskLineEdit::updateLayout() // Begin proxy methods -void QskLineEdit::componentComplete() +void LineEdit::componentComplete() { Q_P( QQuickTextInput ); p->QQuickTextInput::componentComplete(); } -void QskLineEdit::positionAt( QQmlV4Function* args ) const +void LineEdit::positionAt( QQmlV4Function* args ) const { Q_P( const QQuickTextInput ); p->QQuickTextInput::positionAt( args ); } -QRectF QskLineEdit::positionToRectangle( int pos ) const +QRectF LineEdit::positionToRectangle( int pos ) const { Q_P( const QQuickTextInput ); return p->QQuickTextInput::positionToRectangle( pos ); } -void QskLineEdit::moveCursorSelection( int pos ) +void LineEdit::moveCursorSelection( int pos ) { Q_P( QQuickTextInput ); p->QQuickTextInput::moveCursorSelection( pos ); } -void QskLineEdit::moveCursorSelection( int pos, QskLineEdit::SelectionMode mode ) +void LineEdit::moveCursorSelection( int pos, LineEdit::SelectionMode mode ) { Q_P( QQuickTextInput ); p->QQuickTextInput::moveCursorSelection( pos, static_cast< QQuickTextInput::SelectionMode >( mode ) ); } -QskLineEdit::RenderType QskLineEdit::renderType() const +LineEdit::RenderType LineEdit::renderType() const { Q_P( const QQuickTextInput ); - return static_cast< QskLineEdit::RenderType >( p->QQuickTextInput::renderType() ); + return static_cast< LineEdit::RenderType >( p->QQuickTextInput::renderType() ); } -void QskLineEdit::setRenderType( RenderType renderType ) +void LineEdit::setRenderType( RenderType renderType ) { Q_P( QQuickTextInput ); p->QQuickTextInput::setRenderType( static_cast< QQuickTextInput::RenderType >( renderType ) ); } -QString QskLineEdit::text() const +QString LineEdit::text() const { Q_P( const QQuickTextInput ); return p->QQuickTextInput::text(); } -void QskLineEdit::setText( const QString& text ) +void LineEdit::setText( const QString& text ) { Q_P( QQuickTextInput ); p->QQuickTextInput::setText( text ); } -int QskLineEdit::length() const +int LineEdit::length() const { Q_P( const QQuickTextInput ); return p->QQuickTextInput::length(); @@ -134,97 +138,97 @@ int QskLineEdit::length() const #if 0 -QFont QskLineEdit::font() const +QFont LineEdit::font() const { Q_P( const QQuickTextInput ); return p->QQuickTextInput::font(); } -void QskLineEdit::setFont( const QFont& font ) +void LineEdit::setFont( const QFont& font ) { Q_P( QQuickTextInput ); p->QQuickTextInput::setFont( font ); } -QColor QskLineEdit::color() const +QColor LineEdit::color() const { Q_P( const QQuickTextInput ); return p->QQuickTextInput::color(); } -void QskLineEdit::setColor( const QColor& color ) +void LineEdit::setColor( const QColor& color ) { Q_P( QQuickTextInput ); p->QQuickTextInput::setColor( color ); } -QColor QskLineEdit::selectionColor() const +QColor LineEdit::selectionColor() const { Q_P( const QQuickTextInput ); return p->QQuickTextInput::selectionColor(); } -void QskLineEdit::setSelectionColor( const QColor& color ) +void LineEdit::setSelectionColor( const QColor& color ) { Q_P( QQuickTextInput ); p->QQuickTextInput::setSelectionColor( color ); } -QColor QskLineEdit::selectedTextColor() const +QColor LineEdit::selectedTextColor() const { Q_P( const QQuickTextInput ); return p->QQuickTextInput::selectedTextColor(); } -void QskLineEdit::setSelectedTextColor( const QColor& color ) +void LineEdit::setSelectedTextColor( const QColor& color ) { Q_P( QQuickTextInput ); p->QQuickTextInput::setSelectedTextColor( color ); } -QskLineEdit::HAlignment QskLineEdit::hAlign() const +LineEdit::HAlignment LineEdit::hAlign() const { Q_P( const QQuickTextInput ); return static_cast< HAlignment >( p->QQuickTextInput::hAlign() ); } -void QskLineEdit::setHAlign( HAlignment alignment ) +void LineEdit::setHAlign( HAlignment alignment ) { Q_P( QQuickTextInput ); p->QQuickTextInput::setHAlign( static_cast< QQuickTextInput::HAlignment >( alignment ) ); } -void QskLineEdit::resetHAlign() +void LineEdit::resetHAlign() { Q_P( QQuickTextInput ); p->QQuickTextInput::resetHAlign(); } -QskLineEdit::HAlignment QskLineEdit::effectiveHAlign() const +LineEdit::HAlignment LineEdit::effectiveHAlign() const { Q_P( const QQuickTextInput ); return static_cast< HAlignment >( p->QQuickTextInput::effectiveHAlign() ); } -QskLineEdit::VAlignment QskLineEdit::vAlign() const +LineEdit::VAlignment LineEdit::vAlign() const { Q_P( const QQuickTextInput ); return static_cast< VAlignment >( p->QQuickTextInput::vAlign() ); } -void QskLineEdit::setVAlign( QskLineEdit::VAlignment alignment ) +void LineEdit::setVAlign( LineEdit::VAlignment alignment ) { Q_P( QQuickTextInput ); p->QQuickTextInput::setVAlign( static_cast< QQuickTextInput::VAlignment >( alignment ) ); } -QskLineEdit::WrapMode QskLineEdit::wrapMode() const +LineEdit::WrapMode LineEdit::wrapMode() const { Q_P( const QQuickTextInput ); return static_cast< WrapMode >( p->QQuickTextInput::wrapMode() ); } -void QskLineEdit::setWrapMode( QskLineEdit::WrapMode wrapMode ) +void LineEdit::setWrapMode( LineEdit::WrapMode wrapMode ) { Q_P( QQuickTextInput ); p->QQuickTextInput::setWrapMode( static_cast< QQuickTextInput::WrapMode >( wrapMode ) ); @@ -232,145 +236,145 @@ void QskLineEdit::setWrapMode( QskLineEdit::WrapMode wrapMode ) #endif -bool QskLineEdit::isReadOnly() const +bool LineEdit::isReadOnly() const { Q_P( const QQuickTextInput ); return p->QQuickTextInput::isReadOnly(); } -void QskLineEdit::setReadOnly( bool readOnly ) +void LineEdit::setReadOnly( bool readOnly ) { Q_P( QQuickTextInput ); p->QQuickTextInput::setReadOnly( readOnly ); } -bool QskLineEdit::isCursorVisible() const +bool LineEdit::isCursorVisible() const { Q_P( const QQuickTextInput ); return p->QQuickTextInput::isCursorVisible(); } -void QskLineEdit::setCursorVisible( bool cursorVisible ) +void LineEdit::setCursorVisible( bool cursorVisible ) { Q_P( QQuickTextInput ); p->QQuickTextInput::setCursorVisible( cursorVisible ); } -int QskLineEdit::cursorPosition() const +int LineEdit::cursorPosition() const { Q_P( const QQuickTextInput ); return p->QQuickTextInput::cursorPosition(); } -void QskLineEdit::setCursorPosition( int cursorPosition ) +void LineEdit::setCursorPosition( int cursorPosition ) { Q_P( QQuickTextInput ); p->QQuickTextInput::setCursorPosition( cursorPosition ); } -QRectF QskLineEdit::cursorRectangle() const +QRectF LineEdit::cursorRectangle() const { Q_P( const QQuickTextInput ); return p->QQuickTextInput::cursorRectangle(); } -int QskLineEdit::selectionStart() const +int LineEdit::selectionStart() const { Q_P( const QQuickTextInput ); return p->QQuickTextInput::selectionStart(); } -int QskLineEdit::selectionEnd() const +int LineEdit::selectionEnd() const { Q_P( const QQuickTextInput ); return p->QQuickTextInput::selectionEnd(); } -QString QskLineEdit::selectedText() const +QString LineEdit::selectedText() const { Q_P( const QQuickTextInput ); return p->QQuickTextInput::selectedText(); } -int QskLineEdit::maxLength() const +int LineEdit::maxLength() const { Q_P( const QQuickTextInput ); return p->QQuickTextInput::maxLength(); } -void QskLineEdit::setMaxLength( int maxLength ) +void LineEdit::setMaxLength( int maxLength ) { Q_P( QQuickTextInput ); p->QQuickTextInput::setMaxLength( maxLength ); } -QValidator* QskLineEdit::validator() const +QValidator* LineEdit::validator() const { Q_P( const QQuickTextInput ); return p->QQuickTextInput::validator(); } -void QskLineEdit::setValidator( QValidator* validator ) +void LineEdit::setValidator( QValidator* validator ) { Q_P( QQuickTextInput ); p->QQuickTextInput::setValidator( validator ); } -QString QskLineEdit::inputMask() const +QString LineEdit::inputMask() const { Q_P( const QQuickTextInput ); return p->QQuickTextInput::inputMask(); } -void QskLineEdit::setInputMask( const QString& inputMask ) +void LineEdit::setInputMask( const QString& inputMask ) { Q_P( QQuickTextInput ); p->QQuickTextInput::setInputMask( inputMask ); } -QskLineEdit::EchoMode QskLineEdit::echoMode() const +LineEdit::EchoMode LineEdit::echoMode() const { Q_P( const QQuickTextInput ); return static_cast< EchoMode >( p->QQuickTextInput::echoMode() ); } -void QskLineEdit::setEchoMode( QskLineEdit::EchoMode echoMode ) +void LineEdit::setEchoMode( LineEdit::EchoMode echoMode ) { Q_P( QQuickTextInput ); p->QQuickTextInput::setEchoMode( static_cast< QQuickTextInput::EchoMode >( echoMode ) ); } -QString QskLineEdit::passwordCharacter() const +QString LineEdit::passwordCharacter() const { Q_P( const QQuickTextInput ); return p->QQuickTextInput::passwordCharacter(); } -void QskLineEdit::setPasswordCharacter( const QString& passordCharacter ) +void LineEdit::setPasswordCharacter( const QString& passordCharacter ) { Q_P( QQuickTextInput ); p->QQuickTextInput::setPasswordCharacter( passordCharacter ); } -int QskLineEdit::passwordMaskDelay() const +int LineEdit::passwordMaskDelay() const { Q_P( const QQuickTextInput ); return p->QQuickTextInput::passwordMaskDelay(); } -void QskLineEdit::setPasswordMaskDelay( int delay ) +void LineEdit::setPasswordMaskDelay( int delay ) { Q_P( QQuickTextInput ); p->QQuickTextInput::setPasswordMaskDelay( delay ); } -void QskLineEdit::resetPasswordMaskDelay() +void LineEdit::resetPasswordMaskDelay() { Q_P( QQuickTextInput ); p->QQuickTextInput::resetPasswordMaskDelay(); } -QString QskLineEdit::displayText() const +QString LineEdit::displayText() const { Q_P( const QQuickTextInput ); return p->QQuickTextInput::displayText(); @@ -378,13 +382,13 @@ QString QskLineEdit::displayText() const #if 0 -QQmlComponent* QskLineEdit::cursorDelegate() const +QQmlComponent* LineEdit::cursorDelegate() const { Q_P( const QQuickTextInput ); return p->QQuickTextInput::cursorDelegate(); } -void QskLineEdit::setCursorDelegate( QQmlComponent* component ) +void LineEdit::setCursorDelegate( QQmlComponent* component ) { Q_P( QQuickTextInput ); p->QQuickTextInput::setCursorDelegate( component ); @@ -392,76 +396,76 @@ void QskLineEdit::setCursorDelegate( QQmlComponent* component ) #endif -bool QskLineEdit::focusOnPress() const +bool LineEdit::focusOnPress() const { Q_P( const QQuickTextInput ); return p->QQuickTextInput::focusOnPress(); } -void QskLineEdit::setFocusOnPress( bool focusOnPress ) +void LineEdit::setFocusOnPress( bool focusOnPress ) { Q_P( QQuickTextInput ); p->QQuickTextInput::setFocusOnPress( focusOnPress ); } -bool QskLineEdit::autoScroll() const +bool LineEdit::autoScroll() const { Q_P( const QQuickTextInput ); return p->QQuickTextInput::autoScroll(); } -void QskLineEdit::setAutoScroll( bool autoScroll ) +void LineEdit::setAutoScroll( bool autoScroll ) { Q_P( QQuickTextInput ); p->QQuickTextInput::setAutoScroll( autoScroll ); } -bool QskLineEdit::selectByMouse() const +bool LineEdit::selectByMouse() const { Q_P( const QQuickTextInput ); return p->QQuickTextInput::selectByMouse(); } -void QskLineEdit::setSelectByMouse( bool selectByMouse ) +void LineEdit::setSelectByMouse( bool selectByMouse ) { Q_P( QQuickTextInput ); p->QQuickTextInput::setSelectByMouse( selectByMouse ); } -QskLineEdit::SelectionMode QskLineEdit::mouseSelectionMode() const +LineEdit::SelectionMode LineEdit::mouseSelectionMode() const { Q_P( const QQuickTextInput ); return static_cast< SelectionMode >( p->QQuickTextInput::mouseSelectionMode() ); } -void QskLineEdit::setMouseSelectionMode( SelectionMode selectionMode ) +void LineEdit::setMouseSelectionMode( SelectionMode selectionMode ) { Q_P( QQuickTextInput ); p->QQuickTextInput::setMouseSelectionMode( static_cast< QQuickTextInput::SelectionMode >( selectionMode ) ); } -bool QskLineEdit::persistentSelection() const +bool LineEdit::persistentSelection() const { Q_P( const QQuickTextInput ); return p->QQuickTextInput::persistentSelection(); } -void QskLineEdit::setPersistentSelection( bool persistentSelection ) +void LineEdit::setPersistentSelection( bool persistentSelection ) { Q_P( QQuickTextInput ); p->QQuickTextInput::setPersistentSelection( persistentSelection ); } -bool QskLineEdit::hasAcceptableInput() const +bool LineEdit::hasAcceptableInput() const { Q_P( const QQuickTextInput ); return p->QQuickTextInput::hasAcceptableInput(); } -QVariant QskLineEdit::inputMethodQuery( Qt::InputMethodQuery inputMethodQuery ) const +QVariant LineEdit::inputMethodQuery( Qt::InputMethodQuery inputMethodQuery ) const { - Q_D( const QskLineEdit ); + Q_D( const LineEdit ); Q_P( const QQuickTextInput ); auto value = p->QQuickTextInput::inputMethodQuery( inputMethodQuery ); if ( inputMethodQuery == Qt::ImPreferredLanguage && value.isNull() ) @@ -469,75 +473,75 @@ QVariant QskLineEdit::inputMethodQuery( Qt::InputMethodQuery inputMethodQuery ) return value; } -QVariant QskLineEdit::inputMethodQuery( +QVariant LineEdit::inputMethodQuery( Qt::InputMethodQuery inputMethodQuery, QVariant argument ) const { Q_P( const QQuickTextInput ); return p->QQuickTextInput::inputMethodQuery( inputMethodQuery, argument ); } -QRectF QskLineEdit::boundingRect() const +QRectF LineEdit::boundingRect() const { // Special case: we use the control definition of boundingRect instead of // QQuickLineEdit's, because boundingRect is used in layout and rendering return Inherited::boundingRect(); } -QRectF QskLineEdit::clipRect() const +QRectF LineEdit::clipRect() const { Q_P( const QQuickTextInput ); return p->QQuickTextInput::clipRect(); } -bool QskLineEdit::canPaste() const +bool LineEdit::canPaste() const { Q_P( const QQuickTextInput ); return p->QQuickTextInput::canPaste(); } -bool QskLineEdit::canUndo() const +bool LineEdit::canUndo() const { Q_P( const QQuickTextInput ); return p->QQuickTextInput::canUndo(); } -bool QskLineEdit::canRedo() const +bool LineEdit::canRedo() const { Q_P( const QQuickTextInput ); return p->QQuickTextInput::canRedo(); } -bool QskLineEdit::isInputMethodComposing() const +bool LineEdit::isInputMethodComposing() const { Q_P( const QQuickTextInput ); return p->QQuickTextInput::isInputMethodComposing(); } -Qt::InputMethodHints QskLineEdit::inputMethodHints() const +Qt::InputMethodHints LineEdit::inputMethodHints() const { Q_P( const QQuickTextInput ); return p->QQuickTextInput::inputMethodHints(); } -void QskLineEdit::setInputMethodHints( Qt::InputMethodHints inputMethodHints ) +void LineEdit::setInputMethodHints( Qt::InputMethodHints inputMethodHints ) { Q_P( QQuickTextInput ); p->QQuickTextInput::setInputMethodHints( inputMethodHints ); } -QString QskLineEdit::getText( int start, int end ) const +QString LineEdit::getText( int start, int end ) const { Q_P( const QQuickTextInput ); return p->QQuickTextInput::getText( start, end ); } -qreal QskLineEdit::contentWidth() const +qreal LineEdit::contentWidth() const { Q_P( const QQuickTextInput ); return p->QQuickTextInput::contentWidth(); } -qreal QskLineEdit::contentHeight() const +qreal LineEdit::contentHeight() const { Q_P( const QQuickTextInput ); return p->QQuickTextInput::contentHeight(); @@ -545,91 +549,91 @@ qreal QskLineEdit::contentHeight() const #if 0 -qreal QskLineEdit::padding() const +qreal LineEdit::padding() const { Q_P( const QQuickTextInput ); return p->QQuickTextInput::padding(); } -void QskLineEdit::setPadding( qreal padding ) +void LineEdit::setPadding( qreal padding ) { Q_P( QQuickTextInput ); p->QQuickTextInput::setPadding( padding ); } -void QskLineEdit::resetPadding() +void LineEdit::resetPadding() { Q_P( QQuickTextInput ); p->QQuickTextInput::resetPadding(); } -qreal QskLineEdit::topPadding() const +qreal LineEdit::topPadding() const { Q_P( const QQuickTextInput ); return p->QQuickTextInput::padding(); } -void QskLineEdit::setTopPadding( qreal topPadding ) +void LineEdit::setTopPadding( qreal topPadding ) { Q_P( QQuickTextInput ); p->QQuickTextInput::setTopPadding( topPadding ); } -void QskLineEdit::resetTopPadding() +void LineEdit::resetTopPadding() { Q_P( QQuickTextInput ); p->QQuickTextInput::resetTopPadding(); } -qreal QskLineEdit::leftPadding() const +qreal LineEdit::leftPadding() const { Q_P( const QQuickTextInput ); return p->QQuickTextInput::leftPadding(); } -void QskLineEdit::setLeftPadding( qreal leftPadding ) +void LineEdit::setLeftPadding( qreal leftPadding ) { Q_P( QQuickTextInput ); p->QQuickTextInput::setLeftPadding( leftPadding ); } -void QskLineEdit::resetLeftPadding() +void LineEdit::resetLeftPadding() { Q_P( QQuickTextInput ); p->QQuickTextInput::resetLeftPadding(); } -qreal QskLineEdit::rightPadding() const +qreal LineEdit::rightPadding() const { Q_P( const QQuickTextInput ); return p->QQuickTextInput::leftPadding(); } -void QskLineEdit::setRightPadding( qreal rightPadding ) +void LineEdit::setRightPadding( qreal rightPadding ) { Q_P( QQuickTextInput ); p->QQuickTextInput::setRightPadding( rightPadding ); } -void QskLineEdit::resetRightPadding() +void LineEdit::resetRightPadding() { Q_P( QQuickTextInput ); p->QQuickTextInput::resetRightPadding(); } -qreal QskLineEdit::bottomPadding() const +qreal LineEdit::bottomPadding() const { Q_P( const QQuickTextInput ); return p->QQuickTextInput::leftPadding(); } -void QskLineEdit::setBottomPadding( qreal bottomPadding ) +void LineEdit::setBottomPadding( qreal bottomPadding ) { Q_P( QQuickTextInput ); p->QQuickTextInput::setBottomPadding( bottomPadding ); } -void QskLineEdit::resetBottomPadding() +void LineEdit::resetBottomPadding() { Q_P( QQuickTextInput ); p->QQuickTextInput::resetBottomPadding(); @@ -637,103 +641,103 @@ void QskLineEdit::resetBottomPadding() #endif -void QskLineEdit::geometryChanged( const QRectF& newGeometry, const QRectF& oldGeometry ) +void LineEdit::geometryChanged( const QRectF& newGeometry, const QRectF& oldGeometry ) { Q_P( QQuickTextInput ); p->QQuickTextInput::geometryChanged( newGeometry, oldGeometry ); } -void QskLineEdit::mousePressEvent( QMouseEvent* event ) +void LineEdit::mousePressEvent( QMouseEvent* event ) { Q_P( QQuickTextInput ); p->QQuickTextInput::mousePressEvent( event ); } -void QskLineEdit::mouseMoveEvent( QMouseEvent* event ) +void LineEdit::mouseMoveEvent( QMouseEvent* event ) { Q_P( QQuickTextInput ); p->QQuickTextInput::mouseMoveEvent( event ); } -void QskLineEdit::mouseReleaseEvent( QMouseEvent* event ) +void LineEdit::mouseReleaseEvent( QMouseEvent* event ) { Q_P( QQuickTextInput ); p->QQuickTextInput::mouseReleaseEvent( event ); } -void QskLineEdit::mouseDoubleClickEvent( QMouseEvent* event ) +void LineEdit::mouseDoubleClickEvent( QMouseEvent* event ) { Q_P( QQuickTextInput ); p->QQuickTextInput::mouseDoubleClickEvent( event ); } -void QskLineEdit::keyPressEvent( QKeyEvent* event ) +void LineEdit::keyPressEvent( QKeyEvent* event ) { Q_P( QQuickTextInput ); p->QQuickTextInput::keyPressEvent( event ); } -void QskLineEdit::inputMethodEvent( QInputMethodEvent* event ) +void LineEdit::inputMethodEvent( QInputMethodEvent* event ) { Q_P( QQuickTextInput ); p->QQuickTextInput::inputMethodEvent( event ); } -void QskLineEdit::mouseUngrabEvent() +void LineEdit::mouseUngrabEvent() { Q_P( QQuickTextInput ); p->QQuickTextInput::mouseUngrabEvent(); } -bool QskLineEdit::event( QEvent* event ) +bool LineEdit::event( QEvent* event ) { Q_P( QQuickTextInput ); return p->QQuickTextInput::event( event ); } -void QskLineEdit::focusOutEvent( QFocusEvent* event ) +void LineEdit::focusOutEvent( QFocusEvent* event ) { Q_P( QQuickTextInput ); p->QQuickTextInput::focusOutEvent( event ); } -void QskLineEdit::focusInEvent( QFocusEvent* event ) +void LineEdit::focusInEvent( QFocusEvent* event ) { Q_P( QQuickTextInput ); p->QQuickTextInput::focusInEvent( event ); } -void QskLineEdit::timerEvent( QTimerEvent* event ) +void LineEdit::timerEvent( QTimerEvent* event ) { Q_P( QQuickTextInput ); p->QQuickTextInput::timerEvent( event ); } -void QskLineEdit::selectAll() +void LineEdit::selectAll() { Q_P( QQuickTextInput ); p->QQuickTextInput::selectAll(); } -void QskLineEdit::selectWord() +void LineEdit::selectWord() { Q_P( QQuickTextInput ); p->QQuickTextInput::selectWord(); } -void QskLineEdit::select( int start, int end ) +void LineEdit::select( int start, int end ) { Q_P( QQuickTextInput ); p->QQuickTextInput::select( start, end ); } -void QskLineEdit::deselect() +void LineEdit::deselect() { Q_P( QQuickTextInput ); p->QQuickTextInput::deselect(); } -bool QskLineEdit::isRightToLeft( int start, int end ) +bool LineEdit::isRightToLeft( int start, int end ) { Q_P( QQuickTextInput ); return p->QQuickTextInput::isRightToLeft( start, end ); @@ -741,19 +745,19 @@ bool QskLineEdit::isRightToLeft( int start, int end ) #ifndef QT_NO_CLIPBOARD -void QskLineEdit::cut() +void LineEdit::cut() { Q_P( QQuickTextInput ); p->QQuickTextInput::cut(); } -void QskLineEdit::copy() +void LineEdit::copy() { Q_P( QQuickTextInput ); p->QQuickTextInput::copy(); } -void QskLineEdit::paste() +void LineEdit::paste() { Q_P( QQuickTextInput ); p->QQuickTextInput::paste(); @@ -761,74 +765,74 @@ void QskLineEdit::paste() #endif // QT_NO_CLIPBOARD -void QskLineEdit::undo() +void LineEdit::undo() { Q_P( QQuickTextInput ); p->QQuickTextInput::undo(); } -void QskLineEdit::redo() +void LineEdit::redo() { Q_P( QQuickTextInput ); p->QQuickTextInput::redo(); } -void QskLineEdit::insert( int position, const QString& text ) +void LineEdit::insert( int position, const QString& text ) { Q_P( QQuickTextInput ); p->QQuickTextInput::insert( position, text ); } -void QskLineEdit::remove( int start, int end ) +void LineEdit::remove( int start, int end ) { Q_P( QQuickTextInput ); p->QQuickTextInput::remove( start, end ); } -void QskLineEdit::ensureVisible( int position ) +void LineEdit::ensureVisible( int position ) { Q_P( QQuickTextInput ); p->QQuickTextInput::ensureVisible( position ); } -void QskLineEdit::selectionChanged() +void LineEdit::selectionChanged() { Q_P( QQuickTextInput ); p->QQuickTextInput::selectionChanged(); } -void QskLineEdit::createCursor() +void LineEdit::createCursor() { Q_P( QQuickTextInput ); p->QQuickTextInput::createCursor(); } -void QskLineEdit::updateCursorRectangle( bool scroll ) +void LineEdit::updateCursorRectangle( bool scroll ) { Q_P( QQuickTextInput ); p->QQuickTextInput::updateCursorRectangle( scroll ); } -void QskLineEdit::q_canPasteChanged() +void LineEdit::q_canPasteChanged() { Q_P( QQuickTextInput ); p->QQuickTextInput::q_canPasteChanged(); } -void QskLineEdit::q_updateAlignment() +void LineEdit::q_updateAlignment() { Q_P( QQuickTextInput ); p->QQuickTextInput::q_updateAlignment(); } -void QskLineEdit::triggerPreprocess() +void LineEdit::triggerPreprocess() { Q_P( QQuickTextInput ); p->QQuickTextInput::triggerPreprocess(); } #ifndef QT_NO_VALIDATOR -void QskLineEdit::q_validatorChanged() +void LineEdit::q_validatorChanged() { Q_P( QQuickTextInput ); p->QQuickTextInput::q_validatorChanged(); @@ -837,10 +841,10 @@ void QskLineEdit::q_validatorChanged() // end proxy methods -QSGNode* QskLineEdit::updateTextInputNode( QSGNode* node ) +QSGNode* LineEdit::updateTextInputNode( QSGNode* node ) { Q_P( QQuickTextInput ); return p->QQuickTextInput::updatePaintNode( node, nullptr ); } -#include "moc_QskLineEdit.cpp" +#include "moc_LineEdit.cpp" diff --git a/playground/lineedit/LineEdit.h b/playground/lineedit/LineEdit.h index 6227a7ff..278db030 100644 --- a/playground/lineedit/LineEdit.h +++ b/playground/lineedit/LineEdit.h @@ -3,8 +3,8 @@ * This file may be used under the terms of the QSkinny License, Version 1.0 *****************************************************************************/ -#ifndef QSK_LINE_EDIT_H -#define QSK_LINE_EDIT_H +#ifndef _LINE_EDIT_H +#define _LINE_EDIT_H #include "QskControl.h" @@ -13,8 +13,8 @@ class QValidator; class QQuickTextInput; -class QskLineEditPrivate; -class QSK_EXPORT QskLineEdit : public QskControl +class LineEditPrivate; +class LineEdit : public QskControl { Q_OBJECT @@ -108,8 +108,8 @@ class QSK_EXPORT QskLineEdit : public QskControl public: QSK_SUBCONTROLS( Panel, Text ) - QskLineEdit( QQuickItem* parent = nullptr ); - ~QskLineEdit(); + LineEdit( QQuickItem* parent = nullptr ); + ~LineEdit(); virtual void updateLayout() override; @@ -358,14 +358,14 @@ Q_SIGNALS: void maximumLengthChanged(int maximumLength); void validatorChanged(); void inputMaskChanged(const QString& inputMask); - void echoModeChanged(QskLineEdit::EchoMode echoMode); + void echoModeChanged(LineEdit::EchoMode echoMode); void passwordCharacterChanged(); void passwordMaskDelayChanged(int delay); void displayTextChanged(); void activeFocusOnPressChanged(bool activeFocusOnPress); void autoScrollChanged(bool autoScroll); void selectByMouseChanged(bool selectByMouse); - void mouseSelectionModeChanged(QskLineEdit::SelectionMode mode); + void mouseSelectionModeChanged(LineEdit::SelectionMode mode); void persistentSelectionChanged(); void canPasteChanged(); void canUndoChanged(); @@ -422,9 +422,9 @@ private: QQuickTextInput* p_func() const; - Q_DECLARE_PRIVATE( QskLineEdit ) + Q_DECLARE_PRIVATE( LineEdit ) - friend class QskLineEditSkinlet; + friend class LineEditSkinlet; }; #endif diff --git a/playground/lineedit/LineEditSkinlet.cpp b/playground/lineedit/LineEditSkinlet.cpp index 82015b3d..a5ec7527 100644 --- a/playground/lineedit/LineEditSkinlet.cpp +++ b/playground/lineedit/LineEditSkinlet.cpp @@ -3,23 +3,23 @@ * This file may be used under the terms of the QSkinny License, Version 1.0 *****************************************************************************/ -#include "QskLineEditSkinlet.h" -#include "QskLineEdit.h" +#include "LineEditSkinlet.h" +#include "LineEdit.h" -QskLineEditSkinlet::QskLineEditSkinlet( QskSkin* skin ): +LineEditSkinlet::LineEditSkinlet( QskSkin* skin ): Inherited( skin ) { setNodeRoles( { BackgroundRole, ForegroundRole } ); } -QskLineEditSkinlet::~QskLineEditSkinlet() = default; +LineEditSkinlet::~LineEditSkinlet() = default; -QRectF QskLineEditSkinlet::subControlRect( +QRectF LineEditSkinlet::subControlRect( const QskSkinnable* skinnable, QskAspect::Subcontrol subControl ) const { - const auto lineEdit = static_cast< const QskLineEdit* >( skinnable ); + const auto lineEdit = static_cast< const LineEdit* >( skinnable ); - if ( subControl == QskLineEdit::Panel ) + if ( subControl == LineEdit::Panel ) { return panelRect( lineEdit ); } @@ -27,15 +27,15 @@ QRectF QskLineEditSkinlet::subControlRect( return Inherited::subControlRect( skinnable, subControl ); } -QRectF QskLineEditSkinlet::panelRect( const QskLineEdit* lineEdit ) const +QRectF LineEditSkinlet::panelRect( const LineEdit* lineEdit ) const { return lineEdit->contentsRect(); } -QSGNode* QskLineEditSkinlet::updateSubNode( +QSGNode* LineEditSkinlet::updateSubNode( const QskSkinnable* skinnable, quint8 nodeRole, QSGNode* node ) const { - const auto lineEdit = static_cast< const QskLineEdit* >( skinnable ); + const auto lineEdit = static_cast< const LineEdit* >( skinnable ); switch( nodeRole ) { @@ -48,17 +48,17 @@ QSGNode* QskLineEditSkinlet::updateSubNode( return nullptr; } -QSGNode* QskLineEditSkinlet::updateBackgroundNode( - const QskLineEdit* lineEdit, QSGNode* node ) const +QSGNode* LineEditSkinlet::updateBackgroundNode( + const LineEdit* lineEdit, QSGNode* node ) const { - return updateBoxNode( lineEdit, node, QskLineEdit::Panel ); + return updateBoxNode( lineEdit, node, LineEdit::Panel ); } -QSGNode* QskLineEditSkinlet::updateForegroundNode( - const QskLineEdit* lineEdit, QSGNode* node ) const +QSGNode* LineEditSkinlet::updateForegroundNode( + const LineEdit* lineEdit, QSGNode* node ) const { - auto edit = const_cast< QskLineEdit* >( lineEdit ); + auto edit = const_cast< LineEdit* >( lineEdit ); return edit->updateTextInputNode( node ); } -#include "moc_QskLineEditSkinlet.cpp" +#include "moc_LineEditSkinlet.cpp" diff --git a/playground/lineedit/LineEditSkinlet.h b/playground/lineedit/LineEditSkinlet.h index 20c2b02b..33846011 100644 --- a/playground/lineedit/LineEditSkinlet.h +++ b/playground/lineedit/LineEditSkinlet.h @@ -3,15 +3,15 @@ * This file may be used under the terms of the QSkinny License, Version 1.0 *****************************************************************************/ -#ifndef QSK_LINE_EDIT_SKINLET_H -#define QSK_LINE_EDIT_SKINLET_H +#ifndef _LINE_EDIT_SKINLET_H +#define _LINE_EDIT_SKINLET_H #include "QskGlobal.h" #include "QskSkinlet.h" -class QskLineEdit; +class LineEdit; -class QSK_EXPORT QskLineEditSkinlet : public QskSkinlet +class LineEditSkinlet : public QskSkinlet { Q_GADGET @@ -24,8 +24,8 @@ public: ForegroundRole }; - Q_INVOKABLE QskLineEditSkinlet( QskSkin* = nullptr ); - virtual ~QskLineEditSkinlet(); + Q_INVOKABLE LineEditSkinlet( QskSkin* = nullptr ); + virtual ~LineEditSkinlet(); virtual QRectF subControlRect( const QskSkinnable*, QskAspect::Subcontrol ) const override; @@ -35,10 +35,10 @@ protected: quint8, QSGNode* ) const override; private: - QRectF panelRect( const QskLineEdit* ) const; + QRectF panelRect( const LineEdit* ) const; - QSGNode* updateBackgroundNode( const QskLineEdit*, QSGNode* ) const; - QSGNode* updateForegroundNode( const QskLineEdit*, QSGNode* ) const; + QSGNode* updateBackgroundNode( const LineEdit*, QSGNode* ) const; + QSGNode* updateForegroundNode( const LineEdit*, QSGNode* ) const; }; #endif diff --git a/playground/lineedit/lineedit.pro b/playground/lineedit/lineedit.pro index eeb9c48a..5a59bd47 100644 --- a/playground/lineedit/lineedit.pro +++ b/playground/lineedit/lineedit.pro @@ -1,9 +1,15 @@ -include( $${PWD}/../examples.pri ) +include( $${PWD}/../playground.pri ) TARGET = lineedit RESOURCES += \ qml.qrc +HEADERS += \ + LineEditSkinlet.h \ + LineEdit.h + SOURCES += \ + LineEditSkinlet.cpp \ + LineEdit.cpp \ main.cpp diff --git a/playground/lineedit/lineedit.qml b/playground/lineedit/lineedit.qml index f597d481..11a3ba2a 100644 --- a/playground/lineedit/lineedit.qml +++ b/playground/lineedit/lineedit.qml @@ -1,8 +1,11 @@ -import Skinny 1.0 import QtQuick 2.5 +import Skinny 1.0 +import LineEdit 1.0 Main { + // inputPanel: embeddedInputPanel + Window { id: window diff --git a/playground/lineedit/main.cpp b/playground/lineedit/main.cpp index 95f2a744..30410ae1 100644 --- a/playground/lineedit/main.cpp +++ b/playground/lineedit/main.cpp @@ -3,6 +3,8 @@ * This file may be used under the terms of the 3-clause BSD License *****************************************************************************/ +#include "LineEdit.h" + #include #include @@ -19,11 +21,13 @@ int main( int argc, char* argv[] ) #endif QskModule::registerTypes(); + qmlRegisterType< LineEdit >( "LineEdit", 1, 0, "LineEdit" ); QGuiApplication app( argc, argv ); SkinnyFont::init( &app ); - SkinnyShortcut::enable( SkinnyShortcut::AllShortcuts ); + SkinnyShortcut::enable( SkinnyShortcut::Quit | + SkinnyShortcut::DebugShortcuts ); QQmlApplicationEngine engine( QUrl( QStringLiteral( "qrc:/qml/lineedit.qml" ) ) ); diff --git a/qskinny.pro b/qskinny.pro index 6398c09a..9510ec87 100644 --- a/qskinny.pro +++ b/qskinny.pro @@ -7,7 +7,8 @@ SUBDIRS = \ inputcontext \ tools \ support \ - examples + examples \ + playground OTHER_FILES = \ doc/Doxyfile \ @@ -21,3 +22,4 @@ inputcontext.depends = src tools.depends = src support.depends = src examples.depends = tools support +playground.depends = tools support diff --git a/src/common/QskModule.cpp b/src/common/QskModule.cpp index fe94a082..2bcc29c5 100644 --- a/src/common/QskModule.cpp +++ b/src/common/QskModule.cpp @@ -18,9 +18,7 @@ #include "QskGradient.h" #include "QskGraphicLabel.h" #include "QskGridBox.h" -#include "QskImage.h" #include "QskInputPanel.h" -#include "QskLineEdit.h" #include "QskRgbValue.h" #include "QskScrollView.h" #include "QskScrollArea.h" @@ -252,12 +250,9 @@ void QskModule::registerTypes() QSK_REGISTER( QskLinearBox, "LinearBox" ); QSK_REGISTER( QskStackBox, "StackBox" ); - QSK_REGISTER( QskImage, "Image" ); - QSK_REGISTER( QskControl, "Control" ); QSK_REGISTER( QskGraphicLabel, "GraphicLabel" ); QSK_REGISTER( QskInputPanel, "InputPanel" ); - QSK_REGISTER( QskLineEdit, "LineEdit" ); QSK_REGISTER( QskTextLabel, "TextLabel" ); QSK_REGISTER( QskTabButton, "TabButton" ); QSK_REGISTER( QskTabBar, "TabBar" ); diff --git a/src/controls/QskSkin.cpp b/src/controls/QskSkin.cpp index 1d0ab876..cd14a617 100644 --- a/src/controls/QskSkin.cpp +++ b/src/controls/QskSkin.cpp @@ -41,9 +41,6 @@ QSK_QT_PRIVATE_END #include "QskInputPanel.h" #include "QskInputPanelSkinlet.h" -#include "QskLineEdit.h" -#include "QskLineEditSkinlet.h" - #include "QskListView.h" #include "QskListViewSkinlet.h" @@ -134,7 +131,6 @@ QskSkin::QskSkin( QObject* parent ): declareSkinlet< QskFocusIndicator, QskFocusIndicatorSkinlet >(); declareSkinlet< QskGraphicLabel, QskGraphicLabelSkinlet >(); declareSkinlet< QskInputPanel, QskInputPanelSkinlet >(); - declareSkinlet< QskLineEdit, QskLineEditSkinlet >(); declareSkinlet< QskListView, QskListViewSkinlet >(); declareSkinlet< QskPageIndicator, QskPageIndicatorSkinlet >(); declareSkinlet< QskPopup, QskPopupSkinlet >(); diff --git a/src/skins/squiek/QskSquiekSkin.cpp b/src/skins/squiek/QskSquiekSkin.cpp index 9b02aaac..e58f5a79 100644 --- a/src/skins/squiek/QskSquiekSkin.cpp +++ b/src/skins/squiek/QskSquiekSkin.cpp @@ -19,7 +19,6 @@ #include #include #include -#include #include #include @@ -156,7 +155,6 @@ void QskSquiekSkin::initHints() initTabBarHints(); initTabViewHints(); initInputPanelHints(); - initLineEditHints(); initScrollViewHints(); initListViewHints(); initSubWindowHints(); @@ -479,20 +477,6 @@ void QskSquiekSkin::initInputPanelHints() setColor( Q::KeyGlyph | Q::Disabled, pal.darker200 ); } -void QskSquiekSkin::initLineEditHints() -{ - using namespace QskAspect; - using Q = QskLineEdit; - - const ColorPalette& pal = m_data->palette; - - setMetric( Q::Panel | Radius, 0 ); - setMetric( Q::Panel | Border, 2 ); - setMetric( Q::Panel | Padding, 4 ); - - pal.initBaseBox( this, QskLineEdit::Panel ); -} - void QskSquiekSkin::initScrollViewHints() { using namespace QskAspect; diff --git a/src/skins/squiek/QskSquiekSkin.h b/src/skins/squiek/QskSquiekSkin.h index 5c48c842..24f0c7bc 100644 --- a/src/skins/squiek/QskSquiekSkin.h +++ b/src/skins/squiek/QskSquiekSkin.h @@ -38,7 +38,6 @@ private: void initTabBarHints(); void initTabViewHints(); void initInputPanelHints(); - void initLineEditHints(); void initScrollViewHints(); void initListViewHints(); void initSubWindowHints(); diff --git a/src/src.pro b/src/src.pro index 39079673..cb361882 100644 --- a/src/src.pro +++ b/src/src.pro @@ -132,11 +132,8 @@ HEADERS += \ controls/QskGraphicLabel.h \ controls/QskGraphicLabelSkinlet.h \ controls/QskHintAnimator.h \ - controls/QskImage.h \ controls/QskInputPanel.h \ controls/QskInputPanelSkinlet.h \ - controls/QskLineEdit.h \ - controls/QskLineEditSkinlet.h \ controls/QskListView.h \ controls/QskListViewSkinlet.h \ controls/QskObjectTree.h \ @@ -199,11 +196,8 @@ SOURCES += \ controls/QskGraphicLabel.cpp \ controls/QskGraphicLabelSkinlet.cpp \ controls/QskHintAnimator.cpp \ - controls/QskImage.cpp \ controls/QskInputPanel.cpp \ controls/QskInputPanelSkinlet.cpp \ - controls/QskLineEdit.cpp \ - controls/QskLineEditSkinlet.cpp \ controls/QskListView.cpp \ controls/QskListViewSkinlet.cpp \ controls/QskObjectTree.cpp \