cisst-saw
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
mtsQtWidgetComponent.h
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /* ex: set filetype=cpp softtabstop=4 shiftwidth=4 tabstop=4 cindent expandtab: */
3 
4 /*
5 
6  Author(s): Praneeth Sadda, Anton Deguet
7  Created on: 2011-11-11
8 
9  (C) Copyright 2011 Johns Hopkins University (JHU), All Rights
10  Reserved.
11 
12 --- begin cisst license - do not edit ---
13 
14 This software is provided "as is" under an open source license, with
15 no warranty. The complete license can be found in license.txt and
16 http://www.cisst.org/cisst/license.txt.
17 
18 --- end cisst license ---
19 
20 */
21 
22 #ifndef _mtsQtWidgetComponent_h
23 #define _mtsQtWidgetComponent_h
24 
25 #include <QWidget>
26 #include <QTabWidget>
27 
29 
30 // Always include last
32 
33 /* ! A widget that wraps a single mtsComponent. A mtsQtWidgetComponent will create a child
34  InterfaceProvidedWidget for every provided interface on the given component.
35 */
36 
37 class CISST_EXPORT mtsQtWidgetComponent: public QWidget, public mtsComponent
38 {
39  Q_OBJECT;
41 
42 private:
43 
44  QTabWidget * TabWidget;
45 
46  // this methods queries all provided interfaces from the component
47  // "observed" and will create the corresponding required
48  // interfaces as well as their widgets.
49 
50 
51 public:
52  mtsQtWidgetComponent(const std::string & name);
53  // this methods queries all provided interfaces from the component
54  // "observed" and will create the corresponding required
55  // interfaces as well as their widgets.
56  void CreateWidgetsForComponent(const mtsComponent & component);
57  bool CreateWidgetsForComponent(const std::string & componentName);
58  void CreateWidgetsForInterface(const mtsComponent & component, const std::string & interfaceName);
59 };
60 
62 
63 #endif // _mtsQtWidgetComponent_h
#define CISST_EXPORT
Definition: cmnExportMacros.h:50
CMN_DECLARE_SERVICES_INSTANTIATION(mtsQtWidgetComponent)
Definition: mtsQtWidgetComponent.h:37
Declaration of mtsComponent.
Definition: mtsComponent.h:150
#define CMN_DECLARE_SERVICES(hasDynamicCreation, lod)
Definition: cmnClassRegisterMacros.h:116
const int CMN_NO_DYNAMIC_CREATION
Definition: cmnClassRegisterMacros.h:328
Rules of exporting.
#define CMN_LOG_ALLOW_DEFAULT
Definition: cmnLogLoD.h:76