2
Gwenview: an image viewer
3
Copyright 2007 Aurélien Gâteau <agateau@kde.org>
5
This program is free software; you can redistribute it and/or
6
modify it under the terms of the GNU General Public License
7
as published by the Free Software Foundation; either version 2
8
of the License, or (at your option) any later version.
10
This program is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
GNU General Public License for more details.
15
You should have received a copy of the GNU General Public License
16
along with this program; if not, write to the Free Software
17
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20
#ifndef DOCUMENTTEST_H
21
#define DOCUMENTTEST_H
30
#include "../lib/document/document.h"
32
class LoadingStateSpy : public QObject {
35
LoadingStateSpy(const Gwenview::Document::Ptr& doc)
44
mState = mDocument->loadingState();
48
Gwenview::Document::Ptr mDocument;
50
Gwenview::Document::LoadingState mState;
54
class JobWatcher : public QObject {
62
connect(job, SIGNAL(result(KJob*)),
63
SLOT(slotResult(KJob*)));
64
connect(job, SIGNAL(destroyed(QObject*)),
65
SLOT(slotDestroyed()));
70
QApplication::processEvents();
79
void slotResult(KJob* job) {
80
mError = job->error();
84
void slotDestroyed() {
85
kWarning() << "Destroyed";
97
class DocumentTest : public QObject {
102
void testLoad_data();
103
void testLoadTwoPasses();
104
void testLoadEmpty();
105
void testLoadDownSampled();
106
void testLoadDownSampled_data();
107
void testLoadDownSampledPng();
108
void testLoadRemote();
109
void testLoadAnimated();
110
void testDeleteWhileLoading();
111
void testLoadRotated();
112
void testMultipleLoads();
114
void testSaveRemote();
115
void testLosslessSave();
116
void testLosslessRotate();
117
void testModifyAndSaveAs();
118
void testMetaInfoJpeg();
119
void testMetaInfoBmp();
120
void testForgetModifiedDocument();
121
void testModifiedAndSavedSignals();
123
void testCheckDocumentEditor();
124
void testUndoStackPush();
130
#endif // DOCUMENTTEST_H