#ifndef QTMATERIALAPPBAR_H #define QTMATERIALAPPBAR_H #include #include namespace md { class AppBarPrivate; class AppBar : public QWidget { Q_OBJECT Q_PROPERTY(QColor foregroundColor WRITE setForegroundColor READ foregroundColor) Q_PROPERTY(QColor backgroundColor WRITE setBackgroundColor READ backgroundColor) public: explicit AppBar(QWidget *parent = 0); ~AppBar(); 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; inline QHBoxLayout *appBarLayout() const; protected: void paintEvent(QPaintEvent *event) Q_DECL_OVERRIDE; const QScopedPointer d_ptr; private: Q_DISABLE_COPY(AppBar) Q_DECLARE_PRIVATE(AppBar) }; inline QHBoxLayout *AppBar::appBarLayout() const { return static_cast(layout()); } } #endif // QTMATERIALAPPBAR_H