source: src/gui/eventdialog.cpp @ d4a8bbf

qt5
Last change on this file since d4a8bbf was d4a8bbf, checked in by pavelpa <pavelpa@…>, 12 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
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    const int confId = 1;
12    Event event = Event::getById(aEventId,confId);
13
14    abstract->setStyleSheet("background-color : transparent;");
15    description->setStyleSheet("background-color : transparent;");
16
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
33    title->setText(event.title());
34    persons->setText(event.persons().join(" and "));
35    abstract->setPlainText(event.abstract());
36    description->setPlainText(event.description());
37}
38
Note: See TracBrowser for help on using the repository browser.