Skip to content

Commit 93dc7e3

Browse files
authored
Deprecated h headers (#294)
Signed-off-by: Alejandro Hernández Cordero <ahcorde@gmail.com>
1 parent b6f5c53 commit 93dc7e3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+1399
-886
lines changed

qt_gui_cpp/CMakeLists.txt

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ set(qt_gui_cpp_SRCS
3939
)
4040

4141
set(qt_gui_cpp_HDRS
42-
include/qt_gui_cpp/plugin.h
43-
include/qt_gui_cpp/plugin_bridge.h
44-
include/qt_gui_cpp/plugin_context.h
42+
include/qt_gui_cpp/plugin.hpp
43+
include/qt_gui_cpp/plugin_bridge.hpp
44+
include/qt_gui_cpp/plugin_context.hpp
4545
)
4646

4747
qt5_wrap_cpp(qt_gui_cpp_MOCS ${qt_gui_cpp_HDRS})
@@ -83,9 +83,6 @@ install(TARGETS ${PROJECT_NAME}
8383
LIBRARY DESTINATION lib
8484
RUNTIME DESTINATION bin)
8585

86-
# TODO(brawner) add ament_lint_auto tests here. Much of the c++ code needs to
87-
# be updated for ROS2 style
88-
8986
if(BUILD_TESTING)
9087
find_package(ament_cmake_pytest REQUIRED)
9188

qt_gui_cpp/include/qt_gui_cpp/composite_plugin_provider.h

Lines changed: 5 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -33,52 +33,10 @@
3333
#ifndef qt_gui_cpp__CompositePluginProvider_H
3434
#define qt_gui_cpp__CompositePluginProvider_H
3535

36-
#include "plugin_descriptor.h"
37-
#include "plugin_provider.h"
38-
39-
#include <QList>
40-
#include <QMap>
41-
#include <QSet>
42-
#include <QString>
43-
44-
namespace qt_gui_cpp
45-
{
46-
47-
class CompositePluginProvider
48-
: public PluginProvider
49-
{
50-
51-
public:
52-
53-
CompositePluginProvider(const QList<PluginProvider*>& plugin_providers = QList<PluginProvider*>());
54-
55-
virtual ~CompositePluginProvider();
56-
57-
/**
58-
* @note The ownership of the plugin providers is transferred to the callee.
59-
*/
60-
virtual void set_plugin_providers(const QList<PluginProvider*>& plugin_providers);
61-
62-
virtual QList<PluginDescriptor*> discover_descriptors(QObject* discovery_data);
63-
64-
virtual void* load(const QString& plugin_id, PluginContext* plugin_context);
65-
66-
virtual Plugin* load_plugin(const QString& plugin_id, PluginContext* plugin_context);
67-
68-
virtual void unload(void* plugin_instance);
69-
70-
virtual void shutdown();
71-
72-
private:
73-
74-
QList<PluginProvider*> plugin_providers_;
75-
76-
QMap<PluginProvider*, QSet<QString> > discovered_plugins_;
77-
78-
QMap<void*, PluginProvider*> running_plugins_;
79-
80-
};
81-
82-
} // namespace
36+
// *INDENT-OFF* (prevent uncrustify from adding indention below)
37+
#warning Including header <qt_gui_cpp/composite_plugin_provider.h> is deprecated, \
38+
include <qt_gui_cpp/composite_plugin_provider.hpp> instead.
39+
// *INDENT-ON*
40+
#include "./composite_plugin_provider.hpp"
8341

8442
#endif // qt_gui_cpp__CompositePluginProvider_H
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
/*
2+
* Copyright (c) 2011, Dirk Thomas, TU Darmstadt
3+
* All rights reserved.
4+
*
5+
* Redistribution and use in source and binary forms, with or without
6+
* modification, are permitted provided that the following conditions
7+
* are met:
8+
*
9+
* * Redistributions of source code must retain the above copyright
10+
* notice, this list of conditions and the following disclaimer.
11+
* * Redistributions in binary form must reproduce the above
12+
* copyright notice, this list of conditions and the following
13+
* disclaimer in the documentation and/or other materials provided
14+
* with the distribution.
15+
* * Neither the name of the TU Darmstadt nor the names of its
16+
* contributors may be used to endorse or promote products derived
17+
* from this software without specific prior written permission.
18+
*
19+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20+
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21+
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
22+
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
23+
* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
24+
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
25+
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26+
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27+
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28+
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
29+
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30+
* POSSIBILITY OF SUCH DAMAGE.
31+
*/
32+
33+
#ifndef qt_gui_cpp__CompositePluginProvider_HPP
34+
#define qt_gui_cpp__CompositePluginProvider_HPP
35+
36+
#include "plugin_descriptor.hpp"
37+
#include "plugin_provider.hpp"
38+
39+
#include <QList>
40+
#include <QMap>
41+
#include <QSet>
42+
#include <QString>
43+
44+
namespace qt_gui_cpp
45+
{
46+
47+
class CompositePluginProvider
48+
: public PluginProvider
49+
{
50+
51+
public:
52+
53+
CompositePluginProvider(const QList<PluginProvider*>& plugin_providers = QList<PluginProvider*>());
54+
55+
virtual ~CompositePluginProvider();
56+
57+
/**
58+
* @note The ownership of the plugin providers is transferred to the callee.
59+
*/
60+
virtual void set_plugin_providers(const QList<PluginProvider*>& plugin_providers);
61+
62+
virtual QList<PluginDescriptor*> discover_descriptors(QObject* discovery_data);
63+
64+
virtual void* load(const QString& plugin_id, PluginContext* plugin_context);
65+
66+
virtual Plugin* load_plugin(const QString& plugin_id, PluginContext* plugin_context);
67+
68+
virtual void unload(void* plugin_instance);
69+
70+
virtual void shutdown();
71+
72+
private:
73+
74+
QList<PluginProvider*> plugin_providers_;
75+
76+
QMap<PluginProvider*, QSet<QString> > discovered_plugins_;
77+
78+
QMap<void*, PluginProvider*> running_plugins_;
79+
80+
};
81+
82+
} // namespace
83+
84+
#endif // qt_gui_cpp__CompositePluginProvider_HPP

qt_gui_cpp/include/qt_gui_cpp/generic_proxy.h

Lines changed: 5 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -33,32 +33,11 @@
3333
#ifndef qt_gui_cpp__GenericProxy_H
3434
#define qt_gui_cpp__GenericProxy_H
3535

36-
#include <QObject>
36+
// *INDENT-OFF* (prevent uncrustify from adding indention below)
37+
#warning Including header <qt_gui_cpp/generic_proxy.h> is deprecated, \
38+
include <qt_gui_cpp/generic_proxy.hpp> instead.
39+
// *INDENT-ON*
3740

38-
namespace qt_gui_cpp
39-
{
40-
41-
class GenericProxy
42-
{
43-
44-
public:
45-
46-
GenericProxy(QObject* obj = 0);
47-
48-
QObject* proxiedObject();
49-
50-
void setProxiedObject(QObject* obj);
51-
52-
bool invokeMethod(const char* member, QGenericArgument val0 = QGenericArgument(), QGenericArgument val1 = QGenericArgument(), QGenericArgument val2 = QGenericArgument(), QGenericArgument val3 = QGenericArgument(), QGenericArgument val4 = QGenericArgument(), QGenericArgument val5 = QGenericArgument(), QGenericArgument val6 = QGenericArgument(), QGenericArgument val7 = QGenericArgument(), QGenericArgument val8 = QGenericArgument(), QGenericArgument val9 = QGenericArgument());
53-
54-
bool invokeMethodWithReturn(const char* member, QGenericReturnArgument ret = QGenericReturnArgument(0, 0), QGenericArgument val0 = QGenericArgument(), QGenericArgument val1 = QGenericArgument(), QGenericArgument val2 = QGenericArgument(), QGenericArgument val3 = QGenericArgument(), QGenericArgument val4 = QGenericArgument(), QGenericArgument val5 = QGenericArgument(), QGenericArgument val6 = QGenericArgument(), QGenericArgument val7 = QGenericArgument(), QGenericArgument val8 = QGenericArgument(), QGenericArgument val9 = QGenericArgument());
55-
56-
private:
57-
58-
QObject* object_;
59-
60-
};
61-
62-
} // namespace
41+
#include "./generic_proxy.hpp"
6342

6443
#endif // qt_gui_cpp__GenericProxy_H
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
/*
2+
* Copyright (c) 2011, Dirk Thomas, TU Darmstadt
3+
* All rights reserved.
4+
*
5+
* Redistribution and use in source and binary forms, with or without
6+
* modification, are permitted provided that the following conditions
7+
* are met:
8+
*
9+
* * Redistributions of source code must retain the above copyright
10+
* notice, this list of conditions and the following disclaimer.
11+
* * Redistributions in binary form must reproduce the above
12+
* copyright notice, this list of conditions and the following
13+
* disclaimer in the documentation and/or other materials provided
14+
* with the distribution.
15+
* * Neither the name of the TU Darmstadt nor the names of its
16+
* contributors may be used to endorse or promote products derived
17+
* from this software without specific prior written permission.
18+
*
19+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20+
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21+
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
22+
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
23+
* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
24+
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
25+
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26+
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27+
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28+
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
29+
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30+
* POSSIBILITY OF SUCH DAMAGE.
31+
*/
32+
33+
#ifndef qt_gui_cpp__GenericProxy_HPP
34+
#define qt_gui_cpp__GenericProxy_HPP
35+
36+
#include <QObject>
37+
38+
namespace qt_gui_cpp
39+
{
40+
41+
class GenericProxy
42+
{
43+
44+
public:
45+
46+
GenericProxy(QObject* obj = 0);
47+
48+
QObject* proxiedObject();
49+
50+
void setProxiedObject(QObject* obj);
51+
52+
bool invokeMethod(const char* member, QGenericArgument val0 = QGenericArgument(), QGenericArgument val1 = QGenericArgument(), QGenericArgument val2 = QGenericArgument(), QGenericArgument val3 = QGenericArgument(), QGenericArgument val4 = QGenericArgument(), QGenericArgument val5 = QGenericArgument(), QGenericArgument val6 = QGenericArgument(), QGenericArgument val7 = QGenericArgument(), QGenericArgument val8 = QGenericArgument(), QGenericArgument val9 = QGenericArgument());
53+
54+
bool invokeMethodWithReturn(const char* member, QGenericReturnArgument ret = QGenericReturnArgument(0, 0), QGenericArgument val0 = QGenericArgument(), QGenericArgument val1 = QGenericArgument(), QGenericArgument val2 = QGenericArgument(), QGenericArgument val3 = QGenericArgument(), QGenericArgument val4 = QGenericArgument(), QGenericArgument val5 = QGenericArgument(), QGenericArgument val6 = QGenericArgument(), QGenericArgument val7 = QGenericArgument(), QGenericArgument val8 = QGenericArgument(), QGenericArgument val9 = QGenericArgument());
55+
56+
private:
57+
58+
QObject* object_;
59+
60+
};
61+
62+
} // namespace
63+
64+
#endif // qt_gui_cpp__GenericProxy_HPP

qt_gui_cpp/include/qt_gui_cpp/plugin.h

Lines changed: 5 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -33,81 +33,11 @@
3333
#ifndef qt_gui_cpp__Plugin_H
3434
#define qt_gui_cpp__Plugin_H
3535

36-
#include "plugin_bridge.h"
37-
#include "plugin_context.h"
38-
#include "settings.h"
36+
// *INDENT-OFF* (prevent uncrustify from adding indention below)
37+
#warning Including header <qt_gui_cpp/plugin.h> is deprecated, \
38+
include <qt_gui_cpp/plugin.hpp> instead.
39+
// *INDENT-ON*
3940

40-
#include <QObject>
41-
42-
namespace qt_gui_cpp
43-
{
44-
45-
/**
46-
* The base class for C++ plugins.
47-
*/
48-
class Plugin
49-
: public QObject
50-
{
51-
52-
Q_OBJECT
53-
54-
public:
55-
56-
/**
57-
* Construct the plugin.
58-
* All initialization should be performed in initPlugin().
59-
*/
60-
Plugin()
61-
: QObject()
62-
{}
63-
64-
/**
65-
* Instantiate the plugin.
66-
* @param the plugin context
67-
*/
68-
virtual void initPlugin(PluginContext& /*context*/)
69-
{}
70-
71-
/**
72-
* Shutdown and clean up the plugin before unloading.
73-
*/
74-
virtual void shutdownPlugin()
75-
{}
76-
77-
/**
78-
* Save the intrinsic state of the plugin to the plugin-specific or instance-specific settings.
79-
* @param the plugin-specific settings
80-
* @param the instance-specific settings
81-
*/
82-
virtual void saveSettings(Settings& /*plugin_settings*/, Settings& /*instance_settings*/) const
83-
{}
84-
85-
/**
86-
* Restore the intrinsic state of the plugin from the plugin-specific or instance-specific settings.
87-
* @param the plugin-specific settings
88-
* @param the instance-specific settings
89-
*/
90-
virtual void restoreSettings(const Settings& /*plugin_settings*/, const Settings& /*instance_settings*/)
91-
{}
92-
93-
/**
94-
* Indicate if the plugin has configuration dialog which could be triggered by an icon in the title bar of the dock widgets.
95-
* @return true if the plugin implements triggerConfiguration()
96-
*/
97-
virtual bool hasConfiguration() const
98-
{
99-
return false;
100-
}
101-
102-
/**
103-
* Trigger a configuration dialog.
104-
* If this method is reimplemented hasConfiguration() should also be reimplemented and return true.
105-
*/
106-
virtual void triggerConfiguration()
107-
{}
108-
109-
};
110-
111-
} // namespace
41+
#include "./plugin.hpp"
11242

11343
#endif // qt_gui_cpp__Plugin_H

0 commit comments

Comments
 (0)