Browse Source

tmp

pull/892/head
hypnosis-i2p 8 years ago
parent
commit
f2b0f64138
  1. 9
      .gitignore
  2. 75
      qt/i2pd_qt/mainwindow.cpp
  3. 8
      qt/i2pd_qt/mainwindow.ui

9
.gitignore vendored

@ -254,4 +254,11 @@ docs/generated @@ -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
qt/i2pd_qt/mainwindow.cpp

@ -16,6 +16,8 @@ MainWindow::MainWindow(QWidget *parent) : @@ -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) : @@ -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);} @@ -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()){

8
qt/i2pd_qt/mainwindow.ui

@ -26,7 +26,7 @@ @@ -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">
@ -114,7 +114,7 @@ @@ -114,7 +114,7 @@
<property name="maximumSize">
<size>
<width>16777215</width>
<height>516</height>
<height>3000</height>
</size>
</property>
<property name="currentIndex">
@ -127,7 +127,7 @@ @@ -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">
@ -175,7 +175,7 @@ @@ -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">

Loading…
Cancel
Save