Remove outdated ColorEditButton files

pull/35/head
Stanislav Bas 10 years ago
parent e257c915bf
commit 4096d2851c

@ -1,42 +0,0 @@
#include "coloreditbutton.hpp"
#include <QColor>
#include <QPainter>
#include <QRect>
CSVWidget::ColorEditButton::ColorEditButton(const QColor &color,
const QSize &coloredRectSize,
QWidget *parent)
: QPushButton(parent),
mColor(color),
mColoredRectSize(coloredRectSize)
{}
void CSVWidget::ColorEditButton::paintEvent(QPaintEvent *event)
{
QPushButton::paintEvent(event);
QRect buttonRect = rect();
QRect coloredRect(buttonRect.x() + (buttonRect.width() - mColoredRectSize.width()) / 2,
buttonRect.y() + (buttonRect.height() - mColoredRectSize.height()) / 2,
mColoredRectSize.width(),
mColoredRectSize.height());
QPainter painter(this);
painter.fillRect(coloredRect, mColor);
}
QColor CSVWidget::ColorEditButton::color() const
{
return mColor;
}
void CSVWidget::ColorEditButton::setColor(const QColor &color)
{
mColor = color;
}
void CSVWidget::ColorEditButton::setColoredRectSize(const QSize &size)
{
mColoredRectSize = size;
}

@ -1,30 +0,0 @@
#ifndef CSV_WIDGET_COLOREDITBUTTON_HPP
#define CSV_WIDGET_COLOREDITBUTTON_HPP
#include <QPushButton>
class QColor;
class QSize;
namespace CSVWidget
{
class ColorEditButton : public QPushButton
{
QColor mColor;
QSize mColoredRectSize;
public:
ColorEditButton(const QColor &color,
const QSize &coloredRectSize,
QWidget *parent = 0);
QColor color() const;
void setColor(const QColor &color);
void setColoredRectSize(const QSize &size);
protected:
void paintEvent(QPaintEvent *event);
};
}
#endif
Loading…
Cancel
Save