本文整理汇总了C++中kservice::Ptr::genericName方法的典型用法代码示例。如果您正苦于以下问题:C++ Ptr::genericName方法的具体用法?C++ Ptr::genericName怎么用?C++ Ptr::genericName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类kservice::Ptr
的用法示例。
在下文中一共展示了Ptr::genericName方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ptr
Info::Private::Private(const KService::Ptr& aPtr)
: ptr(aPtr)
, instanceCaption(aPtr->name())
, groupName(aPtr->genericName())
, itemIconName(aPtr->property("X-Kexi-ItemIcon", QVariant::String).toString())
, objectName(aPtr->property("X-Kexi-TypeName", QVariant::String).toString())
, partClass(aPtr->property("X-Kexi-Class", QVariant::String).toString())
, broken(false)
, idStoredInPartDatabase(false)
{
bool dataView = true;
getBooleanProperty(aPtr, "X-Kexi-SupportsDataView", &dataView);
if (dataView) {
supportedViewModes |= Kexi::DataViewMode;
}
bool designView = true;
getBooleanProperty(aPtr, "X-Kexi-SupportsDesignView", &designView);
if (designView) {
supportedViewModes |= Kexi::DesignViewMode;
}
bool textView = false;
getBooleanProperty(aPtr, "X-Kexi-SupportsTextView", &textView);
if (textView) {
supportedViewModes |= Kexi::TextViewMode;
}
dataView = true;
getBooleanProperty(aPtr, "X-Kexi-SupportsDataViewInUserMode", &dataView);
if (dataView) {
supportedUserViewModes |= Kexi::DataViewMode;
}
designView = false;
getBooleanProperty(aPtr, "X-Kexi-SupportsDesignViewInUserMode", &designView);
if (designView) {
supportedUserViewModes |= Kexi::DesignViewMode;
}
textView = false;
getBooleanProperty(aPtr, "X-Kexi-SupportsTextViewInUserMode", &textView);
if (textView) {
supportedUserViewModes |= Kexi::TextViewMode;
}
isVisibleInNavigator = true;
getBooleanProperty(aPtr, "X-Kexi-NoObject", &isVisibleInNavigator);
isPropertyEditorAlwaysVisibleInDesignMode = true;
getBooleanProperty(aPtr, "X-Kexi-PropertyEditorAlwaysVisibleInDesignMode",
&isPropertyEditorAlwaysVisibleInDesignMode);
}
示例2: nameFromService
QString AppEntry::nameFromService(const KService::Ptr service, NameFormat nameFormat)
{
const QString &name = service->name();
QString genericName = service->genericName();
if (genericName.isEmpty()) {
genericName = service->comment();
}
if (nameFormat == NameOnly || genericName.isEmpty() || name == genericName) {
return name;
} else if (nameFormat == GenericNameOnly) {
return genericName;
} else if (nameFormat == NameAndGenericName) {
return i18nc("App name (Generic name)", "%1 (%2)", name, genericName);
} else {
return i18nc("Generic name (App name)", "%1 (%2)", genericName, name);
}
}
示例3: ptr
Info::Private::Private(const KService::Ptr& aPtr)
: ptr(aPtr)
, instanceCaption(aPtr->name())
, groupName(aPtr->genericName())
// , mimeType(aPtr->property("X-Kexi-TypeMime").toString())
, itemIconName(aPtr->property("X-Kexi-ItemIcon", QVariant::String).toString())
, objectName(aPtr->property("X-Kexi-TypeName", QVariant::String).toString())
// , projectPartID( aPtr->property("X-Kexi-TypeId").toInt() )
, partClass(aPtr->property("X-Kexi-Class", QVariant::String).toString())
, broken(false)
, idStoredInPartDatabase(false)
{
bool dataView = true;
getBooleanProperty(aPtr, "X-Kexi-SupportsDataView", &dataView);
if (dataView) {
supportedViewModes |= Kexi::DataViewMode;
}
bool designView = true;
getBooleanProperty(aPtr, "X-Kexi-SupportsDesignView", &designView);
if (designView) {
supportedViewModes |= Kexi::DesignViewMode;
}
bool textView = false;
getBooleanProperty(aPtr, "X-Kexi-SupportsTextView", &textView);
if (textView) {
supportedViewModes |= Kexi::TextViewMode;
}
dataView = true;
getBooleanProperty(aPtr, "X-Kexi-SupportsDataViewInUserMode", &dataView);
if (dataView) {
supportedUserViewModes |= Kexi::DataViewMode;
}
designView = false;
getBooleanProperty(aPtr, "X-Kexi-SupportsDesignViewInUserMode", &designView);
if (designView) {
supportedUserViewModes |= Kexi::DesignViewMode;
}
textView = false;
getBooleanProperty(aPtr, "X-Kexi-SupportsTextViewInUserMode", &textView);
if (textView) {
supportedUserViewModes |= Kexi::TextViewMode;
}
isVisibleInNavigator = true;
getBooleanProperty(aPtr, "X-Kexi-NoObject", &isVisibleInNavigator);
isPropertyEditorAlwaysVisibleInDesignMode = true;
getBooleanProperty(aPtr, "X-Kexi-PropertyEditorAlwaysVisibleInDesignMode",
&isPropertyEditorAlwaysVisibleInDesignMode);
#if 0
if (projectPartID == 0) {
if (isVisibleInNavigator) {
kWarning() << "Could not found project part ID! (name: '" << objectName
<< "'). Possible problem with installation of the .desktop files for Kexi plugins";
isVisibleInNavigator = false;
}
projectPartID = -1;
}
#endif
}