Krita Source Code Documentation
Loading...
Searching...
No Matches
clearaction.py
Go to the documentation of this file.
1"""
2SPDX-FileCopyrightText: 2017 Eliakin Costa <eliakim170@gmail.com>
3
4SPDX-License-Identifier: GPL-2.0-or-later
5"""
6try:
7 from PyQt6.QtGui import QAction#, QIcon
8except:
9 from PyQt5.QtWidgets import QAction
10 # from PyQt5.QtGui import QIcon
11from builtins import i18n
12
13
14class ClearAction(QAction):
15
16 def __init__(self, scripter, toolbar, parent=None):
17 super(ClearAction, self).__init__(parent)
18 self.scripter = scripter
19 self.toolbar = toolbar
20
21 self.triggered.connect(self.clearclear)
22
23 self.setText(i18n("Clear"))
24 # path to the icon
25 # self.setIcon(QIcon(':/icons/clear.svg'))
26
27 def clear(self):
28 self.toolbar.outputtextedit.clear()
connect(this, SIGNAL(optionsChanged()), this, SLOT(saveOptions()))