本文整理汇总了C++中ksharedconfig::Ptr::groupList方法的典型用法代码示例。如果您正苦于以下问题:C++ Ptr::groupList方法的具体用法?C++ Ptr::groupList怎么用?C++ Ptr::groupList使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ksharedconfig::Ptr
的用法示例。
在下文中一共展示了Ptr::groupList方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: load
void ArchiveMailWidget::load()
{
KSharedConfig::Ptr config = KGlobal::config();
const QStringList collectionList = config->groupList().filter( QRegExp( archiveMailCollectionPattern ) );
const int numberOfCollection = collectionList.count();
for(int i = 0 ; i < numberOfCollection; ++i) {
KConfigGroup group = config->group(collectionList.at(i));
ArchiveMailInfo *info = new ArchiveMailInfo(group);
createOrUpdateItem(info);
}
}
示例2: save
void ArchiveMailWidget::save()
{
if (!mChanged)
return;
KSharedConfig::Ptr config = KGlobal::config();
// first, delete all filter groups:
const QStringList filterGroups =config->groupList().filter( QRegExp( archiveMailCollectionPattern ) );
foreach ( const QString &group, filterGroups ) {
config->deleteGroup( group );
}
示例3: save
bool FollowUpReminderInfoWidget::save()
{
if (!mChanged) {
return false;
}
KSharedConfig::Ptr config = KSharedConfig::openConfig();
// first, delete all filter groups:
const QStringList filterGroups = config->groupList().filter(QRegularExpression(followUpItemPattern()));
foreach (const QString &group, filterGroups) {
config->deleteGroup(group);
}
示例4: load
void FollowUpReminderInfoWidget::load()
{
KSharedConfig::Ptr config = KSharedConfig::openConfig();
const QStringList filterGroups = config->groupList().filter(QRegularExpression(followUpItemPattern()));
const int numberOfItem = filterGroups.count();
for (int i = 0; i < numberOfItem; ++i) {
KConfigGroup group = config->group(filterGroups.at(i));
FollowUpReminder::FollowUpReminderInfo *info = new FollowUpReminder::FollowUpReminderInfo(group);
if (info->isValid()) {
createOrUpdateItem(info);
} else {
delete info;
}
}
}