1 Star 0 Fork 0

tongy boys/material-pri

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
qtmaterialtextfield.h 2.00 KB
一键复制 编辑 原始数据 按行查看 历史
#ifndef QTMATERIALTEXTFIELD_H
#define QTMATERIALTEXTFIELD_H
#include "qtmaterialwidgets.h"
#include <QLineEdit>
#include <QColor>
class QtMaterialTextFieldPrivate;
class QTMATERIALWIDGETS_EXPORT QtMaterialTextField : public QLineEdit
{
Q_OBJECT
Q_PROPERTY(bool labelVisible READ labelVisible WRITE setLabelVisible)
Q_PROPERTY(qreal labelFontSize READ labelFontSize WRITE setLabelFontSize)
Q_PROPERTY(QString labelText READ labelText WRITE setLabelText)
Q_PROPERTY(bool inputLineVisible READ inputLineVisible WRITE setInputLineVisible)
Q_PROPERTY(QColor textColor READ textColor WRITE setTextColor)
Q_PROPERTY(QColor labelColor READ labelColor WRITE setLabelColor)
Q_PROPERTY(QColor inkColor READ inkColor WRITE setInkColor)
Q_PROPERTY(QColor inputLineColor READ inputLineColor WRITE setInputLineColor)
public:
explicit QtMaterialTextField(QWidget *parent = nullptr);
~QtMaterialTextField() override;
bool labelVisible() const;
void setLabelVisible(bool value);
qreal labelFontSize() const;
void setLabelFontSize(qreal size);
const QString &labelText() const;
void setLabelText(const QString &label);
bool inputLineVisible() const;
void setInputLineVisible(bool value);
bool useThemeColors() const;
void setUseThemeColors(bool value);
QColor textColor() const;
void setTextColor(const QColor &color);
QColor labelColor() const;
void setLabelColor(const QColor &color);
QColor inkColor() const;
void setInkColor(const QColor &color);
QColor inputLineColor() const;
void setInputLineColor(const QColor &color);
protected:
QtMaterialTextField(QtMaterialTextFieldPrivate &d, QWidget *parent = nullptr);
const QScopedPointer<QtMaterialTextFieldPrivate> d_ptr;
private:
Q_DISABLE_COPY(QtMaterialTextField)
Q_DECLARE_PRIVATE(QtMaterialTextField)
// QWidget interface
protected:
bool event(QEvent *event) override;
void paintEvent(QPaintEvent *event) override;
};
#endif // QTMATERIALTEXTFIELD_H
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/tongynj/material-pri.git
git@gitee.com:tongynj/material-pri.git
tongynj
material-pri
material-pri
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385