summaryrefslogtreecommitdiffstats
path: root/src/widgets/dialogs
diff options
context:
space:
mode:
authorSergio Ahumada <sergio.ahumada@digia.com>2013-07-11 15:14:13 +0200
committerOswald Buddenhagen <oswald.buddenhagen@digia.com>2013-07-11 16:42:01 +0200
commit3ef6cf060e984bca43956a23b61b32ec7347cfc7 (patch)
tree14810e4d0168c0cc3d69cb286574bf28375c07bc /src/widgets/dialogs
parentb06304e164ba47351fa292662c1e6383c081b5ca (diff)
parent7b9d6cf844ece18fef884f51117e25ad4ac31db5 (diff)
Merge branch 'stable' into dev
Conflicts: qmake/generators/mac/pbuilder_pbx.cpp src/corelib/json/qjsonwriter.cpp src/corelib/kernel/qeventdispatcher_blackberry.cpp src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm Change-Id: I24df576c4cbd18fa51b03122f71e32bb83b9028f
Diffstat (limited to 'src/widgets/dialogs')
-rw-r--r--src/widgets/dialogs/qcolordialog.cpp11
-rw-r--r--src/widgets/dialogs/qcolordialog.h1
-rw-r--r--src/widgets/dialogs/qcolordialog_p.h1
3 files changed, 12 insertions, 1 deletions
diff --git a/src/widgets/dialogs/qcolordialog.cpp b/src/widgets/dialogs/qcolordialog.cpp
index 3d720e59e6..5da41aa0a5 100644
--- a/src/widgets/dialogs/qcolordialog.cpp
+++ b/src/widgets/dialogs/qcolordialog.cpp
@@ -136,6 +136,7 @@ public:
signals:
void selected(int row, int col);
+ void currentChanged(int row, int col);
protected:
virtual void paintCell(QPainter *, int row, int col, const QRect&);
@@ -311,6 +312,8 @@ void QWellArray::setCurrent(int row, int col)
updateCell(oldRow, oldCol);
updateCell(curRow, curCol);
+
+ emit currentChanged(curRow, curCol);
}
/*
@@ -344,6 +347,7 @@ void QWellArray::setSelected(int row, int col)
void QWellArray::focusInEvent(QFocusEvent*)
{
updateCell(curRow, curCol);
+ emit currentChanged(curRow, curCol);
}
void QWellArray::setCellBrush(int row, int col, const QBrush &b)
@@ -1493,11 +1497,15 @@ void QColorDialogPrivate::_q_newColorTypedIn(QRgb rgb)
}
}
+void QColorDialogPrivate::_q_nextCustom(int r, int c)
+{
+ nextCust = r + 2 * c;
+}
+
void QColorDialogPrivate::_q_newCustom(int r, int c)
{
const int i = r + 2 * c;
setCurrentColor(QColorDialogOptions::customColor(i));
- nextCust = i;
if (standard)
standard->setSelected(-1,-1);
}
@@ -1627,6 +1635,7 @@ void QColorDialogPrivate::initWidgets()
custom->setAcceptDrops(true);
q->connect(custom, SIGNAL(selected(int,int)), SLOT(_q_newCustom(int,int)));
+ q->connect(custom, SIGNAL(currentChanged(int,int)), SLOT(_q_nextCustom(int,int)));
lblCustomColors = new QLabel(q);
#ifndef QT_NO_SHORTCUT
lblCustomColors->setBuddy(custom);
diff --git a/src/widgets/dialogs/qcolordialog.h b/src/widgets/dialogs/qcolordialog.h
index e76a120c3a..c7a1d6f400 100644
--- a/src/widgets/dialogs/qcolordialog.h
+++ b/src/widgets/dialogs/qcolordialog.h
@@ -123,6 +123,7 @@ private:
Q_PRIVATE_SLOT(d_func(), void _q_addCustom())
Q_PRIVATE_SLOT(d_func(), void _q_newHsv(int h, int s, int v))
Q_PRIVATE_SLOT(d_func(), void _q_newColorTypedIn(QRgb rgb))
+ Q_PRIVATE_SLOT(d_func(), void _q_nextCustom(int, int))
Q_PRIVATE_SLOT(d_func(), void _q_newCustom(int, int))
Q_PRIVATE_SLOT(d_func(), void _q_newStandard(int, int))
Q_PRIVATE_SLOT(d_func(), void _q_pickScreenColor())
diff --git a/src/widgets/dialogs/qcolordialog_p.h b/src/widgets/dialogs/qcolordialog_p.h
index 71be0e61d3..08199cc7c1 100644
--- a/src/widgets/dialogs/qcolordialog_p.h
+++ b/src/widgets/dialogs/qcolordialog_p.h
@@ -100,6 +100,7 @@ public:
void _q_newHsv(int h, int s, int v);
void _q_newColorTypedIn(QRgb rgb);
+ void _q_nextCustom(int, int);
void _q_newCustom(int, int);
void _q_newStandard(int, int);
void _q_pickScreenColor();