17#include "ui_qgsdirectionallightwidget.h"
27 mAzimuthSpinBox->setClearValue( 315.0 );
28 mAltitudeSpinBox->setClearValue( 45.0 );
30 connect( mAzimuthSpinBox, qOverload<double>( &QDoubleSpinBox::valueChanged ),
this, [
this](
double value )
32 whileBlocking( mDialAzimuth )->setValue(
static_cast<int>( value * 10 + 1800 ) % 3600 );
36 connect( mDialAzimuth, &QDial::valueChanged,
this, [
this](
int value )
38 whileBlocking( mAzimuthSpinBox )->setValue( std::fmod( value / 10.0 + 180, 360.0 ) );
42 connect( mAltitudeSpinBox, qOverload<double>( &QDoubleSpinBox::valueChanged ),
this, [
this](
double value )
44 whileBlocking( mAltitudeSlider )->setValue(
static_cast<int>( value * 10 ) );
48 connect( mAltitudeSlider, &QSlider::valueChanged,
this, [
this](
int value )
61 mAzimuthSpinBox->setValue(
azimuth );
66 return mAzimuthSpinBox->value();
71 mAltitudeSpinBox->setValue(
altitude );
76 return mAltitudeSpinBox->value();
81 mAzimuthSpinBox->setEnabled( enable );
82 mDialAzimuth->setEnabled( enable );
QgsSignalBlocker< Object > whileBlocking(Object *object)
Temporarily blocks signals from a QObject while calling a single method from the object.