示例#1
0
 def execute(self):
     # color = self.color.color.name(QtGui.QColor.HexRgb)
     query = Query(self.input.toPlainText())
     query.execute()
     if query.error == Query.NoError:
         selection = Selection()
         selection.query = query
         DataView.Model.headerDataChanged.emit(Qt.Vertical, 0, Row.count())
示例#2
0
    def execute(self):
        query = Query(select=self.input.toPlainText())
        query.execute()
        if query.error == Query.NoError:
            var_name = self.target.text().strip()
            column = None
            new_column = False
            if var_name:
                logger.debug("var_name={}".format(var_name))
                column = Column.get_by_name(var_name)

            if not column:
                column = Column(Column.count(), name=var_name)
                new_column = True

            logger.debug("new_column={}".format(new_column))

            for row, data in query.result.items():
                if new_column:
                    Cell(row, column.id, data=data)
                else:
                    cell = Cell.get(row, column.id)
                    cell.data = data
示例#3
0
 def execute(self):
     # color = self.color.color.name(QtGui.QColor.HexRgb)
     query = Query(self.input.toPlainText())
     query.execute()