本文整理汇总了Python中higwidgets.higboxes.HIGVBox.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python HIGVBox.__init__方法的具体用法?Python HIGVBox.__init__怎么用?Python HIGVBox.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类higwidgets.higboxes.HIGVBox
的用法示例。
在下文中一共展示了HIGVBox.__init__方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from higwidgets.higboxes import HIGVBox [as 别名]
# 或者: from higwidgets.higboxes.HIGVBox import __init__ [as 别名]
def __init__(self, preferences, show_label=True):
HIGVBox.__init__(self)
self.set_border_width(8)
if show_label:
self.pack_start(HIGSectionLabel(_("Text Editor")), False, False)
self.preferences = preferences
self.create_widgets()
示例2: __init__
# 需要导入模块: from higwidgets.higboxes import HIGVBox [as 别名]
# 或者: from higwidgets.higboxes.HIGVBox import __init__ [as 别名]
def __init__(self, optiondisplay=None):
HIGVBox.__init__(self)
self.__model = gtk.TreeStore(gtk.gdk.Pixbuf,gobject.TYPE_STRING)
self.__treeview = gtk.TreeView(self.__model)
self.__treeview.set_headers_visible(True)
self.__treeview.drag_source_set(gtk.gdk.BUTTON1_MASK |
gtk.gdk.BUTTON3_MASK,
target, gtk.gdk.ACTION_COPY |
gtk.gdk.ACTION_MOVE)
self.__treeview.connect('drag_data_get', self.source_drag_data_get)
column = gtk.TreeViewColumn()
column.set_title('Name')
render_pixbuf = gtk.CellRendererPixbuf()
column.pack_start(render_pixbuf, expand=False)
column.add_attribute(render_pixbuf, 'pixbuf', 0)
render_text = gtk.CellRendererText()
column.pack_start(render_text, expand=True)
column.add_attribute(render_text, 'text', 1)
self.__treeview.append_column(column)
self.options = ListOptions(options)
self.__scrolledwindow = HIGScrolledWindow()
self.__scrolledwindow.set_policy(gtk.POLICY_AUTOMATIC,
gtk.POLICY_AUTOMATIC)
self.pack_start(self.__scrolledwindow, True, True )
self.__scrolledwindow.add(self.__treeview)
self.optiondisplay = optiondisplay
self.exists_display = (self.optiondisplay != None ) #True or False
self.set_option_display(optiondisplay)
示例3: __init__
# 需要导入模块: from higwidgets.higboxes import HIGVBox [as 别名]
# 或者: from higwidgets.higboxes.HIGVBox import __init__ [as 别名]
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()
示例4: __init__
# 需要导入模块: from higwidgets.higboxes import HIGVBox [as 别名]
# 或者: from higwidgets.higboxes.HIGVBox import __init__ [as 别名]
def __init__(self):
HIGVBox.__init__(self)
self._create_widgets()
self._set_port_list()
self._set_host_list()
self._pack_widgets()
示例5: __init__
# 需要导入模块: from higwidgets.higboxes import HIGVBox [as 别名]
# 或者: from higwidgets.higboxes.HIGVBox import __init__ [as 别名]
def __init__(self, radialnet):
"""
"""
HIGVBox.__init__(self)
self.radialnet = radialnet
self.__create_widgets()
示例6: __init__
# 需要导入模块: from higwidgets.higboxes import HIGVBox [as 别名]
# 或者: from higwidgets.higboxes.HIGVBox import __init__ [as 别名]
def __init__(self):
"""Constructor"""
HIGVBox.__init__(self)
self.__create_widgets()
self.__pack_widgets()
self.__load_list()
self.__connect_widgets()
self.__init_db_text()
示例7: __init__
# 需要导入模块: from higwidgets.higboxes import HIGVBox [as 别名]
# 或者: from higwidgets.higboxes.HIGVBox import __init__ [as 别名]
def __init__(self, node):
"""
"""
HIGVBox.__init__(self)
self.set_border_width(6)
self.__node = node
self.__create_widgets()
示例8: __init__
# 需要导入模块: from higwidgets.higboxes import HIGVBox [as 别名]
# 或者: from higwidgets.higboxes.HIGVBox import __init__ [as 别名]
def __init__(self, nmap_output_view):
HIGVBox.__init__(self)
self.nmap_highlight = NmapOutputHighlight()
self.vbox = self
self.highlight_tab()
self.__pack_widgets()
self.vbox.show_all()
示例9: __init__
# 需要导入模块: from higwidgets.higboxes import HIGVBox [as 别名]
# 或者: from higwidgets.higboxes.HIGVBox import __init__ [as 别名]
def __init__(self, colors):
HIGVBox.__init__(self)
self.colors = colors
self.set_border_width(5)
self.set_spacing(6)
self._create_widgets()
self._set_diff_view()
self._pack_widgets()
示例10: __init__
# 需要导入模块: from higwidgets.higboxes import HIGVBox [as 别名]
# 或者: from higwidgets.higboxes.HIGVBox import __init__ [as 别名]
def __init__(self, section_name, profile, listoptions, notebook_parent, new=False):
"""
A Box Editable contains a options of each tab
@param section_name: section name <tab>
@type section_name: str
@param profile: A class that view and modify xml file
@type profile: ProfileCore
@param listoptions: The List of Options to update XML (I guess to confirm)
@type listoptions: ListOptions
@param notebook_parent: Notebook
@type notebook_parent: Notebook or Subclass
@param new: It's a new tab or not
@type new: bool
"""
HIGVBox.__init__(self)
self._coords = {}
self._parent = notebook_parent
self._last = None
#Profile Core do a manage at profile_editor.xml file
self._profilecore = None
self._profile = profile
self._listoptions = listoptions
self._table = HIGTable()
self._section_name = section_name
if not new :
self._options = self._profile.get_section(section_name)
self._table.set_border_width(3)
c = self.get_colormap()
color = c.alloc_color(0,0,0)
self._table.modify_fg(gtk.STATE_NORMAL,color )
#self._fill_table()
box_tmp = HIGVBox()
box_tmp.pack_start(self._table, False, False)
self._sw = HIGScrolledWindow()
#self._sw.set_size_request(400,200)
vp = gtk.Viewport()
vp.add(box_tmp)
vp.set_shadow_type(gtk.SHADOW_NONE)
self._sw.add(vp)
self.pack_start(self._sw, True, True)
self._old_selected = None
self._x = 0
self._y = 0
self.connect('button-press-event', self._bp)
示例11: __init__
# 需要导入模块: from higwidgets.higboxes import HIGVBox [as 别名]
# 或者: from higwidgets.higboxes.HIGVBox import __init__ [as 别名]
def __init__(self, target=None):
"""
"""
HIGVBox.__init__(self)
self.target = target
self.result = ZionResultsPage()
self.pack_end(self.result)
self.result.get_hosts_view().set_current_page(0)
# construct communication queues
self.q1 = Queue()
self.q2 = Queue()
fd = self.q2._reader.fileno()
# observe received messages in queue
gobject.io_add_watch(fd, gobject.IO_IN, self.update)
示例12: __init__
# 需要导入模块: from higwidgets.higboxes import HIGVBox [as 别名]
# 或者: from higwidgets.higboxes.HIGVBox import __init__ [as 别名]
def __init__(self, hosts={}, services={}):
HIGVBox.__init__(self)
self._create_widgets()
self._connect_widgets()
self._pack_widgets()
self._set_scrolled()
self._set_host_list(hosts)
self._set_service_list(services)
self._pack_expand_fill(self.main_vbox)
# Default mode is host mode
self.host_mode(self.host_mode_button)
self.host_view.show_all()
self.service_view.show_all()
PluginEngine().core.emit("ScanHostsView-created", self)
示例13: __init__
# 需要导入模块: from higwidgets.higboxes import HIGVBox [as 别名]
# 或者: from higwidgets.higboxes.HIGVBox import __init__ [as 别名]
def __init__(self, viewName, dashboard):
HIGVBox.__init__(self)
self.dashboard = dashboard
self.set_size_request(240, 720)
self.treestore = gtk.TreeStore(str)
piter = self.treestore.append(None, [CAPACITY])
self.treestore.append(piter, [CAPA_THROTTLED])
self.treestore.append(piter, [CAPA_SERVICE])
piter = self.treestore.append(None, [REPORT]) #Report statistics
self.treestore.append(piter, [REPORT_SENT])
self.treestore.append(piter, [REPORT_UNSENT])
self.treestore.append(piter, [REPORT_RECEIVED])
piter = self.treestore.append(None, [TASK])
self.treestore.append(piter, [TASK_ALL])
self.treestore.append(piter, [TASK_SUCCESSED])
self.treestore.append(piter, [TASK_FAILED])
piter = self.treestore.append(None, [CONNECTION])
self.treestore.append(piter, [CONN_AGG])
self.treestore.append(piter, [CONN_SUPER])
self.treestore.append(piter, [CONN_NORMAL])
self.treestore.append(piter, [CONN_MOBILE])
self.treeview = gtk.TreeView(self.treestore)
self.treeview.connect('cursor-changed', self.on_cursor_changed)
self.tvcolumn = gtk.TreeViewColumn(viewName)
self.treeview.append_column(self.tvcolumn)
self.treeview.set_show_expanders(True)
self.cell = gtk.CellRendererText()
self.tvcolumn.pack_start(self.cell, True)
self.tvcolumn.add_attribute(self.cell, 'text', 0)
self.treeview.set_search_column(0)
self.tvcolumn.set_sort_column_id(0)
self.treeview.set_reorderable(True)
self.treeview.expand_all()
self.add(self.treeview)
self.show_all()
示例14: __init__
# 需要导入模块: from higwidgets.higboxes import HIGVBox [as 别名]
# 或者: from higwidgets.higboxes.HIGVBox import __init__ [as 别名]
def __init__ (self, refresh=1, stop=1):
self.nmap_highlight = NmapOutputHighlight()
HIGVBox.__init__ (self)
# Creating widgets
self.__create_widgets()
# Setting scrolled window
self.__set_scrolled_window()
# Setting text view
self.__set_text_view()
# Setting buttons
self.__set_buttons()
# Getting text buffer
self.text_buffer = self.text_view.get_buffer()
self.refreshing = True
self.thread = Thread()
# Adding widgets to the VPaned
self._pack_expand_fill(self.scrolled)
self._pack_noexpand_nofill(self.hbox_buttons)
self.nmap_output_file = None
self.nmap_previous_output = ''
self.brazil = True
# We have to create a mark to follow changes in the view with left grav.
self.mark = self.text_buffer.create_mark(
'start',
self.text_buffer.get_start_iter(),
True
)
self.__create_tags()
示例15: __init__
# 需要导入模块: from higwidgets.higboxes import HIGVBox [as 别名]
# 或者: from higwidgets.higboxes.HIGVBox import __init__ [as 别名]
def __init__(self):
HIGVBox.__init__(self)
self.__parser = None
self.__radialnet = None
self.__created = False