OpendTect-6_4  6.4
Classes | Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | Friends | List of all members
uiTable Class Reference
Inheritance diagram for uiTable:
[legend]

Classes

class  SelectionRange
 
class  Setup
 

Public Types

enum  SelectionMode { NoSelection, Single, Multi, SingleRow }
 
enum  SelectionBehavior { SelectItems, SelectRows, SelectColumns }
 
enum  ResizeMode { Interactive, Fixed, Stretch, ResizeToContents }
 
- Public Types inherited from uiObject
enum  SzPolicy {
  Undef, Small, Medium, Wide,
  SmallVar, MedVar, WideVar, SmallMax,
  MedMax, WideMax
}
 How should the object's size behave? Undef : use default. Small : 1 base sz. Medium : 2* base sz + 1. Wide : 4* base sz + 3. The xxVar options specify that the element may have a bigger internal preferred size. In that case, the maximum is taken. The xxMax options specify that the element should take all available space ( stretch = 2 ) More...
 

Public Member Functions

 uiTable (uiParent *, const Setup &, const char *nm)
 
virtual ~uiTable ()
 
const char * text (const RowCol &) const
 
void setText (const RowCol &, const char *)
 
void setText (const RowCol &, const OD::String &)
 
void setText (const RowCol &, const uiString &)
 
void clearCell (const RowCol &)
 
void clearTable ()
 
void showGrid (bool)
 
bool gridShown () const
 
void setCurrentCell (const RowCol &, bool noselection=false)
 
void setCellObject (const RowCol &, uiObject *)
 
uiObjectgetCellObject (const RowCol &) const
 
void clearCellObject (const RowCol &)
 
RowCol getCell (uiObject *)
 
void setCellGroup (const RowCol &, uiGroup *)
 
uiGroupgetCellGroup (const RowCol &) const
 
RowCol getCell (uiGroup *)
 
void setCellChecked (const RowCol &, bool yn)
 
bool isCellChecked (const RowCol &) const
 
int nrRows () const
 
int nrCols () const
 
void setNrRows (int)
 
void setNrCols (int)
 
void setPrefHeightInRows (int)
 
int columnWidth (int) const
 
int rowHeight (int) const
 
void setLeftMargin (int)
 
void setColumnWidth (int col, int w)
 
void setColumnWidthInChar (int col, float w)
 
void setTopMargin (int)
 
void setRowHeight (int row, int h)
 
void setRowHeightInChar (int row, float h)
 
void resizeHeaderToContents (bool hor)
 
void resizeColumnToContents (int)
 
void resizeColumnsToContents ()
 
void resizeRowToContents (int)
 
void resizeRowsToContents ()
 
void setColumnResizeMode (ResizeMode)
 Default is Stretch. More...
 
void setRowResizeMode (ResizeMode)
 Default is ResizeToContents. More...
 
void setColumnStretchable (int, bool)
 
void setRowStretchable (int, bool)
 
bool isColumnStretchable (int) const
 
bool isRowStretchable (int) const
 
void setTableReadOnly (bool)
 
bool isTableReadOnly () const
 
void setColumnReadOnly (int, bool)
 
bool isColumnReadOnly (int) const
 
void setRowReadOnly (int, bool)
 
bool isRowReadOnly (int) const
 
void setCellReadOnly (const RowCol &, bool)
 
bool isCellReadOnly (const RowCol &) const
 
void hideColumn (int, bool)
 
void hideRow (int, bool)
 
bool isColumnHidden (int) const
 
bool isRowHidden (int) const
 
bool isTopHeaderHidden () const
 
bool isLeftHeaderHidden () const
 
void setTopHeaderHidden (bool)
 
void setLeftHeaderHidden (bool)
 
void insertRows (int row, int count)
 
void insertRows (const RowCol &rc, int count)
 
void insertColumns (int col, int count)
 
void insertColumns (const RowCol &rc, int count)
 
void removeRow (int)
 
void removeRow (const RowCol &rc)
 
void removeRows (const TypeSet< int > &)
 
void removeColumn (int)
 
