2012-06-25 20:11:15 +00:00
|
|
|
#ifndef _PAYSAGES_QT_PREVIEWOSD_H_
|
|
|
|
#define _PAYSAGES_QT_PREVIEWOSD_H_
|
|
|
|
|
|
|
|
#include <QImage>
|
2012-06-26 19:36:50 +00:00
|
|
|
#include "../lib_paysages/camera.h"
|
2012-06-25 20:11:15 +00:00
|
|
|
|
|
|
|
class PreviewOsdItem:public QImage
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
PreviewOsdItem(int width, int height);
|
|
|
|
|
|
|
|
void setLocation(double x, double y);
|
|
|
|
inline double xlocation() {return _xlocation;};
|
|
|
|
inline double ylocation() {return _ylocation;};
|
|
|
|
|
2012-06-27 09:48:55 +00:00
|
|
|
void setToolTip(QString text);
|
|
|
|
QString getToolTip(double x, double y, double scaling);
|
|
|
|
|
2012-06-26 19:36:50 +00:00
|
|
|
void drawCamera(CameraDefinition* camera);
|
|
|
|
|
2012-06-25 20:11:15 +00:00
|
|
|
private:
|
|
|
|
double _xlocation;
|
|
|
|
double _ylocation;
|
2012-06-27 09:48:55 +00:00
|
|
|
QString _tooltip;
|
2012-06-25 20:11:15 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
class PreviewOsd
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
PreviewOsd();
|
|
|
|
~PreviewOsd();
|
|
|
|
|
|
|
|
static PreviewOsd* getInstance(QString name);
|
|
|
|
|
2012-06-26 19:36:50 +00:00
|
|
|
void clearItems();
|
2012-06-25 20:11:15 +00:00
|
|
|
PreviewOsdItem* newItem(int width, int height);
|
|
|
|
PreviewOsdItem* newItem(QImage image);
|
|
|
|
void apply(QImage* mask, double xoffset, double yoffset, double scaling);
|
2012-06-27 09:48:55 +00:00
|
|
|
QString getToolTip(double x, double y, double scaling);
|
2012-06-25 20:11:15 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
QVector<PreviewOsdItem*> _items;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|