25 mLayout =
new QGridLayout(
this );
26 mLayout->setContentsMargins( 0, 0, 0, 0 );
28 QLabel* minLbl =
new QLabel(
tr(
"Minimum\n(exclusive)" ),
this );
29 minLbl->setWordWrap(
true );
30 minLbl->setAlignment( Qt::AlignTop );
31 minLbl->setToolTip(
tr(
"Minimum scale, i.e. maximum scale denominator. "
32 "This limit is exclusive, that means the layer will not be displayed on this scale." ) );
33 QLabel* maxLbl =
new QLabel(
tr(
"Maximum\n(inclusive)" ),
this );
34 maxLbl->setWordWrap(
true );
35 maxLbl->setAlignment( Qt::AlignTop );
36 maxLbl->setToolTip(
tr(
"Maximum scale, i.e. minimum scale denominator. "
37 "This limit is inclusive, that means the layer will be displayed on this scale." ) );
39 mMinimumScaleIconLabel =
new QLabel(
this );
41 mMaximumScaleIconLabel =
new QLabel(
this );
50 mMinimumScaleWidget->
setScale( 1.0 / 100000 );
51 mMaximumScaleWidget->
setScale( 1.0 / 1000 );
53 mLayout->addWidget( minLbl, 0, 0, 2, 1 );
54 mLayout->addWidget( mMinimumScaleIconLabel, 0, 1 );
55 mLayout->addWidget( mMinimumScaleWidget, 0, 2 );
56 mLayout->addWidget( maxLbl, 0, 3, 2, 1 );
57 mLayout->addWidget( mMaximumScaleIconLabel, 0, 4 );
58 mLayout->addWidget( mMaximumScaleWidget, 0, 5 );
60 mLayout->setColumnStretch( 0, 0 );
61 mLayout->setColumnStretch( 1, 0 );
62 mLayout->setColumnStretch( 2, 3 );
63 mLayout->setColumnStretch( 3, 0 );
64 mLayout->setColumnStretch( 4, 0 );
65 mLayout->setColumnStretch( 5, 3 );
91 mMinimumScaleWidget->
setScale( scale );
96 return mMinimumScaleWidget->
scale();
101 mMaximumScaleWidget->
setScale( scale );
106 return mMaximumScaleWidget->
scale();