mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-11 21:27:01 -04:00
Added list for refering to keyword parameters; keyword database updated when keywords change
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@270 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -34,32 +34,22 @@ class KeywordListAction : public Action {
|
||||
// therefore we don't need a smart pointer
|
||||
};
|
||||
|
||||
/// Adding a new keyword to a set
|
||||
enum Adding {ADD};
|
||||
enum Removing {REMOVE};
|
||||
|
||||
/// Adding or removing a keyword from a set
|
||||
class AddKeywordAction : public KeywordListAction {
|
||||
public:
|
||||
AddKeywordAction(Set& set);
|
||||
AddKeywordAction(Set& set, const KeywordP& keyword);
|
||||
AddKeywordAction(Adding, Set& set);
|
||||
AddKeywordAction(Removing, Set& set, const KeywordP& keyword);
|
||||
|
||||
virtual String getName(bool to_undo) const;
|
||||
virtual void perform(bool to_undo);
|
||||
|
||||
//private:
|
||||
const KeywordP keyword; ///< The new keyword
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------- : Remove Keyword
|
||||
|
||||
/// Removing a keyword from a set
|
||||
class RemoveKeywordAction : public KeywordListAction {
|
||||
public:
|
||||
RemoveKeywordAction(Set& set, const KeywordP& keyword);
|
||||
|
||||
virtual String getName(bool to_undo) const;
|
||||
virtual void perform(bool to_undo);
|
||||
|
||||
//private:
|
||||
const KeywordP keyword; ///< The removed keyword
|
||||
const size_t keyword_id; ///< Position of the keyword in the set
|
||||
const bool adding; ///< Was a keyword added? (as opposed to removed)
|
||||
const KeywordP keyword; ///< The new/removed keyword
|
||||
const size_t keyword_id; ///< Position of the keyword in the set
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------- : Changing keywords
|
||||
|
||||
Reference in New Issue
Block a user