mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-20 05:11:02 -04:00
40 lines
684 B
C++
40 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
|