From 5d3546d29fe9c1de712fbc4fff5fa4fe24203031 Mon Sep 17 00:00:00 2001 From: gsherman Date: Mon, 19 Jan 2004 20:53:53 +0000 Subject: [PATCH] fixed maplayer plugin so it loads -- doesn't do anything useful git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@523 c8812cc2-4d05-0410-92ff-de0c093fc19c --- plugins/maplayer/Makefile.am | 34 +++++++++++++++++++++++++++++++ plugins/maplayer/maplayertest.cpp | 7 ++++++- 2 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 plugins/maplayer/Makefile.am diff --git a/plugins/maplayer/Makefile.am b/plugins/maplayer/Makefile.am new file mode 100644 index 00000000000..dda9bac7ee1 --- /dev/null +++ b/plugins/maplayer/Makefile.am @@ -0,0 +1,34 @@ +# Copyright (C) 2003 Gary Sherman +# +# This file is free software; as a special exception the author gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +lib_LTLIBRARIES = libmaplayerplugin.la +%.moc.cpp: %.h + $(MOC) -o $@ $< + +%.h: %.ui + $(UIC) -o $@ $< + +%.cpp: %.ui + $(UIC) -o $@ -impl $*.h $< + +libmaplayerplugin_la_SOURCES = maplayertest.cpp \ + ../../src/qgsmaplayerinterface.h \ + $(maplayer_UI)\ + $(maplayer_MOC) + +maplayer_MOC = maplayertest.moc.cpp \ + ../../src/qgsmaplayerinterface.moc.cpp + +maplayer_UI = + +# UI dependencies + +AM_CXXFLAGS := $(CXXFLAGS) $(EXTRA_CXXFLAGS) $(QT_CXXFLAGS) + +libmaplayerplugin_la_LIBADD = $(QT_LDADD) diff --git a/plugins/maplayer/maplayertest.cpp b/plugins/maplayer/maplayertest.cpp index a9caf4c8f01..25c91bdcdac 100644 --- a/plugins/maplayer/maplayertest.cpp +++ b/plugins/maplayer/maplayertest.cpp @@ -1,6 +1,6 @@ #include #include - +#include "../qgisplugin.h" #include "maplayertest.h" // xpm for creating the toolbar icon #include "matrix1.xpm" @@ -51,3 +51,8 @@ extern "C" QString name(){ extern "C" QString description(){ return QString("Map Layer test plugin using QgsMapLayerInterface interface"); } +// Return the type (either UI or MapLayer plugin) +extern "C" int type() +{ + return QgisPlugin::MAPLAYER; +}