Go to the documentation of this file.00001 import tool_utils as tu
00002 from PyQt4.QtGui import *
00003 from PyQt4.QtCore import *
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 class OutcomeTool(tu.ToolBase):
00018
00019 def __init__(self, button, rcommander):
00020 tu.ToolBase.__init__(self, rcommander, tu.EmptyState.TOOL_NAME, 'Add Outcome', tu.EmptyState)
00021 self.button = button
00022 self.rcommander.connect(self.button, SIGNAL('clicked()'), self.activate_cb)
00023
00024 def activate_cb(self, loaded_node_name=None):
00025 tu.ToolBase.activate_cb(self, loaded_node_name)
00026 self.outcome_mode()
00027
00028 def outcome_mode(self):
00029 cidx = self.rcommander.ui.node_settings_tabs.indexOf(self.rcommander.ui.connections_tab)
00030 self.rcommander.ui.node_settings_tabs.setCurrentIndex(cidx)
00031 self.rcommander.ui.run_button.setDisabled(True)
00032 self.rcommander.ui.reset_button.setDisabled(True)
00033
00034 def new_node(self, name=None):
00035 if name == None:
00036 nname = self.name + str(self.counter)
00037 else:
00038 nname = name
00039 state = tu.EmptyState(nname, False)
00040 return state
00041
00042 def set_node_properties(self, node):
00043 self.rcommander.disable_buttons()
00044 self.outcome_mode()
00045
00046
00047 def fill_property_box(self, pbox):
00048 return
00049
00050
00051 def reset(self):
00052 return
00053
00054
00055 def save(self):
00056 return
00057
00058
00059
00060
00061