Robot Framework Integrated Development Environment (RIDE)
progress.py
Go to the documentation of this file.
1 # Copyright 2008-2015 Nokia Networks
2 # Copyright 2016- Robot Framework Foundation
3 #
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
7 #
8 # http://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
15 
16 import time
17 
18 import wx
19 
20 from .. import context
21 
22 
24 
25  def __init__(self, frame, title, message):
26  self._progressbar_progressbar = wx.ProgressDialog(title, message,
27  maximum=100, parent=frame,
28  style=wx.PD_ELAPSED_TIME)
29 
30  def notify(self):
31  self._progressbar_progressbar.Pulse()
32 
33  def finish(self):
34  self._progressbar_progressbar.Destroy()
35  context.LOG.report_parsing_errors()
36 
37  def error(self, msg):
38  self.finishfinish()
39  context.LOG.error(msg)
40 
41 
43 
44  def __init__(self, frame):
45  ProgressObserver.__init__(self, frame, 'RIDE', 'Loading the test data')
46 
47 
49 
50  def __init__(self, frame):
51  ProgressObserver.__init__(self, frame, 'RIDE', 'Renaming')
52  self._notification_occured_notification_occured = 0
53 
54  def notify(self):
55  if time.time() - self._notification_occured_notification_occured > 0.1:
56  self._progressbar_progressbar.Pulse()
57  self._notification_occured_notification_occured = time.time()
def __init__(self, frame, title, message)
Definition: progress.py:25