65 lines
1.2 KiB
C++
65 lines
1.2 KiB
C++
#ifndef Zoom_H_
|
|
#define Zoom_H_
|
|
|
|
#include "BackGroundWidget.h"
|
|
#include "CompositeHandle.h"
|
|
#include "CompositeWidget.h"
|
|
#include "ZoomWidget.h"
|
|
#include "ZoomHandle.h"
|
|
|
|
#include <QObject>
|
|
#include <QVariant>
|
|
|
|
class ZoomManager : public osg::Referenced {
|
|
public:
|
|
ZoomManager(class OEScene* oeScene);
|
|
~ZoomManager(void);
|
|
|
|
void ResetCanvasPosition(double x, double y);
|
|
void SendZoom();
|
|
|
|
osgWidget::Canvas* GetCanvasZoom() {
|
|
return _canvasZoom;
|
|
}
|
|
osgWidget::Widget* GetBar() const {
|
|
return _bar;
|
|
}
|
|
|
|
void AttachViewUI(class OsgViewUI* ui);
|
|
//
|
|
//signals:
|
|
// void signalZoom(QVariant var);
|
|
|
|
protected:
|
|
void slotZoom();
|
|
|
|
private:
|
|
osgWidget::Canvas* _canvasZoom;
|
|
|
|
osgWidget::Widget* _lessen;
|
|
osgWidget::Widget* _enlargement;
|
|
osgWidget::Widget* _zoomBackground;
|
|
osgWidget::Widget* _bar;
|
|
osgWidget::Widget* _bar_;
|
|
osgWidget::Widget* _zoomBackground_shadow;
|
|
|
|
int _zoomNum[1];
|
|
|
|
class OEScene* oeScene_;
|
|
|
|
public:
|
|
enum STATE {
|
|
MOUSE_PUSH,
|
|
MOUSE_RELEASE,
|
|
MOUSE_LEAVE,
|
|
MOUSE_OVER,
|
|
MOUSE_DRAG,
|
|
DEFAULT
|
|
};
|
|
|
|
STATE state;
|
|
double zoom;
|
|
};
|
|
|
|
#endif
|