1
#include "engineconfigdialog.h"
3
#include "pallabeling.h"
5
EngineConfigDialog::EngineConfigDialog( PalLabeling* lbl, QWidget* parent )
6
: QDialog( parent ), mLBL( lbl )
10
connect( buttonBox, SIGNAL( accepted() ), this, SLOT( onOK() ) );
13
cboSearchMethod->setCurrentIndex( mLBL->searchMethod() );
16
int candPoint, candLine, candPolygon;
17
mLBL->numCandidatePositions( candPoint, candLine, candPolygon );
18
spinCandPoint->setValue( candPoint );
19
spinCandLine->setValue( candLine );
20
spinCandPolygon->setValue( candPolygon );
22
chkShowCandidates->setChecked( mLBL->isShowingCandidates() );
24
chkShowAllLabels->setChecked( mLBL->isShowingAllLabels() );
28
void EngineConfigDialog::onOK()
31
mLBL->setSearchMethod(( PalLabeling::Search ) cboSearchMethod->currentIndex() );
33
mLBL->setNumCandidatePositions( spinCandPoint->value(),
34
spinCandLine->value(),
35
spinCandPolygon->value() );
37
mLBL->setShowingCandidates( chkShowCandidates->isChecked() );
39
mLBL->setShowingAllLabels( chkShowAllLabels->isChecked() );