Ejemplo n.º 1
0
    def __init__(self, parent, *args):
        QAbstractTableModel.__init__(self, parent, *args)
        query = Query()

        self.header = query.getHeader()

        self.data_list = query.getDataList()
Ejemplo n.º 2
0
 def setParameters(self):
     parameters = {}
     parameters["host"] = self.hostLine.text()
     parameters["port"] = self.portLine.text()
     parameters["database"] = self.databaseLine.text()
     parameters["username"] = self.userLine.text()
     parameters["password"] = self.passwordLine.text()
     if self.start:
         Query(parameters)
     else:
         query = Query()
         query.refreshParameters(parameters)
         self.parent.table.refreshTable()
     self.close()
Ejemplo n.º 3
0
    def __init__(self, parent):
        QHBoxLayout.__init__(self)
        self.parent = parent
        query = Query()
        fieldsItems = query.getHeader()
        self.fields = QComboBox()
        for i in fieldsItems:
            self.fields.addItem(i)
        self.addWidget(self.fields)

        self.cb2 = QComboBox()
        self.cb2.addItem("contains")
        self.cb2.addItem("not contains")
        self.cb2.addItem("is")
        self.cb2.addItem("is not")
        self.addWidget(self.cb2)

        self.lineEdit = QLineEdit()
        self.addWidget(self.lineEdit)

        self.removeButton = QPushButton("Remove")
        self.connect(self.removeButton, SIGNAL('clicked()'), self.delete)
        self.addWidget(self.removeButton)
Ejemplo n.º 4
0
 def doSearch(self):
     query = Query()
     query.refreshQuery(self.searchArea.fieldsWidget.collectQueryParameters())
     self.table.refreshTable()