47 lines
1.2 KiB
C++
47 lines
1.2 KiB
C++
#ifndef RM_WIDGET_MAP_H
|
|
#define RM_WIDGET_MAP_H
|
|
#if !(DO_NOT_USE_MAP)
|
|
#if !(USE_WEBVIEW2)
|
|
|
|
#include <ActiveQt/QAxWidget>
|
|
#include <QMouseEvent>
|
|
#if (USE_HTML_MAP)
|
|
class QTemporaryFile;
|
|
#endif
|
|
// https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/general-info/ee330730(v=vs.85)
|
|
class RMWidgetMap : public QWidget // QAxWidget
|
|
{
|
|
Q_OBJECT
|
|
// Q_OBJECT // 사용불가
|
|
public:
|
|
QAxWidget* _ax;
|
|
explicit RMWidgetMap(QWidget *parent = nullptr, Qt::WindowFlags f = 0);
|
|
void navigate(const QString &url);
|
|
void runScript(QString script);
|
|
#if (USE_HTML_MAP)
|
|
QTemporaryFile* tempFile;
|
|
void loadFirstPage();
|
|
void removePage();
|
|
#else
|
|
void load();
|
|
#endif
|
|
static RMWidgetMap* instance()
|
|
{
|
|
static RMWidgetMap * _instance = 0;
|
|
if ( _instance == 0 ) {
|
|
_instance = new RMWidgetMap();
|
|
}
|
|
return _instance;
|
|
}
|
|
|
|
protected:
|
|
// void mousePressEvent(QMouseEvent * event);
|
|
public slots:
|
|
//void activexEventHandler(const QString &name, int argc, void *argv);
|
|
// void onNavigateComplete(QString url);
|
|
// void onBeforeNavigate();
|
|
};
|
|
#endif // #if !(USE_WEBVIEW2)
|
|
#endif // #if !(DO_NOT_USE_MAP)
|
|
#endif // RM_WIDGET_MAP_H
|