Help from Andre.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22524 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Richard Heck 2008-01-12 16:11:55 +00:00
parent e3699e1a47
commit a60b6d90d9
2 changed files with 8 additions and 13 deletions

View File

@ -21,11 +21,6 @@ using std::vector;
namespace lyx {
namespace frontend {
GuiIdListModel::GuiIdListModel() :
QAbstractListModel()
{}
QVariant GuiIdListModel::data(QModelIndex const & index, int role) const
{
int const row = index.row();

View File

@ -16,12 +16,12 @@
#ifndef GUIIDLISTMODEL_H
#define GUIIDLISTMODEL_H
#include "support/qstring_helpers.h"
#include <QAbstractListModel>
#include <vector>
#include <string>
#include "support/qstring_helpers.h"
namespace lyx {
namespace frontend {
@ -39,7 +39,7 @@ namespace frontend {
class GuiIdListModel : public QAbstractListModel {
public:
///
explicit GuiIdListModel();
explicit GuiIdListModel() {};
//////////////////////////////////////////////////////////////////////
// Methods overridden from QAbstractListModel
//////////////////////////////////////////////////////////////////////
@ -63,16 +63,16 @@ public:
// New methods
//////////////////////////////////////////////////////////////////////
///
inline void setUIString(QModelIndex const & index, QString const & value)
void setUIString(QModelIndex const & index, QString const & value)
{ setData(index, value); };
///
inline void setUIString(int const i, std::string const & value)
void setUIString(int const i, std::string const & value)
{ setUIString(index(i), toqstr(value)); };
///
inline void setIDString(QModelIndex const & index, QString const & value)
void setIDString(QModelIndex const & index, QString const & value)
{ setData(index, value, Qt::UserRole); };
///
inline void setIDString(int const i, std::string const & value)
void setIDString(int const i, std::string const & value)
{ setIDString(index(i), toqstr(value)); };
///
virtual QString getIDString(QModelIndex const & index) const
@ -112,7 +112,7 @@ private:
///
inline bool rowIsValid(int const i) const
{
return (i >= 0 && (i <= userData_.size()));
return i >= 0 && i <= userData_.size();
}
;
};