qskinny/src/controls/QskTextEdit.h

52 lines
1.3 KiB
C
Raw Normal View History

2025-01-13 15:26:59 +00:00
/******************************************************************************
* QSkinny - Copyright (C) The authors
* SPDX-License-Identifier: BSD-3-Clause
*****************************************************************************/
#ifndef QSK_TEXT_EDIT_H
#define QSK_TEXT_EDIT_H
#include "QskAbstractTextInput.h"
2025-01-13 15:26:59 +00:00
#include "QskTextOptions.h"
class QSK_EXPORT QskTextEdit : public QskAbstractTextInput
2025-01-13 15:26:59 +00:00
{
Q_OBJECT
Q_PROPERTY( int lineCount READ lineCount NOTIFY lineCountChanged )
Q_PROPERTY( QskTextOptions::TextFormat textFormat READ textFormat
WRITE setTextFormat NOTIFY textFormatChanged )
Q_PROPERTY( qreal tabStopDistance READ tabStopDistance
WRITE setTabStopDistance NOTIFY tabStopDistanceChanged )
using Inherited = QskAbstractTextInput;
2025-01-13 15:26:59 +00:00
public:
QSK_SUBCONTROLS( TextPanel )
2025-01-13 15:26:59 +00:00
QskTextEdit( QQuickItem* parent = nullptr );
~QskTextEdit() override;
void setTextFormat( QskTextOptions::TextFormat );
QskTextOptions::TextFormat textFormat() const;
int lineCount() const;
int tabStopDistance() const;
void setTabStopDistance( qreal );
Q_SIGNALS:
void lineCountChanged( int );
2025-01-21 14:17:32 +00:00
void textFormatChanged( QskTextOptions::TextFormat );
2025-01-13 15:26:59 +00:00
void tabStopDistanceChanged( qreal );
private:
class PrivateData;
std::unique_ptr< PrivateData > m_data;
};
#endif