aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/qtsupport/screenshotcropper.h
blob: 2a1126f027c4e99419b003544401e1af2f48517f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#ifndef SCREENSHOTCROPPER_H
#define SCREENSHOTCROPPER_H

#include <QMap>
#include <QRect>
#include <QImage>

namespace QtSupport {
namespace Internal {

typedef QMap<QString, QRect> AreasOfInterest;

class ScreenshotCropper
{
public:
    static QImage croppedImage(const QImage &sourceImage, const QString &filePath, const QSize &cropSize);
    static AreasOfInterest loadAreasOfInterest(const QString &areasXmlFile);
    static bool saveAreasOfInterest(const QString &areasXmlFile, AreasOfInterest &areas);
};

} // namespace Internal
} // namespace QtSupport

#endif // SCREENSHOTCROPPER_H