~ubuntu-branches/ubuntu/wily/qgis/wily

« back to all changes in this revision

Viewing changes to src/plugins/labeling/engineconfigdialog.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Johan Van de Wauw
  • Date: 2010-07-11 20:23:24 UTC
  • mfrom: (3.1.4 squeeze)
  • Revision ID: james.westby@ubuntu.com-20100711202324-5ktghxa7hracohmr
Tags: 1.4.0+12730-3ubuntu1
* Merge from Debian unstable (LP: #540941).
* Fix compilation issues with QT 4.7
* Add build-depends on libqt4-webkit-dev 

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#include "engineconfigdialog.h"
 
2
 
 
3
#include "pallabeling.h"
 
4
 
 
5
EngineConfigDialog::EngineConfigDialog( PalLabeling* lbl, QWidget* parent )
 
6
    : QDialog( parent ), mLBL( lbl )
 
7
{
 
8
  setupUi( this );
 
9
 
 
10
  connect( buttonBox, SIGNAL( accepted() ), this, SLOT( onOK() ) );
 
11
 
 
12
  // search method
 
13
  cboSearchMethod->setCurrentIndex( mLBL->searchMethod() );
 
14
 
 
15
  // candidate numbers
 
16
  int candPoint, candLine, candPolygon;
 
17
  mLBL->numCandidatePositions( candPoint, candLine, candPolygon );
 
18
  spinCandPoint->setValue( candPoint );
 
19
  spinCandLine->setValue( candLine );
 
20
  spinCandPolygon->setValue( candPolygon );
 
21
 
 
22
  chkShowCandidates->setChecked( mLBL->isShowingCandidates() );
 
23
 
 
24
  chkShowAllLabels->setChecked( mLBL->isShowingAllLabels() );
 
25
}
 
26
 
 
27
 
 
28
void EngineConfigDialog::onOK()
 
29
{
 
30
  // save
 
31
  mLBL->setSearchMethod(( PalLabeling::Search ) cboSearchMethod->currentIndex() );
 
32
 
 
33
  mLBL->setNumCandidatePositions( spinCandPoint->value(),
 
34
                                  spinCandLine->value(),
 
35
                                  spinCandPolygon->value() );
 
36
 
 
37
  mLBL->setShowingCandidates( chkShowCandidates->isChecked() );
 
38
 
 
39
  mLBL->setShowingAllLabels( chkShowAllLabels->isChecked() );
 
40
 
 
41
  accept();
 
42
}