class DisplaySettings;
class Room;
class QDomNode;
+class DateTimeSettings;
//! Domain class. Store application wide configuration values.
/*!
*/
class Configuration : public QObject
{
- Q_OBJECT
+Q_OBJECT
private:
//! Constructor.
* \return Pointer to DisplaySettings instance.
*/
DisplaySettings* displaySettings();
+ //! Gets date/time settings.
+ /*!
+ * Gets the date/time settings.
+ * \return Pointer to DateTimeSettings instance.
+ */
+ DateTimeSettings* dateTimeSettings();
//! Gets the administrator's password.
/*!
* Gets the administrator's password
* Sets room list.
* \param aRooms List of rooms
*/
- void setRooms( const QList<Room*> aRooms );
-
+ void setRooms(const QList<Room*> aRooms);
+
public slots:
//! Saves setting values to file.
* \param aPath path and name of configuration file
* \return Configuration object.
*/
- static Configuration* readFromXML( const QString &aPath );
+ static Configuration* readFromXML(const QString &aPath);
//! Static. Reads settings of connection from and XML node.
/*!
* Static. Reads settings of connection from an XML node.
* \param aXml QDomNode containing connection parameters.
* \return Pointer to ConnectionSettings object.
*/
- static ConnectionSettings* readConnectionSettings( const QDomNode &aXML );
+ static ConnectionSettings* readConnectionSettings(const QDomNode &aXML);
//! Static. Reads rooms from an XML node.
/*!
* Static. Reads rooms from an XML node.
* \param aXml QDomNode containing meeting room parameters
* \return List of meetingrooms.
*/
- static QList<Room*> readRooms( const QDomNode &aXML );
+ static QList<Room*> readRooms(const QDomNode &aXML);
//! Static. Reads language code from an XML node.
/*!
* Static. Reads rooms from an XML node.
* \param aXml QDomNode containing language code
* \return Language code.
*/
- static QString readLanguageCode( const QDomNode &aXML );
+ static QString readLanguageCode(const QDomNode &aXML);
//! Static. Reads settings of startup from an XML node.
/*!
* Static. Reads settings of startup from an XML node.
* \param aXml QDomNode containing startup parameters
* \return Pointer to the read StartupSettings object.
*/
- static StartupSettings* readStartupSettings( const QDomNode &aXML );
+ static StartupSettings* readStartupSettings(const QDomNode &aXML);
/*!
* Static function to load and store display settings from xml node.
* \param aXml QDomNode containing display parameters
* \return Pointer to the read DisplaySettings object.
*/
- static DisplaySettings* readDisplaySettings( const QDomNode &aXML );
+ static DisplaySettings* readDisplaySettings(const QDomNode &aXML);
+ //! Static. Reads the date/time settings from an XML node.
+ /*!
+ * Static. Reads the date/time settings from an XML node.
+ * \param aXml QDomNode containing the date/time settings
+ * \return The date/time settings.
+ */
+ static DateTimeSettings* readDateTimeSettings(const QDomNode &aXML);
+
//! Static. Reads adminstrator's password from an XML node.
/*!
* Static. Reads adminstrator's password from an XML node.
* \param aXml QDomNode containing admin password
* \return Admin password.
*/
- static QByteArray readAdminPassword( const QDomNode &aXML );
+ static QByteArray readAdminPassword(const QDomNode &aXML);
//! Saves connection data to the document.
/*!
* Reads data from iConnectionSettings and saves it to the aXML document.
* \param aXml QDomNode containing connection parameters.
*/
- void saveConnectionSettings( const QDomNode &aXML );
+ void saveConnectionSettings(const QDomNode &aXML);
//! Saves meeting rooms to the document.
/*!
* Reads data from iRooms list and saves it to the aXML document.
* \param aXml QDomNode containing meeting room parameters
*/
- void saveRooms( const QDomNode &aXML );
+ void saveRooms(const QDomNode &aXML);
//! Saves the language code.
/*!
* Reads data from iLanguageCode and saves it to the aXML document.
* \param aXml QDomNode containing language code
*/
- void saveLanguageCode( const QDomNode &aXML );
+ void saveLanguageCode(const QDomNode &aXML);
//! Saves startup setting data to the document.
/*!
* Reads data from iStartupSettings and saves it to the aXML document.
* \param aXml QDomNode containing startup parameters
*/
- void saveStartupSettings( const QDomNode &aXML );
+ void saveStartupSettings(const QDomNode &aXML);
//! Saves display setting data to the document.
/*!
* Reads data from iDisplaySettings and saves it to the aXML document.
* \param aXml QDomNode containing display parameters
*/
- void saveDisplaySettings( const QDomNode &aXML );
+ void saveDisplaySettings(const QDomNode &aXML);
+ //! Saves date/time setting data to the document.
+ /*!
+ * Reads data from iDateTimeSettings and saves it to the aXML document.
+ * \param aXml QDomNode containing the date/time settings
+ */
+ void saveDateTimeSettings(const QDomNode &aXML);
+
//! Saves admin password to the document.
/*!
* Reads data from iAdminPassword and saves it to the aXML document.
* \param aXml QDomNode containing admin password
*/
- void saveAdminPassword( const QDomNode &aXML );
+ void saveAdminPassword(const QDomNode &aXML);
//! Hash password with md5 method.
/*!
* \param aPassword password to be encoded
* \return Encoded password.
*/
- QString hashPassword( const QString aPassword );
+ QString hashPassword(const QString aPassword);
private:
//! Path and name of configuration file
StartupSettings *iStartupSettings;
//! Stores display settings.
DisplaySettings *iDisplaySettings;
+ //! Stores date/time settings.
+ DateTimeSettings *iDateTimeSettings;
//! List of meeting rooms.
QList<Room*> iRooms;
//! Stores administrator password.