26 #define YUILogComponent "ui" 29 #include "YUISymbols.h" 37 , keepSorting(
false )
38 , immediateMode(
false )
56 YUI_CHECK_PTR( header );
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 );
int columns() const
Return the number of columns of this table.
YAlignmentType alignment(int column) const
Return the alignment for the specified column.
bool isEmpty() const
Returns 'true' if this property set does not contain anything.
YTable(YWidget *parent, YTableHeader *header, bool multiSelection)
Constructor.
Transport class for the value of simple properties.
bool hasMultiSelection() const
Return 'true' if the user can select multiple items at the same time (e.g., with shift-click or ctrl-...
void add(const YProperty &prop)
Add a property to this property set.
A set of properties to check names and types against.
void setImmediateMode(bool immediateMode=true)
Set immediateMode() on or off.
virtual YPropertyValue getProperty(const std::string &propertyName)
Get a property.
virtual const YPropertySet & propertySet()
Return this class's property set.
virtual ~YTable()
Destructor.
virtual bool setProperty(const std::string &propertyName, const YPropertyValue &val)
Set a property.
std::string header(int column) const
Return the header text for the specified column.
bool immediateMode() const
Deliver even more events than with notify() set.
std::string stringVal() const
Methods to get the value of this property.
Class for widget properties.
void setTableHeader(YTableHeader *newHeader)
Exchange the previous table header with a new one.
virtual void setKeepSorting(bool keepSorting)
Switch between sorting by item insertion order (keepSorting: true) or allowing the user to sort by an...
bool keepSorting() const
Return 'true' if the sort order is to be kept in item insertion order, i.e.
bool hasColumn(int column) const
Return 'true' if this table has a column no.
void check(const std::string &propertyName) const
Check if a property 'propertyName' exists in this property set.
YPropertyType type() const
Returns the type of this property value.