cisst-saw
Toggle main menu visibility
Loading...
Searching...
No Matches
tmp
cisst-saw
cisst
cisstParameterTypes
prmEventButtonQtWidget.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
Author(s): Anton Deguet
6
Created on: 2013-11-11
7
8
(C) Copyright 2013-2023 Johns Hopkins University (JHU), All Rights Reserved.
9
10
--- begin cisst license - do not edit ---
11
12
This software is provided "as is" under an open source license, with
13
no warranty. The complete license can be found in license.txt and
14
http://www.cisst.org/cisst/license.txt.
15
16
--- end cisst license ---
17
*/
18
19
#ifndef _prmEventButtonQtWidget_h
20
#define _prmEventButtonQtWidget_h
21
22
#include <QWidget>
23
#include <QGridLayout>
24
#include <QLabel>
25
26
#include <
cisstMultiTask/mtsComponent.h
>
27
#include <
cisstParameterTypes/prmEventButton.h
>
28
29
// Always include last
30
#include <
cisstParameterTypes/prmExportQt.h
>
31
32
class
prmEventButtonQtWidgetComponent_ButtonData
:
public
QObject {
33
Q_OBJECT;
34
protected
:
35
std::string
Name
;
36
mtsInterfaceRequired
*
InterfaceRequired
;
37
unsigned
int
Counter
;
38
public
:
39
prmEventButtonQtWidgetComponent_ButtonData
(
const
std::string & name,
mtsInterfaceRequired
* interfaceRequired);
40
void
EventHandler
(
const
prmEventButton
& payload);
41
QLabel *
Widget
;
42
signals:
43
void
SetValueSignal
(QString);
44
};
45
46
class
CISST_EXPORT
prmEventButtonQtWidgetComponent
:
public
QWidget,
public
mtsComponent
47
{
48
Q_OBJECT;
49
CMN_DECLARE_SERVICES(
CMN_NO_DYNAMIC_CREATION
,
CMN_LOG_ALLOW_DEFAULT
);
50
51
protected
:
52
void
closeEvent
(QCloseEvent *event)
override
;
53
cmnNamedMap<prmEventButtonQtWidgetComponent_ButtonData>
ButtonsData
;
54
QGridLayout *
GridLayout
;
55
unsigned
int
NumberOfColumns
;
56
57
public
:
58
prmEventButtonQtWidgetComponent
(
const
std::string & name);
59
60
void
Startup
(
void
)
override
;
61
void
SetNumberOfColumns
(
const
size_t
nbColumns);
62
bool
AddEventButton
(
const
std::string & buttonName);
63
};
64
65
CMN_DECLARE_SERVICES_INSTANTIATION
(
prmEventButtonQtWidgetComponent
);
66
67
#endif
// _prmEventButtonQtWidget_h
cmnNamedMap
Definition
cmnNamedMap.h:54
mtsComponent::mtsComponent
mtsComponent(void)
mtsInterfaceRequired
Definition
mtsInterfaceRequired.h:83
prmEventButton
Definition
prmEventButton.h:36
prmEventButtonQtWidgetComponent_ButtonData::InterfaceRequired
mtsInterfaceRequired * InterfaceRequired
Definition
prmEventButtonQtWidget.h:36
prmEventButtonQtWidgetComponent_ButtonData::SetValueSignal
void SetValueSignal(QString)
prmEventButtonQtWidgetComponent_ButtonData::Counter
unsigned int Counter
Definition
prmEventButtonQtWidget.h:37
prmEventButtonQtWidgetComponent_ButtonData::Widget
QLabel * Widget
Definition
prmEventButtonQtWidget.h:41
prmEventButtonQtWidgetComponent_ButtonData::EventHandler
void EventHandler(const prmEventButton &payload)
prmEventButtonQtWidgetComponent_ButtonData::prmEventButtonQtWidgetComponent_ButtonData
prmEventButtonQtWidgetComponent_ButtonData(const std::string &name, mtsInterfaceRequired *interfaceRequired)
prmEventButtonQtWidgetComponent_ButtonData::Name
std::string Name
Definition
prmEventButtonQtWidget.h:35
prmEventButtonQtWidgetComponent
Definition
prmEventButtonQtWidget.h:47
prmEventButtonQtWidgetComponent::ButtonsData
cmnNamedMap< prmEventButtonQtWidgetComponent_ButtonData > ButtonsData
Definition
prmEventButtonQtWidget.h:53
prmEventButtonQtWidgetComponent::prmEventButtonQtWidgetComponent
prmEventButtonQtWidgetComponent(const std::string &name)
prmEventButtonQtWidgetComponent::AddEventButton
bool AddEventButton(const std::string &buttonName)
prmEventButtonQtWidgetComponent::SetNumberOfColumns
void SetNumberOfColumns(const size_t nbColumns)
prmEventButtonQtWidgetComponent::Startup
void Startup(void) override
prmEventButtonQtWidgetComponent::NumberOfColumns
unsigned int NumberOfColumns
Definition
prmEventButtonQtWidget.h:55
prmEventButtonQtWidgetComponent::closeEvent
void closeEvent(QCloseEvent *event) override
prmEventButtonQtWidgetComponent::GridLayout
QGridLayout * GridLayout
Definition
prmEventButtonQtWidget.h:54
CMN_DECLARE_SERVICES_INSTANTIATION
#define CMN_DECLARE_SERVICES_INSTANTIATION(className)
Definition
cmnClassRegisterMacros.h:199
CMN_NO_DYNAMIC_CREATION
const int CMN_NO_DYNAMIC_CREATION
Definition
cmnClassRegisterMacros.h:325
CISST_EXPORT
#define CISST_EXPORT
Definition
cmnExportMacros.h:50
CMN_LOG_ALLOW_DEFAULT
#define CMN_LOG_ALLOW_DEFAULT
Definition
cmnLogLoD.h:76
mtsComponent.h
Declaration of mtsComponent.
prmEventButton.h
Button Event payload.
prmExportQt.h
Generated by
1.18.0