File indexing completed on 2024-11-24 03:56:28
0001 /* 0002 * SPDX-FileCopyrightText: 2019-2023 Mattia Basaglia <dev@dragon.best> 0003 * 0004 * SPDX-License-Identifier: GPL-3.0-or-later 0005 */ 0006 0007 #ifndef WIDGETPALETTEEDITOR_H 0008 #define WIDGETPALETTEEDITOR_H 0009 0010 #include <memory> 0011 #include <QWidget> 0012 #include "app/settings/palette_settings.hpp" 0013 0014 class WidgetPaletteEditor : public QWidget 0015 { 0016 Q_OBJECT 0017 0018 public: 0019 WidgetPaletteEditor ( app::settings::PaletteSettings* settings, QWidget* parent = nullptr ); 0020 ~WidgetPaletteEditor(); 0021 0022 0023 private Q_SLOTS: 0024 void add_palette(); 0025 void remove_palette(); 0026 void update_color(int row, int column); 0027 void select_palette(const QString& name); 0028 0029 void apply_palette(); 0030 0031 protected: 0032 void changeEvent ( QEvent* e ) override; 0033 0034 private: 0035 class Private; 0036 std::unique_ptr<Private> d; 0037 }; 0038 0039 #endif // WIDGETPALETTEEDITOR_H