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


Python HIGTable.set_row_spacings方法代码示例

本文整理汇总了Python中higwidgets.higtables.HIGTable.set_row_spacings方法的典型用法代码示例。如果您正苦于以下问题:Python HIGTable.set_row_spacings方法的具体用法?Python HIGTable.set_row_spacings怎么用?Python HIGTable.set_row_spacings使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在higwidgets.higtables.HIGTable的用法示例。


在下文中一共展示了HIGTable.set_row_spacings方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: set_scan_infos

# 需要导入模块: from higwidgets.higtables import HIGTable [as 别名]
# 或者: from higwidgets.higtables.HIGTable import set_row_spacings [as 别名]
 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)
开发者ID:aregee,项目名称:network-scanner,代码行数:31,代码来源:ScanRunDetailsPage.py

示例2: LoginDialog

# 需要导入模块: from higwidgets.higtables import HIGTable [as 别名]
# 或者: from higwidgets.higtables.HIGTable import set_row_spacings [as 别名]
class LoginDialog(HIGDialog):
    """"""

    #----------------------------------------------------------------------
    def __init__(self, title=_('Open Monitor 2012')):
        """Constructor"""
        HIGDialog.__init__(self, title=title, flags=gtk.DIALOG_MODAL,
                           buttons=(gtk.STOCK_OK, gtk.RESPONSE_ACCEPT))

        self.set_position(gtk.WIN_POS_CENTER_ALWAYS)
        self.set_default_response(gtk.RESPONSE_ACCEPT)
        self.set_keep_above(True)
        self.set_size_request(480, 240)
        self.set_border_width(2)

        self._create_widgets()
        self._pack_widgets()
        self._connect_widgets()

    def _create_widgets(self):
        
        #Username
        self.username_label = HIGLabel(_("Username"))
        self.username_entry = HIGTextEntry()
        self.username_entry.set_activates_default(True)

        #Password
        self.password_label = HIGLabel(_("Password"))
        self.password_entry = HIGPasswordEntry()
        self.password_entry.set_activates_default(True)
        
        #Logo
        self.logo_openmonitor = gtk.gdk.pixbuf_new_from_file\
                                    (os.path.join(IMAGES_DIR, 'logoOM.png'))
        self.logo_image = gtk.Image()
        self.logo_image.set_from_pixbuf(self.logo_openmonitor)
        #self.login_text = gtk.Label(_("Log into your ICM agent."))
        
        #Register
        #self.register_button = HIGStockButton(gtk.STOCK_DIALOG_INFO,_("Register"))
        self.register_label = \
            gtk.Label(_("<span foreground='blue'>" \
                        "Register id</span>"))
        self.register_label.set_use_markup(True)
        self.register_button = gtk.Button()
        self.register_button.add(self.register_label)
        self.register_button.set_relief(gtk.RELIEF_NONE)
        
        #Forget Password
        self.forgot_password_label = \
            gtk.Label(_("<span foreground='blue'>" \
                        "Forgot password?</span>"))
        self.forgot_password_label.set_use_markup(True)
        self.forgot_password = gtk.Button()
        self.forgot_password.add(self.forgot_password_label)
        self.forgot_password.set_relief(gtk.RELIEF_NONE)
        
        #Auto Login
        self.auto_login_checkbtn = gtk.CheckButton(_("Auto login"))
        
        #Settings
        self.settings_button = HIGStockButton(gtk.STOCK_DIALOG_INFO,_("settings"))
        
        #Container
        self.hbox = HIGHBox(False,2)
        self.table = HIGTable(8,4,False)
        self.table.set_row_spacings(5)
        self.table.set_col_spacings(10)
        self.action_area.set_homogeneous(False)
        
        #tab orders
        self.orders = [self.username_entry, self.password_entry, self.register_button, self.forgot_password]

    def _pack_widgets(self):

        self.hbox.set_border_width(8)
        
        self.table.set_focus_chain(self.orders)
        
        self.table.attach(self.logo_image,0,7,0,5,gtk.FILL,gtk.FILL,0,0)
        self.table.attach(self.username_label,0,1,5,6,gtk.FILL,gtk.FILL,0,0)
        self.table.attach(self.username_entry,1,5,5,6,gtk.FILL|gtk.EXPAND,gtk.FILL|gtk.EXPAND,0,0)
        self.table.attach(self.password_label,0,1,6,7,gtk.FILL,gtk.FILL,0,0)
        self.table.attach(self.password_entry,1,5,6,7,gtk.FILL|gtk.EXPAND,gtk.FILL|gtk.EXPAND,0,0) 
        self.table.attach(self.register_button,5,6,5,6,gtk.FILL,gtk.FILL,0,0)  
        self.table.attach(self.forgot_password,5,6,6,7,gtk.FILL,gtk.FILL,0,0)
        self.table.attach(self.auto_login_checkbtn,1,3,7,8,gtk.FILL,gtk.FILL,0,0)   
 
        self.hbox._pack_expand_fill(self.table)
        self.vbox.pack_start(self.hbox, False, False)                                  

        spaceholder1 = hig_box_space_holder()
        spaceholder2 = hig_box_space_holder()
        spaceholder3 = hig_box_space_holder()
        self.action_area.pack_end(spaceholder1)
        self.action_area.pack_end(spaceholder2)
        self.action_area.pack_end(spaceholder3)
        self.action_area.pack_end(self.settings_button)
        self.action_area.reorder_child(self.settings_button, 0)
        self.action_area.reorder_child(spaceholder1, 1)        
