UltraScan III
List of all members | Classes | Signals | Public Member Functions | Private Slots | Private Member Functions | Private Attributes
US_BufferGui Class Reference

An application to manage buffer data. More...

#include "us_buffer_gui.h"

Inheritance diagram for US_BufferGui:
Inheritance graph
[legend]
Collaboration diagram for US_BufferGui:
Collaboration graph
[legend]

Classes

class  BufferInfo
 

Signals

void valueChanged (double density, double viscosity)
 
void valueChanged (US_Buffer buffer)
 
void valueBufferID (const QString bufferID)
 
void use_db (bool DB)
 

Public Member Functions

 US_BufferGui (bool=false, const US_Buffer &=US_Buffer(), int=US_Disk_DB_Controls::Default)
 
- Public Member Functions inherited from US_WidgetsDialog
 US_WidgetsDialog (QWidget *, Qt::WindowFlags)
 
QLabel * us_label (const QString &, int=0, int=QFont::Bold)
 
QLabel * us_textlabel (const QString &, int=-1, int=QFont::Bold)
 
QLabel * us_banner (const QString &, int=0, int=QFont::Bold)
 
QPushButton * us_pushbutton (const QString &, bool=true, int=0)
 
QTextEdit * us_textedit (void)
 
QLineEdit * us_lineedit (const QString &=0, int=0, bool=false)
 
void us_setReadOnly (QLineEdit *, bool=true)
 
void us_setReadOnly (QTextEdit *, bool=true)
 
QListWidget * us_listwidget (int=0)
 
QGridLayout * us_checkbox (const QString &, QCheckBox *&, bool=false)
 
QGridLayout * us_radiobutton (const QString &text, QRadioButton *&rb, bool state=false)
 
QProgressBar * us_progressBar (int, int, int=0)
 
QComboBox * us_comboBox (void)
 
QLCDNumber * us_lcd (int, int=0)
 
QwtCounter * us_counter (int, double, double, double=0.0)
 
QwtPlot * us_plot (const QString &, const QString &=QString(), const QString &=QString())
 
QwtPlotGrid * us_grid (QwtPlot *)
 
QwtPlotCurve * us_curve (QwtPlot *, const QString &)
 
QwtPlotPicker * us_picker (QwtPlot *)
 
QTabWidget * us_tabwidget (int=0, int=QFont::Bold)
 

Private Slots

void synch_components (void)
 Get buffer components from the DB and write to. More...
 
void sel_investigator (void)
 
void save (void)
 
void update (void)
 
void delete_buffer (void)
 
void query (void)
 
void reset (void)
 
void spectrum (void)
 
void list_component (void)
 
void add_component (void)
 
void accept_buffer (void)
 
void check_db (void)
 
void new_description (void)
 
void density (const QString &)
 
void viscosity (const QString &)
 
void remove_component (QListWidgetItem *)
 
void select_buffer (QListWidgetItem *)
 Display the appropriate data when the buffer name in the list widget is selected with a double click. More...
 
void search (const QString &=QString())
 
void assign_investigator (int)
 
void source_changed (bool)
 
void help (void)
 

Private Member Functions

void read_db (void)
 
void read_buffer (void)
 Load buffer data from Hard Drive. More...
 
void recalc_density (void)
 
void recalc_viscosity (void)
 
void update_buffer (void)
 
void connect_error (const QString &)
 
bool buffer_path (QString &)
 
void update_lw_buf (const QString &, double)
 
void read_from_disk (QListWidgetItem *)
 
void read_from_db (QListWidgetItem *)
 
void read_from_db (const QString &)
 
void save_db (void)
 
void save_disk (void)
 
void delete_db (void)
 
void delete_disk (void)
 
void update_db (void)
 
bool up_to_date (void)
 
void init_buffer (void)
 
bool buffer_in_use (QString &)
 

Private Attributes

bool signal
 
bool bufferCurrent
 
bool manualUpdate
 
bool view_shared
 
int personID
 The currently active buffer Data. More...
 
US_Buffer buffer
 
QMap< QString, US_BufferComponentcomponent_list
 
QList< BufferInfobuffer_metadata
 
QStringList filenames
 
QStringList descriptions
 
