Example #1
0
File: osgcopy.cpp Project: 3dcl/osg
 virtual osg::Referenced*     operator() (const osg::Referenced* ref) const
 {
     writeIndent(); std::cout << "copying Referenced "<<ref<<std::endl;
     moveIn();
     osg::Referenced* ret_ref = CopyOp::operator()(ref);
     moveOut();
     return ret_ref;
 }
Example #2
0
void AutoCloseMessageBox::start() {
    m_counter = Steps;
    m_animationTimer.setInterval(Interval);
    m_animationTimer.setSingleShot(false);
    connect(&m_animationTimer, SIGNAL(timeout()), this, SLOT(moveOut()));
    m_movingState = MovingOut;
    m_animationTimer.start();
    show();
}
Example #3
0
File: osgcopy.cpp Project: 3dcl/osg
 virtual osg::Texture*        operator() (const osg::Texture* text) const
 {
     writeIndent(); std::cout << "copying Texture "<<text;
     if (text) std::cout<<" "<<text->className();
     std::cout<<std::endl;
     moveIn();
     osg::Texture* ret_text = CopyOp::operator()(text);
     moveOut();
     return ret_text;
 }
Example #4
0
File: osgcopy.cpp Project: 3dcl/osg
 virtual osg::StateSet*       operator() (const osg::StateSet* stateset) const
 {
     writeIndent(); std::cout << "copying StateSet "<<stateset;
     if (stateset) std::cout<<" "<<stateset->className();
     std::cout<<std::endl;
     moveIn();
     osg::StateSet* ret_stateset = CopyOp::operator()(stateset);
     moveOut();
     return ret_stateset;
 }
Example #5
0
File: osgcopy.cpp Project: 3dcl/osg
 virtual osg::Drawable*       operator() (const osg::Drawable* drawable) const
 {
     writeIndent(); std::cout << "copying Drawable "<<drawable;
     if (drawable) std::cout<<" "<<drawable->className();
     std::cout<<std::endl;
     moveIn();
     osg::Drawable* ret_drawable = CopyOp::operator()(drawable);
     moveOut();
     return ret_drawable;
 }
Example #6
0
File: osgcopy.cpp Project: 3dcl/osg
 virtual osg::Node*           operator() (const osg::Node* node) const
 {
     writeIndent(); std::cout << "copying Node "<<node;
     if (node) std::cout<<" "<<node->className()<<" '"<<node->getName()<<"'";
     std::cout<<std::endl;
     moveIn();
     osg::Node* ret_node = CopyOp::operator()(node);
     moveOut();
     return ret_node;
 }
Example #7
0
File: osgcopy.cpp Project: 3dcl/osg
 virtual osg::Object*         operator() (const osg::Object* obj) const
 {
     writeIndent(); std::cout << "copying Object "<<obj;
     if (obj) std::cout<<" "<<obj->className();
     std::cout<<std::endl;
     moveIn();
     osg::Object* ret_obj = CopyOp::operator()(obj);
     moveOut();
     return ret_obj;
 }
Example #8
0
File: osgcopy.cpp Project: 3dcl/osg
 virtual osg::Image*          operator() (const osg::Image* image) const
 {
     writeIndent(); std::cout << "copying Image "<<image;
     if (image) std::cout<<" "<<image->className();
     std::cout<<std::endl;
     moveIn();
     osg::Image* ret_image = CopyOp::operator()(image);
     moveOut();
     return ret_image;
 }
Example #9
0
File: osgcopy.cpp Project: 3dcl/osg
 virtual osg::StateAttribute* operator() (const osg::StateAttribute* attr) const
 {
     writeIndent(); std::cout << "copying StateAttribute "<<attr;
     if (attr) std::cout<<" "<<attr->className();
     std::cout<<std::endl;
     moveIn();
     osg::StateAttribute* ret_attr = CopyOp::operator()(attr);
     moveOut();
     return ret_attr;
 }
