26 #define YUILogComponent "ui"
29 #include "YUISymbols.h"
37 , keepSorting(
false )
38 , immediateMode(
false )
57 YUI_CHECK_NEW( priv );
74 YUI_CHECK_PTR( newHeader );
80 priv->header = newHeader;
101 return priv->header->
header( column );
108 return priv->header->
alignment( column );
115 return priv->immediateMode;
132 return priv->keepSorting;
170 propSet.
add(
YProperty( YUIProperty_Value, YOtherProperty ) );
171 propSet.
add(
YProperty( YUIProperty_CurrentItem, YOtherProperty ) );
172 propSet.
add(
YProperty( YUIProperty_SelectedItems, YOtherProperty ) );
173 propSet.
add(
YProperty( YUIProperty_Items, YOtherProperty ) );
174 propSet.
add(
YProperty( YUIProperty_Cell, YOtherProperty ) );
175 propSet.
add(
YProperty( YUIProperty_Item, YOtherProperty ) );
176 propSet.
add(
YProperty( YUIProperty_IconPath, YStringProperty ) );
177 propSet.
add(
YProperty( YUIProperty_MultiSelection, YBoolProperty,
true ) );
190 if ( propertyName == YUIProperty_Value )
return false;
191 else if ( propertyName == YUIProperty_CurrentItem )
return false;
192 else if ( propertyName == YUIProperty_SelectedItems )
return false;
193 else if ( propertyName == YUIProperty_Items )
return false;
194 else if ( propertyName == YUIProperty_Cell )
return false;
195 else if ( propertyName == YUIProperty_Item )
return false;
211 if ( propertyName == YUIProperty_Value )
return YPropertyValue( YOtherProperty );
212 else if ( propertyName == YUIProperty_CurrentItem )
return YPropertyValue( YOtherProperty );
213 else if ( propertyName == YUIProperty_SelectedItems )
return YPropertyValue( YOtherProperty );
214 else if ( propertyName == YUIProperty_Items )
return YPropertyValue( YOtherProperty );
215 else if ( propertyName == YUIProperty_Cell )
return YPropertyValue( YOtherProperty );
216 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.
std::string header(int column) const
Return the header text for the specified column.
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.
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.
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.