VR-Forces 4.0.4 Class Documentation
include/vrvVrlQt/DtConnectionSelectorWidget.h
Go to the documentation of this file.
00001 /******************************************************************************
00002 ** Copyright (c) 2010 MAK Technologies, Inc.
00003 ** All rights reserved.
00004 ******************************************************************************/
00005 /******************************************************************************
00006 ** $RCSfile: DtConnectionSelectorWidget.h,v $ $Revision: 1.22 $ $State: Exp $
00007 ******************************************************************************/
00008 
00011 
00012 #pragma once
00013 
00014 #include <vrvVrlQt/vrvVrlQt.h>
00015 #include <vrvVrlQt/DtConnectionSelectorWidgetInterface.h>
00016 #include <vrvCoreQt/DtWidgetBuilder.h>
00017 
00018 #include <QtGui/QWidget>
00019 
00020 class QToolButton;
00021 class QAction;
00022 
00023 namespace makVrv
00024 {
00025    class DtConnectionSelectorWidgetLogic;
00026    class DtDe;
00027 
00032    class DT_DLL_VRVVRLQT DtConnectionSelectorWidget : 
00033    public QWidget
00034    , public DtConnectionSelectorWidgetInterface
00035    {
00036       Q_OBJECT
00037 
00038    public:
00040       DtConnectionSelectorWidget( DtDe& de, QWidget* parent = 0, const Qt::WindowFlags& flags = 0 );
00041 
00043       virtual ~DtConnectionSelectorWidget();
00044 
00045    protected:
00047       virtual void setupGui();
00048 
00049    protected:
00052       virtual void setConnect(bool);
00053 
00055       virtual void addDriver(const std::string& name, bool connected, bool onDriverSelectionList);
00056 
00058       virtual void removeDriver(const std::string& name);
00059 
00061       virtual void setDriverConnected(const std::string& name, bool connected);
00062 
00064       virtual void setConnected(bool);
00065 
00067       virtual void setDriverOnSelectionList(const std::string& name, bool);
00068 
00070       virtual void setCanConnect(bool);
00071 
00073       virtual bool isConnected() const;
00074 
00075    protected slots:
00077       virtual void onConnect();
00078 
00080       virtual void onDriverToggled(bool);
00081 
00082    protected:
00083       DtDe& myDe;
00085       DtConnectionSelectorWidgetLogic* myLogic;
00086 
00087       QToolButton*   myConnectButton;
00088       QToolButton*   myConnectMenu;
00089 
00090       typedef std::map<std::string, QAction*> ActionMap;
00091       ActionMap      myActionMap;
00092    };
00093 
00096    class DT_DLL_VRVVRLQT DtConnectionSelectorWidgetBuilder : public DtWidgetBuilder
00097    { 
00098    public:
00099 
00100       DtConnectionSelectorWidgetBuilder();
00101 
00102       virtual ~DtConnectionSelectorWidgetBuilder();
00103 
00104       virtual QWidget* create( makVrv::DtDe& de, QWidget* parent, const Qt::WindowFlags& flags);
00105    };
00106 }

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)