summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/widgets/dialogs/qcolordialog.cpp35
1 files changed, 6 insertions, 29 deletions
diff --git a/src/widgets/dialogs/qcolordialog.cpp b/src/widgets/dialogs/qcolordialog.cpp
index 9a8bfc552d..6a1135920d 100644
--- a/src/widgets/dialogs/qcolordialog.cpp
+++ b/src/widgets/dialogs/qcolordialog.cpp
@@ -168,8 +168,6 @@ private:
namespace {
-struct QWellArrayData;
-
class QWellArray : public QWidget
{
Q_OBJECT
@@ -189,8 +187,6 @@ public:
QSize sizeHint() const Q_DECL_OVERRIDE;
- virtual void setCellBrush(int row, int col, const QBrush &);
-
inline int cellWidth() const
{ return cellw; }
@@ -257,7 +253,6 @@ private:
int curCol;
int selRow;
int selCol;
- QWellArrayData *d;
};
void QWellArray::paintEvent(QPaintEvent *e)
@@ -307,15 +302,10 @@ void QWellArray::paintEvent(QPaintEvent *e)
}
}
-struct QWellArrayData {
- QBrush *brush;
-};
-
QWellArray::QWellArray(int rows, int cols, QWidget *parent)
: QWidget(parent)
,nrows(rows), ncols(cols)
{
- d = 0;
setFocusPolicy(Qt::StrongFocus);
cellw = 28;
cellh = 24;
@@ -364,14 +354,12 @@ void QWellArray::paintCell(QPainter* p, int row, int col, const QRect &rect)
*/
void QWellArray::paintCellContents(QPainter *p, int row, int col, const QRect &r)
{
- if (d) {
- p->fillRect(r, d->brush[row*numCols()+col]);
- } else {
- p->fillRect(r, Qt::white);
- p->setPen(Qt::black);
- p->drawLine(r.topLeft(), r.bottomRight());
- p->drawLine(r.topRight(), r.bottomLeft());
- }
+ Q_UNUSED(row);
+ Q_UNUSED(col);
+ p->fillRect(r, Qt::white);
+ p->setPen(Qt::black);
+ p->drawLine(r.topLeft(), r.bottomRight());
+ p->drawLine(r.topRight(), r.bottomLeft());
}
void QWellArray::mousePressEvent(QMouseEvent *e)
@@ -447,17 +435,6 @@ void QWellArray::focusInEvent(QFocusEvent*)
emit currentChanged(curRow, curCol);
}
-void QWellArray::setCellBrush(int row, int col, const QBrush &b)
-{
- if (!d) {
- d = new QWellArrayData;
- int i = numRows()*numCols();
- d->brush = new QBrush[i];
- }
- if (row >= 0 && row < numRows() && col >= 0 && col < numCols())
- d->brush[row*numCols()+col] = b;
-}
-
/*!\reimp
*/