Example #1
0
 def showInTable(self):
     try:
         if uni.tableType in ["0", "1", "2", "3", "4", "9"]:
             getMainTable().refresh(self.getCurrentDirectoryPath())
         else:
             Dialogs.toast(translate("Tables", "Please edit query and click to Apply Query Icon."))
             getMainWindow().StatusBar.setTableInfo(uni.getTableTypesNames()[uni.tableType] + str(" : ~ "))
     except:
         ReportBug.ReportBug()
Example #2
0
 def showDetails(self):
     try:
         rowNo = self.currentRow()
         if rowNo != -1:
             self.showTableDetails(rowNo, self.currentColumn())
         else:
             Dialogs.toast(
                 translate("Tables", "Please Select A Row"),
                 translate("Tables",
                           "Please select a row to show details."))
     except:
         ReportBug.ReportBug()
Example #3
0
 def showInTable(self):
     try:
         if uni.tableType in ["0", "1", "2", "3", "4", "9"]:
             getMainTable().refresh(self.getCurrentDirectoryPath())
         else:
             Dialogs.toast(
                 translate(
                     "Tables",
                     "Please edit query and click to Apply Query Icon."))
             getMainWindow().StatusBar.setTableInfo(
                 uni.getTableTypesNames()[uni.tableType] + str(" : ~ "))
     except:
         ReportBug.ReportBug()
 def dropEvent(self, _e):
     try:
         btn = _e.source()
         objectName = str(btn.objectName())
         if self.containerKey == "right" and objectName not in getMainTable().getWritableColumnKeys():
             Dialogs.toast(translate("SpecialTools", "This Column Is Readonly!"),
                           translate("SpecialTools", "You should move here writable columns!"))
         else:
             if objectName.find("Concatenate") == -1:
                 self.addToWidgetList(btn)
             else:
                 if btn not in self.widgetList:
                     if self == self.parent().saccAvailable:
                         self.addToWidgetList(btn)
                     elif self == self.parent().saccLeft:
                         child = SpecialActionsCommandButton(self.parent(), self.createNextConcatenateObjectName())
                         self.addToWidgetList(child)
                     elif self == self.parent().saccRight:
                         pass
                 else:
                     self.addToWidgetList(btn)  #
             _e.accept()
     except:
         ReportBug.ReportBug()