QTfrontend/ammoSchemeModel.h
author unc0rr
Tue, 10 Mar 2009 17:55:44 +0000
changeset 1881 9b62d68c7b92
child 1884 40e59e9f82ce
permissions -rw-r--r--
Stub for ammo schemes model
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1881
9b62d68c7b92 Stub for ammo schemes model
unc0rr
parents:
diff changeset
     1
/*
9b62d68c7b92 Stub for ammo schemes model
unc0rr
parents:
diff changeset
     2
 * Hedgewars, a free turn based strategy game
9b62d68c7b92 Stub for ammo schemes model
unc0rr
parents:
diff changeset
     3
 * Copyright (c) 2009 Andrey Korotaev <unC0Rr@gmail.com>
9b62d68c7b92 Stub for ammo schemes model
unc0rr
parents:
diff changeset
     4
 *
9b62d68c7b92 Stub for ammo schemes model
unc0rr
parents:
diff changeset
     5
 * This program is free software; you can redistribute it and/or modify
9b62d68c7b92 Stub for ammo schemes model
unc0rr
parents:
diff changeset
     6
 * it under the terms of the GNU General Public License as published by
9b62d68c7b92 Stub for ammo schemes model
unc0rr
parents:
diff changeset
     7
 * the Free Software Foundation; version 2 of the License
9b62d68c7b92 Stub for ammo schemes model
unc0rr
parents:
diff changeset
     8
 *
9b62d68c7b92 Stub for ammo schemes model
unc0rr
parents:
diff changeset
     9
 * This program is distributed in the hope that it will be useful,
9b62d68c7b92 Stub for ammo schemes model
unc0rr
parents:
diff changeset
    10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9b62d68c7b92 Stub for ammo schemes model
unc0rr
parents:
diff changeset
    11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
9b62d68c7b92 Stub for ammo schemes model
unc0rr
parents:
diff changeset
    12
 * GNU General Public License for more details.
9b62d68c7b92 Stub for ammo schemes model
unc0rr
parents:
diff changeset
    13
 *
9b62d68c7b92 Stub for ammo schemes model
unc0rr
parents:
diff changeset
    14
 * You should have received a copy of the GNU General Public License
9b62d68c7b92 Stub for ammo schemes model
unc0rr
parents:
diff changeset
    15
 * along with this program; if not, write to the Free Software
9b62d68c7b92 Stub for ammo schemes model
unc0rr
parents:
diff changeset
    16
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
9b62d68c7b92 Stub for ammo schemes model
unc0rr
parents:
diff changeset
    17
 */
9b62d68c7b92 Stub for ammo schemes model
unc0rr
parents:
diff changeset
    18
9b62d68c7b92 Stub for ammo schemes model
unc0rr
parents:
diff changeset
    19
#ifndef _AMMO_SCHEME_MODEL_INCLUDED
9b62d68c7b92 Stub for ammo schemes model
unc0rr
parents:
diff changeset
    20
#define _AMMO_SCHEME_MODEL_INCLUDED
9b62d68c7b92 Stub for ammo schemes model
unc0rr
parents:
diff changeset
    21
9b62d68c7b92 Stub for ammo schemes model
unc0rr
parents:
diff changeset
    22
#include <QAbstractTableModel>
9b62d68c7b92 Stub for ammo schemes model
unc0rr
parents:
diff changeset
    23
#include <QStringList>
9b62d68c7b92 Stub for ammo schemes model
unc0rr
parents:
diff changeset
    24
9b62d68c7b92 Stub for ammo schemes model
unc0rr
parents:
diff changeset
    25
class AmmoSchemeModel : public QAbstractTableModel
9b62d68c7b92 Stub for ammo schemes model
unc0rr
parents:
diff changeset
    26
{
9b62d68c7b92 Stub for ammo schemes model
unc0rr
parents:
diff changeset
    27
	Q_OBJECT
9b62d68c7b92 Stub for ammo schemes model
unc0rr
parents:
diff changeset
    28
9b62d68c7b92 Stub for ammo schemes model
unc0rr
parents:
diff changeset
    29
public:
9b62d68c7b92 Stub for ammo schemes model
unc0rr
parents:
diff changeset
    30
	AmmoSchemeModel(QObject *parent = 0);
9b62d68c7b92 Stub for ammo schemes model
unc0rr
parents:
diff changeset
    31
9b62d68c7b92 Stub for ammo schemes model
unc0rr
parents:
diff changeset
    32
	QVariant headerData(int section, Qt::Orientation orientation, int role) const;
9b62d68c7b92 Stub for ammo schemes model
unc0rr
parents:
diff changeset
    33
	int rowCount(const QModelIndex & parent) const;
9b62d68c7b92 Stub for ammo schemes model
unc0rr
parents:
diff changeset
    34
	int columnCount(const QModelIndex & parent) const;
9b62d68c7b92 Stub for ammo schemes model
unc0rr
parents:
diff changeset
    35
	Qt::ItemFlags flags(const QModelIndex & index) const;
9b62d68c7b92 Stub for ammo schemes model
unc0rr
parents:
diff changeset
    36
	bool setData(const QModelIndex & index, const QVariant & value, int role = Qt::EditRole);
9b62d68c7b92 Stub for ammo schemes model
unc0rr
parents:
diff changeset
    37
9b62d68c7b92 Stub for ammo schemes model
unc0rr
parents:
diff changeset
    38
signals:
9b62d68c7b92 Stub for ammo schemes model
unc0rr
parents:
diff changeset
    39
	void dataChanged(const QModelIndex & topLeft, const QModelIndex & bottomRight);
9b62d68c7b92 Stub for ammo schemes model
unc0rr
parents:
diff changeset
    40
9b62d68c7b92 Stub for ammo schemes model
unc0rr
parents:
diff changeset
    41
protected:
9b62d68c7b92 Stub for ammo schemes model
unc0rr
parents:
diff changeset
    42
	QList<QStringList> schemes;
9b62d68c7b92 Stub for ammo schemes model
unc0rr
parents:
diff changeset
    43
};
9b62d68c7b92 Stub for ammo schemes model
unc0rr
parents:
diff changeset
    44
9b62d68c7b92 Stub for ammo schemes model
unc0rr
parents:
diff changeset
    45
#endif // _AMMO_SCHEME_MODEL_INCLUDED