From 1aede9a55554971a6717844890175b758842881d Mon Sep 17 00:00:00 2001 From: Philipp Spitzer Date: Tue, 28 May 2013 20:08:35 +0000 Subject: [PATCH] Changed the event dialog layout hoping to improve issue #48. --- src/gui/eventdialog.cpp | 37 ++++- src/gui/eventdialog.ui | 343 ++++++---------------------------------- 2 files changed, 75 insertions(+), 305 deletions(-) diff --git a/src/gui/eventdialog.cpp b/src/gui/eventdialog.cpp index c95104c..28e5914 100644 --- a/src/gui/eventdialog.cpp +++ b/src/gui/eventdialog.cpp @@ -36,14 +36,35 @@ EventDialog::EventDialog(int conferenceId, int eventId, QWidget *parent): QDialo Event event = Event::getById(mEventId, mConferenceId); - title->setText(event.title()); - persons->setText(event.persons().join(" and ")); - abstract->setText(event.abstract()); - description->setText(event.description()); - QStringList linksText = static_cast(event.links().values()); - for (QStringList::iterator linkIterator = linksText.begin(); linkIterator != linksText.end(); ++linkIterator) - *linkIterator = QString("%1").arg(*linkIterator); - links->setText(linksText.join("
")); + QString info; + // title + info.append(QString("

%1

\n").arg(event.title())); + + // persons + info += QString("

%1

\n").arg(tr("Persons")); + info += QString("

%1

\n").arg(event.persons().join(", ")); + + // abstract + info += QString("

%1

\n").arg(tr("Abstract")); + info += QString("

%1

\n").arg(event.abstract()); + + // description + info += QString("

%1

\n").arg(tr("Description")); + info += QString("

%1

\n").arg(event.description()); + + // links + info += QString("

%1

\n\n"); + eventInfoTextBrowser->setHtml(info); connect(favouriteButton, SIGNAL(clicked()), SLOT(favouriteClicked())); connect(alarmButton, SIGNAL(clicked()), SLOT(alarmClicked())); diff --git a/src/gui/eventdialog.ui b/src/gui/eventdialog.ui index 1ab6a55..73e0f90 100644 --- a/src/gui/eventdialog.ui +++ b/src/gui/eventdialog.ui @@ -6,8 +6,8 @@ 0 0 - 485 - 368 + 539 + 404 @@ -22,323 +22,72 @@ false - - - + + + + + true + + + + + - - - - 0 - 0 - - - - - 75 - true - true - - + - Title goes here + ... - - Qt::AlignCenter + + + :/icons/alarm-off.png:/icons/alarm-off.png - - true + + + 32 + 32 + + + + CapsLock - - - - 0 - 0 - + + + ... - - true + + + :/icons/favourite-off.png:/icons/favourite-off.png + + + + 32 + 32 + - - - - 0 - -1 - 446 - 262 - - - - - - - - 0 - 0 - - - - - - - - 0 - 0 - - - - - 75 - true - - - - Persons - - - - - - - 50 - false - - - - PERSONS - - - true - - - true - - - Qt::LinksAccessibleByKeyboard|Qt::LinksAccessibleByMouse|Qt::TextBrowserInteraction|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse - - - - - - - - - - - 0 - 0 - - - - - 75 - true - - - - Abstract - - - - - - - 50 - false - - - - ABSTRACT - - - true - - - true - - - Qt::LinksAccessibleByKeyboard|Qt::LinksAccessibleByMouse|Qt::TextBrowserInteraction|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse - - - - - - - - - - - 75 - true - - - - Description - - - - - - - 0 - 0 - - - - - 50 - false - - - - DESCRIPTION - - - true - - - true - - - Qt::LinksAccessibleByKeyboard|Qt::LinksAccessibleByMouse|Qt::TextBrowserInteraction|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse - - - - - - - - - - - 75 - true - - - - Links - - - - - - - 0 - 0 - - - - - 50 - false - - - - LINKS - - - Qt::RichText - - - true - - - true - - - Qt::LinksAccessibleByKeyboard|Qt::LinksAccessibleByMouse|Qt::TextBrowserInteraction|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse - - - - - - - - - - - - + - Qt::Vertical - - - QSizePolicy::Minimum + Qt::Horizontal - 20 - 10 + 40 + 20 - - - - - ... - - - - :/icons/alarm-off.png:/icons/alarm-off.png - - - - 32 - 32 - - - - CapsLock - - - - - - - ... - - - - :/icons/favourite-off.png:/icons/favourite-off.png - - - - 32 - 32 - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - OK - - - - + + + OK + + -- 2.39.5