Exemplo n.º 1
0
void TupFramesTable::emitRequestSelectFrame(int currentRow, int currentColumn, int previousRow, int previousColumn)
{
     Q_UNUSED(previousRow);
     Q_UNUSED(previousColumn);

     if (k->frameIndex != currentColumn || k->layerIndex != currentRow) {
         k->frameIndex = currentColumn;
         k->layerIndex = currentRow;
         emit emitSelection(currentRow, currentColumn);
     }
}
Exemplo n.º 2
0
void TEWidget::mousePressEvent(QMouseEvent* ev)
{
//printf("press [%d,%d] %d\n",ev->x()/font_w,ev->y()/font_h,ev->button());
  if ( !contentsRect().contains(ev->pos()) ) return;
  QPoint tL  = contentsRect().topLeft();
  int    tLx = tL.x();
  int    tLy = tL.y();

  word_selection_mode = FALSE;

//printf("press top left [%d,%d] by=%d\n",tLx,tLy, bY);
  if ( ev->button() == LeftButton)
  {
    QPoint pos = QPoint((ev->x()-tLx-blX)/font_w,(ev->y()-tLy-bY)/font_h);

    //if ( ev->state() & ControlButton ) preserve_line_breaks = FALSE ;
    if ( ev->modifiers() & Qt::ControlModifier ) preserve_line_breaks = FALSE ;

    if (mouse_marks || (ev->modifiers() & Qt::ShiftModifier))
    {
      emit clearSelectionSignal();
      iPntSel = pntSel = pos;
      actSel = 1; // left mouse button pressed but nothing selected yet.
      grabMouse(   /*crossCursor*/  ); // handle with care! 
    }
    else
    {
      emit mouseSignal( 0, pos.x() + 1, pos.y() + 1 ); // left button
    }
  }
  if ( ev->button() == MidButton )
  {
    emitSelection();
  }
  if ( ev->button() == RightButton ) // Configure
  {
    emit configureRequest( this, ev->modifiers()&(Qt::ShiftModifier|Qt::ControlModifier), ev->x(), ev->y() );
  }
}
Exemplo n.º 3
0
void TEWidget::pasteClipboard( )
{
  emitSelection();
}