Пример #1
0
    def __init__(self, parent, preferences, tiers={}):
        """
        Create a new dialog.

        @param tiers: a dictionary with key=filename, value=list of selected tiers

        """
        spBaseDialog.__init__(self, parent, preferences, title=" - Time Group Analysis")
        wx.GetApp().SetAppName( "tga" )

        # Members
        # Options to evaluate stats:
        self.withradius=0

        self._data = {} # to store stats
        for k,v in tiers.items():
            for tier in v:
                ts = TierTGA( tier, self.withradius)
                self._data[ts]=k
                # remark: TGA are not estimated yet.

        titlebox   = self.CreateTitle(TIMEANALYSIS, "Time Group Analysis of a set of tiers")
        contentbox = self._create_content()
        buttonbox  = self._create_buttons()

        self.LayoutComponents( titlebox,
                               contentbox,
                               buttonbox )
Пример #2
0
    def __init__(self, parent, preferences, tiers={}):
        """
        Constructor.

        @param parent is the parent wx object.
        @param preferences (Preferences)
        @param tiers: a dictionary with key=filename, value=list of selected tiers

        """
        spBaseDialog.__init__(self, parent, preferences, title=" - Descriptive statistics")
        wx.GetApp().SetAppName( "descriptivesstats" )

        # Options to evaluate stats:
        self.n=1
        self.withradius=0
        self.withalt=False

        self._data = {} # to store stats
        for k,v in tiers.items():
            # k = filename
            # v = list of tiers
            for tier in v:
                ts = TierStats( tier, self.n, self.withradius, self.withalt )
                self._data[ts]=k
                # remark: statistics are not estimated yet.
                # ts contains a pointer to the tier; ts.tier

        titlebox   = self.CreateTitle(SPREADSHEETS,"Descriptives statistics of a set of tiers")
        contentbox = self._create_content()
        buttonbox  = self._create_buttons()

        self.LayoutComponents( titlebox,
                               contentbox,
                               buttonbox )
Пример #3
0
    def __init__(self, parent, preferences):
        spBaseDialog.__init__(self, parent, preferences, title="About")
        wx.GetApp().SetAppName( "about" )

        titlebox   = self.CreateTitle(ABOUT_ICON,"About")
        contentbox = AboutSPPAS( self,preferences )
        buttonbox  = self.CreateButtonBox( [],[self.CreateOkayButton()] )

        self.LayoutComponents( titlebox,
                               contentbox,
                               buttonbox )
Пример #4
0
    def __init__(self, parent, preferences):
        """ Constructor. """
        spBaseDialog.__init__(self, parent, preferences, title=" - Duration Filter")
        wx.GetApp().SetAppName( "durationfilter" )

        titlebox   = self.CreateTitle(FILTER_ADD_DURATION,"Duration-based single filter")
        contentbox = self._create_content()
        buttonbox  = self._create_buttons()

        self.LayoutComponents( titlebox,
                               contentbox,
                               buttonbox )
Пример #5
0
    def __init__(self, parent, preferences, sndname):
        spBaseDialog.__init__(self, parent, preferences, title=" - Information")
        wx.GetApp().SetAppName( "audioinfodlg" )

        titlebox   = self.CreateTitle(INFO_ICON,"Audio description")
        contentbox = self._create_content(sndname)
        buttonbox  = self._create_buttons()

        self.LayoutComponents( titlebox,
                               contentbox,
                               buttonbox )

        self.SetMinSize((480,220))
Пример #6
0
    def __init__(self, parent, preferences):
        spBaseDialog.__init__(self, parent, preferences, title="Feedback")
        wx.GetApp().SetAppName( "feedback" )

        self.controller = FeedbackForm(self, webbrowser)

        titlebox   = self.CreateTitle(FEEDBACK_ICON,"Email Feedback")
        contentbox = self._create_content()
        buttonbox  = self._create_buttons()

        self.LayoutComponents( titlebox,
                               contentbox,
                               buttonbox )
Пример #7
0
    def __init__(self, parent, preferences):
        """
        Constructor.

        """
        spBaseDialog.__init__(self, parent, preferences, title=" - Label Filter")
        wx.GetApp().SetAppName( "labelfilter" )

        titlebox   = self.CreateTitle(FILTER_ADD_LABEL,"Label-based single filter")
        contentbox = self._create_content()
        buttonbox  = self._create_buttons()

        self.LayoutComponents( titlebox,
                               contentbox,
                               buttonbox )
Пример #8
0
    def __init__(self, parent, preferences):
        """
        Create a new dialog fo fix preferences, sorted in a notebook.

        @param parent is a wx window.
        @param preferences (Preferences)

        """
        spBaseDialog.__init__(self, parent, preferences, title=" - Settings")
        wx.GetApp().SetAppName( "settings" )

        titlebox   = self.CreateTitle(SETTINGS_ICON,"User settings")
        contentbox = self._create_content()
        buttonbox  = self._create_buttons()

        self.LayoutComponents( titlebox,
                               contentbox,
                               buttonbox )
Пример #9
0
    def __init__(self, parent, preferences, start, end):
        """

        """
        spBaseDialog.__init__(self, parent, preferences, title=" - Chooser")
        wx.GetApp().SetAppName( "perioddlg" )

        self.start = start
        self.end   = end

        titlebox   = self.CreateTitle(INFO_ICON,"Choose a period:")
        contentbox = self._create_content()
        buttonbox  = self._create_buttons()

        self.SetMinSize((300, 120))
        self.LayoutComponents( titlebox,
                               contentbox,
                               buttonbox )
