Skip to content

Commit 3334ee4

Browse files
committed
ENH: remove API key and related UI/code
1 parent 9c6f463 commit 3334ee4

File tree

2 files changed

+1
-317
lines changed

2 files changed

+1
-317
lines changed

IDCBrowser/IDCBrowser.py

Lines changed: 1 addition & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
import logging
2525

26-
from IDCBrowserLib import APISettingsPopup, clinicalDataPopup, IDCClient
26+
from IDCBrowserLib import clinicalDataPopup, IDCClient
2727
#from IDCBrowserLib import IDCClient
2828

2929

@@ -84,10 +84,6 @@ def setup(self):
8484

8585
self.downloadProgressBarWidgets = []
8686

87-
# self.progress.setWindowTitle("IDC Browser")
88-
# setup API key
89-
self.slicerApiKey = 'f88ff53d-882b-4c0d-b60c-0fb560e82cf1'
90-
self.currentAPIKey = self.slicerApiKey
9187
item = qt.QStandardItem()
9288

9389
# Load settings from the system
@@ -453,49 +449,14 @@ def setup(self):
453449
settingsGridLayout.addWidget(storagePathLabel, 0, 0, 1, 1)
454450
settingsGridLayout.addWidget(self.storagePathButton, 0, 1, 1, 2)
455451
settingsGridLayout.addWidget(self.storageResetButton, 0, 3, 1, 1)
456-
self.apiSettingsPopup = APISettingsPopup.APISettingsPopup()
457452
self.clinicalPopup = clinicalDataPopup.clinicalDataPopup(self.cachePath, self.reportIcon)
458453

459-
#
460-
# Connection Area
461-
#
462-
# Add remove button
463-
customAPILabel = qt.QLabel("Custom API Key: ")
464-
465-
addRemoveApisButton = qt.QPushButton("+")
466-
addRemoveApisButton.toolTip = "Add or Remove APIs"
467-
addRemoveApisButton.enabled = True
468-
addRemoveApisButton.setMaximumWidth(20)
469-
470-
# API selection combo box
471-
self.apiSelectionComboBox = qt.QComboBox()
472-
self.apiSelectionComboBox.addItem('Slicer API')
473-
settings = qt.QSettings()
474-
settings.beginGroup("IDCBrowser/API-Keys")
475-
self.userApiNames = settings.childKeys()
476-
477-
for api in self.userApiNames:
478-
self.apiSelectionComboBox.addItem(api)
479-
settings.endGroup()
480-
481-
self.connectButton = qt.QPushButton("Connect")
482-
self.connectButton.toolTip = "Connect to IDC Server."
483-
self.connectButton.enabled = True
484-
485-
settingsGridLayout.addWidget(customAPILabel, 1, 0, 1, 1)
486-
settingsGridLayout.addWidget(addRemoveApisButton, 1, 1, 1, 1)
487-
settingsGridLayout.addWidget(self.apiSelectionComboBox, 1, 2, 1, 2)
488-
settingsGridLayout.addWidget(self.connectButton, 1, 4, 2, 1)
489-
490454
# connections
491455
self.showBrowserButton.connect('clicked(bool)', self.onShowBrowserButton)
492-
addRemoveApisButton.connect('clicked(bool)', self.apiSettingsPopup.open)
493-
self.apiSelectionComboBox.connect('currentIndexChanged(QString)', self.apiKeySelected)
494456
self.collectionSelector.connect('currentIndexChanged(QString)', self.collectionSelected)
495457
self.patientsTableWidget.connect('itemSelectionChanged()', self.patientsTableSelectionChanged)
496458
self.studiesTableWidget.connect('itemSelectionChanged()', self.studiesTableSelectionChanged)
497459
self.seriesTableWidget.connect('itemSelectionChanged()', self.seriesSelected)
498-
self.connectButton.connect('clicked(bool)', self.getCollectionValues)
499460
self.useCacheCeckBox.connect('stateChanged(int)', self.onUseCacheStateChanged)
500461
self.indexButton.connect('clicked(bool)', self.onIndexButton)
501462
self.loadButton.connect('clicked(bool)', self.onLoadButton)
@@ -521,16 +482,6 @@ def setup(self):
521482
def cleanup(self):
522483
pass
523484

524-
def apiKeySelected(self):
525-
settings = qt.QSettings()
526-
settings.beginGroup("IDCBrowser/API-Keys")
527-
528-
# self.connectButton.enabled = True
529-
if self.apiSelectionComboBox.currentText == 'Slicer API':
530-
self.currentAPIKey = self.slicerApiKey
531-
else:
532-
self.currentAPIKey = settings.value(self.apiSelectionComboBox.currentText)
533-
534485
def onShowBrowserButton(self):
535486
self.showBrowser()
536487

IDCBrowser/IDCBrowserLib/APISettingsPopup.py

Lines changed: 0 additions & 267 deletions
This file was deleted.

0 commit comments

Comments
 (0)