edbee - Qt Editor Library
texteditorcommandmap.h
Go to the documentation of this file.
1 
6 #pragma once
7 
8 #include <QObject>
9 #include <QMap>
10 #include <QString>
11 
12 
13 namespace edbee {
14 
15 class TextEditorCommand;
16 
19 class TextEditorCommandMap : public QObject
20 {
21  Q_OBJECT
22 public:
23  explicit TextEditorCommandMap(QObject *parent = 0);
24  virtual ~TextEditorCommandMap();
25 
26  void loadFactoryCommandMap();
27 
28  void give( const QString& key, TextEditorCommand* command );
29  TextEditorCommand* get( const QString& key );
30 
31 private:
32  QMap<QString,TextEditorCommand*> commandMap_;
33 };
34 
35 } // edbee
void give(const QString &key, TextEditorCommand *command)
gives the command to this command map
Definition: texteditorcommandmap.cpp:42
This is the abstract base class for a textcommand.
Definition: texteditorcommand.h:49
void loadFactoryCommandMap()
This method fills this command map with the factory commands.
Definition: texteditorcommandmap.cpp:33
virtual ~TextEditorCommandMap()
Destructs the command map.
Definition: texteditorcommandmap.cpp:25
Copyright 2011-2013 - Reliable Bits Software by Blommers IT.
Definition: commentcommand.cpp:22
This is a texteditor map. This is used to map Command-Names to commands This class is the owner of th...
Definition: texteditorcommandmap.h:19
TextEditorCommandMap(QObject *parent=0)
Constructs the editor commandmap This constructors also initializes the map with the default editor a...
Definition: texteditorcommandmap.cpp:18