mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-27 19:27:49 +02:00
some work + fixed red errors on malformed input
This commit is contained in:
parent
1efc2a9b5d
commit
96cb663fa8
9 changed files with 59 additions and 33 deletions
|
@ -23,27 +23,26 @@ class ClientTunnelPane;
|
|||
class TunnelConfig;
|
||||
class I2CPParameters;
|
||||
|
||||
class MainWindow;
|
||||
|
||||
class TunnelPane : public QObject {
|
||||
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
TunnelPane(TunnelsPageUpdateListener* tunnelsPageUpdateListener_, TunnelConfig* tunconf, QWidget* wrongInputPane_, QLabel* wrongInputLabel_);
|
||||
TunnelPane(TunnelsPageUpdateListener* tunnelsPageUpdateListener_, TunnelConfig* tunconf, QWidget* wrongInputPane_, QLabel* wrongInputLabel_, MainWindow* mainWindow_);
|
||||
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();
|
||||
}
|
||||
void hideWrongInputLabel() const { wrongInputPane->setVisible(false); }
|
||||
void highlightWrongInput(QString warningText, QWidget* controlWithWrongInput);
|
||||
|
||||
virtual ServerTunnelPane* asServerTunnelPane()=0;
|
||||
virtual ClientTunnelPane* asClientTunnelPane()=0;
|
||||
|
||||
protected:
|
||||
MainWindow* mainWindow;
|
||||
QWidget * wrongInputPane;
|
||||
QLabel* wrongInputLabel;
|
||||
TunnelConfig* tunnelConfig;
|
||||
|
@ -93,6 +92,7 @@ protected:
|
|||
//should be created by factory
|
||||
i2p::data::SigningKeyType readSigTypeComboboxUI(QComboBox* sigTypeComboBox);
|
||||
|
||||
public:
|
||||
//returns false when invalid data at UI
|
||||
virtual bool applyDataFromUIToTunnelConfig() {
|
||||
hideWrongInputLabel();
|
||||
|
@ -106,7 +106,7 @@ protected:
|
|||
i2cpParams.setCrypto_tagsToSend(crypto_tagsToSendLineEdit->text());
|
||||
return true;
|
||||
}
|
||||
|
||||
protected:
|
||||
void setupTunnelPane(
|
||||
TunnelConfig* tunnelConfig,
|
||||
QGroupBox *tunnelGroupBox,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue