mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
cosmetics and doxygen.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26634 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
5cfe7daadb
commit
6bd9b43ce5
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user