7723
|
1 |
#include "playerslistmodel.h"
|
|
2 |
|
|
3 |
PlayersListModel::PlayersListModel(QObject *parent) :
|
|
4 |
QStringListModel(parent)
|
|
5 |
{
|
|
6 |
|
|
7 |
}
|
|
8 |
|
|
9 |
void PlayersListModel::addPlayer(const QString & nickname)
|
|
10 |
{
|
|
11 |
insertRows(rowCount(), 1);
|
|
12 |
|
|
13 |
setData(index(rowCount() - 1), nickname);
|
|
14 |
}
|