Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
testing.tools.safetynet_image.ImageLocations Class Reference
+ Collaboration diagram for testing.tools.safetynet_image.ImageLocations:

Public Member Functions

 __init__ (self, output_path, diff_path, two_labels)
 
 Images (self)
 
 Left (self, test_case)
 
 Right (self, test_case)
 
 Diff (self, test_case)
 

Public Attributes

 output_path = output_path
 
 diff_path = diff_path
 
 two_labels = two_labels
 
 left = self._FindImages(self.two_labels[0])
 
 right = self._FindImages(self.two_labels[1])
 
 images = list(self.left.viewkeys() & self.right.viewkeys())
 
dict diff
 

Protected Member Functions

 _FindImages (self, label)
 

Detailed Description

Contains the locations of input and output image files.

Definition at line 241 of file safetynet_image.py.

Constructor & Destructor Documentation

◆ __init__()

testing.tools.safetynet_image.ImageLocations.__init__ ( self,
output_path,
diff_path,
two_labels )
Constructor.

Args:
  output_path: Path to directory with the pngs.
  diff_path: Path to directory where the diffs will be generated.
  two_labels: Tuple of two strings that name the subdirectories in
      output_path containing the images.

Definition at line 245 of file safetynet_image.py.

Member Function Documentation

◆ _FindImages()

testing.tools.safetynet_image.ImageLocations._FindImages ( self,
label )
protected
Traverses a dir and builds a dict of all page images to compare in it.

Args:
  label: name of subdirectory of output_path to traverse.

Returns:
  Dict mapping page image names to the path of the image file.

Definition at line 273 of file safetynet_image.py.

References testing.tools.safetynet_image.ImageComparison.output_path, and testing.tools.safetynet_image.ImageLocations.output_path.

◆ Diff()

testing.tools.safetynet_image.ImageLocations.Diff ( self,
test_case )
Returns the path for a page diff image.

Definition at line 303 of file safetynet_image.py.

References QUnicodeTables::Properties.diff, and testing.tools.safetynet_image.ImageLocations.diff.

◆ Images()

testing.tools.safetynet_image.ImageLocations.Images ( self)
Returns a list of all page images present in both directories.

Definition at line 291 of file safetynet_image.py.

References ExampleNode.images(), QPdfPage.images, QQuickContext2DCommandBuffer.images, QTextureFileDataPrivate.images, RequestHandler.images(), and testing.tools.safetynet_image.ImageLocations.images.

+ Here is the call graph for this function:

◆ Left()

testing.tools.safetynet_image.ImageLocations.Left ( self,
test_case )
Returns the path for a page image in the first subdirectory.

Definition at line 295 of file safetynet_image.py.

References _FS_RECTF_.left, CFX_CSSRect.left, CFX_FloatRect.left, CFX_GifImageInfo.left, CFX_GlyphBitmap.left(), CFX_RectF.left, CodeChunk.left(), FX_RECT.left, GLSL::BinaryExpressionAST.left, PathSimplifier::BoundingVolumeHierarchy::Node.left, ProString.left(), QAnyStringView.left(), QBasicUtf8StringView< UseChar8T >.left(), QByteArray.left(), QByteArray.left(), QByteArrayView.left(), QFragment< N >.left, QFragment< 3 >.left, QGeoCameraTilesPrivate::ClippedFootprint.left, QGIFFormat.left, QGraphicsLayoutPrivate.left, QItemSelectionRange.left(), QKdPointTree::Node.left, QLatin1StringView.left(), QMargins.left(), QMarginsF.left(), QMaxHeap< T >.left(), QMaxHeap< Intersection >.left(), QOpenGLRect.left, QQmlItemSelectionRangeValueType.left, QQmlItemSelectionRangeValueType.left(), QQmlJS::AST::BinaryExpression.left, QQmlJS::AST::Expression.left, QQmlJS::Dom::ScriptElements::BinaryExpression.left(), QQmlMarginsFValueType.left, QQmlMarginsFValueType.left(), QQmlMarginsValueType.left, QQmlMarginsValueType.left(), QQmlRectFValueType.left, QQmlRectFValueType.left(), QQmlRectValueType.left, QQmlRectValueType.left(), QQuick3DFrustumCamera.left, QQuick3DFrustumCamera.left(), QQuickAnchors.left, QQuickAnchors.left(), QQuickAnchorSet.left, QQuickAnchorSet.left(), QQuickItemPrivate.left(), QQuickKeyNavigationAttached.left, QQuickKeyNavigationAttached.left(), QQuickKeyNavigationAttachedPrivate.left, QQuickScaleGrid.left, QQuickScaleGrid.left(), QQuickStyleMargins.left, QQuickStyleMargins.left(), QQuickSwipe.left, QQuickSwipe.left(), QQuickSwipePrivate.left, QRBTree< T >::Node.left, QRBTree< int >::Node.left, QRect.left(), QRectF.left(), QScanConverter::Intersection.left, QSGAreaAllocatorNode.left, QSpanCollection::Span.left(), QSSGMeshBVHNode.left, QSSGRenderCamera.left, QString.left(), QString.left(), QStringView.left(), QTextStreamPrivate::PaddingResult.left, QV4::Heap::ComplexString.left, QV4::SparseArrayNode.left, testing.tools.safetynet_image.ImageLocations.left, and TreeNode.left.

