27 #ifndef YMGA_CBTable_h 28 #define YMGA_CBTable_h 30 #include <yui/YTable.h> 31 #include <yui/YTypes.h> 32 #include <yui/YSelectionWidget.h> 33 #include <yui/YTableItem.h> 34 #include <yui/YTableHeader.h> 35 #include <yui/YEvent.h> 38 YCBTableCheckBoxOnFirstColumn=2,
39 YCBTableCheckBoxOnLastColumn
68 const std::string & label_1 = std::string(),
69 const std::string & label_2 = std::string(),
70 const std::string & label_3 = std::string(),
71 const std::string & label_4 = std::string(),
72 const std::string & label_5 = std::string(),
73 const std::string & label_6 = std::string(),
74 const std::string & label_7 = std::string(),
75 const std::string & label_8 = std::string(),
76 const std::string & label_9 = std::string() ) :
77 YTableItem(label_0, label_1, label_2, label_3,
78 label_4, label_5, label_6, label_7,
79 label_8, label_9), _checked(false) {}
86 void check(
bool val=
true) {_checked=val;}
87 bool checked() {
return _checked;}
131 YMGA_CBTable( YWidget * parent, YTableHeader * header, YCBTableMode mode );
144 virtual const char *
widgetClass()
const {
return "YMGA_CBTable"; }
155 bool hasColumn(
int column )
const;
160 std::string header(
int column )
const;
165 YAlignmentType alignment(
int column )
const;
177 bool immediateMode()
const;
182 void setImmediateMode(
bool immediateMode =
true );
189 bool keepSorting()
const;
199 virtual void setKeepSorting(
bool keepSorting );
205 bool hasMultiSelection()
const;
211 YCBTableMode tableMode();
225 virtual void cellChanged(
const YTableCell * cell ) = 0;
236 virtual void checkItem( YItem * item,
bool checked =
true ) = 0;
248 virtual bool setProperty(
const std::string & propertyName,
249 const YPropertyValue & val );
257 virtual YPropertyValue getProperty(
const std::string & propertyName );
265 virtual const YPropertySet & propertySet();
284 virtual void addItem( YItem * item_disown );
293 void setTableHeader( YTableHeader * newHeader );
299 virtual YItem* item(
int index )
const;
323 YItemIterator nextItem( YItemIterator currentIterator);
329 virtual void deleteAllItems();
336 YItem* YItemIteratorToYItem(YItemIterator iter);
346 ImplPtr<YMGA_CBTablePrivate> priv;
350 #endif // YMGA_CBTable_h
const char * userInputProperty()
The name of the widget property that will return user input.
See document of YMGA_CBTable Table: Selection list with multiple columns.
virtual const char * widgetClass() const
Return a descriptive name of this widget class for logging, debugging etc.
virtual ~YCBTableItem()
Destructor.
YCBTableItem()
Default constructor.
YCBTableItem(const std::string &label_0, const std::string &label_1=std::string(), const std::string &label_2=std::string(), const std::string &label_3=std::string(), const std::string &label_4=std::string(), const std::string &label_5=std::string(), const std::string &label_6=std::string(), const std::string &label_7=std::string(), const std::string &label_8=std::string(), const std::string &label_9=std::string())
Convenience constructor for table items without any icons.