예제 #1
0
void AccountListDialog::onLoginClicked()
{
    if (mTableView->currentIndex().isValid()) {

        QString currentName = mModel->name(mTableView->currentIndex().row());
        emit loginClicked(currentName);
    }
}
예제 #2
0
SPLoginDialog::SPLoginDialog(SPLoginCredential *credentials, QWidget *parent) :
    QDialog(parent),
    ui(new Ui::SPLoginDialog)
{
    this->m_credential = credentials;
    ui->setupUi(this);
    QWidget::connect(this->ui->loginButton, SIGNAL(clicked()), this, SLOT(loginClicked()));
}
예제 #3
0
void CLoginButton::login()
{
    if (isLoggedIn) {
        emit logoutClicked();
    } else {
        emit loginClicked(ui->lineEdit->text(),
                          ui->lineEdit_2->text());
    }

    serverNoResponse.start(2000);
}
예제 #4
0
int Login::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QDialog::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: loginClicked(); break;
        default: ;
        }
        _id -= 1;
    }
    return _id;
}
예제 #5
0
QtAddWengoAccount::QtAddWengoAccount(QtLoginDialog * qtLoginDialog, QWidget* parent, CUserProfileHandler & cUserProfileHandler)
	:ILogin(qtLoginDialog, cUserProfileHandler){

	_ui = new Ui::AddWengoAccount();
	_ui->setupUi(this);

	LANGUAGE_CHANGE(this);

	WidgetBackgroundImage::setBackgroundImage(_ui->loginLabel, ":pics/headers/login.png", WidgetBackgroundImage::AdjustHeight);

	SAFE_CONNECT(_ui->loginButton, SIGNAL(clicked()), SLOT(loginClicked()));
	SAFE_CONNECT(_ui->backButton, SIGNAL(clicked()), SLOT(goBack()));
	SAFE_CONNECT_RECEIVER(_ui->cancelButton, SIGNAL(clicked()), _loginDialog, SLOT(reject()));
	SAFE_CONNECT(_ui->createWengoAccountLabel, SIGNAL(linkActivated(const QString &)), SLOT(createAccountButtonClicked()));
	SAFE_CONNECT(_ui->helpLabel, SIGNAL(linkActivated(const QString &)), SLOT(helpButtonClicked()));
	SAFE_CONNECT(_ui->forgotPasswordLabel, SIGNAL(linkActivated(const QString &)), SLOT(forgotPasswordButtonClicked()));
}
예제 #6
0
//VOXOX CHANGE by Rolando 04-06-09
QtAddVoxOxAccount::QtAddVoxOxAccount(QtLoginDialog * qtLoginDialog, QWidget* parent, CUserProfileHandler & cUserProfileHandler)
	:ILogin(qtLoginDialog, cUserProfileHandler){

	_ui = new Ui::AddVoxOxAccount();
	_ui->setupUi(this);
	

	LANGUAGE_CHANGE(this);

	//WidgetBackgroundImage::setBackgroundImage(_ui->loginLabel, ":pics/headers/login.png", WidgetBackgroundImage::AdjustHeight);

	SAFE_CONNECT(_ui->loginButton, SIGNAL(clicked()), SLOT(loginClicked()));
	SAFE_CONNECT(_ui->linkToSignUpLabel, SIGNAL(linkActivated(const QString &)), SLOT(linkToSignUpLabelClicked()));
	//SAFE_CONNECT(_ui->helpLabel, SIGNAL(linkActivated(const QString &)), SLOT(helpButtonClicked()));
	SAFE_CONNECT(_ui->linkForgotPasswordLabel, SIGNAL(linkActivated(const QString &)), SLOT(linkForgotPasswordLabelClicked()));
	SAFE_CONNECT(_ui->publicComputerCheckBox, SIGNAL(stateChanged(int)), SLOT(publicComputerStateChanged(int)));
	SAFE_CONNECT(_ui->rememberPasswordCheckBox, SIGNAL(stateChanged(int)), SLOT(rememberPasswordStateChanged(int)));
	SAFE_CONNECT(_ui->usernameComboBox, SIGNAL(activated(int)), SLOT(itemActivatedComboBoxSlot(int)));

	
	resize(QSize(279,380));
}
예제 #7
0
//VOXOX CHANGE by Rolando 04-06-09
void QtAddVoxOxAccount::keyPressEvent(QKeyEvent *event) {
	if (event->key()==Qt::Key_Return || event->key()==Qt::Key_Enter) {
		loginClicked();
	}
}
예제 #8
0
void CLogInPage::setConnections()
{
	QObject::connect( m_pRegister, SIGNAL( registerClicked() ), this, SIGNAL( registerRequest() ) );
	QObject::connect( m_pRegisterModeButton, SIGNAL( clicked() ), this, SLOT( registerClicled() ) );
	QObject::connect( m_pLogin, SIGNAL( loginClicked() ), this, SIGNAL( loginRequest() ) );
}
예제 #9
0
QtLoginWindow::QtLoginWindow(UIEventStream* uiEventStream, SettingsProvider* settings, TimerFactory* timerFactory) : QMainWindow(), settings_(settings), timerFactory_(timerFactory) {
    uiEventStream_ = uiEventStream;

    setWindowTitle("Swift");
#ifndef Q_OS_MAC
#ifdef  Q_OS_WIN32
    setWindowIcon(QIcon(":/logo-icon-16-win.png"));
#else
    setWindowIcon(QIcon(":/logo-icon-16.png"));
#endif
#endif
    QtUtilities::setX11Resource(this, "Main");
    setAccessibleName(tr("Swift Login Window"));
    //setAccessibleDescription(tr("This window is used for providing credentials to log into your XMPP service"));

    resize(200, 500);
    setContentsMargins(0,0,0,0);
    QWidget *centralWidget = new QWidget(this);
    setCentralWidget(centralWidget);
    QBoxLayout *topLayout = new QBoxLayout(QBoxLayout::TopToBottom, centralWidget);
    stack_ = new QStackedWidget(centralWidget);
    topLayout->addWidget(stack_);
    topLayout->setMargin(0);
    loginWidgetWrapper_ = new QWidget(this);
    loginWidgetWrapper_->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding));
    QBoxLayout *layout = new QBoxLayout(QBoxLayout::TopToBottom, loginWidgetWrapper_);
    layout->addStretch(2);

    QLabel* logo = new QLabel(this);
    QIcon swiftWithTextLogo = QIcon(":/logo-shaded-text.png");
    logo->setPixmap(swiftWithTextLogo.pixmap(QSize(192,192)));

    QWidget *logoWidget = new QWidget(this);
    QHBoxLayout *logoLayout = new QHBoxLayout();
    logoLayout->setMargin(0);
    logoLayout->addStretch(0);
    logoLayout->addWidget(logo);
    logoLayout->addStretch(0);
    logoWidget->setLayout(logoLayout);
    layout->addWidget(logoWidget);

    layout->addStretch(2);

    QLabel* jidLabel = new QLabel(this);
    jidLabel->setText("<font size='-1'>" + tr("User address:") + "</font>");
    layout->addWidget(jidLabel);


    username_ = new QComboBox(this);
    username_->setEditable(true);
    username_->setWhatsThis(tr("User address - looks like [email protected]"));
    username_->setToolTip(tr("User address - looks like [email protected]"));
    username_->view()->installEventFilter(this);
    username_->setAccessibleName(tr("User address (of the form [email protected])"));
    username_->setAccessibleDescription(tr("This is the user address that you'll be using to log in with"));
    layout->addWidget(username_);
    QLabel* jidHintLabel = new QLabel(this);
    jidHintLabel->setText("<font size='-1' color='grey' >" + tr("Example: [email protected]") + "</font>");
    jidHintLabel->setAlignment(Qt::AlignRight);
    layout->addWidget(jidHintLabel);


    QLabel* passwordLabel = new QLabel();
    passwordLabel->setText("<font size='-1'>" + tr("Password:"******"</font>");
    passwordLabel->setAccessibleName(tr("User password"));
    passwordLabel->setAccessibleDescription(tr("This is the password you'll use to log in to the XMPP service"));
    layout->addWidget(passwordLabel);


    QWidget* w = new QWidget(this);
    w->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding));
    layout->addWidget(w);

    QHBoxLayout* credentialsLayout = new QHBoxLayout(w);
    credentialsLayout->setMargin(0);
    credentialsLayout->setSpacing(3);
    password_ = new QLineEdit(this);
    password_->setEchoMode(QLineEdit::Password);
    connect(password_, SIGNAL(returnPressed()), this, SLOT(loginClicked()));
    connect(username_->lineEdit(), SIGNAL(returnPressed()), password_, SLOT(setFocus()));
    connect(username_, SIGNAL(editTextChanged(const QString&)), this, SLOT(handleUsernameTextChanged()));
    credentialsLayout->addWidget(password_);

    certificateButton_ = new QToolButton(this);
    certificateButton_->setCheckable(true);
    certificateButton_->setIcon(QIcon(":/icons/certificate.png"));
    certificateButton_->setToolTip(tr("Click if you have a personal certificate used for login to the service."));
    certificateButton_->setWhatsThis(tr("Click if you have a personal certificate used for login to the service."));
    certificateButton_->setAccessibleName(tr("Login with certificate"));
    certificateButton_->setAccessibleDescription(tr("Click if you have a personal certificate used for login to the service."));

    credentialsLayout->addWidget(certificateButton_);
    connect(certificateButton_, SIGNAL(clicked(bool)), SLOT(handleCertficateChecked(bool)));

    loginButton_ = new QPushButton(this);
    loginButton_->setText(tr("Connect"));
    loginButton_->setAutoDefault(true);
    loginButton_->setDefault(true);
    loginButton_->setAccessibleName(tr("Connect now"));
    layout->addWidget(loginButton_);

    QLabel* connectionOptionsLabel = new QLabel(this);
    connectionOptionsLabel->setText("<a href=\"#\"><font size='-1'>" + QObject::tr("Connection Options") + "</font></a>");
    connectionOptionsLabel->setTextFormat(Qt::RichText);
    connectionOptionsLabel->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
    layout->addWidget(connectionOptionsLabel);
    connect(connectionOptionsLabel, SIGNAL(linkActivated(const QString&)), SLOT(handleOpenConnectionOptions()));

    message_ = new QLabel(this);
    message_->setTextFormat(Qt::RichText);
    message_->setWordWrap(true);
    layout->addWidget(message_);

    layout->addStretch(2);
    remember_ = new QCheckBox(tr("Remember Password?"), this);
    layout->addWidget(remember_);
    loginAutomatically_ = new QCheckBox(tr("Login Automatically?"), this);
    layout->addWidget(loginAutomatically_);

    connect(loginButton_, SIGNAL(clicked()), SLOT(loginClicked()));
    stack_->addWidget(loginWidgetWrapper_);