QStringList GUIDs
 
QStringList bufferIDs
 
QPushButton * pb_save
 
QPushButton * pb_update
 
QPushButton * pb_del
 
QPushButton * pb_spectrum
 
QComboBox * cmb_optics
 
US_Disk_DB_Controlsdisk_controls
 Radiobuttons for disk/db choice. More...
 
QListWidget * lw_buffer_db
 
QListWidget * lw_ingredients
 
QListWidget * lw_buffer
 
QCheckBox * cb_shared
 
QCheckBox * cb_manual
 
QLineEdit * le_search
 
QLineEdit * le_density
 
QLineEdit * le_viscosity
 
QLineEdit * le_ph
 
QLineEdit * le_compressibility
 
QLineEdit * le_description
 
QLineEdit * le_investigator
 
QLineEdit * le_concentration
 
QLineEdit * le_guid
 
QPalette normal
 
QPalette gray
 
QLabel * lb_units
 
QLabel * lb_selected
 
US_Help showHelp
 

Additional Inherited Members

- Public Attributes inherited from US_WidgetsDialog
US_Global g
 Connect to global memory and make the values accessible. More...
 
QPalette vlgray
 Very light gray palette for read-only line edits. More...
 

Detailed Description

An application to manage buffer data.

Definition at line 14 of file us_buffer_gui.h.

Constructor & Destructor Documentation

US_BufferGui::US_BufferGui ( bool  signal_wanted = false,
const US_Buffer buf = US_Buffer(),
int  select_db_disk = US_Disk_DB_Controls::Default 
)

Main constructor

Parameters
signal_wantedA flag to specify if one of the signals should be emitted when terminating the dialog
bufThe default buffer
select_db_diskAn indicatior of whether to search the disk or DB for the default buffer

Definition at line 13 of file us_buffer_gui.cpp.

Member Function Documentation

void US_BufferGui::accept_buffer ( void  )
privateslot

Definition at line 1189 of file us_buffer_gui.cpp.

void US_BufferGui::add_component ( void  )
privateslot

Input the value of component selected in lw_ingredients. After 'Return' key was pressed, this function will display the selected component value in lw_buffer and recalculate the density and viscosity.

Definition at line 1073 of file us_buffer_gui.cpp.

void US_BufferGui::assign_investigator ( int  invID)
privateslot

Definition at line 470 of file us_buffer_gui.cpp.

bool US_BufferGui::buffer_in_use ( QString &  bufferGUID)
private

Definition at line 1406 of file us_buffer_gui.cpp.

bool US_BufferGui::buffer_path ( QString &  path)
private

Definition at line 485 of file us_buffer_gui.cpp.

void US_BufferGui::check_db ( void  )
privateslot

Definition at line 319 of file us_buffer_gui.cpp.

void US_BufferGui::connect_error ( const QString &  error)
private

Definition at line 668 of file us_buffer_gui.cpp.

void US_BufferGui::delete_buffer ( void  )
privateslot

Definition at line 799 of file us_buffer_gui.cpp.

void US_BufferGui::delete_db ( void  )
private

Definition at line 854 of file us_buffer_gui.cpp.

void US_BufferGui::delete_disk ( void  )
private

Definition at line 828 of file us_buffer_gui.cpp.

void US_BufferGui::density ( const QString &  d)
privateslot

Definition at line 339 of file us_buffer_gui.cpp.

void US_BufferGui::help ( void  )
inlineprivateslot

Definition at line 155 of file us_buffer_gui.h.

void US_BufferGui::init_buffer ( void  )
private

Definition at line 381 of file us_buffer_gui.cpp.

void US_BufferGui::list_component ( void  )
privateslot

After selection of the buffer component in lw_ingredients, this method will display in lb_selected and wait for a partial concentartion input value.

Definition at line 1144 of file us_buffer_gui.cpp.

void US_BufferGui::new_description ( void  )
privateslot

Definition at line 1316 of file us_buffer_gui.cpp.

void US_BufferGui::query ( void  )
privateslot

Load buffer data and populate listbox. If an investigator is defined, only select the buffer files from the investigator.

Definition at line 507 of file us_buffer_gui.cpp.

