From 36f186bc46f528d95d9186955e91736d1fdb299e Mon Sep 17 00:00:00 2001
From: Sebastian Koslowski <koslowski@kit.edu>
Date: Thu, 14 Jul 2016 14:32:20 +0200
Subject: grc: dynamic super-classing proof-of-concept =)

---
 grc/gui/Element.py | 7 +++++++
 1 file changed, 7 insertions(+)

(limited to 'grc/gui/Element.py')

diff --git a/grc/gui/Element.py b/grc/gui/Element.py
index b51a64735f..cdbf548941 100644
--- a/grc/gui/Element.py
+++ b/grc/gui/Element.py
@@ -30,6 +30,13 @@ class Element(object):
     and methods to detect selection of those areas.
     """
 
+    @classmethod
+    def make_cls_with_base(cls, super_cls):
+        name = super_cls.__name__
+        bases = (super_cls,) + cls.__bases__[1:]
+        namespace = cls.__dict__.copy()
+        return type(name, bases, namespace)
+
     def __init__(self):
         """
         Make a new list of rectangular areas and lines, and set the coordinate and the rotation.
-- 
cgit v1.2.3