File indexing completed on 2024-05-12 05:39:49
0001 /************************************************************************* 0002 * Copyright (C) 2011 by Joseph Boudou * 0003 * * 0004 * https://rolisteam.org/ * 0005 * * 0006 * Rolisteam is free software; you can redistribute it and/or modify * 0007 * it under the terms of the GNU General Public License as published * 0008 * by the Free Software Foundation; either version 2 of the License, * 0009 * or (at your option) any later version. * 0010 * * 0011 * This program is distributed in the hope that it will be useful, * 0012 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 0013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 0014 * GNU General Public License for more details. * 0015 * * 0016 * You should have received a copy of the GNU General Public License * 0017 * along with this program; if not, write to the * 0018 * Free Software Foundation, Inc., * 0019 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * 0020 *************************************************************************/ 0021 0022 #ifndef LOCAL_PERSON_MODEL_H 0023 #define LOCAL_PERSON_MODEL_H 0024 0025 #include "model/playermodel.h" 0026 #include <QAbstractProxyModel> 0027 #include <core_global.h> 0028 /** 0029 * @brief The LocalPersonModel class 0030 */ 0031 class CORE_EXPORT LocalPersonModel : public QAbstractProxyModel 0032 { 0033 Q_OBJECT 0034 public: 0035 LocalPersonModel(); 0036 0037 QModelIndex mapFromSource(const QModelIndex& sourceIndex) const override; 0038 QModelIndex mapToSource(const QModelIndex& proxyIndex) const override; 0039 0040 QHash<int, QByteArray> roleNames() const override; 0041 0042 virtual void setSourceModel(QAbstractItemModel* sourceModel) override; 0043 virtual QModelIndex index(int, int, const QModelIndex&) const override; 0044 virtual QModelIndex parent(const QModelIndex& idx= QModelIndex()) const override; 0045 virtual int rowCount(const QModelIndex& parent= QModelIndex()) const override; 0046 virtual int columnCount(const QModelIndex& parent= QModelIndex()) const override; 0047 }; 0048 0049 #endif