本文整理汇总了Python中higwidgets.higboxes.HIGHBox类的典型用法代码示例。如果您正苦于以下问题:Python HIGHBox类的具体用法?Python HIGHBox怎么用?Python HIGHBox使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了HIGHBox类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __create_widgets
def __create_widgets(self):
self.hbox1 = HIGHBox()
self.hbox2 = HIGHBox()
self.subbox = Tests()
self.hbox1.add(self.subbox)
self.checkbtn = gtk.CheckButton(_("Update tests module automatically"))
self.checkbtn_throttled = gtk.CheckButton(_("Load HTTP Throttled Test"))
示例2: do_realize
def do_realize(self):
global global_animation
HIGHBox.do_realize(self)
self.anim_image.set_from_animation(global_animation)
self.anim_image.hide()
示例3: __create_widgets
def __create_widgets(self):
self.general_hbox = HIGHBox()
self.version_hbox = HIGHBox()
################
#Version Section
self.version_section = HIGSectionLabel(_("Version"))
self.version_table = HIGTable()
self.version_label = HIGEntryLabel(_("Software Version:"))
self.version2_label = HIGEntryLabel()
self.testver_label = HIGEntryLabel(_("Service Test Version:"))
self.testver2_label = HIGEntryLabel()
self.attribute_label = HIGEntryLabel(_("Agent Attribute:"))
self.attribute2_label = HIGEntryLabel()
################
#General Section
self.general_section = HIGSectionLabel(_("General"))
self.general_table = HIGTable()
self.startup_check = gtk.CheckButton(_("Startup OpenMonitor on system startup"))
self.notification_check = gtk.CheckButton(_("Show Desktop Notifications"))
self.login_ckeck = gtk.CheckButton(_("Enable Auto login"))
示例4: __init__
def __init__(self):
HIGHBox.__init__(self)
self.frame = gtk.Frame()
self._pack_expand_fill(self.frame)
self.__create_draw_area()
示例5: set_scan_infos
def set_scan_infos(self, scan_info):
for scan in scan_info:
exp = gtk.Expander('<b>%s - %s</b>' % (_('Scan Info'),
scan['type'].capitalize()))
exp.set_use_markup(True)
hbox = HIGHBox()
table = HIGTable()
table.set_border_width(5)
table.set_row_spacings(6)
table.set_col_spacings(6)
table.attach(HIGEntryLabel(_('Scan type:')),0,1,0,1)
table.attach(HIGEntryLabel(scan['type']),1,2,0,1)
table.attach(HIGEntryLabel(_('Protocol:')),0,1,1,2)
table.attach(HIGEntryLabel(scan['protocol']),1,2,1,2)
table.attach(HIGEntryLabel(_('# scanned ports:')),0,1,2,3)
table.attach(HIGEntryLabel(scan['numservices']),1,2,2,3)
table.attach(HIGEntryLabel(_('Services:')),0,1,3,4)
table.attach(self.get_service_view(scan['services'].split(',')),\
1,2,3,4)
hbox._pack_noexpand_nofill(hig_box_space_holder())
hbox._pack_noexpand_nofill(table)
exp.add (hbox)
self._pack_noexpand_nofill(exp)
示例6: __init__
def __init__(self):
HIGHBox.__init__(self)
self._create_target()
self._create_profile()
self.scan_button = gtk.Button(_("Scan"))
self._pack_noexpand_nofill(self.target_label)
self._pack_expand_fill(self.target_entry)
self._pack_noexpand_nofill(self.profile_label)
self._pack_expand_fill(self.profile_entry)
self._pack_noexpand_nofill(self.scan_button)
self.target_entry.set_focus_child(self.target_entry.child)
self.profile_entry.set_focus_child(self.profile_entry.child)
self.target_entry.child.grab_focus()
# Events
self.target_entry.child.connect('key-press-event',\
self.next, self.profile_entry.child)
self.target_entry.child.connect('activate',
lambda x: self.profile_entry.child.grab_focus())
self.profile_entry.child.connect('activate',
lambda x: self.scan_button.clicked())
示例7: create_widgets
def create_widgets(self):
vboxmain = gtk.VBox()
sw = gtk.ScrolledWindow()
sw.set_shadow_type(gtk.SHADOW_ETCHED_IN)
sw.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
self.store = gtk.ListStore(str)
self.update_model()
self.treeView = gtk.TreeView(self.store)
#treeView.connect("row-activated", self.on_activated)
#treeView.set_rules_hint(True)
self.create_columns(self.treeView)
sw.add(self.treeView)
# buttons
vbox = HIGVBox()
btn = HIGButton(_("Edit..."), gtk.STOCK_EDIT)
vbox.pack_start(btn, False, False)
btn.connect("clicked", self._edit_template)
btn = HIGButton(_("Remove"), gtk.STOCK_REMOVE)
vbox.pack_start(btn, False, False)
btn.connect("clicked", self._remove_template)
hbox = HIGHBox()
hbox.pack_start(sw, True, True)
hbox.pack_start(vbox, False, False)
vboxmain.pack_start(hbox, True, True, 0)
self.add(vboxmain)
self.show_all()
示例8: __create_widgets
def __create_widgets(self):
""""""
self.update_switch_hbox = HIGHBox()
self.update_settings_hbox = HIGHBox()
self.update_db_hbox = HIGHBox()
self.update_switch_section = HIGSectionLabel(_("Update News Detect"))
self.update_switch_table = HIGTable()
self.update_settings_section = HIGSectionLabel(_("Update Settings"))
self.update_settings_table = HIGTable()
self.update_db_section = HIGSectionLabel(_("Update Database"))
self.update_db_table = HIGTable()
self.update_check = gtk.CheckButton(_("Automatically update"))
self.update_switch_check = gtk.CheckButton(_("Software Update Detect Switch"))
self.update_times_label = HIGEntryLabel(_("Auto detect update news"))
self.update_method_label = HIGEntryLabel(_("Update method"))
self.update_time_store = gtk.ListStore(str)
self.update_time_entry = gtk.ComboBoxEntry(self.update_time_store, 0)
self.update_method_store = gtk.ListStore(str)
self.update_method_entry = gtk.ComboBoxEntry(self.update_method_store, 0)
self.update_db_label = HIGEntryLabel()
self.update_db_clear_button = gtk.Button(_("Clear Update Information"))
示例9: __create_widgets
def __create_widgets(self):
"""
"""
self.__params = HIGVBox()
self.__params_main = HIGHBox()
self.__params_options = HIGHBox()
self.__fisheye_label = gtk.Label('Fisheye on ring')
self.__ring = gtk.Adjustment(0, 0, self.__ring_max_value, 0.01, 0.01)
self.__ring_spin = gtk.SpinButton(self.__ring)
self.__ring_spin.set_digits(2)
self.__ring_scale = gtk.HScale(self.__ring)
self.__ring_scale.set_size_request(100, -1)
self.__ring_scale.set_digits(2)
self.__ring_scale.set_value_pos(gtk.POS_LEFT)
self.__ring_scale.set_draw_value(False)
self.__ring_scale.set_update_policy(gtk.UPDATE_CONTINUOUS)
self.__interest_label = gtk.Label('Interest factor')
self.__interest = gtk.Adjustment(0, 0, 10, 0.01)
self.__interest_spin = gtk.SpinButton(self.__interest)
self.__interest_spin.set_digits(2)
self.__spread_label = gtk.Label('Spread factor')
self.__spread = gtk.Adjustment(0, -1.0, 1.0, 0.01, 0.01)
self.__spread_spin = gtk.SpinButton(self.__spread)
self.__spread_spin.set_digits(2)
self.__options_button = gtk.ToggleButton('More')
self.__options_button.set_active(False)
self.__params._pack_noexpand_nofill(self.__params_main)
self.__params._pack_noexpand_nofill(self.__params_options)
self.__params_main._pack_noexpand_nofill(self.__fisheye_label)
self.__params_main._pack_noexpand_nofill(self.__ring_spin)
self.__params_main._pack_expand_fill(self.__ring_scale)
self.__params_main._pack_noexpand_nofill(self.__options_button)
self.__params_options._pack_noexpand_nofill(self.__interest_label)
self.__params_options._pack_noexpand_nofill(self.__interest_spin)
self.__params_options._pack_noexpand_nofill(self.__spread_label)
self.__params_options._pack_noexpand_nofill(self.__spread_spin)
self.__params_options.set_no_show_all(True)
self.__params_options.hide()
self._pack_noexpand_nofill(self.__params)
self.__ring.connect('value_changed', self.__change_ring)
self.__interest.connect('value_changed', self.__change_interest)
self.__spread.connect('value_changed', self.__change_spread)
self.__options_button.connect('toggled', self.__options_toggled)
gobject.timeout_add(REFRESH_RATE, self.__update_fisheye)
示例10: create_table_hbox
def create_table_hbox(self):
table = HIGTable()
hbox = HIGHBox()
hbox._pack_noexpand_nofill(hig_box_space_holder())
hbox._pack_noexpand_nofill(table)
return table, hbox
示例11: __init__
def __init__(self, label=None, option=None, hint=None):
HIGHBox.__init__(self)
self.cbutton = OptionCheck(label,option)
self.option = option
self.hint = Hint(hint)
self.pack_start(self.cbutton, False, False)
self.pack_start(self.hint, False, False, 5)
示例12: __init__
def __init__(self):
HIGHBox.__init__(self)
self.entry = gtk.Entry()
self.button = HIGButton(stock=gtk.STOCK_OPEN)
self.entry.set_width_chars(20)
self.button.connect("clicked", self.open_dialog)
self._pack_expand_fill(self.entry)
self._pack_noexpand_nofill(self.button)
示例13: ChoosePage
class ChoosePage(HIGVBox):
def __init__(self):
HIGVBox.__init__(self)
self.set_spacing(12)
table = HIGTable()
self.hbox = HIGHBox()
self.description = HIGEntryLabel(_("""You wish to create a new profile,\
or just want to quickly create a command and run it once?"""))
self.profile_radio = gtk.RadioButton(None, _('Profile'))
self.command_radio = gtk.RadioButton(self.profile_radio, _('Command'))
self.command_radio.connect('toggled', self.enable_target)
self.profile_radio.connect('toggled', self.disable_target)
self.target_label = HIGEntryLabel(_("Target"))
self.target_entry = gtk.Entry()
self.set_completion()
self.hbox._pack_noexpand_nofill(hig_box_space_holder())
self.hbox._pack_noexpand_nofill(self.target_label)
self.hbox._pack_expand_fill(self.target_entry)
self.bar = ForwardBar()
self._pack_noexpand_nofill(self.description)
self._pack_expand_fill(table)
self._pack_noexpand_nofill(self.bar)
table.attach(self.profile_radio,0,1,0,1, yoptions=0)
table.attach(self.command_radio,0,1,1,2, yoptions=0)
table.attach(self.hbox,0,1,2,3, yoptions=0)
self.disable_target()
def set_completion(self):
self.completion = gtk.EntryCompletion()
self.target_list = gtk.ListStore(str)
self.completion.set_model(self.target_list)
self.completion.set_text_column(0)
self.target_entry.set_completion(self.completion)
for target in target_list.get_target_list()[:15]:
self.target_list.append([target.replace('\n','')])
def add_new_target(self, target):
target_list.add_target(target)
def enable_target(self, widget=None):
self.hbox.set_sensitive(True)
def disable_target(self, widget=None):
self.hbox.set_sensitive(False)
示例14: __init__
def __init__(self, parent = None):
HIGDialog.__init__(self, _("Find"), parent,
gtk.DIALOG_MODAL | gtk.DIALOG_NO_SEPARATOR,
(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL,
gtk.STOCK_FIND, gtk.RESPONSE_OK))
self.set_default_response(gtk.RESPONSE_OK)
hbox = HIGHBox()
hbox.pack_start(gtk.Label(_("Search:")))
self.entry = HIGTextEntry()
self.entry.set_activates_default(True)
hbox.pack_start(self.entry)
self.vbox.add(hbox)
self.show_all()
示例15: __layout
def __layout(self):
self.set_position(gtk.WIN_POS_CENTER)
main_vbox = HIGVBox()
top_hbox = HIGHBox()
top_hbox._pack_noexpand_nofill(self.iimg)
top_hbox._pack_noexpand_nofill(self.topic)
main_vbox._pack_noexpand_nofill(top_hbox)
main_vbox._pack_noexpand_nofill(self.message)
self.add(main_vbox)