Changeset View
Changeset View
Standalone View
Standalone View
plugins/ocr/abstractocrengine.h
Show First 20 Lines • Show All 118 Lines • ▼ Show 20 Line(s) | 111 | protected: | |||
---|---|---|---|---|---|
119 | * Save an image to a temporary file. | 119 | * Save an image to a temporary file. | ||
120 | * | 120 | * | ||
121 | * @param img The image to save | 121 | * @param img The image to save | ||
122 | * @param format The image format to save in | 122 | * @param format The image format to save in | ||
123 | * @param colors The colour depth (bits per pixel) required. If specified, | 123 | * @param colors The colour depth (bits per pixel) required. If specified, | ||
124 | * this must be either 1, 8, 24 or 32. The default is for no colour | 124 | * this must be either 1, 8, 24 or 32. The default is for no colour | ||
125 | * conversion. | 125 | * conversion. | ||
126 | * | 126 | * | ||
127 | * @return The file name as saved, or @c QString::null if there was | 127 | * @return The file name as saved, or @c QString() if there was | ||
128 | * an error. | 128 | * an error. | ||
129 | **/ | 129 | **/ | ||
130 | QString tempSaveImage(const KookaImage *img, const ImageFormat &format, int colors = -1); | 130 | QString tempSaveImage(const KookaImage *img, const ImageFormat &format, int colors = -1); | ||
131 | 131 | | |||
132 | /** | 132 | /** | ||
133 | * Get a name to use for a temporary file. | 133 | * Get a name to use for a temporary file. | ||
134 | * | 134 | * | ||
135 | * @param suffix File name suffix, no leading '.' is required | 135 | * @param suffix File name suffix, no leading '.' is required | ||
136 | * @return The temporary file name, or @c QString::null if the file could not be created | 136 | * @return The temporary file name, or @c QString() if the file could not be created | ||
137 | * | 137 | * | ||
138 | * @note The temporary file is created and is left in place under the returned name, | 138 | * @note The temporary file is created and is left in place under the returned name, | ||
139 | * but is not opened. Its name should be saved and eventually returned in the | 139 | * but is not opened. Its name should be saved and eventually returned in the | ||
140 | * @c tempFiles() list so that it will be removed. | 140 | * @c tempFiles() list so that it will be removed. | ||
141 | **/ | 141 | **/ | ||
142 | QString tempFileName(const QString &suffix, const QString &baseName = "ocrtemp"); | 142 | QString tempFileName(const QString &suffix, const QString &baseName = "ocrtemp"); | ||
143 | 143 | | |||
144 | QTextDocument *startResultDocument(); | 144 | QTextDocument *startResultDocument(); | ||
▲ Show 20 Lines • Show All 95 Lines • Show Last 20 Lines |