mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-22 00:06:12 -05:00
update custom widget creation scripts
This commit is contained in:
parent
ff0b01251d
commit
8f58372e8f
@ -61,7 +61,7 @@ bool %CLASSMIXEDCASE%Plugin::isInitialized() const
|
||||
|
||||
void %CLASSMIXEDCASE%Plugin::initialize( QDesignerFormEditorInterface *core )
|
||||
{
|
||||
Q_UNUSED( core );
|
||||
Q_UNUSED( core )
|
||||
if ( mInitialized )
|
||||
return;
|
||||
mInitialized = true;
|
||||
|
@ -20,6 +20,7 @@
|
||||
#include <QtGlobal>
|
||||
#include <QtUiPlugin/QDesignerCustomWidgetInterface>
|
||||
#include <QtUiPlugin/QDesignerExportWidget>
|
||||
#include "qgis_customwidgets.h"
|
||||
|
||||
|
||||
class CUSTOMWIDGETS_EXPORT %CLASSMIXEDCASE%Plugin : public QObject, public QDesignerCustomWidgetInterface
|
||||
|
@ -9,6 +9,12 @@
|
||||
|
||||
set -e
|
||||
|
||||
# GNU prefix command for mac os support (gsed, gsplit)
|
||||
GP=
|
||||
if [[ "$OSTYPE" =~ darwin* ]]; then
|
||||
GP=g
|
||||
fi
|
||||
|
||||
CLASSNAME=$1
|
||||
|
||||
TODAY=$(date '+%d.%m.%Y')
|
||||
@ -27,13 +33,11 @@ for i in "${EXT[@]}"
|
||||
do
|
||||
DESTFILE=$DIR/../src/customwidgets/${CLASSLOWER}plugin.$i
|
||||
cp "$DIR"/customwidget."$i".template "$DESTFILE"
|
||||
sed -i s/%DATE%/"$TODAY"/g "$DESTFILE"
|
||||
sed -i s/%YEAR%/"$YEAR"/g "$DESTFILE"
|
||||
sed -i s/%AUTHOR%/"$AUTHOR"/g "$DESTFILE"
|
||||
sed -i s/%EMAIL%/"$EMAIL"/g "$DESTFILE"
|
||||
sed -i s/%CLASSUPPERCASE%/"$CLASSUPPER"/g "$DESTFILE"
|
||||
sed -i s/%CLASSLOWERCASE%/"$CLASSLOWER"/g "$DESTFILE"
|
||||
sed -i s/%CLASSMIXEDCASE%/"$CLASSNAME"/g "$DESTFILE"
|
||||
${GP}sed -i s/%DATE%/"$TODAY"/g "$DESTFILE"
|
||||
${GP}sed -i s/%YEAR%/"$YEAR"/g "$DESTFILE"
|
||||
${GP}sed -i s/%AUTHOR%/"$AUTHOR"/g "$DESTFILE"
|
||||
${GP}sed -i s/%EMAIL%/"$EMAIL"/g "$DESTFILE"
|
||||
${GP}sed -i s/%CLASSUPPERCASE%/"$CLASSUPPER"/g "$DESTFILE"
|
||||
${GP}sed -i s/%CLASSLOWERCASE%/"$CLASSLOWER"/g "$DESTFILE"
|
||||
${GP}sed -i s/%CLASSMIXEDCASE%/"$CLASSNAME"/g "$DESTFILE"
|
||||
done
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user