added 'Conference' tab - to list conference details
[toast/confclerk.git] / src / gui / eventdialog.cpp
1 #include "eventdialog.h"
2 #include <appsettings.h>
3
4 #include <QScrollBar>
5
6 EventDialog::EventDialog(const int &aEventId, QWidget *aParent)
7     : QDialog(aParent)
8     , mEventId(aEventId)
9 {
10     setupUi(this);
11
12 #ifdef MAEMO
13     showFullScreen();
14 #endif
15
16     Event event = Event::getById(aEventId,AppSettings::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