From 863951c5891e848a87bfcf5e06d48204367418c8 Mon Sep 17 00:00:00 2001 From: thunder2 Date: Sun, 25 Nov 2012 11:01:42 +0000 Subject: [PATCH] ProfileWidget - fixed layout (with some system fonts) - fixed date time format git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5885 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- .../src/gui/profile/ProfileWidget.cpp | 20 +- .../src/gui/profile/ProfileWidget.ui | 186 ++++++++---------- 2 files changed, 83 insertions(+), 123 deletions(-) diff --git a/retroshare-gui/src/gui/profile/ProfileWidget.cpp b/retroshare-gui/src/gui/profile/ProfileWidget.cpp index 824e71d30..b3d091136 100644 --- a/retroshare-gui/src/gui/profile/ProfileWidget.cpp +++ b/retroshare-gui/src/gui/profile/ProfileWidget.cpp @@ -26,17 +26,12 @@ #include "StatusMessage.h" #include "ProfileManager.h" +#include "util/DateTime.h" #include #include #include -#include - -#include - -/* Define the format used for displaying the date and time */ -#define DATETIME_FMT "MMM dd hh:mm:ss" - +#include /** Default constructor */ ProfileWidget::ProfileWidget(QWidget *parent, Qt::WFlags flags) @@ -44,12 +39,12 @@ ProfileWidget::ProfileWidget(QWidget *parent, Qt::WFlags flags) { /* Invoke Qt Designer generated QObject setup routine */ ui.setupUi(this); - + connect(ui.editstatustoolButton,SIGNAL(clicked()), this, SLOT(statusmessagedlg())); connect(ui.CopyCertButton,SIGNAL(clicked()), this, SLOT(copyCert())); connect(ui.profile_Button,SIGNAL(clicked()), this, SLOT(profilemanager())); - ui.onlinesince->setText(QDateTime::currentDateTime().toString(DATETIME_FMT)); + ui.onlinesince->setText(DateTime::formatLongDateTime(QDateTime::currentDateTime())); } void ProfileWidget::showEvent ( QShowEvent * /*event*/ ) @@ -61,10 +56,6 @@ void ProfileWidget::showEvent ( QShowEvent * /*event*/ ) ui.country->setText(QString::fromUtf8(detail.location.c_str())); ui.peerid->setText(QString::fromStdString(detail.id)); - - // Dont Show a timestamp in RS calculate the day - QDateTime date = QDateTime::fromTime_t(detail.lastConnect); - QString stime = date.toString(Qt::LocalDate); /* set retroshare version */ std::map::iterator vit; @@ -113,7 +104,7 @@ void ProfileWidget::copyCert() QMessageBox::Ok, QMessageBox::Ok); return; } - + QClipboard *clipboard = QApplication::clipboard(); clipboard->setText(QString::fromStdString(cert)); @@ -121,7 +112,6 @@ void ProfileWidget::copyCert() tr("RetroShare"), tr("Your Cert is copied to Clipboard, paste and send it to your " "friend via email or some other way")); - } void ProfileWidget::profilemanager() diff --git a/retroshare-gui/src/gui/profile/ProfileWidget.ui b/retroshare-gui/src/gui/profile/ProfileWidget.ui index 1fcbc6f26..8cce516ec 100644 --- a/retroshare-gui/src/gui/profile/ProfileWidget.ui +++ b/retroshare-gui/src/gui/profile/ProfileWidget.ui @@ -171,6 +171,12 @@ + + + 0 + 0 + + 100 @@ -182,8 +188,14 @@ - + + + + 0 + 0 + + 75 @@ -195,21 +207,14 @@ - - - - Qt::Horizontal - - - - 252 - 20 - - - - + + + 0 + 0 + + 100 @@ -221,8 +226,14 @@ - + + + + 0 + 0 + + 75 @@ -234,21 +245,14 @@ - - - - Qt::Horizontal - - - - 252 - 20 - - - - + + + 0 + 0 + + 100 @@ -260,8 +264,14 @@ - + + + + 0 + 0 + + 75 @@ -273,19 +283,6 @@ - - - - Qt::Horizontal - - - - 252 - 20 - - - - @@ -300,6 +297,12 @@ + + + 0 + 0 + + 100 @@ -311,8 +314,14 @@ - + + + + 0 + 0 + + 75 @@ -326,6 +335,12 @@ + + + 0 + 0 + + 100 @@ -339,6 +354,12 @@ + + + 0 + 0 + + 100 @@ -350,8 +371,14 @@ - + + + + 0 + 0 + + 75 @@ -363,8 +390,14 @@ - + + + + 0 + 0 + + 75 @@ -376,45 +409,6 @@ - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Qt::Horizontal - - - - 211 - 17 - - - - @@ -509,12 +503,6 @@ 0 - - - 16777215 - 16777215 - - Local Address: @@ -575,12 +563,6 @@ 0 - - - 16777215 - 16777215 - - External Address: @@ -680,12 +662,6 @@ 0 - - - 16777215 - 16777215 - - Dynamic DNS: @@ -709,12 +685,6 @@ 0 - - - 16777215 - 20 - - Addresses list: