1 Star 0 Fork 0

tongy boys/material-pri

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
qtmaterialappbar.h 1.72 KB
一键复制 编辑 原始数据 按行查看 历史
#ifndef QTMATERIALAPPBAR_H
#define QTMATERIALAPPBAR_H
#include "qtmaterialwidgets.h"
#include <QWidget>
#include "lib/qtmaterialtheme.h"
class QtMaterialAppBarPrivate;
class QTMATERIALWIDGETS_EXPORT QtMaterialAppBar : public QWidget
{
Q_OBJECT
Q_PROPERTY(QString title READ title WRITE setTitle)
Q_PROPERTY(Material::NavIconType navIconType READ navIconType WRITE setNavIconType)
Q_PROPERTY(QSize iconSize READ iconSize WRITE setIconSize)
Q_PROPERTY(QColor foregroundColor READ foregroundColor WRITE setForegroundColor)
Q_PROPERTY(QColor backgroundColor READ backgroundColor WRITE setBackgroundColor)
public:
explicit QtMaterialAppBar(const QString &title, QWidget *parent = nullptr);
explicit QtMaterialAppBar(QWidget *parent = nullptr);
~QtMaterialAppBar() override;
const QString &title() const;
void setTitle(const QString &title);
Material::NavIconType navIconType() const;
void setNavIconType(Material::NavIconType navIconType);
const QSize &iconSize() const;
void setIconSize(const QSize &iconSize);
void setIconSize(int w, int h);
bool useThemeColors() const;
void setUseThemeColors(bool value);
QColor foregroundColor() const;
void setForegroundColor(const QColor &color);
QColor backgroundColor() const;
void setBackgroundColor(const QColor &color);
signals:
void navIconClicked();
protected:
const QScopedPointer<QtMaterialAppBarPrivate> d_ptr;
private:
Q_DISABLE_COPY(QtMaterialAppBar)
Q_DECLARE_PRIVATE(QtMaterialAppBar)
// QWidget interface
protected:
bool event(QEvent *event) override;
void paintEvent(QPaintEvent *event) override;
void actionEvent(QActionEvent *event) override;
};
#endif // QTMATERIALAPPBAR_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