Changeset aadf0af1 in sasview for src/sas/qtgui/PlotterBase.py
- Timestamp:
- Jan 4, 2017 4:35:08 AM (7 years ago)
- Branches:
- ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc
- Children:
- 570a58f9
- Parents:
- 257bd57
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/PlotterBase.py
rd3ca363 raadf0af1 94 94 self.canvas.mpl_connect('scroll_event', self.onMplWheel) 95 95 96 self.contextMenu = QtGui.QMenu(self) 97 96 98 if not quickplot: 97 # set the layout99 # Add the toolbar 98 100 layout.addWidget(self.toolbar) 99 # Add the context menu100 self.contextMenu()101 101 # Notify PlotHelper about the new plot 102 102 self.upatePlotHelper() 103 else:104 self.contextMenuQuickPlot()105 103 106 104 self.setLayout(layout) … … 177 175 """ 178 176 # Actions 179 self.contextMenu = QtGui.QMenu(self)177 self.contextMenu.clear() 180 178 self.actionSaveImage = self.contextMenu.addAction("Save Image") 181 179 self.actionPrintImage = self.contextMenu.addAction("Print Image") … … 188 186 self.actionCopyToClipboard.triggered.connect(self.onClipboardCopy) 189 187 190 def c ontextMenu(self):188 def createContextMenu(self): 191 189 """ 192 190 Define common context menu and associated actions for the MPL widget … … 194 192 raise NotImplementedError("Context menu method must be implemented in derived class.") 195 193 196 def c ontextMenuQuickPlot(self):194 def createContextMenuQuick(self): 197 195 """ 198 196 Define context menu and associated actions for the quickplot MPL widget … … 204 202 Display the context menu 205 203 """ 204 if not self.quickplot: 205 self.createContextMenu() 206 else: 207 self.createContextMenuQuick() 208 206 209 event_pos = event.pos() 207 210 self.contextMenu.exec_(self.canvas.mapToGlobal(event_pos))
Note: See TracChangeset
for help on using the changeset viewer.