How to use the aeidon.Enumeration function in aeidon

To help you get started, we’ve selected a few aeidon examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github otsaloma / gaupol / gaupol / enums / targets.py View on Github external
class SelectedToEnd(aeidon.EnumerationItem):

    pass


class Current(aeidon.EnumerationItem):

    pass


class All(aeidon.EnumerationItem):

    pass


targets = aeidon.Enumeration()
targets.SELECTED = Selected()
targets.SELECTED_TO_END = SelectedToEnd()
targets.CURRENT = Current()
targets.ALL = All()
github otsaloma / gaupol / gaupol / enums / toolbar_styles.py View on Github external
class BothHoriz(aeidon.EnumerationItem):

    value = Gtk.ToolbarStyle.BOTH_HORIZ


class Icons(aeidon.EnumerationItem):

    value = Gtk.ToolbarStyle.ICONS


class Text(aeidon.EnumerationItem):

    value = Gtk.ToolbarStyle.TEXT


toolbar_styles = aeidon.Enumeration()
toolbar_styles.ICONS = Icons()
toolbar_styles.TEXT = Text()
toolbar_styles.BOTH = Both()
toolbar_styles.BOTH_HORIZ = BothHoriz()
github otsaloma / gaupol / gaupol / enums / orientation.py View on Github external
from gi.repository import Gtk

__all__ = ("orientation",)


class Horizontal(aeidon.EnumerationItem):

    value = Gtk.Orientation.HORIZONTAL


class Vertical(aeidon.EnumerationItem):

    value = Gtk.Orientation.VERTICAL


orientation = aeidon.Enumeration()
orientation.HORIZONTAL = Horizontal()
orientation.VERTICAL = Vertical()
github otsaloma / gaupol / aeidon / enums / players.py View on Github external
command = " ".join((_get_vlc_executable(),
                        "$VIDEOFILE",
                        ":start-time=$SECONDS",
                        ":sub-file=$SUBFILE",))

    command_utf_8 = " ".join((_get_vlc_executable(),
                              "$VIDEOFILE",
                              ":start-time=$SECONDS",
                              ":sub-file=$SUBFILE",
                              ":subsdec-encoding=UTF-8",))

    label = "VLC"


players = aeidon.Enumeration()
players.MPLAYER = MPlayer()
players.VLC = VLC()
github otsaloma / gaupol / aeidon / enums / align_methods.py View on Github external
from aeidon.i18n import _

__all__ = ("align_methods",)


class Number(aeidon.EnumerationItem):

    label = _("Subtitle number")


class Position(aeidon.EnumerationItem):

    label = _("Subtitle position")


align_methods = aeidon.Enumeration()
align_methods.NUMBER = Number()
align_methods.POSITION = Position()
github otsaloma / gaupol / gaupol / enums.py View on Github external
class LengthUnitEm(aeidon.EnumerationItem):
    label = _("ems")

length_units = aeidon.Enumeration()
length_units.CHAR = LengthUnitChar()
length_units.EM = LengthUnitEm()


class OrientationHorizontal(aeidon.EnumerationItem):
    value = Gtk.Orientation.HORIZONTAL

class OrientationVertical(aeidon.EnumerationItem):
    value = Gtk.Orientation.VERTICAL

orientation = aeidon.Enumeration()
orientation.HORIZONTAL = OrientationHorizontal()
orientation.VERTICAL = OrientationVertical()


class TargetSelected(aeidon.EnumerationItem): pass
class TargetSelectedToEnd(aeidon.EnumerationItem): pass
class TargetCurrent(aeidon.EnumerationItem): pass
class TargetAll(aeidon.EnumerationItem): pass

targets = aeidon.Enumeration()
targets.SELECTED = TargetSelected()
targets.SELECTED_TO_END = TargetSelectedToEnd()
targets.CURRENT = TargetCurrent()
targets.ALL = TargetAll()
github otsaloma / gaupol / gaupol / view.py View on Github external
def _reset_columns(self):
        """Recreate the columns enumeration and set all items to ``None``."""
        self.columns = aeidon.Enumeration()
        self.columns.NUMBER = None
        self.columns.START = None
        self.columns.END = None
        self.columns.DURATION = None
        self.columns.MAIN_TEXT = None
        self.columns.TRAN_TEXT = None
github otsaloma / gaupol / aeidon / enums / modes.py View on Github external
class Time(aeidon.EnumerationItem):

    pass


class Frame(aeidon.EnumerationItem):

    pass


class Seconds(aeidon.EnumerationItem):

    pass


modes = aeidon.Enumeration()
modes.TIME = Time()
modes.FRAME = Frame()
modes.SECONDS = Seconds()
github otsaloma / gaupol / gaupol / enums.py View on Github external
label = _("Dur.")
    tooltip = _("Duration")

class FieldMainText(aeidon.EnumerationItem):
    is_position = False
    is_text = True
    label = _("Text")
    tooltip = _("Text")

class FieldTranslationText(aeidon.EnumerationItem):
    is_position = False
    is_text = True
    label = _("Translation")
    tooltip = _("Translation")

fields = aeidon.Enumeration()
fields.NUMBER = FieldNumber()
fields.START = FieldStart()
fields.END = FieldEnd()
fields.DURATION = FieldDuration()
fields.MAIN_TEXT = FieldMainText()
fields.TRAN_TEXT = FieldTranslationText()


class LengthUnitChar(aeidon.EnumerationItem):
    label = _("characters")

class LengthUnitEm(aeidon.EnumerationItem):
    label = _("ems")

length_units = aeidon.Enumeration()
length_units.CHAR = LengthUnitChar()
github otsaloma / gaupol / gaupol / conf / config.py View on Github external
def __get_enumerations(self):
        """Return a dictionary mapping enumeration names to values."""

        enumerations = {} # name: value
        for name in dir(aeidon):
            value = getattr(aeidon, name)
            if isinstance(value, aeidon.Enumeration):
                enumerations[name] = value
        for name in dir(gaupol):
            value = getattr(gaupol, name)
            if isinstance(value, aeidon.Enumeration):
                enumerations[name] = value
        return enumerations