src/widgets/colorbutton.h

Tue, 21 Sep 2021 16:00:15 +0300

author
Teemu Piippo <teemu@hecknology.net>
date
Tue, 21 Sep 2021 16:00:15 +0300
changeset 132
488d0ba6070b
parent 39
caac957e9834
permissions
-rw-r--r--

Begin work with serialization

#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