1
/* ============================================================
3
* This file is a part of digiKam project
4
* http://www.digikam.org
7
* Description : a test for the StateSavingObject class
9
* Copyright (C) 2009 by Johannes Wienke <languitar at semipol dot de>
11
* This program is free software; you can redistribute it
12
* and/or modify it under the terms of the GNU General
13
* Public License as published by the Free Software Foundation;
14
* either version 2, or (at your option)
17
* This program is distributed in the hope that it will be useful,
18
* but WITHOUT ANY WARRANTY; without even the implied warranty of
19
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20
* GNU General Public License for more details.
22
* ============================================================ */
24
#ifndef STATESAVINGOBJECTTEST_H
25
#define STATESAVINGOBJECTTEST_H
29
#include <QtTest/QtTest>
33
#include "statesavingobject.h"
37
class StateSavingObjectTest: public QObject
44
void testPrefixUsage();
45
void testDirectCalling();
46
void testDirectChildrenLoading();
47
void testDirectChildrenSaving();
48
void testRecursiveChildrenLoading();
49
void testRecursiveChildrenSaving();
53
class StubStateSaverPriv;
54
class StubStateSaver: public QObject, public Digikam::StateSavingObject
58
StubStateSaver(QObject* parent = 0);
59
virtual ~StubStateSaver();
61
KConfigGroup getGroup();
62
QString getEntryKey(const QString& base);
70
unsigned int numLoadCalls();
71
unsigned int numSaveCalls();
74
StubStateSaverPriv* d;
78
#endif /* STATESAVINGOBJECTTEST_H */