void removeColumn (const RowCol &rc)
 
void removeColumns (const TypeSet< int > &)
 
bool isSelected (const RowCol &) const
 
bool isRowSelected (int) const
 
bool isColumnSelected (int) const
 
bool getSelectedRows (TypeSet< int > &) const
 
bool getSelectedCols (TypeSet< int > &) const
 
bool getSelectedCells (TypeSet< RowCol > &) const
 
int currentRow () const
 
int currentCol () const
 
RowCol currentCell () const
 
void setSelected (const RowCol &, bool yn=true)
 
void selectRow (int row)
 
void selectColumn (int col)
 
void selectItems (const TypeSet< RowCol > &, bool)
 
void removeAllSelections ()
 
void ensureCellVisible (const RowCol &)
 
const char * rowLabel (int) const
 
const char * rowLabel (const RowCol &rc) const
 
void setRowLabel (int, const char *)
 
void setRowLabels (const char **)
 
void setRowLabels (const BufferStringSet &)
 
void setRowLabel (const RowCol &rc, const char *lbl)
 
void setRowToolTip (int, const char *)
 
void setTopLeftCornerLabel (const uiString &)
 
const char * columnLabel (int) const
 
const char * columnLabel (const RowCol &rc) const
 
void setColumnLabel (int, const uiString &)
 
void setColumnLabels (const char **)
 
void setColumnLabels (const BufferStringSet &)
 
void setColumnLabel (const RowCol &rc, const uiString &lbl)
 
void setColumnToolTip (int, const uiString &)
 
void setCellToolTip (const RowCol &, const uiString &)
 
void setDefaultRowLabels ()
 
void setDefaultColLabels ()
 
void setLabelAlignment (Alignment::HPos, bool cols)
 
void setLabelBGColor (int, Color, bool isrow)
 
Setupsetup ()
 
const Setupsetup () const
 
const RowColnotifiedCell () const
 
void setNotifiedCell (const RowCol &rc)
 
const TypeSet< int > & getNotifRCs () const
 
const TypeSet< RowCol > & getNotifCells () const
 
const RowColnewCell () const
 
void setPixmap (const RowCol &, const uiPixmap &)
 
void setColor (const RowCol &, const Color &)
 
Color getColor (const RowCol &) const
 
void setHeaderBackground (int, const Color &, bool isrow)
 
Color getHeaderBackground (int, bool isrow) const
 
int getIntValue (const RowCol &) const
 
double getDValue (const RowCol &) const
 
float getFValue (const RowCol &) const
 
void setValue (const RowCol &, int)
 
void setValue (const RowCol &, float)
 
void setValue (const RowCol &, float, int nrdec)
 
void setValue (const RowCol &, double)
 
void setValue (const RowCol &, double, int nrdec)
 
void setSelectionMode (SelectionMode)
 
void setSelectionBehavior (SelectionBehavior)
 
void editCell (const RowCol &, bool replace=false)
 
const ObjectSet< SelectionRange > & selectedRanges () const
 
SelectionBehavior getSelBehavior () const
 
int maxNrOfSelections () const
 
bool handleLongTabletPress ()
 
bool needOfVirtualKeyboard () const
 
void popupVirtualKeyboard (int globalx=-1, int globaly=-1)
 
double getdValue (const RowCol &rc) const
 
float getfValue (const RowCol &rc) const
 
void setPrefWidthInChars (int)
 
- Public Member Functions inherited from uiObject
 uiObject (uiParent *, const char *nm)
 
 uiObject (uiParent *, const char *nm, uiObjectBody &)
 
 ~uiObject ()
 
void setHSzPol (SzPolicy)
 
void setVSzPol (SzPolicy)
 
SzPolicy szPol (bool hor=true) const
 
virtual int width () const
 Actual size in pixels. More...
 
virtual int height () const
 Actual size in pixels. More...
 
virtual void setName (const char *)
 
void setToolTip (const uiString &)
 
const uiStringtoolTip () const
 
void translateText ()
 
void display (bool yn, bool shrink=false, bool maximized=false)
 
