Menu

#144 Taurus Qt designer widget extensions

I['unassigned', '']
active
None
feature-request
2016-01-19
2015-02-03
No

This feature request proposes to add the capability of defining qt designer custom extensions for specific taurus widgets.

Currently a taurus widget can be added to qt designer:

from taurus.qt.qtgui.util.qtdesigner import QtDesignable

@QtDesignable
class MyWidget(Qt.QWidget):
    pass

or

class MyWidget(Qt.QWidget):

    @classmethod
    def getQtDesignerPluginInfo(cls):
        return ...

However it is not possible to add a customized task menu or a property sheet extension.

This feature request proposes to add options to QtDesignable decorator and to the getQtDesignerPluginInfo to support these extensions. Example:

@QtDesignable(task_menu=MyWidgetTaskMenu)
class MyWidget(Qt.QWidget):
    pass

from taurus.qt.qtdesigner.taurusplugin import TaurusTaskMenu

class MyWidgetTaskMenu(TaurusTaskMenu):

    def taskActions(self):
        # build Qt actions here
        return []  

Discussion

  • Carlos Pascual

    Carlos Pascual - 2015-02-09

    Seems a nice feature to me (and I do not see any drawbacks).
    Are you already working on the implementation?

     
    • Carlos Pascual

      Carlos Pascual - 2015-02-09

      BTW: is the QtDesignable decorator already available? (I cannot find it in the develop branch)

       
      • Tiago Coutinho

        Tiago Coutinho - 2015-02-09

        On Mon, 2015-02-09 at 08:20 +0000, Carlos Pascual wrote:

        BTW: is the QtDesignable decorator already available? (I cannot find it in the develop branch)
        No, you're right, it's not. I made a mistake. I'll update the feature
        request.


        [tickets:#321] Taurus Qt designer widget extensions

        Status: active
        Milestone: Jul15
        Created: Tue Feb 03, 2015 02:14 PM UTC by Tiago Coutinho
        Last Updated: Mon Feb 09, 2015 08:18 AM UTC
        Owner: Tiago Coutinho

        This feature request proposes to add the capability of defining qt designer custom extensions for specific taurus widgets.

        Currently a taurus widget can be added to qt designer:

        ~~~~~~
        from taurus.qt.qtgui.util.qtdesigner import QtDesignable

        @QtDesignable
        class MyWidget(Qt.QWidget):
        pass

        ~~~~~~

        or

        ~~~~~~
        class MyWidget(Qt.QWidget):

        @classmethod
        def getQtDesignerPluginInfo(cls):
            return ...
        

        ~~~~~~

        However it is not possible to add a customized task menu or a property sheet extension.

        This feature request proposes to add options to QtDesignable decorator and to the getQtDesignerPluginInfo to support these extensions. Example:

        ~~~~~~
        @QtDesignable(task_menu=MyWidgetTaskMenu)
        class MyWidget(Qt.QWidget):
        pass

        from taurus.qt.qtdesigner.taurusplugin import TaurusTaskMenu

        class MyWidgetTaskMenu(TaurusTaskMenu):

        def taskActions(self):
            # build Qt actions here
            return []
        

        ~~~~~~


        Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/sardana/tickets/321/

        To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

         
    • Tiago Coutinho

      Tiago Coutinho - 2015-02-09

      On Mon, 2015-02-09 at 08:18 +0000, Carlos Pascual wrote:

      Seems a nice feature to me (and I do not see any drawbacks).
      Are you already working on the implementation?
      Yes, we are already using at ESRF a rough test. Still not completely
      happy with the final API. That's why I haven't proposed anything more
      concrete yet.


      [tickets:#321] Taurus Qt designer widget extensions

      Status: active
      Milestone: Jul15
      Created: Tue Feb 03, 2015 02:14 PM UTC by Tiago Coutinho
      Last Updated: Tue Feb 03, 2015 02:14 PM UTC
      Owner: Tiago Coutinho

      This feature request proposes to add the capability of defining qt designer custom extensions for specific taurus widgets.

      Currently a taurus widget can be added to qt designer:

      ~~~~~~
      from taurus.qt.qtgui.util.qtdesigner import QtDesignable

      @QtDesignable
      class MyWidget(Qt.QWidget):
      pass

      ~~~~~~

      or

      ~~~~~~
      class MyWidget(Qt.QWidget):

      @classmethod
      def getQtDesignerPluginInfo(cls):
          return ...
      

      ~~~~~~

      However it is not possible to add a customized task menu or a property sheet extension.

      This feature request proposes to add options to QtDesignable decorator and to the getQtDesignerPluginInfo to support these extensions. Example:

      ~~~~~~
      @QtDesignable(task_menu=MyWidgetTaskMenu)
      class MyWidget(Qt.QWidget):
      pass

      from taurus.qt.qtdesigner.taurusplugin import TaurusTaskMenu

      class MyWidgetTaskMenu(TaurusTaskMenu):

      def taskActions(self):
          # build Qt actions here
          return []
      

      ~~~~~~


      Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/sardana/tickets/321/

      To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

       
  • Tiago Coutinho

    Tiago Coutinho - 2015-03-30

    Ticket moved from /p/sardana/tickets/321/

    Can't be converted:

    • _category: taurus-qt
     
  • Carlos Pascual

    Carlos Pascual - 2015-07-22
    • Category: Jul15 --> unassigned,
     
  • Carlos Pascual

    Carlos Pascual - 2016-01-19

    Hi Tiago, any update on this?