示例#1
0
void gAction::moveAction(int frame_a) {

	/* easy one: delete previous action and record the new ones. As usual,
	 * SINGLE_PRESS requires two jobs. If frame_a is valid, use that frame
	 * value. */

	delAction();

	if (frame_a != -1)
		this->frame_a = frame_a;
	else
		this->frame_a = xToFrame_a();


	/* always check frame parity */

	if (this->frame_a % 2 != 0)
		this->frame_a++;

	recorder::rec(parent->chan->index, type, this->frame_a);

	if (parent->chan->mode == SINGLE_PRESS) {
		frame_b = xToFrame_b();
		recorder::rec(parent->chan->index, ACTION_KEYREL, frame_b);
	}

	recorder::sortActions();
}
示例#2
0
void DelUserWnd::on_delButton_clicked()
{
    QList<QListWidgetItem *> selected;
    for(int i=0;i<ui->listWidget->count();i++)
    {
        if(Qt::Checked == ui->listWidget->item(i)->checkState())
        {
            selected.push_back(ui->listWidget->item(i));
        }
    }
    QString user;
    for(int i=0;i<selected.count();i++)
    {
        user = selected.at(i)->text();
        this->usersToDel.append(user);
    }
    emit delAction(this);
}
示例#3
0
void gAction::moveAction() {

	/* easy one: delete previous action and record the new ones. As usual,
	 * SINGLE_PRESS requires two jobs */

	delAction();

	/* frame update. The offset of gActionChannel is calculated by going up
	 * to the parent ( x()-parent->ac->x() ) */

	frame_a = (x()-parent->ac->x())*parent->zoom*2;
	recorder::rec(parent->chan, type, frame_a);

	if (G_Mixer.chanMode[parent->chan] == SINGLE_PRESS) {
		frame_b = (x()+w()-parent->ac->x())*parent->zoom*2;;
		recorder::rec(parent->chan, ACTION_KEYREL, frame_b);
	}

	recorder::sortActions();
}