26 #define YUILogComponent "ui"
29 #include "YUISymbols.h"
39 , keepSorting(
false )
40 , immediateMode(
false )
59 YUI_CHECK_NEW( priv );
76 YUI_CHECK_PTR( newHeader );
82 priv->header = newHeader;
103 return priv->header->
header( column );
110 return priv->header->
alignment( column );
117 return priv->immediateMode;
134 return priv->keepSorting;
169 auto * item =
dynamic_cast<YTableItem *
>(*it);
171 if ( item && item->label( column ) == wantedItemLabel )
198 propSet.
add(
YProperty( YUIProperty_Value, YOtherProperty ) );
199 propSet.
add(
YProperty( YUIProperty_CurrentItem, YOtherProperty ) );
200 propSet.
add(
YProperty( YUIProperty_SelectedItems, YOtherProperty ) );
201 propSet.
add(
YProperty( YUIProperty_Items, YOtherProperty ) );
202 propSet.
add(
YProperty( YUIProperty_Cell, YOtherProperty ) );
203 propSet.
add(
YProperty( YUIProperty_Item, YOtherProperty ) );
204 propSet.
add(
YProperty( YUIProperty_IconPath, YStringProperty ) );
205 propSet.
add(
YProperty( YUIProperty_MultiSelection, YBoolProperty,
true ) );
218 if ( propertyName == YUIProperty_Value )
return false;
219 else if ( propertyName == YUIProperty_CurrentItem )
return false;
220 else if ( propertyName == YUIProperty_SelectedItems )
return false;
221 else if ( propertyName == YUIProperty_Items )
return false;
222 else if ( propertyName == YUIProperty_Cell )
return false;
223 else if ( propertyName == YUIProperty_Item )
return false;
239 if ( propertyName == YUIProperty_Value )
return YPropertyValue( YOtherProperty );
240 else if ( propertyName == YUIProperty_CurrentItem )
return YPropertyValue( YOtherProperty );
241 else if ( propertyName == YUIProperty_SelectedItems )
return YPropertyValue( YOtherProperty );
242 else if ( propertyName == YUIProperty_Items )
return YPropertyValue( YOtherProperty );
243 else if ( propertyName == YUIProperty_Cell )
return YPropertyValue( YOtherProperty );
244 else if ( propertyName == YUIProperty_Item )
return YPropertyValue( YOtherProperty );
virtual bool setProperty(const std::string &propertyName, const YPropertyValue &val)
Set a property.
void add(const YProperty &prop)
Add a property to this property set.
YItem * findItem(const std::string &wantedItemLabel, int column) const
Try to find an item with label 'wantedItemLabel' in column 'column' between iterators 'begin' and 'en...
int columns() const
Return the number of columns of this table.
void setImmediateMode(bool immediateMode=true)
Set immediateMode() on or off.
virtual YPropertyValue getProperty(const std::string &propertyName)
Get a property.
A set of properties to check names and types against.
bool isEmpty() const
Returns 'true' if this property set does not contain anything.
std::string stringVal() const
Methods to get the value of this property.
virtual const YPropertySet & propertySet()
Return this class's property set.
bool keepSorting() const
Return 'true' if the sort order is to be kept in item insertion order, i.e.
YPropertyType type() const
Returns the type of this property value.
Item class for YTable items.
Class for widget properties.
void setTableHeader(YTableHeader *newHeader)
Exchange the previous table header with a new one.
YTable(YWidget *parent, YTableHeader *header, bool multiSelection)
Constructor.
virtual void setKeepSorting(bool keepSorting)
Switch between sorting by item insertion order (keepSorting: true) or allowing the user to sort by an...
void check(const std::string &propertyName) const
Check if a property 'propertyName' exists in this property set.
bool hasColumn(int column) const
Return 'true' if this table has a column no.
std::string header(int column) const
Return the header text for the specified column.
Transport class for the value of simple properties.
bool immediateMode() const
Deliver even more events than with notify() set.
bool hasMultiSelection() const
Return 'true' if the user can select multiple items at the same time (e.g., with shift-click or ctrl-...
virtual ~YTable()
Destructor.
YAlignmentType alignment(int column) const
Return the alignment for the specified column.
YItemCollection::const_iterator YItemConstIterator
Const iterator over YItemCollection.
Simple item class for SelectionBox, ComboBox, MultiSelectionBox etc.