diff options
author | Michael D Scull <ext-michael.scull@nokia.com> | 2010-06-23 15:19:49 (GMT) |
---|---|---|
committer | David Boddie <dboddie@trolltech.com> | 2010-07-07 15:10:04 (GMT) |
commit | ca10c2c5a8190cac9c2ae0526f2e250add09d6f2 (patch) | |
tree | b139acbf3f7a5cfd25a9980f78324ff6abeca27a /examples/tutorials/modelview/5_edit | |
parent | 6de484f195366b560e10f95b04d2f0e7303a2b63 (diff) | |
download | Qt-ca10c2c5a8190cac9c2ae0526f2e250add09d6f2.zip Qt-ca10c2c5a8190cac9c2ae0526f2e250add09d6f2.tar.gz Qt-ca10c2c5a8190cac9c2ae0526f2e250add09d6f2.tar.bz2 |
correction of snippet tags
Diffstat (limited to 'examples/tutorials/modelview/5_edit')
-rwxr-xr-x | examples/tutorials/modelview/5_edit/mymodel.cpp | 8 | ||||
-rwxr-xr-x | examples/tutorials/modelview/5_edit/mymodel.h | 2 |
2 files changed, 9 insertions, 1 deletions
diff --git a/examples/tutorials/modelview/5_edit/mymodel.cpp b/examples/tutorials/modelview/5_edit/mymodel.cpp index c64a6b7..ef45bc3 100755 --- a/examples/tutorials/modelview/5_edit/mymodel.cpp +++ b/examples/tutorials/modelview/5_edit/mymodel.cpp @@ -1,3 +1,4 @@ +//! [quoting mymodel_d] #include "mymodel.h" const int COLS= 3; @@ -9,7 +10,9 @@ MyModel::MyModel(QObject *parent) //gridData needs to have 6 element, one for each table cell m_gridData << "1/1" << "1/2" << "1/3" << "2/1" << "2/2" << "2/3" ; } +//! [quoting mymodel_d] +//! [quoting mymodel_e] //------------------------------------------------------- int MyModel::rowCount(const QModelIndex & /*parent*/ ) const { @@ -31,8 +34,11 @@ QVariant MyModel::data(const QModelIndex &index, int role ) const } return QVariant(); } +//! [quoting mymodel_e] //----------------------------------------------------------------- + +//! [quoting mymodel_f] bool MyModel::setData ( const QModelIndex & index, const QVariant & value, int role ) { if(role == Qt::EditRole) @@ -55,4 +61,4 @@ int MyModel::modelIndexToOffset(const QModelIndex & index) const { return index.row()*COLS + index.column(); } - +//! [quoting mymodel_f] diff --git a/examples/tutorials/modelview/5_edit/mymodel.h b/examples/tutorials/modelview/5_edit/mymodel.h index f8fac77..1612fa0 100755 --- a/examples/tutorials/modelview/5_edit/mymodel.h +++ b/examples/tutorials/modelview/5_edit/mymodel.h @@ -1,3 +1,4 @@ +//! [Quoting ModelView Tutorial] #ifndef MYMODEL_H #define MYMODEL_H @@ -22,3 +23,4 @@ signals: }; #endif // MYMODEL_H +//! [Quoting ModelView Tutorial]
\ No newline at end of file |