summaryrefslogtreecommitdiffstats
path: root/examples/widgets/itemviews/addressbook/tablemodel.h
diff options
context:
space:
mode:
Diffstat (limited to 'examples/widgets/itemviews/addressbook/tablemodel.h')
-rw-r--r--examples/widgets/itemviews/addressbook/tablemodel.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/examples/widgets/itemviews/addressbook/tablemodel.h b/examples/widgets/itemviews/addressbook/tablemodel.h
index f180231094..6159d2c669 100644
--- a/examples/widgets/itemviews/addressbook/tablemodel.h
+++ b/examples/widgets/itemviews/addressbook/tablemodel.h
@@ -42,8 +42,8 @@
#define TABLEMODEL_H
#include <QAbstractTableModel>
-#include <QPair>
#include <QList>
+#include <QPair>
//! [0]
class TableModel : public QAbstractTableModel
@@ -51,22 +51,22 @@ class TableModel : public QAbstractTableModel
Q_OBJECT
public:
- TableModel(QObject *parent=0);
- TableModel(QList< QPair<QString, QString> > listofPairs, QObject *parent=0);
+ TableModel(QObject *parent = 0);
+ TableModel(QList<QPair<QString, QString> > listofPairs, QObject *parent = 0);
int rowCount(const QModelIndex &parent) const;
int columnCount(const QModelIndex &parent) const;
QVariant data(const QModelIndex &index, int role) const;
QVariant headerData(int section, Qt::Orientation orientation, int role) const;
Qt::ItemFlags flags(const QModelIndex &index) const;
- bool setData(const QModelIndex &index, const QVariant &value, int role=Qt::EditRole);
- bool insertRows(int position, int rows, const QModelIndex &index=QModelIndex());
- bool removeRows(int position, int rows, const QModelIndex &index=QModelIndex());
- QList< QPair<QString, QString> > getList();
+ bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole);
+ bool insertRows(int position, int rows, const QModelIndex &index = QModelIndex());
+ bool removeRows(int position, int rows, const QModelIndex &index = QModelIndex());
+ QList<QPair<QString, QString> > getList();
private:
- QList< QPair<QString, QString> > listOfPairs;
+ QList<QPair<QString, QString> > listOfPairs;
};
//! [0]
-#endif
+#endif // TABLEMODEL_H