 |
OpendTect
6.6
|
Go to the documentation of this file.
14 #include "uibasemod.h"
33 friend class uiTableBody;
51 Interactive,
Stretch, Fixed, ResizeToContents
58 Setup(
int nrrows=-1,
int nrcols=-1)
59 : size_(nrrows,nrcols)
62 , insertrowallowed_(true)
63 , removerowallowed_(true)
65 , insertcolallowed_(true)
66 , removecolallowed_(true)
72 , mincolwdt_(1.f*
uiObject::baseFldSize())
74 , maxcolwdt_(2.3f*
uiObject::baseFldSize())
76 , selmode_(NoSelection)
77 , removeselallowed_(true)
81 , manualresize_(false)
85 , rightclickdisabled_(false)
87 , enablecopytext_(false)
117 insertrowallowed_ = removerowallowed_ = rowgrow_ =
118 insertcolallowed_ = removecolallowed_ = colgrow_ = !yn;
123 { rowdesc_ =
toUiString(desc);
return *
this; }
125 { coldesc_ =
toUiString(desc);
return *
this; }
208 { insertRows( rc.
row(), count ); }
211 { insertColumns( rc.
col(), count ); }
214 { removeRow( rc.
row() ); }
218 { removeColumn( rc.
col() ); }
231 {
return RowCol( currentRow(), currentCol() ); }
241 {
return rowLabel(rc.
row()); }
246 { setRowLabel( rc.
row(), lbl ); }
251 {
return columnLabel(rc.
col()); }
256 { setColumnLabel( rc.
col(), lbl ); }
274 {
return seliscols_ ? notifcols_ : notifrows_; }
319 : firstrow_(-1), lastrow_(-1)
320 , firstcol_(-1), lastcol_(-1) {}
322 int nrRows()
const {
return lastrow_-firstrow_+1; }
323 int nrCols()
const {
return lastcol_-firstcol_+1; }
377 double getdValue( const
RowCol& rc )
const
378 {
return getDValue( rc ); }
380 float getfValue( const
RowCol& rc )
const
381 {
return getFValue( rc ); }
384 void setRowLabel(
int idx, const
char* lbl )
387 void setRowLabels(const
char**);
389 void setRowLabel( const
RowCol& rc, const
char* lbl )
392 void setRowToolTip(
int idx, const
char* tt )
396 void setColumnLabel(
int idx, const
char* lbl )
399 void setColumnLabels(const
char**);
403 void setPrefWidthInChars(
int);
bool isColumnStretchable(int) const
CNotifier< uiTable, int > columnClicked
Definition: uitable.h:290
Notifier< uiTable > rowInserted
Definition: uitable.h:284
const TypeSet< RowCol > & getNotifCells() const
Definition: uitable.h:275
bool seliscols_
Definition: uitable.h:349
void setDefaultColLabels()
void setCellGroup(const RowCol &, uiGroup *)
void setTopHeaderHidden(bool)
RowCol notifcell_
Definition: uitable.h:345
int maxNrOfSelections() const
void setColumnResizeMode(ResizeMode)
Default is Stretch.
void setColumnLabels(const BufferStringSet &)
CNotifier< uiTable, int > rowClicked
Definition: uitable.h:289
Notifier< uiTable > selectionDeleted
Definition: uitable.h:286
void insertRows(int row, int count)
void setRowHeightInChar(int row, float h)
void setColumnToolTip(int, const uiString &)
void editCell(const RowCol &, bool replace=false)
Off-screen pixel-based paint device.
Definition: uipixmap.h:34
bool isRowStretchable(int) const
void selectItems(const TypeSet< RowCol > &, bool)
void resizeRowToContents(int)
bool isRowHidden(int) const
void setSelectionMode(SelectionMode)
@ SelectRows
Definition: uitable.h:46
void resizeRowsToContents()
Setup setup_
Definition: uitable.h:352
uiGroup * getCellGroup(const RowCol &) const
const char * rowLabel(const RowCol &rc) const
Definition: uitable.h:240
void showOuterFrame(bool)
bool isTableReadOnly() const
Definition: uistringset.h:23
Set of pointers to objects.
Definition: commontypes.h:31
int firstcol_
Definition: uitable.h:328
void setValue(const RowCol &, double, int nrdec)
Set of BufferString objects.
Definition: bufstringset.h:26
bool handleLongTabletPress()
Export_Basic uiString toUiString(ViewStyle)
void setCellToolTip(const RowCol &, const uiString &)
bool istablereadonly_
Definition: uitable.h:365
double getDValue(const RowCol &) const
bool isColumnHidden(int) const
float getFValue(const RowCol &) const
void clearCellObject(const RowCol &)
Setup(int nrrows=-1, int nrcols=-1)
Definition: uitable.h:58
#define od_int64
Definition: plftypes.h:35
bool getSelectedCells(TypeSet< RowCol > &) const
const TypeSet< int > & getNotifRCs() const
Definition: uitable.h:273
Notifier< uiTable > rowDeleted
Definition: uitable.h:285
ObjectSet< SelectionRange > selranges_
Definition: uitable.h:344
#define mExpClass(module)
Definition: commondefs.h:177
void cellObjChangedCB(CallBacker *)
void setValue(const RowCol &, float, int nrdec)
RowCol getCell(uiObject *)
bool isCellReadOnly(const RowCol &) const
bool isSelected(const RowCol &) const
void setNotifiedCell(const RowCol &rc)
Definition: uitable.h:271
int columnWidth(int) const
uiLabel * cornerlabel_
Definition: uitable.h:371
void setText(const RowCol &, const char *)
void setPrefHeightInRows(int)
RowCol getCell(uiGroup *)
int lastcol_
Definition: uitable.h:329
#define mDefSetupMemb(typ, memb)
Definition: commondefs.h:154
Definition: uistrings.h:27
void updateCellSizes(const uiSize *sz=0)
Inherit from this class to be able to send and/or receive CallBacks.
Definition: callback.h:185
Notifier< uiTable > selectionChanged
Definition: uitable.h:281
void setColumnReadOnly(int, bool)
IdxType & row()
Definition: posidxpair.h:44
const char * columnLabel(const RowCol &rc) const
Definition: uitable.h:250
int nrRows() const
Definition: uitable.h:322
Setup & coldesc(const char *desc)
Definition: uitable.h:124
int nrCols() const
Definition: uitable.h:323
void resizeColumnToContents(int)
ButtonState
Definition: keyenum.h:20
void removeRows(const TypeSet< int > &)
Notifier< uiTable > rightClicked
Definition: uitable.h:279
void resizeColumnsToContents()
mDeprecated("Use getDValue") double getdValue(const RowCol &rc) const
Definition: uitable.h:376
void setRowLabel(int, const uiString &)
void setValue(const RowCol &, double)
void setCellReadOnly(const RowCol &, bool)
void setPixmap(const RowCol &, const uiPixmap &)
mODTextTranslationClass(uiTable) friend class i_tableMessenger
const RowCol & newCell() const
Definition: uitable.h:283
bool isRowReadOnly(int) const
IdxType & col()
Definition: posidxpair.h:49
void popupVirtualKeyboard(int globalx=-1, int globaly=-1)
void setCurrentCell(const RowCol &, bool noselection=false)
uiTableBody * body_
Definition: uitable.h:369
void setColumnLabel(const RowCol &rc, const uiString &lbl)
Definition: uitable.h:255
void clearCell(const RowCol &)
void selectColumn(int col)
void setSelected(const RowCol &, bool yn=true)
void ensureCellVisible(const RowCol &)
HPos
Definition: draw.h:25
Color getColor(const RowCol &) const
void setTableReadOnly(bool)
void setHeaderBackground(int, const Color &, bool isrow)
Notifier< uiTable > valueChanged
Definition: uitable.h:277
TypeSet< int > notifrows_
Definition: uitable.h:347
ResizeMode
Definition: uitable.h:50
mDefSetupMemb(RowCol, size) mDefSetupMemb(uiString
void setCellChecked(const RowCol &, bool yn)
void setCellObject(const RowCol &, uiObject *)
TypeSet< int > notifcols_
Definition: uitable.h:348
void setRowLabel(const RowCol &rc, const uiString &lbl)
Definition: uitable.h:245
void removeAllSelections()
void setRowStretchable(int, bool)
uiTableBody & mkbody(uiParent *, const char *, int, int)
SelectionBehavior getSelBehavior() const
bool needOfVirtualKeyboard() const
od_int64 getInt64Value(const RowCol &) const
void setRowLabels(const BufferStringSet &)
#define mDeprecated(msg)
Definition: plfdefs.h:215
mDeprecated("Use uiString") void setColumnLabel(int idx
SelectionMode
Definition: uitable.h:37
void insertRows(const RowCol &rc, int count)
Definition: uitable.h:207
const ObjectSet< SelectionRange > & selectedRanges() const
void setRowResizeMode(ResizeMode)
Default is ResizeToContents.
void insertColumns(const RowCol &rc, int count)
Definition: uitable.h:210
void setRowToolTip(int, const uiString &)
int getIntValue(const RowCol &) const
bool getSelectedCols(TypeSet< int > &) const
SelectionBehavior
Definition: uitable.h:45
void setLabelAlignment(Alignment::HPos, bool cols)
void setColor(const RowCol &, const Color &)
void removeColumn(const RowCol &rc)
Definition: uitable.h:217
int lastrow_
Definition: uitable.h:326
mDeprecated("Use uiString") void setRowToolTip(int idx
void insertColumns(int col, int count)
void setRowLabels(const uiStringSet &)
void setValue(const RowCol &, float)
void removeColumns(const TypeSet< int > &)
RowCol currentCell() const
Definition: uitable.h:230
const Setup & setup() const
Definition: uitable.h:268
SelectionRange()
Definition: uitable.h:318
Notifier< uiTable > leftClicked
Definition: uitable.h:278
bool isColumnReadOnly(int) const
const char * columnLabel(int) const
void setRowReadOnly(int, bool)
bool isCellChecked(const RowCol &) const
void setDefaultRowLabels()
Notifier< uiTable > colInserted
Definition: uitable.h:287
virtual void popupMenu(CallBacker *)
void setRowHeight(int row, int h)
void setColumnLabel(int, const uiString &)
Setup & setup()
Definition: uitable.h:267
void setColumnWidthInChar(int col, float w)
Notifier< uiTable > colDeleted
Definition: uitable.h:288
void setColumnLabels(const uiStringSet &)
The base class for most UI elements.
Definition: uiobj.h:38
TypeSet< RowCol > notifcells_
Definition: uitable.h:346
RowCol newcell_
Definition: uitable.h:350
uiTable(uiParent *, const Setup &, const char *nm)
const char * text(const RowCol &) const
String that is able to hold international (UTF-8) strings for the user interface.
Definition: uistring.h:121
@ Stretch
Definition: uitable.h:51
mDeprecated("Use getFValue") float getfValue(const RowCol &rc) const
Definition: uitable.h:379
void setColumnStretchable(int, bool)
void setLeftHeaderHidden(bool)
encapsulates the read-access-only part of strings in OD.
Definition: odstring.h:31
uiObject * getCellObject(const RowCol &) const
@ Single
a single range of cells.
Definition: uitable.h:39
Color getHeaderBackground(int, bool isrow) const
bool isColumnSelected(int) const
void hideColumn(int, bool)
Notifier< uiTable > doubleClicked
Definition: uitable.h:280
void setSelectionBehavior(SelectionBehavior)
OD::ButtonState buttonstate_
Definition: uitable.h:355
void update(bool row, int nr)
bool isTopHeaderHidden() const
mDeprecated("Use uiStringSet") void setRowLabels(const char **)
void setValue(const RowCol &, od_int64)
IdxPair used for its row() and col().
Definition: rowcol.h:25
@ NoSelection
No cell can be selected by the user.
Definition: uitable.h:38
Definition: uiparent.h:26
Helper class for uiTable to relay Qt's 'activated' messages to uiAction.
Definition: i_qtable.h:31
void resizeHeaderToContents(bool hor)
void removeRow(const RowCol &rc)
Definition: uitable.h:213
void setLabelBGColor(int, Color, bool isrow)
uiSize lastsz
Definition: uitable.h:373
void setText(const RowCol &, const uiString &)
void setText(const RowCol &, const OD::String &)
Setup & rowdesc(const char *desc)
Definition: uitable.h:122
#define mDeprecatedDef
Definition: plfdefs.h:216
bool getSelectedRows(TypeSet< int > &) const
mDeprecated("Use uiStringSet") void setColumnLabels(const char **)
void setMouseTracking(bool)
Color is an RGB color object, with a transparancy. The storage is in a 4-byte integer,...
Definition: color.h:26
mDeprecated("Use uiString") void setRowLabel(int idx
int firstrow_
Definition: uitable.h:325
const RowCol & notifiedCell() const
Definition: uitable.h:270
bool isLeftHeaderHidden() const
void geometrySet_(CallBacker *)
@ Multi
multiple ranges of cells.
Definition: uitable.h:40
Definition: uitable.h:316
const char * rowLabel(int) const
void removeRCs(const TypeSet< int > &, bool col)
bool isRowSelected(int) const
void setValue(const RowCol &, int)
void setColumnWidth(int col, int w)
Generated at
for the OpendTect
seismic interpretation project.
Copyright (C): dGB Beheer B.V. 1995-2021