1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 08:49:55 +00:00
openmw-tes3mp/apps/opencs/model/world/idcompletionmanager.hpp
2015-05-31 18:18:49 +03:00

38 lines
1 KiB
C++

#ifndef CSM_WORLD_IDCOMPLETIONMANAGER_HPP
#define CSM_WORLD_IDCOMPLETIONMANAGER_HPP
#include <map>
#include <boost/shared_ptr.hpp>
#include "columns.hpp"
#include "universalid.hpp"
class QCompleter;
namespace CSMWorld
{
class Data;
/// \brief Creates and stores all ID completers
class IdCompletionManager
{
static const std::map<CSMWorld::Columns::ColumnId, CSMWorld::UniversalId::Type> sCompleterModelTypes;
std::map<CSMWorld::Columns::ColumnId, boost::shared_ptr<QCompleter> > mCompleters;
// Don't allow copying
IdCompletionManager(const IdCompletionManager &);
IdCompletionManager &operator = (const IdCompletionManager &);
void generateCompleters(CSMWorld::Data &data);
public:
IdCompletionManager(CSMWorld::Data &data);
bool isCompleterExistFor(CSMWorld::Columns::ColumnId id) const;
boost::shared_ptr<QCompleter> getCompleter(CSMWorld::Columns::ColumnId id);
};
}
#endif