QLThemeComboBoxItemDelegate Class
#include <QLayers/qlthemecomboboxitemdelegate.h>
Inherits: | QLComboBoxItemDelegate |
Public Functions
virtual bool | editorEvent(QEvent* event, QAbstractItemModel* model, const QStyleOptionViewItem& option, const QModelIndex& index) override |
virtual void | paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const override |
Signals
void | mouse_moved(QPoint cursor_pos) |
Detailed Description
A QLThemeComboBoxItemDelegate is a QLComboBoxItemDelegate that serves as the default item delegate for QLThemeComboBox.
Each item displays two pieces of theme metadata: the theme's name and its UUID. The default Layers themes, Dark and Light, do not display a UUID.
Theme Compatibility Caution
If a theme in the list does not contain an implementation set for the current application, a caution icon is displayed within the item. The following is an example:
If the user hovers their mouse over an item displaying this caution icon, a QLThemeCompatibilityCautionDialog will be displayed to inform the user about the missing implementation set and list ancestor themes where an implementation set can be obtained.
Member Function Documentation
bool editorEvent(QEvent* event, QAbstractItemModel* model, const QStyleOptionViewItem& option, const QModelIndex& index)
Virtual
Override
This implementation of this function is used to emit mouse_moved() when the user moves the mouse cursor over the item.
void mouse_moved(QPoint cursor_pos)
Signal
This signal is emitted when the user hovers their mouse over an item represented by the delegate.
void paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const
Virtual
Override
Renders the delegate using the given painter and style option for the item specified by index.