1 #ifndef PvlToXmlTranslationManager_h 2 #define PvlToXmlTranslationManager_h 28 #include <QDomDocument> 71 const QString &transFile);
77 virtual QString
Translate(QString translationGroupName,
int inputIndex = 0);
80 void Auto(QDomDocument &outputLabel);
81 void Auto(
Pvl &inputLabel, QDomDocument &outputLabel);
91 static void addElement(QDomElement &parent, QString name, QString value, QString units =
"");
92 static void setElementValue(QDomElement &element, QString value, QString units =
"");
93 static void resetElementValue(QDomElement &element, QString value, QString units =
"");
100 virtual std::vector< std::pair<QString, int> >
validKeywords()
const;
virtual ~PvlToXmlTranslationManager()
Destroys the TranslationManager object.
Definition: PvlToXmlTranslationManager.cpp:72
virtual QString Translate(QString translationGroupName, int inputIndex=0)
Returns a translated value.
Definition: PvlToXmlTranslationManager.cpp:119
Contains more than one keyword-value pair.
Definition: PvlContainer.h:63
static void addElement(QDomElement &parent, QString name, QString value, QString units="")
Add a QDomElement to the given parent with the indicated value and units.
Definition: PvlToXmlTranslationManager.cpp:513
void addAttributes(PvlKeyword something, QDomElement &parent)
Take in the outputAttributes PvlKeyword and add each attribute to the appropriate element given as an...
Definition: PvlToXmlTranslationManager.cpp:486
PvlToXmlTranslationManager(const QString &transFile)
Constructs and initializes a TranslationManager object from given the Pvl translation file...
Definition: PvlToXmlTranslationManager.cpp:51
QDomElement * createParentElements(const QString translationGroupName, QDomElement &xml)
Read the OutputPosition for the translation group name passed and create any parent elements specifie...
Definition: PvlToXmlTranslationManager.cpp:393
static void resetElementValue(QDomElement &element, QString value, QString units="")
Reset the QDomElement's value, and units, if units != "".
Definition: PvlToXmlTranslationManager.cpp:551
void doTranslation(PvlGroup transGroup, QDomElement &parent)
Translate the requested output name to output values using the input name and values or default value...
Definition: PvlToXmlTranslationManager.cpp:148
virtual const PvlContainer * GetContainer(const PvlKeyword &inputGroup) const
Return a container from the input label with the path given by the "InputPosition" keyword of the tra...
Definition: PvlToXmlTranslationManager.cpp:345
virtual std::vector< std::pair< QString, int > > validKeywords() const
Returns a vector of valid keyword names and their sizes.
Definition: PvlToXmlTranslationManager.cpp:94
Contains multiple PvlContainers.
Definition: PvlGroup.h:57
A single keyword-value pair.
Definition: PvlKeyword.h:98
static void setElementValue(QDomElement &element, QString value, QString units="")
Set the QDomElement's value, and units, if units != "".
Definition: PvlToXmlTranslationManager.cpp:531
void SetLabel(Pvl &inputLabel)
Internalizes a Pvl formatted label for translation.
Definition: PvlToXmlTranslationManager.cpp:81
Container for cube-like labels.
Definition: Pvl.h:135
virtual bool InputHasKeyword(const QString translationGroupName)
Indicates if the input keyword corresponding to the output name exists in the label.
Definition: PvlToXmlTranslationManager.cpp:319
Allows applications to translate simple text files.
Definition: PvlToXmlTranslationManager.h:66
void addSiblings(PvlKeyword outputSiblings, QDomElement &parent)
Take in outputSiblings PvlKeyword and turn each sibling into its corresponding QDomElement.
Definition: PvlToXmlTranslationManager.cpp:453
void Auto(QDomDocument &outputLabel)
Automatically translate all the output names found in the translation table.
Definition: PvlToXmlTranslationManager.cpp:236
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
Allows applications to translate simple text files.
Definition: LabelTranslationManager.h:59
virtual const PvlKeyword & InputKeyword(const QString translationGroupName) const
Uses the translation file group name to find the input label's PvlKeyword that corresponds to the Inp...
Definition: PvlToXmlTranslationManager.cpp:269
bool checkDependencies(QDomElement element, PvlKeyword dependencies, bool isDebug) const