diff options
| author | isanae <14251494+isanae@users.noreply.github.com> | 2019-09-27 15:20:02 -0400 |
|---|---|---|
| committer | isanae <14251494+isanae@users.noreply.github.com> | 2019-09-27 15:20:02 -0400 |
| commit | 51d664d76ce6b611e7a7585b209bad9d68fe65d7 (patch) | |
| tree | bfb235aab1f5c7b5cd6a8622739a166ad5f1c4fa /src/colortable.h | |
| parent | 5d74bd3789515a3e04e54267f1cdfe8f5397f6df (diff) | |
moved color stuff to ColorTable, now shows sample text and icons
Diffstat (limited to 'src/colortable.h')
| -rw-r--r-- | src/colortable.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/colortable.h b/src/colortable.h new file mode 100644 index 00000000..c2b64a4d --- /dev/null +++ b/src/colortable.h @@ -0,0 +1,28 @@ +#ifndef COLORTABLE_H +#define COLORTABLE_H + +#include <QTableWidget> + +class Settings; + +class ColorTable : public QTableWidget +{ +public: + ColorTable(QWidget* parent=nullptr); + + void load(Settings& s); + void resetColors(); + void commitColors(); + +private: + Settings* m_settings; + + void addColor( + const QString& text, const QColor& defaultColor, + std::function<QColor ()> get, + std::function<void (const QColor&)> commit); + + void onColorActivated(); +}; + +#endif // COLORTABLE_H |
