void LoginDialog::authenticate() { SSHCredentials *cred = new SSHCredentials(); connect(cred, SIGNAL(authorized(SSHCredentials *)), this, SLOT(authorized(SSHCredentials *))); connect(cred, SIGNAL(denied(QString)), this, SLOT(denied(QString))); cred->Authenticate(wHost->text(), wUsername->text(), wPassword->text()); wConnect->SetBusyState("Connecting"); }
ResourceManager::ResourceManager() : QObject(), m_resources(0), m_result(false), m_waiting(false) { qRegisterMetaType<ResourcePolicy::ResourceSet*>("ResourcePolicy::ResourceSet*"); qRegisterMetaType<ResourcePolicy::ResourceType>("ResourcePolicy::ResourceType"); qRegisterMetaType<QList<ResourcePolicy::ResourceType> >("QList<ResourcePolicy::ResourceType>"); m_resources = new ResourcePolicy::ResourceSet(QString::fromAscii("camera"), this); m_resources->setAlwaysReply(); m_resources->addResource(ResourcePolicy::VideoPlaybackType); m_resources->addResource(ResourcePolicy::VideoRecorderType); QObject::connect(m_resources, SIGNAL(resourcesDenied()), this, SLOT(denied())); QObject::connect(m_resources, SIGNAL(lostResources()), this, SLOT(lost())); QObject::connect(m_resources, SIGNAL(resourcesGranted(QList<ResourcePolicy::ResourceType>)), this, SLOT(granted())); }