diff --git a/.gitignore b/.gitignore index 7b11e03..0ce42cd 100644 --- a/.gitignore +++ b/.gitignore @@ -35,4 +35,6 @@ build/ -CMakeLists.txt.user \ No newline at end of file +CMakeLists.txt.user + +html/ diff --git a/Doxyfile b/Doxyfile index 2758087..08c0ce2 100644 --- a/Doxyfile +++ b/Doxyfile @@ -992,11 +992,12 @@ WARN_LOGFILE = # Note: If this tag is empty the current directory is searched. INPUT = /home/sanderspeetjens/nmbs/git/unisim_cpp/server \ - /home/sanderspeetjens/nmbs/git/unisim_cpp/tests \ /home/sanderspeetjens/nmbs/git/unisim_cpp/UI \ /home/sanderspeetjens/nmbs/git/unisim_cpp/create_client.md \ /home/sanderspeetjens/nmbs/git/unisim_cpp/create_server.md \ - /home/sanderspeetjens/nmbs/git/unisim_cpp/README.md + /home/sanderspeetjens/nmbs/git/unisim_cpp/README.md \ + /home/sanderspeetjens/nmbs/git/unisim_cpp/UI \ + client # This tag can be used to specify the character encoding of the source files # that Doxygen parses. Internally Doxygen uses the UTF-8 encoding. Doxygen uses @@ -2018,7 +2019,7 @@ EXTRA_SEARCH_MAPPINGS = # If the GENERATE_LATEX tag is set to YES, Doxygen will generate LaTeX output. # The default value is: YES. -GENERATE_LATEX = YES +GENERATE_LATEX = NO # The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. If a # relative path is entered the value of OUTPUT_DIRECTORY will be put in front of diff --git a/UI/ui_hex_spinbox.hpp b/UI/ui_hex_spinbox.hpp index dd8afbe..c0c1748 100644 --- a/UI/ui_hex_spinbox.hpp +++ b/UI/ui_hex_spinbox.hpp @@ -3,6 +3,10 @@ #define UI_HEX_SPINBOX_TYPE std::string("ui_hex_spinbox") +/** + * @brief Class representing a UI hex spinbox + * + */ class UI_hex_spinbox : public UI_item { Q_OBJECT diff --git a/client/ui/better_radiobutton.hpp b/client/ui/better_radiobutton.hpp index 26f1c30..ed06d35 100644 --- a/client/ui/better_radiobutton.hpp +++ b/client/ui/better_radiobutton.hpp @@ -2,6 +2,10 @@ #include #include +/** + * @brief Class representing a better radiobutton group + * + */ class Better_Radiobutton : public QWidget { Q_OBJECT diff --git a/client/ui/can_transceive.hpp b/client/ui/can_transceive.hpp index bdbd059..e6e8fc7 100644 --- a/client/ui/can_transceive.hpp +++ b/client/ui/can_transceive.hpp @@ -7,6 +7,10 @@ namespace Ui class Can_Transceive; } +/** + * @brief Class representing a CAN transceive UI component + * + */ class Can_Transceive : public QWidget { Q_OBJECT diff --git a/client/ui/hex_spinbox.hpp b/client/ui/hex_spinbox.hpp index 33f4f9c..2ec7bd3 100644 --- a/client/ui/hex_spinbox.hpp +++ b/client/ui/hex_spinbox.hpp @@ -3,9 +3,12 @@ #include #include -// NOTE: Since QSpinBox uses int as the storage type, the effective editing range -// is +/- 0x7FFF FFFF, so it can't handle a full unsigned int. -// QDoubleSpinBox would be a more suitable base class if a wider range is needed. +/** + * @brief Class representing a hexadecimal spin box + * @note Since QSpinBox uses int as the storage type, the effective editing range + * is +/- 0x7FFF FFFF, so it can't handle a full unsigned int. + * QDoubleSpinBox would be a more suitable base class if a wider range is needed. + */ class HexSpinBox : public QSpinBox { Q_OBJECT @@ -42,8 +45,27 @@ class HexSpinBox : public QSpinBox void setFormat(const QString &text); protected: + /** + * @brief Validate the input text + * + * @param text The input text + * @param pos The position of the cursor + * @return QValidator::State The validation state + */ QValidator::State validate(QString &text, int &pos) const override; + /** + * @brief Convert text to value + * + * @param text The input text + * @return int The corresponding value + */ int valueFromText(const QString &text) const override; + /** + * @brief Convert value to text + * + * @param value The input value + * @return QString The corresponding text + */ QString textFromValue(int value) const override; private: diff --git a/client/ui/led.hpp b/client/ui/led.hpp index a652f82..5d0977c 100644 --- a/client/ui/led.hpp +++ b/client/ui/led.hpp @@ -1,6 +1,10 @@ #pragma once #include "QPushButton" +/** + * @brief Class representing an LED widget + * + */ class Led : public QPushButton { Q_OBJECT diff --git a/client/ui/plot_wrapper.hpp b/client/ui/plot_wrapper.hpp index 9830d4d..49ee226 100644 --- a/client/ui/plot_wrapper.hpp +++ b/client/ui/plot_wrapper.hpp @@ -4,6 +4,10 @@ #include #include +/** + * @brief Class wrapping a QwtPlot for plotting data + * + */ class Plot_wrapper : public QwtPlot { Q_OBJECT diff --git a/client/ui_base.hpp b/client/ui_base.hpp index ed1d95f..2cc8c07 100644 --- a/client/ui_base.hpp +++ b/client/ui_base.hpp @@ -18,6 +18,9 @@ using json = nlohmann::json; return new client(api, parent); \ } +/** + * @brief Base class for UI components + */ class UI_base : public QMainWindow { Q_OBJECT diff --git a/client/web_socket_wrapper.hpp b/client/web_socket_wrapper.hpp index 600b47d..ee47888 100644 --- a/client/web_socket_wrapper.hpp +++ b/client/web_socket_wrapper.hpp @@ -5,10 +5,17 @@ Q_FORWARD_DECLARE_OBJC_CLASS(QWebSocket); Q_FORWARD_DECLARE_OBJC_CLASS(QTimer); using json = nlohmann::json; +/** + * @brief Class wrapping a WebSocket connection + * + */ class Web_socket_wrapper : public QObject { Q_OBJECT public: + /** + * @brief Enumeration of commands + */ enum class Command { get_UI_element, @@ -20,6 +27,10 @@ class Web_socket_wrapper : public QObject begin = 0 }; + /** + * @brief Enumeration of events + * + */ enum class Event { clicked,