diff --git a/.gitignore b/.gitignore
index c472d88e..5424262f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -254,4 +254,11 @@ docs/generated
build/Makefile
# debian stuff
-.pc/
\ No newline at end of file
+.pc/
+
+# qt
+
+qt/i2pd_qt/*.ui.autosave
+qt/i2pd_qt/*.ui.bk*
+qt/i2pd_qt/*.ui_*
+
diff --git a/qt/i2pd_qt/mainwindow.cpp b/qt/i2pd_qt/mainwindow.cpp
index 03a2f8ea..7c545a4c 100644
--- a/qt/i2pd_qt/mainwindow.cpp
+++ b/qt/i2pd_qt/mainwindow.cpp
@@ -16,6 +16,8 @@ MainWindow::MainWindow(QWidget *parent) :
#endif
{
ui->setupUi(this);
+
+ //TODO handle resizes and change the below into resize() call
setFixedSize(width(), 480);
onResize();
@@ -52,10 +54,77 @@ MainWindow::MainWindow(QWidget *parent) :
QObject::connect(ui->restartPagePushButton, SIGNAL(released()), this, SLOT(showRestartPage()));
QObject::connect(ui->quitPagePushButton, SIGNAL(released()), this, SLOT(showQuitPage()));
- /*
QObject::connect(ui->fastQuitPushButton, SIGNAL(released()), this, SLOT(handleQuitButton()));
QObject::connect(ui->gracefulQuitPushButton, SIGNAL(released()), this, SLOT(handleGracefulQuitButton()));
-*/
+
+ initFileChooser(configFileLineEdit, configFileBrowsePushButton);
+ initFileChooser(tunnelsConfigFileLineEdit, tunnelsConfigFileBrowsePushButton);
+ initFileChooser(pidFileLineEdit, pidFileBrowsePushButton);
+ initFileChooser(logFileLineEdit, logFileBrowsePushButton);
+ initFileChooser(httpProxyKeyFileLineEdit, httpProxyKeyFilePushButton);
+ initFileChooser(socksProxyKeyFileLineEdit, socksProxyKeyFilePushButton);
+ initFileChooser(i2pControlCertFileLineEdit, i2pControlCertFileBrowsePushButton);
+ initFileChooser(i2pControlKeyFileLineEdit, i2pControlKeyFileBrowsePushButton);
+ initFileChooser(reseedFileLineEdit, reseedFileBrowsePushButton);
+
+ initFolderChooser(dataFolderLineEdit, dataFolderBrowsePushButton);
+
+ initCombobox(logLevelComboBox);
+
+ initIPAddressBox(routerExternalHostLineEdit, tr("Router external address -> Host"));
+ initTCPPortBox(routerExternalPortLineEdit, tr("Router external address -> Port"));
+
+ initCheckBox(ipv6CheckBox);
+ initCheckBox(notransitCheckBox);
+ initCheckBox(floodfillCheckBox);
+ initIntegerBox(bandwidthLineEdit);
+ initStringBox(familyLineEdit);
+ initIntegerBox(netIdLineEdit);
+
+ initCheckBox(insomniaCheckBox);
+
+ initCheckBox(webconsoleEnabledCheckBox);
+ initIPAddressBox(webconsoleAddrLineEdit, tr("HTTP webconsole -> IP address"));
+ initTCPPortBox(webconsolePortLineEdit, tr("HTTP webconsole -> Port"));
+ initCheckBox(webconsoleBasicAuthCheckBox);
+ initStringBox(webconsoleUserNameLineEditBasicAuth);
+ initStringBox(webconsolePasswordLineEditBasicAuth);
+
+ initCheckBox(httpProxyEnabledCheckBox);
+ initIPAddressBox(httpProxyAddressLineEdit, tr("HTTP proxy -> IP address"));
+ initTCPPortBox(httpProxyPortLineEdit, tr("HTTP proxy -> Port"));
+ initIntegerBox(httpProxyInboundTunnelsLenLineEdit);
+ initIntegerBox(httpProxyInboundTunnQuantityLineEdit);
+ initIntegerBox(httpProxyOutBoundTunnLenLineEdit);
+ initIntegerBox(httpProxyOutboundTunnQuantityLineEdit);
+
+ initCheckBox(socksProxyEnabledCheckBox);
+ initIPAddressBox(socksProxyAddressLineEdit, tr("Socks proxy -> IP address"));
+ initTCPPortBox(socksProxyPortLineEdit, tr("Socks proxy -> Port"));
+ initIntegerBox(socksProxyInboundTunnelsLenLineEdit);
+ initIntegerBox(socksProxyInboundTunnQuantityLineEdit);
+ initIntegerBox(socksProxyOutBoundTunnLenLineEdit);
+ initIntegerBox(socksProxyOutboundTunnQuantityLineEdit);
+ initIPAddressBox(outproxyAddressLineEdit, tr("Socks proxy -> Outproxy address"));
+ initTCPPortBox(outproxyPortLineEdit, tr("Socks proxy -> Outproxy port"));
+
+ initCheckBox(socksProxyEnabledCheckBox);
+ initIPAddressBox(socksProxyAddressLineEdit, tr("Socks proxy -> IP address"));
+ initTCPPortBox(socksProxyPortLineEdit, tr("Socks proxy -> Port"));
+
+ initCheckBox(socksProxyEnabledCheckBox);
+ initIPAddressBox(socksProxyAddressLineEdit, tr("Socks proxy -> IP address"));
+ initTCPPortBox(socksProxyPortLineEdit, tr("Socks proxy -> Port"));
+
+ initCheckBox(socksProxyEnabledCheckBox);
+ initIPAddressBox(socksProxyAddressLineEdit, tr("Socks proxy -> IP address"));
+ initTCPPortBox(socksProxyPortLineEdit, tr("Socks proxy -> Port"));
+
+ initCheckBox(socksProxyEnabledCheckBox);
+ initIPAddressBox(socksProxyAddressLineEdit, tr("Socks proxy -> IP address"));
+ initTCPPortBox(socksProxyPortLineEdit, tr("Socks proxy -> Port"));
+
+ loadAllConfigs();
#ifndef ANDROID
QObject::connect(trayIcon, SIGNAL(activated(QSystemTrayIcon::ActivationReason)),
@@ -74,12 +143,14 @@ void MainWindow::showTunnelsPage(){ui->stackedWidget->setCurrentIndex(2);}
void MainWindow::showRestartPage(){ui->stackedWidget->setCurrentIndex(3);}
void MainWindow::showQuitPage(){ui->stackedWidget->setCurrentIndex(4);}
+//TODO
void MainWindow::resizeEvent(QResizeEvent *event)
{
QMainWindow::resizeEvent(event);
onResize();
}
+//TODO
void MainWindow::onResize()
{
if(isVisible()){
diff --git a/qt/i2pd_qt/mainwindow.ui b/qt/i2pd_qt/mainwindow.ui
index 24a8184b..8bfbfe39 100644
--- a/qt/i2pd_qt/mainwindow.ui
+++ b/qt/i2pd_qt/mainwindow.ui
@@ -26,7 +26,7 @@
10
10
801
- 491
+ 3000
@@ -114,7 +114,7 @@
16777215
- 516
+ 3000
@@ -127,7 +127,7 @@
0
0
671
- 491
+ 3000
@@ -175,7 +175,7 @@
0
0
701
- 460
+ 3000