void setFocus ()
 
bool hasFocus () const
 
void disabFocus ()
 
virtual void setCursor (const MouseCursor &)
 
bool isCursorInside () const
 
virtual void setStyleSheet (const char *)
 
virtual Color backgroundColor () const
 
Color roBackgroundColor () const
 
virtual void setBackgroundColor (const Color &)
 
virtual void setBackgroundPixmap (const uiPixmap &)
 
virtual void setTextColor (const Color &)
 
void setSensitive (bool yn=true)
 
bool sensitive () const
 
bool visible () const
 
bool isDisplayed () const
 
int prefHNrPics () const
 
virtual void setPrefWidth (int)
 
void setPrefWidthInChar (int)
 
void setPrefWidthInChar (float)
 
void setMinimumWidth (int)
 
void setMaximumWidth (int)
 
int prefVNrPics () const
 
virtual void setPrefHeight (int)
 
void setPrefHeightInChar (int)
 
void setPrefHeightInChar (float)
 
void setMinimumHeight (int)
 
void setMaximumHeight (int)
 
void setStretch (int hor, int ver)
 Sets stretch factors for object If stretch factor is > 1, then object will already grow at pop-up. More...
 
void attach (constraintType, int margin=-1)
 attaches object to another In case the stretched... options are used, margin=-1 (default) stretches the object not to cross the border. margin=-2 stretches the object to fill the parent's border. This looks nice with separators. More...
 
void attach (constraintType, uiObject *, int margin=-1, bool reciprocal=true)
 
void attach (constraintType, uiParent *, int margin=-1, bool reciprocal=true)
 
void setFont (const uiFont &)
 
const uiFontfont () const
 
void setCaption (const uiString &)
 
void shallowRedraw (CallBacker *=0)
 
void deepRedraw (CallBacker *=0)
 
void reDraw (bool deep)
 
uiSize actualsize (bool include_border=true) const
 
uiParentparent ()
 
const uiParentparent () const
 
void reParent (uiParent *)
 
uiMainWinmainwin ()
 
 mQtclass (QWidget *) getWidget()
 
 mQtclass (QWidget *) qwidget()
 
const mQtclass (QWidget *) qwidget() const
 
virtual const ObjectSet< uiBaseObject > * childList () const
 
void close ()
 

Public Attributes

Notifier< uiTablevalueChanged
 
Notifier< uiTableleftClicked
 
Notifier< uiTablerightClicked
 
Notifier< uiTabledoubleClicked
 
Notifier< uiTableselectionChanged
 
Notifier< uiTablerowInserted
 
Notifier< uiTablerowDeleted
 
Notifier< uiTableselectionDeleted
 
Notifier< uiTablecolInserted
 
Notifier< uiTablecolDeleted
 
CNotifier< uiTable, int > rowClicked
 
CNotifier< uiTable, int > columnClicked
 
- Public Attributes inherited from uiObject
Notifier< uiObjectclosed
 Triggered when object closes. More...
 
CNotifier< uiObject, uiRect & > setGeometry
 triggered when getting a new geometry A reference to the new geometry is passed which can be manipulated, before the geometry is actually set to the QWidget. More...
 

Protected Member Functions

virtual void popupMenu (CallBacker *)
 
void geometrySet_ (CallBacker *)
 
void updateCellSizes (const uiSize *sz=0)
 
void cellObjChangedCB (CallBacker *)
 
bool getSelected ()
 
void removeRCs (const TypeSet< int > &, bool col)
 
void update (bool row, int nr)
 
- Protected Member Functions inherited from uiObject
virtual bool closeOK ()
 hook. Accepts/denies closing of window. More...
 
void triggerSetGeometry (const i_LayoutItem *, uiRect &)
 setGeometry should be triggered by this's layoutItem More...
 
void updateToolTip (CallBacker *=0)
 

Protected Attributes

ObjectSet< SelectionRangeselranges_
 
RowCol notifcell_
 
TypeSet< RowColnotifcells_
 
TypeSet< int > notifrows_
 
TypeSet< int > notifcols_
 
