コード例 #1
0
 def _output_edited(self):
     """Return ``True`` if output of either point has been edited."""
     in_1 = aeidon.as_time(self._input_entry_1.get_text())
     in_2 = aeidon.as_time(self._input_entry_2.get_text())
     out_1 = aeidon.as_time(self._output_entry_1.get_text())
     out_2 = aeidon.as_time(self._output_entry_2.get_text())
     return (out_1 != in_1 or out_2 != in_2)
コード例 #2
0
 def _output_edited(self):
     """Return ``True`` if output of either point has been edited."""
     in_1 = aeidon.as_time(self._input_entry_1.get_text())
     in_2 = aeidon.as_time(self._input_entry_2.get_text())
     out_1 = aeidon.as_time(self._output_entry_1.get_text())
     out_2 = aeidon.as_time(self._output_entry_2.get_text())
     return (out_1 != in_1 or out_2 != in_2)
コード例 #3
0
ファイル: test_calculator.py プロジェクト: fpietka/gaupol
    def test_get_middle__time(self):
        for x, y, z in (( "00:00:01.000",  "00:00:02.000",  "00:00:01.500"),
                        ( "00:00:01.000",  "00:00:02.001",  "00:00:01.500"),
                        ("-00:00:01.000", "-00:00:02.000", "-00:00:01.500"),
                        ( "00:00:01.000", "-00:00:02.002", "-00:00:00.501")):

            x = aeidon.as_time(x)
            y = aeidon.as_time(y)
            assert self.calc.get_middle(x, y) == z
コード例 #4
0
 def _get_first_point(self):
     """Return row, output time of the first sync point."""
     return (self._subtitle_spin_1.get_value_as_int() - 1,
             aeidon.as_time(self._output_entry_1.get_text()))
コード例 #5
0
ファイル: test_calculator.py プロジェクト: fpietka/gaupol
 def test_to_time(self):
     self.calc = aeidon.Calculator(aeidon.framerates.FPS_25_000)
     time = "00:00:01.000"
     assert self.calc.to_time(aeidon.as_time(time)) == time
     assert self.calc.to_time(aeidon.as_frame(25)) == time
     assert self.calc.to_time(aeidon.as_seconds(1.0)) == time
コード例 #6
0
ファイル: test_calculator.py プロジェクト: fpietka/gaupol
 def test_to_seconds(self):
     self.calc = aeidon.Calculator(aeidon.framerates.FPS_25_000)
     assert self.calc.to_seconds(aeidon.as_time("00:00:01.000")) == 1.0
     assert self.calc.to_seconds(aeidon.as_frame(25)) == 1.0
     assert self.calc.to_seconds(aeidon.as_seconds(1.0)) == 1.0
コード例 #7
0
ファイル: test_calculator.py プロジェクト: fpietka/gaupol
 def test_is_later__time(self):
     a = aeidon.as_time("00:00:01.000")
     b = aeidon.as_time("00:00:02.000")
     assert self.calc.is_later(b, a)
     assert not self.calc.is_later(b, b)
     assert not self.calc.is_later(a, b)
コード例 #8
0
ファイル: subtitle.py プロジェクト: edasmax/gaupol
 def duration_time(self, value):
     """Set duration from `value`."""
     self.duration = aeidon.as_time(value)
コード例 #9
0
 def _get_first_point(self):
     """Return row, output time of the first sync point."""
     return (self._subtitle_spin_1.get_value_as_int() - 1,
             aeidon.as_time(self._output_entry_1.get_text()))
コード例 #10
0
 def start_time(self, value):
     """Set start position from `value`."""
     self.start = aeidon.as_time(value)
コード例 #11
0
 def end_time(self, value):
     """Set end position from `value`."""
     self.end = aeidon.as_time(value)
コード例 #12
0
 def duration_time(self, value):
     """Set duration from `value`."""
     self.duration = aeidon.as_time(value)
コード例 #13
0
ファイル: subtitle.py プロジェクト: edasmax/gaupol
 def start_time(self, value):
     """Set start position from `value`."""
     self.start = aeidon.as_time(value)
コード例 #14
0
ファイル: subtitle.py プロジェクト: edasmax/gaupol
 def end_time(self, value):
     """Set end position from `value`."""
     self.end = aeidon.as_time(value)
コード例 #15
0
 def _get_second_point(self):
     """Return row, output time of the second sync point."""
     return (self._subtitle_spin_2.get_value_as_int() - 1,
             aeidon.as_time(self._output_entry_2.get_text()))
コード例 #16
0
 def _get_second_point(self):
     """Return row, output time of the second sync point."""
     return (self._subtitle_spin_2.get_value_as_int() - 1,
             aeidon.as_time(self._output_entry_2.get_text()))
コード例 #17
0
ファイル: test_position.py プロジェクト: wrightrocket/gaupol
 def test_is_time(self):
     assert aeidon.is_time(aeidon.as_time("12:34:56.789"))
     assert not aeidon.is_time(aeidon.as_frame(13))
     assert not aeidon.is_time(aeidon.as_seconds(13))