3 #include <widgets/tglabel.h>
10 Q_PROPERTY(QString placeholderText READ placeholderText WRITE setPlaceholderText NOTIFY placeholderTextChanged)
11 Q_PROPERTY(
int cursorPosition READ cursorPosition WRITE setCursorPosition NOTIFY cursorPositionChanged)
13 Q_PROPERTY(
Tg::Color placeholderTextColor READ placeholderTextColor WRITE setPlaceholderTextColor NOTIFY placeholderTextColorChanged)
14 Q_PROPERTY(
Tg::Color placeholderBackgroundColor READ placeholderBackgroundColor WRITE setPlaceholderBackgroundColor NOTIFY placeholderBackgroundColorChanged)
19 LineEdit(
const QString &placeholderText = QString(),
Widget *parent =
nullptr);
22 QString placeholderText()
const;
23 int cursorPosition()
const;
26 Tg::Color placeholderBackgroundColor()
const;
29 void setPlaceholderText(
const QString &placeholderText);
30 void setCursorPosition(
const int cursorPosition);
32 void setPlaceholderTextColor(
const Tg::Color &placeholderTextColor);
33 void setPlaceholderBackgroundColor(
const Tg::Color &placeholderBackgroundColor);
36 void placeholderTextChanged(
const QString &placeholderText)
const;
37 void cursorPositionChanged(
const int cursorPosition)
const;
38 void placeholderTextColorChanged(
const Tg::Color &placeholderTextColor)
const;
39 void placeholderBackgroundColorChanged(
const Tg::Color &placeholderBackgroundColor)
const;
45 void displayPlaceholderText();
48 QString _placeholderText;
50 int _cursorPosition = 0;