mirror of
https://github.com/chylex/Nextcloud-Desktop.git
synced 2025-08-20 22:49:46 +02:00
.github
.tx
admin
cmake
doc
man
shell_integration
src
3rdparty
cmd
common
crashreporter
csync
gui
cloudproviders
creds
tray
updater
wizard
CMakeLists.txt
accountmanager.cpp
accountmanager.h
accountsettings.cpp
accountsettings.h
accountsettings.ui
accountstate.cpp
accountstate.h
addcertificatedialog.cpp
addcertificatedialog.h
addcertificatedialog.ui
application.cpp
application.h
authenticationdialog.cpp
authenticationdialog.h
cocoainitializer.h
cocoainitializer_mac.mm
conflictdialog.cpp
conflictdialog.h
conflictdialog.ui
conflictsolver.cpp
conflictsolver.h
connectionvalidator.cpp
connectionvalidator.h
elidedlabel.cpp
elidedlabel.h
folder.cpp
folder.h
folderman.cpp
folderman.h
folderstatusdelegate.cpp
folderstatusdelegate.h
folderstatusmodel.cpp
folderstatusmodel.h
folderstatusview.cpp
folderstatusview.h
folderwatcher.cpp
folderwatcher.h
folderwatcher_linux.cpp
folderwatcher_linux.h
folderwatcher_mac.cpp
folderwatcher_mac.h
folderwatcher_win.cpp
folderwatcher_win.h
folderwizard.cpp
folderwizard.h
folderwizardsourcepage.ui
folderwizardtargetpage.ui
generalsettings.cpp
generalsettings.h
generalsettings.ui
gui.md
guiutility.cpp
guiutility.h
headerbanner.cpp
headerbanner.h
iconjob.cpp
iconjob.h
ignorelisteditor.cpp
ignorelisteditor.h
ignorelisteditor.ui
ignorelisttablewidget.cpp
ignorelisttablewidget.h
ignorelisttablewidget.ui
legalnotice.cpp
legalnotice.h
legalnotice.ui
lockwatcher.cpp
lockwatcher.h
logbrowser.cpp
logbrowser.h
main.cpp
manifest-mingw.rc
mnemonicdialog.ui
navigationpanehelper.cpp
navigationpanehelper.h
networksettings.cpp
networksettings.h
networksettings.ui
notificationconfirmjob.cpp
notificationconfirmjob.h
ocsjob.cpp
ocsjob.h
ocsnavigationappsjob.cpp
ocsnavigationappsjob.h
ocsshareejob.cpp
ocsshareejob.h
ocssharejob.cpp
ocssharejob.h
openfilemanager.cpp
openfilemanager.h
owncloud.exe.manifest-mingw
owncloudgui.cpp
owncloudgui.h
owncloudsetupwizard.cpp
owncloudsetupwizard.h
proxyauthdialog.cpp
proxyauthdialog.h
proxyauthdialog.ui
proxyauthhandler.cpp
proxyauthhandler.h
remotewipe.cpp
remotewipe.h
selectivesyncdialog.cpp
selectivesyncdialog.h
settingsdialog.cpp
settingsdialog.h
settingsdialog.ui
settingsdialogcommon.cpp
sharedialog.cpp
sharedialog.h
sharedialog.ui
sharee.cpp
sharee.h
sharelinkwidget.cpp
sharelinkwidget.h
sharelinkwidget.ui
sharemanager.cpp
sharemanager.h
sharepermissions.h
shareusergroupwidget.cpp
shareusergroupwidget.h
shareusergroupwidget.ui
shareuserline.ui
socketapi.cpp
socketapi.h
socketapisocket_mac.h
socketapisocket_mac.mm
sslbutton.cpp
sslbutton.h
sslerrordialog.cpp
sslerrordialog.h
sslerrordialog.ui
synclogdialog.cpp
synclogdialog.h
synclogdialog.ui
syncrunfilelog.cpp
syncrunfilelog.h
systray.cpp
systray.h
systray.mm
thumbnailjob.cpp
thumbnailjob.h
tooltipupdater.cpp
tooltipupdater.h
userinfo.cpp
userinfo.h
version.rc.in
libsync
CMakeLists.txt
test
theme
translations
.clang-format
.clang-tidy
.drone.yml
.git-blame-ignore-revs
.gitattributes
.gitignore
.gitmodules
.tag
CMakeLists.txt
CONTRIBUTING.md
COPYING
COPYING.documentation
CPackOptions.cmake.in
ChangeLog
NEXTCLOUD.cmake
NextcloudCPack.cmake
README.md
VERSION.cmake
appveyor.ini
appveyor.yml
config.h.in
mirall.desktop.in
resources.qrc
sync-exclude.lst
theme.qrc
version.h.in
59 lines
1.8 KiB
C++
59 lines
1.8 KiB
C++
/*
|
|
* Copyright (C) 2014 by Daniel Molkentin <danimo@owncloud.com>
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful, but
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
|
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
* for more details.
|
|
*/
|
|
|
|
#include "authenticationdialog.h"
|
|
|
|
#include <QLabel>
|
|
#include <QLineEdit>
|
|
#include <QVBoxLayout>
|
|
#include <QFormLayout>
|
|
#include <QDialogButtonBox>
|
|
|
|
namespace OCC {
|
|
|
|
AuthenticationDialog::AuthenticationDialog(const QString &realm, const QString &domain, QWidget *parent)
|
|
: QDialog(parent)
|
|
, _user(new QLineEdit)
|
|
, _password(new QLineEdit)
|
|
{
|
|
setWindowTitle(tr("Authentication Required"));
|
|
auto *lay = new QVBoxLayout(this);
|
|
auto *label = new QLabel(tr("Enter username and password for '%1' at %2.").arg(realm, domain));
|
|
label->setTextFormat(Qt::PlainText);
|
|
lay->addWidget(label);
|
|
|
|
auto *form = new QFormLayout;
|
|
form->addRow(tr("&User:"), _user);
|
|
form->addRow(tr("&Password:"), _password);
|
|
lay->addLayout(form);
|
|
_password->setEchoMode(QLineEdit::Password);
|
|
|
|
auto *box = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, Qt::Horizontal);
|
|
connect(box, &QDialogButtonBox::accepted, this, &QDialog::accept);
|
|
connect(box, &QDialogButtonBox::rejected, this, &QDialog::reject);
|
|
lay->addWidget(box);
|
|
}
|
|
|
|
QString AuthenticationDialog::user() const
|
|
{
|
|
return _user->text();
|
|
}
|
|
|
|
QString AuthenticationDialog::password() const
|
|
{
|
|
return _password->text();
|
|
}
|
|
|
|
} // namespace OCC
|