diff options
Diffstat (limited to 'tests/mocks/Dictionary_mock.h')
-rw-r--r-- | tests/mocks/Dictionary_mock.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/mocks/Dictionary_mock.h b/tests/mocks/Dictionary_mock.h new file mode 100644 index 0000000..0b29fbb --- /dev/null +++ b/tests/mocks/Dictionary_mock.h @@ -0,0 +1,32 @@ +#ifndef DICTIONARY_MOCK_H +#define DICTIONARY_MOCK_H + +#include <QtCore> + +#include "../../src/dictionary/IDictionary.h" +#include "../../src/dictionary/TreeItem.h" + +class MockDictionary: public TreeItem, public IDictionary +{ +Q_OBJECT +public: + const TreeItem* parent() const { return NULL; } + const TreeItem* child(int) const { return NULL; } + int childCount() const { return 0; } + int columnCount() const { return 0; } + QVariant data(int) const { return QVariant(); } + int row() const { return 0; } + int topParentRow() const { return 0; } + + const Field* field(int) const { return NULL; } + const Field* field(const QString) const { return NULL; } + int indexOfCardPack(CardPack*) const { return 0; } + + void addCardPack(CardPack* aCardPack); + +signals: + void entryChanged( int aEntryIx, int aFieldIx ); + void entriesRemoved( int aIndex, int aNum ); +}; + +#endif |