コード例 #1
0
QgsMapToolSimplify::QgsMapToolSimplify( QgsMapCanvas* canvas )
    : QgsMapToolEdit( canvas ), mRubberBand( 0 )
{
  mSimplifyDialog = new QgsSimplifyDialog( canvas->topLevelWidget() );
  connect( mSimplifyDialog, SIGNAL( toleranceChanged( int ) ),
           this, SLOT( toleranceChanged( int ) ) );
  connect( mSimplifyDialog, SIGNAL( storeSimplified() ),
           this, SLOT( storeSimplified() ) );
  connect( mSimplifyDialog, SIGNAL( finished( int ) ),
           this, SLOT( removeRubberBand() ) );
}
コード例 #2
0
ファイル: qgsmaptoolsimplify.cpp プロジェクト: chhao91/QGIS
QgsSimplifyDialog::QgsSimplifyDialog( QgsMapToolSimplify* tool, QWidget* parent )
    : QDialog( parent )
    , mTool( tool )
{
  setupUi( this );

  spinTolerance->setValue( mTool->tolerance() );
  cboToleranceUnits->setCurrentIndex(( int ) mTool->toleranceUnits() );

  // communication with map tool
  connect( spinTolerance, SIGNAL( valueChanged( double ) ), mTool, SLOT( setTolerance( double ) ) );
  connect( cboToleranceUnits, SIGNAL( currentIndexChanged( int ) ), mTool, SLOT( setToleranceUnits( int ) ) );
  connect( okButton, SIGNAL( clicked() ), mTool, SLOT( storeSimplified() ) );
}
コード例 #3
0
void QgsSimplifyDialog::simplify()
{
  emit storeSimplified();
}