QGIS API Documentation
2.18.21-Las Palmas (9fba24a)
src
core
raster
qgsrasterchecker.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsrasterchecker.h - compare two rasters
3
--------------------------------------
4
Date : 5 Sep 2012
5
Copyright : (C) 2012 by Radim Blazek
6
email : radim dot blazek at gmail dot com
7
***************************************************************************
8
* *
9
* This program is free software; you can redistribute it and/or modify *
10
* it under the terms of the GNU General Public License as published by *
11
* the Free Software Foundation; either version 2 of the License, or *
12
* (at your option) any later version. *
13
* *
14
***************************************************************************/
15
16
#ifndef QGSRASTERCHECKER_H
17
#define QGSRASTERCHECKER_H
18
19
#include <QDir>
20
#include <QString>
21
#include <
qgsmaprenderer.h
>
22
class
QImage
;
23
29
class
CORE_EXPORT
QgsRasterChecker
30
{
31
public
:
32
33
QgsRasterChecker
();
34
36
~QgsRasterChecker
() {}
37
38
QString
report
() {
return
mReport; }
46
bool
runTest(
const
QString
& theVerifiedKey,
QString
theVerifiedUri,
47
const
QString
& theExpectedKey,
QString
theExpectedUri );
48
private
:
49
QString
mReport;
50
QString
mExpectedUri;
51
QString
mCheckedUri;
52
QString
mTabStyle;
53
QString
mCellStyle;
54
QString
mOkStyle;
55
QString
mErrStyle;
56
QString
mErrMsgStyle;
57
58
// Log error in html
59
void
error(
const
QString
& theMessage,
QString
&theReport );
60
// compare values and add table row in html report, set ok to false if not equal
61
QString
compareHead();
62
bool
compare(
double
verifiedVal,
double
expectedVal,
double
theTolerance );
63
void
compare(
const
QString
& theParamName,
int
verifiedVal,
int
expectedVal,
QString
&theReport,
bool
&theOk );
64
void
compare(
const
QString
& theParamName,
double
verifiedVal,
double
expectedVal,
QString
&theReport,
bool
&theOk,
double
theTolerance = 0 );
65
void
compareRow(
const
QString
& theParamName,
const
QString
& verifiedVal,
const
QString
& expectedVal,
QString
&theReport,
bool
theOk,
const
QString
& theDifference =
""
,
const
QString
& theTolerance =
""
);
66
double
tolerance(
double
val,
int
places = 6 );
67
};
// class QgsRasterChecker
68
69
#endif
QgsRasterChecker
This is a helper class for unit tests that need to write an image and compare it to an expected resul...
Definition:
qgsrasterchecker.h:29
QString
QgsRasterChecker::report
QString report()
Definition:
qgsrasterchecker.h:38
QImage
QgsRasterChecker::~QgsRasterChecker
~QgsRasterChecker()
Destructor.
Definition:
qgsrasterchecker.h:36
qgsmaprenderer.h
Generated on Sun Jun 24 2018 11:42:48 for QGIS API Documentation by
1.8.13