From a39b92f278f6d1530cb151875b445185951634df Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 10 Mar 2010 20:44:18 +0000 Subject: Added KDE3 version of POTraceGUI git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/potracegui@1101754 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- src/options.h | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 src/options.h (limited to 'src/options.h') diff --git a/src/options.h b/src/options.h new file mode 100644 index 0000000..3ab53c0 --- /dev/null +++ b/src/options.h @@ -0,0 +1,66 @@ +/*************************************************************************** + * Copyright (C) 2003 by Antonio Fasolato * + * Antonio.Fasolato@poste.it * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + ***************************************************************************/ +#ifndef OPTIONS_H +#define OPTIONS_H + +#include +using namespace std; + +#include + + +//! Class that contains all the options for a document. +/*! + * \author Antonio Fasolato + * \version 1.0 + * + * Class that contains all the options for a document. These options regards the most disparate values: output formats, algorithm to use with potrace...
+ * Mainly this class contains options relevant to potrace. + */ +class Options{ +public: + //! Default constructor + Options(); + + //! Sets a pair (key,value) in this Options object. + /*! + * \param key The name of the option. Later on it will be used to read its value + * \param value The value associated with the key + * + * Sets a pair (key,value) in this Options object. If name is not in this object, it is added. + * + * \sa operator[]() + */ + void setValue(QString key, QString value); + //! Checks if the object contains no keys + /*! + * \returns \b true if the object is empty, \b false otherwise + */ + bool isEmpty(); + //! Clears all the options in the object + void clear(); + + //! Retrives an option value from the key associated whith it + /*! + * \param key the key of the option to retrive + * \returns The value associated with the key + * \sa setValue() + */ + QString operator[](QString key); + //! Sets all the options to their default value. + void defaultOptions(); + //! Prints the list of options + void debug(); + +private: + map options; /*!< The map containing the options */ +}; + +#endif -- cgit v1.2.3