query = new SqlAsyncQuery;
query->setCallback([this](){ fetchComplete();});
-
- if (m_type != RootNode)
- return;
-
- itemData << "Title" << "Episode / Version" << "Rating / Quality" << "Vote" << "Watched / Renamed";
}
MyListNode::~MyListNode()
QVariant MyListNode::data(int column, int role) const
{
- if (role == Qt::DisplayRole)
- return itemData.value(column);
- else
+ if (role != Qt::DisplayRole)
return QVariant();
+
+ switch (column)
+ {
+ case 0:
+ return QObject::tr("Title");
+ case 1:
+ return QObject::tr("Episode / Version");
+ case 2:
+ return QObject::tr("Rating / Quality");
+ case 3:
+ return QObject::tr("Vote");
+ case 4:
+ return QObject::tr("Watched / Renamed");
+ }
+
+ return QVariant();
}
MyListNode *MyListNode::parent()
QList<MyListNode *> childItems;
QList<MyListNode *> newItems;
- QList<QVariant> itemData;
MyListNode *parentItem;
MyListModel *model;
SqlAsyncQuery *query;
bool m_working;
- static const int LIMIT = 200;
+ static const int LIMIT = 500;
};
class LOCALMYLISTSHARED_EXPORT MyListAnimeNode : public MyListNode