VR-Forces 4.0.4 Class Documentation
include/vrvCore/DtAttributeGroupIndicator.h
Go to the documentation of this file.
00001 /******************************************************************************
00002 ** Copyright (c) 2008 MAK Technologies, Inc.
00003 ** All rights reserved.
00004 ******************************************************************************/
00005 /******************************************************************************
00006 ** $RCSfile: DtAttributeGroupIndicator.h,v $ $Revision: 1.23 $ $State: Exp $
00007 ******************************************************************************/
00008 
00012 
00013 #ifndef DtAttributeGroupIndicator_H_
00014 #define DtAttributeGroupIndicator_H_
00015 
00016 #include <vrvCore/vrvCore.h>
00017 #include <vrvCore/DtUniqueID.h>
00018 #include <vrvCore/DtAgentManagerInterface.h>
00019 #include <vrvCore/DtMouseState.h>
00020 #include <vrvCore/DtWidgetSignaler.h>
00021 
00022 #include <boost/signal.hpp>
00023 #include <vector>
00024 
00025 namespace makVrv
00026 {
00027    class DtAgentManagerInterface;
00028    class DtProjectedWidgetModelAgent;
00029    class DtAttributeGroupWidgetAgent;
00030    class DtWidgetAgent;
00031    class DtModelAgent;
00032    class DtWidgetInstanceSignaler;
00033    class DtUnicode;
00034 
00037    class DT_DLL_VRVCORE DtAttributeGroupIndicator
00038    {
00039    public:
00040 
00041       // The maximum number of points displayed in a graph
00042       enum {MaxGraphPoints = 10};
00043 
00044       DtAttributeGroupIndicator( DtAgentManagerInterface& sceneInterface,
00045          unsigned int modelSet,
00046          const std::string& normalTheme = "AttributeGroupIndicatorTheme",
00047          const std::string& pinnedTheme = "AttributeGroupPinnedTheme",
00048          int height = 16, int width = 16);
00049 
00050       virtual ~DtAttributeGroupIndicator();
00051 
00053       virtual void setIndicatorActive(bool active);
00054 
00056       virtual void setColor(float r, float g, float b, float a = 1.);
00057 
00059       virtual DtProjectedWidgetModelAgent* model();
00060 
00062       virtual void setEventsEnabled(bool enabled);
00063 
00065       virtual DtWidgetEventSignals& eventSignals(DtWidgetSignaler& signaler);
00066 
00068       virtual void setAttributeGroupVisible(bool visible);
00069 
00071       virtual void setAttributeVisible(unsigned int index, bool visible);
00072 
00076       virtual void setVisible(bool visible);
00077 
00079       virtual bool isVisible();
00080 
00081       enum AttributeType
00082       {
00083          AttributeTypeNull,
00084          AttributeTypeImage,
00085          AttributeTypeNumeric,
00086          AttributeTypeText,
00087          AttributeTypeGraph,
00088          AttributeTypeValueBar
00089       };
00090 
00092       virtual void setAttributeType(unsigned int index, const DtUnicode& name, AttributeType t);
00093 
00095       virtual void setValueImage(unsigned int index, const std::string& imageFilepath);
00096 
00098       virtual void setValueGraphPoint(unsigned int index, unsigned int n, float x, float y);
00099 
00101       virtual void setValueBarValue(unsigned int index, float val);
00102 
00104       virtual void setValueNumeric(unsigned int index, float val);
00105 
00107       virtual void setMouseIn(bool mouseIn);
00108 
00110       virtual void toggleLockState();
00111 
00112    protected:
00113 
00115       virtual void updateVisibility();
00116 
00117       DtAgentManagerInterface& mySceneInterface;
00118       DtWidgetInstanceSignaler* myWidgetSignaler;
00119       DtProjectedWidgetModelAgent* myProjectedWidgetModel;
00120       DtWidgetAgent* myWidgetAgent;
00121       DtAttributeGroupWidgetAgent* myAttributeGroupWidgetAgent;
00122       std::string myNormalTheme;
00123       std::string myPinnedTheme;
00124       bool mySelected;
00125       bool myEventsEnabled;
00126       bool myMouseIn;
00127       bool myAttributeGroupLocked;
00128 
00129       bool myVisible;
00130       bool myGroupVisible;
00131       std::vector<bool> myAttributeVisibility;
00132 
00133    };
00134 }
00135 
00136 #endif
00137 

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)