#.........这里部分代码省略.........
开发者ID:gkso,项目名称:openmonitor-desktop-agent,代码行数:103,代码来源:Login.py

示例3: ScanRunDetailsPage

# 需要导入模块: from higwidgets.higtables import HIGTable [as 别名]
# 或者: from higwidgets.higtables.HIGTable import set_row_spacings [as 别名]
class ScanRunDetailsPage(HIGVBox):
    def __init__(self):
        HIGVBox.__init__(self)
        
        self.__create_widgets()
    
    def __create_widgets(self):
        na = _('Not available')
        self.command_expander = gtk.Expander("<b>"+_("Command Info")+"</b>")
        self.general_expander = gtk.Expander("<b>"+_("General Info")+"</b>")
        
        # Command info
        self.command_label = HIGEntryLabel(_('Command:'))
        self.info_command_label = HIGEntryLabel(na)
        
        self.nmap_version_label = HIGEntryLabel(_('Nmap Version:'))
        self.info_nmap_version_label = HIGEntryLabel(na)
        
        self.verbose_label = HIGEntryLabel(_('Verbosity level:'))
        self.info_verbose_label = HIGEntryLabel(na)
        
        self.debug_label = HIGEntryLabel(_('Debug level:'))
        self.info_debug_label = HIGEntryLabel(na)
        
        self.command_table = HIGTable()
        self.command_hbox = HIGHBox()
        
        # General info:
        self.start_label = HIGEntryLabel(_('Started on:'))
        self.info_start_label = HIGEntryLabel(na)
        
        self.finished_label = HIGEntryLabel(_('Finished on:'))
        self.info_finished_label = HIGEntryLabel(na)
        
        self.host_up_label = HIGEntryLabel(_('Hosts up:'))
        self.info_hosts_up_label = HIGEntryLabel(na)
        
        self.host_down_label = HIGEntryLabel(_('Hosts down:'))
        self.info_hosts_down_label = HIGEntryLabel(na)
        
        self.host_scanned_label = HIGEntryLabel(_('Hosts scanned:'))
        self.info_hosts_scanned_label = HIGEntryLabel(na)
        
        self.open_label = HIGEntryLabel(_('Open ports:'))
        self.info_open_label = HIGEntryLabel(na)
        
        self.filtered_label = HIGEntryLabel(_('Filtered ports:'))
        self.info_filtered_label = HIGEntryLabel(na)
        
        self.closed_label = HIGEntryLabel(_('Closed ports:'))
        self.info_closed_label = HIGEntryLabel(na)
        
        self.general_table = HIGTable()
        self.general_hbox = HIGHBox()
    
    def set_command_info(self, info):
        # Fix aligment!
        self.command_expander.set_use_markup(True)
        self.command_table.set_border_width(5)
        self.command_table.set_row_spacings(6)
        self.command_table.set_col_spacings(6)
        
        try:self.info_command_label.set_text(info['command'])
        except:pass
        
        try:self.info_nmap_version_label.set_text(info['version'])
        except:pass
        
        try:self.info_verbose_label.set_text(info['verbose'])
        except:pass
        
        try:self.info_debug_label.set_text(info['debug'])
        except:pass
        
        self.command_hbox._pack_noexpand_nofill(hig_box_space_holder())
        self.command_hbox._pack_noexpand_nofill(self.command_table)
        
        self.command_table.attach(self.command_label,0,1,0,1)
        self.command_table.attach(self.info_command_label,1,2,0,1)
        
        self.command_table.attach(self.nmap_version_label,0,1,1,2)
        self.command_table.attach(self.info_nmap_version_label,1,2,1,2)
        
        self.command_table.attach(self.verbose_label,0,1,2,3)
        self.command_table.attach(self.info_verbose_label,1,2,2,3)
        
        self.command_table.attach(self.debug_label,0,1,3,4)
        self.command_table.attach(self.info_debug_label,1,2,3,4)
        
        self.command_expander.add(self.command_hbox)
        self._pack_noexpand_nofill(self.command_expander)
        self.command_expander.set_expanded(True)
    
    def set_general_info(self, info):
        # Fix aligment!
        self.general_expander.set_use_markup(True)
        self.general_table.set_border_width(5)
        self.general_table.set_row_spacings(6)
        self.general_table.set_col_spacings(6)
        
#.........这里部分代码省略.........
开发者ID:aregee,项目名称:network-scanner,代码行数:103,代码来源:ScanRunDetailsPage.py


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