void set_wearing( mixed obj ) { object armor; if( !obj ) return; if( typeof(obj) == T_STRING ) { /* We've got to compile our own copy */ armor = clone_object( obj ); if( armor ) { armor->setup(); armor->move( this_object() ); if( !query_slot( armor->query_slot() ) ) { do_wear( armor ); } } } else { obj->move( this_object() ); if( !query_slot( obj->query_slot() ) ) { do_wear( obj ); } } }
MainWidget::MainWidget(QWidget *parent) : QWidget(parent), ui(new Ui::MainWidget) { ui->setupUi(this); setFixedSize(this->width(), this->height()); move((QApplication::desktop()->width()-this->width())/2, (QApplication::desktop()->height()-this->height())/2); this->setWindowTitle(tr("Ö÷½çÃæ")); m_wgt_create = new CreateWidget; m_wgt_import = new ImportWidget; m_wgt_query = new QueryWidget; connect(ui->m_btn_import, SIGNAL(clicked()), this, SLOT(import_slot())); connect(ui->m_btn_query, SIGNAL(clicked()), this, SLOT(query_slot())); connect(ui->m_btn_create, SIGNAL(clicked()), this, SLOT(create_slot())); connect(m_wgt_create, SIGNAL(back_sig(QWidget*)), this, SLOT(back_slot(QWidget*))); connect(m_wgt_import, SIGNAL(back_sig(QWidget*)), this, SLOT(back_slot(QWidget*))); connect(m_wgt_query, SIGNAL(back_sig(QWidget*)), this, SLOT(back_slot(QWidget*))); }