source: src/gui/eventdialog.cpp @ 76cde75

qt5
Last change on this file since 76cde75 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
Line 
1#include "eventdialog.h"
2
3#include <QScrollBar>
4
5EventDialog::EventDialog(const int &aEventId, QWidget *aParent)
6    : QDialog(aParent)
7    , mEventId(aEventId)
8{
9    setupUi(this);
10
11#ifdef MAEMO
12    showFullScreen();
13#endif
14
15    const int confId = 1;
16    Event event = Event::getById(aEventId,confId);
17
18    //abstract->setStyleSheet("background-color : transparent;");
19    //description->setStyleSheet("background-color : transparent;");
20
21    // use text color from 'title' QLabel
22    QColor color = title->palette().color(QPalette::Active, QPalette::WindowText);
23    QColor bkgrColor = this->palette().color(QPalette::Active, QPalette::Background);
24    QPalette p = abstract->palette();
25    p.setColor(QPalette::Active, QPalette::Text, color);
26    p.setColor(QPalette::Active, QPalette::Base, bkgrColor);
27    abstract->setPalette(p);
28    description->setPalette(p);
29
30    // set scrollbars color
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);
36
37    title->setText(event.title());
38    persons->setText(event.persons().join(" and "));
39    abstract->setPlainText(event.abstract());
40    description->setPlainText(event.description());
41}
42
Note: See TracBrowser for help on using the repository browser.