cisst-saw
Loading...
Searching...
No Matches
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
12This software is provided "as is" under an open source license, with
13no warranty. The complete license can be found in license.txt and
14http://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
28
29// Always include last
31
33 Q_OBJECT;
34protected:
35 std::string Name;
37 unsigned int Counter;
38public:
39 prmEventButtonQtWidgetComponent_ButtonData(const std::string & name, mtsInterfaceRequired * interfaceRequired);
40 void EventHandler(const prmEventButton & payload);
41 QLabel * Widget;
42signals:
43 void SetValueSignal(QString);
44};
45
47{
48 Q_OBJECT;
50
51protected:
52 void closeEvent(QCloseEvent *event) override;
54 QGridLayout * GridLayout;
55 unsigned int NumberOfColumns;
56
57public:
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
66
67#endif // _prmEventButtonQtWidget_h
Definition cmnNamedMap.h:54
mtsComponent(void)
Definition mtsInterfaceRequired.h:83
Definition prmEventButton.h:36
mtsInterfaceRequired * InterfaceRequired
Definition prmEventButtonQtWidget.h:36
unsigned int Counter
Definition prmEventButtonQtWidget.h:37
QLabel * Widget
Definition prmEventButtonQtWidget.h:41
void EventHandler(const prmEventButton &payload)
prmEventButtonQtWidgetComponent_ButtonData(const std::string &name, mtsInterfaceRequired *interfaceRequired)
std::string Name
Definition prmEventButtonQtWidget.h:35
Definition prmEventButtonQtWidget.h:47
cmnNamedMap< prmEventButtonQtWidgetComponent_ButtonData > ButtonsData
Definition prmEventButtonQtWidget.h:53
prmEventButtonQtWidgetComponent(const std::string &name)
bool AddEventButton(const std::string &buttonName)
void SetNumberOfColumns(const size_t nbColumns)
void Startup(void) override
unsigned int NumberOfColumns
Definition prmEventButtonQtWidget.h:55
void closeEvent(QCloseEvent *event) override
QGridLayout * GridLayout
Definition prmEventButtonQtWidget.h:54
#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
Declaration of mtsComponent.
Button Event payload.