51#ifndef _PCHANGEDEFAULTPATHSDIALOG_H_
52#define _PCHANGEDEFAULTPATHSDIALOG_H_
58#include <QXmlStreamReader>
61#include "ui_PChangeDefaultPathsDialog.h"
109 bool parse(QIODevice *device);
void addItem()
Add a new directory path via file browser dialog.
PChangeDefaultPathsDialog()
Constructs the default paths dialog.
std::unique_ptr< PDefaultPaths > fDefaultPath
Manages the default paths data.
void saveDefaultPathList()
Save the modified path list to the configuration file.
void deleteItem()
Remove the currently selected path from the list.
virtual bool isValid()
Check if the XML file was parsed successfully.
QXmlStreamReader fXml
Qt XML stream reader for parsing.
PDefaultPathsXMLParser(const QString &fln, PDefaultPaths *defaultPaths)
Constructs an XML parser for reading default data paths.
bool startElement()
Handler called when an XML start element is encountered.
bool characters()
Handler for XML element character content.
bool endDocument()
Handler called at the end of XML document parsing.
virtual ~PDefaultPathsXMLParser()
Virtual destructor.
EAdminKeyWords
Keywords for identifying XML elements during parsing.
@ eDataPath
Processing a <data_path> element.
@ eEmpty
No element currently being processed.
bool startDocument()
Handler called at the start of XML document parsing.
bool fValid
Flag indicating successful parsing.
PDefaultPaths * fDefaultPaths
Pointer to the object storing parsed paths.
bool parse(QIODevice *device)
Parse the XML configuration file for data paths.
bool endElement()
Handler called when an XML end element is encountered.
EAdminKeyWords fKeyWord
Current element type being processed.
Container class for managing default data file search paths.
friend class PDefaultPathsXMLParser
Allow parser to access private members.
virtual QStringList * getDefaultPathList()
Get the list of default search paths.
virtual bool isValid()
Check if the configuration was loaded successfully.
virtual void appendDefaultPath(QString str)
Add a new path to the default paths list.
virtual QString getPrefPathName()
Get the path to the configuration file being used.
QStringList fDefaultPath
List of default data file search directories.
QString fPrefPathName
Full path to the active configuration file.
PDefaultPaths()
Constructs a PDefaultPaths object and loads paths from configuration.
bool fValid
Flag indicating if configuration loaded successfully.
virtual ~PDefaultPaths()
Virtual destructor.