+ Here is the call graph for this function:

◆ Right()

testing.tools.safetynet_image.ImageLocations.Right ( self,
test_case )
Returns the path for a page image in the second subdirectory.

Definition at line 299 of file safetynet_image.py.

References _FS_RECTF_.right, CFX_CSSRect.right, CFX_FloatRect.right, CFX_RectF.right(), CodeChunk.right(), FX_RECT.right, GLSL::BinaryExpressionAST.right, PathSimplifier::BoundingVolumeHierarchy::Node.right, ProString.right(), QAnyStringView.right(), QBasicUtf8StringView< UseChar8T >.right(), QByteArray.right(), QByteArray.right(), QByteArrayView.right(), QFragment< N >.right, QFragment< 3 >.right, QGeoCameraTilesPrivate::ClippedFootprint.right, QGIFFormat.right, QGraphicsLayoutPrivate.right, QItemSelectionRange.right(), QItemSelectionRangeRefCache.right(), QKdPointTree::Node.right, QLatin1StringView.right(), QMargins.right(), QMarginsF.right(), QMaxHeap< T >.right(), QMaxHeap< Intersection >.right(), QOpenGLRect.right, QQmlItemSelectionRangeValueType.right, QQmlItemSelectionRangeValueType.right(), QQmlJS::AST::BinaryExpression.right, QQmlJS::AST::Expression.right, QQmlJS::Dom::ScriptElements::BinaryExpression.right(), QQmlMarginsFValueType.right, QQmlMarginsFValueType.right(), QQmlMarginsValueType.right, QQmlMarginsValueType.right(), QQmlRectFValueType.right, QQmlRectFValueType.right(), QQmlRectValueType.right, QQmlRectValueType.right(), QQuick3DFrustumCamera.right, QQuick3DFrustumCamera.right(), QQuick3DNode.right, QQuick3DNode.right(), QQuickAnchors.right, QQuickAnchors.right(), QQuickAnchorSet.right, QQuickAnchorSet.right(), QQuickItemPrivate.right(), QQuickKeyNavigationAttached.right, QQuickKeyNavigationAttached.right(), QQuickKeyNavigationAttachedPrivate.right, QQuickScaleGrid.right, QQuickScaleGrid.right(), QQuickStyleMargins.right, QQuickStyleMargins.right(), QQuickSwipe.right, QQuickSwipe.right(), QQuickSwipePrivate.right, QRBTree< T >::Node.right, QRBTree< int >::Node.right, QRect.right(), QRectF.right(), QScanConverter::Intersection.right, QSGAreaAllocatorNode.right, QSpanCollection::Span.right(), QSSGMeshBVHNode.right, QSSGRenderCamera.right, QString.right(), QString.right(), QStringView.right(), QTextStreamPrivate::PaddingResult.right, QV4::Heap::ComplexString.right, QV4::SparseArrayNode.right, testing.tools.safetynet_image.ImageLocations.right, and TreeNode.right.

+ Here is the call graph for this function:

Member Data Documentation

◆ diff

dict testing.tools.safetynet_image.ImageLocations.diff
Initial value:
= {
image: os.path.join(self.diff_path, image) for image in self.images
}

Definition at line 269 of file safetynet_image.py.

Referenced by testing.tools.safetynet_image.ImageLocations.Diff().

◆ diff_path

testing.tools.safetynet_image.ImageLocations.diff_path = diff_path

Definition at line 255 of file safetynet_image.py.

◆ images

testing.tools.safetynet_image.ImageLocations.images = list(self.left.viewkeys() & self.right.viewkeys())

◆ left

testing.tools.safetynet_image.ImageLocations.left = self._FindImages(self.two_labels[0])

◆ output_path

testing.tools.safetynet_image.ImageLocations.output_path = output_path

◆ right

testing.tools.safetynet_image.ImageLocations.right = self._FindImages(self.two_labels[1])

◆ two_labels

testing.tools.safetynet_image.ImageLocations.two_labels = two_labels

The documentation for this class was generated from the following file: