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 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 QQuickEllipseShapePrivate::RoundedCorner.diff, QUnicodeTables::CaseConversion.diff, and 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 QPdfPage.images, QQuickContext2DCommandBuffer.images, QTextureFileDataPrivate.images, and images.

◆ Left()

◆ Right()

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 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())

Definition at line 261 of file safetynet_image.py.

Referenced by Images().

◆ left

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

Definition at line 258 of file safetynet_image.py.

Referenced by Left().

◆ output_path

testing.tools.safetynet_image.ImageLocations.output_path = output_path

Definition at line 254 of file safetynet_image.py.

Referenced by _FindImages().

◆ right

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

Definition at line 259 of file safetynet_image.py.

Referenced by Right().

◆ two_labels

testing.tools.safetynet_image.ImageLocations.two_labels = two_labels

Definition at line 256 of file safetynet_image.py.


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