示例#1
0
 def _setup_icons(self):
     self._init_icons()
     self._domain_icons = {
         model.Domain.KERNEL: utils.get_qicon('tux'),
         model.Domain.USER: utils.get_qicon('user'),
         model.Domain.JUL: utils.get_qicon('java'),
         model.Domain.LOG4J: utils.get_qicon('apache'),
         model.Domain.PYTHON: utils.get_qicon('python'),
     }
示例#2
0
文件: items.py 项目: eepp/lttngc
    def __init__(self, obj, active_icon, inactive_icon):
        super().__init__(obj, active_icon, inactive_icon)

        if obj.is_pseudo:
            if obj.domain == model.Domain.JUL:
                self._icon = utils.get_qicon('java')
            elif obj.domain == model.Domain.LOG4J:
                self._icon = utils.get_qicon('apache')
            elif obj.domain == model.Domain.PYTHON:
                self._icon = utils.get_qicon('python')

            self._has_special_icon = True

        self._update()
示例#3
0
    def _setup_icons(self):
        actions_icons = [
            (self._action_load, 'load'),
            (self._action_save, 'save'),
            (self._action_quit, 'quit'),
            (self._action_add_session, 'add'),
            (self._action_remove_session, 'remove'),
            (self._action_remove_all_sessions, 'explosion'),
            (self._action_toggle_tracing, 'play'),
            (self._action_add_channel, 'add'),
            (self._action_attach_context, 'attach'),
            (self._action_enable_channels, 'enable'),
            (self._action_disable_channels, 'disable'),
            (self._action_add_events, 'add'),
            (self._action_enable_events, 'enable'),
            (self._action_disable_events, 'disable'),
            (self._action_show_sessions, 'sessions'),
            (self._action_show_channels, 'channels'),
            (self._action_show_events, 'events'),
            (self._action_show_object_infos, 'infos'),
            (self._action_show_last_operation, 'terminal'),
            (self._action_show_filters, 'filter'),
            (self._action_auto_refresh, 'auto-refresh'),
            (self._action_refresh, 'refresh'),
            (self._action_about, 'about'),
            (self._action_goto_lttng_org, 'lttng'),
        ]

        for pair in actions_icons:
            icon = utils.get_qicon(pair[1])
            pair[0].setIcon(icon)

        buttons_icons = [
            (self._add_session_btn, 'add'),
            (self._add_channel_btn, 'add'),
            (self._attach_context_btn, 'attach'),
            (self._enable_channels_btn, 'enable'),
            (self._disable_channels_btn, 'disable'),
            (self._add_events_btn, 'add'),
            (self._enable_events_btn, 'enable'),
            (self._disable_events_btn, 'disable'),
        ]

        for pair in buttons_icons:
            icon = utils.get_qicon(pair[1])
            pair[0].setIcon(icon)
            pair[0].setIconSize(Qt.QSize(16, 16))

        self.setWindowIcon(utils.get_qicon('lttng'))
示例#4
0
 def __init__(self, domain, obj_name):
     super().__init__()
     self.domain = domain
     tip = 'Show {} {}'.format(model.DOMAIN_NAMES[domain], obj_name)
     self.setToolTip(tip)
     self.setStatusTip(tip)
     icon = utils.get_qicon(self._DOMAIN_ICONS[domain])
     self.setIcon(icon)
     self.setIconSize(Qt.QSize(16, 16))
     self.setCheckable(True)
     self.setChecked(True)
     self.setSizePolicy(Qt.QSizePolicy(Qt.QSizePolicy.Minimum,
                                       Qt.QSizePolicy.Minimum))
     self.setFixedSize(16 + 6, 16 + 6)
示例#5
0
 def _load_icons(self):
     self._play_icon = utils.get_qicon('play')
     self._stop_icon = utils.get_qicon('stop')
     self._active_icon = utils.get_qicon('active')
     self._inactive_icon = utils.get_qicon('inactive')
示例#6
0
 def _setup_icons(self):
     self._init_icons()
     self._tux_icon = utils.get_qicon('tux')
     self._user_icon = utils.get_qicon('user')
     self._tux_user_icon = utils.get_qicon('tux-user')