Example #10
0
void LevelEditor::wheelScrolled(QWheelEvent *event)
{
    if (currentView == EDITING_LEVEL_VIEW)
    {
        if (event->delta() < 0)
            moveIn();
        else
            moveOut();

        checkMousePosition(lastMouseX, lastMouseY);
    }
}
void AutoCloseMessageBox::start() {
	m_counter = Steps;
	m_animationTimer.setInterval(Interval);
	m_animationTimer.setSingleShot(false);
	connect(&m_animationTimer, SIGNAL(timeout()), this, SLOT(moveOut()));
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
    m_animationTimer.setTimerType(Qt::PreciseTimer);
#endif
    m_movingState = MovingOut;
	m_animationTimer.start();
	show();
}
void AutoCloseMessageBox::mousePressEvent(QMouseEvent * event) {
	Q_UNUSED(event);

	if (m_movingState != MovingBack) {
		m_animationTimer.stop();
		if (m_movingState == MovingOut) {
			disconnect(&m_animationTimer, SIGNAL(timeout()), this, SLOT(moveOut()));
		}
		else if (m_movingState == Waiting) {
			disconnect(&m_animationTimer, SIGNAL(timeout()), this, SLOT(wait()));
		}

		prepMoveBack();
	}
}
void AutoCloseMessageBox::moveBack() {
	if (--m_counter == 0) {
		m_animationTimer.stop();
		disconnect(&m_animationTimer, SIGNAL(timeout()), this, SLOT(moveOut()));
		QRect r = geometry();
		r.moveTo(m_startX, m_startY);
		setGeometry(r);
		this->deleteLater();
		return;
	}

	QRect r = geometry();
	int dx = (m_startX - r.x()) / m_counter;
	int dy = (m_startY - r.y()) / m_counter;
	r.translate(dx, dy);
	setGeometry(r);
}
void AutoCloseMessageBox::moveOut() {
	if (--m_counter == 0) {
		m_animationTimer.stop();
		disconnect(&m_animationTimer, SIGNAL(timeout()), this, SLOT(moveOut()));
		m_movingState = Waiting;
		QRect r = geometry();
		r.moveTo(m_endX, m_endY);
		setGeometry(r);
		m_counter = Wait;
		connect(&m_animationTimer, SIGNAL(timeout()), this, SLOT(wait()));
		m_animationTimer.start();
		return;
	}

	QRect r = geometry();
	int dx = (m_endX - r.x()) / m_counter;
	int dy = (m_endY - r.y()) / m_counter;
	r.translate(dx, dy);
	setGeometry(r);
}
Example #15
0
/*
** ===================================================================
**     Method      :  Timer_Stop 
**    Description : Detiene la cuenta del timer
** ===================================================================
*/
void Timer_Stop(struct Timer * self){  
  moveOut(self->baseTimer,self);
}
void LoginRegDialog::destroy()
{
    moveOut();
}
Example #17
0
void LevelEditor::keyPressed(QKeyEvent *event)
{
    if (isMoving)
        return;

    currentError.clear();
    int key = event->key();

    switch (key)
    {
    case Qt::Key_Escape:
        buttonBackTriggered();
        break;

    case Qt::Key_Backspace:
        if (currentView == SET_NAME_VIEW)
        {
            emit playEffect(EFFECT_JUMP);
            currentName = currentName.left(currentName.length() - 1);

            formSetLevelName->~CubeStringList();
            formSetLevelName = new CubeStringList(currentName, 14.0f, 6.0f, alphabet, 2.0f, FORM_SET_LEVEL_NAME);
        }
        else
        {
            buttonBackTriggered();
        }

        break;

    case Qt::Key_Enter:
    case Qt::Key_Return:
        buttonNextTriggered();
        break;

    case Qt::Key_Up:
        if (currentView == SET_PARAM_VIEW)
        {
            lengthen();
        }
        else if (currentView == EDITING_LEVEL_VIEW)
        {
            moveIn();
            checkMousePosition(lastMouseX, lastMouseY);
        }

        break;

    case Qt::Key_Down:
        if (currentView == SET_PARAM_VIEW)
        {
            shorten();
        }
        else if (currentView == EDITING_LEVEL_VIEW)
        {
            moveOut();
            checkMousePosition(lastMouseX, lastMouseY);
        }

        break;

    case Qt::Key_Left:

        if (currentView == SET_PARAM_VIEW)
            reduce();
        else if (currentView == SET_GRAVITY_VIEW)
            gravityMinus();
        break;

    case Qt::Key_Right:


        if (currentView == SET_PARAM_VIEW)
            enlarge();
        else if (currentView == SET_GRAVITY_VIEW)
            gravityPlus();
        break;

    default:
        if ((key >= Qt::Key_A && key <= Qt::Key_Z) || (key >= Qt::Key_0 && key <= Qt::Key_9) || key == Qt::Key_Space)
            letterTyped(key);
        break;
    }
}