Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add some missing Q_OBJECT macros
(cherry-picked from ce5ed44)
  • Loading branch information
nyalldawson committed Nov 18, 2015
1 parent 5741925 commit 8b7ab57
Show file tree
Hide file tree
Showing 7 changed files with 137 additions and 129 deletions.
2 changes: 2 additions & 0 deletions src/plugins/geometry_checker/CMakeLists.txt
Expand Up @@ -39,8 +39,10 @@ SET (geometrychecker_HDRS

SET (geometrychecker_MOC_HDRS
qgsgeometrychecker.h
qgsgeometrycheckerplugin.h
checks/qgsgeometryanglecheck.h
checks/qgsgeometryareacheck.h
checks/qgsgeometrycheck.h
checks/qgsgeometrydegeneratepolygoncheck.h
checks/qgsgeometryduplicatecheck.h
checks/qgsgeometryduplicatenodescheck.h
Expand Down
2 changes: 2 additions & 0 deletions src/plugins/geometry_checker/checks/qgsgeometrycheck.h
Expand Up @@ -41,6 +41,8 @@ class QgsGeometryCheckPrecision

class QgsGeometryCheck : public QObject
{
Q_OBJECT

public:
enum ChangeWhat { ChangeFeature, ChangePart, ChangeRing, ChangeNode };
enum ChangeType { ChangeAdded, ChangeRemoved, ChangeChanged };
Expand Down
64 changes: 64 additions & 0 deletions src/plugins/geometry_checker/qgsgeometrycheckerplugin.cpp
Expand Up @@ -44,3 +44,67 @@ void QgsGeometryCheckerPlugin::unload()
mMenuAction = 0;
mIface->removePluginVectorMenu( QApplication::translate( "QgsGeometryCheckerPlugin", "G&eometry Tools" ), mMenuAction );
}


//////////////////////////////////////////////////////////////////////////
//
//
// THE FOLLOWING CODE IS AUTOGENERATED BY THE PLUGIN BUILDER SCRIPT
// YOU WOULD NORMALLY NOT NEED TO MODIFY THIS, AND YOUR PLUGIN
// MAY NOT WORK PROPERLY IF YOU MODIFY THIS INCORRECTLY
//
//
//////////////////////////////////////////////////////////////////////////


/**
* Required extern functions needed for every plugin
* These functions can be called prior to creating an instance
* of the plugin class
*/
// Class factory to return a new instance of the plugin class
QGISEXTERN QgisPlugin * classFactory( QgisInterface * theQgisInterfacePointer )
{
return new QgsGeometryCheckerPlugin( theQgisInterfacePointer );
}
// Return the name of the plugin - note that we do not user class members as
// the class may not yet be insantiated when this method is called.
QGISEXTERN QString name()
{
return sName;
}

// Return the description
QGISEXTERN QString description()
{
return sDescription;
}

// Return the category
QGISEXTERN QString category()
{
return sCategory;
}

// Return the type (either UI or MapLayer plugin)
QGISEXTERN int type()
{
return sPluginType;
}

// Return the version number for the plugin
QGISEXTERN QString version()
{
return sPluginVersion;
}

QGISEXTERN QString icon()
{
return sPluginIcon;
}

// Delete ourself
QGISEXTERN void unload( QgisPlugin * thePluginPointer )
{
delete thePluginPointer;
}
66 changes: 2 additions & 64 deletions src/plugins/geometry_checker/qgsgeometrycheckerplugin.h
Expand Up @@ -27,6 +27,8 @@ class QgsGeometryCheckerDialog;

class QgsGeometryCheckerPlugin : public QObject, public QgisPlugin
{
Q_OBJECT

public:
explicit QgsGeometryCheckerPlugin( QgisInterface* iface );
void initGui() override;
Expand All @@ -46,68 +48,4 @@ static const QString sPluginVersion = QApplication::translate( "QgsGeometryCheck
static const QgisPlugin::PLUGINTYPE sPluginType = QgisPlugin::UI;
static const QString sPluginIcon = ":/geometrychecker/icons/geometrychecker.png";


//////////////////////////////////////////////////////////////////////////
//
//
// THE FOLLOWING CODE IS AUTOGENERATED BY THE PLUGIN BUILDER SCRIPT
// YOU WOULD NORMALLY NOT NEED TO MODIFY THIS, AND YOUR PLUGIN
// MAY NOT WORK PROPERLY IF YOU MODIFY THIS INCORRECTLY
//
//
//////////////////////////////////////////////////////////////////////////


/**
* Required extern functions needed for every plugin
* These functions can be called prior to creating an instance
* of the plugin class
*/
// Class factory to return a new instance of the plugin class
QGISEXTERN QgisPlugin * classFactory( QgisInterface * theQgisInterfacePointer )
{
return new QgsGeometryCheckerPlugin( theQgisInterfacePointer );
}
// Return the name of the plugin - note that we do not user class members as
// the class may not yet be insantiated when this method is called.
QGISEXTERN QString name()
{
return sName;
}

// Return the description
QGISEXTERN QString description()
{
return sDescription;
}

// Return the category
QGISEXTERN QString category()
{
return sCategory;
}

// Return the type (either UI or MapLayer plugin)
QGISEXTERN int type()
{
return sPluginType;
}

// Return the version number for the plugin
QGISEXTERN QString version()
{
return sPluginVersion;
}

QGISEXTERN QString icon()
{
return sPluginIcon;
}

// Delete ourself
QGISEXTERN void unload( QgisPlugin * thePluginPointer )
{
delete thePluginPointer;
}

#endif // QGS_GEOMETRY_CHECKER_PLUGIN_H
1 change: 1 addition & 0 deletions src/plugins/geometry_snapper/CMakeLists.txt
Expand Up @@ -21,6 +21,7 @@ SET (geometrysnapper_UIS
SET (geometrysnapper_MOC_HDRS
qgsgeometrysnapper.h
qgsgeometrysnapperdialog.h
qgsgeometrysnapperplugin.h
)

SET (geometrysnapper_RCCS
Expand Down
64 changes: 64 additions & 0 deletions src/plugins/geometry_snapper/qgsgeometrysnapperplugin.cpp
Expand Up @@ -41,3 +41,67 @@ void QgsGeometrySnapperPlugin::unload()
mMenuAction = 0;
mIface->removePluginVectorMenu( QApplication::translate( "QgsGeometrySnapperPlugin", "G&eometry Tools" ), mMenuAction );
}


//////////////////////////////////////////////////////////////////////////
//
//
// THE FOLLOWING CODE IS AUTOGENERATED BY THE PLUGIN BUILDER SCRIPT
// YOU WOULD NORMALLY NOT NEED TO MODIFY THIS, AND YOUR PLUGIN
// MAY NOT WORK PROPERLY IF YOU MODIFY THIS INCORRECTLY
//
//
//////////////////////////////////////////////////////////////////////////


/**
* Required extern functions needed for every plugin
* These functions can be called prior to creating an instance
* of the plugin class
*/
// Class factory to return a new instance of the plugin class
QGISEXTERN QgisPlugin * classFactory( QgisInterface * theQgisInterfacePointer )
{
return new QgsGeometrySnapperPlugin( theQgisInterfacePointer );
}
// Return the name of the plugin - note that we do not user class members as
// the class may not yet be insantiated when this method is called.
QGISEXTERN QString name()
{
return sName;
}

// Return the description
QGISEXTERN QString description()
{
return sDescription;
}

// Return the category
QGISEXTERN QString category()
{
return sCategory;
}

// Return the type (either UI or MapLayer plugin)
QGISEXTERN int type()
{
return sPluginType;
}

// Return the version number for the plugin
QGISEXTERN QString version()
{
return sPluginVersion;
}

QGISEXTERN QString icon()
{
return sPluginIcon;
}

// Delete ourself
QGISEXTERN void unload( QgisPlugin * thePluginPointer )
{
delete thePluginPointer;
}
67 changes: 2 additions & 65 deletions src/plugins/geometry_snapper/qgsgeometrysnapperplugin.h
Expand Up @@ -33,6 +33,8 @@ static const QString sPluginIcon = ":/geometrysnapper/icons/geometrysnapper.png"

class QgsGeometrySnapperPlugin : public QObject, public QgisPlugin
{
Q_OBJECT

public:
explicit QgsGeometrySnapperPlugin( QgisInterface* iface );
void initGui() override;
Expand All @@ -44,69 +46,4 @@ class QgsGeometrySnapperPlugin : public QObject, public QgisPlugin
QAction* mMenuAction;
};



//////////////////////////////////////////////////////////////////////////
//
//
// THE FOLLOWING CODE IS AUTOGENERATED BY THE PLUGIN BUILDER SCRIPT
// YOU WOULD NORMALLY NOT NEED TO MODIFY THIS, AND YOUR PLUGIN
// MAY NOT WORK PROPERLY IF YOU MODIFY THIS INCORRECTLY
//
//
//////////////////////////////////////////////////////////////////////////


/**
* Required extern functions needed for every plugin
* These functions can be called prior to creating an instance
* of the plugin class
*/
// Class factory to return a new instance of the plugin class
QGISEXTERN QgisPlugin * classFactory( QgisInterface * theQgisInterfacePointer )
{
return new QgsGeometrySnapperPlugin( theQgisInterfacePointer );
}
// Return the name of the plugin - note that we do not user class members as
// the class may not yet be insantiated when this method is called.
QGISEXTERN QString name()
{
return sName;
}

// Return the description
QGISEXTERN QString description()
{
return sDescription;
}

// Return the category
QGISEXTERN QString category()
{
return sCategory;
}

// Return the type (either UI or MapLayer plugin)
QGISEXTERN int type()
{
return sPluginType;
}

// Return the version number for the plugin
QGISEXTERN QString version()
{
return sPluginVersion;
}

QGISEXTERN QString icon()
{
return sPluginIcon;
}

// Delete ourself
QGISEXTERN void unload( QgisPlugin * thePluginPointer )
{
delete thePluginPointer;
}

#endif // QGS_GEOMETRY_SNAPPER_PLUGIN_H

0 comments on commit 8b7ab57

Please sign in to comment.