bool seliscols_
 
RowCol newcell_
 
Setup setup_
 
OD::ButtonState buttonstate_
 
bool istablereadonly_
 
- Protected Attributes inherited from uiObject
uiString tooltip_
 
uiObjEventFilter * uiobjeventfilter_
 

Private Member Functions

 mODTextTranslationClass (uiTable) friend class i_tableMessenger
 
uiTableBodymkbody (uiParent *, const char *, int, int)
 

Private Attributes

uiTableBodybody_
 
uiLabelcornerlabel_
 
uiSize lastsz
 

Friends

class uiTableBody
 

Additional Inherited Members

- Static Public Member Functions inherited from uiObject
static void updateToolTips ()
 
static void setTabOrder (uiObject *first, uiObject *second)
 
static int baseFldSize ()
 
static int iconSize ()
 

Detailed Description

Member Enumeration Documentation

Enumerator
Interactive 
Fixed 
Stretch 
ResizeToContents 
Enumerator
SelectItems 
SelectRows 
SelectColumns 
Enumerator
NoSelection 

No cell can be selected by the user.

Single 

a single range of cells.

Multi 

multiple ranges of cells.

SingleRow 

Constructor & Destructor Documentation

uiTable::uiTable ( uiParent ,
const Setup ,
const char *  nm 
)
virtual uiTable::~uiTable ( )
virtual

Member Function Documentation

void uiTable::cellObjChangedCB ( CallBacker )
protected
void uiTable::clearCell ( const RowCol )
void uiTable::clearCellObject ( const RowCol )
void uiTable::clearTable ( )
const char* uiTable::columnLabel ( int  ) const
const char* uiTable::columnLabel ( const RowCol rc) const
inline
int uiTable::columnWidth ( int  ) const
RowCol uiTable::currentCell ( ) const
inline
int uiTable::currentCol ( ) const
int uiTable::currentRow ( ) const
void uiTable::editCell ( const RowCol ,
bool  replace = false 
)
void uiTable::ensureCellVisible ( const RowCol )
void uiTable::geometrySet_ ( CallBacker )
protected
RowCol uiTable::getCell ( uiObject )
RowCol uiTable::getCell ( uiGroup )
uiGroup* uiTable::getCellGroup ( const RowCol ) const
uiObject* uiTable::getCellObject ( const RowCol ) const
Color uiTable::getColor ( const RowCol ) const
double uiTable::getDValue ( const RowCol ) const
double uiTable::getdValue ( const RowCol rc) const
inline
float uiTable::getFValue ( const RowCol ) const
float uiTable::getfValue ( const RowCol rc) const
inline
Color uiTable::getHeaderBackground ( int  ,
bool  isrow 
) const
int uiTable::getIntValue ( const RowCol ) const
const TypeSet<RowCol>& uiTable::getNotifCells ( ) const
inline
const TypeSet<int>& uiTable::getNotifRCs ( ) const
inline
SelectionBehavior uiTable::getSelBehavior ( ) const
bool uiTable::getSelected ( )
protected
bool uiTable::getSelectedCells ( TypeSet< RowCol > &  ) const
bool uiTable::getSelectedCols ( TypeSet< int > &  ) const
bool uiTable::getSelectedRows ( TypeSet< int > &  ) const
bool uiTable::gridShown ( ) const
bool uiTable::handleLongTabletPress ( )
virtual

Reimplemented from uiObject.

