ENLIGHTEN
Cross-platform desktop GUI for Wasatch Photonics spectrometers
Loading...
Searching...
No Matches
enlighten.ui.Clipboard.Clipboard Class Reference

This class encapsulates access to the host OS (Windows) copy-paste clipboard, allowing tabular data to be copied from ENLIGHTEN and pasted into other applications like Microsoft Excel. More...

Public Member Functions

 __init__ (self, ctl)
 
 copy_dataframe (self, df)
 
 copy_dict (self, d)
 
 copy_spectra (self, spectra)
 Copies the passed list-of-lists to the clipboard as column-ordered tab- delimited lines.
 
 copy_table_widget (self, table)
 Copies the contents of a QTableWidget to the clipboard as tab-delimited lines.
 
 raw_set_text (self, text)
 

Public Attributes

 ctl = ctl
 

Detailed Description

This class encapsulates access to the host OS (Windows) copy-paste clipboard, allowing tabular data to be copied from ENLIGHTEN and pasted into other applications like Microsoft Excel.

This is NOT related to the "Measurement Capture Bar" along the left-hand edge of ENLIGHTEN's GUI, although we seem to be converging toward calling that "the ENLIGHTEN Clipboard."

Constructor & Destructor Documentation

◆ __init__()

enlighten.ui.Clipboard.Clipboard.__init__ ( self,
ctl )

Member Function Documentation

◆ copy_dataframe()

enlighten.ui.Clipboard.Clipboard.copy_dataframe ( self,
df )

◆ copy_dict()

enlighten.ui.Clipboard.Clipboard.copy_dict ( self,
d )

◆ copy_spectra()

enlighten.ui.Clipboard.Clipboard.copy_spectra ( self,
spectra )

Copies the passed list-of-lists to the clipboard as column-ordered tab- delimited lines.

Parameters
spectraan array of arrays (e.g. [ [wavelengths], [spectrum], [trace_1], [trace_2] ] )

◆ copy_table_widget()

enlighten.ui.Clipboard.Clipboard.copy_table_widget ( self,
table )

Copies the contents of a QTableWidget to the clipboard as tab-delimited lines.

If a rectangular block (presumably one or more contiguous rows or columns) were selected in the GUI, then only the selected block is copied.

See also
https://stackoverflow.com/a/3698704

◆ raw_set_text()

enlighten.ui.Clipboard.Clipboard.raw_set_text ( self,
text )

Member Data Documentation

◆ ctl

enlighten.ui.Clipboard.Clipboard.ctl = ctl

The documentation for this class was generated from the following file: