cutter/src/dialogs/preferences/ColorThemeEditDialog.h
optizone 228d3a454a Interface theme and theme features refactoring (#1598)
* init commit

* use hex

* delete obsolete code

* alpha channel feature update

* enhance pattern painting

* remove useless code

* add comment
2019-06-12 20:46:07 +03:00

54 lines
1.1 KiB
C++

#ifndef COLORTHEMEEDITDIALOG_H
#define COLORTHEMEEDITDIALOG_H
#include <QDialog>
class DisassemblyWidget;
namespace Ui {
class ColorThemeEditDialog;
}
class ColorThemeEditDialog : public QDialog
{
Q_OBJECT
public:
explicit ColorThemeEditDialog(QWidget *parent = nullptr);
~ColorThemeEditDialog() override;
public slots:
void accept() override;
void reject() override;
protected slots:
void keyPressEvent(QKeyEvent *event) override;
private slots:
/**
* @brief Sets @a newColor color for current option.
* @param newColor
* New color for current color option.
*/
void colorOptionChanged(const QColor &newColor);
/**
* @brief Changes current theme to edit.
* @param newTheme
* Name of new theme.
*/
void editThemeChanged(const QString &newTheme);
private:
bool themeWasEdited(const QString &theme) const;
private:
QList<QString> showAlphaOptions;
Ui::ColorThemeEditDialog *ui;
QSignalBlocker configSignalBlocker;
DisassemblyWidget *previewDisasmWidget;
QString colorTheme;
};
#endif // COLORTHEMEEDITDIALOG_H