8ebd6975d7
- renamed library - added support for saving loading current game - added (still crappy) nonogram solver - some code cleanups
65 lines
2.7 KiB
C++
65 lines
2.7 KiB
C++
/***************************************************************************
|
|
* Copyright (C) 2008 by Oliver Groß *
|
|
* z.o.gross@gmx.de *
|
|
* *
|
|
* This program is free software; you can redistribute it and/or modify *
|
|
* it under the terms of the GNU General Public License as published by *
|
|
* the Free Software Foundation; either version 2 of the License, or *
|
|
* (at your option) any later version. *
|
|
* *
|
|
* This program is distributed in the hope that it will be useful, *
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
|
* GNU General Public License for more details. *
|
|
* *
|
|
* You should have received a copy of the GNU General Public License *
|
|
* along with this program; if not, write to the *
|
|
* Free Software Foundation, Inc., *
|
|
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
|
***************************************************************************/
|
|
#ifndef QCROSS_CMASKEDCROSSPACKAGEMODEL_H
|
|
#define QCROSS_CMASKEDCROSSPACKAGEMODEL_H
|
|
|
|
#include <libqnono/ccrosspackagemodel.h>
|
|
#include <QSortFilterProxyModel>
|
|
|
|
namespace qcross {
|
|
class CHighscore;
|
|
|
|
/**
|
|
@author Oliver Groß <z.o.gross@gmx.de>
|
|
*/
|
|
class CMaskedCrossPackageModel : public libqnono::CCrossPackageModel {
|
|
Q_OBJECT
|
|
public:
|
|
CMaskedCrossPackageModel(QObject * parent = 0);
|
|
~CMaskedCrossPackageModel();
|
|
|
|
void setHighscore(CHighscore * highscore);
|
|
|
|
// virtual QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
|
|
virtual int columnCount(const QModelIndex & parent = QModelIndex()) const;
|
|
virtual QVariant data(const QModelIndex & index, int role = Qt::DisplayRole) const;
|
|
virtual Qt::ItemFlags flags(const QModelIndex & index) const;
|
|
protected:
|
|
CHighscore * m_Highscore;
|
|
};
|
|
|
|
class CMaskedCrossPackageProxyModel : public QSortFilterProxyModel {
|
|
Q_OBJECT
|
|
public:
|
|
CMaskedCrossPackageProxyModel(QObject * parent = 0);
|
|
|
|
bool unfinishedFilter() { return m_UnfinishedFilter; }
|
|
public slots:
|
|
void setUnfinishedFilter(bool value);
|
|
protected:
|
|
bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const;
|
|
private:
|
|
bool m_UnfinishedFilter;
|
|
};
|
|
|
|
}
|
|
|
|
#endif
|