void US_BufferGui::read_buffer ( void  )
private

Load buffer data from Hard Drive.

Definition at line 516 of file us_buffer_gui.cpp.

void US_BufferGui::read_db ( void  )
private

Definition at line 577 of file us_buffer_gui.cpp.

void US_BufferGui::read_from_db ( QListWidgetItem *  item)
private

Definition at line 740 of file us_buffer_gui.cpp.

void US_BufferGui::read_from_db ( const QString &  bufferID)
private

Definition at line 747 of file us_buffer_gui.cpp.

void US_BufferGui::read_from_disk ( QListWidgetItem *  item)
private

Definition at line 721 of file us_buffer_gui.cpp.

void US_BufferGui::recalc_density ( void  )
private

Recalculate the density of the buffer based on the information in the template file

Definition at line 1253 of file us_buffer_gui.cpp.

void US_BufferGui::recalc_viscosity ( void  )
private

Recalculate the viscosity of the buffer based on the information in the template file

Definition at line 1285 of file us_buffer_gui.cpp.

void US_BufferGui::remove_component ( QListWidgetItem *  item)
privateslot

When double clicked, the selected item in lw_buffer will be removed and the density and viscosity will be recalculated.

Definition at line 1157 of file us_buffer_gui.cpp.

void US_BufferGui::reset ( void  )
privateslot

Reset some variables to initialization.

Definition at line 1214 of file us_buffer_gui.cpp.

void US_BufferGui::save ( void  )
privateslot

Definition at line 899 of file us_buffer_gui.cpp.

void US_BufferGui::save_db ( void  )
private

Definition at line 952 of file us_buffer_gui.cpp.

void US_BufferGui::save_disk ( void  )
private

Definition at line 923 of file us_buffer_gui.cpp.

void US_BufferGui::search ( const QString &  text = QString())
privateslot

Definition at line 631 of file us_buffer_gui.cpp.

void US_BufferGui::sel_investigator ( void  )
privateslot

Definition at line 459 of file us_buffer_gui.cpp.

void US_BufferGui::select_buffer ( QListWidgetItem *  item)
privateslot

Display the appropriate data when the buffer name in the list widget is selected with a double click.

Parameters
itemThe description of the buffer selected.

Definition at line 695 of file us_buffer_gui.cpp.

void US_BufferGui::source_changed ( bool  db)
privateslot

Definition at line 1398 of file us_buffer_gui.cpp.

void US_BufferGui::spectrum ( void  )
privateslot

Definition at line 674 of file us_buffer_gui.cpp.

void US_BufferGui::synch_components ( void  )
privateslot

Get buffer components from the DB and write to.

Definition at line 432 of file us_buffer_gui.cpp.

bool US_BufferGui::up_to_date ( void  )
private

Definition at line 1178 of file us_buffer_gui.cpp.

void US_BufferGui::update ( void  )
privateslot

Definition at line 993 of file us_buffer_gui.cpp.

void US_BufferGui::update_buffer ( void  )
private

Definition at line 774 of file us_buffer_gui.cpp.

void US_BufferGui::update_db ( void  )
private

Update changed buffer data to DB table

Definition at line 1005 of file us_buffer_gui.cpp.

void US_BufferGui::update_lw_buf ( const QString &  componentID,
double  conc 
)
private

Definition at line 764 of file us_buffer_gui.cpp.

void US_BufferGui::use_db ( bool  DB)
signal

A signal to indicate that the current disk/db selection has changed. /param DB True if DB is the new selection

void US_BufferGui::valueBufferID ( const QString  bufferID)
signal

Return the ID of the buffer in the current database. A value of -1 indicates the data was manually input or was returned from the local disk.

Parameters
bufferIDA string value of the returned ID
void US_BufferGui::valueChanged ( double  density,
double  viscosity 
)
signal

Return the main values

Parameters
densityof the buffer
viscosityof the buffer
void US_BufferGui::valueChanged ( US_Buffer  buffer)
signal

Return all values associated with the buffer

Parameters
bufferReturn the entire class.
void US_BufferGui::viscosity ( const QString &  v)
privateslot

Definition at line 360 of file us_buffer_gui.cpp.

Member Data Documentation

US_Buffer US_BufferGui::buffer
private

