bool PopupMenuEditorItem::qt_invoke( int _id, QUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: selfDestruct(); break;
    default:
	return QObject::qt_invoke( _id, _o );
    }
    return TRUE;
}
void ScrollingBin::update(float dt) {
	sprite.SetX(floor(x));
	x += dt* 30;
	if (x > 300) {
		selfDestruct();
	}
	//sprite.Move (floor(dt*10), 0);
	return;
}
Exemple #3
0
PopupMenuEditorItem::PopupMenuEditorItem( PopupMenuEditor * menu, QObject * parent, const char * name )
    : QObject( parent, name ),
      a( 0 ),
      s( 0 ),
      m( menu ),
      separator( FALSE ),
      removable( FALSE )
{
    init();
    a = new QAction( this );
    QObject::connect( a, SIGNAL( destroyed() ), this, SLOT( selfDestruct() ) );
}
Exemple #4
0
void PopupMenuEditorItem::init()
{
    if ( a ) {
	QObject::connect( a, SIGNAL( destroyed() ), this, SLOT( selfDestruct() ) );
	if ( m && !isSeparator() ) {
	    s = new PopupMenuEditor( m->formWindow(), m );
	    QString n = "popupMenu";
	    m->formWindow()->unify( s, n, TRUE );
	    s->setName( n );
	    MetaDataBase::addEntry( s );
	}
    }
}
Exemple #5
0
// The method that executes in a separate thread
int Forwarder::svc(void)
{
// Start debug logfile for this thread.
// We only do this for debug level > 2 because you will
// get a great many of these files, particularly in the Proxy.
#if 0
    if(Options::Instance()->DebugLevel() > 2)
    {
        Logfile::Open("Fwd");
        char * s = CorbaUtil::Instance()->ObjectToString(client_.in());
        ACE_DEBUG(( LM_NOTICE, "%C Forwarder::svc thread started at %C\n"
            "Sending to:\n%C\n\n",
            type(),
            Timestamp::TimeDate(buf), s ));
        CORBA::string_free(s);
    }
#endif

    ACE_Message_Block *message;
    //MessageBlock *message_block;
    DataBlock *data_block;
    Package *data;
    bool success = false;
    int n;
    
    while ((n = this->getq(message)) != -1) {
        //ACE_DEBUG((LM_DEBUG, "We have pulled a message from the queue. "
        //           "There are %d messages remaining in the queue.\n", n));

        //message_block = ACE_dynamic_cast(MessageBlock *, message);
        data_block = dynamic_cast<DataBlock *>(message->data_block());
        data = data_block->data();

        success = forward(data);
        
        //ACE_DEBUG((LM_DEBUG, "Releasing message block.\n"));
        message->release();
        
        if (!success) {
            selfDestruct();
            this->flush();
        }
    }

    std::string date_time = DateTime::DateTimeNoSeparators();
    ACE_DEBUG((LM_DEBUG, "Exited message loop at %C\n",
        date_time.c_str() ));

    return 0;
}
void GlyphSliderGroup::addSlicesMap(int x, int y, int z, int alpha, int value)
{
	QVBoxLayout* tempOutLayout = new QVBoxLayout();
	QHBoxLayout* tempLayout = new QHBoxLayout();
	QPushButton* button = new QPushButton("Remove");
	QPushButton* buttonx = new QPushButton("X");
	QPushButton* buttony = new QPushButton("Y");
	QPushButton* buttonz = new QPushButton("Z");
	QPushButton* buttonv = new QPushButton("V");
	QPushButton* buttont = new QPushButton("Toggle");
	
	button -> setCheckable(1);
	buttonx -> setCheckable(1);
	buttony -> setCheckable(1);
	buttonz -> setCheckable(1);
	buttonv -> setCheckable(1);
	buttont -> setCheckable(1);
	buttonz -> setChecked(1);
	
	MapNode* current;
	QSlider* slider = new QSlider();
	current = cmaplist -> addMap(x, y, z, alpha, value);
	current -> setButtons(buttonx, buttony, buttonz, buttonv);
	slider -> setMaximum(256);
	slider -> setMinimum(1);
	slider -> setOrientation(Qt::Horizontal);
	connect(slider, SIGNAL(valueChanged(int)), current, SLOT(uValue(int)));
	connect(slider, SIGNAL(sliderPressed()), current, SLOT(setActive()));
	connect(button, SIGNAL(clicked()), button, SLOT(close()));
	connect(button, SIGNAL(clicked()), buttonx, SLOT(close()));
	connect(button, SIGNAL(clicked()), buttony, SLOT(close()));
	connect(button, SIGNAL(clicked()), buttonz, SLOT(close()));
	connect(button, SIGNAL(clicked()), buttonv, SLOT(close()));
	connect(button, SIGNAL(clicked()), buttont, SLOT(close()));
	connect(button, SIGNAL(clicked()), slider, SLOT(close()));
	
	
	connect(button, SIGNAL(clicked()), current, SLOT(selfDestruct()));
	connect(buttonx, SIGNAL(clicked()), current, SLOT(setX()));
	connect(buttony, SIGNAL(clicked()), current, SLOT(setY()));
	connect(buttonz, SIGNAL(clicked()), current, SLOT(setZ()));
	connect(buttonv, SIGNAL(clicked()), current, SLOT(setV()));
	connect(buttont, SIGNAL(clicked()), current, SLOT(setToggle()));
	
	connect(current, SIGNAL(closeMe()), button, SLOT(close()));
	connect(current, SIGNAL(closeMe()), buttonx, SLOT(close()));
	connect(current, SIGNAL(closeMe()), buttony, SLOT(close()));
	connect(current, SIGNAL(closeMe()), buttonz, SLOT(close()));
	connect(current, SIGNAL(closeMe()), buttonv, SLOT(close()));
	connect(current, SIGNAL(closeMe()), buttont, SLOT(close()));
	connect(current, SIGNAL(closeMe()), slider, SLOT(close()));
	
	//tempLayout->addWidget(slider);
	tempOutLayout->addWidget(slider);
	
	tempLayout->addWidget(buttonx);
	tempLayout->addWidget(buttony);
	tempLayout->addWidget(buttonz);
	tempLayout->addWidget(buttonv);
	tempLayout->addWidget(buttont);
	tempLayout->addWidget(button);
	tempOutLayout->addLayout(tempLayout);
	
	layout->addLayout(tempOutLayout);
	
	return;
}