当前位置: 首页>>代码示例>>C++>>正文


C++ KDialog::mainWidget方法代码示例

本文整理汇总了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();
}
开发者ID:UIKit0,项目名称:kopete-facebook,代码行数:15,代码来源:facebookcontact.cpp

示例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;
}
开发者ID:aarontc,项目名称:kde-workspace,代码行数:39,代码来源:LogFile.cpp


注:本文中的KDialog::mainWidget方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。