QWinJumpListItem Class

The QWinJumpListItem class represents a jump list item. 更多...

头文件: #include <QWinJumpListItem>
qmake: QT += winextras
开始支持版本: Qt 5.2

公有类型

enum Type { Destination, Link, Separator }

公有函数

QWinJumpListItem(Type type)
~QWinJumpListItem()
QStringList arguments() const
QString description() const
QString filePath() const
QIcon icon() const
void setArguments(const QStringList &arguments)
void setDescription(const QString &description)
void setFilePath(const QString &filePath)
void setIcon(const QIcon &icon)
void setTitle(const QString &title)
void setType(Type type)
void setWorkingDirectory(const QString &workingDirectory)
QString title() const
Type type() const
QString workingDirectory() const

详细描述

The QWinJumpListItem class represents a jump list item.

成员类型

enum QWinJumpListItem::Type

This enum describes the available QWinJumpListItem types.

ConstantValueDescription
QWinJumpListItem::Destination0Item acts as a link to a file that the application can open.
QWinJumpListItem::Link1Item represents a link to an application.
QWinJumpListItem::Separator2Item is a separator. Only tasks category supports separators.

成员函数

QWinJumpListItem::QWinJumpListItem(Type type)

Constructs a QWinJumpListItem with the specified type.

QWinJumpListItem::~QWinJumpListItem()

Destroys the QWinJumpListItem.

QStringList QWinJumpListItem::arguments() const

Returns the command-line arguments of this item.

参见 setArguments().

QString QWinJumpListItem::description() const

Returns the description of this item.

参见 setDescription().

QString QWinJumpListItem::filePath() const

Returns the file path set by setFilePath().

参见 setFilePath().

QIcon QWinJumpListItem::icon() const

Returns the icon set for this item.

参见 setIcon().

void QWinJumpListItem::setArguments(const QStringList &arguments)

Sets command-line arguments for this item.

This value is used only if the type of this item is QWinJumpListItem::Link.

参见 arguments() and setFilePath().

void QWinJumpListItem::setDescription(const QString &description)

Sets a description for this item.

This value is used only if the type of this item is QWinJumpListItem::Link.

参见 description().

void QWinJumpListItem::setFilePath(const QString &filePath)

Sets the item filePath, the meaning of which depends on the type of this item:

  • If the item type is QWinJumpListItem::Destination, filePath is the path to a file that can be opened by an application.
  • If the item type is QWinJumpListItem::Link, filePath is the path to an executable that is executed when this item is clicked by the user.

参见 filePath(), setWorkingDirectory(), and setArguments().

void QWinJumpListItem::setIcon(const QIcon &icon)

Sets the icon of this item.

This value is used only if the type of this item is QWinJumpListItem::Link.

参见 icon().

void QWinJumpListItem::setTitle(const QString &title)

Sets the title of this item.

This value is used only if the type of this item is QWinJumpListItem::Link.

参见 title().

void QWinJumpListItem::setType(Type type)

Sets the item type.

参见 type().

void QWinJumpListItem::setWorkingDirectory(const QString &workingDirectory)

Sets the path to the working directory of this item to workingDirectory.

This value is used only if the type of this item is QWinJumpListItem::Link.

参见 workingDirectory() and setFilePath().

QString QWinJumpListItem::title() const

Returns the title of this item.

参见 setTitle().

Type QWinJumpListItem::type() const

Returns the item type.

参见 setType().

QString QWinJumpListItem::workingDirectory() const

Returns the working directory path.

参见 setWorkingDirectory().