4 from utils
import author_name
5 from utils
import read_template
6 from utils
import instantiate_template
13 template_dir = os.path.join(os.path.dirname(__file__),
'templates',type)
15 templates[
'mainpage.dox'] =
read_template(os.path.join(template_dir,
'mainpage.dox'))
16 templates[
'CMakeLists.txt'] =
read_template(os.path.join(template_dir,
'CMakeLists.txt'))
17 templates[
'package.xml'] =
read_template(os.path.join(template_dir,
'package.xml'))
18 templates[os.path.join(
'ui',
'main_window.ui')] =
read_template(os.path.join(template_dir,
'ui',
'main_window.ui'))
19 templates[os.path.join(
'src',
'main.cpp')] =
read_template(os.path.join(template_dir,
'src',
'main.cpp'))
20 templates[os.path.join(
'src',
'main_window.cpp')] =
read_template(os.path.join(template_dir,
'src',
'main_window.cpp'))
21 templates[os.path.join(
'src',
'qnode.cpp')] =
read_template(os.path.join(template_dir,
'src',
'qnode.cpp'))
22 templates[os.path.join(
'resources',
'images.qrc')] =
read_template(os.path.join(template_dir,
'resources',
'images.qrc'))
23 templates[os.path.join(
'include',package,
'main_window.hpp')] =
read_template(os.path.join(template_dir,
'include',
'PACKAGE_NAME',
'main_window.hpp'))
24 templates[os.path.join(
'include',package,
'qnode.hpp')] =
read_template(os.path.join(template_dir,
'include',
'PACKAGE_NAME',
'qnode.hpp'))
29 p = os.path.abspath(package)
30 os.makedirs(os.path.join(p,
"src"))
31 os.makedirs(os.path.join(p,
"include"))
32 os.makedirs(os.path.join(p,
"include",package))
33 os.makedirs(os.path.join(p,
"resources"))
34 os.makedirs(os.path.join(p,
"resources",
"images"))
35 os.makedirs(os.path.join(p,
"ui"))
36 print "Created qt package directories." 40 for filename, template
in templates.iteritems():
43 p = os.path.abspath(os.path.join(package, filename))
46 print "Created package file", p
50 template_dir = os.path.join(os.path.dirname(__file__),
'templates',type)
51 shutil.copy(os.path.join(template_dir,
'resources',
'images',
'icon.png'),
52 os.path.join(os.path.abspath(package),
'resources',
'images',
'icon.png'))
def create_qt_ros_catkin_package(package, depends)
def author_name()
Utilities.
def instantiate_template(template, package, description, author, depends)
def get_qt_text_templates(package, type)
Template.
def create_qt_ros_package(package, depends, type)