1# -*- coding: utf-8 -*-
2
3"""
4***************************************************************************
5    ContextAction.py
6    ---------------------
7    Date                 : August 2012
8    Copyright            : (C) 2012 by Victor Olaya
9    Email                : volayaf at gmail dot com
10***************************************************************************
11*                                                                         *
12*   This program is free software; you can redistribute it and/or modify  *
13*   it under the terms of the GNU General Public License as published by  *
14*   the Free Software Foundation; either version 2 of the License, or     *
15*   (at your option) any later version.                                   *
16*                                                                         *
17***************************************************************************
18"""
19
20__author__ = 'Victor Olaya'
21__date__ = 'August 2012'
22__copyright__ = '(C) 2012, Victor Olaya'
23
24from qgis.PyQt.QtCore import QCoreApplication
25from qgis.PyQt.QtGui import QIcon
26
27
28class ContextAction:
29
30    def __init__(self):
31        self.name = None
32        self.is_separator = False
33
34    def setData(self, itemData, toolbox):
35        self.itemData = itemData
36        self.toolbox = toolbox
37
38    def tr(self, string, context=''):
39        if context == '':
40            context = self.__class__.__name__
41        return QCoreApplication.translate(context, string)
42
43    def icon(self):
44        return QIcon()
45
46    def isEnabled(self):
47        return True
48
49    def execute(self):
50        pass
51