mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
Further improvments to plugin template:
- use standard convention of ui being named FooGuiBase git-svn-id: http://svn.osgeo.org/qgis/trunk@7873 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
parent
ffcf321703
commit
edfaf0afea
@ -118,7 +118,7 @@ shutil.copy(template_file('plugin.cpp'), os.path.join(pluginDir, pluginLCas
|
||||
shutil.copy(template_file('plugin.h'), os.path.join(pluginDir, pluginLCaseName + '.h'))
|
||||
shutil.copy(template_file('plugingui.cpp'), os.path.join(pluginDir, pluginLCaseName + 'gui.cpp'))
|
||||
shutil.copy(template_file('plugingui.h'), os.path.join(pluginDir, pluginLCaseName + 'gui.h'))
|
||||
shutil.copy(template_file('plugingui.ui'), os.path.join(pluginDir, pluginLCaseName + 'gui.ui'))
|
||||
shutil.copy(template_file('pluginguibase.ui'), os.path.join(pluginDir, pluginLCaseName + 'guibase.ui'))
|
||||
|
||||
# Substitute the plugin specific vars in the various files
|
||||
# This is a brute force approach but its quick and dirty :)
|
||||
@ -131,7 +131,7 @@ files = [ plugin_file(pluginDir, 'CMakeLists.txt'),
|
||||
plugin_file(pluginDir, pluginLCaseName + '.h'),
|
||||
plugin_file(pluginDir, pluginLCaseName + 'gui.cpp'),
|
||||
plugin_file(pluginDir, pluginLCaseName + 'gui.h'),
|
||||
plugin_file(pluginDir, pluginLCaseName + 'gui.ui') ]
|
||||
plugin_file(pluginDir, pluginLCaseName + 'guibase.ui') ]
|
||||
|
||||
# replace occurences of [pluginlcasename], [pluginname], [plugindescription], [menuname], [menutiem]
|
||||
# in template with the values from user
|
||||
|
@ -7,7 +7,7 @@ SET ([pluginlcasename]_SRCS
|
||||
[pluginlcasename]gui.cpp
|
||||
)
|
||||
|
||||
SET ([pluginlcasename]_UIS [pluginlcasename]gui.ui)
|
||||
SET ([pluginlcasename]_UIS [pluginlcasename]guibase.ui)
|
||||
|
||||
SET ([pluginlcasename]_MOC_HDRS
|
||||
[pluginlcasename].h
|
||||
|
@ -13,12 +13,12 @@
|
||||
#define [pluginname]GUI_H
|
||||
|
||||
#include <QDialog>
|
||||
#include <ui_[pluginlcasename]gui.h>
|
||||
#include <ui_[pluginlcasename]guibase.h>
|
||||
|
||||
/**
|
||||
@author Tim Sutton
|
||||
*/
|
||||
class [pluginname]Gui : public QDialog, private Ui::[pluginname]Gui
|
||||
class [pluginname]Gui : public QDialog, private Ui::[pluginname]GuiBase
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
@ -1,6 +1,6 @@
|
||||
<ui version="4.0" >
|
||||
<class>[pluginname]Gui</class>
|
||||
<widget class="QDialog" name="[pluginname]Gui" >
|
||||
<class>[pluginname]GuiBase</class>
|
||||
<widget class="QDialog" name="[pluginname]GuiBase" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>0</x>
|
Loading…
x
Reference in New Issue
Block a user