Пример #1
0
void Conference::leave()
{
	if (d_func()->isJoined)
		doLeave();

	//TODO set offline all participants
}
Пример #2
0
LoginForm::LoginForm(QWidget *parent) : QWidget(parent), ui(new Ui::LoginForm)
{
    if (! m_Greeter.connectSync())
    {
        close();
    }

    ui->setupUi(this);
    setStyleSheet(razorTheme.qss("razor-lightdm-greeter/razor-lightdm-greeter"));
    ui->hostnameLabel->setFocus();

    // Setup users
    m_UsersModel = new QLightDM::UsersModel();
    QStringList userIds;
    for (int i = 0; i < m_UsersModel->rowCount(QModelIndex()); i++)
    {
        QModelIndex index = m_UsersModel->index(i);
        QString userId =  m_UsersModel->data(index, Qt::UserRole).toString();
        userIds << userId;
    }
    QCompleter *completer = new QCompleter(userIds);
    completer->setCompletionMode(QCompleter::InlineCompletion);
    ui->userIdInput->setCompleter(completer);


    // Setup sessions
    m_SessionsModel = new QLightDM::SessionsModel();
    ui->sessionCombo->setModel(m_SessionsModel);
    for (int row = 0; row < ui->sessionCombo->model()->rowCount(); row++)
    {
        QModelIndex index = ui->sessionCombo->model()->index(row, 0);
        if (QString("Razor Desktop") ==  ui->sessionCombo->model()->data(index, Qt::DisplayRole).toString())
        {
            ui->sessionCombo->setCurrentIndex(row);
            break;
        }
    }

    QPixmap icon(QString(SHARE_DIR) + "/graphics/rqt-2.svg");
    ui->iconLabel->setPixmap(icon.scaled(ui->iconLabel->size(), Qt::KeepAspectRatio, Qt::SmoothTransformation));


#ifdef USING_LIGHTDM_QT_1
    ui->hostnameLabel->setText(QLightDM::hostname());
    connect(&m_Greeter, SIGNAL(showPrompt(QString,QLightDM::PromptType)),
            this,       SLOT(onPrompt(QString,QLightDM::PromptType)));
#else
    ui->hostnameLabel->setText(m_Greeter.hostname());
    connect(&m_Greeter, SIGNAL(showPrompt(QString,QLightDM::Greeter::PromptType)),
            this,       SLOT(onPrompt(QString,QLightDM::Greeter::PromptType)));
#endif

    connect(ui->loginButton, SIGNAL(clicked(bool)), this, SLOT(doLogin()));

    connect(ui->cancelButton, SIGNAL(clicked()), SLOT(doCancel()));

    connect(&m_Greeter, SIGNAL(authenticationComplete()), this, SLOT(authenticationDone()));

    connect(ui->leaveButton, SIGNAL(clicked()), SLOT(doLeave()));
    connect(&m_razorPowerProcess, SIGNAL(finished(int)), this, SLOT(razorPowerDone()));
}