QTfrontend/model/playerslistmodel.cpp
changeset 7723 ca05b576ec74
child 7725 4ad05a478c6c
equal deleted inserted replaced
7722:1518827049ed 7723:ca05b576ec74
       
     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 }