Пример #10
0
    def __init__(self, parent, preferences, tierX=[], tierY=[]):
        """
        Create a new dialog.

        """
        spBaseDialog.__init__(self, parent, preferences, title=" - RelationFilter")
        wx.GetApp().SetAppName( "relationfilter" )

        # Members
        self.tierX = tierX
        self.tierY = tierY

        titlebox   = self.CreateTitle(FILTER_RELATION,"Filter a tier X, depending on time-relations with a tier Y")
        contentbox = self._create_content()
        buttonbox  = self._create_buttons()

        self.LayoutComponents( titlebox,
                               contentbox,
                               buttonbox )
Пример #11
0
    def __init__(self, parent, preferences):
        """
        Create a new dialog.

        """
        spBaseDialog.__init__(self, parent, preferences, title=" - SingleFilter")
        wx.GetApp().SetAppName( "singlefilter" )

        # Members
        self.match_all = False

        titlebox   = self.CreateTitle(FILTER_SINGLE,"Filter annotations of a tier")
        contentbox = self._create_content()
        buttonbox  = self._create_buttons()

        self.LayoutComponents( titlebox,
                               contentbox,
                               buttonbox )
        self.SetMinSize((540,460))
Пример #12
0
    def __init__(self, parent, preferences, filename):
        """
        Constructor.

        @param parent is a wx.Window or wx.Frame or wx.Dialog
        @param preferences (Preferences or Preferences_IO)
        @param filename

        """
        spBaseDialog.__init__(self, parent, preferences, title=" - AudioRoamer")
        wx.GetApp().SetAppName( "audio" )
        self._filename = filename

        titlebox   = self.CreateTitle(AUDIOROAMER_APP_ICON,"Audio Data Manager")
        contentbox = self._create_content()
        buttonbox  = self._create_buttons()

        self.LayoutComponents( titlebox,
                               contentbox,
                               buttonbox )
Пример #13
0
    def __init__(self, parent, preferences, tiers=[]):
        """
        Constructor.

        @param parent is a wx.Window or wx.Frame or wx.Dialog
        @param preferences (Preferences or Preferences_IO)
        @param tiers is a list of tiers to display

        """
        spBaseDialog.__init__(self, parent, preferences, title=" - Preview")
        wx.GetApp().SetAppName( "log" )

        self.tiers = tiers

        titlebox   = self.CreateTitle(TIER_PREVIEW,"Preview of tier(s)")
        contentbox = self._create_content()
        buttonbox  = self._create_buttons()

        self.LayoutComponents( titlebox,
                               contentbox,
                               buttonbox )
Пример #14
0
    def __init__(self, parent, preferences, filename):
        """
        Constructor.

        @param parent is the parent wx object.
        @param preferences (Preferences)
        @param filename (str) the file to display in this frame.

        """
        spBaseDialog.__init__(self, parent, preferences, title=" - Report")
        wx.GetApp().SetAppName( "log" )

        self.filename = filename

        titlebox   = self.CreateTitle(REPORT_ICON,"Procedure outcome report")
        contentbox = self._create_content()
        buttonbox  = self._create_buttons()

        self.LayoutComponents( titlebox,
                               contentbox,
                               buttonbox )
Пример #15
0
    def __init__(self, parent, preferences, step, stepidx):
        """
        Constructor.

        @param parent must be the sppas main frame

        """
        spBaseDialog.__init__(self, parent, preferences, title=" - Options")
        wx.GetApp().SetAppName( "option"+str(stepidx) )

        self.step        = step
        self.stepid      = stepidx
        self.preferences = preferences

        titlebox   = self._create_title()
        contentbox = self._create_content()
        buttonbox  = self._create_buttons()

        self.LayoutComponents( titlebox,
                               contentbox,
                               buttonbox )
Пример #16
0
    def __init__(self, parent, preferences, tiers={}):
        """
        Constructor.

        @param parent is a wx.Window or wx.Frame or wx.Dialog
        @param preferences (Preferences or Preferences_IO)
        @param tiers: a dictionary with key=filename, value=list of selected tiers

        """
        spBaseDialog.__init__(self, parent, preferences, title=" - User Agreement")
        wx.GetApp().SetAppName( "useragreement" )

        self.tiers = tiers

        titlebox   = self.CreateTitle(USERCHECK, "User agreement of 2 tiers")
        contentbox = self._create_content()
        buttonbox  = self._create_buttons()

        self.LayoutComponents( titlebox,
                               contentbox,
                               buttonbox )
Пример #17
0
    def __init__(self, parent, preferences, trs):
        """
        Constructor.

        @param parent is the parent wx object.
        @param preferences (Preferences)
        @param trs (Transcription)

        """
        spBaseDialog.__init__(self, parent, preferences, title=" - Search")
        wx.GetApp().SetAppName( "search" )

        # Members
        self._trs  = trs
        self._pmin = 0.
        self._pmax = 0.

        titlebox   = self.CreateTitle(TIER_SEARCH,"Search patterns in a tier")
        contentbox = self._create_content()
        buttonbox  = self._create_buttons()

        self.LayoutComponents( titlebox,
                               contentbox,
                               buttonbox )