cisst-saw
Loading...
Searching...
No Matches
mtsCollectorFactoryQtWidget.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-2025 Johns Hopkins University (JHU), All Rights Reserved.
10
11--- begin cisst license - do not edit ---
12
13This software is provided "as is" under an open source license, with
14no warranty. The complete license can be found in license.txt and
15http://www.cisst.org/cisst/license.txt.
16
17--- end cisst license ---
18*/
19
20#ifndef _mtsCollectorFactoryQtWidget_h
21#define _mtsCollectorFactoryQtWidget_h
22
27
28#include <QObject>
29#include <QWidget>
30
31class QGroupBox;
32class QGridLayout;
33class QVBoxLayout;
34class QHBoxLayout;
35class QPushButton;
36class QSpinBox;
37class QLabel;
38class QFileDialog;
39
40// Always include last
42
44{
45 Q_OBJECT;
47
48 public:
49 mtsCollectorFactoryQtWidget(const std::string & component_name);
51
52 void Configure(const std::string & CMN_UNUSED(filename) = "") override {};
53
54 protected:
55 struct {
56 mtsFunctionWrite Start;
58 mtsFunctionWrite SetWorkingDirectory;
59 mtsFunctionVoid SetOutputToDefault;
60 } Collection;
61
62 void CollectionStartedEventHandler(const bool & started);
63 void ProgressEventHandler(const size_t & count);
64
65 signals:
66 void CollectorAddedQSignal(void) const;
68 void ProgressQSignal(unsigned int);
69
70 protected:
71 unsigned int NumberOfCollectors;
73 unsigned int NumberOfSamples;
74
75 QVBoxLayout * CentralLayout;
76
77 QGroupBox * StartStopBox;
78 QGridLayout * StartStopLayout;
79 QPushButton * ManualStartStop;
80 QSpinBox * ScheduledBegin;
82 QPushButton * ScheduledStart;
83
84 QGroupBox * FileBox;
85 QVBoxLayout * FileLayout;
86 QPushButton * FileDialog;
87 QLabel * FileDirectory;
88 QPushButton * FileNew;
89
90 QGroupBox * StatsBox;
91 QGridLayout * StatsLayout;
94 QLabel * StatsSamples;
96
97public slots:
98 // used internally for buttons
99 void ManualStartStopSlot(bool checked);
101 void FileDialogSlot(void);
102 void FileNewSlot(void);
103
104 // used to receive events from the QComponent
106 void Progress(unsigned int count);
107};
108
110
111#endif // _mtsCollectorFactoryQtWidget_h
Definition mtsCollectorFactoryQtWidget.h:44
unsigned int NumberOfActiveCollectors
Definition mtsCollectorFactoryQtWidget.h:72
void ManualStartStopSlot(bool checked)
QSpinBox * ScheduledDuration
Definition mtsCollectorFactoryQtWidget.h:81
void ProgressQSignal(unsigned int)
void Configure(const std::string &CMN_UNUSED(filename)="") override
Definition mtsCollectorFactoryQtWidget.h:52
QLabel * FileDirectory
Definition mtsCollectorFactoryQtWidget.h:87
mtsCollectorFactoryQtWidget(const std::string &component_name)
QSpinBox * ScheduledBegin
Definition mtsCollectorFactoryQtWidget.h:80
void Progress(unsigned int count)
QLabel * StatsNbCollectors
Definition mtsCollectorFactoryQtWidget.h:93
QGroupBox * FileBox
Definition mtsCollectorFactoryQtWidget.h:84
QVBoxLayout * FileLayout
Definition mtsCollectorFactoryQtWidget.h:85
~mtsCollectorFactoryQtWidget(void)
Definition mtsCollectorFactoryQtWidget.h:50
void CollectorAddedQSignal(void) const
QGridLayout * StartStopLayout
Definition mtsCollectorFactoryQtWidget.h:78
QLabel * StatsNbSamples
Definition mtsCollectorFactoryQtWidget.h:95
QGridLayout * StatsLayout
Definition mtsCollectorFactoryQtWidget.h:91
QPushButton * FileDialog
Definition mtsCollectorFactoryQtWidget.h:86
QLabel * StatsSamples
Definition mtsCollectorFactoryQtWidget.h:94
QGroupBox * StatsBox
Definition mtsCollectorFactoryQtWidget.h:90
QPushButton * ManualStartStop
Definition mtsCollectorFactoryQtWidget.h:79
QLabel * StatsCollectors
Definition mtsCollectorFactoryQtWidget.h:92
void CollectionStartedEventHandler(const bool &started)
QPushButton * FileNew
Definition mtsCollectorFactoryQtWidget.h:88
void ProgressEventHandler(const size_t &count)
QPushButton * ScheduledStart
Definition mtsCollectorFactoryQtWidget.h:82
QGroupBox * StartStopBox
Definition mtsCollectorFactoryQtWidget.h:77
QVBoxLayout * CentralLayout
Definition mtsCollectorFactoryQtWidget.h:75
unsigned int NumberOfSamples
Definition mtsCollectorFactoryQtWidget.h:73
unsigned int NumberOfCollectors
Definition mtsCollectorFactoryQtWidget.h:71
mtsComponent(void)
Definition mtsFunctionVoid.h:36
Definition mtsFunctionWrite.h:37
#define CMN_DECLARE_SERVICES_INSTANTIATION(className)
Definition cmnClassRegisterMacros.h:199
const int CMN_NO_DYNAMIC_CREATION
Definition cmnClassRegisterMacros.h:325
#define CISST_EXPORT
Definition cmnExportMacros.h:50
#define CMN_LOG_ALLOW_DEFAULT
Definition cmnLogLoD.h:76
#define CMN_UNUSED(argument)
Definition cmnPortability.h:497
Declaration of mtsComponent.
Rules of exporting.
Defines the command interfaces.
Defines a function object to use a void command (mtsCommandVoid).
Defines the command interfaces.