|
|
@ -226,9 +226,9 @@ void TableFieldWidget::updateFieldHook(Data::FieldPtr, Data::FieldPtr newField_)
|
|
|
|
|
|
|
|
|
|
|
|
bool TableFieldWidget::eventFilter(TQObject* obj_, TQEvent* ev_) {
|
|
|
|
bool TableFieldWidget::eventFilter(TQObject* obj_, TQEvent* ev_) {
|
|
|
|
if(ev_->type() == TQEvent::MouseButtonPress
|
|
|
|
if(ev_->type() == TQEvent::MouseButtonPress
|
|
|
|
&& TQT_TQMOUSEEVENT(ev_)->button() == TQt::RightButton) {
|
|
|
|
&& static_cast<TQMouseEvent*>(ev_)->button() == TQt::RightButton) {
|
|
|
|
if(obj_ == m_table->horizontalHeader()) {
|
|
|
|
if(obj_ == m_table->horizontalHeader()) {
|
|
|
|
TQMouseEvent* ev = TQT_TQMOUSEEVENT(ev_);
|
|
|
|
TQMouseEvent* ev = static_cast<TQMouseEvent*>(ev_);
|
|
|
|
// might be scrolled
|
|
|
|
// might be scrolled
|
|
|
|
int pos = ev->x() + m_table->horizontalHeader()->offset();
|
|
|
|
int pos = ev->x() + m_table->horizontalHeader()->offset();
|
|
|
|
int col = m_table->horizontalHeader()->sectionAt(pos);
|
|
|
|
int col = m_table->horizontalHeader()->sectionAt(pos);
|
|
|
@ -243,7 +243,7 @@ bool TableFieldWidget::eventFilter(TQObject* obj_, TQEvent* ev_) {
|
|
|
|
menu.exec(ev->globalPos());
|
|
|
|
menu.exec(ev->globalPos());
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
} else if(obj_ == m_table->verticalHeader()) {
|
|
|
|
} else if(obj_ == m_table->verticalHeader()) {
|
|
|
|
TQMouseEvent* ev = TQT_TQMOUSEEVENT(ev_);
|
|
|
|
TQMouseEvent* ev = static_cast<TQMouseEvent*>(ev_);
|
|
|
|
// might be scrolled
|
|
|
|
// might be scrolled
|
|
|
|
int pos = ev->y() + m_table->verticalHeader()->offset();
|
|
|
|
int pos = ev->y() + m_table->verticalHeader()->offset();
|
|
|
|
int row = m_table->verticalHeader()->sectionAt(pos);
|
|
|
|
int row = m_table->verticalHeader()->sectionAt(pos);
|
|
|
|