|
|
|
@ -227,7 +227,7 @@ void TableFieldWidget::updateFieldHook(Data::FieldPtr, Data::FieldPtr newField_)
|
|
|
|
|
bool TableFieldWidget::eventFilter(TQObject* obj_, TQEvent* ev_) {
|
|
|
|
|
if(ev_->type() == TQEvent::MouseButtonPress
|
|
|
|
|
&& TQT_TQMOUSEEVENT(ev_)->button() == Qt::RightButton) {
|
|
|
|
|
if(TQT_BASE_OBJECT(obj_) == TQT_BASE_OBJECT(m_table->horizontalHeader())) {
|
|
|
|
|
if(obj_ == m_table->horizontalHeader()) {
|
|
|
|
|
TQMouseEvent* ev = TQT_TQMOUSEEVENT(ev_);
|
|
|
|
|
// might be scrolled
|
|
|
|
|
int pos = ev->x() + m_table->horizontalHeader()->offset();
|
|
|
|
@ -242,7 +242,7 @@ bool TableFieldWidget::eventFilter(TQObject* obj_, TQEvent* ev_) {
|
|
|
|
|
this, TQT_SLOT(slotRenameColumn()));
|
|
|
|
|
menu.exec(ev->globalPos());
|
|
|
|
|
return true;
|
|
|
|
|
} else if(TQT_BASE_OBJECT(obj_) == TQT_BASE_OBJECT(m_table->verticalHeader())) {
|
|
|
|
|
} else if(obj_ == m_table->verticalHeader()) {
|
|
|
|
|
TQMouseEvent* ev = TQT_TQMOUSEEVENT(ev_);
|
|
|
|
|
// might be scrolled
|
|
|
|
|
int pos = ev->y() + m_table->verticalHeader()->offset();
|
|
|
|
|