bool Window::xml_start(const QString & qName, const QXmlAttributes & atts) { //printf("Procesando window\n"); if(qName=="window") { QString title=atts.value("title"); if(!title.isEmpty()) widget->setWindowTitle ( atts.value("title") ); QString maximize=atts.value("maximize"); if( !maximize.isEmpty() ) { if(maximize=="true") ((mWindow*)widget)->window_maximized_ok=true; else ((mWindow*)widget)->window_maximized_ok=false; } QString minimize=atts.value("minimize"); if( !minimize.isEmpty() ) { if(minimize=="true") widget->showMinimized(); else widget->showNormal(); } widget_properties(atts,this); return true; } return false; }
bool Button::xml_start(const QString & qName, const QXmlAttributes & atts) { //printf("Procesando botón %s\n",qName.toLocal8Bit().data() ); //mButton *w=(mButton *)widget; if(qName=="button" && check_id(atts) ) { //QString icon=atts.value("icon"); //if(!title.isEmpty()) widget->setWindowTitle ( atts.value("title") ); widget_properties(atts,this); return true; } else if(qName=="text") { return true; } else if(qName=="icon") { return true; } else if(qName=="signal") { QString signal=atts.value("name"); if(signal=="clicked") QObject::connect((mButton*)widget, SIGNAL(clicked()), (mButton*)widget, SLOT(clicked_cb()) ); return true; } return false; }
void CommunicationModule::AddWidgetToUi(const QString &name) { boost::shared_ptr<UiServices::UiModule> ui_module = framework_->GetModuleManager()->GetModule<UiServices::UiModule>(Foundation::Module::MT_UiServices).lock(); if (ui_module.get()) { if (name == "IM") { UiServices::UiWidgetProperties widget_properties(name, UiServices::SceneWidget); im_ui_proxy_widget_ = ui_module->GetInworldSceneController()->AddWidgetToScene(im_ui_, widget_properties); if (im_ui_proxy_widget_) ui_module->GetInworldSceneController()->SetImWidget(im_ui_proxy_widget_); } } }
void SessionManager::CreateFriendListWidget() { SAFE_DELETE(friend_list_widget_); friend_list_widget_ = new CommunicationUI::FriendListWidget(im_connection_, session_helper_, framework_); // Add friend list to scene, no toolbar button boost::shared_ptr<UiServices::UiModule> ui_module = framework_->GetModuleManager()->GetModule<UiServices::UiModule>(Foundation::Module::MT_UiServices).lock(); if (ui_module.get()) { UiServices::UiWidgetProperties widget_properties("Friends List", UiServices::SceneWidget); ui_module->GetInworldSceneController()->AddWidgetToScene(friend_list_widget_, widget_properties); } connect(friend_list_widget_, SIGNAL( StatusChanged(const QString &) ), session_helper_, SLOT( SetMyStatus(const QString &) )); connect(friend_list_widget_, SIGNAL( NewChatSessionStarted(Communication::ChatSessionInterface *, QString &) ), session_helper_, SLOT( CreateNewChatSessionWidget(Communication::ChatSessionInterface *, QString &) )); connect(friend_list_widget_, SIGNAL( NewVideoSessionStarted(Communication::VoiceSessionInterface *, QString &) ), session_helper_, SLOT( CreateNewVideoSessionWidget(Communication::VoiceSessionInterface *, QString &) )); }
void ScriptDialogHandler::ShowDialog(ScriptDialogRequest& request) { boost::shared_ptr<UiServices::UiModule> ui_module = framework_->GetModuleManager()->GetModule<UiServices::UiModule>(Foundation::Module::MT_UiServices).lock(); if ( !ui_module.get()) { // todo: LogError: "Cannot show ScriptDialogWidget, ui_module pointer not valid." return; } QString widget_name = "Message from object"; ScriptDialogWidget* widget = new ScriptDialogWidget(request, framework_); dialogs_.append(widget); connect(widget, SIGNAL( OnClosed(s32, QString)), this, SLOT( OnDialogClosed(s32, QString)) ); UiServices::UiWidgetProperties widget_properties(widget_name, UiServices::SceneWidget); UiServices::UiProxyWidget *proxy_widget = ui_module->GetInworldSceneController()->AddWidgetToScene(widget, widget_properties); // we don't need to store a proxy widget here.. proxy_widget->show(); }
bool VSeparator::xml_start(const QString & qName, const QXmlAttributes & atts) { //printf("Procesando vseparator %s start %s\n", name.toLocal8Bit().data(),qName.toLocal8Bit().data()); if(qName=="vseparator" && check_id(atts) ) { widget_properties(atts,this); child=0; return true; } else if(qName=="first") { child=1; return true; } else if(qName=="second") { child=2; return true; } return false; }