VR-Forces 4.0.4 Class Documentation
include/vrvCoreQt/DtEnvironmentWidget.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/DtEnvironmentInterface.h>
00015 
00016 #include <QtGui/QWidget>
00017 
00018 class QLabel;
00019 class QComboBox;
00020 class QCheckBox;
00021 class QGroupBox;
00022 class QPushButton;
00023 class QTreeWidget;
00024 class QDoubleSpinBox;
00025 class QTreeWidgetItem;
00026 
00027 namespace makVrv
00028 {
00029 
00030    class DtEnvironmentLogic;
00031    class DtPersistenceControlsInterface;
00032 
00035    class DT_DLL_VRVCOREQT DtEnvironmentWidget
00036       : public QWidget, public DtEnvironmentInterface
00037    {  Q_OBJECT;
00038    protected:
00039 
00040       enum
00041       {
00042          CloudTreeColumnType = 0,
00043          CloudTreeColumnX,
00044          CloudTreeColumnY,
00045          CloudTreeColumnAltitude,
00046          CloudTreeColumnEnabled,
00047       };
00048 
00049    public:
00050 
00052       DtEnvironmentWidget( DtDe& de,
00053          DtPersistenceControlsInterface& persistenceControls, QWidget* parent = 0 );
00054 
00056       virtual ~DtEnvironmentWidget();
00057 
00061 
00063       virtual void setListenToRemoteWeather( bool listen );
00064 
00066       virtual void setRefreshButtonEnabled( bool enabled );
00067 
00069       virtual void addCloudLayer( QString type, QString xLocation,
00070          QString yLocation, QString altitude, bool enabled );
00071 
00072       virtual void removeAllCloudLayers();
00073 
00075       virtual void removeCloudLayer( int index );
00076 
00078       virtual void setCloudLayerEnabled( unsigned int index, bool enabled );
00079 
00081       virtual void setPrecipitationEnabled( bool enabledFlag );
00082 
00084       virtual void setPrecipitationType( const std::string& type );
00085 
00087       virtual void setPrecipitationIntensity( float intensity );
00088 
00090       virtual void setTurbidity( float value );
00091 
00093       virtual void setVisibleDistance( float distance );
00094 
00096       virtual void setVisibleDistanceDecimals( int decimals );
00097 
00099       virtual void setVisibleDistanceUnits( const DtUnicode& units );
00100 
00102       virtual void setAxisLabels( const DtUnicode& x, const DtUnicode& y, const DtUnicode& z );
00103 
00105 
00108 
00110       virtual void queryUserForNewCloudLayer();
00111 
00114       virtual void queryUserToEditCloudLayer( int index );
00115 
00117 
00118    protected:
00119 
00122       void setupGui();
00123 
00126       void connectToSignals();
00127 
00129       std::string untranslatePrecipitationType( QString type ) const;
00130 
00132       QString translatePrecipitationType( const std::string& type ) const;
00133 
00134    protected slots:
00135 
00139 
00140       void on_myListenToVrfBox_stateChanged( int );
00141       void on_myRefreshVrfWeatherButton_clicked();
00142       void on_myCloudLayersTree_itemSelectionChanged();
00143       void on_myCloudLayersTree_itemChanged( QTreeWidgetItem* item,int column );
00144       void on_myAddCloudLayerButton_clicked();
00145       void on_myDeleteCloudLayerButton_clicked();
00146       void on_myEditCloudLayerButton_clicked();
00147       void on_myTurbidityBox_currentIndexChanged( int );
00148       void on_myTurbiditySpinBox_valueChanged( double );
00149       void on_myVisibilityBox_valueChanged( double );
00150       void on_myPrecipitationGroup_toggled( bool state );
00151       void on_myPrecipitationTypeBox_indexChanged( int index );
00152       void on_myPrecipitationIntensityBox_valueChanged( double value );
00153 
00155 
00156    protected:
00157 
00158       DtDe& myDe;
00159 
00160       DtEnvironmentLogic* myLogic;
00161 
00162       QCheckBox* myListenToVrfBox;
00163       QPushButton* myRefreshVrfWeatherButton;
00164 
00165       QLabel* myCloudLayerLabel;
00166       QTreeWidget* myCloudLayersTree;
00167       QPushButton* myAddCloudLayerButton;
00168       QPushButton* myDeleteCloudLayerButton;
00169       QPushButton* myEditCloudLayerButton;
00170 
00171       QLabel* myTurbidityLabel;
00172       QComboBox* myTurbidityBox;
00173       QDoubleSpinBox* myTurbiditySpinBox;
00174       QLabel* myVisibilityLabel;
00175       QDoubleSpinBox* myVisibilityBox;
00176 
00177       QCheckBox* myPrecipitionCheckbox;
00178       QLabel* myPrecipitionTypeLabel;
00179       QComboBox* myPrecipitationTypeBox;
00180       QLabel* myPrecipitionIntensityLabel;
00181       QDoubleSpinBox* myPrecipitionIntensityBox;
00182 
00183       std::vector<std::pair<QString,float> > myPredefinedValues;
00184 
00185    };
00186 
00187 }

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)