本文整理匯總了Python中zenmapGUI.higwidgets.hignotebooks.HIGNotebook類的典型用法代碼示例。如果您正苦於以下問題:Python HIGNotebook類的具體用法?Python HIGNotebook怎麽用?Python HIGNotebook使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了HIGNotebook類的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: __init__
def __init__(self, inventory, scans_store):
HIGNotebook.__init__(self)
self.set_border_width(5)
self.__create_widgets(inventory, scans_store)
self.scans_list.scans_list.connect("row-activated", self._scan_row_activated)
self.append_page(self.nmap_output_page, gtk.Label(_("Nmap Output")))
self.append_page(self.open_ports_page, gtk.Label(_("Ports / Hosts")))
self.append_page(self.topology_page, gtk.Label(_("Topology")))
self.append_page(self.host_details_page, gtk.Label(_("Host Details")))
self.append_page(self.scans_list_page, gtk.Label(_("Scans")))
示例2: __create_widgets
def __create_widgets(self):
self.vbox = HIGVBox()
self.hbox = HIGHBox()
self.notebook = HIGNotebook()
self.btn_close = HIGButton(stock=gtk.STOCK_CLOSE)
self.written_by_scroll = HIGScrolledWindow()
self.written_by_text = HIGTextView()
self.design_scroll = HIGScrolledWindow()
self.design_text = HIGTextView()
self.soc2007_scroll = HIGScrolledWindow()
self.soc2007_text = HIGTextView()
self.contributors_scroll = HIGScrolledWindow()
self.contributors_text = HIGTextView()
self.translation_scroll = HIGScrolledWindow()
self.translation_text = HIGTextView()
self.nokia_scroll = HIGScrolledWindow()
self.nokia_text = HIGTextView()
示例3: __create_widgets
def __create_widgets(self):
self.properties_notebook = HIGNotebook()
示例4: NmapOutputProperties
class NmapOutputProperties(HIGDialog):
def __init__(self, nmap_output_view):
HIGDialog.__init__(self, _("Nmap Output Properties"),
buttons=(gtk.STOCK_CLOSE, gtk.RESPONSE_CLOSE))
self.nmap_highlight = NmapOutputHighlight()
self.__create_widgets()
self.__pack_widgets()
self.highlight_tab()
self.vbox.show_all()
def __create_widgets(self):
self.properties_notebook = HIGNotebook()
def __pack_widgets(self):
self.vbox.pack_start(self.properties_notebook)
def highlight_tab(self):
# Creating highlight tab main box
self.highlight_main_vbox = HIGVBox()
# Creating highlight tab main table
self.highlight_main_table = HIGTable()
self.highlight_main_table.set_border_width(6)
#############
# Properties:
self.property_names = {"details": [_("details"), "MAC Address:"],
"port_list": [_("port listing title"),
"PORT STATE SERVICE"],
"open_port": [_("open port"),
"22/tcp open ssh"],
"closed_port": [_("closed port"),
"70/tcp closed gopher"],
"filtered_port": [_("filtered port"),
"80/tcp filtered http"],
"date": [_("date"), "2006-05-26 11:14 BRT"],
"hostname": [_("hostname"), "scanme.nmap.org"],
"ip": [_("ip"), "127.0.0.1"]}
for p in self.property_names:
settings = self.nmap_highlight.__getattribute__(p)
self.property_names[p].append(settings[0])
self.property_names[p].append(settings[1])
self.property_names[p].append(settings[2])
self.property_names[p].append(gtk.gdk.Color(*settings[3]))
self.property_names[p].append(gtk.gdk.Color(*settings[4]))
self.property_names[p].append(settings[5])
# Creating properties and related widgets and attaching it to main
# table
y1 = 0
y2 = 1
for p in self.property_names:
hp = HighlightProperty(p, self.property_names[p])
self.highlight_main_table.attach(
hp.property_name_label, 0, 1, y1, y2)
self.highlight_main_table.attach(hp.example_label, 1, 2, y1, y2)
self.highlight_main_table.attach(hp.bold_tg_button, 2, 3, y1, y2)
self.highlight_main_table.attach(hp.italic_tg_button, 3, 4, y1, y2)
self.highlight_main_table.attach(
hp.underline_tg_button, 4, 5, y1, y2)
self.highlight_main_table.attach(
hp.text_color_button, 5, 6, y1, y2)
self.highlight_main_table.attach(
hp.highlight_color_button, 6, 7, y1, y2)
# Setting example styles and colors
hp.update_example()
self.property_names[p].append(hp)
y1 += 1
y2 += 1
# Packing main table into main vbox
self.highlight_main_vbox.pack_start(self.highlight_main_table)
# Adding color tab
self.properties_notebook.append_page(
self.highlight_main_vbox,
gtk.Label(_("Highlight definitions")))
示例5: UmitCredits
class UmitCredits(HIGWindow):
def __init__(self):
HIGWindow.__init__(self)
self.set_title(_("%s credits") % UMIT_DISPLAY_NAME)
self.set_size_request(-1, 250)
self.set_position(gtk.WIN_POS_CENTER)
self.__create_widgets()
self.__packing()
self.set_text()
def __create_widgets(self):
self.vbox = HIGVBox()
self.hbox = HIGHBox()
self.notebook = HIGNotebook()
self.btn_close = HIGButton(stock=gtk.STOCK_CLOSE)
self.written_by_scroll = HIGScrolledWindow()
self.written_by_text = HIGTextView()
self.design_scroll = HIGScrolledWindow()
self.design_text = HIGTextView()
self.soc2007_scroll = HIGScrolledWindow()
self.soc2007_text = HIGTextView()
self.contributors_scroll = HIGScrolledWindow()
self.contributors_text = HIGTextView()
self.translation_scroll = HIGScrolledWindow()
self.translation_text = HIGTextView()
self.nokia_scroll = HIGScrolledWindow()
self.nokia_text = HIGTextView()
def __packing(self):
self.add(self.vbox)
self.vbox.set_spacing(12)
self.vbox._pack_expand_fill(self.notebook)
self.vbox._pack_noexpand_nofill(self.hbox)
self.hbox._pack_expand_fill(hig_box_space_holder())
self.hbox._pack_noexpand_nofill(self.btn_close)
self.notebook.append_page(
self.written_by_scroll, gtk.Label(_("Written by")))
self.notebook.append_page(
self.design_scroll, gtk.Label(_("Design")))
self.notebook.append_page(
self.soc2007_scroll, gtk.Label(_("SoC 2007")))
self.notebook.append_page(
self.contributors_scroll, gtk.Label(_("Contributors")))
self.notebook.append_page(
self.translation_scroll, gtk.Label(_("Translation")))
self.notebook.append_page(
self.nokia_scroll, gtk.Label(_("Maemo")))
self.written_by_scroll.add(self.written_by_text)
self.written_by_text.set_wrap_mode(gtk.WRAP_NONE)
self.design_scroll.add(self.design_text)
self.design_text.set_wrap_mode(gtk.WRAP_NONE)
self.soc2007_scroll.add(self.soc2007_text)
self.soc2007_text.set_wrap_mode(gtk.WRAP_NONE)
self.contributors_scroll.add(self.contributors_text)
self.contributors_text.set_wrap_mode(gtk.WRAP_NONE)
self.translation_scroll.add(self.translation_text)
self.translation_text.set_wrap_mode(gtk.WRAP_NONE)
self.nokia_scroll.add(self.nokia_text)
self.nokia_text.set_wrap_mode(gtk.WRAP_NONE)
self.btn_close.connect('clicked', lambda x, y=None: self.destroy())
def set_text(self):
b = self.written_by_text.get_buffer()
b.set_text("""Adriano Monteiro Marques <[email protected]>""")
b = self.design_text.get_buffer()
b.set_text("""Operating System and Vulnerability Icons:
Takeshi Alexandre Gondo <[email protected]>
Logo, Application Icons and Splash screen:
Virgílio Carlo de Menezes Vasconcelos <[email protected]>
The Umit Project Web Site Design:
Joao Paulo Pacheco <[email protected]>""")
b = self.soc2007_text.get_buffer()
b.set_text("""Independent Features:
Adriano Monteiro Marques <[email protected]>
Frederico Silva Ribeiro <[email protected]>
Network Inventory:
Guilherme Henrique Polo Gonçalves <[email protected]>
Umit Radial Mapper:
#.........這裏部分代碼省略.........