MIRA
CANToolsViewPlugin.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2012 MetraLabs GmbH (MLAB), GERMANY.
3  * All rights reserved.
4  * Contact: info@MetraLabs.com
5  *
6  * Commercial Usage:
7  * Licensees holding valid commercial licenses may use this file in
8  * accordance with the commercial license agreement provided with the
9  * software or, alternatively, in accordance with the terms contained in
10  * a written agreement between you and MetraLabs.
11  *
12  * GNU General Public License Usage:
13  * Alternatively, this file may be used under the terms of the GNU
14  * General Public License version 3.0 as published by the Free Software
15  * Foundation and appearing in the file LICENSE.GPL3 included in the
16  * packaging of this file. Please review the following information to
17  * ensure the GNU General Public License version 3.0 requirements will be
18  * met: http://www.gnu.org/copyleft/gpl.html.
19  * Alternatively you may (at your option) use any later version of the GNU
20  * General Public License if such license has been publicly approved by
21  * MetraLabs (or its successors, if any).
22  *
23  * IN NO EVENT SHALL "MLAB" BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
24  * SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE
25  * OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF "MLABS" HAS BEEN
26  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27  *
28  * "MLAB" SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT
29  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
30  * A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN
31  * "AS IS" BASIS, AND "MLAB" HAS NO OBLIGATION TO PROVIDE MAINTENANCE,
32  * SUPPORT, UPDATES, ENHANCEMENTS OR MODIFICATIONS.
33  */
34 
43 #ifndef _MLAB_CANTOOLSVIEWPLUGIN_H_
44 #define _MLAB_CANTOOLSVIEWPLUGIN_H_
45 
46 #include <QWidget>
47 #include <factory/Factory.h>
48 
49 #include <can/CANOpenDefs.h>
51 
52 namespace mira { namespace can {
53 
54 class CANToolsView;
55 
57 
62  public QWidget, public Object
63 {
65 
66 public:
67  template<typename Reflector>
68  void reflect(Reflector& r)
69  {}
70 
71  void initialize(CANToolsView* parent);
72  virtual bool start(uint8 node, mira::can::CANOpenNodeInfo nodeInfo)
73  {
74  return false;
75  }
76 
77  virtual bool stop(uint8 node)
78  {
79  return false;
80  }
81 
82 protected:
84  virtual void initialize() = 0;
85 
86 protected:
88 };
89 
91 
92 }} // namespaces
93 
94 #endif
void reflect(Reflector &r)
Definition: CANToolsViewPlugin.h:68
The base class for all CAN tools.
Definition: CANToolsViewPlugin.h:61
Global definitions of the CANopen standard.
#define MIRA_ABSTRACT_OBJECT(classIdentifier)
#define MLAB_CANGUI_EXPORT
Definition: CANGUIExports.h:57
virtual bool stop(uint8 node)
Definition: CANToolsViewPlugin.h:77
virtual bool start(uint8 node, mira::can::CANOpenNodeInfo nodeInfo)
Definition: CANToolsViewPlugin.h:72
A struct, which contains standard information about a CANopen node.
Definition: CANOpenDefs.h:165
CANGUI export macro declaration.
CANToolsView * mParent
Definition: CANToolsViewPlugin.h:87
The base class for all graphical CAN tools.
Definition: CANToolsView.h:66