mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
5aa892e834
* Add operator[] to ConcurrentMap which returns a TValue reference * BTTV/FFZ channel emotes are now stored in the Emote Manager, and each Channel object has a reference to their own BTTV/FFZ channel emote map. * Restructure EmoteManager a bit (simplify the ConcurrentMap havoc). * Add EmoteData struct which can store emote data (for now only messages::LazyLoadedImage*) * Add CompletionManager that does nothing
52 lines
1 KiB
C++
52 lines
1 KiB
C++
#pragma once
|
|
|
|
#include <QAbstractItemModel>
|
|
|
|
#include <string>
|
|
|
|
namespace chatterino {
|
|
|
|
class CompletionModel : public QAbstractItemModel
|
|
{
|
|
public:
|
|
virtual int columnCount(const QModelIndex & /*parent*/) const override
|
|
{
|
|
return 1;
|
|
}
|
|
|
|
virtual QVariant data(const QModelIndex &index, int role) const override
|
|
{
|
|
// TODO: Implement
|
|
return QVariant();
|
|
}
|
|
|
|
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const override
|
|
{
|
|
// TODO: Implement
|
|
return QModelIndex();
|
|
}
|
|
|
|
virtual QModelIndex parent(const QModelIndex &child) const override
|
|
{
|
|
return QModelIndex();
|
|
}
|
|
|
|
virtual int rowCount(const QModelIndex &parent) const override
|
|
{
|
|
return 1;
|
|
}
|
|
};
|
|
|
|
class CompletionManager
|
|
{
|
|
CompletionManager();
|
|
|
|
public:
|
|
CompletionModel *createModel(const std::string &channelName);
|
|
void updateModel(CompletionModel *model, const std::string &channelName);
|
|
|
|
friend class Application;
|
|
};
|
|
|
|
} // namespace chatterino
|