qt-material-widgets/components/qtmaterialappbar.h

49 lines
1.1 KiB
C
Raw Normal View History

2017-10-05 11:31:52 +00:00
#ifndef QTMATERIALAPPBAR_H
#define QTMATERIALAPPBAR_H
2017-10-05 14:11:41 +00:00
#include <QtWidgets/QWidget>
2017-10-11 20:16:13 +00:00
#include <QtWidgets/QHBoxLayout>
2017-10-05 14:11:41 +00:00
class QtMaterialAppBarPrivate;
class QtMaterialAppBar : public QWidget
{
Q_OBJECT
Q_PROPERTY(QColor foregroundColor WRITE setForegroundColor READ foregroundColor)
Q_PROPERTY(QColor backgroundColor WRITE setBackgroundColor READ backgroundColor)
public:
explicit QtMaterialAppBar(QWidget *parent = 0);
~QtMaterialAppBar();
QSize sizeHint() const Q_DECL_OVERRIDE;
void setUseThemeColors(bool value);
bool useThemeColors() const;
void setForegroundColor(const QColor &color);
QColor foregroundColor() const;
void setBackgroundColor(const QColor &color);
QColor backgroundColor() const;
2017-10-11 20:16:13 +00:00
inline QHBoxLayout *appBarLayout() const;
2017-10-05 14:11:41 +00:00
protected:
void paintEvent(QPaintEvent *event) Q_DECL_OVERRIDE;
const QScopedPointer<QtMaterialAppBarPrivate> d_ptr;
private:
Q_DISABLE_COPY(QtMaterialAppBar)
Q_DECLARE_PRIVATE(QtMaterialAppBar)
};
2017-10-11 20:16:13 +00:00
inline QHBoxLayout *QtMaterialAppBar::appBarLayout() const
{
return static_cast<QHBoxLayout *>(layout());
}
2017-10-05 11:31:52 +00:00
#endif // QTMATERIALAPPBAR_H