src/widgets/colorbutton.h

Sun, 29 Aug 2021 20:05:24 +0300

author
Teemu Piippo <teemu@hecknology.net>
date
Sun, 29 Aug 2021 20:05:24 +0300
changeset 124
f9f308c8e0c5
parent 39
caac957e9834
permissions
-rw-r--r--

esc with draw mode now clears the polygon

#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