Definition at line 56 of file us_buffer_gui.h.

QList< BufferInfo > US_BufferGui::buffer_metadata
private

Definition at line 72 of file us_buffer_gui.h.

bool US_BufferGui::bufferCurrent
private

Definition at line 50 of file us_buffer_gui.h.

QStringList US_BufferGui::bufferIDs
private

Definition at line 77 of file us_buffer_gui.h.

QCheckBox* US_BufferGui::cb_manual
private

Definition at line 93 of file us_buffer_gui.h.

QCheckBox* US_BufferGui::cb_shared
private

Definition at line 92 of file us_buffer_gui.h.

QComboBox* US_BufferGui::cmb_optics
private

Definition at line 84 of file us_buffer_gui.h.

QMap< QString, US_BufferComponent > US_BufferGui::component_list
private

A BufferComponent vector structure for all components in template list (stored in us_home/etc/buffer.xml).

Definition at line 60 of file us_buffer_gui.h.

QStringList US_BufferGui::descriptions
private

Definition at line 75 of file us_buffer_gui.h.

US_Disk_DB_Controls* US_BufferGui::disk_controls
private

Radiobuttons for disk/db choice.

Definition at line 86 of file us_buffer_gui.h.

QStringList US_BufferGui::filenames
private

Definition at line 74 of file us_buffer_gui.h.

QPalette US_BufferGui::gray
private

Definition at line 106 of file us_buffer_gui.h.

QStringList US_BufferGui::GUIDs
private

Definition at line 76 of file us_buffer_gui.h.

QLabel* US_BufferGui::lb_selected
private

Definition at line 109 of file us_buffer_gui.h.

QLabel* US_BufferGui::lb_units
private

Definition at line 108 of file us_buffer_gui.h.

QLineEdit* US_BufferGui::le_compressibility
private

Definition at line 99 of file us_buffer_gui.h.

QLineEdit* US_BufferGui::le_concentration
private

Definition at line 102 of file us_buffer_gui.h.

QLineEdit* US_BufferGui::le_density
private

Definition at line 96 of file us_buffer_gui.h.

QLineEdit* US_BufferGui::le_description
private

Definition at line 100 of file us_buffer_gui.h.

QLineEdit* US_BufferGui::le_guid
private

Definition at line 103 of file us_buffer_gui.h.

QLineEdit* US_BufferGui::le_investigator
private

Definition at line 101 of file us_buffer_gui.h.

QLineEdit* US_BufferGui::le_ph
private

Definition at line 98 of file us_buffer_gui.h.

QLineEdit* US_BufferGui::le_search
private

Definition at line 95 of file us_buffer_gui.h.

QLineEdit* US_BufferGui::le_viscosity
private

Definition at line 97 of file us_buffer_gui.h.

QListWidget* US_BufferGui::lw_buffer
private

Definition at line 90 of file us_buffer_gui.h.

QListWidget* US_BufferGui::lw_buffer_db
private

Definition at line 88 of file us_buffer_gui.h.

QListWidget* US_BufferGui::lw_ingredients
private

Definition at line 89 of file us_buffer_gui.h.

bool US_BufferGui::manualUpdate
private

Definition at line 51 of file us_buffer_gui.h.

QPalette US_BufferGui::normal
private

Definition at line 105 of file us_buffer_gui.h.

QPushButton* US_BufferGui::pb_del
private

Definition at line 81 of file us_buffer_gui.h.

QPushButton* US_BufferGui::pb_save
private

Definition at line 79 of file us_buffer_gui.h.

QPushButton* US_BufferGui::pb_spectrum
private

Definition at line 82 of file us_buffer_gui.h.

QPushButton* US_BufferGui::pb_update
private

Definition at line 80 of file us_buffer_gui.h.

int US_BufferGui::personID
private

The currently active buffer Data.

Definition at line 55 of file us_buffer_gui.h.

US_Help US_BufferGui::showHelp
private

Definition at line 111 of file us_buffer_gui.h.

bool US_BufferGui::signal
private

Definition at line 49 of file us_buffer_gui.h.

bool US_BufferGui::view_shared
private

Definition at line 52 of file us_buffer_gui.h.


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