GalleriesDemo Example
#ifndef QTN_GALLERYITEMS_H #define QTN_GALLERYITEMS_H #include <QLabel> #include <DevMachines/QtitanRibbon> class GalleryItemTable : public RibbonGalleryItem { public: GalleryItemTable(); public: virtual void draw(QPainter* p, RibbonGallery* gallery, QRect rcItem, bool enabled, bool selected, bool pressed, bool checked) override; }; class GalleryItemTableLabel : public RibbonGalleryItem { public: GalleryItemTableLabel(); public: virtual void draw(QPainter* p, RibbonGallery* gallery, QRect rcItem, bool enabled, bool selected, bool pressed, bool checked) override; }; class GalleryItemFontColor : public RibbonGalleryItem { public: GalleryItemFontColor(QColor color, const QString& caption, bool topMargin = true, bool botttomMargin = true); public: static void addStandardColors(RibbonGalleryGroup* items); static void addStandardBackColors(RibbonGalleryGroup* items); static void addThemeColors(RibbonGalleryGroup* items, int theme); virtual void draw(QPainter* p, RibbonGallery* gallery, QRect rcItem, bool enabled, bool selected, bool pressed, bool checked) override; QColor getColor() const { return m_color; } protected: bool m_topMargin; bool m_bottomMargin; QColor m_color; }; class GalleryItemUndo : public RibbonGalleryItem { public: GalleryItemUndo(const QString& caption); public: virtual void draw(QPainter* p, RibbonGallery* gallery, QRect rcItem, bool enabled, bool selected, bool pressed, bool checked) override; }; class WidgetGalleryUndo : public RibbonGallery { public: WidgetGalleryUndo(); public: QLabel* findInfoWidget(); virtual void selectedItemChanged(); }; #endif // QTN_GALLERYITEMS_H