[PATCH 2 of 2] Improve mainwindow documentation

Wald Commits scm-commit at wald.intevation.org
Wed Sep 24 15:13:25 CEST 2014


# HG changeset patch
# User Andre Heinecke <andre.heinecke at intevation.de>
# Date 1411564391 -7200
# Node ID 206eb5006c56ef27409c43fee2572a6e76e549bb
# Parent  a1e990947172a37097f863b6cbd5dbf7c742b1bb
Improve mainwindow documentation

diff -r a1e990947172 -r 206eb5006c56 ui/mainwindow.h
--- a/ui/mainwindow.h	Wed Sep 24 15:12:40 2014 +0200
+++ b/ui/mainwindow.h	Wed Sep 24 15:13:11 2014 +0200
@@ -50,16 +50,30 @@
      * */
     MainWindow(bool trayMode);
 
+    /**@brief set the current message to be shown
+     *
+     * The message will be shown at intervals in the system tray
+     * or as a messagebox if no stystemtray is available.
+     *
+     * @param [in] message The message to show.
+     */
     void setMessage(const QString message) {mCurMessage = message;}
+    /**@brief accessor for the current message.
+     *
+     * @returns the currently shown message.*/
     QString getMessage() {return mCurMessage;}
 
+    /**
+     * @enum CurrentState
+     * @brief The internal state of the application
+     */
     enum CurrentState {
-        BeforeDownload,
-        NewListAvailable,
-        NewSoftwareAvailable,
-        DownloadingSW,
-        TransferError,
-        NothingChanged
+        BeforeDownload, /*! Initial state before a connection is tried. */
+        NewListAvailable, /*! A new certificate list is available. */
+        NewSoftwareAvailable, /*! A new Software is avaialable. */
+        DownloadingSW, /*! Download in progress. */
+        TransferError, /*! An error happened on the last connection. */
+        NothingChanged /*! Update was susccessfull but nothing new is available. */
     };
 
     /**
@@ -75,21 +89,36 @@
 
     /** @brief accessor for the current state. */
     CurrentState getState() {return mCurState;}
+    /** @brief set the current state. */
     void setState(CurrentState state) {mCurState = state;}
 
 private slots:
+    /** @brief Shows the current message to the user. */
     void showMessage();
+    /** @brief User has clicked on the message notification. */
     void iconActivated(QSystemTrayIcon::ActivationReason reason);
+    /** @brief Check if new updates are available.
+     *
+     * @param[in] downloadSW wether or not new software should be downloaded.
+     */
     void checkUpdates(bool downloadSW = false);
+    /**@brief parse a new certificate list and update the UI*/
     void handleNewList(const QString& fileName, const QDateTime& modDate);
+    /**@brief handle a Software update, update state and inform the user */
     void handleNewSW(const QString& fileName, const QDateTime& modDate);
+    /**@brief an error occured while downloading.*/
     void downloaderError(const QString &message, SSLConnection::ErrorCode error);
     /** @brief Trigger the appropiate action depending on the state */
     void messageClicked();
+    /** @brief An error occured during certificate installation .*/
     void installerError(const QString& errMsg);
+    /** @brief Certificate installation was successful. */
     void installerSuccess();
+    /** @brief Install the currently selected certificates */
     void installCerts();
+    /** @brief Handle a toggle action in the manual certificate list */
     void toggleInManual(bool state, const Certificate &cert);
+    /** @brief Remove a certificate from the manual list. */
     void removeFromManual(bool state, const Certificate &cert);
 
     void togglePages(int button);


More information about the Trustbridge-commits mailing list