changes done by simo
[qtmeetings] / src / Domain / Configuration / Configuration.h
index c08002d..5cd7e6d 100644 (file)
@@ -11,6 +11,7 @@ class StartupSettings;
 class DisplaySettings;
 class Room;
 class QDomNode;
+class DateTimeSettings;
 
 //! Domain class. Store application wide configuration values.
 /*!
@@ -20,7 +21,7 @@ class QDomNode;
  */
 class Configuration : public QObject
 {
-       Q_OBJECT
+Q_OBJECT
 
 private:
        //! Constructor.
@@ -76,6 +77,12 @@ public:
         * \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
@@ -87,8 +94,8 @@ public:
         * 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.
@@ -104,85 +111,100 @@ private:
         * \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.
        /*!
@@ -190,7 +212,7 @@ private:
         * \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
@@ -205,6 +227,8 @@ private:
        StartupSettings *iStartupSettings;
        //! Stores display settings.
        DisplaySettings *iDisplaySettings;
+       //! Stores date/time settings.
+       DateTimeSettings *iDateTimeSettings;
        //! List of meeting rooms.
        QList<Room*> iRooms;
        //! Stores administrator password.