mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-27 19:27:49 +02:00
qtui first draft completed
This commit is contained in:
parent
61e1e7fe8f
commit
298181999d
13 changed files with 588 additions and 157 deletions
|
@ -2,6 +2,7 @@
|
|||
#define CLIENTTUNNELPANE_H
|
||||
|
||||
#include "QGridLayout"
|
||||
#include "QVBoxLayout"
|
||||
|
||||
#include "TunnelPane.h"
|
||||
|
||||
|
@ -13,13 +14,13 @@ class TunnelPane;
|
|||
class ClientTunnelPane : public TunnelPane {
|
||||
Q_OBJECT
|
||||
public:
|
||||
ClientTunnelPane();
|
||||
ClientTunnelPane(TunnelsPageUpdateListener* tunnelsPageUpdateListener, ClientTunnelConfig* tunconf);
|
||||
virtual ~ClientTunnelPane(){}
|
||||
virtual ServerTunnelPane* asServerTunnelPane();
|
||||
virtual ClientTunnelPane* asClientTunnelPane();
|
||||
void appendClientTunnelForm(ClientTunnelConfig* tunnelConfig, QWidget *tunnelsFormGridLayoutWidget,
|
||||
QGridLayout *tunnelsFormGridLayout, int tunnelsRow);
|
||||
void deleteClientTunnelForm(QGridLayout *tunnelsFormGridLayout);
|
||||
int appendClientTunnelForm(ClientTunnelConfig* tunnelConfig, QWidget *tunnelsFormGridLayoutWidget,
|
||||
int tunnelsRow, int height);
|
||||
void deleteClientTunnelForm();
|
||||
private:
|
||||
QGroupBox *clientTunnelNameGroupBox;
|
||||
|
||||
|
@ -65,7 +66,32 @@ private:
|
|||
addressLabel->setText(QApplication::translate("cltTunForm", "Address:", 0));
|
||||
sigTypeLabel->setText(QApplication::translate("cltTunForm", "Signature type:", 0));
|
||||
}
|
||||
protected:
|
||||
virtual bool applyDataFromUIToTunnelConfig() {
|
||||
bool ok=TunnelPane::applyDataFromUIToTunnelConfig();
|
||||
if(!ok)return false;
|
||||
ClientTunnelConfig* ctc=tunnelConfig->asClientTunnelConfig();
|
||||
assert(ctc!=nullptr);
|
||||
|
||||
//destination
|
||||
ctc->setdest(destinationLineEdit->text().toStdString());
|
||||
|
||||
auto portStr=portLineEdit->text();
|
||||
int portInt=portStr.toInt(&ok);
|
||||
if(!ok)return false;
|
||||
ctc->setport(portInt);
|
||||
|
||||
ctc->setkeys(keysLineEdit->text().toStdString());
|
||||
|
||||
ctc->setaddress(addressLineEdit->text().toStdString());
|
||||
|
||||
auto dportStr=portLineEdit->text();
|
||||
int dportInt=dportStr.toInt(&ok);
|
||||
if(!ok)return false;
|
||||
ctc->setdestinationPort(dportInt);
|
||||
|
||||
ctc->setsigType(readSigTypeComboboxUI(sigTypeComboBox));
|
||||
}
|
||||
};
|
||||
|
||||
#endif // CLIENTTUNNELPANE_H
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue