libyui
 
Loading...
Searching...
No Matches
YTable.h
1/*
2 Copyright (C) 2000-2012 Novell, Inc
3 This library is free software; you can redistribute it and/or modify
4 it under the terms of the GNU Lesser General Public License as
5 published by the Free Software Foundation; either version 2.1 of the
6 License, or (at your option) version 3.0 of the License. This library
7 is distributed in the hope that it will be useful, but WITHOUT ANY
8 WARRANTY; without even the implied warranty of MERCHANTABILITY or
9 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
10 License for more details. You should have received a copy of the GNU
11 Lesser General Public License along with this library; if not, write
12 to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
13 Floor, Boston, MA 02110-1301 USA
14*/
15
16
17/*-/
18
19 File: YTable.h
20
21 Author: Stefan Hundhammer <shundhammer@suse.de>
22
23/-*/
24
25#ifndef YTable_h
26#define YTable_h
27
28#include "YTypes.h"
29#include "YSelectionWidget.h"
30#include "YTableItem.h"
31#include "YTableHeader.h"
32
33class YTablePrivate;
34
35
36
60{
61protected:
74 YTable( YWidget * parent, YTableHeader * header, bool multiSelection );
75
76public:
77
81 virtual ~YTable();
82
87 virtual const char * widgetClass() const { return "YTable"; }
88
92 int columns() const;
93
98 bool hasColumn( int column ) const;
99
103 std::string header( int column ) const;
104
108 YAlignmentType alignment( int column ) const;
109
120 bool immediateMode() const;
121
125 void setImmediateMode( bool immediateMode = true );
126
132 bool keepSorting() const;
133
142 virtual void setKeepSorting( bool keepSorting );
143
148 bool hasMultiSelection() const;
149
155
156 YItem * findItem( const std::string & wantedItemLabel, int column ) const;
157
158 YItem * findItem( const std::string & wantedItemLabel,
159 int column,
161 YItemConstIterator end ) const;
162
175 virtual void cellChanged( const YTableCell * cell ) = 0;
176
187 virtual bool setProperty( const std::string & propertyName,
188 const YPropertyValue & val );
189
196 virtual YPropertyValue getProperty( const std::string & propertyName );
197
204 virtual const YPropertySet & propertySet();
205
206
211 const char * userInputProperty() { return YUIProperty_CurrentItem; }
212
213
214protected:
215
223 void setTableHeader( YTableHeader * newHeader );
224
225private:
226
228};
229
230
231#endif // YTable_h
YItemCollection::const_iterator YItemConstIterator
Const iterator over YItemCollection.
Definition YItem.h:45
Definition ImplPtr.h:43
Definition YItem.h:56
Definition YProperty.h:198
Definition YProperty.h:105
YSelectionWidget(YWidget *parent, const std::string &label, bool enforceSingleSelection, bool recursiveSelection=false)
Definition YSelectionWidget.cc:59
Definition YTableItem.h:272
Definition YTableHeader.h:44
virtual ~YTable()
Definition YTable.cc:66
bool keepSorting() const
Definition YTable.cc:132
virtual YPropertyValue getProperty(const std::string &propertyName)
Definition YTable.cc:241
YTable(YWidget *parent, YTableHeader *header, bool multiSelection)
Definition YTable.cc:52
virtual void setKeepSorting(bool keepSorting)
Definition YTable.cc:139
void setTableHeader(YTableHeader *newHeader)
Definition YTable.cc:74
YItem * findItem(const std::string &wantedItemLabel, int column) const
int columns() const
Definition YTable.cc:87
YAlignmentType alignment(int column) const
Definition YTable.cc:108
virtual bool setProperty(const std::string &propertyName, const YPropertyValue &val)
Definition YTable.cc:220
virtual const YPropertySet & propertySet()
Definition YTable.cc:179
const char * userInputProperty()
Definition YTable.h:211
void setImmediateMode(bool immediateMode=true)
Definition YTable.cc:122
virtual const char * widgetClass() const
Definition YTable.h:87
bool hasMultiSelection() const
Definition YTable.cc:146
std::string header(int column) const
Definition YTable.cc:101
bool immediateMode() const
Definition YTable.cc:115
virtual void cellChanged(const YTableCell *cell)=0
bool hasColumn(int column) const
Definition YTable.cc:94
YWidgetListIterator end()
Definition YWidget.h:245
YWidgetListIterator begin()
Definition YWidget.h:238
YWidget(YWidget *parent)
Definition YWidget.cc:106
YWidget * parent() const
Definition YWidget.cc:277
Definition YTable.cc:36