PickTable Class Reference

#include <PickTable.h>

Inheritance diagram for PickTable:

Inheritance graph
PickTableBaseQDialog
[legend]
Collaboration diagram for PickTable:

Collaboration graph
PickTableBaseQDialogQLabelQLineEditQPushButtonQPixmapQListViewQCheckBoxPlotterBaseObserverDataRepProjectorBaseObservableDataSourceSizePointAxisModelBaseRangeRectCutRangeRepColorNTupleSorterNTupleRepBaseErrorBarRepPointRepBase
[legend]
List of all members.

Detailed Description

A derived class of PickTableBase class which is generated by the Qt designer.

It provides an PickTable which lists points selected by the user.

Bug:
When entering a new entry, density should be calculated from entries/bin.
Author:
Paul F. Kunz <Paul_Kunz@slac.stanford.edu>

Sanket B Malde <sanket@stanford.edu>

Definition at line 46 of file PickTable.h.

Public Member Functions

 accept ()
void addItem (std::vector< double > &v)
 Adds a new point to the pick NTuple and the PickTable's window.
 done (int r)
 enum {Rejected, Accepted}
 exec ()
 extension () const
NTuplegetPickTable () const
 Gets the pick table as a NTuple.
 isModal () const
 isSizeGripEnabled () const
virtual void m_pick_table_selectionChanged ()
 Responds to change of selection in the QListView.
 orientation () const
 PickTable (PlotterBase *plotter)
 A constructor.
 prop -whether the size grip is enabled
 prop -whether show() should pop up the dialog as modal or modeless
 reject ()
 result () const
 setExtension (QWidget *extension)
 setModal (bool modal)
 setOrientation (Orientation orientation)
 setResult (int i)
 setSizeGripEnabled (bool)
 show ()
 showExtension (bool showIt)

Public Attributes

QPushButtonm_add_entry
QPushButtonm_clear
QPushButtonm_delete
QListViewm_pick_table
QCheckBoxm_pickedCheckBox
QLabelm_title
QLabelm_type
QLineEditwLineEdit
QLineEditxLineEdit
QLineEdityLineEdit
QLineEditzLineEdit

Protected Slots

virtual void languageChange ()

Protected Member Functions

void addDataRep ()
 Add DataRep object, called by constructor or show picked points check box.
virtual void addEntry ()
 Responds to addEntry button.
virtual void clear ()
 Responds to the 'clear' button click.
virtual void deleteSelectedItem ()
 Responds to the 'Delete Selected Item' button click.
unsigned int indexOf (QListViewItem *target)
 Finds the index of the target QListViewItem.
virtual void listSorted (int)
 Sorts the table.
virtual void pickedCheckBoxClicked ()
 Responds to the 'Show picked points' check box click.
void refreshItems (unsigned int select)
 Refreshes the view of all the items.

Private Attributes

unsigned int m_column
 The number of columns of the pick table.
DataRepm_datarep
 The DataRep of picked points.
NTupleSorterm_sorter
 The object that maintains the NTuple of picked data points.
PlotterBasem_target
 The target PlotterBase object.


Constructor & Destructor Documentation

PickTable ( PlotterBase plotter  ) 

A constructor.

A constructor taking the PlotterBase object as argument. The plotter is the one from which one is picking.

Definition at line 41 of file PickTable.cxx.

References PickTable::addDataRep(), PlotterBase::getDataRep(), QListView::header(), DataSourceController::instance(), PickTable::listSorted(), PickTable::m_column, PickTableBase::m_delete, PickTableBase::m_pick_table, PickTable::m_sorter, PickTable::m_target, PickTableBase::m_title, PickTableBase::m_type, DataSourceController::registerNTuple(), QListView::setColumnText(), QListView::setShowSortIndicator(), QListView::setSorting(), QLabel::setText(), num_util::size(), num_util::type(), PickTableBase::wLineEdit, and PickTableBase::zLineEdit.


Member Function Documentation

