void FacebookContact::slotUserInfo() { KDialog infoDialog; infoDialog.setButtons( KDialog::Close); infoDialog.setDefaultButton(KDialog::Close); Ui::FacebookInfo info; info.setupUi(infoDialog.mainWidget()); info.m_displayName->setText(nickName()); info.m_personalMessage->setPlainText(statusMessage().message()); QVariant picture(property(Kopete::Global::Properties::self()->photo()).value()); info.m_photo->setPixmap(picture.value<QPixmap>()); infoDialog.setCaption(nickName()); infoDialog.exec(); }
void LogFile::configureSettings(void) { QPalette cgroup = monitor->palette(); lfs = new Ui_LogFileSettings; Q_CHECK_PTR(lfs); KDialog dlg; dlg.setCaption( i18n("File logging settings") ); dlg.setButtons( KDialog::Ok | KDialog::Cancel | KDialog::Apply ); lfs->setupUi(dlg.mainWidget()); lfs->fgColor->setColor(cgroup.color( QPalette::Text )); lfs->fgColor->setText(i18n("Foreground color:")); lfs->bgColor->setColor(cgroup.color( QPalette::Base )); lfs->bgColor->setText(i18n("Background color:")); lfs->fontRequester->setFont(monitor->font()); lfs->ruleList->addItems(filterRules); lfs->title->setText(title()); connect(&dlg, SIGNAL(okClicked()), &dlg, SLOT(accept())); connect(&dlg, SIGNAL(applyClicked()), this, SLOT(applySettings())); connect(lfs->addButton, SIGNAL(clicked()), this, SLOT(settingsAddRule())); connect(lfs->deleteButton, SIGNAL(clicked()), this, SLOT(settingsDeleteRule())); connect(lfs->changeButton, SIGNAL(clicked()), this, SLOT(settingsChangeRule())); connect(lfs->ruleList, SIGNAL(currentRowChanged(int)), this, SLOT(settingsRuleListSelected(int))); connect(lfs->ruleText, SIGNAL(returnPressed()), this, SLOT(settingsAddRule())); connect(lfs->ruleText, SIGNAL(textChanged(QString)), this, SLOT(settingsRuleTextChanged())); settingsRuleListSelected(lfs->ruleList->currentRow()); settingsRuleTextChanged(); if (dlg.exec()) applySettings(); delete lfs; lfs = 0; }