[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdelibs/kdeui/colors
From: John Tapsell <john.tapsell () kdemail ! net>
Date: 2009-07-03 15:37:54
Message-ID: 1246635474.913969.13374.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 990974 by johnflux:
Doxygen change - add a code example for reacting dynamically to changes
M +18 -1 kcolordialog.h
--- trunk/KDE/kdelibs/kdeui/colors/kcolordialog.h #990973:990974
@@ -102,7 +102,7 @@
* @short A color displayer.
*
* The KColorPatch widget is a (usually small) widget showing
- * a selected color e. g. in the KColorDialog. It
+ * a selected color e.g. in the KColorDialog. It
* automatically handles drag and drop from and on the widget.
*
*/
@@ -154,6 +154,23 @@
* ...
* \endcode
*
+ * To react to the color selection as it is being selected, the colorSelected() \
signal + * can be used. This can be used still in a modal way, for example:
+ *
+ * \code
+ * KColorDialog dialog(this);
+ * connect(&dialog, SIGNAL(colorSelected(const QColor &)), this, \
SLOT(temporarilyChangeColor(const QColor &))); + * QColor myColor;
+ * dialog.setColor(myColor);
+ * int result = dialog.exec();
+ *
+ * if ( result == KColorDialog::Accepted )
+ * changeColor( dialog.color() );
+ * else
+ * temporarilyChangeColor(myColor); //change back to original color
+ * \endcode
+ *
+ *
* @image html kcolordialog.png "KDE Color Dialog"
*
* The color dialog is really a collection of several widgets which can
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic