Skip to content

Commit

Permalink
tmp
Browse files Browse the repository at this point in the history
  • Loading branch information
nonlin-lin-chaos-order-etc-etal committed Jun 17, 2017
1 parent 5df77eb commit f2b0f64
Show file tree
Hide file tree
Showing 3 changed files with 85 additions and 7 deletions.
9 changes: 8 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -254,4 +254,11 @@ docs/generated
build/Makefile

# debian stuff
.pc/
.pc/

# qt

qt/i2pd_qt/*.ui.autosave
qt/i2pd_qt/*.ui.bk*
qt/i2pd_qt/*.ui_*

75 changes: 73 additions & 2 deletions qt/i2pd_qt/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down Expand Up @@ -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)),
Expand All @@ -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()){
Expand Down
8 changes: 4 additions & 4 deletions qt/i2pd_qt/mainwindow.ui
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<x>10</x>
<y>10</y>
<width>801</width>
<height>491</height>
<height>3000</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
Expand Down Expand Up @@ -114,7 +114,7 @@
<property name="maximumSize">
<size>
<width>16777215</width>
<height>516</height>
<height>3000</height>
</size>
</property>
<property name="currentIndex">
Expand All @@ -127,7 +127,7 @@
<x>0</x>
<y>0</y>
<width>671</width>
<height>491</height>
<height>3000</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_5">
Expand Down Expand Up @@ -175,7 +175,7 @@
<x>0</x>
<y>0</y>
<width>701</width>
<height>460</height>
<height>3000</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_4">
Expand Down

0 comments on commit f2b0f64

Please sign in to comment.