source: src/gui/eventdialog.cpp @ 842f5f9

qt5
Last change on this file since 842f5f9 was 842f5f9, checked in by pavelpa <pavelpa@…>, 13 years ago

event dialog - details about the Event is displayed in FullScreen? mode

  • Property mode set to 100644
File size: 1.4 KB
RevLine 
[707cd31]1#include "eventdialog.h"
2
[1fe2f21]3#include <QScrollBar>
[395d6d3]4
[d4a8bbf]5EventDialog::EventDialog(const int &aEventId, QWidget *aParent)
[707cd31]6    : QDialog(aParent)
[d4a8bbf]7    , mEventId(aEventId)
[707cd31]8{
9    setupUi(this);
[395d6d3]10
[842f5f9]11#ifdef MAEMO
12    showFullScreen();
13#endif
14
[d4a8bbf]15    const int confId = 1;
16    Event event = Event::getById(aEventId,confId);
17
[4e071a3]18    //abstract->setStyleSheet("background-color : transparent;");
19    //description->setStyleSheet("background-color : transparent;");
[395d6d3]20
[1fe2f21]21    // use text color from 'title' QLabel
22    QColor color = title->palette().color(QPalette::Active, QPalette::WindowText);
[4e071a3]23    QColor bkgrColor = this->palette().color(QPalette::Active, QPalette::Background);
[1fe2f21]24    QPalette p = abstract->palette();
25    p.setColor(QPalette::Active, QPalette::Text, color);
[4e071a3]26    p.setColor(QPalette::Active, QPalette::Base, bkgrColor);
[1fe2f21]27    abstract->setPalette(p);
28    description->setPalette(p);
29
30    // set scrollbars color
[4e071a3]31    //QPalette p2 = description->verticalScrollBar()->palette();
32    //p2.setColor(QPalette::Active, QPalette::Background, color);
33    ////description->verticalScrollBar()->setStyleSheet("background-color : blue;");
34    //abstract->verticalScrollBar()->setPalette(p2);
35    //description->verticalScrollBar()->setPalette(p2);
[1fe2f21]36
[d4a8bbf]37    title->setText(event.title());
38    persons->setText(event.persons().join(" and "));
39    abstract->setPlainText(event.abstract());
40    description->setPlainText(event.description());
[707cd31]41}
42
Note: See TracBrowser for help on using the repository browser.