mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-15 00:04:00 -04:00
mods to plugin api
git-svn-id: http://svn.osgeo.org/qgis/trunk@139 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
parent
c32f7c04eb
commit
7a3f401bf9
@ -1,6 +1,6 @@
|
||||
#############################################################################
|
||||
# Makefile for building: libqgisplugin.so.1.0.0
|
||||
# Generated by qmake (1.03a) on: Wed Oct 9 22:22:46 2002
|
||||
# Generated by qmake (1.03a) on: Mon Oct 14 07:52:32 2002
|
||||
# Project: qgisplugin.pro
|
||||
# Template: lib
|
||||
# Command: $(QMAKE) qgisplugin.pro
|
||||
@ -41,7 +41,11 @@ OBJECTS_DIR = ./
|
||||
|
||||
####### Files
|
||||
|
||||
HEADERS = qgisplugin.h
|
||||
HEADERS = qgisplugin.h \
|
||||
qgisplugingui.h \
|
||||
qgispluginmenu.h \
|
||||
qgispluginguielement.h \
|
||||
qgisplugintoolbar.h
|
||||
SOURCES = qgistestplugin.cpp
|
||||
OBJECTS = qgistestplugin.o
|
||||
FORMS =
|
||||
@ -131,7 +135,8 @@ FORCE:
|
||||
|
||||
####### Compile
|
||||
|
||||
qgistestplugin.o: qgistestplugin.cpp qgisplugin.h
|
||||
qgistestplugin.o: qgistestplugin.cpp qgisplugin.h \
|
||||
qgisplugingui.h
|
||||
|
||||
####### Install
|
||||
|
||||
|
@ -51,6 +51,6 @@ typedef QgisPlugin* create_t();
|
||||
//! Typedef for the function to unload a plugin and free its resources
|
||||
typedef void unload_t(QgisPlugin *);
|
||||
//! Element type corresponding to one of the values in the ELEMENTS enum
|
||||
typedef int QGIS_GUI_TYPE;
|
||||
//typedef int QGIS_GUI_TYPE;
|
||||
|
||||
#endif //qgisplugin_h
|
||||
|
@ -1,4 +1,8 @@
|
||||
TEMPLATE = lib
|
||||
SOURCES = qgistestplugin.cpp
|
||||
HEADERS = qgisplugin.h
|
||||
HEADERS = qgisplugin.h \
|
||||
qgisplugingui.h \
|
||||
qgispluginmenu.h \
|
||||
qgispluginguielement.h \
|
||||
qgisplugintoolbar.h
|
||||
|
||||
|
@ -17,6 +17,8 @@ public:
|
||||
QgisPluginGuiElement element(int index);
|
||||
//! Adds a new element
|
||||
void addElement(QgisPluginGuiElement);
|
||||
//! Destructor
|
||||
virtual ~QgisPluginGui();
|
||||
private:
|
||||
std::vector<QgisPluginGuiElement> elements;
|
||||
};
|
||||
|
@ -52,6 +52,11 @@ QString QgisTestPlugin::description(){
|
||||
return pDescription;
|
||||
|
||||
}
|
||||
QgisPluginGui * QgisTestPlugin::gui(){
|
||||
// stub
|
||||
return 0;
|
||||
}
|
||||
|
||||
extern "C" QgisPlugin * classFactory(){
|
||||
return new QgisTestPlugin();
|
||||
}
|
||||
|
@ -578,11 +578,11 @@ void QgisApp::testPluginFunctions()
|
||||
std::cout << "Getting pointer to a QgisPlugin object from the library\n";
|
||||
QgisPlugin *pl = cf();
|
||||
std::cout << "Displaying name, version, and description\n";
|
||||
std::cout << "Plugin name: " << pl->pluginName() << std::endl;
|
||||
std::cout << "Plugin version: " << pl->pluginVersion() << std::endl;
|
||||
std::cout << "Plugin description: " << pl->pluginDescription() << std::endl;
|
||||
std::cout << "Plugin name: " << pl->name() << std::endl;
|
||||
std::cout << "Plugin version: " << pl->version() << std::endl;
|
||||
std::cout << "Plugin description: " << pl->description() << std::endl;
|
||||
QMessageBox::information(this,"Plugin Information","QGis loaded the following plugin:\nName: "
|
||||
+ pl->pluginName() + "\nVersion: " + pl->pluginVersion() + "\nDescription: " + pl->pluginDescription());
|
||||
+ pl->name() + "\nVersion: " + pl->version() + "\nDescription: " + pl->description());
|
||||
// unload the plugin (delete it)
|
||||
std::cout << "Attempting to resolve the unload function" << std::endl;
|
||||
unload_t *ul = (unload_t *) myLib.resolve("unload");
|
||||
|
Loading…
x
Reference in New Issue
Block a user