void TimelineButton::populateFromAction(Action* other)
{
    for (uint i=0;i<keyFrames.size();i++)
            delete keyFrames[i];

    keyFrames.clear();

    for (uint i=0;i<other->keyFrames.size();i++)
        {
        keyFrames.push_back(new key);
        *(keyFrames[i])=*(other->keyFrames[i]);
        }

    connectAction(other);

    // connect buttons in parent
    for( uint i = 0; i < ((TimelineInspector*)parent)->listButton.size(); i++)
    {
        if( ((TimelineInspector*)parent)->listButton[i]->name=="make" )
        {
            ((TimelineInspector*)parent)->listButton[i]->name="connect";
            ((TimelineInspector*)parent)->listButton[i]->color = Vector4f(1,0,0,1);
        }
   }

}
bool ActionListView::qt_emit( int _id, QUObject* _o )
{
    switch ( _id - staticMetaObject()->signalOffset() ) {
    case 0: insertAction(); break;
    case 1: insertActionGroup(); break;
    case 2: insertDropDownActionGroup(); break;
    case 3: deleteAction(); break;
    case 4: connectAction(); break;
    default:
	return QListView::qt_emit(_id,_o);
    }
    return TRUE;
}
Beispiel #3
0
    void resource::dispatch(
        const reactive::http::request& request_,
        const reactive::web::router::parameters& parameters_,
        reactive::http::response& response_
    ) const
    {
        // call preDispatch
        preDispatch(request_, parameters_, response_);

        if (request_.isGet())
        {
            getAction(request_, parameters_, response_);
        }
        else if (request_.isPost())
        {
            postAction(request_, parameters_, response_);
        }
        else if (request_.isPut())
        {
            putAction(request_, parameters_, response_);
        }
        else if (request_.isDelete())
        {
            deleteAction(request_, parameters_, response_);
        }
        else if (request_.isOptions())
        {
            optionsAction(request_, parameters_, response_);
        }
        else if (request_.isTrace())
        {
            traceAction(request_, parameters_, response_);
        }
        else if (request_.isPatch())
        {
            patchAction(request_, parameters_, response_);
        }
        else if (request_.isConnect())
        {
            connectAction(request_, parameters_, response_);
        }
        else
        {
            response_.setStatusCode(reactive::http::status::METHOD_NOT_ALLOWED);
        }

        // call postDispatch
        postDispatch(request_, parameters_, response_);
    }
