XinxListWidgetImpl Class Reference
[Graphical User Interface's components for XINX]
The class XinxListWidgetImpl provides a widget to create, and sort a list. More...
#include <xinxlistwidgetimpl.h>

Signals | |
| void | defaultValueChanged (QString value) |
This signal is emited when the user changes the value value. | |
| void | currentRowChanged (int value) |
| The signal is emited when the user changes the current row in the list. | |
| void | itemChanged (const QString &text) |
| The signal is emited when the user changes the current row in the list. | |
Public Member Functions | |
| XinxListWidgetImpl (QWidget *parent=0, Qt::WindowFlags f=0) | |
| Construct the widget with a default, add and remove button. | |
| virtual | ~XinxListWidgetImpl () |
| Destroys the widget. | |
| QString | defaultValue () const |
| void | setDefaultValue (const QString &value) |
| Changes the default value. | |
| bool | defaultVisible () const |
| void | setDefaultVisible (bool visible) |
| Sets the visibility of the default button. | |
| QStringList | values () const |
| void | setValues (const QStringList &values) |
| Changes the list of values used by the widget. | |
| QString | defaultProposedValue () const |
| void | setDefaultProposedValue (const QString &value) |
Sets the default proposed value to the user to value. | |
| void | add (const QString &value) |
| Add a value in the list. | |
| QString | currentItem () const |
| Retrieve the current item of the list. | |
Protected Member Functions | |
| virtual QString | addNewValue () |
| This method is called when a new value is added into the list. | |
Properties | |
| bool | defaultVisible |
| Retrieve the visibility of the default button. | |
| QString | defaultValue |
| Retrieve the default value selected by the user. | |
| QStringList | values |
| Return the list of value used by the widget. | |
| QString | defaultProposedValue |
| Retrieve the default value proposed to the user, when he adds a value to the list. | |
Detailed Description
The class XinxListWidgetImpl provides a widget to create, and sort a list.
- Since:
- 0.7.1.0
- Binary Compatible:
- 0.10.0.0
This widget is a list of values (exemple: list of path, list of urls, list of prefix) with a button to add an value, a button to delete a value, and a button to make a value the default (this button can be cached the property defaultVisible()).
In this list you have two button too, to move a ligne up, and move a line down to sort your list.
Constructor & Destructor Documentation
| XinxListWidgetImpl::XinxListWidgetImpl | ( | QWidget * | parent = 0, |
|
| Qt::WindowFlags | f = 0 | |||
| ) |
Construct the widget with a default, add and remove button.
- Parameters:
-
parent The parent widget f Flags for the widget
| XinxListWidgetImpl::~XinxListWidgetImpl | ( | ) | [virtual] |
Destroys the widget.
Member Function Documentation
| void XinxListWidgetImpl::add | ( | const QString & | value | ) |
Add a value in the list.
| QString XinxListWidgetImpl::addNewValue | ( | ) | [protected, virtual] |
This method is called when a new value is added into the list.
- Since:
- 0.10.0.0
The default implementation of this method will add the result of defaultProposedValue() and if empty will add ....
- Returns:
- The value to add in the list.
Reimplemented in XinxDirectoryListWidget.
| QString XinxListWidgetImpl::currentItem | ( | ) | const |
Retrieve the current item of the list.
| void XinxListWidgetImpl::currentRowChanged | ( | int | value | ) | [signal] |
The signal is emited when the user changes the current row in the list.
- Parameters:
-
value the index of the new row
- See also:
- itemChanged()
| QString XinxListWidgetImpl::defaultProposedValue | ( | ) | const |
| QString XinxListWidgetImpl::defaultValue | ( | ) | const |
| void XinxListWidgetImpl::defaultValueChanged | ( | QString | value | ) | [signal] |
This signal is emited when the user changes the value value.
- Parameters:
-
value Contains the default value, chosen by the user.
| bool XinxListWidgetImpl::defaultVisible | ( | ) | const |
| void XinxListWidgetImpl::itemChanged | ( | const QString & | text | ) | [signal] |
The signal is emited when the user changes the current row in the list.
- Parameters:
-
text The text of the new selected item.
- See also:
- currentRowChanged()
| void XinxListWidgetImpl::setDefaultProposedValue | ( | const QString & | value | ) |
Sets the default proposed value to the user to value.
- See also:
- defaultProposedValue()
| void XinxListWidgetImpl::setDefaultValue | ( | const QString & | value | ) |
| void XinxListWidgetImpl::setDefaultVisible | ( | bool | visible | ) |
Sets the visibility of the default button.
If visible is set to false, the default button is hidden and the user can't choose a default value.
- See also:
- defaultVisible()
| void XinxListWidgetImpl::setValues | ( | const QStringList & | values | ) |
Changes the list of values used by the widget.
If the defaultValue isn't in the list, the default value is added.
- See also:
- values()
| QStringList XinxListWidgetImpl::values | ( | ) | const |
Property Documentation
QString XinxListWidgetImpl::defaultProposedValue [read, write] |
Retrieve the default value proposed to the user, when he adds a value to the list.
- See also:
- setDefaultProposedValue()
QString XinxListWidgetImpl::defaultValue [read, write] |
Retrieve the default value selected by the user.
- See also:
- setDefaultValue()
bool XinxListWidgetImpl::defaultVisible [read, write] |
Retrieve the visibility of the default button.
- See also:
- setDefaultVisible()
QStringList XinxListWidgetImpl::values [read, write] |
Return the list of value used by the widget.
- See also:
- setValues()