[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: koffice/kexi/koproperty2
From: Jaroslaw Staniek <js () iidea ! pl>
Date: 2008-10-31 21:26:14
Message-ID: 1225488374.310581.12087.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 878312 by staniek:
KoProperty2
- api docs updated for the property options for boolean type
M +22 -16 EditorView.h
M +6 -0 editors/booledit.h
--- trunk/koffice/kexi/koproperty2/EditorView.h #878311:878312
@@ -92,22 +92,28 @@
/*! Editor widgets use property options using Property::option(const char *)
to override default behaviour of editor items.
Currently supported options are:
- <ul><li> min: integer setting for minimum value of IntEdit and DoubleEdit item. Default is 0.
- Set "min" to -1, if you want this special value to be allowed.</li>
- <li> minValueText: i18n'd QString used in IntEdit to set "specialValueText"
- widget's property</li>
- <li> max: integer setting for minimum value of IntEdit item. Default is 0xffff.</li>
- <li> precision: The number of decimals after the decimal point. (for DoubleEdit)</li>
- <li> step : the size of the step that is taken when the user hits the up
- or down buttons (for DoubleEdit) </li>
- <li> 3rdState: i18n'd QString used in BoolEdit. If not empty, the the editor's button
- accept third "null" state with name equal to this string. When this value is selected,
- Widget::value() returns null QVariant. This option is used for example in the "defaultValue"
- property for a field of type boolean (in Kexi Table Designer). Third, "null" value
- of the property means there is no "defaultValue" specified. </li>
- <li>
- extraValueAllowed: Allow the user to manually enter a value into a combobox
- that isnt in the list. The entered text will be returned as opposed to a matching key.
+ <ul><li> min: integer setting for minimum value for integer and double types.
+ The default is 0.
+ Set it to -1, if you want this special value to be allowed.</li>
+ <li> minValueText: i18n'd QString used for integer type to set "specialValueText"
+ widget's property</li>
+ <li> max: integer setting for minimum value the property of integer type. Default is 0xffff.</li>
+ <li> precision: The number of decimals after the decimal point (for double types).</li>
+ <li> step: the size of the step that is taken when the user hits the up
+ or down buttons (for double types).</li>
+ <li> 3State: boolean value used for boolean types; if true, the editor becomes a combobox
+ (instead of checkable button) and accepta the third "null" state.</li>
+ <li> yesName: i18n'd QString used for boolean types (both 2- and 3-state)
+ to display the "true" value. If not present, i18n("Yes") is used.</li>
+ <li> noName: i18n'd QString used for boolean types (both 2- and 3-state)
+ to display the "false" value. If not present, i18n("No") is used.</li>
+ <li> 3rdStateName: i18n'd QString used for boolean types (both 2- and 3-state)
+ to display the 3rd state "null" value. If not present, i18n("N") is used.</li>
+ <li> nullName: i18n'd QString used for boolean types to display the "null" value if
+ and only if the property accepts two states (i.e. when "3State" option is not true).
+ If this option is not present, null values are displayed as false.</li>
+ <li> extraValueAllowed: Allow the user to manually enter a value into a combobox
+ that is not in the list. The entered text will be returned as opposed to a matching key.
</li>
</ul>
@author Jarosław Staniek <staniek@kde.org>
--- trunk/koffice/kexi/koproperty2/editors/booledit.h #878311:878312
@@ -30,6 +30,9 @@
#include <QToolButton>
+//! A bool editor supporting two states: true and false.
+/*! For null values, false is displayed.
+*/
class BoolEdit : public QToolButton
{
Q_OBJECT
@@ -63,6 +66,9 @@
QString m_noText;
};
+//! A bool editor supporting three states: true, false and null.
+/*! The editor is implemented as a drop-down list.
+*/
class KOPROPERTY_EXPORT ThreeStateBoolEdit : public ComboBox
{
Q_OBJECT
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic