osm_frame_widget.h 1.9 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
#ifndef OSM_FRAME_WIDGET_H
#define OSM_FRAME_WIDGET_H

#include <QWidget>
#include <QMap>
#include <QStandardItemModel>
#include <QMutex>
#include "osmtiles/layer_interface.h"
#include "osmtiles/tilesviewer.h"
using namespace QTVOSM;

namespace Ui {
	class osm_frame_widget;
}

/*!	osm_frame_widget is the container of tilesviewer
 * This call maintains basice UI compments, such like layer table views, buttons, browser views.
 * It also maintain layer order changes, 2 screen dislay.
 *
 \class	osm_frame_widget osm_frame_widget.h "qtviewer_planetosm/osm_frame_widget.h"
  \author	goldenhawking	\date	2015-12-11
*/
class osm_frame_widget : public QWidget
{
	Q_OBJECT

public:
	explicit osm_frame_widget(QWidget *parent = 0);
	~osm_frame_widget();
public:
	//Get tile viewer
	tilesviewer * viewer();
33
	void enableLiteMode(bool bEnabled);
34
	void lockLiteMode(bool blocked);
35 36 37 38 39
protected:
	bool eventFilter(QObject *obj, QEvent *event);
protected:
	static QMutex m_mutex_proteced;
	Ui::osm_frame_widget *ui;
40
	bool m_bLiteModeLocked = false;
41 42 43
	QStandardItemModel *m_pLayerDispMod;
	QMap<layer_interface *, QObject *> m_layerPropPages;
	QMap<QObject *, layer_interface *> m_PropPageslayer;
44
protected:
45 46 47
	void UpdateLayerTable();
	bool AppendLayer(QString SLName,layer_interface * interface);
	void EnumPlugins();
48 49

	void mousePressEvent(QMouseEvent *);
50 51 52
protected slots:
	void delacmd_refresh_layer_view();
	void on_tabWidget_main_tabCloseRequested(int index);
53 54 55 56 57 58 59 60 61
	void on_pushButton_QTV_visible_clicked();
	void on_pushButton_QTV_hide_clicked();
	void on_pushButton_QTV_moveUp_clicked();
	void on_pushButton_QTV_moveTop_clicked();
	void on_pushButton_QTV_moveDown_clicked();
	void on_pushButton_QTV_moveBtm_clicked();
	void on_pushButton_QTV_active_clicked();
	void on_pushButton_QTV_deactive_clicked();
	void on_pushButton_QTV_saveToFile_clicked();
62 63 64
};

#endif // OSM_FRAME_WIDGET_H