Rename GCodeReader to GCodeProfileReader

The new name is more appropriate since it reads only the profiles from the g-code. In the future there might be some other plug-in that reads the actual g-code as for instance a mesh.

Contributes to issue CURA-34.
This commit is contained in:
Ghostkeeper 2015-12-15 11:44:29 +01:00
parent edbbc96281
commit 63d007c02c
2 changed files with 5 additions and 5 deletions

View file

@ -2,7 +2,7 @@
# Cura is released under the terms of the AGPLv3 or higher. # Cura is released under the terms of the AGPLv3 or higher.
from UM.Application import Application #To get the current profile that should be updated with the settings from the g-code. from UM.Application import Application #To get the current profile that should be updated with the settings from the g-code.
from UM.Mesh.MeshReader import MeshReader from UM.Settings.ProfileReader import ProfileReader
import re #Regular expressions for parsing escape characters in the settings. import re #Regular expressions for parsing escape characters in the settings.
## A class that reads profile data from g-code files. ## A class that reads profile data from g-code files.
@ -10,7 +10,7 @@ import re #Regular expressions for parsing escape characters in the settings.
# It reads the profile data from g-code files and stores the profile as a new # It reads the profile data from g-code files and stores the profile as a new
# profile, and then immediately activates that profile. # profile, and then immediately activates that profile.
# This class currently does not process the rest of the g-code in any way. # This class currently does not process the rest of the g-code in any way.
class GCodeReader(MeshReader): class GCodeProfileReader(ProfileReader):
## Initialises the g-code reader as a mesh reader. ## Initialises the g-code reader as a mesh reader.
def __init__(self): def __init__(self):
super().__init__() super().__init__()

View file

@ -1,7 +1,7 @@
# Copyright (c) 2015 Ultimaker B.V. # Copyright (c) 2015 Ultimaker B.V.
# Cura is released under the terms of the AGPLv3 or higher. # Cura is released under the terms of the AGPLv3 or higher.
from . import GCodeReader from . import GCodeProfileReader
from UM.i18n import i18nCatalog from UM.i18n import i18nCatalog
catalog = i18nCatalog("cura") catalog = i18nCatalog("cura")
@ -17,9 +17,9 @@ def getMetaData():
}, },
"profile_reader": { "profile_reader": {
"extension": "gcode", "extension": "gcode",
"description": catalog.i18nc("@item:inlistbox", "Gcode File") "description": catalog.i18nc("@item:inlistbox", "G-code File")
} }
} }
def register(app): def register(app):
return { "profile_reader": GCodeReader.GCodeReader() } return { "profile_reader": GCodeProfileReader.GCodeProfileReader() }