VR-Forces 4.0.4 Class Documentation
include/vrvCoreQt/DtAttachWidget.h
Go to the documentation of this file.
00001 /******************************************************************************
00002 ** Copyright (c) 2008 MAK Technologies, Inc.
00003 ** All rights reserved.
00004 ******************************************************************************/
00005 /******************************************************************************
00006 ** $RCSfile: DtAttachWidget.h,v $ $Revision: 1.30 $ $State: Exp $
00007 ******************************************************************************/
00008 
00012 
00013 #pragma once
00014 #include <vrvCoreQt/vrvCoreQt.h>
00015 #include <vrvCoreQt/DtPage.h>
00016 #include <vrvCoreQt/DtAttachWidgetInterface.h>
00017 #include <vrvCore/DtObserverObject.h>
00018 
00019 class QCheckBox;
00020 class QComboBox;
00021 class QFrame;
00022 class QHBoxLayout;
00023 class QLabel;
00024 class QPushButton;
00025 class QVBoxLayout;
00026 
00027 namespace makVrv
00028 {
00029    class DtVirtualBaseClass;
00030    
00033    class DT_DLL_VRVCOREQT DtAttachWidget : public DtPage,
00034       public DtAttachWidgetInterface
00035    {
00036    Q_OBJECT
00037 
00038    public:
00039 
00041       virtual ~DtAttachWidget();
00042 
00044       virtual QIcon icon();
00045 
00047       virtual QString title();
00048 
00050       virtual const std::string& pageClassName() const;
00051 
00053       virtual void setHideAttachedModelEnabled( bool trueFalse );
00054       
00056       virtual void setAttachedObjects( const std::vector<DtUnicode>&
00057          attachedObjects );
00058 
00060       virtual void setAttachableParts( const std::vector<DtUnicode>& parts);
00061 
00063       virtual void setAttachedPart(const DtUnicode& partName);
00064          
00066       virtual void addAttachFilter( const DtUnicode& filterName, 
00067          int filterType );
00068       
00070       virtual void setCurrentAttachFilter( int filterType );
00071       
00073       virtual void setAttachNextEnabled( bool enabled );
00074       
00076       virtual void setAttachPreviousEnabled( bool enabled );
00077 
00079       virtual void addAttachModes( const std::list<DtUnicode>& modeNames,
00080          const std::list<int>& modeTypes );
00081          
00083       virtual void setCurrentAttachMode( int modeType );
00084       
00086       virtual void setAttachModeEnabled( int modeType, bool enabled );
00087       
00089       virtual void setAttachSelectedEnabled( bool enabled );     
00090       
00091       virtual QSize sizeHint() const;
00092 
00094       virtual void setAttached(bool b);
00095 
00097       virtual void setMoreInformationShown(bool);
00098 
00099    protected slots:
00100     
00102       virtual void attachToPrevious();
00103       
00105       virtual void attachToNext();
00106 
00108       virtual void attachToPart( int index );
00109        
00111       virtual void detach();
00112 
00114       virtual void changeHideAttachedModel( int state );
00115       
00117       virtual void changeAttachFilterType( int index );
00118 
00120       virtual void attachModeChanged( int index );
00121       
00123       virtual void attachSelected();      
00124 
00126       virtual void updateShowMoreInformation();
00127 
00128    protected:
00129 
00131       friend class DtAttachWidgetCreator;
00132 
00134       DtAttachWidget(DtDe& de, QWidget* parent = 0, Qt::WindowFlags f = 0);
00135 
00137       virtual void activate();
00138 
00140       virtual void deactivate();
00141 
00142       void setupUi();
00143       void retranslateUi();
00144 
00145    protected:
00146       
00147       DtVirtualBaseClass* myLogic;
00148       QSize mySaveSize;
00149 
00150       QCheckBox* myHideAttachedModelCheckBox;
00151       QComboBox* myAttachFilterComboBox;
00152       QComboBox* myAttachModeComboBox;
00153       QComboBox* myAttachedObjectsComboBox;
00154       QComboBox* myAttachablePartsComboBox;
00155 
00156       QFrame* myFirstRowLineSeperator;
00157       QFrame* myHorizontalLine2;
00158       QFrame* myMoreOptionsFrame;
00159 
00160       QHBoxLayout* myFirstRowLayout;
00161       QHBoxLayout* mySecondRowLayout;
00162       QHBoxLayout* myThirdRowLayout;
00163       QHBoxLayout* myFourthRowLayout;
00164       
00165       QLabel* myAttachmentFilterLabel;
00166       QLabel* myAttachedObjectsLabel;
00167       QLabel* myAttachablePartsLabel;
00168       QPushButton* myAttachNextButton;
00169       QPushButton* myAttachPreviousButton;
00170       QPushButton* myAttachSelectedButton;
00171       QPushButton* myDetachButton;
00172       QPushButton* myShowMoreInformationButton;
00173       QVBoxLayout* myMoreOptionsLayout;
00174       QVBoxLayout* myMainLayout;
00175 
00176       std::string myClassName;
00177    };
00178 
00181    class DT_DLL_VRVCOREQT DtAttachWidgetCreator : public DtPageCreator
00182    {
00183    public:
00184 
00186       DtAttachWidgetCreator(DtDe& de);
00187 
00189       virtual ~DtAttachWidgetCreator();
00190 
00194       virtual std::string pageClassName() const;
00195 
00197       virtual DtPage* create(QWidget* parent = 0, Qt::WindowFlags f = 0);
00198    };
00199 }
00200 

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)