1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
|
/*
requestAuthDialog
Copyright (c) 2008 by Alexander Kazarin <boiler@co.ru>
***************************************************************************
* *
* 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. *
* *
***************************************************************************
*/
#ifndef REQUESTAUTHDIALOG_H
#define REQUESTAUTHDIALOG_H
#include "ui_requestauthdialog.h"
#include <QNetworkCookie>
class QNetworkAccessManager;
class QNetworkReply;
class requestAuthDialog : public QDialog
{
Q_OBJECT;
public:
requestAuthDialog(QWidget *parent = 0);
~requestAuthDialog();
void setLogin(const QString& login) { ui.editLogin->setText(login); ui.editPasswd->setFocus(); }
void setPasswd(const QString& passwd) { ui.editPasswd->setText(passwd); ui.editPasswd->setFocus(); }
QString getLogin() const { return ui.editLogin->text(); }
QString getPasswd() const { return ui.editPasswd->text(); }
bool getRemember() const { return ui.cbRemember->isChecked(); }
QString getCode() const { return ui.editCaptcha->text(); }
void setCaptcha(const QList<QNetworkCookie>& cooks, const QString& url);
private slots:
void reply(QNetworkReply* r);
private:
Ui::requestAuthDialogClass ui;
QNetworkAccessManager *manager_;
};
#endif
|