17 #include <QHeaderView> 19 #include <QTableWidget> 20 #include <QTableWidgetItem> 42 connect( sndr, SIGNAL(cellChanged(
int,
int)),
45 connect( sndr, SIGNAL(cellClicked(
int,
int)),
51 connect( sndr, SIGNAL(cellDoubleClicked(
int,
int)),
60 connect( sndr->verticalHeader(), SIGNAL(sectionClicked(
int)),
62 connect( sndr->horizontalHeader(), SIGNAL(sectionClicked(
int)),
65 connect( sndr->verticalHeader(), SIGNAL(sectionPressed(
int)),
67 connect( sndr->horizontalHeader(), SIGNAL(sectionPressed(
int)),
70 connect( sndr->verticalHeader(), SIGNAL(sectionDoubleClicked(
int)),
72 connect( sndr->horizontalHeader(), SIGNAL(sectionDoubleClicked(
int)),
86 #define mTriggerBody( notifier, row, col, triggerstatement ) \ 88 BufferString msg = #notifier; \ 89 msg += " "; msg += row; \ 90 msg += " "; msg += col; \ 91 const int refnr = receiver_->beginCmdRecEvent( msg ); \ 93 receiver_->endCmdRecEvent( refnr, msg ); \ 96 #define mNoTrigger( notifier, row, col ) \ 97 mTriggerBody( notifier, row, col, ) 99 #define mTrigger( notifier, row, col ) \ 100 mTriggerBody( notifier, row, col, receiver_->notifier.trigger(*receiver_) ) 102 #define mHeaderTriggerBody( notifier, idx, vertical, triggerstatement ) \ 103 mTriggerBody( notifier, (vertical ? idx : -1), (vertical ? -1 : idx), \ 106 #define mNoHeaderTrigger( notifier, idx, vertical ) \ 107 mHeaderTriggerBody( notifier, idx, vertical, ) 109 #define mHeaderTrigger( notifier, idx, vertical ) \ 110 mHeaderTriggerBody( notifier, idx, vertical, \ 111 receiver_->notifier.trigger(idx, *receiver_ ) ) 139 {
mTrigger( selectionChanged, -1, -1 ); }
157 if ( idx == lastpressedheaderidx_ )
166 if ( idx == lastpressedheaderidx_ )
173 lastpressedheaderidx_ = idx;
180 lastpressedheaderidx_ = idx;
195 #undef mHeaderTriggerBody 196 #undef mNoHeaderTrigger 197 #undef mHeaderTrigger friend class uiTableBody
Definition: i_qtable.h:34
void cellEntered(int row, int col)
Definition: i_qtable.h:149
void clicked(int row, int col)
Definition: i_qtable.h:121
virtual ~i_tableMessenger()
Definition: i_qtable.h:76
void itemSelectionChanged()
Definition: i_qtable.h:138
#define mNoHeaderTrigger(notifier, idx, vertical)
Definition: i_qtable.h:106
int lastpressedheaderidx_
Definition: i_qtable.h:82
void rowClicked(int idx)
Definition: i_qtable.h:153
void rowDoubleClicked(int idx)
Definition: i_qtable.h:185
QTableWidget * sender_
Definition: i_qtable.h:81
void columnDoubleClicked(int idx)
Definition: i_qtable.h:189
void rowPressed(int idx)
Definition: i_qtable.h:171
void valueChanged(int row, int col)
Definition: i_qtable.h:114
#define mHeaderTrigger(notifier, idx, vertical)
Definition: i_qtable.h:109
OD::ButtonState buttonstate_
Definition: uitable.h:347
#define mTrigger(notifier, row, col)
Definition: i_qtable.h:99
Helper class for uiTable to relay Qt's 'activated' messages to uiAction.
Definition: i_qtable.h:31
IdxPair used for its row() and col().
Definition: rowcol.h:25
#define mNoTrigger(notifier, row, col)
Definition: i_qtable.h:96
void columnPressed(int idx)
Definition: i_qtable.h:178
RowCol notifcell_
Definition: uitable.h:337
void cellPressed(int row, int col)
Definition: i_qtable.h:142
i_tableMessenger(QTableWidget *sndr, uiTable *receiver)
Definition: i_qtable.h:37
void doubleClicked(int row, int col)
Definition: i_qtable.h:131
uiTable * receiver_
Definition: i_qtable.h:80
void columnClicked(int idx)
Definition: i_qtable.h:162