void addDataRep (  )  [protected]

Add DataRep object, called by constructor or show picked points check box.

Used to respond to 'Add Datarep' button.

Definition at line 204 of file PickTable.cxx.

References hippodraw::Symbol::CIRCLE, DisplayController::instance(), PickTable::m_datarep, PickTable::m_sorter, PickTable::m_target, and Color::red.

Referenced by PickTable::pickedCheckBoxClicked(), and PickTable::PickTable().

void addEntry (  )  [protected, virtual]

Responds to addEntry button.

Implements PickTableBase.

Definition at line 254 of file PickTable.cxx.

References PickTable::addItem(), PickTable::m_column, QLineEdit::text(), PickTableBase::wLineEdit, PickTableBase::xLineEdit, PickTableBase::yLineEdit, and PickTableBase::zLineEdit.

void addItem ( std::vector< double > &  v  ) 

Adds a new point to the pick NTuple and the PickTable's window.

Definition at line 120 of file PickTable.cxx.

References PickTable::m_sorter, and PickTable::refreshItems().

Referenced by PickTable::addEntry().

void clear (  )  [protected, virtual]

Responds to the 'clear' button click.

Clears the list of picked points.

Implements PickTableBase.

Definition at line 112 of file PickTable.cxx.

References NTupleSorter::clear(), QListView::clear(), PickTableBase::m_pick_table, and PickTable::m_sorter.

Referenced by PickTable::refreshItems().

void deleteSelectedItem (  )  [protected, virtual]

Responds to the 'Delete Selected Item' button click.

Deletes the selected point.

Implements PickTableBase.

Definition at line 185 of file PickTable.cxx.

References NTupleSorter::eraseRow(), PickTable::indexOf(), PickTableBase::m_pick_table, PickTable::m_sorter, PickTable::refreshItems(), and QListView::selectedItem().

NTuple * getPickTable (  )  const

Gets the pick table as a NTuple.

Definition at line 246 of file PickTable.cxx.

References PickTable::m_sorter.

unsigned int indexOf ( QListViewItem target  )  [protected]

Finds the index of the target QListViewItem.

Definition at line 165 of file PickTable.cxx.

References PickTableBase::m_pick_table.

Referenced by PickTable::deleteSelectedItem().

void languageChange (  )  [protected, virtual, slot, inherited]

Definition at line 175 of file PickTableBase.cpp.

References QListView::header(), PickTableBase::m_add_entry, PickTableBase::m_clear, PickTableBase::m_delete, PickTableBase::m_pick_table, PickTableBase::m_pickedCheckBox, PickTableBase::m_title, PickTableBase::m_type, QCheckBox::setText(), QPushButton::setText(), and QLabel::setText().

Referenced by PickTableBase::PickTableBase().

void listSorted ( int   )  [protected, virtual]

Sorts the table.

Implements PickTableBase.

Definition at line 96 of file PickTable.cxx.

References PickTableBase::m_pick_table, PickTable::m_sorter, PickTable::refreshItems(), QListView::selectedItem(), and QString::toUInt().

Referenced by PickTable::PickTable().

void m_pick_table_selectionChanged (  )  [virtual]

Responds to change of selection in the QListView.

Implements PickTableBase.

Definition at line 232 of file PickTable.cxx.

References PickTableBase::m_delete, and PickTableBase::m_pick_table.

void pickedCheckBoxClicked (  )  [protected, virtual]

Responds to the 'Show picked points' check box click.

Implements PickTableBase.

Definition at line 277 of file PickTable.cxx.

References PickTable::addDataRep(), QCheckBox::isChecked(), PickTable::m_datarep, PickTableBase::m_pickedCheckBox, PickTable::m_target, and QDialog::show().

void refreshItems ( unsigned int  select  )  [protected]

Refreshes the view of all the items.

Refreshes the view of the picked items. Sets the select item to be selected and scrolled so it is visible. If select is greater or equal to the number of rows, then no item will be selected.

