示例#1
0
    def get_effect_configuration_ui(self, effect):
        """Gets a configuration UI element for the effect.

        Args:
            effect (Gst.Element): The effect for which we want the UI.

        Returns:
            GstElementSettingsWidget: A container for configuring the effect.
        """
        effect_widget = GstElementSettingsWidget(effect, PROPS_TO_IGNORE)
        widget = self.emit("create_widget", effect_widget, effect)
        # The default handler of `create_widget` handles visibility
        # itself and returns None
        if widget is not None:
            effect_widget.show_widget(widget)
        self._connect_all_widget_callbacks(effect_widget, effect)

        return effect_widget
示例#2
0
文件: effects.py 项目: pitivi/pitivi
    def getEffectConfigurationUI(self, effect):
        """Gets a configuration UI element for the effect.

        Args:
            effect (Gst.Element): The effect for which we want the UI.

        Returns:
            GstElementSettingsWidget: A container for configuring the effect.
        """
        if effect not in self.cache_dict:
            effect_widget = GstElementSettingsWidget(effect, PROPS_TO_IGNORE)
            widget = self.emit("create_widget", effect_widget, effect)
            # The default handler of `create_widget` handles visibility
            # itself and returns None
            if widget is not None:
                effect_widget.show_widget(widget)
            self.cache_dict[effect] = effect_widget
            self._connectAllWidgetCallbacks(effect_widget, effect)

        return self.cache_dict[effect]