cisst-saw
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
prmQtWidgetEventButtonsComponent.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
7  Created on: 2013-11-11
8 
9  (C) Copyright 2013 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 _prmQtWidgetEventButtonsComponent_h
23 #define _prmQtWidgetEventButtonsComponent_h
24 
25 #include <QWidget>
26 #include <QGridLayout>
27 #include <QLabel>
28 
31 
32 // Always include last
34 
36  Q_OBJECT;
37 protected:
38  std::string Name;
40  unsigned int Counter;
41 public:
42  prmQtWidgetEventButtonsComponent_ButtonData(const std::string & name, mtsInterfaceRequired * interfaceRequired);
43  void EventHandler(const prmEventButton & payload);
44  QLabel * Widget;
45 signals:
46  void SetValueSignal(QString);
47 };
48 
50 {
51  Q_OBJECT;
53 
54 protected:
55  virtual void closeEvent(QCloseEvent *event);
57  QGridLayout * GridLayout;
58  unsigned int NumberOfColumns;
59 
60 public:
61  prmQtWidgetEventButtonsComponent(const std::string & name);
62 
63  void Startup(void);
64  void SetNumberOfColumns(const size_t nbColumns);
65  bool AddEventButton(const std::string & buttonName);
66 };
67 
69 
70 #endif // _prmQtWidgetEventButtonsComponent_h
QLabel * Widget
Definition: prmQtWidgetEventButtonsComponent.h:44
QGridLayout * GridLayout
Definition: prmQtWidgetEventButtonsComponent.h:57
#define CISST_EXPORT
Definition: cmnExportMacros.h:50
mtsInterfaceRequired * InterfaceRequired
Definition: prmQtWidgetEventButtonsComponent.h:39
cmnNamedMap< prmQtWidgetEventButtonsComponent_ButtonData > ButtonsData
Definition: prmQtWidgetEventButtonsComponent.h:56
prmQtWidgetEventButtonsComponent_ButtonData(const std::string &name, mtsInterfaceRequired *interfaceRequired)
Definition: mtsInterfaceRequired.h:85
std::string Name
Definition: prmQtWidgetEventButtonsComponent.h:36
virtual void Startup(void)
Definition: mtsComponent.h:262
Definition: prmEventButton.h:37
Declaration of mtsComponent.
unsigned int NumberOfColumns
Definition: prmQtWidgetEventButtonsComponent.h:58
Definition: mtsComponent.h:150
unsigned int Counter
Definition: prmQtWidgetEventButtonsComponent.h:40
Definition: prmQtWidgetEventButtonsComponent.h:49
#define CMN_DECLARE_SERVICES(hasDynamicCreation, lod)
Definition: cmnClassRegisterMacros.h:116
CMN_DECLARE_SERVICES_INSTANTIATION(prmQtWidgetEventButtonsComponent)
Definition: prmQtWidgetEventButtonsComponent.h:35
Button Event payload.
const int CMN_NO_DYNAMIC_CREATION
Definition: cmnClassRegisterMacros.h:328
void EventHandler(const prmEventButton &payload)
#define CMN_LOG_ALLOW_DEFAULT
Definition: cmnLogLoD.h:76