- QHBoxLayout *hori_layout = new QHBoxLayout(centralWidget());
- QVBoxLayout *verticalLayoutL = new QVBoxLayout();
- verticalLayoutL->addItem(new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding));
- QLabel *from_lbl = new QLabel(tr("Use the silent profile between"));
- from_lbl->setAlignment(Qt::AlignHCenter);
- verticalLayoutL->addWidget(from_lbl);
- from_button = new QMaemo5ValueButton();
- from_button->setPickSelector(new QMaemo5TimePickSelector());
- verticalLayoutL->addWidget(from_button);
- QLabel *to_lbl = new QLabel(tr("and"));
- to_lbl->setAlignment(Qt::AlignHCenter);
- verticalLayoutL->addWidget(to_lbl);
- to_button = new QMaemo5ValueButton();
- to_button->setPickSelector(new QMaemo5TimePickSelector());
- verticalLayoutL->addWidget(to_button);
- // Status
- verticalLayoutL->addItem(new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding));
- cb_enable = new QCheckBox(tr("Activated"));
- verticalLayoutL->addWidget(cb_enable);
- hori_layout->addLayout(verticalLayoutL);
- QVBoxLayout *verticalLayoutR = new QVBoxLayout;
- verticalLayoutR->addItem(new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding));
- done_btn = new QPushButton(tr("Save"));
- done_btn->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
- connect(done_btn, SIGNAL(clicked()), this, SLOT(close()));
- verticalLayoutR->addWidget(done_btn);
- hori_layout->addLayout(verticalLayoutR);
- // Load settings
- loadSettings();
- connect(cb_enable, SIGNAL(toggled(bool)), this, SLOT(enableSilencing(bool)));
+ QVBoxLayout *vLayout = new QVBoxLayout(centralWidget());
+ addEventBtn = new QPushButton(QIcon::fromTheme("general_add"), tr("New profile switching event"));
+ connect(addEventBtn, SIGNAL(clicked()), this, SLOT(addEvent()));
+ vLayout->addWidget(addEventBtn);
+ eventList = new SwitchingEventList;
+ vLayout->addWidget(eventList);