qt5
Last change
on this file since d4a8bbf was
d4a8bbf,
checked in by pavelpa <pavelpa@…>, 13 years ago
|
MAEMO: work on alarm
- snooze alarm
- cancel alarm
- run application which automatically display Event dialog for given Event ID
|
-
Property mode set to
100644
|
File size:
1.3 KB
|
Rev | Line | |
---|
[707cd31] | 1 | #include "eventdialog.h" |
---|
| 2 | |
---|
[1fe2f21] | 3 | #include <QScrollBar> |
---|
[395d6d3] | 4 | |
---|
[d4a8bbf] | 5 | EventDialog::EventDialog(const int &aEventId, QWidget *aParent) |
---|
[707cd31] | 6 | : QDialog(aParent) |
---|
[d4a8bbf] | 7 | , mEventId(aEventId) |
---|
[707cd31] | 8 | { |
---|
| 9 | setupUi(this); |
---|
[395d6d3] | 10 | |
---|
[d4a8bbf] | 11 | const int confId = 1; |
---|
| 12 | Event event = Event::getById(aEventId,confId); |
---|
| 13 | |
---|
[395d6d3] | 14 | abstract->setStyleSheet("background-color : transparent;"); |
---|
| 15 | description->setStyleSheet("background-color : transparent;"); |
---|
| 16 | |
---|
[1fe2f21] | 17 | // use text color from 'title' QLabel |
---|
| 18 | QColor color = title->palette().color(QPalette::Active, QPalette::WindowText); |
---|
| 19 | QPalette p = abstract->palette(); |
---|
| 20 | //p.setColor(QPalette::Active, QPalette::Text, Qt::blue); |
---|
| 21 | p.setColor(QPalette::Active, QPalette::Text, color); |
---|
| 22 | p.setColor(QPalette::Active, QPalette::WindowText, color); |
---|
| 23 | abstract->setPalette(p); |
---|
| 24 | description->setPalette(p); |
---|
| 25 | |
---|
| 26 | // set scrollbars color |
---|
| 27 | QPalette p2 = description->verticalScrollBar()->palette(); |
---|
| 28 | p2.setColor(QPalette::Active, QPalette::Background, color); |
---|
| 29 | //description->verticalScrollBar()->setStyleSheet("background-color : blue;"); |
---|
| 30 | abstract->verticalScrollBar()->setPalette(p2); |
---|
| 31 | description->verticalScrollBar()->setPalette(p2); |
---|
| 32 | |
---|
[d4a8bbf] | 33 | title->setText(event.title()); |
---|
| 34 | persons->setText(event.persons().join(" and ")); |
---|
| 35 | abstract->setPlainText(event.abstract()); |
---|
| 36 | description->setPlainText(event.description()); |
---|
[707cd31] | 37 | } |
---|
| 38 | |
---|
Note: See
TracBrowser
for help on using the repository browser.