forked from openkylin/ukui-panel
feat(task-manager):增加检查是否存在快速启动按钮的接口,规范接口名称
This commit is contained in:
parent
f98d686e26
commit
aafd671245
|
@ -2,9 +2,13 @@
|
|||
<node>
|
||||
<interface name="org.ukui.taskManager">
|
||||
<!-- methods -->
|
||||
<method name="addToTaskbar">
|
||||
<method name="addQuickLauncher">
|
||||
<arg name="desktopFile" type="s" direction="in"/>
|
||||
<arg name="success" type="b" direction="out"/>
|
||||
</method>
|
||||
<method name="checkQuickLauncher">
|
||||
<arg name="desktopFile" type="s" direction="in"/>
|
||||
<arg name="exist" type="b" direction="out"/>
|
||||
</method>
|
||||
</interface>
|
||||
</node>
|
||||
|
|
|
@ -444,7 +444,7 @@ int UkuiTaskManager::rowCount(const QModelIndex &parent) const
|
|||
return parent.isValid() ? 0 : d->m_items.count();
|
||||
}
|
||||
|
||||
bool UkuiTaskManager::addToTaskbar(const QString &desktopFile)
|
||||
bool UkuiTaskManager::addQuickLauncher(const QString &desktopFile)
|
||||
{
|
||||
if (!QFile::exists(desktopFile) || d->m_quickLaunchersOrder.contains(desktopFile)) {
|
||||
return false;
|
||||
|
@ -453,6 +453,11 @@ bool UkuiTaskManager::addToTaskbar(const QString &desktopFile)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool UkuiTaskManager::checkQuickLauncher(const QString &desktopFile)
|
||||
{
|
||||
return d->m_quickLaunchersOrder.contains(desktopFile);
|
||||
}
|
||||
|
||||
void UkuiTaskManager::addQuickLauncher(const QString &desktopFile, int order)
|
||||
{
|
||||
//改位置或取消固定
|
||||
|
|
|
@ -109,7 +109,8 @@ Q_SIGNALS:
|
|||
void unReadMessagesNumberUpdate(const QString &desktopFile, uint num);
|
||||
|
||||
public Q_SLOTS:
|
||||
bool addToTaskbar(const QString &desktopFile);
|
||||
bool addQuickLauncher(const QString &desktopFile);
|
||||
bool checkQuickLauncher(const QString &desktopFile);
|
||||
void closeWindow(const QVariant& wid);
|
||||
void minimizeWindow(const QVariant& wid);
|
||||
void maximizeWindow(const QVariant& wid);
|
||||
|
|
Loading…
Reference in New Issue