Skip to content

Commit

Permalink
Refs #8549. Removed Cycle combobox and functionality
Browse files Browse the repository at this point in the history
The Qcombobox fro cycle selection has been removed form the ui

Any functionality depending on that widget has been removed
  • Loading branch information
keithnbrown committed Dec 5, 2013
1 parent f9d6e70 commit a935b82
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 30 deletions.
24 changes: 1 addition & 23 deletions Code/Mantid/scripts/Interface/ui/reflectometer/refl_gui.py
Expand Up @@ -27,8 +27,6 @@ class ReflGui(refl_window.Ui_windowRefl):

def on_buttonAuto_clicked(self):
self.autoFill()
def on_comboCycle_activated(self, cycle):
self.populateList(selected_cycle=cycle)
def on_buttonTransfer_clicked(self):
self.transfer()
def on_checkTickAll_stateChanged(self,state):
Expand Down Expand Up @@ -91,7 +89,6 @@ def initTable(self):
def connectSlots(self):
QtCore.QObject.connect(self.buttonAuto, QtCore.SIGNAL(_fromUtf8("clicked()")), self.on_buttonAuto_clicked)
QtCore.QObject.connect(self.checkTickAll, QtCore.SIGNAL(_fromUtf8("stateChanged(int)")), self.on_checkTickAll_stateChanged)
QtCore.QObject.connect(self.comboCycle, QtCore.SIGNAL(_fromUtf8("activated(QString)")), self.on_comboCycle_activated)
QtCore.QObject.connect(self.comboInstrument, QtCore.SIGNAL(_fromUtf8("activated(QString)")), self.on_comboInstrument_activated)
QtCore.QObject.connect(self.textRB, QtCore.SIGNAL(_fromUtf8("editingFinished()")), self.on_textRB_editingFinished)
QtCore.QObject.connect(self.buttonClear, QtCore.SIGNAL(_fromUtf8("clicked()")), self.on_buttonClear_clicked)
Expand All @@ -102,7 +99,7 @@ def connectSlots(self):
QtCore.QObject.connect(self.actionRe_Load_Table, QtCore.SIGNAL(_fromUtf8("triggered()")), self.on_actionRe_Load_Table_triggered)
QtCore.QObject.connect(self.actionSave_Workspaces, QtCore.SIGNAL(_fromUtf8("triggered()")), self.on_actionSave_Workspaces_triggered)
QtCore.QObject.connect(self.actionMantid_Help, QtCore.SIGNAL(_fromUtf8("triggered()")), self.on_actionMantid_Help_triggered)
def populateList(self, selected_cycle=None):
def populateList(self):
# Clear existing
self.listMain.clear()
# Fill with ADS workspaces
Expand All @@ -113,30 +110,11 @@ def populateList(self, selected_cycle=None):
self.__instrumentRuns = LatestISISRuns(instrument=selectedInstrument)
elif not self.__instrumentRuns.getInstrument() == selectedInstrument:
self.__instrumentRuns = LatestISISRuns(selectedInstrument)
self.populateListCycle(selected_cycle)
except Exception as ex:
self.comboCycle.setVisible(False)
logger.notice("Could not list archive runs")
logger.notice(str(ex))

#Functionality which will hopefully be moved into a new file
def populateListCycle(self, selected_cycle=None):
runs = self.__instrumentRuns.getJournalRuns(cycle=selected_cycle)
for run in runs:
self.listMain.addItem(run)
# Get possible cycles for this instrument.
cycles = self.__instrumentRuns.getCycles()
# Setup the list of possible cycles. And choose the latest as the default
if not selected_cycle:
cycle_count = 0
self.comboCycle.clear()
for cycle in cycles:
self.comboCycle.addItem(cycle)
if cycle == self.__instrumentRuns.getLatestCycle():
self.comboCycle.setCurrentIndex(cycle_count)
cycle_count+=1
# Ensure that the cycle widget is shown.
self.comboCycle.setVisible(True)
def populateListADSWorkspaces(self):
names = mtd.getObjectNames()
for ws in names:
Expand Down
Expand Up @@ -2,7 +2,7 @@

# Form implementation generated from reading ui file 'D:\mantid\windows\Code\Mantid\scripts\Interface\ui\reflectometer/refl_window.ui'
#
# Created: Tue Nov 26 12:08:03 2013
# Created: Thu Dec 05 12:59:11 2013
# by: PyQt4 UI code generator 4.8.3
#
# WARNING! All changes made in this file will be lost!
Expand Down Expand Up @@ -42,9 +42,6 @@ def setupUi(self, windowRefl):
self.comboInstrument.addItem(_fromUtf8(""))
self.comboInstrument.addItem(_fromUtf8(""))
self.layoutTopRow.addWidget(self.comboInstrument)
self.comboCycle = QtGui.QComboBox(self.layoutMainRow)
self.comboCycle.setObjectName(_fromUtf8("comboCycle"))
self.layoutTopRow.addWidget(self.comboCycle)
self.labelRB = QtGui.QLabel(self.layoutMainRow)
self.labelRB.setObjectName(_fromUtf8("labelRB"))
self.layoutTopRow.addWidget(self.labelRB)
Expand Down
3 changes: 0 additions & 3 deletions Code/Mantid/scripts/Interface/ui/reflectometer/refl_window.ui
Expand Up @@ -59,9 +59,6 @@
</item>
</widget>
</item>
<item>
<widget class="QComboBox" name="comboCycle"/>
</item>
<item>
<widget class="QLabel" name="labelRB">
<property name="text">
Expand Down

0 comments on commit a935b82

Please sign in to comment.