本文整理汇总了C++中KDialog::mainWidget方法的典型用法代码示例。如果您正苦于以下问题:C++ KDialog::mainWidget方法的具体用法?C++ KDialog::mainWidget怎么用?C++ KDialog::mainWidget使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KDialog
的用法示例。
在下文中一共展示了KDialog::mainWidget方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: slotUserInfo
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();
}
示例2: configureSettings
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;
}