#ifdef SWIFTEN_PLATFORM_MACOSX
    menuBar_ = new QMenuBar(nullptr);
#else
    menuBar_ = menuBar();
#endif
    QApplication::setQuitOnLastWindowClosed(false);

    swiftMenu_ = new QMenu(tr("&Swift"), this);
#ifdef SWIFTEN_PLATFORM_MACOSX
    generalMenu_ = new QMenu(tr("&General"), this);
#else
    generalMenu_ = swiftMenu_;
#endif

#ifdef SWIFTEN_PLATFORM_MACOSX
    QAction* aboutAction = new QAction(QString("&About %1").arg("Swift"), this);
#else
    QAction* aboutAction = new QAction(QString(tr("&About %1")).arg("Swift"), this);
#endif
    connect(aboutAction, SIGNAL(triggered()), SLOT(handleAbout()));
    swiftMenu_->addAction(aboutAction);

    xmlConsoleAction_ = new QAction(tr("&Show Debug Console"), this);
    connect(xmlConsoleAction_, SIGNAL(triggered()), SLOT(handleShowXMLConsole()));
    generalMenu_->addAction(xmlConsoleAction_);

#ifdef SWIFT_EXPERIMENTAL_FT
    fileTransferOverviewAction_ = new QAction(tr("Show &File Transfer Overview"), this);
    connect(fileTransferOverviewAction_, SIGNAL(triggered()), SLOT(handleShowFileTransferOverview()));
    generalMenu_->addAction(fileTransferOverviewAction_);
