- overloaded the context menu in several classes from GUI Elements such that the menus are now translated
- fixed a formatting issue in the MainGUI.py file - updated the translations for the new strings that were added
This commit is contained in:
@@ -509,6 +509,8 @@ class FCEntry(QtWidgets.QLineEdit):
|
||||
align_val = QtCore.Qt.AlignLeft
|
||||
self.setAlignment(align_val)
|
||||
|
||||
self.menu = None
|
||||
|
||||
def on_edit_finished(self):
|
||||
self.clearFocus()
|
||||
|
||||
@@ -524,6 +526,80 @@ class FCEntry(QtWidgets.QLineEdit):
|
||||
self.deselect()
|
||||
self.readyToEdit = True
|
||||
|
||||
def contextMenuEvent(self, event):
|
||||
self.menu = QtWidgets.QMenu()
|
||||
|
||||
# UNDO
|
||||
undo_action = QAction('%s\t%s' % (_("Undo"), _('Ctrl+Z')), self)
|
||||
self.menu.addAction(undo_action)
|
||||
undo_action.triggered.connect(self.undo)
|
||||
if self.isUndoAvailable() is False:
|
||||
undo_action.setDisabled(True)
|
||||
|
||||
# REDO
|
||||
redo_action = QAction('%s\t%s' % (_("Redo"), _('Ctrl+Y')), self)
|
||||
self.menu.addAction(redo_action)
|
||||
redo_action.triggered.connect(self.redo)
|
||||
if self.isRedoAvailable() is False:
|
||||
redo_action.setDisabled(True)
|
||||
|
||||
self.menu.addSeparator()
|
||||
|
||||
# CUT
|
||||
cut_action = QAction('%s\t%s' % (_("Cut"), _('Ctrl+X')), self)
|
||||
self.menu.addAction(cut_action)
|
||||
cut_action.triggered.connect(self.cut_text)
|
||||
if not self.hasSelectedText():
|
||||
cut_action.setDisabled(True)
|
||||
|
||||
# COPY
|
||||
copy_action = QAction('%s\t%s' % (_("Copy"), _('Ctrl+C')), self)
|
||||
self.menu.addAction(copy_action)
|
||||
copy_action.triggered.connect(self.copy_text)
|
||||
if not self.hasSelectedText():
|
||||
copy_action.setDisabled(True)
|
||||
|
||||
# PASTE
|
||||
paste_action = QAction('%s\t%s' % (_("Paste"), _('Ctrl+V')), self)
|
||||
self.menu.addAction(paste_action)
|
||||
paste_action.triggered.connect(self.paste_text)
|
||||
|
||||
# DELETE
|
||||
delete_action = QAction('%s\t%s' % (_("Delete"), _('Del')), self)
|
||||
self.menu.addAction(delete_action)
|
||||
delete_action.triggered.connect(self.del_)
|
||||
|
||||
self.menu.addSeparator()
|
||||
|
||||
# SELECT ALL
|
||||
sel_all_action = QAction('%s\t%s' % (_("Select All"), _('Ctrl+A')), self)
|
||||
self.menu.addAction(sel_all_action)
|
||||
sel_all_action.triggered.connect(self.selectAll)
|
||||
|
||||
self.menu.exec_(event.globalPos())
|
||||
|
||||
def cut_text(self):
|
||||
clipboard = QtWidgets.QApplication.clipboard()
|
||||
|
||||
txt = self.selectedText()
|
||||
clipboard.clear()
|
||||
clipboard.setText(txt)
|
||||
|
||||
self.del_()
|
||||
|
||||
def copy_text(self):
|
||||
clipboard = QtWidgets.QApplication.clipboard()
|
||||
|
||||
txt = self.selectedText()
|
||||
clipboard.clear()
|
||||
clipboard.setText(txt)
|
||||
|
||||
def paste_text(self):
|
||||
clipboard = QtWidgets.QApplication.clipboard()
|
||||
|
||||
txt = clipboard.text()
|
||||
self.insert(txt)
|
||||
|
||||
def get_value(self):
|
||||
return str(self.text())
|
||||
|
||||
@@ -1254,6 +1330,19 @@ class FCTextAreaExtended(QtWidgets.QTextEdit):
|
||||
|
||||
self.completer_enable = False
|
||||
|
||||
self.menu = None
|
||||
self.undo_flag = False
|
||||
self.redo_flag = False
|
||||
|
||||
self.undoAvailable.connect(self.on_undo_available)
|
||||
self.redoAvailable.connect(self.on_redo_available)
|
||||
|
||||
def on_undo_available(self, val):
|
||||
self.undo_flag = val
|
||||
|
||||
def on_redo_available(self, val):
|
||||
self.redo_flag = val
|
||||
|
||||
def set_model_data(self, keyword_list):
|
||||
self.model.setStringList(keyword_list)
|
||||
|
||||
@@ -1320,9 +1409,9 @@ class FCTextAreaExtended(QtWidgets.QTextEdit):
|
||||
clip_text = clipboard.text()
|
||||
clip_text = clip_text.replace('\\', '/')
|
||||
self.insertPlainText(clip_text)
|
||||
|
||||
if modifier & Qt.ControlModifier and key == Qt.Key_Slash:
|
||||
self.comment()
|
||||
elif modifier & Qt.ControlModifier:
|
||||
if key == Qt.Key_Slash:
|
||||
self.comment()
|
||||
|
||||
tc = self.textCursor()
|
||||
if (key == Qt.Key_Tab or key == Qt.Key_Enter or key == Qt.Key_Return) and self.completer.popup().isVisible():
|
||||
@@ -1381,6 +1470,89 @@ class FCTextAreaExtended(QtWidgets.QTextEdit):
|
||||
else:
|
||||
self.completer.popup().hide()
|
||||
|
||||
def contextMenuEvent(self, event):
|
||||
self.menu = QtWidgets.QMenu()
|
||||
tcursor = self.textCursor()
|
||||
txt = tcursor.selectedText()
|
||||
|
||||
# UNDO
|
||||
undo_action = QAction('%s\t%s' % (_("Undo"), _('Ctrl+Z')), self)
|
||||
self.menu.addAction(undo_action)
|
||||
undo_action.triggered.connect(self.undo)
|
||||
if self.undo_flag is False:
|
||||
undo_action.setDisabled(True)
|
||||
|
||||
# REDO
|
||||
redo_action = QAction('%s\t%s' % (_("Redo"), _('Ctrl+Y')), self)
|
||||
self.menu.addAction(redo_action)
|
||||
redo_action.triggered.connect(self.redo)
|
||||
if self.redo_flag is False:
|
||||
redo_action.setDisabled(True)
|
||||
|
||||
self.menu.addSeparator()
|
||||
|
||||
# CUT
|
||||
cut_action = QAction('%s\t%s' % (_("Cut"), _('Ctrl+X')), self)
|
||||
self.menu.addAction(cut_action)
|
||||
cut_action.triggered.connect(self.cut_text)
|
||||
if txt == '':
|
||||
cut_action.setDisabled(True)
|
||||
|
||||
# COPY
|
||||
copy_action = QAction('%s\t%s' % (_("Copy"), _('Ctrl+C')), self)
|
||||
self.menu.addAction(copy_action)
|
||||
copy_action.triggered.connect(self.copy_text)
|
||||
if txt == '':
|
||||
copy_action.setDisabled(True)
|
||||
|
||||
# PASTE
|
||||
paste_action = QAction('%s\t%s' % (_("Paste"), _('Ctrl+V')), self)
|
||||
self.menu.addAction(paste_action)
|
||||
paste_action.triggered.connect(self.paste_text)
|
||||
|
||||
# DELETE
|
||||
delete_action = QAction('%s\t%s' % (_("Delete"), _('Del')), self)
|
||||
self.menu.addAction(delete_action)
|
||||
delete_action.triggered.connect(self.delete_text)
|
||||
|
||||
self.menu.addSeparator()
|
||||
|
||||
# SELECT ALL
|
||||
sel_all_action = QAction('%s\t%s' % (_("Select All"), _('Ctrl+A')), self)
|
||||
self.menu.addAction(sel_all_action)
|
||||
sel_all_action.triggered.connect(self.selectAll)
|
||||
|
||||
self.menu.exec_(event.globalPos())
|
||||
|
||||
def cut_text(self):
|
||||
tcursor = self.textCursor()
|
||||
clipboard = QtWidgets.QApplication.clipboard()
|
||||
|
||||
txt = tcursor.selectedText()
|
||||
clipboard.clear()
|
||||
clipboard.setText(txt)
|
||||
|
||||
tcursor.deleteChar()
|
||||
|
||||
def copy_text(self):
|
||||
tcursor = self.textCursor()
|
||||
clipboard = QtWidgets.QApplication.clipboard()
|
||||
|
||||
txt = tcursor.selectedText()
|
||||
clipboard.clear()
|
||||
clipboard.setText(txt)
|
||||
|
||||
def paste_text(self):
|
||||
tcursor = self.textCursor()
|
||||
clipboard = QtWidgets.QApplication.clipboard()
|
||||
|
||||
txt = clipboard.text()
|
||||
tcursor.insertText(txt)
|
||||
|
||||
def delete_text(self):
|
||||
tcursor = self.textCursor()
|
||||
tcursor.deleteChar()
|
||||
|
||||
def comment(self):
|
||||
"""
|
||||
Got it from here:
|
||||
@@ -1423,6 +1595,19 @@ class FCPlainTextAreaExtended(QtWidgets.QPlainTextEdit):
|
||||
|
||||
self.completer_enable = False
|
||||
|
||||
self.menu = None
|
||||
self.undo_flag = False
|
||||
self.redo_flag = False
|
||||
|
||||
self.undoAvailable.connect(self.on_undo_available)
|
||||
self.redoAvailable.connect(self.on_redo_available)
|
||||
|
||||
def on_undo_available(self, val):
|
||||
self.undo_flag = val
|
||||
|
||||
def on_redo_available(self, val):
|
||||
self.redo_flag = val
|
||||
|
||||
def append(self, text):
|
||||
"""
|
||||
Added this to make this subclass compatible with FCTextAreaExtended
|
||||
@@ -1461,6 +1646,89 @@ class FCPlainTextAreaExtended(QtWidgets.QPlainTextEdit):
|
||||
self.completer.setWidget(self)
|
||||
QtWidgets.QPlainTextEdit.focusInEvent(self, event)
|
||||
|
||||
def contextMenuEvent(self, event):
|
||||
self.menu = QtWidgets.QMenu()
|
||||
tcursor = self.textCursor()
|
||||
txt = tcursor.selectedText()
|
||||
|
||||
# UNDO
|
||||
undo_action = QAction('%s\t%s' % (_("Undo"), _('Ctrl+Z')), self)
|
||||
self.menu.addAction(undo_action)
|
||||
undo_action.triggered.connect(self.undo)
|
||||
if self.undo_flag is False:
|
||||
undo_action.setDisabled(True)
|
||||
|
||||
# REDO
|
||||
redo_action = QAction('%s\t%s' % (_("Redo"), _('Ctrl+Y')), self)
|
||||
self.menu.addAction(redo_action)
|
||||
redo_action.triggered.connect(self.redo)
|
||||
if self.redo_flag is False:
|
||||
redo_action.setDisabled(True)
|
||||
|
||||
self.menu.addSeparator()
|
||||
|
||||
# CUT
|
||||
cut_action = QAction('%s\t%s' % (_("Cut"), _('Ctrl+X')), self)
|
||||
self.menu.addAction(cut_action)
|
||||
cut_action.triggered.connect(self.cut_text)
|
||||
if txt == '':
|
||||
cut_action.setDisabled(True)
|
||||
|
||||
# COPY
|
||||
copy_action = QAction('%s\t%s' % (_("Copy"), _('Ctrl+C')), self)
|
||||
self.menu.addAction(copy_action)
|
||||
copy_action.triggered.connect(self.copy_text)
|
||||
if txt == '':
|
||||
copy_action.setDisabled(True)
|
||||
|
||||
# PASTE
|
||||
paste_action = QAction('%s\t%s' % (_("Paste"), _('Ctrl+V')), self)
|
||||
self.menu.addAction(paste_action)
|
||||
paste_action.triggered.connect(self.paste_text)
|
||||
|
||||
# DELETE
|
||||
delete_action = QAction('%s\t%s' % (_("Delete"), _('Del')), self)
|
||||
self.menu.addAction(delete_action)
|
||||
delete_action.triggered.connect(self.delete_text)
|
||||
|
||||
self.menu.addSeparator()
|
||||
|
||||
# SELECT ALL
|
||||
sel_all_action = QAction('%s\t%s' % (_("Select All"), _('Ctrl+A')), self)
|
||||
self.menu.addAction(sel_all_action)
|
||||
sel_all_action.triggered.connect(self.selectAll)
|
||||
|
||||
self.menu.exec_(event.globalPos())
|
||||
|
||||
def cut_text(self):
|
||||
tcursor = self.textCursor()
|
||||
clipboard = QtWidgets.QApplication.clipboard()
|
||||
|
||||
txt = tcursor.selectedText()
|
||||
clipboard.clear()
|
||||
clipboard.setText(txt)
|
||||
|
||||
tcursor.deleteChar()
|
||||
|
||||
def copy_text(self):
|
||||
tcursor = self.textCursor()
|
||||
clipboard = QtWidgets.QApplication.clipboard()
|
||||
|
||||
txt = tcursor.selectedText()
|
||||
clipboard.clear()
|
||||
clipboard.setText(txt)
|
||||
|
||||
def paste_text(self):
|
||||
tcursor = self.textCursor()
|
||||
clipboard = QtWidgets.QApplication.clipboard()
|
||||
|
||||
txt = clipboard.text()
|
||||
tcursor.insertText(txt)
|
||||
|
||||
def delete_text(self):
|
||||
tcursor = self.textCursor()
|
||||
tcursor.deleteChar()
|
||||
|
||||
def set_value(self, val):
|
||||
self.setPlainText(val)
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@ class MainGUI(QtWidgets.QMainWindow):
|
||||
|
||||
# New Project
|
||||
self.menufilenewproject = QtWidgets.QAction(QtGui.QIcon(self.app.resource_location + '/file16.png'),
|
||||
'%s\t%s...' % (_('New Project'), _("Ctrl+N")), self)
|
||||
'%s...\t%s' % (_('New Project'), _("Ctrl+N")), self)
|
||||
self.menufilenewproject.setToolTip(
|
||||
_("Will create a new, blank project")
|
||||
)
|
||||
@@ -120,31 +120,31 @@ class MainGUI(QtWidgets.QMainWindow):
|
||||
|
||||
# Open Project ...
|
||||
self.menufileopenproject = QtWidgets.QAction(
|
||||
QtGui.QIcon(self.app.resource_location + '/folder16.png'), '%s\t%s...' % (_('Open Project'), _('Ctrl+O')),
|
||||
QtGui.QIcon(self.app.resource_location + '/folder16.png'), '%s...\t%s' % (_('Open Project'), _('Ctrl+O')),
|
||||
self)
|
||||
self.menufile_open.addAction(self.menufileopenproject)
|
||||
self.menufile_open.addSeparator()
|
||||
|
||||
# Open Gerber ...
|
||||
self.menufileopengerber = QtWidgets.QAction(QtGui.QIcon(self.app.resource_location + '/flatcam_icon24.png'),
|
||||
'%s\t%s...' % (_('Open Gerber'), _('Ctrl+G')), self)
|
||||
'%s...\t%s' % (_('Open Gerber'), _('Ctrl+G')), self)
|
||||
self.menufile_open.addAction(self.menufileopengerber)
|
||||
|
||||
# Open Excellon ...
|
||||
self.menufileopenexcellon = QtWidgets.QAction(QtGui.QIcon(self.app.resource_location + '/open_excellon32.png'),
|
||||
'%s\t%s...' % (_('Open Excellon'), _('Ctrl+E')), self)
|
||||
'%s...\t%s' % (_('Open Excellon'), _('Ctrl+E')), self)
|
||||
self.menufile_open.addAction(self.menufileopenexcellon)
|
||||
|
||||
# Open G-Code ...
|
||||
self.menufileopengcode = QtWidgets.QAction(
|
||||
QtGui.QIcon(self.app.resource_location + '/code.png'), '%s\t%s...' % (_('Open G-Code'), ''), self)
|
||||
QtGui.QIcon(self.app.resource_location + '/code.png'), '%s...\t%s' % (_('Open G-Code'), ''), self)
|
||||
self.menufile_open.addAction(self.menufileopengcode)
|
||||
|
||||
self.menufile_open.addSeparator()
|
||||
|
||||
# Open Config File...
|
||||
self.menufileopenconfig = QtWidgets.QAction(
|
||||
QtGui.QIcon(self.app.resource_location + '/folder16.png'), '%s\t%s...' % (_('Open Config'), ''), self)
|
||||
QtGui.QIcon(self.app.resource_location + '/folder16.png'), '%s...\t%s' % (_('Open Config'), ''), self)
|
||||
self.menufile_open.addAction(self.menufileopenconfig)
|
||||
|
||||
# Recent
|
||||
@@ -158,13 +158,13 @@ class MainGUI(QtWidgets.QMainWindow):
|
||||
|
||||
# Save Project
|
||||
self.menufilesaveproject = QtWidgets.QAction(
|
||||
QtGui.QIcon(self.app.resource_location + '/floppy16.png'), '%s\t%s...' % (_('Save Project'), _('Ctrl+S')),
|
||||
QtGui.QIcon(self.app.resource_location + '/floppy16.png'), '%s...\t%s' % (_('Save Project'), _('Ctrl+S')),
|
||||
self)
|
||||
self.menufile_save.addAction(self.menufilesaveproject)
|
||||
|
||||
# Save Project As ...
|
||||
self.menufilesaveprojectas = QtWidgets.QAction(QtGui.QIcon(self.app.resource_location + '/floppy16.png'),
|
||||
'%s\t%s...' % (_('Save Project As'), _('Ctrl+Shift+S')), self)
|
||||
'%s...\t%s' % (_('Save Project As'), _('Ctrl+Shift+S')), self)
|
||||
self.menufile_save.addAction(self.menufilesaveprojectas)
|
||||
|
||||
# Save Project Copy ...
|
||||
@@ -183,15 +183,15 @@ class MainGUI(QtWidgets.QMainWindow):
|
||||
self.menufile_scripting.setToolTipsVisible(True)
|
||||
|
||||
self.menufilenewscript = QtWidgets.QAction(QtGui.QIcon(self.app.resource_location + '/script_new16.png'),
|
||||
'%s\t%s...' % (_('New Script'), ''), self)
|
||||
'%s...\t%s' % (_('New Script'), ''), self)
|
||||
self.menufileopenscript = QtWidgets.QAction(QtGui.QIcon(self.app.resource_location + '/open_script32.png'),
|
||||
'%s\t%s...' % (_('Open Script'), ''), self)
|
||||
'%s...\t%s' % (_('Open Script'), ''), self)
|
||||
self.menufileopenscriptexample = QtWidgets.QAction(
|
||||
QtGui.QIcon(self.app.resource_location + '/open_script32.png'),
|
||||
'%s\t%s...' % (_('Open Example'), ''), self)
|
||||
'%s...\t%s' % (_('Open Example'), ''), self)
|
||||
self.menufilerunscript = QtWidgets.QAction(
|
||||
QtGui.QIcon(self.app.resource_location + '/script16.png'),
|
||||
'%s\t%s...' % (_('Run Script'), _('Shift+S')), self)
|
||||
'%s...\t%s' % (_('Run Script'), _('Shift+S')), self)
|
||||
self.menufilerunscript.setToolTip(
|
||||
_("Will run the opened Tcl Script thus\n"
|
||||
"enabling the automation of certain\n"
|
||||
@@ -211,26 +211,26 @@ class MainGUI(QtWidgets.QMainWindow):
|
||||
QtGui.QIcon(self.app.resource_location + '/import.png'), _('Import'))
|
||||
self.menufileimportsvg = QtWidgets.QAction(
|
||||
QtGui.QIcon(self.app.resource_location + '/svg16.png'),
|
||||
'%s\t%s...' % (_('SVG as Geometry Object'), ''), self)
|
||||
'%s...\t%s' % (_('SVG as Geometry Object'), ''), self)
|
||||
self.menufileimport.addAction(self.menufileimportsvg)
|
||||
self.menufileimportsvg_as_gerber = QtWidgets.QAction(
|
||||
QtGui.QIcon(self.app.resource_location + '/svg16.png'),
|
||||
'%s\t%s...' % (_('SVG as Gerber Object'), ''), self)
|
||||
'%s...\t%s' % (_('SVG as Gerber Object'), ''), self)
|
||||
self.menufileimport.addAction(self.menufileimportsvg_as_gerber)
|
||||
self.menufileimport.addSeparator()
|
||||
|
||||
self.menufileimportdxf = QtWidgets.QAction(
|
||||
QtGui.QIcon(self.app.resource_location + '/dxf16.png'),
|
||||
'%s\t%s...' % (_('DXF as Geometry Object'), ''), self)
|
||||
'%s...\t%s' % (_('DXF as Geometry Object'), ''), self)
|
||||
self.menufileimport.addAction(self.menufileimportdxf)
|
||||
self.menufileimportdxf_as_gerber = QtWidgets.QAction(
|
||||
QtGui.QIcon(self.app.resource_location + '/dxf16.png'),
|
||||
'%s\t%s...' % (_('DXF as Gerber Object'), ''), self)
|
||||
'%s...\t%s' % (_('DXF as Gerber Object'), ''), self)
|
||||
self.menufileimport.addAction(self.menufileimportdxf_as_gerber)
|
||||
self.menufileimport.addSeparator()
|
||||
self.menufileimport_hpgl2_as_geo = QtWidgets.QAction(
|
||||
QtGui.QIcon(self.app.resource_location + '/dxf16.png'),
|
||||
'%s\t%s...' % (_('HPGL2 as Geometry Object'), ''), self)
|
||||
'%s...\t%s' % (_('HPGL2 as Geometry Object'), ''), self)
|
||||
self.menufileimport.addAction(self.menufileimport_hpgl2_as_geo)
|
||||
self.menufileimport.addSeparator()
|
||||
|
||||
@@ -241,19 +241,19 @@ class MainGUI(QtWidgets.QMainWindow):
|
||||
|
||||
self.menufileexportsvg = QtWidgets.QAction(
|
||||
QtGui.QIcon(self.app.resource_location + '/export.png'),
|
||||
'%s\t%s...' % (_('Export SVG'), ''), self)
|
||||
'%s...\t%s' % (_('Export SVG'), ''), self)
|
||||
self.menufileexport.addAction(self.menufileexportsvg)
|
||||
|
||||
self.menufileexportdxf = QtWidgets.QAction(
|
||||
QtGui.QIcon(self.app.resource_location + '/export.png'),
|
||||
'%s\t%s...' % (_('Export DXF'), ''), self)
|
||||
'%s...\t%s' % (_('Export DXF'), ''), self)
|
||||
self.menufileexport.addAction(self.menufileexportdxf)
|
||||
|
||||
self.menufileexport.addSeparator()
|
||||
|
||||
self.menufileexportpng = QtWidgets.QAction(
|
||||
QtGui.QIcon(self.app.resource_location + '/export_png32.png'),
|
||||
'%s\t%s...' % (_('Export PNG'), ''), self)
|
||||
'%s...\t%s' % (_('Export PNG'), ''), self)
|
||||
self.menufileexportpng.setToolTip(
|
||||
_("Will export an image in PNG format,\n"
|
||||
"the saved image will contain the visual \n"
|
||||
@@ -265,7 +265,7 @@ class MainGUI(QtWidgets.QMainWindow):
|
||||
|
||||
self.menufileexportexcellon = QtWidgets.QAction(
|
||||
QtGui.QIcon(self.app.resource_location + '/drill32.png'),
|
||||
'%s\t%s...' % (_('Export Excellon'), ''), self)
|
||||
'%s...\t%s' % (_('Export Excellon'), ''), self)
|
||||
self.menufileexportexcellon.setToolTip(
|
||||
_("Will export an Excellon Object as Excellon file,\n"
|
||||
"the coordinates format, the file units and zeros\n"
|
||||
@@ -275,7 +275,7 @@ class MainGUI(QtWidgets.QMainWindow):
|
||||
|
||||
self.menufileexportgerber = QtWidgets.QAction(
|
||||
QtGui.QIcon(self.app.resource_location + '/flatcam_icon32.png'),
|
||||
'%s\t%s...' % (_('Export Gerber'), ''), self)
|
||||
'%s...\t%s' % (_('Export Gerber'), ''), self)
|
||||
self.menufileexportgerber.setToolTip(
|
||||
_("Will export an Gerber Object as Gerber file,\n"
|
||||
"the coordinates format, the file units and zeros\n"
|
||||
@@ -292,14 +292,14 @@ class MainGUI(QtWidgets.QMainWindow):
|
||||
# Import Preferences
|
||||
self.menufileimportpref = QtWidgets.QAction(
|
||||
QtGui.QIcon(self.app.resource_location + '/backup_import24.png'),
|
||||
'%s\t%s...' % (_('Import Preferences from file'), ''), self
|
||||
'%s...\t%s' % (_('Import Preferences from file'), ''), self
|
||||
)
|
||||
self.menufile_backup.addAction(self.menufileimportpref)
|
||||
|
||||
# Export Preferences
|
||||
self.menufileexportpref = QtWidgets.QAction(
|
||||
QtGui.QIcon(self.app.resource_location + '/backup_export24.png'),
|
||||
'%s\t%s...' % (_('Export Preferences to file'), ''), self)
|
||||
'%s...\t%s' % (_('Export Preferences to file'), ''), self)
|
||||
self.menufile_backup.addAction(self.menufileexportpref)
|
||||
|
||||
# Separator
|
||||
|
||||
Reference in New Issue
Block a user