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