Warning, file /graphics/okular/autotests/testingutils.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 /*
0002     SPDX-FileCopyrightText: 2013 Jon Mease <jon.mease@gmail.com>
0003 
0004     SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #ifndef OKULAR_TESTINGUTILS_H
0008 #define OKULAR_TESTINGUTILS_H
0009 
0010 template<class T> class QList;
0011 class QString;
0012 
0013 namespace Okular
0014 {
0015 class NormalizedPoint;
0016 class Annotation;
0017 }
0018 
0019 namespace TestingUtils
0020 {
0021 /**
0022  * Return the XML string associated with an annotation's properties
0023  */
0024 QString getAnnotationXml(const Okular::Annotation *annotation);
0025 
0026 /**
0027  * Returns true if the pairwise comparison coordinates of points in @p points1 and @p points2 are almost
0028  * equal (according to qFuzzyCompare)
0029  */
0030 bool pointListsAlmostEqual(const QList<Okular::NormalizedPoint> &points1, const QList<Okular::NormalizedPoint> &points2);
0031 
0032 /*
0033  * The AnnotationDisposeWatcher class provides a static disposeAnnotation function
0034  * that may be assigned to an annotation with Annotation::setDisposeDataFunction in order to
0035  * determine when an annotation has been disposed of.
0036  */
0037 class AnnotationDisposeWatcher
0038 {
0039 private:
0040     static QString m_disposedAnnotationName;
0041 
0042 public:
0043     static QString disposedAnnotationName();
0044     static void resetDisposedAnnotationName();
0045     static void disposeAnnotation(const Okular::Annotation *ann);
0046 };
0047 
0048 }
0049 
0050 #endif