VR-Forces 4.0.4 Class Documentation
include/vrvCoreQt/DtRadioCommunicationsSettingsWidget.h
Go to the documentation of this file.
00001 /*****************************************************************************
00002  * Copyright (c) 2012 MAK Technologies, Inc.
00003  * All rights reserved.
00004  *****************************************************************************/
00005 
00009 
00010 #pragma once
00011 
00012 #include <vrvCoreQt/vrvCoreQt.h>
00013 
00014 #include <vrvCoreQt/DtRadioCommunicationsSettingsInterface.h>
00015 
00016 #include <QtGui/QWidget>
00017 #include <QtGui/QLabel>
00018 
00019 class QDoubleSpinBox;
00020 class QRadioButton;
00021 class QCheckBox;
00022 class QComboBox;
00023 class QGroupBox;
00024 class QSlider;
00025 class QLabel;
00026 
00027 namespace makVrv
00028 {
00029 
00030    class DtRangeEditorWidget;
00031 
00034    class DT_DLL_VRVCOREQT DtRadioCommunicationsSettingsWidget
00035       : public QWidget, public DtRadioCommunicationsSettingsInterface
00036    {  Q_OBJECT;
00037    public:
00038 
00040       DtRadioCommunicationsSettingsWidget( DtDe& de, QWidget* parent,
00041          Qt::WindowFlags f = Qt::Widget );
00042 
00044       virtual ~DtRadioCommunicationsSettingsWidget();
00045 
00050 
00051       virtual void setRadioCommsVisibility( bool visible );
00052       virtual void setCommLinesVisibility( bool visible );
00053       virtual void setSquawkIndicatorsVisibility( bool visible );
00054       virtual void setCommLineLifetime( double lifetime );
00055       virtual void setSquawkIndicatorLifetime( double lifetime );
00056       virtual void setCommLineDisplayMode(
00057          makArchives::DtRadioCommunicationsSettingsRecord::CommLineMode mode );
00058       virtual void setGreatCircleExaggerationAmount( double amount );
00059       virtual void setDefaultColoringMode(
00060          makArchives::DtRadioCommunicationsSettingsRecord::DefaultColoringMode mode );
00061       virtual void setDefaultFrequencyColor( float r, float g, float b );
00062       virtual void setDefaultFrequencyColor( QColor color );
00063       virtual void addFrequencyRange( float rangeStart, float rangeEnd,
00064          float r, float g, float b );
00065       virtual void clearFrequencyRanges();
00066 
00067       virtual void setCurrentGradient( const DtRangeEditorInterface::Gradient& grad );
00068       virtual DtRangeEditorInterface::Gradient currentGradient() const;
00069 
00071 
00072    protected:
00073 
00076       void setupGui();
00077 
00080       void connectToSignals();
00081 
00084       virtual void updateEnabledStates();
00085 
00086    protected slots:
00087 
00092 
00093       void slot_onRadioCommsVisibilityChanged( bool visible );
00094       void slot_onCommLinesVisiblityChanged( bool visible );
00095       void slot_onSquawkIndicatorsVisibilityChanged( bool visible );
00096       void slot_onCommLineLifetimeChanged( double lifetime );
00097       void slot_onSquawkIndicatorLifetimeChanged( double lifetime );
00098       void slot_onCommLineDisplayModeChanged( int index );
00099       void slot_onGreatCircleExaggerationAmountChanged( int val );
00100       void slot_onDefaultColorRadioButtonToggled( bool onOff );
00101       void slot_onRequestChangeDefaultFrequencyColor();
00102       void slot_gradientChanged( const DtRangeEditorInterface::Gradient& grad );
00103 
00105 
00106    protected:
00107 
00108       QCheckBox* myRadioCommsVisibilityCheckBox;
00109       QCheckBox* myCommLinesVisibilityCheckBox;
00110       QCheckBox* mySquawkIndicatorsVisibilityCheckBox;
00111       QDoubleSpinBox* myCommLineLifetimeSpinner;
00112       QDoubleSpinBox* mySquawkIndicatorLifetimeSpinner;
00113       QComboBox* myCommLineDisplayModeCombo;
00114       QLabel* myCommLineLifetimeLabel;
00115       QLabel* mySquawkIndicatorLifetimeLabel;
00116       QLabel* myCommLineDisplayModeLabel;
00117       QLabel* myGreatCircleExaggerationLabel;
00118       QSlider* myGreatCircleExaggerationSlider;
00119       QRadioButton* myForceColorRadioButton;
00120       QRadioButton* myCustomColorRadioButton;
00121       QLabel* myOutOfRangeColorLabel;
00122       QLabel* myOutOfRangeColorSwatch;
00123       DtRangeEditorWidget* myRangeEditorWidget;
00124 
00125       QColor mySwatchColor;
00126 
00127       DtDe& myDe;
00128 
00129    };
00130 
00131 
00135    class DtClickableQLabel : public QLabel
00136    {  Q_OBJECT;
00137    signals:
00138 
00140       void doubleClicked();
00141 
00143       void rightClicked();
00144 
00145    public:
00146 
00149       void mouseDoubleClickEvent( QMouseEvent* e );
00150 
00153       void mousePressEvent( QMouseEvent* e );
00154 
00155    };
00156 
00157 }

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)