Definition at line 131 of file PickTable.cxx.

References PickTable::clear(), NTupleSorter::getRow(), PickTableBase::m_delete, PickTableBase::m_pick_table, PickTable::m_sorter, NTupleSorter::rows(), and num_util::size().

Referenced by PickTable::addItem(), PickTable::deleteSelectedItem(), and PickTable::listSorted().


Member Data Documentation

QPushButton* m_add_entry [inherited]

Definition at line 47 of file PickTableBase.h.

Referenced by PickTableBase::languageChange(), and PickTableBase::PickTableBase().

QPushButton* m_clear [inherited]

Definition at line 38 of file PickTableBase.h.

Referenced by PickTableBase::languageChange(), and PickTableBase::PickTableBase().

unsigned int m_column [private]

The number of columns of the pick table.

Definition at line 66 of file PickTable.h.

Referenced by PickTable::addEntry(), and PickTable::PickTable().

DataRep* m_datarep [private]

The DataRep of picked points.

Definition at line 69 of file PickTable.h.

Referenced by PickTable::addDataRep(), and PickTable::pickedCheckBoxClicked().

QPushButton* m_delete [inherited]

Definition at line 39 of file PickTableBase.h.

Referenced by PickTableBase::languageChange(), PickTable::m_pick_table_selectionChanged(), PickTable::PickTable(), PickTableBase::PickTableBase(), and PickTable::refreshItems().

QListView* m_pick_table [inherited]

Definition at line 41 of file PickTableBase.h.

Referenced by PickTable::clear(), PickTable::deleteSelectedItem(), PickTable::indexOf(), PickTableBase::languageChange(), PickTable::listSorted(), PickTable::m_pick_table_selectionChanged(), PickTable::PickTable(), PickTableBase::PickTableBase(), and PickTable::refreshItems().

QCheckBox* m_pickedCheckBox [inherited]

Definition at line 42 of file PickTableBase.h.

Referenced by PickTableBase::languageChange(), PickTable::pickedCheckBoxClicked(), and PickTableBase::PickTableBase().

NTupleSorter* m_sorter [private]

The object that maintains the NTuple of picked data points.

Definition at line 57 of file PickTable.h.

Referenced by PickTable::addDataRep(), PickTable::addItem(), PickTable::clear(), PickTable::deleteSelectedItem(), PickTable::getPickTable(), PickTable::listSorted(), PickTable::PickTable(), and PickTable::refreshItems().

PlotterBase* m_target [private]

The target PlotterBase object.

The target PlotterBase object upon which one is picking.

Definition at line 62 of file PickTable.h.

Referenced by PickTable::addDataRep(), PickTable::pickedCheckBoxClicked(), and PickTable::PickTable().

QLabel* m_title [inherited]

Definition at line 40 of file PickTableBase.h.

Referenced by PickTableBase::languageChange(), PickTable::PickTable(), and PickTableBase::PickTableBase().

QLabel* m_type [inherited]

Definition at line 37 of file PickTableBase.h.

Referenced by PickTableBase::languageChange(), PickTable::PickTable(), and PickTableBase::PickTableBase().

QLineEdit* wLineEdit [inherited]

Definition at line 46 of file PickTableBase.h.

Referenced by PickTable::addEntry(), PickTable::PickTable(), and PickTableBase::PickTableBase().

QLineEdit* xLineEdit [inherited]

Definition at line 43 of file PickTableBase.h.

Referenced by PickTable::addEntry(), and PickTableBase::PickTableBase().

QLineEdit* yLineEdit [inherited]

Definition at line 44 of file PickTableBase.h.

Referenced by PickTable::addEntry(), and PickTableBase::PickTableBase().

QLineEdit* zLineEdit [inherited]

Definition at line 45 of file PickTableBase.h.

Referenced by PickTable::addEntry(), PickTable::PickTable(), and PickTableBase::PickTableBase().


The documentation for this class was generated from the following files:
Generated for HippoDraw Class Library by doxygen