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
|
@ -1,8 +1,11 @@
|
|||
#include "TunnelPane.h"
|
||||
#include "QMessageBox"
|
||||
|
||||
TunnelPane::TunnelPane(TunnelsPageUpdateListener* tunnelsPageUpdateListener_, TunnelConfig* tunnelConfig_, QWidget* wrongInputPane_, QLabel* wrongInputLabel_):
|
||||
#include "QMessageBox"
|
||||
#include "mainwindow.h"
|
||||
|
||||
TunnelPane::TunnelPane(TunnelsPageUpdateListener* tunnelsPageUpdateListener_, TunnelConfig* tunnelConfig_, QWidget* wrongInputPane_, QLabel* wrongInputLabel_, MainWindow* mainWindow_):
|
||||
QObject(),
|
||||
mainWindow(mainWindow_),
|
||||
wrongInputPane(wrongInputPane_),
|
||||
wrongInputLabel(wrongInputLabel_),
|
||||
tunnelConfig(tunnelConfig_),
|
||||
|
@ -181,7 +184,7 @@ void TunnelPane::appendControlsForI2CPParameters(I2CPParameters& i2cpParameters,
|
|||
|
||||
void TunnelPane::updated() {
|
||||
std::string oldName=tunnelConfig->getName();
|
||||
if(!applyDataFromUIToTunnelConfig())return;//TODO visualise bad input
|
||||
if(!applyDataFromUIToTunnelConfig())return;
|
||||
tunnelsPageUpdateListener->updated(oldName, tunnelConfig);
|
||||
}
|
||||
|
||||
|
@ -224,3 +227,10 @@ i2p::data::SigningKeyType TunnelPane::readSigTypeComboboxUI(QComboBox* sigTypeCo
|
|||
void TunnelPane::deleteTunnelForm() {
|
||||
widgetlocks.deleteListeners();
|
||||
}
|
||||
|
||||
void TunnelPane::highlightWrongInput(QString warningText, QWidget* controlWithWrongInput) {
|
||||
wrongInputPane->setVisible(true);
|
||||
wrongInputLabel->setText(warningText);
|
||||
if(controlWithWrongInput)controlWithWrongInput->setFocus();
|
||||
mainWindow->showTunnelsPage();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue