コード例 #1
0
ファイル: legend_widget.py プロジェクト: CDAT/cdatgui
 def createColormap(self, obj):
     self.colormap_editor = QColormapEditor(mode="color")
     items = [
         self.colormap_editor.colormap.itemText(i)
         for i in range(self.colormap_editor.colormap.count())
     ]
     self.colormap_editor.colormap.setCurrentIndex(
         items.index(self.colormap_dropdown.currentText()))
     self.colormap_editor.choseColormap.connect(
         partial(self.updateColormap, recreate=False))
     self.colormap_editor.choseColorIndex.connect(
         partial(self.performActionAndClose, obj))
     self.colormap_editor.show()
     if self.start_timer.isActive():
         self.start_timer.stop()
     if self.end_timer.isActive():
         self.end_timer.stop()