VR-Forces 4.0.4 Class Documentation
include/vrvCoreQt/DtGridLinesPage.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/DtGridLinesInterface.h>
00015 #include <vrvCoreQt/DtPage.h>
00016 
00017 class QButtonGroup;
00018 class QComboBox;
00019 class QDoubleSpinBox;
00020 class QGroupBox;
00021 class QHBoxLayout;
00022 class QLabel;
00023 class QRadioButton;
00024 class QSpinBox;
00025 class QVBoxLayout;
00026 class QGridLayout;
00027 
00028 namespace makVrv
00029 {
00030 
00031    class DtVirtualBaseClass;
00032    class DtPersistenceToolbarWidget;
00033 
00036    class DT_DLL_VRVCOREQT DtGridLinesPage
00037       : public DtPage, public DtGridLinesInterface
00038    {  Q_OBJECT;
00039    public:
00040 
00042       DtGridLinesPage( DtDe& de, QWidget* parent = 0, Qt::WindowFlags f = 0 );
00043 
00045       virtual ~DtGridLinesPage();
00046 
00048       virtual QIcon icon();
00049 
00051       virtual QString title();
00052 
00054       virtual const std::string& pageClassName() const;
00055 
00057       static const std::string& thePageClassName();
00058 
00060       virtual void setAutoSpacing( bool autoSpacing );
00061 
00063       virtual void setFixedSpacingAmount( double amount );
00064 
00066       virtual void setMaxFixedSpacing( double maxSpacing );
00067 
00069       virtual void setMinFixedSpacing( double minSpacing );
00070 
00072       virtual void setGridType(
00073          makArchives::DtDisplayUnitsSettingsRecord::CoordSys gridType );
00074 
00076       virtual void clearGridTypes();
00077 
00079       virtual void disableAllGridTypes();
00080 
00082       virtual void addGridType(const DtUnicode& gridName, 
00083          makArchives::DtDisplayUnitsSettingsRecord::CoordSys gridType );
00084 
00086       virtual void setXOffset( double offset );
00087 
00089       virtual void setYOffset( double offset );
00090 
00092       virtual void setMinSpacing( int pixels );
00093       
00095       virtual void setUnitType(
00096          makArchives::DtDisplayUnitsSettingsRecord::DistanceUnits unitType);
00097 
00098       virtual void setUnitType(
00099          makArchives::DtDisplayUnitsSettingsRecord::OrientationUnits unitType);
00100 
00102       virtual void clearUnitTypes();
00103 
00105       virtual void setUnitTypeEnabled(
00106          makArchives::DtDisplayUnitsSettingsRecord::DistanceUnits unitType, bool enabled );
00107       virtual void setUnitTypeEnabled(
00108          makArchives::DtDisplayUnitsSettingsRecord::OrientationUnits unitType, bool enabled );
00109 
00111       virtual void addUnitType( const DtUnicode& unitName,
00112          makArchives::DtDisplayUnitsSettingsRecord::DistanceUnits unitType);
00113 
00114        virtual void addUnitType( const DtUnicode& unitName,
00115          makArchives::DtDisplayUnitsSettingsRecord::OrientationUnits unitType);
00116 
00118       virtual void setDecimals( unsigned decimals );
00119 
00121       virtual void setFixedSpacingAmountEnabled( bool enabled );
00122 
00124       virtual void setMinSpacingEnabled( bool enabled );
00125 
00128       virtual void setGridTypeEnabled(
00129          makArchives::DtDisplayUnitsSettingsRecord::CoordSys, bool enabled );
00130 
00132       virtual void setDecimalsEnabled( bool enabled );
00133 
00134    protected slots:
00135 
00137       void on_gridTypeCombo_currentIndexChanged( int index );
00138 
00140       void on_unitTypeCombo_currentIndexChanged( int index );
00141 
00143       void on_autoSpacingRadioButtonClicked();
00144 
00146       void on_fixedSpacingRadioButtonClicked();
00147 
00149       void on_fixedSpacingAmountChanged( double val );
00150 
00152       void on_minSpacingChanged( int val );
00153 
00155       void on_xOffsetChanged( double val );
00156 
00158       void on_yOffsetChanged( double val );
00159 
00161       void on_decimalsChanged( int decimals );
00162 
00163    protected:
00164 
00167       void setupGui();
00168 
00171       void connectToSignals();
00172 
00174       virtual void activate();
00175 
00177       virtual void deactivate();
00178 
00180       QString notation(
00181          makArchives::DtDisplayUnitsSettingsRecord::DistanceUnits unitType );
00182       QString notation(
00183          makArchives::DtDisplayUnitsSettingsRecord::OrientationUnits unitType );
00184       void setupUnitLabels( const QString& notation );
00185 
00186    public:
00187 
00188       DtPersistenceToolbarWidget* myToolbar;
00189 
00190       QGridLayout* myGridTypeLayout;
00191       QLabel* myGridTypeLabel;
00192       QComboBox* myGridTypeComboBox;
00193 
00194       QLabel* myUnitTypeLabel;
00195       QComboBox* myUnitTypeComboBox;
00196 
00197       QLabel* myDecimalsLabel;
00198       QSpinBox* myDecimalsSpinBox;
00199 
00200       QButtonGroup* mySpacingButtonGroup;
00201       QRadioButton* myAutoSpacingRadioButton;
00202       QRadioButton* myFixedSpacingRadioButton;
00203       QLabel* mySpacingAmountLabel;
00204       QLabel* myMinSpacingLabel;
00205       QDoubleSpinBox* mySpacingAmountSpinBox;
00206       QSpinBox* myMinSpacingSpinBox;
00207 
00208       QHBoxLayout* myXOffsetLayout;
00209       QHBoxLayout* myYOffsetLayout;
00210       QLabel* myXOffsetLabel;
00211       QLabel* myYOffsetLabel;
00212       QDoubleSpinBox* myXOffsetSpinBox;
00213       QDoubleSpinBox* myYOffsetSpinBox;
00214 
00215    protected:
00216 
00217       DtDe& myDe;
00218       DtVirtualBaseClass* myLogic;
00219       std::string myClassName;
00220       bool myUsingAngularUnits;
00221 
00222    };
00223 
00224 
00227    typedef DtPageCreatorTemplate<DtGridLinesPage> DtGridLinesPageCreator;
00228 }

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)