mirror of
https://github.com/RetroShare/RetroShare.git
synced 2026-09-14 02:56:00 +05:00
41 lines
684 B
C++
41 lines
684 B
C++
#ifndef PROXYWIDGET_H
|
|
#define PROXYWIDGET_H
|
|
|
|
#include <QWidget>
|
|
|
|
namespace Ui {
|
|
class ProxyWidget;
|
|
}
|
|
|
|
class ProxyWidget : public QWidget
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit ProxyWidget(QWidget *parent = nullptr);
|
|
~ProxyWidget();
|
|
|
|
QString address();
|
|
void setAddress(const QString &value);
|
|
|
|
int port();
|
|
void setPort(int value);
|
|
|
|
Q_SIGNALS:
|
|
void changed();
|
|
|
|
private Q_SLOTS:
|
|
void addressChanged(const QString &value);
|
|
|
|
private:
|
|
void connectUi(bool doConnect);
|
|
void splitAddress(const QString &value, int &schemeIndex, QString &host);
|
|
|
|
private:
|
|
Ui::ProxyWidget *ui;
|
|
QMetaObject::Connection mAddressConnection;
|
|
QMetaObject::Connection mSchemeConnection;
|
|
};
|
|
|
|
#endif // PROXYWIDGET_H
|