src/widgets/colorbutton.h

Tue, 15 Mar 2022 18:52:48 +0200

author
Teemu Piippo <teemu@hecknology.net>
date
Tue, 15 Mar 2022 18:52:48 +0200
changeset 183
97b591813c8b
parent 39
caac957e9834
permissions
-rw-r--r--

- Add editors for string and bool properties
- Add invert action

#pragma once
#include <QPushButton>

/**
 * @brief A button that can be used to select a color
 */
class ColorButton : public QPushButton
{
public:
	ColorButton(const QColor& color = {}, QWidget* parent = nullptr);
	ColorButton(QWidget* parent = nullptr);
	QColor selectedColor() const;
	void setSelectedColor(const QColor& newSelectedColor);
private:
	QColor storedSelectedColor;
};

mercurial