diff options
author | Michele Calgaro <[email protected]> | 2024-01-04 10:30:32 +0900 |
---|---|---|
committer | Michele Calgaro <[email protected]> | 2024-01-13 20:22:52 +0900 |
commit | e1b37ac1936f81994a2c1aa2778298fbc757531f (patch) | |
tree | 2e2df5ea5786d581b10e51e0cbde9f4921697b2f /kspread/plugins/scripting/scripts/scripteditor/ScriptEditor.py | |
parent | d08f80f854355e446d1c6be0eb50166646f7f291 (diff) | |
download | koffice-e1b37ac1936f81994a2c1aa2778298fbc757531f.tar.gz koffice-e1b37ac1936f81994a2c1aa2778298fbc757531f.zip |
Use new TQ_METHOD, TQ_SIGNAL, TQ_SLOT defines
Signed-off-by: Michele Calgaro <[email protected]>
(cherry picked from commit c0332621bc998c9786f4841e86a62b7711fe4abf)
Diffstat (limited to 'kspread/plugins/scripting/scripts/scripteditor/ScriptEditor.py')
-rwxr-xr-x | kspread/plugins/scripting/scripts/scripteditor/ScriptEditor.py | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/kspread/plugins/scripting/scripts/scripteditor/ScriptEditor.py b/kspread/plugins/scripting/scripts/scripteditor/ScriptEditor.py index 22959809..795c35ea 100755 --- a/kspread/plugins/scripting/scripts/scripteditor/ScriptEditor.py +++ b/kspread/plugins/scripting/scripts/scripteditor/ScriptEditor.py @@ -63,7 +63,7 @@ class FileWidget(Widget): self.edit = tqt.TQLineEdit(self) self.setStretchFactor(self.edit,1) btn = tqt.TQPushButton("...",self) - tqt.TQObject.connect(btn, tqt.SIGNAL("clicked()"), self.btnClicked) + tqt.TQObject.connect(btn, tqt.TQ_SIGNAL("clicked()"), self.btnClicked) def btnClicked(self): from TQt import tqt text = str( self.edit.text() ) @@ -607,7 +607,7 @@ class Samples: ' tqt.TQDialog.__init__(self, parent, "MyDialog", 1, tqt.TQt.WDestructiveClose)', ' self.setCaption("My Dialog")', ' btn = tqt.TQPushButton("Click me",self)', - ' tqt.TQObject.connect(btn, tqt.SIGNAL("clicked()"), self.buttonClicked)', + ' tqt.TQObject.connect(btn, tqt.TQ_SIGNAL("clicked()"), self.buttonClicked)', ' def buttonClicked(self):', ' from TQt import tqt', ' tqt.TQMessageBox.information(self, "The Caption", "This is the message string.")', @@ -800,10 +800,10 @@ class SampleDialog(tqt.TQDialog): btnbox.setSpacing(6) okbtn = tqt.TQPushButton(btnbox) okbtn.setText("Ok") - tqt.TQObject.connect(okbtn, tqt.SIGNAL("clicked()"), self.okClicked) + tqt.TQObject.connect(okbtn, tqt.TQ_SIGNAL("clicked()"), self.okClicked) cancelbtn = tqt.TQPushButton(btnbox) cancelbtn.setText("Cancel") - tqt.TQObject.connect(cancelbtn, tqt.SIGNAL("clicked()"), self.close) + tqt.TQObject.connect(cancelbtn, tqt.TQ_SIGNAL("clicked()"), self.close) self.setCaption(self.samplechild.name) box.setMinimumSize(tqt.TQSize(500,340)) @@ -851,7 +851,7 @@ class MainDialog(tqt.TQDialog): self.scripttext = tqt.TQMultiLineEdit(splitter) self.scripttext.setWordWrap( tqt.TQTextEdit.NoWrap ) self.scripttext.setTextFormat( tqt.TQt.PlainText ) - tqt.TQObject.connect(self.scripttext, tqt.SIGNAL("cursorPositionChanged(int,int)"),self.cursorPositionChanged) + tqt.TQObject.connect(self.scripttext, tqt.TQ_SIGNAL("cursorPositionChanged(int,int)"),self.cursorPositionChanged) self.console = tqt.TQTextBrowser(splitter) splitter.setResizeMode(self.console, tqt.TQSplitter.KeepSize) @@ -869,71 +869,71 @@ class MainDialog(tqt.TQDialog): menu.insertItem("&File", filemenu) newaction = tqt.TQAction("New", tqt.TQKeySequence("CTRL+N"), self) - tqt.TQObject.connect(newaction, tqt.SIGNAL("activated()"), self.newFile) + tqt.TQObject.connect(newaction, tqt.TQ_SIGNAL("activated()"), self.newFile) newaction.addTo(filemenu) openaction = tqt.TQAction("Open...", tqt.TQKeySequence("CTRL+O"), self) - tqt.TQObject.connect(openaction, tqt.SIGNAL("activated()"), self.openFileAs) + tqt.TQObject.connect(openaction, tqt.TQ_SIGNAL("activated()"), self.openFileAs) openaction.addTo(filemenu) saveaction = tqt.TQAction("Save", tqt.TQKeySequence("CTRL+S"), self) - tqt.TQObject.connect(saveaction, tqt.SIGNAL("activated()"), self.saveFile) + tqt.TQObject.connect(saveaction, tqt.TQ_SIGNAL("activated()"), self.saveFile) saveaction.addTo(filemenu) saveasaction = tqt.TQAction("Save as...", tqt.TQKeySequence("CTRL+A"), self) - tqt.TQObject.connect(saveasaction, tqt.SIGNAL("activated()"), self.saveFileAs) + tqt.TQObject.connect(saveasaction, tqt.TQ_SIGNAL("activated()"), self.saveFileAs) saveasaction.addTo(filemenu) filemenu.insertSeparator() quitaction = tqt.TQAction("Quit", tqt.TQKeySequence("CTRL+Q"), self) - tqt.TQObject.connect(quitaction, tqt.SIGNAL("activated()"), self.close) + tqt.TQObject.connect(quitaction, tqt.TQ_SIGNAL("activated()"), self.close) quitaction.addTo(filemenu) editmenu = tqt.TQPopupMenu(menu) menu.insertItem("&Edit", editmenu) undoaction = tqt.TQAction("Undo", tqt.TQKeySequence("CTRL+Z"), self) - tqt.TQObject.connect(undoaction, tqt.SIGNAL("activated()"), self.scripttext.undo) + tqt.TQObject.connect(undoaction, tqt.TQ_SIGNAL("activated()"), self.scripttext.undo) undoaction.addTo(editmenu) redoaction = tqt.TQAction("Redo", tqt.TQKeySequence("CTRL+Shift+Z"), self) - tqt.TQObject.connect(redoaction, tqt.SIGNAL("activated()"), self.scripttext.redo) + tqt.TQObject.connect(redoaction, tqt.TQ_SIGNAL("activated()"), self.scripttext.redo) redoaction.addTo(editmenu) editmenu.insertSeparator() cutaction = tqt.TQAction("Cut", tqt.TQKeySequence("CTRL+X"), self) - tqt.TQObject.connect(cutaction, tqt.SIGNAL("activated()"), self.scripttext.cut) + tqt.TQObject.connect(cutaction, tqt.TQ_SIGNAL("activated()"), self.scripttext.cut) cutaction.addTo(editmenu) copyaction = tqt.TQAction("Copy", tqt.TQKeySequence("CTRL+C"), self) - tqt.TQObject.connect(copyaction, tqt.SIGNAL("activated()"), self.scripttext.copy) + tqt.TQObject.connect(copyaction, tqt.TQ_SIGNAL("activated()"), self.scripttext.copy) copyaction.addTo(editmenu) pasteaction = tqt.TQAction("Paste", tqt.TQKeySequence("CTRL+V"), self) - tqt.TQObject.connect(pasteaction, tqt.SIGNAL("activated()"), self.scripttext.paste) + tqt.TQObject.connect(pasteaction, tqt.TQ_SIGNAL("activated()"), self.scripttext.paste) pasteaction.addTo(editmenu) clearaction = tqt.TQAction("Clear", tqt.TQKeySequence("CTRL+Shift+X"), self) - tqt.TQObject.connect(clearaction, tqt.SIGNAL("activated()"), self.scripttext.clear) + tqt.TQObject.connect(clearaction, tqt.TQ_SIGNAL("activated()"), self.scripttext.clear) clearaction.addTo(editmenu) editmenu.insertSeparator() selallaction = tqt.TQAction("Select All", 0, self) - tqt.TQObject.connect(selallaction, tqt.SIGNAL("activated()"), self.scripttext.selectAll) + tqt.TQObject.connect(selallaction, tqt.TQ_SIGNAL("activated()"), self.scripttext.selectAll) selallaction.addTo(editmenu) scriptmenu = tqt.TQPopupMenu(menu) menu.insertItem("&Script", scriptmenu) compileaction = tqt.TQAction("Compile", tqt.TQKeySequence("F9"), self) - tqt.TQObject.connect(compileaction, tqt.SIGNAL("activated()"), self.compileScript) + tqt.TQObject.connect(compileaction, tqt.TQ_SIGNAL("activated()"), self.compileScript) compileaction.addTo(scriptmenu) executeaction = tqt.TQAction("Execute", tqt.TQKeySequence("F10"), self) - tqt.TQObject.connect(executeaction, tqt.SIGNAL("activated()"), self.executeScript) + tqt.TQObject.connect(executeaction, tqt.TQ_SIGNAL("activated()"), self.executeScript) executeaction.addTo(scriptmenu) self.samplemenu = tqt.TQPopupMenu(menu) @@ -944,7 +944,7 @@ class MainDialog(tqt.TQDialog): if samplename.startswith("_"): continue itemid += 1 menu = tqt.TQPopupMenu(self.samplemenu) - tqt.TQObject.connect(menu, tqt.SIGNAL("activated(int)"), self.sampleActivated) + tqt.TQObject.connect(menu, tqt.TQ_SIGNAL("activated(int)"), self.sampleActivated) self.samplemenu.insertItem(samplename, menu, -1, self.samplemenu.count() - 1) attr = getattr(Samples,samplename) for a in dir(attr): |