Пример #1
0
 def on_actionStrategyDesigner_triggered(self):
     from profit.strategydesigner.main import StrategyDesigner
     settings = Settings()
     settings.beginGroup(settings.keys.strategy)
     if settings.value('type', '').toString()=='file':
         filename = settings.value('location', '').toString()
         def x(name):
             print '## strategy file named %s updated' % (name, )
     else:
         def x(name):
             print "## strategy file updated but i don't care"
         filename = None
     win = StrategyDesigner(filename=filename, parent=self)
     win.show()
Пример #2
0
    def on_editButton_clicked(self):
        """

        """
        from profit.strategydesigner.main import StrategyDesigner
        indexes = self.strategyView.selectedIndexes()
        try:
            index = [i for i in indexes if i.isValid()][0]
        except (IndexError, ):
            pass
        else:
            item = index.internalPointer()
            filename = item[item.filenameIdx]
            win = StrategyDesigner(filename=filename, parent=self)
            win.show()
Пример #3
0
    def on_editButton_clicked(self):
        """

        """
        from profit.strategydesigner.main import StrategyDesigner
        indexes = self.strategyView.selectedIndexes()
        try:
            index = [i for i in indexes if i.isValid()][0]
        except (IndexError, ):
            pass
        else:
            item = index.internalPointer()
            filename = item[item.filenameIdx]
            win = StrategyDesigner(filename=filename, parent=self)
            win.show()