Ejemplo n.º 1
0
void TupFramesTable::emitFrameSelected(int col)
{
    selectColumn(col);
    
    TupFramesTableItem *item = dynamic_cast<TupFramesTableItem *>(this->item(currentRow(), col));
    
    if (item) {
        if (item->isUsed())
            emit emitRequestChangeFrame(k->sceneIndex, verticalHeader()->visualIndex(this->row(item)), this->column(item));
            //emit frameRequest(TupProjectActionBar::SelectFrame, this->column(item), verticalHeader()->visualIndex(this->row(item)), -1);
    } 
}
bool PreviewTable::eventFilter(QObject *object, QEvent *e)
{
	Q3Header *hheader = horizontalHeader();
	if (e->type() == QEvent::MouseButtonPress && object == (QObject*)hheader) {
		const QMouseEvent *me = (const QMouseEvent *)e;
		clearSelection();
		int col = hheader->sectionAt (me->pos().x() + hheader->offset());
		if (col >= 0 && col < numCols()){
			QRect rect = hheader->sectionRect(col);
			rect.setLeft(rect.left() + 2);
			rect.setRight(rect.right() - 2);
			if (rect.contains (me->pos())){
				selectColumn(col);
				d_selected_column = col;
				showColTypeDialog();
				return true;
			}
		}
	}
	return Q3Table::eventFilter(object, e);
}
Ejemplo n.º 3
0
void Spreadsheet::selectCurrentColumn()
{
    selectColumn(currentColumn());
}