From 0efc3d061c549ba957c66c685ef71709c2dee6b6 Mon Sep 17 00:00:00 2001 From: Kashyap Date: Mon, 6 Jul 2015 17:32:37 +0530 Subject: [PATCH 1/3] Update layout and font for askhost popup Change the form to have three items: Server IP field, port field for events and another port field for commands. We've simplified this way since one server has only a single IP. This keeps the form clean. Other changes: * Change font to Lucida Grande. We use Lucida Grande for other items. It makes sense to extend that to everything else. * Change button text from "Ok" to "Connect". --- rbkit-lib/ui/askhost.cpp | 5 +- rbkit-lib/ui/askhost.ui | 243 +++++++++++++++++++++++++++------------ 2 files changed, 174 insertions(+), 74 deletions(-) diff --git a/rbkit-lib/ui/askhost.cpp b/rbkit-lib/ui/askhost.cpp index abc8197..a0092a7 100644 --- a/rbkit-lib/ui/askhost.cpp +++ b/rbkit-lib/ui/askhost.cpp @@ -17,8 +17,9 @@ AskHost::~AskHost() void AskHost::userSelectedHost() { - QString commandsSocket = ui->commandsSocket->text(); - QString eventsSocket = ui->eventsSocket->text(); + QString serverHost = ui->serverHost->text(); + QString commandsSocket = serverHost + ":" + ui->commandsPort->text(); + QString eventsSocket = serverHost + ":" + ui->eventsPort->text(); qDebug() << commandsSocket << eventsSocket; emit userHasSelectedHost(commandsSocket, eventsSocket); diff --git a/rbkit-lib/ui/askhost.ui b/rbkit-lib/ui/askhost.ui index cf7f97f..098f883 100644 --- a/rbkit-lib/ui/askhost.ui +++ b/rbkit-lib/ui/askhost.ui @@ -9,8 +9,8 @@ 0 0 - 395 - 194 + 368 + 228 @@ -22,76 +22,175 @@ Enter address of your Ruby app - - - - - - - - - Enter connection information for events - - - - - - - - - tcp://127.0.0.1:5555 - - - - - - - - - Enter connection information for commands - - - - - - - - - tcp://127.0.0.1:5556 - - - - - - - - - - - - - Qt::Horizontal - - - - 178 - 20 - - - - - - - - &Ok - - - - - - - - + + + + 198 + 121 + 125 + 25 + + + + + Lucida Grande + 18 + + + + 5556 + + + + + + 62 + 121 + 125 + 25 + + + + + Lucida Grande + 18 + + + + 5555 + + + + + + 47 + 165 + 281 + 32 + + + + + Lucida Grande + + + + + + + + Lucida Grande + + + + Qt::Horizontal + + + + 178 + 20 + + + + + + + + + Lucida Grande + + + + &Connect + + + + + + + + + 197 + 100 + 121 + 16 + + + + + Lucida Grande + + + + Command Port + + + + + + 63 + 48 + 261 + 27 + + + + + Lucida Grande + + + + + + + + Lucida Grande + 18 + + + + tcp://127.0.0.1 + + + + + + + + + 63 + 24 + 221 + 16 + + + + + Lucida Grande + + + + Enter the IP address of the server + + + + + + 63 + 100 + 59 + 16 + + + + + Lucida Grande + + + + Data Port + + From b3badb172470fba8481614aae1a96f65e3140a58 Mon Sep 17 00:00:00 2001 From: Kashyap Date: Mon, 6 Jul 2015 18:11:47 +0530 Subject: [PATCH 2/3] Update UI to use Lucida Grande --- rbkit-lib/ui/comparesnapshotform.ui | 36 ++++++++++++++++- rbkit-lib/ui/memoryview.ui | 5 +++ rbkit-lib/ui/rbkitmainwindow.ui | 60 +++++++++++++++++++++++++++++ 3 files changed, 99 insertions(+), 2 deletions(-) diff --git a/rbkit-lib/ui/comparesnapshotform.ui b/rbkit-lib/ui/comparesnapshotform.ui index 5d5e926..2d2f992 100644 --- a/rbkit-lib/ui/comparesnapshotform.ui +++ b/rbkit-lib/ui/comparesnapshotform.ui @@ -20,13 +20,24 @@ + + + Lucida Grande + + Select Snapshot #1 - + + + + Lucida Grande + + + @@ -34,13 +45,24 @@ + + + Lucida Grande + + Select Snapshot #2 - + + + + Lucida Grande + + + @@ -48,6 +70,11 @@ + + + Lucida Grande + + Cancel @@ -55,6 +82,11 @@ + + + Lucida Grande + + Ok diff --git a/rbkit-lib/ui/memoryview.ui b/rbkit-lib/ui/memoryview.ui index 392564e..0f9a39b 100644 --- a/rbkit-lib/ui/memoryview.ui +++ b/rbkit-lib/ui/memoryview.ui @@ -28,6 +28,11 @@ + + + Lucida Grande + + QTabWidget::West diff --git a/rbkit-lib/ui/rbkitmainwindow.ui b/rbkit-lib/ui/rbkitmainwindow.ui index c50d7f7..9c8b308 100644 --- a/rbkit-lib/ui/rbkitmainwindow.ui +++ b/rbkit-lib/ui/rbkitmainwindow.ui @@ -16,6 +16,11 @@ 840 + + + Lucida Grande + + Rbkit - A Ruby Profiler @@ -23,6 +28,11 @@ + + + Lucida Grande + + QTabWidget::North @@ -45,6 +55,11 @@ 22 + + + 13 + + &File @@ -53,12 +68,23 @@ + + + 13 + + &Help + + + Lucida Grande + 13 + + &Memory Profiling @@ -72,6 +98,11 @@ + + + Lucida Grande + + toolBar @@ -106,6 +137,9 @@ + + false + :/icons/connect-48.png:/icons/connect-48.png @@ -113,6 +147,12 @@ &Connect + + + Lucida Grande + PreferAntialias + + @@ -121,6 +161,11 @@ Quit Rbkit + + + Lucida Grande + + Ctrl+Q @@ -138,6 +183,11 @@ &Start GC + + + Lucida Grande + + @@ -150,6 +200,11 @@ Record heapsnapshot + + + Lucida Grande + + @@ -162,6 +217,11 @@ Compare Heapsnpshot + + + Lucida Grande + + From 696bfc8c696bb9265f7c169e1a86ae759a1c74cf Mon Sep 17 00:00:00 2001 From: Kashyap Date: Mon, 6 Jul 2015 19:33:52 +0530 Subject: [PATCH 3/3] Add Reset to Default button Fix layout of the dialog; it should not be maximized. --- rbkit-lib/ui/askhost.cpp | 8 ++ rbkit-lib/ui/askhost.h | 1 + rbkit-lib/ui/askhost.ui | 162 +++++++++++++++++++++++---------------- 3 files changed, 106 insertions(+), 65 deletions(-) diff --git a/rbkit-lib/ui/askhost.cpp b/rbkit-lib/ui/askhost.cpp index a0092a7..4b34d5e 100644 --- a/rbkit-lib/ui/askhost.cpp +++ b/rbkit-lib/ui/askhost.cpp @@ -8,6 +8,7 @@ AskHost::AskHost(QWidget *parent) : { ui->setupUi(this); connect(ui->hostSelectedButton, SIGNAL(clicked()), this, SLOT(userSelectedHost())); + connect(ui->hostResetButton, SIGNAL(clicked()), this, SLOT(userResetHost())); } AskHost::~AskHost() @@ -24,3 +25,10 @@ void AskHost::userSelectedHost() qDebug() << commandsSocket << eventsSocket; emit userHasSelectedHost(commandsSocket, eventsSocket); } + +void AskHost::userResetHost() +{ + ui->commandsPort->setText("5556"); + ui->eventsPort->setText("5555"); + ui->serverHost->setText("tcp://127.0.0.1"); +} diff --git a/rbkit-lib/ui/askhost.h b/rbkit-lib/ui/askhost.h index a9317ca..b480e07 100644 --- a/rbkit-lib/ui/askhost.h +++ b/rbkit-lib/ui/askhost.h @@ -18,6 +18,7 @@ class AskHost : public QDialog private slots: void userSelectedHost(); + void userResetHost(); signals: void userHasSelectedHost(QString, QString); diff --git a/rbkit-lib/ui/askhost.ui b/rbkit-lib/ui/askhost.ui index 098f883..25d78c0 100644 --- a/rbkit-lib/ui/askhost.ui +++ b/rbkit-lib/ui/askhost.ui @@ -9,24 +9,36 @@ 0 0 - 368 - 228 + 321 + 195 + + + 0 + 0 + + - 0 - 100 + 321 + 195 + + + + + 321 + 195 - Enter address of your Ruby app + Enter Ruby app's address - 198 - 121 + 165 + 111 125 25 @@ -44,8 +56,8 @@ - 62 - 121 + 29 + 111 125 25 @@ -60,58 +72,11 @@ 5555 - - - - 47 - 165 - 281 - 32 - - - - - Lucida Grande - - - - - - - - Lucida Grande - - - - Qt::Horizontal - - - - 178 - 20 - - - - - - - - - Lucida Grande - - - - &Connect - - - - - - 197 - 100 + 164 + 90 121 16 @@ -125,11 +90,11 @@ Command Port - + - 63 - 48 + 30 + 38 261 27 @@ -158,8 +123,8 @@ - 63 - 24 + 30 + 14 221 16 @@ -176,8 +141,8 @@ - 63 - 100 + 30 + 90 59 16 @@ -191,10 +156,77 @@ Data Port + + + + 20 + 150 + 150 + 32 + + + + + 0 + 0 + + + + + Lucida Grande + + + + Qt::ClickFocus + + + &Reset to Defaults + + + false + + + false + + + false + + + + + + 200 + 150 + 94 + 32 + + + + + 0 + 0 + + + + + Lucida Grande + + + + &Connect + + + false + + + true + + hostSelected() + hostReset()