void uiTable::hideColumn ( int  ,
bool   
)
void uiTable::hideRow ( int  ,
bool   
)
void uiTable::insertColumns ( int  col,
int  count 
)
void uiTable::insertColumns ( const RowCol rc,
int  count 
)
inline
void uiTable::insertRows ( int  row,
int  count 
)
void uiTable::insertRows ( const RowCol rc,
int  count 
)
inline
bool uiTable::isCellChecked ( const RowCol ) const
bool uiTable::isCellReadOnly ( const RowCol ) const
bool uiTable::isColumnHidden ( int  ) const
bool uiTable::isColumnReadOnly ( int  ) const
bool uiTable::isColumnSelected ( int  ) const
bool uiTable::isColumnStretchable ( int  ) const
bool uiTable::isLeftHeaderHidden ( ) const
bool uiTable::isRowHidden ( int  ) const
bool uiTable::isRowReadOnly ( int  ) const
bool uiTable::isRowSelected ( int  ) const
bool uiTable::isRowStretchable ( int  ) const
bool uiTable::isSelected ( const RowCol ) const
bool uiTable::isTableReadOnly ( ) const
bool uiTable::isTopHeaderHidden ( ) const
int uiTable::maxNrOfSelections ( ) const
uiTableBody& uiTable::mkbody ( uiParent ,
const char *  ,
int  ,
int   
)
private
uiTable::mODTextTranslationClass ( uiTable  )
private
bool uiTable::needOfVirtualKeyboard ( ) const
const RowCol& uiTable::newCell ( ) const
inline
const RowCol& uiTable::notifiedCell ( ) const
inline
int uiTable::nrCols ( ) const
int uiTable::nrRows ( ) const
virtual void uiTable::popupMenu ( CallBacker )
protectedvirtual
void uiTable::popupVirtualKeyboard ( int  globalx = -1,
int  globaly = -1 
)
void uiTable::removeAllSelections ( )
void uiTable::removeColumn ( int  )
void uiTable::removeColumn ( const RowCol rc)
inline
void uiTable::removeColumns ( const TypeSet< int > &  )
void uiTable::removeRCs ( const TypeSet< int > &  ,
bool  col 
)
protected
void uiTable::removeRow ( int  )
void uiTable::removeRow ( const RowCol rc)
inline
void uiTable::removeRows ( const TypeSet< int > &  )
void uiTable::resizeColumnsToContents ( )
void uiTable::resizeColumnToContents ( int  )
void uiTable::resizeHeaderToContents ( bool  hor)
void uiTable::resizeRowsToContents ( )
void uiTable::resizeRowToContents ( int  )
int uiTable::rowHeight ( int  ) const
const char* uiTable::rowLabel ( int  ) const
const char* uiTable::rowLabel ( const RowCol rc) const
inline
void uiTable::selectColumn ( int  col)
const ObjectSet<SelectionRange>& uiTable::selectedRanges ( ) const
void uiTable::selectItems ( const TypeSet< RowCol > &  ,
bool   
)
void uiTable::selectRow ( int  row)
void uiTable::setCellChecked ( const RowCol ,
bool  yn 
)
void uiTable::setCellGroup ( const RowCol ,
uiGroup  
)
Note
The uiObject should be given a NULL pointer as uiParent* at construction.
void uiTable::setCellObject ( const RowCol ,
uiObject  
)
Note
The uiObject should be given a NULL pointer as uiParent* at construction.
void uiTable::setCellReadOnly ( const RowCol ,
bool   
)
void uiTable::setCellToolTip ( const RowCol ,
const uiString  
)
void uiTable::setColor ( const RowCol ,
const Color  
)
void uiTable::setColumnLabel ( int  ,
const uiString  
)
void uiTable::setColumnLabel ( const RowCol rc,
const uiString lbl 
)
inline
void uiTable::setColumnLabels ( const char **  )
void uiTable::setColumnLabels ( const BufferStringSet )
void uiTable::setColumnReadOnly ( int  ,
bool   
)
void uiTable::setColumnResizeMode ( ResizeMode  )

Default is Stretch.

