1"""
2Copyright (c) 2017 Eliakin Costa <eliakim170@gmail.com>
3
4This program is free software; you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation; either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program; if not, write to the Free Software
16Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17"""
18from PyQt5.QtWidgets import QAction
19from PyQt5.QtGui import QIcon
20from scripter import resources_rc
21import krita
22
23
24class ClearAction(QAction):
25
26    def __init__(self, scripter, toolbar, parent=None):
27        super(ClearAction, self).__init__(parent)
28        self.scripter = scripter
29        self.toolbar = toolbar
30
31        self.triggered.connect(self.clear)
32
33        self.setText(i18n("Clear"))
34        # path to the icon
35        # self.setIcon(QIcon(':/icons/clear.svg'))
36
37    def clear(self):
38        self.toolbar.outputtextedit.clear()
39