All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Public Attributes | List of all members
python.projectview.ProjectView Class Reference
Inheritance diagram for python.projectview.ProjectView:

Public Member Functions

def __init__
 
def make_widgets
 
def set_project
 
def make_xml_window
 
def update_status
 
def update_jobs
 
def highlight_stage
 

Public Attributes

 parent
 
 infoframe
 
 pathlabel
 
 path
 
 projectlabel
 
 projectname
 
 ps
 

Detailed Description

Definition at line 30 of file projectview.py.

Constructor & Destructor Documentation

def python.projectview.ProjectView.__init__ (   self,
  parent,
  project_name = None,
  xml_path = None,
  project_defs = [] 
)

Definition at line 34 of file projectview.py.

34 
35  def __init__(self, parent, project_name=None, xml_path=None, project_defs=[]):
36 
37  self.parent = parent
38 
39  # Register our outermost frame in the parent window.
40 
41  tk.Frame.__init__(self, self.parent)
42  self.pack(expand=1, fill=tk.BOTH)
43 
44  # Make widgets that belong to this widget.
45 
46  self.make_widgets()
47  self.set_project(project_name, xml_path, project_defs)

Member Function Documentation

def python.projectview.ProjectView.highlight_stage (   self,
  stagename 
)

Definition at line 122 of file projectview.py.

123  def highlight_stage(self, stagename):
124  self.ps.highlight_stage(stagename)
def python.projectview.ProjectView.make_widgets (   self)

Definition at line 50 of file projectview.py.

50 
51  def make_widgets(self):
52 
53  # Add a frame for information labels.
54 
55  self.infoframe = tk.Frame(self, relief=tk.FLAT, bg='aliceblue')
56  self.infoframe.pack(side=tk.TOP, fill=tk.X)
57  self.infoframe.columnconfigure(1, weight=1)
58 
59  # Add a label in info frame which will display the current project xml file path.
60 
61  self.pathlabel = tk.Label(self.infoframe, relief=tk.FLAT, bg='aliceblue', text='XML Path:')
62  self.pathlabel.grid(row=0, column=0)
63  self.path = tk.Label(self.infoframe, relief=tk.SUNKEN, bg='white')
64  self.path.grid(row=0, column=1, sticky=tk.E+tk.W)
65 
66  # Add a label in info frame which will display the current project name.
67 
68  self.projectlabel = tk.Label(self.infoframe, relief=tk.FLAT, bg='aliceblue',
69  text='Project:')
70  self.projectlabel.grid(row=1, column=0)
71  self.projectname = tk.Label(self.infoframe, relief=tk.SUNKEN, bg='white')
72  self.projectname.grid(row=1, column=1, sticky=tk.E+tk.W)
73 
74  # Add a project status view.
75 
76  self.ps = ProjectStatusView(self)
77  self.ps.pack(side=tk.BOTTOM, expand=1, fill=tk.BOTH)
def python.projectview.ProjectView.make_xml_window (   self)

Definition at line 88 of file projectview.py.

88 
89  def make_xml_window(self):
90 
91  xml_path = self.path['text']
92  if xml_path == None or xml_path == '':
93  tkinter_messagebox.showerror('', 'No xml file specified.')
94  return
95 
96  # Get text of xml file.
97 
98  f = open(xml_path)
99  if not f:
100  tkinter_messagebox.showerror('', 'Error opening xml file %s.' % xml_path)
101  return
102  xmltext = f.read()
103 
104  # Make a new top level window to hold xml text.
105  # After we are done making this window, we don't keep track
106  # of it any more. It is owned by window manager.
107 
108  w = TextWindow()
109  w.append(xmltext)
open(RACETRACK) or die("Could not open file $RACETRACK for writing")
def python.projectview.ProjectView.set_project (   self,
  project_name,
  xml_path,
  project_defs 
)

Definition at line 80 of file projectview.py.

80 
81  def set_project(self, project_name, xml_path, project_defs):
82  self.path['text'] = xml_path
83  self.projectname['text'] = project_name
84  if len(project_defs) > 0:
85  self.ps.set_project(project_defs)
def python.projectview.ProjectView.update_jobs (   self)

Definition at line 117 of file projectview.py.

118  def update_jobs(self):
119  self.ps.update_jobs()
def python.projectview.ProjectView.update_status (   self)

Definition at line 112 of file projectview.py.

113  def update_status(self):
114  self.ps.update_status()

Member Data Documentation

python.projectview.ProjectView.infoframe

Definition at line 54 of file projectview.py.

python.projectview.ProjectView.parent

Definition at line 36 of file projectview.py.

python.projectview.ProjectView.path

Definition at line 62 of file projectview.py.

python.projectview.ProjectView.pathlabel

Definition at line 60 of file projectview.py.

python.projectview.ProjectView.projectlabel

Definition at line 67 of file projectview.py.

python.projectview.ProjectView.projectname

Definition at line 70 of file projectview.py.

python.projectview.ProjectView.ps

Definition at line 75 of file projectview.py.


The documentation for this class was generated from the following file: