Skip to content

Commit

Permalink
Replaced tabs with four spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
jkarns275 committed May 18, 2018
1 parent 449d9fb commit 9740000
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 34 deletions.
2 changes: 1 addition & 1 deletion install.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import parsy

print('All required packages are already installed!')
except Error as e:
except Exception as e:
print("Missing dependency:\n" + str(e))

finally:
Expand Down
30 changes: 15 additions & 15 deletions src/windows/graphing_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@

class GraphingWindow(Window):
def __init__(self, parent):
"""
Populates Graphing Window with names of data files in users data folder, then initializes
Graphing Window to display options to the GUI corresponging to currently selected graph type
(Radiance, Absorption, or Transmittance Spectrum Graph types).
"""
"""
Populates Graphing Window with names of data files in users data folder, then initializes
Graphing Window to display options to the GUI corresponging to currently selected graph type
(Radiance, Absorption, or Transmittance Spectrum Graph types).
"""
super(GraphingWindow, self).__init__(GraphingWindowGui(), parent)
try:
self.populate_data_names()
Expand Down Expand Up @@ -70,9 +70,9 @@ def graph(self):
self.add_child_window(GraphDisplayWindow(WorkRequest.ABSORPTION_COEFFICIENT, work, self))

def graph_as(self):
"""
Formats GUI for Absorption Spectrum graphing.
"""
"""
Formats GUI for Absorption Spectrum graphing.
"""
self.gui.graph_as_button.setDisabled(True)
data_name = self.gui.get_data_name()
hmd = HapiMetaData(data_name)
Expand Down Expand Up @@ -232,9 +232,9 @@ def graph_ts(self):
self.add_child_window(GraphDisplayWindow(WorkRequest.TRANSMITTANCE_SPECTRUM, work, self))

def populate_data_names(self):
"""
Retreive data file names from users data folder for display in the Graphing Window.
"""
"""
Retreive data file names from users data folder for display in the Graphing Window.
"""
try:
data_names = get_all_data_names()
for item in data_names:
Expand All @@ -244,9 +244,9 @@ def populate_data_names(self):
err_log("Failed to populate data names...")

def done_graphing(self):
"""
Re-enables buttons for use after graphing is finished.
"""
"""
Re-enables buttons for use after graphing is finished.
"""
self.gui.graph_button.setEnabled(True)
self.gui.graph_ts_button.setEnabled(True)
self.gui.graph_rs_button.setEnabled(True)
Expand Down
41 changes: 23 additions & 18 deletions src/windows/main_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,11 @@ def __init__(self):

def fetch_done(self, work_result: WorkResult):
"""
User feedback for GUI paramter fields of the fetch function in the Main Window.
User feedback for GUI paramter fields of the fetch function in the Main Window.
@param work_result X
@param work_result contains the work result (error or success)
"""
try:
debug(1)
self.gui.fetch_handler.worker.safe_exit()
result = work_result.result
self.enable_fetch_button()
Expand Down Expand Up @@ -58,37 +57,42 @@ def fetch_done(self, work_result: WorkResult):
debug(e)

def disable_fetch_button(self):
"""
Disable fetch button to disallow user to stack data requests.
"""
"""
Disable fetch button to disallow user to stack data requests.
"""
self.gui.fetch_button.setDisabled(True)

def enable_fetch_button(self):
"""
Re-enables fetch button to allow user to request data.
"""
"""
Re-enables fetch button to allow user to request data.
"""
self.gui.fetch_button.setEnabled(True)

def open_graph_window(self):
"""
DESCRIPTION
TODO: Implement this method?
"""
raise Exception("Unsupported: graph operation")

def close_window(self, to_close):
"""
Close all occurences of the window to_close in the windows list.
param to_close Window to be closed
@param to_close Window to be closed
"""
self.child_windows = filter(
lambda window: window != to_close, self.child_windows)
to_close.close()

def close(self):
"""
Closes window.
"""
"""
Closes window.
"""
for window in self.child_windows:
if window.is_open:
window.close()
Expand All @@ -97,20 +101,21 @@ def close(self):

def open(self):
"""
Opens the Main Window GUI.
Opens the Main Window GUI.
"""
self.gui.open()


def text_log(self, text):
"""
Sets status_bar_label to text mode to display console output when append_text signal received.
Sets status_bar_label to text mode to display console output when append_text signal received.
"""
self.gui.status_bar_label.setText(text)


def html_log(self, html):
"""
Sets status_bar_label to html mode to display html to console output.
Sets status_bar_label to html mode to display html to console output.
"""
self.gui.status_bar_label.setText(html)

0 comments on commit 9740000

Please sign in to comment.