From 873642c0d898f3152b251a783bf4cdef47070d4c Mon Sep 17 00:00:00 2001 From: Alex Borisov Date: Thu, 2 Feb 2012 00:33:44 +0200 Subject: FIX: implement async connection requests --- client/ProxyClientApp.cpp | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) (limited to 'client/ProxyClientApp.cpp') diff --git a/client/ProxyClientApp.cpp b/client/ProxyClientApp.cpp index f9cbf78..b55c33c 100644 --- a/client/ProxyClientApp.cpp +++ b/client/ProxyClientApp.cpp @@ -1,7 +1,5 @@ -#include -#include -#include +#include #include "client.h" #include "Dialog.h" @@ -70,17 +68,6 @@ ProxyClientApp::ProxyClientApp(int &argc, char *argv[]): QApplication(argc, argv welcomeMsg.setStandardButtons(QMessageBox::Ok); welcomeMsg.setIcon(QMessageBox::Information); welcomeMsg.exec(); - - /* - vector > files; - pair file; - file = make_pair("../main.cpp", "70ba1d68907cc9d3"); - files.push_back(file); - - //QString addr = QString::fromLocal8Bit(); - DownloadClient downloadClient("127.0.0.1"); - downloadClient.Download(files); - */ } void ProxyClientApp::trayActivated(QSystemTrayIcon::ActivationReason reason) @@ -94,8 +81,15 @@ void ProxyClientApp::trayActivated(QSystemTrayIcon::ActivationReason reason) void ProxyClientApp::showProxyDialog() { Logger::Trace("Creating proxy dialog.\n"); + QDesktopWidget* screen = QApplication::desktop(); + QRect availScreenRect = screen->availableGeometry(); + + Logger::Debug("Available screen size WxH = %d x %d\n", availScreenRect.width(), availScreenRect.height()); + ProxyDialog *dialog = new ProxyDialog(); dialog->show(); + dialog->move(availScreenRect.width() - dialog->frameSize().width(), + availScreenRect.height() - dialog->frameSize().height()); } void ProxyClientApp::configUpdated() -- cgit v1.2.3