summaryrefslogtreecommitdiffstats
path: root/examples/widgets/itemviews/addressbook/tablemodel.h
diff options
context:
space:
mode:
authorDavid Schulz <david.schulz@digia.com>2012-11-21 15:45:13 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-11-22 08:24:26 +0100
commit78a239bc6d344f53cf48e4bceca7d45df69220e6 (patch)
tree954f97b37634b7aa86c75e6833180cab946bce27 /examples/widgets/itemviews/addressbook/tablemodel.h
parent8a83c1bb5504d34e07ce7cce36c10b6d5a9876bd (diff)
QtBase: examples/widgets/itemviews/addressbook codestyle
Change-Id: I710d67018351c34ef14ac30edcca81aba7ff5ad3 Reviewed-by: hjk <qthjk@ovi.com>
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