Main Page
Namespaces
Classes
Files
File List
File Members
src
qt_create
templates
qt-ros
include
PACKAGE_NAME
qnode.hpp
Go to the documentation of this file.
1
8
/*****************************************************************************
9
** Ifdefs
10
*****************************************************************************/
11
12
#ifndef %(package)s_QNODE_HPP_
13
#define %(package)s_QNODE_HPP_
14
15
/*****************************************************************************
16
** Includes
17
*****************************************************************************/
18
19
// To workaround boost/qt4 problems that won't be bugfixed. Refer to
20
// https://bugreports.qt.io/browse/QTBUG-22829
21
#ifndef Q_MOC_RUN
22
#include <ros/ros.h>
23
#endif
24
#include <string>
25
#include <QThread>
26
#include <QStringListModel>
27
28
29
/*****************************************************************************
30
** Namespaces
31
*****************************************************************************/
32
33
namespace
%(
package
)
s
{
34
35
/*****************************************************************************
36
** Class
37
*****************************************************************************/
38
39
class
QNode
:
public
QThread {
40
Q_OBJECT
41
public
:
42
QNode
(
int
argc,
char
** argv );
43
virtual
~
QNode
();
44
bool
init();
45
bool
init(
const
std::string &master_url,
const
std::string &host_url);
46
void
run();
47
48
/*********************
49
** Logging
50
**********************/
51
enum
LogLevel
{
52
Debug
,
53
Info
,
54
Warn
,
55
Error
,
56
Fatal
57
};
58
59
QStringListModel*
loggingModel
() {
return
&logging_model; }
60
void
log(
const
LogLevel
&level,
const
std::string &msg);
61
62
Q_SIGNALS:
63
void
loggingUpdated();
64
void
rosShutdown();
65
66
private
:
67
int
init_argc
;
68
char
**
init_argv
;
69
ros::Publisher
chatter_publisher
;
70
QStringListModel
logging_model
;
71
};
72
73
}
// namespace %(package)s
74
75
#endif
/* %(package)s_QNODE_HPP_ */
s::QNode::Error
Definition:
qnode.hpp:55
s::QNode::Warn
Definition:
qnode.hpp:54
s::QNode::init_argv
char ** init_argv
Definition:
qnode.hpp:68
s::QNode::logging_model
QStringListModel logging_model
Definition:
qnode.hpp:70
s
Definition:
main_window.hpp:23
s::QNode::init_argc
int init_argc
Definition:
qnode.hpp:67
s::QNode::Info
Definition:
qnode.hpp:53
package
#define package
Definition:
qnode.hpp:13
s::QNode::Debug
Definition:
qnode.hpp:52
s::QNode::chatter_publisher
ros::Publisher chatter_publisher
Definition:
qnode.hpp:69
s::QNode::loggingModel
QStringListModel * loggingModel()
Definition:
qnode.hpp:59
s::QNode::LogLevel
LogLevel
Definition:
qnode.hpp:51
s::QNode
Definition:
qnode.hpp:39
qt_create
Author(s): Daniel Stonier
autogenerated on Wed Mar 11 2020 03:12:19