blob: e0041d215ee5de619784adaecf9430cd1ed4fe1f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
#pragma once
#include <QList>
#include <QVariant>
namespace Swift {
class RosterItem : public QObject {
Q_OBJECT
public:
RosterItem(RosterItem* parent);
~RosterItem();
void addChild(RosterItem* child);
RosterItem* getParentItem();
int rowCount();
int rowOf(RosterItem* item);
int row();
RosterItem* getItem(int row);
QVariant data(int role);
void setName(QString name);
signals:
void changed();
private:
QList<RosterItem*> children_;
RosterItem* parent_;
QString name_;
};
}
|