Exemple #1
0
 def _insert_table(self):
     dialog = TableWidget(self.parent)
     self._last_table_num += 1
     if dialog.exec_():
         self.page.mainFrame().evaluateJavaScript(
             'insertTable(%s, %s, "%s", "table_%d");' % (
                 dialog.ui.rows.text(),
                 dialog.ui.columns.text(),
                 dialog.get_width(),
                 self._last_table_num,
             ))
Exemple #2
0
 def _insert_table(self):
     dialog = TableWidget(self.parent)
     self._last_table_num += 1
     if dialog.exec_():
         self.page.mainFrame().evaluateJavaScript(
             'insertTable(%s, %s, "%s", "table_%d");' % (
                 dialog.ui.rows.text(),
                 dialog.ui.columns.text(),
                 dialog.get_width(),
                 self._last_table_num,
             )
         )
Exemple #3
0
 def _update_table(self, id):
     rows = self.page.mainFrame().evaluateJavaScript(
         'getTableRows("%s")' % id, )
     cells = self.page.mainFrame().evaluateJavaScript(
         'getTableCells("%s")' % id, )
     dialog = TableWidget(self.parent, rows, cells)
     self._last_table_num += 1
     if dialog.exec_():
         self.page.mainFrame().evaluateJavaScript(
             'updateTable(%s, %s, "%s", "%s");' % (
                 dialog.ui.rows.text(),
                 dialog.ui.columns.text(),
                 dialog.get_width(),
                 id,
             ))
Exemple #4
0
 def _update_table(self, id):
     rows = self.page.mainFrame().evaluateJavaScript(
         'getTableRows("%s")' % id,
     )
     cells = self.page.mainFrame().evaluateJavaScript(
         'getTableCells("%s")' % id,
     )
     dialog = TableWidget(self.parent, rows, cells)
     self._last_table_num += 1
     if dialog.exec_():
         self.page.mainFrame().evaluateJavaScript(
             'updateTable(%s, %s, "%s", "%s");' % (
                 dialog.ui.rows.text(),
                 dialog.ui.columns.text(),
                 dialog.get_width(),
                 id,
             )
         )