1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-22 07:23:52 +00:00
openmw/apps/opencs/model/world/idcompletionmanager.hpp

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

41 lines
996 B
C++
Raw Normal View History

2015-05-30 12:31:44 +00:00
#ifndef CSM_WORLD_IDCOMPLETIONMANAGER_HPP
#define CSM_WORLD_IDCOMPLETIONMANAGER_HPP
#include <map>
#include <memory>
#include <vector>
2015-05-30 12:31:44 +00:00
#include "columnbase.hpp"
2015-05-30 12:31:44 +00:00
#include "universalid.hpp"
class QCompleter;
namespace CSMWorld
{
class Data;
/// \brief Creates and stores all ID completers
class IdCompletionManager
{
static const std::map<ColumnBase::Display, UniversalId::Type> sCompleterModelTypes;
2015-05-30 12:31:44 +00:00
std::map<ColumnBase::Display, std::shared_ptr<QCompleter>> mCompleters;
2015-05-30 12:31:44 +00:00
// Don't allow copying
IdCompletionManager(const IdCompletionManager&);
IdCompletionManager& operator=(const IdCompletionManager&);
void generateCompleters(Data& data);
2015-05-30 12:31:44 +00:00
public:
static std::vector<ColumnBase::Display> getDisplayTypes();
2015-05-30 12:31:44 +00:00
IdCompletionManager(Data& data);
bool hasCompleterFor(ColumnBase::Display display) const;
std::shared_ptr<QCompleter> getCompleter(ColumnBase::Display display);
2015-05-30 12:31:44 +00:00
};
}
#endif