Merged in lp:~raoul-snyman/openlp/pluginlist

bzr-revno: 594
This commit is contained in:
Raoul Snyman 2009-10-10 14:10:05 +02:00
commit 855174ce3e
6 changed files with 356 additions and 256 deletions

View File

@ -32,7 +32,7 @@ from generaltab import GeneralTab
from themestab import ThemesTab
from about import AboutForm
from alertform import AlertForm
from plugindialoglistform import PluginForm
from pluginform import PluginForm
from settingsform import SettingsForm
from mediadockmanager import MediaDockManager
from servicemanager import ServiceManager

View File

@ -421,7 +421,6 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
self.mainDisplay = MainDisplay(self, screens)
self.generalConfig = PluginConfig(u'General')
self.alertForm = AlertForm(self)
self.pluginForm = PluginForm(self)
self.aboutForm = AboutForm(self)
self.settingsForm = SettingsForm(self.screenList, self)
# Set up the path with plugins
@ -432,6 +431,7 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
self.plugin_helpers = {}
# Set up the interface
self.setupUi(self)
self.pluginForm = PluginForm(self)
# Set up signals and slots
QtCore.QObject.connect(self.ImportThemeItem,
QtCore.SIGNAL(u'triggered()'),

View File

@ -0,0 +1,117 @@
# -*- coding: utf-8 -*-
# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
###############################################################################
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2009 Raoul Snyman #
# Portions copyright (c) 2008-2009 Martin Thompson, Tim Bentley, Carsten #
# Tinggaard, Jon Tibble, Jonathan Corwin, Maikel Stuivenberg, Scott Guerrieri #
# --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it #
# under the terms of the GNU General Public License as published by the Free #
# Software Foundation; version 2 of the License. #
# #
# This program is distributed in the hope that it will be useful, but WITHOUT #
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or #
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for #
# more details. #
# #
# You should have received a copy of the GNU General Public License along #
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
###############################################################################
from PyQt4 import QtCore, QtGui
from openlp.core.lib import translate
class Ui_PluginViewDialog(object):
def setupUi(self, PluginViewDialog):
PluginViewDialog.setObjectName(u'PluginViewDialog')
PluginViewDialog.setWindowModality(QtCore.Qt.ApplicationModal)
PluginViewDialog.resize(554, 344)
self.PluginLayout = QtGui.QVBoxLayout(PluginViewDialog)
self.PluginLayout.setSpacing(8)
self.PluginLayout.setMargin(8)
self.PluginLayout.setObjectName(u'PluginLayout')
self.ListLayout = QtGui.QHBoxLayout()
self.ListLayout.setSpacing(8)
self.ListLayout.setObjectName(u'ListLayout')
self.PluginListWidget = QtGui.QListWidget(PluginViewDialog)
sizePolicy = QtGui.QSizePolicy(
QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(
self.PluginListWidget.sizePolicy().hasHeightForWidth())
self.PluginListWidget.setSizePolicy(sizePolicy)
self.PluginListWidget.setMaximumSize(QtCore.QSize(192, 16777215))
self.PluginListWidget.setObjectName(u'PluginListWidget')
self.ListLayout.addWidget(self.PluginListWidget)
self.PluginInfoGroupBox = QtGui.QGroupBox(PluginViewDialog)
self.PluginInfoGroupBox.setAlignment(
QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter)
self.PluginInfoGroupBox.setFlat(False)
self.PluginInfoGroupBox.setObjectName(u'PluginInfoGroupBox')
self.PluginInfoLayout = QtGui.QFormLayout(self.PluginInfoGroupBox)
self.PluginInfoLayout.setMargin(8)
self.PluginInfoLayout.setSpacing(8)
self.PluginInfoLayout.setObjectName(u'PluginInfoLayout')
self.VersionLabel = QtGui.QLabel(self.PluginInfoGroupBox)
self.VersionLabel.setObjectName(u'VersionLabel')
self.PluginInfoLayout.setWidget(
1, QtGui.QFormLayout.LabelRole, self.VersionLabel)
self.VersionNumberLabel = QtGui.QLabel(self.PluginInfoGroupBox)
self.VersionNumberLabel.setObjectName(u'VersionNumberLabel')
self.PluginInfoLayout.setWidget(
1, QtGui.QFormLayout.FieldRole, self.VersionNumberLabel)
self.AboutLabel = QtGui.QLabel(self.PluginInfoGroupBox)
self.AboutLabel.setObjectName(u'AboutLabel')
self.PluginInfoLayout.setWidget(
2, QtGui.QFormLayout.LabelRole, self.AboutLabel)
self.StatusLabel = QtGui.QLabel(self.PluginInfoGroupBox)
self.StatusLabel.setObjectName(u'StatusLabel')
self.PluginInfoLayout.setWidget(
0, QtGui.QFormLayout.LabelRole, self.StatusLabel)
self.StatusComboBox = QtGui.QComboBox(self.PluginInfoGroupBox)
self.StatusComboBox.setObjectName(u'StatusComboBox')
self.StatusComboBox.addItem(QtCore.QString())
self.StatusComboBox.addItem(QtCore.QString())
self.PluginInfoLayout.setWidget(
0, QtGui.QFormLayout.FieldRole, self.StatusComboBox)
self.AboutTextBrowser = QtGui.QTextBrowser(self.PluginInfoGroupBox)
self.AboutTextBrowser.setTextInteractionFlags(
QtCore.Qt.LinksAccessibleByMouse)
self.AboutTextBrowser.setObjectName(u'AboutTextBrowser')
self.PluginInfoLayout.setWidget(
2, QtGui.QFormLayout.FieldRole, self.AboutTextBrowser)
self.ListLayout.addWidget(self.PluginInfoGroupBox)
self.PluginLayout.addLayout(self.ListLayout)
self.PluginListButtonBox = QtGui.QDialogButtonBox(PluginViewDialog)
self.PluginListButtonBox.setStandardButtons(QtGui.QDialogButtonBox.Ok)
self.PluginListButtonBox.setObjectName(u'PluginListButtonBox')
self.PluginLayout.addWidget(self.PluginListButtonBox)
self.retranslateUi(PluginViewDialog)
QtCore.QObject.connect(
self.PluginListButtonBox,
QtCore.SIGNAL(u'accepted()'),
PluginViewDialog.close)
QtCore.QMetaObject.connectSlotsByName(PluginViewDialog)
def retranslateUi(self, PluginViewDialog):
PluginViewDialog.setWindowTitle(
translate(u'PluginViewDialog', u'Plugin List'))
self.PluginInfoGroupBox.setTitle(
translate(u'PluginViewDialog', u'Plugin Details'))
self.VersionLabel.setText(
translate(u'PluginViewDialog', u'Version:'))
self.VersionNumberLabel.setText(
translate(u'PluginViewDialog', u'TextLabel'))
self.AboutLabel.setText(translate(u'PluginViewDialog', u'About:'))
self.StatusLabel.setText(translate(u'PluginViewDialog', u'Status:'))
self.StatusComboBox.setItemText(
0, translate(u'PluginViewDialog', u'Active'))
self.StatusComboBox.setItemText(
1, translate(u'PluginViewDialog', u'Inactive'))

View File

@ -1,138 +0,0 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'plugindialoglistform.ui'
#
# Created: Thu Aug 13 05:52:06 2009
# by: PyQt4 UI code generator 4.5.4
#
# WARNING! All changes made in this file will be lost!
import logging
from PyQt4 import QtCore, QtGui
from openlp.core.lib import translate, PluginStatus, buildIcon
class PluginCombo(QtGui.QComboBox):
"""
Customised version of QTableWidget which can respond to keyboard
events.
"""
def __init__(self, parent=None, plugin=None):
QtGui.QComboBox.__init__(self, parent)
self.parent = parent
self.plugin = plugin
def enterEvent(self, event):
self.parent.activePlugin = self.plugin
event.ignore()
class PluginForm(QtGui.QDialog):
global log
log = logging.getLogger(u'PluginForm')
def __init__(self, parent=None):
QtGui.QDialog.__init__(self, parent)
self.parent = parent
self.activePlugin = None
self.setupUi(self)
log.debug(u'Defined')
def setupUi(self, PluginForm):
PluginForm.setObjectName(u'PluginForm')
PluginForm.resize(400, 568)
icon = buildIcon(u':/icon/openlp-logo-16x16.png')
PluginForm.setWindowIcon(icon)
self.PluginViewList = QtGui.QTableWidget(PluginForm)
self.PluginViewList.setGeometry(QtCore.QRect(20, 10, 371, 261))
self.PluginViewList.setObjectName(u'PluginViewList')
self.PluginViewList.setShowGrid(False)
self.PluginViewList.setGridStyle(QtCore.Qt.SolidLine)
self.PluginViewList.setSortingEnabled(False)
self.PluginViewList.setColumnCount(3)
item = QtGui.QTableWidgetItem()
self.PluginViewList.setHorizontalHeaderItem(0, item)
item = QtGui.QTableWidgetItem()
self.PluginViewList.setHorizontalHeaderItem(1, item)
item = QtGui.QTableWidgetItem()
self.PluginViewList.setHorizontalHeaderItem(2, item)
self.PluginViewList.horizontalHeader().setVisible(True)
self.PluginViewList.horizontalHeader().setStretchLastSection(True)
self.PluginViewList.verticalHeader().setVisible(False)
self.ButtonBox = QtGui.QDialogButtonBox(PluginForm)
self.ButtonBox.setGeometry(QtCore.QRect(220, 530, 170, 25))
self.ButtonBox.setStandardButtons(QtGui.QDialogButtonBox.Ok)
self.ButtonBox.setObjectName(u'ButtonBox')
self.PluginInfoGroupBox = QtGui.QGroupBox(PluginForm)
self.PluginInfoGroupBox.setGeometry(QtCore.QRect(20, 270, 371, 241))
self.PluginInfoGroupBox.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter)
self.PluginInfoGroupBox.setFlat(False)
self.PluginInfoGroupBox.setObjectName("PluginInfoGroupBox")
self.AboutTextLabel = QtGui.QLabel(self.PluginInfoGroupBox)
self.AboutTextLabel.setGeometry(QtCore.QRect(10, 30, 351, 191))
self.AboutTextLabel.setAlignment(QtCore.Qt.AlignLeft|QtCore.Qt.AlignTop)
self.AboutTextLabel.setWordWrap(True)
self.AboutTextLabel.setObjectName("AboutTextLabel")
self.retranslateUi(PluginForm)
QtCore.QObject.connect(self.ButtonBox,
QtCore.SIGNAL(u'accepted()'), PluginForm.close)
QtCore.QMetaObject.connectSlotsByName(PluginForm)
QtCore.QObject.connect(self.PluginViewList,
QtCore.SIGNAL(u'itemClicked(QTableWidgetItem*)'), self.displayAbout)
def retranslateUi(self, PluginForm):
PluginForm.setWindowTitle(translate(u'PluginForm', u'Plugin list'))
self.PluginInfoGroupBox.setTitle(translate("PluginForm", "Selected Plugin Information"))
self.PluginViewList.horizontalHeaderItem(0).setText(
translate(u'PluginForm', u'Name'))
self.PluginViewList.horizontalHeaderItem(1).setText(
translate(u'PluginForm', u'Version'))
self.PluginViewList.horizontalHeaderItem(2).setText(
translate(u'PluginForm', u'Status'))
def load(self):
"""
Load the plugin details into the screen
"""
self.PluginViewList.setRowCount(0)
for plugin in self.parent.plugin_manager.plugins:
row = self.PluginViewList.rowCount()
self.PluginViewList.setRowCount(row + 1)
item1 = QtGui.QTableWidgetItem(plugin.name)
item1.setFlags(QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsEnabled)
item1.setTextAlignment(QtCore.Qt.AlignVCenter)
item2 = QtGui.QTableWidgetItem(plugin.version)
item2.setTextAlignment(QtCore.Qt.AlignVCenter)
item2.setFlags(QtCore.Qt.ItemIsSelectable)
self.PluginViewList.setItem(row, 0, item1)
self.PluginViewList.setItem(row, 1, item2)
if plugin.can_be_disabled():
combo = PluginCombo(self, plugin)
self.PluginViewList.setCellWidget(row, 2, combo)
combo.addItem(translate(u'PluginForm', u'Active'))
combo.addItem(translate(u'PluginForm', u'Inactive'))
combo.setCurrentIndex(int(plugin.status))
QtCore.QObject.connect(combo,
QtCore.SIGNAL(u'currentIndexChanged(int)'), self.statusComboChanged)
else:
item3 = QtGui.QTableWidgetItem(
translate(u'PluginForm', u'Active'))
item3.setTextAlignment(QtCore.Qt.AlignVCenter)
item3.setFlags(QtCore.Qt.ItemIsSelectable)
self.PluginViewList.setItem(row, 2, item3)
self.PluginViewList.setRowHeight(row, 25)
def displayAbout(self, item):
if item is None:
return False
row = self.PluginViewList.row(item)
text = self.parent.plugin_manager.plugins[row].about()
if text is not None:
self.AboutTextLabel.setText(translate(u'PluginList', text))
def statusComboChanged(self, status):
log.debug(u'Combo status changed %s for plugin %s' %(status, self.activePlugin.name))
self.activePlugin.toggle_status(status)
if status == PluginStatus.Active:
self.activePlugin.initialise()
else:
self.activePlugin.finalise()

View File

@ -0,0 +1,118 @@
# -*- coding: utf-8 -*-
# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
###############################################################################
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2009 Raoul Snyman #
# Portions copyright (c) 2008-2009 Martin Thompson, Tim Bentley, Carsten #
# Tinggaard, Jon Tibble, Jonathan Corwin, Maikel Stuivenberg, Scott Guerrieri #
# --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it #
# under the terms of the GNU General Public License as published by the Free #
# Software Foundation; version 2 of the License. #
# #
# This program is distributed in the hope that it will be useful, but WITHOUT #
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or #
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for #
# more details. #
# #
# You should have received a copy of the GNU General Public License along #
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
###############################################################################
import logging
from PyQt4 import QtCore, QtGui
from openlp.core.lib.plugin import PluginStatus
from plugindialog import Ui_PluginViewDialog
class PluginForm(QtGui.QDialog, Ui_PluginViewDialog):
global log
log = logging.getLogger(u'PluginForm')
def __init__(self, parent=None):
QtGui.QDialog.__init__(self, parent)
self.parent = parent
self.activePlugin = None
self.setupUi(self)
self.load()
self._clearDetails()
# Right, now let's put some signals and slots together!
QtCore.QObject.connect(
self.PluginListWidget,
QtCore.SIGNAL(u'itemSelectionChanged()'),
self.onPluginListWidgetSelectionChanged)
QtCore.QObject.connect(
self.StatusComboBox,
QtCore.SIGNAL(u'currentIndexChanged(int)'),
self.onStatusComboBoxChanged)
def load(self):
"""
Load the plugin details into the screen
"""
self.PluginListWidget.clear()
for plugin in self.parent.plugin_manager.plugins:
item = QtGui.QListWidgetItem(self.PluginListWidget)
# We do this just to make 100% sure the status is an integer as
# sometimes when it's loaded from the config, it isn't cast to int.
plugin.status = int(plugin.status)
# Set the little status text in brackets next to the plugin name.
status_text = 'Inactive'
if plugin.status == PluginStatus.Active:
status_text = 'Active'
elif plugin.status == PluginStatus.Inactive:
status_text = 'Inactive'
elif plugin.status == PluginStatus.Disabled:
status_text = 'Disabled'
item.setText(u'%s (%s)' % (plugin.name, status_text))
# If the plugin has an icon, set it!
if plugin.icon is not None:
item.setIcon(plugin.icon)
self.PluginListWidget.addItem(item)
def _clearDetails(self):
self.StatusComboBox.setCurrentIndex(-1)
self.VersionNumberLabel.setText(u'')
self.AboutTextBrowser.setHtml(u'')
def _setDetails(self):
log.debug('PluginStatus: %s', str(self.activePlugin.status))
self.VersionNumberLabel.setText(self.activePlugin.version)
self.AboutTextBrowser.setHtml(self.activePlugin.about())
self.StatusComboBox.setCurrentIndex(int(self.activePlugin.status))
def onPluginListWidgetSelectionChanged(self):
if self.PluginListWidget.currentItem() is None:
self._clearDetails()
return
plugin_name = self.PluginListWidget.currentItem().text().split(u' ')[0]
self.activePlugin = None
for plugin in self.parent.plugin_manager.plugins:
if plugin.name == plugin_name:
self.activePlugin = plugin
break
if self.activePlugin is not None:
self._setDetails()
else:
self._clearDetails()
def onStatusComboBoxChanged(self, status):
self.activePlugin.toggle_status(status)
if status == PluginStatus.Active:
self.activePlugin.initialise()
else:
self.activePlugin.finalise()
status_text = 'Inactive'
if self.activePlugin.status == PluginStatus.Active:
status_text = 'Active'
elif self.activePlugin.status == PluginStatus.Inactive:
status_text = 'Inactive'
elif self.activePlugin.status == PluginStatus.Disabled:
status_text = 'Disabled'
self.PluginListWidget.currentItem().setText(
u'%s (%s)' % (self.activePlugin.name, status_text))

View File

@ -1,139 +1,142 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>PluginViewDialog</class>
<widget class="QWidget" name="PluginViewDialog">
<widget class="QDialog" name="PluginViewDialog">
<property name="windowModality">
<enum>Qt::ApplicationModal</enum>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>568</height>
<width>554</width>
<height>344</height>
</rect>
</property>
<property name="windowTitle">
<string>Plugin list</string>
</property>
<widget class="QTableWidget" name="PluginViewList">
<property name="geometry">
<rect>
<x>20</x>
<y>10</y>
<width>371</width>
<height>261</height>
</rect>
<layout class="QVBoxLayout" name="PluginLayout">
<property name="spacing">
<number>8</number>
</property>
<property name="showGrid">
<bool>false</bool>
<property name="margin">
<number>8</number>
</property>
<property name="gridStyle">
<enum>Qt::SolidLine</enum>
</property>
<property name="rowCount">
<number>1</number>
</property>
<attribute name="horizontalHeaderVisible">
<bool>true</bool>
</attribute>
<attribute name="horizontalHeaderCascadingSectionResizes">
<bool>false</bool>
</attribute>
<attribute name="horizontalHeaderShowSortIndicator" stdset="0">
<bool>true</bool>
</attribute>
<attribute name="horizontalHeaderStretchLastSection">
<bool>true</bool>
</attribute>
<attribute name="verticalHeaderVisible">
<bool>false</bool>
</attribute>
<attribute name="horizontalHeaderStretchLastSection">
<bool>true</bool>
</attribute>
<attribute name="horizontalHeaderCascadingSectionResizes">
<bool>false</bool>
</attribute>
<row/>
<column>
<property name="text">
<string>Name</string>
</property>
</column>
<column>
<property name="text">
<string>Version</string>
</property>
</column>
<column>
<property name="text">
<string>Status</string>
</property>
</column>
<item row="0" column="0">
<property name="text">
<string>qqq</string>
</property>
<item>
<layout class="QHBoxLayout" name="ListLayout">
<property name="spacing">
<number>8</number>
</property>
<item>
<widget class="QListWidget" name="PluginListWidget">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>192</width>
<height>16777215</height>
</size>
</property>
</widget>
</item>
<item>
<widget class="QGroupBox" name="PluginInfoGroupBox">
<property name="title">
<string>Plugin Details</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
<property name="flat">
<bool>false</bool>
</property>
<layout class="QFormLayout" name="PluginInfoLayout">
<property name="horizontalSpacing">
<number>8</number>
</property>
<property name="verticalSpacing">
<number>8</number>
</property>
<property name="margin">
<number>8</number>
</property>
<item row="1" column="0">
<widget class="QLabel" name="VersionLabel">
<property name="text">
<string>Version:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="VersionNumberLabel">
<property name="text">
<string>TextLabel</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="AboutLabel">
<property name="text">
<string>About:</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="StatusLabel">
<property name="text">
<string>Status:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="comboBox">
<item>
<property name="text">
<string>Disabled</string>
</property>
</item>
<item>
<property name="text">
<string>Inactive</string>
</property>
</item>
<item>
<property name="text">
<string>Active</string>
</property>
</item>
</widget>
</item>
<item row="2" column="1">
<widget class="QTextBrowser" name="AboutTextBrowser">
<property name="textInteractionFlags">
<set>Qt::LinksAccessibleByMouse</set>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</item>
<item row="0" column="1">
<property name="text">
<string>aaa</string>
</property>
<item>
<widget class="QDialogButtonBox" name="PluginListButtonBox">
<property name="standardButtons">
<set>QDialogButtonBox::Ok</set>
</property>
</widget>
</item>
<item row="0" column="2">
<property name="text">
<string>ccc</string>
</property>
</item>
</widget>
<widget class="QDialogButtonBox" name="ButtonBox">
<property name="geometry">
<rect>
<x>220</x>
<y>530</y>
<width>170</width>
<height>25</height>
</rect>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Ok</set>
</property>
</widget>
<widget class="QGroupBox" name="PluginInfoGroupBox">
<property name="geometry">
<rect>
<x>20</x>
<y>270</y>
<width>371</width>
<height>241</height>
</rect>
</property>
<property name="title">
<string>GroupBox</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
<property name="flat">
<bool>false</bool>
</property>
<widget class="QLabel" name="AboutTextLabel">
<property name="geometry">
<rect>
<x>10</x>
<y>30</y>
<width>351</width>
<height>191</height>
</rect>
</property>
<property name="text">
<string>TextLabel</string>
</property>
</widget>
</widget>
</layout>
</widget>
<resources/>
<connections>
<connection>
<sender>ButtonBox</sender>
<sender>PluginListButtonBox</sender>
<signal>accepted()</signal>
<receiver>PluginViewDialog</receiver>
<slot>close()</slot>