Quark  0.1
StringListModel.h++
Go to the documentation of this file.
1 #ifndef __libquark_gui_StringListModel_hxx
2 #define __libquark_gui_StringListModel_hxx
3 
4 #include <QString>
5 #include <QStringList>
6 
8 #include <quark/Quark.h++>
9 
10 namespace quark {
11 namespace gui {
12 
19 {
20  Q_OBJECT;
21 
22  public:
23 
29  StringListModel(bool sorted = true);
30  virtual ~StringListModel();
31 
32  enum Field { FIELD_VALUE };
33 
35  void setStringList(const QStringList &list);
36 
38  QStringList getStringList() const;
39 
40  protected:
41 
42  virtual QVariant getFieldValue(const QString& item, int field) const
43  { return(item); }
44 
45  private:
46 
47  Q_DISABLE_COPY(StringListModel);
48 };
49 
50 } // namespace gui
51 } // namespace quark
52 
53 #endif // __libquark_gui_StringListModel_hxx
Definition: BarChartView.h++:6
A partial implementation of AbstractTableModel that stores its elements in a QVector.
Definition: BasicTableModel.h++:17
A data model for storing a list of strings.
Definition: StringListModel.h++:18
Field
Definition: StringListModel.h++:32
#define LIBQUARK_API
Definition: Quark.h++:18
virtual QVariant getFieldValue(const QString &item, int field) const
Returns the value of the given field of an object.
Definition: StringListModel.h++:42