Page Contents

Topics

Classes

QLThemeComboBox Class

#include <QLayers/qlthemecombobox.h>

Inherits: QLComboBox

Public Functions

QLThemeComboBox(QWidget* parent = nullptr)
void add_theme(LTheme* theme, bool set_as_current_index = false)
void clear()

Protected Functions

virtual bool eventFilter(QObject* object, QEvent* event) override
virtual void paintEvent(QPaintEvent* event) override

Detailed Description

QLThemeComboBox Example

A QLThemeComboBox is a QLComboBox that displays a list of LTheme items for the user to switch between.

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.

QLThemeComboBoxItemDelegate was created to serve as the default item delegate for QLThemeComboBox.

Member Function Documentation

QLThemeComboBox(QWidget* parent = nullptr)

Constructs a theme combo box.

void add_theme(LTheme* theme, bool set_as_current_index = false)

Adds a theme to the combo box's item model.

void clear()

Clears the combo box's item model.