62#include <QXmlStreamReader>
121 void setRGB(
const int r,
const int g,
const int b);
262 bool parse(QIODevice *device);
393 void getColor(QString name,
int &r,
int &g,
int &b);
402 void getColor(
int idx,
int &r,
int &g,
int &b);
445 void setMarker(
const int marker,
const double size);
454 void setColor(
const int r,
const int g,
const int b, QString name=
"");
bool startDocument()
Handler for XML document start.
PmuppAdmin * fAdmin
pointer to the admin object being populated
bool parse(QIODevice *device)
Main parsing method that processes the XML document.
virtual ~PmuppAdminXMLParser()
Destructor.
EAdminKeyWords fKeyWord
current element type being processed
QXmlStreamReader fXml
Qt XML stream reader object for parsing.
virtual bool isValid()
Checks if the XML parsing was successful.
PmuppAdminXMLParser(const QString &fln, PmuppAdmin *)
Constructor that parses the XML configuration file.
bool fValid
flag indicating successful XML parsing
bool characters()
Handler for XML element text content.
bool startElement()
Handler for XML element opening tags.
EAdminKeyWords
Enumeration of recognized XML element types.
@ eIgnoreThemeAutoDetection
theme auto-detection override
@ eEmpty
no specific element being processed
@ eDarkThemeIconsMenu
menu icon theme setting
@ eDarkThemeIconsToolbar
toolbar icon theme setting
@ eRecentFile
recent file path element
@ eMarker
marker definition element
bool endElement()
Handler for XML element closing tags.
bool endDocument()
Handler for XML document end.
Main administration class for mupp configuration management.
void addRecentFile(const QString str)
Adds a file to the recent files list.
void setMarker(const int marker, const double size)
Adds a marker definition to the configuration.
QVector< PmuppMarker > getMarkers()
Gets all markers.
QVector< PmuppColor > fColor
vector of configured plot colors
PmuppAdmin()
Constructor. Loads configuration from mupp_startup.xml.
int getNumRecentFiles()
Gets the number of recent files.
bool getIgnoreThemeAutoDetection()
Checks if theme auto-detection should be ignored.
int getNoOfColors()
Gets the number of configured colors.
void setThemeIconsToolbar(const bool theme)
Sets the toolbar icon theme preference.
virtual ~PmuppAdmin()
Destructor. Saves recent files list before destruction.
int getNoOfMarkers()
Gets the number of configured markers.
QVector< PmuppMarker > fMarker
vector of configured plot markers
QString getRecentFile(int idx)
Gets a recent file path by index.
friend class PmuppAdminXMLParser
QVector< PmuppColor > getColors()
Gets all colors.
bool fDarkThemeIconsMenu
flag for dark theme menu icons
void setThemeIconsMenu(const bool theme)
Sets the menu icon theme preference.
void setColor(const int r, const int g, const int b, QString name="")
Adds a color definition to the configuration.
bool fIgnoreThemeAutoDetection
flag to override automatic theme detection
void createMuppStartupFile()
Creates a default mupp_startup.xml configuration file.
bool getDarkThemeIconsToolbarFlag()
Checks if dark theme icons should be used for toolbars.
void saveRecentFiles()
Saves the recent files list to the configuration file.
QVector< QString > fRecentFile
ring buffer of recent file paths (max MAX_RECENT_FILES)
void getColor(QString name, int &r, int &g, int &b)
Gets a color by name.
PmuppMarker getMarker(int idx)
Gets a marker definition by index.
bool getDarkThemeIconsMenuFlag()
Checks if dark theme icons should be used for menus.
bool fDarkThemeIconsToolbar
flag for dark theme toolbar icons
void setIgnoreThemeAutoDetection(const bool theme)
Sets the theme auto-detection preference.
virtual ~PmuppColor()
Destructor.
int fBlue
blue component (0-255)
int fRed
red component (0-255)
QString getName()
Gets the color name.
void getRGB(int &r, int &g, int &b)
Gets the RGB values of the color.
PmuppColor()
Default constructor. Initializes color with undefined values.
QString fName
optional name identifier for the color
int fGreen
green component (0-255)
void setName(const QString name)
Sets the color name.
void setRGB(const int r, const int g, const int b)
Sets the RGB values with validation.
Represents a plot marker style and size.
void setMarker(int marker)
Sets the marker code.
void getMarker(int &marker, double &size)
Gets both marker code and size.
PmuppMarker(int marker, double size)
Constructor with specified marker properties.
PmuppMarker()
Default constructor. Initializes with marker code 20 and size 1.0.
double fMarkerSize
size multiplier (1.0 = default size)
double getMarkerSize()
Gets the marker size multiplier.
virtual ~PmuppMarker()
Destructor.
void setMarkerSize(double size)
Sets the marker size multiplier.
int getMarker()
Gets the marker code.
int fMarker
marker code (1-49, ROOT style)
Header file for mupp (muon parameter plotter) main application.