Fix bee targeting fail across wrap world edge
Previously, the bee always aimed for the light area, no matter where you actually put the target. It also got confused whenever it flew across the wrap world edge.
How the bee works now:
1) The placed bee target is *not* recalculated when it was placed in the "gray" part of the wrap world edge. This allows for more fine-tuning.
1a) Place target in light area: bee aims for target light area
1b) Place target in gray area: bee aims for target, but flies to gray area first
2) Bee target is recalculated whenever bee passes the wrap world edge.
#ifndef PREVIEWIMAGEPROVIDER_H
#define PREVIEWIMAGEPROVIDER_H
#include <QPixmap>
#include <QQuickImageProvider>
#include <QSize>
class PreviewImageProvider : public QQuickImageProvider {
public:
PreviewImageProvider();
QPixmap requestPixmap(const QString &id, QSize *size,
const QSize &requestedSize);
void setImage(const QImage &preview);
private:
QPixmap m_px;
};
#endif // PREVIEWIMAGEPROVIDER_H