OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
idcompletionmanager.hpp
Go to the documentation of this file.
1 #ifndef CSM_WORLD_IDCOMPLETIONMANAGER_HPP
2 #define CSM_WORLD_IDCOMPLETIONMANAGER_HPP
3 
4 #include <vector>
5 #include <map>
6 
7 #include <boost/shared_ptr.hpp>
8 
9 #include "columnbase.hpp"
10 #include "universalid.hpp"
11 
12 class QCompleter;
13 
14 namespace CSMWorld
15 {
16  class Data;
17 
20  {
21  static const std::map<ColumnBase::Display, UniversalId::Type> sCompleterModelTypes;
22 
23  std::map<ColumnBase::Display, boost::shared_ptr<QCompleter> > mCompleters;
24 
25  // Don't allow copying
28 
29  void generateCompleters(Data &data);
30 
31  public:
32  static std::vector<ColumnBase::Display> getDisplayTypes();
33 
35 
36  bool hasCompleterFor(ColumnBase::Display display) const;
37  boost::shared_ptr<QCompleter> getCompleter(ColumnBase::Display display);
38  };
39 }
40 
41 #endif
boost::shared_ptr< QCompleter > getCompleter(ColumnBase::Display display)
Definition: idcompletionmanager.cpp:80
Creates and stores all ID completers.
Definition: idcompletionmanager.hpp:19
Display
Definition: columnbase.hpp:39
static const std::map< ColumnBase::Display, UniversalId::Type > sCompleterModelTypes
Definition: idcompletionmanager.hpp:21
std::map< ColumnBase::Display, boost::shared_ptr< QCompleter > > mCompleters
Definition: idcompletionmanager.hpp:23
bool hasCompleterFor(ColumnBase::Display display) const
Definition: idcompletionmanager.cpp:75
void generateCompleters(Data &data)
Definition: idcompletionmanager.cpp:89
Definition: data.hpp:77
IdCompletionManager & operator=(const IdCompletionManager &)
static std::vector< ColumnBase::Display > getDisplayTypes()
Definition: idcompletionmanager.cpp:54
IdCompletionManager(const IdCompletionManager &)