1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-21 11:23:51 +00:00

Remove outdated ColorEditButton files

This commit is contained in:
Stanislav Bas 2015-06-12 14:09:25 +03:00
parent e257c915bf
commit 4096d2851c
2 changed files with 0 additions and 72 deletions

View file

@ -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;
}

View file

@ -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