2015-02-25 19:00:27 +03:00
/*
* Copyright ( C ) 2015 by Jeroen Hoek
* Copyright ( C ) 2015 by Olivier Goffart < ogoffart @ 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
2016-10-25 12:00:07 +03:00
* the Free Software Foundation ; either version 2 of the License , or
* ( at your option ) any later version .
2015-02-25 19:00:27 +03:00
*
* 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 .
*/
2015-02-03 00:29:21 +03:00
# include "wizard/owncloudconnectionmethoddialog.h"
2015-02-03 19:55:01 +03:00
# include <QUrl>
2015-02-03 00:29:21 +03:00
2015-06-26 18:07:47 +03:00
namespace OCC {
2015-02-03 00:29:21 +03:00
OwncloudConnectionMethodDialog : : OwncloudConnectionMethodDialog ( QWidget * parent )
2017-03-15 17:46:51 +03:00
: QDialog ( parent , Qt : : CustomizeWindowHint | Qt : : WindowTitleHint | Qt : : WindowCloseButtonHint | Qt : : MSWindowsFixedSizeDialogHint )
2015-02-03 00:29:21 +03:00
, ui ( new Ui : : OwncloudConnectionMethodDialog )
{
ui - > setupUi ( this ) ;
2017-09-20 11:14:48 +03:00
connect ( ui - > btnNoTLS , & QAbstractButton : : clicked , this , & OwncloudConnectionMethodDialog : : returnNoTLS ) ;
connect ( ui - > btnClientSideTLS , & QAbstractButton : : clicked , this , & OwncloudConnectionMethodDialog : : returnClientSideTLS ) ;
connect ( ui - > btnBack , & QAbstractButton : : clicked , this , & OwncloudConnectionMethodDialog : : returnBack ) ;
2015-02-03 00:29:21 +03:00
}
2015-02-03 19:55:01 +03:00
void OwncloudConnectionMethodDialog : : setUrl ( const QUrl & url )
{
2017-09-13 07:26:56 +03:00
ui - > label - > setText ( tr ( " <html><head/><body><p>Failed to connect to the secure server address <em>%1</em>. How do you wish to proceed?</p></body></html> " ) . arg ( url . toDisplayString ( ) . toHtmlEscaped ( ) ) ) ;
2015-02-03 19:55:01 +03:00
}
2015-02-03 00:29:21 +03:00
void OwncloudConnectionMethodDialog : : returnNoTLS ( )
{
done ( No_TLS ) ;
}
void OwncloudConnectionMethodDialog : : returnClientSideTLS ( )
{
done ( Client_Side_TLS ) ;
}
void OwncloudConnectionMethodDialog : : returnBack ( )
{
done ( Back ) ;
}
OwncloudConnectionMethodDialog : : ~ OwncloudConnectionMethodDialog ( )
{
delete ui ;
}
2015-06-26 18:07:47 +03:00
}