2323
2424import 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
0 commit comments