summaryrefslogtreecommitdiffstats
path: root/examples/tutorials/modelview/4_headers/mymodel.cpp
diff options
context:
space:
mode:
authorDavid Boddie <dboddie@trolltech.com>2010-07-13 15:04:31 (GMT)
committerDavid Boddie <dboddie@trolltech.com>2010-07-13 15:04:31 (GMT)
commit5608f5c35dd3f4470f51436ead9a7048d561affa (patch)
tree4a797f9b89b8f811345ddb9752ef6cf391da6336 /examples/tutorials/modelview/4_headers/mymodel.cpp
parent3e326e54856b1fce33ab2c005de2a46af6a4ea0f (diff)
downloadQt-5608f5c35dd3f4470f51436ead9a7048d561affa.zip
Qt-5608f5c35dd3f4470f51436ead9a7048d561affa.tar.gz
Qt-5608f5c35dd3f4470f51436ead9a7048d561affa.tar.bz2
Doc: Reviewed Michael's model/view tutorial and overview document.
Reviewed-by: Trust Me
Diffstat (limited to 'examples/tutorials/modelview/4_headers/mymodel.cpp')
-rwxr-xr-xexamples/tutorials/modelview/4_headers/mymodel.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/tutorials/modelview/4_headers/mymodel.cpp b/examples/tutorials/modelview/4_headers/mymodel.cpp
index 94fde34..e6f977d 100755
--- a/examples/tutorials/modelview/4_headers/mymodel.cpp
+++ b/examples/tutorials/modelview/4_headers/mymodel.cpp
@@ -46,21 +46,21 @@ MyModel::MyModel(QObject *parent)
}
//-------------------------------------------------------
-int MyModel::rowCount(const QModelIndex & /*parent*/ ) const
+int MyModel::rowCount(const QModelIndex & /*parent*/) const
{
return 2;
}
//-------------------------------------------------------
-int MyModel::columnCount(const QModelIndex & /*parent*/ ) const
+int MyModel::columnCount(const QModelIndex & /*parent*/) const
{
return 3;
}
//-------------------------------------------------------
-QVariant MyModel::data(const QModelIndex &index, int role ) const
+QVariant MyModel::data(const QModelIndex &index, int role) const
{
- if(role == Qt::DisplayRole)
+ if (role == Qt::DisplayRole)
{
return QString("Row%1, Column%2")
.arg(index.row() + 1)
@@ -88,4 +88,4 @@ QVariant MyModel::headerData(int section, Qt::Orientation orientation, int role)
}
return QVariant();
}
-//! [quoting mymodel_c] \ No newline at end of file
+//! [quoting mymodel_c]