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__ (self, parent, project_name=None, xml_path=None, project_defs=[])
 
def make_widgets (self)
 
def set_project (self, project_name, xml_path, project_defs)
 
def make_xml_window (self)
 
def update_status (self)
 
def update_jobs (self)
 
def highlight_stage (self, stagename)
 

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

Member Function Documentation

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

Definition at line 122 of file projectview.py.

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

Definition at line 50 of file projectview.py.

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

Definition at line 88 of file projectview.py.

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

Definition at line 80 of file projectview.py.

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

Definition at line 117 of file projectview.py.

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

Definition at line 112 of file projectview.py.

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

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: