cisst-saw
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
mtsCollectorQtComponent.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): Anton Deguet, Ali Uneri
7  Created on: 2010-02-26
8 
9  (C) Copyright 2010 Johns Hopkins University (JHU), All Rights Reserved.
10 
11 --- begin cisst license - do not edit ---
12 
13 This software is provided "as is" under an open source license, with
14 no warranty. The complete license can be found in license.txt and
15 http://www.cisst.org/cisst/license.txt.
16 
17 --- end cisst license ---
18 */
19 
20 #ifndef _mtsCollectorQtComponent_h
21 #define _mtsCollectorQtComponent_h
22 
27 
28 #include <QObject>
29 #include <QWidget>
30 
31 // Always include last
33 
41 class CISST_EXPORT mtsCollectorQtComponent: public QObject, public mtsComponent
42 {
43  Q_OBJECT;
45 
46 public:
47  mtsCollectorQtComponent(const std::string & componentName);
49 
50  void Configure(const std::string & CMN_UNUSED(filename) = "") {};
51 
55  void ConnectToWidget(QWidget * widget) const;
56 
57 protected:
58  struct {
65  } Collection;
66 
67  void CollectionStartedHandler(void);
68  void CollectionStoppedHandler(const mtsUInt & count);
69  void ProgressHandler(const mtsUInt & count);
70 
71 public slots:
72  void StartCollectionQSlot(void);
73  void StopCollectionQSlot(void);
74  void StartCollectionInQSlot(double);
75  void StopCollectionInQSlot(double);
76  void SetWorkingDirectoryQSlot(QString);
77  void SetOutputToDefaultQSlot(void);
78 
79 public:
80 signals:
81  void CollectorAddedQSignal(void) const;
82  void CollectionStartedQSignal(void);
83  void CollectionStoppedQSignal(unsigned int);
84  void ProgressQSignal(unsigned int);
85 };
86 
88 
89 #endif // _mtsCollectorQtComponent_h
Defines the command interfaces.
Defines a function object to use a void command (mtsCommandVoid)
#define CISST_EXPORT
Definition: cmnExportMacros.h:50
CMN_DECLARE_SERVICES_INSTANTIATION(mtsCollectorQtComponent)
Defines the command interfaces.
#define CMN_UNUSED(argument)
Definition: cmnPortability.h:479
mtsFunctionVoid StopCollection
Definition: mtsCollectorQtComponent.h:60
Definition: mtsFunctionVoid.h:36
void Configure(const std::string &CMN_UNUSED(filename)="")
Definition: mtsCollectorQtComponent.h:50
mtsFunctionVoid StartCollection
Definition: mtsCollectorQtComponent.h:59
Declaration of mtsComponent.
mtsFunctionVoid SetOutputToDefault
Definition: mtsCollectorQtComponent.h:64
Definition: mtsComponent.h:150
mtsFunctionWrite StopCollectionIn
Definition: mtsCollectorQtComponent.h:62
mtsFunctionWrite StartCollectionIn
Definition: mtsCollectorQtComponent.h:61
#define CMN_DECLARE_SERVICES(hasDynamicCreation, lod)
Definition: cmnClassRegisterMacros.h:116
Definition: mtsFunctionWrite.h:37
Definition: mtsGenericObjectProxy.h:45
const int CMN_NO_DYNAMIC_CREATION
Definition: cmnClassRegisterMacros.h:328
mtsFunctionWrite SetWorkingDirectory
Definition: mtsCollectorQtComponent.h:63
Rules of exporting.
Definition: mtsCollectorQtComponent.h:41
#define CMN_LOG_ALLOW_DEFAULT
Definition: cmnLogLoD.h:76