2018-04-03 08:47:21 +00:00
|
|
|
/******************************************************************************
|
2024-01-17 13:31:45 +00:00
|
|
|
* QSkinny - Copyright (C) The authors
|
2023-04-06 07:23:37 +00:00
|
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
2018-04-03 08:47:21 +00:00
|
|
|
*****************************************************************************/
|
|
|
|
|
2024-12-02 11:54:31 +00:00
|
|
|
#ifndef QSK_TEXT_FIELD_H
|
|
|
|
#define QSK_TEXT_FIELD_H
|
2018-04-03 08:47:21 +00:00
|
|
|
|
2024-12-18 11:37:18 +00:00
|
|
|
#include "QskTextInput.h"
|
2018-04-03 08:47:21 +00:00
|
|
|
|
2024-12-18 11:37:18 +00:00
|
|
|
class QSK_EXPORT QskTextField : public QskTextInput
|
2018-04-03 08:47:21 +00:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
2024-12-03 08:32:39 +00:00
|
|
|
Q_PROPERTY( QString placeholderText READ placeholderText
|
|
|
|
WRITE setPlaceholderText NOTIFY placeholderTextChanged )
|
2018-04-18 17:41:46 +00:00
|
|
|
|
2024-12-18 11:37:18 +00:00
|
|
|
using Inherited = QskTextInput;
|
2018-04-03 08:47:21 +00:00
|
|
|
|
2018-08-03 06:15:28 +00:00
|
|
|
public:
|
2025-01-13 16:11:34 +00:00
|
|
|
QSK_SUBCONTROLS( Panel, Placeholder )
|
2018-04-03 08:47:21 +00:00
|
|
|
|
2024-12-02 11:54:31 +00:00
|
|
|
QskTextField( QQuickItem* parent = nullptr );
|
|
|
|
QskTextField( const QString& text, QQuickItem* parent = nullptr );
|
2018-04-03 08:47:21 +00:00
|
|
|
|
2024-12-02 11:54:31 +00:00
|
|
|
~QskTextField() override;
|
2018-04-03 08:47:21 +00:00
|
|
|
|
2024-12-03 08:32:39 +00:00
|
|
|
void setPlaceholderText( const QString& );
|
|
|
|
QString placeholderText() const;
|
2018-04-18 17:41:46 +00:00
|
|
|
|
2018-08-03 06:15:28 +00:00
|
|
|
Q_SIGNALS:
|
2024-12-03 08:32:39 +00:00
|
|
|
void placeholderTextChanged( const QString& );
|
2018-04-18 17:41:46 +00:00
|
|
|
|
2018-08-03 06:15:28 +00:00
|
|
|
private:
|
2018-04-03 08:47:21 +00:00
|
|
|
class PrivateData;
|
|
|
|
std::unique_ptr< PrivateData > m_data;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|