void uiTable::setColumnStretchable ( int  ,
bool   
)
void uiTable::setColumnToolTip ( int  ,
const uiString  
)
void uiTable::setColumnWidth ( int  col,
int  w 
)
void uiTable::setColumnWidthInChar ( int  col,
float  w 
)
void uiTable::setCurrentCell ( const RowCol ,
bool  noselection = false 
)
void uiTable::setDefaultColLabels ( )
void uiTable::setDefaultRowLabels ( )
void uiTable::setHeaderBackground ( int  ,
const Color ,
bool  isrow 
)
void uiTable::setLabelAlignment ( Alignment::HPos  ,
bool  cols 
)
void uiTable::setLabelBGColor ( int  ,
Color  ,
bool  isrow 
)
void uiTable::setLeftHeaderHidden ( bool  )
void uiTable::setLeftMargin ( int  )
void uiTable::setNotifiedCell ( const RowCol rc)
inline
void uiTable::setNrCols ( int  )
void uiTable::setNrRows ( int  )
void uiTable::setPixmap ( const RowCol ,
const uiPixmap  
)
void uiTable::setPrefHeightInRows ( int  )
void uiTable::setPrefWidthInChars ( int  )
void uiTable::setRowHeight ( int  row,
int  h 
)
void uiTable::setRowHeightInChar ( int  row,
float  h 
)
void uiTable::setRowLabel ( int  ,
const char *   
)
void uiTable::setRowLabel ( const RowCol rc,
const char *  lbl 
)
inline
void uiTable::setRowLabels ( const char **  )
void uiTable::setRowLabels ( const BufferStringSet )
void uiTable::setRowReadOnly ( int  ,
bool   
)
void uiTable::setRowResizeMode ( ResizeMode  )

Default is ResizeToContents.

void uiTable::setRowStretchable ( int  ,
bool   
)
void uiTable::setRowToolTip ( int  ,
const char *   
)
void uiTable::setSelected ( const RowCol ,
bool  yn = true 
)
void uiTable::setSelectionBehavior ( SelectionBehavior  )
void uiTable::setSelectionMode ( SelectionMode  )
void uiTable::setTableReadOnly ( bool  )
void uiTable::setText ( const RowCol ,
const char *   
)
void uiTable::setText ( const RowCol ,
const OD::String  
)
void uiTable::setText ( const RowCol ,
const uiString  
)
void uiTable::setTopHeaderHidden ( bool  )
void uiTable::setTopLeftCornerLabel ( const uiString )
void uiTable::setTopMargin ( int  )
Setup& uiTable::setup ( )
inline
const Setup& uiTable::setup ( ) const
inline
void uiTable::setValue ( const RowCol ,
int   
)
void uiTable::setValue ( const RowCol ,
float   
)
void uiTable::setValue ( const RowCol ,
float  ,
int  nrdec 
)
void uiTable::setValue ( const RowCol ,
double   
)
void uiTable::setValue ( const RowCol ,
double  ,
int  nrdec 
)
void uiTable::showGrid ( bool  )
const char* uiTable::text ( const RowCol ) const
void uiTable::update ( bool  row,
int  nr 
)
protected
void uiTable::updateCellSizes ( const uiSize sz = 0)
protected

Friends And Related Function Documentation

friend class uiTableBody
friend

Member Data Documentation

uiTableBody* uiTable::body_
private
OD::ButtonState uiTable::buttonstate_
protected
Notifier<uiTable> uiTable::colDeleted
Notifier<uiTable> uiTable::colInserted
CNotifier<uiTable,int> uiTable::columnClicked
uiLabel* uiTable::cornerlabel_
private
Notifier<uiTable> uiTable::doubleClicked
bool uiTable::istablereadonly_
protected
uiSize uiTable::lastsz
mutableprivate
Notifier<uiTable> uiTable::leftClicked
RowCol uiTable::newcell_
protected
RowCol uiTable::notifcell_
protected
TypeSet<RowCol> uiTable::notifcells_
protected
TypeSet<int> uiTable::notifcols_
protected
TypeSet<int> uiTable::notifrows_
protected
Notifier<uiTable> uiTable::rightClicked
CNotifier<uiTable,int> uiTable::rowClicked
Notifier<uiTable> uiTable::rowDeleted
Notifier<uiTable> uiTable::rowInserted
Notifier<uiTable> uiTable::selectionChanged
Notifier<uiTable> uiTable::selectionDeleted
bool uiTable::seliscols_
protected
ObjectSet<SelectionRange> uiTable::selranges_
mutableprotected
Setup uiTable::setup_
mutableprotected
Notifier<uiTable> uiTable::valueChanged

Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B. V. 2019