Minor cleanups in model and connect
[squawker.git] / timeline.cpp
blob04147efede13f5705b457431046893eadd8487eb
1 #include "timeline.h"
2 #include <QDebug>
3 #include "roles.h"
5 Timeline::Timeline(QObject *parent) : QStandardItemModel(parent)
9 bool Timeline::hasItem(QStandardItem *item)
11 // Have to add this extra check, to avoid the
12 // match when we have no items.
13 if (rowCount() == 0)
14 return false;
16 QModelIndexList tmp = match(index(0,0), Id, item->data(Id));
18 // Has the item
19 if (tmp.size() > 0)
20 return true;
22 // Dont have the item.
23 return false;