Beispiel #4
0
int Babel::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QMainWindow::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: connectAction(); break;
        case 1: configureServer(); break;
        case 2: configureServerDestroy((*reinterpret_cast< QObject*(*)>(_a[1]))); break;
        case 3: buttonEffect((*reinterpret_cast< const QString(*)>(_a[1]))); break;
        default: ;
        }
        _id -= 4;
    }
    return _id;
}
Beispiel #5
0
MainWindow::MainWindow(QWidget *parent)
	: QMainWindow(parent, 0), m_ui(new Ui::MainWindow)
{
	m_ui->setupUi(this);

	//设置主窗口标题
	setWindowTitle(QStringLiteral("行为树编辑器"));
	//text = new QTextEdit(this);
	//setCentralWidget(text);

	//createActions();
	//createMenus();
	//createToolBars();

	connectAction();
	createDockWidget();

	m_aaa.sayHello();
}
ActionEditor::ActionEditor( QWidget* parent,  const char* name, WFlags fl )
    : ActionEditorBase( parent, name, fl ), currentAction( 0 ), formWindow( 0 ),
    explicitlyClosed(false)
{
    listActions->addColumn( i18n( "Actions" ) );
    setEnabled( FALSE );
    buttonConnect->setEnabled( FALSE );

    QPopupMenu *popup = new QPopupMenu( this );
    popup->insertItem( i18n( "New &Action" ), this, SLOT( newAction() ) );
    popup->insertItem( i18n( "New Action &Group" ), this, SLOT( newActionGroup() ) );
    popup->insertItem( i18n( "New &Dropdown Action Group" ), this, SLOT( newDropDownActionGroup() ) );
    buttonNewAction->setPopup( popup );
    buttonNewAction->setPopupDelay( 0 );

    connect( listActions, SIGNAL( insertAction() ), this, SLOT( newAction() ) );
    connect( listActions, SIGNAL( insertActionGroup() ), this, SLOT( newActionGroup() ) );
    connect( listActions, SIGNAL( insertDropDownActionGroup() ), this, SLOT( newDropDownActionGroup() ) );
    connect( listActions, SIGNAL( deleteAction() ), this, SLOT( deleteAction() ) );
    connect( listActions, SIGNAL( connectAction() ), this, SLOT( connectionsClicked() ) );
}
Beispiel #7
0
void MainWindow::createActions()
{

	connect(m_ui->actionAbout, SIGNAL(triggered()), this, SLOT(showAbout()));
	connect(m_ui->actionDocumentation, SIGNAL(triggered()), this, SLOT(showDocumentation()));
	connect(m_ui->actionExport, SIGNAL(triggered()), this, SLOT(exportToKME()));
	connect(m_ui->actionGraph, SIGNAL(triggered()), this, SLOT(viewGraph()));
	connect(m_ui->actionJoints, SIGNAL(triggered()), this, SLOT(viewJoints()));
	connect(m_ui->actionNao_Academics, SIGNAL(triggered()), this, SLOT(setNaoAcademics()));
	connect(m_ui->actionNao_RC_Edition, SIGNAL(triggered()), this, SLOT(setNaoRC()));
	connect(m_ui->actionNew, SIGNAL(triggered()), this, SLOT(newFile()));
	connect(m_ui->actionOpen, SIGNAL(triggered()), this, SLOT(openFile()));
	connect(m_ui->actionOpen_Robot, SIGNAL(triggered()), this, SLOT(loadNewRobot()));
	connect(m_ui->actionQuit, SIGNAL(triggered()), this, SLOT(close()));

	connect(dlg, SIGNAL(slidersClosed(bool)),m_ui->actionJoints, SLOT(setChecked(bool)));
	connect(m_ui->poseEditor, SIGNAL(cellChanged(int, int)), this, SLOT(somethingChanged()));

	//Pose Editor
	connect(m_ui->moveUpPoseButton, SIGNAL(clicked()), this, SLOT(moveUpAction()));
	connect(m_ui->moveDownPoseButton, SIGNAL(clicked()), this, SLOT(moveDownAction()));
	connect(m_ui->swapPoseButton, SIGNAL(clicked()), this, SLOT(swapAction()));
	connect(m_ui->removePoseButton, SIGNAL(clicked()), this, SLOT(removeAction()));
	connect(m_ui->storePoseButton, SIGNAL(clicked()), this, SLOT(storePoseAction()));
	connect(m_ui->insertPoseButton, SIGNAL(clicked()), this, SLOT(insertPoseAction()));

	//Play Motion
	connect(m_ui->gotoPoseButton, SIGNAL(clicked()), this, SLOT(gotoPoseAction()));
	connect(m_ui->stepPoseButton, SIGNAL(clicked()), this, SLOT(stepPoseAction()));
	connect(m_ui->playMotionButton, SIGNAL(clicked()), this, SLOT(playMotionAction()));
	connect(m_ui->stiffOn, SIGNAL(clicked()), this, SLOT(stiffOnAction()));
	connect(m_ui->stiffOff, SIGNAL(clicked()), this, SLOT(stiffOffAction()));

	//Networking
	connect(m_ui->connectButton, SIGNAL(clicked()), this, SLOT(connectAction()));

	//Sliders
	connect(dlg->jointsUI, SIGNAL(poseChanged()), this, SLOT(sendPose()));

}
Beispiel #8
0
void ActionListView::rmbMenu( QListViewItem *i, const QPoint &p )
{
    QPopupMenu *popup = new QPopupMenu( this );
    popup->insertItem( tr( "New &Action" ), 0 );
    popup->insertItem( tr( "New Action &Group" ), 1 );
    popup->insertItem( tr( "New &Dropdown Action Group" ), 2 );
    if ( i ) {
	popup->insertSeparator();
	popup->insertItem( tr( "&Connect Action..." ), 3 );
	popup->insertSeparator();
	popup->insertItem( tr( "Delete Action" ), 4 );
    }
    int res = popup->exec( p );
    if ( res == 0 )
	emit insertAction();
    else if ( res == 1 )
	emit insertActionGroup();
    else if ( res == 2 )
	emit insertDropDownActionGroup();
    else if ( res == 3 )
	emit connectAction();
    else if ( res == 4 )
	emit deleteAction();
}
Beispiel #9
0
void CContactManager::requestWXSync(const ZBaseRequestParam &baseRequestParam, const Z_WX_SyncKeyList &syncKeyList)
{
    connectAction(ZPublicAction::createWXSync(baseRequestParam,syncKeyList));
}
Beispiel #10
0
void CContactManager::requestContactGroup(const ZBaseRequestParam &baseRequestParam, const QStringList &groupNameList)
{
    connectAction(ZPublicAction::createGetGroup(baseRequestParam,groupNameList));
}
Beispiel #11
0
void CContactManager::requestContact(const ZBaseRequestParam &baseRequestParam)
{
    connectAction(ZPublicAction::createGetContact(baseRequestParam));
}