Maki
Formally verfied low-code orchestration
Loading...
Searching...
No Matches
theme_editor.h
1// SPDX-FileCopyrightText: Olivier Cléro <oclero@hotmail.com>
2// SPDX-License-Identifier: MIT
3
4#pragma once
5
6#include <QWidget>
7#include <memory>
8#include <oclero/qlementine/style/Theme.hpp>
9
10namespace oclero::qlementine
11{
15class ThemeEditorWidget : public QWidget
16{
17 Q_OBJECT
18
19public:
25 explicit ThemeEditorWidget(QWidget* parent = nullptr);
26
31
32public:
38 const Theme& theme() const;
39
45 void setTheme(const Theme& theme);
46
52 void setDefaultPath(const QString& savePath);
53
54Q_SIGNALS:
60 void themeChanged(const oclero::qlementine::Theme& theme);
61
68 void themeSaved(const QString& path, const oclero::qlementine::Theme& theme);
69
76 void themeLoaded(const QString& path, const oclero::qlementine::Theme& theme);
77
78private:
79 struct Impl;
80 std::unique_ptr<Impl> _impl;
81};
82} // namespace oclero::qlementine
const Theme & theme() const
Gets the current theme.
Definition theme_editor.cpp:682
void setTheme(const Theme &theme)
Sets a new theme.
Definition theme_editor.cpp:687
void themeChanged(const oclero::qlementine::Theme &theme)
Emitted when the theme is changed.
ThemeEditorWidget(QWidget *parent=nullptr)
Constructs a new ThemeEditorWidget.
Definition theme_editor.cpp:673
~ThemeEditorWidget() override
Destroys the ThemeEditorWidget.
void themeLoaded(const QString &path, const oclero::qlementine::Theme &theme)
Emitted when a theme is loaded.
void setDefaultPath(const QString &savePath)
Sets the default save path for themes.
Definition theme_editor.cpp:697
void themeSaved(const QString &path, const oclero::qlementine::Theme &theme)
Emitted when a theme is saved.
Definition theme_editor.cpp:138