当前位置: 首页>>代码示例>>Python>>正文


Python hignotebooks.HIGNotebook类代码示例

本文整理汇总了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")))
开发者ID:royharoush,项目名称:tools,代码行数:13,代码来源:ScanInterface.py

示例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()
开发者ID:EliseuTorres,项目名称:nmap,代码行数:23,代码来源:About.py

示例3: __create_widgets

 def __create_widgets(self):
     self.properties_notebook = HIGNotebook()
开发者ID:4nY0n0m0u5,项目名称:nmap,代码行数:2,代码来源:NmapOutputProperties.py

示例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")))
开发者ID:4nY0n0m0u5,项目名称:nmap,代码行数:85,代码来源:NmapOutputProperties.py

示例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:
#.........这里部分代码省略.........
开发者ID:EliseuTorres,项目名称:nmap,代码行数:101,代码来源:About.py


注:本文中的zenmapGUI.higwidgets.hignotebooks.HIGNotebook类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。