21 #include <QPushButton>
24 #include <QVBoxLayout>
36 : QWidget( _pqParent )
37 , bPointerEnable( true )
48 QVBoxLayout* __pqVBoxLayout =
new QVBoxLayout();
67 QFrame* __pqFrameSeparator1 =
new QFrame();
68 __pqFrameSeparator1->setFrameStyle( QFrame::HLine | QFrame::Sunken );
69 __pqVBoxLayout->addWidget( __pqFrameSeparator1 );
91 __pqVBoxLayout->setAlignment(
pqSliderScale, Qt::AlignHCenter );
106 QWidget::connect(
pqPushButtonScaleFit, SIGNAL( clicked() ), __poChartTable, SLOT( slotScaleFit() ) );
108 QFrame* __pqFrameSeparator2 =
new QFrame();
109 __pqFrameSeparator2->setFrameStyle( QFrame::HLine | QFrame::Sunken );
110 __pqVBoxLayout->addWidget( __pqFrameSeparator2 );
118 QWidget::connect(
pqPushButtonTarget, SIGNAL( toggled(
bool) ), __poChartTable, SLOT( slotPointerTarget(
bool) ) );
126 QWidget::connect(
pqPushButtonMeasureSingle, SIGNAL( toggled(
bool) ), __poChartTable, SLOT( slotPointerPathSingle(
bool) ) );
134 QWidget::connect(
pqPushButtonMeasure, SIGNAL( toggled(
bool) ), __poChartTable, SLOT( slotPointerPath(
bool) ) );
136 QFrame* __pqFrameSeparator3 =
new QFrame();
137 __pqFrameSeparator3->setFrameStyle( QFrame::HLine | QFrame::Sunken );
138 __pqVBoxLayout->addWidget( __pqFrameSeparator3 );
148 QPushButton* __pqPushButtonLoad =
new QPushButton( QIcon(
":icons/32x32/chart_load.png" ),
"" );
149 __pqPushButtonLoad->setToolTip( tr(
"Load chart from disk") );
150 __pqPushButtonLoad->installEventFilter( __poChartTable );
151 __pqPushButtonLoad->setMaximumSize( 36, 34 );
152 __pqVBoxLayout->addWidget( __pqPushButtonLoad );
153 QWidget::connect( __pqPushButtonLoad, SIGNAL( clicked() ), __poChartTable, SLOT( slotLoadChart() ) );
159 QWidget::setLayout( __pqVBoxLayout );
173 pqPushButtonPositionLock->setIcon( QIcon( _bLock ?
":icons/32x32/move_lock.png" :
":icons/32x32/move_unlock.png" ) );
179 pqPushButtonScaleLock->setIcon( QIcon( _bLock ?
":icons/32x32/zoom_lock.png" :
":icons/32x32/zoom_unlock.png" ) );
283 pqPushButtonElevation->setIcon( QIcon( _bShowElevation ?
":icons/32x32/elevation_visible.png" :
":icons/32x32/elevation_hidden.png" ) );
void slotScaleTo(int _iValue)
[UI:Slot] Slot to trigger scaling to the given value
QPushButton * pqPushButtonElevation
[UI:Button] Elevation model
void enableControls(bool _bEnable)
Enables/disables all chart controls.
void slotScaleIn()
[UI:Slot] Slot to trigger scale in (zoom out)
QSlider * pqSliderScale
[UI:Button] Scale slider
void stepScale(bool _bIncrease, bool _bBigStep=true)
Increases/decreases the scale by discrete steps.
void enablePointer(bool _bEnable)
Enables/disables pointer actions.
void slotElevation(bool _bAddOrShow)
[UI:Slot] Slot to manage elevation model (add, view, hide)
void slotPositionLock(bool _bLock)
[UI:Slot] Slot to modify the position lock/unlock status
QPushButton * pqPushButtonMeasure
[UI:Button] Ongoing measurements
bool bPointerEnable
Pointer actions activation status.
QPushButton * pqPushButtonScaleIn
[UI:Button] Scale in (zoom out)
void slotScaleLock(bool _bLock)
[UI:Slot] Slot to modify the scale lock/unlock status
void constructLayout()
Constructs the layout of the user-interface.
void slotElevationAdd()
[UI:Slot] Slot to add elevation model
void setScale(double _fdScale)
Sets the scale at the given value.
QPushButton * pqPushButtonScaleFit
[UI:Button] Scale fit
void slotScaleOut()
[UI:Slot] Slot to trigger scale out (zoom in)
QPushButton * pqPushButtonScaleLock
[UI:Button] Lock/unlock scale
void enableMeasureSingle(bool _bEnable)
Enables/disables single measurement.
void setElevation(bool _bHasElevation, bool _bShowElevation)
Sets elevation status.
void lockScale(bool _bLock)
Sets the scale lock/unlock status.
QPushButton * pqPushButtonPositionLock
[UI:Button] Lock/unlock position
void enableTarget(bool _bEnable)
Enables/disables target.
CChartControl(QWidget *_pqParent=0)
QPushButton * pqPushButtonScaleActual
[UI:Button] Scale actual
void enableMeasure(bool _bEnable)
Enables/disables ongoing measurements.
QPushButton * pqPushButtonTarget
[UI:Button] Target
QPushButton * pqPushButtonMeasureSingle
[UI:Button] Single measurement
void lockPosition(bool _bLock)
Sets the position lock/unlock status.
QPushButton * pqPushButtonScaleOut
[UI:Button] Scale out (zoom in)
[UI] Virtual "chart table" (view)
void showElevation(bool _bShow)
Display elevation data (instead of raster data) of the currently selected chart (if any)
void lockScale(bool _bLock)
Sets the scale lock/unlock status.
void setScale(double _fdScale, bool _bSkipCurrent=false, bool _bUpdateControl=true)
Sets the reference scale factor.
void lockPosition(bool _bLock)
Sets the position lock/unlock status.
void slotAddElevation()
[UI:Slot] Slot to add elevation data to the currently displayed chart
bool hasElevation()
Returns whether the currently selected chart has been associated elevation data (if any)
void enablePointerPath(bool _bEnable)
Enables/disables ongoing measurements (pointer path)
static CChartTable * useChartTable()