Procházet zdrojové kódy

- added new menu category in File -> Backup with two menu entries that duplicate the functions of the export/import preferences buttons from the bottom of the Preferences window

Marius Stanciu před 6 roky
rodič
revize
9e7d81d61b
6 změnil soubory, kde provedl 21 přidání a 1 odebrání
  1. 4 0
      FlatCAMApp.py
  2. 1 0
      README.md
  3. 16 1
      flatcamGUI/FlatCAMGUI.py
  4. binární
      share/backup24.png
  5. binární
      share/backup_export24.png
  6. binární
      share/backup_import24.png

+ 4 - 0
FlatCAMApp.py

@@ -1463,6 +1463,10 @@ class App(QtCore.QObject):
         self.ui.menufilesaveprojectas.triggered.connect(self.on_file_saveprojectas)
         self.ui.menufilesaveprojectcopy.triggered.connect(lambda: self.on_file_saveprojectas(make_copy=True))
         self.ui.menufilesavedefaults.triggered.connect(self.on_file_savedefaults)
+
+        self.ui.menufileexportpref.triggered.connect(self.on_export_preferences)
+        self.ui.menufileimportpref.triggered.connect(self.on_import_preferences)
+
         self.ui.menufile_exit.triggered.connect(self.final_save)
 
         self.ui.menueditedit.triggered.connect(lambda: self.object2editor())

+ 1 - 0
README.md

@@ -18,6 +18,7 @@ CAD program, and create G-Code for Isolation routing.
 - remade the enable/disable plots functions to work only where it needs to (no sense in disabling a plot already disabled)
 - made sure that if multi depth is choosed when creating GCode then if the multidepth is more than the depth of cut only one cut is made (to the depth of cut)
 - each CNCJob object has now it's own text_collection for the annotations which allow the individual enabling and disabling of the annotations
+- added new menu category in File -> Backup with two menu entries that duplicate the functions of the export/import preferences buttons from the bottom of the Preferences window
 
 15.08.2019
 

+ 16 - 1
flatcamGUI/FlatCAMGUI.py

@@ -194,12 +194,27 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
         self.menufile.addSeparator()
 
         # Save Defaults
-        self.menufilesavedefaults = QtWidgets.QAction(QtGui.QIcon('share/defaults.png'), _('Save &Defaults'), self)
+        self.menufilesavedefaults = QtWidgets.QAction(QtGui.QIcon('share/defaults.png'), _('Save Preferences'), self)
         self.menufile.addAction(self.menufilesavedefaults)
 
         # Separator
         self.menufile.addSeparator()
 
+        self.menufile_backup = self.menufile.addMenu(QtGui.QIcon('share/backup24.png'), _('Backup'))
+
+        # Import Preferences
+        self.menufileimportpref = QtWidgets.QAction(QtGui.QIcon('share/backup_import24.png'),
+                                                    _('Import Preferences from file ...'), self)
+        self.menufile_backup.addAction(self.menufileimportpref)
+
+        # Export Preferences
+        self.menufileexportpref = QtWidgets.QAction(QtGui.QIcon('share/backup_export24.png'),
+                                                    _('Export Preferences to file ...'), self)
+        self.menufile_backup.addAction(self.menufileexportpref)
+
+        # Separator
+        self.menufile.addSeparator()
+
         self.menufile_save = self.menufile.addMenu(QtGui.QIcon('share/save_as.png'), _('Save'))
 
         # Save Project

binární
share/backup24.png


binární
share/backup_export24.png


binární
share/backup_import24.png