#endif

    highlightEditorAction_ = new QAction(tr("&Edit Highlight Rules"), this);
    connect(highlightEditorAction_, SIGNAL(triggered()), SLOT(handleShowHighlightEditor()));
    generalMenu_->addAction(highlightEditorAction_);

    toggleSoundsAction_ = new QAction(tr("&Play Sounds"), this);
    toggleSoundsAction_->setCheckable(true);
    toggleSoundsAction_->setChecked(settings_->getSetting(SettingConstants::PLAY_SOUNDS));
    connect(toggleSoundsAction_, SIGNAL(toggled(bool)), SLOT(handleToggleSounds(bool)));
    generalMenu_->addAction(toggleSoundsAction_);

    toggleNotificationsAction_ = new QAction(tr("Display Pop-up &Notifications"), this);
    toggleNotificationsAction_->setCheckable(true);
    toggleNotificationsAction_->setChecked(settings_->getSetting(SettingConstants::SHOW_NOTIFICATIONS));
    connect(toggleNotificationsAction_, SIGNAL(toggled(bool)), SLOT(handleToggleNotifications(bool)));

#ifndef SWIFTEN_PLATFORM_MACOSX
    swiftMenu_->addSeparator();
#endif

#ifdef SWIFTEN_PLATFORM_MACOSX
    QAction* quitAction = new QAction("&Quit", this);
#else
    QAction* quitAction = new QAction(tr("&Quit"), this);
#endif
    connect(quitAction, SIGNAL(triggered()), SLOT(handleQuit()));
    swiftMenu_->addAction(quitAction);

    setInitialMenus();
    settings_->onSettingChanged.connect(boost::bind(&QtLoginWindow::handleSettingChanged, this, _1));

    bool eagle = settings_->getSetting(SettingConstants::FORGET_PASSWORDS);
    remember_->setEnabled(!eagle);
    loginAutomatically_->setEnabled(!eagle);
    xmlConsoleAction_->setEnabled(!eagle);
    if (eagle) {
        remember_->setChecked(false);
        loginAutomatically_->setChecked(false);
    }

#ifdef SWIFTEN_PLATFORM_MACOSX
    // Temporary workaround for case 501. Could be that this code is still
    // needed when Qt provides a proper fix
    qApp->installEventFilter(this);
#endif


    this->show();
}
예제 #10
0
void QtAddWengoAccount::keyPressEvent(QKeyEvent *event) {
	if (event->key()==Qt::Key_Return) {
		loginClicked();
	}
}