mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
Give each plugin gui a unique class name based on the plugin name.
git-svn-id: http://svn.osgeo.org/qgis/trunk@3210 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
parent
06c90fe8bc
commit
0719a873a9
@ -111,7 +111,7 @@ void QgsCommunityRegPlugin::help()
|
||||
// Slot called when the buffer menu item is activated
|
||||
void QgsCommunityRegPlugin::run()
|
||||
{
|
||||
PluginGui *myPluginGui=new PluginGui(mQGisApp,"Community Register",true,0);
|
||||
QgsCommunityRegPluginGui *myPluginGui=new QgsCommunityRegPluginGui(mQGisApp,"Community Register",true,0);
|
||||
//listen for when the layer has been made so we can draw it
|
||||
connect(myPluginGui, SIGNAL(drawRasterLayer(QString)), this, SLOT(drawRasterLayer(QString)));
|
||||
connect(myPluginGui, SIGNAL(drawVectorLayer(QString,QString,QString)), this, SLOT(drawVectorLayer(QString,QString,QString)));
|
||||
|
@ -26,24 +26,24 @@
|
||||
|
||||
//standard includes
|
||||
|
||||
PluginGui::PluginGui() : PluginGuiBase()
|
||||
QgsCommunityRegPluginGui::QgsCommunityRegPluginGui() : QgsCommunityRegPluginGuiBase()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
PluginGui::PluginGui( QWidget* parent , const char* name , bool modal , WFlags fl )
|
||||
: PluginGuiBase( parent, name, modal, fl )
|
||||
QgsCommunityRegPluginGui::QgsCommunityRegPluginGui( QWidget* parent , const char* name , bool modal , WFlags fl )
|
||||
: QgsCommunityRegPluginGuiBase( parent, name, modal, fl )
|
||||
{
|
||||
mConnection = new QHttp();
|
||||
connect(mConnection, SIGNAL(done(bool)), this, SLOT(registrationDone(bool)));
|
||||
}
|
||||
PluginGui::~PluginGui()
|
||||
QgsCommunityRegPluginGui::~QgsCommunityRegPluginGui()
|
||||
{
|
||||
delete mConnection;
|
||||
delete mHttp;
|
||||
}
|
||||
|
||||
void PluginGui::pbnOK_clicked()
|
||||
void QgsCommunityRegPluginGui::pbnOK_clicked()
|
||||
{
|
||||
QUrl myTargetUrl("http://community.qgis.org");
|
||||
QString myHost = myTargetUrl.host();
|
||||
@ -66,12 +66,12 @@ void PluginGui::pbnOK_clicked()
|
||||
mHttp->post("/qgis_users/index.php", *myByteArray);
|
||||
done(1);
|
||||
}
|
||||
void PluginGui::pbnCancel_clicked()
|
||||
void QgsCommunityRegPluginGui::pbnCancel_clicked()
|
||||
{
|
||||
close(1);
|
||||
}
|
||||
|
||||
void PluginGui::pbnGetCoords_clicked()
|
||||
void QgsCommunityRegPluginGui::pbnGetCoords_clicked()
|
||||
{
|
||||
std::cout << "Get coords clicked" << std::endl;
|
||||
QgsLocationCaptureWidget * myWidget = new QgsLocationCaptureWidget();
|
||||
@ -81,7 +81,7 @@ void PluginGui::pbnGetCoords_clicked()
|
||||
|
||||
|
||||
|
||||
void PluginGui::submit()
|
||||
void QgsCommunityRegPluginGui::submit()
|
||||
{
|
||||
if (mConnection->state() == QHttp::HostLookup
|
||||
|| mConnection->state() == QHttp::Connecting
|
||||
@ -141,7 +141,7 @@ void PluginGui::submit()
|
||||
|
||||
}
|
||||
|
||||
void PluginGui::submitDone( bool error )
|
||||
void QgsCommunityRegPluginGui::submitDone( bool error )
|
||||
{
|
||||
if (error) {
|
||||
QMessageBox::critical(this, "Error submiting",
|
||||
|
@ -9,8 +9,8 @@
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
***************************************************************************/
|
||||
#ifndef PLUGINGUI_H
|
||||
#define PLUGINGUI_H
|
||||
#ifndef QGSCOMMUNTYREGPLUGINGUI_H
|
||||
#define QGSCOMMUNTYREGPLUGINGUI_H
|
||||
|
||||
#include <pluginguibase.h>
|
||||
class QUrl;
|
||||
@ -18,13 +18,13 @@ class QHttp;
|
||||
/**
|
||||
@author Tim Sutton
|
||||
*/
|
||||
class PluginGui : public PluginGuiBase
|
||||
class QgsCommunityRegPluginGui : public QgsCommunityRegPluginGuiBase
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
PluginGui();
|
||||
PluginGui( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
|
||||
~PluginGui();
|
||||
QgsCommunityRegPluginGui();
|
||||
QgsCommunityRegPluginGui( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
|
||||
~QgsCommunityRegPluginGui();
|
||||
public slots:
|
||||
void pbnOK_clicked();
|
||||
void pbnCancel_clicked();
|
||||
|
@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
** Form implementation generated from reading ui file 'pluginguibase.ui'
|
||||
**
|
||||
** Created: Wed Mar 16 23:39:35 2005
|
||||
** Created: Sun Apr 24 15:11:25 2005
|
||||
** by: The User Interface Compiler ($Id$)
|
||||
**
|
||||
** WARNING! All changes made in this file will be lost!
|
||||
@ -21,12 +21,11 @@
|
||||
#include <qimage.h>
|
||||
#include <qpixmap.h>
|
||||
|
||||
#include "pluginguibase.ui.h"
|
||||
static const unsigned char image0_data[] = {
|
||||
0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d,
|
||||
0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10,
|
||||
0x08, 0x06, 0x00, 0x00, 0x00, 0x1f, 0xf3, 0xff, 0x61, 0x00, 0x00, 0x02,
|
||||
0x2c, 0x49, 0x44, 0x41, 0x54, 0x38, 0x8d, 0x95, 0x93, 0x4b, 0x48, 0x54,
|
||||
0x2c, 0x49, 0x44, 0x41, 0x54, 0x78, 0x9c, 0x95, 0x93, 0x4b, 0x48, 0x54,
|
||||
0x51, 0x1c, 0xc6, 0x7f, 0xf7, 0x11, 0x96, 0xd3, 0x9d, 0x5b, 0xa6, 0x46,
|
||||
0x93, 0x4c, 0x36, 0x65, 0x64, 0x2d, 0x2c, 0x7a, 0x91, 0x99, 0x0d, 0x95,
|
||||
0x34, 0x09, 0x25, 0xf4, 0x58, 0x15, 0x08, 0xe2, 0xa3, 0x07, 0x46, 0x14,
|
||||
@ -72,8 +71,8 @@ static const unsigned char image0_data[] = {
|
||||
0xa9, 0xfb, 0xef, 0xdf, 0xb2, 0x90, 0x93, 0x99, 0x8c, 0x07, 0x33, 0xf8,
|
||||
0xfc, 0x41, 0xa7, 0x78, 0x47, 0x1a, 0xc0, 0xfc, 0xe4, 0x8c, 0x2f, 0xc1,
|
||||
0xe9, 0x54, 0x52, 0xe7, 0xed, 0x1b, 0xaf, 0x4a, 0x00, 0xd9, 0x05, 0xb0,
|
||||
0xb9, 0xc0, 0xae, 0xfd, 0x09, 0xd8, 0xd9, 0xcc, 0x2e, 0xed, 0x29, 0x08,
|
||||
0x32, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60,
|
||||
0xb9, 0xc0, 0xae, 0xfd, 0x09, 0xd8, 0xd9, 0xcc, 0x2e, 0xf4, 0x1c, 0x3d,
|
||||
0xb7, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60,
|
||||
0x82
|
||||
};
|
||||
|
||||
@ -627,13 +626,13 @@ static const char* const image1_data[] = {
|
||||
|
||||
|
||||
/*
|
||||
* Constructs a PluginGuiBase as a child of 'parent', with the
|
||||
* Constructs a QgsCommunityRegPluginGuiBase as a child of 'parent', with the
|
||||
* name 'name' and widget flags set to 'f'.
|
||||
*
|
||||
* The dialog will by default be modeless, unless you set 'modal' to
|
||||
* TRUE to construct a modal dialog.
|
||||
*/
|
||||
PluginGuiBase::PluginGuiBase( QWidget* parent, const char* name, bool modal, WFlags fl )
|
||||
QgsCommunityRegPluginGuiBase::QgsCommunityRegPluginGuiBase( QWidget* parent, const char* name, bool modal, WFlags fl )
|
||||
: QDialog( parent, name, modal, fl ),
|
||||
image1( (const char **) image1_data )
|
||||
{
|
||||
@ -641,10 +640,10 @@ PluginGuiBase::PluginGuiBase( QWidget* parent, const char* name, bool modal, WFl
|
||||
img.loadFromData( image0_data, sizeof( image0_data ), "PNG" );
|
||||
image0 = img;
|
||||
if ( !name )
|
||||
setName( "PluginGuiBase" );
|
||||
setName( "QgsCommunityRegPluginGuiBase" );
|
||||
setPaletteBackgroundColor( QColor( 255, 255, 255 ) );
|
||||
setIcon( image0 );
|
||||
PluginGuiBaseLayout = new QGridLayout( this, 1, 1, 11, 6, "PluginGuiBaseLayout");
|
||||
QgsCommunityRegPluginGuiBaseLayout = new QGridLayout( this, 1, 1, 11, 6, "QgsCommunityRegPluginGuiBaseLayout");
|
||||
|
||||
line1 = new QFrame( this, "line1" );
|
||||
line1->setMaximumSize( QSize( 2, 32767 ) );
|
||||
@ -652,7 +651,7 @@ PluginGuiBase::PluginGuiBase( QWidget* parent, const char* name, bool modal, WFl
|
||||
line1->setFrameShadow( QFrame::Sunken );
|
||||
line1->setFrameShape( QFrame::VLine );
|
||||
|
||||
PluginGuiBaseLayout->addMultiCellWidget( line1, 0, 3, 1, 1 );
|
||||
QgsCommunityRegPluginGuiBaseLayout->addMultiCellWidget( line1, 0, 3, 1, 1 );
|
||||
|
||||
layout73 = new QHBoxLayout( 0, 0, 6, "layout73");
|
||||
spacer2 = new QSpacerItem( 320, 21, QSizePolicy::Expanding, QSizePolicy::Minimum );
|
||||
@ -665,7 +664,7 @@ PluginGuiBase::PluginGuiBase( QWidget* parent, const char* name, bool modal, WFl
|
||||
pbnCancel = new QPushButton( this, "pbnCancel" );
|
||||
layout73->addWidget( pbnCancel );
|
||||
|
||||
PluginGuiBaseLayout->addMultiCellLayout( layout73, 4, 4, 0, 2 );
|
||||
QgsCommunityRegPluginGuiBaseLayout->addMultiCellLayout( layout73, 4, 4, 0, 2 );
|
||||
|
||||
txtHeading = new QLabel( this, "txtHeading" );
|
||||
txtHeading->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)1, 0, 0, txtHeading->sizePolicy().hasHeightForWidth() ) );
|
||||
@ -675,13 +674,13 @@ PluginGuiBase::PluginGuiBase( QWidget* parent, const char* name, bool modal, WFl
|
||||
txtHeading->setFont( txtHeading_font );
|
||||
txtHeading->setAlignment( int( QLabel::AlignCenter ) );
|
||||
|
||||
PluginGuiBaseLayout->addWidget( txtHeading, 0, 2 );
|
||||
QgsCommunityRegPluginGuiBaseLayout->addWidget( txtHeading, 0, 2 );
|
||||
|
||||
teInstructions_2 = new QTextEdit( this, "teInstructions_2" );
|
||||
teInstructions_2->setWordWrap( QTextEdit::WidgetWidth );
|
||||
teInstructions_2->setReadOnly( TRUE );
|
||||
|
||||
PluginGuiBaseLayout->addWidget( teInstructions_2, 1, 2 );
|
||||
QgsCommunityRegPluginGuiBaseLayout->addWidget( teInstructions_2, 1, 2 );
|
||||
|
||||
layout3 = new QGridLayout( 0, 1, 1, 0, 6, "layout3");
|
||||
|
||||
@ -749,7 +748,7 @@ PluginGuiBase::PluginGuiBase( QWidget* parent, const char* name, bool modal, WFl
|
||||
|
||||
layout3->addWidget( lePlaceDescription, 5, 1 );
|
||||
|
||||
PluginGuiBaseLayout->addMultiCellLayout( layout3, 2, 3, 2, 2 );
|
||||
QgsCommunityRegPluginGuiBaseLayout->addMultiCellLayout( layout3, 2, 3, 2, 2 );
|
||||
|
||||
pixmapLabel2 = new QLabel( this, "pixmapLabel2" );
|
||||
pixmapLabel2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)5, 0, 0, pixmapLabel2->sizePolicy().hasHeightForWidth() ) );
|
||||
@ -757,11 +756,11 @@ PluginGuiBase::PluginGuiBase( QWidget* parent, const char* name, bool modal, WFl
|
||||
pixmapLabel2->setPixmap( image1 );
|
||||
pixmapLabel2->setScaledContents( TRUE );
|
||||
|
||||
PluginGuiBaseLayout->addMultiCellWidget( pixmapLabel2, 0, 2, 0, 0 );
|
||||
QgsCommunityRegPluginGuiBaseLayout->addMultiCellWidget( pixmapLabel2, 0, 2, 0, 0 );
|
||||
|
||||
pbnGetCoords = new QPushButton( this, "pbnGetCoords" );
|
||||
|
||||
PluginGuiBaseLayout->addWidget( pbnGetCoords, 3, 0 );
|
||||
QgsCommunityRegPluginGuiBaseLayout->addWidget( pbnGetCoords, 3, 0 );
|
||||
languageChange();
|
||||
resize( QSize(702, 508).expandedTo(minimumSizeHint()) );
|
||||
clearWState( WState_Polished );
|
||||
@ -788,7 +787,7 @@ PluginGuiBase::PluginGuiBase( QWidget* parent, const char* name, bool modal, WFl
|
||||
/*
|
||||
* Destroys the object and frees any allocated resources
|
||||
*/
|
||||
PluginGuiBase::~PluginGuiBase()
|
||||
QgsCommunityRegPluginGuiBase::~QgsCommunityRegPluginGuiBase()
|
||||
{
|
||||
// no need to delete child widgets, Qt does it all for us
|
||||
}
|
||||
@ -797,7 +796,7 @@ PluginGuiBase::~PluginGuiBase()
|
||||
* Sets the strings of the subwidgets using the current
|
||||
* language.
|
||||
*/
|
||||
void PluginGuiBase::languageChange()
|
||||
void QgsCommunityRegPluginGuiBase::languageChange()
|
||||
{
|
||||
setCaption( tr( "QGIS Plugin QGIS Community Registration Plugin" ) );
|
||||
pbnOK->setText( tr( "&OK" ) );
|
||||
@ -821,3 +820,18 @@ void PluginGuiBase::languageChange()
|
||||
pbnGetCoords->setText( tr( "Get From Map" ) );
|
||||
}
|
||||
|
||||
void QgsCommunityRegPluginGuiBase::pbnOK_clicked()
|
||||
{
|
||||
qWarning( "QgsCommunityRegPluginGuiBase::pbnOK_clicked(): Not implemented yet" );
|
||||
}
|
||||
|
||||
void QgsCommunityRegPluginGuiBase::pbnCancel_clicked()
|
||||
{
|
||||
qWarning( "QgsCommunityRegPluginGuiBase::pbnCancel_clicked(): Not implemented yet" );
|
||||
}
|
||||
|
||||
void QgsCommunityRegPluginGuiBase::pbnGetCoords_clicked()
|
||||
{
|
||||
qWarning( "QgsCommunityRegPluginGuiBase::pbnGetCoords_clicked(): Not implemented yet" );
|
||||
}
|
||||
|
||||
|
@ -1,14 +1,14 @@
|
||||
/****************************************************************************
|
||||
** Form interface generated from reading ui file 'pluginguibase.ui'
|
||||
**
|
||||
** Created: Tue Mar 15 00:43:08 2005
|
||||
** Created: Sun Apr 24 15:11:25 2005
|
||||
** by: The User Interface Compiler ($Id$)
|
||||
**
|
||||
** WARNING! All changes made in this file will be lost!
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef PLUGINGUIBASE_H
|
||||
#define PLUGINGUIBASE_H
|
||||
#ifndef QGSCOMMUNITYREGPLUGINGUIBASE_H
|
||||
#define QGSCOMMUNITYREGPLUGINGUIBASE_H
|
||||
|
||||
#include <qvariant.h>
|
||||
#include <qpixmap.h>
|
||||
@ -24,13 +24,13 @@ class QLabel;
|
||||
class QTextEdit;
|
||||
class QLineEdit;
|
||||
|
||||
class PluginGuiBase : public QDialog
|
||||
class QgsCommunityRegPluginGuiBase : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
PluginGuiBase( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
|
||||
~PluginGuiBase();
|
||||
QgsCommunityRegPluginGuiBase( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
|
||||
~QgsCommunityRegPluginGuiBase();
|
||||
|
||||
QFrame* line1;
|
||||
QPushButton* pbnOK;
|
||||
@ -62,7 +62,7 @@ public slots:
|
||||
virtual void pbnGetCoords_clicked();
|
||||
|
||||
protected:
|
||||
QGridLayout* PluginGuiBaseLayout;
|
||||
QGridLayout* QgsCommunityRegPluginGuiBaseLayout;
|
||||
QHBoxLayout* layout73;
|
||||
QSpacerItem* spacer2;
|
||||
QGridLayout* layout3;
|
||||
@ -76,4 +76,4 @@ private:
|
||||
|
||||
};
|
||||
|
||||
#endif // PLUGINGUIBASE_H
|
||||
#endif // QGSCOMMUNITYREGPLUGINGUIBASE_H
|
||||
|
File diff suppressed because one or more lines are too long
@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
** Form implementation generated from reading ui file 'qgslocationcapturewidgetbase.ui'
|
||||
**
|
||||
** Created: Wed Mar 16 23:03:37 2005
|
||||
** Created: Sun Apr 24 15:11:25 2005
|
||||
** by: The User Interface Compiler ($Id$)
|
||||
**
|
||||
** WARNING! All changes made in this file will be lost!
|
||||
@ -10,7 +10,6 @@
|
||||
#include "qgslocationcapturewidgetbase.h"
|
||||
|
||||
#include <qvariant.h>
|
||||
#include <qgsmapcanvas.h>
|
||||
#include <qpushbutton.h>
|
||||
#include <qlabel.h>
|
||||
#include <qlayout.h>
|
||||
|
@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
** Form interface generated from reading ui file 'qgslocationcapturewidgetbase.ui'
|
||||
**
|
||||
** Created: Wed Mar 16 23:03:37 2005
|
||||
** Created: Sun Apr 24 15:11:25 2005
|
||||
** by: The User Interface Compiler ($Id$)
|
||||
**
|
||||
** WARNING! All changes made in this file will be lost!
|
||||
@ -12,7 +12,6 @@
|
||||
|
||||
#include <qvariant.h>
|
||||
#include <qwidget.h>
|
||||
#include <qgspoint.h>
|
||||
|
||||
class QVBoxLayout;
|
||||
class QHBoxLayout;
|
||||
|
@ -137,7 +137,7 @@ void QgsCopyrightLabelPlugin::help()
|
||||
// Slot called when the buffer menu item is activated
|
||||
void QgsCopyrightLabelPlugin::run()
|
||||
{
|
||||
PluginGui *myPluginGui=new PluginGui(qgisMainWindowPointer,"Copyright Label",true,0);
|
||||
QgsCopyrightLabelPluginGui *myPluginGui=new QgsCopyrightLabelPluginGui(qgisMainWindowPointer,"Copyright Label",true,0);
|
||||
//listen for when the layer has been made so we can draw it
|
||||
//connect(myPluginGui, SIGNAL(drawRasterLayer(QString)), this, SLOT(drawRasterLayer(QString)));
|
||||
//connect(myPluginGui, SIGNAL(drawVectorLayer(QString,QString,QString)), this, SLOT(drawVectorLayer(QString,QString,QString)));
|
||||
|
@ -20,25 +20,25 @@
|
||||
|
||||
//standard includes
|
||||
|
||||
PluginGui::PluginGui() : PluginGuiBase()
|
||||
QgsCopyrightLabelPluginGui::QgsCopyrightLabelPluginGui() : QgsCopyrightLabelPluginGuiBase()
|
||||
{
|
||||
//programmatically hide orientation selection for now
|
||||
cboOrientation->hide();
|
||||
textLabel15->hide();
|
||||
}
|
||||
|
||||
PluginGui::PluginGui( QWidget* parent , const char* name , bool modal , WFlags fl )
|
||||
: PluginGuiBase( parent, name, modal, fl )
|
||||
QgsCopyrightLabelPluginGui::QgsCopyrightLabelPluginGui( QWidget* parent , const char* name , bool modal , WFlags fl )
|
||||
: QgsCopyrightLabelPluginGuiBase( parent, name, modal, fl )
|
||||
{
|
||||
//programmatically hide orientation selection for now
|
||||
cboOrientation->hide();
|
||||
textLabel15->hide();
|
||||
}
|
||||
PluginGui::~PluginGui()
|
||||
QgsCopyrightLabelPluginGui::~QgsCopyrightLabelPluginGui()
|
||||
{
|
||||
}
|
||||
|
||||
void PluginGui::pbnOK_clicked()
|
||||
void QgsCopyrightLabelPluginGui::pbnOK_clicked()
|
||||
{
|
||||
//hide the dialog before we send all our signals
|
||||
hide();
|
||||
@ -51,22 +51,22 @@ void PluginGui::pbnOK_clicked()
|
||||
|
||||
done(1);
|
||||
}
|
||||
void PluginGui::pbnCancel_clicked()
|
||||
void QgsCopyrightLabelPluginGui::pbnCancel_clicked()
|
||||
{
|
||||
close(1);
|
||||
}
|
||||
|
||||
void PluginGui::setEnabled(bool theBool)
|
||||
void QgsCopyrightLabelPluginGui::setEnabled(bool theBool)
|
||||
{
|
||||
cboxEnabled->setChecked(theBool);
|
||||
}
|
||||
|
||||
void PluginGui::setText(QString theTextQString)
|
||||
void QgsCopyrightLabelPluginGui::setText(QString theTextQString)
|
||||
{
|
||||
txtCopyrightText->setText(theTextQString);
|
||||
}
|
||||
|
||||
void PluginGui::setPlacement(QString thePlacementQString)
|
||||
void QgsCopyrightLabelPluginGui::setPlacement(QString thePlacementQString)
|
||||
{
|
||||
cboPlacement->setCurrentText(tr(thePlacementQString));
|
||||
}
|
||||
|
@ -9,8 +9,8 @@
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
***************************************************************************/
|
||||
#ifndef PLUGINGUI_H
|
||||
#define PLUGINGUI_H
|
||||
#ifndef QGSCOPYRIGHTLABELPLUGINGUI_H
|
||||
#define QGSCOPYRIGHTLABELPLUGINGUI_H
|
||||
|
||||
#include <pluginguibase.h>
|
||||
#include <qfont.h>
|
||||
@ -19,13 +19,13 @@
|
||||
/**
|
||||
@author Tim Sutton
|
||||
*/
|
||||
class PluginGui : public PluginGuiBase
|
||||
class QgsCopyrightLabelPluginGui : public QgsCopyrightLabelPluginGuiBase
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
PluginGui();
|
||||
PluginGui( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
|
||||
~PluginGui();
|
||||
QgsCopyrightLabelPluginGui();
|
||||
QgsCopyrightLabelPluginGui( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
|
||||
~QgsCopyrightLabelPluginGui();
|
||||
void pbnOK_clicked();
|
||||
void pbnCancel_clicked();
|
||||
void setText(QString);
|
||||
|
File diff suppressed because one or more lines are too long
@ -22,7 +22,7 @@ int main(int argc, char *argv[])
|
||||
tor.load(QString("qgis_") + QTextCodec::locale(), QString(PKGDATAPATH) + "/i18n");
|
||||
a.installTranslator(&tor);
|
||||
|
||||
PluginGui *myPluginGui=new PluginGui();
|
||||
QgsGridMakerPluginGui *myPluginGui=new QgsGridMakerPluginGui();
|
||||
a.setMainWidget(myPluginGui);
|
||||
myPluginGui->show();
|
||||
|
||||
|
@ -132,7 +132,7 @@ void QgsGridMakerPlugin::help()
|
||||
// Slot called when the buffer menu item is activated
|
||||
void QgsGridMakerPlugin::run()
|
||||
{
|
||||
PluginGui *myPluginGui=new PluginGui(qgisMainWindowPointer,"Graticule Builder",true,0);
|
||||
QgsGridMakerPluginGui *myPluginGui=new QgsGridMakerPluginGui(qgisMainWindowPointer,"Graticule Builder",true,0);
|
||||
//listen for when the layer has been made so we can draw it
|
||||
connect(myPluginGui, SIGNAL(drawRasterLayer(QString)), this, SLOT(drawRasterLayer(QString)));
|
||||
connect(myPluginGui, SIGNAL(drawVectorLayer(QString,QString,QString)), this, SLOT(drawVectorLayer(QString,QString,QString)));
|
||||
|
@ -21,20 +21,20 @@
|
||||
//standard includes
|
||||
#include <iostream>
|
||||
|
||||
PluginGui::PluginGui() : PluginGuiBase()
|
||||
QgsGridMakerPluginGui::QgsGridMakerPluginGui() : QgsGridMakerPluginGuiBase()
|
||||
{
|
||||
|
||||
}
|
||||
PluginGui::PluginGui( QWidget* parent , const char* name , bool modal , WFlags fl )
|
||||
: PluginGuiBase( parent, name, modal, fl )
|
||||
QgsGridMakerPluginGui::QgsGridMakerPluginGui( QWidget* parent , const char* name , bool modal , WFlags fl )
|
||||
: QgsGridMakerPluginGuiBase( parent, name, modal, fl )
|
||||
{
|
||||
|
||||
}
|
||||
PluginGui::~PluginGui()
|
||||
QgsGridMakerPluginGui::~QgsGridMakerPluginGui()
|
||||
{
|
||||
}
|
||||
|
||||
void PluginGui::pbnOK_clicked()
|
||||
void QgsGridMakerPluginGui::pbnOK_clicked()
|
||||
{
|
||||
//check input file exists
|
||||
//
|
||||
@ -72,7 +72,7 @@ void PluginGui::pbnOK_clicked()
|
||||
}
|
||||
|
||||
|
||||
void PluginGui::pbnSelectOutputFile_clicked()
|
||||
void QgsGridMakerPluginGui::pbnSelectOutputFile_clicked()
|
||||
{
|
||||
std::cout << " Gps File Importer Gui::pbnSelectOutputFile_clicked() " << std::endl;
|
||||
QString myOutputFileNameQString = QFileDialog::getSaveFileName(
|
||||
@ -93,7 +93,7 @@ void PluginGui::pbnSelectOutputFile_clicked()
|
||||
}
|
||||
|
||||
|
||||
void PluginGui::pbnCancel_clicked()
|
||||
void QgsGridMakerPluginGui::pbnCancel_clicked()
|
||||
{
|
||||
close(1);
|
||||
}
|
||||
|
@ -9,21 +9,22 @@
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
***************************************************************************/
|
||||
#ifndef PLUGINGUI_H
|
||||
#define PLUGINGUI_H
|
||||
#ifndef QGSGRIDMAKERPLUGINGUI_H
|
||||
#define QGSGRIDMAKERPLUGINGUI_H
|
||||
|
||||
#include <pluginguibase.h>
|
||||
|
||||
/**
|
||||
@author Tim Sutton
|
||||
*/
|
||||
class PluginGui : public PluginGuiBase
|
||||
class QgsGridMakerPluginGui : public QgsGridMakerPluginGuiBase
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
PluginGui();
|
||||
PluginGui( QWidget* parent , const char* name , bool modal , WFlags );
|
||||
~PluginGui();
|
||||
QgsGridMakerPluginGui();
|
||||
QgsGridMakerPluginGui( QWidget* parent , const char* name ,
|
||||
bool modal , WFlags );
|
||||
~QgsGridMakerPluginGui();
|
||||
|
||||
private:
|
||||
|
||||
|
File diff suppressed because one or more lines are too long
@ -31,12 +31,13 @@ QgsNorthArrowPluginGui::QgsNorthArrowPluginGui() : QgsNorthArrowPluginGuiBase()
|
||||
rotatePixmap(0);
|
||||
}
|
||||
|
||||
QgsNorthArrowPluginGui::QgsNorthArrowPluginGui( QWidget* parent , const char* name , bool modal , WFlags fl )
|
||||
QgsNorthArrowPluginGui::QgsNorthArrowPluginGui( QWidget* parent , const char* name , bool modal , WFlags fl )
|
||||
: QgsNorthArrowPluginGuiBase( parent, name, modal, fl )
|
||||
{
|
||||
//temporary hack until this is implemented
|
||||
tabNorthArrowOptions->removePage( tabIcon );
|
||||
}
|
||||
|
||||
QgsNorthArrowPluginGui::~QgsNorthArrowPluginGui()
|
||||
{
|
||||
}
|
||||
|
@ -9,8 +9,8 @@
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
***************************************************************************/
|
||||
#ifndef PLUGINGUI_H
|
||||
#define PLUGINGUI_H
|
||||
#ifndef QGSNORTHARROWPLUGINGUI_H
|
||||
#define QGSNORTHARROWPLUGINGUI_H
|
||||
|
||||
#include <pluginguibase.h>
|
||||
|
||||
|
@ -71,7 +71,7 @@ if(($createIt eq 'y') || ($createIt eq 'Y')){
|
||||
# This is a brute force approach but its quick and dirty :)
|
||||
#
|
||||
# replace [pluginname] in template with the new plugin name
|
||||
system("perl -pi -e 's/\\\[pluginname\\\]/$pluginName/g' $pluginDir/*.cpp $pluginDir/*.h $pluginDir/*.am");
|
||||
system("perl -pi -e 's/\\\[pluginname\\\]/$pluginName/g' $pluginDir/*.cpp $pluginDir/*.h $pluginDir/*.am $pluginDir/*.ui");
|
||||
# replace [plugindescription] in template with the description
|
||||
system("perl -pi -e 's/\\\[plugindescription\\\]/$pluginDescription/g' $pluginDir/*.cpp $pluginDir/*.h $pluginDir/*.am");
|
||||
# replace [menuname] in the template with the menu name
|
||||
|
@ -111,7 +111,7 @@ void [pluginname]::help()
|
||||
// Slot called when the buffer menu item is activated
|
||||
void [pluginname]::run()
|
||||
{
|
||||
PluginGui *myPluginGui=new PluginGui(mQGisApp,"[menuitemname]",true,0);
|
||||
[pluginname]Gui *myPluginGui=new [pluginname]Gui(mQGisApp,"[menuitemname]",true,0);
|
||||
//listen for when the layer has been made so we can draw it
|
||||
connect(myPluginGui, SIGNAL(drawRasterLayer(QString)), this, SLOT(drawRasterLayer(QString)));
|
||||
connect(myPluginGui, SIGNAL(drawVectorLayer(QString,QString,QString)), this, SLOT(drawVectorLayer(QString,QString,QString)));
|
||||
|
@ -15,21 +15,21 @@
|
||||
|
||||
//standard includes
|
||||
|
||||
PluginGui::PluginGui() : PluginGuiBase()
|
||||
[pluginname]Gui::[pluginname]Gui() : [pluginname]GuiBase()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
PluginGui::PluginGui( QWidget* parent , const char* name , bool modal , WFlags fl )
|
||||
: PluginGuiBase( parent, name, modal, fl )
|
||||
[pluginname]Gui::[pluginname]Gui( QWidget* parent , const char* name , bool modal , WFlags fl )
|
||||
: [pluginname]GuiBase( parent, name, modal, fl )
|
||||
{
|
||||
|
||||
}
|
||||
PluginGui::~PluginGui()
|
||||
[pluginname]Gui::~[pluginname]Gui()
|
||||
{
|
||||
}
|
||||
|
||||
void PluginGui::pbnOK_clicked()
|
||||
void [pluginname]Gui::pbnOK_clicked()
|
||||
{
|
||||
//
|
||||
// If you have a produced a raster layer using your plugin, you can ask qgis to
|
||||
@ -41,7 +41,7 @@ void PluginGui::pbnOK_clicked()
|
||||
//close the dialog
|
||||
done(1);
|
||||
}
|
||||
void PluginGui::pbnCancel_clicked()
|
||||
void [pluginname]Gui::pbnCancel_clicked()
|
||||
{
|
||||
close(1);
|
||||
}
|
||||
|
@ -9,21 +9,21 @@
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
***************************************************************************/
|
||||
#ifndef PLUGINGUI_H
|
||||
#define PLUGINGUI_H
|
||||
#ifndef [pluginname]GUI_H
|
||||
#define [pluginname]GUI_H
|
||||
|
||||
#include <pluginguibase.h>
|
||||
|
||||
/**
|
||||
@author Tim Sutton
|
||||
*/
|
||||
class PluginGui : public PluginGuiBase
|
||||
class [pluginname]Gui : public [pluginname]GuiBase
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
PluginGui();
|
||||
PluginGui( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
|
||||
~PluginGui();
|
||||
[pluginname]Gui();
|
||||
[pluginname]Gui( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
|
||||
~[pluginname]Gui();
|
||||
void pbnOK_clicked();
|
||||
void pbnCancel_clicked();
|
||||
private:
|
||||
|
@ -1,8 +1,8 @@
|
||||
<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
|
||||
<class>PluginGuiBase</class>
|
||||
<class>[pluginname]GuiBase</class>
|
||||
<widget class="QDialog">
|
||||
<property name="name">
|
||||
<cstring>PluginGuiBase</cstring>
|
||||
<cstring>[pluginname]GuiBase</cstring>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
@ -188,13 +188,13 @@
|
||||
<connection>
|
||||
<sender>pbnOK</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>PluginGuiBase</receiver>
|
||||
<receiver>[pluginname]GuiBase</receiver>
|
||||
<slot>pbnOK_clicked()</slot>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>pbnCancel</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>PluginGuiBase</receiver>
|
||||
<receiver>[pluginname]GuiBase</receiver>
|
||||
<slot>pbnCancel_clicked()</slot>
|
||||
</connection>
|
||||
</connections>
|
||||
|
@ -9,13 +9,13 @@
|
||||
|
||||
|
||||
|
||||
void PluginGuiBase::pbnOK_clicked()
|
||||
void [pluginname]GuiBase::pbnOK_clicked()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
void PluginGuiBase::pbnCancel_clicked()
|
||||
void [pluginname]GuiBase::pbnCancel_clicked()
|
||||
{
|
||||
|
||||
}
|
||||
|
@ -150,7 +150,7 @@ void QgsScaleBarPlugin::help()
|
||||
// Slot called when the menu item is activated
|
||||
void QgsScaleBarPlugin::run()
|
||||
{
|
||||
PluginGui *myPluginGui=new PluginGui(qgisMainWindowPointer,"Scale Bar",true,0);
|
||||
QgsScaleBarPluginGui *myPluginGui=new QgsScaleBarPluginGui(qgisMainWindowPointer,"Scale Bar",true,0);
|
||||
myPluginGui->setPreferredSize(mPreferredSize);
|
||||
myPluginGui->setSnapping(mSnapping);
|
||||
myPluginGui->setPlacement(mPlacement);
|
||||
|
@ -14,21 +14,21 @@
|
||||
#include <qspinbox.h>
|
||||
#include <qcheckbox.h>
|
||||
|
||||
PluginGui::PluginGui() : PluginGuiBase()
|
||||
QgsScaleBarPluginGui::QgsScaleBarPluginGui() : QgsScaleBarPluginGuiBase()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
PluginGui::PluginGui( QWidget* parent , const char* name , bool modal , WFlags fl )
|
||||
: PluginGuiBase( parent, name, modal, fl )
|
||||
QgsScaleBarPluginGui::QgsScaleBarPluginGui( QWidget* parent , const char* name , bool modal , WFlags fl )
|
||||
: QgsScaleBarPluginGuiBase( parent, name, modal, fl )
|
||||
{
|
||||
|
||||
}
|
||||
PluginGui::~PluginGui()
|
||||
QgsScaleBarPluginGui::~QgsScaleBarPluginGui()
|
||||
{
|
||||
}
|
||||
|
||||
void PluginGui::pbnOK_clicked()
|
||||
void QgsScaleBarPluginGui::pbnOK_clicked()
|
||||
{
|
||||
hide();
|
||||
emit changePlacement(cboPlacement->currentText());
|
||||
@ -40,31 +40,31 @@ void PluginGui::pbnOK_clicked()
|
||||
emit refreshCanvas();
|
||||
done(1);
|
||||
}
|
||||
void PluginGui::pbnCancel_clicked()
|
||||
void QgsScaleBarPluginGui::pbnCancel_clicked()
|
||||
{
|
||||
close(1);
|
||||
}
|
||||
|
||||
void PluginGui::setPlacement(QString thePlacementQString)
|
||||
void QgsScaleBarPluginGui::setPlacement(QString thePlacementQString)
|
||||
{
|
||||
cboPlacement->setCurrentText(tr(thePlacementQString));
|
||||
}
|
||||
|
||||
void PluginGui::setPreferredSize(int thePreferredSize)
|
||||
void QgsScaleBarPluginGui::setPreferredSize(int thePreferredSize)
|
||||
{
|
||||
spnSize->setValue(thePreferredSize);
|
||||
}
|
||||
|
||||
void PluginGui::setSnapping(bool theSnapping)
|
||||
void QgsScaleBarPluginGui::setSnapping(bool theSnapping)
|
||||
{
|
||||
chkSnapping->setChecked(theSnapping);
|
||||
}
|
||||
void PluginGui::setEnabled(bool theBool)
|
||||
void QgsScaleBarPluginGui::setEnabled(bool theBool)
|
||||
{
|
||||
chkEnable->setChecked(theBool);
|
||||
}
|
||||
|
||||
void PluginGui::setStyle(QString theStyleQString)
|
||||
void QgsScaleBarPluginGui::setStyle(QString theStyleQString)
|
||||
{
|
||||
if ((tr(theStyleQString))=="Tick Down")
|
||||
{
|
||||
@ -84,7 +84,7 @@ void PluginGui::setStyle(QString theStyleQString)
|
||||
}
|
||||
}
|
||||
|
||||
void PluginGui::setColour(QColor theQColor)
|
||||
void QgsScaleBarPluginGui::setColour(QColor theQColor)
|
||||
{
|
||||
frameColour->setPaletteBackgroundColor(theQColor);
|
||||
}
|
||||
|
@ -9,21 +9,21 @@
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
***************************************************************************/
|
||||
#ifndef PLUGINGUI_H
|
||||
#define PLUGINGUI_H
|
||||
#ifndef QGSSCALEBARPLUGINGUI_H
|
||||
#define QGSSCALEBARPLUGINGUI_H
|
||||
|
||||
#include <pluginguibase.h>
|
||||
|
||||
/**
|
||||
@author Peter Brewer
|
||||
*/
|
||||
class PluginGui : public PluginGuiBase
|
||||
class QgsScaleBarPluginGui : public QgsScaleBarPluginGuiBase
|
||||
{
|
||||
Q_OBJECT;
|
||||
public:
|
||||
PluginGui();
|
||||
PluginGui( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
|
||||
~PluginGui();
|
||||
QgsScaleBarPluginGui();
|
||||
QgsScaleBarPluginGui( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
|
||||
~QgsScaleBarPluginGui();
|
||||
void pbnOK_clicked();
|
||||
void pbnCancel_clicked();
|
||||
void setPlacement(QString);
|
||||
|
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user