~ubuntu-branches/ubuntu/utopic/python-traitsui/utopic

« back to all changes in this revision

Viewing changes to traitsui/editors/progress_editor.py

  • Committer: Bazaar Package Importer
  • Author(s): Varun Hiremath
  • Date: 2011-07-09 13:57:39 UTC
  • Revision ID: james.westby@ubuntu.com-20110709135739-x5u20q86huissmn1
Tags: upstream-4.0.0
ImportĀ upstreamĀ versionĀ 4.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#------------------------------------------------------------------------------
 
2
#
 
3
#  Copyright (c) 2008, Enthought, Inc.
 
4
#  All rights reserved.
 
5
#
 
6
#  This software is provided without warranty under the terms of the BSD
 
7
#  license included in enthought/LICENSE.txt and may be redistributed only
 
8
#  under the conditions described in the aforementioned license.  The license
 
9
#  is also available online at http://www.enthought.com/licenses/BSD.txt
 
10
#
 
11
#  Thanks for using Enthought open source!
 
12
#
 
13
#------------------------------------------------------------------------------
 
14
 
 
15
""" Defines the progress editor factory for all traits toolkit backends,
 
16
"""
 
17
 
 
18
#-------------------------------------------------------------------------------
 
19
#  Imports:
 
20
#-------------------------------------------------------------------------------
 
21
 
 
22
from __future__ import absolute_import
 
23
 
 
24
from traits.api import Int, Bool, Str
 
25
 
 
26
from ..editor_factory import EditorFactory
 
27
 
 
28
class ToolkitEditorFactory ( EditorFactory ):
 
29
    """ Editor factory for code editors.
 
30
    """
 
31
 
 
32
    #---------------------------------------------------------------------------
 
33
    #  Trait definitions:
 
34
    #---------------------------------------------------------------------------
 
35
 
 
36
    # The title
 
37
    title = Str
 
38
 
 
39
    # The message to be displayed along side the progress guage
 
40
    message = Str
 
41
 
 
42
    # The starting value
 
43
    min = Int
 
44
 
 
45
    # The ending value
 
46
    max = Int
 
47
 
 
48
    # If the cancel button should be shown
 
49
    can_cancel = Bool(False)
 
50
 
 
51
    # If the estimated time should be shown
 
52
    show_time = Bool(False)
 
53
 
 
54
    # if the percent complete should be shown
 
55
    show_percent = Bool(False)
 
56
 
 
57
 
 
58
# Define the Code Editor class.
 
59
ProgressEditor = ToolkitEditorFactory
 
60
 
 
61
### EOF #######################################################################