src/widgets/colorbutton.h

Mon, 26 Jul 2021 11:50:45 +0300

author
Teemu Piippo <teemu@hecknology.net>
date
Mon, 26 Jul 2021 11:50:45 +0300
changeset 113
c0d064521ee0
parent 39
caac957e9834
permissions
-rw-r--r--

refactor

#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