]> git.lyx.org Git - features.git/commitdiff
cosmetics and doxygen.
authorAbdelrazak Younes <younes@lyx.org>
Tue, 30 Sep 2008 07:38:34 +0000 (07:38 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Tue, 30 Sep 2008 07:38:34 +0000 (07:38 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26634 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/TocModel.cpp
src/frontends/qt4/TocModel.h

index 37f8b704b28a19a66521b954066524cb6cd3c5d9..73e20c65901c3167e1c1579feb1e557e2107e06d 100644 (file)
@@ -36,7 +36,7 @@ namespace frontend {
 
 ///////////////////////////////////////////////////////////////////////////////
 //
-// TocModels
+// TocTypeModel
 //
 ///////////////////////////////////////////////////////////////////////////////
 
@@ -52,6 +52,12 @@ void TocTypeModel::reset()
 }
 
 
+///////////////////////////////////////////////////////////////////////////////
+//
+// TocModel
+//
+///////////////////////////////////////////////////////////////////////////////
+
 TocModel::TocModel(QObject * parent)
        : model_(new TocTypeModel(parent)),
        sorted_model_(new QSortFilterProxyModel(parent)),
@@ -95,6 +101,7 @@ void TocModel::sort(bool sort_it)
                sorted_model_->sort(0);
 }
 
+
 TocItem const & TocModel::tocItem(QModelIndex const & index) const
 {
        return (*toc_)[model()->data(index, Qt::UserRole).toUInt()];
@@ -199,7 +206,7 @@ void TocModel::populate(unsigned int & index, QModelIndex const & parent)
 int TocModel::modelDepth() const
 {
        int const d = maxdepth_ - mindepth_;
-       LASSERT(d >= 0 && d <= 100, /* */);
+       LASSERT(d >= 0 && d <= 100, return 0);
        return d;
 }
 
index f4ac2a28c6791b2be4af3d62917840ae42d2d985..6385a586b5c61ea170bad2ead3d25394d71d1d3e 100644 (file)
@@ -29,6 +29,8 @@ class TocItem;
 
 namespace frontend {
 
+/// A QStandardItemModel that gives access to the reset method.
+/// This is needed in order to fix http://bugzilla.lyx.org/show_bug.cgi?id=3740
 class TocTypeModel : public QStandardItemModel
 {
 public:
@@ -38,7 +40,9 @@ public:
        void reset();
 };
 
-
+/// A class that adapt the TocBackend of a Buffer into standard Qt models for
+/// GUI visualisation.
+/// There is one TocModel per list in the TocBackend.
 class TocModel
 {
 public:
@@ -83,6 +87,7 @@ private:
 };
 
 
+/// A container for the different TocModels.
 class TocModels : public QObject
 {
        Q_OBJECT