Changeset 1bcd66f for src/gui/eventdialog.cpp
- Timestamp:
- 01/27/10 13:06:32 (13 years ago)
- Branches:
- master, qt5
- Children:
- 6123b48
- Parents:
- ce59092
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/gui/eventdialog.cpp
rce59092 r1bcd66f 7 7 #include <alarm.h> 8 8 #endif 9 10 DetailsContainer::DetailsContainer(QWidget *aParent)11 : QWidget(aParent)12 {13 mAbstract.setWordWrap(true);14 mDescription.setWordWrap(true);15 16 QFont f = QLabel().font();17 f.setBold(true);18 f.setItalic(true);19 mMainLayout = new QVBoxLayout(this);20 QLabel *persons = new QLabel("Persons:");21 persons->setFont(f);22 mMainLayout->addWidget(persons);23 mMainLayout->addWidget(&mPersons);24 mMainLayout->addWidget(new QLabel("")); // spacer25 QLabel *abstract = new QLabel("Abstract:");26 abstract->setFont(f);27 mMainLayout->addWidget(abstract);28 mMainLayout->addWidget(&mAbstract);29 mMainLayout->addWidget(new QLabel("")); // spacer30 QLabel *description = new QLabel("Description:");31 description->setFont(f);32 mMainLayout->addWidget(description);33 mMainLayout->addWidget(&mDescription);34 setLayout(mMainLayout);35 }36 37 void DetailsContainer::setPersons(const QStringList &aPersons)38 {39 mPersons.setText(aPersons.join(" and "));40 }41 42 void DetailsContainer::setAbstract(const QString &aAbstract)43 {44 mAbstract.setText(aAbstract);45 }46 47 void DetailsContainer::setDescription(const QString &aDescription)48 {49 mDescription.setText(aDescription);50 }51 9 52 10 EventDialog::EventDialog(const int &aEventId, QWidget *aParent) … … 63 21 64 22 title->setText(event.title()); 65 mDetails.setPersons(event.persons()); 66 mDetails.setAbstract(event.abstract()); 67 mDetails.setDescription(event.description()); 68 scrollArea->setWidget(&mDetails); 23 persons->setText(event.persons().join(" and ")); 24 abstract->setText(event.abstract()); 25 description->setText(event.description()); 69 26 70 27 connect(favouriteButton, SIGNAL(clicked()), SLOT(favouriteClicked()));
Note: See TracChangeset
for help on using the changeset viewer.