mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-27 19:27:49 +02:00
fixed #935
This commit is contained in:
parent
ef30d2d3b6
commit
9441c1cffe
10 changed files with 863 additions and 353 deletions
|
@ -28,16 +28,24 @@ class TunnelPane : public QObject {
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
TunnelPane(TunnelsPageUpdateListener* tunnelsPageUpdateListener_, TunnelConfig* tunconf);
|
||||
TunnelPane(TunnelsPageUpdateListener* tunnelsPageUpdateListener_, TunnelConfig* tunconf, QWidget* wrongInputPane_, QLabel* wrongInputLabel_);
|
||||
virtual ~TunnelPane(){}
|
||||
|
||||
void deleteTunnelForm();
|
||||
|
||||
void hideWrongInputLabel() { wrongInputPane->setVisible(false); }
|
||||
void highlightWrongInput(QString warningText, QWidget* controlWithWrongInput) {
|
||||
wrongInputPane->setVisible(true);
|
||||
wrongInputLabel->setText(warningText);
|
||||
if(controlWithWrongInput)controlWithWrongInput->setFocus();
|
||||
}
|
||||
|
||||
virtual ServerTunnelPane* asServerTunnelPane()=0;
|
||||
virtual ClientTunnelPane* asClientTunnelPane()=0;
|
||||
|
||||
protected:
|
||||
QWidget * wrongInputPane;
|
||||
QLabel* wrongInputLabel;
|
||||
TunnelConfig* tunnelConfig;
|
||||
widgetlockregistry widgetlocks;
|
||||
TunnelsPageUpdateListener* tunnelsPageUpdateListener;
|
||||
|
@ -87,6 +95,7 @@ protected:
|
|||
|
||||
//returns false when invalid data at UI
|
||||
virtual bool applyDataFromUIToTunnelConfig() {
|
||||
hideWrongInputLabel();
|
||||
tunnelConfig->setName(nameLineEdit->text().toStdString());
|
||||
tunnelConfig->setType(readTunnelTypeComboboxData());
|
||||
I2CPParameters& i2cpParams=tunnelConfig->getI2cpParameters();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue