text: """
  icons
  """
  import os
  from pyqtgraph.Qt.QtGui import QIcon, QPixmap
  
  __author__ = 'magnus'
  
  # icons_instance = None
  
  def get_icon(name):
      # global icons_instance
      # if not icons_instance:
      icons_instance = Icons()
      return icons_instance.icon(name)
  
  
  class Icons(object):
      def __init__(self):
          self._icons = {}
          self.make_icon("folder", "icons/folder.png")
          self.make_icon("open", "icons/folder.png")
          self.make_icon("save", "icons/save.png")
          self.make_icon("icon", "icons/icon.png")
          self.make_icon("exit", "icons/exit.png")
          self.make_icon("paste", "icons/paste.png")
          self.make_icon("zoom", "icons/zoom.png")
          self.make_icon("copy", "icons/copy.png")
          self.make_icon("about", "icons/about.png")
          self.make_icon("license", "icons/license.png")
          self.make_icon("default", "icons/under_construction.png")
          self.make_icon("create", "icons/create.png")
          self.make_icon("under_construction", "icons/under_construction.png")
  
      def make_icon(self, name, path):
          path = os.path.join(os.path.dirname(os.path.abspath(os.path.dirname(__file__))), path)
          icon = QIcon()
          icon.addPixmap(QPixmap(path), QIcon.Mode.Normal, QIcon.State.Off)
          self._icons[name] = icon
  
      def icon(self, name):
          icon = self._icons["default"]
          try:
              icon = self._icons[name]
          except KeyError:
              print("icon " + name + " not found")
          return icon
  