Skip to content
This repository has been archived by the owner on Feb 21, 2021. It is now read-only.

Commit

Permalink
New VisualStates_py tool
Browse files Browse the repository at this point in the history
New VisualStates_py tool
  • Loading branch information
aitormf committed Oct 9, 2017
2 parents 80a7b68 + 267ff78 commit 152c6c5
Show file tree
Hide file tree
Showing 221 changed files with 19,265 additions and 65 deletions.
24 changes: 24 additions & 0 deletions src/tools/visualHFSM/setup.sh
@@ -0,0 +1,24 @@
#!/bin/sh
#
# Copyright (c) 2016
# Author: Samuel Rey <samuel.rey.escudero@gmail.com>
# License: GPLv3 <http://www.gnu.org/licenses/gpl-3.0.html>

#C++ Dependencies
sudo mkdir /usr/local/include/jderobot/visualHFSM
sudo cp *.h /usr/local/include/jderobot/visualHFSM/
sudo mkdir /usr/local/include/jderobot/visualHFSM/popups
sudo cp popups/*.h /usr/local/include/jderobot/visualHFSM/popups/
sudo mkdir /usr/local/share/jderobot/glade/visualHFSM
sudo cp gui/* /usr/local/share/jderobot/glade/visualHFSM/
sudo cp getinterfaces.sh /usr/local/bin

#Python Dependencies
sudo mkdir /usr/local/share/jderobot/python/visualHFSM_py
sudo cp *.py /usr/local/share/jderobot/python/visualHFSM_py
sudo mkdir /usr/local/share/jderobot/python/visualHFSM_py/gui
sudo cp gui/*.py /usr/local/share/jderobot/python/visualHFSM_py/gui

sudo cp visualHFSM /usr/local/bin

echo "Dependencies installed"
15 changes: 1 addition & 14 deletions src/tools/visualStates/getinterfaces.sh
Expand Up @@ -23,18 +23,5 @@
*/
LICENSE

allInterfaces=`egrep -ri interface $1 | awk '{ if ($2 == "interface") print $1 $3 }' | sort`
for interface in $allInterfaces
do
class=`echo $interface | cut -f1 -d: | cut -f7 -d/ | cut -f1 -d.`
theInterface=`echo $interface | cut -f2 -d:`
i="$((${#theInterface}-1))"
last=${theInterface:$i:1}
if [ $last == "{" ]; then
echo "${theInterface%?} $class"
else
echo "$theInterface $class"
fi
done
egrep -ri Client $1 | awk '{ if ($2 == "class") {myindex=index($3,"Client"); print substr($3,1,myindex-1)" "tolower(substr($3,1,1))substr($3,2,length($3)-1); }}' | sort

exit 0
104 changes: 104 additions & 0 deletions src/tools/visualStates/gui/#edittransitioncode.glade#
@@ -0,0 +1,104 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.18.3 -->
<interface>
<requires lib="gtk+" version="3.0"/>
<object class="GtkDialog" id="dialog_code">
<property name="width_request">640</property>
<property name="height_request">480</property>
<property name="can_focus">False</property>
<property name="border_width">5</property>
<property name="type_hint">dialog</property>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox1">
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">2</property>
<child internal-child="action_area">
<object class="GtkButtonBox" id="dialog-action_area1">
<property name="can_focus">False</property>
<property name="layout_style">end</property>
<child>
<object class="GtkButton" id="button_cancel">
<property name="label" translatable="yes">Cancel</property>
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="button_accept">
<property name="label" translatable="yes">Accept</property>
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack_type">end</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkFrame" id="frame">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label_xalign">0</property>
<property name="shadow_type">in</property>
<child>
<object class="GtkAlignment" id="alignment1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="left_padding">12</property>
<child>
<object class="GtkScrolledWindow" id="scrolledwindow">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="shadow_type">in</property>
<child>
<object class="GtkTextView" id="textview">
<property name="visible">True</property>
<property name="can_focus">True</property>
</object>
</child>
</object>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel" id="frame_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">&lt;b&gt;State code&lt;/b&gt;</property>
<property name="use_markup">True</property>
</object>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
<action-widgets>
<action-widget response="0">button_cancel</action-widget>
<action-widget response="0">button_accept</action-widget>
</action-widgets>
</object>
</interface>
68 changes: 56 additions & 12 deletions src/tools/visualStates/gui/configfile.glade
Expand Up @@ -72,7 +72,7 @@
<property name="label" translatable="yes">Name</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
</packing>
</child>
Expand All @@ -84,7 +84,30 @@
<property name="placeholder_text">Name</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="left_attach">1</property>
<property name="top_attach">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label_topic">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Topic</property>
</object>
<packing>
<property name="left_attach">2</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="entry_topic">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">•</property>
<property name="placeholder_text">Topic</property>
</object>
<packing>
<property name="left_attach">2</property>
<property name="top_attach">1</property>
</packing>
</child>
Expand All @@ -97,7 +120,7 @@
<property name="receives_default">True</property>
</object>
<packing>
<property name="left_attach">5</property>
<property name="left_attach">7</property>
<property name="top_attach">1</property>
</packing>
</child>
Expand All @@ -108,7 +131,7 @@
<property name="label" translatable="yes">Confirm</property>
</object>
<packing>
<property name="left_attach">5</property>
<property name="left_attach">7</property>
<property name="top_attach">0</property>
</packing>
</child>
Expand All @@ -119,7 +142,7 @@
<property name="label" translatable="yes">Interface</property>
</object>
<packing>
<property name="left_attach">4</property>
<property name="left_attach">6</property>
<property name="top_attach">0</property>
</packing>
</child>
Expand All @@ -130,7 +153,7 @@
<property name="label" translatable="yes">Port</property>
</object>
<packing>
<property name="left_attach">3</property>
<property name="left_attach">5</property>
<property name="top_attach">0</property>
</packing>
</child>
Expand All @@ -142,7 +165,7 @@
<property name="placeholder_text">Port</property>
</object>
<packing>
<property name="left_attach">3</property>
<property name="left_attach">5</property>
<property name="top_attach">1</property>
</packing>
</child>
Expand All @@ -153,7 +176,7 @@
<property name="label" translatable="yes">IP</property>
</object>
<packing>
<property name="left_attach">2</property>
<property name="left_attach">4</property>
<property name="top_attach">0</property>
</packing>
</child>
Expand All @@ -165,7 +188,7 @@
<property name="placeholder_text">IP</property>
</object>
<packing>
<property name="left_attach">2</property>
<property name="left_attach">4</property>
<property name="top_attach">1</property>
</packing>
</child>
Expand All @@ -176,7 +199,7 @@
<property name="label" translatable="yes">Proxy Name</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="left_attach">3</property>
<property name="top_attach">0</property>
</packing>
</child>
Expand All @@ -188,7 +211,7 @@
<property name="placeholder_text">Proxy Name</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="left_attach">3</property>
<property name="top_attach">1</property>
</packing>
</child>
Expand All @@ -199,7 +222,28 @@
<property name="model">liststore1</property>
</object>
<packing>
<property name="left_attach">4</property>
<property name="left_attach">6</property>
<property name="top_attach">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label_serverType">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Server Type</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkComboBox" id="combobox_serverType">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
</packing>
</child>
Expand Down

0 comments on commit 152c6c5

Please sign in to comment.