QSkinny 0.8.0
C++/Qt UI toolkit
Loading...
Searching...
No Matches
QskTextField.cpp
1/******************************************************************************
2 * QSkinny - Copyright (C) The authors
3 * SPDX-License-Identifier: BSD-3-Clause
4 *****************************************************************************/
5
6#include "QskTextField.h"
7
8QSK_SUBCONTROL( QskTextField, Panel )
9QSK_SUBCONTROL( QskTextField, Placeholder )
10
11class QskTextField::PrivateData
12{
13 public:
14 QString placeholderText;
15};
16
17QskTextField::QskTextField( QQuickItem* parent )
18 : Inherited( parent )
19 , m_data( new PrivateData() )
20{
21}
22
23QskTextField::QskTextField( const QString& text, QQuickItem* parent )
24 : QskTextField( parent )
25{
26 setText( text );
27}
28
29QskTextField::~QskTextField()
30{
31}
32
33void QskTextField::setPlaceholderText( const QString& text )
34{
35 if ( m_data->placeholderText != text )
36 {
37 m_data->placeholderText = text;
38 Q_EMIT placeholderTextChanged( text );
39 }
40}
41
42QString QskTextField::placeholderText() const
43{
44 return m_data->placeholderText;
45}
46
47#include "moc_QskTextField.cpp"